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();