Browse Source

Merge remote-tracking branch 'origin/master'

zhanglei
yunuo970428 1 year ago
parent
commit
eac5b77b81
  1. 2
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/PcSelBillVinNoPageVo.java
  2. 5
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationMapper.xml
  3. 37
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java
  4. 4
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincompanyinvoicing/FinCompanyInvoicingMapper.java
  5. 4
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincompanyinvoicing/FinCompanyInvoicingService.java
  6. 24
      anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/dailyreport/DailyReportMapper.xml
  7. 26
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanhomevisitinvestigate/LoanHomevisitInvestigateService.java
  8. 16
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanhomevisitprep/LoanHomevisitPrepService.java
  9. 2
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.java
  10. 15
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.xml
  11. 42
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java
  12. 6
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmapplyinbound/ScmApplyInboundService.java

2
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/PcSelBillVinNoPageVo.java

@ -74,6 +74,8 @@ public class PcSelBillVinNoPageVo implements Vo {
private String invoiceType;
@ApiModelProperty("开票类型key")
private String invoiceTypeKey;
@ApiModelProperty("贷款人sid")
private String borrowerSid;
@ApiModelProperty("开票名称sid")
private String openTickSid;
@ApiModelProperty("开票名称")

5
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationMapper.xml

@ -113,7 +113,10 @@
bo.`purchaseSystemSid`,
bm.`modelName`,
bm.`modelSid`,
bo.`oneBillMoney` AS kpMoney
bo.`oneBillMoney` AS kpMoney,
bo.billingTypeKey AS invoiceTypeKey,
bo.billingType AS invoiceType,
bv.borrowerSid
FROM
anrui_buscenter.`bus_sales_order_vehicle` bv
JOIN anrui_buscenter.`bus_sales_order` bo

37
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java

@ -465,23 +465,23 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
}
}
//贷款查询开票名称、开票类型
BusSalesOrder busSalesOrder = busSalesOrderFeign.fetchBySid(record.getBusSalesOrderSid()).getData();
SolutionsDetailsVo solutionsDetailsVo = loanSolutionsFeign.selectDetails(record.getBusSalesOrderSid()).getData();
BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.selectByNoAndVinSid(record.getContractId(), record.getVinSid()).getData();
if ("2".equals(record.getSaleTypeKey())) {
if (StringUtils.isBlank(solutionsDetailsVo.getTypeKey())) {//担保
String jfkcSid = loanHomevisitInvestigateFeign.selSaleOrderSidAndBorrSid(record.getBusSalesOrderSid(), busSalesOrderVehicle.getBorrowerSid()).getData();
String jfkcSid = loanHomevisitInvestigateFeign.selSaleOrderSidAndBorrSid(record.getBusSalesOrderSid(), record.getBorrowerSid()).getData();
LoanHomevisitInvestigateCustomerDetailsVo loanHomevisitInvestigateCustomerDetailsVo = loanHomevisitInvestigateCustomerFeign.selectByMainSid(jfkcSid).getData();
BusSalesOrderBorrowerDetailsVo busSalesOrderBorrowerDetailsVo = busSalesOrderBorrowerFeign.fetchDetailsBySid(loanHomevisitInvestigateCustomerDetailsVo.getBorrowerSid()).getData();
CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.fetchSid(busSalesOrderBorrowerDetailsVo.getCustomSid()).getData();
record.setInvoiceTypeKey(busSalesOrder.getBillingTypeKey());
record.setInvoiceType(busSalesOrder.getBillingType());
if ("1".equals(loanHomevisitInvestigateCustomerDetailsVo.getVehRegis())) {
record.setInvoiceName(loanHomevisitInvestigateCustomerDetailsVo.getBorrowerName());
BusSalesOrderBorrowerDetailsVo busSalesOrderBorrowerDetailsVo = busSalesOrderBorrowerFeign.fetchDetailsBySid(loanHomevisitInvestigateCustomerDetailsVo.getBorrowerSid()).getData();
CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.fetchSid(busSalesOrderBorrowerDetailsVo.getCustomSid()).getData();
record.setInvoiceName(busSalesOrderBorrowerDetailsVo.getBorrowerName());
record.setOpenTickSid(busSalesOrderBorrowerDetailsVo.getCustomSid());
record.setInvoiceInfo(crmCustomerTempVo.getIDNumber());
} else if ("2".equals(loanHomevisitInvestigateCustomerDetailsVo.getVehRegis())) {
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingService.selectInvoingByTaxpayerNo(loanHomevisitInvestigateCustomerDetailsVo.getAccCompRegistNum()).getData();
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingService.selByTaxpayerNoAndUseOrgSid(loanHomevisitInvestigateCustomerDetailsVo.getAccCompRegistNum(),useOrgSid).getData();
if (finCompanyInvoicingDetailsVo == null || StringUtils.isBlank(finCompanyInvoicingDetailsVo.getSid())){
iterator.remove();
continue;
}
record.setInvoiceName(loanHomevisitInvestigateCustomerDetailsVo.getAccCompName());
record.setOpenTickSid(finCompanyInvoicingDetailsVo.getSid());
String openTickRemarks = "";
@ -503,20 +503,19 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
record.setInvoiceInfo(openTickRemarks);
}
} else if ("01".equals(solutionsDetailsVo.getTypeKey())) {//非担保
LoanNoGuaranteeCreditReviewDetailsVo loanNoGuaranteeCreditReviewDetailsVo = loanNoGuaranteeCreditReviewFeign.selByBorrSid(busSalesOrderVehicle.getBorrowerSid()).getData();
LoanNoGuaranteeCreditReviewDetailsVo loanNoGuaranteeCreditReviewDetailsVo = loanNoGuaranteeCreditReviewFeign.selByBorrSid(record.getBorrowerSid()).getData();
if (StringUtils.isBlank(loanNoGuaranteeCreditReviewDetailsVo.getAffiliatedCompany())){
iterator.remove();
continue;
}
BusSalesOrderBorrowerDetailsVo busSalesOrderBorrowerDetailsVo = busSalesOrderBorrowerFeign.fetchDetailsBySid(busSalesOrderVehicle.getBorrowerSid()).getData();
CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.fetchSid(busSalesOrderBorrowerDetailsVo.getCustomSid()).getData();
record.setInvoiceTypeKey(busSalesOrder.getBillingTypeKey());
record.setInvoiceType(busSalesOrder.getBillingType());
if ("1".equals(loanNoGuaranteeCreditReviewDetailsVo.getType())) {
BusSalesOrderBorrowerDetailsVo busSalesOrderBorrowerDetailsVo = busSalesOrderBorrowerFeign.fetchDetailsBySid(record.getBorrowerSid()).getData();
CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.fetchSid(busSalesOrderBorrowerDetailsVo.getCustomSid()).getData();
record.setInvoiceName(busSalesOrderBorrowerDetailsVo.getBorrowerName());
record.setOpenTickSid(busSalesOrderBorrowerDetailsVo.getCustomSid());
record.setInvoiceInfo(crmCustomerTempVo.getIDNumber());
} else if ("2".equals(loanNoGuaranteeCreditReviewDetailsVo.getType())) {
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingService.selectInvoingByName(loanNoGuaranteeCreditReviewDetailsVo.getAffiliatedCompany()).getData();
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingService.selectInvoingBySid(loanNoGuaranteeCreditReviewDetailsVo.getAffiliatedCompanySid()).getData();
record.setInvoiceName(loanNoGuaranteeCreditReviewDetailsVo.getAffiliatedCompany());
record.setOpenTickSid(finCompanyInvoicingDetailsVo.getSid());
String openTickRemarks = "";
@ -1568,7 +1567,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
finBillVehicleVo.setOpenTickSid(busSalesOrderBorrowerDetailsVo.getCustomSid());
finBillVehicleVo.setInvoiceInfo(crmCustomerTempVo.getIDNumber());
} else if ("2".equals(loanHomevisitInvestigateCustomerDetailsVo.getVehRegis())) {
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingService.selectInvoingByTaxpayerNo(loanHomevisitInvestigateCustomerDetailsVo.getAccCompRegistNum()).getData();
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingService.selByTaxpayerNoAndUseOrgSid(loanHomevisitInvestigateCustomerDetailsVo.getAccCompRegistNum(),entity.getUseOrgSid()).getData();
finBillVehicleVo.setOpenTickName(loanHomevisitInvestigateCustomerDetailsVo.getAccCompName());
finBillVehicleVo.setOpenTickSid(finCompanyInvoicingDetailsVo.getSid());
String openTickRemarks = "";
@ -1600,7 +1599,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
finBillVehicleVo.setOpenTickSid(busSalesOrderBorrowerDetailsVo.getCustomSid());
finBillVehicleVo.setInvoiceInfo(crmCustomerTempVo.getIDNumber());
} else if ("2".equals(loanNoGuaranteeCreditReviewDetailsVo.getType())) {
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingService.selectInvoingByName(loanNoGuaranteeCreditReviewDetailsVo.getAffiliatedCompany()).getData();
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingService.selectInvoingBySid(loanNoGuaranteeCreditReviewDetailsVo.getAffiliatedCompanySid()).getData();
finBillVehicleVo.setOpenTickName(loanNoGuaranteeCreditReviewDetailsVo.getAffiliatedCompany());
finBillVehicleVo.setOpenTickSid(finCompanyInvoicingDetailsVo.getSid());
String openTickRemarks = "";
@ -5815,7 +5814,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
vinListVos1.setOpenTickSid(busSalesOrderBorrowerDetailsVo.getCustomSid());
vinListVos1.setInvoiceInfo(crmCustomerTempVo.getIDNumber());
} else if ("2".equals(loanHomevisitInvestigateCustomerDetailsVo.getVehRegis())) {
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingService.selectInvoingByTaxpayerNo(loanHomevisitInvestigateCustomerDetailsVo.getAccCompRegistNum()).getData();
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingService.selByTaxpayerNoAndUseOrgSid(loanHomevisitInvestigateCustomerDetailsVo.getAccCompRegistNum(),busSalesOrder.getUseOrgSid()).getData();
vinListVos1.setInvoiceName(loanHomevisitInvestigateCustomerDetailsVo.getAccCompName());
vinListVos1.setOpenTickSid(finCompanyInvoicingDetailsVo.getSid());
String openTickRemarks = "";
@ -5847,7 +5846,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
vinListVos1.setOpenTickSid(busSalesOrderBorrowerDetailsVo.getCustomSid());
vinListVos1.setInvoiceInfo(crmCustomerTempVo.getIDNumber());
} else if ("2".equals(loanNoGuaranteeCreditReviewDetailsVo.getType())) {
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingService.selectInvoingByName(loanNoGuaranteeCreditReviewDetailsVo.getAffiliatedCompany()).getData();
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingService.selectInvoingBySid(loanNoGuaranteeCreditReviewDetailsVo.getAffiliatedCompanySid()).getData();
vinListVos1.setInvoiceName(loanNoGuaranteeCreditReviewDetailsVo.getAffiliatedCompany());
vinListVos1.setOpenTickSid(finCompanyInvoicingDetailsVo.getSid());
String openTickRemarks = "";

4
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincompanyinvoicing/FinCompanyInvoicingMapper.java

@ -88,6 +88,6 @@ public interface FinCompanyInvoicingMapper extends BaseMapper<FinCompanyInvoicin
FinCompanyInvoicingDetailsVo selByTaxpayerNoAndUseOrgSid(@Param("taxpayerNo") String taxpayerNo, @Param("useOrgSid") String useOrgSid);
@Select("select * from fin_company_invoicing where name = #{affiliatedCompany}")
FinCompanyInvoicingDetailsVo selectInvoingByName(String affiliatedCompany);
@Select("select * from fin_company_invoicing where sid = #{affiliatedCompanySid}")
FinCompanyInvoicingDetailsVo selectInvoingBySid(String affiliatedCompanySid);
}

4
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincompanyinvoicing/FinCompanyInvoicingService.java

@ -572,9 +572,9 @@ public class FinCompanyInvoicingService extends MybatisBaseService<FinCompanyInv
return rb.success().setData(vo);
}
public ResultBean<FinCompanyInvoicingDetailsVo> selectInvoingByName(String affiliatedCompany) {
public ResultBean<FinCompanyInvoicingDetailsVo> selectInvoingBySid(String affiliatedCompanySid) {
ResultBean<FinCompanyInvoicingDetailsVo> rb = ResultBean.fireFail();
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = baseMapper.selectInvoingByName(affiliatedCompany);
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = baseMapper.selectInvoingBySid(affiliatedCompanySid);
return rb.success().setData(finCompanyInvoicingDetailsVo);
}
}

24
anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/dailyreport/DailyReportMapper.xml

@ -376,17 +376,17 @@
select DATE_FORMAT(createTime, '%Y-%m-%d') as date,
<!--sum(SUBSTRING_INDEX(saleOfStockRatio, ':', 1) /
SUBSTRING_INDEX(saleOfStockRatio, ':', -1)) as saleOfStockRatio,-->
sum(saleOfStockRatio) as saleOfStockRatio,
sum(stock_subtotal) as stock_subtotal,
sum(pcOrder_subtotal) as pcOrder_subtotal,
sum(saleOrder_subtotal_day) as saleOrder_subtotal_day,
sum(sale_subtotal_day) as sale_subtotal_day,
sum(arrears_carry_veh_amount) as arrears_carry_veh_amount,
sum(loan_not_amount) as loan_not_amount,
sum(loan_not_amounts) as loan_not_amounts,
sum(buyout_day) as buyout_day,
sum(saleAllToThree) as saleAllToThree,
SUM(stock_total) as stock_total,
sum(saleOfStockRatio) as saleOfStockRatio,
sum(stock_subtotal) as stock_subtotal,
sum(pcOrder_subtotal) as pcOrder_subtotal,
sum(saleOrder_subtotal_day) as saleOrder_subtotal_day,
sum(sale_subtotal_day) as sale_subtotal_day,
sum(arrears_carry_veh_amount) as arrears_carry_veh_amount,
sum(loan_not_amount) as loan_not_amount,
ifnull(sum(loan_not_amounts), 0) as loan_not_amounts,
sum(buyout_day) as buyout_day,
sum(saleAllToThree) as saleAllToThree,
SUM(stock_total) as stock_total,
useOrgSid
from daily_report
<where>
@ -405,7 +405,7 @@
sum(sale_subtotal_day) as sale_subtotal_day,
sum(arrears_carry_veh_amount) as arrears_carry_veh_amount,
sum(loan_not_amount) as loan_not_amount,
sum(loan_not_amounts) as loan_not_amounts,
ifnull(sum(loan_not_amounts), 0) as loan_not_amounts,
sum(buyout_day) as buyout_day,
sum(saleAllToThree) as saleAllToThree,
SUM(stock_total) as stock_total,

26
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanhomevisitinvestigate/LoanHomevisitInvestigateService.java

@ -30,11 +30,16 @@ import cn.hutool.core.date.DateUtil;
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.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.crm.api.crmcustomertemp.CrmCustomerTemp;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo;
import com.yxt.anrui.fin.api.fincompanyinvoicing.FinCompanyInvoicingDetailsVo;
import com.yxt.anrui.fin.api.fincompanyinvoicing.FinCompanyInvoicingDto;
import com.yxt.anrui.fin.api.fincompanyinvoicing.FinCompanyInvoicingFeign;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
@ -120,8 +125,12 @@ public class LoanHomevisitInvestigateService extends MybatisBaseService<LoanHome
@Autowired
private BusSalesOrderBorrowerFeign busSalesOrderBorrowerFeign;
@Autowired
private BusSalesOrderFeign busSalesOrderFeign;
@Autowired
private LoanHomevisitPrepService loanHomevisitPrepService;
@Autowired
private FinCompanyInvoicingFeign finCompanyInvoicingFeign;
@Autowired
private LoanHomevisitInvestigateCustomerService loanHomevisitInvestigateCustomerService;
@Autowired
private LoanHomevisitInvestigateOrderService loanHomevisitInvestigateOrderService;
@ -740,6 +749,23 @@ public class LoanHomevisitInvestigateService extends MybatisBaseService<LoanHome
loanHomevisitInvestigateCustomerDto.setIsCompBuy(dto.getIsCompBuy());
loanHomevisitInvestigateCustomerDto.setConSetUpKey(dto.getConSetUpKey());
loanHomevisitInvestigateCustomerService.saveOrUpdateDto(loanHomevisitInvestigateCustomerDto);
if (StringUtils.isNotBlank(loanHomevisitInvestigateCustomerDto.getAccCompRegistNum())){
LoanHomevisitPrep loanHomevisitPrep = loanHomevisitPrepService.fetchBySid(loanHomevisitInvestigateCustomerDto.getMainSid());
if (loanHomevisitPrep != null){
BusSalesOrder busSalesOrder = busSalesOrderFeign.fetchBySid(loanHomevisitPrep.getSaleOrderSid()).getData();
FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingFeign.selByTaxpayerNoAndUseOrgSid(loanHomevisitInvestigateCustomerDto.getAccCompRegistNum(), busSalesOrder.getUseOrgSid()).getData();
if (finCompanyInvoicingDetailsVo == null){
FinCompanyInvoicingDto finCompanyInvoicingDto = new FinCompanyInvoicingDto();
finCompanyInvoicingDto.setUseOrgSid(busSalesOrder.getUseOrgSid());
finCompanyInvoicingDto.setName(loanHomevisitInvestigateCustomerDto.getAccCompName());
finCompanyInvoicingDto.setOpenTickTypeKey("01");
finCompanyInvoicingDto.setOpenTickTypeValue("机动车销售统一发票");
finCompanyInvoicingDto.setTaxpayerNo(loanHomevisitInvestigateCustomerDto.getAccCompRegistNum());
finCompanyInvoicingDto.setOrgSidPath(busSalesOrder.getOrgSidPath());
finCompanyInvoicingFeign.save(finCompanyInvoicingDto);
}
}
}
loanHomevisitInvestigateFileService.delByMainSidAndType(dto.getSid(), LoanAttachTypeEnum.YHK.getAttachType());
if (bankCardImages.size() > 0) {
for (String yhk : bankCardImages) {

16
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanhomevisitprep/LoanHomevisitPrepService.java

@ -450,20 +450,20 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr
}
printConfirmDto.setSalesOrderVehicles(salesOrderVehicles);
List<File> filesList = new ArrayList<>();
/*//贷款车辆买卖合同
//贷款车辆买卖合同
List<String> dkclmmhts = dkclmmht(printConfirmDto, conSetUpKey);
//生成车辆融资协议
List<String> clrzxyUrls = generateCLRZXY(printConfirmDto, conSetUpKey);
//生成还款协议
List<String> hkxyUrls = hkxy(printConfirmDto, conSetUpKey);
//代管车辆委托书
List<String> dgclwtsUrls = dgclwts(printConfirmDto, conSetUpKey);*/
List<String> dgclwtsUrls = dgclwts(printConfirmDto, conSetUpKey);
//判断是否为高低开
BusSalesOrderPrice data = busSalesOrderFeign.selectByContractNoOne(printConfirmDto.getContractNo()).getData();
//查询金融方案
SolutionsDetailsVo solutionsDetailsVo = loanSolutionsService.selectDetails(busSalesOrder.getSid()).getData();
//判断是否为高低开,若是则生成开票申请书
/*List<String> kpsqsUrls = new ArrayList<>();
List<String> kpsqsUrls = new ArrayList<>();
if (!data.getSingleFinalPrice().equals(solutionsDetailsVo.getMainVehicleAmount())) {
//开票申请书
kpsqsUrls = kpsqs(printConfirmDto, conSetUpKey);
@ -477,11 +477,11 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr
//接收车辆确认书
List<String> jsclqrsUrls = jsclqrs(printConfirmDto, conSetUpKey);
//接收车辆委托书
List<String> jsclwtsUrls = jsclwts(printConfirmDto, conSetUpKey);*/
List<String> jsclwtsUrls = jsclwts(printConfirmDto, conSetUpKey);
//销售订单上装信息
List<BusSalesOrderMakeupDetailsVo> busSalesOrderMakeupDetailsVoList = busSalesOrderMakeupFeign.selectTopByOrderSid(busSalesOrder.getSid()).getData();
//查询金融方案中挂车信息
/* List<String> cljszcghtUrls = new ArrayList<>();
List<String> cljszcghtUrls = new ArrayList<>();
if ((busSalesOrderMakeupDetailsVoList != null && busSalesOrderMakeupDetailsVoList.size() > 0) || solutionsDetailsVo.isTrailerAmountCb()){
//生成车辆及上装采购合同
cljszcghtUrls = cljszcght(printConfirmDto, conSetUpKey);
@ -490,8 +490,8 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr
if ("0".equals(homeKcCust.getIsSecurity())) {
//生成公司股东会对外担保决议
gsgddwdbjyUrls = gsgddwdbjy(printConfirmDto, conSetUpKey);
}*/
/*if (dkclmmhts != null && dkclmmhts.size() > 0) {
}
if (dkclmmhts != null && dkclmmhts.size() > 0) {
for (String dkclmmht : dkclmmhts) {
File file = new File(docPdfComponent.getUploadTemplateUrl() + dkclmmht);
filesList.add(file);
@ -550,7 +550,7 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr
File file = new File(docPdfComponent.getUploadTemplateUrl() + gsgddwdbjyUrl);
filesList.add(file);
}
}*/
}
//合并pdf文件
if (filesList.size() > 0) {
String dateStr = DateUtil.format(new Date(), "yyyyMMdd");

2
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.java

@ -61,4 +61,6 @@ public interface LoanRepaymentHistoryMapper extends BaseMapper<LoanRepaymentHist
int updateTimeByPlanSids(@Param("stringList") List<String> stringList, @Param("formatDate") String formatDate);
List<String> selNotRuleForBuckSids(@Param("useOrgSid") String useOrgSid);
String selPayStateByPlanSid(@Param("key") String key);
}

15
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.xml

@ -11,6 +11,7 @@
</update>
<select id="updateRecordInfo"
resultType="com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistoryUpdate">
SELECT p.loanContractNo as loanContractNo,
@ -541,5 +542,19 @@
WHERE
sumActualMoney &lt;= 0
</select>
<select id="selPayStateByPlanSid" resultType="java.lang.String">
SELECT
h.payState
FROM
loan_repayment_history AS h
WHERE
h.planDetailSid = #{key}
AND h.buckleKey != '002'
AND h.buckleKey != '003'
AND h.updateState = 1
ORDER BY
h.updateTime DESC
LIMIT 1
</select>
</mapper>

42
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java

@ -905,11 +905,11 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
if (selNotRuleForBuckSids.isEmpty()) {
selNotRuleForBuckSids = new ArrayList<>();
}
qw.eq("p.orgSidPath", useOrgSid);
qw.eq("p.useOrgSid", useOrgSid);
qw.ne("h.buckleKey", "002");
qw.ne("h.buckleKey", "003");
qw.eq("h.updateState", "1");
qw.notIn("h.sid",selNotRuleForBuckSids);
qw.notIn("h.sid", selNotRuleForBuckSids);
List<RepaymentHistoryVoForBuckle> histories = baseMapper.selbuckleNewInitList(qw);
Map<String, BigDecimal> countMoney = new HashMap<>();
Map<String, List<String>> sids = new HashMap<>();
@ -920,8 +920,8 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
if (!histories.isEmpty()) {
histories.stream().forEach(h -> {
RepaymentHistoryVoForBuckleNew r = new RepaymentHistoryVoForBuckleNew();
if (StringUtils.isNotBlank(h.getPlanDetailSid()) && StringUtils.isNotBlank(h.getPayState())) {
r.setRule(h.getPlanDetailSid() + "!" + h.getPayState());
if (StringUtils.isNotBlank(h.getPlanDetailSid())) {
r.setRule(h.getPlanDetailSid());
}
if (StringUtils.isNotBlank(h.getSid())) {
r.setSid(h.getSid());
@ -931,6 +931,19 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
}
newList.add(r);
});
// histories.stream().forEach(h -> {
// RepaymentHistoryVoForBuckleNew r = new RepaymentHistoryVoForBuckleNew();
// if (StringUtils.isNotBlank(h.getPlanDetailSid()) && StringUtils.isNotBlank(h.getPayState())) {
// r.setRule(h.getPlanDetailSid() + "!" + h.getPayState());
// }
// if (StringUtils.isNotBlank(h.getSid())) {
// r.setSid(h.getSid());
// }
// if (null != h.getActualMoney()) {
// r.setActualMoney(h.getActualMoney());
// }
// newList.add(r);
// });
if (!newList.isEmpty()) {
countMoney = newList.stream()
.collect(Collectors.groupingBy(RepaymentHistoryVoForBuckleNew::getRule, CollectorsUtil.summingBigDecimal(RepaymentHistoryVoForBuckleNew::getActualMoney)));
@ -952,18 +965,21 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
}
for (Map.Entry<String, List<String>> entry : stringListMap.entrySet()) {
LoanBuckleHistoryRecord record = new LoanBuckleHistoryRecord();
String planSid = "";
String payState = "";
if (StringUtils.isNotBlank(entry.getKey())) {
String[] split = entry.getKey().split("!");
planSid = split[0];
payState = split[1];
// String planSid = "";
// String payState = "";
// if (StringUtils.isNotBlank(entry.getKey())) {
// String[] split = entry.getKey().split("!");
// planSid = split[0];
// payState = split[1];
// }
record.setRecordSid(entry.getKey());
String payState = baseMapper.selPayStateByPlanSid(entry.getKey());
if (StringUtils.isNotBlank(payState)) {
record.setPayState(payState);
}
record.setRecordSid(planSid);
record.setPayState(payState);
record.setHistorySids(entry.getValue());
record.setActualMoney(newMap.get(entry.getKey()).toString());
LoanRepaymentPlanDetails planDetails = loanRepaymentPlanDetailsService.fetchBySid(planSid);
LoanRepaymentPlanDetails planDetails = loanRepaymentPlanDetailsService.fetchBySid(entry.getKey());
if (null != planDetails) {
if (StringUtils.isNotBlank(planDetails.getLoanContractNo())) {
record.setLoanContractNo(planDetails.getLoanContractNo());

6
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmapplyinbound/ScmApplyInboundService.java

@ -282,12 +282,12 @@ public class ScmApplyInboundService extends MybatisBaseService<ScmApplyInboundMa
}
// 验证数据库是否重复
for (int i = 0; i < vinNoList.size(); i++) {
int count = scmApplyInboundVehicleService.checkVinNo(vinNoList.get(i), dto.getUseOrgSid(), dto.getSid());
//int count = scmApplyInboundVehicleService.checkVinNo(vinNoList.get(i), dto.getUseOrgSid(), dto.getSid());
BaseVehicle data = baseVehicleFeign.selectByVinNoAndOrgSid(vinNoList.get(i), dto.getUseOrgSid()).getData();
if (count > 0) {
/* if (count > 0) {
baseMapper.updateNodeStatedtj(dto.getSid());
return new ResultBean().setMsg("入库车辆信息中" + vinNoList.get(i) + "车架号已经存在");
}
}*/
if (data != null) {
if (StringUtils.isNotBlank(data.getVinNo())) {
baseMapper.updateNodeStatedtj(dto.getSid());

Loading…
Cancel
Save