Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 1 year ago
parent
commit
eda257fb0a
  1. 1
      anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java
  2. 1
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfile/LoanFileEnum.java
  3. 38
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/LoanSubletApply.java
  4. 35
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/LoanSubletApplyDto.java
  5. 53
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/LoanSubletApplyInit.java
  6. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/LoanSubletApplyQuery.java
  7. 4
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/LoanSubletApplyVo.java
  8. 3
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/SubletInitVo.java
  9. 1
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/SubletVinList.java
  10. 9
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletveh/LoanSubletVeh.java
  11. 16
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyMapper.java
  12. 125
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyMapper.xml
  13. 520
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyService.java
  14. 7
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletveh/LoanSubletVehMapper.xml
  15. 2
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/overduebank/OverdueBankVo.java
  16. 2
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/overduefin/OverDueFnAppVo.java
  17. 2
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/overduebank/OverdueBankService.java
  18. 2
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/overduefin/OverdueFinService.java

1
anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java

@ -72,6 +72,7 @@ public enum ProcDefEnum {
LOANRESTOREREPORTAPPLY("车辆交回事前报备申请", "process_w796wtt7:1:7822504"), LOANRESTOREREPORTAPPLY("车辆交回事前报备申请", "process_w796wtt7:1:7822504"),
LOANREDEMPTIONAPPLY("车辆交回赎回申请", "process_qu4fq4r6:1:7820004"), LOANREDEMPTIONAPPLY("车辆交回赎回申请", "process_qu4fq4r6:1:7820004"),
LOANRETUENINBOUNDAPPLY("交回车辆入库申请", "process_h0i1vnn8:1:7945004"), LOANRETUENINBOUNDAPPLY("交回车辆入库申请", "process_h0i1vnn8:1:7945004"),
LOANSUBLETAPPLY("交回车辆二次转租申请", "process_lu7pdwzs:1:7940004"),
/******************************测试流程id*********************************************/ /******************************测试流程id*********************************************/

1
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfile/LoanFileEnum.java

@ -30,6 +30,7 @@ public enum LoanFileEnum {
VEHCLEARANCE("021", "车辆远程解控附件"), VEHCLEARANCE("021", "车辆远程解控附件"),
RESTOREREPORT("022", "车辆交回事前报备附件"), RESTOREREPORT("022", "车辆交回事前报备附件"),
REDEMPTION("023", "车辆交回赎回申请附件"), REDEMPTION("023", "车辆交回赎回申请附件"),
SUBLETAPPLY("024", "车辆交回二次转租申请附件"),
; ;

38
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/LoanSubletApply.java

@ -14,8 +14,8 @@ import java.util.Date;
* @version 1.0 * @version 1.0
* @since 1.0 * @since 1.0
*/ */
@ApiModel(value = "赎回申请", description = "赎回申请") @ApiModel(value = "车辆二次转租申请", description = "车辆二次转租申请")
@TableName("loan_redemption_apply") @TableName("loan_sublet_apply")
@Data @Data
public class LoanSubletApply extends BaseEntity { public class LoanSubletApply extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -56,17 +56,31 @@ public class LoanSubletApply extends BaseEntity {
private String customer; private String customer;
@ApiModelProperty("贷款人") @ApiModelProperty("贷款人")
private String borrowerName; private String borrowerName;
@ApiModelProperty("本次还款金额") @ApiModelProperty("二次转租价格")
private BigDecimal amount; private BigDecimal amount;
@ApiModelProperty("赎回方案") @ApiModelProperty("转租方案说明")
private String plan; private String plan;
@ApiModelProperty("停放地点") @ApiModelProperty("0是1否")
private String location; private Integer agree;
@ApiModelProperty("相关费用") @ApiModelProperty("新车主名称")
private BigDecimal fees; private String vinOwner;
@ApiModelProperty("相关费用说明") @ApiModelProperty("客户类型key")
private String feesShows; private String customerTypeKey;
@ApiModelProperty("交回车辆主车台账sid") @ApiModelProperty("客户类型")
private String ledgerSid; private String customerType;
@ApiModelProperty("联系电话")
private String phoneNum;
@ApiModelProperty("证件地址")
private String cardAddress;
@ApiModelProperty("有效期")
private String endDate;
@ApiModelProperty("证件号码")
private String idNumber;
@ApiModelProperty("证件类型key")
private String certificateTypeKey;
@ApiModelProperty("证件类型(个人为身份证/企业为营业执照)")
private String certificateType;
@ApiModelProperty("新车主客户sid")
private String newCustomerSid;
} }

35
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/LoanSubletApplyDto.java

@ -15,7 +15,7 @@ import java.util.List;
@Data @Data
public class LoanSubletApplyDto implements Dto { public class LoanSubletApplyDto implements Dto {
private String ledgerSid;
private String sid; private String sid;
private String userSid; private String userSid;
private String dept; private String dept;
@ -33,17 +33,32 @@ public class LoanSubletApplyDto implements Dto {
private String customer; private String customer;
@ApiModelProperty("贷款人") @ApiModelProperty("贷款人")
private String borrowerName; private String borrowerName;
@ApiModelProperty("本次还款金额") @ApiModelProperty("二次转租价格")
private String amount; private String amount;
@ApiModelProperty("赎回方案") @ApiModelProperty("转租方案说明")
private String plan; private String plan;
@ApiModelProperty("停放地点") @ApiModelProperty("0是1否")
private String location; private String agree;
@ApiModelProperty("相关费用") @ApiModelProperty("新车主名称")
private String fees; private String vinOwner;
@ApiModelProperty("相关费用说明") @ApiModelProperty("客户类型key")
private String feesShows; private String customerTypeKey;
private String busVinSid; //催收记录 @ApiModelProperty("客户类型")
private String customerType;
@ApiModelProperty("联系电话")
private String phoneNum;
@ApiModelProperty("证件地址")
private String cardAddress;
@ApiModelProperty("有效期")
private String endDate;
@ApiModelProperty("证件号码")
private String idNumber;
@ApiModelProperty("证件类型key")
private String certificateTypeKey;
@ApiModelProperty("证件类型(个人为身份证/企业为营业执照)")
private String certificateType;
@ApiModelProperty("新车主客户sid")
private String newCustomerSid;
private List<LoanSubletApplyFile> files = new ArrayList<>(); private List<LoanSubletApplyFile> files = new ArrayList<>();
private List<SubletVinList> vinList = new ArrayList<>(); private List<SubletVinList> vinList = new ArrayList<>();
} }

53
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/LoanSubletApplyInit.java

@ -4,6 +4,7 @@ import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -15,7 +16,6 @@ import java.util.List;
@Data @Data
public class LoanSubletApplyInit implements Vo { public class LoanSubletApplyInit implements Vo {
private String ledgerSid;
private String sid; private String sid;
private String userSid; private String userSid;
private String dept; private String dept;
@ -37,35 +37,32 @@ public class LoanSubletApplyInit implements Vo {
private String customer; private String customer;
@ApiModelProperty("贷款人") @ApiModelProperty("贷款人")
private String borrowerName; private String borrowerName;
@ApiModelProperty("本次还款金额") @ApiModelProperty("二次转租价格")
private String amount; private String amount;
@ApiModelProperty("赎回方案") @ApiModelProperty("转租方案说明")
private String plan; private String plan;
@ApiModelProperty("停放地点") @ApiModelProperty("0是1否")
private String location; private String agree;
@ApiModelProperty("相关费用") @ApiModelProperty("新车主名称")
private String fees; private String vinOwner;
@ApiModelProperty("相关费用说明") @ApiModelProperty("客户类型key")
private String feesShows; private String customerTypeKey;
//费用 @ApiModelProperty("客户类型")
@ApiModelProperty("已还金额") private String customerType;
private String alRepaidMoney; // 已还金额 @ApiModelProperty("联系电话")
@ApiModelProperty("当前逾期金额") private String phoneNum;
private String currentBeMoney; // 当前逾期金额 @ApiModelProperty("证件地址")
@ApiModelProperty("其中资金占用费") private String cardAddress;
private String wheFundOccMoney; // 其中资金占用费 @ApiModelProperty("有效期")
@ApiModelProperty("未到期金额") private String endDate;
private String unexpiredMoney; // 未到期金额 @ApiModelProperty("证件号码")
@ApiModelProperty("总期数") private String idNumber;
private String nper; // 总期数 @ApiModelProperty("证件类型key")
@ApiModelProperty("当前期数") private String certificateTypeKey;
private String currentPeriod; // 当前期数 @ApiModelProperty("证件类型(个人为身份证/企业为营业执照)")
@ApiModelProperty("已还金额换算期数") private String certificateType;
private String alRepaidMoneyConPeriod; // 已还金额换算期数 @ApiModelProperty("新车主客户sid")
@ApiModelProperty("逾期金额换算期数") private String newCustomerSid;
private String beOverdueMoneyAndPeriod; // 逾期金额换算期数
private String busVinSid; //催收记录
private String rksqSid; //入库申请sid
private List<LoanSubletApplyFile> files = new ArrayList<>(); private List<LoanSubletApplyFile> files = new ArrayList<>();
private List<SubletVinList> vinList = new ArrayList<>(); private List<SubletVinList> vinList = new ArrayList<>();

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/LoanSubletApplyQuery.java

@ -44,4 +44,6 @@ public class LoanSubletApplyQuery implements Query {
private String vehMark; private String vehMark;
@ApiModelProperty("申请部门") @ApiModelProperty("申请部门")
private String dept; private String dept;
@ApiModelProperty("原车主是否同意0是1否")
private String agree;
} }

4
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/LoanSubletApplyVo.java

@ -39,10 +39,12 @@ public class LoanSubletApplyVo implements Vo {
private String customer; private String customer;
@ApiModelProperty("贷款人") @ApiModelProperty("贷款人")
private String borrowerName; private String borrowerName;
@ApiModelProperty("本次还款金额") @ApiModelProperty("二次转租价格")
private String amount; private String amount;
@ApiModelProperty("车架号") @ApiModelProperty("车架号")
private String vinNo; private String vinNo;
@ApiModelProperty("车牌号") @ApiModelProperty("车牌号")
private String vehMark; private String vehMark;
@ApiModelProperty("原车主是否同意0是1否")
private String agree;
} }

3
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/SubletInitVo.java

@ -21,12 +21,11 @@ public class SubletInitVo {
private String customer; private String customer;
@ApiModelProperty("贷款人") @ApiModelProperty("贷款人")
private String borrowerName; private String borrowerName;
@ApiModelProperty("停放地点")
private String location;
private String busVinSid; private String busVinSid;
private String vinSid; private String vinSid;
private String vinNo; private String vinNo;
private String vehMark; private String vehMark;
private String vehType; private String vehType;
private String vehModel; private String vehModel;
private String pSid;
} }

1
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletapply/SubletVinList.java

@ -9,6 +9,7 @@ import lombok.Data;
*/ */
@Data @Data
public class SubletVinList { public class SubletVinList {
private String ledgerSid;
private String vinSid; private String vinSid;
private String vinNo; private String vinNo;
private String vehMark; private String vehMark;

9
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansubletveh/LoanSubletVeh.java

@ -11,8 +11,8 @@ import lombok.Data;
* @version 1.0 * @version 1.0
* @since 1.0 * @since 1.0
*/ */
@ApiModel(value = "赎回车辆列表", description = "赎回车辆列表") @ApiModel(value = "车辆二次转租车辆列表", description = "车辆二次转租车辆列表")
@TableName("loan_redemption_veh") @TableName("loan_sublet_veh")
@Data @Data
public class LoanSubletVeh extends BaseEntity { public class LoanSubletVeh extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -27,8 +27,11 @@ public class LoanSubletVeh extends BaseEntity {
private String busVinSid; private String busVinSid;
@ApiModelProperty("车辆sid") @ApiModelProperty("车辆sid")
private String vinSid; private String vinSid;
@ApiModelProperty("0主车1挂车") @ApiModelProperty("主车/挂车")
private String vehType; private String vehType;
@ApiModelProperty("车型") @ApiModelProperty("车型")
private String vehModel; private String vehModel;
@ApiModelProperty("交回车辆台账sid")
private String ledgerSid;
} }

16
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyMapper.java

@ -5,10 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.riskcenter.api.loanredemptionapply.*; import com.yxt.anrui.riskcenter.api.loanredemptionapply.*;
import com.yxt.anrui.riskcenter.api.loansubletapply.LoanSubletApply; import com.yxt.anrui.riskcenter.api.loansubletapply.*;
import com.yxt.anrui.riskcenter.api.loansubletapply.LoanSubletApplyVo;
import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinListQuery;
import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinListVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -28,4 +25,15 @@ public interface LoanSubletApplyMapper extends BaseMapper<LoanSubletApply> {
int updateFlowFiled(Map<String, Object> map); int updateFlowFiled(Map<String, Object> map);
SubletInitVo selReturnLegerBySid(@Param("ledgerSid") String ledgerSid);
SubletInitVo selLoanInfoByMainVeh(@Param("busVinSid") String busVinSid);
SubletVinList selReturnVinLegerBySid(@Param("ledgerSid") String ledgerSid);
SubletVinList selReturnTrVinLegerByPSid(@Param("ledgerSid")String ledgerSid);
SubletInitVo selLoanInfoByTrVeh(@Param("ledgerSid")String ledgerSid);
SubletVinList selReturnTrVinLegerBySid(@Param("ledgerSid")String ledgerSid);
} }

125
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyMapper.xml

@ -19,26 +19,38 @@
<select id="listPage" resultType="com.yxt.anrui.riskcenter.api.loansubletapply.LoanSubletApplyVo"> <select id="listPage" resultType="com.yxt.anrui.riskcenter.api.loansubletapply.LoanSubletApplyVo">
SELECT SELECT
a.sid, *
a.nodeState, FROM
a.useOrgName as company, (
a.dept, SELECT
a.applyName, sa.sid,
date_format(a.applyDate, '%Y-%m-%d') as applyDate, sa.isDelete,
a.procDefId, sa.nodeState,
a.procInstId, sa.agree,
date_format(a.closingDate, '%Y-%m-%d') as closingDate, sa.useOrgSid,
a.loanContractNo, sa.createBySid,
a.bankName, sa.orgSidPath,
a.bankContractNo, sa.useOrgName AS company,
a.borrowerName, sa.dept,
a.customer, sa.applyName,
a.amount, date_format( sa.applyDate, '%Y-%m-%d' ) AS applyDate,
sa.procDefId,
sa.procInstId,
date_format( sa.closingDate, '%Y-%m-%d' ) AS closingDate,
sa.loanContractNo,
sa.bankName,
sa.bankContractNo,
sa.borrowerName,
sa.customer,
sa.amount,
( SELECT count(*) FROM loan_sublet_veh h WHERE mainSid = sa.sid ) AS `count`,
v.vehType,
v.vinNo, v.vinNo,
v.vehMark v.vehMark
FROM loan_redemption_apply as a FROM
LEFT JOIN loan_redemption_veh as v loan_sublet_apply AS sa
ON a.sid = v.mainSid LEFT JOIN loan_sublet_veh AS v ON sa.sid = v.mainSid
) a
<where> <where>
${ew.sqlSegment} ${ew.sqlSegment}
</where> </where>
@ -52,10 +64,11 @@
v.customer, v.customer,
v.borrowerName, v.borrowerName,
v.vehType, v.vehType,
(SELECT c.bankName FROM anrui_buscenter.bus_sales_order_loancontract as c WHERE c.sid = l.bankName
(SELECT b.loanContractSid FROM anrui_buscenter.bus_sales_order_vehicle as b WHERE b.linkSid = v.vinSid and FROM
b.borrowerSid = v.borrowerSid)) as bankName loan_return_veh_ledger AS v
FROM loan_return_veh_ledger as v LEFT JOIN anrui_buscenter.bus_sales_order_vehicle as b ON v.busVinSid = b.sid
LEFT JOIN anrui_buscenter.bus_sales_order_loancontract as l ON b.loanContractSid = l.sid
<where> <where>
${ew.sqlSegment} ${ew.sqlSegment}
</where> </where>
@ -96,4 +109,72 @@
FROM loan_return_trailer_ledger as t FROM loan_return_trailer_ledger as t
WHERE t.mainSid = #{ledgerSid} WHERE t.mainSid = #{ledgerSid}
</select> </select>
<select id="selReturnLegerBySid" resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletInitVo">
SELECT sid legerSid,
customer,
borrowerName,
busVinSid,
vehType,
pSid
FROM loan_return_veh_ledger
WHERE sid = #{ledgerSid}
</select>
<select id="selLoanInfoByMainVeh" resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletInitVo">
SELECT l.bankName,
l.bankContractNo,
l.loanContractNo
FROM anrui_buscenter.bus_sales_order_loancontract as l
LEFT JOIN anrui_buscenter.bus_sales_order_vehicle as b
ON l.sid = b.loanContractSid
WHERE b.sid = #{busVinSid}
</select>
<select id="selReturnVinLegerBySid"
resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList">
SELECT sid ledgerSid,
vinSid,
vinNo,
vehMark,
vehType,
vehModel,
busVinSid
FROM loan_return_veh_ledger
WHERE sid = #{ledgerSid}
</select>
<select id="selReturnTrVinLegerByPSid"
resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList">
SELECT sid ledgerSid,
vinSid,
vinNo,
vehMark,
vehType,
vehModel,
busVinSid
FROM loan_return_veh_ledger
WHERE pSid = #{ledgerSid}
and disposal = '未处置'
and stockState = '库存'
</select>
<select id="selLoanInfoByTrVeh" resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletInitVo">
SELECT l.bankName,
l.bankContractNo,
l.loanContractNo
FROM anrui_buscenter.bus_sales_order_loancontract as l
LEFT JOIN anrui_buscenter.bus_sales_order_vehicle as b
ON l.sid = b.loanContractSid
WHERE b.sid = (SELECT busVinSid
FROM loan_return_veh_ledger
WHERE sid = (SELECT pSid FROM loan_return_veh_ledger WHERE sid = #{ledgerSid}))
</select>
<select id="selReturnTrVinLegerBySid"
resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList">
SELECT sid ledgerSid,
vinSid,
vinNo,
vehMark,
vehType,
vehModel,
busVinSid
FROM loan_return_veh_ledger
WHERE sid = #{ledgerSid}
</select>
</mapper> </mapper>

520
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyService.java

@ -38,12 +38,14 @@ import com.yxt.anrui.riskcenter.api.loanrestorereportapply.AlrepaidAndArrVo;
import com.yxt.anrui.riskcenter.api.loansubletapply.*; import com.yxt.anrui.riskcenter.api.loansubletapply.*;
import com.yxt.anrui.riskcenter.api.loansubletapply.app.AppSubletDetailsVo; import com.yxt.anrui.riskcenter.api.loansubletapply.app.AppSubletDetailsVo;
import com.yxt.anrui.riskcenter.api.loansubletapply.flow.*; import com.yxt.anrui.riskcenter.api.loansubletapply.flow.*;
import com.yxt.anrui.riskcenter.api.loansubletveh.LoanSubletVeh;
import com.yxt.anrui.riskcenter.biz.loanbuckleapplyrecord.LoanBuckleApplyRecordService; import com.yxt.anrui.riskcenter.biz.loanbuckleapplyrecord.LoanBuckleApplyRecordService;
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService; import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService;
import com.yxt.anrui.riskcenter.biz.loanredemptionveh.LoanRedemptionVehService; import com.yxt.anrui.riskcenter.biz.loanredemptionveh.LoanRedemptionVehService;
import com.yxt.anrui.riskcenter.biz.loanrepaymenthistory.LoanRepaymentHistoryService; import com.yxt.anrui.riskcenter.biz.loanrepaymenthistory.LoanRepaymentHistoryService;
import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService; import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService;
import com.yxt.anrui.riskcenter.biz.loanrestorereportapply.LoanRestoreReportApplyService; import com.yxt.anrui.riskcenter.biz.loanrestorereportapply.LoanRestoreReportApplyService;
import com.yxt.anrui.riskcenter.biz.loansubletveh.LoanSubletVehService;
import com.yxt.common.base.config.component.FileUploadComponent; import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil; import com.yxt.common.base.utils.PagerUtil;
@ -108,7 +110,7 @@ public class LoanSubletApplyService extends MybatisBaseService<LoanSubletApplyMa
@Autowired @Autowired
private LoanRestoreReportApplyService loanRestoreReportApplyService; private LoanRestoreReportApplyService loanRestoreReportApplyService;
@Autowired @Autowired
private LoanRedemptionVehService loanRedemptionVehService; private LoanSubletVehService loanSubletVehService;
public PagerVo<LoanSubletApplyVo> listPage(PagerQuery<LoanSubletApplyQuery> pq) { public PagerVo<LoanSubletApplyVo> listPage(PagerQuery<LoanSubletApplyQuery> pq) {
IPage<LoanSubletApply> page = PagerUtil.queryToPage(pq); IPage<LoanSubletApply> page = PagerUtil.queryToPage(pq);
@ -121,37 +123,37 @@ public class LoanSubletApplyService extends MybatisBaseService<LoanSubletApplyMa
privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl()); privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl());
privilegeQuery.setUserSid(pagerQuery.getUserSid()); privilegeQuery.setUserSid(pagerQuery.getUserSid());
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { // if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人) // //数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = pagerQuery.getOrgPath(); // String orgSidPath = pagerQuery.getOrgPath();
orgSidPath = orgSidPath + "/"; // orgSidPath = orgSidPath + "/";
int i1 = orgSidPath.indexOf("/"); // int i1 = orgSidPath.indexOf("/");
int i2 = orgSidPath.indexOf("/", i1 + 1); // int i2 = orgSidPath.indexOf("/", i1 + 1);
int i3 = orgSidPath.indexOf("/", i2 + 1); // int i3 = orgSidPath.indexOf("/", i2 + 1);
int i4 = orgSidPath.indexOf("/", i3 + 1); // int i4 = orgSidPath.indexOf("/", i3 + 1);
String orgLevelKey = defaultIdReltBean.getData(); // String orgLevelKey = defaultIdReltBean.getData();
if ("1".equals(orgLevelKey)) { // if ("1".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i1); // orgSidPath = orgSidPath.substring(0, i1);
qw.like("a.orgSidPath", orgSidPath); // qw.like("a.orgSidPath", orgSidPath);
} else if ("2".equals(orgLevelKey)) { // } else if ("2".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i2); // orgSidPath = orgSidPath.substring(0, i2);
qw.like("a.orgSidPath", orgSidPath); // qw.like("a.orgSidPath", orgSidPath);
} else if ("3".equals(orgLevelKey)) { // } else if ("3".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i3); // orgSidPath = orgSidPath.substring(0, i3);
qw.like("a.orgSidPath", orgSidPath); // qw.like("a.orgSidPath", orgSidPath);
} else if ("4".equals(orgLevelKey)) { // } else if ("4".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i4); // orgSidPath = orgSidPath.substring(0, i4);
qw.like("a.orgSidPath", orgSidPath); // qw.like("a.orgSidPath", orgSidPath);
} else if ("5".equals(orgLevelKey)) { // } else if ("5".equals(orgLevelKey)) {
qw.eq("a.createBySid", pagerQuery.getUserSid()); // qw.eq("a.createBySid", pagerQuery.getUserSid());
} else { // } else {
PagerVo<LoanSubletApplyVo> p = new PagerVo<>(); // PagerVo<LoanSubletApplyVo> p = new PagerVo<>();
return p; // return p;
} // }
} else { // } else {
PagerVo<LoanSubletApplyVo> p = new PagerVo<>(); // PagerVo<LoanSubletApplyVo> p = new PagerVo<>();
return p; // return p;
} // }
//======================= //=======================
//分公司 //分公司
if (StringUtils.isNotBlank(pagerQuery.getCompany())) { if (StringUtils.isNotBlank(pagerQuery.getCompany())) {
@ -187,11 +189,11 @@ public class LoanSubletApplyService extends MybatisBaseService<LoanSubletApplyMa
} }
//车架号 //车架号
if (StringUtils.isNotBlank(pagerQuery.getVinNo())) { if (StringUtils.isNotBlank(pagerQuery.getVinNo())) {
qw.like("v.vinNo", pagerQuery.getVinNo()); qw.like("a.vinNo", pagerQuery.getVinNo());
} }
//车牌号 //车牌号
if (StringUtils.isNotBlank(pagerQuery.getVehMark())) { if (StringUtils.isNotBlank(pagerQuery.getVehMark())) {
qw.like("v.vehMark", pagerQuery.getVehMark()); qw.like("a.vehMark", pagerQuery.getVehMark());
} }
String applyStartTime = pagerQuery.getApplyStartDate(); String applyStartTime = pagerQuery.getApplyStartDate();
String applyEndTime = pagerQuery.getApplyEndDate(); String applyEndTime = pagerQuery.getApplyEndDate();
@ -204,8 +206,8 @@ public class LoanSubletApplyService extends MybatisBaseService<LoanSubletApplyMa
apply(StringUtils.isNotEmpty(closingEndDate), "date_format (a.closingDate,'%Y-%m-%d') <= date_format('" + closingEndDate + "','%Y-%m-%d')" apply(StringUtils.isNotEmpty(closingEndDate), "date_format (a.closingDate,'%Y-%m-%d') <= date_format('" + closingEndDate + "','%Y-%m-%d')"
); );
qw.eq("a.isDelete", 0); qw.eq("a.isDelete", 0);
qw.orderByDesc("a.createTime"); qw.orderByDesc("a.applyDate");
qw.eq("v.vehType", "0"); qw.apply("(a.count > 1 AND a.vehType = '主车' ) OR (a.count = 1)");
IPage<LoanSubletApplyVo> pagging = baseMapper.listPage(page, qw); IPage<LoanSubletApplyVo> pagging = baseMapper.listPage(page, qw);
PagerVo<LoanSubletApplyVo> p = PagerUtil.pageToVo(pagging, null); PagerVo<LoanSubletApplyVo> p = PagerUtil.pageToVo(pagging, null);
return p; return p;
@ -232,7 +234,7 @@ public class LoanSubletApplyService extends MybatisBaseService<LoanSubletApplyMa
qw.eq("v.isDelete", 0); qw.eq("v.isDelete", 0);
qw.orderByDesc("v.createTime"); qw.orderByDesc("v.createTime");
qw.eq("v.stockState", "库存"); qw.eq("v.stockState", "库存");
qw.eq("disposal", "未处置"); qw.eq("v.disposal", "未处置");
IPage<SubletVinListVo> pagging = baseMapper.getVinList(page, qw); IPage<SubletVinListVo> pagging = baseMapper.getVinList(page, qw);
PagerVo<SubletVinListVo> p = PagerUtil.pageToVo(pagging, null); PagerVo<SubletVinListVo> p = PagerUtil.pageToVo(pagging, null);
return p; return p;
@ -240,72 +242,63 @@ public class LoanSubletApplyService extends MybatisBaseService<LoanSubletApplyMa
public ResultBean<LoanSubletApplyInit> subletInit(String ledgerSid) { public ResultBean<LoanSubletApplyInit> subletInit(String ledgerSid) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
LoanRedemptionApplyInit vo = new LoanRedemptionApplyInit(); LoanSubletApplyInit vo = new LoanSubletApplyInit();
RedemptionInitVo redemptionInitVo = baseMapper.redemptionInit(ledgerSid); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (null != redemptionInitVo) { vo.setApplyDate(sdf.format(new Date()));
BeanUtil.copyProperties(redemptionInitVo, vo); List<SubletVinList> vinList = new ArrayList<>();
if (StringUtils.isNotBlank(redemptionInitVo.getBusVinSid())) { SubletInitVo subletInitVo = baseMapper.selReturnLegerBySid(ledgerSid);
AlrepaidAndArrVo alrepaidAndArr = loanRestoreReportApplyService.getAlrepaidAndArr(redemptionInitVo.getBusVinSid()); String vehType = "";
if (null != alrepaidAndArr) { if (null != subletInitVo) {
//已还金额 if (StringUtils.isNotBlank(subletInitVo.getCustomer())) {
if (StringUtils.isNotBlank(alrepaidAndArr.getAlRepaidMoney())) { vo.setCustomer(subletInitVo.getCustomer());
vo.setAlRepaidMoney(alrepaidAndArr.getAlRepaidMoney()); }
} if (StringUtils.isNotBlank(subletInitVo.getBorrowerName())) {
//已还金额换算期数 vo.setBorrowerName(subletInitVo.getBorrowerName());
if (StringUtils.isNotBlank(alrepaidAndArr.getAlRepaidMoneyConPeriod())) { }
vo.setAlRepaidMoneyConPeriod(alrepaidAndArr.getAlRepaidMoneyConPeriod()); if (StringUtils.isNotBlank(subletInitVo.getVehType())) {
} vehType = subletInitVo.getVehType();
//逾期金额换算期数 if (vehType.equals("主车")) {
if (StringUtils.isNotBlank(alrepaidAndArr.getBeOverdueMoneyAndPeriod())) { SubletInitVo mainVeh = baseMapper.selLoanInfoByMainVeh(subletInitVo.getBusVinSid());
vo.setBeOverdueMoneyAndPeriod(alrepaidAndArr.getBeOverdueMoneyAndPeriod()); if (null != mainVeh) {
} if (StringUtils.isNotBlank(mainVeh.getBankName())) {
//总期数 vo.setBankName(mainVeh.getBankName());
if (StringUtils.isNotBlank(alrepaidAndArr.getNper())) { }
vo.setNper(alrepaidAndArr.getNper()); if (StringUtils.isNotBlank(mainVeh.getLoanContractNo())) {
vo.setLoanContractNo(mainVeh.getLoanContractNo());
}
if (StringUtils.isNotBlank(mainVeh.getBankContractNo())) {
vo.setBankContractNo(mainVeh.getBankContractNo());
}
} }
//当前逾期金额 SubletVinList mVeh = baseMapper.selReturnVinLegerBySid(ledgerSid);
if (StringUtils.isNotBlank(alrepaidAndArr.getCurrentBeMoney())) { if (null != mVeh) {
vo.setCurrentBeMoney(alrepaidAndArr.getCurrentBeMoney()); vinList.add(mVeh);
} }
//当前期数 SubletVinList tVeh = baseMapper.selReturnTrVinLegerByPSid(ledgerSid);
if (StringUtils.isNotBlank(alrepaidAndArr.getCurrentPeriod())) { if (null != tVeh) {
vo.setCurrentPeriod(alrepaidAndArr.getCurrentPeriod()); vinList.add(tVeh);
} }
//未到期金额 vo.setVinList(vinList);
if (StringUtils.isNotBlank(alrepaidAndArr.getUnexpiredMoney())) { } else if (vehType.equals("挂车")) {
vo.setUnexpiredMoney(alrepaidAndArr.getUnexpiredMoney()); SubletInitVo trVeh = baseMapper.selLoanInfoByTrVeh(ledgerSid);
if (null != trVeh) {
if (StringUtils.isNotBlank(trVeh.getBankName())) {
vo.setBankName(trVeh.getBankName());
}
if (StringUtils.isNotBlank(trVeh.getLoanContractNo())) {
vo.setLoanContractNo(trVeh.getLoanContractNo());
}
if (StringUtils.isNotBlank(trVeh.getBankContractNo())) {
vo.setBankContractNo(trVeh.getBankContractNo());
}
} }
//其中资金占用费 SubletVinList tVeh = baseMapper.selReturnTrVinLegerBySid(ledgerSid);
if (StringUtils.isNotBlank(alrepaidAndArr.getWheFundOccMoney())) { if (null != tVeh) {
vo.setWheFundOccMoney(alrepaidAndArr.getWheFundOccMoney()); vinList.add(tVeh);
} }
vo.setVinList(vinList);
} }
} }
List<RedemptionVinList> vinList = new ArrayList<>();
RedemptionVinList mainVeh = new RedemptionVinList();
if (StringUtils.isNotBlank(redemptionInitVo.getVinSid())) {
mainVeh.setVinSid(redemptionInitVo.getVinSid());
}
if (StringUtils.isNotBlank(redemptionInitVo.getVinNo())) {
mainVeh.setVinNo(redemptionInitVo.getVinNo());
}
if (StringUtils.isNotBlank(redemptionInitVo.getVehModel())) {
mainVeh.setVehModel(redemptionInitVo.getVehModel());
}
if (StringUtils.isNotBlank(redemptionInitVo.getVehMark())) {
mainVeh.setVehMark(redemptionInitVo.getVehMark());
}
if (StringUtils.isNotBlank(redemptionInitVo.getVehType())) {
mainVeh.setVehType(redemptionInitVo.getVehType());
}
vinList.add(mainVeh);
if (StringUtils.isNotBlank(redemptionInitVo.getLedgerSid())) {
RedemptionVinList trailerVeh = baseMapper.selTrailerByLedgerSid(redemptionInitVo.getLedgerSid());
if (null != trailerVeh) {
vinList.add(trailerVeh);
}
}
vo.setVinList(vinList);
} }
return rb.success().setData(vo); return rb.success().setData(vo);
} }
@ -313,218 +306,163 @@ public class LoanSubletApplyService extends MybatisBaseService<LoanSubletApplyMa
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResultBean<String> saveSublet(LoanSubletApplyDto dto) { public ResultBean<String> saveSublet(LoanSubletApplyDto dto) {
// ResultBean<String> rb = ResultBean.fireFail(); ResultBean<String> rb = ResultBean.fireFail();
// String sid = ""; String sid = "";
// if (StringUtils.isNotBlank(dto.getSid())) { if (StringUtils.isNotBlank(dto.getSid())) {
// sid = dto.getSid(); sid = dto.getSid();
// LoanRedemptionApply updateEntity = fetchBySid(sid); LoanSubletApply updateEntity = fetchBySid(sid);
// if (null != updateEntity) { if (null != updateEntity) {
// BeanUtil.copyProperties(dto, updateEntity, "id", "sid"); BeanUtil.copyProperties(dto, updateEntity, "id", "sid");
// baseMapper.updateById(updateEntity); baseMapper.updateById(updateEntity);
// loanRedemptionVehService.deleteByMainSid(sid); //todo 修改车辆交回台账
// //删除附件表中关于该linkSid的文件 List<SubletVinList> subletVinLists = loanSubletVehService.selByMainSid(sid);
// loanFileService.deleteByLinkSid(sid); if (!subletVinLists.isEmpty()) {
// List<LoanRedemptionApplyFile> filess = dto.getFiles();
// if (!filess.isEmpty()) { }
// List<String> files = new ArrayList<>(); loanSubletVehService.deleteByMainSid(sid);
// for (LoanRedemptionApplyFile file : filess) { //删除附件表中关于该linkSid的文件
// files.add(file.getUrl()); loanFileService.deleteByLinkSid(sid);
// } List<LoanSubletApplyFile> filess = dto.getFiles();
// loanFileService.saveAll(sid, files, LoanFileEnum.REDEMPTION.getAttachType()); if (!filess.isEmpty()) {
// } List<String> files = new ArrayList<>();
// List<RedemptionVinList> vinList = dto.getVinList(); for (LoanSubletApplyFile file : filess) {
// if (!vinList.isEmpty()) { files.add(file.getUrl());
// for (RedemptionVinList record : vinList) { }
// LoanRedemptionVeh redemptionVeh = new LoanRedemptionVeh(); loanFileService.saveAll(sid, files, LoanFileEnum.SUBLETAPPLY.getAttachType());
// redemptionVeh.setMainSid(sid); }
// if (StringUtils.isNotBlank(record.getVinSid())) { List<SubletVinList> vinList = dto.getVinList();
// redemptionVeh.setVinSid(record.getVinSid()); if (!vinList.isEmpty()) {
// } for (SubletVinList record : vinList) {
// if (StringUtils.isNotBlank(record.getVinNo())) { LoanSubletVeh subletVeh = new LoanSubletVeh();
// redemptionVeh.setVinNo(record.getVinNo()); BeanUtil.copyProperties(record, subletVeh, "id", "sid");
// } subletVeh.setMainSid(sid);
// if (StringUtils.isNotBlank(record.getVehMark())) { loanSubletVehService.insert(subletVeh);
// redemptionVeh.setVehMark(record.getVehMark()); //todo 交回车辆状态处置状态修改
// } }
// if (StringUtils.isNotBlank(record.getVehModel())) { }
// redemptionVeh.setVehModel(record.getVehModel()); }
// } } else {
// if (StringUtils.isNotBlank(record.getVehType())) { LoanSubletApply apply = new LoanSubletApply();
// redemptionVeh.setVehType(record.getVehType()); sid = apply.getSid();
// if (record.getVehType().equals("主车")) { BeanUtil.copyProperties(dto, apply, "id", "sid");
// if (StringUtils.isNotBlank(dto.getBusVinSid())) { apply.setCreateBySid(dto.getUserSid());
// redemptionVeh.setBusVinSid(dto.getBusVinSid()); apply.setOrgSidPath(dto.getOrgPath());
// } ResultBean<String> orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath());
// } if (orgSidByPath.getSuccess()) {
// } String userOrgSid = orgSidByPath.getData();
// loanRedemptionVehService.insert(redemptionVeh); apply.setUseOrgSid(userOrgSid);
// } ResultBean<SysOrganizationVo> organizationVo = sysOrganizationFeign.fetchBySid(userOrgSid);
// } if (organizationVo.getSuccess()) {
// } SysOrganizationVo organizationVoData = organizationVo.getData();
// } else { if (null != organizationVoData) {
// LoanRedemptionApply loanRedemptionApply = new LoanRedemptionApply(); apply.setUseOrgName(organizationVoData.getName());
// sid = loanRedemptionApply.getSid(); }
// BeanUtil.copyProperties(dto, loanRedemptionApply, "id", "sid"); }
// loanRedemptionApply.setCreateBySid(dto.getUserSid()); }
// loanRedemptionApply.setOrgSidPath(dto.getOrgPath()); apply.setNodeState("待提交");
// ResultBean<String> orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()); baseMapper.insert(apply);
// if (orgSidByPath.getSuccess()) { List<SubletVinList> vinList = dto.getVinList();
// String userOrgSid = orgSidByPath.getData(); if (!vinList.isEmpty()) {
// loanRedemptionApply.setUseOrgSid(userOrgSid); for (SubletVinList record : vinList) {
// ResultBean<SysOrganizationVo> organizationVo = sysOrganizationFeign.fetchBySid(userOrgSid); LoanSubletVeh subletVeh = new LoanSubletVeh();
// if (organizationVo.getSuccess()) { BeanUtil.copyProperties(record, subletVeh, "id", "sid");
// SysOrganizationVo organizationVoData = organizationVo.getData(); subletVeh.setMainSid(sid);
// if (null != organizationVoData) {
// loanRedemptionApply.setUseOrgName(organizationVoData.getName());
// }
// }
// }
// loanRedemptionApply.setNodeState("待提交");
// baseMapper.insert(loanRedemptionApply);
// List<RedemptionVinList> vinList = dto.getVinList();
// if (!vinList.isEmpty()) {
// for (RedemptionVinList record : vinList) {
// LoanRedemptionVeh redemptionVeh = new LoanRedemptionVeh();
// redemptionVeh.setMainSid(sid);
// if (StringUtils.isNotBlank(record.getVinSid())) { // if (StringUtils.isNotBlank(record.getVinSid())) {
// redemptionVeh.setVinSid(record.getVinSid()); // subletVeh.setVinSid(record.getVinSid());
// } // }
// if (StringUtils.isNotBlank(record.getVinNo())) { // if (StringUtils.isNotBlank(record.getVinNo())) {
// redemptionVeh.setVinNo(record.getVinNo()); // subletVeh.setVinNo(record.getVinNo());
// } // }
// if (StringUtils.isNotBlank(record.getVehMark())) { // if (StringUtils.isNotBlank(record.getVehMark())) {
// redemptionVeh.setVehMark(record.getVehMark()); // subletVeh.setVehMark(record.getVehMark());
// } // }
// if (StringUtils.isNotBlank(record.getVehModel())) { // if (StringUtils.isNotBlank(record.getVehModel())) {
// redemptionVeh.setVehModel(record.getVehModel()); // subletVeh.setVehModel(record.getVehModel());
// } // }
// if (StringUtils.isNotBlank(record.getVehType())) { // if (StringUtils.isNotBlank(record.getVehType())) {
// redemptionVeh.setVehType(record.getVehType()); // subletVeh.setVehType(record.getVehType());
// if (record.getVehType().equals("主车")) {
// if (StringUtils.isNotBlank(dto.getBusVinSid())) {
// redemptionVeh.setBusVinSid(dto.getBusVinSid());
// }
// }
// } // }
// loanRedemptionVehService.insert(redemptionVeh); // if (StringUtils.isNotBlank(record.getBusVinSid())) {
// //todo 交回车辆状态处置状态修改 // subletVeh.setBusVinSid(record.getBusVinSid());
// } // }
// } // if (StringUtils.isNotBlank(record.getLedgerSid())) {
// //删除附件表中关于该linkSid的文件 // subletVeh.setLedgerSid(record.getLedgerSid());
// loanFileService.deleteByLinkSid(sid); // }
// List<LoanRedemptionApplyFile> filess = dto.getFiles(); loanSubletVehService.insert(subletVeh);
// if (!filess.isEmpty()) { //todo 交回车辆状态处置状态修改
// List<String> files = new ArrayList<>(); }
// for (LoanRedemptionApplyFile file : filess) { }
// files.add(file.getUrl()); //删除附件表中关于该linkSid的文件
// } loanFileService.deleteByLinkSid(sid);
// loanFileService.saveAll(sid, files, LoanFileEnum.REDEMPTION.getAttachType()); List<LoanSubletApplyFile> filess = dto.getFiles();
// } if (!filess.isEmpty()) {
// } List<String> files = new ArrayList<>();
// return rb.success().setData(sid); for (LoanSubletApplyFile file : filess) {
return null; files.add(file.getUrl());
}
loanFileService.saveAll(sid, files, LoanFileEnum.SUBLETAPPLY.getAttachType());
}
}
return rb.success().setData(sid);
} }
public ResultBean<LoanSubletApplyInit> subletDetails(String sid) { public ResultBean<LoanSubletApplyInit> subletDetails(String sid) {
// ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
// LoanRedemptionApplyInit vo = new LoanRedemptionApplyInit(); LoanSubletApplyInit vo = new LoanSubletApplyInit();
// LoanRedemptionApply entity = fetchBySid(sid); LoanSubletApply entity = fetchBySid(sid);
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// if (null != entity) { if (null != entity) {
// BeanUtil.copyProperties(entity, vo); BeanUtil.copyProperties(entity, vo);
// if (null != entity.getApplyDate()) { if (null != entity.getApplyDate()) {
// vo.setApplyDate(sdf.format(entity.getApplyDate())); vo.setApplyDate(sdf.format(entity.getApplyDate()));
// } }
// if (StringUtils.isNotBlank(entity.getProcInstId())) { if (StringUtils.isNotBlank(entity.getProcInstId())) {
// vo.setInstanceId(entity.getProcInstId()); vo.setInstanceId(entity.getProcInstId());
// } }
// if (StringUtils.isNotBlank(entity.getCreateBySid())) { if (StringUtils.isNotBlank(entity.getCreateBySid())) {
// vo.setUserSid(entity.getCreateBySid()); vo.setUserSid(entity.getCreateBySid());
// } }
// if (StringUtils.isNotBlank(entity.getOrgSidPath())) { if (StringUtils.isNotBlank(entity.getOrgSidPath())) {
// vo.setOrgPath(entity.getOrgSidPath()); vo.setOrgPath(entity.getOrgSidPath());
// } }
// List<RedemptionVinList> redemptionVinLists = loanRedemptionVehService.selByMainSid(sid); List<SubletVinList> vinLists = loanSubletVehService.selByMainSid(sid);
// if (!redemptionVinLists.isEmpty()) { if (!vinLists.isEmpty()) {
// redemptionVinLists.stream().forEach(v -> { vo.setVinList(vinLists);
// if (v.getVehType().equals("主车")) { }
// vo.setBusVinSid(v.getBusVinSid()); List<LoanFile> fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.SUBLETAPPLY.getAttachType());
// } fileList.removeAll(Collections.singleton(null));
// }); if (!fileList.isEmpty()) {
// vo.setVinList(redemptionVinLists); List<String> files = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).
// } collect(Collectors.toList());
// if (StringUtils.isNotBlank(vo.getBusVinSid())) { List<LoanSubletApplyFile> applyFiles = new ArrayList<>();
// AlrepaidAndArrVo alrepaidAndArr = loanRestoreReportApplyService.getAlrepaidAndArr(vo.getBusVinSid()); for (String file : files) {
// if (null != alrepaidAndArr) { LoanSubletApplyFile applyFile = new LoanSubletApplyFile();
// //已还金额 applyFile.setUrl(file);
// if (StringUtils.isNotBlank(alrepaidAndArr.getAlRepaidMoney())) { applyFiles.add(applyFile);
// vo.setAlRepaidMoney(alrepaidAndArr.getAlRepaidMoney()); }
// } vo.setFiles(applyFiles);
// //已还金额换算期数 }
// if (StringUtils.isNotBlank(alrepaidAndArr.getAlRepaidMoneyConPeriod())) { }
// vo.setAlRepaidMoneyConPeriod(alrepaidAndArr.getAlRepaidMoneyConPeriod()); return rb.success().setData(vo);
// }
// //逾期金额换算期数
// if (StringUtils.isNotBlank(alrepaidAndArr.getBeOverdueMoneyAndPeriod())) {
// vo.setBeOverdueMoneyAndPeriod(alrepaidAndArr.getBeOverdueMoneyAndPeriod());
// }
// //总期数
// if (StringUtils.isNotBlank(alrepaidAndArr.getNper())) {
// vo.setNper(alrepaidAndArr.getNper());
// }
// //当前逾期金额
// if (StringUtils.isNotBlank(alrepaidAndArr.getCurrentBeMoney())) {
// vo.setCurrentBeMoney(alrepaidAndArr.getCurrentBeMoney());
// }
// //当前期数
// if (StringUtils.isNotBlank(alrepaidAndArr.getCurrentPeriod())) {
// vo.setCurrentPeriod(alrepaidAndArr.getCurrentPeriod());
// }
// //未到期金额
// if (StringUtils.isNotBlank(alrepaidAndArr.getUnexpiredMoney())) {
// vo.setUnexpiredMoney(alrepaidAndArr.getUnexpiredMoney());
// }
// //其中资金占用费
// if (StringUtils.isNotBlank(alrepaidAndArr.getWheFundOccMoney())) {
// vo.setWheFundOccMoney(alrepaidAndArr.getWheFundOccMoney());
// }
// }
// }
//
// List<LoanFile> fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.REDEMPTION.getAttachType());
// fileList.removeAll(Collections.singleton(null));
// if (!fileList.isEmpty()) {
// List<String> files = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).
// collect(Collectors.toList());
// List<LoanRedemptionApplyFile> applyFiles = new ArrayList<>();
// for (String file : files) {
// LoanRedemptionApplyFile applyFile = new LoanRedemptionApplyFile();
// applyFile.setUrl(file);
// applyFiles.add(applyFile);
// }
// vo.setFiles(applyFiles);
// }
// }
// return rb.success().setData(vo);
return null;
} }
public ResultBean deleteBySids(String[] sids) { public ResultBean deleteBySids(String[] sids) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
// for (String sid : sids) { for (String sid : sids) {
// LoanRedemptionApply entity = fetchBySid(sid); LoanSubletApply entity = fetchBySid(sid);
// if (null != entity) { if (null != entity) {
// if (!entity.getNodeState().equals("待提交")) { if (!entity.getNodeState().equals("待提交")) {
// return rb.setMsg("删除的数据中包含已经提交审批的数据,删除失败"); return rb.setMsg("删除的数据中包含已经提交审批的数据,删除失败");
// } }
// } }
// entity.setIsDelete(1); entity.setIsDelete(1);
// int i = baseMapper.updateById(entity); int i = baseMapper.updateById(entity);
// if (i == 0) { if (i == 0) {
// return rb.setMsg("删除失败"); return rb.setMsg("删除失败");
// } }
// //todo 修改交回车辆台账状态 //todo 修改交回车辆台账状态
// } }
return ResultBean.fireSuccess().setMsg("删除成功"); return ResultBean.fireSuccess().setMsg("删除成功");
} }

