From 600ae2b7d1a0b9e9712d7108a08b34fcfaf018d9 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Wed, 20 Jan 2021 15:31:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8A=84=E9=80=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DgCopyUserController.java | 9 ++++ .../controller/DgEfficiencyController.java | 13 ++++- .../guarantee/model/response/NumResponse.java | 3 ++ .../service/impl/DgCopyForServiceImpl.java | 17 +++--- .../service/impl/DgEfficiencyServiceImpl.java | 54 ------------------- 5 files changed, 34 insertions(+), 62 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgCopyUserController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgCopyUserController.java index 6c8e91b0..9500b297 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgCopyUserController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgCopyUserController.java @@ -5,6 +5,7 @@ import com.daqing.financial.guarantee.model.request.CopyForMeRequest; import com.daqing.financial.guarantee.model.response.CopyForMeResponse; import com.daqing.financial.guarantee.service.IDgCopyUserService; import com.daqing.financial.guarantee.util.R; +import com.daqing.financial.guarantee.util.TaskNodeUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -37,6 +38,14 @@ public class DgCopyUserController { @PostMapping("/queryCopyForMe") public R queryCopyForMe(@RequestBody CopyForMeRequest copyForMeRequest){ List copyForMeList = copyUserService.queryCopyForMe(copyForMeRequest); + //转换任务节点 + copyForMeList.forEach(copyForMeResponse -> { + String taskNode = copyForMeResponse.getTaskNode(); + if (taskNode != null) { + String converter = TaskNodeUtil.converter(taskNode); + copyForMeResponse.setTaskNode(converter); + } + }); return R.ok().data("copyForMeList",copyForMeList); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java index 3a6e7b2a..496048cb 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java @@ -2,10 +2,13 @@ package com.daqing.financial.guarantee.controller; import com.alibaba.fastjson.JSONObject; import com.daqing.financial.guarantee.feign.HrmsFeignService; +import com.daqing.financial.guarantee.model.request.CopyForMeRequest; import com.daqing.financial.guarantee.model.request.DgEfficiencyTeamRequest; import com.daqing.financial.guarantee.model.request.PersonalEfficiencyListRequest; +import com.daqing.financial.guarantee.model.response.CopyForMeResponse; import com.daqing.financial.guarantee.model.response.NumResponse; import com.daqing.financial.guarantee.model.response.PersonalEfficiencyListResponse; +import com.daqing.financial.guarantee.service.IDgCopyUserService; import com.daqing.financial.guarantee.service.IDgEfficiencyService; import com.daqing.financial.guarantee.util.DateUtils; import com.daqing.financial.guarantee.util.R; @@ -45,6 +48,9 @@ public class DgEfficiencyController { @Autowired private HrmsFeignService hrmsFeignService; + @Autowired + private IDgCopyUserService copyUserService; + /** * 团队效率 */ @@ -133,8 +139,13 @@ public class DgEfficiencyController { } } } - + String userId = DgApplyAmountInfoController.getUserId(); + CopyForMeRequest copyForMeRequest = new CopyForMeRequest(); + copyForMeRequest.setUserId(Integer.parseInt(userId)); + List copyForMeList = copyUserService.queryCopyForMe(copyForMeRequest); + int size = copyForMeList.size(); NumResponse numResponse = new NumResponse(); + numResponse.setCopySendNum(size); //转换任务节点,并统计操作状态个数 responseList.forEach(personalEfficiencyListResponse -> { String taskNode = personalEfficiencyListResponse.getTaskNode(); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/NumResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/NumResponse.java index f5de0dfd..a2aab10d 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/NumResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/NumResponse.java @@ -19,4 +19,7 @@ public class NumResponse { @ApiModelProperty("已处理数 ") private Integer processedNum = 0; + + @ApiModelProperty("已发起数 ") + private Integer copySendNum = 0; } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyForServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyForServiceImpl.java index 4df98a40..cd2c51ba 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyForServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyForServiceImpl.java @@ -48,8 +48,8 @@ public class DgCopyForServiceImpl extends ServiceImpl wrapperOne = new QueryWrapper<>(); wrapperOne.eq("business_id",businessId).eq("process_id",processId); @@ -70,6 +72,7 @@ public class DgCopyForServiceImpl extends ServiceImpl updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("business_id",businessId).eq("process_id",processId); baseMapper.update(copyForUpdate, updateWrapper); + copyForId = copyFor.getId(); }else { DgCopyFor copyForAdd = new DgCopyFor(); copyForAdd.setBusinessId(businessId); @@ -77,24 +80,24 @@ public class DgCopyForServiceImpl extends ServiceImpl wrapper = new QueryWrapper<>(); wrapper.eq("process_id", processId).select("user_id"); List list = processUserMapper.selectList(wrapper); if (list != null && list.size() != 0) { + Integer finalCopyForId = copyForId; list.forEach(dgProcessUser -> { Integer userId = dgProcessUser.getUserId(); //已经抄送的用户无需再次抄送 QueryWrapper wrapperCopyUser = new QueryWrapper<>(); - wrapperCopyUser.eq("user_id",userId).eq("copy_id",copyForId); + wrapperCopyUser.eq("user_id",userId).eq("copy_id", finalCopyForId); DgCopyUser dgCopyUser = copyUserMapper.selectOne(wrapperCopyUser); if (ObjectUtil.isNull(dgCopyUser)){ DgCopyUser copyUser = new DgCopyUser(); - copyUser.setCopyId(copyForId); + copyUser.setCopyId(finalCopyForId); copyUser.setUserId(userId); //添加抄送关系 copyUserMapper.insert(copyUser); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java index 33fe9e2c..537429f1 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java @@ -335,12 +335,6 @@ public class DgEfficiencyServiceImpl extends ServiceImpl