完成回款确认及放款通知(无添加业务流程操作)

master
chen 4 years ago
parent fad4bfdb7c
commit 58b231cda0
  1. 1
      .idea/sqldialects.xml
  2. 50
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java
  3. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java
  4. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java
  5. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/LoanNoticeListRequest.java
  6. 32
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/LoanNoticeQueryRequest.java
  7. 26
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/LoanNoticeUpdateRequest.java
  8. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/PaymentConfirmationUpdateRequest.java
  9. 71
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/LoanNoticeListResponse.java
  10. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgLoanNoticeService.java
  11. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
  12. 86
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java
  13. 114
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java
  14. 4
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
  15. 37
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanNoticeMapper.xml
  16. 6
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml
  17. 31
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanNotice.java
  18. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgPaymentConfirmationConsider.java

@ -2,6 +2,7 @@
<project version="4">
<component name="SqlDialectMappings">
<file url="file://$PROJECT_DIR$/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml" dialect="GenericSQL" />
<file url="file://$PROJECT_DIR$/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanNoticeMapper.xml" dialect="GenericSQL" />
<file url="file://$PROJECT_DIR$/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml" dialect="GenericSQL" />
</component>
</project>

@ -1,14 +1,28 @@
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 javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
* <p>
* 放款通知 前端控制器
@ -23,6 +37,40 @@ import org.springframework.web.bind.annotation.RestController;
public class DgLoanNoticeController {
@Autowired
private IDgLoanNoticeService iDgLoanNoticeService;
private IDgLoanNoticeService loanNoticeService;
@ApiOperation(value = "放款通知记录列表")
@PostMapping("/loanNoticeList")
public ResponseResult loanNoticeList(
@ApiParam(name = "loanNoticeQueryRequest", value = "放款通知列表查询条件", required = true)
@RequestBody LoanNoticeQueryRequest loanNoticeQueryRequest){
PageUtils data = loanNoticeService.queryPage(loanNoticeQueryRequest);
return new ResponseResult<PageUtils>().SUCCESS(data);
}
@ApiOperation(value = "导出放款通知列表数据")
@PostMapping("/loanNoticeListExport")
public void loanNoticeListExport(
@ApiParam(name = "loanNoticeListRequest", value = "放款通知列表数据", required = true)
@RequestBody LoanNoticeListRequest loanNoticeListRequest, HttpServletResponse response){
//获取放款通知列表数据
List<LoanNoticeListResponse> loanNoticeListResponseList = loanNoticeListRequest.getLoanNoticeListResponseList();
try {
//导出excel文件
EasyExcelUtil.download(response, LoanNoticeListResponse.class, loanNoticeListResponseList,"放款通知列表","第一页");
} catch (IOException e) {
e.printStackTrace();
}
}
@ApiOperation(value = "更新放款通知状态")
@PostMapping("/updateLoanNotice")
public ResponseResult updateLoanNotice(
@ApiParam(name = "loanNoticeUpdateRequest", value = "更新放款通知请求", required = true)
@RequestBody LoanNoticeUpdateRequest loanNoticeUpdateRequest) {
boolean result = loanNoticeService.updateLoanNotice(loanNoticeUpdateRequest);
return result ? ResponseResult.SUCCESS("更新成功!"):ResponseResult.FAIL(40005,"更新失败!");
}
}

