From c2202c4780dd98a756496d6d6196f394566837be Mon Sep 17 00:00:00 2001 From: fanzongzhe <285169773@qq.com> Date: Mon, 22 Jan 2024 17:50:31 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BA=A4=E5=9B=9E=E8=BD=A6=E8=BE=86?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../anrui/flowable/api/utils/ProcDefEnum.java | 2 +- .../riskcenter/api/loanfile/LoanFileEnum.java | 9 + .../loanoutboundapply/LoanOutboundApply.java | 3 +- .../LoanOutboundApplyDto.java | 2 + .../LoanOutboundApplyInit.java | 50 +- .../LoanOutboundApplyQuery.java | 6 +- .../LoanOutboundApplyVo.java | 32 +- .../loanoutboundapply/LoanUpdateApplyDto.java | 36 +- .../loanoutboundapply/OutboundVinList.java | 12 +- .../app/AppOutboundDetailsVo.java | 50 +- .../app/AppOutboundVinListVo.java | 4 + .../api/loanoutboundveh/LoanOutboundVeh.java | 7 +- .../LoanOutboundApplyMapper.java | 11 +- .../LoanOutboundApplyMapper.xml | 27 +- .../LoanOutboundApplyService.java | 1390 ++++++++--------- .../LoanOutboundVehMapper.java | 3 +- .../loanoutboundveh/LoanOutboundVehMapper.xml | 12 +- .../LoanOutboundVehService.java | 3 +- .../LoanRedemptionApplyMapper.java | 3 + .../LoanRedemptionApplyMapper.xml | 6 + .../LoanRedemptionApplyService.java | 63 +- .../LoanSubletApplyMapper.java | 3 + .../loansubletapply/LoanSubletApplyMapper.xml | 6 + .../LoanSubletApplyService.java | 94 +- .../AppOutBoundVehApplyVinList.java | 32 + .../OutBoundVehApplyDetailsVo.java | 52 + .../outBoundVeh/OutBoundVehApplyFeign.java | 67 + .../OutBoundVehApplyFeignFallback.java | 52 + .../AppOutBoundVehApplyDelegateQuery.java | 25 + .../flow/AppOutBoundVehApplyTaskQuery.java | 46 + .../flow/CompleteOutBoundVehApplyDto.java | 35 + .../flow/OutBoundVehApplyFlowableQuery.java | 21 + .../outBoundVeh/OutBoundVehApplyRest.java | 68 + .../outBoundVeh/OutBoundVehApplyService.java | 157 ++ 34 files changed, 1545 insertions(+), 844 deletions(-) create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/AppOutBoundVehApplyVinList.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/OutBoundVehApplyDetailsVo.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/OutBoundVehApplyFeign.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/OutBoundVehApplyFeignFallback.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/AppOutBoundVehApplyDelegateQuery.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/AppOutBoundVehApplyTaskQuery.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/CompleteOutBoundVehApplyDto.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/OutBoundVehApplyFlowableQuery.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/outBoundVeh/OutBoundVehApplyRest.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/outBoundVeh/OutBoundVehApplyService.java diff --git a/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java b/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java index c89808923d..68dbc2bf6c 100644 --- a/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java +++ b/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java @@ -73,7 +73,7 @@ public enum ProcDefEnum { LOANREDEMPTIONAPPLY("车辆交回赎回申请", "process_qu4fq4r6:1:7820004"), LOANRETUENINBOUNDAPPLY("交回车辆入库申请", "process_h0i1vnn8:1:7945004"), LOANSUBLETAPPLY("交回车辆二次转租申请", "process_lu7pdwzs:1:7940004"), - LOANOUTBOUNDVEHAPPLY("交回车辆出库申请", ""), + LOANOUTBOUNDVEHAPPLY("交回车辆出库申请", "process_14spbdx8:1:7982504"), /******************************测试流程id*********************************************/ diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfile/LoanFileEnum.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfile/LoanFileEnum.java index b14da486c4..6c9d46c9f8 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfile/LoanFileEnum.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfile/LoanFileEnum.java @@ -1,5 +1,10 @@ package com.yxt.anrui.riskcenter.api.loanfile; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.LoanOutboundApplyFile; + +import java.util.ArrayList; +import java.util.List; + /** * @Author fan * @Date 2022/11/14 22:46 @@ -31,6 +36,10 @@ public enum LoanFileEnum { RESTOREREPORT("022", "车辆交回事前报备附件"), REDEMPTION("023", "车辆交回赎回申请附件"), SUBLETAPPLY("024", "车辆交回二次转租申请附件"), + BUYFILES("025", "交回车辆出库车辆买卖协议"), + DELIVERYFILES("026", "交回车辆出库车辆交付确认书"), + ASSESSFILES("027", "交回车辆出库车辆完整评估照片"), + OTHERFILES("028", "交回车辆出库其他附件"), ; diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApply.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApply.java index 3ee48cf518..3573a9ee8d 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApply.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApply.java @@ -76,5 +76,6 @@ public class LoanOutboundApply extends BaseEntity { private String phoneNum; @ApiModelProperty("出库日期") private Date outboundDate; - + @ApiModelProperty("处置合同号") + private String disposalContractNo; } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyDto.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyDto.java index 5eaf0dab25..d3df7652c2 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyDto.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyDto.java @@ -48,6 +48,8 @@ public class LoanOutboundApplyDto implements Dto { private String newCustomerSid; @ApiModelProperty("新客户联系电话") private String phoneNum; + @ApiModelProperty("处置合同号") + private String disposalContractNo; @ApiModelProperty("处置车辆列表") private List vinList = new ArrayList<>(); } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyInit.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyInit.java index c813c4c6f4..ac2c747c14 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyInit.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyInit.java @@ -22,48 +22,30 @@ public class LoanOutboundApplyInit implements Vo { private String deptSid; private String applyName; private String applyDate; + private String applySid; //处置申请sid private String orgPath; + @ApiModelProperty("处置合同号") + private String disposalContractNo; @ApiModelProperty("任务id") private String taskId; @ApiModelProperty("实例id") private String instanceId; - @ApiModelProperty("消贷合同号") - private String loanContractNo; - @ApiModelProperty("资方") - private String bankName; - @ApiModelProperty("资方合同号") - private String bankContractNo; - @ApiModelProperty("客户名称") - private String customer; - @ApiModelProperty("贷款人") - private String borrowerName; - @ApiModelProperty("二次转租价格") + @ApiModelProperty("出库价格") private String amount; - @ApiModelProperty("转租方案说明") - private String plan; - @ApiModelProperty("原车主是否同意") - private String agree; - @ApiModelProperty("新车主名称") - private String vinOwner; - @ApiModelProperty("客户类型key") - private String customerTypeKey; - @ApiModelProperty("客户类型") - private String customerType; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("客户名称") + private String newCustomer; @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 files = new ArrayList<>(); + @ApiModelProperty("处置方式(未处置/客户赎回/二次销售/二次转租)") + private String disposal; + @ApiModelProperty("处置方式key") + private String disposalKey; + private List buyFiles = new ArrayList<>(); //车辆买卖协议 + private List deliveryFiles = new ArrayList<>(); //车辆交付确认书 + private List assessFiles = new ArrayList<>(); //车辆完整评估照片 + private List otherFiles = new ArrayList<>(); //其他附件 private List vinList = new ArrayList<>(); } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyQuery.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyQuery.java index a1b290ea3e..76cb906843 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyQuery.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyQuery.java @@ -44,6 +44,8 @@ public class LoanOutboundApplyQuery implements Query { private String vehMark; @ApiModelProperty("申请部门") private String dept; - @ApiModelProperty("原车主是否同意0是1否") - private String agree; + @ApiModelProperty("处置方式key") + private String disposalKey; + private String outStartDate; //出库日期 + private String outEndDate; } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyVo.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyVo.java index 00d112cc68..918def9114 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyVo.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanOutboundApplyVo.java @@ -4,6 +4,9 @@ import com.yxt.common.core.vo.Vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.math.BigDecimal; +import java.util.Date; + /** * @author Administrator * @description @@ -25,12 +28,12 @@ public class LoanOutboundApplyVo implements Vo { private String applyDate; // 申请日期 @ApiModelProperty("办结日期") private String closingDate; - @ApiModelProperty("流程定义的id") - private String procDefId; // 流程定义的id - @ApiModelProperty("流程实例的sid") - private String procInstId; // 流程实例的sid @ApiModelProperty("消贷合同号") private String loanContractNo; + @ApiModelProperty("车架号") + private String vinNo; + @ApiModelProperty("车牌号") + private String vehMark; @ApiModelProperty("资方") private String bankName; @ApiModelProperty("资方合同号") @@ -39,12 +42,19 @@ public class LoanOutboundApplyVo implements Vo { private String customer; @ApiModelProperty("贷款人") private String borrowerName; - @ApiModelProperty("二次转租价格") + @ApiModelProperty("出库价格") private String amount; - @ApiModelProperty("车架号") - private String vinNo; - @ApiModelProperty("车牌号") - private String vehMark; - @ApiModelProperty("原车主是否同意0是1否") - private String agree; + @ApiModelProperty("处置方式(未处置/客户赎回/二次销售/二次转租)") + private String disposal; + @ApiModelProperty("新车主名称") + private String newCustomer; + @ApiModelProperty("联系电话") + private String phoneNum; + @ApiModelProperty("出库日期") + private String outboundDate; + @ApiModelProperty("流程定义的id") + private String procDefId; // 流程定义的id + @ApiModelProperty("流程实例的sid") + private String procInstId; // 流程实例的sid + } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanUpdateApplyDto.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanUpdateApplyDto.java index 438893cc34..2013d4121b 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanUpdateApplyDto.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/LoanUpdateApplyDto.java @@ -1,8 +1,12 @@ package com.yxt.anrui.riskcenter.api.loanoutboundapply; import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.ArrayList; +import java.util.List; + /** * @author Fan * @description @@ -10,7 +14,35 @@ import lombok.Data; */ @Data public class LoanUpdateApplyDto implements Dto { - private String sid; - + private String userSid; + private String dept; + private String deptSid; + private String applyName; + private String applyDate; + private String applySid; //处置申请sid + private String orgPath; + @ApiModelProperty("任务id") + private String taskId; + @ApiModelProperty("实例id") + private String instanceId; + @ApiModelProperty("出库价格") + private String amount; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("客户名称") + private String newCustomer; + @ApiModelProperty("联系电话") + private String phoneNum; + @ApiModelProperty("处置方式(未处置/客户赎回/二次销售/二次转租)") + private String disposal; + @ApiModelProperty("处置方式key") + private String disposalKey; + @ApiModelProperty("处置合同号") + private String disposalContractNo; + private List buyFiles = new ArrayList<>(); //车辆买卖协议 + private List deliveryFiles = new ArrayList<>(); //车辆交付确认书 + private List assessFiles = new ArrayList<>(); //车辆完整评估照片 + private List otherFiles = new ArrayList<>(); //其他附件 + private List vinList = new ArrayList<>(); } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/OutboundVinList.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/OutboundVinList.java index 93159ab863..1a75c14266 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/OutboundVinList.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/OutboundVinList.java @@ -1,5 +1,6 @@ package com.yxt.anrui.riskcenter.api.loanoutboundapply; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** @@ -9,11 +10,16 @@ import lombok.Data; */ @Data public class OutboundVinList { - private String ledgerSid; - private String vinSid; + @ApiModelProperty("车架号") private String vinNo; + @ApiModelProperty("车牌号") private String vehMark; + @ApiModelProperty("主车/挂车") private String vehType; + @ApiModelProperty("车型") private String vehModel; - private String busVinSid; + @ApiModelProperty("存放地点") + private String location; + @ApiModelProperty("交回车辆台账sid") + private String ledgerSid; } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/app/AppOutboundDetailsVo.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/app/AppOutboundDetailsVo.java index a07cf6f00a..425d411309 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/app/AppOutboundDetailsVo.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/app/AppOutboundDetailsVo.java @@ -16,57 +16,35 @@ public class AppOutboundDetailsVo { private String sid; private String publishInfo; private String time; //申请日期 - private List files = new ArrayList<>(); + private List buyFiles = new ArrayList<>(); //车辆买卖协议 + private List deliveryFiles = new ArrayList<>(); //车辆交付确认书 + private List assessFiles = new ArrayList<>(); //车辆完整评估照片 + private List otherFiles = new ArrayList<>(); //其他附件 private String taskId; private String procInsId; + private String applySid; //处置申请sid /** - * 本次转租金额 + * 出库金额 */ private String amount; - /** - * 资方合同号 - */ - private String bankContractNo; - /** - * 资方 - */ - private String bankName; - /** - * 贷款人 - */ - private String borrName; - /** - * 原车主是否同意 0是 1否 - */ - private String agree; /** * 客户名称 */ private String custName; + @ApiModelProperty("处置合同号") + private String disposalContractNo; /** - * 贷款合同号 - */ - private String loanContractNo; - /** - * 转租方案说明 + * 备注 */ - private String plan; + private String remarks; + @ApiModelProperty("处置方式(未处置/客户赎回/二次销售/二次转租)") + private String disposal; + @ApiModelProperty("处置方式key") + private String disposalKey; /** * 车辆列表 */ private List vinList = new ArrayList<>(); - @ApiModelProperty("新车主名称") - private String vinOwner; - @ApiModelProperty("客户类型") - private String customerType; @ApiModelProperty("联系电话") private String phoneNum; - @ApiModelProperty("证件地址") - private String cardAddress; - @ApiModelProperty("有效期") - private String endDate; - @ApiModelProperty("证件号码") - private String idNumber; - @ApiModelProperty("证件类型(个人为身份证/企业为营业执照)") - private String certificateType; } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/app/AppOutboundVinListVo.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/app/AppOutboundVinListVo.java index bbf0ccf462..08839777d0 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/app/AppOutboundVinListVo.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundapply/app/AppOutboundVinListVo.java @@ -25,4 +25,8 @@ public class AppOutboundVinListVo { * 车架号 */ private String vinNo; + /** + * 存放地点 + */ + private String location; } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundveh/LoanOutboundVeh.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundveh/LoanOutboundVeh.java index 0d8faa83d8..61f6e7c0e8 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundveh/LoanOutboundVeh.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanoutboundveh/LoanOutboundVeh.java @@ -11,8 +11,8 @@ import lombok.Data; * @version 1.0 * @since 1.0 */ -@ApiModel(value = "车辆二次转租车辆列表", description = "车辆二次转租车辆列表") -@TableName("loan_sublet_veh") +@ApiModel(value = "交回车辆出库车辆列表", description = "交回车辆出库车辆列表") +@TableName("loan_out_bound_veh") @Data public class LoanOutboundVeh extends BaseEntity { private static final long serialVersionUID = 1L; @@ -33,5 +33,6 @@ public class LoanOutboundVeh extends BaseEntity { private String vehModel; @ApiModelProperty("交回车辆台账sid") private String ledgerSid; - + @ApiModelProperty("存放地点") + private String location; } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyMapper.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyMapper.java index 29d9308153..c786b2a85b 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyMapper.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyMapper.java @@ -5,6 +5,7 @@ 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.loanoutboundapply.LoanOutboundApply; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.LoanOutboundApplyVo; import com.yxt.anrui.riskcenter.api.loanredemptionapply.RedemptionInitVo; import com.yxt.anrui.riskcenter.api.loanredemptionapply.RedemptionVinList; import com.yxt.anrui.riskcenter.api.loansubletapply.*; @@ -17,7 +18,7 @@ import java.util.Map; @Mapper public interface LoanOutboundApplyMapper extends BaseMapper { - IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); IPage getVinList(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); @@ -33,11 +34,13 @@ public interface LoanOutboundApplyMapper extends BaseMapper { SubletVinList selReturnVinLegerBySid(@Param("ledgerSid") String ledgerSid); - SubletVinList selReturnTrVinLegerByPSid(@Param("ledgerSid")String ledgerSid); + SubletVinList selReturnTrVinLegerByPSid(@Param("ledgerSid") String ledgerSid); - SubletInitVo selLoanInfoByTrVeh(@Param("ledgerSid")String ledgerSid); + SubletInitVo selLoanInfoByTrVeh(@Param("ledgerSid") String ledgerSid); - SubletVinList selReturnTrVinLegerBySid(@Param("ledgerSid")String ledgerSid); + SubletVinList selReturnTrVinLegerBySid(@Param("ledgerSid") String ledgerSid); VehDisposal selVehDisposal(@Param("ledgerSid") String ledgerSid); + + int updateLedgerStockStateBySid(@Param("key") String key, @Param("value") String value, @Param("date") String date, @Param("ledgerSid") String ledgerSid); } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyMapper.xml b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyMapper.xml index f4608b1a98..895151f0c0 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyMapper.xml +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyMapper.xml @@ -16,8 +16,15 @@ WHERE sid = #{sid} + + UPDATE loan_return_veh_ledger + SET stockStateKey=#{key}, + stockState=#{value}, + outboundDate =#{date} + WHERE sid = #{ledgerSid} + - SELECT * FROM @@ -26,9 +33,8 @@ sa.sid, sa.isDelete, sa.nodeState, - sa.agree, sa.useOrgSid, - sa.createBySid, + sa.applyUserSid, sa.orgSidPath, sa.useOrgName AS company, sa.dept, @@ -43,13 +49,18 @@ sa.borrowerName, sa.customer, sa.amount, - ( SELECT count(*) FROM loan_sublet_veh h WHERE mainSid = sa.sid ) AS `count`, - v.vehType, + sa.newCustomer, + sa.phoneNum, + sa.disposal, + sa.disposalKey, + date_format( sa.outboundDate, '%Y-%m-%d' ) AS outboundDate, + ( SELECT count(*) FROM loan_out_bound_veh h WHERE mainSid = sa.sid ) AS `count`, v.vinNo, - v.vehMark + v.vehMark, + v.vehType FROM - loan_sublet_apply AS sa - LEFT JOIN loan_sublet_veh AS v ON sa.sid = v.mainSid + loan_out_bound_apply AS sa + LEFT JOIN loan_out_bound_veh AS v ON sa.sid = v.mainSid ) a ${ew.sqlSegment} diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyService.java index 36d0c8b995..e5255431ea 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyService.java @@ -31,6 +31,7 @@ import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; import com.yxt.anrui.riskcenter.api.loanoutboundapply.*; import com.yxt.anrui.riskcenter.api.loanoutboundapply.app.AppOutboundDetailsVo; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.app.AppOutboundVinListVo; import com.yxt.anrui.riskcenter.api.loanoutboundapply.flow.*; import com.yxt.anrui.riskcenter.api.loanoutboundveh.LoanOutboundVeh; import com.yxt.anrui.riskcenter.api.loansubletapply.*; @@ -114,109 +115,113 @@ public class LoanOutboundApplyService extends MybatisBaseService listPage(PagerQuery pq) { - return null; -// IPage page = PagerUtil.queryToPage(pq); -// LoanSubletApplyQuery pagerQuery = pq.getParams(); -// QueryWrapper qw = new QueryWrapper<>(); -// //======================= -// PrivilegeQuery privilegeQuery = new PrivilegeQuery(); -// privilegeQuery.setOrgPath(pagerQuery.getOrgPath()); -// privilegeQuery.setMenuSid(pagerQuery.getMenuSid()); -// privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl()); -// privilegeQuery.setUserSid(pagerQuery.getUserSid()); -// ResultBean 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("a.orgSidPath", orgSidPath); -// } else if ("2".equals(orgLevelKey)) { -// orgSidPath = orgSidPath.substring(0, i2); -// qw.like("a.orgSidPath", orgSidPath); -// } else if ("3".equals(orgLevelKey)) { -// orgSidPath = orgSidPath.substring(0, i3); -// qw.like("a.orgSidPath", orgSidPath); -// } else if ("4".equals(orgLevelKey)) { -// orgSidPath = orgSidPath.substring(0, i4); -// qw.like("a.orgSidPath", orgSidPath); -// } else if ("5".equals(orgLevelKey)) { -// qw.eq("a.createBySid", pagerQuery.getUserSid()); -// } else { -// PagerVo p = new PagerVo<>(); -// return p; -// } -// } else { -// PagerVo p = new PagerVo<>(); -// return p; -// } -// //======================= -// //分公司 -// if (StringUtils.isNotBlank(pagerQuery.getCompany())) { -// qw.like("a.company", pagerQuery.getCompany()); -// } -// //申请人 -// if (StringUtils.isNotBlank(pagerQuery.getApplyName())) { -// qw.like("a.applyName", pagerQuery.getApplyName()); -// } -// //申请部门 -// if (StringUtils.isNotBlank(pagerQuery.getDept())) { -// qw.like("a.dept", pagerQuery.getDept()); -// } -// //消贷合同号 -// if (StringUtils.isNotBlank(pagerQuery.getLoanContractNo())) { -// qw.like("a.loanContractNo", pagerQuery.getLoanContractNo()); -// } -// //资方 -// if (StringUtils.isNotBlank(pagerQuery.getBankName())) { -// qw.like("a.bankName", pagerQuery.getBankName()); -// } -// //资方合同号 -// if (StringUtils.isNotBlank(pagerQuery.getBankContractNo())) { -// qw.like("a.bankContractNo", pagerQuery.getBankContractNo()); -// } -// //客户名称 -// if (StringUtils.isNotBlank(pagerQuery.getCustomer())) { -// qw.like("a.customer", pagerQuery.getCustomer()); -// } -// //贷款人 -// if (StringUtils.isNotBlank(pagerQuery.getBorrowerName())) { -// qw.like("a.borrowerName", pagerQuery.getBorrowerName()); -// } -// //车架号 -// if (StringUtils.isNotBlank(pagerQuery.getVinNo())) { -// qw.like("a.vinNo", pagerQuery.getVinNo()); -// } -// //车牌号 -// if (StringUtils.isNotBlank(pagerQuery.getVehMark())) { -// qw.like("a.vehMark", pagerQuery.getVehMark()); -// } -// //车架号 -// if (StringUtils.isNotBlank(pagerQuery.getAgree())) { -// qw.like("a.agree", pagerQuery.getAgree()); -// } -// String applyStartTime = pagerQuery.getApplyStartDate(); -// String applyEndTime = pagerQuery.getApplyEndDate(); -// qw.apply(StringUtils.isNotEmpty(applyStartTime), "date_format (a.applyDate,'%Y-%m-%d') >= date_format('" + applyStartTime + "','%Y-%m-%d')"). -// apply(StringUtils.isNotEmpty(applyEndTime), "date_format (a.applyDate,'%Y-%m-%d') <= date_format('" + applyEndTime + "','%Y-%m-%d')" -// ); -// String closingStartDate = pagerQuery.getClosingStartDate(); -// String closingEndDate = pagerQuery.getClosingEndDate(); -// qw.apply(StringUtils.isNotEmpty(closingStartDate), "date_format (a.closingDate,'%Y-%m-%d') >= date_format('" + closingStartDate + "','%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.orderByDesc("a.applyDate"); -// qw.apply("(a.count > 1 AND a.vehType = '主车' ) OR (a.count = 1)"); -// IPage pagging = baseMapper.listPage(page, qw); -// PagerVo p = PagerUtil.pageToVo(pagging, null); -// return p; + IPage page = PagerUtil.queryToPage(pq); + LoanOutboundApplyQuery pagerQuery = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //======================= + PrivilegeQuery privilegeQuery = new PrivilegeQuery(); + privilegeQuery.setOrgPath(pagerQuery.getOrgPath()); + privilegeQuery.setMenuSid(pagerQuery.getMenuSid()); + privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl()); + privilegeQuery.setUserSid(pagerQuery.getUserSid()); + ResultBean 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("a.orgSidPath", orgSidPath); + } else if ("2".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i2); + qw.like("a.orgSidPath", orgSidPath); + } else if ("3".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i3); + qw.like("a.orgSidPath", orgSidPath); + } else if ("4".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i4); + qw.like("a.orgSidPath", orgSidPath); + } else if ("5".equals(orgLevelKey)) { + qw.eq("a.applyUserSid", pagerQuery.getUserSid()); + } else { + PagerVo p = new PagerVo<>(); + return p; + } + } else { + PagerVo p = new PagerVo<>(); + return p; + } + //======================= + //分公司 + if (StringUtils.isNotBlank(pagerQuery.getCompany())) { + qw.like("a.company", pagerQuery.getCompany()); + } + //申请人 + if (StringUtils.isNotBlank(pagerQuery.getApplyName())) { + qw.like("a.applyName", pagerQuery.getApplyName()); + } + //申请部门 + if (StringUtils.isNotBlank(pagerQuery.getDept())) { + qw.like("a.dept", pagerQuery.getDept()); + } + //消贷合同号 + if (StringUtils.isNotBlank(pagerQuery.getLoanContractNo())) { + qw.like("a.loanContractNo", pagerQuery.getLoanContractNo()); + } + //资方 + if (StringUtils.isNotBlank(pagerQuery.getBankName())) { + qw.like("a.bankName", pagerQuery.getBankName()); + } + //资方合同号 + if (StringUtils.isNotBlank(pagerQuery.getBankContractNo())) { + qw.like("a.bankContractNo", pagerQuery.getBankContractNo()); + } + //客户名称 + if (StringUtils.isNotBlank(pagerQuery.getCustomer())) { + qw.like("a.customer", pagerQuery.getCustomer()); + } + //贷款人 + if (StringUtils.isNotBlank(pagerQuery.getBorrowerName())) { + qw.like("a.borrowerName", pagerQuery.getBorrowerName()); + } + //车架号 + if (StringUtils.isNotBlank(pagerQuery.getVinNo())) { + qw.like("a.vinNo", pagerQuery.getVinNo()); + } + //车牌号 + if (StringUtils.isNotBlank(pagerQuery.getVehMark())) { + qw.like("a.vehMark", pagerQuery.getVehMark()); + } + //处置方式 + if (StringUtils.isNotBlank(pagerQuery.getDisposalKey())) { + qw.like("a.disposalKey", pagerQuery.getDisposalKey()); + } + String applyStartTime = pagerQuery.getApplyStartDate(); + String applyEndTime = pagerQuery.getApplyEndDate(); + qw.apply(StringUtils.isNotEmpty(applyStartTime), "date_format (a.applyDate,'%Y-%m-%d') >= date_format('" + applyStartTime + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(applyEndTime), "date_format (a.applyDate,'%Y-%m-%d') <= date_format('" + applyEndTime + "','%Y-%m-%d')" + ); + String closingStartDate = pagerQuery.getClosingStartDate(); + String closingEndDate = pagerQuery.getClosingEndDate(); + qw.apply(StringUtils.isNotEmpty(closingStartDate), "date_format (a.closingDate,'%Y-%m-%d') >= date_format('" + closingStartDate + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(closingEndDate), "date_format (a.closingDate,'%Y-%m-%d') <= date_format('" + closingEndDate + "','%Y-%m-%d')" + ); + String outStartDate = pagerQuery.getOutStartDate(); + String outEndDate = pagerQuery.getOutEndDate(); + qw.apply(StringUtils.isNotEmpty(outStartDate), "date_format (a.outboundDate,'%Y-%m-%d') >= date_format('" + outStartDate + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(outEndDate), "date_format (a.outboundDate,'%Y-%m-%d') <= date_format('" + outEndDate + "','%Y-%m-%d')" + ); + qw.eq("a.isDelete", 0); + qw.orderByDesc("a.applyDate"); + qw.apply("(a.count > 1 AND a.vehType = '主车' ) OR (a.count = 1)"); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; } @@ -225,6 +230,8 @@ public class LoanOutboundApplyService extends MybatisBaseService vinList = dto.getVinList(); if (!vinList.isEmpty()) { vinList.stream().forEach(v -> { @@ -240,114 +247,129 @@ public class LoanOutboundApplyService extends MybatisBaseService updateOutbound(LoanUpdateApplyDto dto) { ResultBean rb = ResultBean.fireFail(); - String sid = ""; -// if (StringUtils.isNotBlank(dto.getSid())) { -// sid = dto.getSid(); -// LoanSubletApply updateEntity = fetchBySid(sid); -// if (null != updateEntity) { -// BeanUtil.copyProperties(dto, updateEntity, "id", "sid"); -// baseMapper.updateById(updateEntity); -// loanSubletVehService.deleteByMainSid(sid); -// //删除附件表中关于该linkSid的文件 -// loanFileService.deleteByLinkSid(sid); -// List filess = dto.getFiles(); -// if (!filess.isEmpty()) { -// List files = new ArrayList<>(); -// for (LoanSubletApplyFile file : filess) { -// files.add(file.getUrl()); -// } -// loanFileService.saveAll(sid, files, LoanFileEnum.SUBLETAPPLY.getAttachType()); -// } -// List vinList = dto.getVinList(); -// if (!vinList.isEmpty()) { -// for (SubletVinList record : vinList) { -// LoanSubletVeh subletVeh = new LoanSubletVeh(); -// BeanUtil.copyProperties(record, subletVeh, "id", "sid"); -// subletVeh.setMainSid(sid); -// loanSubletVehService.insert(subletVeh); -// } -// } -// } -// } else { -// LoanSubletApply apply = new LoanSubletApply(); -// sid = apply.getSid(); -// BeanUtil.copyProperties(dto, apply, "id", "sid"); -// apply.setCreateBySid(dto.getUserSid()); -// apply.setOrgSidPath(dto.getOrgPath()); -// ResultBean orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()); -// if (orgSidByPath.getSuccess()) { -// String userOrgSid = orgSidByPath.getData(); -// apply.setUseOrgSid(userOrgSid); -// ResultBean organizationVo = sysOrganizationFeign.fetchBySid(userOrgSid); -// if (organizationVo.getSuccess()) { -// SysOrganizationVo organizationVoData = organizationVo.getData(); -// if (null != organizationVoData) { -// apply.setUseOrgName(organizationVoData.getName()); -// } -// } -// } -// apply.setNodeState("待提交"); -// baseMapper.insert(apply); -// List vinList = dto.getVinList(); -// if (!vinList.isEmpty()) { -// for (SubletVinList record : vinList) { -// LoanSubletVeh subletVeh = new LoanSubletVeh(); -// BeanUtil.copyProperties(record, subletVeh, "id", "sid"); -// subletVeh.setMainSid(sid); -// loanSubletVehService.insert(subletVeh); -// } -// } -// //删除附件表中关于该linkSid的文件 -// loanFileService.deleteByLinkSid(sid); -// List filess = dto.getFiles(); -// if (!filess.isEmpty()) { -// List files = new ArrayList<>(); -// for (LoanSubletApplyFile file : filess) { -// files.add(file.getUrl()); -// } -// loanFileService.saveAll(sid, files, LoanFileEnum.SUBLETAPPLY.getAttachType()); -// } -// } + String sid = dto.getSid(); + LoanOutboundApply updateEntity = fetchBySid(sid); + if (null != updateEntity) { + BeanUtil.copyProperties(dto, updateEntity, "id", "sid"); + updateEntity.setApplyUserSid(dto.getUserSid()); + updateEntity.setOrgSidPath(dto.getOrgPath()); + baseMapper.updateById(updateEntity); + //删除附件表中关于该linkSid的文件 + loanFileService.deleteByLinkSid(sid); + List filess1 = dto.getBuyFiles(); + if (!filess1.isEmpty()) { + List files = new ArrayList<>(); + for (LoanOutboundApplyFile file : filess1) { + files.add(file.getUrl()); + } + loanFileService.saveAll(sid, files, LoanFileEnum.BUYFILES.getAttachType()); + } + List filess2 = dto.getDeliveryFiles(); + if (!filess2.isEmpty()) { + List files = new ArrayList<>(); + for (LoanOutboundApplyFile file : filess2) { + files.add(file.getUrl()); + } + loanFileService.saveAll(sid, files, LoanFileEnum.DELIVERYFILES.getAttachType()); + } + List filess3 = dto.getAssessFiles(); + if (!filess3.isEmpty()) { + List files = new ArrayList<>(); + for (LoanOutboundApplyFile file : filess3) { + files.add(file.getUrl()); + } + loanFileService.saveAll(sid, files, LoanFileEnum.ASSESSFILES.getAttachType()); + } + List filess4 = dto.getOtherFiles(); + if (!filess4.isEmpty()) { + List files = new ArrayList<>(); + for (LoanOutboundApplyFile file : filess4) { + files.add(file.getUrl()); + } + loanFileService.saveAll(sid, files, LoanFileEnum.OTHERFILES.getAttachType()); + } + } return rb.success().setData(sid); } public ResultBean outboundDetails(String sid) { ResultBean rb = ResultBean.fireFail(); LoanOutboundApplyInit vo = new LoanOutboundApplyInit(); -// LoanSubletApply entity = fetchBySid(sid); -// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); -// if (null != entity) { -// BeanUtil.copyProperties(entity, vo); -// if (null != entity.getApplyDate()) { -// vo.setApplyDate(sdf.format(entity.getApplyDate())); -// } -// if (StringUtils.isNotBlank(entity.getProcInstId())) { -// vo.setInstanceId(entity.getProcInstId()); -// } -// if (StringUtils.isNotBlank(entity.getCreateBySid())) { -// vo.setUserSid(entity.getCreateBySid()); -// } -// if (StringUtils.isNotBlank(entity.getOrgSidPath())) { -// vo.setOrgPath(entity.getOrgSidPath()); -// } -// List vinLists = loanSubletVehService.selByMainSid(sid); -// if (!vinLists.isEmpty()) { -// vo.setVinList(vinLists); -// } -// List fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.SUBLETAPPLY.getAttachType()); -// fileList.removeAll(Collections.singleton(null)); -// if (!fileList.isEmpty()) { -// List files = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). -// collect(Collectors.toList()); -// List applyFiles = new ArrayList<>(); -// for (String file : files) { -// LoanSubletApplyFile applyFile = new LoanSubletApplyFile(); -// applyFile.setUrl(file); -// applyFiles.add(applyFile); -// } -// vo.setFiles(applyFiles); -// } -// } + LoanOutboundApply entity = fetchBySid(sid); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + if (null != entity) { + BeanUtil.copyProperties(entity, vo); + if (null != entity.getApplyDate()) { + vo.setApplyDate(sdf.format(entity.getApplyDate())); + } else { + vo.setApplyDate(sdf.format(new Date())); + } + if (StringUtils.isNotBlank(entity.getProcInstId())) { + vo.setInstanceId(entity.getProcInstId()); + } + if (StringUtils.isNotBlank(entity.getApplyUserSid())) { + vo.setUserSid(entity.getApplyUserSid()); + vo.setOrgPath(entity.getOrgSidPath()); + } else { + vo.setOrgPath(""); + } + List vinLists = loanOutboundVehService.selByMainSid(sid); + if (!vinLists.isEmpty()) { + vo.setVinList(vinLists); + } + List fileList1 = loanFileService.selectByLinkSid(sid, LoanFileEnum.BUYFILES.getAttachType()); + fileList1.removeAll(Collections.singleton(null)); + if (!fileList1.isEmpty()) { + List files = fileList1.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). + collect(Collectors.toList()); + List applyFiles = new ArrayList<>(); + for (String file : files) { + LoanOutboundApplyFile applyFile = new LoanOutboundApplyFile(); + applyFile.setUrl(file); + applyFiles.add(applyFile); + } + vo.setBuyFiles(applyFiles); + } + List fileList2 = loanFileService.selectByLinkSid(sid, LoanFileEnum.DELIVERYFILES.getAttachType()); + fileList2.removeAll(Collections.singleton(null)); + if (!fileList2.isEmpty()) { + List files = fileList2.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). + collect(Collectors.toList()); + List applyFiles = new ArrayList<>(); + for (String file : files) { + LoanOutboundApplyFile applyFile = new LoanOutboundApplyFile(); + applyFile.setUrl(file); + applyFiles.add(applyFile); + } + vo.setDeliveryFiles(applyFiles); + } + List fileList3 = loanFileService.selectByLinkSid(sid, LoanFileEnum.ASSESSFILES.getAttachType()); + fileList3.removeAll(Collections.singleton(null)); + if (!fileList3.isEmpty()) { + List files = fileList3.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). + collect(Collectors.toList()); + List applyFiles = new ArrayList<>(); + for (String file : files) { + LoanOutboundApplyFile applyFile = new LoanOutboundApplyFile(); + applyFile.setUrl(file); + applyFiles.add(applyFile); + } + vo.setAssessFiles(applyFiles); + } + List fileList4 = loanFileService.selectByLinkSid(sid, LoanFileEnum.OTHERFILES.getAttachType()); + fileList4.removeAll(Collections.singleton(null)); + if (!fileList4.isEmpty()) { + List files = fileList4.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). + collect(Collectors.toList()); + List applyFiles = new ArrayList<>(); + for (String file : files) { + LoanOutboundApplyFile applyFile = new LoanOutboundApplyFile(); + applyFile.setUrl(file); + applyFiles.add(applyFile); + } + vo.setOtherFiles(applyFiles); + } + } return rb.success().setData(vo); } @@ -393,218 +415,207 @@ public class LoanOutboundApplyService extends MybatisBaseService dtoVinList = dto.getVinList(); -// if (!dtoVinList.isEmpty()) { -// for (SubletVinList v : dtoVinList) { -// VehDisposal vehDisposal = baseMapper.selVehDisposal(v.getLedgerSid()); -// if (null != vehDisposal) { -// if (!vehDisposal.getDisposal().equals("未处置")) { -// return rb.setMsg("当前所选车辆不是未处置状态,无法提交!"); -// } -// } -// } -// } -// String businessSid = ""; -// //新增修改保存 -// ResultBean resultBean = saveSublet(dto); -// if (resultBean.getSuccess()) { -// businessSid = resultBean.getData(); -// } else { -// return rb.setMsg(resultBean.getMsg()); -// } -// //提交之后修改车辆台账 -// List vinLists1 = loanSubletVehService.selByMainSid(businessSid); -// if (!vinLists1.isEmpty()) { -// vinLists1.stream().forEach(v -> { -// loanRedemptionApplyService.updateVehLedgerDisposal(v.getLedgerSid(), "04", "二次转租"); -// }); -// } -// LoanSubletApply entity = fetchBySid(businessSid); -// String orgSidPath = ""; -// if (StringUtils.isNotBlank(entity.getOrgSidPath())) { -// orgSidPath = entity.getOrgSidPath(); -// } else { -// SysUserVo data = sysUserFeign.fetchBySid(entity.getCreateBySid()).getData(); -// if (null != data) { -// //根据staffSid获取用户的组织全路径 -// ResultBean staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(data.getStaffSid()); -// if (!staffOrgResultBean.getSuccess()) { -// return rb.setMsg(staffOrgResultBean.getMsg()); -// } -// //用户的组织全路径 -// orgSidPath = staffOrgResultBean.getData().getOrgSidPath(); + LoanOutboundApply loanOutboundApply = fetchBySid(dto.getSid()); + int r = submitBusinessData(dto, loanOutboundApply); + if (r == 3) { + return rb.setMsg("该申请不存在"); + } + if (r == 0) { + return rb.setMsg("操作失败!提交的数据不一致"); + } + String businessSid = ""; + //新增修改保存 + ResultBean resultBean = updateOutbound(dto); + if (resultBean.getSuccess()) { + businessSid = resultBean.getData(); + } else { + return rb.setMsg(resultBean.getMsg()); + } + LoanOutboundApply entity = fetchBySid(businessSid); + String orgSidPath = ""; + if (StringUtils.isNotBlank(entity.getOrgSidPath())) { + orgSidPath = entity.getOrgSidPath(); + } else { + SysUserVo data = sysUserFeign.fetchBySid(entity.getCreateBySid()).getData(); + if (null != data) { + //根据staffSid获取用户的组织全路径 + ResultBean staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(data.getStaffSid()); + if (!staffOrgResultBean.getSuccess()) { + return rb.setMsg(staffOrgResultBean.getMsg()); + } + //用户的组织全路径 + orgSidPath = staffOrgResultBean.getData().getOrgSidPath(); + } + } + List orgPathList = Arrays.asList(orgSidPath.split("/")); + SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size() - 1)).getData(); + if (sysOrganization == null) { + return rb.setMsg("当前所在的组织机构不存在"); + } + if (StringUtils.isBlank(sysOrganization.getManagerSid())) { +// return rb.setMsg("当前所在的组织机构未设置主管人员"); + sysOrganization.setManagerSid(ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId()); + } + //创建BusinessVariables实体对象 + BusinessVariables bv = new BusinessVariables(); + //流程中的参数赋值 + Map variables = BeanUtil.beanToMap(dto); + Map appMap = new HashMap<>(); + //若有网关,则赋值网关中判断的字段。 +// boolean isTure = true; +// //去查询是否同意 +// if (StringUtils.isNotBlank(entity.getSalesUserSid())) { +// if (!entity.getCreateBySid().equals(entity.getSalesUserSid())) { +// isTure = false; // } // } -// List orgPathList = Arrays.asList(orgSidPath.split("/")); -// SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size() - 1)).getData(); -// if (sysOrganization == null) { -// return rb.setMsg("当前所在的组织机构不存在"); -// } -// if (StringUtils.isBlank(sysOrganization.getManagerSid())) { -//// return rb.setMsg("当前所在的组织机构未设置主管人员"); -// sysOrganization.setManagerSid(ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId()); -// } -// //创建BusinessVariables实体对象 -// BusinessVariables bv = new BusinessVariables(); -// //流程中的参数赋值 -// Map variables = BeanUtil.beanToMap(dto); -// Map appMap = new HashMap<>(); -// //若有网关,则赋值网关中判断的字段。 -//// boolean isTure = true; -//// //去查询是否同意 -//// if (StringUtils.isNotBlank(entity.getSalesUserSid())) { -//// if (!entity.getCreateBySid().equals(entity.getSalesUserSid())) { -//// isTure = false; -//// } -//// } -//// variables.put("isTure", isTure); -// variables.put("businessSid", businessSid); -// appMap.put("sid", businessSid); -// variables.put("app", appMap); -//// String orderNames = "<" + entity.getCustomer() + ">" + "欠款客户备案"; -//// variables.put("orderNames", orderNames); -// LoanSubletApply loanSubletApply1 = fetchBySid(businessSid); -// String msgBusinessSid = loanSubletApply1.getSid(); -// //用户的部门全路径sid -// bv.setOrgSidPath(loanSubletApply1.getOrgSidPath()); -// //业务sid -// bv.setBusinessSid(businessSid); -// //用户sid -// bv.setUserSid(dto.getUserSid()); -// bv.setFormVariables(variables); +// variables.put("isTure", isTure); + variables.put("businessSid", businessSid); + appMap.put("sid", businessSid); + variables.put("app", appMap); +// String orderNames = "<" + entity.getCustomer() + ">" + "欠款客户备案"; +// variables.put("orderNames", orderNames); + LoanOutboundApply loanOutboundApply1 = fetchBySid(businessSid); + String msgBusinessSid = loanOutboundApply1.getSid(); + //用户的部门全路径sid + bv.setOrgSidPath(loanOutboundApply1.getOrgSidPath()); + //业务sid + bv.setBusinessSid(businessSid); + //用户sid + bv.setUserSid(dto.getUserSid()); + bv.setFormVariables(variables); // String nextNodeUserSids_ = sysOrganization.getManagerSid(); // bv.setNextNodeUserSids(nextNodeUserSids_); -//// if (isTure) { -//// bv.setNextNodeUserSids(nextNodeUserSids_); -//// } else { -//// bv.setNextNodeUserSids(entity.getSalesUserSid()); -//// } -// //流程定义id -// bv.setModelId(ProcDefEnum.LOANSUBLETAPPLY.getProDefId()); -// if (r == 1) { -// //流程定义id -// bv.setModelId(ProcDefEnum.LOANSUBLETAPPLY.getProDefId()); -// ResultBean voResultBean = flowFeign.startProcess(bv); -// if (!voResultBean.getSuccess()) { -// return rb.setMsg(voResultBean.getMsg()); -// } -// UpdateFlowFieldVo ufVo = voResultBean.getData(); -// int i = updateFlowFiled(BeanUtil.beanToMap(ufVo)); -// //==================================添加线程 -// try { -// ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() -// .setNameFormat("demo-pool-%d").build(); -// ExecutorService pool = new ThreadPoolExecutor(2, 100, -// 0L, TimeUnit.MILLISECONDS, -// new LinkedBlockingQueue(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); -// Future future1 = pool.submit(() -> { -// //极光推送 -// MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); -// MessageFlowVo messageFlowVo = new MessageFlowVo(); -// BeanUtil.copyProperties(ufVo, messageFlowVo); -// messageFlowableQuery.setUfVo(messageFlowVo); -// messageFlowableQuery.setAppMap(appMap); -// messageFlowableQuery.setBusinessSid(msgBusinessSid); -// messageFlowableQuery.setModuleName("交回车辆二次转租申请"); -// SysUserVo userVo = sysUserFeign.fetchBySid(loanSubletApply1.getCreateBySid()).getData(); -// if (userVo != null) { -// if (StringUtils.isNotBlank(userVo.getName())) { -// messageFlowableQuery.setMsgContent(userVo.getName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); -// } -// } -// messageFlowableQuery.setMsgTitle("交回车辆二次转租申请"); -// ResultBean stringResultBean = messageFeign.pushMessage(messageFlowableQuery); -// }); -// } catch (Exception e) { -// e.printStackTrace(); -// } -// //==================================添加线程 -// return voResultBean; -// } -// if (r == 2) { -// // ToDo:驳回到发起人后再次提交 -// if (StringUtils.isBlank(dto.getInstanceId())) { -// return rb.setMsg("参数错误:instanceId"); -// } -// LoanSubletApply loanSubletApply2 = fetchBySid(dto.getSid()); -// bv.setTaskId(dto.getTaskId()); -// bv.setTaskDefKey(loanSubletApply2.getNodeSid()); -// bv.setComment("重新提交"); -// bv.setInstanceId(dto.getInstanceId()); -// return complete(bv); +// if (isTure) { +// bv.setNextNodeUserSids(nextNodeUserSids_); +// } else { +// bv.setNextNodeUserSids(entity.getSalesUserSid()); // } + //流程定义id + bv.setModelId(ProcDefEnum.LOANOUTBOUNDVEHAPPLY.getProDefId()); + if (r == 1) { + //流程定义id + bv.setModelId(ProcDefEnum.LOANOUTBOUNDVEHAPPLY.getProDefId()); + ResultBean voResultBean = flowFeign.startProcess(bv); + if (!voResultBean.getSuccess()) { + return rb.setMsg(voResultBean.getMsg()); + } + UpdateFlowFieldVo ufVo = voResultBean.getData(); + int i = updateFlowFiled(BeanUtil.beanToMap(ufVo)); + //==================================添加线程 + try { + ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() + .setNameFormat("demo-pool-%d").build(); + ExecutorService pool = new ThreadPoolExecutor(2, 100, + 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); + Future future1 = pool.submit(() -> { + //极光推送 + MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); + MessageFlowVo messageFlowVo = new MessageFlowVo(); + BeanUtil.copyProperties(ufVo, messageFlowVo); + messageFlowableQuery.setUfVo(messageFlowVo); + messageFlowableQuery.setAppMap(appMap); + messageFlowableQuery.setBusinessSid(msgBusinessSid); + messageFlowableQuery.setModuleName("交回车辆出库申请"); + SysUserVo userVo = sysUserFeign.fetchBySid(loanOutboundApply1.getApplyUserSid()).getData(); + if (userVo != null) { + if (StringUtils.isNotBlank(userVo.getName())) { + messageFlowableQuery.setMsgContent(userVo.getName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); + } + } + messageFlowableQuery.setMsgTitle("交回车辆出库申请"); + ResultBean stringResultBean = messageFeign.pushMessage(messageFlowableQuery); + }); + } catch (Exception e) { + e.printStackTrace(); + } + //==================================添加线程 + return voResultBean; + } + if (r == 2) { + // ToDo:驳回到发起人后再次提交 + if (StringUtils.isBlank(dto.getInstanceId())) { + return rb.setMsg("参数错误:instanceId"); + } + LoanOutboundApply loanOutboundApply2 = fetchBySid(dto.getSid()); + bv.setTaskId(dto.getTaskId()); + bv.setTaskDefKey(loanOutboundApply2.getNodeSid()); + bv.setComment("重新提交"); + bv.setInstanceId(dto.getInstanceId()); + return complete(bv); + } return rb; } public ResultBean complete(BusinessVariables bv) { ResultBean rb = ResultBean.fireFail(); - return null; -// String businessSid = bv.getBusinessSid(); -// LoanSubletApply loanSubletApply = this.fetchBySid(businessSid); -// if (bv.getTaskId().equals(loanSubletApply.getTaskId())) { -// bv.setOrgSidPath(loanSubletApply.getOrgSidPath()); -// //流程中的参数赋值 -// Map variables = new HashMap<>(); -// Map appMap = new HashMap<>(); -// //若有网关,则赋值网关中判断的字段。 -//// boolean isTure = true; -//// //去查询是否同意 -//// if (StringUtils.isNotBlank(loanCustomerRecord.getSalesUserSid())) { -//// if (!loanCustomerRecord.getCreateBySid().equals(loanCustomerRecord.getSalesUserSid())) { -//// isTure = false; -//// } -//// } -//// variables.put("isTure", isTure); -//// if (bv.getTaskDefKey().equals("Activity_1078xxs")) { -//// if (StringUtils.isNotBlank(loanCustomerRecord.getManageSid())) { -//// bv.setNextNodeUserSids(loanCustomerRecord.getManageSid()); -//// } else { -//// bv.setNextNodeUserSids(ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId()); -//// } -//// } -// variables.put("businessSid", businessSid); -// appMap.put("sid", businessSid); -// variables.put("app", appMap); -// bv.setFormVariables(variables); -// ResultBean resultBean = flowFeign.handleProsess(bv); -// if (!resultBean.getSuccess()) { -// return rb.setMsg(resultBean.getMsg()); + String businessSid = bv.getBusinessSid(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + LoanOutboundApply loanOutboundApply = this.fetchBySid(businessSid); + if (bv.getTaskId().equals(loanOutboundApply.getTaskId())) { + bv.setOrgSidPath(loanOutboundApply.getOrgSidPath()); + //流程中的参数赋值 + Map variables = new HashMap<>(); + Map appMap = new HashMap<>(); + //若有网关,则赋值网关中判断的字段。 +// boolean isTure = true; +// //去查询是否同意 +// if (StringUtils.isNotBlank(loanCustomerRecord.getSalesUserSid())) { +// if (!loanCustomerRecord.getCreateBySid().equals(loanCustomerRecord.getSalesUserSid())) { +// isTure = false; +// } // } -// UpdateFlowFieldVo ufVo = resultBean.getData(); -// int i = updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); -// if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { -// LoanSubletApply subletApply = fetchBySid(businessSid); -// subletApply.setClosingDate(new DateTime()); -// baseMapper.updateById(subletApply); -// //todo 修改交车车辆台账状态 -// } else { -// //极光推送 -// loanSubletApply = fetchBySid(businessSid); -// MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); -// MessageFlowVo messageFlowVo = new MessageFlowVo(); -// BeanUtil.copyProperties(ufVo, messageFlowVo); -// messageFlowVo.setProcDefId(loanSubletApply.getProcDefId()); -// messageFlowVo.setProcInsId(loanSubletApply.getProcInstId()); -// messageFlowableQuery.setUfVo(messageFlowVo); -// messageFlowableQuery.setAppMap(appMap); -// messageFlowableQuery.setBusinessSid(businessSid); -// messageFlowableQuery.setModuleName("交回车辆二次转租申请"); -// messageFlowableQuery.setMsgContent(loanSubletApply.getApplyName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); -// messageFlowableQuery.setMsgTitle("交回车辆二次转租申请"); -// ResultBean stringResultBean = messageFeign.pushMessage(messageFlowableQuery); +// variables.put("isTure", isTure); +// if (bv.getTaskDefKey().equals("Activity_1078xxs")) { +// if (StringUtils.isNotBlank(loanCustomerRecord.getManageSid())) { +// bv.setNextNodeUserSids(loanCustomerRecord.getManageSid()); +// } else { +// bv.setNextNodeUserSids(ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId()); +// } // } -// return rb.success().setData(resultBean.getData()); -// } else { -// return rb.setMsg("操作失败!提交的数据不一致"); -// } + variables.put("businessSid", businessSid); + appMap.put("sid", businessSid); + variables.put("app", appMap); + bv.setFormVariables(variables); + ResultBean resultBean = flowFeign.handleProsess(bv); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + UpdateFlowFieldVo ufVo = resultBean.getData(); + int i = updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); + if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { + LoanOutboundApply outboundApply = fetchBySid(businessSid); + outboundApply.setClosingDate(new DateTime()); + outboundApply.setOutboundDate(new Date()); + baseMapper.updateById(outboundApply); + //todo 修改交车车辆台账状态 + List vinLists = loanOutboundVehService.selByMainSid(businessSid); + if (!vinLists.isEmpty()) { + vinLists.stream().forEach(v -> { + int u = baseMapper.updateLedgerStockStateBySid("0002", "出库", sdf.format(new Date()), v.getLedgerSid()); + }); + } + } else { + //极光推送 + loanOutboundApply = fetchBySid(businessSid); + MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); + MessageFlowVo messageFlowVo = new MessageFlowVo(); + BeanUtil.copyProperties(ufVo, messageFlowVo); + messageFlowVo.setProcDefId(loanOutboundApply.getProcDefId()); + messageFlowVo.setProcInsId(loanOutboundApply.getProcInstId()); + messageFlowableQuery.setUfVo(messageFlowVo); + messageFlowableQuery.setAppMap(appMap); + messageFlowableQuery.setBusinessSid(businessSid); + messageFlowableQuery.setModuleName("交回车辆出库申请"); + messageFlowableQuery.setMsgContent(loanOutboundApply.getApplyName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); + messageFlowableQuery.setMsgTitle("交回车辆出库申请"); + ResultBean stringResultBean = messageFeign.pushMessage(messageFlowableQuery); + } + return rb.success().setData(resultBean.getData()); + } else { + return rb.setMsg("操作失败!提交的数据不一致"); + } } /** @@ -615,120 +626,107 @@ public class LoanOutboundApplyService extends MybatisBaseService resultBean = flowableFeign.revokeProcess(flowTaskVo); -// if (!resultBean.getSuccess()) { -// return rb.setMsg(resultBean.getMsg()); -// } -// updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); -// loanSubletApply = fetchBySid(query.getBusinessSid()); -// String procId = loanSubletApply.getProcInstId(); -// ResultBean> listResultBean = flowTaskFeign.getLatestTasks(procId); -// String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_(); -// String nextName = listResultBean.getData().get(0).getName_(); -// List receiveSidList = Arrays.asList(nextNodeUserSids.split(",")); -// if ("发起申请".equals(nextName)) { -// //退回车辆处置状态 -// List vinLists1 = loanSubletVehService.selByMainSid(query.getBusinessSid()); -// if (!vinLists1.isEmpty()) { -// vinLists1.stream().forEach(v -> { -// loanRedemptionApplyService.updateVehLedgerDisposal(v.getLedgerSid(), "01", "未处置"); -// }); -// } -// } -// return rb.success().setData(resultBean.getData()); -// } -// } + if (StringUtils.isBlank(query.getUserSid())) { + return rb.setMsg("参数错误:userSid"); + } + LoanOutboundApply apply = fetchBySid(query.getBusinessSid()); + String businessTaskId = apply.getTaskId(); + if (StringUtils.isNotBlank(businessTaskId)) { + if (businessTaskId.equals(query.getTaskId())) { + FlowTaskVo flowTaskVo = new FlowTaskVo(); + BeanUtil.copyProperties(query, flowTaskVo); + ResultBean resultBean = flowableFeign.revokeProcess(flowTaskVo); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); + apply = fetchBySid(query.getBusinessSid()); + String procId = apply.getProcInstId(); + ResultBean> listResultBean = flowTaskFeign.getLatestTasks(procId); + String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_(); + String nextName = listResultBean.getData().get(0).getName_(); + List receiveSidList = Arrays.asList(nextNodeUserSids.split(",")); + if ("发起申请".equals(nextName)) { + + } + return rb.success().setData(resultBean.getData()); + } + } return rb.setMsg("操作失败,提交的数据不一致!"); } public ResultBean taskReject(OutboundTaskQuery query) { ResultBean rb = ResultBean.fireFail(); -// String businessSid = query.getBusinessSid(); -// LoanSubletApply loanSubletApply = fetchBySid(businessSid); -// if (loanSubletApply == null) { -// return rb.setMsg("该申请不存在"); -// } -// String businessTaskId = loanSubletApply.getTaskId(); -// if (StringUtils.isNotBlank(businessTaskId)) { -// if (businessTaskId.equals(query.getTaskId())) { -// if (StringUtils.isBlank(query.getComment())) { -// return rb.setMsg("请填写意见"); -// } -// if (StringUtils.isBlank(query.getUserSid())) { -// return rb.setMsg("参数错误:userSid"); -// } -// FlowTaskVo flowTaskVo = new FlowTaskVo(); -// BeanUtil.copyProperties(query, flowTaskVo); -// Map variables = new HashMap<>(); -// Map appMap = new HashMap<>(); -// appMap.put("sid", businessSid); -// variables.put("app", appMap); -// //若有网关,则赋值网关中判断的字段。 -//// boolean isTure = true; -//// //去查询是否同意 -//// if (StringUtils.isNotBlank(loanCustomerRecord.getSalesUserSid())) { -//// if (!loanCustomerRecord.getCreateBySid().equals(loanCustomerRecord.getSalesUserSid())) { -//// isTure = false; -//// } -//// } -//// variables.put("isTure", isTure); -// flowTaskVo.setValues(variables); -// ResultBean resultBean = flowableFeign.taskReject(flowTaskVo); -// if (!resultBean.getSuccess()) { -// return rb.setMsg(resultBean.getMsg()); -// } -// UpdateFlowFieldVo ufVo = resultBean.getData(); -// Map map = BeanUtil.beanToMap(ufVo); -// //更新业务中的流程相关的参数 -// updateFlowFiled(map); -// //极光推送 -// loanSubletApply = fetchBySid(businessSid); -// MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); -// MessageFlowVo messageFlowVo = new MessageFlowVo(); -// BeanUtil.copyProperties(ufVo, messageFlowVo); -// String procId = loanSubletApply.getProcInstId(); -// messageFlowVo.setProcInsId(procId); -// messageFlowVo.setProcDefId(loanSubletApply.getProcDefId()); -// messageFlowableQuery.setUfVo(messageFlowVo); -// messageFlowableQuery.setAppMap(appMap); -// messageFlowableQuery.setBusinessSid(businessSid); -// messageFlowableQuery.setModuleName("交回车辆二次转租申请"); -// ResultBean> listResultBean = flowTaskFeign.getLatestTasks(procId); -// String nextName = listResultBean.getData().get(0).getName_(); -// String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_(); -// List receiveSidList = Arrays.asList(nextNodeUserSids.split(",")); -//// if (receiveSidList.size() == 1 && receiveSidList.get(0).equals(busVehicleApply.getCreateBySid())) { -// if ("发起申请".equals(nextName)) { -// messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交"); -// //退回车辆处置状态 -// List vinLists1 = loanSubletVehService.selByMainSid(businessSid); -// if (!vinLists1.isEmpty()) { -// vinLists1.stream().forEach(v -> { -// loanRedemptionApplyService.updateVehLedgerDisposal(v.getLedgerSid(), "01", "未处置"); -// }); -// } -// } else { -// SysUserVo userVo = sysUserFeign.fetchBySid(loanSubletApply.getCreateBySid()).getData(); -// if (userVo != null) { -// if (StringUtils.isNotBlank(userVo.getName())) { -// messageFlowableQuery.setMsgContent(userVo.getName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); -// } + String businessSid = query.getBusinessSid(); + LoanOutboundApply apply = fetchBySid(businessSid); + if (apply == null) { + return rb.setMsg("该申请不存在"); + } + String businessTaskId = apply.getTaskId(); + if (StringUtils.isNotBlank(businessTaskId)) { + if (businessTaskId.equals(query.getTaskId())) { + if (StringUtils.isBlank(query.getComment())) { + return rb.setMsg("请填写意见"); + } + if (StringUtils.isBlank(query.getUserSid())) { + return rb.setMsg("参数错误:userSid"); + } + FlowTaskVo flowTaskVo = new FlowTaskVo(); + BeanUtil.copyProperties(query, flowTaskVo); + Map variables = new HashMap<>(); + Map appMap = new HashMap<>(); + appMap.put("sid", businessSid); + variables.put("app", appMap); + //若有网关,则赋值网关中判断的字段。 +// boolean isTure = true; +// //去查询是否同意 +// if (StringUtils.isNotBlank(loanCustomerRecord.getSalesUserSid())) { +// if (!loanCustomerRecord.getCreateBySid().equals(loanCustomerRecord.getSalesUserSid())) { +// isTure = false; // } // } -// messageFlowableQuery.setMsgTitle("交回车辆二次转租申请"); -// ResultBean stringResultBean = messageFeign.pushMessage(messageFlowableQuery); -// return rb.success(); -// } -// } +// variables.put("isTure", isTure); + flowTaskVo.setValues(variables); + ResultBean resultBean = flowableFeign.taskReject(flowTaskVo); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + UpdateFlowFieldVo ufVo = resultBean.getData(); + Map map = BeanUtil.beanToMap(ufVo); + //更新业务中的流程相关的参数 + updateFlowFiled(map); + //极光推送 + apply = fetchBySid(businessSid); + MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); + MessageFlowVo messageFlowVo = new MessageFlowVo(); + BeanUtil.copyProperties(ufVo, messageFlowVo); + String procId = apply.getProcInstId(); + messageFlowVo.setProcInsId(procId); + messageFlowVo.setProcDefId(apply.getProcDefId()); + messageFlowableQuery.setUfVo(messageFlowVo); + messageFlowableQuery.setAppMap(appMap); + messageFlowableQuery.setBusinessSid(businessSid); + messageFlowableQuery.setModuleName("交回车辆出库申请"); + ResultBean> listResultBean = flowTaskFeign.getLatestTasks(procId); + String nextName = listResultBean.getData().get(0).getName_(); + String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_(); + List receiveSidList = Arrays.asList(nextNodeUserSids.split(",")); +// if (receiveSidList.size() == 1 && receiveSidList.get(0).equals(busVehicleApply.getCreateBySid())) { + if ("发起申请".equals(nextName)) { + messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交"); + } else { + SysUserVo userVo = sysUserFeign.fetchBySid(apply.getApplyUserSid()).getData(); + if (userVo != null) { + if (StringUtils.isNotBlank(userVo.getName())) { + messageFlowableQuery.setMsgContent(userVo.getName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); + } + } + } + messageFlowableQuery.setMsgTitle("交回车辆出库申请"); + ResultBean stringResultBean = messageFeign.pushMessage(messageFlowableQuery); + return rb.success(); + } + } return rb.setMsg("操作失败!提交的数据不一致!"); } @@ -743,57 +741,44 @@ public class LoanOutboundApplyService extends MybatisBaseService resultBean = flowableFeign.breakProcess(flowTaskVo); -// if (!resultBean.getSuccess()) { -// return rb.setMsg(resultBean.getMsg()); -// } -// Map map = BeanUtil.beanToMap(resultBean.getData()); -// updateFlowFiled(map); -// //终止任务后操作 -// LoanSubletApply entity = fetchBySid(query.getBusinessSid()); + LoanOutboundApply apply = fetchBySid(query.getBusinessSid()); + String businessTaskId = apply.getTaskId(); + if (StringUtils.isNotBlank(businessTaskId)) { + if (query.getUserSid().equals(apply.getApplyUserSid())) { + FlowTaskVo flowTaskVo = new FlowTaskVo(); + BeanUtil.copyProperties(query, flowTaskVo); + ResultBean resultBean = flowableFeign.breakProcess(flowTaskVo); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + Map map = BeanUtil.beanToMap(resultBean.getData()); + updateFlowFiled(map); + //终止任务后操作 +// LoanOutboundApply entity = fetchBySid(query.getBusinessSid()); // if (entity.getNodeState().equals("终止")) { -// // 修改交回车辆台账状态 -// List vinLists = loanSubletVehService.selByMainSid(query.getBusinessSid()); -// if (!vinLists.isEmpty()) { -// vinLists.stream().forEach(v -> { -// loanRedemptionApplyService.updateVehLedgerDisposal(v.getLedgerSid(), "01", "未处置"); -// }); -// } // // } -// return rb.success().setData(resultBean.getData()); -// } else { -// if (businessTaskId.equals(query.getTaskId())) { -// FlowTaskVo flowTaskVo = new FlowTaskVo(); -// BeanUtil.copyProperties(query, flowTaskVo); -// ResultBean resultBean = flowableFeign.breakProcess(flowTaskVo); -// if (!resultBean.getSuccess()) { -// return rb.setMsg(resultBean.getMsg()); -// } -// Map map = BeanUtil.beanToMap(resultBean.getData()); -// updateFlowFiled(map); -// //终止任务后操作 -// LoanSubletApply entity = fetchBySid(query.getBusinessSid()); + return rb.success().setData(resultBean.getData()); + } else { + if (businessTaskId.equals(query.getTaskId())) { + FlowTaskVo flowTaskVo = new FlowTaskVo(); + BeanUtil.copyProperties(query, flowTaskVo); + ResultBean resultBean = flowableFeign.breakProcess(flowTaskVo); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + Map map = BeanUtil.beanToMap(resultBean.getData()); + updateFlowFiled(map); + //终止任务后操作 +// LoanOutboundApply entity = fetchBySid(query.getBusinessSid()); // if (entity.getNodeState().equals("终止")) { -// // 修改交回车辆台账状态 -// List vinLists = loanSubletVehService.selByMainSid(query.getBusinessSid()); -// if (!vinLists.isEmpty()) { -// vinLists.stream().forEach(v -> { -// loanRedemptionApplyService.updateVehLedgerDisposal(v.getLedgerSid(), "01", "未处置"); -// }); -// } -// } -// return rb.success().setData(resultBean.getData()); -// } -// } // -// } +// } + return rb.success().setData(resultBean.getData()); + } + } + + } return rb.setMsg("操作失败!提交的数据不一致!"); } @@ -802,57 +787,54 @@ public class LoanOutboundApplyService extends MybatisBaseService> getNextNodesForSubmit(OutboundGetNodeQuery query) { -// ResultBean> rb = ResultBean.fireFail(); -// BusinessVariables bv = new BusinessVariables(); -// BeanUtil.copyProperties(query, bv); -// //流程中的参数赋值、若有网关,则赋值网关中判断的字段。 -// Map variables = new HashMap<>(); -// -// //根据业务sid查询排产信息 -// LoanSubletApply loanSubletApply = fetchBySid(query.getBusinessSid()); -// //若有网关,则赋值网关中判断的字段。 -//// boolean isTure = true; -//// //去查询是否同意 -//// if (StringUtils.isNotBlank(loanCustomerRecord.getSalesUserSid())) { -//// if (!loanCustomerRecord.getCreateBySid().equals(loanCustomerRecord.getSalesUserSid())) { -//// isTure = false; -//// } -//// } -//// variables.put("isTure", isTure); -// bv.setFormVariables(variables); -// bv.setModelId(loanSubletApply.getProcDefId()); -// ResultBean>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); -// //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo -// List voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), OutboundGetNodeVo.class)).collect(Collectors.toList()); -// return rb.success().setData(voList); - return null; + ResultBean> rb = ResultBean.fireFail(); + BusinessVariables bv = new BusinessVariables(); + BeanUtil.copyProperties(query, bv); + //流程中的参数赋值、若有网关,则赋值网关中判断的字段。 + Map variables = new HashMap<>(); + + //根据业务sid查询排产信息 + LoanOutboundApply apply = fetchBySid(query.getBusinessSid()); + //若有网关,则赋值网关中判断的字段。 +// boolean isTure = true; +// //去查询是否同意 +// if (StringUtils.isNotBlank(loanCustomerRecord.getSalesUserSid())) { +// if (!loanCustomerRecord.getCreateBySid().equals(loanCustomerRecord.getSalesUserSid())) { +// isTure = false; +// } +// } +// variables.put("isTure", isTure); + bv.setFormVariables(variables); + bv.setModelId(apply.getProcDefId()); + ResultBean>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); + //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo + List voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), OutboundGetNodeVo.class)).collect(Collectors.toList()); + return rb.success().setData(voList); } public ResultBean> getPreviousNodesForReject(OutboundGetNodeQuery query) { - return null; -// ResultBean> rb = ResultBean.fireFail(); -// BusinessVariables bv = new BusinessVariables(); -// BeanUtil.copyProperties(query, bv); -// //流程中的参数赋值、若有网关,则赋值网关中判断的字段。 -// Map variables = new HashMap<>(); -// //根据业务sid查询排产信息 -// LoanSubletApply loanSubletApply = fetchBySid(query.getBusinessSid()); -//// //若有网关,则赋值网关中判断的字段。 -//// boolean isTure = true; -//// //去查询是否同意 -//// if (StringUtils.isNotBlank(loanCustomerRecord.getSalesUserSid())) { -//// if (!loanCustomerRecord.getCreateBySid().equals(loanCustomerRecord.getSalesUserSid())) { -//// isTure = false; -//// } -//// } -//// variables.put("isTure", isTure); -// bv.setFormVariables(variables); -// bv.setModelId(loanSubletApply.getProcDefId()); -// ResultBean>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); -// //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo -// List voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), SubletGetNodeVo.class)).collect(Collectors.toList()); -// return rb.success().setData(voList); - + ResultBean> rb = ResultBean.fireFail(); + BusinessVariables bv = new BusinessVariables(); + BeanUtil.copyProperties(query, bv); + //流程中的参数赋值、若有网关,则赋值网关中判断的字段。 + Map variables = new HashMap<>(); + //根据业务sid查询排产信息 + LoanOutboundApply apply = fetchBySid(query.getBusinessSid()); +// //若有网关,则赋值网关中判断的字段。 +// boolean isTure = true; +// //去查询是否同意 +// if (StringUtils.isNotBlank(loanCustomerRecord.getSalesUserSid())) { +// if (!loanCustomerRecord.getCreateBySid().equals(loanCustomerRecord.getSalesUserSid())) { +// isTure = false; +// } +// } +// variables.put("isTure", isTure); + bv.setFormVariables(variables); + bv.setModelId(apply.getProcDefId()); + ResultBean>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); + //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo + List voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), OutboundGetNodeVo.class)).collect(Collectors.toList()); + return rb.success().setData(voList); } public ResultBean delegate(OutboundDelegateQuery query) { @@ -867,101 +849,107 @@ public class LoanOutboundApplyService extends MybatisBaseService appDetail(String sid) { ResultBean rb = ResultBean.fireFail(); AppOutboundDetailsVo vo = new AppOutboundDetailsVo(); -// LoanSubletApply entity = fetchBySid(sid); -// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); -// if (null != entity) { -// vo.setSid(sid); -// String dept = ""; -// String applyName = ""; -// //---------------------------------------------------- -// if (StringUtils.isNotBlank(entity.getBorrowerName())) { -// vo.setBorrName(entity.getBorrowerName()); -// } -// if (StringUtils.isNotBlank(entity.getCustomer())) { -// vo.setCustName(entity.getCustomer()); -// } -// if (StringUtils.isNotBlank(entity.getVinOwner())) { -// vo.setVinOwner(entity.getVinOwner()); -// } -// if (StringUtils.isNotBlank(entity.getCustomerType())) { -// vo.setCustomerType(entity.getCustomerType()); -// } -// if (StringUtils.isNotBlank(entity.getPhoneNum())) { -// vo.setPhoneNum(entity.getPhoneNum()); -// } -// if (StringUtils.isNotBlank(entity.getCertificateType())) { -// vo.setCertificateType(entity.getCertificateType()); -// } -// if (StringUtils.isNotBlank(entity.getEndDate())) { -// vo.setEndDate(entity.getEndDate()); -// } -// if (null != entity.getAgree()) { -// vo.setAgree(entity.getAgree().toString()); -// } -// if (StringUtils.isNotBlank(entity.getIdNumber())) { -// vo.setIdNumber(entity.getIdNumber()); -// } -// if (StringUtils.isNotBlank(entity.getCardAddress())) { -// vo.setCardAddress(entity.getCardAddress()); -// } -// if (StringUtils.isNotBlank(entity.getBankName())) { -// vo.setBankName(entity.getBankName()); -// } -// if (StringUtils.isNotBlank(entity.getBankContractNo())) { -// vo.setBankContractNo(entity.getBankContractNo()); -// } -// if (StringUtils.isNotBlank(entity.getPlan())) { -// vo.setPlan(entity.getPlan()); -// } -// if (null != entity.getAmount()) { -// vo.setAmount(entity.getAmount().toString()); -// } -// //---------------------------------------------------- -// if (StringUtils.isNotBlank(entity.getProcInstId())) { -// vo.setProcInsId(entity.getProcInstId()); -// } -// if (StringUtils.isNotBlank(entity.getTaskId())) { -// vo.setTaskId(entity.getTaskId()); -// } -// if (null != entity.getApplyDate()) { -// vo.setTime(sdf.format(entity.getApplyDate())); -// } -// if (StringUtils.isNotBlank(entity.getDept())) { -// dept = entity.getDept(); -// } -// if (StringUtils.isNotBlank(entity.getApplyName())) { -// applyName = entity.getApplyName(); -// } -// vo.setPublishInfo(dept + "-" + applyName); -// List fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.SUBLETAPPLY.getAttachType()); -// fileList.removeAll(Collections.singleton(null)); -// if (!fileList.isEmpty()) { -// List files = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). -// collect(Collectors.toList()); -// vo.setFiles(files); -// } -// List vinList = new ArrayList<>(); -// List vinLists = loanSubletVehService.selByMainSid(sid); -// if (!vinLists.isEmpty()) { -// vinLists.stream().forEach(v -> { -// AppSubletVinListVo appVinListVo = new AppSubletVinListVo(); -// if (StringUtils.isNotBlank(v.getVinNo())) { -// appVinListVo.setVinNo(v.getVinNo()); -// } -// if (StringUtils.isNotBlank(v.getVehModel())) { -// appVinListVo.setModel(v.getVehModel()); -// } -// if (StringUtils.isNotBlank(v.getVehType())) { -// appVinListVo.setVehType(v.getVehType()); -// } -// if (StringUtils.isNotBlank(v.getVehMark())) { -// appVinListVo.setVehMark(v.getVehMark()); -// } -// vinList.add(appVinListVo); -// }); -// vo.setVinList(vinList); -// } -// } + LoanOutboundApply entity = fetchBySid(sid); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + if (null != entity) { + vo.setSid(sid); + String dept = ""; + String applyName = ""; + //---------------------------------------------------- + if (StringUtils.isNotBlank(entity.getNewCustomer())) { + vo.setCustName(entity.getNewCustomer()); + } + if (StringUtils.isNotBlank(entity.getApplySid())) { + vo.setApplySid(entity.getApplySid()); + } + if (StringUtils.isNotBlank(entity.getPhoneNum())) { + vo.setPhoneNum(entity.getPhoneNum()); + } + if (StringUtils.isNotBlank(entity.getDisposalKey())) { + vo.setDisposalKey(entity.getDisposalKey()); + } + if (StringUtils.isNotBlank(entity.getDisposal())) { + vo.setDisposal(entity.getDisposal()); + } + if (StringUtils.isNotBlank(entity.getDisposalContractNo())) { + vo.setDisposalContractNo(entity.getDisposalContractNo()); + } + if (StringUtils.isNotBlank(entity.getRemarks())) { + vo.setRemarks(entity.getRemarks()); + } + if (null != entity.getAmount()) { + vo.setAmount(entity.getAmount().toString()); + } + //---------------------------------------------------- + if (StringUtils.isNotBlank(entity.getProcInstId())) { + vo.setProcInsId(entity.getProcInstId()); + } + if (StringUtils.isNotBlank(entity.getTaskId())) { + vo.setTaskId(entity.getTaskId()); + } + if (null != entity.getApplyDate()) { + vo.setTime(sdf.format(entity.getApplyDate())); + } + if (StringUtils.isNotBlank(entity.getDept())) { + dept = entity.getDept(); + } + if (StringUtils.isNotBlank(entity.getApplyName())) { + applyName = entity.getApplyName(); + } + vo.setPublishInfo(dept + "-" + applyName); + List fileList1 = loanFileService.selectByLinkSid(sid, LoanFileEnum.BUYFILES.getAttachType()); + fileList1.removeAll(Collections.singleton(null)); + if (!fileList1.isEmpty()) { + List files = fileList1.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). + collect(Collectors.toList()); + vo.setBuyFiles(files); + } + List fileList2 = loanFileService.selectByLinkSid(sid, LoanFileEnum.DELIVERYFILES.getAttachType()); + fileList2.removeAll(Collections.singleton(null)); + if (!fileList2.isEmpty()) { + List files = fileList2.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). + collect(Collectors.toList()); + vo.setDeliveryFiles(files); + } + List fileList3 = loanFileService.selectByLinkSid(sid, LoanFileEnum.ASSESSFILES.getAttachType()); + fileList3.removeAll(Collections.singleton(null)); + if (!fileList3.isEmpty()) { + List files = fileList3.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). + collect(Collectors.toList()); + vo.setAssessFiles(files); + } + List fileList4 = loanFileService.selectByLinkSid(sid, LoanFileEnum.OTHERFILES.getAttachType()); + fileList4.removeAll(Collections.singleton(null)); + if (!fileList4.isEmpty()) { + List files = fileList4.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). + collect(Collectors.toList()); + vo.setOtherFiles(files); + } + List vinList = new ArrayList<>(); + List vinLists = loanOutboundVehService.selByMainSid(sid); + if (!vinLists.isEmpty()) { + vinLists.stream().forEach(v -> { + AppOutboundVinListVo appVinListVo = new AppOutboundVinListVo(); + if (StringUtils.isNotBlank(v.getVinNo())) { + appVinListVo.setVinNo(v.getVinNo()); + } + if (StringUtils.isNotBlank(v.getVehModel())) { + appVinListVo.setModel(v.getVehModel()); + } + if (StringUtils.isNotBlank(v.getVehType())) { + appVinListVo.setVehType(v.getVehType()); + } + if (StringUtils.isNotBlank(v.getVehMark())) { + appVinListVo.setVehMark(v.getVehMark()); + } + if (StringUtils.isNotBlank(v.getLocation())) { + appVinListVo.setLocation(v.getLocation()); + } + vinList.add(appVinListVo); + }); + vo.setVinList(vinList); + } + } return rb.success().setData(vo); } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundveh/LoanOutboundVehMapper.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundveh/LoanOutboundVehMapper.java index 3060f684ac..32c8790971 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundveh/LoanOutboundVehMapper.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundveh/LoanOutboundVehMapper.java @@ -1,6 +1,7 @@ package com.yxt.anrui.riskcenter.biz.loanoutboundveh; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.OutboundVinList; import com.yxt.anrui.riskcenter.api.loanoutboundveh.LoanOutboundVeh; import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList; import com.yxt.anrui.riskcenter.api.loansubletveh.LoanSubletVeh; @@ -15,5 +16,5 @@ public interface LoanOutboundVehMapper extends BaseMapper { int deleteByMainSid(@Param("mainSid") String mainSid); - List selByMainSid(@Param("mainSid") String mainSid); + List selByMainSid(@Param("mainSid") String mainSid); } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundveh/LoanOutboundVehMapper.xml b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundveh/LoanOutboundVehMapper.xml index f75843fecf..a730d0ea93 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundveh/LoanOutboundVehMapper.xml +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundveh/LoanOutboundVehMapper.xml @@ -8,15 +8,9 @@ WHERE mainSid = #{mainSid} \ No newline at end of file diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundveh/LoanOutboundVehService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundveh/LoanOutboundVehService.java index 2b7a8bb23a..bfc43bd55b 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundveh/LoanOutboundVehService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundveh/LoanOutboundVehService.java @@ -1,5 +1,6 @@ package com.yxt.anrui.riskcenter.biz.loanoutboundveh; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.OutboundVinList; import com.yxt.anrui.riskcenter.api.loanoutboundveh.LoanOutboundVeh; import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList; import com.yxt.anrui.riskcenter.api.loansubletveh.LoanSubletVeh; @@ -21,7 +22,7 @@ public class LoanOutboundVehService extends MybatisBaseService selByMainSid(String sid) { + public List selByMainSid(String sid) { return baseMapper.selByMainSid(sid); } } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyMapper.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyMapper.java index e004847db6..c35c1a5b58 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyMapper.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyMapper.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants; import com.yxt.anrui.riskcenter.api.loanbuckleapply.LoanBuckleApply; import com.yxt.anrui.riskcenter.api.loanbuckleapply.LoanBuckleApplyVo; import com.yxt.anrui.riskcenter.api.loanredemptionapply.*; +import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedger; import com.yxt.anrui.riskcenter.api.loansubletapply.VehDisposal; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -32,4 +33,6 @@ public interface LoanRedemptionApplyMapper extends BaseMapper + \ No newline at end of file diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyService.java index 0b94685b5e..9ed2630f63 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyService.java @@ -13,6 +13,8 @@ import com.yxt.anrui.base.common.utils.domain.BillNo; import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerFeign; import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; +import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign; +import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo; import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign; import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher; import com.yxt.anrui.flowable.api.flow.FlowableFeign; @@ -38,6 +40,8 @@ import com.yxt.anrui.riskcenter.api.loanbuckleapply.flow.*; import com.yxt.anrui.riskcenter.api.loanbuckleapplyrecord.LoanBuckleApplyRecord; import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.LoanOutboundApplyDto; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.OutboundVinListDto; import com.yxt.anrui.riskcenter.api.loanredemptionapply.*; import com.yxt.anrui.riskcenter.api.loanredemptionapply.app.AppRedemptionDetailsVo; import com.yxt.anrui.riskcenter.api.loanredemptionapply.app.AppVinListVo; @@ -47,10 +51,12 @@ import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistory; import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistoryRecordVo; import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails; import com.yxt.anrui.riskcenter.api.loanrestorereportapply.AlrepaidAndArrVo; +import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedger; import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList; import com.yxt.anrui.riskcenter.api.loansubletapply.VehDisposal; import com.yxt.anrui.riskcenter.biz.loanbuckleapplyrecord.LoanBuckleApplyRecordService; import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService; +import com.yxt.anrui.riskcenter.biz.loanoutboundapply.LoanOutboundApplyService; import com.yxt.anrui.riskcenter.biz.loanredemptionveh.LoanRedemptionVehService; import com.yxt.anrui.riskcenter.biz.loanrepaymenthistory.LoanRepaymentHistoryService; import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService; @@ -120,6 +126,10 @@ public class LoanRedemptionApplyService extends MybatisBaseService listPage(PagerQuery pq) { IPage page = PagerUtil.queryToPage(pq); @@ -784,7 +794,18 @@ public class LoanRedemptionApplyService extends MybatisBaseService(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); + Future future1 = pool.submit(() -> { + pushVehOutBound(redemptionApply); + }); + } catch (Exception e) { + e.printStackTrace(); + } } else { //极光推送 loanRedemptionApply = fetchBySid(businessSid); @@ -807,6 +828,42 @@ public class LoanRedemptionApplyService extends MybatisBaseService vinList = new ArrayList<>(); + BeanUtil.copyProperties(loanRedemptionApply, dto); + dto.setApplySid(loanRedemptionApply.getSid()); + dto.setDisposalKey("02"); + dto.setDisposal("客户赎回"); + if (StringUtils.isNotBlank(loanRedemptionApply.getCustomerSid())) { + dto.setNewCustomerSid(loanRedemptionApply.getCustomerSid()); + CrmCustomerTempVo customerTempVo = crmCustomerTempFeign.fetchSid(loanRedemptionApply.getCustomerSid()).getData(); + if (null != customerTempVo) { + if (StringUtils.isNotBlank(customerTempVo.getMobile())) { + dto.setPhoneNum(customerTempVo.getMobile()); + } + } + } + if (StringUtils.isNotBlank(loanRedemptionApply.getCustomer())) { + dto.setNewCustomer(loanRedemptionApply.getCustomer()); + } + List vinLists = loanRedemptionVehService.selByMainSid(loanRedemptionApply.getSid()); + if (!vinLists.isEmpty()) { + vinLists.forEach(v -> { + OutboundVinListDto outboundVinListDto = new OutboundVinListDto(); + BeanUtil.copyProperties(v, outboundVinListDto); + LoanReturnVehLedger loanReturnVehLedger = baseMapper.selVehLedgerBySid(v.getLedgerSid()); + if (null != loanReturnVehLedger) { + if (StringUtils.isNotBlank(loanReturnVehLedger.getLocation())) { + outboundVinListDto.setLocation(loanReturnVehLedger.getLocation()); + } + } + vinList.add(outboundVinListDto); + }); + } + dto.setVinList(vinList); + loanOutboundApplyService.saveOutbound(dto); + } public ResultBean revokeProcess(RedemptionTaskQuery query) { ResultBean rb = ResultBean.fireFail(); @@ -953,7 +1010,7 @@ public class LoanRedemptionApplyService extends MybatisBaseService vinLists = loanRedemptionVehService.selByMainSid(query.getBusinessSid()); if (!vinLists.isEmpty()) { vinLists.stream().forEach(v -> { @@ -975,7 +1032,7 @@ public class LoanRedemptionApplyService extends MybatisBaseService vinLists = loanRedemptionVehService.selByMainSid(query.getBusinessSid()); if (!vinLists.isEmpty()) { vinLists.stream().forEach(v -> { diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyMapper.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyMapper.java index d2839b006f..13bfdb6056 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyMapper.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyMapper.java @@ -5,6 +5,7 @@ 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.loanredemptionapply.*; +import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedger; import com.yxt.anrui.riskcenter.api.loansubletapply.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -41,4 +42,6 @@ public interface LoanSubletApplyMapper extends BaseMapper { VehDisposal selVehDisposal(@Param("ledgerSid") String ledgerSid); List pickCustomer(@Param("userOrgSid") String userOrgSid); + + LoanReturnVehLedger selVehLedgerBySid(@Param("ledgerSid") String ledgerSid); } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyMapper.xml b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyMapper.xml index f640ca1fdf..524ca56116 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyMapper.xml +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyMapper.xml @@ -199,4 +199,10 @@ FROM anrui_crm.crm_customer_temp WHERE createOrgSid = #{userOrgSid} + \ No newline at end of file diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyService.java index f1e9b308de..733becc989 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansubletapply/LoanSubletApplyService.java @@ -10,6 +10,9 @@ import com.yxt.anrui.base.api.basepurchasesystem.BasePurchaseSystemFeign; import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerFeign; import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; +import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTemp; +import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign; +import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo; import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign; import com.yxt.anrui.flowable.api.flow.FlowableFeign; import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo; @@ -29,12 +32,10 @@ import com.yxt.anrui.portal.api.sysuser.SysUserFeign; import com.yxt.anrui.portal.api.sysuser.SysUserVo; import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.LoanOutboundApplyDto; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.OutboundVinListDto; import com.yxt.anrui.riskcenter.api.loanredemptionapply.*; -import com.yxt.anrui.riskcenter.api.loanredemptionapply.app.AppRedemptionDetailsVo; -import com.yxt.anrui.riskcenter.api.loanredemptionapply.app.AppVinListVo; -import com.yxt.anrui.riskcenter.api.loanredemptionapply.flow.*; -import com.yxt.anrui.riskcenter.api.loanredemptionveh.LoanRedemptionVeh; -import com.yxt.anrui.riskcenter.api.loanrestorereportapply.AlrepaidAndArrVo; +import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedger; import com.yxt.anrui.riskcenter.api.loansubletapply.*; import com.yxt.anrui.riskcenter.api.loansubletapply.app.AppSubletDetailsVo; import com.yxt.anrui.riskcenter.api.loansubletapply.app.AppSubletVinListVo; @@ -42,11 +43,10 @@ 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.loanfile.LoanFileService; +import com.yxt.anrui.riskcenter.biz.loanoutboundapply.LoanOutboundApplyService; import com.yxt.anrui.riskcenter.biz.loanredemptionapply.LoanRedemptionApplyService; -import com.yxt.anrui.riskcenter.biz.loanredemptionveh.LoanRedemptionVehService; import com.yxt.anrui.riskcenter.biz.loanrepaymenthistory.LoanRepaymentHistoryService; import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService; -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.service.MybatisBaseService; @@ -80,14 +80,10 @@ public class LoanSubletApplyService extends MybatisBaseService listPage(PagerQuery pq) { IPage page = PagerUtil.queryToPage(pq); @@ -692,7 +680,24 @@ public class LoanSubletApplyService extends MybatisBaseService(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); + //推送交回车辆出库 + Future future1 = pool.submit(() -> { + pushVehOutBound(subletApply); + }); + //维护客户信息 + Future future2 = pool.submit(() -> { + updateCustomer(subletApply); + }); + } catch (Exception e) { + e.printStackTrace(); + } + } else { //极光推送 loanSubletApply = fetchBySid(businessSid); @@ -715,6 +720,47 @@ public class LoanSubletApplyService extends MybatisBaseService vinList = new ArrayList<>(); + BeanUtil.copyProperties(subletApply, dto); + dto.setApplySid(subletApply.getSid()); + dto.setDisposalKey("04"); + dto.setDisposal("二次转租"); + List vinLists = loanSubletVehService.selByMainSid(subletApply.getSid()); + if (!vinLists.isEmpty()) { + vinLists.forEach(v -> { + OutboundVinListDto outboundVinListDto = new OutboundVinListDto(); + BeanUtil.copyProperties(v, outboundVinListDto); + LoanReturnVehLedger loanReturnVehLedger = baseMapper.selVehLedgerBySid(v.getLedgerSid()); + if (null != loanReturnVehLedger) { + if (StringUtils.isNotBlank(loanReturnVehLedger.getLocation())) { + outboundVinListDto.setLocation(loanReturnVehLedger.getLocation()); + } + } + vinList.add(outboundVinListDto); + }); + } + dto.setVinList(vinList); + loanOutboundApplyService.saveOutbound(dto); + } + /** * 撤回 * diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/AppOutBoundVehApplyVinList.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/AppOutBoundVehApplyVinList.java new file mode 100644 index 0000000000..f3d8d0c790 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/AppOutBoundVehApplyVinList.java @@ -0,0 +1,32 @@ +package com.yxt.anrui.terminal.api.risk.outBoundVeh; + +import lombok.Data; + +/** + * @author Administrator + * @description + * @date 2023/11/13 15:45 + */ +@Data +public class AppOutBoundVehApplyVinList { + /** + * 车型 + */ + private String model; + /** + * 车牌号 + */ + private String vehMark; + /** + * 车辆类型 + */ + private String vehType; + /** + * 车架号 + */ + private String vinNo; + /** + * 存放地点 + */ + private String location; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/OutBoundVehApplyDetailsVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/OutBoundVehApplyDetailsVo.java new file mode 100644 index 0000000000..25544a92ad --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/OutBoundVehApplyDetailsVo.java @@ -0,0 +1,52 @@ +package com.yxt.anrui.terminal.api.risk.outBoundVeh; + +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/11/13 15:38 + */ +@Data +public class OutBoundVehApplyDetailsVo implements Vo { + private String sid; + private String publishInfo; + private String time; //申请日期 + private List buyFiles = new ArrayList<>(); //车辆买卖协议 + private List deliveryFiles = new ArrayList<>(); //车辆交付确认书 + private List assessFiles = new ArrayList<>(); //车辆完整评估照片 + private List otherFiles = new ArrayList<>(); //其他附件 + private String taskId; + private String procInsId; + private String applySid; //处置申请sid + /** + * 出库金额 + */ + private String amount; + /** + * 客户名称 + */ + private String custName; + @ApiModelProperty("处置合同号") + private String disposalContractNo; + /** + * 备注 + */ + private String remarks; + @ApiModelProperty("处置方式(未处置/客户赎回/二次销售/二次转租)") + private String disposal; + @ApiModelProperty("处置方式key") + private String disposalKey; + /** + * 车辆列表 + */ + private List vinList = new ArrayList<>(); + @ApiModelProperty("联系电话") + private String phoneNum; + +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/OutBoundVehApplyFeign.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/OutBoundVehApplyFeign.java new file mode 100644 index 0000000000..1fd80d274e --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/OutBoundVehApplyFeign.java @@ -0,0 +1,67 @@ +package com.yxt.anrui.terminal.api.risk.outBoundVeh; + + +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.AppOutBoundVehApplyDelegateQuery; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.AppOutBoundVehApplyTaskQuery; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.CompleteOutBoundVehApplyDto; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.OutBoundVehApplyFlowableQuery; +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; + +/** + * @description: + * @author: fzz + * @date: 2023/8/8 + **/ +@Api(tags = "交回车辆出库申请") +@FeignClient( + contextId = "terminal-OutBoundVeh", + name = "anrui-terminal", + path = "/riskcenter/v1/outboundveh", + fallback = OutBoundVehApplyFeignFallback.class) +public interface OutBoundVehApplyFeign { + + + @ApiOperation("详情") + @GetMapping("/appDetail/{sid}") + @ResponseBody + ResultBean detail(@PathVariable("sid") String sid); + + //-------------------------流程----------------------------------------- + + @ApiOperation("办理") + @PutMapping("/agreeCreditInfo") + @ResponseBody + ResultBean agreeCreditInfo(@Valid @RequestBody CompleteOutBoundVehApplyDto dto); + + @ApiOperation("驳回") + @PutMapping("/rejectCreditInfo") + @ResponseBody + ResultBean rejectCreditInfo(@Valid @RequestBody AppOutBoundVehApplyTaskQuery query); + + @ApiOperation("撤回") + @PutMapping("/recallCreditInfo") + @ResponseBody + ResultBean recallCreditInfo(@Valid @RequestBody AppOutBoundVehApplyTaskQuery query); + + @ApiOperation("终止") + @PutMapping("/stopCreditInfo") + @ResponseBody + ResultBean stopCreditInfo(@Valid @RequestBody AppOutBoundVehApplyTaskQuery query); + + @ApiOperation("获取流程操作标题") + @GetMapping("/getFlowOperateTitle") + @ResponseBody + ResultBean getFlowOperateTitle(@Valid @SpringQueryMap OutBoundVehApplyFlowableQuery query); + + @ApiOperation(value = "加签") + @PutMapping(value = "/delegate") + @ResponseBody + public ResultBean delegate(@RequestBody AppOutBoundVehApplyDelegateQuery delegateQuery); +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/OutBoundVehApplyFeignFallback.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/OutBoundVehApplyFeignFallback.java new file mode 100644 index 0000000000..47ebed7d57 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/OutBoundVehApplyFeignFallback.java @@ -0,0 +1,52 @@ +package com.yxt.anrui.terminal.api.risk.outBoundVeh; + +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.AppOutBoundVehApplyDelegateQuery; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.AppOutBoundVehApplyTaskQuery; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.CompleteOutBoundVehApplyDto; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.OutBoundVehApplyFlowableQuery; +import com.yxt.common.core.result.ResultBean; +import org.springframework.stereotype.Component; + +/** + * @description: + * @author: fzz + * @date: + **/ +@Component +public class OutBoundVehApplyFeignFallback implements OutBoundVehApplyFeign { + + @Override + public ResultBean detail(String sid) { + return null; + } + + @Override + public ResultBean agreeCreditInfo(CompleteOutBoundVehApplyDto dto) { + return null; + } + + @Override + public ResultBean rejectCreditInfo(AppOutBoundVehApplyTaskQuery query) { + return null; + } + + @Override + public ResultBean recallCreditInfo(AppOutBoundVehApplyTaskQuery query) { + return null; + } + + @Override + public ResultBean stopCreditInfo(AppOutBoundVehApplyTaskQuery query) { + return null; + } + + @Override + public ResultBean getFlowOperateTitle(OutBoundVehApplyFlowableQuery query) { + return null; + } + + @Override + public ResultBean delegate(AppOutBoundVehApplyDelegateQuery delegateQuery) { + return null; + } +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/AppOutBoundVehApplyDelegateQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/AppOutBoundVehApplyDelegateQuery.java new file mode 100644 index 0000000000..c511f7fe2d --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/AppOutBoundVehApplyDelegateQuery.java @@ -0,0 +1,25 @@ +package com.yxt.anrui.terminal.api.risk.outBoundVeh.flow; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Administrator + * @description + * @date 2023/9/28 10:16 + */ +@Data +public class AppOutBoundVehApplyDelegateQuery { + @ApiModelProperty + private String userSid; + @ApiModelProperty("流程实例id") + @JsonProperty("procInsId") + private String instanceId; + @ApiModelProperty("任务Id") + private String taskId; + @ApiModelProperty("审批人sid") + private String assignee; + @ApiModelProperty("填写意见") + private String views; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/AppOutBoundVehApplyTaskQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/AppOutBoundVehApplyTaskQuery.java new file mode 100644 index 0000000000..9ff82fac85 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/AppOutBoundVehApplyTaskQuery.java @@ -0,0 +1,46 @@ +package com.yxt.anrui.terminal.api.risk.outBoundVeh.flow; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @author Administrator + * @description + * @date 2023/10/17 9:14 + */ +@Data +public class AppOutBoundVehApplyTaskQuery implements Query { + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("任务Id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; + /** + * 终止、驳回 + */ + @ApiModelProperty("任务意见") + private String comment; + /** + * 终止、撤回、驳回 + */ + @ApiModelProperty("用户Sid") + private String userSid; + /** + * 终止 + */ + @ApiModelProperty("流程实例Id") + @JsonProperty("procInsId") + private String instanceId; + +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/CompleteOutBoundVehApplyDto.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/CompleteOutBoundVehApplyDto.java new file mode 100644 index 0000000000..66c2d7dbc8 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/CompleteOutBoundVehApplyDto.java @@ -0,0 +1,35 @@ +package com.yxt.anrui.terminal.api.risk.outBoundVeh.flow; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @author Administrator + * @description + * @date 2023/10/17 9:13 + */ +@Data +public class CompleteOutBoundVehApplyDto implements Dto { + @ApiModelProperty(value = "任务id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + @ApiModelProperty(value = "流程id") + @NotBlank(message = "参数错误:procInsId") + @JsonProperty("procInsId") + private String instanceId; + @ApiModelProperty(value = "意见") + private String comment; + @ApiModelProperty(value = "业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; + @ApiModelProperty(value = "用户sid") + @NotBlank(message = "参数错误:userSid") + private String userSid; + @ApiModelProperty(value = "节点id") + @NotBlank(message = "参数错误:taskDefKey") + private String taskDefKey; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/OutBoundVehApplyFlowableQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/OutBoundVehApplyFlowableQuery.java new file mode 100644 index 0000000000..e2d91094d5 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/outBoundVeh/flow/OutBoundVehApplyFlowableQuery.java @@ -0,0 +1,21 @@ +package com.yxt.anrui.terminal.api.risk.outBoundVeh.flow; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +@Data +public class OutBoundVehApplyFlowableQuery implements Query { + private static final long serialVersionUID = -5879668616710833830L; + + @ApiModelProperty(value = "节点key") + private String taskDefKey; + @ApiModelProperty(value = "业务sid") + private String businessSid; + @ApiModelProperty(value = "0 上一环节 1下一环节") + @NotNull(message = "参数错误:next") + private Integer next; + +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/outBoundVeh/OutBoundVehApplyRest.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/outBoundVeh/OutBoundVehApplyRest.java new file mode 100644 index 0000000000..b82ef5b931 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/outBoundVeh/OutBoundVehApplyRest.java @@ -0,0 +1,68 @@ +package com.yxt.anrui.terminal.biz.risk.outBoundVeh; + + +import com.yxt.anrui.terminal.api.risk.outBoundVeh.OutBoundVehApplyDetailsVo; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.OutBoundVehApplyFeign; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.AppOutBoundVehApplyDelegateQuery; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.AppOutBoundVehApplyTaskQuery; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.CompleteOutBoundVehApplyDto; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.OutBoundVehApplyFlowableQuery; +import com.yxt.anrui.terminal.api.risk.subletApply.SubletApplyDetailsVo; +import com.yxt.anrui.terminal.api.risk.subletApply.SubletApplyFeign; +import com.yxt.anrui.terminal.api.risk.subletApply.flow.AppSubletApplyDelegateQuery; +import com.yxt.anrui.terminal.api.risk.subletApply.flow.AppSubletApplyTaskQuery; +import com.yxt.anrui.terminal.api.risk.subletApply.flow.CompleteSubletApplyDto; +import com.yxt.anrui.terminal.api.risk.subletApply.flow.SubletApplyFlowableQuery; +import com.yxt.common.core.result.ResultBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +/** + * @description: + * @author: fzz + * @date: + **/ +@Controller +@RequestMapping("/riskcenter/v1/outboundveh") +public class OutBoundVehApplyRest implements OutBoundVehApplyFeign { + + @Autowired + private OutBoundVehApplyService outBoundVehApplyService; + + + @Override + public ResultBean detail(String sid) { + return outBoundVehApplyService.detail(sid); + } + + @Override + public ResultBean agreeCreditInfo(CompleteOutBoundVehApplyDto dto) { + return outBoundVehApplyService.agreeCreditInfo(dto); + } + + @Override + public ResultBean rejectCreditInfo(AppOutBoundVehApplyTaskQuery query) { + return outBoundVehApplyService.rejectCreditInfo(query); + } + + @Override + public ResultBean recallCreditInfo(AppOutBoundVehApplyTaskQuery query) { + return outBoundVehApplyService.recallCreditInfo(query); + } + + @Override + public ResultBean stopCreditInfo(AppOutBoundVehApplyTaskQuery query) { + return outBoundVehApplyService.stopCreditInfo(query); + } + + @Override + public ResultBean getFlowOperateTitle(OutBoundVehApplyFlowableQuery query) { + return outBoundVehApplyService.getFlowOperateTitle(query); + } + + @Override + public ResultBean delegate(AppOutBoundVehApplyDelegateQuery delegateQuery) { + return outBoundVehApplyService.delegate(delegateQuery); + } +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/outBoundVeh/OutBoundVehApplyService.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/outBoundVeh/OutBoundVehApplyService.java new file mode 100644 index 0000000000..926221c98d --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/outBoundVeh/OutBoundVehApplyService.java @@ -0,0 +1,157 @@ +package com.yxt.anrui.terminal.biz.risk.outBoundVeh; + + +import cn.hutool.core.bean.BeanUtil; +import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; +import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; +import com.yxt.anrui.portal.api.sysuser.SysUserFeign; +import com.yxt.anrui.portal.api.sysuser.SysUserVo; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.LoanOutboundApplyFeign; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.app.AppOutboundDetailsVo; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.flow.*; +import com.yxt.anrui.riskcenter.api.loansubletapply.LoanSubletApplyFeign; +import com.yxt.anrui.riskcenter.api.loansubletapply.app.AppSubletDetailsVo; +import com.yxt.anrui.riskcenter.api.loansubletapply.flow.*; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.OutBoundVehApplyDetailsVo; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.AppOutBoundVehApplyDelegateQuery; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.AppOutBoundVehApplyTaskQuery; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.CompleteOutBoundVehApplyDto; +import com.yxt.anrui.terminal.api.risk.outBoundVeh.flow.OutBoundVehApplyFlowableQuery; +import com.yxt.anrui.terminal.api.risk.subletApply.SubletApplyDetailsVo; +import com.yxt.anrui.terminal.api.risk.subletApply.flow.AppSubletApplyDelegateQuery; +import com.yxt.anrui.terminal.api.risk.subletApply.flow.AppSubletApplyTaskQuery; +import com.yxt.anrui.terminal.api.risk.subletApply.flow.CompleteSubletApplyDto; +import com.yxt.anrui.terminal.api.risk.subletApply.flow.SubletApplyFlowableQuery; +import com.yxt.common.core.result.ResultBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Collections; +import java.util.List; + +/** + * @description: + * @author: fzz + * @date: + **/ +@Service +public class OutBoundVehApplyService { + + @Autowired + private SysUserFeign sysUserFeign; + @Autowired + private SysStaffOrgFeign sysStaffOrgFeign; + @Autowired + private LoanOutboundApplyFeign loanOutboundApplyFeign; + + public ResultBean detail(String sid) { + ResultBean rb = ResultBean.fireFail(); + OutBoundVehApplyDetailsVo vo = new OutBoundVehApplyDetailsVo(); + AppOutboundDetailsVo data = loanOutboundApplyFeign.appDetail(sid).getData(); + if (null != data) { + BeanUtil.copyProperties(data, vo); + } + return rb.success().setData(vo); + } + + + public ResultBean agreeCreditInfo(CompleteOutBoundVehApplyDto dto) { + ResultBean rb = ResultBean.fireFail(); + //根据用户sid获取staffSid + ResultBean userVoResultBean = sysUserFeign.fetchBySid(dto.getUserSid()); + if (!userVoResultBean.getSuccess()) { + return rb.setMsg(userVoResultBean.getMsg()); + } + //根据staffSid获取用户的组织全路径 + ResultBean staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(userVoResultBean.getData().getStaffSid()); + if (!staffOrgResultBean.getSuccess()) { + return rb.setMsg(staffOrgResultBean.getMsg()); + } + //用户的组织全路径 + String orgSidPath = staffOrgResultBean.getData().getOrgSidPath(); + OutboundCompleteDto completeDto = new + OutboundCompleteDto(); + BeanUtil.copyProperties(dto, completeDto); + completeDto.setOrgSidPath(orgSidPath); + ResultBean resultBean = loanOutboundApplyFeign.complete(completeDto); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean rejectCreditInfo(AppOutBoundVehApplyTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + OutboundTaskQuery taskQuery = new + OutboundTaskQuery(); + BeanUtil.copyProperties(query, taskQuery); + ResultBean resultBean = loanOutboundApplyFeign.taskReject(taskQuery); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean recallCreditInfo(AppOutBoundVehApplyTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + OutboundTaskQuery taskQuery = new + OutboundTaskQuery(); + BeanUtil.copyProperties(query, taskQuery); + ResultBean resultBean = loanOutboundApplyFeign.revokeProcess(taskQuery); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean stopCreditInfo(AppOutBoundVehApplyTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + OutboundTaskQuery taskQuery = new + OutboundTaskQuery(); + BeanUtil.copyProperties(query, taskQuery); + ResultBean resultBean = loanOutboundApplyFeign.breakProcess(taskQuery); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean getFlowOperateTitle(OutBoundVehApplyFlowableQuery query) { + ResultBean rb = ResultBean.fireFail(); + //0 上一环节 1下一环节 + int next = query.getNext(); + OutboundGetNodeQuery getNodeQuery = new + OutboundGetNodeQuery(); + BeanUtil.copyProperties(query, getNodeQuery); + String data = ""; + if (next == 0) { + ResultBean> getPreviousNodesForReject = loanOutboundApplyFeign.getPreviousNodesForReject(getNodeQuery); + if (getPreviousNodesForReject.getSuccess()) { + getPreviousNodesForReject.getData().removeAll(Collections.singleton(null)); + data = getPreviousNodesForReject.getData().get(0).getName(); + } else { + return rb.setMsg(getPreviousNodesForReject.getMsg()); + } + } else if (next == 1) { + ResultBean> getNextNodesForSubmit = loanOutboundApplyFeign.getNextNodesForSubmit(getNodeQuery); + if (getNextNodesForSubmit.getSuccess()) { + getNextNodesForSubmit.getData().removeAll(Collections.singleton(null)); + data = getNextNodesForSubmit.getData().get(0).getName(); + } else { + return rb.setMsg(getNextNodesForSubmit.getMsg()); + } + } else { + return rb.setMsg("参数错误:next"); + } + return rb.success().setData(data); + } + + public ResultBean delegate(AppOutBoundVehApplyDelegateQuery delegateQuery) { + ResultBean rb = ResultBean.fireFail(); + OutboundDelegateQuery delegateQuery1 = new + OutboundDelegateQuery(); + BeanUtil.copyProperties(delegateQuery, delegateQuery1); + ResultBean delegate = loanOutboundApplyFeign.delegate(delegateQuery1); + return rb.success(); + } +} From cf7029ae133d4560db5ba0564f4577bb78525257 Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Tue, 23 Jan 2024 08:34:15 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A4=E5=9B=9E?= =?UTF-8?q?=E8=BD=A6=E8=BE=86=E5=87=BA=E5=BA=93=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../returntothewarehouse.js | 98 ++++ anrui-riskcenter-ui/src/router/index.js | 37 ++ .../returntothewarehouse.vue | 354 ++++++++++++ .../returntothewarehouseAdd.vue | 290 ++++++++++ .../returntothewarehouseInfo.vue | 257 +++++++++ .../relation/secondarysalesInfo.vue | 0 .../relation/secondarysubletInfo.vue | 232 ++++++++ .../relation/surrenderforredemptionInfo.vue | 284 ++++++++++ .../returntothewarehouseDaiBan.vue | 516 ++++++++++++++++++ .../returntothewarehouseEdit.vue | 287 ++++++++++ .../returntothewarehouseYiBan.vue | 302 ++++++++++ 11 files changed, 2657 insertions(+) create mode 100644 anrui-riskcenter-ui/src/api/returntothewarehouse/returntothewarehouse.js create mode 100644 anrui-riskcenter-ui/src/views/returntothewarehouse/returntothewarehouse.vue create mode 100644 anrui-riskcenter-ui/src/views/returntothewarehouse/returntothewarehouseAdd.vue create mode 100644 anrui-riskcenter-ui/src/views/returntothewarehouse/returntothewarehouseInfo.vue create mode 100644 anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/relation/secondarysalesInfo.vue create mode 100644 anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/relation/secondarysubletInfo.vue create mode 100644 anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/relation/surrenderforredemptionInfo.vue create mode 100644 anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/returntothewarehouseDaiBan.vue create mode 100644 anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/returntothewarehouseEdit.vue create mode 100644 anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/returntothewarehouseYiBan.vue diff --git a/anrui-riskcenter-ui/src/api/returntothewarehouse/returntothewarehouse.js b/anrui-riskcenter-ui/src/api/returntothewarehouse/returntothewarehouse.js new file mode 100644 index 0000000000..897af26b63 --- /dev/null +++ b/anrui-riskcenter-ui/src/api/returntothewarehouse/returntothewarehouse.js @@ -0,0 +1,98 @@ +import request from '@/utils/request' + +export default { + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/riskcenter/v1/loanoutboundapply/listPage', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + saveOrUpdate: function(data) { + return request({ + url: '/riskcenter/v1/loanoutboundapply/updateOutbound', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, + fetchBySid: function(data) { + return request({ + url: '/riskcenter/v1/loanoutboundapply/outboundDetails', + method: 'get', + params: data + }) + }, + // 提交流程 + submit: function(params) { + return request({ + url: '/riskcenter/v1/loanoutboundapply/submit', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(同意) + complete: function(params) { + return request({ + url: '/riskcenter/v1/loanoutboundapply/complete', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(加签) + delegate: function(params) { + return request({ + url: '/riskcenter/v1/loanoutboundapply/delegate', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(驳回) + reject: function(params) { + return request({ + url: '/riskcenter/v1/loanoutboundapply/reject', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(终止) + breakProcess: function(params) { + return request({ + url: '/riskcenter/v1/loanoutboundapply/breakProcess', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(撤回) + revokeProcess: function(params) { + return request({ + url: '/riskcenter/v1/loanoutboundapply/revokeProcess', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 审批流程(同意)获取下一环节 + getNextNodesForSubmit: function(data) { + return request({ + url: '/riskcenter/v1/loanoutboundapply/getNextNodesForSubmit', + method: 'get', + params: data + }) + }, + // 审批流程(驳回)获取上一环节 + getPreviousNodesForReject: function(data) { + return request({ + url: '/riskcenter/v1/loanoutboundapply/getPreviousNodesForReject', + method: 'get', + params: data + }) + } +} diff --git a/anrui-riskcenter-ui/src/router/index.js b/anrui-riskcenter-ui/src/router/index.js index e3d67ffb71..6a654f7f66 100644 --- a/anrui-riskcenter-ui/src/router/index.js +++ b/anrui-riskcenter-ui/src/router/index.js @@ -631,6 +631,22 @@ export const constantRoutes = [ } ] }, + { + path: '/returntothewarehouse', + component: Layout, + redirect: '/returntothewarehouse', + meta: { + title: '交回车辆出库申请' + }, + children: [ + { + path: '/returntothewarehouse/returntothewarehouse', + component: () => import('@/views/returntothewarehouse/returntothewarehouse.vue'), + name: 'ReturnToTheWarehouse', + meta: { title: '交回车辆出库申请', noCache: true } + } + ] + }, // 流程审批 // 金融产品政策报备--编辑 @@ -1048,6 +1064,27 @@ export const constantRoutes = [ component: () => import('@/views/workFlow/ercizhuanzuFlow/secondarysubletYiBan.vue'), name: 'SecondarySubletYiBan' + }, + // 交回车辆出库申请管理--编辑 + { + path: '/jiaohuichukuFlow/returntothewarehouseEdit', + component: () => + import('@/views/workFlow/jiaohuichukuFlow/returntothewarehouseEdit.vue'), + name: 'ReturnToTheWarehouseEdit' + }, + // 交回车辆出库申请管理--待办 + { + path: '/jiaohuichukuFlow/returntothewarehouseDaiBan', + component: () => + import('@/views/workFlow/jiaohuichukuFlow/returntothewarehouseDaiBan.vue'), + name: 'ReturnToTheWarehouseDaiBan' + }, + // 交回车辆出库申请管理--已办 + { + path: '/jiaohuichukuFlow/returntothewarehouseYiBan', + component: () => + import('@/views/workFlow/jiaohuichukuFlow/returntothewarehouseYiBan.vue'), + name: 'ReturnToTheWarehouseYiBan' }, // 404 page must be placed at the end !!! // { path: '*', redirect: '/404', hidden: true } diff --git a/anrui-riskcenter-ui/src/views/returntothewarehouse/returntothewarehouse.vue b/anrui-riskcenter-ui/src/views/returntothewarehouse/returntothewarehouse.vue new file mode 100644 index 0000000000..17bf0bccda --- /dev/null +++ b/anrui-riskcenter-ui/src/views/returntothewarehouse/returntothewarehouse.vue @@ -0,0 +1,354 @@ + + + + + diff --git a/anrui-riskcenter-ui/src/views/returntothewarehouse/returntothewarehouseAdd.vue b/anrui-riskcenter-ui/src/views/returntothewarehouse/returntothewarehouseAdd.vue new file mode 100644 index 0000000000..0e0302c858 --- /dev/null +++ b/anrui-riskcenter-ui/src/views/returntothewarehouse/returntothewarehouseAdd.vue @@ -0,0 +1,290 @@ + + + + + diff --git a/anrui-riskcenter-ui/src/views/returntothewarehouse/returntothewarehouseInfo.vue b/anrui-riskcenter-ui/src/views/returntothewarehouse/returntothewarehouseInfo.vue new file mode 100644 index 0000000000..d6a8ad323d --- /dev/null +++ b/anrui-riskcenter-ui/src/views/returntothewarehouse/returntothewarehouseInfo.vue @@ -0,0 +1,257 @@ + + + + + diff --git a/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/relation/secondarysalesInfo.vue b/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/relation/secondarysalesInfo.vue new file mode 100644 index 0000000000..e69de29bb2 diff --git a/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/relation/secondarysubletInfo.vue b/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/relation/secondarysubletInfo.vue new file mode 100644 index 0000000000..754ded2a67 --- /dev/null +++ b/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/relation/secondarysubletInfo.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/relation/surrenderforredemptionInfo.vue b/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/relation/surrenderforredemptionInfo.vue new file mode 100644 index 0000000000..8383384d85 --- /dev/null +++ b/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/relation/surrenderforredemptionInfo.vue @@ -0,0 +1,284 @@ + + + + + diff --git a/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/returntothewarehouseDaiBan.vue b/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/returntothewarehouseDaiBan.vue new file mode 100644 index 0000000000..f0e1c434af --- /dev/null +++ b/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/returntothewarehouseDaiBan.vue @@ -0,0 +1,516 @@ + + + + + diff --git a/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/returntothewarehouseEdit.vue b/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/returntothewarehouseEdit.vue new file mode 100644 index 0000000000..9e66389b0e --- /dev/null +++ b/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/returntothewarehouseEdit.vue @@ -0,0 +1,287 @@ + + + + + diff --git a/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/returntothewarehouseYiBan.vue b/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/returntothewarehouseYiBan.vue new file mode 100644 index 0000000000..ee2f91cfe4 --- /dev/null +++ b/anrui-riskcenter-ui/src/views/workFlow/jiaohuichukuFlow/returntothewarehouseYiBan.vue @@ -0,0 +1,302 @@ + + + + + From 454dafa7d31f642986464cb7873a8bcbd04d823a Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Tue, 23 Jan 2024 09:04:06 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A4=E5=9B=9E?= =?UTF-8?q?=E8=BD=A6=E8=BE=86=E4=BA=8C=E6=AC=A1=E9=94=80=E5=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/secondarysales/secondarysales.js | 129 +++++ .../views/secondarysales/secondarysales.vue | 523 ++++++++++++++++++ .../secondarysales/secondarysalesAdd.vue | 379 +++++++++++++ .../secondarysales/secondarysalesInfo.vue | 0 4 files changed, 1031 insertions(+) create mode 100644 anrui-riskcenter-ui/src/api/secondarysales/secondarysales.js create mode 100644 anrui-riskcenter-ui/src/views/secondarysales/secondarysales.vue create mode 100644 anrui-riskcenter-ui/src/views/secondarysales/secondarysalesAdd.vue create mode 100644 anrui-riskcenter-ui/src/views/secondarysales/secondarysalesInfo.vue diff --git a/anrui-riskcenter-ui/src/api/secondarysales/secondarysales.js b/anrui-riskcenter-ui/src/api/secondarysales/secondarysales.js new file mode 100644 index 0000000000..83f050db15 --- /dev/null +++ b/anrui-riskcenter-ui/src/api/secondarysales/secondarysales.js @@ -0,0 +1,129 @@ +import request from '@/utils/request' + +export default { + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/riskcenter/v1/loansubletapply/listPage', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + getVinList: function(params) { + return request({ + url: '/riskcenter/v1/loansubletapply/getVinList', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + saveOrUpdate: function(data) { + return request({ + url: '/riskcenter/v1/loansubletapply/saveSublet', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, + init: function(data) { + return request({ + url: '/riskcenter/v1/loansubletapply/subletInit', + method: 'get', + params: data + }) + }, + fetchBySid: function(data) { + return request({ + url: '/riskcenter/v1/loansubletapply/subletDetails', + method: 'get', + params: data + }) + }, + deleteBySids: function(data) { + return request({ + url: '/riskcenter/v1/loansubletapply/deleteBySids', + method: 'DELETE', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 销售订单 -- 金融方案初始化 + selectDetailss: function(data) { + return request({ + url: '/riskcenter/v1/loansolutions/selectDetailss', + method: 'get', + params: data + }) + }, + // 提交流程 + submit: function(params) { + return request({ + url: '/riskcenter/v1/loansubletapply/submit', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(同意) + complete: function(params) { + return request({ + url: '/riskcenter/v1/loansubletapply/complete', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(加签) + delegate: function(params) { + return request({ + url: '/riskcenter/v1/loansubletapply/delegate', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(驳回) + reject: function(params) { + return request({ + url: '/riskcenter/v1/loansubletapply/reject', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(终止) + breakProcess: function(params) { + return request({ + url: '/riskcenter/v1/loansubletapply/breakProcess', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(撤回) + revokeProcess: function(params) { + return request({ + url: '/riskcenter/v1/loansubletapply/revokeProcess', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 审批流程(同意)获取下一环节 + getNextNodesForSubmit: function(data) { + return request({ + url: '/riskcenter/v1/loansubletapply/getNextNodesForSubmit', + method: 'get', + params: data + }) + }, + // 审批流程(驳回)获取上一环节 + getPreviousNodesForReject: function(data) { + return request({ + url: '/riskcenter/v1/loansubletapply/getPreviousNodesForReject', + method: 'get', + params: data + }) + } +} diff --git a/anrui-riskcenter-ui/src/views/secondarysales/secondarysales.vue b/anrui-riskcenter-ui/src/views/secondarysales/secondarysales.vue new file mode 100644 index 0000000000..36264b12ed --- /dev/null +++ b/anrui-riskcenter-ui/src/views/secondarysales/secondarysales.vue @@ -0,0 +1,523 @@ + + + + + diff --git a/anrui-riskcenter-ui/src/views/secondarysales/secondarysalesAdd.vue b/anrui-riskcenter-ui/src/views/secondarysales/secondarysalesAdd.vue new file mode 100644 index 0000000000..359c753397 --- /dev/null +++ b/anrui-riskcenter-ui/src/views/secondarysales/secondarysalesAdd.vue @@ -0,0 +1,379 @@ + + + + + diff --git a/anrui-riskcenter-ui/src/views/secondarysales/secondarysalesInfo.vue b/anrui-riskcenter-ui/src/views/secondarysales/secondarysalesInfo.vue new file mode 100644 index 0000000000..e69de29bb2 From 03e8afaa57bfc9f2b86aa3fc401a8984f97f49e1 Mon Sep 17 00:00:00 2001 From: dimengzhe Date: Tue, 23 Jan 2024 09:15:24 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BA=A4=E5=9B=9E=E8=BD=A6=E8=BE=86?= =?UTF-8?q?=E5=8F=B0=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanReturnLedgerVo.java | 83 +++++++++++++++++++ .../LoanReturnVehLedger.java | 2 + .../LoanReturnVehLedgerDto.java | 1 + .../LoanReturnVehLedgerFeign.java | 6 ++ .../LoanReturnVehLedgerVo.java | 6 ++ .../LoanReturnVehLedgerRest.java | 5 ++ .../LoanReturnVehLedgerService.java | 30 ++++++- 7 files changed, 129 insertions(+), 4 deletions(-) create mode 100644 anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnLedgerVo.java diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnLedgerVo.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnLedgerVo.java new file mode 100644 index 0000000000..93c7de118a --- /dev/null +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnLedgerVo.java @@ -0,0 +1,83 @@ +package com.yxt.anrui.riskcenter.api.loanreturnvehledger; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/1/23 + **/ +@Data +public class LoanReturnLedgerVo { + + private String sid; + + @ApiModelProperty("车辆sid") + private String vinSid; + @ApiModelProperty("车架号") + private String vinNo; + @ApiModelProperty("车牌号") + private String vehMark; + @ApiModelProperty("车辆类型") + private String vehType; + @ApiModelProperty("车辆类型key") + private String vehTypeKey; + @ApiModelProperty("车型") + private String vehModel; + @ApiModelProperty("车型sid") + private String vehModelSid; + @ApiModelProperty("配置sid") + private String configSid; + @ApiModelProperty("配置") + private String configName; + @ApiModelProperty("客户名称") + private String customer; + @ApiModelProperty("客户sid") + private String customerSid; + @ApiModelProperty("贷款人") + private String borrowerName; + @ApiModelProperty("贷款人sid") + private String borrowerSid; + @ApiModelProperty("存放地点") + private String location; + @ApiModelProperty("存放地点sid") + private String locationSid; + @ApiModelProperty("处置方式key") + private String disposalKey; + @ApiModelProperty("处置方式") + private String disposal; + @ApiModelProperty("入库价") + private int inboundMoney; + @ApiModelProperty("入库日期") + private Date inboundDate; + @ApiModelProperty("出库日期") + private Date outboundDate; + @ApiModelProperty("分公司sid") + private String useOrgSid; + @ApiModelProperty("分公司名称") + private String useOrgName; + @ApiModelProperty("组织全路径") + private String orgSidPath; + @ApiModelProperty("逾期金额") + private String overMoney; + @ApiModelProperty("未到期金额") + private String notBecomeDueMoney; + @JsonProperty("pSid") + private String pSid; + @ApiModelProperty("销售订单sid") + private String saleOrderSid; + @ApiModelProperty("销售订单车辆sid") + private String busVinSid; + @ApiModelProperty("库存状态") + private String vehicleState; + @ApiModelProperty("库存状态key") + private String vehicleStateKey; + @ApiModelProperty("业务sid") + private String busSid; + +} diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedger.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedger.java index 63d4fdd95f..e181575a63 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedger.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedger.java @@ -75,6 +75,8 @@ public class LoanReturnVehLedger extends BaseEntity { private String vehicleState; @ApiModelProperty("库存状态key") private String vehicleStateKey; + @ApiModelProperty("业务sid") + private String busSid; } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerDto.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerDto.java index b17b19ac8b..3f6bfbb87d 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerDto.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerDto.java @@ -62,4 +62,5 @@ public class LoanReturnVehLedgerDto { @ApiModelProperty("库存状态key") private String vehicleStateKey; + } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerFeign.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerFeign.java index 82c5a46d24..4718fae7b4 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerFeign.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerFeign.java @@ -5,8 +5,10 @@ import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; /** * @description: @@ -28,5 +30,9 @@ public interface LoanReturnVehLedgerFeign { @PostMapping("/update") ResultBean update(@RequestBody LoanReturnVehLedgerDto dto); + @ApiOperation("详情") + @GetMapping("/details") + ResultBean getDetails(@RequestParam("sid") String sid); + } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerVo.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerVo.java index 84dce72c81..f3f6b05ef7 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerVo.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerVo.java @@ -12,6 +12,8 @@ import lombok.Data; public class LoanReturnVehLedgerVo { private String sid; + @ApiModelProperty("入库申请的sid") + private String busSid; @ApiModelProperty("分公司") private String useOrgName; @@ -44,4 +46,8 @@ public class LoanReturnVehLedgerVo { @ApiModelProperty("库存状态") private String vehicleState; + private String busVinSid; + + private String pSid; + } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturnvehledger/LoanReturnVehLedgerRest.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturnvehledger/LoanReturnVehLedgerRest.java index 1284be3d7e..b95c976ee5 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturnvehledger/LoanReturnVehLedgerRest.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturnvehledger/LoanReturnVehLedgerRest.java @@ -34,4 +34,9 @@ public class LoanReturnVehLedgerRest implements LoanReturnVehLedgerFeign { public ResultBean update(LoanReturnVehLedgerDto dto) { return loanReturnVehLedgerService.updateDto(dto); } + + @Override + public ResultBean getDetails(String sid) { + return loanReturnVehLedgerService.getDetails(sid); + } } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturnvehledger/LoanReturnVehLedgerService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturnvehledger/LoanReturnVehLedgerService.java index 7f4f84066c..4df0b3f99c 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturnvehledger/LoanReturnVehLedgerService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturnvehledger/LoanReturnVehLedgerService.java @@ -6,14 +6,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle; import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; import com.yxt.anrui.portal.api.sysuser.SysUserFeign; +import com.yxt.anrui.riskcenter.api.loanrestorereportapply.AlrepaidAndArrVo; import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApply; import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApplyQuery; import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApplyVo; import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailer; -import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedger; -import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedgerDto; -import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedgerQuery; -import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedgerVo; +import com.yxt.anrui.riskcenter.api.loanreturnvehledger.*; +import com.yxt.anrui.riskcenter.biz.loanrestorereportapply.LoanRestoreReportApplyService; import com.yxt.anrui.riskcenter.biz.loanreturninboundapply.LoanReturnInboundApplyService; import com.yxt.anrui.riskcenter.biz.loanreturninboundtrailer.LoanReturnInboundTrailerService; import com.yxt.common.base.service.MybatisBaseService; @@ -44,6 +43,8 @@ public class LoanReturnVehLedgerService extends MybatisBaseService page = PagerUtil.queryToPage(pagerQuery); IPage pagging = baseMapper.selectPageVo(page, qw); + List paggingRecords = pagging.getRecords(); + paggingRecords.removeAll(Collections.singleton(null)); + if (!paggingRecords.isEmpty()) { + for (LoanReturnVehLedgerVo record : pagging.getRecords()) { + AlrepaidAndArrVo alrepaidAndArrVo = loanRestoreReportApplyService.getAlrepaidAndArr(record.getBusVinSid()); + if (alrepaidAndArrVo != null) { + record.setOverMoney(alrepaidAndArrVo.getCurrentBeMoney()); + record.setNotBecomeDueMoney(alrepaidAndArrVo.getUnexpiredMoney()); + } + } + } PagerVo p = PagerUtil.pageToVo(pagging, null); return p; } @@ -218,4 +232,12 @@ public class LoanReturnVehLedgerService extends MybatisBaseService getDetails(String sid) { + ResultBean rb = ResultBean.fireFail(); + LoanReturnVehLedger loanReturnVehLedger = fetchBySid(sid); + LoanReturnLedgerVo loanReturnLedgerVo = new LoanReturnLedgerVo(); + BeanUtil.copyProperties(loanReturnVehLedger,loanReturnLedgerVo); + return rb.success().setData(loanReturnLedgerVo); + } }