Commit 0a7f8a77 authored by chenzhao's avatar chenzhao

修改bug

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