lipenghui 2 napja
szülő
commit
e8fb08f4ec

+ 2 - 4
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/stat/IotReportDeviceController.java

@@ -44,12 +44,10 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
 @PermitAll
 public class IotReportDeviceController {
     private static final ImmutableList<String> jt = ImmutableList.<String>builder()
-            .add("电驱增压机", "柴驱增压机", "液驱增压机", "电驱空压机", "柴驱空压机") // 第一批5个
             .add("提纯撬", "空气处理撬", "膜组", "注水泵", "绞车") // 第二批5个
             .add("井架", "底座", "发动机", "泥浆泵", "连油主车") // 第三批5个
             .build();
     private static final ImmutableList<String> rh = ImmutableList.<String>builder()
-            .add("电驱增压机", "柴驱增压机", "液驱增压机", "电驱空压机", "柴驱空压机") // 第一批5个
             .add("提纯撬", "空气处理撬", "膜组", "注水泵").build();
     private static final ImmutableList<String> ry = ImmutableList.<String>builder()
             .add("井架", "底座", "发动机", "泥浆泵","绞车").build();
@@ -95,14 +93,14 @@ public class IotReportDeviceController {
         collect.forEach(e->{
             IotProductClassifyDO iotProductClassifyDO = iotProductClassifyMapper.selectById(e.getKey());
             if ("jt".equals(companyCode)) {
-                if (jt.contains(iotProductClassifyDO.getName())){
+                if (jt.contains(iotProductClassifyDO.getName())||"空压机".equals(iotProductClassifyDO.getName())||iotProductClassifyDO.getName().contains("驱增压机")) {
                     Map<String, Object> map = new HashMap<>(4);
                     map.put("category", iotProductClassifyDO.getName());
                     map.put("value", e.getValue());
                     results.add(map);
                 }
             } else if ("rh".equals(companyCode)) {
-                if (rh.contains(iotProductClassifyDO.getName())){
+                if (rh.contains(iotProductClassifyDO.getName())||"空压机".equals(iotProductClassifyDO.getName())||iotProductClassifyDO.getName().contains("驱增压机")){
                     Map<String, Object> map = new HashMap<>(4);
                     map.put("category", iotProductClassifyDO.getName());
                     map.put("value", e.getValue());

+ 1 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/resources/mapper/static/IotInspectOrderDetailMapper.xml

@@ -143,8 +143,8 @@
 
     <select id="getExceptionDevicePage" resultType="cn.iocoder.yudao.module.pms.controller.admin.vo.IotDeviceSimple">
         select b.device_code as deviceCode, b.device_name as deviceName, a.orderCount,a.dept_id as deptId, from (select device_id,count(distinct order_id) as orderCount from rq_iot_inspect_order_detail c
-            where c.if_normal = false
             <where>
+                c.if_normal = false and c.deleted=0
                 <if test="reqVO.createTime[0] != null">
                     AND a.create_time &gt;= #{reqVO.createTime[0]}
                 </if>

+ 1 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/resources/mapper/static/IotInspectOrderMapper.xml

@@ -12,6 +12,7 @@
             resultType="cn.iocoder.yudao.module.pms.controller.admin.stat.vo.AllOrderResp">
         select status,count(status) as num from rq_iot_inspect_order a
         <where>
+            a.deleted=0
             <if test="reqVO.createTime[0] != null">
                 AND a.create_time &gt;= #{reqVO.createTime[0]}
             </if>

+ 4 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/resources/mapper/static/IotMaintainMapper.xml

@@ -103,6 +103,7 @@
             resultType="cn.iocoder.yudao.module.pms.controller.admin.stat.vo.AllOrderResp">
         select status,count(status) as num from rq_iot_maintain a
         <where>
+            a.deleted=0
             <if test="reqVO.createTime[0] != null">
                 AND a.create_time &gt;= #{reqVO.createTime[0]}
             </if>
@@ -156,6 +157,7 @@ select * from (
         -- 左关联祖父级部门(type=3时用)
         LEFT JOIN system_dept p2 ON p1.parent_id = p2.id
         <where>
+            a.deleted=0
             <if test="reqVO.createTime[0] != null">
                 AND a.create_time &gt;= #{reqVO.createTime[0]}
             </if>
@@ -204,6 +206,7 @@ select * from (
         -- 左关联祖父级部门(type=3时用)
         LEFT JOIN system_dept p2 ON p1.parent_id = p2.id
         <where>
+            b.deleted=0
             <if test="reqVO.createTime[0] != null">
                 AND b.create_time &gt;= #{reqVO.createTime[0]}
             </if>
@@ -460,6 +463,7 @@ select * from (
         -- 左关联祖父级部门(type=3时用)
         LEFT JOIN system_dept p2 ON p1.parent_id = p2.id
         <where>
+            c.deleted=0
             <if test="reqVO.createTime[0] != null">
                 AND c.create_time &gt;= #{reqVO.createTime[0]}
             </if>

+ 1 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/resources/mapper/static/IotOpeationFillMapper.xml

@@ -1614,6 +1614,7 @@
             resultType="cn.iocoder.yudao.module.pms.controller.admin.stat.vo.AllOrderResp">
         select order_status as status,count(order_status) as num from rq_iot_opeation_fill_order a
         <where>
+            a.deleted=0
             <if test="reqVO.createTime[0] != null">
                 AND a.create_time &gt;= #{reqVO.createTime[0]}
             </if>