diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturninboundapply/ReturnAppVo.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturninboundapply/ReturnAppVo.java index ed6fe7f377..b69d937e3f 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturninboundapply/ReturnAppVo.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturninboundapply/ReturnAppVo.java @@ -1,7 +1,13 @@ package com.yxt.anrui.riskcenter.api.loanreturninboundapply; +import com.yxt.anrui.riskcenter.api.loanoverduefin.UrlQuery; +import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailerDto; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.ArrayList; +import java.util.List; + /** * @description: * @author: dimengzhe @@ -9,4 +15,90 @@ import lombok.Data; **/ @Data public class ReturnAppVo { + + @ApiModelProperty("申请部门") + private String createDept; + + @ApiModelProperty("申请人") + private String createByName; + @ApiModelProperty("发起日期") + private String createDate; + @ApiModelProperty("车架号") + private String vinNo; + + @ApiModelProperty("车牌号") + private String vehMark; + @ApiModelProperty("首次登记日期") + private String firstDate; + @ApiModelProperty("车型名称") + private String modelName; + @ApiModelProperty("车型sid") + private String modelSid; + @ApiModelProperty("配置sid") + private String configSid; + @ApiModelProperty("配置名称") + private String configName; + @ApiModelProperty("是否带挂车") + private String tralier; + @ApiModelProperty("客户名称") + private String customerName; + + @ApiModelProperty("贷款人") + private String loanName; + @ApiModelProperty("贷款合同编号") + private String loanContractNo; + @ApiModelProperty("资方") + private String bankName; + @ApiModelProperty("资方合同编号") + private String bankContractNo; + @ApiModelProperty("入库价") + private int inboundMoney; + @ApiModelProperty("停放地点") + private String locationName; + + @ApiModelProperty("停车收费标准") + private String parkFees; + @ApiModelProperty("已还金额") + private String alRepaidMoney; + @ApiModelProperty("当前逾期金额") + private String currentBeMoney; + @ApiModelProperty("其中资金占用费") + private String wheFundOccMoney; + @ApiModelProperty("未到期金额") + private String unexpiredMoney; + @ApiModelProperty("总期数") + private String nper; + @ApiModelProperty("当前期数") + private String currentPeriod; + @ApiModelProperty("已还金额换算期数") + private String alRepaidMoneyConPeriod; + @ApiModelProperty("逾期金额换算期数") + private String beOverdueMoneyAndPeriod; + + + private String remarks; + + private List filesList = new ArrayList<>(); + + + private String files; + + @ApiModelProperty(value = "任务id") + private String taskId; + @ApiModelProperty(value = "流程实例id") + private String procInstId; + + + @ApiModelProperty("挂车车架号") + private String vinNoTrailer; + @ApiModelProperty("挂车车牌号") + private String vehMarkTrailer; + @ApiModelProperty("挂车类型") + private String trailerType; + @ApiModelProperty("挂车入库价") + private String inboundMoneyTrailer; + @ApiModelProperty("挂车备注") + private String remarksTrailer; + + private String orgPath; } 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 e181575a63..8454f079b5 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 @@ -61,10 +61,10 @@ public class LoanReturnVehLedger extends BaseEntity { private String useOrgName; @ApiModelProperty("组织全路径") private String orgSidPath; - @ApiModelProperty("逾期金额") + /* @ApiModelProperty("逾期金额") private BigDecimal overMoney; @ApiModelProperty("未到期金额") - private BigDecimal notBecomeDueMoney; + private BigDecimal notBecomeDueMoney;*/ private String pSid; @ApiModelProperty("销售订单sid") @@ -72,9 +72,9 @@ public class LoanReturnVehLedger extends BaseEntity { @ApiModelProperty("销售订单车辆sid") private String busVinSid; @ApiModelProperty("库存状态") - private String vehicleState; + private String stockState; @ApiModelProperty("库存状态key") - private String vehicleStateKey; + private String stockStateKey; @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 3f6bfbb87d..271870e229 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 @@ -16,7 +16,7 @@ public class LoanReturnVehLedgerDto { private String sid; - @ApiModelProperty("车牌号") + /* @ApiModelProperty("车牌号") private String vehMark; @ApiModelProperty("车辆类型") private String vehType; @@ -37,12 +37,12 @@ public class LoanReturnVehLedgerDto { @ApiModelProperty("贷款人") private String borrowerName; @ApiModelProperty("贷款人sid") - private String borrowerSid; + private String borrowerSid;*/ @ApiModelProperty("存放地点") private String location; @ApiModelProperty("存放地点sid") private String locationSid; - @ApiModelProperty("处置方式key") + /* @ApiModelProperty("处置方式key") private String disposalKey; @ApiModelProperty("处置方式") private String disposal; @@ -60,7 +60,7 @@ public class LoanReturnVehLedgerDto { @ApiModelProperty("库存状态") private String vehicleState; @ApiModelProperty("库存状态key") - private String vehicleStateKey; + private String vehicleStateKey;*/ } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerQuery.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerQuery.java index 09c20c5820..fa6d0e6f6d 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerQuery.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/LoanReturnVehLedgerQuery.java @@ -40,7 +40,7 @@ public class LoanReturnVehLedgerQuery implements Query { @ApiModelProperty("出库日期结束") private String outboundDateEnd; @ApiModelProperty("库存状态") - private String vehicleState; + private String vehicleStateKey; private String menuUrl; private String orgPath; diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/ReturnVehType.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/ReturnVehType.java new file mode 100644 index 0000000000..991882a76e --- /dev/null +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanreturnvehledger/ReturnVehType.java @@ -0,0 +1,69 @@ +package com.yxt.anrui.riskcenter.api.loanreturnvehledger; + +import lombok.Getter; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/1/23 + **/ +public class ReturnVehType { + + @Getter + public static enum ReturnVehicleState { + + KC("0001", "库存"), + CK("0002", "出库"), + ; + + /** + * code值 + */ + private final String code; + /** + * 备注 + */ + private final String remarks; + + /** + * 构造器 + * + * @param code code值 + * @param remarks 备注 + */ + private ReturnVehicleState(String code, String remarks) { + this.code = code; + this.remarks = remarks; + } + } + + @Getter + public static enum Disposal { + + WCZ("01", "未处置"), + KHSH("02", "客户赎回"), + ECXS("03", "二次销售"), + ECZZ("04", "二次转租"), + ; + + /** + * code值 + */ + private final String code; + /** + * 备注 + */ + private final String remarks; + + /** + * 构造器 + * + * @param code code值 + * @param remarks 备注 + */ + private Disposal(String code, String remarks) { + this.code = code; + this.remarks = remarks; + } + } +} diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturninboundapply/LoanReturnInboundApplyMapper.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturninboundapply/LoanReturnInboundApplyMapper.java index b1050f911a..2794d87a95 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturninboundapply/LoanReturnInboundApplyMapper.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturninboundapply/LoanReturnInboundApplyMapper.java @@ -5,10 +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.buscenter.api.bussalesorder.BusSalesOrder; -import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApply; -import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApplyDetailsVo; -import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApplyVo; -import com.yxt.anrui.riskcenter.api.loanreturninboundapply.ReturnInboundVo; +import com.yxt.anrui.riskcenter.api.loanreturninboundapply.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -39,4 +36,6 @@ public interface LoanReturnInboundApplyMapper extends BaseMapper + + \ No newline at end of file diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturninboundapply/LoanReturnInboundApplyService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturninboundapply/LoanReturnInboundApplyService.java index 9e6a9d9367..00039e72c5 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturninboundapply/LoanReturnInboundApplyService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturninboundapply/LoanReturnInboundApplyService.java @@ -726,7 +726,26 @@ public class LoanReturnInboundApplyService extends MybatisBaseService getDetailsApp(String sid) { - return null; + ResultBean rb = ResultBean.fireFail(); + LoanReturnInboundApply loanReturnInboundApply = fetchBySid(sid); + if (loanReturnInboundApply == null) { + return rb.setMsg("该交回车辆入库申请不存在"); + } + ReturnAppVo returnAppVo = baseMapper.selectDetailsApp(sid); + if ("是".equals(loanReturnInboundApply.getTralier())) { + LoanReturnInboundTrailer loanReturnInboundTrailer = loanReturnInboundTrailerService.selectByMainSid(sid); + returnAppVo.setVinNoTrailer(loanReturnInboundTrailer.getVinNo()); + returnAppVo.setVehMarkTrailer(loanReturnInboundTrailer.getVehMark()); + returnAppVo.setTrailerType(loanReturnInboundTrailer.getTrailerType()); + returnAppVo.setInboundMoneyTrailer(String.valueOf(loanReturnInboundTrailer.getInboundMoney())); + returnAppVo.setRemarksTrailer(loanReturnInboundTrailer.getRemarks()); + } + String files = loanReturnInboundApply.getFiles(); + if (StringUtils.isNotBlank(files)) { + List fileList = Arrays.asList(files.split(",")).stream().map(c -> fileUploadComponent.getUrlPrefix() + c).collect(Collectors.toList()); + returnAppVo.setFilesList(fileList); + } + return rb.success().setData(returnAppVo); } /* public ResultBean> getInboundList(String useOrgSid) { diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturnvehledger/LoanReturnVehLedgerMapper.xml b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturnvehledger/LoanReturnVehLedgerMapper.xml index 37e5ef1057..29c8ade58a 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturnvehledger/LoanReturnVehLedgerMapper.xml +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanreturnvehledger/LoanReturnVehLedgerMapper.xml @@ -22,14 +22,13 @@ lv.vehModel, lv.customer, lv.borrowerName, - lv.overMoney, - lv.notBecomeDueMoney, lv.location, lv.disposal, lv.inboundMoney, DATE_FORMAT(lv.inboundDate, '%Y-%m-%d') AS inboundDate, DATE_FORMAT(lv.outboundDate, '%Y-%m-%d') AS outboundDate, - lv.vehicleState + lv.stockState vehicleState, + lv.busSid from loan_return_veh_ledger lv ${ew.sqlSegment} 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 4df0b3f99c..4126bd9847 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 @@ -73,8 +73,8 @@ public class LoanReturnVehLedgerService extends MybatisBaseService= date_format('" + query.getInboundDateStart() + "','%Y-%m-%d')"). - apply(StringUtils.isNotBlank(query.getInboundDateEnd()), "date_format (lv.outboundDate,'%Y-%m-%d') <= date_format('" + query.getInboundDateEnd() + "','%Y-%m-%d')" + qw.apply(StringUtils.isNotBlank(query.getOutboundDateStart()), "date_format (lv.outboundDate,'%Y-%m-%d') >= date_format('" + query.getOutboundDateStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getOutboundDateEnd()), "date_format (lv.outboundDate,'%Y-%m-%d') <= date_format('" + query.getOutboundDateEnd() + "','%Y-%m-%d')" ); + //库存状态 + if (StringUtils.isNotBlank(query.getVehicleStateKey())) { + qw.eq("lv.stockStateKey", query.getVehicleStateKey()); + } //========================================数据授权开始 if (StringUtils.isNotBlank(query.getMenuUrl())) { //======================= @@ -210,11 +218,14 @@ public class LoanReturnVehLedgerService extends MybatisBaseService p = PagerUtil.pageToVo(pagging, null); @@ -237,7 +248,16 @@ public class LoanReturnVehLedgerService extends MybatisBaseService rb = ResultBean.fireFail(); LoanReturnVehLedger loanReturnVehLedger = fetchBySid(sid); LoanReturnLedgerVo loanReturnLedgerVo = new LoanReturnLedgerVo(); - BeanUtil.copyProperties(loanReturnVehLedger,loanReturnLedgerVo); + BeanUtil.copyProperties(loanReturnVehLedger, loanReturnLedgerVo); + if ("主车".equals(loanReturnVehLedger.getVehType())) { + AlrepaidAndArrVo alrepaidAndArrVo = loanRestoreReportApplyService.getAlrepaidAndArr(loanReturnVehLedger.getBusVinSid()); + if (alrepaidAndArrVo != null) { + loanReturnLedgerVo.setOverMoney(alrepaidAndArrVo.getCurrentBeMoney()); + loanReturnLedgerVo.setNotBecomeDueMoney(alrepaidAndArrVo.getUnexpiredMoney()); + } + } + loanReturnLedgerVo.setVehicleState(loanReturnVehLedger.getStockState()); + loanReturnLedgerVo.setVehicleStateKey(loanReturnVehLedger.getStockStateKey()); return rb.success().setData(loanReturnLedgerVo); } } diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/returninbound/ReturnInboundAppVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/returninbound/ReturnInboundAppVo.java index 2246e3615b..a74aaf525e 100644 --- a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/returninbound/ReturnInboundAppVo.java +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/returninbound/ReturnInboundAppVo.java @@ -1,7 +1,12 @@ package com.yxt.anrui.terminal.api.risk.returninbound; +import com.yxt.anrui.terminal.api.supplychain.vehicleApply.VehicleApplyCarPageVo; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.ArrayList; +import java.util.List; + /** * @description: * @author: dimengzhe @@ -9,4 +14,99 @@ import lombok.Data; **/ @Data public class ReturnInboundAppVo { + + private String publishInfo; + + @ApiModelProperty("申请部门") + private String createDept; + + @ApiModelProperty("申请人") + private String createByName; + @ApiModelProperty("发起日期") + private String createDate; + @ApiModelProperty("车架号") + private String vinNo; + + @ApiModelProperty("车牌号") + private String vehMark; + @ApiModelProperty("首次登记日期") + private String firstDate; + @ApiModelProperty("车型名称") + private String modelName; + @ApiModelProperty("车型sid") + private String modelSid; + @ApiModelProperty("配置sid") + private String configSid; + @ApiModelProperty("配置名称") + private String configName; + @ApiModelProperty("是否带挂车") + private String tralier; + @ApiModelProperty("客户名称") + private String customerName; + + @ApiModelProperty("贷款人") + private String loanName; + @ApiModelProperty("贷款合同编号") + private String loanContractNo; + @ApiModelProperty("资方") + private String bankName; + @ApiModelProperty("资方合同编号") + private String bankContractNo; + @ApiModelProperty("入库价") + private int inboundMoney; + @ApiModelProperty("停放地点") + private String locationName; + + @ApiModelProperty("停车收费标准") + private String parkFees; + @ApiModelProperty("已还金额") + private String alRepaidMoney; + @ApiModelProperty("当前逾期金额/其中资金占用费") + private String yqzjzyMoney; + @ApiModelProperty("未到期金额") + private String unexpiredMoney; + @ApiModelProperty("总期数/当前期数") + private String qsCount; + @ApiModelProperty("已还金额换算期数") + private String alRepaidMoneyConPeriod; + @ApiModelProperty("逾期金额换算期数") + private String beOverdueMoneyAndPeriod; + + + private String remarks; + + private List filesList = new ArrayList<>(); + + @ApiModelProperty(value = "任务id") + private String taskId; + @ApiModelProperty(value = "流程实例id") + private String procInstId; + + + @ApiModelProperty("挂车车架号") + private String vinNoTrailer; + @ApiModelProperty("挂车车牌号") + private String vehMarkTrailer; + @ApiModelProperty("挂车类型") + private String trailerType; + @ApiModelProperty("挂车类型key") + private String trailerTypeKey; + @ApiModelProperty("挂车入库价") + private int inboundMoneyTrailer; + @ApiModelProperty("挂车备注") + private String remarksTrailer; + + @ApiModelProperty("车型信息") + private VehicleApplyCarPageVo carDetailPage; + + private String orgPath; + + @ApiModelProperty("当前逾期金额") + private String currentBeMoney; + @ApiModelProperty("其中资金占用费") + private String wheFundOccMoney; + @ApiModelProperty("总期数") + private String nper; + @ApiModelProperty("当前期数") + private String currentPeriod; } diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/returninbound/ReturnInboundService.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/returninbound/ReturnInboundService.java index c2a9046b65..718fa862b6 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/returninbound/ReturnInboundService.java +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/returninbound/ReturnInboundService.java @@ -1,21 +1,32 @@ package com.yxt.anrui.terminal.biz.risk.returninbound; import cn.hutool.core.bean.BeanUtil; +import com.alibaba.fastjson.JSONObject; +import com.yxt.anrui.base.api.busvehicleapply.app.AppVehicleApplyVo; +import com.yxt.anrui.portal.api.appsubsetversion.AppSubVersionVo; +import com.yxt.anrui.portal.api.appsubsetversion.AppSubsetVersionFeign; import com.yxt.anrui.riskcenter.api.loanoverduefin.flowable.*; import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApply; import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApplyFeign; +import com.yxt.anrui.riskcenter.api.loanreturninboundapply.ReturnAppVo; import com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable.*; import com.yxt.anrui.terminal.api.risk.returninbound.ReturnInboundAppVo; import com.yxt.anrui.terminal.api.risk.returninbound.flowable.ReturnInboundDelegateQuery; import com.yxt.anrui.terminal.api.risk.returninbound.flowable.ReturnInboundDto; import com.yxt.anrui.terminal.api.risk.returninbound.flowable.ReturnInboundQuery; import com.yxt.anrui.terminal.api.risk.returninbound.flowable.ReturnInboundTaskQuery; +import com.yxt.anrui.terminal.api.supplychain.vehicleApply.VehicleApplyCarPageVo; +import com.yxt.anrui.terminal.api.supplychain.vehicleApply.VehicleApplyListVo; +import com.yxt.anrui.terminal.api.supplychain.vehicleApply.VehicleApplyVo; import com.yxt.common.core.result.ResultBean; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * @description: @@ -26,6 +37,8 @@ import java.util.List; public class ReturnInboundService { @Autowired private LoanReturnInboundApplyFeign loanReturnInboundApplyFeign; + @Autowired + private AppSubsetVersionFeign appSubsetVersionFeign; public ResultBean agreeReturnInbound(ReturnInboundDto dto) { ResultBean rb = ResultBean.fireFail(); @@ -101,7 +114,34 @@ public class ReturnInboundService { } public ResultBean getReturnInbound(String sid) { - return null; + ResultBean rb = ResultBean.fireFail(); + ResultBean resultBean = loanReturnInboundApplyFeign.getDetailsApp(sid); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + ResultBean voResultBean = appSubsetVersionFeign.selectLast(); + AppSubVersionVo appSubVersionVo = voResultBean.getData(); + ReturnInboundAppVo returnInboundAppVo = new ReturnInboundAppVo(); + BeanUtil.copyProperties(resultBean.getData(), returnInboundAppVo); + VehicleApplyCarPageVo appVehicleVersionVo = new VehicleApplyCarPageVo(); + String modelSid = returnInboundAppVo.getModelSid(); + String configSid = returnInboundAppVo.getConfigSid(); + Map map = new HashMap<>(); + map.put("modelSid", modelSid); + map.put("configSid", configSid); + map.put("selectType", 0); + map.put("orgPath", returnInboundAppVo.getOrgPath()); + appSubVersionVo.setJson(JSONObject.toJSONString(map)); + BeanUtil.copyProperties(appSubVersionVo, appVehicleVersionVo); + returnInboundAppVo.setCarDetailPage(appVehicleVersionVo); + returnInboundAppVo.setPublishInfo(returnInboundAppVo.getCreateDept()+"-"+returnInboundAppVo.getCreateByName()); + if (StringUtils.isNotBlank(returnInboundAppVo.getNper()) && StringUtils.isNotBlank(returnInboundAppVo.getCurrentPeriod())) { + returnInboundAppVo.setQsCount(returnInboundAppVo.getNper() + "/" + returnInboundAppVo.getCurrentPeriod()); + } + if (StringUtils.isNotBlank(returnInboundAppVo.getCurrentBeMoney()) && StringUtils.isNotBlank(returnInboundAppVo.getWheFundOccMoney())) { + returnInboundAppVo.setYqzjzyMoney(returnInboundAppVo.getCurrentBeMoney() + "/" + returnInboundAppVo.getWheFundOccMoney()); + } + return rb.success().setData(returnInboundAppVo); } public ResultBean delegate(ReturnInboundDelegateQuery delegateQuery) {