Commit dafa7723 authored by tianbo's avatar tianbo

隐患列表修改

parent 4b5b5d1c
......@@ -18,6 +18,7 @@ import com.yeejoin.amos.latentdanger.business.util.CommonResponseUtil;
import com.yeejoin.amos.latentdanger.business.util.FileHelper;
import com.yeejoin.amos.latentdanger.business.vo.DangerTimeAxisVo;
import com.yeejoin.amos.latentdanger.business.vo.LatentDangerDetailVo;
import com.yeejoin.amos.latentdanger.common.enums.LatentDangerLevelEnum;
import com.yeejoin.amos.latentdanger.core.common.response.DangerListResponse;
import com.yeejoin.amos.latentdanger.dao.entity.LatentDanger;
import io.swagger.annotations.Api;
......@@ -310,7 +311,7 @@ public class LatentDangerController extends BaseController {
return ResponseHelper.buildResponse(iLatentDangerService.getDangerState());
}
@ApiOperation(value = "隐患审核", notes = "隐患审核")
@ApiOperation(value = "隐患审核/复审", notes = "隐患审核/复审")
@PostMapping(value = "/supervision/audit")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel dangerAudit(@RequestBody LatentDangerDto latentDangerDto, @RequestParam Integer executeType) throws Exception {
......@@ -338,4 +339,25 @@ public class LatentDangerController extends BaseController {
IPage<LatentDanger> result = iLatentDangerService.reviewListDanger(pageParam);
return ResponseHelper.buildResponse(result);
}
@ApiOperation(value = "获取所有隐患等级", notes = "获取所有隐患等级")
@GetMapping(value = "/all/dangerLevel")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel getAllDangerLevel() {
return ResponseHelper.buildResponse((iLatentDangerService.getAllDangerLevel()));
}
@ApiOperation(value = "获取所有隐患整改方式", notes = "获取所有隐患整改方式")
@GetMapping(value = "/all/dangerGovernance")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel getAllDangerGovernance() {
return ResponseHelper.buildResponse((iLatentDangerService.getAllDangerGovernance()));
}
@ApiOperation(value = "获取所有隐患治理进度", notes = "获取所有隐患治理进度")
@GetMapping(value = "/all/dangerState")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel getAllDangerState() {
return ResponseHelper.buildResponse((iLatentDangerService.getAllDangerState()));
}
}
......@@ -1271,20 +1271,24 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
// 当隐患状态当前节点是整改任务分配时,在执行完节点后需要将整改分配责任人id设置为下个节点执行人
if (LatentDangerState.SupervisionDangerStateEnum.整改任务分配.getCode().equals(currentStateEnum.getCode())) {
// TODO 修改
if (ValidationUtil.isEmpty(param.getReformLeaderId())) {
executeSubmitDto.setIsOk(false);
executeResultMsg = "整改责任人不能为空";
executeSubmitDto.setMsg(executeResultMsg);
return executeSubmitDto;
}
checkLeaderId = jcsFeignClient.getAmosIdByUserId(param.getReformLeaderId()).getResult();
checkLeaderId = "jcs_hll_1";
Object result = workflowExecuteService.setTaskAssign(processInstanceId, checkLeaderId);
if (!(Boolean) result) {
executeSubmitDto.setIsOk(false);
executeResultMsg = "设置节点执行人失败";
executeSubmitDto.setMsg(executeResultMsg);
return executeSubmitDto;
}
}
// 当计划为单位检查且隐患状态当前节点是提交整改资料时,在执行完节点后需要将整改资料审核人id(检查组长)设置为下个节点执行人
if ("supervised".equals(planType) && LatentDangerState.SupervisionDangerStateEnum.提交整改资料.getCode().equals(currentStateEnum.getCode())) {
// TODO 修改
checkLeaderId = "jcs_hll_1";
Object result = workflowExecuteService.setTaskAssign(processInstanceId, checkLeaderId);
if (!(Boolean) result) {
executeSubmitDto.setIsOk(false);
......@@ -1294,8 +1298,6 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
// 当计划为公司专项或日常检查且隐患状态当前节点是整改分管领导审核(二级审核)时,
// 在执行完节点后需要将整改三级审核人id(检查组长)设置为下个节点执行人
if (!"supervised".equals(planType) && LatentDangerState.SupervisionDangerStateEnum.整改检查分管领导确认.getCode().equals(currentStateEnum.getCode())) {
// TODO 修改
checkLeaderId = "jcs_hll_1";
Object result = workflowExecuteService.setTaskAssign(processInstanceId, checkLeaderId);
if (!(Boolean) result) {
executeSubmitDto.setIsOk(false);
......@@ -1637,6 +1639,32 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
}
@Override
public List<Map<String, String>> getAllDangerLevel() {
List<LatentDangerLevelEnum> levelEnums = Lists.newArrayList(LatentDangerLevelEnum.values());
List<Map<String, String>> levelList = Lists.newArrayList();
levelEnums.forEach(level -> {
Map<String, String> l = Maps.newHashMap();
l.put("code", level.getCode());
l.put("name", level.getName());
levelList.add(l);
});
return levelList;
}
@Override
public List<Map<String, String>> getAllDangerGovernance() {
List<LatentDangerReformTypeEnum> levelEnums = Lists.newArrayList(LatentDangerReformTypeEnum.values());
List<Map<String, String>> levelList = Lists.newArrayList();
levelEnums.forEach(level -> {
Map<String, String> l = Maps.newHashMap();
l.put("code", level.getCode());
l.put("name", level.getName());
levelList.add(l);
});
return levelList;
}
@Override
public List<DictionarieValueModel> getDangerGovernance() {
String dictCode = LatentDangerReformTypeEnum.dictCode;
if (!ValidationUtil.isEmpty(bizType)) {
......@@ -1647,6 +1675,26 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
return result.getResult();
}
@Override
public List<Map<String, String>> getAllDangerState() {
List<Map<String, String>> levelList = Lists.newArrayList();
List<LatentDangerState.SupervisionDangerStateEnum> supervisionDangerStateList = Lists.newArrayList(LatentDangerState.SupervisionDangerStateEnum.values());
List<LatentDangerState.PatrolDangerLevelEnum> patrolDangerLevelEnumList = Lists.newArrayList(LatentDangerState.PatrolDangerLevelEnum.values());
supervisionDangerStateList.forEach(level -> {
Map<String, String> l = Maps.newHashMap();
l.put("code", level.getCode());
l.put("name", level.getName());
levelList.add(l);
});
patrolDangerLevelEnumList.forEach(level -> {
Map<String, String> l = Maps.newHashMap();
l.put("code", level.getCode());
l.put("name", level.getName());
levelList.add(l);
});
return levelList;
}
// @Override
// public JSONObject getDangerLevelJsonObject(String dangerLevelStr, String token, String product, String appKey, String dictCode) {
// JSONArray dangerLevelList = (JSONArray) this.getDangerLevel(token, product, appKey, dictCode);
......
package com.yeejoin.amos.latentdanger.business.service.intfc;
import java.util.List;
import java.util.Map;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.bo.RoleBo;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import com.yeejoin.amos.latentdanger.business.dto.DangerExecuteSubmitDto;
import com.yeejoin.amos.latentdanger.business.dto.ExecuteSubmitDto;
import com.yeejoin.amos.latentdanger.business.param.LatentDangerDto;
import com.yeejoin.amos.latentdanger.business.param.LatentDangerExecuteParam;
import com.yeejoin.amos.latentdanger.business.param.PageParam;
import com.yeejoin.amos.latentdanger.business.vo.LatentDangerDetailVo;
import com.yeejoin.amos.latentdanger.dao.entity.LatentDanger;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.RoleBo;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.latentdanger.business.dto.DangerExecuteSubmitDto;
import com.yeejoin.amos.latentdanger.business.param.LatentDangerListParam;
import com.yeejoin.amos.latentdanger.business.param.PageParam;
import com.yeejoin.amos.latentdanger.business.util.CommonResponse;
import com.yeejoin.amos.latentdanger.business.vo.DangerTimeAxisVo;
import com.yeejoin.amos.latentdanger.business.vo.LatentDangerDetailVo;
import com.yeejoin.amos.latentdanger.core.common.response.DangerListResponse;
import com.yeejoin.amos.latentdanger.dao.entity.LatentDanger;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map;
/**
* @author keyong
* @title: ILatentDangerService
......@@ -147,4 +146,24 @@ public interface ILatentDangerService {
* @return
*/
IPage<LatentDanger> reviewListDanger(PageParam pageParam) throws Exception;
/**
* 获取多个业务的隐患等级
*
* @return
*/
List<Map<String, String>> getAllDangerLevel();
/**
* 获取多个业务的隐患治理方式
*
* @return
*/
List<Map<String, String>> getAllDangerGovernance();
/**
* 获取所有隐患治理进度
* @return
*/
List<Map<String, String>> getAllDangerState();
}
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