Commit 0a7f8a77 authored by chenzhao's avatar chenzhao

修改bug

parent 6d514abb
...@@ -197,12 +197,13 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -197,12 +197,13 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
//提交隐患 //提交隐患
// jsonObject = remoteWorkFlowService.excute(instance.getString("id"), null); // jsonObject = remoteWorkFlowService.excute(instance.getString("id"), null);
// JSONObject task = jsonObject.getJSONObject("data"); // JSONObject task = jsonObject.getJSONObject("data");
latentDangerBo.setInstanceId(instance.getString("id")); latentDangerBo.setInstanceId(instance.getString("id") == null ? " ":instance.getString("id"));
JSONObject flowJson = new JSONObject(); JSONObject flowJson = new JSONObject();
flowJson.put("photoUrls", latentDangerParam.getPhotoUrls()); flowJson.put("photoUrls", latentDangerParam.getPhotoUrls());
LatentDangerFlowRecordBo record = saveFlowRecord(instance.getString("id"), "提交隐患", userId, departmentId, flowJson, dangerId, role, LatentDangerExcuteTypeEnum.填写隐患完成.getName(), latentDangerParam.getRemark()); LatentDangerFlowRecordBo record = saveFlowRecord(instance.getString("id"), "提交隐患", userId, departmentId, flowJson, dangerId, role, LatentDangerExcuteTypeEnum.填写隐患完成.getName(), latentDangerParam.getRemark());
latentDangerBo.setCurrentFlowRecordId(record.getId()); latentDangerBo.setCurrentFlowRecordId(record.getId());
latentDangerMapper.update(latentDangerBo); latentDangerMapper.update(latentDangerBo);
sendMessage(latentDangerBo, LatentDangerExcuteTypeEnum.填写隐患完成, null, sendMessage(latentDangerBo, LatentDangerExcuteTypeEnum.填写隐患完成, null,
"隐患排查与治理", this.getNextExecuteUsers(latentDangerBo.getInstanceId()), userRealName, departmentName); "隐患排查与治理", this.getNextExecuteUsers(latentDangerBo.getInstanceId()), userRealName, departmentName);
try { try {
...@@ -374,17 +375,17 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -374,17 +375,17 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
Integer level, String position, LatentDangerTypeEnum dangerTypeEnum, Integer level, String position, LatentDangerTypeEnum dangerTypeEnum,
String photoUrls, Long checkInputId, Long structureId, String structureName, String instanceKey) { String photoUrls, Long checkInputId, Long structureId, String structureName, String instanceKey) {
LatentDangerBo latentDangerBo = new LatentDangerBo(); LatentDangerBo latentDangerBo = new LatentDangerBo();
latentDangerBo.setInstanceId(instanceId); latentDangerBo.setInstanceId(instanceId == null ? " ":instanceId);
latentDangerBo.setProblemDescription(problemDescription); latentDangerBo.setProblemDescription(problemDescription == null ? " ":problemDescription);
latentDangerBo.setRemark(remark); latentDangerBo.setRemark(remark == null ? " ":remark);
latentDangerBo.setDangerState(LatentDangerStateEnum.待评审.getCode()); latentDangerBo.setDangerState(LatentDangerStateEnum.待评审.getCode());
latentDangerBo.setDiscovererUserId(userId); latentDangerBo.setDiscovererUserId(userId == null ? " ": remark);
latentDangerBo.setDiscovererDepartmentId(departmentId); latentDangerBo.setDiscovererDepartmentId(departmentId == null ? " ": departmentId);
latentDangerBo.setBusinessKey(businessKey); latentDangerBo.setBusinessKey(businessKey == null ? " ":businessKey);
latentDangerBo.setOrgCode(orgCode); latentDangerBo.setOrgCode(orgCode == null ? " ":orgCode);
latentDangerBo.setDangerName(dangerName); latentDangerBo.setDangerName(dangerName == null ? " ":dangerName);
latentDangerBo.setDangerLevel(level); latentDangerBo.setDangerLevel(level);
latentDangerBo.setDangerPosition(position); latentDangerBo.setDangerPosition(position == null ? " ":position);
latentDangerBo.setDangerType(dangerTypeEnum.getCode()); latentDangerBo.setDangerType(dangerTypeEnum.getCode());
StringBuilder photoUrlsB = new StringBuilder(); StringBuilder photoUrlsB = new StringBuilder();
if (org.apache.commons.lang3.StringUtils.isNotBlank(photoUrls)) { if (org.apache.commons.lang3.StringUtils.isNotBlank(photoUrls)) {
...@@ -396,11 +397,11 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -396,11 +397,11 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
} }
} }
} }
latentDangerBo.setPhotoUrls(photoUrlsB.toString()); latentDangerBo.setPhotoUrls(photoUrlsB.toString() == null ? " ":photoUrlsB.toString());
latentDangerBo.setCheckInputId(checkInputId); latentDangerBo.setCheckInputId(checkInputId);
latentDangerBo.setStructureId(structureId); latentDangerBo.setStructureId(structureId);
latentDangerBo.setStructureName(structureName); latentDangerBo.setStructureName(structureName == null ? " ":structureName);
latentDangerBo.setInstanceKey(instanceKey); latentDangerBo.setInstanceKey(instanceKey == null ? " ":instanceKey);
latentDangerMapper.save(latentDangerBo); latentDangerMapper.save(latentDangerBo);
return latentDangerBo; return latentDangerBo;
} }
......
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