|
@@ -772,6 +772,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
month1.setDataId(produceData.getId());
|
|
month1.setDataId(produceData.getId());
|
|
month1.setYear(date.getYear());
|
|
month1.setYear(date.getYear());
|
|
ProduceReportVO yearVO = this.sumMonthYear(month1);
|
|
ProduceReportVO yearVO = this.sumMonthYear(month1);
|
|
|
|
+ log.info("yearVO.getTotalValue(): " + yearVO.getTotalValue());
|
|
|
|
|
|
// 查找年
|
|
// 查找年
|
|
ProduceReport yearReport = new ProduceReport();
|
|
ProduceReport yearReport = new ProduceReport();
|
|
@@ -779,7 +780,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
yearReport.setDate(date);
|
|
yearReport.setDate(date);
|
|
yearReport.setYear(date.getYear());
|
|
yearReport.setYear(date.getYear());
|
|
yearReport = super.getModelListByModel(yearReport).get(0);
|
|
yearReport = super.getModelListByModel(yearReport).get(0);
|
|
- yearReport.setValue(yearVO.getTotalValue());
|
|
|
|
|
|
+ yearReport.setValue(new BigDecimal(yearVO.getTotalValue()).setScale(2).toString());
|
|
yearReport.setUpdateTime(LocalDateTime.now());
|
|
yearReport.setUpdateTime(LocalDateTime.now());
|
|
yearReport.setUpdateUserId(SecurityUtils.getUserInfo().getUserId());
|
|
yearReport.setUpdateUserId(SecurityUtils.getUserInfo().getUserId());
|
|
mapper.updateByPrimaryKey(yearReport);
|
|
mapper.updateByPrimaryKey(yearReport);
|
|
@@ -787,6 +788,8 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
// 本月耗用:更新
|
|
// 本月耗用:更新
|
|
month1.setMonth(date.getMonthValue());
|
|
month1.setMonth(date.getMonthValue());
|
|
ProduceReportVO monthVO = this.sumMonthYear(month1);
|
|
ProduceReportVO monthVO = this.sumMonthYear(month1);
|
|
|
|
+ log.info("monthVO.getTotalValue(): " + monthVO.getTotalValue());
|
|
|
|
+
|
|
// 查找月
|
|
// 查找月
|
|
ProduceReport monthReport = new ProduceReport();
|
|
ProduceReport monthReport = new ProduceReport();
|
|
monthReport.setNo(prefix + no + "_month");
|
|
monthReport.setNo(prefix + no + "_month");
|
|
@@ -794,7 +797,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
monthReport.setYear(date.getYear());
|
|
monthReport.setYear(date.getYear());
|
|
monthReport.setMonth(date.getMonthValue());
|
|
monthReport.setMonth(date.getMonthValue());
|
|
monthReport = super.getModelListByModel(monthReport).get(0);
|
|
monthReport = super.getModelListByModel(monthReport).get(0);
|
|
- monthReport.setValue(monthVO.getTotalValue());
|
|
|
|
|
|
+ monthReport.setValue(new BigDecimal(monthVO.getTotalValue()).setScale(2).toString());
|
|
monthReport.setUpdateTime(LocalDateTime.now());
|
|
monthReport.setUpdateTime(LocalDateTime.now());
|
|
monthReport.setUpdateUserId(SecurityUtils.getUserInfo().getUserId());
|
|
monthReport.setUpdateUserId(SecurityUtils.getUserInfo().getUserId());
|
|
mapper.updateByPrimaryKey(monthReport);
|
|
mapper.updateByPrimaryKey(monthReport);
|