上传代码

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
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

@ -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();

@ -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();

@ -25,5 +25,5 @@ public interface DgGuaranteeLetterAssignUserMapper extends BaseMapper<DgGuarante
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);
List<LoanNoticeListResponse> selectBatchData(List<String> idList);
LoanNoticeListResponse selectLoanNotice(String businessId, String roleId);
}

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

@ -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;

@ -29,5 +29,5 @@ public interface IDgGuaranteeLetterAssignUserService extends IService<DgGuarante
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.daqing.financial.guarantee.model.request.LoanNoticeQueryRequest;
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.utils.PageUtils;
@ -25,4 +26,6 @@ public interface IDgLoanNoticeService extends IService<DgLoanNotice> {
boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest);
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
public GuaranteeLetterListResponse selectGuaranteeLetter(String businessId) {
GuaranteeLetterListResponse response = baseMapper.selectGuaranteeLetter(businessId);
public GuaranteeLetterListResponse selectGuaranteeLetter(String businessId,String roleId) {
GuaranteeLetterListResponse response = baseMapper.selectGuaranteeLetter(businessId,roleId);
return response;
}
@ -487,19 +487,21 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion,8);
//更新成功后,更新b角数据及更新法规部经理数据
if (i > 0){
//更新b用户的审核状态为驳回
//更新b用户的审核状态为驳回,操作状态为已处理
QueryWrapper<DgGuaranteeLetterAssignUser> 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<DgGuaranteeLetterAssignUser> 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<DgGuaran
AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion,8);
//更新成功后,更新a角数据及更新法规部经理数据
if (i > 0){
//更新a用户的审核状态为驳回
//更新a用户的审核状态为驳回,操作状态为已处理
QueryWrapper<DgGuaranteeLetterAssignUser> 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<DgGuaran
tempFG.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFG = baseMapper.selectOne(tempFG);
dgGuaranteeLetterAssignUserFG.setStatus(StatusCode.SP_REJECT);
dgGuaranteeLetterAssignUserFG.setAuditOpinion("");
dgGuaranteeLetterAssignUserFG.setOperatingStatus(StatusCode.CZ_ON_HAND);
int update = baseMapper.updateById(dgGuaranteeLetterAssignUserFG);
//添加成功,返回操作结果

@ -160,4 +160,9 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL
log.info("《《《《《数据更新失败,请确保数据完整》》》》》");
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.PaymentConfirmationUpdateRequest;
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.PaymentConfirmationListResponse;
import com.daqing.financial.guarantee.service.IDgPaymentConfirmationConsiderService;
@ -82,6 +83,13 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaym
List<String> roleIdList = Arrays.asList(ids);
//分页条件查询
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);
}

@ -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}
</select>
</mapper>

@ -28,10 +28,11 @@
<result column="operating_status" property="operatingStatus" />
<result column="business_status" property="businessStatus" />
<result column="business_id" property="businessId" />
<result column="role_id" property="roleId" />
</resultMap>
<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
from dg_loan_notice ln
left join dg_apply_amount_info aai on ln.business_id = aai.id
@ -72,4 +73,15 @@
</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>

@ -32,11 +32,12 @@
<result column="business_status" property="businessStatus" />
<result column="business_id" property="businessId" />
<result column="img_file" property="imgFile" />
<result column="role_id" property="roleId" />
</resultMap>
<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,
pcc.status,aai.bank,lcc.passing_time,lcc.file,pcc.audit_opinion,pcc.operating_status,bps.business_status,pcc.business_id,pcc.img_file
select pcc.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_money,lcc.loan_tern,aai.create_time,pcc.status,
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
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

Loading…
Cancel
Save