Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王衍超
cloud-fb
Commits
13ebde71
Commit
13ebde71
authored
Jul 12, 2021
by
高晓磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
场站新增不许编辑状态的逻辑
parent
b15a9b0b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
2 deletions
+38
-2
StationDao.java
....biz/src/main/java/com/xyst/dinas/biz/dao/StationDao.java
+1
-0
StationDaoImpl.java
.../java/com/xyst/dinas/biz/internal/dao/StationDaoImpl.java
+10
-0
StationServiceImpl.java
...m/xyst/dinas/biz/internal/service/StationServiceImpl.java
+6
-0
StationService.java
.../main/java/com/xyst/dinas/biz/service/StationService.java
+2
-0
StationController.java
...c/main/java/com/xyst/dinas/biz/web/StationController.java
+19
-2
No files found.
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/dao/StationDao.java
View file @
13ebde71
...
@@ -27,4 +27,5 @@ public interface StationDao extends BaseDao {
...
@@ -27,4 +27,5 @@ public interface StationDao extends BaseDao {
List
<
KObject
>
queryStationByRegionalCompany
(
UUID
uuid
);
List
<
KObject
>
queryStationByRegionalCompany
(
UUID
uuid
);
List
<
KObject
>
getStationCameraById
(
UUID
id1
);
}
}
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/internal/dao/StationDaoImpl.java
View file @
13ebde71
...
@@ -194,4 +194,14 @@ public class StationDaoImpl extends AbstractBaseDao implements StationDao, Stat
...
@@ -194,4 +194,14 @@ public class StationDaoImpl extends AbstractBaseDao implements StationDao, Stat
});
});
}
}
@Override
public
List
<
KObject
>
getStationCameraById
(
UUID
id1
)
{
return
template
.
execute
(
session
->
{
Query
<
KObject
>
query
=
session
.
createQuery
(
" from com.xyst.dinas.camera.datamodel.CameraInfo where station.id=:id and del=:del"
,
KObject
.
class
);
query
.
setParameter
(
"id"
,
id1
);
query
.
setParameter
(
"del"
,
false
);
return
query
.
getResultList
();
});
}
}
}
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/internal/service/StationServiceImpl.java
View file @
13ebde71
...
@@ -86,5 +86,11 @@ public class StationServiceImpl implements StationService {
...
@@ -86,5 +86,11 @@ public class StationServiceImpl implements StationService {
return
list
;
return
list
;
}
}
@Override
public
List
<
KObject
>
getStationCameraById
(
UUID
id1
)
{
return
stationDao
.
getStationCameraById
(
id1
);
}
}
}
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/service/StationService.java
View file @
13ebde71
...
@@ -25,4 +25,6 @@ public interface StationService {
...
@@ -25,4 +25,6 @@ public interface StationService {
void
deleteById
(
UUID
id
);
void
deleteById
(
UUID
id
);
List
<
KObject
>
queryStationByRegionalCompany
();
List
<
KObject
>
queryStationByRegionalCompany
();
List
<
KObject
>
getStationCameraById
(
UUID
id1
);
}
}
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/web/StationController.java
View file @
13ebde71
...
@@ -2,6 +2,7 @@ package com.xyst.dinas.biz.web;
...
@@ -2,6 +2,7 @@ package com.xyst.dinas.biz.web;
import
com.beecode.amino.core.Amino
;
import
com.beecode.amino.core.Amino
;
import
com.beecode.bap.attachment.common.Page
;
import
com.beecode.bap.attachment.common.Page
;
import
com.beecode.bap.log.LogConstants
;
import
com.beecode.bcp.type.KClass
;
import
com.beecode.bcp.type.KClass
;
import
com.beecode.bcp.type.KObject
;
import
com.beecode.bcp.type.KObject
;
import
com.beecode.bcp.type.json.JSONObjectUtils
;
import
com.beecode.bcp.type.json.JSONObjectUtils
;
...
@@ -104,9 +105,25 @@ public class StationController {
...
@@ -104,9 +105,25 @@ public class StationController {
if
(
StringUtils
.
isEmpty
(
kobject
.
getString
(
"telephone"
))){
if
(
StringUtils
.
isEmpty
(
kobject
.
getString
(
"telephone"
))){
return
ResponseObj
.
error
(
400
,
"联系人电话不能为空"
);
return
ResponseObj
.
error
(
400
,
"联系人电话不能为空"
);
}
}
if
(
kobject
.
getUuid
(
"id"
)
==
null
){
UUID
id1
=
kobject
.
getUuid
(
"id"
);
if
(
id1
==
null
){
return
ResponseObj
.
error
(
400
,
"'id' must be not null!"
);
return
ResponseObj
.
error
(
400
,
"'id' must be not null!"
);
}
}
//判断场站状态
if
(
0
==
kobject
.
getInt
(
"stationStatus"
)){
//查询场站下是否有未禁用的用户
List
<
KObject
>
id
=
warehouseUserService
.
getAllByStationId
(
id1
);
if
(
id
.
size
()>
0
){
return
ResponseObj
.
error
(
500
,
"当前场站下有人员账号,请在清空账号后修改场站状态!"
);
}
//查询场站下是否有未删除的摄像头
List
<
KObject
>
cameras
=
stationService
.
getStationCameraById
(
id1
);
if
(
cameras
.
size
()>
0
){
return
ResponseObj
.
error
(
500
,
"当前场站下有摄像头信息,请在清空摄像头信息后修改场站状态!"
);
}
}
stationService
.
update
(
kobject
);
stationService
.
update
(
kobject
);
return
ResponseObj
.
success
(
"修改成功"
);
return
ResponseObj
.
success
(
"修改成功"
);
}
}
...
@@ -166,7 +183,7 @@ public class StationController {
...
@@ -166,7 +183,7 @@ public class StationController {
/**
/**
* 根据当前登录人所在区域公司查询场站
* 根据当前登录人所在区域公司查询场站
* @param
id
* @param
* @return
* @return
*/
*/
@GetMapping
(
"/queryStationByRegionalCompany"
)
@GetMapping
(
"/queryStationByRegionalCompany"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment