116 changed files with 3550 additions and 473 deletions
@ -0,0 +1,165 @@ |
|||
package com.yxt.anrui.crm.api.crmvehicledemand; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/8/29 |
|||
**/ |
|||
@Data |
|||
public class AppCrmSolutions { |
|||
|
|||
@JsonProperty("isShowMore") |
|||
private boolean isShowMore; |
|||
@ApiModelProperty("是否打包:1是0否") |
|||
private String isPack; |
|||
@ApiModelProperty("产品政策名称") |
|||
private String policyName; |
|||
private String policySid; |
|||
|
|||
@ApiModelProperty("主车发票价") |
|||
private String mainVehicleAmount; |
|||
@ApiModelProperty("融资票据") |
|||
private String accessoriesAmount; |
|||
|
|||
@ApiModelProperty("挂车金额") |
|||
private String trailerAmount; |
|||
@ApiModelProperty("购置税") |
|||
private String purchaseTax; |
|||
@ApiModelProperty("保险金额") |
|||
private String premium; |
|||
|
|||
@ApiModelProperty("融资项目总额") |
|||
private String loanTotal; |
|||
|
|||
@ApiModelProperty("是否有融资票据") |
|||
private boolean accessoriesAmountCb; |
|||
@ApiModelProperty("是否有挂车") |
|||
private boolean trailerAmountCb; |
|||
@ApiModelProperty("是否有购置税") |
|||
private boolean purchaseTaxCb; |
|||
@ApiModelProperty("是否有保险") |
|||
private boolean premiumCb; |
|||
|
|||
@ApiModelProperty("首付款比例") |
|||
private String downPayRatio; |
|||
@ApiModelProperty("首付金额") |
|||
@NotBlank(message = "首付金额不能为空") |
|||
private String downPayAmount; |
|||
@ApiModelProperty("贷款金额") |
|||
private String loanAmount; |
|||
@ApiModelProperty("贷款期数") |
|||
@NotBlank(message = "产品期数不能为空") |
|||
private String loanPeriod; |
|||
@ApiModelProperty("贷款保证金比例") |
|||
private String bondRatio; |
|||
@ApiModelProperty("贷款保证金金额") |
|||
@NotBlank(message = "贷款保证金不能为空") |
|||
private String bondAmount; |
|||
@ApiModelProperty("厂家贴息") |
|||
@NotBlank(message = "厂家贴息不能为空") |
|||
private String factoryDiscount; |
|||
@ApiModelProperty("厂家贴息用途") |
|||
private String factoryDiscountUse; |
|||
|
|||
@ApiModelProperty("贴息抵车款") |
|||
@JsonProperty("factoryDiscountUseMoney") |
|||
private String discountCar; |
|||
|
|||
@ApiModelProperty("年利率") |
|||
private String policyYearRatio; |
|||
@ApiModelProperty("月还金额") |
|||
@NotBlank(message = "月还金额不能为空") |
|||
private String loanPayMoney; |
|||
@ApiModelProperty("利息总额") |
|||
private String loanInterest; |
|||
|
|||
@ApiModelProperty("是否勾选其它融") |
|||
private boolean otherPolicyState; |
|||
|
|||
@ApiModelProperty("其它融名称") |
|||
private String otherPolicyName; |
|||
private String otherPolicySid; |
|||
@ApiModelProperty("其它融贷款金额") |
|||
private String otherPolicyAmount; |
|||
@ApiModelProperty("其它融期数") |
|||
private String otherPolicyPeriod; |
|||
@ApiModelProperty("其它融月还") |
|||
private String otherPolicyMonthlyRepay; |
|||
@ApiModelProperty("其它融利息总额") |
|||
private String otherPolicyInterest; |
|||
@ApiModelProperty("其它融年利率") |
|||
private String otherPolicyYearRatio; |
|||
|
|||
@ApiModelProperty("'融资首付") |
|||
private String loanDownPay; |
|||
@ApiModelProperty("实际首付比例") |
|||
private String downPayAmountsRatio; |
|||
@ApiModelProperty("总贷款金额") |
|||
private String loanAmountTotal; |
|||
@ApiModelProperty("期数") |
|||
private String period; |
|||
@ApiModelProperty("月还金额") |
|||
private String monthlyRepay; |
|||
@ApiModelProperty("利息总额") |
|||
private String interest; |
|||
@ApiModelProperty("预计首期还款日") |
|||
private String returnTime; |
|||
|
|||
@ApiModelProperty("融资首付") |
|||
private String downPayAmounts; |
|||
@ApiModelProperty("贷款保证金") |
|||
private String bondAmounts; |
|||
@ApiModelProperty("保险保证金") |
|||
private String depositPremium; |
|||
@ApiModelProperty("落户保证金") |
|||
private String depositSettle; |
|||
@ApiModelProperty("服务费") |
|||
@NotBlank(message = "服务费不能为空") |
|||
private String serviceAmount; |
|||
@ApiModelProperty("代收意外险") |
|||
private String proxyAccidentPremium; |
|||
@ApiModelProperty("上牌费") |
|||
private String registerAmount; |
|||
@ApiModelProperty("运管费") |
|||
private String operationAmount; |
|||
|
|||
@ApiModelProperty("补车价") |
|||
private String vehOtherPrice; |
|||
@ApiModelProperty("其它费用") |
|||
private String otherAmount; |
|||
@ApiModelProperty("其它费用说明") |
|||
private String otherAmountRemark; |
|||
@ApiModelProperty("办理方式选择") |
|||
private String dealWay; |
|||
@ApiModelProperty("办理方式选择key") |
|||
private String dealWayKey; |
|||
|
|||
@ApiModelProperty("代收首年保险费") |
|||
private String proxyPremium; |
|||
@ApiModelProperty("代收购置费") |
|||
private String proxyPurchasetax; |
|||
@ApiModelProperty("抵顶首年保险费") |
|||
private String offsetPremium; |
|||
@ApiModelProperty("抵顶购置税") |
|||
private String offsetPurchasetax; |
|||
@ApiModelProperty("抵顶费用合计") |
|||
private String offsetTotal; |
|||
@ApiModelProperty("应收合计") |
|||
private String receivableTotal; |
|||
@ApiModelProperty("实收合计") |
|||
private String realTotal; |
|||
@ApiModelProperty("车辆总价") |
|||
private String vehTotalPrice; |
|||
@ApiModelProperty("名义留购价") |
|||
private String nominalPrice; |
|||
|
|||
private List<CrmSolutionListVo> financeForms = new ArrayList<>(); |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.anrui.crm.api.crmvehicledemand; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/8/29 |
|||
**/ |
|||
@Data |
|||
public class CrmSolutionListVo { |
|||
|
|||
@ApiModelProperty(value = "内容") |
|||
private String value; |
|||
|
|||
@ApiModelProperty(value = "单元格大小") |
|||
private Integer spanSize; |
|||
|
|||
@ApiModelProperty("类型:0 最普通的 1 标题的 2是 加上划线的") |
|||
private Integer type; |
|||
@ApiModelProperty("是否加粗,true是,false否") |
|||
private boolean bold; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanfile; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author fan |
|||
* @Date 2022/11/14 22:40 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class LoanFile extends BaseEntity { |
|||
private static final long serialVersionUID = -1625798325169874963L; |
|||
@ApiModelProperty("关联sid") |
|||
private String linkSid; |
|||
@ApiModelProperty("文件类型") |
|||
private String fileType; |
|||
@ApiModelProperty("附件类型") |
|||
private String attachType; |
|||
@ApiModelProperty("文件名") |
|||
private String fileName; |
|||
@ApiModelProperty("文件大小") |
|||
private String fileSize; |
|||
@ApiModelProperty("文件路径") |
|||
private String filePath; |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanfile; |
|||
|
|||
/** |
|||
* @Author fan |
|||
* @Date 2022/11/14 22:46 |
|||
* @Description |
|||
*/ |
|||
public enum LoanFileEnum { |
|||
|
|||
REGISTRATION_FILES_ONE("001", "登记证(1、2页)"), |
|||
REGISTRATION_FILES_TWO("002", "登记证(3、4页)"), |
|||
TAXI_FILES("003", "营运证"), |
|||
DRIVING_CARD_FILES("004", "行驶证"), |
|||
; |
|||
|
|||
|
|||
/** |
|||
* 附件类型 |
|||
*/ |
|||
private final String attachType; |
|||
|
|||
/** |
|||
* 代号 |
|||
*/ |
|||
private final String mark; |
|||
|
|||
LoanFileEnum(String attachType, String mark) { |
|||
this.attachType = attachType; |
|||
this.mark = mark; |
|||
} |
|||
|
|||
public String getAttachType() { |
|||
return attachType; |
|||
} |
|||
|
|||
public String getMark() { |
|||
return mark; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 14:34 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "抵押资料办理", description = "抵押资料办理") |
|||
@TableName("loan_mortgage_information_transact") |
|||
public class LoanMortgageInformationTransact extends BaseEntity { |
|||
@ApiModelProperty("销售订单sid") |
|||
private String salesOrderSid; |
|||
@ApiModelProperty("抵押日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
|||
private Date mortgageDate = new Date(); |
|||
@ApiModelProperty("业务车辆sid") |
|||
private String busVinSid; |
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; |
|||
@ApiModelProperty("使用组织名称") |
|||
private String useOrgName; |
|||
@ApiModelProperty("使用组织全路径") |
|||
private String orgSidPath; |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/21 9:13 |
|||
*/ |
|||
@Data |
|||
public class LoanMortgageInformationTransactDetailsVo implements Vo { |
|||
@ApiModelProperty("业务车辆sid") |
|||
private String busVinSid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractId; |
|||
@ApiModelProperty("贷款人") |
|||
private String borrowerName; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("抵押日期") |
|||
private String mortgageDate; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("登记证 1-2页") |
|||
private List<String> registrationFiles1 = new ArrayList<>(); |
|||
@ApiModelProperty("登记证 3-4页") |
|||
private List<String> registrationFiles2 = new ArrayList<>(); |
|||
@ApiModelProperty("营运证") |
|||
private List<String> taxiFiles = new ArrayList<>(); |
|||
@ApiModelProperty("行驶证") |
|||
private List<String> drivingFiles = new ArrayList<>(); |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/21 9:12 |
|||
*/ |
|||
@Data |
|||
public class LoanMortgageInformationTransactDto implements Dto { |
|||
@ApiModelProperty("业务车辆sid") |
|||
private String busVinSid; |
|||
@ApiModelProperty("抵押日期") |
|||
private Date mortgageDate; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("登记证 1-2页") |
|||
private List<String> registrationFiles1 = new ArrayList<>(); |
|||
@ApiModelProperty("登记证 3-4页") |
|||
private List<String> registrationFiles2 = new ArrayList<>(); |
|||
@ApiModelProperty("营运证") |
|||
private List<String> taxiFiles = new ArrayList<>(); |
|||
@ApiModelProperty("行驶证") |
|||
private List<String> drivingFiles = new ArrayList<>(); |
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
|
|||
/** |
|||
* @description: 抵押办理 |
|||
* @author: fan |
|||
* @date: 2023/7/6 |
|||
**/ |
|||
@Api(tags = "抵押办理") |
|||
@FeignClient( |
|||
contextId = "anrui-riskcenter-LoanMortgageInformationTransact", |
|||
name = "anrui-riskcenter", |
|||
path = "v1/loanmortgageinformationtransact", |
|||
fallback = LoanMortgageInformationTransactFeignFallback.class) |
|||
public interface LoanMortgageInformationTransactFeign { |
|||
|
|||
/** |
|||
* 根据条件分页查询数据的列表(已测试) |
|||
* |
|||
* @param pq |
|||
*/ |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
@ResponseBody |
|||
public ResultBean<PagerVo<LoanMortgageInformationTransactVo>> listPage(@RequestBody PagerQuery<LoanMortgageInformationTransactQuery> pq); |
|||
|
|||
/** |
|||
* 保存 抵押办理 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("保存抵押办理") |
|||
@PostMapping("/saveMortgageInfo") |
|||
public ResultBean<String> saveMortgageInfo(@RequestBody LoanMortgageInformationTransactDto dto); |
|||
|
|||
|
|||
/** |
|||
* 保存 抵押办理 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("提交") |
|||
@PostMapping("/submitMortgageInfo") |
|||
public ResultBean<String> submitMortgageInfo(@RequestBody LoanMortgageInformationTransactDto dto); |
|||
|
|||
|
|||
/** |
|||
* 初始化详情 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("初始化详情") |
|||
@GetMapping("/getMortgageInfo") |
|||
@ResponseBody |
|||
public ResultBean<LoanMortgageInformationTransactDetailsVo> getMortgageInfo(@RequestParam("busVinSid") String busVinSid); |
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 14:36 |
|||
*/ |
|||
@Component |
|||
public class LoanMortgageInformationTransactFeignFallback implements LoanMortgageInformationTransactFeign { |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<LoanMortgageInformationTransactVo>> listPage(PagerQuery<LoanMortgageInformationTransactQuery> pq) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean saveMortgageInfo(LoanMortgageInformationTransactDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean submitMortgageInfo(LoanMortgageInformationTransactDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanMortgageInformationTransactDetailsVo> getMortgageInfo(String busVinSid) { |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 15:05 |
|||
*/ |
|||
@Data |
|||
public class LoanMortgageInformationTransactQuery implements Query { |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
@ApiModelProperty("组织全路径") |
|||
private String orgPath; |
|||
@ApiModelProperty("菜单sid") |
|||
private String menuSid; |
|||
@ApiModelProperty("菜单url") |
|||
private String menuUrl; |
|||
@ApiModelProperty("合同编号/贷款人姓名/车架号") |
|||
private String names; |
|||
@ApiModelProperty("“” 全部 1待抵押 2已抵押") |
|||
private String type; |
|||
|
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 15:04 |
|||
*/ |
|||
@Data |
|||
public class LoanMortgageInformationTransactVo implements Vo { |
|||
@ApiModelProperty("销售订单sid") |
|||
private String salesOrderSid; |
|||
@ApiModelProperty("抵押日期") |
|||
private String disbursementDate; |
|||
@ApiModelProperty("业务车辆sid") |
|||
private String sid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractId; |
|||
@ApiModelProperty("分公司") |
|||
private String company; |
|||
@ApiModelProperty("销售部门") |
|||
private String department; |
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; |
|||
@ApiModelProperty("贷款人") |
|||
private String lenderName; |
|||
@ApiModelProperty("车架号") |
|||
private String vin; |
|||
@ApiModelProperty("资方") |
|||
private String bankName; |
|||
private String createBySid; |
|||
private String orgSidPath; |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date createTime; |
|||
private boolean showHandleBtn; |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/28 17:44 |
|||
*/ |
|||
@Data |
|||
public class LoanAuditInfoDto implements Dto { |
|||
@ApiModelProperty("业务sid") |
|||
private String sid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractNo; |
|||
@ApiModelProperty("客户名称") |
|||
private String borrowerName; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("资方名称") |
|||
private String bankName; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("登记证 1-2页") |
|||
private List<String> registrationFiles1 = new ArrayList<>(); |
|||
@ApiModelProperty("登记证 3-4页") |
|||
private List<String> registrationFiles2 = new ArrayList<>(); |
|||
@ApiModelProperty("营运证") |
|||
private List<String> taxiFiles = new ArrayList<>(); |
|||
@ApiModelProperty("行驶证") |
|||
private List<String> drivingFiles = new ArrayList<>(); |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/28 17:33 |
|||
*/ |
|||
@Data |
|||
public class LoanAuditInfoVo implements Vo { |
|||
@ApiModelProperty("业务sid") |
|||
private String sid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractNo; |
|||
@ApiModelProperty("客户名称") |
|||
private String borrowerName; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("资方名称") |
|||
private String bankName; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("登记证 1-2页") |
|||
private List<String> registrationFiles1 = new ArrayList<>(); |
|||
@ApiModelProperty("登记证 3-4页") |
|||
private List<String> registrationFiles2 = new ArrayList<>(); |
|||
@ApiModelProperty("营运证") |
|||
private List<String> taxiFiles = new ArrayList<>(); |
|||
@ApiModelProperty("行驶证") |
|||
private List<String> drivingFiles = new ArrayList<>(); |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/21 9:12 |
|||
*/ |
|||
@Data |
|||
public class LoanTransferInfoDto implements Dto { |
|||
private String[] sids; |
|||
@ApiModelProperty("移交资料") |
|||
private String transferInformation; |
|||
@ApiModelProperty("送达日期") |
|||
private String deliveryDate; |
|||
@ApiModelProperty("快递单号") |
|||
private String trackingNo; |
|||
@ApiModelProperty("移交方式key") |
|||
private String transferWayKey; |
|||
@ApiModelProperty("移交方式value") |
|||
private String transferWayValue; |
|||
@ApiModelProperty("接收人/签收人") |
|||
private String recipient; |
|||
@ApiModelProperty("移交备注") |
|||
private String transferRemarks; |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/29 9:04 |
|||
*/ |
|||
@Data |
|||
public class LoanTransferInfoVo implements Vo { |
|||
@ApiModelProperty("资方") |
|||
private String bankName; |
|||
@ApiModelProperty("消贷合同号") |
|||
private String contractNo; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("移交资料") |
|||
private String transferInformation; |
|||
@ApiModelProperty("送达日期") |
|||
private String deliveryDate; |
|||
@ApiModelProperty("快递单号") |
|||
private String trackingNo; |
|||
@ApiModelProperty("移交方式key") |
|||
private String transferWayKey; |
|||
@ApiModelProperty("移交方式value") |
|||
private String transferWayValue; |
|||
@ApiModelProperty("接收人/签收人") |
|||
private String recipient; |
|||
@ApiModelProperty("移交备注") |
|||
private String transferRemarks; |
|||
} |
@ -0,0 +1,64 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 14:34 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "权证资料管理", description = "权证资料管理") |
|||
@TableName("loan_warrant_information") |
|||
public class LoanWarrantInformation extends BaseEntity { |
|||
@ApiModelProperty("销售订单sid") |
|||
private String salesOrderSid; |
|||
@ApiModelProperty("审核状态key") |
|||
private String auditStateKey; |
|||
@ApiModelProperty("审核状态Value") |
|||
private String auditStateValue; |
|||
@ApiModelProperty("送达日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date deliveryDate; |
|||
@ApiModelProperty("业务车辆sid") |
|||
private String busVinSid; |
|||
@ApiModelProperty("移交资料") |
|||
private String transferInformation; |
|||
@ApiModelProperty("移交备注") |
|||
private String transferRemarks; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date transferDate; |
|||
@ApiModelProperty("消贷合同号") |
|||
private String contractNo; |
|||
@ApiModelProperty("销售部门") |
|||
private String department; |
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("资方") |
|||
private String bankName; |
|||
@ApiModelProperty("贷款人") |
|||
private String borrowerName; |
|||
@ApiModelProperty("快递单号") |
|||
private String trackingNo; |
|||
@ApiModelProperty("移交方式key") |
|||
private String transferWayKey; |
|||
@ApiModelProperty("移交方式value") |
|||
private String transferWayValue; |
|||
@ApiModelProperty("接收人/签收人") |
|||
private String recipient; |
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; |
|||
@ApiModelProperty("使用组织名称") |
|||
private String useOrgName; |
|||
@ApiModelProperty("使用组织全路径") |
|||
private String orgSidPath; |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/21 9:13 |
|||
*/ |
|||
@Data |
|||
public class LoanWarrantInformationDetailsVo implements Vo { |
|||
@ApiModelProperty("业务车辆sid") |
|||
private String busVinSid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractId; |
|||
@ApiModelProperty("贷款人") |
|||
private String borrowerName; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("抵押日期") |
|||
private String mortgageDate; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("登记证 1-2页") |
|||
private List<String> registrationFiles1 = new ArrayList<>(); |
|||
@ApiModelProperty("登记证 3-4页") |
|||
private List<String> registrationFiles2 = new ArrayList<>(); |
|||
@ApiModelProperty("营运证") |
|||
private List<String> taxiFiles = new ArrayList<>(); |
|||
@ApiModelProperty("行驶证") |
|||
private List<String> drivingFiles = new ArrayList<>(); |
|||
} |
@ -0,0 +1,88 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
|
|||
/** |
|||
* @description: 抵押办理 |
|||
* @author: fan |
|||
* @date: 2023/7/6 |
|||
**/ |
|||
@Api(tags = "抵押办理") |
|||
@FeignClient( |
|||
contextId = "anrui-riskcenter-LoanWarrantInformation", |
|||
name = "anrui-riskcenter", |
|||
path = "v1/loanwarrantinformation", |
|||
fallback = LoanWarrantInformationFeignFallback.class) |
|||
public interface LoanWarrantInformationFeign { |
|||
|
|||
/** |
|||
* 根据条件分页查询数据的列表(已测试) |
|||
* |
|||
* @param pq |
|||
*/ |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
@ResponseBody |
|||
public ResultBean<PagerVo<LoanWarrantInformationVo>> listPage(@RequestBody PagerQuery<LoanWarrantInformationQuery> pq); |
|||
|
|||
|
|||
/** |
|||
* 审核回显 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("审核回显") |
|||
@GetMapping("/getAuditInfo") |
|||
@ResponseBody |
|||
public ResultBean<LoanAuditInfoVo> getAuditInfo(@RequestParam("sid") String sid); |
|||
|
|||
|
|||
/** |
|||
* 审核保存 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("审核保存") |
|||
@PostMapping("/saveWarrantInfo") |
|||
public ResultBean<String> saveWarrantInfo(@RequestBody LoanAuditInfoDto dto); |
|||
|
|||
|
|||
/** |
|||
* 审核通过 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("审核通过") |
|||
@PostMapping("/approvedWarrantInfo") |
|||
public ResultBean<String> approvedWarrantInfo(@RequestBody LoanAuditInfoDto dto); |
|||
|
|||
|
|||
|
|||
/** |
|||
* 移交回显 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("移交回显") |
|||
@PostMapping("/transferInfo") |
|||
@ResponseBody |
|||
public ResultBean<LoanTransferInfoVo> transferInfo(@RequestBody String[] sids); |
|||
|
|||
/** |
|||
* 移交保存 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("移交保存") |
|||
@PostMapping("/saveTransferInfo") |
|||
public ResultBean saveTransferInfo(@RequestBody LoanTransferInfoDto dto); |
|||
|
|||
|
|||
} |
@ -0,0 +1,48 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 14:36 |
|||
*/ |
|||
@Component |
|||
public class LoanWarrantInformationFeignFallback implements LoanWarrantInformationFeign { |
|||
|
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<LoanWarrantInformationVo>> listPage(PagerQuery<LoanWarrantInformationQuery> pq) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanAuditInfoVo> getAuditInfo(String sid) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> saveWarrantInfo(LoanAuditInfoDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanTransferInfoVo> transferInfo(String[] sids) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean saveTransferInfo(LoanTransferInfoDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> approvedWarrantInfo(LoanAuditInfoDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 15:05 |
|||
*/ |
|||
@Data |
|||
public class LoanWarrantInformationQuery implements Query { |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
@ApiModelProperty("组织全路径") |
|||
private String orgPath; |
|||
@ApiModelProperty("菜单sid") |
|||
private String menuSid; |
|||
@ApiModelProperty("菜单url") |
|||
private String menuUrl; |
|||
@ApiModelProperty("分公司") |
|||
private String company; |
|||
@ApiModelProperty("销售部门") |
|||
private String department; |
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; |
|||
@ApiModelProperty("贷款人") |
|||
private String borrowerName; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractNo; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("资方") |
|||
private String bankName; |
|||
@ApiModelProperty("审核状态key") |
|||
private String auditStateKey; |
|||
@ApiModelProperty("移交开始日期") |
|||
private String startTime; |
|||
@ApiModelProperty("移交结束日期") |
|||
private String endTime; |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 15:04 |
|||
*/ |
|||
@Data |
|||
public class LoanWarrantInformationVo implements Vo { |
|||
@ApiModelProperty("sid") |
|||
private String sid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractNo; |
|||
@ApiModelProperty("分公司") |
|||
private String company; |
|||
@ApiModelProperty("销售部门") |
|||
private String department; |
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; |
|||
@ApiModelProperty("贷款人") |
|||
private String borrowerName; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("审核状态value") |
|||
private String auditStateValue; |
|||
@ApiModelProperty("移交日期") |
|||
private String transferDate; |
|||
@ApiModelProperty("资方") |
|||
private String bankName; |
|||
@ApiModelProperty("备注") |
|||
private String transferRemarks; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanfile; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFile; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; |
|||
import org.apache.ibatis.annotations.Delete; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/14 22:44 |
|||
* @Description |
|||
*/ |
|||
@Mapper |
|||
public interface LoanFileMapper extends BaseMapper<LoanFile> { |
|||
List<LoanFile> selectByLinkSid(@Param("sid") String sid, @Param("attachType") String attachType); |
|||
|
|||
int deleteByLinkSid(String sid); |
|||
|
|||
LoanFile selectByLinkSidOne(@Param("sid") String sid, @Param("attachType") String attachType); |
|||
|
|||
@Delete("delete from loan_file where linkSid = #{sid} and attachType = #{attachType}") |
|||
void delByLinkSidOrType(@Param("sid") String sid, @Param("attachType") String attachType); |
|||
} |
@ -0,0 +1,23 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
|||
<mapper namespace="com.yxt.anrui.riskcenter.biz.loanfile.LoanFileMapper"> |
|||
<select id="selectByLinkSid" resultType="com.yxt.anrui.riskcenter.api.loanfile.LoanFile"> |
|||
select * |
|||
from loan_file |
|||
where linkSid = #{sid} |
|||
and attachType = #{attachType} |
|||
</select> |
|||
|
|||
<delete id="deleteByLinkSid"> |
|||
delete |
|||
from loan_file |
|||
where linkSid = #{sid} |
|||
</delete> |
|||
|
|||
<select id="selectByLinkSidOne" resultType="com.yxt.anrui.riskcenter.api.loanfile.LoanFile"> |
|||
select * |
|||
from loan_file |
|||
where attachType = #{attachType} |
|||
and linkSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,71 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanfile; |
|||
|
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.io.File; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/14 22:43 |
|||
* @Description |
|||
*/ |
|||
@Service |
|||
public class LoanFileService extends MybatisBaseService<LoanFileMapper, LoanFile> { |
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
|
|||
public List<LoanFile> selectByLinkSid(String sid, String attachType) { |
|||
return baseMapper.selectByLinkSid(sid, attachType); |
|||
} |
|||
|
|||
public int deleteByLinkSid(String sid) { |
|||
return baseMapper.deleteByLinkSid(sid); |
|||
} |
|||
|
|||
public void saveAll(String sid, List<String> imageFiles, String attachType) { |
|||
if (!imageFiles.isEmpty()) { |
|||
imageFiles.stream().forEach(str -> { |
|||
LoanFile loanFile = new LoanFile(); |
|||
File file = new File(fileUploadComponent.getUploadPath() + str.replace("/", File.separator)); |
|||
if (file != null) { |
|||
loanFile.setFileSize(fileUploadComponent.getPrintSize(file.length())); |
|||
} |
|||
loanFile.setLinkSid(sid); |
|||
loanFile.setFileName(str.substring(str.lastIndexOf("/") + 1, str.lastIndexOf("."))); |
|||
loanFile.setFileType(str.substring(str.lastIndexOf(".") + 1)); |
|||
loanFile.setAttachType(attachType); |
|||
loanFile.setFilePath(str.replace(fileUploadComponent.getUrlPrefix(), "")); |
|||
save(loanFile); |
|||
}); |
|||
} |
|||
|
|||
} |
|||
|
|||
public LoanFile selectByLinkSidOne(String sid, String attachType) { |
|||
return baseMapper.selectByLinkSidOne(sid, attachType); |
|||
} |
|||
|
|||
public void delByLinkSidOrType(String sid, String attachType) { |
|||
baseMapper.delByLinkSidOrType(sid, attachType); |
|||
} |
|||
|
|||
public void saveFile(String sid, String filePath, String attachType) { |
|||
LoanFile loanFile = new LoanFile(); |
|||
String str = filePath; |
|||
File file = new File(fileUploadComponent.getUploadPath() + str.replace("/", File.separator)); |
|||
if (file != null) { |
|||
loanFile.setFileSize(fileUploadComponent.getPrintSize(file.length())); |
|||
} |
|||
loanFile.setLinkSid(sid); |
|||
loanFile.setFileName(str.substring(str.lastIndexOf("/") + 1, str.lastIndexOf("."))); |
|||
loanFile.setFileType(str.substring(str.lastIndexOf(".") + 1)); |
|||
loanFile.setAttachType(attachType); |
|||
loanFile.setFilePath(str.replace(fileUploadComponent.getUrlPrefix(), "")); |
|||
save(loanFile); |
|||
} |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanmortgageinformationtransact; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.LoanMortgageInformationTransact; |
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.LoanMortgageInformationTransactDetailsVo; |
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.LoanMortgageInformationTransactVo; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameter; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fan |
|||
* @date: 2023/8/21 |
|||
**/ |
|||
@Mapper |
|||
public interface LoanMortgageInformationTransactMapper extends BaseMapper<LoanMortgageInformationTransact> { |
|||
|
|||
List<LoanMortgageInformationTransactVo> listPageDo(@Param(Constants.WRAPPER) QueryWrapper<LoanMortgageInformationTransact> qw); |
|||
|
|||
LoanMortgageInformationTransact fetchByBusVinSid(String busVinSid); |
|||
|
|||
LoanMortgageInformationTransactDetailsVo getMortgageInfo(String busVinSid); |
|||
} |
@ -0,0 +1,31 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.riskcenter.biz.loanmortgageinformationtransact.LoanMortgageInformationTransactMapper"> |
|||
|
|||
<select id="listPageDo" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.LoanMortgageInformationTransactVo"> |
|||
SELECT |
|||
busVinSid as sid, |
|||
salesOrderSid, |
|||
createTime, |
|||
date_format (mortgageDate,'%Y-%m-%d') as disbursementDate |
|||
from loan_mortgage_information_transact |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="fetchByBusVinSid" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.LoanMortgageInformationTransact"> |
|||
SELECT * |
|||
from loan_mortgage_information_transact |
|||
where busVinSid = #{busVinSid} |
|||
</select> |
|||
<select id="getMortgageInfo" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.LoanMortgageInformationTransactDetailsVo"> |
|||
SELECT busVinSid, |
|||
remarks, |
|||
date_format(mortgageDate, '%Y-%m-%d') as mortgageDate |
|||
from loan_mortgage_information_transact |
|||
where busVinSid = #{busVinSid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,47 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanmortgageinformationtransact; |
|||
|
|||
|
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.*; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fan |
|||
* @date: 2023/8/21 |
|||
**/ |
|||
@Api(tags = "抵押资料办理") |
|||
@RestController |
|||
@RequestMapping("v1/loanmortgageinformationtransact") |
|||
public class LoanMortgageInformationTransactRest implements LoanMortgageInformationTransactFeign { |
|||
|
|||
@Autowired |
|||
private LoanMortgageInformationTransactService loanMortgageInformationTransactService; |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<LoanMortgageInformationTransactVo>> listPage(PagerQuery<LoanMortgageInformationTransactQuery> pq) { |
|||
ResultBean<PagerVo<LoanMortgageInformationTransactVo>> rb = ResultBean.fireFail(); |
|||
PagerVo<LoanMortgageInformationTransactVo> page = loanMortgageInformationTransactService.listPage(pq); |
|||
return rb.success().setData(page).setMsg(page.getMsg()); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> saveMortgageInfo(LoanMortgageInformationTransactDto dto) { |
|||
return loanMortgageInformationTransactService.saveMortgageInfo(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> submitMortgageInfo(LoanMortgageInformationTransactDto dto) { |
|||
return loanMortgageInformationTransactService.submitMortgageInfo(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanMortgageInformationTransactDetailsVo> getMortgageInfo(String busVinSid) { |
|||
return loanMortgageInformationTransactService.getMortgageInfo(busVinSid); |
|||
} |
|||
} |
@ -0,0 +1,621 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanmortgageinformationtransact; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleState; |
|||
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleStateFeign; |
|||
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFile; |
|||
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFileEnum; |
|||
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; |
|||
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; |
|||
import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppBusSalesOrderVo; |
|||
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontract; |
|||
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontractFeign; |
|||
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle; |
|||
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; |
|||
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|||
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|||
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|||
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; |
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.*; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameter; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterQuery; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterVo; |
|||
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformation; |
|||
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService; |
|||
import com.yxt.anrui.riskcenter.biz.loanwarrantinformation.LoanWarrantInformationService; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
import java.util.stream.Collectors; |
|||
import java.util.stream.Stream; |
|||
|
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fan |
|||
* @date: 2023/8/21 |
|||
**/ |
|||
@Service |
|||
public class LoanMortgageInformationTransactService extends MybatisBaseService<LoanMortgageInformationTransactMapper, LoanMortgageInformationTransact> { |
|||
|
|||
@Autowired |
|||
private SysUserFeign sysUserFeign; |
|||
@Autowired |
|||
private SysStaffOrgFeign sysStaffOrgFeign; |
|||
@Autowired |
|||
private SysOrganizationFeign sysOrganizationFeign; |
|||
@Autowired |
|||
private BaseVehicleStateFeign baseVehicleStateFeign; |
|||
@Autowired |
|||
private BusSalesOrderVehicleFeign busSalesOrderVehicleFeign; |
|||
@Autowired |
|||
private BusSalesOrderFeign busSalesOrderFeign; |
|||
@Autowired |
|||
private BusSalesOrderLoancontractFeign busSalesOrderLoancontractFeign; |
|||
@Autowired |
|||
private LoanFileService loanFileService; |
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
|
|||
@Autowired |
|||
private LoanWarrantInformationService loanWarrantInformationService; |
|||
|
|||
/** |
|||
* 分页方法 |
|||
*/ |
|||
public List<LoanMortgageInformationTransactVo> pageBySubList(List<LoanMortgageInformationTransactVo> list, int pagesize, int currentPage) { |
|||
int totalcount = list.size(); |
|||
int pagecount = 0; |
|||
List<LoanMortgageInformationTransactVo> subList; |
|||
int m = totalcount % pagesize; |
|||
if (m > 0) { |
|||
pagecount = totalcount / pagesize + 1; |
|||
} else { |
|||
pagecount = totalcount / pagesize; |
|||
} |
|||
if (m == 0) { |
|||
subList = list.subList((currentPage - 1) * pagesize, pagesize * (currentPage)); |
|||
} else { |
|||
if (currentPage == pagecount) { |
|||
subList = list.subList((currentPage - 1) * pagesize, totalcount); |
|||
} else { |
|||
subList = list.subList((currentPage - 1) * pagesize, pagesize * (currentPage)); |
|||
} |
|||
} |
|||
return subList; |
|||
} |
|||
|
|||
/** |
|||
* 待抵押列表 |
|||
* |
|||
* @return |
|||
*/ |
|||
public List<LoanMortgageInformationTransactVo> pageToDo(LoanMortgageInformationTransactQuery query) { |
|||
List<LoanMortgageInformationTransactVo> voList = new ArrayList<>(); |
|||
List<LoanMortgageInformationTransactVo> finalList = new ArrayList<>(); |
|||
// 查询车辆状态表
|
|||
List<String> busSids = baseVehicleStateFeign.selectBusSidListByBusState("307").getData(); |
|||
busSids.removeAll(Collections.singleton(null)); |
|||
if (!busSids.isEmpty()) { |
|||
for (String busSid : busSids) { |
|||
LoanMortgageInformationTransactVo vo = new LoanMortgageInformationTransactVo(); |
|||
vo.setShowHandleBtn(true); |
|||
vo.setDisbursementDate("-"); |
|||
vo.setSid(busSid); |
|||
//根据业务车辆sid查询 销售订单业务车辆表
|
|||
BusSalesOrderVehicle orderVehicle = busSalesOrderVehicleFeign.details(busSid).getData(); |
|||
if (null != orderVehicle) { |
|||
if (StringUtils.isNotBlank(orderVehicle.getLinkNo())) { |
|||
vo.setVin(orderVehicle.getLinkNo()); |
|||
} |
|||
String salesOrderSid = orderVehicle.getSalesOrderSid(); |
|||
vo.setSalesOrderSid(salesOrderSid); |
|||
BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(salesOrderSid).getData(); |
|||
if (null != salesOrder) { |
|||
//创建人sid
|
|||
if (StringUtils.isNotBlank(salesOrder.getCreateBySid())) { |
|||
vo.setCreateBySid(salesOrder.getCreateBySid()); |
|||
} |
|||
//销售部门
|
|||
if (StringUtils.isNotBlank(salesOrder.getOrgName())) { |
|||
vo.setDepartment(salesOrder.getOrgName()); |
|||
} |
|||
//销售专员
|
|||
if (StringUtils.isNotBlank(salesOrder.getStaffName())) { |
|||
vo.setSalesman(salesOrder.getStaffName()); |
|||
} |
|||
//分公司
|
|||
if (StringUtils.isNotBlank(salesOrder.getUseOrgName())) { |
|||
vo.setCompany(salesOrder.getUseOrgName()); |
|||
} |
|||
//销售订单创建日期
|
|||
vo.setCreateTime(salesOrder.getCreateTime()); |
|||
//组织全路径
|
|||
if (StringUtils.isNotBlank(salesOrder.getOrgSidPath())) { |
|||
vo.setOrgSidPath(salesOrder.getOrgSidPath()); |
|||
} |
|||
//根据销售订单sid查询消贷合同表
|
|||
BusSalesOrderLoancontract loancontract = busSalesOrderLoancontractFeign.fetchDetailsByOrderSid(salesOrderSid).getData(); |
|||
if (null != loancontract) { |
|||
//消贷合同编号
|
|||
if (StringUtils.isNotBlank(loancontract.getLoanCotractNo())) { |
|||
vo.setContractId(loancontract.getLoanCotractNo()); |
|||
} |
|||
//贷款人
|
|||
if (StringUtils.isNotBlank(loancontract.getBorrowerName())) { |
|||
vo.setLenderName(loancontract.getBorrowerName()); |
|||
} |
|||
//资方
|
|||
if (StringUtils.isNotBlank(loancontract.getBankName())) { |
|||
vo.setBankName(loancontract.getBankName()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
voList.add(vo); |
|||
} |
|||
} |
|||
//========== 数据权限 =============
|
|||
String orgPath = ""; |
|||
String userSid = ""; |
|||
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|||
privilegeQuery.setOrgPath(query.getOrgPath()); |
|||
privilegeQuery.setMenuSid(query.getMenuSid()); |
|||
privilegeQuery.setMenuUrl(query.getMenuUrl()); |
|||
privilegeQuery.setUserSid(query.getUserSid()); |
|||
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|||
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|||
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|||
String orgSidPath = query.getOrgPath(); |
|||
orgSidPath = orgSidPath + "/"; |
|||
int i1 = orgSidPath.indexOf("/"); |
|||
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|||
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|||
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|||
String orgLevelKey = defaultIdReltBean.getData(); |
|||
if ("1".equals(orgLevelKey)) { |
|||
orgPath = orgSidPath.substring(0, i1); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
orgPath = orgSidPath.substring(0, i2); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
orgPath = orgSidPath.substring(0, i3); |
|||
} else if ("4".equals(orgLevelKey)) { |
|||
orgPath = orgSidPath.substring(0, i4); |
|||
} else if ("5".equals(orgLevelKey)) { |
|||
userSid = query.getUserSid(); |
|||
} else { |
|||
List<LoanMortgageInformationTransactVo> p = new ArrayList<>(); |
|||
return p; |
|||
} |
|||
} else { |
|||
List<LoanMortgageInformationTransactVo> p = new ArrayList<>(); |
|||
return p; |
|||
} |
|||
// ================== 最终加上数据权限组装 ========================
|
|||
if (!voList.isEmpty()) { |
|||
for (LoanMortgageInformationTransactVo vo : voList) { |
|||
if (StringUtils.isNotBlank(userSid)) { |
|||
if (vo.getCreateBySid().equals(userSid)) { |
|||
finalList.add(vo); |
|||
} |
|||
} else if (StringUtils.isNotBlank(orgPath)) { |
|||
if (vo.getOrgSidPath().contains(orgPath)) { |
|||
finalList.add(vo); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
if (!finalList.isEmpty()) { |
|||
finalList.sort((t1, t2) -> t2.getCreateTime().compareTo(t1.getCreateTime())); |
|||
} |
|||
return finalList; |
|||
} |
|||
|
|||
/** |
|||
* 已抵押列表 |
|||
*/ |
|||
public List<LoanMortgageInformationTransactVo> listPageDo(PagerQuery<LoanMortgageInformationTransactQuery> pq) { |
|||
LoanMortgageInformationTransactQuery pagerQuery = pq.getParams(); |
|||
QueryWrapper<LoanMortgageInformationTransact> qw = new QueryWrapper<>(); |
|||
//=======================
|
|||
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|||
privilegeQuery.setOrgPath(pagerQuery.getOrgPath()); |
|||
privilegeQuery.setMenuSid(pagerQuery.getMenuSid()); |
|||
privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl()); |
|||
privilegeQuery.setUserSid(pagerQuery.getUserSid()); |
|||
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|||
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|||
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|||
String orgSidPath = pagerQuery.getOrgPath(); |
|||
orgSidPath = orgSidPath + "/"; |
|||
int i1 = orgSidPath.indexOf("/"); |
|||
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|||
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|||
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|||
String orgLevelKey = defaultIdReltBean.getData(); |
|||
if ("1".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i1); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i2); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i3); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("4".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i4); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("5".equals(orgLevelKey)) { |
|||
qw.eq("createBySid", pagerQuery.getUserSid()); |
|||
} else { |
|||
List<LoanMortgageInformationTransactVo> p = new ArrayList<>(); |
|||
return p; |
|||
} |
|||
} else { |
|||
List<LoanMortgageInformationTransactVo> p = new ArrayList<>(); |
|||
return p; |
|||
} |
|||
//=======================
|
|||
qw.orderByDesc("createTime"); |
|||
List<LoanMortgageInformationTransactVo> voList = baseMapper.listPageDo(qw); |
|||
voList.removeAll(Collections.singleton(null)); |
|||
if (!voList.isEmpty()) { |
|||
for (LoanMortgageInformationTransactVo vo : voList) { |
|||
vo.setShowHandleBtn(false); |
|||
//根据业务车辆sid查询 销售订单业务车辆表
|
|||
BusSalesOrderVehicle orderVehicle = busSalesOrderVehicleFeign.details(vo.getSid()).getData(); |
|||
if (StringUtils.isNotBlank(orderVehicle.getLinkNo())) { |
|||
vo.setVin(orderVehicle.getLinkNo()); |
|||
} |
|||
String salesOrderSid = vo.getSalesOrderSid(); |
|||
BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(salesOrderSid).getData(); |
|||
if (null != salesOrder) { |
|||
//销售部门
|
|||
if (StringUtils.isNotBlank(salesOrder.getOrgName())) { |
|||
vo.setDepartment(salesOrder.getOrgName()); |
|||
} |
|||
//销售专员
|
|||
if (StringUtils.isNotBlank(salesOrder.getStaffName())) { |
|||
vo.setSalesman(salesOrder.getStaffName()); |
|||
} |
|||
//分公司
|
|||
if (StringUtils.isNotBlank(salesOrder.getUseOrgName())) { |
|||
vo.setCompany(salesOrder.getUseOrgName()); |
|||
} |
|||
//根据销售订单sid查询消贷合同表
|
|||
BusSalesOrderLoancontract loancontract = busSalesOrderLoancontractFeign.fetchDetailsByOrderSid(salesOrderSid).getData(); |
|||
if (null != loancontract) { |
|||
//消贷合同编号
|
|||
if (StringUtils.isNotBlank(loancontract.getLoanCotractNo())) { |
|||
vo.setContractId(loancontract.getLoanCotractNo()); |
|||
} |
|||
//贷款人
|
|||
if (StringUtils.isNotBlank(loancontract.getBorrowerName())) { |
|||
vo.setLenderName(loancontract.getBorrowerName()); |
|||
} |
|||
//资方
|
|||
if (StringUtils.isNotBlank(loancontract.getBankName())) { |
|||
vo.setBankName(loancontract.getBankName()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return voList; |
|||
} |
|||
|
|||
/** |
|||
* 分页列表 |
|||
* |
|||
* @param pq |
|||
* @return |
|||
*/ |
|||
public PagerVo<LoanMortgageInformationTransactVo> listPage(PagerQuery<LoanMortgageInformationTransactQuery> pq) { |
|||
PagerVo<LoanMortgageInformationTransactVo> pagerVo = new PagerVo<>(); |
|||
LoanMortgageInformationTransactQuery params = pq.getParams(); |
|||
// type “” 全部 1待抵押 2已抵押
|
|||
if (params.getType().equals("1")) { |
|||
List<LoanMortgageInformationTransactVo> lastList = new ArrayList<>(); |
|||
List<LoanMortgageInformationTransactVo> voList = pageToDo(params); |
|||
voList.removeAll(Collections.singleton(null)); |
|||
if (!voList.isEmpty()) { |
|||
lastList = this.pageBySubList(voList, (int) pq.getSize(), (int) pq.getCurrent()); |
|||
pagerVo.setRecords(lastList); |
|||
pagerVo.setTotal(voList.size()); |
|||
pagerVo.setCurrent(pq.getCurrent()); |
|||
pagerVo.setSize(pq.getSize()); |
|||
if (voList.size() % pq.getSize() != 0L) { |
|||
pagerVo.setPages((voList.size() / pq.getSize()) + 1); |
|||
} else { |
|||
pagerVo.setPages(voList.size() / pq.getSize()); |
|||
} |
|||
pagerVo.setMsg("当前共查询到" + voList.size() + "条记录"); |
|||
} |
|||
} else if (params.getType().equals("2")) { |
|||
List<LoanMortgageInformationTransactVo> lastList = new ArrayList<>(); |
|||
List<LoanMortgageInformationTransactVo> voList = listPageDo(pq); |
|||
voList.removeAll(Collections.singleton(null)); |
|||
if (!voList.isEmpty()) { |
|||
lastList = this.pageBySubList(voList, (int) pq.getSize(), (int) pq.getCurrent()); |
|||
pagerVo.setRecords(lastList); |
|||
pagerVo.setTotal(voList.size()); |
|||
pagerVo.setCurrent(pq.getCurrent()); |
|||
pagerVo.setSize(pq.getSize()); |
|||
if (voList.size() % pq.getSize() != 0L) { |
|||
pagerVo.setPages((voList.size() / pq.getSize()) + 1); |
|||
} else { |
|||
pagerVo.setPages(voList.size() / pq.getSize()); |
|||
} |
|||
pagerVo.setMsg("当前共查询到" + voList.size() + "条记录"); |
|||
} |
|||
} else { |
|||
List<LoanMortgageInformationTransactVo> lastList = new ArrayList<>(); |
|||
List<LoanMortgageInformationTransactVo> voListToDo = pageToDo(params); |
|||
List<LoanMortgageInformationTransactVo> voListDo = listPageDo(pq); |
|||
List<LoanMortgageInformationTransactVo> collect = Stream.concat(voListToDo.stream(), voListDo.stream()).collect(Collectors.toList()); |
|||
List<LoanMortgageInformationTransactVo> pageVoList = new ArrayList<>(); |
|||
if (!collect.isEmpty()) { |
|||
if (StringUtils.isNotBlank(params.getNames())) { |
|||
String names = params.getNames(); |
|||
for (LoanMortgageInformationTransactVo vo : collect) { |
|||
if (vo.getVin().contains(names) || vo.getContractId().contains(names) || vo.getLenderName().contains(names)) { |
|||
pageVoList.add(vo); |
|||
} |
|||
} |
|||
lastList = this.pageBySubList(pageVoList, (int) pq.getSize(), (int) pq.getCurrent()); |
|||
lastList.sort((t1, t2) -> t2.getCreateTime().compareTo(t1.getCreateTime())); |
|||
pagerVo.setRecords(lastList); |
|||
pagerVo.setTotal(pageVoList.size()); |
|||
pagerVo.setCurrent(pq.getCurrent()); |
|||
pagerVo.setSize(pq.getSize()); |
|||
if (pageVoList.size() % pq.getSize() != 0L) { |
|||
pagerVo.setPages((pageVoList.size() / pq.getSize()) + 1); |
|||
} else { |
|||
pagerVo.setPages(pageVoList.size() / pq.getSize()); |
|||
} |
|||
pagerVo.setMsg("当前共查询到" + pageVoList.size() + "条记录"); |
|||
} else { |
|||
lastList = this.pageBySubList(collect, (int) pq.getSize(), (int) pq.getCurrent()); |
|||
lastList.sort((t1, t2) -> t2.getCreateTime().compareTo(t1.getCreateTime())); |
|||
pagerVo.setRecords(lastList); |
|||
pagerVo.setTotal(collect.size()); |
|||
pagerVo.setCurrent(pq.getCurrent()); |
|||
pagerVo.setSize(pq.getSize()); |
|||
if (collect.size() % pq.getSize() != 0L) { |
|||
pagerVo.setPages((collect.size() / pq.getSize()) + 1); |
|||
} else { |
|||
pagerVo.setPages(collect.size() / pq.getSize()); |
|||
} |
|||
pagerVo.setMsg("当前共查询到" + collect.size() + "条记录"); |
|||
} |
|||
} |
|||
} |
|||
return pagerVo; |
|||
} |
|||
|
|||
/** |
|||
* 保存修改 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean saveMortgageInfo(LoanMortgageInformationTransactDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
LoanMortgageInformationTransact entity = baseMapper.fetchByBusVinSid(dto.getBusVinSid()); |
|||
// 修改
|
|||
if (null != entity) { |
|||
entity.setMortgageDate(dto.getMortgageDate()); |
|||
entity.setRemarks(dto.getRemarks()); |
|||
baseMapper.updateById(entity); |
|||
} else { |
|||
// 新增
|
|||
LoanMortgageInformationTransact saveEntity = new LoanMortgageInformationTransact(); |
|||
//根据业务车辆sid查询 销售订单业务车辆表
|
|||
BusSalesOrderVehicle orderVehicle = busSalesOrderVehicleFeign.details(dto.getBusVinSid()).getData(); |
|||
if (null != orderVehicle) { |
|||
String salesOrderSid = orderVehicle.getSalesOrderSid(); |
|||
BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(salesOrderSid).getData(); |
|||
if (null != salesOrder) { |
|||
//创建人sid
|
|||
if (StringUtils.isNotBlank(salesOrder.getCreateBySid())) { |
|||
saveEntity.setCreateBySid(salesOrder.getCreateBySid()); |
|||
} |
|||
//组织全路径
|
|||
if (StringUtils.isNotBlank(salesOrder.getOrgSidPath())) { |
|||
saveEntity.setOrgSidPath(salesOrder.getOrgSidPath()); |
|||
ResultBean<String> orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(salesOrder.getOrgSidPath()); |
|||
if (orgSidByPath.getSuccess()) { |
|||
String userOrgSid = orgSidByPath.getData(); |
|||
saveEntity.setUseOrgSid(userOrgSid); |
|||
ResultBean<SysOrganizationVo> organizationVo = sysOrganizationFeign.fetchBySid(userOrgSid); |
|||
if (organizationVo.getSuccess()) { |
|||
SysOrganizationVo organizationVoData = organizationVo.getData(); |
|||
if (null != organizationVoData) { |
|||
saveEntity.setUseOrgName(organizationVoData.getName()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
saveEntity.setMortgageDate(dto.getMortgageDate()); |
|||
saveEntity.setRemarks(dto.getRemarks()); |
|||
saveEntity.setSalesOrderSid(salesOrderSid); |
|||
saveEntity.setBusVinSid(dto.getBusVinSid()); |
|||
baseMapper.insert(saveEntity); |
|||
} |
|||
} |
|||
//删除附件表中关于该linkSid的文件
|
|||
loanFileService.deleteByLinkSid(dto.getBusVinSid()); |
|||
List<String> registrationFiles1 = dto.getRegistrationFiles1(); |
|||
if (!registrationFiles1.isEmpty()) { |
|||
loanFileService.saveAll(dto.getBusVinSid(), registrationFiles1, LoanFileEnum.REGISTRATION_FILES_ONE.getAttachType()); |
|||
} |
|||
List<String> registrationFiles2 = dto.getRegistrationFiles2(); |
|||
if (!registrationFiles2.isEmpty()) { |
|||
loanFileService.saveAll(dto.getBusVinSid(), registrationFiles2, LoanFileEnum.REGISTRATION_FILES_TWO.getAttachType()); |
|||
} |
|||
List<String> taxiFiles = dto.getTaxiFiles(); |
|||
if (!taxiFiles.isEmpty()) { |
|||
loanFileService.saveAll(dto.getBusVinSid(), taxiFiles, LoanFileEnum.TAXI_FILES.getAttachType()); |
|||
} |
|||
List<String> drivingFiles = dto.getDrivingFiles(); |
|||
if (!drivingFiles.isEmpty()) { |
|||
loanFileService.saveAll(dto.getBusVinSid(), drivingFiles, LoanFileEnum.DRIVING_CARD_FILES.getAttachType()); |
|||
} |
|||
return rb.success().setData(dto.getBusVinSid()); |
|||
} |
|||
|
|||
/** |
|||
* 提交 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean<String> submitMortgageInfo(LoanMortgageInformationTransactDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
ResultBean resultBean = saveMortgageInfo(dto); |
|||
if (resultBean.getSuccess()) { |
|||
baseVehicleStateFeign.updateBusStateByBusSid(dto.getBusVinSid(), "308"); |
|||
LoanMortgageInformationTransact loanMortgageInformationTransact = baseMapper.fetchByBusVinSid(dto.getBusVinSid()); |
|||
LoanWarrantInformation warrantInformation = new LoanWarrantInformation(); |
|||
warrantInformation.setBusVinSid(dto.getBusVinSid()); |
|||
warrantInformation.setAuditStateKey("001"); |
|||
warrantInformation.setAuditStateValue("待审核"); |
|||
warrantInformation.setRemarks(loanMortgageInformationTransact.getRemarks()); |
|||
//根据业务车辆sid查询 销售订单业务车辆表
|
|||
BusSalesOrderVehicle orderVehicle = busSalesOrderVehicleFeign.details(dto.getBusVinSid()).getData(); |
|||
if (null != orderVehicle) { |
|||
if (StringUtils.isNotBlank(orderVehicle.getLinkNo())) { |
|||
warrantInformation.setVinNo(orderVehicle.getLinkNo()); |
|||
} |
|||
String salesOrderSid = orderVehicle.getSalesOrderSid(); |
|||
warrantInformation.setSalesOrderSid(salesOrderSid); |
|||
BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(salesOrderSid).getData(); |
|||
if (null != salesOrder) { |
|||
//组织全路径
|
|||
if (StringUtils.isNotBlank(salesOrder.getOrgSidPath())) { |
|||
warrantInformation.setOrgSidPath(salesOrder.getOrgSidPath()); |
|||
ResultBean<String> orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(salesOrder.getOrgSidPath()); |
|||
if (orgSidByPath.getSuccess()) { |
|||
String userOrgSid = orgSidByPath.getData(); |
|||
warrantInformation.setUseOrgSid(userOrgSid); |
|||
ResultBean<SysOrganizationVo> organizationVo = sysOrganizationFeign.fetchBySid(userOrgSid); |
|||
if (organizationVo.getSuccess()) { |
|||
SysOrganizationVo organizationVoData = organizationVo.getData(); |
|||
if (null != organizationVoData) { |
|||
warrantInformation.setUseOrgName(organizationVoData.getName()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//创建人sid
|
|||
if (StringUtils.isNotBlank(salesOrder.getCreateBySid())) { |
|||
warrantInformation.setCreateBySid(salesOrder.getCreateBySid()); |
|||
} |
|||
//销售部门
|
|||
if (StringUtils.isNotBlank(salesOrder.getOrgName())) { |
|||
warrantInformation.setDepartment(salesOrder.getOrgName()); |
|||
} |
|||
//销售专员
|
|||
if (StringUtils.isNotBlank(salesOrder.getStaffName())) { |
|||
warrantInformation.setSalesman(salesOrder.getStaffName()); |
|||
} |
|||
//根据销售订单sid查询消贷合同表
|
|||
BusSalesOrderLoancontract loancontract = busSalesOrderLoancontractFeign.fetchDetailsByOrderSid(salesOrderSid).getData(); |
|||
if (null != loancontract) { |
|||
//消贷合同编号
|
|||
if (StringUtils.isNotBlank(loancontract.getLoanCotractNo())) { |
|||
warrantInformation.setContractNo(loancontract.getLoanCotractNo()); |
|||
} |
|||
//贷款人
|
|||
if (StringUtils.isNotBlank(loancontract.getBorrowerName())) { |
|||
warrantInformation.setBorrowerName(loancontract.getBorrowerName()); |
|||
} |
|||
//资方
|
|||
if (StringUtils.isNotBlank(loancontract.getBankName())) { |
|||
warrantInformation.setBankName(loancontract.getBankName()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
loanWarrantInformationService.insert(warrantInformation); |
|||
} |
|||
return rb.success().setData(dto.getBusVinSid()); |
|||
} |
|||
|
|||
public ResultBean<LoanMortgageInformationTransactDetailsVo> getMortgageInfo(String busVinSid) { |
|||
ResultBean<LoanMortgageInformationTransactDetailsVo> rb = ResultBean.fireFail(); |
|||
LoanMortgageInformationTransactDetailsVo vo = baseMapper.getMortgageInfo(busVinSid); |
|||
if (StringUtils.isBlank(vo.getMortgageDate())) { |
|||
vo.setMortgageDate("-"); |
|||
} |
|||
//根据业务车辆sid查询 销售订单业务车辆表
|
|||
BusSalesOrderVehicle orderVehicle = busSalesOrderVehicleFeign.details(busVinSid).getData(); |
|||
if (null != orderVehicle) { |
|||
if (StringUtils.isNotBlank(orderVehicle.getLinkNo())) { |
|||
vo.setVinNo(orderVehicle.getLinkNo()); |
|||
} |
|||
String salesOrderSid = orderVehicle.getSalesOrderSid(); |
|||
//根据销售订单sid查询消贷合同表
|
|||
BusSalesOrderLoancontract loancontract = busSalesOrderLoancontractFeign.fetchDetailsByOrderSid(salesOrderSid).getData(); |
|||
if (null != loancontract) { |
|||
//消贷合同编号
|
|||
if (StringUtils.isNotBlank(loancontract.getLoanCotractNo())) { |
|||
vo.setContractId(loancontract.getLoanCotractNo()); |
|||
} |
|||
//贷款人
|
|||
if (StringUtils.isNotBlank(loancontract.getBorrowerName())) { |
|||
vo.setBorrowerName(loancontract.getBorrowerName()); |
|||
} |
|||
} |
|||
//登记证 1-2页
|
|||
List<LoanFile> fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.REGISTRATION_FILES_ONE.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> registrationFiles1 = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). |
|||
collect(Collectors.toList()); |
|||
vo.setRegistrationFiles1(registrationFiles1); |
|||
} |
|||
//登记证 3-4页
|
|||
fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.REGISTRATION_FILES_TWO.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> registrationFiles2 = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setRegistrationFiles2(registrationFiles2); |
|||
} |
|||
//营运证
|
|||
fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.TAXI_FILES.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> taxiFiles = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setTaxiFiles(taxiFiles); |
|||
} |
|||
//行驶证
|
|||
fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.DRIVING_CARD_FILES.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> drivingFiles = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setDrivingFiles(drivingFiles); |
|||
} |
|||
} |
|||
return rb.success().setData(vo); |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanwarrantinformation; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformation; |
|||
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationDetailsVo; |
|||
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fan |
|||
* @date: 2023/8/21 |
|||
**/ |
|||
@Mapper |
|||
public interface LoanWarrantInformationMapper extends BaseMapper<LoanWarrantInformation> { |
|||
|
|||
|
|||
LoanWarrantInformation fetchByBusVinSid(String busVinSid); |
|||
|
|||
LoanWarrantInformationDetailsVo getMortgageInfo(String busVinSid); |
|||
|
|||
IPage<LoanWarrantInformationVo> listPage(IPage<LoanWarrantInformation> page, @Param(Constants.WRAPPER) QueryWrapper<LoanWarrantInformation> qw); |
|||
} |
@ -0,0 +1,38 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.riskcenter.biz.loanwarrantinformation.LoanWarrantInformationMapper"> |
|||
|
|||
|
|||
<select id="fetchByBusVinSid" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformation"> |
|||
SELECT * |
|||
from loan_warrant_information |
|||
where busVinSid = #{busVinSid} |
|||
</select> |
|||
<select id="getMortgageInfo" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationDetailsVo"> |
|||
SELECT busVinSid, |
|||
remarks, |
|||
date_format(mortgageDate, '%Y-%m-%d') as mortgageDate |
|||
from loan_mortgage_information_transact |
|||
where busVinSid = #{busVinSid} |
|||
</select> |
|||
<select id="listPage" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationVo"> |
|||
SELECT sid, |
|||
contractNo, |
|||
useOrgName as company, |
|||
department, |
|||
salesman, |
|||
borrowerName, |
|||
vinNo, |
|||
auditStateValue, |
|||
date_format(transferDate, '%Y-%m-%d') as transferDate, |
|||
bankName, |
|||
transferRemarks |
|||
from loan_warrant_information |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,58 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanwarrantinformation; |
|||
|
|||
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.*; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fan |
|||
* @date: 2023/8/21 |
|||
**/ |
|||
@Api(tags = "权证资料管理") |
|||
@RestController |
|||
@RequestMapping("v1/loanwarrantinformation") |
|||
public class LoanWarrantInformationRest implements LoanWarrantInformationFeign { |
|||
|
|||
@Autowired |
|||
private LoanWarrantInformationService loanMortgageInformationTransactService; |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<LoanWarrantInformationVo>> listPage(PagerQuery<LoanWarrantInformationQuery> pq) { |
|||
ResultBean<PagerVo<LoanWarrantInformationVo>> rb = ResultBean.fireFail(); |
|||
PagerVo<LoanWarrantInformationVo> page = loanMortgageInformationTransactService.listPage(pq); |
|||
return rb.success().setData(page); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanAuditInfoVo> getAuditInfo(String sid) { |
|||
return loanMortgageInformationTransactService.getAuditInfo(sid); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> saveWarrantInfo(LoanAuditInfoDto dto) { |
|||
return loanMortgageInformationTransactService.saveWarrantInfo(dto); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public ResultBean<String> approvedWarrantInfo(LoanAuditInfoDto dto) { |
|||
return loanMortgageInformationTransactService.approvedWarrantInfo(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanTransferInfoVo> transferInfo(String[] sids) { |
|||
return loanMortgageInformationTransactService.transferInfo(sids); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean saveTransferInfo(LoanTransferInfoDto dto) { |
|||
return loanMortgageInformationTransactService.saveTransferInfo(dto); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,337 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanwarrantinformation; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.date.DateTime; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleStateFeign; |
|||
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; |
|||
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; |
|||
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontract; |
|||
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontractFeign; |
|||
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle; |
|||
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; |
|||
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|||
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|||
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|||
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; |
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.*; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameter; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterQuery; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterVo; |
|||
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.*; |
|||
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import lombok.SneakyThrows; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
import java.util.stream.Stream; |
|||
|
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fan |
|||
* @date: 2023/8/21 |
|||
**/ |
|||
@Service |
|||
public class LoanWarrantInformationService extends MybatisBaseService<LoanWarrantInformationMapper, LoanWarrantInformation> { |
|||
|
|||
@Autowired |
|||
private SysUserFeign sysUserFeign; |
|||
@Autowired |
|||
private SysStaffOrgFeign sysStaffOrgFeign; |
|||
@Autowired |
|||
private SysOrganizationFeign sysOrganizationFeign; |
|||
@Autowired |
|||
private BaseVehicleStateFeign baseVehicleStateFeign; |
|||
@Autowired |
|||
private BusSalesOrderVehicleFeign busSalesOrderVehicleFeign; |
|||
@Autowired |
|||
private BusSalesOrderFeign busSalesOrderFeign; |
|||
@Autowired |
|||
private BusSalesOrderLoancontractFeign busSalesOrderLoancontractFeign; |
|||
@Autowired |
|||
private LoanFileService loanFileService; |
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
|
|||
public PagerVo<LoanWarrantInformationVo> listPage(PagerQuery<LoanWarrantInformationQuery> pq) { |
|||
IPage<LoanWarrantInformation> page = PagerUtil.queryToPage(pq); |
|||
LoanWarrantInformationQuery pagerQuery = pq.getParams(); |
|||
QueryWrapper<LoanWarrantInformation> qw = new QueryWrapper<>(); |
|||
//=======================
|
|||
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|||
privilegeQuery.setOrgPath(pagerQuery.getOrgPath()); |
|||
privilegeQuery.setMenuSid(pagerQuery.getMenuSid()); |
|||
privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl()); |
|||
privilegeQuery.setUserSid(pagerQuery.getUserSid()); |
|||
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|||
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|||
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|||
String orgSidPath = pagerQuery.getOrgPath(); |
|||
orgSidPath = orgSidPath + "/"; |
|||
int i1 = orgSidPath.indexOf("/"); |
|||
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|||
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|||
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|||
String orgLevelKey = defaultIdReltBean.getData(); |
|||
if ("1".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i1); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i2); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i3); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("4".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i4); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("5".equals(orgLevelKey)) { |
|||
qw.eq("createBySid", pagerQuery.getUserSid()); |
|||
} else { |
|||
PagerVo<LoanWarrantInformationVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
} else { |
|||
PagerVo<LoanWarrantInformationVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
//=======================
|
|||
//分公司
|
|||
if (StringUtils.isNotBlank(pagerQuery.getCompany())) { |
|||
qw.like("useOrgName", pagerQuery.getCompany()); |
|||
} |
|||
//销售部门
|
|||
if (StringUtils.isNotBlank(pagerQuery.getDepartment())) { |
|||
qw.like("department", pagerQuery.getDepartment()); |
|||
} |
|||
//销售专员
|
|||
if (StringUtils.isNotBlank(pagerQuery.getSalesman())) { |
|||
qw.like("salesman", pagerQuery.getSalesman()); |
|||
} |
|||
//消贷合同号
|
|||
if (StringUtils.isNotBlank(pagerQuery.getContractNo())) { |
|||
qw.like("contractNo", pagerQuery.getContractNo()); |
|||
} |
|||
//贷款人
|
|||
if (StringUtils.isNotBlank(pagerQuery.getBorrowerName())) { |
|||
qw.like("borrowerName", pagerQuery.getBorrowerName()); |
|||
} |
|||
//车架号
|
|||
if (StringUtils.isNotBlank(pagerQuery.getVinNo())) { |
|||
qw.like("vinNo", pagerQuery.getVinNo()); |
|||
} |
|||
//资方
|
|||
if (StringUtils.isNotBlank(pagerQuery.getAuditStateKey())) { |
|||
qw.eq("auditStateKey", pagerQuery.getAuditStateKey()); |
|||
} |
|||
String createStartTime = pagerQuery.getStartTime(); |
|||
String createEndTime = pagerQuery.getEndTime(); |
|||
qw.apply(StringUtils.isNotEmpty(createStartTime), "date_format (transferDate,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). |
|||
apply(StringUtils.isNotEmpty(createEndTime), "date_format (transferDate,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" |
|||
); |
|||
qw.eq("isDelete", 0); |
|||
qw.orderByDesc("createTime"); |
|||
IPage<LoanWarrantInformationVo> pagging = baseMapper.listPage(page, qw); |
|||
PagerVo<LoanWarrantInformationVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
/** |
|||
* 审核回显 |
|||
* |
|||
* @param sid |
|||
* @return |
|||
*/ |
|||
public ResultBean<LoanAuditInfoVo> getAuditInfo(String sid) { |
|||
ResultBean<LoanAuditInfoVo> rb = ResultBean.fireFail(); |
|||
LoanAuditInfoVo vo = new LoanAuditInfoVo(); |
|||
LoanWarrantInformation loanWarrantInformation = fetchBySid(sid); |
|||
if (null != loanWarrantInformation) { |
|||
BeanUtil.copyProperties(loanWarrantInformation, vo); |
|||
String busVinSid = loanWarrantInformation.getBusVinSid(); |
|||
//登记证 1-2页
|
|||
List<LoanFile> fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.REGISTRATION_FILES_ONE.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> registrationFiles1 = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). |
|||
collect(Collectors.toList()); |
|||
vo.setRegistrationFiles1(registrationFiles1); |
|||
} |
|||
//登记证 3-4页
|
|||
fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.REGISTRATION_FILES_TWO.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> registrationFiles2 = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setRegistrationFiles2(registrationFiles2); |
|||
} |
|||
//营运证
|
|||
fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.TAXI_FILES.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> taxiFiles = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setTaxiFiles(taxiFiles); |
|||
} |
|||
//行驶证
|
|||
fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.DRIVING_CARD_FILES.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> drivingFiles = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setDrivingFiles(drivingFiles); |
|||
} |
|||
} |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
/** |
|||
* 审核保存 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean<String> saveWarrantInfo(LoanAuditInfoDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
LoanWarrantInformation entity = fetchBySid(dto.getSid()); |
|||
BeanUtil.copyProperties(dto, entity); |
|||
String busVinSid = entity.getBusVinSid(); |
|||
baseMapper.updateById(entity); |
|||
//删除附件表中关于该linkSid的文件
|
|||
loanFileService.deleteByLinkSid(busVinSid); |
|||
List<String> registrationFiles1 = dto.getRegistrationFiles1(); |
|||
if (!registrationFiles1.isEmpty()) { |
|||
loanFileService.saveAll(busVinSid, registrationFiles1, LoanFileEnum.REGISTRATION_FILES_ONE.getAttachType()); |
|||
} |
|||
List<String> registrationFiles2 = dto.getRegistrationFiles2(); |
|||
if (!registrationFiles2.isEmpty()) { |
|||
loanFileService.saveAll(busVinSid, registrationFiles2, LoanFileEnum.REGISTRATION_FILES_TWO.getAttachType()); |
|||
} |
|||
List<String> taxiFiles = dto.getTaxiFiles(); |
|||
if (!taxiFiles.isEmpty()) { |
|||
loanFileService.saveAll(busVinSid, taxiFiles, LoanFileEnum.TAXI_FILES.getAttachType()); |
|||
} |
|||
List<String> drivingFiles = dto.getDrivingFiles(); |
|||
if (!drivingFiles.isEmpty()) { |
|||
loanFileService.saveAll(busVinSid, drivingFiles, LoanFileEnum.DRIVING_CARD_FILES.getAttachType()); |
|||
} |
|||
return rb.success().setData(dto.getSid()); |
|||
} |
|||
|
|||
/** |
|||
* 审核保存 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean<String> approvedWarrantInfo(LoanAuditInfoDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
ResultBean<String> resultBean = saveWarrantInfo(dto); |
|||
if (resultBean.getSuccess()) { |
|||
LoanWarrantInformation entity = fetchBySid(dto.getSid()); |
|||
entity.setAuditStateKey("002"); |
|||
entity.setAuditStateValue("已审核未移交"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
return rb.success().setData(dto.getSid()); |
|||
} |
|||
|
|||
/** |
|||
* 移交回显 |
|||
* |
|||
* @param sids |
|||
* @return |
|||
*/ |
|||
public ResultBean<LoanTransferInfoVo> transferInfo(String[] sids) { |
|||
ResultBean<LoanTransferInfoVo> rb = ResultBean.fireFail(); |
|||
LoanTransferInfoVo vo = new LoanTransferInfoVo(); |
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|||
StringBuffer sbVinNo = new StringBuffer(); |
|||
StringBuffer sbConNo = new StringBuffer(); |
|||
HashSet<String> hashSet = new HashSet<>(); |
|||
for (String sid : sids) { |
|||
LoanWarrantInformation entity = fetchBySid(sid); |
|||
if (StringUtils.isNotBlank(entity.getVinNo())) { |
|||
sbVinNo.append(entity.getVinNo()).append(","); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getContractNo())) { |
|||
hashSet.add(entity.getContractNo()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTransferRemarks())) { |
|||
vo.setTransferRemarks(entity.getTransferRemarks()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getBankName())) { |
|||
vo.setBankName(entity.getBankName()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTransferInformation())) { |
|||
vo.setTransferInformation(entity.getTransferInformation()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTransferWayKey())) { |
|||
vo.setTransferWayKey(entity.getTransferWayKey()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTransferWayValue())) { |
|||
vo.setTransferWayValue(entity.getTransferWayValue()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTrackingNo())) { |
|||
vo.setTrackingNo(entity.getTrackingNo()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getRecipient())) { |
|||
vo.setRecipient(entity.getRecipient()); |
|||
} |
|||
if (null != entity.getDeliveryDate()) { |
|||
vo.setDeliveryDate(sdf.format(entity.getDeliveryDate())); |
|||
} |
|||
} |
|||
if (sbVinNo.length() > 0) { |
|||
sbVinNo.delete(sbVinNo.length() - 1, sbVinNo.length()); |
|||
vo.setVinNo(sbVinNo.toString()); |
|||
} |
|||
if (!hashSet.isEmpty()) { |
|||
for (String s : hashSet) { |
|||
sbConNo.append(s).append(","); |
|||
} |
|||
} |
|||
if (sbVinNo.length() > 0) { |
|||
sbConNo.delete(sbConNo.length() - 1, sbConNo.length()); |
|||
vo.setContractNo(sbConNo.toString()); |
|||
} |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 移交保存 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean saveTransferInfo(LoanTransferInfoDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
String[] sids = dto.getSids(); |
|||
for (String sid : sids) { |
|||
LoanWarrantInformation entity = fetchBySid(sid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
entity.setTransferDate(new DateTime()); |
|||
entity.setAuditStateKey("003"); |
|||
entity.setAuditStateValue("已移交"); |
|||
int i = baseMapper.updateById(entity); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue