|
@@ -245,6 +245,38 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
|
this.modModelByDTOWithNotLogin(model);
|
|
|
} else if (model.getNo().equals("dl_天然气") || model.getNo().equals("dl_蒸汽")) {
|
|
|
throw new BusinessException("无需填写");
|
|
|
+ } else if (model.getNo().equals("xiaoshou_0300083") || model.getNo().equals("xiaoshou_lhn")) {
|
|
|
+ LocalDate date = model.getDate();
|
|
|
+ model.setYear(date.getYear());
|
|
|
+ model.setMonth(date.getMonthValue());
|
|
|
+ model.setDay(date.getDayOfMonth());
|
|
|
+ this.modModelByDTOWithNotLogin(model);
|
|
|
+
|
|
|
+ // 月累积销售
|
|
|
+ ProduceReport monthReport = new ProduceReport();
|
|
|
+ monthReport.setNo(model.getNo() + "_month");
|
|
|
+ monthReport.setDate(model.getDate());
|
|
|
+ monthReport.setYear(model.getYear());
|
|
|
+ monthReport.setMonth(model.getMonth());
|
|
|
+ monthReport = super.getModelListByModel(monthReport).get(0);
|
|
|
+ ProduceReportDTO month = new ProduceReportDTO();
|
|
|
+ month.setDataId(model.getDataId());
|
|
|
+ month.setYear(date.getYear());
|
|
|
+ month.setMonth(date.getMonthValue());
|
|
|
+ ProduceReportVO monthVO = this.sumMonthYear(month);
|
|
|
+ monthReport.setValue(monthVO.getTotalValue());
|
|
|
+ this.modModelByDTOWithNotLogin(BeanConverterUtil.copyObjectProperties(monthReport, ProduceReportDTO.class));
|
|
|
+ // 年累积销售
|
|
|
+ ProduceReport yearReport = new ProduceReport();
|
|
|
+ yearReport.setNo(model.getNo() + "_month");
|
|
|
+ yearReport.setDate(model.getDate());
|
|
|
+ yearReport.setYear(model.getYear());
|
|
|
+ yearReport.setMonth(model.getMonth());
|
|
|
+ yearReport = super.getModelListByModel(yearReport).get(0);
|
|
|
+ month.setMonth(null);
|
|
|
+ ProduceReportVO yearVO = this.sumMonthYear(month);
|
|
|
+ yearReport.setValue(yearVO.getTotalValue());
|
|
|
+ this.modModelByDTOWithNotLogin(BeanConverterUtil.copyObjectProperties(yearReport, ProduceReportDTO.class));
|
|
|
} else {
|
|
|
LocalDate date = model.getDate();
|
|
|
model.setYear(date.getYear());
|