7
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletveh/LoanSubletVehMapper.xml

@ -4,7 +4,7 @@
<delete id="deleteByMainSid"> <delete id="deleteByMainSid">
DELETE DELETE
FROM loan_redemption_veh FROM loan_sublet_veh
WHERE mainSid = #{mainSid} WHERE mainSid = #{mainSid}
</delete> </delete>
<select id="selByMainSid" <select id="selByMainSid"
@ -14,8 +14,9 @@
vehMark, vehMark,
vehModel, vehModel,
busVinSid, busVinSid,
vehType vehType,
FROM loan_redemption_veh ledgerSid
FROM loan_sublet_veh
WHERE mainSid = #{mainSid} WHERE mainSid = #{mainSid}
</select> </select>
</mapper> </mapper>

2
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/overduebank/OverdueBankVo.java

@ -42,5 +42,5 @@ public class OverdueBankVo {
@ApiModelProperty(value = "taskId") @ApiModelProperty(value = "taskId")
private String taskId; private String taskId;
private String publishInso; private String publishInfo;
} }

2
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/overduefin/OverDueFnAppVo.java

@ -40,7 +40,7 @@ public class OverDueFnAppVo {
@ApiModelProperty(value = "taskId") @ApiModelProperty(value = "taskId")
private String taskId; private String taskId;
private String publishInso; private String publishInfo;
} }

