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 06735cc141..28a16f49ab 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 @@ -4724,8 +4724,12 @@ public class FinCollectionConfirmationService extends MybatisBaseService list = new ArrayList<>(); List list2 = new ArrayList<>(); + List list3 = new ArrayList<>(); + List list4 = new ArrayList<>(); BigDecimal all = BigDecimal.ZERO;//赎回 BigDecimal all2 = BigDecimal.ZERO;//二次销售 + BigDecimal all3 = BigDecimal.ZERO;//亏损立案 + BigDecimal all4 = BigDecimal.ZERO;//亏损立案 BigDecimal otherMoney = BigDecimal.ZERO; String payType = ""; DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(finalConfirmation.getCollectionTypeKey(), "payVoucherType").getData(); @@ -5243,7 +5247,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService 0) { + Voucher.VoucherResultDetailDto voucherResultDetailDtoJf = new Voucher.VoucherResultDetailDto(); + if (StringUtils.isNotBlank(finalConfirmation.getCollectionBankNum())) { + voucherResultDetailDtoJf.setBankAccount(finalConfirmation.getCollectionBankNum()); + } + voucherResultDetailDtoJf.setSubjectNo(payType); + voucherResultDetailDtoJf.setSummary("收款" +finalConfirmation.getPayerName()+ "(" + collectionDate + ")"); + voucherResultDetailDtoJf.setDebit(String.valueOf(all3)); + list3.add(voucherResultDetailDtoJf); + } - if (!list.isEmpty()) { + if (all4.compareTo(BigDecimal.ZERO) > 0) { + Voucher.VoucherResultDetailDto voucherResultDetailDtoJf = new Voucher.VoucherResultDetailDto(); + if (StringUtils.isNotBlank(finalConfirmation.getCollectionBankNum())) { + voucherResultDetailDtoJf.setBankAccount(finalConfirmation.getCollectionBankNum()); + } + voucherResultDetailDtoJf.setSubjectNo(payType); + voucherResultDetailDtoJf.setSummary("收款" +finalConfirmation.getPayerName()+ "(" + collectionDate + ")"); + voucherResultDetailDtoJf.setDebit(String.valueOf(all3)); + list4.add(voucherResultDetailDtoJf); + } + + + if (!list.isEmpty()) {//赎回收款(风控状态赎回中以及交回推送) voucher.setResultDetails(list); finKingDeeFeignRest.saveVoucher(voucher); } - if (!list2.isEmpty()) { + if (!list2.isEmpty()) {//二次销售收款 voucher.setResultDetails(list2); finKingDeeFeignRest.saveVoucher(voucher); } - - } - - private List getAll(FinCollectionConfirmation finalConfirmation, FinSelectedReceivablesDetailedVo v, String collectionDate) { - List list = new ArrayList<>(); - FinUncollectedReceivablesDetailed finUncollectedReceivablesDetailed = finUncollectedReceivablesDetailedService.fetchBySid(v.getReceivablesSid()); - SysOrganizationVo deptVo = sysOrganizationFeign.fetchBySid(finalConfirmation.getCreateDeptSid()).getData(); - BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.details(finUncollectedReceivablesDetailed.getBusVinSid()).getData(); - String customerNumber = ""; - BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(busSalesOrderVehicle.getSalesOrderSid()).getData(); - if (salesOrder != null && busSalesOrderVehicle != null) { - //判断财务系统是否有客户 - Boolean aBoolean = finKingDeeService.customerExistState(busSalesOrderVehicle.getTemporaryNo()).getData(); - String linkNo = ""; - BusSalesOrderBorrowerDetailsVo borrowerDetailsVo = busSalesOrderBorrowerFeign.fetchDetailsBySid(busSalesOrderVehicle.getBorrowerSid()).getData(); - if (!aBoolean) { - BdCustomer bdCustomer = new BdCustomer(); - bdCustomer.setFNumber(busSalesOrderVehicle.getTemporaryNo()); - bdCustomer.setFShortName(salesOrder.getContractNo()); - if (StringUtils.isNotBlank(salesOrder.getPurchaseSystemSid())) { - BasePurchaseSystemDetailsVo data = basePurchaseSystemFeign.fetchDetailsByDeptSid(salesOrder.getPurchaseSystemSid()).getData(); - bdCustomer.setTOrgIds(data.getOrgCode()); - } - bdCustomer.setTOrgIds(deptVo.getOrgCode()); - if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) { - String vinNo = busSalesOrderVehicle.getLinkNo(); - if (vinNo.length() > 8) { - linkNo = vinNo.substring(vinNo.length() - 8); - } else { - linkNo = busSalesOrderVehicle.getLinkNo(); - } - if (null != borrowerDetailsVo) { - bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + linkNo); - } - } else { - if (null != borrowerDetailsVo) { - bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + busSalesOrderVehicle.getTemporaryNo()); - } - } - ResultBean resultBean = finKingDeeFeignRest.draftBdCustomer(bdCustomer); - if (resultBean.getSuccess()) { - customerNumber = bdCustomer.getFNumber(); - } - } else { - customerNumber = busSalesOrderVehicle.getTemporaryNo(); - } - } - Voucher.VoucherResultDetailDto voucherResultDetailDtoJf = new Voucher.VoucherResultDetailDto(); - Voucher.VoucherResultDetailDto voucherResultDetailDtoJf2 = new Voucher.VoucherResultDetailDto(); - //贷方 - Voucher.VoucherResultDetailDto voucherResultDetailDtoDf = new Voucher.VoucherResultDetailDto(); - Voucher.VoucherResultDetailDto voucherResultDetailDtoDf2 = new Voucher.VoucherResultDetailDto(); - Voucher.VoucherResultDetailDto voucherResultDetailDtoDf3 = new Voucher.VoucherResultDetailDto(); - String payType = ""; - DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(finalConfirmation.getCollectionTypeKey(), "payVoucherType").getData(); - if (null != dictCommonVo) { - SysMappingListInfoQuery query = new SysMappingListInfoQuery(); - query.setDictSid(dictCommonVo.getSid()); - List data = sysMappingFeign.selectMappingListInfo(query).getData(); - if (!data.isEmpty()) { - SysMappingInfoVo sysMappingInfoVo = data.get(0); - payType = sysMappingInfoVo.getMap_itemKey(); - } - } - //--收款-赎回款(yyyy-MM-dd) - BigDecimal all = new BigDecimal(v.getSubscriptionMoney()); - if (all.compareTo(BigDecimal.ZERO) != 0) { - voucherResultDetailDtoJf.setSummary("收款-赎回款" + "(" + collectionDate + ")"); - voucherResultDetailDtoJf.setSubjectNo(payType); - voucherResultDetailDtoJf.setBankAccount(finalConfirmation.getCollectionBankNum()); - voucherResultDetailDtoJf.setDebit(all.toString()); - list.add(voucherResultDetailDtoJf); + if(!list3.isEmpty()){//诉讼后法院认款 + voucher.setResultDetails(list3); + finKingDeeFeignRest.saveVoucher(voucher); } - //-----出纳收款确认后-资金占用费 - AlrepaidAndArrVo alrepaidAndArrVo = loanRestoreReportApplyFeign.getAlrepaidAndArr2(finUncollectedReceivablesDetailed.getBusVinSid()).getData(); - BigDecimal zjzyfMoney = BigDecimal.ZERO; - String zjzyf = alrepaidAndArrVo.getWheFundOccMoney(); - zjzyfMoney = new BigDecimal(StringUtils.isBlank(zjzyf) ? "0" : zjzyf); - if (zjzyfMoney.compareTo(BigDecimal.ZERO) != 0) { - voucherResultDetailDtoDf.setSummary("收款-赎回款"); - voucherResultDetailDtoDf.setSubjectNo("1201.02.03"); - //核算部门 - voucherResultDetailDtoDf.setDimensionDept(deptVo.getOrgCode()); - //核算客户 - voucherResultDetailDtoDf.setDimensionCustom(customerNumber); - voucherResultDetailDtoDf.setCredit(zjzyfMoney.toString()); - list.add(voucherResultDetailDtoDf); - voucherResultDetailDtoJf2.setSummary("资金占用费转收入"); - voucherResultDetailDtoJf2.setSubjectNo("2191.05.00"); - //核算部门 - voucherResultDetailDtoJf2.setDimensionDept(deptVo.getOrgCode()); - //核算客户 - voucherResultDetailDtoJf2.setDimensionCustom(customerNumber); - voucherResultDetailDtoJf2.setCredit(zjzyfMoney.toString()); - list.add(voucherResultDetailDtoJf2); - voucherResultDetailDtoDf3.setSummary("资金占用费转收入"); - voucherResultDetailDtoDf3.setSubjectNo("6002.01.17"); - //核算部门 - voucherResultDetailDtoDf3.setDimensionDept(deptVo.getOrgCode()); - //核算客户 - voucherResultDetailDtoDf3.setDimensionCustom(customerNumber); - voucherResultDetailDtoDf3.setCredit(zjzyfMoney.toString()); - list.add(voucherResultDetailDtoDf3); - } - BigDecimal allM = BigDecimal.ZERO; - allM = all.subtract(zjzyfMoney); - if (allM.compareTo(BigDecimal.ZERO) > 0) { - voucherResultDetailDtoDf2.setSummary("收款-赎回款"); - voucherResultDetailDtoDf2.setSubjectNo("1201.03.01"); - //核算部门 - voucherResultDetailDtoDf2.setDimensionDept(deptVo.getOrgCode()); - //核算客户 - voucherResultDetailDtoDf2.setDimensionCustom(customerNumber); - voucherResultDetailDtoDf2.setCredit(allM.toString()); - list.add(voucherResultDetailDtoDf2); + + if(!list4.isEmpty()){//执行后法院认款 + voucher.setResultDetails(list4); + finKingDeeFeignRest.saveVoucher(voucher); } - return list; } //名义价其他费用推财务 diff --git a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitRebateDetailsVo.java b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitRebateDetailsVo.java index a0914cf1ca..318fea62cc 100644 --- a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitRebateDetailsVo.java +++ b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitRebateDetailsVo.java @@ -1,5 +1,6 @@ package com.yxt.anrui.reportcenter.api.carsSoldProfit; +import com.fasterxml.jackson.annotation.JsonProperty; import com.yxt.common.core.vo.Vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -14,7 +15,8 @@ public class CarsSoldProfitRebateDetailsVo implements Vo { private static final long serialVersionUID = -2059450221052046209L; @ApiModelProperty("政策方") - private String policy; + @JsonProperty("policy") + private String policySideValue; @ApiModelProperty("所属年月") private String yearAndMonth; @ApiModelProperty("返利类型") diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseexecuteapply/LoanCaseExecuteApplyRest.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseexecuteapply/LoanCaseExecuteApplyRest.java index f711cce277..3bf05f810f 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseexecuteapply/LoanCaseExecuteApplyRest.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseexecuteapply/LoanCaseExecuteApplyRest.java @@ -46,21 +46,8 @@ import com.yxt.anrui.riskcenter.api.loancaseexecuteapply.LoanCaseExecuteApplyDet import com.yxt.anrui.riskcenter.api.loancaseexecuteapply.LoanCaseExecuteApplyDto; import com.yxt.anrui.riskcenter.api.loancaseexecuteapply.LoanCaseExecuteApplyFeign; -/** - * Project: anrui-riskcenter(案件执行立案申请)
- * File: LoanCaseExecuteApplyFeignFallback.java
- * Class: com.yxt.anrui.riskcenter.biz.loancaseexecuteapply.LoanCaseExecuteApplyRest
- * Description: 案件执行立案申请.
- * Copyright: Copyright (c) 2011
- * Company: https://gitee.com/liuzp315
- * Makedate: 2024-02-07 10:00:57
- * - * @author liupopo - * @version 1.0 - * @since 1.0 - */ @Api(tags = "案件执行立案申请") -@RestController("com.yxt.anrui.riskcenter.biz.loancaseexecuteapply.LoanCaseExecuteApplyRest") +@RestController @RequestMapping("v1/loancaseexecuteapply") public class LoanCaseExecuteApplyRest implements LoanCaseExecuteApplyFeign { diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseexecuteapply/LoanCaseExecuteApplyService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseexecuteapply/LoanCaseExecuteApplyService.java index a9eb580a2b..e33b4edbda 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseexecuteapply/LoanCaseExecuteApplyService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseexecuteapply/LoanCaseExecuteApplyService.java @@ -31,7 +31,19 @@ import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import com.yxt.anrui.base.api.basepurchasesystem.BasePurchaseSystemDetailsVo; +import com.yxt.anrui.base.api.basepurchasesystem.BasePurchaseSystemFeign; import com.yxt.anrui.base.common.utils.Rule; +import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; +import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; +import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerDetailsVo; +import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerFeign; +import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle; +import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; +import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign; +import com.yxt.anrui.fin.api.kingdee.bdcustomer.BdCustomer; +import com.yxt.anrui.fin.api.kingdee.voucher.Voucher; import com.yxt.anrui.flowable.api.flow.FlowProcessMapQuery; import com.yxt.anrui.flowable.api.flow.FlowableFeign; import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo; @@ -62,11 +74,15 @@ import com.yxt.anrui.riskcenter.api.loancaseprogresstrial.LoanCaseProgressTrial; import com.yxt.anrui.riskcenter.api.loancaseprogressveh.LoanCaseProgressVeh; import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; +import com.yxt.anrui.riskcenter.api.loanoutboundapply.LoanOutboundApply; +import com.yxt.anrui.riskcenter.api.loanrestorereportapply.AlrepaidAndArrVo; import com.yxt.anrui.riskcenter.biz.loancaseexecuteveh.LoanCaseExecuteVehService; import com.yxt.anrui.riskcenter.biz.loancaseprogress.LoanCaseProgressService; import com.yxt.anrui.riskcenter.biz.loancaseprogresstrial.LoanCaseProgressTrialService; import com.yxt.anrui.riskcenter.biz.loancaseprogressveh.LoanCaseProgressVehService; import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService; +import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService; +import com.yxt.anrui.riskcenter.biz.loanrestorereportapply.LoanRestoreReportApplyService; import com.yxt.common.base.config.component.FileUploadComponent; import com.yxt.messagecenter.api.message.MessageFeign; import com.yxt.messagecenter.api.message.MessageFlowVo; @@ -81,7 +97,9 @@ import com.yxt.common.core.vo.PagerVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.math.BigDecimal; import java.util.*; +import java.util.concurrent.*; import java.util.stream.Collectors; /** @@ -126,6 +144,20 @@ public class LoanCaseExecuteApplyService extends MybatisBaseService listPageVo(PagerQuery pq) { LoanCaseExecuteApplyQuery query = pq.getParams(); @@ -495,7 +527,20 @@ public class LoanCaseExecuteApplyService extends MybatisBaseService(1024), namedThreadFactory, new org.apache.tomcat.util.threads.ThreadPoolExecutor.AbortPolicy()); + Future future1 = pool.submit(() -> { + //推送财务凭证 + //TOdO: + pushRiskToFin(bv.getBusinessSid()); + }); + } catch (Exception e) { + e.printStackTrace(); + } } else { //极光推送 loanCaseExecuteApply = fetchBySid(businessSid); @@ -518,6 +563,123 @@ public class LoanCaseExecuteApplyService extends MybatisBaseService voucherResultDetailDtos = new ArrayList<>(); + SysOrganizationVo deptVo = sysOrganizationFeign.fetchBySid(loanCaseExecuteApply.getDeptSid()).getData(); + List busVinSidList = loanCaseProgressVehService.selectByMainSid(loanCaseExecuteApply.getBusSid()); + for (int i = 0; i < busVinSidList.size(); i++) { + String busVinSid = busVinSidList.get(i); + BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.details(busVinSid).getData(); + String customerNumber = ""; + BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(busSalesOrderVehicle.getSalesOrderSid()).getData(); + if (salesOrder != null && busSalesOrderVehicle != null) { + //判断财务系统是否有客户 + Boolean aBoolean = finKingDeeFeign.customerExistState(busSalesOrderVehicle.getTemporaryNo()).getData(); + String linkNo = ""; + BusSalesOrderBorrowerDetailsVo borrowerDetailsVo = busSalesOrderBorrowerFeign.fetchDetailsBySid(busSalesOrderVehicle.getBorrowerSid()).getData(); + if (!aBoolean) { + BdCustomer bdCustomer = new BdCustomer(); + bdCustomer.setFNumber(busSalesOrderVehicle.getTemporaryNo()); + bdCustomer.setFShortName(salesOrder.getContractNo()); + if (StringUtils.isNotBlank(salesOrder.getPurchaseSystemSid())) { + BasePurchaseSystemDetailsVo data = basePurchaseSystemFeign.fetchDetailsByDeptSid(salesOrder.getPurchaseSystemSid()).getData(); + bdCustomer.setTOrgIds(data.getOrgCode()); + } + bdCustomer.setTOrgIds(deptVo.getOrgCode()); + if (org.apache.commons.lang3.StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) { + String vinNo = busSalesOrderVehicle.getLinkNo(); + if (vinNo.length() > 8) { + linkNo = vinNo.substring(vinNo.length() - 8); + } else { + linkNo = busSalesOrderVehicle.getLinkNo(); + } + if (null != borrowerDetailsVo) { + bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + linkNo); + } + } else { + if (null != borrowerDetailsVo) { + bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + busSalesOrderVehicle.getTemporaryNo()); + } + } + // bdCustomers.add(bdCustomer); + ResultBean resultBean = finKingDeeFeign.draftBdCustomer(bdCustomer); + if (resultBean.getSuccess()) { + customerNumber = bdCustomer.getFNumber(); + } + } else { + customerNumber = busSalesOrderVehicle.getTemporaryNo(); + } + } + AlrepaidAndArrVo alrepaidAndArrVo = loanRestoreReportApplyService.getAlrepaidAndArr2(busVinSid); + //应收贷款车欠款_待处理欠款_处置车辆_已诉讼-当前欠款合计--不含资金占用费 + BigDecimal all = BigDecimal.ZERO; + //预申请坏账金额 + BigDecimal ysqhz = BigDecimal.ZERO; + //其中执行欠款金额 + BigDecimal qzzxqk = BigDecimal.ZERO; + String allMoney = loanRepaymentPlanDetailsService.selectAllMoney(busVinSid); + String wdqMoney = loanRepaymentPlanDetailsService.getWdq(busVinSid); + all = all.add(StringUtils.isNotBlank(allMoney)?new BigDecimal(allMoney):BigDecimal.ZERO).add(StringUtils.isNotBlank(wdqMoney)?new BigDecimal(wdqMoney):BigDecimal.ZERO); + + + //贷方 + Voucher.VoucherResultDetailDto voucherResultDetailDtoDf = new Voucher.VoucherResultDetailDto(); + //借方 + Voucher.VoucherResultDetailDto voucherResultDetailDtoJf = new Voucher.VoucherResultDetailDto(); + Voucher.VoucherResultDetailDto voucherResultDetailDtoJf2 = new Voucher.VoucherResultDetailDto(); + //-------------------------------------------应收贷款车欠款_待处理欠款_处置车辆_已诉讼-当前欠款合计 + if (all.compareTo(BigDecimal.ZERO) > 0) { + voucherResultDetailDtoDf.setSummary(customerNumber+"转执行"); + voucherResultDetailDtoDf.setSubjectNo("1201.03.04.02"); + //核算部门 + voucherResultDetailDtoDf.setDimensionDept(deptVo.getOrgCode()); + //核算客户 + voucherResultDetailDtoDf.setDimensionCustom(customerNumber); + voucherResultDetailDtoDf.setCredit(all.toString()); + voucherResultDetailDtos.add(voucherResultDetailDtoDf); + } + + //---------------------------------------------待处理财产损溢 风险准备金(输入)-预申请坏账金额 + if (ysqhz.compareTo(BigDecimal.ZERO) > 0) { + voucherResultDetailDtoJf.setSummary(customerNumber+"转执行"); + voucherResultDetailDtoJf.setSubjectNo("1911.05"); + //核算部门 + voucherResultDetailDtoJf.setDimensionDept(deptVo.getOrgCode()); + //核算客户 + voucherResultDetailDtoJf.setDimensionCustom(customerNumber); + voucherResultDetailDtoJf.setDebit(ysqhz.toString()); + voucherResultDetailDtos.add(voucherResultDetailDtoJf); + } + + //--------------------------------------------应收贷款车欠款_待处理欠款_待执行-其中执行欠款金额 + if (qzzxqk.compareTo(BigDecimal.ZERO) > 0) { + voucherResultDetailDtoJf2.setSummary(customerNumber+"转执行"); + voucherResultDetailDtoJf2.setSubjectNo("1201.03.05"); + //核算部门 + voucherResultDetailDtoJf2.setDimensionDept(deptVo.getOrgCode()); + //核算客户 + voucherResultDetailDtoJf2.setDimensionCustom(customerNumber); + voucherResultDetailDtoJf2.setDebit(qzzxqk.toString()); + voucherResultDetailDtos.add(voucherResultDetailDtoJf2); + } + } + + if (!voucherResultDetailDtos.isEmpty()) { + voucher.setResultDetails(voucherResultDetailDtos); + finKingDeeFeign.saveVoucher(voucher); + } + } + + } + public ResultBean> getPreviousNodesForReject(LoanCaseExecuteApplyNodeQuery query) { ResultBean> rb = ResultBean.fireFail(); BusinessVariables bv = new BusinessVariables(); diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressVehMapper.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressVehMapper.java index ca19a79b2c..560fb68012 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressVehMapper.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressVehMapper.java @@ -27,4 +27,5 @@ public interface LoanCaseProgressVehMapper extends BaseMapper selectByMainSid(String busSid); } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressTrialMapper.xml b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressVehMapper.xml similarity index 57% rename from anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressTrialMapper.xml rename to anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressVehMapper.xml index dacdca2747..aa9f8ba90a 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressTrialMapper.xml +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressVehMapper.xml @@ -1,5 +1,9 @@ - + \ No newline at end of file diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressVehService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressVehService.java index 92b3b0c695..3101c2ce1f 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressVehService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loancaseprogressveh/LoanCaseProgressVehService.java @@ -39,4 +39,7 @@ public class LoanCaseProgressVehService extends MybatisBaseService selectByMainSid(String busSid) { + return baseMapper.selectByMainSid(busSid); + } } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyService.java index 83d4ddca32..61b549445a 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanoutboundapply/LoanOutboundApplyService.java @@ -671,6 +671,16 @@ public class LoanOutboundApplyService extends MybatisBaseService + + diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java index 2e40f4d58f..06c190ec0a 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java @@ -399,4 +399,8 @@ public class LoanRepaymentPlanDetailsService extends MybatisBaseService saveOrUpdateDto(WmsInventoryAllocateBillDtoNew dto) { + ResultBean rb = ResultBean.fireFail(); String dtoSid = dto.getSid(); List wmsInventoryAllocateBillDetailNewList = dto.getWmsInventoryAllocateBillDetailNewList(); if (StringUtils.isBlank(dtoSid)) { @@ -190,10 +193,19 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService candidateGroups = voList.get(0).getCandidateGroups(); UserRoleQuery userRoleQuery = new UserRoleQuery(); - if (candidateGroups != null && candidateGroups.size() > 0){ + if (candidateGroups != null && candidateGroups.size() > 0) { userRoleQuery.setRoleSid(candidateGroups.get(0)); if (bv.getTaskDefKey().equals("Activity_0eb1lqn")) {//调出方配件主管审批 userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getInPlatSid()); @@ -633,7 +645,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService wmsInventoryAllocateBillDetailNewList = dto.getWmsInventoryAllocateBillDetailNewList(); for (WmsInventoryAllocateBillDetailDtoNew wmsInventoryAllocateBillDetailDtoNew : wmsInventoryAllocateBillDetailNewList) { flowNodeQuery.setNodeNames("调出方站长审批"); - flowNodeQuery.setValue(wmsInventoryAllocateBillDetailDtoNew.getTaxPrice().toString()); + BigDecimal zk = wmsInventoryAllocateBillDetailDtoNew.getRequAmount().divide(wmsInventoryAllocateBillDetailDtoNew.getTaxPrice()).multiply(new BigDecimal("10")); + flowNodeQuery.setValue(zk.toString()); f0 = sysFlowPowerFeign.flowPermissions(flowNodeQuery); if (f0) { break; @@ -667,7 +680,8 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService>> resultBean1 = flowTaskFeign.getNextNodesForSubmit(bv); - //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo - List voList = Optional.ofNullable(resultBean1.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); - List candidateGroups = voList.get(0).getCandidateGroups(); - userRoleQuery.setRoleSid(candidateGroups.get(0)); - userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getOutPlatSid()); + userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getInPlatSid()); } else { - userRoleQuery.setRoleSid("bdacdca7-7a62-49b1-84c6-e32a4ffab777"); userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getOutPlatSid()); } List sysUserVos = sysUserFeign.getOtherOrgRoleUser(userRoleQuery).getData(); @@ -696,7 +705,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService wmsInventoryAllocatebillDetailDetailsVoNews = wmsInventoryAllocateBillDetailService.selByMainSid(businessSid); for (WmsInventoryAllocatebillDetailDetailsVoNew wmsInventoryAllocateBillDetailDtoNew : wmsInventoryAllocatebillDetailDetailsVoNews) { flowNodeQuery.setNodeNames("调出方站长审批"); - flowNodeQuery.setValue(wmsInventoryAllocateBillDetailDtoNew.getTaxPrice().toString()); + BigDecimal zk = wmsInventoryAllocateBillDetailDtoNew.getRequAmount().divide(wmsInventoryAllocateBillDetailDtoNew.getTaxPrice()).multiply(new BigDecimal("10")); + flowNodeQuery.setValue(zk.toString()); f0 = sysFlowPowerFeign.flowPermissions(flowNodeQuery); if (f0) { break; @@ -789,7 +799,8 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService>> resultBean1 = flowTaskFeign.getNextNodesForSubmit(bv); - //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo - List voList = Optional.ofNullable(resultBean1.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); - List candidateGroups = voList.get(0).getCandidateGroups(); - UserRoleQuery userRoleQuery = new UserRoleQuery(); + //特殊处理 + //获取调出方组织信息 + SysOrganizationVo dcOrg = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getOutPlatSid()).getData(); + //获取调入方组织信息 + SysOrganizationVo drOrg = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getInPlatSid()).getData(); + //流程预演 + ResultBean>> resultBean1 = flowTaskFeign.getNextNodesForSubmit(bv); + //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo + List voList = Optional.ofNullable(resultBean1.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); + //获取下一环节审批角色 + List candidateGroups = voList.get(0).getCandidateGroups(); + UserRoleQuery userRoleQuery = new UserRoleQuery(); + if (candidateGroups != null && candidateGroups.size() > 0) { userRoleQuery.setRoleSid(candidateGroups.get(0)); - userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getOutPlatSid()); + if (bv.getTaskDefKey().equals("Activity_1kuhabd") || bv.getTaskDefKey().equals("Activity_0nhcymu")) {//调出方站长审批 + if (!f0) { + userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getInPlatSid()); + bv.setOrgSidPath(drOrg.getOrgSidPath()); + } else { + userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getOutPlatSid()); + bv.setOrgSidPath(dcOrg.getOrgSidPath()); + } + } else if (bv.getTaskDefKey().equals("Activity_0ax87n7")) {//调出方分公司总(副总)经理审批 + userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getOutPlatSid()); + bv.setOrgSidPath(dcOrg.getOrgSidPath()); + } else if (bv.getTaskDefKey().equals("Activity_1ri7ft5")) {//调出方省(分)公司总经理审批 + userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getInPlatSid()); + bv.setOrgSidPath(drOrg.getOrgSidPath()); + } else if (bv.getTaskDefKey().equals("Activity_0p4jq17")) {//调入方配件主管审批 + userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getInPlatSid()); + bv.setOrgSidPath(drOrg.getOrgSidPath()); + } else if (bv.getTaskDefKey().equals("Activity_0cuo7gz")) {//调入方站长审批 + userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getInPlatSid()); + bv.setOrgSidPath(drOrg.getOrgSidPath()); + } else if (bv.getTaskDefKey().equals("Activity_0x5oo96")) {//调入方分公司总(副总)经理审批 + userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getInPlatSid()); + bv.setOrgSidPath(drOrg.getOrgSidPath()); + } List sysUserVos = sysUserFeign.getOtherOrgRoleUser(userRoleQuery).getData(); StringBuilder nextNodeUserSids = new StringBuilder(); if (sysUserVos.size() > 0) { @@ -824,7 +865,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService wmsInventoryAllocatebillDetailDetailsVoNews = wmsInventoryAllocateBillDetailService.selByMainSid(query.getBusinessSid()); for (WmsInventoryAllocatebillDetailDetailsVoNew wmsInventoryAllocateBillDetailDtoNew : wmsInventoryAllocatebillDetailDetailsVoNews) { flowNodeQuery.setNodeNames("调出方站长审批"); - flowNodeQuery.setValue(wmsInventoryAllocateBillDetailDtoNew.getTaxPrice().toString()); + BigDecimal zk = wmsInventoryAllocateBillDetailDtoNew.getRequAmount().divide(wmsInventoryAllocateBillDetailDtoNew.getTaxPrice()).multiply(new BigDecimal("10")); + flowNodeQuery.setValue(zk.toString()); f0 = sysFlowPowerFeign.flowPermissions(flowNodeQuery); if (f0) { break; @@ -893,7 +935,8 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService wmsInventoryAllocatebillDetailDetailsVoNews = wmsInventoryAllocateBillDetailService.selByMainSid(query.getBusinessSid()); for (WmsInventoryAllocatebillDetailDetailsVoNew wmsInventoryAllocateBillDetailDtoNew : wmsInventoryAllocatebillDetailDetailsVoNews) { flowNodeQuery.setNodeNames("调出方站长审批"); - flowNodeQuery.setValue(wmsInventoryAllocateBillDetailDtoNew.getTaxPrice().toString()); + BigDecimal zk = wmsInventoryAllocateBillDetailDtoNew.getRequAmount().divide(wmsInventoryAllocateBillDetailDtoNew.getTaxPrice()).multiply(new BigDecimal("10")); + flowNodeQuery.setValue(zk.toString()); f0 = sysFlowPowerFeign.flowPermissions(flowNodeQuery); if (f0) { break; @@ -940,7 +984,8 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService wmsInventoryAllocatebillDetailDetailsVoNews = wmsInventoryAllocateBillDetailService.selByMainSid(query.getBusinessSid()); for (WmsInventoryAllocatebillDetailDetailsVoNew wmsInventoryAllocateBillDetailDtoNew : wmsInventoryAllocatebillDetailDetailsVoNews) { flowNodeQuery.setNodeNames("调出方站长审批"); - flowNodeQuery.setValue(wmsInventoryAllocateBillDetailDtoNew.getTaxPrice().toString()); + BigDecimal zk = wmsInventoryAllocateBillDetailDtoNew.getRequAmount().divide(wmsInventoryAllocateBillDetailDtoNew.getTaxPrice()).multiply(new BigDecimal("10")); + flowNodeQuery.setValue(zk.toString()); f0 = sysFlowPowerFeign.flowPermissions(flowNodeQuery); if (f0) { break; @@ -1002,7 +1048,8 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData(); variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777")); - variables.put("ishz", true); + //是否合作二级站 + SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getInPlatSid()).getData(); + Boolean f1 = "合作二级服务站".equals(sysOrganizationVo.getOrgAttributeValue()); + variables.put("ishz", f1); //超出二级配件库存累计金额 SysFlowNodeQuery flowNodeQuery = new SysFlowNodeQuery(); - flowNodeQuery.setType(0); + flowNodeQuery.setType(1); flowNodeQuery.setFlowName("调拨申请(自有、合作二级站间调拨)"); flowNodeQuery.setCreateOrgName(wmsInventoryAllocateBill.getCreateOrgName()); flowNodeQuery.setProcDefId("process_hw0a2ybh"); @@ -1093,6 +1143,27 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService sysUserVos = sysUserFeign.getOtherOrgRoleUser(userRoleQuery).getData(); + StringBuilder nextNodeUserSids = new StringBuilder(); + if (sysUserVos.size() > 0) { + for (SysUserVo sysUserVo : sysUserVos) { + String sid = sysUserVo.getSid(); + nextNodeUserSids.append(sid).append(","); + } + } + if (StringUtils.isBlank(nextNodeUserSids)) { + return rb.setMsg("下一环节暂无审批人员,请联系管理员"); + } else { + String substring = nextNodeUserSids.substring(0, nextNodeUserSids.lastIndexOf(",")); + bv.setNextNodeUserSids(substring); + } //用户的部门全路径sid SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getDeptSid()).getData(); if (sysOrganization != null) { @@ -1161,10 +1232,13 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData(); variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777")); - variables.put("ishz", true); + //是否合作二级站 + SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getInPlatSid()).getData(); + Boolean f1 = "合作二级服务站".equals(sysOrganizationVo.getOrgAttributeValue()); + variables.put("ishz", f1); //超出二级配件库存累计金额 SysFlowNodeQuery flowNodeQuery = new SysFlowNodeQuery(); - flowNodeQuery.setType(0); + flowNodeQuery.setType(1); flowNodeQuery.setFlowName("调拨申请(自有、合作二级站间调拨)"); flowNodeQuery.setCreateOrgName(wmsInventoryAllocateBill.getCreateOrgName()); flowNodeQuery.setProcDefId("process_hw0a2ybh"); @@ -1190,6 +1264,44 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService>> resultBean1 = flowTaskFeign.getNextNodesForSubmit(bv); + //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo + List voList = Optional.ofNullable(resultBean1.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); + //获取下一环节审批角色 + List candidateGroups = voList.get(0).getCandidateGroups(); + UserRoleQuery userRoleQuery = new UserRoleQuery(); + if (candidateGroups != null && candidateGroups.size() > 0) { + userRoleQuery.setRoleSid(candidateGroups.get(0)); + if (bv.getTaskDefKey().equals("Activity_0isr3wq")) {//一级配件主管审批 + if (f1){ + userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getInPlatSid()); + bv.setOrgSidPath(drOrg.getOrgSidPath()); + } + }else if (bv.getTaskDefKey().equals("Activity_1557g51")){//合作二级站站长审批 + if (f0){ + userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getInPlatSid()); + bv.setOrgSidPath(drOrg.getOrgSidPath()); + } + } + List sysUserVos = sysUserFeign.getOtherOrgRoleUser(userRoleQuery).getData(); + StringBuilder nextNodeUserSids = new StringBuilder(); + if (sysUserVos.size() > 0) { + for (SysUserVo sysUserVo : sysUserVos) { + String sid = sysUserVo.getSid(); + nextNodeUserSids.append(sid).append(","); + } + } + if (StringUtils.isBlank(nextNodeUserSids)) { + return rb.setMsg("下一环节暂无审批人员,请联系管理员"); + } else { + String substring = nextNodeUserSids.substring(0, nextNodeUserSids.lastIndexOf(",")); + bv.setNextNodeUserSids(substring); + } + } if (bv.getTaskId().equals(wmsInventoryAllocateBill.getTaskId())) { ResultBean resultBean = flowFeign.handleProsess(bv); if (!resultBean.getSuccess()) { @@ -1233,10 +1345,13 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData(); variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777")); - variables.put("ishz", true); + //是否合作二级站 + SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getInPlatSid()).getData(); + Boolean f1 = "合作二级服务站".equals(sysOrganizationVo.getOrgAttributeValue()); + variables.put("ishz", f1); //超出二级配件库存累计金额 SysFlowNodeQuery flowNodeQuery = new SysFlowNodeQuery(); - flowNodeQuery.setType(0); + flowNodeQuery.setType(1); flowNodeQuery.setFlowName("调拨申请(自有、合作二级站间调拨)"); flowNodeQuery.setCreateOrgName(wmsInventoryAllocateBill.getCreateOrgName()); flowNodeQuery.setProcDefId("process_hw0a2ybh"); @@ -1252,6 +1367,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo @@ -1271,10 +1387,13 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData(); variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777")); - variables.put("ishz", true); + //是否合作二级站 + SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getInPlatSid()).getData(); + Boolean f1 = "合作二级服务站".equals(sysOrganizationVo.getOrgAttributeValue()); + variables.put("ishz", f1); //超出二级配件库存累计金额 SysFlowNodeQuery flowNodeQuery = new SysFlowNodeQuery(); - flowNodeQuery.setType(0); + flowNodeQuery.setType(1); flowNodeQuery.setFlowName("调拨申请(自有、合作二级站间调拨)"); flowNodeQuery.setCreateOrgName(wmsInventoryAllocateBill.getCreateOrgName()); flowNodeQuery.setProcDefId("process_hw0a2ybh"); @@ -1290,6 +1409,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo @@ -1324,10 +1444,13 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData(); variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777")); - variables.put("ishz", true); + //是否合作二级站 + SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getInPlatSid()).getData(); + Boolean f1 = "合作二级服务站".equals(sysOrganizationVo.getOrgAttributeValue()); + variables.put("ishz", f1); //超出二级配件库存累计金额 SysFlowNodeQuery flowNodeQuery = new SysFlowNodeQuery(); - flowNodeQuery.setType(0); + flowNodeQuery.setType(1); flowNodeQuery.setFlowName("调拨申请(自有、合作二级站间调拨)"); flowNodeQuery.setCreateOrgName(wmsInventoryAllocateBill.getCreateOrgName()); flowNodeQuery.setProcDefId("process_hw0a2ybh");