From e685c0a162be24020b406c9fe6590b1b2c893f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Thu, 16 Feb 2023 23:30:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=95=86=E5=93=81=E5=92=8C?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=AE=A2=E6=88=B7=E7=9A=84=E5=AF=BC?= =?UTF-8?q?=E5=87=BAExcel=EF=BC=8C=E5=B0=8F=E6=95=B0=E7=82=B9=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E4=B8=A4=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jsh/erp/controller/MaterialController.java | 8 ++++---- .../jsh/erp/service/supplier/SupplierService.java | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialController.java b/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialController.java index 0ff58c9d..378bd3af 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialController.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialController.java @@ -352,10 +352,10 @@ public class MaterialController { objs[7] = m.getCommodityUnit(); objs[8] = m.getWeight() == null? "" : m.getWeight().toString(); objs[9] = m.getExpiryNum() == null? "" : m.getExpiryNum().toString(); - objs[10] = m.getPurchaseDecimal() == null? "" : m.getPurchaseDecimal().toString(); - objs[11] = m.getCommodityDecimal() == null? "" : m.getCommodityDecimal().toString(); - objs[12] = m.getWholesaleDecimal() == null? "" : m.getWholesaleDecimal().toString(); - objs[13] = m.getLowDecimal() == null? "" : m.getLowDecimal().toString(); + objs[10] = m.getPurchaseDecimal() == null? "" : m.getPurchaseDecimal().setScale(2,BigDecimal.ROUND_HALF_UP).toString(); + objs[11] = m.getCommodityDecimal() == null? "" : m.getCommodityDecimal().setScale(2,BigDecimal.ROUND_HALF_UP).toString(); + objs[12] = m.getWholesaleDecimal() == null? "" : m.getWholesaleDecimal().setScale(2,BigDecimal.ROUND_HALF_UP).toString(); + objs[13] = m.getLowDecimal() == null? "" : m.getLowDecimal().setScale(2,BigDecimal.ROUND_HALF_UP).toString(); objs[14] = m.getRemark(); objs[15] = m.getEnabled() ? "启用" : "禁用"; objs[16] = "1".equals(m.getEnableSerialNumber()) ? "有" : "无"; diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/supplier/SupplierService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/supplier/SupplierService.java index a5c61412..435e72b4 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/supplier/SupplierService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/supplier/SupplierService.java @@ -552,7 +552,7 @@ public class SupplierService { objs[2] = s.getTelephone(); objs[3] = s.getPhoneNum(); objs[4] = s.getEmail(); - objs[5] = s.getAdvanceIn() == null? "" : s.getAdvanceIn().toString(); + objs[5] = s.getAdvanceIn() == null? "" : s.getAdvanceIn().setScale(2,BigDecimal.ROUND_HALF_UP).toString(); objs[6] = s.getDescription(); objs[7] = s.getSort(); objs[8] = s.getEnabled() ? "启用" : "禁用"; @@ -608,14 +608,14 @@ public class SupplierService { objs[4] = s.getEmail(); objs[5] = s.getFax(); if(("客户").equals(s.getType())) { - objs[6] = s.getBeginNeedGet() == null? "" : s.getBeginNeedGet().toString(); - objs[7] = s.getAllNeedGet() == null? "" : s.getAllNeedGet().toString(); + objs[6] = s.getBeginNeedGet() == null? "" : s.getBeginNeedGet().setScale(2,BigDecimal.ROUND_HALF_UP).toString(); + objs[7] = s.getAllNeedGet() == null? "" : s.getAllNeedGet().setScale(2,BigDecimal.ROUND_HALF_UP).toString(); } else if(("供应商").equals(s.getType())) { - objs[6] = s.getBeginNeedPay() == null? "" : s.getBeginNeedPay().toString(); - objs[7] = s.getAllNeedPay() == null? "" : s.getAllNeedPay().toString(); + objs[6] = s.getBeginNeedPay() == null? "" : s.getBeginNeedPay().setScale(2,BigDecimal.ROUND_HALF_UP).toString(); + objs[7] = s.getAllNeedPay() == null? "" : s.getAllNeedPay().setScale(2,BigDecimal.ROUND_HALF_UP).toString(); } objs[8] = s.getTaxNum(); - objs[9] = s.getTaxRate() == null? "" : s.getTaxRate().toString(); + objs[9] = s.getTaxRate() == null? "" : s.getTaxRate().setScale(2,BigDecimal.ROUND_HALF_UP).toString(); objs[10] = s.getBankName(); objs[11] = s.getAccountNumber(); objs[12] = s.getAddress();