This commit is contained in:
1378012178@qq.com 2025-08-25 14:58:36 +08:00
commit 3d76b90495
5 changed files with 18 additions and 15 deletions

View File

@ -21,7 +21,8 @@
a.depart_name as departName,
a.depart_server_url as departServerUrl,
a.old_server_url ,
a.sync_type
a.sync_type,
a.maintain_status
from nu_iot_tq_electricity_meter a
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

View File

@ -85,14 +85,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<>();
@ -154,7 +154,7 @@ public class ElectricityMeterServiceImpl extends ServiceImpl<ElectricityMeterMap
logService.insert(tqApiLog);
return Result.error(errorMsg);
}
return Result.OK("清零成功");
return Result.OK("清零请1分钟后刷新页面");
}
/**
@ -239,9 +239,9 @@ public class ElectricityMeterServiceImpl extends ServiceImpl<ElectricityMeterMap
return Result.error(errorMsg);
}
if(type.equals(10)){
return Result.OK("拉闸成功");
return Result.OK("拉闸请1分钟后刷新页面");
}else{
return Result.OK("合闸成功");
return Result.OK("合闸请1分钟后刷新页面");
}
}
@ -312,7 +312,7 @@ public class ElectricityMeterServiceImpl extends ServiceImpl<ElectricityMeterMap
logService.insert(tqApiLog);
return Result.error(errorMsg);
}
return Result.OK("抄表成功");
return Result.OK("抄表请1分钟后刷新页面");
}
/**

View File

@ -19,7 +19,8 @@
a.nu_id as nuId,
c .nu_name as nuName,
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
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

View File

@ -84,14 +84,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<>();
@ -153,7 +153,7 @@ public class WaterMeterServiceImpl extends ServiceImpl<WaterMeterMapper, WaterMe
logService.insert(tqApiLog);
return Result.error(errorMsg);
}
return Result.OK("清零成功");
return Result.OK("清零请5分钟后刷新页面");
}
/**
@ -239,9 +239,9 @@ public class WaterMeterServiceImpl extends ServiceImpl<WaterMeterMapper, WaterMe
return Result.error(errorMsg);
}
if(type.equals(43)){
return Result.OK("开阀成功");
return Result.OK("开阀请5分钟后刷新页面");
}else{
return Result.OK("关阀成功");
return Result.OK("关阀请5分钟后刷新页面");
}
}
@ -312,7 +312,7 @@ public class WaterMeterServiceImpl extends ServiceImpl<WaterMeterMapper, WaterMe
logService.insert(tqApiLog);
return Result.error(errorMsg);
}
return Result.OK("抄表成功");
return Result.OK("抄表请5分钟后刷新页面");
}
/**

View File

@ -34,7 +34,8 @@
a.depart_server_url as departServerUrl,
a.old_server_url ,
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
left join nu_base_info b on a.nu_id = b.nu_id
<where>