lipenghui 1 miesiąc temu
rodzic
commit
325acd1254

+ 10 - 10
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/stat/IotStaticController.java

@@ -112,16 +112,16 @@ public class IotStaticController {
         if (CollUtil.isEmpty(notice.getList())) {
             return success(new PageResult<>(notice.getTotal()));
         }
-        notice.getList().forEach(orderVo -> {
-            if ("维修工单".equals(orderVo.getType())||"保养工单".equals(orderVo.getType())) {
-                if (Objects.nonNull(orderVo.getPerson())) {
-                    AdminUserRespDTO user = adminUserApi.getUser(Long.valueOf(orderVo.getPerson()));
-                    if (Objects.nonNull(user)) {
-                        orderVo.setPerson(user.getNickname());
-                    }
-                }
-            }
-        });
+//        notice.getList().forEach(orderVo -> {
+//            if ("维修工单".equals(orderVo.getType())||"保养工单".equals(orderVo.getType())) {
+//                if (Objects.nonNull(orderVo.getPerson())) {
+//                    AdminUserRespDTO user = adminUserApi.getUser(Long.valueOf(orderVo.getPerson()));
+//                    if (Objects.nonNull(user)) {
+//                        orderVo.setPerson(user.getNickname());
+//                    }
+//                }
+//            }
+//        });
         return success(notice);
     }
 

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

@@ -7,7 +7,7 @@
 select * from (select a.id,
                       a.failure_name    title,
                       '待填写'   as     status,
-                      a.maintain_person person,
+        (select nickname COLLATE utf8mb4_unicode_ci from system_users mm where cast(mm.id as char) =a.maintain_person) as person,
                       '维修工单' as     type,
                       a.create_time
                from rq_iot_maintain a
@@ -27,7 +27,7 @@ select * from (select a.id,
                select c.id,
                       c.name               title,
                       '待填写'   as        status,
-                      c.responsible_person person,
+        (select nickname COLLATE utf8mb4_unicode_ci from system_users bb where cast(bb.id as char) = c.responsible_person) as person,
                       '保养工单' as        type,
                       c.create_time
                from rq_iot_main_work_order c
@@ -45,9 +45,9 @@ select * from (select a.id,
                  and deleted = false)fin
         <where>
             <if test="reqVO.commonParam != null and reqVO.commonParam != ''">
-                and fin.title LIKE CONCAT('%', #{reqVO.commonParam}, '%')
+                (fin.title LIKE CONCAT('%', #{reqVO.commonParam}, '%')
                 OR fin.type LIKE CONCAT('%', #{reqVO.commonParam}, '%')
-                or fin.person LIKE CONCAT('%', #{reqVO.commonParam}, '%')
+                OR fin.person LIKE CONCAT('%', #{reqVO.commonParam}, '%'))
             </if>
         </where>
     </select>