diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java index 6fed3bc3..6a15f03c 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java @@ -72,6 +72,22 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA @Autowired private IDgApplyAmountListService applyAmountListService; + + /** + * 获取当前用户角色 + */ + @GetMapping("/getRoles") + @ApiOperation(value = "获取当前用户角色") + public ResponseResult getRoles(){ + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String token = request.getHeader("token"); + String userId = RedisUtil.get("dq:token:" + token); + //获取当前用户拥有的角色ids + String roleIds = RedisUtil.get("dq:userRole:" + userId); + return ResponseResult.SUCCESS(roleIds); + } + + /** * 根据客户编号/客户名称获取企业信息 * @param applyAmountInfo 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 ff76f43b..e8ca89d2 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 @@ -81,8 +81,10 @@ public class DgGuaranteeLetterAssignUserController { @GetMapping("/exportGuaranteeLetter") public void guaranteeLetterList( @ApiParam(name = "businessId", value = "业务id", required = true) - @RequestParam String businessId,HttpServletResponse httpServletResponse){ - GuaranteeLetterListResponse response = guaranteeLetterAssignUserService.selectGuaranteeLetter(businessId); + @RequestParam String businessId, + @ApiParam(name = "roleId", value = "角色id", required = true) + @RequestParam String roleId,HttpServletResponse httpServletResponse){ + GuaranteeLetterListResponse response = guaranteeLetterAssignUserService.selectGuaranteeLetter(businessId,roleId); String bank = response.getBank(); String name = response.getName(); Double loanMoney = response.getLoanMoney(); 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 fa471c72..f156cf7b 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 @@ -41,9 +41,6 @@ public class DgLoanNoticeController { @Autowired private IDgLoanNoticeService loanNoticeService; - @Autowired - private IDgGuaranteeLetterAssignUserService guaranteeLetterAssignUserService; - @ApiOperation(value = "放款通知记录列表",response = LoanNoticeListResponse.class) @PostMapping("/loanNoticeList") public ResponseResult loanNoticeList( @@ -78,8 +75,10 @@ public class DgLoanNoticeController { @GetMapping("/exportLoanNotice") public void exportLoanNotice( @ApiParam(name = "businessId", value = "业务id", required = true) - @RequestParam String businessId,HttpServletResponse httpServletResponse){ - GuaranteeLetterListResponse response = guaranteeLetterAssignUserService.selectGuaranteeLetter(businessId); + @RequestParam String businessId, + @ApiParam(name = "roleId", value = "角色id", required = true) + @RequestParam String roleId,HttpServletResponse httpServletResponse){ + LoanNoticeListResponse response = loanNoticeService.selectLoanNotice(businessId,roleId); String bank = response.getBank(); String name = response.getName(); Double loanMoney = response.getLoanMoney(); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java index 617b9a5f..39bd5d35 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java @@ -25,5 +25,5 @@ public interface DgGuaranteeLetterAssignUserMapper extends BaseMapper selectBatchData(List idList); - GuaranteeLetterListResponse selectGuaranteeLetter(String businessId); + GuaranteeLetterListResponse selectGuaranteeLetter(String businessId,String roleId); } 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 42ab7df0..1c5a097b 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 @@ -23,4 +23,6 @@ public interface DgLoanNoticeMapper extends BaseMapper { IPage pageByCondition(Page page, List roleIdList, Integer userId, Integer status, String customerNumberOrName); List selectBatchData(List idList); + + LoanNoticeListResponse selectLoanNotice(String businessId, String roleId); } 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 b444cbab..e148638e 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 @@ -20,6 +20,10 @@ import java.util.Date; @Data public class LoanNoticeListResponse { + @ExcelIgnore + @ApiModelProperty("角色id") + private Integer roleId; + @ExcelIgnore @ApiModelProperty("唯一标识") private Integer id; 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 a739af06..4f41222c 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 @@ -20,6 +20,14 @@ import java.util.Date; @Data public class PaymentConfirmationListResponse { + @ExcelIgnore + @ApiModelProperty("法规经理唯一标识") + private Integer isFgJl; + + @ExcelIgnore + @ApiModelProperty("角色id") + private Integer roleId; + @ExcelIgnore @ApiModelProperty("唯一标识") private Integer id; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java index a74ebd0c..9b7b1c54 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java @@ -29,5 +29,5 @@ public interface IDgGuaranteeLetterAssignUserService extends IService { boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest); void batchExport(HttpServletResponse response, String ids) throws IOException; + + LoanNoticeListResponse selectLoanNotice(String businessId, String roleId); } 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 766dd585..88ed8d0e 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 @@ -57,8 +57,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ - //更新b用户的审核状态为驳回 + //更新b用户的审核状态为驳回,操作状态为已处理 QueryWrapper tempB = new QueryWrapper<>(); tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = baseMapper.selectOne(tempB); dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REJECT); + dgGuaranteeLetterAssignUserB.setOperatingStatus(StatusCode.CZ_PROCESSED); baseMapper.updateById(dgGuaranteeLetterAssignUserB); - //更新法规部经理的审核状态为驳回,操作状态为待处理 + //更新法规部经理的审核状态为驳回,操作状态为待处理,清空审批意见 QueryWrapper tempFG = new QueryWrapper<>(); tempFG.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFG = baseMapper.selectOne(tempFG); dgGuaranteeLetterAssignUserFG.setStatus(StatusCode.SP_REJECT); dgGuaranteeLetterAssignUserFG.setOperatingStatus(StatusCode.CZ_ON_HAND); + dgGuaranteeLetterAssignUserFG.setAuditOpinion(""); int update = baseMapper.updateById(dgGuaranteeLetterAssignUserFG); //添加成功,返回操作结果 log.info(update > 0 ? "a角驳回更新成功" : "a角驳回更新失败"); @@ -617,11 +619,12 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ - //更新a用户的审核状态为驳回 + //更新a用户的审核状态为驳回,操作状态为已处理 QueryWrapper tempA = new QueryWrapper<>(); tempA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserA = baseMapper.selectOne(tempA); dgGuaranteeLetterAssignUserA.setStatus(StatusCode.SP_REJECT); + dgGuaranteeLetterAssignUserA.setStatus(StatusCode.CZ_PROCESSED); baseMapper.updateById(dgGuaranteeLetterAssignUserA); //更新法规部经理的审核状态为驳回,操作状态为待处理 @@ -629,6 +632,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl roleIdList = Arrays.asList(ids); //分页条件查询 paymentConfirmationVO = baseMapper.pageByCondition(new Page(page,size),roleIdList,userId,status,customerNumberOrName); + List records = paymentConfirmationVO.getRecords(); + records.forEach(paymentConfirmationListResponse -> { + //角色为法规部经理则设置值 + if (paymentConfirmationListResponse.getRoleId().equals(PromptSuccess.FG_JL_ID)){ + paymentConfirmationListResponse.setIsFgJl(1); + } + }); } return new PageUtils(paymentConfirmationVO); } 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 aa5f54f7..b9419ca1 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml @@ -83,7 +83,7 @@ left join crms_customer cc on ccc.customer_id = cc.id left join dg_loan_committee_consider lcc on lau.business_id = lcc.business_id left join dg_business_process_status bps on lau.business_id = bps.business_id - where lau.business_id = #{businessId} + where lau.business_id = #{businessId} and lau.role_id = #{roleId} 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 6a20ce6f..de654666 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanNoticeMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanNoticeMapper.xml @@ -28,10 +28,11 @@ + + + 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 76d7a414..fa3ead69 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml @@ -32,11 +32,12 @@ +