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
cb52528d
Commit
cb52528d
authored
Sep 24, 2021
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐患修改
parent
0a2d07bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
21 deletions
+23
-21
LatentDangerServiceImpl.java
...danger/business/service/impl/LatentDangerServiceImpl.java
+21
-21
LatentDangerMapper.xml
...ision/src/main/resources/db/mapper/LatentDangerMapper.xml
+2
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/impl/LatentDangerServiceImpl.java
View file @
cb52528d
...
...
@@ -182,7 +182,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
latentDangerDto
.
getStructureName
(),
InstanceKeyEnum
.
NORMAL
.
getCode
(),
latentDangerDto
.
getLongitude
(),
latentDangerDto
.
getLatitude
());
// 更新p_check_input表state字段
updateCheckInputDangerState
(
latentDanger
.
getBizId
(),
DangerHandleStateEnum
.
HANDLE
.
getCode
());
//
updateCheckInputDangerState(latentDanger.getBizId(), DangerHandleStateEnum.HANDLE.getCode());
Long
dangerId
=
latentDanger
.
getId
();
Date
startDate
=
new
Date
();
JSONObject
jsonObject
=
remoteWorkFlowService
.
startNew
(
dangerId
,
businessKey
,
processDefinitionKey
);
...
...
@@ -196,9 +196,6 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
if
(
instance
==
null
)
{
return
CommonResponseUtil
.
failure
(
"无提交隐患权限"
);
}
//提交隐患
// jsonObject = remoteWorkFlowService.excute(instance.getString("id"), null);
// JSONObject task = jsonObject.getJSONObject("data");
latentDanger
.
setInstanceId
(
instance
.
getString
(
"id"
));
JSONObject
flowJson
=
new
JSONObject
();
flowJson
.
put
(
"photoUrls"
,
latentDangerDto
.
getPhotoUrl
());
...
...
@@ -280,20 +277,6 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
latentDanger
.
setInstanceId
(
instance
.
getString
(
"id"
));
latentDangerMapper
.
updateById
(
latentDanger
);
}
// TODO 业务自己保存
// if (LatentDangerTypeEnum.计划检查.getCode().equals(latentDangerBo.getDangerType())
// || LatentDangerTypeEnum.无计划检查.getCode().equals(latentDangerBo.getDangerType())) {
// LatentDangerPatrolBo latentDangerPatrolBo = new LatentDangerPatrolBo();
// latentDangerPatrolBo.setCheckId((Long) inputCheckObj.get("checkId"));
// latentDangerPatrolBo.setPointClassifyId((Long) inputCheckObj.get("pointClassifyId"));
// latentDangerPatrolBo.setItemId((Long) inputCheckObj.get("itemId"));
// latentDangerPatrolBo.setRouteId((Long) inputCheckObj.get("routeId"));
// latentDangerPatrolBo.setPointId((Long) inputCheckObj.get("pointId"));
// latentDangerPatrolBo.setLatentDangerId(latentDangerBo.getId());
// latentDangerPatrolBo.setRoutePointItemId((Long) inputCheckObj.get("routePointItemId"));
// latentDangerPatrolMapper.save(latentDangerPatrolBo);
// }
// TODO 使用远程调用替换
// LatentDangerPatrolBo patrolBo = latentDangerPatrolMapper.getByDangerId(latentDanger.getId());
...
...
@@ -329,7 +312,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
// riskFactorMapper.updateControlStatus(riskFactorBo);
// }
// TODO
改为远程调用
// TODO
使用远程调用替换
private
void
updateCheckInputDangerState
(
Long
id
,
int
code
)
{
latentDangerMapper
.
updateCheckInputDangerState
(
id
,
code
);
}
...
...
@@ -1109,7 +1092,25 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
DangerExecuteSubmitDto
executeSubmitDto
,
RoleBo
role
)
{
// 根据业务类型不同执行不同逻辑
if
(
LatentDangerBizTypeEnum
.
防火监督
.
getCode
().
equals
(
redisUtils
.
get
(
Constants
.
DANGER_BIZ_TYPE_KEY
)))
{
// 防火监督业务
executeSupervisionBiz
(
param
,
latentDanger
,
userId
,
userRealName
,
departmentId
,
departmentName
,
executeSubmitDto
,
role
);
}
else
if
(
LatentDangerBizTypeEnum
.
巡检
.
getCode
().
equals
(
redisUtils
.
get
(
Constants
.
DANGER_BIZ_TYPE_KEY
)))
{
// 巡检业务
executePatrolBiz
(
param
,
latentDanger
,
userId
,
userRealName
,
departmentId
,
departmentName
,
executeSubmitDto
,
role
);
}
return
executeSubmitDto
;
}
private
DangerExecuteSubmitDto
executeSupervisionBiz
(
LatentDangerExecuteParam
param
,
LatentDanger
latentDanger
,
String
userId
,
String
userRealName
,
String
departmentId
,
String
departmentName
,
DangerExecuteSubmitDto
executeSubmitDto
,
RoleBo
role
)
{
return
executeSubmitDto
;
}
public
DangerExecuteSubmitDto
executePatrolBiz
(
LatentDangerExecuteParam
param
,
LatentDanger
latentDanger
,
String
userId
,
String
userRealName
,
String
departmentId
,
String
departmentName
,
DangerExecuteSubmitDto
executeSubmitDto
,
RoleBo
role
)
{
if
(
StringUtil
.
isNotEmpty
(
param
.
getReformLimitDate
()))
{
param
.
setReformLimitDate
(
param
.
getReformLimitDate
()
+
" 23:59:59"
);
}
...
...
@@ -1215,7 +1216,6 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
executeSubmitDto
.
setExecuteTypeEnum
(
executeTypeEnum
);
executeSubmitDto
.
setDangerName
(
latentDanger
.
getDangerName
());
executeSubmitDto
.
setDangerId
(
latentDanger
.
getId
());
sendMessage
(
latentDanger
,
executeTypeEnum
,
patrolBo
,
executeTypeEnum
.
getName
(),
this
.
getNextExecuteUsers
(
latentDanger
.
getInstanceId
()),
userRealName
,
departmentName
);
return
executeSubmitDto
;
}
...
...
@@ -1249,7 +1249,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
Integer
.
valueOf
(
latentDanger
.
getDangerState
()));
}
else
if
(
executeTypeEnum
.
equals
(
LatentDangerExecuteTypeEnum
.
隐患验证通过
))
{
if
(
patrolBo
!=
null
)
{
//
TODO 使用远程调用替换
更新p_check_input表state字段
// 更新p_check_input表state字段
updateCheckInputDangerState
(
latentDanger
.
getBizId
(),
DangerHandleStateEnum
.
COMPLETED
.
getCode
());
DangerResultBo
dangerResultBo
=
new
DangerResultBo
();
try
{
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/LatentDangerMapper.xml
View file @
cb52528d
...
...
@@ -952,6 +952,8 @@
phd.check_input_id checkInputId,
pci.input_id inputId,
ppt.name pointName,
ppn.check_level checkLevel,
ppn.check_type_id checkTypeId,
ppn.name planName,
pii.name inputItemName
FROM
...
...
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