任务确认流程。

This commit is contained in:
wangzhijiang
2022-04-25 15:49:24 +08:00
parent 9948b7b3ff
commit 1471d9dba5
5 changed files with 92 additions and 20 deletions
@@ -130,22 +130,22 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "项目库-法规清单表-通过id查询")
@ApiOperation(value="项目库-法规清单表-通过id查询", notes="项目库-法规清单表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOService.queryById(id);
if(projectLawsInventoryEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(projectLawsInventoryEO);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "项目库-法规清单表-通过id查询")
@ApiOperation(value="项目库-法规清单表-通过id查询", notes="项目库-法规清单表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOService.queryById(id);
if(projectLawsInventoryEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(projectLawsInventoryEO);
}
/**
* 导出excel
@@ -206,4 +206,19 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
return this.projectLawsInventoryEOService.processCall(jsonObject);
}
/**
* 通过id查询
* @param id
* @param cut
* @param operatorType
* @return
*/
@AutoLog(value = "项目库-法规清单表-通过id与操作类型查询")
@ApiOperation(value="项目库-法规清单表-通过id与操作类型查询", notes="项目库-法规清单表-通过id与操作类型查询")
@GetMapping(value = "/queryProjectLawsInventoryInfoById")
public Result<?> queryProjectLawsInventoryInfoById(@RequestParam Map<String,Object> params) {
JSONObject result = projectLawsInventoryEOService.queryProjectLawsInventoryInfoById(params);
return Result.OK(result);
}
}
@@ -14,6 +14,9 @@ public enum OperatorTypeEnum {
UPDATE_STATUS("修改状态","updateStatus"),
DELETE("删除","delete"),
QUERY("查询","query"),
TASK_AFFIRM_QUERY("任务确认流程,查询法规清单信息","taskAffirmQuery"),
;
String name;
@@ -86,4 +86,6 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
* @return
*/
Result<?> processCall(JSONObject jsonObject);
JSONObject queryProjectLawsInventoryInfoById(Map<String, Object> params);
}
@@ -169,9 +169,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
* @return
*/
@Override
public ProjectLawsInventoryEO queryById(String id) {
return getById(id);
}
public ProjectLawsInventoryEO queryById(String id) {
return getById(id);
}
/**
* 列表查询
@@ -902,4 +902,56 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
return new Result<>().success("调用成功!");
}
@Override
public JSONObject queryProjectLawsInventoryInfoById(Map<String, Object> params) {
JSONObject result = new JSONObject();
String id = (String) params.get("id");
if(StringUtils.isEmpty(id)){
throw new JeroBootException("id不能为空");
}
String cut = (String) params.get("cut");
String operatorType = (String) params.get("operatorType");
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = new ArrayList<>();
ProjectLawsInventoryEO byId = getById(id);
projectLawsInventoryEOList.add(byId);
if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){
int isProjectRole = checkUserRole(byId.getProjectLibraryId(), currentUser.getId(), id);
dataDispose(projectLawsInventoryEOList,currentUser,isProjectRole,cut);
result.put("projectLawsInventory",projectLawsInventoryEOList.get(0));
if (StringUtils.equals(operatorType, OperatorTypeEnum.TASK_AFFIRM_QUERY.getValue())) {
//设计符合性
Map<String,Object> designMap = new HashMap<>();
designMap.put("designDeliverableType",projectLawsInventoryEOList.get(0).getDesignDeliverableType());
designMap.put("designDeliverableTemplateName",projectLawsInventoryEOList.get(0).getDesignDeliverableType());
designMap.put("designInitiatorName",projectLawsInventoryEOList.get(0).getDesignInitiatorName());
designMap.put("designDutyName",projectLawsInventoryEOList.get(0).getDesignDutyName());
designMap.put("designDueDate",projectLawsInventoryEOList.get(0).getDesignDueDate());
result.put("design",designMap);
//prehomo
Map<String,Object> prehomoMap = new HashMap<>();
prehomoMap.put("prehomoDeliverableType",projectLawsInventoryEOList.get(0).getPrehomoDeliverableType());
prehomoMap.put("prehomoDeliverableTemplateName",projectLawsInventoryEOList.get(0).getPrehomoDeliverableTemplateName());
prehomoMap.put("prehomoInitiatorName",projectLawsInventoryEOList.get(0).getPrehomoInitiatorName());
prehomoMap.put("prehomoDutyName",projectLawsInventoryEOList.get(0).getPrehomoDutyName());
prehomoMap.put("prehomoDueDate",projectLawsInventoryEOList.get(0).getPrehomoDueDate());
result.put("prehomo",prehomoMap);
//验证符合性
Map<String,Object> verifyMap = new HashMap<>();
verifyMap.put("verifyDeliverableType",projectLawsInventoryEOList.get(0).getVerifyDeliverableType());
verifyMap.put("verifyDeliverableTemplateName",projectLawsInventoryEOList.get(0).getVerifyDeliverableTemplateName());
verifyMap.put("verifyInitiatorName",projectLawsInventoryEOList.get(0).getVerifyInitiatorName());
verifyMap.put("verifyDutyName",projectLawsInventoryEOList.get(0).getVerifyDutyName());
verifyMap.put("verifyDueDate",projectLawsInventoryEOList.get(0).getVerifyDueDate());
result.put("verify",verifyMap);
}
}else {
throw new JeroBootException("未找到该法规清单信息!");
}
return result;
}
}
@@ -50,7 +50,7 @@ public class workFlowController {
@AutoLog(value = "完成任务")
@ApiOperation(value="完成任务", notes="完成任务")
@PostMapping("/completeTask")
public Result<String> completeTaskByUserId(BusMes busMes){
public Result<String> completeTaskByUserId(@RequestBody BusMes busMes){
Result<String> str = workFlowFeignClient.completeTaskByUserId(busMes);
if(str.getCode() == 500){
str.setSuccess(false);