上传代码

master
chen 4 years ago
parent 25f933df43
commit 062fbb62f9
  1. 16
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java
  2. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
  3. 9
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java
  4. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java
  5. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java
  6. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/LoanNoticeListResponse.java
  7. 8
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PaymentConfirmationListResponse.java
  8. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java
  9. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgLoanNoticeService.java
  10. 14
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
  11. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java
  12. 8
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java
  13. 2
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
  14. 14
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanNoticeMapper.xml
  15. 5
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml

@ -72,6 +72,22 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
@Autowired @Autowired
private IDgApplyAmountListService applyAmountListService; 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 * @param applyAmountInfo

@ -81,8 +81,10 @@ public class DgGuaranteeLetterAssignUserController {
@GetMapping("/exportGuaranteeLetter") @GetMapping("/exportGuaranteeLetter")
public void guaranteeLetterList( public void guaranteeLetterList(
@ApiParam(name = "businessId", value = "业务id", required = true) @ApiParam(name = "businessId", value = "业务id", required = true)
@RequestParam String businessId,HttpServletResponse httpServletResponse){ @RequestParam String businessId,
GuaranteeLetterListResponse response = guaranteeLetterAssignUserService.selectGuaranteeLetter(businessId); @ApiParam(name = "roleId", value = "角色id", required = true)
@RequestParam String roleId,HttpServletResponse httpServletResponse){
GuaranteeLetterListResponse response = guaranteeLetterAssignUserService.selectGuaranteeLetter(businessId,roleId);
String bank = response.getBank(); String bank = response.getBank();
String name = response.getName(); String name = response.getName();
Double loanMoney = response.getLoanMoney(); Double loanMoney = response.getLoanMoney();

@ -41,9 +41,6 @@ public class DgLoanNoticeController {
@Autowired @Autowired
private IDgLoanNoticeService loanNoticeService; private IDgLoanNoticeService loanNoticeService;
@Autowired
private IDgGuaranteeLetterAssignUserService guaranteeLetterAssignUserService;
@ApiOperation(value = "放款通知记录列表",response = LoanNoticeListResponse.class) @ApiOperation(value = "放款通知记录列表",response = LoanNoticeListResponse.class)
@PostMapping("/loanNoticeList") @PostMapping("/loanNoticeList")
public ResponseResult loanNoticeList( public ResponseResult loanNoticeList(
@ -78,8 +75,10 @@ public class DgLoanNoticeController {
@GetMapping("/exportLoanNotice") @GetMapping("/exportLoanNotice")
public void exportLoanNotice( public void exportLoanNotice(
@ApiParam(name = "businessId", value = "业务id", required = true) @ApiParam(name = "businessId", value = "业务id", required = true)
@RequestParam String businessId,HttpServletResponse httpServletResponse){ @RequestParam String businessId,
GuaranteeLetterListResponse response = guaranteeLetterAssignUserService.selectGuaranteeLetter(businessId); @ApiParam(name = "roleId", value = "角色id", required = true)
@RequestParam String roleId,HttpServletResponse httpServletResponse){
LoanNoticeListResponse response = loanNoticeService.selectLoanNotice(businessId,roleId);
String bank = response.getBank(); String bank = response.getBank();
String name = response.getName(); String name = response.getName();
Double loanMoney = response.getLoanMoney(); Double loanMoney = response.getLoanMoney();

@ -25,5 +25,5 @@ public interface DgGuaranteeLetterAssignUserMapper extends BaseMapper<DgGuarante
List<GuaranteeLetterListResponse> selectBatchData(List<String> idList); List<GuaranteeLetterListResponse> selectBatchData(List<String> idList);
GuaranteeLetterListResponse selectGuaranteeLetter(String businessId); GuaranteeLetterListResponse selectGuaranteeLetter(String businessId,String roleId);
} }

@ -23,4 +23,6 @@ public interface DgLoanNoticeMapper extends BaseMapper<DgLoanNotice> {
IPage<LoanNoticeListResponse> pageByCondition(Page page, List<String> roleIdList, Integer userId, Integer status, String customerNumberOrName); IPage<LoanNoticeListResponse> pageByCondition(Page page, List<String> roleIdList, Integer userId, Integer status, String customerNumberOrName);
List<LoanNoticeListResponse> selectBatchData(List<String> idList); List<LoanNoticeListResponse> selectBatchData(List<String> idList);
LoanNoticeListResponse selectLoanNotice(String businessId, String roleId);
} }

@ -20,6 +20,10 @@ import java.util.Date;
@Data @Data
public class LoanNoticeListResponse { public class LoanNoticeListResponse {
@ExcelIgnore
@ApiModelProperty("角色id")
private Integer roleId;
@ExcelIgnore @ExcelIgnore
@ApiModelProperty("唯一标识") @ApiModelProperty("唯一标识")
private Integer id; private Integer id;

@ -20,6 +20,14 @@ import java.util.Date;
@Data @Data
public class PaymentConfirmationListResponse { public class PaymentConfirmationListResponse {
@ExcelIgnore
@ApiModelProperty("法规经理唯一标识")
private Integer isFgJl;
@ExcelIgnore
@ApiModelProperty("角色id")
private Integer roleId;
@ExcelIgnore @ExcelIgnore
@ApiModelProperty("唯一标识") @ApiModelProperty("唯一标识")
private Integer id; private Integer id;

@ -29,5 +29,5 @@ public interface IDgGuaranteeLetterAssignUserService extends IService<DgGuarante
void batchExport(HttpServletResponse response, String ids) throws IOException; void batchExport(HttpServletResponse response, String ids) throws IOException;
GuaranteeLetterListResponse selectGuaranteeLetter(String businessId); GuaranteeLetterListResponse selectGuaranteeLetter(String businessId,String roleId);
} }

@ -3,6 +3,7 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.LoanNoticeQueryRequest; import com.daqing.financial.guarantee.model.request.LoanNoticeQueryRequest;
import com.daqing.financial.guarantee.model.request.LoanNoticeUpdateRequest; import com.daqing.financial.guarantee.model.request.LoanNoticeUpdateRequest;
import com.daqing.financial.guarantee.model.response.LoanNoticeListResponse;
import com.daqing.framework.domain.guarantee.DgLoanNotice; import com.daqing.framework.domain.guarantee.DgLoanNotice;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
@ -25,4 +26,6 @@ public interface IDgLoanNoticeService extends IService<DgLoanNotice> {
boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest); boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest);
void batchExport(HttpServletResponse response, String ids) throws IOException; void batchExport(HttpServletResponse response, String ids) throws IOException;
LoanNoticeListResponse selectLoanNotice(String businessId, String roleId);
} }

@ -57,8 +57,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
@Override @Override
public GuaranteeLetterListResponse selectGuaranteeLetter(String businessId) { public GuaranteeLetterListResponse selectGuaranteeLetter(String businessId,String roleId) {
GuaranteeLetterListResponse response = baseMapper.selectGuaranteeLetter(businessId); GuaranteeLetterListResponse response = baseMapper.selectGuaranteeLetter(businessId,roleId);
return response; return response;
} }
@ -487,19 +487,21 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion,8); AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion,8);
//更新成功后,更新b角数据及更新法规部经理数据 //更新成功后,更新b角数据及更新法规部经理数据
if (i > 0){ if (i > 0){
//更新b用户的审核状态为驳回 //更新b用户的审核状态为驳回,操作状态为已处理
QueryWrapper<DgGuaranteeLetterAssignUser> tempB = new QueryWrapper<>(); QueryWrapper<DgGuaranteeLetterAssignUser> tempB = new QueryWrapper<>();
tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); tempB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = baseMapper.selectOne(tempB); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = baseMapper.selectOne(tempB);
dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REJECT); dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REJECT);
dgGuaranteeLetterAssignUserB.setOperatingStatus(StatusCode.CZ_PROCESSED);
baseMapper.updateById(dgGuaranteeLetterAssignUserB); baseMapper.updateById(dgGuaranteeLetterAssignUserB);
//更新法规部经理的审核状态为驳回,操作状态为待处理 //更新法规部经理的审核状态为驳回,操作状态为待处理,清空审批意见
QueryWrapper<DgGuaranteeLetterAssignUser> tempFG = new QueryWrapper<>(); QueryWrapper<DgGuaranteeLetterAssignUser> tempFG = new QueryWrapper<>();
tempFG.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID); tempFG.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFG = baseMapper.selectOne(tempFG); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFG = baseMapper.selectOne(tempFG);
dgGuaranteeLetterAssignUserFG.setStatus(StatusCode.SP_REJECT); dgGuaranteeLetterAssignUserFG.setStatus(StatusCode.SP_REJECT);
dgGuaranteeLetterAssignUserFG.setOperatingStatus(StatusCode.CZ_ON_HAND); dgGuaranteeLetterAssignUserFG.setOperatingStatus(StatusCode.CZ_ON_HAND);
dgGuaranteeLetterAssignUserFG.setAuditOpinion("");
int update = baseMapper.updateById(dgGuaranteeLetterAssignUserFG); int update = baseMapper.updateById(dgGuaranteeLetterAssignUserFG);
//添加成功,返回操作结果 //添加成功,返回操作结果
log.info(update > 0 ? "a角驳回更新成功" : "a角驳回更新失败"); log.info(update > 0 ? "a角驳回更新成功" : "a角驳回更新失败");
@ -617,11 +619,12 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion,8); AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion,8);
//更新成功后,更新a角数据及更新法规部经理数据 //更新成功后,更新a角数据及更新法规部经理数据
if (i > 0){ if (i > 0){
//更新a用户的审核状态为驳回 //更新a用户的审核状态为驳回,操作状态为已处理
QueryWrapper<DgGuaranteeLetterAssignUser> tempA = new QueryWrapper<>(); QueryWrapper<DgGuaranteeLetterAssignUser> tempA = new QueryWrapper<>();
tempA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); tempA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserA = baseMapper.selectOne(tempA); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserA = baseMapper.selectOne(tempA);
dgGuaranteeLetterAssignUserA.setStatus(StatusCode.SP_REJECT); dgGuaranteeLetterAssignUserA.setStatus(StatusCode.SP_REJECT);
dgGuaranteeLetterAssignUserA.setStatus(StatusCode.CZ_PROCESSED);
baseMapper.updateById(dgGuaranteeLetterAssignUserA); baseMapper.updateById(dgGuaranteeLetterAssignUserA);
//更新法规部经理的审核状态为驳回,操作状态为待处理 //更新法规部经理的审核状态为驳回,操作状态为待处理
@ -629,6 +632,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
tempFG.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID); tempFG.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFG = baseMapper.selectOne(tempFG); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFG = baseMapper.selectOne(tempFG);
dgGuaranteeLetterAssignUserFG.setStatus(StatusCode.SP_REJECT); dgGuaranteeLetterAssignUserFG.setStatus(StatusCode.SP_REJECT);
dgGuaranteeLetterAssignUserFG.setAuditOpinion("");
dgGuaranteeLetterAssignUserFG.setOperatingStatus(StatusCode.CZ_ON_HAND); dgGuaranteeLetterAssignUserFG.setOperatingStatus(StatusCode.CZ_ON_HAND);
int update = baseMapper.updateById(dgGuaranteeLetterAssignUserFG); int update = baseMapper.updateById(dgGuaranteeLetterAssignUserFG);
//添加成功,返回操作结果 //添加成功,返回操作结果

