|
@@ -425,7 +425,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
ProduceReport report = BeanConverterUtil.copyObjectProperties(produceData, ProduceReport.class);
|
|
ProduceReport report = BeanConverterUtil.copyObjectProperties(produceData, ProduceReport.class);
|
|
report.setDate(date);
|
|
report.setDate(date);
|
|
report.setDataId(produceData.getId());
|
|
report.setDataId(produceData.getId());
|
|
- report.setValue(produceRecord.getNum().setScale(0,RoundingMode.HALF_UP).toString());
|
|
|
|
|
|
+ report.setValue(produceRecord.getNum().setScale(0, RoundingMode.HALF_UP).toString());
|
|
report.setYear(date.getYear());
|
|
report.setYear(date.getYear());
|
|
report.setMonth(date.getMonthValue());
|
|
report.setMonth(date.getMonthValue());
|
|
report.setDay(date.getDayOfMonth());
|
|
report.setDay(date.getDayOfMonth());
|
|
@@ -437,7 +437,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
report = BeanConverterUtil.copyObjectProperties(produceData, ProduceReport.class);
|
|
report = BeanConverterUtil.copyObjectProperties(produceData, ProduceReport.class);
|
|
report.setDate(date);
|
|
report.setDate(date);
|
|
report.setDataId(produceData.getId());
|
|
report.setDataId(produceData.getId());
|
|
- report.setValue(produceRecord.getNum().setScale(0,RoundingMode.HALF_UP).toString());
|
|
|
|
|
|
+ report.setValue(produceRecord.getNum().setScale(0, RoundingMode.HALF_UP).toString());
|
|
report.setYear(date.getYear());
|
|
report.setYear(date.getYear());
|
|
report.setMonth(date.getMonthValue());
|
|
report.setMonth(date.getMonthValue());
|
|
report.setDay(date.getDayOfMonth());
|
|
report.setDay(date.getDayOfMonth());
|
|
@@ -455,7 +455,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
report.setDate(date);
|
|
report.setDate(date);
|
|
report.setDataId(produceData.getId());
|
|
report.setDataId(produceData.getId());
|
|
log.info(yearVO.getTotalValue());
|
|
log.info(yearVO.getTotalValue());
|
|
- report.setValue(new BigDecimal(yearVO.getTotalValue()).setScale(0,RoundingMode.HALF_UP).toString());
|
|
|
|
|
|
+ report.setValue(new BigDecimal(yearVO.getTotalValue()).setScale(0, RoundingMode.HALF_UP).toString());
|
|
report.setYear(date.getYear());
|
|
report.setYear(date.getYear());
|
|
report.setMonth(date.getMonthValue());
|
|
report.setMonth(date.getMonthValue());
|
|
report.setDay(date.getDayOfMonth());
|
|
report.setDay(date.getDayOfMonth());
|
|
@@ -470,7 +470,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
report.setDate(date);
|
|
report.setDate(date);
|
|
report.setDataId(produceData.getId());
|
|
report.setDataId(produceData.getId());
|
|
log.info(monthVO.getTotalValue());
|
|
log.info(monthVO.getTotalValue());
|
|
- report.setValue(new BigDecimal(monthVO.getTotalValue()).setScale(0,RoundingMode.HALF_UP).toString());
|
|
|
|
|
|
+ report.setValue(new BigDecimal(monthVO.getTotalValue()).setScale(0, RoundingMode.HALF_UP).toString());
|
|
report.setYear(date.getYear());
|
|
report.setYear(date.getYear());
|
|
report.setMonth(date.getMonthValue());
|
|
report.setMonth(date.getMonthValue());
|
|
report.setDay(date.getDayOfMonth());
|
|
report.setDay(date.getDayOfMonth());
|
|
@@ -1414,7 +1414,11 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
ProduceReport yearReport = BeanConverterUtil.copyObjectProperties(yearData, ProduceReport.class);
|
|
ProduceReport yearReport = BeanConverterUtil.copyObjectProperties(yearData, ProduceReport.class);
|
|
yearReport.setDate(date);
|
|
yearReport.setDate(date);
|
|
yearReport.setDataId(yearData.getId());
|
|
yearReport.setDataId(yearData.getId());
|
|
- yearReport.setValue(yearVO.getTotalValue().divide(new BigDecimal(1000), 2, BigDecimal.ROUND_HALF_UP).toString());
|
|
|
|
|
|
+ if (yearVO.getTotalValue().compareTo(new BigDecimal(0)) < 0) {
|
|
|
|
+ yearReport.setValue("0");
|
|
|
|
+ } else {
|
|
|
|
+ yearReport.setValue(yearVO.getTotalValue().divide(new BigDecimal(1000), 2, BigDecimal.ROUND_HALF_UP).toString());
|
|
|
|
+ }
|
|
yearReport.setYear(date.getYear());
|
|
yearReport.setYear(date.getYear());
|
|
yearReport.setMonth(date.getMonthValue());
|
|
yearReport.setMonth(date.getMonthValue());
|
|
yearReport.setDay(date.getDayOfMonth());
|
|
yearReport.setDay(date.getDayOfMonth());
|
|
@@ -1429,7 +1433,11 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
ProduceReport monthReport = BeanConverterUtil.copyObjectProperties(monthData, ProduceReport.class);
|
|
ProduceReport monthReport = BeanConverterUtil.copyObjectProperties(monthData, ProduceReport.class);
|
|
monthReport.setDate(date);
|
|
monthReport.setDate(date);
|
|
monthReport.setDataId(monthData.getId());
|
|
monthReport.setDataId(monthData.getId());
|
|
- monthReport.setValue(monthVO.getTotalValue().divide(new BigDecimal(1000), 2, BigDecimal.ROUND_HALF_UP).toString());
|
|
|
|
|
|
+ if (monthVO.getTotalValue().compareTo(new BigDecimal(0)) < 0) {
|
|
|
|
+ monthReport.setValue("0");
|
|
|
|
+ } else {
|
|
|
|
+ monthReport.setValue(monthVO.getTotalValue().divide(new BigDecimal(1000), 2, BigDecimal.ROUND_HALF_UP).toString());
|
|
|
|
+ }
|
|
monthReport.setYear(date.getYear());
|
|
monthReport.setYear(date.getYear());
|
|
monthReport.setMonth(date.getMonthValue());
|
|
monthReport.setMonth(date.getMonthValue());
|
|
monthReport.setDay(date.getDayOfMonth());
|
|
monthReport.setDay(date.getDayOfMonth());
|