|
|
@ -164,6 +164,7 @@ import com.yxt.anrui.riskcenter.api.loansolutionsotherpolicy.LoanSolutionsOtherp |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutionsotherpolicy.LoanSolutionsOtherpolicyFeign; |
|
|
|
import com.yxt.anrui.scm.api.scmwarehouse.ScmWarehouseFeign; |
|
|
|
import com.yxt.anrui.scm.api.scmwarehouse.ScmWarehouseVo; |
|
|
|
import com.yxt.common.base.config.component.DocPdfComponent; |
|
|
|
import com.yxt.common.base.config.component.FileUploadComponent; |
|
|
|
import com.yxt.common.base.service.MybatisBaseService; |
|
|
|
import com.yxt.common.base.utils.Base64; |
|
|
@ -311,6 +312,8 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
private FinUncollectedReceivablesDetailedFeign finUncollectedReceivablesDetailedFeign; |
|
|
|
@Autowired |
|
|
|
private BaseDiscountpackageFeign baseDiscountpackageFeign; |
|
|
|
@Autowired |
|
|
|
private DocPdfComponent docPdfComponent; |
|
|
|
|
|
|
|
/** |
|
|
|
* 构造查询条件 |
|
|
@ -395,7 +398,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
//包含采购系统的车架号
|
|
|
|
List<String> vinList = vinLists.stream().map(v -> v.getVinNo()).collect(Collectors.toList()); |
|
|
|
List<String> orderVinList = busSalesOrderVehicleService.selectList(sid); |
|
|
|
if(!vinList.isEmpty()){ |
|
|
|
if (!vinList.isEmpty()) { |
|
|
|
for (int i = 0; i < vinLists.size(); i++) { |
|
|
|
VinListsVo vinListsVo = vinLists.get(i); |
|
|
|
BigDecimal initBigDecimalTwo = BigDecimal.ZERO; |
|
|
@ -405,8 +408,8 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
List<String> stringList = listResultBean.getData(); |
|
|
|
initBigDecimalTwo = initBigDecimalTwo.add(stringList.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add)); |
|
|
|
} |
|
|
|
if(initBigDecimalTwo.compareTo(BigDecimal.ZERO) != 0){ |
|
|
|
vinList.set(i,vinList.get(i)+"促销("+initBigDecimalTwo.toString()+"元)"); |
|
|
|
if (initBigDecimalTwo.compareTo(BigDecimal.ZERO) != 0) { |
|
|
|
vinList.set(i, vinList.get(i) + "促销(" + initBigDecimalTwo.toString() + "元)"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1310,7 +1313,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(!initBigDecimalOneList.isEmpty()){ |
|
|
|
if (!initBigDecimalOneList.isEmpty()) { |
|
|
|
String initOne = Collections.min(initBigDecimalOneList); |
|
|
|
initBigDecimalOne = new BigDecimal(initOne); |
|
|
|
} |
|
|
@ -2269,9 +2272,9 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
ResultBean<List<String>> listResultBean = baseDiscountpackageFeign.getMoney(vehicleOrderVo.getCarSid(), busSalesOrder.getUseOrgSid()); |
|
|
|
if (listResultBean.getSuccess()) { |
|
|
|
List<String> stringList = listResultBean.getData(); |
|
|
|
if(stringList.isEmpty()){ |
|
|
|
if (stringList.isEmpty()) { |
|
|
|
appNowCarVo.setPromotion(false); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
appNowCarVo.setPromotion(true); |
|
|
|
} |
|
|
|
} |
|
|
@ -2599,9 +2602,9 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
ResultBean<List<String>> listResultBean = baseDiscountpackageFeign.getMoney(vehicleOrderVo.getCarSid(), busSalesOrder.getUseOrgSid()); |
|
|
|
if (listResultBean.getSuccess()) { |
|
|
|
List<String> stringList = listResultBean.getData(); |
|
|
|
if(stringList.isEmpty()){ |
|
|
|
if (stringList.isEmpty()) { |
|
|
|
appNowCarVo.setPromotion(false); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
appNowCarVo.setPromotion(true); |
|
|
|
} |
|
|
|
} |
|
|
@ -3382,7 +3385,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
//包含采购系统的车架号
|
|
|
|
List<String> vinList = vinLists.stream().map(v -> v.getVinNo()).collect(Collectors.toList()); |
|
|
|
List<String> orderVinList = busSalesOrderVehicleService.selectList(sid); |
|
|
|
if(!vinList.isEmpty()){ |
|
|
|
if (!vinList.isEmpty()) { |
|
|
|
for (int i = 0; i < vinLists.size(); i++) { |
|
|
|
VinListsVo vinListsVo = vinLists.get(i); |
|
|
|
BigDecimal initBigDecimalTwo = BigDecimal.ZERO; |
|
|
@ -3392,8 +3395,8 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
List<String> stringList = listResultBean.getData(); |
|
|
|
initBigDecimalTwo = initBigDecimalTwo.add(stringList.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add)); |
|
|
|
} |
|
|
|
if(initBigDecimalTwo.compareTo(BigDecimal.ZERO) != 0){ |
|
|
|
vinList.set(i,vinList.get(i)+",促销("+initBigDecimalTwo.toString()+"元)"); |
|
|
|
if (initBigDecimalTwo.compareTo(BigDecimal.ZERO) != 0) { |
|
|
|
vinList.set(i, vinList.get(i) + ",促销(" + initBigDecimalTwo.toString() + "元)"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -4030,9 +4033,9 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(loanDownPayValue.toString(), 1, 0, false)); |
|
|
|
StringBuilder downPayAmountsRatioValue = new StringBuilder(); |
|
|
|
if(StringUtils.isNotBlank(solutionsDetailsVo.getDownPayAmountsRatio())){ |
|
|
|
if (StringUtils.isNotBlank(solutionsDetailsVo.getDownPayAmountsRatio())) { |
|
|
|
downPayAmountsRatioValue = downPayAmountsRatioValue.append("实际首付比例:").append(solutionsDetailsVo.getDownPayAmountsRatio()); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
downPayAmountsRatioValue = downPayAmountsRatioValue.append("实际首付比例:").append("-"); |
|
|
|
} |
|
|
|
list.add(getValueSpanSize(downPayAmountsRatioValue.toString(), 1, 0, false)); |
|
|
@ -5890,10 +5893,26 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
qw.like("ls.factoryDiscount", pagerQuery.getFactoryDiscount()); |
|
|
|
} |
|
|
|
String typeState = "getSaleOrdersByOrgPath";//查询接口的标识
|
|
|
|
String urlPrefix = docPdfComponent.getPrefixTemplateUrl(); |
|
|
|
String temp = "/template/"; |
|
|
|
IPage<AppBusSalesOrderVo> pagging = baseMapper.getSaleOrdersByOrgPath(page, qw, pq.getParams().getName(), typeState, pagerQuery.getVinNo(), pagerQuery.getOrderingNo()); |
|
|
|
for (AppBusSalesOrderVo record : pagging.getRecords()) { |
|
|
|
record.setShowStopBtn(false); |
|
|
|
record.setShowContractBtn(false); |
|
|
|
record.setShowContractBtn2(false); |
|
|
|
//判断该合同是否有下载附件
|
|
|
|
if (StringUtils.isNotBlank(record.getContractId())) { |
|
|
|
String contractId = record.getContractId(); |
|
|
|
CommonContract contract = commonContractFeign.selectByNo(contractId).getData(); |
|
|
|
if (null != contract) { |
|
|
|
if (StringUtils.isNotBlank(contract.getContractUrlAll())) { |
|
|
|
record.setShowContractBtn2(true); |
|
|
|
record.setContractPath(urlPrefix + contract.getContractUrlAll()); |
|
|
|
record.setContractFilePath(temp + contract.getContractUrlAll()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(record.getCustomerImage())) { |
|
|
|
record.setCustomerImage(fileUploadComponent.getUrlPrefix() + record.getCustomerImage()); |
|
|
|
} |
|
|
@ -6186,7 +6205,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
List<BusSalesOrderVehicle> busSalesOrderVehicles = busSalesOrderVehicleService.selectByOrderSid(sid); |
|
|
|
if (!busSalesOrderVehicles.isEmpty()) { |
|
|
|
for (BusSalesOrderVehicle busSalesOrderVehicle : busSalesOrderVehicles) { |
|
|
|
if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())){ |
|
|
|
if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) { |
|
|
|
vinNo = vinNo + busSalesOrderVehicle.getLinkNo() + ","; |
|
|
|
} |
|
|
|
} |
|
|
@ -6793,7 +6812,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
|
|
|
|
public ResultBean saveContractOne(String sid) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
BusSalesOrder busSalesOrder= fetchBySid(sid); |
|
|
|
BusSalesOrder busSalesOrder = fetchBySid(sid); |
|
|
|
//查询是否有合同,如果没有则生成合同
|
|
|
|
OrderContractQuery orderContractQuery = new OrderContractQuery(); |
|
|
|
orderContractQuery.setSid(sid); |
|
|
|