@ -160,4 +160,9 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL
log.info("《《《《《数据更新失败,请确保数据完整》》》》》"); log.info("《《《《《数据更新失败,请确保数据完整》》》》》");
return false; return false;
} }
@Override
public LoanNoticeListResponse selectLoanNotice(String businessId, String roleId) {
return baseMapper.selectLoanNotice(businessId,roleId);
}
} }

@ -10,6 +10,7 @@ import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper
import com.daqing.financial.guarantee.model.request.PaymentConfirmationQueryRequest; import com.daqing.financial.guarantee.model.request.PaymentConfirmationQueryRequest;
import com.daqing.financial.guarantee.model.request.PaymentConfirmationUpdateRequest; import com.daqing.financial.guarantee.model.request.PaymentConfirmationUpdateRequest;
import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse;
import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse;
import com.daqing.financial.guarantee.model.response.LoanNoticeListResponse; import com.daqing.financial.guarantee.model.response.LoanNoticeListResponse;
import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse; import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse;
import com.daqing.financial.guarantee.service.IDgPaymentConfirmationConsiderService; import com.daqing.financial.guarantee.service.IDgPaymentConfirmationConsiderService;
@ -82,6 +83,13 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaym
List<String> roleIdList = Arrays.asList(ids); List<String> roleIdList = Arrays.asList(ids);
//分页条件查询 //分页条件查询
paymentConfirmationVO = baseMapper.pageByCondition(new Page(page,size),roleIdList,userId,status,customerNumberOrName); paymentConfirmationVO = baseMapper.pageByCondition(new Page(page,size),roleIdList,userId,status,customerNumberOrName);
List<PaymentConfirmationListResponse> records = paymentConfirmationVO.getRecords();
records.forEach(paymentConfirmationListResponse -> {
//角色为法规部经理则设置值
if (paymentConfirmationListResponse.getRoleId().equals(PromptSuccess.FG_JL_ID)){
paymentConfirmationListResponse.setIsFgJl(1);
}
});
} }
return new PageUtils(paymentConfirmationVO); return new PageUtils(paymentConfirmationVO);
} }

