From 19eec7b4ab5d24bf798238b1251b113c12d793ab Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Fri, 9 Apr 2021 14:55:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8A=84=E9=80=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E6=97=A5=E6=9C=9F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DgCopyUserController.java | 14 +--- .../model/request/CopyForMeRequest.java | 6 ++ .../model/response/CopyForMeResponse.java | 43 ++++++++++-- .../service/impl/DgCopyUserServiceImpl.java | 20 ++++-- ...gGuaranteeLetterAssignUserServiceImpl.java | 1 + .../mapper/guarantee/DgCopyUserMapper.xml | 64 +++++++++-------- .../DgGuaranteeLetterAssignUserMapper.xml | 70 ++++++++++--------- 7 files changed, 132 insertions(+), 86 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 de1b72a2..fa1eefc8 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 @@ -43,19 +43,7 @@ public class DgCopyUserController { @PostMapping("/queryCopyForMe") public R queryCopyForMe(@RequestBody CopyForMeRequest copyForMeRequest){ List copyForMeList = copyUserService.queryCopyForMe(copyForMeRequest); - //转换任务节点 - copyForMeList.forEach(copyForMeResponse -> { - //提单人为空,默认赋值客户 - if (StringUtils.isEmpty(copyForMeResponse.getApplicant())){ - copyForMeResponse.setApplicant("客户"); - } - String taskNode = copyForMeResponse.getTaskNode(); - if (taskNode != null) { - String converter = TaskNodeUtil.converter(taskNode); - copyForMeResponse.setTaskNode(converter); - } - }); - return R.ok().data("copyForMeList",copyForMeList); + return R.ok().data("copyForMeList",copyForMeList).data("total",copyForMeList.size()); } @Log(detail = "导出抄送我的列表",level = 4,operationUnit = OperationUnit.COPYFOR,operationType = OperationType.SELECT) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/CopyForMeRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/CopyForMeRequest.java index 24a3db47..8eeac949 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/CopyForMeRequest.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/CopyForMeRequest.java @@ -12,6 +12,12 @@ import lombok.Data; @Data public class CopyForMeRequest { + @ApiModelProperty(value = "当前页码,默认为第一页") + private Integer page = 0; + + @ApiModelProperty(value = "每页记录数,默认显示10条") + private Integer size = 10; + @ApiModelProperty("申请时间,固定类型,0:今天,1:昨天,2:本周,3:本月,4:本年") private Integer createFixedTime; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/CopyForMeResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/CopyForMeResponse.java index 17f9857d..96731d1a 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/CopyForMeResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/CopyForMeResponse.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.Date; + /** * @Author chen * @DATE 2021/1/18 9:56 @@ -35,20 +37,16 @@ public class CopyForMeResponse { @ApiModelProperty("申请日期") @ExcelProperty(value = "申请日期",index = 2) @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - private String applicationDate; + private Date applicationDate; @ApiModelProperty("任务节点") @ExcelProperty(value = "任务节点",index = 3,converter = TaskNodeConverter.class) private String taskNode; - // @ApiModelProperty("审批人") - // @ExcelProperty(value = "审批人",index = 4) - // private String approve; - @ApiModelProperty("完成时间") @ExcelProperty(value = "完成时间",index = 4) @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - private String approveDate; + private Date approveDate; @ApiModelProperty("业务状态") @ExcelProperty(value = "业务状态",index = 5,converter = BusinessStatusConverter.class) @@ -66,4 +64,37 @@ public class CopyForMeResponse { @ApiModelProperty("业务id") private Integer businessId; + /** + * 下列属性用于解决抄送详情跳转问题 + */ + + @ApiModelProperty("业务编号") + @ExcelIgnore + private String businessCode; + + @ApiModelProperty("联系电话") + @ExcelIgnore + private String phone; + + @ApiModelProperty("业务类别") + @ExcelIgnore + private String businessType; + + @ApiModelProperty("申请额度") + @ExcelIgnore + private Double loanMoney; + + @ApiModelProperty("申请期限(月)") + @ExcelIgnore + private String loanTern; + + @ExcelIgnore + @ApiModelProperty("贷审会同意时间") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date passingTime; + + @ExcelIgnore + @ApiModelProperty("银行名称") + private String bank; + } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java index 1ad6e695..024304b6 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java @@ -8,10 +8,12 @@ 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.DateUtils; +import com.daqing.financial.guarantee.util.TaskNodeUtil; import com.daqing.framework.domain.guarantee.DgCopyUser; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.util.RedisUtil; import com.daqing.framework.utils.excel.EasyExcelUtil; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.web.context.request.RequestContextHolder; @@ -101,15 +103,23 @@ public class DgCopyUserServiceImpl extends ServiceImpl { + //提单人为空,默认赋值客户 + if (StringUtils.isEmpty(copyForMeResponse.getApplicant())){ + copyForMeResponse.setApplicant("客户"); + } + String taskNode = copyForMeResponse.getTaskNode(); + if (taskNode != null) { + String converter = TaskNodeUtil.converter(taskNode); + copyForMeResponse.setTaskNode(converter); + } + }); + } return copyForMeResponseList; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java index 67230499..bb0a785f 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java @@ -826,6 +826,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl - - - + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml index 87247e3f..7a57f7a7 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml @@ -4,42 +4,44 @@ - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - select cc.name,lcc.loan_money,lcc.loan_tern,aai.bank,lcc.passing_time from dg_guarantee_letter_assign_user lau left join dg_apply_amount_info aai on lau.business_id = aai.id @@ -89,8 +93,10 @@ where lau.business_id = #{businessId} and lau.role_id = #{roleId} - + select + au.id,au.role_id,au.company_id,au.business_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time, au.status,au.operating_status,cc.name,cc.phone,ps.business_status from dg_guarantee_letter_assign_user au left join dg_apply_amount_info ai on au.business_id = ai.id From c4691be6690b8cf1234ecca0ea7491175709e120 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Fri, 9 Apr 2021 17:19:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8A=84=E9=80=81?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DgCopyUserController.java | 2 +- .../controller/DgEfficiencyController.java | 5 ++--- .../guarantee/mapper/DgCopyUserMapper.java | 2 ++ .../guarantee/service/IDgCopyUserService.java | 2 ++ .../service/impl/DgCopyForServiceImpl.java | 9 +-------- .../service/impl/DgCopyUserServiceImpl.java | 6 +++++- .../mapper/guarantee/DgCopyUserMapper.xml | 20 +++++++++++++++++++ 7 files changed, 33 insertions(+), 13 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 fa1eefc8..8fbc6c75 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 @@ -43,7 +43,7 @@ public class DgCopyUserController { @PostMapping("/queryCopyForMe") public R queryCopyForMe(@RequestBody CopyForMeRequest copyForMeRequest){ List copyForMeList = copyUserService.queryCopyForMe(copyForMeRequest); - return R.ok().data("copyForMeList",copyForMeList).data("total",copyForMeList.size()); + return R.ok().data("copyForMeList",copyForMeList).data("total",copyUserService.queryTotal(copyForMeRequest)); } @Log(detail = "导出抄送我的列表",level = 4,operationUnit = OperationUnit.COPYFOR,operationType = OperationType.SELECT) 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 9250c312..261588e8 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 @@ -206,10 +206,9 @@ 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(); + Integer total = copyUserService.queryTotal(copyForMeRequest); NumResponse numResponse = new NumResponse(); - numResponse.setCopySendNum(size); + numResponse.setCopySendNum(total); //转换任务节点,并统计操作状态个数 responseList.forEach(personalEfficiencyListResponse -> { //耗时为空,默认为0 diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgCopyUserMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgCopyUserMapper.java index 9aeb4dbe..019de4b6 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgCopyUserMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgCopyUserMapper.java @@ -21,4 +21,6 @@ import java.util.List; public interface DgCopyUserMapper extends BaseMapper { List selectCopyForMe(CopyForMeRequest copyForMeRequest); + + Integer selectCopyForMeTotal(CopyForMeRequest copyForMeRequest); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgCopyUserService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgCopyUserService.java index e190d190..c3df2163 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgCopyUserService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgCopyUserService.java @@ -22,5 +22,7 @@ public interface IDgCopyUserService extends IService { List queryCopyForMe(CopyForMeRequest copyForMeRequest); + Integer queryTotal(CopyForMeRequest copyForMeRequest); + void exportCopyForMe(HttpServletResponse response) throws IOException; } 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 d32e2a77..3d225d55 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 @@ -1,26 +1,19 @@ package com.daqing.financial.guarantee.service.impl; -import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.daqing.financial.guarantee.mapper.DgCopyForMapper; import com.daqing.financial.guarantee.mapper.DgCopyUserMapper; import com.daqing.financial.guarantee.mapper.DgProcessUserMapper; import com.daqing.financial.guarantee.service.IDgCopyForService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.daqing.financial.guarantee.service.IDgCopyUserService; -import com.daqing.financial.guarantee.service.IDgProcessUserService; -import com.daqing.financial.guarantee.util.ImgUtil; import com.daqing.framework.domain.guarantee.DgCopyFor; import com.daqing.framework.domain.guarantee.DgCopyUser; import com.daqing.framework.domain.guarantee.DgProcessUser; -import com.daqing.framework.model.response.PromptSuccess; -import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.io.File; import java.io.IOException; import java.util.List; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java index 024304b6..42a2a0d6 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java @@ -119,12 +119,16 @@ public class DgCopyUserServiceImpl extends ServiceImpl + +