From b395ec511766a2f9023dd89ac5c89186beca4722 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Thu, 26 Nov 2020 17:44:58 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...DgGuaranteeLetterAssignUserController.java | 5 ----- .../controller/DgLoanNoticeController.java | 21 +++++-------------- ...PaymentConfirmationConsiderController.java | 20 +++++------------- .../guarantee/mapper/DgLoanNoticeMapper.java | 3 +++ .../DgPaymentConfirmationConsiderMapper.java | 1 + .../response/LoanNoticeListResponse.java | 12 +++++++---- .../PaymentConfirmationListResponse.java | 14 +++++++++---- .../service/IDgLoanNoticeService.java | 6 ++++++ ...IDgPaymentConfirmationConsiderService.java | 6 ++++++ ...gGuaranteeLetterAssignUserServiceImpl.java | 1 - .../service/impl/DgLoanNoticeServiceImpl.java | 10 +++++++++ ...aymentConfirmationConsiderServiceImpl.java | 11 +++++++++- .../mapper/guarantee/DgLoanNoticeMapper.xml | 16 ++++++++++++++ .../DgPaymentConfirmationConsiderMapper.xml | 16 ++++++++++++++ 14 files changed, 96 insertions(+), 46 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java index 2433d090..1c442b02 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java @@ -1,7 +1,6 @@ package com.daqing.financial.guarantee.controller; -import com.daqing.financial.guarantee.model.request.GuaranteeLetterListRequest; import com.daqing.financial.guarantee.model.request.GuaranteeLetterQueryRequest; import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusRequest; import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse; @@ -9,7 +8,6 @@ import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserServic import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.utils.PageUtils; -import com.daqing.framework.utils.excel.EasyExcelUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -18,7 +16,6 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.ArrayList; import java.util.List; /** @@ -47,7 +44,6 @@ public class DgGuaranteeLetterAssignUserController { return ResponseResult.SUCCESS(data); } - @ApiOperation(value = "导出担保函列表数据") @GetMapping("/guaranteeLetterListExport") public void guaranteeLetterListExport( @@ -69,7 +65,6 @@ public class DgGuaranteeLetterAssignUserController { return result ? ResponseResult.SUCCESS("添加成功!"):ResponseResult.FAIL(40005,"添加失败!"); } - @ApiOperation(value = "更新角色或用户确认状态及审核意见") @PostMapping("/updateStatus") public ResponseResult updateStatus( diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java index aa45ed4c..0835bc50 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java @@ -3,21 +3,14 @@ package com.daqing.financial.guarantee.controller; import com.daqing.financial.guarantee.model.request.*; import com.daqing.financial.guarantee.model.response.LoanNoticeListResponse; -import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse; import com.daqing.financial.guarantee.service.IDgLoanNoticeService; -import com.daqing.financial.guarantee.service.impl.DgLoanNoticeServiceImpl; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.utils.PageUtils; -import com.daqing.framework.utils.excel.EasyExcelUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -48,17 +41,13 @@ public class DgLoanNoticeController { return new ResponseResult().SUCCESS(data); } - @ApiOperation(value = "导出放款通知列表数据") - @PostMapping("/loanNoticeListExport") + @GetMapping("/loanNoticeListExport") public void loanNoticeListExport( - @ApiParam(name = "loanNoticeListRequest", value = "放款通知列表数据", required = true) - @RequestBody LoanNoticeListRequest loanNoticeListRequest, HttpServletResponse response){ - //获取放款通知列表数据 - List loanNoticeListResponseList = loanNoticeListRequest.getLoanNoticeListResponseList(); + @ApiParam(name = "ids", value = "多个id", required = true) + @RequestParam("ids") List ids, HttpServletResponse response){ try { - //导出excel文件 - EasyExcelUtil.download(response, LoanNoticeListResponse.class, loanNoticeListResponseList,"放款通知列表","第一页"); + loanNoticeService.batchExport(response,ids); } catch (IOException e) { e.printStackTrace(); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java index b0af31b3..07d2eefc 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java @@ -1,23 +1,17 @@ package com.daqing.financial.guarantee.controller; -import com.daqing.financial.guarantee.model.request.PaymentConfirmationListRequest; import com.daqing.financial.guarantee.model.request.PaymentConfirmationQueryRequest; import com.daqing.financial.guarantee.model.request.PaymentConfirmationUpdateRequest; import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse; import com.daqing.financial.guarantee.service.IDgPaymentConfirmationConsiderService; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.utils.PageUtils; -import com.daqing.framework.utils.excel.EasyExcelUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -48,17 +42,13 @@ public class DgPaymentConfirmationConsiderController { return new ResponseResult().SUCCESS(data); } - @ApiOperation(value = "导出回款确认列表数据") - @PostMapping("/paymentConfirmationListExport") + @GetMapping("/paymentConfirmationListExport") public void paymentConfirmationListExport( - @ApiParam(name = "paymentConfirmationListRequest", value = "回款确认列表数据", required = true) - @RequestBody PaymentConfirmationListRequest paymentConfirmationListRequest, HttpServletResponse response){ - //获取担保函列表数据 - List paymentConfirmationListResponseList = paymentConfirmationListRequest.getPaymentConfirmationListResponseList(); + @ApiParam(name = "ids", value = "多个id", required = true) + @RequestParam("ids") List ids, HttpServletResponse response){ try { - //导出excel文件 - EasyExcelUtil.download(response, PaymentConfirmationListResponse.class, paymentConfirmationListResponseList,"回款确认列表","第一页"); + paymentConfirmationConsiderService.batchExport(response,ids); } catch (IOException e) { e.printStackTrace(); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java index 41539eda..05788f12 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java @@ -7,6 +7,8 @@ import com.daqing.financial.guarantee.model.response.LoanNoticeListResponse; import com.daqing.framework.domain.guarantee.DgLoanNotice; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** *

* 放款通知 Mapper 接口 @@ -20,4 +22,5 @@ public interface DgLoanNoticeMapper extends BaseMapper { IPage pageByCondition(Page page, String roleIds, Integer userId, Integer status, String customerNumberOrName); + List selectBatchData(List ids); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgPaymentConfirmationConsiderMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgPaymentConfirmationConsiderMapper.java index 5f6df78f..eabd7d1a 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgPaymentConfirmationConsiderMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgPaymentConfirmationConsiderMapper.java @@ -22,4 +22,5 @@ public interface DgPaymentConfirmationConsiderMapper extends BaseMapper pageByCondition(Page page, List roleIdList , Integer userId , Integer status, String customerNumberOrName); + List selectBatchData(List ids); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/LoanNoticeListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/LoanNoticeListResponse.java index 25ffafa9..e0023084 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/LoanNoticeListResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/LoanNoticeListResponse.java @@ -1,5 +1,6 @@ package com.daqing.financial.guarantee.model.response; +import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import com.daqing.framework.utils.excel.ApprovalStatusConverter; import com.daqing.framework.utils.excel.BusinessStatusConverter; @@ -19,12 +20,15 @@ import java.util.Date; @Data public class LoanNoticeListResponse { + @ExcelIgnore @ApiModelProperty("唯一标识") private Integer id; + @ExcelIgnore @ApiModelProperty(value = "审核意见") private String auditOpinion; + @ExcelIgnore @ApiModelProperty("银行名称") private String bank; @@ -44,12 +48,12 @@ public class LoanNoticeListResponse { @ExcelProperty(value = "业务类别",index = 3) private String businessType; - @ApiModelProperty("金额") - @ExcelProperty(value = "金额",index = 4) + @ApiModelProperty("申请额度") + @ExcelProperty(value = "申请额度",index = 4) private Double loanMoney; - @ApiModelProperty("期数") - @ExcelProperty(value = "期数",index = 5) + @ApiModelProperty("申请期限") + @ExcelProperty(value = "申请期限",index = 5) private String loanTern; @ApiModelProperty("申请日期") diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PaymentConfirmationListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PaymentConfirmationListResponse.java index 13f4a00c..175a6d68 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PaymentConfirmationListResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PaymentConfirmationListResponse.java @@ -1,5 +1,6 @@ package com.daqing.financial.guarantee.model.response; +import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import com.daqing.framework.utils.excel.ApprovalStatusConverter; import com.daqing.framework.utils.excel.BusinessStatusConverter; @@ -19,19 +20,24 @@ import java.util.Date; @Data public class PaymentConfirmationListResponse { + @ExcelIgnore @ApiModelProperty("唯一标识") private Integer id; + @ExcelIgnore @ApiModelProperty(value = "审核意见") private String auditOpinion; + @ExcelIgnore @ApiModelProperty("银行名称") private String bank; + @ExcelIgnore @ApiModelProperty("贷审会同意时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") private Date passingTime; + @ExcelIgnore @ApiModelProperty("附件(会议记录)") private String file; @@ -51,12 +57,12 @@ public class PaymentConfirmationListResponse { @ExcelProperty(value = "业务类别",index = 3) private String businessType; - @ApiModelProperty("金额") - @ExcelProperty(value = "金额",index = 4) + @ApiModelProperty("申请额度") + @ExcelProperty(value = "申请额度",index = 4) private Double loanMoney; - @ApiModelProperty("期限") - @ExcelProperty(value = "期数",index = 5) + @ApiModelProperty("申请期限") + @ExcelProperty(value = "申请期限",index = 5) private String loanTern; @ApiModelProperty("申请日期") diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgLoanNoticeService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgLoanNoticeService.java index 16c98405..651ed4b1 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgLoanNoticeService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgLoanNoticeService.java @@ -6,6 +6,10 @@ import com.daqing.financial.guarantee.model.request.LoanNoticeUpdateRequest; import com.daqing.framework.domain.guarantee.DgLoanNotice; import com.daqing.framework.utils.PageUtils; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; + /** *

* 放款通知 服务类 @@ -19,4 +23,6 @@ public interface IDgLoanNoticeService extends IService { PageUtils queryPage(LoanNoticeQueryRequest loanNoticeQueryRequest); boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest); + + void batchExport(HttpServletResponse response, List ids) throws IOException; } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgPaymentConfirmationConsiderService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgPaymentConfirmationConsiderService.java index 24ca0aad..54140bd3 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgPaymentConfirmationConsiderService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgPaymentConfirmationConsiderService.java @@ -6,6 +6,10 @@ import com.daqing.financial.guarantee.model.request.PaymentConfirmationUpdateReq import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider; import com.daqing.framework.utils.PageUtils; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; + /** *

* 回款确认 服务类 @@ -19,4 +23,6 @@ public interface IDgPaymentConfirmationConsiderService extends IService ids) throws IOException; } 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 a15f9797..5190d9e1 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 @@ -51,7 +51,6 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl ids) throws IOException { + List excelDataList = baseMapper.selectBatchData(ids); + EasyExcelUtil.download(response,LoanNoticeListResponse.class,excelDataList,"LoanNoticeList","第一页"); + } + @Override public boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest) { // TODO 所有操作待添加业务流程数据 diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java index 6eda8d38..32739ce2 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java @@ -8,6 +8,7 @@ import com.daqing.financial.guarantee.mapper.DgLoanNoticeMapper; import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper; import com.daqing.financial.guarantee.model.request.PaymentConfirmationQueryRequest; import com.daqing.financial.guarantee.model.request.PaymentConfirmationUpdateRequest; +import com.daqing.financial.guarantee.model.response.LoanNoticeListResponse; import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse; import com.daqing.financial.guarantee.service.IDgPaymentConfirmationConsiderService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -18,6 +19,7 @@ import com.daqing.framework.model.StatusCode; import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.util.RedisUtil; import com.daqing.framework.utils.PageUtils; +import com.daqing.framework.utils.excel.EasyExcelUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -25,6 +27,8 @@ import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.util.Arrays; import java.util.List; @@ -75,10 +79,15 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl ids) throws IOException { + List excelDataList = baseMapper.selectBatchData(ids); + EasyExcelUtil.download(response,PaymentConfirmationListResponse.class,excelDataList,"PaymentConfirmationList","第一页"); + } + @Override public boolean updatePaymentConfirmation(PaymentConfirmationUpdateRequest paymentConfirmationUpdateRequest) { // TODO 所有操作待添加业务流程数据 diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanNoticeMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanNoticeMapper.xml index 5fff8e7b..72afdac0 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanNoticeMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanNoticeMapper.xml @@ -55,4 +55,20 @@ + + + diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml index 6bad26fb..bb89ecd9 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml @@ -58,4 +58,20 @@ + + + From 5f88f615ea49de4253739b205e6c1e4d7a79b8b9 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Fri, 27 Nov 2020 10:40:25 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dq-financial-guarantee/pom.xml | 2 -- ...gGuaranteeLetterAssignUserServiceImpl.java | 1 + .../guarantee/util/AuditProcessUtil.java | 32 +++++++++---------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/dq-financial-guarantee/pom.xml b/dq-financial-guarantee/pom.xml index 34b8e4d5..06bbfb6a 100644 --- a/dq-financial-guarantee/pom.xml +++ b/dq-financial-guarantee/pom.xml @@ -76,8 +76,6 @@ mybatis-plus-boot-starter 3.0.7.1 - - 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 5190d9e1..e944e3a9 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 @@ -11,6 +11,7 @@ import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusR import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse; import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.daqing.financial.guarantee.util.AuditProcessUtil; import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser; import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider; import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java index e7c35e9b..c22e253d 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java @@ -2,36 +2,36 @@ package com.daqing.financial.guarantee.util; import com.daqing.financial.guarantee.mapper.DgAuditProcessMapper; import com.daqing.framework.domain.guarantee.DgAuditProcess; -import lombok.Data; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Configuration; +import org.springframework.stereotype.Component; + +import javax.annotation.PostConstruct; /** * @Author chen * @DATE 2020/11/26 15:45 * @Version 1.0 */ -@Data -@Configuration -public class AuditProcessUtil { - - private Integer businessId; - private String approver; - private String deptName; - private String auditOpinion; +@Component +public class AuditProcessUtil{ @Autowired - private DgAuditProcessMapper auditProcessMapper; + public DgAuditProcessMapper auditProcessMapper; - public AuditProcessUtil(Integer businessId, String approver, String deptName, String auditOpinion) { + private static AuditProcessUtil auditProcessUtil; + + @PostConstruct + public void init() { + auditProcessUtil = this; + auditProcessUtil.auditProcessMapper = this.auditProcessMapper; + } + + public static void save(Integer businessId, String approver, String deptName, String auditOpinion) { DgAuditProcess auditProcess = new DgAuditProcess(); auditProcess.setApprover(approver); auditProcess.setAuditOpinion(auditOpinion); auditProcess.setBusinessId(businessId); auditProcess.setDeptName(deptName); - auditProcessMapper.insert(auditProcess); - } - - public AuditProcessUtil() { + auditProcessUtil.auditProcessMapper.insert(auditProcess); } } From 2e48e772379f3fd3b579133b1a4e6268a2bb2603 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Fri, 27 Nov 2020 10:59:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DgAuditProcessController.java | 1 - .../guarantee/mapper/DgLoanNoticeMapper.java | 2 +- .../service/impl/DgLoanNoticeServiceImpl.java | 17 ++++++++++++++--- .../guarantee/util/AuditProcessUtil.java | 5 +++-- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java index 43a577d8..522ffaaa 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java @@ -38,5 +38,4 @@ public class DgAuditProcessController { return ResponseResult.SUCCESS(); } - } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java index 05788f12..08395572 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java @@ -20,7 +20,7 @@ import java.util.List; @Mapper public interface DgLoanNoticeMapper extends BaseMapper { - IPage pageByCondition(Page page, String roleIds, Integer userId, Integer status, String customerNumberOrName); + IPage pageByCondition(Page page, List roleIdList, Integer userId, Integer status, String customerNumberOrName); List selectBatchData(List ids); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java index 6f456c48..e2139fda 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java @@ -3,6 +3,7 @@ package com.daqing.financial.guarantee.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.daqing.financial.guarantee.mapper.DgBusinessProcessStatusMapper; import com.daqing.financial.guarantee.mapper.DgLoanNoticeMapper; import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper; import com.daqing.financial.guarantee.model.request.LoanNoticeQueryRequest; @@ -12,6 +13,7 @@ import com.daqing.financial.guarantee.model.response.LoanNoticeListResponse; import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse; import com.daqing.financial.guarantee.service.IDgLoanNoticeService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.daqing.framework.domain.guarantee.DgBusinessProcessStatus; import com.daqing.framework.domain.guarantee.DgLoanNotice; import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider; import com.daqing.framework.model.StatusCode; @@ -47,6 +49,8 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl roleIdList = Arrays.asList(ids); //分页条件查询 - loanNoticeVO = baseMapper.pageByCondition(new Page(page,size),roleIds,userId,status,customerNumberOrName); + loanNoticeVO = baseMapper.pageByCondition(new Page(page,size),roleIdList,userId,status,customerNumberOrName); } return new PageUtils(loanNoticeVO); } @@ -105,9 +109,16 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl 0){ - return update > 0; + QueryWrapper businessProcessStatusQueryWrapper = new QueryWrapper<>(); + businessProcessStatusQueryWrapper.eq("business_id",businessId); + DgBusinessProcessStatus dgBusinessProcessStatus = businessProcessStatusMapper.selectOne(businessProcessStatusQueryWrapper); + dgBusinessProcessStatus.setBusinessStatus(StatusCode.YW_COMPLETED); + int updateById = businessProcessStatusMapper.updateById(dgBusinessProcessStatus); + //更新成功,返回操作结果 + log.info(updateById > 0 ? "业务流程已完成" : "业务流程已完成更新失败"); + return updateById > 0; } } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java index c22e253d..ebbf9901 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java @@ -26,12 +26,13 @@ public class AuditProcessUtil{ auditProcessUtil.auditProcessMapper = this.auditProcessMapper; } - public static void save(Integer businessId, String approver, String deptName, String auditOpinion) { + public static boolean save(Integer businessId, String approver, String deptName, String auditOpinion) { DgAuditProcess auditProcess = new DgAuditProcess(); auditProcess.setApprover(approver); auditProcess.setAuditOpinion(auditOpinion); auditProcess.setBusinessId(businessId); auditProcess.setDeptName(deptName); - auditProcessUtil.auditProcessMapper.insert(auditProcess); + int insert = auditProcessUtil.auditProcessMapper.insert(auditProcess); + return insert > 0; } }