@ -83,7 +83,7 @@
left join crms_customer cc on ccc.customer_id = cc.id 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_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 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}
</select> </select>
</mapper> </mapper>

@ -28,10 +28,11 @@
<result column="operating_status" property="operatingStatus" /> <result column="operating_status" property="operatingStatus" />
<result column="business_status" property="businessStatus" /> <result column="business_status" property="businessStatus" />
<result column="business_id" property="businessId" /> <result column="business_id" property="businessId" />
<result column="role_id" property="roleId" />
</resultMap> </resultMap>
<select id="pageByCondition" resultMap="LoanNoticeListResponseMap"> <select id="pageByCondition" resultMap="LoanNoticeListResponseMap">
select ln.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_tern,lcc.loan_money, select ln.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_tern,lcc.loan_money,ln.role_id,
aai.create_time,ln.status,aai.bank,ln.audit_opinion,ln.operating_status,bps.business_status,ln.business_id aai.create_time,ln.status,aai.bank,ln.audit_opinion,ln.operating_status,bps.business_status,ln.business_id
from dg_loan_notice ln from dg_loan_notice ln
left join dg_apply_amount_info aai on ln.business_id = aai.id left join dg_apply_amount_info aai on ln.business_id = aai.id
@ -72,4 +73,15 @@
</select> </select>
<select id="selectLoanNotice" resultMap="LoanNoticeListResponseMap">
select cc.name,lcc.loan_money,aai.bank
from dg_loan_notice ln
left join dg_apply_amount_info aai on ln.business_id = aai.id
left join crms_company_customer ccc on ln.company_id = ccc.id
left join crms_customer cc on ccc.customer_id = cc.id
left join dg_loan_committee_consider lcc on ln.business_id = lcc.business_id
left join dg_business_process_status bps on ln.business_id = bps.business_id
where ln.business_id = #{businessId} and ln.role_id = #{roleId}
</select>
</mapper> </mapper>