2
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/overduebank/OverdueBankService.java

@ -115,7 +115,7 @@ public class OverdueBankService {
} }
LoanOverdueBankAppDetailsVo loanOverdueBankAppDetailsVo = resultBean.getData(); LoanOverdueBankAppDetailsVo loanOverdueBankAppDetailsVo = resultBean.getData();
BeanUtil.copyProperties(loanOverdueBankAppDetailsVo, overdueBankVo); BeanUtil.copyProperties(loanOverdueBankAppDetailsVo, overdueBankVo);
overdueBankVo.setPublishInso(loanOverdueBankAppDetailsVo.getCreateDept() + "-" + loanOverdueBankAppDetailsVo.getCreateByName()); overdueBankVo.setPublishInfo(loanOverdueBankAppDetailsVo.getCreateDept() + "-" + loanOverdueBankAppDetailsVo.getCreateByName());
return rb.success().setData(overdueBankVo); return rb.success().setData(overdueBankVo);
} }

2
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/overduefin/OverdueFinService.java

@ -110,7 +110,7 @@ public class OverdueFinService {
} }
LoanOverdueFinAppVo loanOverdueFinAppVo = resultBean.getData(); LoanOverdueFinAppVo loanOverdueFinAppVo = resultBean.getData();
BeanUtil.copyProperties(loanOverdueFinAppVo, overDueFnAppVo); BeanUtil.copyProperties(loanOverdueFinAppVo, overDueFnAppVo);
overDueFnAppVo.setPublishInso(loanOverdueFinAppVo.getCreateDept() + "-" + loanOverdueFinAppVo.getCreateByName()); overDueFnAppVo.setPublishInfo(loanOverdueFinAppVo.getCreateDept() + "-" + loanOverdueFinAppVo.getCreateByName());
return rb.success().setData(overDueFnAppVo); return rb.success().setData(overDueFnAppVo);
} }

Loading…
Cancel
Save