修改bug

This commit is contained in:
yangjun 2025-08-21 13:50:28 +08:00
parent 843b98b2a7
commit e6b3d3d659
5 changed files with 18 additions and 15 deletions

View File

@ -21,7 +21,8 @@
a.depart_name as departName, a.depart_name as departName,
a.depart_server_url as departServerUrl, a.depart_server_url as departServerUrl,
a.old_server_url , a.old_server_url ,
a.sync_type a.sync_type,
a.maintain_status
from nu_iot_tq_electricity_meter a from nu_iot_tq_electricity_meter a
left join nu_iot_tq_collector b on a.cid = b.cid left join nu_iot_tq_collector b on a.cid = b.cid
left join nu_base_info c on a.nu_id = c.nu_id left join nu_base_info c on a.nu_id = c.nu_id

View File

@ -62,14 +62,14 @@ public class ElectricityMeterServiceImpl extends ServiceImpl<ElectricityMeterMap
} }
String readTimeStr = entity.getReadTime(); String readTimeStr = entity.getReadTime();
if(readTimeStr == null || readTimeStr.equals("")){ if(readTimeStr == null || readTimeStr.equals("")){
return Result.error("请先进行抄表再进行清零"); return Result.error("为避免结算误差,清零操作时,需要近一小时的抄表数据。");
} }
Date readTime = DateUtil.parse(readTimeStr,"yyyy-MM-dd HH:mm:ss"); Date readTime = DateUtil.parse(readTimeStr,"yyyy-MM-dd HH:mm:ss");
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
c.add(Calendar.HOUR_OF_DAY,-1); c.add(Calendar.HOUR_OF_DAY,-1);
int comInt = DateUtil.compare(readTime,c.getTime()); int comInt = DateUtil.compare(readTime,c.getTime());
if(comInt<0){ if(comInt<0){
return Result.error("请先进行抄表再进行清零"); return Result.error("为避免结算误差,清零操作时,需要近一小时的抄表数据。");
} }
List<Map<String, Object>> req = new ArrayList<>(); List<Map<String, Object>> req = new ArrayList<>();
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
@ -131,7 +131,7 @@ public class ElectricityMeterServiceImpl extends ServiceImpl<ElectricityMeterMap
logService.insert(tqApiLog); logService.insert(tqApiLog);
return Result.error(errorMsg); return Result.error(errorMsg);
} }
return Result.OK("清零成功"); return Result.OK("清零请1分钟后刷新页面");
} }
/** /**
@ -216,9 +216,9 @@ public class ElectricityMeterServiceImpl extends ServiceImpl<ElectricityMeterMap
return Result.error(errorMsg); return Result.error(errorMsg);
} }
if(type.equals(10)){ if(type.equals(10)){
return Result.OK("拉闸成功"); return Result.OK("拉闸请1分钟后刷新页面");
}else{ }else{
return Result.OK("合闸成功"); return Result.OK("合闸请1分钟后刷新页面");
} }
} }
@ -289,7 +289,7 @@ public class ElectricityMeterServiceImpl extends ServiceImpl<ElectricityMeterMap
logService.insert(tqApiLog); logService.insert(tqApiLog);
return Result.error(errorMsg); return Result.error(errorMsg);
} }
return Result.OK("抄表成功"); return Result.OK("抄表请1分钟后刷新页面");
} }
/** /**

View File

@ -19,7 +19,8 @@
a.nu_id as nuId, a.nu_id as nuId,
c .nu_name as nuName, c .nu_name as nuName,
a.depart_id as departId, a.depart_id as departId,
a.depart_name as departName a.depart_name as departName,
a.maintain_status
from nu_iot_tq_water_meter a from nu_iot_tq_water_meter a
left join nu_iot_tq_collector b on a.cid = b.cid left join nu_iot_tq_collector b on a.cid = b.cid
left join nu_base_info c on a.nu_id = c.nu_id left join nu_base_info c on a.nu_id = c.nu_id

View File

@ -62,14 +62,14 @@ public class WaterMeterServiceImpl extends ServiceImpl<WaterMeterMapper, WaterMe
} }
String readTimeStr = entity.getReadTime(); String readTimeStr = entity.getReadTime();
if(readTimeStr == null || readTimeStr.equals("")){ if(readTimeStr == null || readTimeStr.equals("")){
return Result.error("请先进行抄表再进行清零"); return Result.error("为避免结算误差,清零操作时,需要近一小时的抄表数据。");
} }
Date readTime = DateUtil.parse(readTimeStr,"yyyy-MM-dd HH:mm:ss"); Date readTime = DateUtil.parse(readTimeStr,"yyyy-MM-dd HH:mm:ss");
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
c.add(Calendar.HOUR_OF_DAY,-1); c.add(Calendar.HOUR_OF_DAY,-1);
int comInt = DateUtil.compare(readTime,c.getTime()); int comInt = DateUtil.compare(readTime,c.getTime());
if(comInt<0){ if(comInt<0){
return Result.error("请先进行抄表再进行清零"); return Result.error("为避免结算误差,清零操作时,需要近一小时的抄表数据。");
} }
List<Map<String, Object>> req = new ArrayList<>(); List<Map<String, Object>> req = new ArrayList<>();
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
@ -131,7 +131,7 @@ public class WaterMeterServiceImpl extends ServiceImpl<WaterMeterMapper, WaterMe
logService.insert(tqApiLog); logService.insert(tqApiLog);
return Result.error(errorMsg); return Result.error(errorMsg);
} }
return Result.OK("清零成功"); return Result.OK("清零请5分钟后刷新页面");
} }
/** /**
@ -217,9 +217,9 @@ public class WaterMeterServiceImpl extends ServiceImpl<WaterMeterMapper, WaterMe
return Result.error(errorMsg); return Result.error(errorMsg);
} }
if(type.equals(43)){ if(type.equals(43)){
return Result.OK("开阀成功"); return Result.OK("开阀请5分钟后刷新页面");
}else{ }else{
return Result.OK("关阀成功"); return Result.OK("关阀请5分钟后刷新页面");
} }
} }
@ -290,7 +290,7 @@ public class WaterMeterServiceImpl extends ServiceImpl<WaterMeterMapper, WaterMe
logService.insert(tqApiLog); logService.insert(tqApiLog);
return Result.error(errorMsg); return Result.error(errorMsg);
} }
return Result.OK("抄表成功"); return Result.OK("抄表请5分钟后刷新页面");
} }
/** /**

View File

@ -34,7 +34,8 @@
a.depart_server_url as departServerUrl, a.depart_server_url as departServerUrl,
a.old_server_url , a.old_server_url ,
a.sync_type, a.sync_type,
(select count(*) from nu_iot_yiweilian_humid_alarm b where a.sn = b.sn and b.status = '0') as alarmCn (select count(*) from nu_iot_yiweilian_humid_alarm b where a.sn = b.sn and b.status = '0') as alarmCn,
a.maintain_status
from nu_iot_yiweilian_humid_device a from nu_iot_yiweilian_humid_device a
left join nu_base_info b on a.nu_id = b.nu_id left join nu_base_info b on a.nu_id = b.nu_id
<where> <where>