@ -42,7 +42,7 @@ public class DgPaymentConfirmationConsiderController {
@ApiOperation(value = "回款确认记录列表")
@PostMapping("/paymentConfirmationList")
public ResponseResult paymentConfirmationList(
@ApiParam(name = "paymentConfirmationRequest", value = "回款确认列表查询条件", required = true)
@ApiParam(name = "paymentConfirmationQueryRequest", value = "回款确认列表查询条件", required = true)
@RequestBody PaymentConfirmationQueryRequest paymentConfirmationQueryRequest){
PageUtils data = paymentConfirmationConsiderService.queryPage(paymentConfirmationQueryRequest);
return new ResponseResult<PageUtils>().SUCCESS(data);

@ -1,6 +1,9 @@
package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.model.response.LoanNoticeListResponse;
import com.daqing.framework.domain.guarantee.DgLoanNotice;
import org.apache.ibatis.annotations.Mapper;
@ -15,4 +18,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DgLoanNoticeMapper extends BaseMapper<DgLoanNotice> {
IPage<LoanNoticeListResponse> pageByCondition(Page page, Integer roleId, Integer status, String customerNumberOrName);
}

@ -0,0 +1,18 @@
package com.daqing.financial.guarantee.model.request;
import com.daqing.financial.guarantee.model.response.LoanNoticeListResponse;
import lombok.Data;
import java.util.List;
/**
* @Author chen
* @DATE 2020/11/24 11:58
* @Version 1.0
*/
@Data
public class LoanNoticeListRequest {
private List<LoanNoticeListResponse> loanNoticeListResponseList;
}

@ -0,0 +1,32 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @Author chen
* @DATE 2020/11/24 10:58
* @Version 1.0
* 放款通知列表查询条件
*/
@Data
public class LoanNoticeQueryRequest {
@ApiModelProperty(value = "当前页码,默认为第一页")
private Integer page = 1;
@ApiModelProperty(value = "每页记录数,默认显示10条")
private Integer size = 10;
@ApiModelProperty(value = "流程状态:1->审核中、2->拒绝、3->已审核")
private Integer status;
@ApiModelProperty(value = "业务编号/客户名称")
private String CustomerNumberOrName;
@NotNull
@ApiModelProperty(value = "角色ID")
private Integer roleId;
}

@ -0,0 +1,26 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author chen
* @DATE 2020/11/24 12:00
* @Version 1.0
*/
@Data
public class LoanNoticeUpdateRequest {
@ApiModelProperty(value = "当前用户")
private Integer currentUser;
@ApiModelProperty(value = "业务id")
private Integer businessId;
@ApiModelProperty(value = "状态")
private Integer status;
@ApiModelProperty(value = "审核意见")
private String auditOpinion;
}

@ -14,8 +14,8 @@ public class PaymentConfirmationUpdateRequest {
@ApiModelProperty(value = "当前用户")
private Integer currentUser;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "业务id")
private Integer businessId;
@ApiModelProperty(value = "状态")
private Integer status;

@ -0,0 +1,71 @@
package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelProperty;
import com.daqing.framework.utils.excel.ApprovalStatusConverter;
import com.daqing.framework.utils.excel.BusinessStatusConverter;
import com.daqing.framework.utils.excel.OperatingStatusConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author chen
* @DATE 2020/11/24 11:01
* @Version 1.0
* 放款通知列表返回数据
*/
@Data
public class LoanNoticeListResponse {
@ApiModelProperty("唯一标识")
private Integer id;
@ApiModelProperty(value = "审核意见")
private String auditOpinion;
@ApiModelProperty("银行名称")
private String bank;
@ApiModelProperty("业务编号")
@ExcelProperty(value = "业务编号",index = 0)
private String businessCode;
@ApiModelProperty("客户名称")
@ExcelProperty(value = "客户名称",index = 1)
private String name;
@ApiModelProperty("联系电话")
@ExcelProperty(value = "联系电话",index = 2)
private String phone;
@ApiModelProperty("业务类别")
@ExcelProperty(value = "业务类别",index = 3)
private String businessType;
@ApiModelProperty("金额")
@ExcelProperty(value = "金额",index = 4)
private Double applyAmount;
@ApiModelProperty("期限")
@ExcelProperty(value = "期数",index = 5)
private String applyTime;
@ApiModelProperty("申请日期")
@ExcelProperty(value = "申请日期",index = 6)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("审核状态")
@ExcelProperty(value = "审核状态",index = 7,converter = ApprovalStatusConverter.class)
private Integer status;
@ApiModelProperty("业务状态")
@ExcelProperty(value = "业务状态",index = 8,converter = BusinessStatusConverter.class)
private Integer businessStatus;
@ApiModelProperty("操作状态")
@ExcelProperty(value = "操作状态",index = 9,converter = OperatingStatusConverter.class)
private Integer operatingStatus;
}

@ -1,7 +1,10 @@
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.framework.domain.guarantee.DgLoanNotice;
import com.daqing.framework.utils.PageUtils;
/**
* <p>
@ -13,4 +16,7 @@ import com.daqing.framework.domain.guarantee.DgLoanNotice;
*/
public interface IDgLoanNoticeService extends IService<DgLoanNotice> {
PageUtils queryPage(LoanNoticeQueryRequest loanNoticeQueryRequest);
boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest);
}

@ -253,8 +253,9 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
DgPaymentConfirmationConsider paymentConfirmationConsider = paymentConfirmationConsiderMapper.selectOne(paymentConfirmationConsiderQueryWrapper);
paymentConfirmationConsider.setStatus(StatusCode.SP_IN_REVIEW);
paymentConfirmationConsider.setOperatingStatus(StatusCode.CZ_ON_HAND);
//清空上次的审批意见
//清空上次的审批意见及银行回单
paymentConfirmationConsider.setAuditOpinion("");
paymentConfirmationConsider.setImgFile("");
int update = paymentConfirmationConsiderMapper.updateById(paymentConfirmationConsider);
//更新成功,返回操作结果
log.info(update > 0 ? "资产部经理成功添加回款数据" : "资产部经理添加回款数据失败");

@ -1,9 +1,24 @@
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.DgLoanNoticeMapper;
import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper;
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.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.DgLoanNotice;
import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.utils.PageUtils;
import jdk.nashorn.internal.ir.IfNode;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
@ -14,7 +29,78 @@ import org.springframework.stereotype.Service;
* @author Qyq
* @since 2020-11-05
*/
@Slf4j
@Service
public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgLoanNotice> implements IDgLoanNoticeService {
@Autowired
private DgPaymentConfirmationConsiderMapper paymentConfirmationConsiderMapper;
@Override
public PageUtils queryPage(LoanNoticeQueryRequest loanNoticeQueryRequest) {
//取出条件
Integer page = loanNoticeQueryRequest.getPage();
Integer size = loanNoticeQueryRequest.getSize();
Integer status = loanNoticeQueryRequest.getStatus();
//a根据角色id查询
Integer roleId = loanNoticeQueryRequest.getRoleId();
String customerNumberOrName = loanNoticeQueryRequest.getCustomerNumberOrName();
//分页条件查询
IPage<LoanNoticeListResponse> loanNoticeVO = baseMapper.pageByCondition(new Page(page,size),roleId,status,customerNumberOrName);
return new PageUtils(loanNoticeVO);
}
@Override
public boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest) {
// TODO 所有操作待添加业务流程数据
//取出条件
Integer businessId = loanNoticeUpdateRequest.getBusinessId();
Integer currentUser = loanNoticeUpdateRequest.getCurrentUser();
String auditOpinion = loanNoticeUpdateRequest.getAuditOpinion();
//状态为2表示通过,为4表示驳回
Integer status = loanNoticeUpdateRequest.getStatus();
//提交操作,更新数据
if (StatusCode.SP_REVIEWED.equals(status)){
QueryWrapper<DgLoanNotice> loanNoticeQueryWrapper = new QueryWrapper<>();
loanNoticeQueryWrapper.eq("business_id",businessId).eq("role_id", PromptSuccess.FG_JL_ID);
DgLoanNotice loanNotice = baseMapper.selectOne(loanNoticeQueryWrapper);
loanNotice.setAuditOpinion(auditOpinion);
loanNotice.setConsiderId(currentUser);
loanNotice.setStatus(StatusCode.SP_REVIEWED);
loanNotice.setOperatingStatus(StatusCode.CZ_PROCESSED);
int update = baseMapper.updateById(loanNotice);
//TODO 更新成功更新业务流程已完成
if (update > 0){
return update > 0;
}
}
//驳回操作,更新数据和资产部经理数据及返回上一流程
if (StatusCode.SP_REJECT.equals(status)){
QueryWrapper<DgLoanNotice> loanNoticeQueryWrapper = new QueryWrapper<>();
loanNoticeQueryWrapper.eq("business_id",businessId).eq("role_id", PromptSuccess.FG_JL_ID);
DgLoanNotice loanNotice = baseMapper.selectOne(loanNoticeQueryWrapper);
loanNotice.setAuditOpinion(auditOpinion);
loanNotice.setConsiderId(currentUser);
loanNotice.setStatus(StatusCode.SP_REVIEWED);
loanNotice.setOperatingStatus(StatusCode.CZ_PROCESSED);
int update = baseMapper.updateById(loanNotice);
//更新成功,更新回款确认的财务部经理数据
if (update > 0){
QueryWrapper<DgPaymentConfirmationConsider> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("business_id",businessId).eq("role_id", PromptSuccess.CWB_ID);
DgPaymentConfirmationConsider paymentConfirmationConsider = paymentConfirmationConsiderMapper.selectOne(queryWrapper);
paymentConfirmationConsider.setStatus(StatusCode.SP_REJECT);
paymentConfirmationConsider.setOperatingStatus(StatusCode.CZ_ON_HAND);
int updateById = paymentConfirmationConsiderMapper.updateById(paymentConfirmationConsider);
//更新成功,返回操作结果
log.info(updateById > 0 ? "驳回更新财务部经理成功" : "驳回更新财务部经理失败");
return updateById > 0;
}
}
//一个判断都不走,直接返回false
log.info("《《《《《数据更新失败,请确保数据完整》》》》》");
return false;
}
}

