Commit fc5dc020 authored by tianbo's avatar tianbo

巡检bug修改

parent b07ae56a
......@@ -7,6 +7,7 @@ import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.gson.JsonObject;
import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo;
import com.yeejoin.amos.boot.biz.common.bo.RoleBo;
import com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl;
......@@ -1232,6 +1233,10 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
saveFlowRecord(executeJson.getString("id"), data.getString("name"), userId, departmentId,
executeParam.getFlowJson(), executeParam.getDangerId(), role, executeTypeEnum.getName(),executeParam.getRemark());
} else {
if (executeTypeEnum.equals(LatentDangerExcuteTypeEnum.隐患评审通过)) {
// 将制定的治理人保存在日志记录
executeParam.getFlowJson().put("governUserId", governUserId);
}
LatentDangerFlowRecordBo flowRecord = saveFlowRecord(executeJson.getString("id"), data.getString("name"), userId, departmentId,
executeParam.getFlowJson(), executeParam.getDangerId(), role, executeTypeEnum.getName(),executeParam.getRemark());
latentDangerBo.setCurrentFlowRecordId(flowRecord.getId());
......@@ -1244,10 +1249,10 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
latentDangerBo.setReasonAnalysis(executeParam.getReasonAnalysis());
} else if (executeTypeEnum.equals(LatentDangerExcuteTypeEnum.隐患延期治理)) {
latentDangerBo.setReformType(LatentDangerReformTypeEnum.延期治理.getCode().toString());
latentDangerBo.setReformJson(executeParam.getFlowJson().toJSONString());
latentDangerBo.setInferOtherThings(executeParam.getInferOtherThings());
latentDangerBo.setProblemDescription(executeParam.getRemark());
latentDangerBo.setReasonAnalysis(executeParam.getReasonAnalysis());
// latentDangerBo.setReformJson(executeParam.getFlowJson().toJSONString());
// latentDangerBo.setInferOtherThings(executeParam.getInferOtherThings());
// latentDangerBo.setProblemDescription(executeParam.getRemark());
// latentDangerBo.setReasonAnalysis(executeParam.getReasonAnalysis());
latentDangerBo.setDelayLimitDate(DateUtil.str2Date(executeParam.getDelayLimitDate(), DateUtil.DATETIME_DEFAULT_FORMAT));
}
if (executeTypeEnum.equals(LatentDangerExcuteTypeEnum.隐患评审通过)) {
......@@ -1274,14 +1279,23 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
recordBo.setFlowJson(flowJson.toJSONString());
latentDangerFlowRecordMapper.update(recordBo);
}
} else if (executeTypeEnum.equals(LatentDangerExcuteTypeEnum.隐患延期治理车间部门审核拒绝)) {
} else if (LatentDangerExcuteTypeEnum.隐患延期治理车间部门审核拒绝.equals(executeTypeEnum)
|| LatentDangerExcuteTypeEnum.隐患延期治理公司审核拒绝.equals(executeTypeEnum)
|| LatentDangerExcuteTypeEnum.隐患验证拒绝.equals(executeTypeEnum)) {
latentDangerBo.setDangerState(LatentDangerStateEnum.待治理.getCode().toString());
// 获取第一次评审时选择的治理人
LatentDangerFlowRecordBo record = latentDangerFlowRecordMapper.getByDangerIdAndActionFlag(latentDangerBo.getId(), "隐患评审");
JSONObject recordObj = JSONObject.parseObject(record.getFlowJson());
if (!ValidationUtil.isEmpty(recordObj.get("governUserId"))) {
workflowExecuteService.setTaskAssign(latentDangerBo.getInstanceId(), (String) recordObj.get("governUserId"));
}
} else if (executeTypeEnum.equals(LatentDangerExcuteTypeEnum.隐患延期治理公司审核通过)) {
latentDangerBo.setDangerState(LatentDangerStateEnum.延期治理申请.getCode().toString());
latentDangerBo.setReformLimitDate(latentDangerBo.getDelayLimitDate());
} else if (executeTypeEnum.equals(LatentDangerExcuteTypeEnum.隐患延期治理公司审核拒绝)) {
} /**else if (executeTypeEnum.equals(LatentDangerExcuteTypeEnum.隐患延期治理公司审核拒绝)) {
// TODO 待需求确认是回到部门审核还是回到隐患治理节点
latentDangerBo.setDangerState(LatentDangerStateEnum.延期治理申请待车间部门审核.getCode().toString());
}
}**/
latentDangerMapper.update(latentDangerBo);
if (patrolBo != null) {
executeSubmitDto.setPointOriginalId(patrolBo.getPointOriginalId());
......
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