Bläddra i källkod

优化离线设备查询代码

fuyuhchuan 1 år sedan
förälder
incheckning
5fd30c6a4a

+ 1 - 1
service-issue/service-issue-biz/src/main/java/com/usky/issue/service/impl/SpHj2017ServiceImpl.java

@@ -91,7 +91,7 @@ public class SpHj2017ServiceImpl extends AbstractCrudService<SpHj2017Mapper, SpH
 
         QueryWrapper<SpHj2017> queryWrapper1 = Wrappers.query();
         queryWrapper1.select("DISTINCT device_code")
-                .inSql("device_code", "SELECT device_code FROM yt_device_status WHERE company_code = '" + companyCode + "'");
+                .inSql("device_code", "SELECT owner_code FROM sp_owner WHERE company = '" + companyCode + "'");
         List<SpHj2017> SpHj2017 = this.list(queryWrapper1);
 
         Integer deviceCount = SpHj2017.size();

+ 1 - 1
service-issue/service-issue-biz/src/main/java/com/usky/issue/service/impl/SpRtu2017ServiceImpl.java

@@ -93,7 +93,7 @@ public class SpRtu2017ServiceImpl extends AbstractCrudService<SpRtu2017Mapper, S
 
         QueryWrapper<SpRtu2017> queryWrapper1 = Wrappers.query();
         queryWrapper1.select("DISTINCT device_code")
-                .inSql("device_code", "SELECT device_code FROM yt_device_status WHERE company_code = '" + companyCode + "'");
+                .inSql("device_code", "SELECT owner_code FROM sp_owner WHERE company = '" + companyCode + "'");
         List<SpRtu2017> SpRtu2017 = this.list(queryWrapper1);
 
         Integer deviceCount = SpRtu2017.size();

+ 1 - 1
service-issue/service-issue-biz/src/main/java/com/usky/issue/service/impl/SpSj2017ServiceImpl.java

@@ -88,7 +88,7 @@ public class SpSj2017ServiceImpl extends AbstractCrudService<SpSj2017Mapper, SpS
         String companyCode = requestVO.get("companyCode").toString();
         QueryWrapper<SpSj2017> queryWrapper1 = Wrappers.query();
         queryWrapper1.select("DISTINCT device_code")
-                .inSql("device_code", "SELECT device_code FROM yt_device_status WHERE company_code = '" + companyCode + "'");
+                .inSql("device_code", "SELECT owner_code FROM sp_owner WHERE company = '" + companyCode + "'");
         List<SpSj2017> SpSj2017 = this.list(queryWrapper1);
         Integer deviceCount = SpSj2017.size();
         return deviceCount;