|
@@ -216,7 +216,12 @@ public class AnalysisNewService {
|
|
|
analysissubtablebottom.setRecorddate(DateUtils.parseDate(day));
|
|
|
analysissubtablebottom.setStopcode(m.getNow());
|
|
|
analysissubtablebottom.setStopcodemodify(m.getNow());
|
|
|
- double dayvalue = DoubleUtils.GetResult(DoubleUtils.GetResult(m.getNow(),m.getDay(),"-"),meterMap.get(m.getMeterid()).getMagnification(),"*");
|
|
|
+
|
|
|
+ QueryWrapper<Analysissubtablebottom1> wrapperDay = new QueryWrapper<>();
|
|
|
+ wrapperDay.eq("recorddate", DateUtils.addDays(selDate, -1)).eq("meterid",m.getMeterid());
|
|
|
+ Analysissubtablebottom1 one = analysissubtablebottom1Service.getOne(wrapperDay);
|
|
|
+
|
|
|
+ double dayvalue = DoubleUtils.GetResult(DoubleUtils.GetResult(m.getNow(),one.getStopcodemodify(),"-"),meterMap.get(m.getMeterid()).getMagnification(),"*");
|
|
|
analysissubtablebottom.setDayvalue(dayvalue);
|
|
|
analysissubtablebottom.setDayvaluemodify(dayvalue);
|
|
|
analysissubtablebottom1Service.save(analysissubtablebottom);
|
|
@@ -264,7 +269,12 @@ public class AnalysisNewService {
|
|
|
analysissubtablebottom.setRecorddate(DateUtils.parseDate(day));
|
|
|
analysissubtablebottom.setStopcode(m.getNow());
|
|
|
analysissubtablebottom.setStopcodemodify(m.getNow());
|
|
|
- double dayvalue = DoubleUtils.GetResult(DoubleUtils.GetResult(m.getNow(),m.getDay(),"-"),meterMap.get(m.getMeterid()).getMagnification(),"*");
|
|
|
+
|
|
|
+ QueryWrapper<Analysissubtablebottom> wrapperDay = new QueryWrapper<>();
|
|
|
+ wrapperDay.eq("recorddate", DateUtils.addDays(selDate, -1)).eq("meterid",m.getMeterid());
|
|
|
+ Analysissubtablebottom one = analysissubtablebottomService.getOne(wrapperDay);
|
|
|
+
|
|
|
+ double dayvalue = DoubleUtils.GetResult(DoubleUtils.GetResult(m.getNow(),one.getStopcodemodify(),"-"),meterMap.get(m.getMeterid()).getMagnification(),"*");
|
|
|
analysissubtablebottom.setDayvalue(dayvalue);
|
|
|
analysissubtablebottom.setDayvaluemodify(dayvalue);
|
|
|
analysissubtablebottomService.save(analysissubtablebottom);
|