|
|
@ -113,24 +113,14 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc |
|
|
|
String reversal = variables.get("processReversalStep").toString(); |
|
|
|
String reversal = variables.get("processReversalStep").toString(); |
|
|
|
// 受理 reversal = 1
|
|
|
|
// 受理 reversal = 1
|
|
|
|
|
|
|
|
|
|
|
|
// 检修安全措施 reversal = 2
|
|
|
|
|
|
|
|
if("2".equals(reversal)){ |
|
|
|
|
|
|
|
if(variables.containsKey("measures")){ |
|
|
|
|
|
|
|
entity.setMeasures(variables.get("measures").toString()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(variables.containsKey("measuresConfirmPersonnel")){ |
|
|
|
|
|
|
|
entity.setMeasuresConfirmPersonnel(variables.get("measuresConfirmPersonnel").toString()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 危害因素及措施 reversal = 3
|
|
|
|
// 危害因素及措施 reversal = 3
|
|
|
|
if("3".equals(reversal) && variables.containsKey("riskFactors")){ |
|
|
|
if("2".equals(reversal) && variables.containsKey("riskFactors")){ |
|
|
|
entity.setRiskFactors(variables.get("riskFactors").toString()); |
|
|
|
entity.setRiskFactors(variables.get("riskFactors").toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 学习确认危险点 reversal = 4
|
|
|
|
// 学习确认危险点 reversal = 4
|
|
|
|
if("4".equals(reversal)){ |
|
|
|
if("3".equals(reversal)){ |
|
|
|
if(variables.containsKey("studyHead")){ |
|
|
|
if(variables.containsKey("studyHead")){ |
|
|
|
entity.setStudyHead(variables.get("studyHead").toString()); |
|
|
|
entity.setStudyHead(variables.get("studyHead").toString()); |
|
|
|
} |
|
|
|
} |
|
|
@ -140,13 +130,13 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 审批签发 reversal = 5
|
|
|
|
// 审批签发 reversal = 5
|
|
|
|
if("5".equals(reversal) && variables.containsKey("issuePersonnel")){ |
|
|
|
if("4".equals(reversal) && variables.containsKey("issuePersonnel")){ |
|
|
|
entity.setIssueTime(new Date()); |
|
|
|
entity.setIssueTime(new Date()); |
|
|
|
entity.setIssuePersonnel(variables.get("issuePersonnel").toString()); |
|
|
|
entity.setIssuePersonnel(variables.get("issuePersonnel").toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 实际检修 reversal = 6
|
|
|
|
// 实际检修 reversal = 6
|
|
|
|
if("6".equals(reversal)){ |
|
|
|
if("5".equals(reversal)){ |
|
|
|
if(ObjectUtil.isNotEmpty(variables.get("access"))){ |
|
|
|
if(ObjectUtil.isNotEmpty(variables.get("access"))){ |
|
|
|
// 检修延期
|
|
|
|
// 检修延期
|
|
|
|
if((Boolean) variables.get("access")){ |
|
|
|
if((Boolean) variables.get("access")){ |
|
|
@ -165,12 +155,12 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 检修延期 reversal = 7
|
|
|
|
// 检修延期 reversal = 7
|
|
|
|
if("7".equals(reversal) && variables.containsKey("extensionPersonnel")){ |
|
|
|
if("6".equals(reversal) && variables.containsKey("extensionPersonnel")){ |
|
|
|
entity.setExtensionPersonnel(variables.get("extensionPersonnel").toString()); |
|
|
|
entity.setExtensionPersonnel(variables.get("extensionPersonnel").toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 检修验收 reversal = 8
|
|
|
|
// 检修验收 reversal = 8
|
|
|
|
if("8".equals(reversal) && variables.containsKey("checkPersonnel")){ |
|
|
|
if("7".equals(reversal) && variables.containsKey("checkPersonnel")){ |
|
|
|
entity.setCheckTime(new Date()); |
|
|
|
entity.setCheckTime(new Date()); |
|
|
|
entity.setCheckPersonnel(variables.get("checkPersonnel").toString()); |
|
|
|
entity.setCheckPersonnel(variables.get("checkPersonnel").toString()); |
|
|
|
entity.setTaskName("流程结束"); |
|
|
|
entity.setTaskName("流程结束"); |
|
|
@ -235,6 +225,10 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc |
|
|
|
entity.setDeviceName(device.getData().getName()); |
|
|
|
entity.setDeviceName(device.getData().getName()); |
|
|
|
entity.setDeviceAddress(device.getData().getInsLocation()); |
|
|
|
entity.setDeviceAddress(device.getData().getInsLocation()); |
|
|
|
entity.setFaultDescribe(param.getFaultDescribe()); |
|
|
|
entity.setFaultDescribe(param.getFaultDescribe()); |
|
|
|
|
|
|
|
if(CollectionUtil.isNotEmpty(param.getMeasures())){ |
|
|
|
|
|
|
|
entity.setMeasures(JSONObject.toJSONString(param.getMeasures())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
entity.setMeasuresConfirmPersonnel(param.getMeasuresConfirmPersonnel()); |
|
|
|
// 图片
|
|
|
|
// 图片
|
|
|
|
if(CollectionUtil.isNotEmpty(param.getImgs())){ |
|
|
|
if(CollectionUtil.isNotEmpty(param.getImgs())){ |
|
|
|
entity.setImgs(JSONObject.toJSONString(param.getImgs())); |
|
|
|
entity.setImgs(JSONObject.toJSONString(param.getImgs())); |
|
|
@ -279,17 +273,21 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc |
|
|
|
} |
|
|
|
} |
|
|
|
List<AccessTicketPageRspDTO> records = ipage.getRecords(); |
|
|
|
List<AccessTicketPageRspDTO> records = ipage.getRecords(); |
|
|
|
ipage.setRecords(records.stream().peek(record->{ |
|
|
|
ipage.setRecords(records.stream().peek(record->{ |
|
|
|
List<User> users = new ArrayList<>(); |
|
|
|
if(StringUtils.isNotEmpty(record.getNextStepExecutor())){ |
|
|
|
Arrays.stream(record.getNextStepExecutor().split(",")).forEach(account->{ |
|
|
|
List<User> users = new ArrayList<>(); |
|
|
|
User user = UserCache.getUser(Long.valueOf(account)); |
|
|
|
Arrays.stream(record.getNextStepExecutor().split(",")).forEach(account->{ |
|
|
|
if(ObjectUtil.isNotEmpty(user)){ |
|
|
|
User user = UserCache.getUser(Long.valueOf(account)); |
|
|
|
users.add(user); |
|
|
|
if(ObjectUtil.isNotEmpty(user)){ |
|
|
|
|
|
|
|
users.add(user); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
if(CollectionUtil.isEmpty(users)){ |
|
|
|
|
|
|
|
record.setExecutors(new ArrayList<>()); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
record.setExecutors(users); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
if(CollectionUtil.isEmpty(users)){ |
|
|
|
|
|
|
|
record.setExecutors(new ArrayList<>()); |
|
|
|
|
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
record.setExecutors(users); |
|
|
|
record.setExecutors(new ArrayList<>()); |
|
|
|
} |
|
|
|
} |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
return ipage; |
|
|
|
return ipage; |
|
|
@ -398,8 +396,6 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc |
|
|
|
params.setStudyMembers(meberNames.toString()); |
|
|
|
params.setStudyMembers(meberNames.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
// 检修工作票创建时间
|
|
|
|
// 检修工作票创建时间
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Calendar create = Calendar.getInstance(); |
|
|
|
Calendar create = Calendar.getInstance(); |
|
|
|
create.setTime(access.getCreateTime()); |
|
|
|
create.setTime(access.getCreateTime()); |
|
|
|
params.setCreate(DateUtil.format(access.getCreateTime(),DateUtil.PATTERN_DATETIME)); |
|
|
|
params.setCreate(DateUtil.format(access.getCreateTime(),DateUtil.PATTERN_DATETIME)); |
|
|
|