|
|
@ -6,6 +6,7 @@ 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.basevehiclemodel.BaseVehicleModel; |
|
|
|
import com.yxt.anrui.base.api.commonappendix.CommonAppendix; |
|
|
|
import com.yxt.anrui.base.api.commonappendix.CommonAttachTypeEnum; |
|
|
|
import com.yxt.anrui.base.api.commoncontract.*; |
|
|
@ -765,6 +766,21 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
//获取模板
|
|
|
|
ftl = "orderacar"; |
|
|
|
} |
|
|
|
AppOrderPriceInfoVo priceInfo = appOrderDetailsVo.getPriceInfo(); |
|
|
|
//查询台数
|
|
|
|
String num = priceInfo.getNumber(); |
|
|
|
//单台成交价
|
|
|
|
String transactionPrice = priceInfo.getSingleFinalPrice(); |
|
|
|
String remarks = ""; |
|
|
|
AppOrderModelInfoVo orderModelInfoVo = appOrderDetailsVo.getModelInfo(); |
|
|
|
List<String> stringList = orderModelInfoVo.getVinList(); |
|
|
|
if (stringList.size() > 0) { |
|
|
|
remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。车架号:" + String.join("、", stringList); |
|
|
|
} else { |
|
|
|
remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。"; |
|
|
|
} |
|
|
|
map.put("remarks", remarks); |
|
|
|
|
|
|
|
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); |
|
|
|
//生成word文件名
|
|
|
|
String targetPath = docPdfComponent.getUploadTemplateUrl(); |
|
|
@ -783,6 +799,48 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
return pdfName; |
|
|
|
} |
|
|
|
|
|
|
|
private String genCarSaleContract2(PrintConfirmDto dto, Map<String, Object> map, AppOrderDetailsVo appOrderDetailsVo) { |
|
|
|
String ftl = ""; |
|
|
|
if ("现车".equals(appOrderDetailsVo.getOrderType())) { |
|
|
|
//获取模板
|
|
|
|
ftl = "existingvehicles2"; |
|
|
|
} else { |
|
|
|
//获取模板
|
|
|
|
ftl = "orderacar"; |
|
|
|
} |
|
|
|
AppOrderPriceInfoVo priceInfo = appOrderDetailsVo.getPriceInfo(); |
|
|
|
//查询台数
|
|
|
|
String num = priceInfo.getNumber(); |
|
|
|
//单台成交价
|
|
|
|
String transactionPrice = priceInfo.getSingleFinalPrice(); |
|
|
|
String remarks = ""; |
|
|
|
AppOrderModelInfoVo orderModelInfoVo = appOrderDetailsVo.getModelInfo(); |
|
|
|
List<String> stringList = orderModelInfoVo.getVinList(); |
|
|
|
if (stringList.size() > 0) { |
|
|
|
remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。车架号:" + String.join("、", stringList); |
|
|
|
} else { |
|
|
|
remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。"; |
|
|
|
} |
|
|
|
map.put("remarks", remarks); |
|
|
|
|
|
|
|
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); |
|
|
|
//生成word文件名
|
|
|
|
String targetPath = docPdfComponent.getUploadTemplateUrl(); |
|
|
|
String dateStr = DateUtil.format(new Date(), "yyyyMMdd"); |
|
|
|
long seconds = System.currentTimeMillis(); |
|
|
|
String typeName = dateStr + seconds + ".doc"; |
|
|
|
File file = new File(targetPath + ftl + seconds + ".ftl"); |
|
|
|
File dir = new File(targetPath); |
|
|
|
WordConvertUtils.inputStreamToFile(inputStream, file); |
|
|
|
WordConvertUtils.creatWord1(map, file, targetPath, typeName, dir); |
|
|
|
//新生成的word路径
|
|
|
|
String wordPath = targetPath + typeName; |
|
|
|
//生成文件名
|
|
|
|
String pdfName = "新车买卖合同2_" + dateStr + seconds + ".pdf"; |
|
|
|
WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); |
|
|
|
return pdfName; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 生成 新车买卖合同(现车) (空)pdf |
|
|
|
* |
|
|
@ -818,6 +876,22 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
map.put("totalPrice", ""); |
|
|
|
map.put("priceRemarks", ""); |
|
|
|
map.put("depositTotal", ""); |
|
|
|
AppOrderPriceInfoVo priceInfo = appOrderDetailsVo.getPriceInfo(); |
|
|
|
//查询台数
|
|
|
|
String num = priceInfo.getNumber(); |
|
|
|
//单台成交价
|
|
|
|
String transactionPrice = priceInfo.getSingleFinalPrice(); |
|
|
|
String remarks = ""; |
|
|
|
AppOrderModelInfoVo orderModelInfoVo = appOrderDetailsVo.getModelInfo(); |
|
|
|
List<String> stringList = orderModelInfoVo.getVinList(); |
|
|
|
if ("1".equals(dto.getDiscountKey())) { |
|
|
|
if (stringList.size() > 0) { |
|
|
|
remarks = "主车" + num + "台,单台成交价: 元。车架号:" + String.join("、", stringList); |
|
|
|
} else { |
|
|
|
remarks = "主车" + num + "台,单台成交价: 元。"; |
|
|
|
} |
|
|
|
map.put("remarks", remarks); |
|
|
|
} |
|
|
|
String ftl = ""; |
|
|
|
// 涉及高低开票的,需要打印两套合同,一套按照成交价打印(记账用),一套为价格空白的合同(开票用)
|
|
|
|
if ("1".equals(dto.getDiscountKey())) { |
|
|
@ -849,6 +923,58 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
return url; |
|
|
|
} |
|
|
|
|
|
|
|
private String genCarSaleContractBlank2(PrintConfirmDto dto, Map<String, Object> map, AppOrderDetailsVo appOrderDetailsVo) { |
|
|
|
String url = ""; |
|
|
|
map.put("totalPrice", ""); |
|
|
|
map.put("priceRemarks", ""); |
|
|
|
map.put("depositTotal", ""); |
|
|
|
AppOrderPriceInfoVo priceInfo = appOrderDetailsVo.getPriceInfo(); |
|
|
|
//查询台数
|
|
|
|
String num = priceInfo.getNumber(); |
|
|
|
//单台成交价
|
|
|
|
String transactionPrice = priceInfo.getSingleFinalPrice(); |
|
|
|
String remarks = ""; |
|
|
|
AppOrderModelInfoVo orderModelInfoVo = appOrderDetailsVo.getModelInfo(); |
|
|
|
List<String> stringList = orderModelInfoVo.getVinList(); |
|
|
|
if ("1".equals(dto.getDiscountKey())) { |
|
|
|
if (stringList.size() > 0) { |
|
|
|
remarks = "主车" + num + "台,单台成交价: 元。车架号:" + String.join("、", stringList); |
|
|
|
} else { |
|
|
|
remarks = "主车" + num + "台,单台成交价: 元。"; |
|
|
|
} |
|
|
|
map.put("remarks", remarks); |
|
|
|
} |
|
|
|
String ftl = ""; |
|
|
|
// 涉及高低开票的,需要打印两套合同,一套按照成交价打印(记账用),一套为价格空白的合同(开票用)
|
|
|
|
if ("1".equals(dto.getDiscountKey())) { |
|
|
|
// 现车
|
|
|
|
if ("现车".equals(appOrderDetailsVo.getOrderType())) { |
|
|
|
//获取模板
|
|
|
|
ftl = "existingvehicles_black2"; |
|
|
|
} else { |
|
|
|
// 订车获取模板
|
|
|
|
ftl = "orderacar_black"; |
|
|
|
} |
|
|
|
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); |
|
|
|
//生成word文件名
|
|
|
|
String targetPath = docPdfComponent.getUploadTemplateUrl(); |
|
|
|
String dateStr = DateUtil.format(new Date(), "yyyyMMdd"); |
|
|
|
long seconds = System.currentTimeMillis(); |
|
|
|
String typeName = dateStr + seconds + ".doc"; |
|
|
|
File file = new File(targetPath + ftl + seconds + ".ftl"); |
|
|
|
File dir = new File(targetPath); |
|
|
|
WordConvertUtils.inputStreamToFile(inputStream, file); |
|
|
|
WordConvertUtils.creatWord1(map, file, targetPath, typeName, dir); |
|
|
|
//新生成的word路径
|
|
|
|
String wordPath = targetPath + typeName; |
|
|
|
//生成合同文件名
|
|
|
|
String pdfName = "新车买卖空白合同2_" + dateStr + seconds + ".pdf"; |
|
|
|
WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); |
|
|
|
url = pdfName; |
|
|
|
} |
|
|
|
return url; |
|
|
|
} |
|
|
|
|
|
|
|
private String getReceiveCar(Map<String, Object> map, AppOrderDetailsVo appOrderDetailsVo) { |
|
|
|
String url = ""; |
|
|
|
//查询销售订单的现车
|
|
|
@ -890,7 +1016,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
String invoicName = ""; |
|
|
|
ResultBean<FinCompanyInvoicingDetailsVo> invoicingDetailsVoResultBean = finCompanyInvoicingFeign.fetchDetailsByUseOrgSid(appOrderDetailsVo.getUseOrgSid()); |
|
|
|
if (invoicingDetailsVoResultBean.getData() != null) { |
|
|
|
map.put("createOrgName", invoicingDetailsVoResultBean.getData().getUseOrgName()); |
|
|
|
map.put("createOrgName", invoicingDetailsVoResultBean.getData().getName()); |
|
|
|
invoicName = invoicingDetailsVoResultBean.getData().getName(); |
|
|
|
} |
|
|
|
//查询销售订单的现车
|
|
|
@ -901,10 +1027,12 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
if (stringList.size() > 0) { |
|
|
|
for (int i = 0; i < stringList.size(); i++) { |
|
|
|
InvoicMessageContractVo vo = new InvoicMessageContractVo(); |
|
|
|
if (stringList.get(i).length() > 8) { |
|
|
|
vo.setVinNo(stringList.get(i).substring(stringList.get(i).length() - 8)); |
|
|
|
} else { |
|
|
|
vo.setVinNo(stringList.get(i)); |
|
|
|
} |
|
|
|
vo.setType(appOrderDetailsVo.getInvoiceType()); |
|
|
|
vo.setInvoicMoney(priceInfo.getSingleFinalPrice()); |
|
|
|
vo.setInvoicName(invoicName); |
|
|
|
invoicMessageContractVos.add(vo); |
|
|
|
} |
|
|
|
} |
|
|
@ -1538,10 +1666,15 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
CrmCustomerTempVo crmCustomerTempVo = crmResultBean.getData(); |
|
|
|
//身份证号
|
|
|
|
String idNo = crmCustomerTempVo.getIDNumber(); |
|
|
|
if (StringUtils.isBlank(idNo)) { |
|
|
|
return rb.setMsg("请先在客户洽谈的基础信息中补全客户的身份证号"); |
|
|
|
} |
|
|
|
//查询销售订单的车型信息
|
|
|
|
AppOrderModelInfoVo appOrderModelInfoVo = appOrderDetailsVo.getModelInfo(); |
|
|
|
//根据车型sid查询车型的全称
|
|
|
|
BaseVehicleModel baseVehicleModel = baseVehicleModelService.fetchBySid(appOrderModelInfoVo.getModelSid()); |
|
|
|
//车型
|
|
|
|
String modelName = "车型:" + appOrderModelInfoVo.getModelName() + "。"; |
|
|
|
String modelName = "车型:" + baseVehicleModel.getModelName() + "。"; |
|
|
|
//配置
|
|
|
|
String modelConfig = "配置:" + appOrderModelInfoVo.getConfig() + "。"; |
|
|
|
//上装
|
|
|
@ -1556,9 +1689,25 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
String num = priceInfo.getNumber(); |
|
|
|
//单台成交价
|
|
|
|
String transactionPrice = priceInfo.getSingleFinalPrice(); |
|
|
|
String remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。"; |
|
|
|
|
|
|
|
//优惠说明
|
|
|
|
//ToDo:
|
|
|
|
//ToDo:discountDetail
|
|
|
|
String discountDetail = ""; |
|
|
|
if (StringUtils.isNotBlank(appOrderDetailsVo.getTotaldiscount())) { |
|
|
|
List<AppOrderDiscountListVo> discountList = appOrderDetailsVo.getDiscountList(); |
|
|
|
discountDetail = "优惠说明:赠送价值" + appOrderDetailsVo.getTotaldiscount() + "元优惠包。包括"; |
|
|
|
for (int iii = 0; iii < discountList.size(); iii++) { |
|
|
|
AppOrderDiscountListVo vv = discountList.get(iii); |
|
|
|
String discountName = vv.getDiscountName(); |
|
|
|
if (iii == discountList.size() - 1) { |
|
|
|
discountDetail = discountDetail + "价值" + vv.getPrice() + "元" + discountName +vv.getNumber()+ "份(每份包含" + vv.getDiscountExplain()+")。"; |
|
|
|
} else { |
|
|
|
discountDetail = discountDetail + "价值" + vv.getPrice() + "元" + discountName +vv.getNumber()+ "份(每份包含" + vv.getDiscountExplain()+"),"; |
|
|
|
} |
|
|
|
} |
|
|
|
map.put("discountDetail", discountDetail); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//保险说明
|
|
|
|
String insuranceInfo = "保险说明:" + appOrderDetailsVo.getInsuranceInfo() + "。"; |
|
|
@ -1578,10 +1727,17 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
listResultBeanData.removeAll(Collections.singleton(null)); |
|
|
|
if (!listResultBeanData.isEmpty()) { |
|
|
|
String depositRemarks = "(其中乙方在"; |
|
|
|
for (BusDepositFictitiousDetailsVo v : listResultBeanData) { |
|
|
|
for (int ii = 0; ii < listResultBeanData.size(); ii++) { |
|
|
|
BusDepositFictitiousDetailsVo v = listResultBeanData.get(ii); |
|
|
|
if(ii == listResultBeanData.size()-1){ |
|
|
|
String b = v.getPaymentDate() + "转入甲方的" + v.getDeposit() + "元中的" + v.getPrice() + "元用于本次订金。"; |
|
|
|
depositRemarks = depositRemarks + b; |
|
|
|
}else{ |
|
|
|
String b = v.getPaymentDate() + "转入甲方的" + v.getDeposit() + "元中的" + v.getPrice() + "元用于本次订金,"; |
|
|
|
depositRemarks = depositRemarks + b; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
depositRemarks = depositRemarks + ")"; |
|
|
|
map.put("depositRemarks", depositRemarks); |
|
|
|
} |
|
|
@ -1589,10 +1745,10 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
//车辆交付地点
|
|
|
|
String address = priceInfo.getAddress(); |
|
|
|
//组装到文档相对应的字段中
|
|
|
|
/* ResultBean<FinCompanyInvoicingDetailsVo> invoicingDetailsVoResultBean = finCompanyInvoicingFeign.fetchDetailsByUseOrgSid(appOrderDetailsVo.getUseOrgSid()); |
|
|
|
ResultBean<FinCompanyInvoicingDetailsVo> invoicingDetailsVoResultBean = finCompanyInvoicingFeign.fetchDetailsByUseOrgSid(appOrderDetailsVo.getUseOrgSid()); |
|
|
|
if (invoicingDetailsVoResultBean.getData() != null) { |
|
|
|
map.put("createOrgName", invoicingDetailsVoResultBean.getData().getName()); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
return rb.setMsg("请先完善公司开票信息"); |
|
|
|
} |
|
|
|
map.put("customerName", customerName); |
|
|
@ -1600,14 +1756,13 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
map.put("idNo", idNo); |
|
|
|
map.put("modelName", modelName); |
|
|
|
map.put("modelConfig", modelConfig); |
|
|
|
map.put("remarks", remarks); |
|
|
|
if(appOrderDetailsVo.getInsuranceState()){ |
|
|
|
if ("1".equals(appOrderDetailsVo.getIsInsurance())) { |
|
|
|
map.put("insuranceInfo", insuranceInfo); |
|
|
|
} |
|
|
|
map.put("totalPrice", totalPrice); |
|
|
|
map.put("priceRemarks", priceRemarks); |
|
|
|
map.put("depositTotal", depositTotal); |
|
|
|
map.put("address", address);*/ |
|
|
|
map.put("address", address); |
|
|
|
//生成合同编号
|
|
|
|
String contractNo = getApplyCode(dto.getUserSid(), appOrderModelInfoVo.getModelSid()); |
|
|
|
map.put("contractNo", contractNo); |
|
|
@ -1618,36 +1773,20 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
ExecutorService pool = new ThreadPoolExecutor(2, 100, |
|
|
|
0L, TimeUnit.MILLISECONDS, |
|
|
|
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); |
|
|
|
Future<String> future1 = pool.submit(() -> { |
|
|
|
/* Future<String> future1 = pool.submit(() -> { |
|
|
|
return genCarSaleContract(dto, map, appOrderDetailsVo); |
|
|
|
}); |
|
|
|
Future<String> future1_2 = pool.submit(() -> { |
|
|
|
return genCarSaleContract2(dto, map, appOrderDetailsVo); |
|
|
|
});*/ |
|
|
|
PrintConfirmVo printConfirmVo = null; |
|
|
|
String urlAll = ""; |
|
|
|
/*if (StringUtils.isNotBlank(future1.get())) { |
|
|
|
printConfirmVo = new PrintConfirmVo(); |
|
|
|
if ("现车".equals(appOrderDetailsVo.getOrderType())) { |
|
|
|
printConfirmVo.setName(MessageFormat.format("《{0}》", ContractTemplateEnum.CARSALECONTRACTNEW.getName())); |
|
|
|
} else { |
|
|
|
printConfirmVo.setName(MessageFormat.format("《{0}》", ContractTemplateEnum.CARSALECONTRACTBOOK.getName())); |
|
|
|
} |
|
|
|
printConfirmVo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + future1.get()); |
|
|
|
list.add(printConfirmVo); |
|
|
|
url = future1.get(); |
|
|
|
} |
|
|
|
Future<String> future2 = pool.submit(() -> { |
|
|
|
/*Future<String> future2 = pool.submit(() -> { |
|
|
|
return genCarSaleContractBlank(dto, map, appOrderDetailsVo); |
|
|
|
}); |
|
|
|
if (StringUtils.isNotBlank(future2.get())) { |
|
|
|
printConfirmVo = new PrintConfirmVo(); |
|
|
|
if ("现车".equals(appOrderDetailsVo.getOrderType())) { |
|
|
|
printConfirmVo.setName(MessageFormat.format("《{0}》", ContractTemplateEnum.CARSALECONTRACTNEWBLANK.getName())); |
|
|
|
} else { |
|
|
|
printConfirmVo.setName(MessageFormat.format("《{0}》", ContractTemplateEnum.CARSALECONTRACTBOOKBLANK.getName())); |
|
|
|
} |
|
|
|
printConfirmVo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + future2.get()); |
|
|
|
list.add(printConfirmVo); |
|
|
|
url = url + "," + future2.get(); |
|
|
|
} |
|
|
|
Future<String> future2_2 = pool.submit(() -> { |
|
|
|
return genCarSaleContractBlank2(dto, map, appOrderDetailsVo); |
|
|
|
}); |
|
|
|
//接收车辆委托书
|
|
|
|
Future<String> future4 = pool.submit(() -> { |
|
|
|
return getReceiveCar(map, appOrderDetailsVo); |
|
|
@ -1674,6 +1813,30 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
}); |
|
|
|
} |
|
|
|
List<File> filesList = new ArrayList<>(); |
|
|
|
if (future1 != null) { |
|
|
|
if (StringUtils.isNotBlank(future1.get())) { |
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + future1.get()); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
} |
|
|
|
if (future1_2 != null) { |
|
|
|
if (StringUtils.isNotBlank(future1_2.get())) { |
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + future1_2.get()); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
} |
|
|
|
if (future2 != null) { |
|
|
|
if (StringUtils.isNotBlank(future2.get())) { |
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + future2.get()); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
} |
|
|
|
if (future2_2 != null) { |
|
|
|
if (StringUtils.isNotBlank(future2_2.get())) { |
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + future2_2.get()); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
} |
|
|
|
//合并pdf文件
|
|
|
|
if (future8 != null) { |
|
|
|
if (StringUtils.isNotBlank(future8.get())) { |
|
|
@ -1689,7 +1852,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + future5.get()); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
if(future6 != null){ |
|
|
|
if (future6 != null) { |
|
|
|
if (StringUtils.isNotBlank(future6.get())) { |
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + future6.get()); |
|
|
|
filesList.add(file); |
|
|
@ -1867,15 +2030,15 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
//查询是否是结转金额,如果是,则订金金额为补交金额/台数。若为现金则为单台订金
|
|
|
|
String key = depositInfo.getDepositTypeKey(); |
|
|
|
BigDecimal bigDecimalKeyAll = new BigDecimal("0"); |
|
|
|
if("02".equals(key)){ |
|
|
|
if ("02".equals(key)) { |
|
|
|
String makeUpAll = depositInfo.getMakeUpDeposit(); |
|
|
|
if(makeUpAll != null){ |
|
|
|
if (makeUpAll != null) { |
|
|
|
bigDecimalKeyAll = bigDecimalKeyAll.add(new BigDecimal(makeUpAll).divide(new BigDecimal(num))); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
bigDecimalKeyAll = bigDecimalKeyAll.add(new BigDecimal(depositInfo.getDeposit())); |
|
|
|
} |
|
|
|
if(bigDecimalKeyAll.compareTo(BigDecimal.ZERO) != 0){ |
|
|
|
if (bigDecimalKeyAll.compareTo(BigDecimal.ZERO) != 0) { |
|
|
|
for (int i = 0; i < vinList.size(); i++) { |
|
|
|
UnCollectionDto unCollectionDto = new UnCollectionDto(); |
|
|
|
//合同sid
|
|
|
@ -2187,8 +2350,8 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
QueryWrapper<CommonContract> qw = new QueryWrapper<>(); |
|
|
|
SysUserVo sysUserVo = sysUserFeign.fetchBySid(params.getUserSid()).getData(); |
|
|
|
String staffSid = sysUserVo.getStaffSid(); |
|
|
|
qw.eq("staffSid",staffSid); |
|
|
|
if (StringUtils.isNotBlank(params.getNames())){ |
|
|
|
qw.eq("staffSid", staffSid); |
|
|
|
if (StringUtils.isNotBlank(params.getNames())) { |
|
|
|
qw.and(wrapper -> wrapper.like("contractNo", params.getNames()).or().like("partyB", params.getNames())); |
|
|
|
} |
|
|
|
IPage<CommonContract> page = PagerUtil.queryToPage(query); |
|
|
|