parent
533e0635e8
commit
79630bba85
|
|
@ -71,14 +71,14 @@ public class ElectricityMeterServiceImpl extends ServiceImpl<ElectricityMeterMap
|
|||
}
|
||||
String readTimeStr = entity.getReadTime();
|
||||
if(readTimeStr == null || readTimeStr.equals("")){
|
||||
return Result.error("请先进行抄表再进行清零");
|
||||
return Result.error("为避免结算误差,清零操作时,需要近一小时的抄表数据。");
|
||||
}
|
||||
Date readTime = DateUtil.parse(readTimeStr,"yyyy-MM-dd HH:mm:ss");
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.HOUR_OF_DAY,-1);
|
||||
int comInt = DateUtil.compare(readTime,c.getTime());
|
||||
if(comInt<0){
|
||||
return Result.error("请先进行抄表再进行清零");
|
||||
return Result.error("为避免结算误差,清零操作时,需要近一小时的抄表数据。");
|
||||
}
|
||||
List<Map<String, Object>> req = new ArrayList<>();
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
|
|
|
|||
|
|
@ -73,14 +73,14 @@ public class WaterMeterServiceImpl extends ServiceImpl<WaterMeterMapper, WaterMe
|
|||
}
|
||||
String readTimeStr = entity.getReadTime();
|
||||
if(readTimeStr == null || readTimeStr.equals("")){
|
||||
return Result.error("请先进行抄表再进行清零");
|
||||
return Result.error("为避免结算误差,清零操作时,需要近一小时的抄表数据。");
|
||||
}
|
||||
Date readTime = DateUtil.parse(readTimeStr,"yyyy-MM-dd HH:mm:ss");
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.HOUR_OF_DAY,-1);
|
||||
int comInt = DateUtil.compare(readTime,c.getTime());
|
||||
if(comInt<0){
|
||||
return Result.error("请先进行抄表再进行清零");
|
||||
return Result.error("为避免结算误差,清零操作时,需要近一小时的抄表数据。");
|
||||
}
|
||||
List<Map<String, Object>> req = new ArrayList<>();
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue