Browse Source

去掉派工单查询

master
shenzhouyu 3 days ago
parent
commit
704707b056
  1. 4
      glue-modbus-collector/src/main/java/com/xujie/devicecollector/dao/DeviceGatherDao.java
  2. 3
      glue-modbus-collector/src/main/java/com/xujie/devicecollector/service/impl/DeviceGatherServiceImpl.java

4
glue-modbus-collector/src/main/java/com/xujie/devicecollector/dao/DeviceGatherDao.java

@ -53,8 +53,8 @@ public interface DeviceGatherDao extends BaseMapper<DeviceGather> {
/**
* 查询卷号是否已存在
*/
@Select("select count(1) from device_gather where roll_no = #{rollNo} and seq_no = #{seqNo}")
int countByRollNo(@Param("rollNo") String rollNo, @Param("seqNo") String seqNo);
@Select("select count(1) from device_gather where roll_no = #{rollNo}")
int countByRollNo(@Param("rollNo") String rollNo);
/**
* 查询是否存在active为N的数据

3
glue-modbus-collector/src/main/java/com/xujie/devicecollector/service/impl/DeviceGatherServiceImpl.java

@ -90,7 +90,8 @@ public class DeviceGatherServiceImpl implements DeviceGatherService {
private void handleData(String seqNo, String site, String rollNo, String ip) {
boolean rollNoNotZero = !"0".equals(rollNo);
boolean rollNoNotExists = deviceGatherDao.countByRollNo(rollNo,seqNo) == 0;
//2026.11.30去掉派工单查询,避免重复扫卷的情况 @Param("seqNo") String seqNo
boolean rollNoNotExists = deviceGatherDao.countByRollNo(rollNo) == 0;
boolean noActiveN = deviceGatherDao.countActiveN(seqNo) == 0;
if (rollNoNotExists && rollNoNotZero && noActiveN) {

Loading…
Cancel
Save