@ -1,15 +1,24 @@
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.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.PaymentConfirmationListResponse;
import com.daqing.financial.guarantee.service.IDgPaymentConfirmationConsiderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
import com.daqing.framework.domain.guarantee.DgLoanNotice;
import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.utils.PageUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
@ -20,9 +29,16 @@ import org.springframework.stereotype.Service;
* @author Qyq
* @since 2020-11-05
*/
@Slf4j
@Service
public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaymentConfirmationConsiderMapper, DgPaymentConfirmationConsider> implements IDgPaymentConfirmationConsiderService {
@Autowired
private DgLoanNoticeMapper dgLoanNoticeMapper;
@Autowired
private DgGuaranteeLetterAssignUserMapper guaranteeLetterAssignUserMapper;
@Override
public PageUtils queryPage(PaymentConfirmationQueryRequest paymentConfirmationQueryRequest) {
//取出条件
@ -40,24 +56,102 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaym
@Override
public boolean updatePaymentConfirmation(PaymentConfirmationUpdateRequest paymentConfirmationUpdateRequest) {
// TODO 所有操作待添加业务流程数据
//取出条件
Integer id = paymentConfirmationUpdateRequest.getId();
Integer businessId = paymentConfirmationUpdateRequest.getBusinessId();
Integer currentUser = paymentConfirmationUpdateRequest.getCurrentUser();
String auditOpinion = paymentConfirmationUpdateRequest.getAuditOpinion();
String imgFile = paymentConfirmationUpdateRequest.getImgFile();
//状态为2表示通过,为4表示驳回
Integer status = paymentConfirmationUpdateRequest.getStatus();
//更新对象
DgPaymentConfirmationConsider paymentConfirmationConsider = new DgPaymentConfirmationConsider();
paymentConfirmationConsider.setId(id);
//回款确认无驳回操作
//更新之前,获取此数据的审批状态,如果审批状态为驳回,则更新法规部经理数据,如果审批状态为审批中,则添加放款通知数据
QueryWrapper<DgPaymentConfirmationConsider> queryWrapperTemp = new QueryWrapper<>();
queryWrapperTemp.eq("business_id",businessId).eq("role_id", PromptSuccess.CWB_ID);
DgPaymentConfirmationConsider paymentConfirmationConsiderTemp = baseMapper.selectOne(queryWrapperTemp);
Integer approveStatus = paymentConfirmationConsiderTemp.getStatus();
//之前状态为审批中,同意则添加放款通知数据给法规部经理
if (StatusCode.SP_REVIEWED.equals(status) && StatusCode.SP_IN_REVIEW.equals(approveStatus)){
QueryWrapper<DgPaymentConfirmationConsider> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("business_id",businessId).eq("role_id", PromptSuccess.CWB_ID);
DgPaymentConfirmationConsider paymentConfirmationConsider = baseMapper.selectOne(queryWrapper);
paymentConfirmationConsider.setAuditOpinion(auditOpinion);
paymentConfirmationConsider.setConsiderId(currentUser);
paymentConfirmationConsider.setStatus(StatusCode.SP_REVIEWED);
paymentConfirmationConsider.setOperatingStatus(StatusCode.CZ_PROCESSED);
paymentConfirmationConsider.setImgFile(imgFile);
int update = baseMapper.updateById(paymentConfirmationConsider);
Integer companyId = paymentConfirmationConsider.getCompanyId();
//更新成功,添加法规部经理数据
if (update > 0){
DgLoanNotice loanNotice = new DgLoanNotice();
loanNotice.setCompanyId(companyId);
loanNotice.setBusinessId(businessId);
loanNotice.setRoleId(PromptSuccess.FG_JL_ID);
int insert = dgLoanNoticeMapper.insert(loanNotice);
//更新成功,返回操作结果
log.info(insert > 0 ? "财务部经理确认成功" : "财务部经理确认失败");
return insert > 0;
}
}
//之前状态为驳回,同意则更新放款通知数据给法规部经理
if (StatusCode.SP_REVIEWED.equals(status) && StatusCode.SP_REJECT.equals(approveStatus)){
QueryWrapper<DgPaymentConfirmationConsider> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("business_id",businessId).eq("role_id", PromptSuccess.CWB_ID);
DgPaymentConfirmationConsider paymentConfirmationConsider = baseMapper.selectOne(queryWrapper);
paymentConfirmationConsider.setAuditOpinion(auditOpinion);
paymentConfirmationConsider.setConsiderId(currentUser);
paymentConfirmationConsider.setStatus(StatusCode.SP_REVIEWED);
paymentConfirmationConsider.setOperatingStatus(StatusCode.CZ_PROCESSED);
paymentConfirmationConsider.setImgFile(imgFile);
paymentConfirmationConsider.setStatus(status);
paymentConfirmationConsider.setOperatingStatus(2);
//确认通过向放款通知添加记录
if (status==2){
int update = baseMapper.updateById(paymentConfirmationConsider);
//更新成功,更新法规部经理数据
if (update > 0){
QueryWrapper<DgLoanNotice> loanNoticeQueryWrapper = new QueryWrapper<>();
loanNoticeQueryWrapper.eq("business_id",businessId).eq("role_id", PromptSuccess.FG_JL_ID);
DgLoanNotice loanNotice = dgLoanNoticeMapper.selectOne(loanNoticeQueryWrapper);
//清空审批意见
loanNotice.setAuditOpinion("");
loanNotice.setStatus(StatusCode.SP_IN_REVIEW);
loanNotice.setOperatingStatus(StatusCode.CZ_ON_HAND);
int updateById = dgLoanNoticeMapper.updateById(loanNotice);
//更新成功,返回操作结果
log.info(updateById > 0 ? "驳回后再次财务部经理确认成功" : "驳回后再次财务部经理确认失败");
return updateById > 0;
}
}
int i = baseMapper.updateById(paymentConfirmationConsider);
return i>0;
//驳回操作,更新数据和资产部经理数据及返回上一流程
if (StatusCode.SP_REJECT.equals(status)){
QueryWrapper<DgPaymentConfirmationConsider> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("business_id",businessId).eq("role_id", PromptSuccess.CWB_ID);
DgPaymentConfirmationConsider paymentConfirmationConsider = baseMapper.selectOne(queryWrapper);
paymentConfirmationConsider.setAuditOpinion(auditOpinion);
paymentConfirmationConsider.setConsiderId(currentUser);
paymentConfirmationConsider.setStatus(StatusCode.SP_REJECT);
paymentConfirmationConsider.setOperatingStatus(StatusCode.CZ_PROCESSED);
paymentConfirmationConsider.setImgFile(imgFile);
int update = baseMapper.updateById(paymentConfirmationConsider);
//更新成功,更新资产部经理数据
if (update > 0){
QueryWrapper<DgGuaranteeLetterAssignUser> guaranteeLetterAssignUserQueryWrapper = new QueryWrapper<>();
guaranteeLetterAssignUserQueryWrapper.eq("business_id",businessId).eq("role_id", PromptSuccess.ZC_JL_ID);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = guaranteeLetterAssignUserMapper.selectOne(guaranteeLetterAssignUserQueryWrapper);
dgGuaranteeLetterAssignUser.setStatus(StatusCode.SP_REJECT);
dgGuaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);
int updateById = guaranteeLetterAssignUserMapper.updateById(dgGuaranteeLetterAssignUser);
//更新成功,返回操作结果
log.info(updateById > 0 ? "驳回更新资产部经理成功" : "驳回更新资产部经理失败");
return updateById > 0;
}
}
//一个判断都不走,直接返回false
log.info("《《《《《数据更新失败,请确保数据完整》》》》》");
return false;
}
}

@ -32,8 +32,8 @@
</resultMap>
<select id="pageByCondition" resultMap="GuaranteeLetterListResponseMap">
select lau.id,aai.business_code,cc.name,cc.phone,aai.business_type,aai.apply_amount,aai.apply_time,aai.create_time,
lau.status,aai.bank,lcc.update_time,lcc.file,lau.audit_opinion,lau.operating_status,bps.business_status
select lau.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_money as apply_amount,lcc.loan_tern as apply_time,
aai.create_time,lau.status,aai.bank,lcc.update_time,lcc.file,lau.audit_opinion,lau.operating_status,bps.business_status
from dg_guarantee_letter_assign_user lau
left join dg_apply_amount_info aai on lau.business_id = aai.id
left join crms_company_customer ccc on lau.company_id = ccc.id

@ -7,10 +7,45 @@
<id column="id" property="id" />
<result column="company_id" property="companyId" />
<result column="consider_id" property="considerId" />
<result column="remark" property="remark" />
<result column="status" property="status" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap>
<resultMap id="LoanNoticeListResponseMap" type="com.daqing.financial.guarantee.model.response.LoanNoticeListResponse">
<id column="id" property="id" />
<result column="business_code" property="businessCode" />
<result column="bank" property="bank" />
<result column="name" property="name" />
<result column="phone" property="phone" />
<result column="status" property="status" />
<result column="create_time" property="createTime" />
<result column="apply_time" property="applyTime" />
<result column="apply_amount" property="applyAmount" />
<result column="business_type" property="businessType" />
<result column="audit_opinion" property="auditOpinion" />
<result column="operating_status" property="operatingStatus" />
<result column="business_status" property="businessStatus" />
</resultMap>
<select id="pageByCondition" resultMap="LoanNoticeListResponseMap">
select ln.id,aai.business_code,cc.name,cc.phone,aai.business_type,aai.apply_amount,aai.apply_time,
aai.create_time,ln.status,aai.bank,ln.audit_opinion,ln.operating_status,bps.business_status
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_business_process_status bps on ln.business_id = bps.business_id
<where>
AND ln.role_id = #{roleId}
<if test="customerNumberOrName != null and customerNumberOrName != ''">
AND aai.business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{customerNumberOrName},'%')
</if>
<if test="status != null and status != ''">
AND ln.status = #{status}
</if>
</where>
</select>
</mapper>

