From f57783d9643839126e5007dfacd1b94127a1807c Mon Sep 17 00:00:00 2001 From: dimengzhe Date: Fri, 18 Aug 2023 11:39:46 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseVehicleStateService.java | 11 +- .../bussalesorder/BusSalesOrderService.java | 37 +++++- .../BusSalesOrderReturnVehApplyService.java | 14 +- .../FinUncollectedReceivablesDetailed.java | 50 +++++--- ...inUncollectedReceivablesDetailedFeign.java | 4 + ...ectedReceivablesDetailedFeignFallback.java | 5 + .../StateQuery.java | 18 +++ .../UnCollectionDto.java | 7 + .../FinCollectionConfirmationService.java | 120 ++---------------- ...nUncollectedReceivablesDetailedMapper.java | 2 + ...inUncollectedReceivablesDetailedMapper.xml | 5 + ...FinUncollectedReceivablesDetailedRest.java | 5 + ...UncollectedReceivablesDetailedService.java | 4 + 13 files changed, 136 insertions(+), 146 deletions(-) create mode 100644 anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/StateQuery.java diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclestate/BaseVehicleStateService.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclestate/BaseVehicleStateService.java index f38aa875b2..b51154c410 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclestate/BaseVehicleStateService.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclestate/BaseVehicleStateService.java @@ -104,8 +104,8 @@ public class BaseVehicleStateService extends MybatisBaseService vinList = appOrderModelInfoVo.getVinListsVos(); for (int i = 0; i < vinList.size(); i++) { UnCollectionDto unCollectionDto = new UnCollectionDto(); @@ -5421,6 +5450,8 @@ public class BusSalesOrderService extends MybatisBaseService { BaseVehicleStateDto baseVehicleStateDto = new BaseVehicleStateDto(); baseVehicleStateDto.setOperateType(BaseVehicleStateEnum.OperateTypeEnum.TC.getTypeKey()); - if (StringUtils.isNotBlank(v.getLinkSid())) { - baseVehicleStateDto.setVinSid(v.getLinkSid()); - baseVehicleStateDto.setVinNo(v.getLinkNo()); - } - baseVehicleStateDto.setSaleTypeKey(finalBusSalesOrderOne.getPayTypeKey()); - baseVehicleStateDto.setFinSourceKey(finalBusSalesOrderOne.getFinancePlan()); baseVehicleStateDto.setBusSid(v.getSid()); dtoList.add(baseVehicleStateDto); }); @@ -623,7 +616,12 @@ public class BusSalesOrderReturnVehApplyService extends MybatisBaseService { + + }); + }*/ } return rb.success().setData(resultBean.getData()); } else { diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailed.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailed.java index da2db484b9..ac10681cf4 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailed.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailed.java @@ -52,35 +52,35 @@ import java.math.BigDecimal; public class FinUncollectedReceivablesDetailed extends BaseEntity { private static final long serialVersionUID = 1L; - - @ApiModelProperty("创建人接口") + + @ApiModelProperty("创建人接口") private String createByName; // 创建人接口 - - @ApiModelProperty("合同sid") + + @ApiModelProperty("合同sid") private String contractSid; // 合同sid - - @ApiModelProperty("合同编号") + + @ApiModelProperty("合同编号") private String contractNo; // 合同编号 - - @ApiModelProperty("客户sid") + + @ApiModelProperty("客户sid") private String customerSid; // 客户sid - - @ApiModelProperty("客户名称") + + @ApiModelProperty("客户名称") private String customerName; // 客户名称 - - @ApiModelProperty("车架号") + + @ApiModelProperty("车架号") private String VIN; // 车架号 - - @ApiModelProperty("分公司sid") + + @ApiModelProperty("分公司sid") private String useOrgSid; // 分公司sid - - @ApiModelProperty("联系电话") + + @ApiModelProperty("联系电话") private String customerPhone; // 联系电话 - - @ApiModelProperty("应收项目名称") + + @ApiModelProperty("应收项目名称") private String receivablesName; // 应收项目名称 - - @ApiModelProperty("当前应收金额") + + @ApiModelProperty("当前应收金额") private BigDecimal currentReceivableMoney; // 当前应收金额 @ApiModelProperty("应收金额(不变)") @@ -100,10 +100,18 @@ public class FinUncollectedReceivablesDetailed extends BaseEntity { @ApiModelProperty("申请人组织路径") private String orgSidPath; - + @ApiModelProperty("销售专员") private String staffName; + @ApiModelProperty("销售专员用户sid") private String staffUserSid; + @ApiModelProperty("销售专员部门") private String staffDeptName; + @ApiModelProperty("销售专员部门sid") private String staffDeptSid; + @ApiModelProperty("分公司") private String useOrgName; + @ApiModelProperty("应收款项状态") + private String kxState; + @ApiModelProperty("其他应收金额:即贴息抵车款") + private BigDecimal otherReceivableMoney; } diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedFeign.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedFeign.java index 43d0d3e1b4..b2202bf5b2 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedFeign.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedFeign.java @@ -123,4 +123,8 @@ public interface FinUncollectedReceivablesDetailedFeign { @ApiOperation("根据销售订单车辆sid查询应收已收sid") @GetMapping("/fetchYsSidByOrderVehSid") ResultBean> fetchYsSidByOrderVehSid(@RequestParam("sid") String sid); + + @ApiOperation("应收款项状态修改") + @PostMapping("/updateKxState") + ResultBean updateKxState(@RequestBody StateQuery stateQuery); } \ No newline at end of file diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedFeignFallback.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedFeignFallback.java index 3945078b5b..48082ae9b5 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedFeignFallback.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedFeignFallback.java @@ -136,4 +136,9 @@ public class FinUncollectedReceivablesDetailedFeignFallback implements FinUncoll return null; } + @Override + public ResultBean updateKxState(StateQuery stateQuery) { + return null; + } + } \ No newline at end of file diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/StateQuery.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/StateQuery.java new file mode 100644 index 0000000000..9630c20531 --- /dev/null +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/StateQuery.java @@ -0,0 +1,18 @@ +package com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed; + +import lombok.Data; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2023/8/18 + **/ +@Data +public class StateQuery { + + private List busVinSid; + + private String kxState; +} diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/UnCollectionDto.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/UnCollectionDto.java index bbea20e7a4..e70e9be546 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/UnCollectionDto.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/UnCollectionDto.java @@ -4,6 +4,8 @@ import com.yxt.common.core.dto.Dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.math.BigDecimal; + /** * @Author dimengzhe * @Date 2022/11/2 15:11 @@ -72,4 +74,9 @@ public class UnCollectionDto implements Dto { private String staffDeptSid; private String useOrgName; + @ApiModelProperty("应收款项状态") + private String kxState; + @ApiModelProperty("其他应收金额:即贴息抵车款") + private BigDecimal otherReceivableMoney; + } diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java index b8e2ea3e76..c14475efe5 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java @@ -1896,118 +1896,16 @@ public class FinCollectionConfirmationService extends MybatisBaseService voList = finSelectedReceivablesDetailedService.selectListByVin(v.getContractNo(), finUncollectedReceivablesDetailed.getBusVinSid(), 3); BigDecimal bigDecimalVinAll = voList.stream().map(FinSelectedReceivablesDetailedVo::getSubscriptionMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); + List unList = finUncollectedReceivablesDetailedService.selectListByBusVinSid(finUncollectedReceivablesDetailed.getBusVinSid()); + BigDecimal unDecimalVinAll = unList.stream().map(FinUncollectedReceivablesDetailed::getReveivableMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); //查询该合同编号下的销售订单的单车成交价 - ResultBean commonContractResultBean = commonContractFeign.selectByNo(v.getContractNo()); - if (commonContractResultBean.getSuccess()) { - CommonContract commonContract = commonContractResultBean.getData(); - if (commonContract != null) { - ResultBean orderDetails = busSalesOrderFeign.getSaleOrderDetails(commonContract.getBusSid()); - AppOrderDetailsVo vo = orderDetails.getData(); - if (vo != null) { - AppOrderPriceInfoVo priceInfoVo = vo.getPriceInfo(); - AppOrderDepositInfoVo depositInfo = vo.getDepositInfo(); - if (depositInfo != null) { - if ("02".equals(depositInfo.getDepositTypeKey())) {//订金结转 - BigDecimal decimalDeposit = BigDecimal.ZERO; - if (StringUtils.isNotBlank(depositInfo.getDepositTotal())) { - decimalDeposit = new BigDecimal(depositInfo.getDepositTotal()); - } - if (StringUtils.isNotBlank(depositInfo.getMakeUpDeposit())) { - decimalDeposit = decimalDeposit.subtract(new BigDecimal(depositInfo.getMakeUpDeposit())); - } - decimalDeposit = decimalDeposit.divide(new BigDecimal(priceInfoVo.getNumber()), BigDecimal.ROUND_CEILING); - bigDecimalVinAll = bigDecimalVinAll.add(decimalDeposit); - } - } - //单台整体成交价 - BigDecimal singleFinalPrice = new BigDecimal(priceInfoVo.getSingleFinalPrice()); - BigDecimal leftAll = BigDecimal.ZERO; - BigDecimal rightAll = BigDecimal.ZERO; - if ("2".equals(vo.getFinancePlan()) || "2".equals(vo.getPayTypeKey())) { - //根据销售订单sid查询金融方案 - ResultBean solutionsDetailsVoResultBean = loanSolutionsFeign.selectDetailss(commonContract.getBusSid()); - SolutionsDetailsVo solutionsDetailsVo = solutionsDetailsVoResultBean.getData(); - if (solutionsDetailsVo != null) { - /*if (StringUtils.isNotBlank(solutionsDetailsVo.getTypeKey())) { - if ("02".equals(solutionsDetailsVo.getTypeKey())) { - //外部金融:成交价 = 订金+车款+厂家贴息-服务费 - leftAll = leftAll.add(singleFinalPrice); - if (StringUtils.isNotBlank(solutionsDetailsVo.getFactoryDiscount())) { - leftAll = leftAll.subtract(new BigDecimal(solutionsDetailsVo.getFactoryDiscount())); - } - if (StringUtils.isNotBlank(solutionsDetailsVo.getServiceAmount())) { - leftAll = leftAll.add(new BigDecimal(solutionsDetailsVo.getServiceAmount())); - } - rightAll = rightAll.add(bigDecimalVinAll); - } else { - //自营非担保: 实收订金 = 首付款及费用+订金 - if (StringUtils.isNotBlank(solutionsDetailsVo.getRealTotal())) { - leftAll = leftAll.add(new BigDecimal(solutionsDetailsVo.getRealTotal())); - } - rightAll = rightAll.add(bigDecimalVinAll); - } - } else {//担保贷款: 实收订金 = 首付款及费用+订金 - if (StringUtils.isNotBlank(solutionsDetailsVo.getRealTotal())) { - leftAll = leftAll.add(new BigDecimal(solutionsDetailsVo.getRealTotal())); - } - rightAll = rightAll.add(bigDecimalVinAll); - }*/ - if ("2".equals(vo.getPayTypeKey())) {//贷款 - if (StringUtils.isNotBlank(solutionsDetailsVo.getRealTotal())) { - leftAll = leftAll.add(new BigDecimal(solutionsDetailsVo.getRealTotal())); - } - rightAll = rightAll.add(bigDecimalVinAll); - } else { - if(StringUtils.isNotBlank(solutionsDetailsVo.getTypeKey())){ - //外部金融:成交价 = 订金+车款+厂家贴息-服务费 - leftAll = leftAll.add(singleFinalPrice); - if (StringUtils.isNotBlank(solutionsDetailsVo.getDiscountCar())) { - leftAll = leftAll.subtract(new BigDecimal(solutionsDetailsVo.getDiscountCar())); - }else{ - leftAll = leftAll.subtract(new BigDecimal(solutionsDetailsVo.getFactoryDiscount())); - } - if (StringUtils.isNotBlank(solutionsDetailsVo.getServiceAmount())) { - leftAll = leftAll.add(new BigDecimal(solutionsDetailsVo.getServiceAmount())); - } - rightAll = rightAll.add(bigDecimalVinAll); - }else{ - if ("02".equals(solutionsDetailsVo.getTypeKey())) { - //外部金融:成交价 = 订金+车款+厂家贴息-服务费 - leftAll = leftAll.add(singleFinalPrice); - if (StringUtils.isNotBlank(solutionsDetailsVo.getFactoryDiscount())) { - leftAll = leftAll.subtract(new BigDecimal(solutionsDetailsVo.getFactoryDiscount())); - } - if (StringUtils.isNotBlank(solutionsDetailsVo.getServiceAmount())) { - leftAll = leftAll.add(new BigDecimal(solutionsDetailsVo.getServiceAmount())); - } - rightAll = rightAll.add(bigDecimalVinAll); - } else { - //自营非担保: 实收订金 = 首付款及费用+订金 - if (StringUtils.isNotBlank(solutionsDetailsVo.getRealTotal())) { - leftAll = leftAll.add(new BigDecimal(solutionsDetailsVo.getRealTotal())); - } - rightAll = rightAll.add(bigDecimalVinAll); - } - } - } - } else { - // 成交价 = 车款+订金 - leftAll = leftAll.add(singleFinalPrice); - rightAll = rightAll.add(bigDecimalVinAll); - } - } else { - // 成交价 = 车款+订金 - leftAll = leftAll.add(singleFinalPrice); - rightAll = rightAll.add(bigDecimalVinAll); - } - if (leftAll.compareTo(rightAll) <= 0) { - BaseVehicleStateDto baseVehicleStateDto = new BaseVehicleStateDto(); - baseVehicleStateDto.setOperateType(BaseVehicleStateEnum.OperateTypeEnum.FIN_RQ.getTypeKey()); - baseVehicleStateDto.setBusSid(finUncollectedReceivablesDetailed.getBusVinSid()); - dtoList.add(baseVehicleStateDto); - } - } - } + BigDecimal leftAll = unDecimalVinAll; + BigDecimal rightAll = bigDecimalVinAll; + if (leftAll.compareTo(rightAll) <= 0) { + BaseVehicleStateDto baseVehicleStateDto = new BaseVehicleStateDto(); + baseVehicleStateDto.setOperateType(BaseVehicleStateEnum.OperateTypeEnum.FIN_RQ.getTypeKey()); + baseVehicleStateDto.setBusSid(finUncollectedReceivablesDetailed.getBusVinSid()); + dtoList.add(baseVehicleStateDto); } }); } diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.java index 9c5e08ec80..ce22f7435f 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.java @@ -104,4 +104,6 @@ public interface FinUncollectedReceivablesDetailedMapper extends BaseMapper selectSidBybusVinSidAndConNo(@Param("busVinSid") String busVinSid, @Param("contractNo") String contractNo); String selectByBusVinSid(String busVinSid); + + List selectListByBusVinSid(String busVinSid); } \ No newline at end of file diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml index 6ddc3679a3..edb01dceb1 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml @@ -319,4 +319,9 @@ from fin_uncollected_receivables_detailed where busVinSid = #{busVinSid} + + \ No newline at end of file diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedRest.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedRest.java index 2bedc3f1a0..9afcd45c41 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedRest.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedRest.java @@ -161,6 +161,11 @@ public class FinUncollectedReceivablesDetailedRest implements FinUncollectedRece return rb.success().setData(stringList); } + @Override + public ResultBean updateKxState(StateQuery stateQuery) { + return null; + } + @Override public ResultBean> selectByContractNo(String contractNo) { diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedService.java index 4a4ff0f237..a3391ec1e6 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedService.java @@ -976,4 +976,8 @@ public class FinUncollectedReceivablesDetailedService extends MybatisBaseService public String selectByBusVinSid(String busVinSid) { return baseMapper.selectByBusVinSid(busVinSid); } + + public List selectListByBusVinSid(String busVinSid) { + return baseMapper.selectListByBusVinSid(busVinSid); + } } \ No newline at end of file From 045fda5d46004b2fc78bf4933655a8e2d9c58a68 Mon Sep 17 00:00:00 2001 From: God <10745413@qq.com> Date: Fri, 18 Aug 2023 11:43:19 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinFundsCarriedForwardApplyVo.java | 4 +- .../finfundscarriedforwardapply/TzDto.java | 2 +- .../FinFundsCarriedForwardApplyService.java | 22 ++++++- .../AppLoanHomevisitAppealDto.java | 66 +++++++++++++++++++ .../LoanHomeVisitInvestigateFeign.java | 37 +++++++++++ .../flowable/CompleteHomeAppealDto.java | 34 ++++++++++ .../flowable/HomeAppealQuery.java | 17 +++++ .../flowable/HomeAppealTaskQuery.java | 42 ++++++++++++ .../flowable/SubmitHomeAppealApplyDto.java | 19 ++++++ .../LoanHomeVisitInvestigateRest.java | 34 ++++++++++ .../LoanHomeVisitInvestigateService.java | 43 ++++++++++++ 11 files changed, 314 insertions(+), 6 deletions(-) create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/AppLoanHomevisitAppealDto.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/CompleteHomeAppealDto.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/HomeAppealQuery.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/HomeAppealTaskQuery.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/SubmitHomeAppealApplyDto.java diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finfundscarriedforwardapply/FinFundsCarriedForwardApplyVo.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finfundscarriedforwardapply/FinFundsCarriedForwardApplyVo.java index 144b89c87d..d3f8b9daf7 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finfundscarriedforwardapply/FinFundsCarriedForwardApplyVo.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finfundscarriedforwardapply/FinFundsCarriedForwardApplyVo.java @@ -79,7 +79,7 @@ public class FinFundsCarriedForwardApplyVo implements Vo { @ApiModelProperty("pdf路径") private String downloadUrl; @ApiModelProperty("是否可以修改") - private Boolean showUpdateBtn; + private Boolean showUpdateBtn = false; @ApiModelProperty("是否可以下载") - private Boolean showDownloadBtn; + private Boolean showDownloadBtn = false; } diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finfundscarriedforwardapply/TzDto.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finfundscarriedforwardapply/TzDto.java index 81f66cabec..8f85517467 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finfundscarriedforwardapply/TzDto.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finfundscarriedforwardapply/TzDto.java @@ -12,7 +12,7 @@ public class TzDto { @ApiModelProperty("调账类型") private String tzType; - @ApiModelProperty("业务sud") + @ApiModelProperty("业务sid") private String busSid; @ApiModelProperty("合同编号") private String conNo; diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finfundscarriedforwardapply/FinFundsCarriedForwardApplyService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finfundscarriedforwardapply/FinFundsCarriedForwardApplyService.java index 90eba538d6..87fc23125e 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finfundscarriedforwardapply/FinFundsCarriedForwardApplyService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finfundscarriedforwardapply/FinFundsCarriedForwardApplyService.java @@ -234,11 +234,11 @@ public class FinFundsCarriedForwardApplyService extends MybatisBaseService page = PagerUtil.queryToPage(pq); IPage pagging = baseMapper.selectPageVo(page, qw, query.getJzSmallMoney(), query.getJzBigMoney()); for (FinFundsCarriedForwardApplyVo record : pagging.getRecords()) { - record.setShowUpdateBtn(false); + if ("待提交".equals(record.getNodeState())) { + record.setShowUpdateBtn(true); + } if ("已办结".equals(record.getNodeState())) { record.setShowDownloadBtn(true); - } else { - record.setShowDownloadBtn(false); } } PagerVo p = PagerUtil.pageToVo(pagging, null); @@ -542,6 +542,8 @@ public class FinFundsCarriedForwardApplyService extends MybatisBaseService_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * Project: anrui-riskcenter(家访考察申诉)
+ * File: LoanHomevisitAppealDto.java
+ * Class: com.yxt.anrui.riskcenter.api.loanhomevisitappeal.LoanHomevisitAppealDto
+ * Description: 家访考察申诉 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2023-08-17 14:29:22
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "家访考察申诉 数据传输对象", description = "家访考察申诉 数据传输对象") +public class AppLoanHomevisitAppealDto implements Dto { + + private String sid; + + @ApiModelProperty("家访考察意见") + private String homeVisOpinion; + @ApiModelProperty("申诉原因") + private String appealReason; + @ApiModelProperty("家访考察sid") + private String homeVisitSid; + @ApiModelProperty("申请编号") + private String billNo; + @ApiModelProperty("申诉附件") + private List ssImages = new ArrayList<>(); +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateFeign.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateFeign.java index c705b1834b..d4ad50d751 100644 --- a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateFeign.java +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateFeign.java @@ -1,12 +1,17 @@ package com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable.CompleteHomeAppealDto; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable.HomeAppealQuery; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable.HomeAppealTaskQuery; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable.SubmitHomeAppealApplyDto; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; @@ -128,4 +133,36 @@ public interface LoanHomeVisitInvestigateFeign { @PostMapping("/getHomeAppealList") @ResponseBody ResultBean> getHomeAppealList(@RequestBody PagerQuery pagerQuery); + /****************************************流程审批******************************************/ + + @ApiOperation("提交流程") + @PostMapping("/submitCreditInfo") + @ResponseBody + ResultBean submitCreditInfo(@RequestBody SubmitHomeAppealApplyDto dto); + + @ApiOperation("办理") + @PutMapping("/agreeCreditInfo") + @ResponseBody + ResultBean agreeCreditInfo(@RequestBody CompleteHomeAppealDto dto); + + @ApiOperation("驳回") + @PutMapping("/rejectCreditInfo") + @ResponseBody + ResultBean rejectCreditInfo(@RequestBody HomeAppealTaskQuery query); + + @ApiOperation("撤回") + @PutMapping("/recallCreditInfo") + @ResponseBody + ResultBean recallCreditInfo(@RequestBody HomeAppealTaskQuery query); + + @ApiOperation("终止") + @PutMapping("/stopCreditInfo") + @ResponseBody + ResultBean stopCreditInfo(@RequestBody HomeAppealTaskQuery query); + + @ApiOperation("获取流程操作标题") + @GetMapping("/getFlowOperateTitle") + @ResponseBody + ResultBean getFlowOperateTitle(@SpringQueryMap HomeAppealQuery query); + } diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/CompleteHomeAppealDto.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/CompleteHomeAppealDto.java new file mode 100644 index 0000000000..03f71b7c59 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/CompleteHomeAppealDto.java @@ -0,0 +1,34 @@ +package com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable; + +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; + +@Data +public class CompleteHomeAppealDto implements Dto { + private static final long serialVersionUID = 7978653524636034916L; + + @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; + + private String orgPath; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/HomeAppealQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/HomeAppealQuery.java new file mode 100644 index 0000000000..60ccb8eb9c --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/HomeAppealQuery.java @@ -0,0 +1,17 @@ +package com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class HomeAppealQuery implements Query { + private static final long serialVersionUID = -3563282658560745370L; + + @ApiModelProperty(value = "节点key") + private String taskDefKey; + @ApiModelProperty(value = "业务sid") + private String businessSid; + @ApiModelProperty(value = "0 上一环节 1下一环节") + private Integer next; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/HomeAppealTaskQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/HomeAppealTaskQuery.java new file mode 100644 index 0000000000..b440af6964 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/HomeAppealTaskQuery.java @@ -0,0 +1,42 @@ +package com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable; + +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; + +@Data +public class HomeAppealTaskQuery implements Query { + private static final long serialVersionUID = -6952737531036706114L; + + /** + * 终止、驳回、撤回 + */ + @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/loanhomevisitinvestigate/flowable/SubmitHomeAppealApplyDto.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/SubmitHomeAppealApplyDto.java new file mode 100644 index 0000000000..b02af0b35d --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/loanhomevisitinvestigate/flowable/SubmitHomeAppealApplyDto.java @@ -0,0 +1,19 @@ +package com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.yxt.anrui.terminal.api.risk.creditreview.CreditReviewSsDto; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.AppLoanHomevisitAppealDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class SubmitHomeAppealApplyDto extends AppLoanHomevisitAppealDto { + + private static final long serialVersionUID = 6134092944641545633L; + + @ApiModelProperty("流程实例id") + @JsonProperty("procInsId") + private String instanceId; + @ApiModelProperty("任务id") + private String taskId; +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateRest.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateRest.java index 9a9f988781..3f0eb42b81 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateRest.java +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateRest.java @@ -26,6 +26,10 @@ package com.yxt.anrui.terminal.biz.risk.loanhomevisitinvestigate; import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.*; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable.CompleteHomeAppealDto; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable.HomeAppealQuery; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable.HomeAppealTaskQuery; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable.SubmitHomeAppealApplyDto; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; @@ -142,4 +146,34 @@ public class LoanHomeVisitInvestigateRest implements LoanHomeVisitInvestigateFei public ResultBean> getHomeAppealList(PagerQuery pagerQuery) { return loanHomeVisitInvestigateService.getHomeAppealList(pagerQuery); } + + @Override + public ResultBean submitCreditInfo(SubmitHomeAppealApplyDto dto) { + return loanHomeVisitInvestigateService.submitCreditInfo(dto); + } + + @Override + public ResultBean agreeCreditInfo(CompleteHomeAppealDto dto) { + return loanHomeVisitInvestigateService.agreeCreditInfo(dto); + } + + @Override + public ResultBean rejectCreditInfo(HomeAppealTaskQuery query) { + return loanHomeVisitInvestigateService.rejectCreditInfo(query); + } + + @Override + public ResultBean recallCreditInfo(HomeAppealTaskQuery query) { + return loanHomeVisitInvestigateService.recallCreditInfo(query); + } + + @Override + public ResultBean stopCreditInfo(HomeAppealTaskQuery query) { + return loanHomeVisitInvestigateService.stopCreditInfo(query); + } + + @Override + public ResultBean getFlowOperateTitle(HomeAppealQuery query) { + return loanHomeVisitInvestigateService.getFlowOperateTitle(query); + } } diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateService.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateService.java index a746322afd..7afffdc639 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateService.java +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateService.java @@ -27,9 +27,14 @@ package com.yxt.anrui.terminal.biz.risk.loanhomevisitinvestigate; import cn.hutool.core.bean.BeanUtil; +import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; +import com.yxt.anrui.portal.api.sysuser.SysUserFeign; +import com.yxt.anrui.portal.api.sysuser.SysUserVo; +import com.yxt.anrui.riskcenter.api.loancreditappealpeo.LoanCreditAppealPeoDto; import com.yxt.anrui.riskcenter.api.loanhomevisitappeal.LoanHomevisitAppealFeign; import com.yxt.anrui.riskcenter.api.loanhomevisitappeal.LoanHomevisitAppealQuery; import com.yxt.anrui.riskcenter.api.loanhomevisitappeal.LoanHomevisitAppealVo; +import com.yxt.anrui.riskcenter.api.loanhomevisitappeal.flowable.SubmitHomeAppealDto; import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigate.*; import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatecustomer.LoanHomeVisitInvestigateInitCustomerVo; import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatecustomer.LoanHomeVisitInvestigateSaveCustomerDto; @@ -42,7 +47,12 @@ import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigateproperty.LoanHomeVis import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigateproperty.LoanHomeVisitInvestigateInitPropVo; import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatetransport.LoanHomeVisitInvestigateSaveTranDto; import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatetransport.LoanHomeVisitInvestigateInitTranVo; +import com.yxt.anrui.terminal.api.risk.creditreview.ShareholderDetailsVo; import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.*; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable.CompleteHomeAppealDto; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable.HomeAppealQuery; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable.HomeAppealTaskQuery; +import com.yxt.anrui.terminal.api.risk.loanhomevisitinvestigate.flowable.SubmitHomeAppealApplyDto; import com.yxt.common.base.utils.StringUtils; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; @@ -60,6 +70,8 @@ public class LoanHomeVisitInvestigateService { private LoanHomevisitInvestigateFeign loanHomevisitInvestigateFeign; @Autowired private LoanHomevisitAppealFeign loanHomevisitAppealFeign; + @Autowired + private SysUserFeign sysUserFeign; public ResultBean> getHomeVisitList(PagerQuery pagerQuery) { ResultBean> rb = ResultBean.fireFail(); @@ -295,4 +307,35 @@ public class LoanHomeVisitInvestigateService { v.setRecords(loanHomeVisitInvestigatePageVos); return rb.success().setData(v); } + + public ResultBean submitCreditInfo(SubmitHomeAppealApplyDto dto) { + ResultBean rb = ResultBean.fireFail(); + SubmitHomeAppealDto submitHomeAppealDto = new SubmitHomeAppealDto(); + BeanUtil.copyProperties(dto,submitHomeAppealDto); + ResultBean resultBean = loanHomevisitAppealFeign.submitHomeAppeal(submitHomeAppealDto); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success(); + } + + public ResultBean agreeCreditInfo(CompleteHomeAppealDto dto) { + return null; + } + + public ResultBean rejectCreditInfo(HomeAppealTaskQuery query) { + return null; + } + + public ResultBean recallCreditInfo(HomeAppealTaskQuery query) { + return null; + } + + public ResultBean stopCreditInfo(HomeAppealTaskQuery query) { + return null; + } + + public ResultBean getFlowOperateTitle(HomeAppealQuery query) { + return null; + } } \ No newline at end of file From 08190ef20715defcb72f68e63b92d64e4783dd9b Mon Sep 17 00:00:00 2001 From: dimengzhe Date: Fri, 18 Aug 2023 13:51:34 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusSalesOrderReturnVehApplyService.java | 14 ++++++++++---- .../FinUncollectedReceivablesDetailedMapper.java | 9 +++++++++ .../FinUncollectedReceivablesDetailedMapper.xml | 8 ++++++++ .../FinUncollectedReceivablesDetailedRest.java | 2 +- .../FinUncollectedReceivablesDetailedService.java | 11 +++++++++++ 5 files changed, 39 insertions(+), 5 deletions(-) diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderreturnvehapply/BusSalesOrderReturnVehApplyService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderreturnvehapply/BusSalesOrderReturnVehApplyService.java index 202287433f..ddbc0fa8ff 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderreturnvehapply/BusSalesOrderReturnVehApplyService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderreturnvehapply/BusSalesOrderReturnVehApplyService.java @@ -66,6 +66,7 @@ import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivabl import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailedFeign; import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.FinUncollectedReceivablesDetailed; import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.FinUncollectedReceivablesDetailedFeign; +import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.StateQuery; import com.yxt.anrui.flowable.api.flow.FlowableFeign; import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo; import com.yxt.anrui.flowable.api.flow2.FlowFeign; @@ -616,12 +617,17 @@ public class BusSalesOrderReturnVehApplyService extends MybatisBaseService busVinSidListState = new ArrayList<>(); + if (!vehicleList.isEmpty()) { vehicleList.stream().forEach(v -> { - + busVinSidListState.add(v.getSid()); }); - }*/ + stateQuery.setKxState("02"); + stateQuery.setBusVinSid(busVinSidListState); + ResultBean updateStateResultBean = finUncollectedReceivablesDetailedFeign.updateKxState(stateQuery); + } } return rb.success().setData(resultBean.getData()); } else { diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.java index ce22f7435f..4a1b5611b6 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.java @@ -106,4 +106,13 @@ public interface FinUncollectedReceivablesDetailedMapper extends BaseMapper selectListByBusVinSid(String busVinSid); + + /** + * 根据销售订单车辆sid更新应收未收的款项状态 + * + * @param busVinSid 销售订单车辆sid + * @param kxState 款项状态:01正常,02作废 + * @return + */ + int updateKxState(@Param("list") List busVinSid, @Param("kxState") String kxState); } \ No newline at end of file diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml index edb01dceb1..9b9882e00a 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml @@ -324,4 +324,12 @@ resultType="com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.FinUncollectedReceivablesDetailed"> select * from fin_uncollected_receivables_detailed where busVinSid = #{busVinSid} + + + update fin_uncollected_receivables_detailed set kxState = #{kxState} + where busVinSid in + + #{item} + + \ No newline at end of file diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedRest.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedRest.java index 9afcd45c41..13e595cf46 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedRest.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedRest.java @@ -163,7 +163,7 @@ public class FinUncollectedReceivablesDetailedRest implements FinUncollectedRece @Override public ResultBean updateKxState(StateQuery stateQuery) { - return null; + return finUncollectedReceivablesDetailedService.updateKxState(stateQuery); } diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedService.java index a3391ec1e6..13c403d8d6 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedService.java @@ -980,4 +980,15 @@ public class FinUncollectedReceivablesDetailedService extends MybatisBaseService public List selectListByBusVinSid(String busVinSid) { return baseMapper.selectListByBusVinSid(busVinSid); } + + public ResultBean updateKxState(StateQuery stateQuery) { + ResultBean rb = ResultBean.fireFail(); + List busVinSid = stateQuery.getBusVinSid(); + String kxState = stateQuery.getKxState(); + busVinSid.removeAll(Collections.singleton(null)); + if(!busVinSid.isEmpty()){ + baseMapper.updateKxState(busVinSid,kxState); + } + return rb.success(); + } } \ No newline at end of file From 88f8f06def75b4837d0628c931dfbf656d85b475 Mon Sep 17 00:00:00 2001 From: dimengzhe Date: Fri, 18 Aug 2023 14:05:20 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinSelectedReceivablesDetailedMapper.xml | 1 + .../FinUncollectedReceivablesDetailedMapper.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.xml b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.xml index 54117cac9a..13d204a462 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.xml +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.xml @@ -77,6 +77,7 @@ and length(furd.busVinSid) >0 + and furd.kxState != '02' group by furd.sid,furd.contractNo having receivable>0 diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml index 9b9882e00a..4797c4cc7f 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml @@ -92,6 +92,7 @@ ${ew.sqlSegment} and length(furd.busVinSid) > 0 + and furd.kxState != '02' group by furd.sid, currentReceivableMoney>0, furd.contractNo having currentReceivableMoney>0 From 6e7fb8940292ab782520ea0c56f9e8f835efcd2f Mon Sep 17 00:00:00 2001 From: God <10745413@qq.com> Date: Fri, 18 Aug 2023 14:10:56 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../finfundscarriedforwardapply/TzDto.java | 4 ++-- .../FinFundsCarriedForwardApplyService.java | 24 +++++-------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finfundscarriedforwardapply/TzDto.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finfundscarriedforwardapply/TzDto.java index 8f85517467..d3caf05eec 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finfundscarriedforwardapply/TzDto.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finfundscarriedforwardapply/TzDto.java @@ -25,7 +25,7 @@ public class TzDto { @ApiModelProperty("物料编码") private String vinNo; @ApiModelProperty("调出金额") - private Integer dcje = 0; + private Double dcje = 0.00; @ApiModelProperty("调入金额") - private Integer drje = 0; + private Double drje = 0.00; } diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finfundscarriedforwardapply/FinFundsCarriedForwardApplyService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finfundscarriedforwardapply/FinFundsCarriedForwardApplyService.java index 87fc23125e..2fbc644140 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finfundscarriedforwardapply/FinFundsCarriedForwardApplyService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finfundscarriedforwardapply/FinFundsCarriedForwardApplyService.java @@ -793,9 +793,7 @@ public class FinFundsCarriedForwardApplyService extends MybatisBaseService Date: Fri, 18 Aug 2023 14:18:25 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=AE=B6?= =?UTF-8?q?=E8=AE=BF=E7=94=B3=E8=AF=89=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanHomeVisitInvestigateService.java | 67 +++++++++++++++++-- 1 file changed, 61 insertions(+), 6 deletions(-) diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateService.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateService.java index 7afffdc639..4d952bfcd0 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateService.java +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/loanhomevisitinvestigate/LoanHomeVisitInvestigateService.java @@ -30,11 +30,15 @@ import cn.hutool.core.bean.BeanUtil; import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; import com.yxt.anrui.portal.api.sysuser.SysUserFeign; import com.yxt.anrui.portal.api.sysuser.SysUserVo; +import com.yxt.anrui.riskcenter.api.loancreditappealapply.flowable.LoanCreditApplyCompleteDto; +import com.yxt.anrui.riskcenter.api.loancreditappealapply.flowable.LoanCreditApplyNodeQuery; +import com.yxt.anrui.riskcenter.api.loancreditappealapply.flowable.LoanCreditApplyNodeVo; +import com.yxt.anrui.riskcenter.api.loancreditappealapply.flowable.LoanCreditApplyTaskQuery; import com.yxt.anrui.riskcenter.api.loancreditappealpeo.LoanCreditAppealPeoDto; import com.yxt.anrui.riskcenter.api.loanhomevisitappeal.LoanHomevisitAppealFeign; import com.yxt.anrui.riskcenter.api.loanhomevisitappeal.LoanHomevisitAppealQuery; import com.yxt.anrui.riskcenter.api.loanhomevisitappeal.LoanHomevisitAppealVo; -import com.yxt.anrui.riskcenter.api.loanhomevisitappeal.flowable.SubmitHomeAppealDto; +import com.yxt.anrui.riskcenter.api.loanhomevisitappeal.flowable.*; import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigate.*; import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatecustomer.LoanHomeVisitInvestigateInitCustomerVo; import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatecustomer.LoanHomeVisitInvestigateSaveCustomerDto; @@ -61,6 +65,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; +import java.util.Collections; import java.util.List; @Service @@ -320,22 +325,72 @@ public class LoanHomeVisitInvestigateService { } public ResultBean agreeCreditInfo(CompleteHomeAppealDto dto) { - return null; + ResultBean rb = ResultBean.fireFail(); + LoanHomeAppealCompleteDto loanHomeAppealCompleteDto = new LoanHomeAppealCompleteDto(); + BeanUtil.copyProperties(dto, loanHomeAppealCompleteDto); + loanHomevisitAppealFeign.complete(loanHomeAppealCompleteDto); + return rb.success(); } public ResultBean rejectCreditInfo(HomeAppealTaskQuery query) { - return null; + ResultBean rb = ResultBean.fireFail(); + LoanHomeAppealTaskQuery taskQuery = new LoanHomeAppealTaskQuery(); + BeanUtil.copyProperties(query, taskQuery); + ResultBean resultBean = loanHomevisitAppealFeign.reject(taskQuery); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); } public ResultBean recallCreditInfo(HomeAppealTaskQuery query) { - return null; + ResultBean rb = ResultBean.fireFail(); + LoanHomeAppealTaskQuery taskQuery = new LoanHomeAppealTaskQuery(); + BeanUtil.copyProperties(query, taskQuery); + ResultBean resultBean = loanHomevisitAppealFeign.revokeProcess(taskQuery); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); } public ResultBean stopCreditInfo(HomeAppealTaskQuery query) { - return null; + ResultBean rb = ResultBean.fireFail(); + LoanHomeAppealTaskQuery taskQuery = new LoanHomeAppealTaskQuery(); + BeanUtil.copyProperties(query, taskQuery); + ResultBean resultBean = loanHomevisitAppealFeign.breakProcess(taskQuery); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); } public ResultBean getFlowOperateTitle(HomeAppealQuery query) { - return null; + ResultBean rb = ResultBean.fireFail(); + //0 上一环节 1下一环节 + int next = query.getNext(); + LoanHomeAppealNodeQuery getNodeQuery = new LoanHomeAppealNodeQuery(); + BeanUtil.copyProperties(query, getNodeQuery); + String data = ""; + if (next == 0) { + ResultBean> previousNodesForReject = loanHomevisitAppealFeign.getPreviousNodesForReject(getNodeQuery); + if (previousNodesForReject.getSuccess()) { + previousNodesForReject.getData().removeAll(Collections.singleton(null)); + data = previousNodesForReject.getData().get(0).getName(); + } else { + return rb.setMsg(previousNodesForReject.getMsg()); + } + } else if (next == 1) { + ResultBean> nextNodesForSubmit = loanHomevisitAppealFeign.getNextNodesForSubmit(getNodeQuery); + if (nextNodesForSubmit.getSuccess()) { + nextNodesForSubmit.getData().removeAll(Collections.singleton(null)); + data = nextNodesForSubmit.getData().get(0).getName(); + } else { + return rb.setMsg(nextNodesForSubmit.getMsg()); + } + } else { + return rb.setMsg("参数错误:next"); + } + return rb.success().setData(data); } } \ No newline at end of file From 39a373c9d4b7cc322ae494f6820f43164dd3a481 Mon Sep 17 00:00:00 2001 From: God <10745413@qq.com> Date: Fri, 18 Aug 2023 14:32:50 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- anrui-fin/anrui-fin-biz/src/main/resources/application-pro.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anrui-fin/anrui-fin-biz/src/main/resources/application-pro.yml b/anrui-fin/anrui-fin-biz/src/main/resources/application-pro.yml index e8850d0df4..66adcf08e9 100644 --- a/anrui-fin/anrui-fin-biz/src/main/resources/application-pro.yml +++ b/anrui-fin/anrui-fin-biz/src/main/resources/application-pro.yml @@ -32,6 +32,6 @@ kingdee: #金蝶的系统的链接账号 url等信息 userName: 信息部 #登录金蝶的账户信息 2022010测试的 password: ywzx0750 #登录金蝶的账户信息 userName_administrator: Administrator #登录金蝶的账户信息 2022010测试 - password_administrator: hebei@anrui202108. #登录金蝶的账户信息 2022010测试 + password_administrator: hebei@anrui202308. #登录金蝶的账户信息 2022010测试 lcid: 2052 #登录金蝶的账户信息 url: http://121.36.43.55 #金蝶财务系统ip地址 \ No newline at end of file From 7bb8425ab7f0739bcf27e1f0af226dcdff85b04f Mon Sep 17 00:00:00 2001 From: dimengzhe Date: Fri, 18 Aug 2023 14:48:33 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinCollectionConfirmationService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java index c14475efe5..890d985895 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java @@ -2677,6 +2677,8 @@ public class FinCollectionConfirmationService extends MybatisBaseService Date: Fri, 18 Aug 2023 16:02:53 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E6=94=B6=E6=AC=BE=E5=8D=95=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E9=87=91=E8=9D=B6=E7=8B=AC=E7=AB=8B=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinCollectionConfirmationService.java | 422 +++++------------- .../FinSelectedReceivablesDetailedMapper.java | 32 +- .../FinSelectedReceivablesDetailedMapper.xml | 56 +-- ...FinSelectedReceivablesDetailedService.java | 98 ++-- 4 files changed, 174 insertions(+), 434 deletions(-) diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java index 890d985895..0890e857fa 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java @@ -1073,7 +1073,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService getPaymentDetailsList111(PagerQuery pagerQuery) { + /* public IPage getPaymentDetailsList111(PagerQuery pagerQuery) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); AppFinSelectedReceivablesPaymentDetailsQuery params = pagerQuery.getParams(); String orgPath = pagerQuery.getParams().getOrgPath(); @@ -1186,7 +1186,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService finSelectedReceivablesDetailedVos1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1_1(sid, 1, "车款", "1"); + List finSelectedReceivablesDetailedVos1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1_1(sid, "车款", "1"); finSelectedReceivablesDetailedVos1.removeAll(Collections.singleton(null)); //全款推送车款(应收未收中为首付款的) - List finSelectedReceivablesDetailedVos1_1_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1_1(sid, 1, "首付款及费用", "1"); + List finSelectedReceivablesDetailedVos1_1_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1_1(sid, "首付款及费用", "1"); finSelectedReceivablesDetailedVos1_1_1.removeAll(Collections.singleton(null)); //推送全款订金 - List finSelectedReceivablesDetailedVos2 = finSelectedReceivablesDetailedService.fetchByAuditState1_1_1(sid, 1, "订金", "1"); + List finSelectedReceivablesDetailedVos2 = finSelectedReceivablesDetailedService.fetchByAuditState1_1_1(sid, "订金", "1"); finSelectedReceivablesDetailedVos2.removeAll(Collections.singleton(null)); //贷款推送车款 - List finSelectedReceivablesDetailedVos1_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, 1, "车款", "2"); + List finSelectedReceivablesDetailedVos1_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, "车款", "2"); finSelectedReceivablesDetailedVos1_1.removeAll(Collections.singleton(null)); //贷款推送订金 - List finSelectedReceivablesDetailedVos2_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, 1, "订金", "2"); + List finSelectedReceivablesDetailedVos2_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, "订金", "2"); finSelectedReceivablesDetailedVos2_1.removeAll(Collections.singleton(null)); //贷款推送车款(应收未收中为首付款的) - List finSelectedReceivablesDetailedVos1_1_2 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, 1, "首付款及费用", "2"); + List finSelectedReceivablesDetailedVos1_1_2 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, "首付款及费用", "2"); finSelectedReceivablesDetailedVos1_1_2.removeAll(Collections.singleton(null)); int carSize = 0; //全款推送车款 @@ -1499,154 +1509,86 @@ public class FinCollectionConfirmationService extends MybatisBaseService dtoList = new ArrayList<>(); //查询该申请下的所有待审核的款项明细 BigDecimal subscriptionMoneyAll = new BigDecimal("0"); List finSelectedReceivablesDetailedVos = finSelectedReceivablesDetailedService.fetchByAuditState(sid, 1); if (finSelectedReceivablesDetailedVos.size() > 0) { - finSelectedReceivablesDetailedVos.stream().forEach(v -> { - //已选款项明细sid - String selectSid = v.getSid(); - //应收未收款项明细sid - String receivablesSid = v.getReceivablesSid(); - FinUncollectedReceivablesDetailed finUncollectedReceivablesDetailed = finUncollectedReceivablesDetailedService.fetchBySid(receivablesSid); - if (v.getSubscribedOf() == 0) { - //更新认款状态 - finUncollectedReceivablesDetailed.setSubscriptionState(finUncollectedReceivablesDetailed.getCurrentReceivableMoney().compareTo(BigDecimal.ZERO) == 0 ? 3 : 2); - finUncollectedReceivablesDetailedService.updateById(finUncollectedReceivablesDetailed); - } - FinSelectedReceivablesDetailed finSelectedReceivablesDetailed = finSelectedReceivablesDetailedService.fetchBySid(selectSid); - //更新已选款项明细的审核状态1待审核/2已驳回/3已审核 - finSelectedReceivablesDetailed.setAuditState(3); - //更新审核时间 - finSelectedReceivablesDetailed.setAuditDate(DateUtil.today()); - finSelectedReceivablesDetailedService.updateById(finSelectedReceivablesDetailed); - //ToDo:查询是否符合待出库的条件 - //该合同编号下的该车架号的所有认款金额 - List voList = finSelectedReceivablesDetailedService.selectListByVin(v.getContractNo(), finUncollectedReceivablesDetailed.getBusVinSid(), 3); - BigDecimal bigDecimalVinAll = voList.stream().map(FinSelectedReceivablesDetailedVo::getSubscriptionMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); - //查询该合同编号下的销售订单的单车成交价 - ResultBean commonContractResultBean = commonContractFeign.selectByNo(v.getContractNo()); - if (commonContractResultBean.getSuccess()) { - CommonContract commonContract = commonContractResultBean.getData(); - if (commonContract != null) { - ResultBean orderDetails = busSalesOrderFeign.getSaleOrderDetails(commonContract.getBusSid()); - AppOrderDetailsVo vo = orderDetails.getData(); - if (vo != null) { - AppOrderPriceInfoVo priceInfoVo = vo.getPriceInfo(); - AppOrderDepositInfoVo depositInfo = vo.getDepositInfo(); - if (depositInfo != null) { - if ("02".equals(depositInfo.getDepositTypeKey())) {//订金结转 - BigDecimal decimalDeposit = BigDecimal.ZERO; - if (StringUtils.isNotBlank(depositInfo.getDepositTotal())) { - decimalDeposit = new BigDecimal(depositInfo.getDepositTotal()); - } - if (StringUtils.isNotBlank(depositInfo.getMakeUpDeposit())) { - decimalDeposit = decimalDeposit.subtract(new BigDecimal(depositInfo.getMakeUpDeposit())); - } - decimalDeposit = decimalDeposit.divide(new BigDecimal(priceInfoVo.getNumber()), BigDecimal.ROUND_CEILING); - bigDecimalVinAll = bigDecimalVinAll.add(decimalDeposit); - } - } - //单台整体成交价 - BigDecimal singleFinalPrice = new BigDecimal(priceInfoVo.getSingleFinalPrice()); - BigDecimal leftAll = BigDecimal.ZERO; - BigDecimal rightAll = BigDecimal.ZERO; - if ("2".equals(vo.getFinancePlan()) || "2".equals(vo.getPayTypeKey())) { - //根据销售订单sid查询金融方案 - ResultBean solutionsDetailsVoResultBean = loanSolutionsFeign.selectDetailss(commonContract.getBusSid()); - SolutionsDetailsVo solutionsDetailsVo = solutionsDetailsVoResultBean.getData(); - if (solutionsDetailsVo != null) { - if (StringUtils.isNotBlank(solutionsDetailsVo.getTypeKey())) { - if ("02".equals(solutionsDetailsVo.getTypeKey())) { - //外部金融:成交价 = 订金+车款+厂家贴息-服务费 - leftAll = leftAll.add(singleFinalPrice); - if (StringUtils.isNotBlank(solutionsDetailsVo.getFactoryDiscount())) { - leftAll = leftAll.subtract(new BigDecimal(solutionsDetailsVo.getFactoryDiscount())); - } - if (StringUtils.isNotBlank(solutionsDetailsVo.getServiceAmount())) { - leftAll = leftAll.add(new BigDecimal(solutionsDetailsVo.getServiceAmount())); - } - rightAll = rightAll.add(bigDecimalVinAll); - } else { - //自营非担保: 实收订金 = 首付款及费用+订金 - if (StringUtils.isNotBlank(solutionsDetailsVo.getRealTotal())) { - leftAll = leftAll.add(new BigDecimal(solutionsDetailsVo.getRealTotal())); - } - rightAll = rightAll.add(bigDecimalVinAll); - } - } else {//担保贷款: 实收订金 = 首付款及费用+订金 - if (StringUtils.isNotBlank(solutionsDetailsVo.getRealTotal())) { - leftAll = leftAll.add(new BigDecimal(solutionsDetailsVo.getRealTotal())); - } - rightAll = rightAll.add(bigDecimalVinAll); - } - } else { - // 成交价 = 车款+订金 - leftAll = leftAll.add(singleFinalPrice); - rightAll = rightAll.add(bigDecimalVinAll); - } - } else { - // 成交价 = 车款+订金 - leftAll = leftAll.add(singleFinalPrice); - rightAll = rightAll.add(bigDecimalVinAll); - } - //根据busVinSid查询待出库中是否存在该数据 - ResultBean busDeliveredResultBean = busDeliveredFeign.selectByBusVinSid(finUncollectedReceivablesDetailed.getBusVinSid()); - if (busDeliveredResultBean.getData() == null) { - if (leftAll.compareTo(rightAll) <= 0) {//推送待出库 - BusDeliveredDto busDeliveredDto = new BusDeliveredDto(); - busDeliveredDto.setSubscriptionKey(VehicleStateTempOrLast.PaymentEnum.PAY_MODELS.getCode()); - busDeliveredDto.setSubscription(VehicleStateTempOrLast.PaymentEnum.PAY_MODELS.getRemarks()); - busDeliveredDto.setPaymentMethodKey(vo.getPayTypeKey()); - busDeliveredDto.setPaymentMethod(vo.getPayType()); - busDeliveredDto.setContractNo(v.getContractNo()); - busDeliveredDto.setName(v.getCustomerName()); - busDeliveredDto.setVinNo(v.getVIN()); - busDeliveredDto.setMobile(v.getCustomerPhone()); - busDeliveredDto.setPrice(priceInfoVo.getSingleFinalPrice()); - busDeliveredDto.setCreateBySid(confirmation.getStaffUserSid()); - SubmitVo intermediary1 = vo.getIntermediary1(); - if (intermediary1 != null) { - busDeliveredDto.setDistributorName(intermediary1.getIntermediaryName()); - busDeliveredDto.setDistributorPrice(intermediary1.getAgencyFee()); - } - SubmitVo intermediary2 = vo.getIntermediary2(); - if (intermediary2 != null) { - busDeliveredDto.setDistributorNameTwo(intermediary2.getIntermediaryName()); - busDeliveredDto.setDistributorPriceTwo(intermediary2.getAgencyFee()); - } - busDeliveredDto.setSingleCarDiscountPrice(priceInfoVo.getSingleCarDiscountPrice()); - //根据客户sid查询客户的身份证号 - AppOrderModelInfoVo appOrderModelInfoVo = vo.getModelInfo(); - busDeliveredDto.setModelName(appOrderModelInfoVo.getModelName()); - busDeliveredDto.setUseOrgSid(confirmation.getUseOrgSid()); - ResultBean sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(confirmation.getUseOrgSid()); - if (sysOrganizationVoResultBean.getData() != null) { - busDeliveredDto.setUseOrgName(sysOrganizationVoResultBean.getData().getName()); - } - busDeliveredDto.setBusVinSid(finUncollectedReceivablesDetailed.getBusVinSid()); - ResultBean resultBean1 = busDeliveredFeign.save(busDeliveredDto); - } - } - - } + if (confirmation.getPushMessgae() == 1) {//简易订单定金 + finSelectedReceivablesDetailedVos.stream().forEach(v -> { + //已选款项明细sid + String selectSid = v.getSid(); + FinSelectedReceivablesDetailed finSelectedReceivablesDetailed = finSelectedReceivablesDetailedService.fetchBySid(selectSid); + //更新已选款项明细的审核状态1待审核/2已驳回/3已审核 + finSelectedReceivablesDetailed.setAuditState(3); + //更新审核时间 + finSelectedReceivablesDetailed.setAuditDate(DateUtil.today()); + finSelectedReceivablesDetailedService.updateById(finSelectedReceivablesDetailed); + }); + } else { + finSelectedReceivablesDetailedVos.stream().forEach(v -> { + //已选款项明细sid + String selectSid = v.getSid(); + //应收未收款项明细sid + String receivablesSid = v.getReceivablesSid(); + FinUncollectedReceivablesDetailed finUncollectedReceivablesDetailed = finUncollectedReceivablesDetailedService.fetchBySid(receivablesSid); + if (v.getSubscribedOf() == 0) { + //更新认款状态 + finUncollectedReceivablesDetailed.setSubscriptionState(finUncollectedReceivablesDetailed.getCurrentReceivableMoney().compareTo(BigDecimal.ZERO) == 0 ? 3 : 2); + finUncollectedReceivablesDetailedService.updateById(finUncollectedReceivablesDetailed); } - } - - }); + FinSelectedReceivablesDetailed finSelectedReceivablesDetailed = finSelectedReceivablesDetailedService.fetchBySid(selectSid); + //更新已选款项明细的审核状态1待审核/2已驳回/3已审核 + finSelectedReceivablesDetailed.setAuditState(3); + //更新审核时间 + finSelectedReceivablesDetailed.setAuditDate(DateUtil.today()); + finSelectedReceivablesDetailedService.updateById(finSelectedReceivablesDetailed); + //ToDo:查询是否符合待出库的条件 + //该合同编号下的该车架号的所有认款金额 + List voList = finSelectedReceivablesDetailedService.selectListByVin(v.getContractNo(), finUncollectedReceivablesDetailed.getBusVinSid(), 3); + BigDecimal bigDecimalVinAll = voList.stream().map(FinSelectedReceivablesDetailedVo::getSubscriptionMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); + List unList = finUncollectedReceivablesDetailedService.selectListByBusVinSid(finUncollectedReceivablesDetailed.getBusVinSid()); + BigDecimal unDecimalVinAll = unList.stream().map(FinUncollectedReceivablesDetailed::getReveivableMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); + //查询该合同编号下的销售订单的单车成交价 + BigDecimal leftAll = unDecimalVinAll; + BigDecimal rightAll = bigDecimalVinAll; + if (leftAll.compareTo(rightAll) <= 0) { + BaseVehicleStateDto baseVehicleStateDto = new BaseVehicleStateDto(); + baseVehicleStateDto.setOperateType(BaseVehicleStateEnum.OperateTypeEnum.FIN_RQ.getTypeKey()); + baseVehicleStateDto.setBusSid(finUncollectedReceivablesDetailed.getBusVinSid()); + dtoList.add(baseVehicleStateDto); + } + }); + } //查询该申请已认款金额总数 subscriptionMoneyAll = finSelectedReceivablesDetailedVos.stream().map(FinSelectedReceivablesDetailedVo::getSubscriptionMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); } + //==============================修改车辆的持久状态组装数据 + 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(() -> { + if (!dtoList.isEmpty()) { + ResultBean busVehicleStateResultBean = baseVehicleStateFeign.saveOrUpdate(dtoList); + } + }); + } catch (Exception e) { + e.printStackTrace(); + } //查询该申请所有的款项明细 finSelectedReceivablesDetailedVos = finSelectedReceivablesDetailedService.fetchByAuditState(sid, 3); + confirmation = fetchBySid(sid); //与收款金额作比较:更新认款状态 1未认款/2部分认款/3已认款 confirmation.setPaymentState(confirmation.getCollectionMoney().compareTo(subscriptionMoneyAll) <= 0 ? 3 : subscriptionMoneyAll.compareTo(BigDecimal.ZERO) == 0 ? 1 : 2); //更新收款申请的余额以及审核状态 BigDecimal balanceBigDecimal = confirmation.getCollectionMoney().subtract(subscriptionMoneyAll); confirmation.setBalance(balanceBigDecimal); - confirmation.setAuditState(3); //查询当前登录人信息并更新审核人和审核时间 ResultBean userVoResultBean = sysUserFeign.fetchBySid(userSid); if (userVoResultBean.getData() != null) { @@ -1660,25 +1602,18 @@ public class FinCollectionConfirmationService extends MybatisBaseService finSelectedReceivablesDetailedVos1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1_1(sid, 1, "车款", "1"); + List finSelectedReceivablesDetailedVos1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1_1(sid, "车款", "1"); finSelectedReceivablesDetailedVos1.removeAll(Collections.singleton(null)); //全款推送车款(应收未收中为首付款的) - List finSelectedReceivablesDetailedVos1_1_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1_1(sid, 1, "首付款及费用", "1"); + List finSelectedReceivablesDetailedVos1_1_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1_1(sid, "首付款及费用", "1"); finSelectedReceivablesDetailedVos1_1_1.removeAll(Collections.singleton(null)); //推送全款订金 - List finSelectedReceivablesDetailedVos2 = finSelectedReceivablesDetailedService.fetchByAuditState1_1_1(sid, 1, "订金", "1"); + List finSelectedReceivablesDetailedVos2 = finSelectedReceivablesDetailedService.fetchByAuditState1_1_1(sid, "订金", "1"); finSelectedReceivablesDetailedVos2.removeAll(Collections.singleton(null)); //贷款推送车款 - List finSelectedReceivablesDetailedVos1_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, 1, "车款", "2"); + List finSelectedReceivablesDetailedVos1_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, "车款", "2"); finSelectedReceivablesDetailedVos1_1.removeAll(Collections.singleton(null)); //贷款推送订金 - List finSelectedReceivablesDetailedVos2_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, 1, "订金", "2"); + List finSelectedReceivablesDetailedVos2_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, "订金", "2"); finSelectedReceivablesDetailedVos2_1.removeAll(Collections.singleton(null)); //贷款推送车款(应收未收中为首付款的) - List finSelectedReceivablesDetailedVos1_1_2 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, 1, "首付款及费用", "2"); + List finSelectedReceivablesDetailedVos1_1_2 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, "首付款及费用", "2"); finSelectedReceivablesDetailedVos1_1_2.removeAll(Collections.singleton(null)); int carSize = 0; //全款推送车款 @@ -1857,95 +1792,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService dtoList = new ArrayList<>(); - //查询该申请下的所有待审核的款项明细 - BigDecimal subscriptionMoneyAll = new BigDecimal("0"); - List finSelectedReceivablesDetailedVos = finSelectedReceivablesDetailedService.fetchByAuditState(sid, 1); - if (finSelectedReceivablesDetailedVos.size() > 0) { - if (confirmation.getPushMessgae() == 1) {//简易订单定金 - finSelectedReceivablesDetailedVos.stream().forEach(v -> { - //已选款项明细sid - String selectSid = v.getSid(); - FinSelectedReceivablesDetailed finSelectedReceivablesDetailed = finSelectedReceivablesDetailedService.fetchBySid(selectSid); - //更新已选款项明细的审核状态1待审核/2已驳回/3已审核 - finSelectedReceivablesDetailed.setAuditState(3); - //更新审核时间 - finSelectedReceivablesDetailed.setAuditDate(DateUtil.today()); - finSelectedReceivablesDetailedService.updateById(finSelectedReceivablesDetailed); - }); - } else { - finSelectedReceivablesDetailedVos.stream().forEach(v -> { - //已选款项明细sid - String selectSid = v.getSid(); - //应收未收款项明细sid - String receivablesSid = v.getReceivablesSid(); - FinUncollectedReceivablesDetailed finUncollectedReceivablesDetailed = finUncollectedReceivablesDetailedService.fetchBySid(receivablesSid); - if (v.getSubscribedOf() == 0) { - //更新认款状态 - finUncollectedReceivablesDetailed.setSubscriptionState(finUncollectedReceivablesDetailed.getCurrentReceivableMoney().compareTo(BigDecimal.ZERO) == 0 ? 3 : 2); - finUncollectedReceivablesDetailedService.updateById(finUncollectedReceivablesDetailed); - } - FinSelectedReceivablesDetailed finSelectedReceivablesDetailed = finSelectedReceivablesDetailedService.fetchBySid(selectSid); - //更新已选款项明细的审核状态1待审核/2已驳回/3已审核 - finSelectedReceivablesDetailed.setAuditState(3); - //更新审核时间 - finSelectedReceivablesDetailed.setAuditDate(DateUtil.today()); - finSelectedReceivablesDetailedService.updateById(finSelectedReceivablesDetailed); - //ToDo:查询是否符合待出库的条件 - //该合同编号下的该车架号的所有认款金额 - List voList = finSelectedReceivablesDetailedService.selectListByVin(v.getContractNo(), finUncollectedReceivablesDetailed.getBusVinSid(), 3); - BigDecimal bigDecimalVinAll = voList.stream().map(FinSelectedReceivablesDetailedVo::getSubscriptionMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); - List unList = finUncollectedReceivablesDetailedService.selectListByBusVinSid(finUncollectedReceivablesDetailed.getBusVinSid()); - BigDecimal unDecimalVinAll = unList.stream().map(FinUncollectedReceivablesDetailed::getReveivableMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); - //查询该合同编号下的销售订单的单车成交价 - BigDecimal leftAll = unDecimalVinAll; - BigDecimal rightAll = bigDecimalVinAll; - if (leftAll.compareTo(rightAll) <= 0) { - BaseVehicleStateDto baseVehicleStateDto = new BaseVehicleStateDto(); - baseVehicleStateDto.setOperateType(BaseVehicleStateEnum.OperateTypeEnum.FIN_RQ.getTypeKey()); - baseVehicleStateDto.setBusSid(finUncollectedReceivablesDetailed.getBusVinSid()); - dtoList.add(baseVehicleStateDto); - } - }); - } - //查询该申请已认款金额总数 - subscriptionMoneyAll = finSelectedReceivablesDetailedVos.stream().map(FinSelectedReceivablesDetailedVo::getSubscriptionMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); - } - //==============================修改车辆的持久状态组装数据 - 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(() -> { - if (!dtoList.isEmpty()) { - ResultBean busVehicleStateResultBean = baseVehicleStateFeign.saveOrUpdate(dtoList); - } - }); - } catch (Exception e) { - e.printStackTrace(); - } - //查询该申请所有的款项明细 - finSelectedReceivablesDetailedVos = finSelectedReceivablesDetailedService.fetchByAuditState(sid, 3); - confirmation = fetchBySid(sid); - //与收款金额作比较:更新认款状态 1未认款/2部分认款/3已认款 - confirmation.setPaymentState(confirmation.getCollectionMoney().compareTo(subscriptionMoneyAll) <= 0 ? 3 : subscriptionMoneyAll.compareTo(BigDecimal.ZERO) == 0 ? 1 : 2); - //更新收款申请的余额以及审核状态 - BigDecimal balanceBigDecimal = confirmation.getCollectionMoney().subtract(subscriptionMoneyAll); - confirmation.setBalance(balanceBigDecimal); - //查询当前登录人信息并更新审核人和审核时间 - ResultBean userVoResultBean = sysUserFeign.fetchBySid(userSid); - if (userVoResultBean.getData() != null) { - confirmation.setConfirmName(userVoResultBean.getData().getName()); - } - confirmation.setConfirmDate(DateUtil.today()); - confirmation.setConfirmNameSid(userSid); - baseMapper.updateById(confirmation); - //删除临时表的数据 - ResultBean deleteResult = baseVehicleTempstateFeign.delByBusSid(sid); - return rb.success().setMsg("款项确认成功"); + return rb.success(); } //组装客户推送 @@ -2011,8 +1858,6 @@ public class FinCollectionConfirmationService extends MybatisBaseService customerResultBean = crmCustomerTempFeign.checkCustomerOrUpdate(customerQuery); -// log.info("推送客户{}", customerResultBean); //根据客户编码查询金蝶中是否存在该客户 Boolean aBoolean = finKingDeeService.customerExistState(customerQuery.getCustomerNo()).getData(); if (!aBoolean) {//不存在则创建 @@ -2040,7 +1885,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService voListv = - finSelectedReceivablesDetailedService.selectDetailsList(sid, 1, "车款"); + finSelectedReceivablesDetailedService.selectDetailsList(sid, "车款"); finSelectedReceivablesDetailedVos1.removeAll(Collections.singleton(null)); List fEntityList = new ArrayList<>(); for (int i = 0; i < finSelectedReceivablesDetailedVos1.size(); i++) { @@ -2053,7 +1898,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService vinListVo = finSelectedReceivablesDetailedService.selectVinListVo_1(sid, 1, "车款", contractNo); + List vinListVo = finSelectedReceivablesDetailedService.selectVinListVo_1(sid, "车款", contractNo); vinListVo.removeAll(Collections.singleton(null)); if (!vinListVo.isEmpty()) { for (FinSelectedReceivablesDetailedVo vv : vinListVo) { @@ -2077,7 +1922,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService voListv = - finSelectedReceivablesDetailedService.selectDetailsList(sid, 1, "首付款及费用"); + finSelectedReceivablesDetailedService.selectDetailsList(sid, "首付款及费用"); finSelectedReceivablesDetailedVos1_1_1.removeAll(Collections.singleton(null)); List fEntityList = new ArrayList<>(); for (int i = 0; i < finSelectedReceivablesDetailedVos1_1_1.size(); i++) { @@ -2138,7 +1983,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService vinListVo = finSelectedReceivablesDetailedService.selectVinListVo_1(sid, 1, "首付款及费用", contractNo); + List vinListVo = finSelectedReceivablesDetailedService.selectVinListVo_1(sid, "首付款及费用", contractNo); vinListVo.removeAll(Collections.singleton(null)); if (!vinListVo.isEmpty()) { for (FinSelectedReceivablesDetailedVo vv : vinListVo) { @@ -2162,7 +2007,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService voListv = - finSelectedReceivablesDetailedService.selectDetailsList(sid, 1, "订金"); + finSelectedReceivablesDetailedService.selectDetailsList(sid, "订金"); finSelectedReceivablesDetailedVos2.removeAll(Collections.singleton(null)); List fEntityList = new ArrayList<>(); for (int i = 0; i < finSelectedReceivablesDetailedVos2.size(); i++) { @@ -2222,7 +2067,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService(); //查询该收款单已选款项中该合同号的所有车架号不为空的明细 String contractNo = v.getContractNo(); - List vinListVo = finSelectedReceivablesDetailedService.selectVinListVo_1(sid, 1, "订金", contractNo); + List vinListVo = finSelectedReceivablesDetailedService.selectVinListVo_1(sid, "订金", contractNo); vinListVo.removeAll(Collections.singleton(null)); if (!vinListVo.isEmpty()) { for (FinSelectedReceivablesDetailedVo vv : vinListVo) { @@ -2245,7 +2090,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService 30 ? customerNoPrefix.substring(0, 30) : customerNoPrefix; } - - public ResultBean saveFinConfirmOld(FinConfirmDto dto) { - ResultBean rb = ResultBean.fireFail(); - FinCollectionConfirmation confirmation = new FinCollectionConfirmation(); - BeanUtil.copyProperties(dto, confirmation, "sid"); - baseMapper.insert(confirmation); - List finSelectList = dto.getFinSelectList(); - finSelectList.removeAll(Collections.singleton(null)); - for (FinSelectDto d : finSelectList) { - FinSelectedReceivablesDetailed finSelectedReceivablesDetailed = new FinSelectedReceivablesDetailed(); - BeanUtil.copyProperties(d, finSelectedReceivablesDetailed, "sid"); - finSelectedReceivablesDetailed.setCollSid(confirmation.getSid()); - finSelectedReceivablesDetailedService.insert(finSelectedReceivablesDetailed); - } - if (StringUtils.isNotBlank(confirmation.getPaymentVoucherUrl())) { - //添加进附件表 - List stringList = Arrays.asList(confirmation.getPaymentVoucherUrl().split(",")); - //附件保存:打款凭证附件 - stringList.stream().forEach(v -> { - CommonAppendixDto commonAppendixDto = new CommonAppendixDto(); - commonAppendixDto.setFilePath(v); - commonAppendixDto.setFileName(CommonAttachTypeEnum.PAYMENT_VOUCHER.getMark()); - commonAppendixDto.setLinkSid(confirmation.getSid()); - commonAppendixDto.setCreateBySid(confirmation.getCreateBySid()); - commonAppendixDto.setAttachType(CommonAttachTypeEnum.PAYMENT_VOUCHER.getAttachType()); - commonAppendixFeign.save(commonAppendixDto); - }); - } - return rb.success(); - } - public ResultBean saveFinConfirm(FinConfirmDto dto) { ResultBean rb = ResultBean.fireFail(); FinCollectionConfirmation confirmation = new FinCollectionConfirmation(); @@ -2671,17 +2485,20 @@ public class FinCollectionConfirmationService extends MybatisBaseService selectCollectionMoney(String contractNo) { @@ -2690,6 +2507,13 @@ public class FinCollectionConfirmationService extends MybatisBaseService getPaymentDetailsList(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw, @Param("name") String name); - List getPaymentList(@Param(Constants.WRAPPER) QueryWrapper qw, @Param("name") String name); +// List getPaymentList(@Param(Constants.WRAPPER) QueryWrapper qw, @Param("name") String name); @Select("select * from fin_selected_receivables_detailed where collSid = #{sid} and auditState = #{auditState}") List fetchByAuditState(@Param("sid") String sid, @Param("auditState") Integer auditState); - @Update("update fin_selected_receivables_detailed set auditState = 3 where sid = #{sid}") - void cashierConfirm(String sid); - List selectGroupConAndRecAndPay(); List selectDetailedGroupConAndRecAndPay(); - @Update("update fin_selected_receivables_detailed set auditDate = NOW() ,auditState = #{auditState} where sid = #{sid1}") - void updateAuditDateBySid(@Param("sid1") String sid1, @Param("auditState") String auditState); - List selectByCollSid(@Param("collectionBillSid") String collectionBillSid); List selByContractNo(String contractNo); - List selectListByAuditState(@Param("i") int i, @Param("userSid") String userSid, @Param("useOrgSid") String useOrgSid); List selectListByVin(@Param("contractNo") String contractNo, @Param("busVinSid") String busVinSid, @Param("state") int state); List getList(@Param("list") List sidsList); - List fetchByAuditState1(@Param("sid") String sid, @Param("state") int i, @Param("type") String type, @Param("payTypeKey") String payTypeKey); - /** * 根据合同编号分组查询客户 * * @param sid 收款单sid - * @param i 审核状态 * @param type 应收项目名称 * @param payTypeKey 销售类型 * @return */ - List fetchByAuditState1_1_1(@Param("sid") String sid, @Param("state") int i, @Param("type") String type, @Param("payTypeKey") String payTypeKey); + List fetchByAuditState1_1_1(@Param("sid") String sid, @Param("type") String type, @Param("payTypeKey") String payTypeKey); - List fetchByAuditState1_1(@Param("sid") String sid, @Param("state") int i, @Param("type") String type, @Param("payTypeKey") String payTypeKey); + List fetchByAuditState1_1(@Param("sid") String sid, @Param("type") String type, @Param("payTypeKey") String payTypeKey); - List selectCustomerList(@Param("sid") String sid, @Param("state") int i, @Param("type") String type); +// List selectCustomerList(@Param("sid") String sid, @Param("state") int i, @Param("type") String type); - List selectDetailsList(@Param("sid") String sid, @Param("state") int i, @Param("type") String type); + List selectDetailsList(@Param("sid") String sid, @Param("type") String type); - List selectVinListVo(@Param("sid") String sid, @Param("state") int i, @Param("type") String type, @Param("customerName") String customerName, @Param("customerPhone") String customerPhone); - List selectVinListVo_1(@Param("sid") String sid, @Param("state") int i, @Param("type") String type, @Param("contractNo") String contractNo); + List selectVinListVo_1(@Param("sid") String sid, @Param("type") String type, @Param("contractNo") String contractNo); - FinSelectedReceivablesDetailedVo fetchByAuditStateV(@Param("sid") String sid, @Param("state") int i, @Param("type") String type, @Param("customerName") String customerName, @Param("customerPhone") String customerPhone); - FinSelectedReceivablesDetailedVo fetchByAuditStateV_1(@Param("sid") String sid, @Param("state") int i, @Param("type") String type, @Param("contractNo") String contractNo); + FinSelectedReceivablesDetailedVo fetchByAuditStateV_1(@Param("sid") String sid, @Param("type") String type, @Param("contractNo") String contractNo); @Select("select * from fin_selected_receivables_detailed where contractNo = #{contractNo}") List fetchByContractNo(String contractNo); @@ -150,12 +138,12 @@ public interface FinSelectedReceivablesDetailedMapper extends BaseMapper selectPageList(@Param(Constants.WRAPPER) QueryWrapper qw, @Param("name") String name); - IPage noOutVehRecPageList(IPage page, @Param(Constants.WRAPPER)QueryWrapper qw); + IPage noOutVehRecPageList(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); @Update("update fin_selected_receivables_detailed set balance = #{balance} where sid = #{busSid}") - void updateYeBySid(@Param("balance") String balance,@Param("busSid") String busSid); + void updateYeBySid(@Param("balance") String balance, @Param("busSid") String busSid); - List fetchJzMoneyByContractNoAndMainSid(@Param("ysCustNo") String ysCustNo,@Param("sid") String sid); + List fetchJzMoneyByContractNoAndMainSid(@Param("ysCustNo") String ysCustNo, @Param("sid") String sid); String selectBalanceByReceivedSid(String receivablesSid); diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.xml b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.xml index 13d204a462..a6500ccc8e 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.xml +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.xml @@ -84,7 +84,7 @@ order by furd.contractNo desc - + --> - - - - - select * from fin_selected_receivables_detailed where collSid = #{sid} - and auditState = #{state} - and receivablesName = #{type} - - - - -