liubo vor 3 Jahren
Ursprung
Commit
281e19150c

+ 16 - 13
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabSubjectManagerService.java

@@ -515,21 +515,24 @@ public class LabSubjectManagerService {
 
 
         });
-        // 实验室化学品临界量计算
-        R r = remoteChemicalService.queryCriticaliBySubId(subIds);
-        if(r.getCode() == HttpStatus.SUCCESS){
-            List<Map<String, Object>> list = (List<Map<String, Object>>) r.getData();
-            list.forEach(map -> {
-                for (LabSubjectVO s : labSubjects) {
-                    if (Objects.equals(s.getId(), Long.parseLong(map.get("subId") + ""))) {
-                        s.setRiskIndicator(map.get("criticali") + "");
-                        break;
+        try {
+            // 实验室化学品临界量计算
+            R r = remoteChemicalService.queryCriticaliBySubId(subIds);
+            if(r.getCode() == HttpStatus.SUCCESS){
+                List<Map<String, Object>> list = (List<Map<String, Object>>) r.getData();
+                list.forEach(map -> {
+                    for (LabSubjectVO s : labSubjects) {
+                        if (Objects.equals(s.getId(), Long.parseLong(map.get("subId") + ""))) {
+                            s.setRiskIndicator(map.get("criticali") + "");
+                            break;
+                        }
                     }
-                }
-            });
+                });
 
-        }
+            }
+        }catch (Exception e){
 
+        }
 
         // 2.5 页面改变,接口加分页,并拆成两部分
         return labSubjects;
@@ -908,7 +911,7 @@ public class LabSubjectManagerService {
                             return sensorFunctionStatus;
                         }
 
-                    }).collect(Collectors.toList());
+                    }).distinct().collect(Collectors.toList());
                 }).filter(a -> CollUtil.isNotEmpty(a)).flatMap(List::stream)
                 .sorted((c, d) -> NumberUtil.compare(c.getOrder(), d.getOrder()))
                 .collect(Collectors.toList());

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabHardwareMapper.xml

@@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectLabHardwareVo"/>
         <where>
             <if test="ipAddress != null "> and xx.ip_address = #{ipAddress}</if>
-            <if test="deviceStatus != null "> and xx.device_status = #{deviceStatus}</if>
+            <if test="deviceStatus != null "> and xx.deviceStatus = #{deviceStatus}</if>
             <if test="subjectId != null "> and xx.subject_id = #{subjectId}</if>
             <if test="deptId != null ">
                 AND (xx.dept_id = #{deptId} OR xx.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},