|
@@ -170,6 +170,21 @@ public class SpStatementShipUsageMonthServiceImpl extends ServiceImpl<SpStatemen
|
|
|
sum.setShorePowerTimeMonth(origin.getShorePowerTimeMonth().add(gh.getShorePowerTimeMonth()).add(underLine.getShorePowerTimeMonth()).setScale(2, RoundingMode.HALF_UP));
|
|
|
sum.setShorePowerTimeYear(origin.getShorePowerTimeYear().add(gh.getShorePowerTimeYear()).add(underLine.getShorePowerTimeYear()).setScale(2, RoundingMode.HALF_UP));
|
|
|
spStatementShipUsageMonths.add(sum);
|
|
|
+ //傻逼一样的要多算一部分数据,外电1,2,3
|
|
|
+ List<SpStatementShipUsageDetail> sbWgq = spStatementShipUsageMonthMapper.selectWgqMonth(thisDate, lastDate);
|
|
|
+ SpStatementShipUsageMonthVo wgqMonth = makeOriginMonthData(sbWgq);
|
|
|
+ SpStatementShipUsageMonthVo wgqYear = spStatementShipUsageMonthMapper.selectWgqYear(dateStrLast);
|
|
|
+ SpStatementShipUsageMonth wgq = new SpStatementShipUsageMonth();
|
|
|
+ wgq.setId(snowflakeGenerator.next().toString());
|
|
|
+ wgq.setDataSource(100);
|
|
|
+ wgq.setReportDate(DateUtils.stringToDate(thisYear + "-" + thisMonth, "yyyy-MM"));
|
|
|
+ wgq.setShorePowerCountMonth(wgqMonth.getShorePowerCount());
|
|
|
+ wgq.setShipUsageMonth(wgqMonth.getShipUsage());
|
|
|
+ wgq.setShorePowerTimeMonth(wgqMonth.getShorePowerTime());
|
|
|
+ wgq.setShipUsageYear(wgqYear.getShipUsage().add(wgqMonth.getShipUsage()).setScale(2, RoundingMode.HALF_UP));
|
|
|
+ wgq.setShorePowerTimeYear(wgqYear.getShorePowerTime().add(wgqMonth.getShorePowerTime()).setScale(2, RoundingMode.HALF_UP));
|
|
|
+ wgq.setShorePowerCountYear(wgqYear.getShorePowerCount().add(wgqMonth.getShorePowerCount()).setScale(2, RoundingMode.HALF_UP));
|
|
|
+ spStatementShipUsageMonths.add(wgq);
|
|
|
this.saveBatch(spStatementShipUsageMonths);
|
|
|
//岸电年比
|
|
|
ArrayList<SpStatementYearAnalysis> save = new ArrayList<>();
|