@ -29,16 +29,18 @@
<result column="business_type" property="businessType" />
<result column="audit_opinion" property="auditOpinion" />
<result column="operating_status" property="operatingStatus" />
<result column="business_status" property="businessStatus" />
</resultMap>
<select id="pageByCondition" resultMap="PaymentConfirmationListResponseMap">
select pcc.id,aai.business_code,cc.name,cc.phone,aai.business_type,aai.apply_amount,aai.apply_time,
aai.create_time,pcc.status,aai.bank,lcc.update_time,lcc.file,pcc.audit_opinion,pcc.operating_status
select pcc.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_money as apply_amount,lcc.loan_tern as apply_time,
aai.create_time,pcc.status,aai.bank,lcc.update_time,lcc.file,pcc.audit_opinion,pcc.operating_status,bps.business_status
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
left join crms_customer cc on ccc.customer_id = cc.id
left join dg_loan_committee_consider lcc on pcc.business_id = lcc.business_id
left join dg_business_process_status bps on pcc.business_id = bps.business_id
<where>
AND pcc.role_id = #{roleId}
<if test="customerNumberOrName != null and customerNumberOrName != ''">

@ -21,32 +21,31 @@ public class DgLoanNotice implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ApiModelProperty(value = "主键id -》(自动生成)")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 企业id
*/
@ApiModelProperty(value = "业务id")
private Integer businessId;
@ApiModelProperty(value = "企业id")
private Integer companyId;
/**
* 放款者id
*/
@ApiModelProperty(value = "角色id")
private Integer roleId;
@ApiModelProperty(value = "操作回款确认者id")
private Integer considerId;
/**
* 审核意见
*/
private String remark;
@ApiModelProperty(value = "审核意见")
private String auditOpinion;
/**
* 审核状态
*/
@ApiModelProperty(value = "审核状态:(1审核中 、2已审核、4驳回)")
private Integer status;
@ApiModelProperty(value = "操作状态:(1待处理 、2已处理。默认添加为待处理)")
private Integer operatingStatus;
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createTime;

@ -31,13 +31,10 @@ public class DgPaymentConfirmationConsider implements Serializable {
@ApiModelProperty(value = "企业id")
private Integer companyId;
@ApiModelProperty(value = "操作用户id")
private Integer userId;
@ApiModelProperty(value = "角色id")
private Integer roleId;
@ApiModelProperty(value = "回款确认者id")
@ApiModelProperty(value = "操作回款确认者id")
private Integer considerId;
@ApiModelProperty(value = "审核意见")

Loading…
Cancel
Save