Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
38dee045
Commit
38dee045
authored
Jul 13, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改巡检隐患bug
parent
552b98df
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
34 deletions
+66
-34
CheckController.java
...join/amos/patrol/business/controller/CheckController.java
+1
-0
LatentDangerController.java
...os/patrol/business/controller/LatentDangerController.java
+1
-0
LatentDangerPatrolBo.java
.../business/entity/mybatis/extend/LatentDangerPatrolBo.java
+3
-0
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+24
-9
LatentDangerServiceImpl.java
...patrol/business/service/impl/LatentDangerServiceImpl.java
+16
-11
LatentDangerPatrolMapper.xml
...src/main/resources/db/mapper/LatentDangerPatrolMapper.xml
+21
-14
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/CheckController.java
View file @
38dee045
...
@@ -273,6 +273,7 @@ public class CheckController extends AbstractBaseController {
...
@@ -273,6 +273,7 @@ public class CheckController extends AbstractBaseController {
//数字换流站页面刷新
//数字换流站页面刷新
try
{
try
{
webMqttComponent
.
publish
(
patrolTopic
,
""
);
webMqttComponent
.
publish
(
patrolTopic
,
""
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
"数字换流站页面推送失败-----------"
+
e
.
getMessage
());
log
.
error
(
"数字换流站页面推送失败-----------"
+
e
.
getMessage
());
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/LatentDangerController.java
View file @
38dee045
...
@@ -139,6 +139,7 @@ public class LatentDangerController extends AbstractBaseController {
...
@@ -139,6 +139,7 @@ public class LatentDangerController extends AbstractBaseController {
}
}
return
iLatentDangerService
.
detail
(
id
,
user
.
getUserId
(),
isFinish
);
return
iLatentDangerService
.
detail
(
id
,
user
.
getUserId
(),
isFinish
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
}
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/entity/mybatis/extend/LatentDangerPatrolBo.java
View file @
38dee045
...
@@ -48,4 +48,7 @@ public class LatentDangerPatrolBo extends LatentDangerPatrolBoExtend {
...
@@ -48,4 +48,7 @@ public class LatentDangerPatrolBo extends LatentDangerPatrolBoExtend {
* 记录修改时间
* 记录修改时间
*/
*/
private
Date
updateDate
;
private
Date
updateDate
;
//input id
private
Long
inputId
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/CheckServiceImpl.java
View file @
38dee045
...
@@ -16,6 +16,7 @@ import javax.annotation.Resource;
...
@@ -16,6 +16,7 @@ import javax.annotation.Resource;
import
javax.transaction.Transactional
;
import
javax.transaction.Transactional
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.amos.patrol.dao.entity.Plan
;
import
com.yeejoin.amos.patrol.dao.entity.Plan
;
...
@@ -218,6 +219,7 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -218,6 +219,7 @@ public class CheckServiceImpl implements ICheckService {
PlanTask
planTask
=
null
;
PlanTask
planTask
=
null
;
Check
check
=
new
Check
();
Check
check
=
new
Check
();
HashMap
<
String
,
Object
>
routeParam
=
new
HashMap
<
String
,
Object
>();
HashMap
<
String
,
Object
>
routeParam
=
new
HashMap
<
String
,
Object
>();
Map
detail
=
null
;
Map
detail
=
null
;
Boolean
isOffline
=
requestParam
.
getIsOffline
();
Boolean
isOffline
=
requestParam
.
getIsOffline
();
...
@@ -350,7 +352,15 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -350,7 +352,15 @@ public class CheckServiceImpl implements ICheckService {
}
else
{
}
else
{
check
.
setScore
(
Integer
.
parseInt
(
XJConstant
.
POINT_NOT_SCORE
));
check
.
setScore
(
Integer
.
parseInt
(
XJConstant
.
POINT_NOT_SCORE
));
}
}
check
=
checkDao
.
save
(
check
);
// check = checkDao.save(check);
try
{
check
=
checkDao
.
save
(
check
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
List
<
CheckShot
>
imgList
=
new
ArrayList
<>();
List
<
CheckShot
>
imgList
=
new
ArrayList
<>();
...
@@ -433,14 +443,19 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -433,14 +443,19 @@ public class CheckServiceImpl implements ICheckService {
}
}
}
}
private
void
updateTaskStatus
(
Long
id
,
String
userId
){
private
void
updateTaskStatus
(
Long
id
,
String
userId
){
MessageModel
model
=
new
MessageModel
();
try
{
model
.
setRelationId
(
String
.
valueOf
(
id
));
MessageModel
model
=
new
MessageModel
();
model
.
setIsRead
(
true
);
model
.
setRelationId
(
String
.
valueOf
(
id
));
model
.
setMsgType
(
"patrolSystem"
);
model
.
setIsRead
(
true
);
if
(!
ObjectUtils
.
isEmpty
(
userId
)){
model
.
setMsgType
(
"patrolSystem"
);
model
.
setUserId
(
userId
);
if
(!
ObjectUtils
.
isEmpty
(
userId
)){
}
model
.
setUserId
(
userId
);
Systemctl
.
messageClient
.
update
(
model
);
}
FeignClientResult
<
MessageModel
>
update
=
Systemctl
.
messageClient
.
update
(
model
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
@Override
@Override
public
void
delCheckById
(
List
<
Long
>
list
)
{
public
void
delCheckById
(
List
<
Long
>
list
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/LatentDangerServiceImpl.java
View file @
38dee045
...
@@ -835,6 +835,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
...
@@ -835,6 +835,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
// detailVo.setCurrentUserCanExcute(true);
// detailVo.setCurrentUserCanExcute(true);
// }
// }
// }
// }
detailVo
.
setCurrentFlowRecordId
(
latentDangerBo
.
getCurrentFlowRecordId
());
detailVo
.
setCurrentFlowRecordId
(
latentDangerBo
.
getCurrentFlowRecordId
());
detailVo
.
setCurrentFlowRecordIdWeb
(
String
.
valueOf
(
latentDangerBo
.
getCurrentFlowRecordId
()));
detailVo
.
setCurrentFlowRecordIdWeb
(
String
.
valueOf
(
latentDangerBo
.
getCurrentFlowRecordId
()));
if
(!
StringUtils
.
isEmpty
(
latentDangerBo
.
getReformJson
()))
{
if
(!
StringUtils
.
isEmpty
(
latentDangerBo
.
getReformJson
()))
{
...
@@ -851,8 +852,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
...
@@ -851,8 +852,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
}
private
void
buildOfDifferentDangerType
(
LatentDangerBo
latentDangerBo
,
LatentDangerDetailVo
detailVo
)
{
private
void
buildOfDifferentDangerType
(
LatentDangerBo
latentDangerBo
,
LatentDangerDetailVo
detailVo
)
{
if
(
latentDangerBo
.
getDangerType
().
equals
(
LatentDangerTypeEnum
.
计划检查
.
getCode
())
if
(
latentDangerBo
.
getDangerType
().
equals
(
LatentDangerTypeEnum
.
计划检查
.
getCode
()
.
toString
()
)
||
latentDangerBo
.
getDangerType
().
equals
(
LatentDangerTypeEnum
.
无计划检查
.
getCode
()))
{
||
latentDangerBo
.
getDangerType
().
equals
(
LatentDangerTypeEnum
.
无计划检查
.
getCode
()
.
toString
()
))
{
LatentDangerPatrolBo
patrolBo
=
latentDangerPatrolMapper
.
getByDangerId
(
latentDangerBo
.
getId
());
LatentDangerPatrolBo
patrolBo
=
latentDangerPatrolMapper
.
getByDangerId
(
latentDangerBo
.
getId
());
if
(
patrolBo
!=
null
)
{
if
(
patrolBo
!=
null
)
{
LatentDangerDetailRiskVo
riskVo
=
new
LatentDangerDetailRiskVo
();
LatentDangerDetailRiskVo
riskVo
=
new
LatentDangerDetailRiskVo
();
...
@@ -870,19 +871,23 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
...
@@ -870,19 +871,23 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
if
(
StringUtil
.
isNotEmpty
(
checkUser
))
{
if
(
StringUtil
.
isNotEmpty
(
checkUser
))
{
riskVo
.
setCheckUser
(
checkUser
.
getRealName
());
riskVo
.
setCheckUser
(
checkUser
.
getRealName
());
}
}
RiskFactorBo
riskFactorBo
=
StringUtil
.
isNotEmpty
(
patrolBo
.
getClassifyOriginalId
())
?
riskFactorMapper
.
getById
(
Long
.
valueOf
(
patrolBo
.
getClassifyOriginalId
()))
:
null
;
// RiskFactorBo riskFactorBo = StringUtil.isNotEmpty(patrolBo.getClassifyOriginalId()) ? riskFactorMapper.getById(Long.valueOf(patrolBo.getClassifyOriginalId())) : null;
if
(
riskFactorBo
!=
null
&&
riskFactorBo
.
getEquipmentDepartmentId
()
!=
null
)
{
// if (riskFactorBo != null && riskFactorBo.getEquipmentDepartmentId() != null) {
DepartmentModel
department
=
remoteSecurityService
.
getDepartmentByDeptId
(
RequestContext
.
getToken
(),
getProduct
(),
RequestContext
.
getAppKey
(),
riskFactorBo
.
getEquipmentDepartmentId
().
toString
());
// DepartmentModel department = remoteSecurityService.getDepartmentByDeptId(RequestContext.getToken(), getProduct(),RequestContext.getAppKey(),riskFactorBo.getEquipmentDepartmentId().toString());
if
(
department
!=
null
)
{
// if (department != null) {
riskVo
.
setBelongDepartmentName
(
department
.
getDepartmentName
());
// riskVo.setBelongDepartmentName(department.getDepartmentName());
}
// }
}
// }
// List<CheckShot> checkShots = iCheckShotDao.findAllByCheckIdAndCheckInputId(patrolBo.getCheckId(),
// latentDangerBo.getBizId());
List
<
CheckShot
>
checkShots
=
iCheckShotDao
.
findAllByCheckIdAndCheckInputId
(
patrolBo
.
getCheckId
(),
List
<
CheckShot
>
checkShots
=
iCheckShotDao
.
findAllByCheckIdAndCheckInputId
(
patrolBo
.
getCheckId
(),
latentDangerBo
.
getBiz
Id
());
patrolBo
.
getInput
Id
());
if
(!
CollectionUtils
.
isEmpty
(
checkShots
))
{
if
(!
CollectionUtils
.
isEmpty
(
checkShots
))
{
List
<
String
>
photos
=
Lists
.
transform
(
checkShots
,
e
->
{
List
<
String
>
photos
=
Lists
.
transform
(
checkShots
,
e
->
{
if
(
e
!=
null
)
{
if
(
e
!=
null
)
{
return
fileServerAddress
+
e
.
getPhotoData
().
replaceAll
(
"\\\\"
,
"/"
);
// return fileServerAddress + e.getPhotoData().replaceAll("\\\\", "/");
return
e
.
getPhotoData
().
replaceAll
(
"\\\\"
,
"/"
);
}
else
{
}
else
{
return
""
;
return
""
;
}
}
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/LatentDangerPatrolMapper.xml
View file @
38dee045
...
@@ -127,8 +127,9 @@
...
@@ -127,8 +127,9 @@
</delete>
</delete>
<select
id=
"getByDangerId"
resultType=
"com.yeejoin.amos.patrol.business.entity.mybatis.extend.LatentDangerPatrolBo"
>
<select
id=
"getByDangerId"
resultType=
"com.yeejoin.amos.patrol.business.entity.mybatis.extend.LatentDangerPatrolBo"
>
select
select
a.*,
pci.check_id,
pci.input_id,
b.name as itemName,
b.name as itemName,
b.original_id as itemOriginalId,
b.original_id as itemOriginalId,
b.basis_json as itemBasis,
b.basis_json as itemBasis,
...
@@ -139,32 +140,38 @@
...
@@ -139,32 +140,38 @@
c.charge_dept_id as pointDepartMentId,
c.charge_dept_id as pointDepartMentId,
c.original_id as pointOriginalId,
c.original_id as pointOriginalId,
d.name as routeName,
d.name as routeName,
e
.check_time as checkTime,
pc
.check_time as checkTime,
e
.user_id as checkUserId,
pc
.user_id as checkUserId,
e
.dep_id as checkDepartmentId,
pc
.dep_id as checkDepartmentId,
f.name as planName,
f.name as planName,
f.plan_type as planType,
f.plan_type as planType,
f.execute_rate as executeRate,
f.execute_rate as executeRate,
g.original_id as classifyOriginalId,
g.original_id as classifyOriginalId,
g.name as classifyName
g.name as classifyName
from
from
p_latent_danger_patrol as a
p_latent_danger as a
left join
p_input_item as b on a.item_id = b.id
LEFT JOIN p_check_input pci ON pci.id = a.biz_id
LEFT JOIN p_check pc ON pci.check_id = pc.id
left join
left join
p_
point as c on a.point_id = c
.id
p_
input_item as b on pci.input_id = b
.id
left join
left join
p_
route as d on a.route_id = d
.id
p_
point as c on pc.point_id = c
.id
left join
left join
p_check as e on a.check_id = e.id
p_route as d on pc.route_id = d.id
left join
left join
p_plan as f on
e
.plan_id = f.id
p_plan as f on
pc
.plan_id = f.id
left join
left join
p_point_classify as g on
a.point_classify_id = g.
id
p_point_classify as g on
pc.point_id= g.point_
id
where
where
a.deleted = 0
a.deleted = 0
and
and
a.
latent_danger_id
= #{dangerId}
a.
id
= #{dangerId}
</select>
</select>
<select
id=
"listByMap"
resultType=
"com.yeejoin.amos.patrol.business.entity.mybatis.extend.LatentDangerPatrolBo"
>
<select
id=
"listByMap"
resultType=
"com.yeejoin.amos.patrol.business.entity.mybatis.extend.LatentDangerPatrolBo"
>
...
...
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