[修改] 查询详情

This commit is contained in:
bupengxiang
2023-05-09 17:10:12 +08:00
parent 7c793af87c
commit 67f3555c7a
3 changed files with 14 additions and 12 deletions
@@ -293,18 +293,19 @@ public class TodoTaskController {
if (StrUtil.isEmpty(task.getAssignee())) {
taskService.claim(busMes.getTaskId(), busMes.getUserId());
}
if (StringUtils.isNotEmpty(dataJson)){
//根据业务情况 对业务数据进行saveOrupdate
reportId = activitDefineService.saveOrUpdateDate(busMes.getPrcType(), dataJson, task.getId(),
task.getProcessInstanceId(), reportId);
}
BusProcessApprove busProcessApprove = new BusProcessApprove();
busProcessApprove.setTaskId(busMes.getTaskId());
busProcessApprove.setCreateUserId(UserUtils.getUserId());
busProcessApprove.setPrcId(task.getProcessInstanceId());
busProcessApprove.setCreateDate(new Date());
busProcessApprove.setFromValsJson(busMes.getSubmitJson());
busProcessApprove.setDataId(reportId);
ibusProcessApproveService.save(busProcessApprove);
if (StringUtils.isNotEmpty(dataJson)){
//根据业务情况 对业务数据进行saveOrupdate
activitDefineService.saveOrUpdateDate(busMes.getPrcType(),dataJson, task.getId(),
task.getProcessInstanceId(),reportId);
}
taskService.complete(busMes.getTaskId());
}
return WrapMapper.ok(task.getProcessInstanceId());
@@ -441,20 +442,21 @@ public class TodoTaskController {
public ResponseMessage queryDetail(@RequestParam(value = "prcId",required = false) String prcId, @RequestParam("prcType")String prcType,
@RequestParam(value = "dataId",required = false) String dataId) {
List<BusProcessNew> busProcessNews = iBusProcessNewService.selectEOByTaskId(prcId);
BusProcessNew busProcessNew = null;
BusProcessNew busProcessNew = new BusProcessNew();
List<BusProcessApprove> busProcessApproves = new ArrayList<>();
if (busProcessNews.size() == 0) {
busProcessNew = iBusProcessNewService.selectEOByDataId(dataId);
busProcessNew.setDataId(dataId);
}else {
busProcessNew = busProcessNews.get(0);
}
// 查找详细业务数据
BusProcessNewVO busProcessNewVO = this.queryDetailDate(busProcessNew, prcType);
//审批数据
List<BusProcessApprove> busProcessApproves =
busProcessApproveMapper.selectEoByPrcIdAndTask(busProcessNewVO.getPId());
BusProcessApprove busProcessApprove = busProcessApproves.get(0);
String approveJson = busProcessApprove.getFromValsJson();
busProcessNewVO.setSubmitJson(approveJson);
BusProcessApprove busProcessApprove = busProcessApproveMapper.selectEoByDataId(busProcessNewVO.getDataId());
if (busProcessApprove!=null){
String approveJson = busProcessApprove.getFromValsJson();
busProcessNewVO.setSubmitJson(approveJson);
}
return Result.success(busProcessNewVO);
}