diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java index fbddf681..3a31b894 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java @@ -69,13 +69,13 @@ public class GuaranteeLetterListResponse { @ExcelProperty(value = "申请额度",index = 4) private Double loanMoney; - @ApiModelProperty("申请期限") - @ExcelProperty(value = "申请期限",index = 5) + @ApiModelProperty("申请期限(月)") + @ExcelProperty(value = "申请期限(月)",index = 5) private String loanTern; @ApiModelProperty("申请日期") @ExcelProperty(value = "申请日期",index = 6) - @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date createTime; @ApiModelProperty("审核状态") 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 9c96213f..0a0988b3 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 @@ -56,13 +56,13 @@ public class LoanNoticeListResponse { @ExcelProperty(value = "申请额度",index = 4) private Double loanMoney; - @ApiModelProperty("申请期限") - @ExcelProperty(value = "申请期限",index = 5) + @ApiModelProperty("申请期限(月)") + @ExcelProperty(value = "申请期限(月)",index = 5) private String loanTern; @ApiModelProperty("申请日期") @ExcelProperty(value = "申请日期",index = 6) - @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date createTime; @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 c8b3e3f6..9e66e9a8 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 @@ -38,7 +38,7 @@ public class PaymentConfirmationListResponse { @ExcelIgnore @ApiModelProperty("贷审会同意时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date passingTime; @ExcelIgnore @@ -65,13 +65,13 @@ public class PaymentConfirmationListResponse { @ExcelProperty(value = "申请额度",index = 4) private Double loanMoney; - @ApiModelProperty("申请期限") - @ExcelProperty(value = "申请期限",index = 5) + @ApiModelProperty("申请期限(月)") + @ExcelProperty(value = "申请期限(月)",index = 5) private String loanTern; @ApiModelProperty("申请日期") @ExcelProperty(value = "申请日期",index = 6) - @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date createTime; @ApiModelProperty("审核状态") 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 51bea14e..e08060ba 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 @@ -3,12 +3,14 @@ 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.controller.DgApplyAmountInfoController; import com.daqing.financial.guarantee.mapper.DgGuaranteeLetterAssignUserMapper; import com.daqing.financial.guarantee.mapper.DgLoanCommitteeConsiderMapper; import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper; import com.daqing.financial.guarantee.model.request.GuaranteeLetterQueryRequest; import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusRequest; import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse; +import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse; import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.daqing.financial.guarantee.util.AuditProcessUtil; @@ -20,6 +22,7 @@ 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 com.daqing.framework.utils.excel.ExcelUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -52,6 +55,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl idList = Arrays.asList(id); List excelDataList = baseMapper.selectBatchData(idList); - EasyExcelUtil.download(response,GuaranteeLetterListResponse.class,excelDataList,"GuaranteeLetterList","第一页"); + EasyExcelUtil.download(response,GuaranteeLetterListResponse.class,excelDataList,"担保函列表","第一页"); } @Override @@ -96,7 +100,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl records = guaranteeLetterVO.getRecords(); records.forEach(guaranteeLetterListResponse -> { //角色为法规部经理则设置值 - if (roleIdList.contains(PromptSuccess.FG_JL_ID)){ + if (roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))){ guaranteeLetterListResponse.setIsFgJl(1); } }); @@ -115,7 +119,6 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl queryWrapperTemp = new QueryWrapper<>(); queryWrapperTemp.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID); @@ -158,8 +161,12 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //添加a角 @@ -188,8 +195,11 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新a角 @@ -232,7 +242,10 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //根据业务id查询贷审会数据 QueryWrapper loanCommitteeConsiderQueryWrapper = new QueryWrapper<>(); @@ -249,7 +262,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl queryWrapperTemp = new QueryWrapper<>(); queryWrapperTemp.eq("business_id",businessId).eq("role_id",PromptSuccess.ZC_JL_ID); @@ -269,9 +282,12 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //添加财务部经理的回款数据 DgPaymentConfirmationConsider paymentConfirmationConsider = new DgPaymentConfirmationConsider(); @@ -298,7 +314,10 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新财务部经理的回款数据 QueryWrapper paymentConfirmationConsiderQueryWrapper = new QueryWrapper<>(); @@ -329,6 +348,9 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //根据业务id查询A角数据 @@ -359,7 +381,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl queryWrapperTemp = new QueryWrapper<>(); queryWrapperTemp.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); @@ -380,6 +402,9 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "首次a角用户确认担保函更新成功" : "首次a角用户确认担保函更新失败"); + //同时往审核流程进程表新增一条记录 + String account = DgApplyAmountInfoController.getAccount(); + AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion); //更新成功后,判断b角用户是否确认 if (i > 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -397,6 +422,9 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "资产部经理添加成功" : "资产部经理添加失败"); return insert > 0; + //b用户审核没通过,返回结果 + }else { + return true; } } } @@ -412,6 +440,9 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "驳回后a角用户确认担保函更新成功" : "驳回后a角用户确认担保函更新失败"); + //同时往审核流程进程表新增一条记录 + String account = DgApplyAmountInfoController.getAccount(); + AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion); //更新成功后,判断b角用户是否确认 if (i > 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -432,6 +463,9 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "资产部经理更新成功" : "资产部经理更新失败"); return update > 0; + //b用户审核没通过,返回结果 + }else { + return true; } } } @@ -448,6 +482,9 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "a角用户驳回担保函更新成功" : "a角用户驳回担保函更新失败"); + //同时往审核流程进程表新增一条记录 + String account = DgApplyAmountInfoController.getAccount(); + AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion); //更新成功后,更新b角数据及更新法规部经理数据 if (i > 0){ //更新b用户的审核状态为驳回 @@ -473,7 +510,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl queryWrapperTemp = new QueryWrapper<>(); queryWrapperTemp.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); @@ -494,6 +531,9 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "首次b角用户确认担保函更新成功" : "首次b角用户确认担保函更新失败"); + //同时往审核流程进程表新增一条记录 + String account = DgApplyAmountInfoController.getAccount(); + AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion); //更新成功后,判断a角用户是否确认 if (i > 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -511,6 +551,9 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "资产部经理添加成功" : "资产部经理添加失败"); return insert > 0; + //a用户审核没通过,返回结果 + }else { + return true; } } } @@ -527,6 +570,9 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "驳回后b角用户确认担保函更新成功" : "驳回后b角用户确认担保函更新失败"); + //同时往审核流程进程表新增一条记录 + String account = DgApplyAmountInfoController.getAccount(); + AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion); //更新成功后,判断a角用户是否确认 if (i > 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -547,6 +593,9 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "资产部经理更新成功" : "资产部经理更新失败"); return update > 0; + //a用户审核没通过,返回结果 + }else { + return true; } } } @@ -563,6 +612,9 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "b角用户驳回担保函更新成功" : "b角用户驳回担保函更新失败"); + //同时往审核流程进程表新增一条记录 + String account = DgApplyAmountInfoController.getAccount(); + AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion); //更新成功后,更新a角数据及更新法规部经理数据 if (i > 0){ //更新a用户的审核状态为驳回 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 40d55475..b554e192 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.controller.DgApplyAmountInfoController; import com.daqing.financial.guarantee.mapper.DgBusinessProcessStatusMapper; import com.daqing.financial.guarantee.mapper.DgLoanNoticeMapper; import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper; @@ -13,6 +14,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.financial.guarantee.util.AuditProcessUtil; import com.daqing.framework.domain.guarantee.DgBusinessProcessStatus; import com.daqing.framework.domain.guarantee.DgLoanNotice; import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider; @@ -21,6 +23,7 @@ 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 com.daqing.framework.utils.excel.ExcelUtil; import jdk.nashorn.internal.ir.IfNode; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -88,15 +91,15 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl idList = Arrays.asList(id); List excelDataList = baseMapper.selectBatchData(idList); - EasyExcelUtil.download(response,LoanNoticeListResponse.class,excelDataList,"LoanNoticeList","第一页"); + EasyExcelUtil.download(response,LoanNoticeListResponse.class,excelDataList,"放款通知列表","第一页"); } @Override public boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest) { - // TODO 所有操作待添加业务流程数据 //取出条件 Integer businessId = loanNoticeUpdateRequest.getBusinessId(); - Integer currentUser = loanNoticeUpdateRequest.getCurrentUser(); + //获取当前登录用户id + Integer currentUser = Integer.parseInt(this.getUserId()); String auditOpinion = loanNoticeUpdateRequest.getAuditOpinion(); //状态为2表示通过,为4表示驳回 Integer status = loanNoticeUpdateRequest.getStatus(); @@ -111,6 +114,9 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl 0){ QueryWrapper businessProcessStatusQueryWrapper = new QueryWrapper<>(); @@ -134,6 +140,9 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapper = new QueryWrapper<>(); 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 31fbe6fc..6ee088fb 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 @@ -3,15 +3,18 @@ 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.controller.DgApplyAmountInfoController; import com.daqing.financial.guarantee.mapper.DgGuaranteeLetterAssignUserMapper; 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.BusinessApplicationListResponse; 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; +import com.daqing.financial.guarantee.util.AuditProcessUtil; import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser; import com.daqing.framework.domain.guarantee.DgLoanNotice; import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider; @@ -20,6 +23,7 @@ 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 com.daqing.framework.utils.excel.ExcelUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -87,12 +91,11 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl idList = Arrays.asList(id); List excelDataList = baseMapper.selectBatchData(idList); - EasyExcelUtil.download(response,PaymentConfirmationListResponse.class,excelDataList,"PaymentConfirmationList","第一页"); + EasyExcelUtil.download(response,PaymentConfirmationListResponse.class,excelDataList,"回款确认列表","第一页"); } @Override public boolean updatePaymentConfirmation(PaymentConfirmationUpdateRequest paymentConfirmationUpdateRequest) { - // TODO 所有操作待添加业务流程数据 //取出条件 Integer businessId = paymentConfirmationUpdateRequest.getBusinessId(); //获取当前登录用户id @@ -120,7 +123,9 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ @@ -146,6 +151,9 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper loanNoticeQueryWrapper = new QueryWrapper<>(); @@ -173,6 +181,9 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper guaranteeLetterAssignUserQueryWrapper = new QueryWrapper<>(); diff --git a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java index c59081b6..28eeea34 100644 --- a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java +++ b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java @@ -14,8 +14,9 @@ import java.util.List; public class EasyExcelUtil { public static void download(HttpServletResponse response, Class head, List list, String fileName, String sheetName) throws IOException { response.setContentType("application/vnd.ms-excel"); - response.setCharacterEncoding("utf-8"); - response.setHeader("Content-disposition", "attachment;filename="+fileName+".xlsx"); + String filePath = fileName + ".xlsx"; + fileName = new String(filePath.getBytes(), "ISO-8859-1"); + response.addHeader("Content-Disposition", "filename=" + fileName); EasyExcel.write(response.getOutputStream(), head).sheet(sheetName).doWrite(list); } } diff --git a/dq-govern-gateway/src/main/resources/jwt.properties b/dq-govern-gateway/src/main/resources/jwt.properties index 2d0b37e2..ce045b6e 100644 --- a/dq-govern-gateway/src/main/resources/jwt.properties +++ b/dq-govern-gateway/src/main/resources/jwt.properties @@ -16,7 +16,12 @@ jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\ /api-guarantee/dg-apply-amount-info/excelExport,\ /api-guarantee/dg-message-investigation/excelExport,\ /api-guarantee/dg-assets-investigation/excelExport,\ - /api-guarantee/dg-guarantee-assign-user/excelExport + /api-guarantee/dg-guarantee-assign-user/excelExport,\ + /api-guarantee/dg-guarantee-letter-assign-user/exportGuaranteeLetter,\ + /api-guarantee/dg-guarantee-letter-assign-user/guaranteeLetterListExport,\ + /api-guarantee/dg-payment-confirmation-consider/paymentConfirmationListExport,\ + /api-guarantee/dg-loan-notice/loanNoticeListExport +