|
@@ -152,6 +152,14 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void modModelByDTOWithNotLogin(ProduceReportDTO model) {
|
|
|
+ // 如果是月计划类的,只需要一个数据就行了
|
|
|
+ model.setUpdateTime(LocalDateTime.now());
|
|
|
+ model.setUpdateUserId("1");
|
|
|
+ mapper.updateByPrimaryKeySelective(BeanConverterUtil.copyObjectProperties(model, getEntityClass()));
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void modModelByDTO(ProduceReportDTO model) {
|
|
|
// 如果是月计划类的,只需要一个数据就行了
|
|
@@ -160,7 +168,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
|
model.setYear(date.getYear());
|
|
|
model.setMonth(date.getMonthValue());
|
|
|
model.setDay(date.getDayOfMonth());
|
|
|
- super.modModelByDTO(model);
|
|
|
+ this.modModelByDTOWithNotLogin(model);
|
|
|
|
|
|
// 查找月累计产量
|
|
|
ProduceData monthData = produceDataService.selectByNo(model.getNo().replace("yjh", "month"));
|
|
@@ -233,7 +241,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
|
model.setYear(date.getYear());
|
|
|
model.setMonth(date.getMonthValue());
|
|
|
model.setDay(date.getDayOfMonth());
|
|
|
- super.modModelByDTO(model);
|
|
|
+ this.modModelByDTOWithNotLogin(model);
|
|
|
} else if (model.getNo().equals("dl_天然气") || model.getNo().equals("dl_蒸汽")) {
|
|
|
throw new BusinessException("无需填写");
|
|
|
} else {
|
|
@@ -241,7 +249,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
|
model.setYear(date.getYear());
|
|
|
model.setMonth(date.getMonthValue());
|
|
|
model.setDay(date.getDayOfMonth());
|
|
|
- super.modModelByDTO(model);
|
|
|
+ this.modModelByDTOWithNotLogin(model);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -479,7 +487,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
|
dayScl.setValue("1");
|
|
|
} else {
|
|
|
if (new BigDecimal(dayScl.getValue()).compareTo(new BigDecimal("0")) == 0) {
|
|
|
- report.setValue(produceRecord.getNum().setScale(2,RoundingMode.HALF_UP).toString());
|
|
|
+ report.setValue(produceRecord.getNum().setScale(2, RoundingMode.HALF_UP).toString());
|
|
|
} else {
|
|
|
BigDecimal hyDayValue = new BigDecimal(produceRecord.getNum().toString()).divide(new BigDecimal(dayScl.getValue()), BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(0.3 * 1000)).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
report.setValue(hyDayValue.toString());
|
|
@@ -1111,7 +1119,7 @@ public class ProduceReportServiceImpl extends BaseServiceImpl<ProduceReportMappe
|
|
|
if (new BigDecimal("0").compareTo(new BigDecimal(dayScl.getValue())) == 0) {
|
|
|
dayHy.setValue("0");
|
|
|
} else {
|
|
|
- BigDecimal hyDayValue = total.divide(new BigDecimal(dayScl.getValue()), 2).multiply(new BigDecimal(0.3)).setScale(2,RoundingMode.HALF_UP);
|
|
|
+ BigDecimal hyDayValue = total.divide(new BigDecimal(dayScl.getValue()), 2).multiply(new BigDecimal(0.3)).setScale(2, RoundingMode.HALF_UP);
|
|
|
dayHy.setValue(hyDayValue.toString());
|
|
|
}
|
|
|
dayHy.setYear(date.getYear());
|