@ -32,11 +32,12 @@
<result column="business_status" property="businessStatus" /> <result column="business_status" property="businessStatus" />
<result column="business_id" property="businessId" /> <result column="business_id" property="businessId" />
<result column="img_file" property="imgFile" /> <result column="img_file" property="imgFile" />
<result column="role_id" property="roleId" />
</resultMap> </resultMap>
<select id="pageByCondition" resultMap="PaymentConfirmationListResponseMap"> <select id="pageByCondition" resultMap="PaymentConfirmationListResponseMap">
select pcc.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_money,lcc.loan_tern,aai.create_time, select pcc.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_money,lcc.loan_tern,aai.create_time,pcc.status,
pcc.status,aai.bank,lcc.passing_time,lcc.file,pcc.audit_opinion,pcc.operating_status,bps.business_status,pcc.business_id,pcc.img_file aai.bank,lcc.passing_time,lcc.file,pcc.audit_opinion,pcc.operating_status,bps.business_status,pcc.business_id,pcc.img_file,pcc.role_id
from dg_payment_confirmation_consider pcc from dg_payment_confirmation_consider pcc
left join dg_apply_amount_info aai on pcc.business_id = aai.id left join dg_apply_amount_info aai on pcc.business_id = aai.id
left join crms_company_customer ccc on pcc.company_id = ccc.id left join crms_company_customer ccc on pcc.company_id = ccc.id

Loading…
Cancel
Save