From 0073ad572119dd2ddd0ff8cf0be6de7e7966f208 Mon Sep 17 00:00:00 2001 From: ligaode Date: Tue, 25 Feb 2025 11:14:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScmSpecialRebateService.java | 80 ++++++++++--------- .../biz/scmvehrebate/ScmVehRebateService.java | 80 ++++++++++--------- 2 files changed, 84 insertions(+), 76 deletions(-) diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java index 8f70009095..a78532c70b 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java @@ -1299,29 +1299,31 @@ public class ScmSpecialRebateService extends MybatisBaseService 0) { - excelInfo.setIsAdjustment("否"); - excelInfo.setAdjustmentMoney("0"); - } else if (i == 0) { - if (scflje.compareTo(ytfy) > 0) { - excelInfo.setIsAdjustment("是"); - excelInfo.setAdjustmentMoney(tzje.toString()); - } else if (scflje.compareTo(ytfy) == 0) { - excelInfo.setIsAdjustment("是"); - excelInfo.setAdjustmentMoney(tzje.toString()); - } else if (scflje.compareTo(ytfy) < 0) { + if (StringUtils.isNotBlank(excelInfo.getUploadDate()) && StringUtils.isNotBlank(excelInfo.getUploadMoney())) { + int i = new BigDecimal(excelInfo.getStayDetermineMoney()).compareTo(BigDecimal.ZERO); + //上传返利金额 + BigDecimal scflje = new BigDecimal(excelInfo.getUploadMoney()).subtract(new BigDecimal(excelInfo.getStayDetermineMoney())).subtract(new BigDecimal(excelInfo.getOnceItureCost())).subtract(new BigDecimal(excelInfo.getOnceTreatCost())).subtract(new BigDecimal(excelInfo.getOnceSuppCost())); + //预提返利-其中预提费用 + BigDecimal ytfy = new BigDecimal(excelInfo.getEstimateRebate()).subtract(new BigDecimal(excelInfo.getExpectCost())); + //调整金额 + BigDecimal tzje = new BigDecimal(excelInfo.getUploadMoney()).subtract(new BigDecimal(excelInfo.getStayDetermineMoney())).subtract(new BigDecimal(excelInfo.getOnceItureCost())).subtract(new BigDecimal(excelInfo.getOnceTreatCost())).subtract(new BigDecimal(excelInfo.getOnceSuppCost())).subtract(new BigDecimal(excelInfo.getEstimateRebate())).add(new BigDecimal(excelInfo.getExpectCost())); + if (i > 0) { excelInfo.setIsAdjustment("否"); excelInfo.setAdjustmentMoney("0"); + } else if (i == 0) { + if (scflje.compareTo(ytfy) > 0) { + excelInfo.setIsAdjustment("是"); + excelInfo.setAdjustmentMoney(tzje.toString()); + } else if (scflje.compareTo(ytfy) == 0) { + excelInfo.setIsAdjustment("是"); + excelInfo.setAdjustmentMoney(tzje.toString()); + } else if (scflje.compareTo(ytfy) < 0) { + excelInfo.setIsAdjustment("否"); + excelInfo.setAdjustmentMoney("0"); + } } + excelInfo.setDiffAmount(scflje.subtract(ytfy).toString()); } - excelInfo.setDiffAmount(scflje.subtract(ytfy).toString()); } } StringBuffer sbcheck1 = new StringBuffer(); @@ -1826,29 +1828,31 @@ public class ScmSpecialRebateService extends MybatisBaseService 0) { - excelInfo.setIsAdjustment("否"); - excelInfo.setAdjustmentMoney("0"); - } else if (i == 0) { - if (scflje.compareTo(ytfy) > 0) { - excelInfo.setIsAdjustment("是"); - excelInfo.setAdjustmentMoney(tzje.toString()); - } else if (scflje.compareTo(ytfy) == 0) { - excelInfo.setIsAdjustment("是"); - excelInfo.setAdjustmentMoney(tzje.toString()); - } else if (scflje.compareTo(ytfy) < 0) { + if (StringUtils.isNotBlank(excelInfo.getSecondaryUploadDate()) && StringUtils.isNotBlank(excelInfo.getSecondaryUploadMoney())) { + int i = new BigDecimal(excelInfo.getStayDetermineMoney()).compareTo(BigDecimal.ZERO); + //上传返利金额 + BigDecimal scflje = new BigDecimal(excelInfo.getUploadMoney()).add(new BigDecimal(excelInfo.getSecondaryUploadMoney())).subtract(new BigDecimal(excelInfo.getStayDetermineMoney())).subtract(new BigDecimal(excelInfo.getMoney())).subtract(new BigDecimal(excelInfo.getSecondItureCost())).subtract(new BigDecimal(excelInfo.getSecondTreatCost())).subtract(new BigDecimal(excelInfo.getSecondSuppCost())); + //预提返利-其中预提费用 + BigDecimal ytfy = new BigDecimal(excelInfo.getEstimateRebate()).subtract(new BigDecimal(excelInfo.getExpectCost())); + //调整金额 + BigDecimal tzje = new BigDecimal(excelInfo.getUploadMoney()).add(new BigDecimal(excelInfo.getSecondaryUploadMoney())).subtract(new BigDecimal(excelInfo.getStayDetermineMoney())).subtract(new BigDecimal(excelInfo.getMoney())).subtract(new BigDecimal(excelInfo.getSecondItureCost())).subtract(new BigDecimal(excelInfo.getSecondTreatCost())).subtract(new BigDecimal(excelInfo.getSecondSuppCost())).subtract(new BigDecimal(excelInfo.getEstimateRebate())).add(new BigDecimal(excelInfo.getExpectCost())); + if (i > 0) { excelInfo.setIsAdjustment("否"); excelInfo.setAdjustmentMoney("0"); + } else if (i == 0) { + if (scflje.compareTo(ytfy) > 0) { + excelInfo.setIsAdjustment("是"); + excelInfo.setAdjustmentMoney(tzje.toString()); + } else if (scflje.compareTo(ytfy) == 0) { + excelInfo.setIsAdjustment("是"); + excelInfo.setAdjustmentMoney(tzje.toString()); + } else if (scflje.compareTo(ytfy) < 0) { + excelInfo.setIsAdjustment("否"); + excelInfo.setAdjustmentMoney("0"); + } } + excelInfo.setDiffAmount(scflje.subtract(ytfy).toString()); } - excelInfo.setDiffAmount(scflje.subtract(ytfy).toString()); } } StringBuffer sbcheck1 = new StringBuffer(); diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java index fa2337e54f..2c4fc1208c 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java @@ -1606,29 +1606,31 @@ public class ScmVehRebateService extends MybatisBaseService 0) { - excelInfo.setIsAdjustment("否"); - excelInfo.setAdjustmentMoney("0"); - } else if (i == 0) { - if (scflje.compareTo(ytfy) > 0) { - excelInfo.setIsAdjustment("是"); - excelInfo.setAdjustmentMoney(tzje.toString()); - } else if (scflje.compareTo(ytfy) == 0) { - excelInfo.setIsAdjustment("是"); - excelInfo.setAdjustmentMoney(tzje.toString()); - } else if (scflje.compareTo(ytfy) < 0) { + if (StringUtils.isNotBlank(excelInfo.getUploadDate()) && StringUtils.isNotBlank(excelInfo.getUploadMoney())){ + int i = new BigDecimal(excelInfo.getStayDetermineMoney()).compareTo(BigDecimal.ZERO); + //上传返利金额 + BigDecimal scflje = new BigDecimal(excelInfo.getUploadMoney()).subtract(new BigDecimal(excelInfo.getStayDetermineMoney())).subtract(new BigDecimal(excelInfo.getOnceTreatCost())).subtract(new BigDecimal(excelInfo.getOnceSuppCost())); + //预提返利-其中预提费用 + BigDecimal ytfy = new BigDecimal(excelInfo.getEstimateRebate()).subtract(new BigDecimal(excelInfo.getWithholdCost())); + //调整金额 + BigDecimal tzje = new BigDecimal(excelInfo.getUploadMoney()).subtract(new BigDecimal(excelInfo.getStayDetermineMoney())).subtract(new BigDecimal(excelInfo.getOnceTreatCost())).subtract(new BigDecimal(excelInfo.getOnceSuppCost())).subtract(new BigDecimal(excelInfo.getEstimateRebate())).add(new BigDecimal(excelInfo.getWithholdCost())); + if (i > 0) { excelInfo.setIsAdjustment("否"); excelInfo.setAdjustmentMoney("0"); + } else if (i == 0) { + if (scflje.compareTo(ytfy) > 0) { + excelInfo.setIsAdjustment("是"); + excelInfo.setAdjustmentMoney(tzje.toString()); + } else if (scflje.compareTo(ytfy) == 0) { + excelInfo.setIsAdjustment("是"); + excelInfo.setAdjustmentMoney(tzje.toString()); + } else if (scflje.compareTo(ytfy) < 0) { + excelInfo.setIsAdjustment("否"); + excelInfo.setAdjustmentMoney("0"); + } } + excelInfo.setDiffAmount(scflje.subtract(ytfy).toString()); } - excelInfo.setDiffAmount(scflje.subtract(ytfy).toString()); } } StringBuffer sbcheck1 = new StringBuffer(); @@ -2097,29 +2099,31 @@ public class ScmVehRebateService extends MybatisBaseService 0) { - excelInfo.setIsAdjustment("否"); - excelInfo.setAdjustmentMoney("0"); - } else if (i == 0) { - if (scflje.compareTo(ytfy) > 0) { - excelInfo.setIsAdjustment("是"); - excelInfo.setAdjustmentMoney(tzje.toString()); - } else if (scflje.compareTo(ytfy) == 0) { - excelInfo.setIsAdjustment("是"); - excelInfo.setAdjustmentMoney(tzje.toString()); - } else if (scflje.compareTo(ytfy) < 0) { + if (StringUtils.isNotBlank(excelInfo.getSecondaryUploadDate()) && StringUtils.isNotBlank(excelInfo.getSecondaryUploadMoney())){ + int i = new BigDecimal(excelInfo.getStayDetermineMoney()).compareTo(BigDecimal.ZERO); + //上传返利金额 + BigDecimal scflje = new BigDecimal(excelInfo.getUploadMoney()).add(new BigDecimal(excelInfo.getSecondaryUploadMoney())).subtract(new BigDecimal(excelInfo.getStayDetermineMoney())).subtract(new BigDecimal(excelInfo.getQzMoney())).subtract(new BigDecimal(excelInfo.getSecondTreatCost())).subtract(new BigDecimal(excelInfo.getSecondSuppCost())); + //预提返利-其中预提费用 + BigDecimal ytfy = new BigDecimal(excelInfo.getEstimateRebate()).subtract(new BigDecimal(excelInfo.getWithholdCost())); + //调整金额 + BigDecimal tzje = new BigDecimal(excelInfo.getUploadMoney()).add(new BigDecimal(excelInfo.getSecondaryUploadMoney())).subtract(new BigDecimal(excelInfo.getStayDetermineMoney())).subtract(new BigDecimal(excelInfo.getQzMoney())).subtract(new BigDecimal(excelInfo.getSecondTreatCost())).subtract(new BigDecimal(excelInfo.getSecondSuppCost())).subtract(new BigDecimal(excelInfo.getEstimateRebate())).add(new BigDecimal(excelInfo.getWithholdCost())); + if (i > 0) { excelInfo.setIsAdjustment("否"); excelInfo.setAdjustmentMoney("0"); + } else if (i == 0) { + if (scflje.compareTo(ytfy) > 0) { + excelInfo.setIsAdjustment("是"); + excelInfo.setAdjustmentMoney(tzje.toString()); + } else if (scflje.compareTo(ytfy) == 0) { + excelInfo.setIsAdjustment("是"); + excelInfo.setAdjustmentMoney(tzje.toString()); + } else if (scflje.compareTo(ytfy) < 0) { + excelInfo.setIsAdjustment("否"); + excelInfo.setAdjustmentMoney("0"); + } } + excelInfo.setDiffAmount(scflje.subtract(ytfy).toString()); } - excelInfo.setDiffAmount(scflje.subtract(ytfy).toString()); } } StringBuffer sbcheck1 = new StringBuffer();