From e136de05d28e55f167a584945c8394263df937bf Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Thu, 11 Sep 2025 10:38:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?demand:=20=20TMS=E7=B3=BB=E7=BB=9F=20-=20?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=B4=A6=E5=8D=95=E7=AE=A1=E7=90=86=20-=20?= =?UTF-8?q?=E6=94=B6=E6=AC=BE=E6=98=8E=E7=BB=86=E6=9F=A5=E8=AF=A2=20-=20?= =?UTF-8?q?=E5=AE=9A=E5=88=B6=E5=AF=BC=E5=87=BA=E9=87=91=E9=A2=9D=E4=B8=BA?= =?UTF-8?q?0=E8=AE=BE=E7=BD=AE=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit committer: heyu --- .../EmisSettlePayRecordCustomExcelUtil.java | 55 ++++++++++++------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/excelCellStrategy/EmisSettlePayRecordCustomExcelUtil.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/excelCellStrategy/EmisSettlePayRecordCustomExcelUtil.java index d5620284e..c25ee471f 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/excelCellStrategy/EmisSettlePayRecordCustomExcelUtil.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/excelCellStrategy/EmisSettlePayRecordCustomExcelUtil.java @@ -95,41 +95,53 @@ public class EmisSettlePayRecordCustomExcelUtil { createCell(row, 6, data.getBillCodes() != null ? data.getBillCodes() : "", dataStyle); // 账单金额 - BigDecimal billAmount = data.getBillAmount() != null ? data.getBillAmount() : BigDecimal.ZERO; + BigDecimal billAmount = data.getBillAmount(); createCell(row, 7, billAmount, numberStyle); - totalBillAmount = totalBillAmount.add(billAmount); + if (billAmount != null && billAmount.compareTo(BigDecimal.ZERO) != 0) { + totalBillAmount = totalBillAmount.add(billAmount); + } // 开票金额 - BigDecimal invoiceAmount = data.getInvoiceAmount() != null ? data.getInvoiceAmount() : BigDecimal.ZERO; + BigDecimal invoiceAmount = data.getInvoiceAmount(); createCell(row, 8, invoiceAmount, numberStyle); - totalInvoiceAmount = totalInvoiceAmount.add(invoiceAmount); + if (invoiceAmount != null && invoiceAmount.compareTo(BigDecimal.ZERO) != 0) { + totalInvoiceAmount = totalInvoiceAmount.add(invoiceAmount); + } // 支付金额 - BigDecimal payMoney = data.getPayMoney() != null ? data.getPayMoney() : BigDecimal.ZERO; + BigDecimal payMoney = data.getPayMoney(); createCell(row, 9, payMoney, numberStyle); - totalPayMoney = totalPayMoney.add(payMoney); + if (payMoney != null && payMoney.compareTo(BigDecimal.ZERO) != 0) { + totalPayMoney = totalPayMoney.add(payMoney); + } // 理赔金额 - BigDecimal satisfyMoney = data.getSatisfyMoney() != null ? data.getSatisfyMoney() : BigDecimal.ZERO; + BigDecimal satisfyMoney = data.getSatisfyMoney(); createCell(row, 10, satisfyMoney, numberStyle); - totalSatisfyMoney = totalSatisfyMoney.add(satisfyMoney); + if (satisfyMoney != null && satisfyMoney.compareTo(BigDecimal.ZERO) != 0) { + totalSatisfyMoney = totalSatisfyMoney.add(satisfyMoney); + } // 折让金额 - BigDecimal allowanceMoney = data.getAllowanceMoney() != null ? data.getAllowanceMoney() - : BigDecimal.ZERO; + BigDecimal allowanceMoney = data.getAllowanceMoney(); createCell(row, 11, allowanceMoney, numberStyle); - totalAllowanceMoney = totalAllowanceMoney.add(allowanceMoney); + if (allowanceMoney != null && allowanceMoney.compareTo(BigDecimal.ZERO) != 0) { + totalAllowanceMoney = totalAllowanceMoney.add(allowanceMoney); + } // 抵扣金额 - BigDecimal deductionMoney = data.getDeductionMoney() != null ? data.getDeductionMoney() - : BigDecimal.ZERO; + BigDecimal deductionMoney = data.getDeductionMoney(); createCell(row, 12, deductionMoney, numberStyle); - totalDeductionMoney = totalDeductionMoney.add(deductionMoney); + if (deductionMoney != null && deductionMoney.compareTo(BigDecimal.ZERO) != 0) { + totalDeductionMoney = totalDeductionMoney.add(deductionMoney); + } // 其他收费 - BigDecimal otherMoney = data.getOtherMoney() != null ? data.getOtherMoney() : BigDecimal.ZERO; + BigDecimal otherMoney = data.getOtherMoney(); createCell(row, 13, otherMoney, numberStyle); - totalOtherMoney = totalOtherMoney.add(otherMoney); + if (otherMoney != null && otherMoney.compareTo(BigDecimal.ZERO) != 0) { + totalOtherMoney = totalOtherMoney.add(otherMoney); + } // 理赔原因 createCell(row, 14, data.getSatisfyReason() != null ? data.getSatisfyReason() : "", dataStyle); @@ -367,9 +379,14 @@ public class EmisSettlePayRecordCustomExcelUtil { */ private static void createCell(Row row, int columnIndex, BigDecimal value, CellStyle style) { Cell cell = row.createCell(columnIndex); - BigDecimal formattedValue = formatBigDecimal(value); - // 使用toPlainString()避免科学计数法,然后转换为double - cell.setCellValue(formattedValue.toPlainString()); + // 如果BigDecimal值为null或为0,则设置为空字符串 + if (value == null || value.compareTo(BigDecimal.ZERO) == 0) { + cell.setCellValue(""); + } else { + BigDecimal formattedValue = formatBigDecimal(value); + // 使用toPlainString()避免科学计数法,然后转换为double + cell.setCellValue(formattedValue.toPlainString()); + } cell.setCellStyle(style); } From 8c310d79a0d057de4187bc870174963ee32fbcce Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Thu, 11 Sep 2025 10:55:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?demand:=20=20TMS=E7=B3=BB=E7=BB=9F=20-=20?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=B4=A6=E5=8D=95=E7=AE=A1=E7=90=86=20-=20?= =?UTF-8?q?=E6=94=B6=E6=AC=BE=E6=98=8E=E7=BB=86=E6=9F=A5=E8=AF=A2=20-=20?= =?UTF-8?q?=E5=AE=9A=E5=88=B6=E5=AF=BC=E5=87=BA=E9=87=91=E9=A2=9D=E4=B8=BA?= =?UTF-8?q?0=E8=AE=BE=E7=BD=AE=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit committer: heyu --- .../erp/web/emis/EmisCommissionProfitController.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCommissionProfitController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCommissionProfitController.java index 46f5c890e..46762271d 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCommissionProfitController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCommissionProfitController.java @@ -1,11 +1,11 @@ -/** +/** * @Project: emis * @Title: EmisCommissionProfitController.java * @author linfso * @date 2024-10-24 01:46:36 * @Copyright: ShangHai Duta 2022 All rights reserved. - * @version v1.0 + * @version v1.0 * @Description:
员工提成表 控制器
*/ @@ -30,6 +30,7 @@ import com.xdadan.erp.emis.utils.WaybillHelper; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.GetMapping; @@ -53,7 +54,7 @@ import com.xdadan.erp.emis.service.IEmisCommissionProfitService; /** * 员工提成表Controller - * + * * @author linfso * @date 2024-10-24 01:46:36 */ @@ -105,6 +106,7 @@ public class EmisCommissionProfitController extends BaseController } @GetMapping(value = "/reCalcByBillMonth") + @Async public AjaxResult reCalcByBillMonth(String billMonth) { if(StringUtils.isEmpty(billMonth)){ @@ -263,8 +265,8 @@ public class EmisCommissionProfitController extends BaseController /** * 检查是否重复 - * - * @param emisCommissionProfit + * + * @param emisCommissionProfit * @return 数量 */ @PreAuthorize("@ss.hasPermi('emis:emisCommissionProfit:list')") From bcac7a74d852872f562393739e1bb4a3b197ed12 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Thu, 11 Sep 2025 13:18:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?demand:=20=20TMS=E7=B3=BB=E7=BB=9F=20-=20?= =?UTF-8?q?=E6=8F=90=E6=88=90=E7=AE=A1=E7=90=86=20-=20=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E6=8F=90=E6=88=90=E6=98=8E=E7=BB=86=20-=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=8D=95=E5=8F=B7/=E6=9C=88=E4=BB=BD=E9=87=8D=E7=AE=97?= =?UTF-8?q?=E6=8F=90=E6=88=90=E6=94=B9=E4=B8=BA=E5=BC=82=E6=AD=A5=E8=B0=83?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit committer: heyu --- .../xdadan/erp/web/emis/EmisCommissionProfitController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCommissionProfitController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCommissionProfitController.java index 46762271d..4e5a13823 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCommissionProfitController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCommissionProfitController.java @@ -76,9 +76,9 @@ public class EmisCommissionProfitController extends BaseController private EmisBaseService emisBaseService; @GetMapping(value = "/reCalcByBillCode") - public AjaxResult reCalcByBillCode(String billCode) - { - if(StringUtils.isEmpty(billCode)){ + @Async + public AjaxResult reCalcByBillCode(String billCode) { + if (StringUtils.isEmpty(billCode)) { return AjaxResult.error("计算失败-单号不能为空"); }