Selaa lähdekoodia

库存量改成液位的库存量

hfxc226 3 viikkoa sitten
vanhempi
commit
cdf2466f27

+ 2 - 2
platform-service/src/main/java/com/platform/service/produce/impl/ProduceReportServiceImpl.java

@@ -780,7 +780,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
         yearReport.setDate(date);
         yearReport.setYear(date.getYear());
         yearReport = super.getModelListByModel(yearReport).get(0);
-        yearReport.setValue(new BigDecimal(yearVO.getTotalValue()).setScale(2).toString());
+        yearReport.setValue(new BigDecimal(yearVO.getTotalValue()).setScale(2, RoundingMode.HALF_UP).toString());
         yearReport.setUpdateTime(LocalDateTime.now());
         yearReport.setUpdateUserId(SecurityUtils.getUserInfo().getUserId());
         mapper.updateByPrimaryKey(yearReport);
@@ -797,7 +797,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
         monthReport.setYear(date.getYear());
         monthReport.setMonth(date.getMonthValue());
         monthReport = super.getModelListByModel(monthReport).get(0);
-        monthReport.setValue(new BigDecimal(monthVO.getTotalValue()).setScale(2).toString());
+        monthReport.setValue(new BigDecimal(monthVO.getTotalValue()).setScale(2, RoundingMode.HALF_UP).toString());
         monthReport.setUpdateTime(LocalDateTime.now());
         monthReport.setUpdateUserId(SecurityUtils.getUserInfo().getUserId());
         mapper.updateByPrimaryKey(monthReport);