Commit 8c1d3976 authored by chenhao's avatar chenhao

草稿状态的隐患没有隐患操作记录

parent 11702b95
......@@ -294,7 +294,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
if (!ValidationUtil.isEmpty(param.getPhotoUrl())) {
flowJson.put("photoUrls", Joiner.on(",").join(param.getPhotoUrl()));
}
if (ValidationUtil.isEmpty(param.getId())) {
if (ValidationUtil.isEmpty(param.getId()) && !"draft".equals(latentDanger.getDangerState())) {
// 第一次保存隐患提交记录
LatentDangerFlowRecord inputRecord = saveFlowRecord(instance.getString("id"), "提交隐患", userId,
departmentId, flowJson, latentDanger.getId(), role,
......@@ -2314,6 +2314,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
if (!ValidationUtil.isEmpty(latentDangerList)) {
// 防火监督报告用该字段(复核执行人名称)
latentDangerList.forEach(danger -> {
List<LatentDangerFlowRecordBo> recordList = latentDangerFlowRecordMapper.listByDangerId(danger.getId());
if (!ValidationUtil.isEmpty(recordList)) {
List<LatentDangerState.SupervisionDangerStateEnum> stateEnums = LatentDangerState.SupervisionDangerStateEnum
......@@ -2325,7 +2326,9 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
List<LatentDangerFlowRecordBo> firstRecord = recordList.stream().filter(
r -> LatentDangerState.SupervisionDangerStateEnum.提交隐患.getCode().equals(r.getActionFlag()))
.collect(Collectors.toList());
danger.setCheckUserName(firstRecord.get(0).getExecuteUserName());
if(firstRecord!=null && firstRecord.size()>0) {
danger.setCheckUserName(firstRecord.get(0).getExecuteUserName());
}
recordList = recordList.stream().filter(r -> stateSet.contains(r.getDangerState()))
.collect(Collectors.toList());
Set<String> nameSet = Sets.newHashSet();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment