diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java index 31a9c4e3df..ce1557f7c4 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java @@ -37,6 +37,10 @@ import com.yxt.anrui.buscenter.api.bussalesorder.app.order.*; import com.yxt.anrui.buscenter.api.bussalesorder.app.vin.VinListsVo; import com.yxt.anrui.buscenter.api.bussalesorderdiscount.BusSalesOrderDiscountFeign; import com.yxt.anrui.buscenter.api.bussalesorderdiscount.app.AppBusSalesOrderDiscountListVo; +import com.yxt.anrui.buscenter.api.bussalesorderprice.BusSalesOrderPriceFeign; +import com.yxt.anrui.buscenter.api.bussalesorderprice.app.AppBusSalesOrderPriceVo; +import com.yxt.anrui.buscenter.api.bussalesordertrailer.BusSalesOrderTrailerDetailsVo; +import com.yxt.anrui.buscenter.api.bussalesordertrailer.BusSalesOrderTrailerFeign; import com.yxt.anrui.buscenter.api.bussalesordervehicle.*; import com.yxt.anrui.buscenter.api.busvehicleinformation.BusVehicleInformation; import com.yxt.anrui.buscenter.api.busvehicleinformation.BusVehicleInformationFeign; @@ -206,6 +210,10 @@ public class CommonContractService extends MybatisBaseService createQueryWrapper(CommonContractQuery query) { @@ -903,15 +911,59 @@ public class CommonContractService extends MybatisBaseService data = busSalesOrderTrailerFeign.fetchDetailsByOrderSid(dto.getBusSid()).getData(); + AppBusSalesOrderPriceVo appBusSalesOrderPriceVo = busSalesOrderPriceFeign.getPriceInfo(dto.getBusSid()).getData(); + if (data.size() == 1){ + map.put("trailerName1", "挂车:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + //单台主车对应挂车总价 + BigDecimal gcPrice = data.get(0).getSingleFinalPrice().multiply(new BigDecimal(data.get(0).getTrailerCount())); + //单台主车加挂车总价 + BigDecimal zcPrice = new BigDecimal(appBusSalesOrderPriceVo.getOverallPrice()).add(gcPrice); + //主车总价 + BigDecimal totalPrice = zcPrice.multiply(new BigDecimal(appBusSalesOrderPriceVo.getNumber())); + //车价合计 + map.put("totalPrice",totalPrice.toString()); + //车价合计大写 + String priceRemarks = ""; + if (StringUtils.isNotBlank(totalPrice.toString())) { + priceRemarks = TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(totalPrice.toString()).doubleValue())); + } + map.put("priceRemarks", priceRemarks); + }else if (data.size() == 2){ + map.put("trailerName1", "挂车1:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + map.put("trailerName2", "挂车2:外廓尺寸-长" + data.get(1).getAppearanceSizeLong() + "m," + data.get(1).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice2","数量:" + data.get(1).getTrailerCount() + "台,单台成交价:" + data.get(1).getSingleFinalPrice() + "元。"); + //单台主车对应挂车1总价 + BigDecimal gc1Price = data.get(0).getSingleFinalPrice().multiply(new BigDecimal(data.get(0).getTrailerCount())); + //单台主车对应挂车2总价 + BigDecimal gc2Price = data.get(1).getSingleFinalPrice().multiply(new BigDecimal(data.get(1).getTrailerCount())); + //单台主车加挂车总价 + BigDecimal zcPrice = new BigDecimal(appBusSalesOrderPriceVo.getOverallPrice()).add(gc1Price).add(gc2Price); + //主车总价 + BigDecimal totalPrice = zcPrice.multiply(new BigDecimal(appBusSalesOrderPriceVo.getNumber())); + //车价合计 + map.put("totalPrice",totalPrice.toString()); + //车价合计大写 + String priceRemarks = ""; + if (StringUtils.isNotBlank(totalPrice.toString())) { + priceRemarks = TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(totalPrice.toString()).doubleValue())); + } + map.put("priceRemarks", priceRemarks); + }else { + //主车总价 + BigDecimal totalPrice = new BigDecimal(appBusSalesOrderPriceVo.getOverallPrice()).multiply(new BigDecimal(appBusSalesOrderPriceVo.getNumber())); + //车价合计 + map.put("totalPrice",totalPrice.toString()); + //车价合计大写 + String priceRemarks = ""; + if (StringUtils.isNotBlank(totalPrice.toString())) { + priceRemarks = TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(totalPrice.toString()).doubleValue())); + } + map.put("priceRemarks", priceRemarks); } - map.put("priceRemarks", priceRemarks); //订金合计 AppOrderDepositInfoVo depositInfo = appOrderDetailsVo.getDepositInfo(); String depositTotal = new BigDecimal(depositInfo.getDeposit()).multiply(new BigDecimal(num)).toString(); @@ -920,6 +972,8 @@ public class CommonContractService extends MybatisBaseService data = busSalesOrderTrailerFeign.fetchDetailsByOrderSid(dto.getBusSid()).getData(); + AppBusSalesOrderPriceVo appBusSalesOrderPriceVo = busSalesOrderPriceFeign.getPriceInfo(dto.getBusSid()).getData(); + if (data.size() == 1){ + map.put("trailerName1", "挂车:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + //单台主车对应挂车总价 + BigDecimal gcPrice = data.get(0).getSingleFinalPrice().multiply(new BigDecimal(data.get(0).getTrailerCount())); + //单台主车加挂车总价 + BigDecimal zcPrice = new BigDecimal(appBusSalesOrderPriceVo.getOverallPrice()).add(gcPrice); + //主车总价 + BigDecimal totalPrice = zcPrice.multiply(new BigDecimal(appBusSalesOrderPriceVo.getNumber())); + //车价合计 + map.put("totalPrice",totalPrice.toString()); + //车价合计大写 + String priceRemarks = ""; + if (StringUtils.isNotBlank(totalPrice.toString())) { + priceRemarks = TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(totalPrice.toString()).doubleValue())); + } + map.put("priceRemarks", priceRemarks); + }else if (data.size() == 2){ + map.put("trailerName1", "挂车1:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + map.put("trailerName2", "挂车2:外廓尺寸-长" + data.get(1).getAppearanceSizeLong() + "m," + data.get(1).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice2","数量:" + data.get(1).getTrailerCount() + "台,单台成交价:" + data.get(1).getSingleFinalPrice() + "元。"); + //单台主车对应挂车1总价 + BigDecimal gc1Price = data.get(0).getSingleFinalPrice().multiply(new BigDecimal(data.get(0).getTrailerCount())); + //单台主车对应挂车2总价 + BigDecimal gc2Price = data.get(1).getSingleFinalPrice().multiply(new BigDecimal(data.get(1).getTrailerCount())); + //单台主车加挂车总价 + BigDecimal zcPrice = new BigDecimal(appBusSalesOrderPriceVo.getOverallPrice()).add(gc1Price).add(gc2Price); + //主车总价 + BigDecimal totalPrice = zcPrice.multiply(new BigDecimal(appBusSalesOrderPriceVo.getNumber())); + //车价合计 + map.put("totalPrice",totalPrice.toString()); + //车价合计大写 + String priceRemarks = ""; + if (StringUtils.isNotBlank(totalPrice.toString())) { + priceRemarks = TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(totalPrice.toString()).doubleValue())); + } + map.put("priceRemarks", priceRemarks); + }else { + //主车总价 + BigDecimal totalPrice = new BigDecimal(appBusSalesOrderPriceVo.getOverallPrice()).multiply(new BigDecimal(appBusSalesOrderPriceVo.getNumber())); + //车价合计 + map.put("totalPrice",totalPrice.toString()); + //车价合计大写 + String priceRemarks = ""; + if (StringUtils.isNotBlank(totalPrice.toString())) { + priceRemarks = TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(totalPrice.toString()).doubleValue())); + } + map.put("priceRemarks", priceRemarks); } - map.put("priceRemarks", priceRemarks); //订金合计 AppOrderDepositInfoVo depositInfo = appOrderDetailsVo.getDepositInfo(); String depositTotal = new BigDecimal(depositInfo.getDeposit()).multiply(new BigDecimal(num)).toString(); @@ -1056,6 +1154,8 @@ public class CommonContractService extends MybatisBaseService data = busSalesOrderTrailerFeign.fetchDetailsByOrderSid(dto.getBusSid()).getData(); + AppBusSalesOrderPriceVo appBusSalesOrderPriceVo = busSalesOrderPriceFeign.getPriceInfo(dto.getBusSid()).getData(); + if (data.size() == 1){ + map.put("trailerName1", "挂车:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + }else if (data.size() == 2){ + map.put("trailerName1", "挂车1:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + map.put("trailerName2", "挂车2:外廓尺寸-长" + data.get(1).getAppearanceSizeLong() + "m," + data.get(1).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice2","数量:" + data.get(1).getTrailerCount() + "台,单台成交价:" + data.get(1).getSingleFinalPrice() + "元。"); + } InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); //生成word文件名 String targetPath = docPdfComponent.getUploadTemplateUrl(); @@ -1233,6 +1345,18 @@ public class CommonContractService extends MybatisBaseService data = busSalesOrderTrailerFeign.fetchDetailsByOrderSid(dto.getBusSid()).getData(); + AppBusSalesOrderPriceVo appBusSalesOrderPriceVo = busSalesOrderPriceFeign.getPriceInfo(dto.getBusSid()).getData(); + if (data.size() == 1){ + map.put("trailerName1", "挂车:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + }else if (data.size() == 2){ + map.put("trailerName1", "挂车1:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + map.put("trailerName2", "挂车2:外廓尺寸-长" + data.get(1).getAppearanceSizeLong() + "m," + data.get(1).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice2","数量:" + data.get(1).getTrailerCount() + "台,单台成交价:" + data.get(1).getSingleFinalPrice() + "元。"); + } InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); //生成word文件名 String targetPath = docPdfComponent.getUploadTemplateUrl(); @@ -1322,6 +1446,18 @@ public class CommonContractService extends MybatisBaseService data = busSalesOrderTrailerFeign.fetchDetailsByOrderSid(dto.getBusSid()).getData(); + AppBusSalesOrderPriceVo appBusSalesOrderPriceVo = busSalesOrderPriceFeign.getPriceInfo(dto.getBusSid()).getData(); + if (data.size() == 1){ + map.put("trailerName1", "挂车:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + }else if (data.size() == 2){ + map.put("trailerName1", "挂车1:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + map.put("trailerName2", "挂车2:外廓尺寸-长" + data.get(1).getAppearanceSizeLong() + "m," + data.get(1).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice2","数量:" + data.get(1).getTrailerCount() + "台,单台成交价:" + data.get(1).getSingleFinalPrice() + "元。"); + } InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); //生成word文件名 String targetPath = docPdfComponent.getUploadTemplateUrl(); @@ -1412,6 +1548,18 @@ public class CommonContractService extends MybatisBaseService data = busSalesOrderTrailerFeign.fetchDetailsByOrderSid(dto.getBusSid()).getData(); + AppBusSalesOrderPriceVo appBusSalesOrderPriceVo = busSalesOrderPriceFeign.getPriceInfo(dto.getBusSid()).getData(); + if (data.size() == 1){ + map.put("trailerName1", "挂车:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + }else if (data.size() == 2){ + map.put("trailerName1", "挂车1:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + map.put("trailerName2", "挂车2:外廓尺寸-长" + data.get(1).getAppearanceSizeLong() + "m," + data.get(1).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice2","数量:" + data.get(1).getTrailerCount() + "台,单台成交价:" + data.get(1).getSingleFinalPrice() + "元。"); + } InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); //生成word文件名 String targetPath = docPdfComponent.getUploadTemplateUrl(); @@ -1756,15 +1904,59 @@ public class CommonContractService extends MybatisBaseService data = busSalesOrderTrailerFeign.fetchDetailsByOrderSid(dto.getBusSid()).getData(); + AppBusSalesOrderPriceVo appBusSalesOrderPriceVo = busSalesOrderPriceFeign.getPriceInfo(dto.getBusSid()).getData(); + if (data.size() == 1){ + map.put("trailerName1", "挂车:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + //单台主车对应挂车总价 + BigDecimal gcPrice = data.get(0).getSingleFinalPrice().multiply(new BigDecimal(data.get(0).getTrailerCount())); + //单台主车加挂车总价 + BigDecimal zcPrice = new BigDecimal(appBusSalesOrderPriceVo.getOverallPrice()).add(gcPrice); + //主车总价 + BigDecimal totalPrice = zcPrice.multiply(new BigDecimal(appBusSalesOrderPriceVo.getNumber())); + //车价合计 + map.put("totalPrice",totalPrice.toString()); + //车价合计大写 + String priceRemarks = ""; + if (StringUtils.isNotBlank(totalPrice.toString())) { + priceRemarks = TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(totalPrice.toString()).doubleValue())); + } + map.put("priceRemarks", priceRemarks); + }else if (data.size() == 2){ + map.put("trailerName1", "挂车1:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + map.put("trailerName2", "挂车2:外廓尺寸-长" + data.get(1).getAppearanceSizeLong() + "m," + data.get(1).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice2","数量:" + data.get(1).getTrailerCount() + "台,单台成交价:" + data.get(1).getSingleFinalPrice() + "元。"); + //单台主车对应挂车1总价 + BigDecimal gc1Price = data.get(0).getSingleFinalPrice().multiply(new BigDecimal(data.get(0).getTrailerCount())); + //单台主车对应挂车2总价 + BigDecimal gc2Price = data.get(1).getSingleFinalPrice().multiply(new BigDecimal(data.get(1).getTrailerCount())); + //单台主车加挂车总价 + BigDecimal zcPrice = new BigDecimal(appBusSalesOrderPriceVo.getOverallPrice()).add(gc1Price).add(gc2Price); + //主车总价 + BigDecimal totalPrice = zcPrice.multiply(new BigDecimal(appBusSalesOrderPriceVo.getNumber())); + //车价合计 + map.put("totalPrice",totalPrice.toString()); + //车价合计大写 + String priceRemarks = ""; + if (StringUtils.isNotBlank(totalPrice.toString())) { + priceRemarks = TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(totalPrice.toString()).doubleValue())); + } + map.put("priceRemarks", priceRemarks); + }else { + //主车总价 + BigDecimal totalPrice = new BigDecimal(appBusSalesOrderPriceVo.getOverallPrice()).multiply(new BigDecimal(appBusSalesOrderPriceVo.getNumber())); + //车价合计 + map.put("totalPrice",totalPrice.toString()); + //车价合计大写 + String priceRemarks = ""; + if (StringUtils.isNotBlank(totalPrice.toString())) { + priceRemarks = TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(totalPrice.toString()).doubleValue())); + } + map.put("priceRemarks", priceRemarks); } - map.put("priceRemarks", priceRemarks); //订金合计 AppOrderDepositInfoVo depositInfo = appOrderDetailsVo.getDepositInfo(); String depositTotal = new BigDecimal(depositInfo.getDeposit()).multiply(new BigDecimal(num)).toString(); @@ -1773,6 +1965,8 @@ public class CommonContractService extends MybatisBaseService data = busSalesOrderTrailerFeign.fetchDetailsByOrderSid(dto.getBusSid()).getData(); + AppBusSalesOrderPriceVo appBusSalesOrderPriceVo = busSalesOrderPriceFeign.getPriceInfo(dto.getBusSid()).getData(); + if (data.size() == 1){ + map.put("trailerName1", "挂车:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + //单台主车对应挂车总价 + BigDecimal gcPrice = data.get(0).getSingleFinalPrice().multiply(new BigDecimal(data.get(0).getTrailerCount())); + //单台主车加挂车总价 + BigDecimal zcPrice = new BigDecimal(appBusSalesOrderPriceVo.getOverallPrice()).add(gcPrice); + //主车总价 + BigDecimal totalPrice = zcPrice.multiply(new BigDecimal(appBusSalesOrderPriceVo.getNumber())); + //车价合计 + map.put("totalPrice",totalPrice.toString()); + //车价合计大写 + String priceRemarks = ""; + if (StringUtils.isNotBlank(totalPrice.toString())) { + priceRemarks = TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(totalPrice.toString()).doubleValue())); + } + map.put("priceRemarks", priceRemarks); + }else if (data.size() == 2){ + map.put("trailerName1", "挂车1:外廓尺寸-长" + data.get(0).getAppearanceSizeLong() + "m," + data.get(0).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice1","数量:" + data.get(0).getTrailerCount() + "台,单台成交价:" + data.get(0).getSingleFinalPrice() + "元。"); + map.put("trailerName2", "挂车2:外廓尺寸-长" + data.get(1).getAppearanceSizeLong() + "m," + data.get(1).getTrailerTypeValue() + "。"); + map.put("trailerNumAndPrice2","数量:" + data.get(1).getTrailerCount() + "台,单台成交价:" + data.get(1).getSingleFinalPrice() + "元。"); + //单台主车对应挂车1总价 + BigDecimal gc1Price = data.get(0).getSingleFinalPrice().multiply(new BigDecimal(data.get(0).getTrailerCount())); + //单台主车对应挂车2总价 + BigDecimal gc2Price = data.get(1).getSingleFinalPrice().multiply(new BigDecimal(data.get(1).getTrailerCount())); + //单台主车加挂车总价 + BigDecimal zcPrice = new BigDecimal(appBusSalesOrderPriceVo.getOverallPrice()).add(gc1Price).add(gc2Price); + //主车总价 + BigDecimal totalPrice = zcPrice.multiply(new BigDecimal(appBusSalesOrderPriceVo.getNumber())); + //车价合计 + map.put("totalPrice",totalPrice.toString()); + //车价合计大写 + String priceRemarks = ""; + if (StringUtils.isNotBlank(totalPrice.toString())) { + priceRemarks = TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(totalPrice.toString()).doubleValue())); + } + map.put("priceRemarks", priceRemarks); + }else { + //主车总价 + BigDecimal totalPrice = new BigDecimal(appBusSalesOrderPriceVo.getOverallPrice()).multiply(new BigDecimal(appBusSalesOrderPriceVo.getNumber())); + //车价合计 + map.put("totalPrice",totalPrice.toString()); + //车价合计大写 + String priceRemarks = ""; + if (StringUtils.isNotBlank(totalPrice.toString())) { + priceRemarks = TransformMoney.transform(TransformMoney.getDecimalStr(Double.valueOf(totalPrice.toString()).doubleValue())); + } + map.put("priceRemarks", priceRemarks); } - map.put("priceRemarks", priceRemarks); //订金合计 AppOrderDepositInfoVo depositInfo = appOrderDetailsVo.getDepositInfo(); String depositTotal = new BigDecimal(depositInfo.getDeposit()).multiply(new BigDecimal(num)).toString(); @@ -1888,6 +2126,8 @@ public class CommonContractService extends MybatisBaseService 2) { + throw new IllegalArgumentException("人民币大写转换BigDecimal只能保留2位小数"); + } else { + sb.append("元"); + char[] chars1 = arr[1].toCharArray(); + for (int i = 0; i < chars1.length; ++i) { + sb.append(numChinese[Integer.valueOf(String.valueOf(chars1[i])).intValue()]).append(afterChinese[i]); + } + return sb.toString(); + } + } } \ No newline at end of file diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/dai_existingvehicles.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/dai_existingvehicles.ftl index ae07944817..95492fb290 100644 --- a/anrui-base/anrui-base-biz/src/main/resources/ftl/dai_existingvehicles.ftl +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/dai_existingvehicles.ftl @@ -1155,7 +1155,7 @@ <#if carSaleCustomerName??> ${carSaleCustomerName!} <#else> - + @@ -1223,7 +1223,7 @@ <#if carSaleIdNo??> ${carSaleIdNo!} <#else> - + @@ -1292,7 +1292,7 @@ <#if carSaleAddr??> ${carSaleAddr!} <#else> - + @@ -1463,212 +1463,286 @@ <#if modelName??> - - - - - - - - - - - - - - - - - - - - - ${modelName!} - - + + + + + + + + + + + + + + + + + + + + + ${modelName!} + + <#if modelConfig??> - - - - - - - - - - - - - - - - - - - - - ${modelConfig!} - - + + + + + + + + + + + + + + + + + + + + + ${modelConfig!} + + <#if modelConfigs??> - - - - - - - - - - - - - - - - - - - - - ${modelConfigs!} - - + + + + + + + + + + + + + + + + + + + + + ${modelConfigs!} + + <#if publicModel??> - - - - - - - - - - - - - - - - - - - - - ${publicModel!} - - + + + + + + + + + + + + + + + + + + + + + ${publicModel!} + + <#if topName??> - - - - - - - - - - - - - - - - - - - - - ${topName!} - - - - <#if trailerName??> - - - - - - - - - - - - - - - - - - - - - ${trailerName!} - - + + + + + + + + + + + + + + + + + + + + + ${topName!} + + <#if remarks??> - - - - - - - - - - - - - - - - - - - - - ${remarks!} - - + + + + + + + + + + + + + + + + + + + + + ${remarks!} + + + + <#if trailerName1??> + + + + + + + + + + + + + + + + + + + + + ${trailerName1!} + + + + + + + + + + + + + + + + + + + + + + + ${trailerNumAndPrice1!} + + + + <#if trailerName2??> + + + + + + + + + + + + + + + + + + + + + ${trailerName2!} + + + + + + + + + + + + + + + + + + + + + + + ${trailerNumAndPrice2!} + + <#if discountDetail??> - - - - - - - - - - - - - - - - - - - - - ${discountDetail!} - - + + + + + + + + + + + + + + + + + + + + + ${discountDetail!} + + @@ -2541,7 +2615,7 @@ - + @@ -2799,7 +2873,7 @@ - + diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/dai_existingvehicles_black.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/dai_existingvehicles_black.ftl index 4411dd03e5..21ce5d2d00 100644 --- a/anrui-base/anrui-base-biz/src/main/resources/ftl/dai_existingvehicles_black.ftl +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/dai_existingvehicles_black.ftl @@ -1151,7 +1151,7 @@ - + @@ -1214,7 +1214,7 @@ - + @@ -1278,7 +1278,7 @@ - + @@ -1448,212 +1448,286 @@ <#if modelName??> - - - - - - - - - - - - - - - - - - - - - ${modelName!} - - + + + + + + + + + + + + + + + + + + + + + ${modelName!} + + <#if modelConfig??> - - - - - - - - - - - - - - - - - - - - - ${modelConfig!} - - + + + + + + + + + + + + + + + + + + + + + ${modelConfig!} + + <#if modelConfigs??> - - - - - - - - - - - - - - - - - - - - - ${modelConfigs!} - - + + + + + + + + + + + + + + + + + + + + + ${modelConfigs!} + + <#if publicModel??> - - - - - - - - - - - - - - - - - - - - - ${publicModel!} - - + + + + + + + + + + + + + + + + + + + + + ${publicModel!} + + <#if topName??> - - - - - - - - - - - - - - - - - - - - - ${topName!} - - - - <#if trailerName??> - - - - - - - - - - - - - - - - - - - - - ${trailerName!} - - + + + + + + + + + + + + + + + + + + + + + ${topName!} + + <#if remarks??> - - - - - - - - - - - - - - - - - - - - - ${remarks!} - - + + + + + + + + + + + + + + + + + + + + + ${remarks!} + + + + <#if trailerName1??> + + + + + + + + + + + + + + + + + + + + + ${trailerName1!} + + + + + + + + + + + + + + + + + + + + + + + ${trailerNumAndPrice1!} + + + + <#if trailerName2??> + + + + + + + + + + + + + + + + + + + + + ${trailerName2!} + + + + + + + + + + + + + + + + + + + + + + + ${trailerNumAndPrice2!} + + <#if discountDetail??> - - - - - - - - - - - - - - - - - - - - - ${discountDetail!} - - + + + + + + + + + + + + + + + + + + + + + ${discountDetail!} + + @@ -2526,7 +2600,7 @@ - + @@ -2784,7 +2858,7 @@ - + diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles.ftl index ad8b50bc6e..3b33e849a6 100644 --- a/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles.ftl +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles.ftl @@ -1444,30 +1444,6 @@ - <#if trailerName??> - - - - - - - - - - - - - - - - - - - ${trailerName!} - - - <#if remarks??> @@ -1492,6 +1468,98 @@ + <#if trailerName1??> + + + + + + + + + + + + + + + + + + + ${trailerName1!} + + + + + + + + + + + + + + + + + + + + + ${trailerNumAndPrice1!} + + + + <#if trailerName2??> + + + + + + + + + + + + + + + + + + + ${trailerName2!} + + + + + + + + + + + + + + + + + + + + + ${trailerNumAndPrice2!} + + + <#if discountDetail??> diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles_black.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles_black.ftl index 956bbe90a4..6af9ee1e20 100644 --- a/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles_black.ftl +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles_black.ftl @@ -1444,7 +1444,7 @@ - <#if trailerName??> + <#if remarks??> @@ -1464,11 +1464,11 @@ - ${trailerName!} + ${remarks!} - <#if remarks??> + <#if trailerName1??> @@ -1488,7 +1488,75 @@ - ${remarks!} + ${trailerName1!} + + + + + + + + + + + + + + + + + + + + + ${trailerNumAndPrice1!} + + + + <#if trailerName2??> + + + + + + + + + + + + + + + + + + + ${trailerName2!} + + + + + + + + + + + + + + + + + + + + + ${trailerNumAndPrice2!} diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java index ab44469837..4e1051ec69 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java @@ -5915,6 +5915,19 @@ public class BusSalesOrderService extends MybatisBaseService busSalesOrderTrailerDetailsVos = busSalesOrderTrailerService.fetchAllByOrderSid(busSalesOrder.getSid()); + //获取挂车金额 + BigDecimal gcMoney = new BigDecimal("0"); + if ("1".equals(busSalesOrder.getPayTypeKey())){ + if (busSalesOrderTrailerDetailsVos.size() == 1){ + gcMoney = gcMoney.add(busSalesOrderTrailerDetailsVos.get(0).getSingleFinalPrice().multiply(new BigDecimal(busSalesOrderTrailerDetailsVos.get(0).getTrailerCount()))); + }else if (busSalesOrderTrailerDetailsVos.size() == 2){ + BigDecimal gc1 = busSalesOrderTrailerDetailsVos.get(0).getSingleFinalPrice().multiply(new BigDecimal(busSalesOrderTrailerDetailsVos.get(0).getTrailerCount())); + BigDecimal gc2 = busSalesOrderTrailerDetailsVos.get(1).getSingleFinalPrice().multiply(new BigDecimal(busSalesOrderTrailerDetailsVos.get(1).getTrailerCount())); + gcMoney = gcMoney.add(gc1).add(gc2); + } + } //推送款项车款===================================== AppOrderModelInfoVo appOrderModelInfoVo = vo.getModelInfo(); AppOrderPriceInfoVo priceInfo = vo.getPriceInfo(); @@ -5929,7 +5942,7 @@ public class BusSalesOrderService extends MybatisBaseService vinList = appOrderModelInfoVo.getVinListsVos(); List dtoList = new ArrayList<>(); for (int i = 0; i < vinList.size(); i++) { @@ -6107,6 +6120,19 @@ public class BusSalesOrderService extends MybatisBaseService busSalesOrderTrailerDetailsVos = busSalesOrderTrailerService.fetchAllByOrderSid(busSalesOrder.getSid()); + //获取挂车金额 + BigDecimal gcMoney = new BigDecimal("0"); + if ("1".equals(busSalesOrder.getPayTypeKey())){ + if (busSalesOrderTrailerDetailsVos.size() == 1){ + gcMoney = gcMoney.add(busSalesOrderTrailerDetailsVos.get(0).getSingleFinalPrice().multiply(new BigDecimal(busSalesOrderTrailerDetailsVos.get(0).getTrailerCount()))); + }else if (busSalesOrderTrailerDetailsVos.size() == 2){ + BigDecimal gc1 = busSalesOrderTrailerDetailsVos.get(0).getSingleFinalPrice().multiply(new BigDecimal(busSalesOrderTrailerDetailsVos.get(0).getTrailerCount())); + BigDecimal gc2 = busSalesOrderTrailerDetailsVos.get(1).getSingleFinalPrice().multiply(new BigDecimal(busSalesOrderTrailerDetailsVos.get(1).getTrailerCount())); + gcMoney = gcMoney.add(gc1).add(gc2); + } + } //推送款项车款===================================== AppOrderModelInfoVo appOrderModelInfoVo = vo.getModelInfo(); AppOrderPriceInfoVo priceInfo = vo.getPriceInfo(); @@ -6121,7 +6147,7 @@ public class BusSalesOrderService extends MybatisBaseService vinList = appOrderModelInfoVo.getVinListsVos(); List dtoList = new ArrayList<>(); for (int i = 0; i < vinList.size(); i++) { diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(现车).ftl b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(现车).ftl index 2cf866a090..d455deda05 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(现车).ftl +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(现车).ftl @@ -332,6 +332,27 @@ 上装:${topName}。 + + + + + + + + + + + + + + + + + + + 主车 ${mainVehicleNum}台,单台成交价:${mainVehicleSinglePrice}元。车架号:${VINNo}。 + + @@ -349,7 +370,7 @@ - 挂车:${trailerName}。 + <#if trailerName1??>${trailerName1}<#else> @@ -358,10 +379,9 @@ - + - @@ -370,7 +390,27 @@ - 主车 ${mainVehicleNum}台,单台成交价:${mainVehicleSinglePrice}元。车架号:${VINNo}。 + <#if trailerNumAndPrice1??>${trailerNumAndPrice1}<#else> + + + + + + + + + + + + + + + + + + + + <#if trailerName2??>${trailerName2}<#else> @@ -390,7 +430,7 @@ - 挂车 ${trailerNum}台,单台成交价:${trailerSinglePrice}元。 + <#if trailerNumAndPrice2??>${trailerNumAndPrice2}<#else> @@ -478,7 +518,7 @@ - 车辆含税总价 + 车辆总价款 diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(现车)(空).ftl b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(现车)(空).ftl index a58a0dfff0..a04b97b534 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(现车)(空).ftl +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(现车)(空).ftl @@ -313,6 +313,27 @@ 上装:${topName}。 + + + + + + + + + + + + + + + + + + + 主车 ${mainVehicleNum}台,单台成交价:${mainVehicleSinglePrice}元。车架号:${VINNo}。 + + @@ -330,7 +351,7 @@ - 挂车:${trailerName}。 + <#if trailerName1??>${trailerName1}<#else> @@ -339,10 +360,9 @@ - + - @@ -351,7 +371,27 @@ - 主车 ${mainVehicleNum}台,单台成交价:${mainVehicleSinglePrice}元。车架号:${VINNo}。 + <#if trailerNumAndPrice1??>${trailerNumAndPrice1}<#else> + + + + + + + + + + + + + + + + + + + + <#if trailerName2??>${trailerName2}<#else> @@ -371,7 +411,7 @@ - 挂车 ${trailerNum}台,单台成交价:${trailerSinglePrice}元。 + <#if trailerNumAndPrice2??>${trailerNumAndPrice2}<#else> @@ -459,7 +499,7 @@ - 车辆含税总价 + 车辆总价款 diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(订车).ftl b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(订车).ftl index 6f95597ed4..510ea02dd4 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(订车).ftl +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(订车).ftl @@ -487,15 +487,67 @@ - 挂车:${trailerName}。 + 主车 ${mainVehicleNum}台,单台成交价:${mainVehicleSinglePrice}元。 + + + + + + + + + + + + + + + + + + + <#if trailerName1??>${trailerName1}<#else> + + + + + + + + + + + + + + + + + + + + <#if trailerNumAndPrice1??>${trailerNumAndPrice1}<#else> + + + + + + + + + + + + + - + <#if trailerName2??>${trailerName2}<#else> @@ -515,7 +567,7 @@ - 主车 ${mainVehicleNum}台,单台成交价:${mainVehicleSinglePrice}元。挂车${trailerNum}台,单台成交价:${trailerSinglePrice}元。 + <#if trailerNumAndPrice2??>${trailerNumAndPrice2}<#else> @@ -602,7 +654,7 @@ - 车辆含税总价 + 车辆总价款 diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(订车)(空).ftl b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(订车)(空).ftl index a07e1ec93a..fcfaa3452b 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(订车)(空).ftl +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/template/新车买卖合同(订车)(空).ftl @@ -995,7 +995,7 @@ - 挂车:${trailerName}。 + 主车 ${mainVehicleNum} 台,单台成交价:${mainVehicleSinglePrice}元。 @@ -1015,7 +1015,67 @@ - 主车 ${mainVehicleNum} 台,单台成交价:${mainVehicleSinglePrice}元。挂车${trailerNum}台,单台成交价:${trailerSinglePrice}元。 + <#if trailerName1??>${trailerName1}<#else> + + + + + + + + + + + + + + + + + + + + <#if trailerNumAndPrice1??>${trailerNumAndPrice1}<#else> + + + + + + + + + + + + + + + + + + + + <#if trailerName2??>${trailerName2}<#else> + + + + + + + + + + + + + + + + + + + + <#if trailerNumAndPrice2??>${trailerNumAndPrice2}<#else> @@ -1103,7 +1163,7 @@ - 车辆含税总价 + 车辆总价款 diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/cljszcght.ftl b/anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/cljszcght.ftl index 0e29996004..45ef603593 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/cljszcght.ftl +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/resources/ftl/cljszcght.ftl @@ -495,7 +495,7 @@ - 乙方选择第一种方式购买标的物的,乙方负责验收标的物。本合同签署后即可向第三方支付定金。乙方应认真负责验收,待标的物达到接收条件后,乙方向甲方提交《付款申请书》,甲方按照申请付款金额向第三方付款(甲方已经支付定金的,付款时扣除定金)。 + 乙方选择第一种方式购买标的物的,乙方负责验收标的物。本合同签署后即可向第三方支付定金。乙方应认真负责验收,待标的物达到接收条件后,乙方通知甲方向第三方账户付款(甲方已经支付定金的,付款时扣除定金)。 @@ -514,7 +514,7 @@ - 乙方选择第二种方式购买标的物的,乙方负责通知甲方向第三方付款,甲方按照申请付款金额付款。 + 乙方选择第二种方式购买标的物的,乙方负责通知甲方向第三方付款,乙方同意甲方按照上述约定金额直接付款给第三方。 @@ -533,45 +533,7 @@ - 三、标的物 - - - - - - - - - - - - - - - - - - - 标的物以乙方出具的《付款申请书》载明为准。 - - - - - - - - - - - - - - - - - - - 四、标的物交付 + 三、标的物交付 @@ -648,7 +610,7 @@ - 五、争议解决 + 四、争议解决 @@ -686,7 +648,7 @@ - 六、合同生效 + 五、合同生效