Przeglądaj źródła

联锁查询、新增、编辑先改回原来的

LLL 2 miesięcy temu
rodzic
commit
612b46b928

+ 14 - 49
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/mapper/xml/InterlockDetailMapper.xml

@@ -7,45 +7,36 @@
         select d.id, d.summaryid, d.interlockname, d.interlock_condition, d.interlock_condition_tag, d.description,
         d.instrument_status, d.interlock_set_value, d.bypass, d.input_status, d.output_status,
         d.mp_status, s.ljgx, s.interlock_out_value,
-        d.mp_status_name, d.input_status_name, d.output_status_name, d.bypass_name
+        h1.control_system_status_name as mp_status_name,
+        h2.control_system_status_name as input_status_name,
+        h3.control_system_status_name as output_status_name,
+        h4.bypass_name
         from interlock_detail d
         left join interlock_summary s on d.summaryid = s.id
+        left join interlock_base_hy h1 on h1.control_system_status = d.mp_status and h1.interlock_system_id = s.interlock_system_id
+        left join interlock_base_hy h2 on h2.control_system_status = d.input_status and h2.interlock_system_id = s.interlock_system_id
+        left join interlock_base_hy h3 on h3.control_system_status = d.output_status and h3.interlock_system_id = s.interlock_system_id
+        left join interlock_base_hy h4 on h4.bypass = d.bypass and h4.interlock_system_id = s.interlock_system_id
         <where>
             <if test="dto.summaryid != null and dto.summaryid != ''"> and d.summaryid = #{dto.summaryid}</if>
             <if test="dto.interlockConditionTag != null and dto.interlockConditionTag != ''"> and d.interlock_condition_tag like concat('%',#{dto.interlockConditionTag},'%')</if>
         </where>
         order by d.create_time desc
     </select>
-<!--    <select id="getPage2" parameterType="org.jeecg.modules.detail.dto.InterlockDetailQueryDTO" resultType="org.jeecg.modules.detail.vo.InterlockDetailQueryVO">-->
-<!--        select d.id, d.summaryid, d.interlockname, d.interlock_condition, d.interlock_condition_tag, d.description,-->
-<!--               d.instrument_status, d.interlock_set_value, d.bypass, d.input_status, d.output_status,-->
-<!--               d.mp_status, s.ljgx, s.interlock_out_value,-->
-<!--               h1.control_system_status_name as mp_status_name,-->
-<!--               h2.control_system_status_name as input_status_name,-->
-<!--               h3.control_system_status_name as output_status_name,-->
-<!--               h4.bypass_name-->
-<!--        from interlock_detail d-->
-<!--        left join interlock_summary s on d.summaryid = s.id-->
-<!--        left join interlock_base_hy h1 on h1.control_system_status = d.mp_status and h1.interlock_system_id = s.interlock_system_id-->
-<!--        left join interlock_base_hy h2 on h2.control_system_status = d.input_status and h2.interlock_system_id = s.interlock_system_id-->
-<!--        left join interlock_base_hy h3 on h3.control_system_status = d.output_status and h3.interlock_system_id = s.interlock_system_id-->
-<!--        left join interlock_base_hy h4 on h4.bypass = d.bypass and h4.interlock_system_id = s.interlock_system_id-->
-<!--        <where>-->
-<!--            <if test="dto.summaryid != null and dto.summaryid != ''"> and d.summaryid = #{dto.summaryid}</if>-->
-<!--            <if test="dto.interlockConditionTag != null and dto.interlockConditionTag != ''"> and d.interlock_condition_tag like concat('%',#{dto.interlockConditionTag},'%')</if>-->
-<!--        </where>-->
-<!--        order by d.create_time desc-->
-<!--    </select>-->
 
     <!-- 联锁总表-分页列表查询(各种逻辑状态)-->
     <select id="getPage" parameterType="org.jeecg.modules.summary.vo.InterlockSummaryVO" resultType="org.jeecg.modules.summary.vo.InterlockSummaryVO">
         select d.id, d.summaryid, d.interlockname, d.interlock_condition, d.interlock_condition_tag, d.instrument_status, d.control_system_status,
         s.interlock_status, s.loop_health_level, d.bypass, s.interlock_apparatus_id, s.interlock_system_id,
-        s.interlock_status_name , d.bypass_name ,
-        d.instrument_status_name , d.control_system_status_name,
+        h1.interlock_status_name , h2.bypass_name ,
+        h3.instrument_status_name , h4.control_system_status_name,
         h.instrument_status_normal, h.bypass_yes, h.interlock_status_ty, h.control_system_status_normal
         from interlock_detail d
         left join interlock_summary s on d.summaryid = s.id
+        left join interlock_base_hy h1 on h1.interlock_status = s.interlock_status and h1.interlock_system_id = s.interlock_system_id
+        left join interlock_base_hy h2 on h2.bypass = d.bypass and h2.interlock_system_id = s.interlock_system_id
+        left join interlock_base_hy h3 on h3.instrument_status = d.instrument_status and h3.interlock_system_id = s.interlock_system_id
+        left join interlock_base_hy h4 on h4.control_system_status = d.control_system_status and h4.interlock_system_id = s.interlock_system_id
         left join interlock_base h on h.id = s.interlock_system_id
         <where>
             <if test="interlockSummaryVO.interlockApparatusId != null and interlockSummaryVO.interlockApparatusId != ''"> and s.interlock_apparatus_id = #{interlockSummaryVO.interlockApparatusId}</if>
@@ -60,32 +51,6 @@
         </where>
         order by s.create_time desc
     </select>
-<!--    <select id="getPage" parameterType="org.jeecg.modules.summary.vo.InterlockSummaryVO" resultType="org.jeecg.modules.summary.vo.InterlockSummaryVO">-->
-<!--        select d.id, d.summaryid, d.interlockname, d.interlock_condition, d.interlock_condition_tag, d.instrument_status, d.control_system_status,-->
-<!--               s.interlock_status, s.loop_health_level, d.bypass, s.interlock_apparatus_id, s.interlock_system_id,-->
-<!--        h1.interlock_status_name , h2.bypass_name ,-->
-<!--        h3.instrument_status_name , h4.control_system_status_name,-->
-<!--        h.instrument_status_normal, h.bypass_yes, h.interlock_status_ty, h.control_system_status_normal-->
-<!--        from interlock_detail d-->
-<!--            left join interlock_summary s on d.summaryid = s.id-->
-<!--            left join interlock_base_hy h1 on h1.interlock_status = s.interlock_status and h1.interlock_system_id = s.interlock_system_id-->
-<!--            left join interlock_base_hy h2 on h2.bypass = d.bypass and h2.interlock_system_id = s.interlock_system_id-->
-<!--            left join interlock_base_hy h3 on h3.instrument_status = d.instrument_status and h3.interlock_system_id = s.interlock_system_id-->
-<!--            left join interlock_base_hy h4 on h4.control_system_status = d.control_system_status and h4.interlock_system_id = s.interlock_system_id-->
-<!--        left join interlock_base h on h.id = s.interlock_system_id-->
-<!--        <where>-->
-<!--            <if test="interlockSummaryVO.interlockApparatusId != null and interlockSummaryVO.interlockApparatusId != ''"> and s.interlock_apparatus_id = #{interlockSummaryVO.interlockApparatusId}</if>-->
-<!--            <if test="interlockSummaryVO.interlockSystemId != null and interlockSummaryVO.interlockSystemId != ''"> and s.interlock_system_id = #{interlockSummaryVO.interlockSystemId}</if>-->
-<!--            <if test="interlockSummaryVO.interlockname != null and interlockSummaryVO.interlockname != ''"> and d.interlockname like concat('%', #{interlockSummaryVO.interlockname}, '%')</if>-->
-<!--            <if test="interlockSummaryVO.interlockConditionTag != null and interlockSummaryVO.interlockConditionTag != ''"> and d.interlock_condition_tag like concat('%', #{interlockSummaryVO.interlockConditionTag}, '%')</if>-->
-<!--            <if test="interlockSummaryVO.instrumentStatus != null and interlockSummaryVO.instrumentStatus != ''"> and d.instrument_status = #{interlockSummaryVO.instrumentStatus}</if>-->
-<!--            <if test="interlockSummaryVO.controlSystemStatus != null and interlockSummaryVO.controlSystemStatus != ''"> and d.control_system_status = #{interlockSummaryVO.controlSystemStatus}</if>-->
-<!--            <if test="interlockSummaryVO.interlockStatus != null and interlockSummaryVO.interlockStatus != ''"> and s.interlock_status = #{interlockSummaryVO.interlockStatus}</if>-->
-<!--            <if test="interlockSummaryVO.loopHealthLevel != null and interlockSummaryVO.loopHealthLevel != ''"> and s.loop_health_level = #{interlockSummaryVO.loopHealthLevel}</if>-->
-<!--            <if test="interlockSummaryVO.bypass != null and interlockSummaryVO.bypass != ''"> and d.bypass = #{interlockSummaryVO.bypass}</if>-->
-<!--        </where>-->
-<!--        order by s.create_time desc-->
-<!--    </select>-->
 
     <select id="getPageBefore" parameterType="org.jeecg.modules.summary.vo.InterlockSummaryVO" resultType="org.jeecg.modules.summary.vo.InterlockSummaryVO">
         select d.id, d.summaryid, d.interlockname, d.interlock_condition, d.interlock_condition_tag, d.instrument_status, d.control_system_status,

+ 13 - 172
jeecg-module-interlock/src/main/java/org/jeecg/modules/summary/service/impl/InterlockSummaryServiceImpl.java

@@ -163,40 +163,24 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
 
         // 系统设置的各状态
         InterlockBase base = interlockBaseService.getById(interlockAddDTO.getInterlockSystemId());
-
-
         // 控制系统状态(输入卡件状态、输出卡件状态、MP状态)
         String controlSystemStatusNormal = base.getControlSystemStatusNormal(); // 正常
         String controlSystemStatusAbnormal = editStatus(base.getControlSystemStatusNormal()); // 非正常
-        String controlSystemStatusNormalName = base.getControlSystemStatusNormalName(); // 正常-名称
-        String controlSystemStatusAbnormalName = base.getControlSystemStatusAbnormalName(); // 非正常-名称
-
-        String controlSystemStatus = controlSystemStatusNormal;// 总体 先设置为 控制系统状态-正常
-
         // 旁路状态
         String bypassYes = base.getBypassYes(); // 是
-        String bypassYesName = base.getBypassYesName(); // 是-名称
-        String bypassNoName = base.getBypassNoName(); // 是-名称
-
         // 仪表状态
         String instrumentStatusNormal = base.getInstrumentStatusNormal(); // 正常
-        String instrumentStatusAbnormal = editStatus(base.getInstrumentStatusNormal()); // 非正常
-        String instrumentStatusNormalName = base.getInstrumentStatusNormalName(); // 正常-名称
-        String instrumentStatusAbnormalName = base.getInstrumentStatusAbnormalName(); // 非正常名称
-
-        String instrumentStatus = instrumentStatusNormal;// 总体 先设置为 仪表状态-正常
-
+        String instrumentStatusAbnormal = editStatus(base.getInstrumentStatusNormal()); // 正常
         // 联锁状态
         String interlockStatusTy = base.getInterlockStatusTy(); // 投用
         String interlockStatusWty = editStatus(base.getInterlockStatusTy()); // 未投用
-        String interlockStatusTyName = base.getInterlockStatusTyName(); // 投用-名称
-        String interlockStatusWtyName = base.getInterlockStatusWtyName(); // 未投用-名称
+
 
         String interlockStatus = interlockStatusTy;;//	先设置为 联锁状态-投用
-        String interlockStatusName = interlockStatusTyName; // 联锁状态-名称,先设置为 联锁状态-投用
-        String interlockStatusPs = InterlockAllStatus.INTERLOCK_STATUS_TY; // 联锁状态-名称,先设置为 联锁状态-投用
+        String loopHealthLevel = "A";// 回路健康级别
 
-        String loopHealthLevel = "";// 回路健康级别
+        String controlSystemStatus = controlSystemStatusNormal;// 总体 先设置为 控制系统状态-正常
+        String instrumentStatus = instrumentStatusNormal;// 总体 先设置为 仪表状态-正常
 
 
         //删除该联锁的所有联锁详细信息的所有点位
@@ -218,41 +202,12 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
 
         for (InterlockDetailAddDTO dto : interlockDetailAddDTOList){
 
-            //控制系统状态-先设置为正常
-            String controlSystemStatusName = controlSystemStatusNormalName; //正常
-            String controlSystemStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_NORMAL; //正常
-            //旁路状态-先设置为是
-            String bypassName = bypassYesName; // 旁路状态-是
-            String bypassPs = InterlockAllStatus.BY_PASS_YES; // 旁路状态-是
-            // 仪表状态-先设置为正常
-            String instrumentStatusName = instrumentStatusNormalName; //正常
-            String instrumentStatusPs = InterlockAllStatus.INSTRUMENT_STATUS_NORMAL; //正常
-            //输入卡件状态-先设置为正常
-            String inputStatusName = controlSystemStatusNormalName; //正常
-            String inputStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_NORMAL; //正常
-            //输出卡件状态-先设置为正常
-            String outputStatusName = controlSystemStatusNormalName; //正常
-            String outputStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_NORMAL; //正常
-            //MP状态-先设置为正常
-            String mpStatusName = controlSystemStatusNormalName; //正常
-            String mpStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_NORMAL; //正常
-
             dto.setThresholdTimeUnit("s"); // TODO 暂定单位为秒
             dto.setSummaryid(summaryId);
 
 
             //联锁状态; 旁路状态是多个的话,任何一个旁路状态为“是”,则联锁状态是“未投用(摘除)”,旁路状态都为“否”,则联锁状态是“投用”。
-            if(dto.getBypass()!=null && bypassYes.equals(dto.getBypass())){
-                interlockStatus = interlockStatusWty;
-                interlockStatusName = interlockStatusWtyName;
-                interlockStatusPs = InterlockAllStatus.INTERLOCK_STATUS_WTY;
-            }
-            if(dto.getBypass()!=null && !bypassYes.equals(dto.getBypass())){
-                bypassName = bypassNoName; // 旁路状态-是
-                bypassPs = InterlockAllStatus.BY_PASS_NO; // 旁路状态-是
-            }
-            dto.setBypassName(bypassName);
-            dto.setBypassPs(bypassPs);
+            if(dto.getBypass()!=null && bypassYes.equals(dto.getBypass())) interlockStatus = interlockStatusWty;
 
             //仪表状态
             if(dto.getInstrumentStatusJuge()!=null){
@@ -302,46 +257,14 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
 
                 }
 
-                if(dto.getInstrumentStatus()!=null && dto.getInstrumentStatus().equals(instrumentStatusAbnormal)){
-                    instrumentStatus = instrumentStatusAbnormal;
-                    instrumentStatusPs = InterlockAllStatus.INSTRUMENT_STATUS_GZ;
-                    instrumentStatusName = instrumentStatusAbnormalName;
-                }
-                dto.setInstrumentStatusName(instrumentStatusName);
-                dto.setInstrumentStatusPs(instrumentStatusPs);
-            }
-
-            // MP状态、输入卡件状态、输出卡件状态
-            if(!dto.getInputStatus().equals(controlSystemStatusNormal)){
-                inputStatusName = controlSystemStatusAbnormalName ; //不正常
-                inputStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_ABNORMAL;
-            }
-            dto.setInputStatusPs(inputStatusPs);
-            dto.setInputStatusName(inputStatusName);
-
-            if(!dto.getOutputStatus().equals(controlSystemStatusNormal)){
-                outputStatusName = controlSystemStatusAbnormalName ; //不正常
-                outputStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_ABNORMAL;
-            }
-            dto.setOutputStatusPs(outputStatusPs);
-            dto.setOutputStatusName(outputStatusName);
-
-            if(!dto.getMpStatus().equals(controlSystemStatusNormal)){
-                mpStatusName = controlSystemStatusAbnormalName ; //不正常
-                mpStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_ABNORMAL;
+                if(dto.getInstrumentStatus()!=null && dto.getInstrumentStatus().equals(instrumentStatusAbnormal)) instrumentStatus = instrumentStatusAbnormal;
             }
-            dto.setMpStatusPs(mpStatusPs);
-            dto.setMpStatusName(mpStatusName);
 
             //控制系统状态 ——  MP状态、输入卡件状态、输出卡件状态任何一个非正常则控制系统状态非正常。
             if(controlSystemStatusAbnormal.equals(dto.getMpStatus()) || controlSystemStatusAbnormal.equals(dto.getInputStatus()) || controlSystemStatusAbnormal.equals(dto.getOutputStatus())) {
                 dto.setControlSystemStatus(controlSystemStatusAbnormal); // 非正常
                 controlSystemStatus = controlSystemStatusAbnormal;
-                controlSystemStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_ABNORMAL;
-                controlSystemStatusName = controlSystemStatusAbnormalName;
             } else dto.setControlSystemStatus(controlSystemStatusNormal); // 正常
-            dto.setControlSystemStatusName(controlSystemStatusName);
-            dto.setControlSystemStatusPs(controlSystemStatusPs);
 
             InterlockDetail detail = InterlockDetailConvert.INSTANCE.toEntity(dto, interlockAddDTO.getInterlockName(),formattedDateTime, interlockAddDTO.getInterlockSystemId());
 
@@ -360,8 +283,6 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
 
         InterlockSummary interlockSummary = InterlockSummaryConvert.INSTANCE.toInterlockSummary1(interlockAddDTO,interlockStatus,loopHealthLevel);
         //修改联锁总表数据
-        interlockSummary.setInterlockStatusPs(interlockStatusPs);
-        interlockSummary.setInterlockStatusName(interlockStatusName);
         interlockSummaryMapper.updateById(interlockSummary);
         //修改联锁总表临时表数据
         InterlockSummaryTemp interlockSummaryTemp = TempConvert.INSTANCE.toInterlockSummaryTemp(interlockSummary);
@@ -383,41 +304,24 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
 
         // 系统设置的各状态
         InterlockBase base = interlockBaseService.getById(interlockAddDTO.getInterlockSystemId());
-
-
         // 控制系统状态(输入卡件状态、输出卡件状态、MP状态)
         String controlSystemStatusNormal = base.getControlSystemStatusNormal(); // 正常
         String controlSystemStatusAbnormal = editStatus(base.getControlSystemStatusNormal()); // 非正常
-        String controlSystemStatusNormalName = base.getControlSystemStatusNormalName(); // 正常-名称
-        String controlSystemStatusAbnormalName = base.getControlSystemStatusAbnormalName(); // 非正常-名称
-
-        String controlSystemStatus = controlSystemStatusNormal;// 总体 先设置为 控制系统状态-正常
-
         // 旁路状态
         String bypassYes = base.getBypassYes(); // 是
-        String bypassYesName = base.getBypassYesName(); // 是-名称
-        String bypassNoName = base.getBypassNoName(); // 是-名称
-
         // 仪表状态
         String instrumentStatusNormal = base.getInstrumentStatusNormal(); // 正常
-        String instrumentStatusAbnormal = editStatus(base.getInstrumentStatusNormal()); // 非正常
-        String instrumentStatusNormalName = base.getInstrumentStatusNormalName(); // 正常-名称
-        String instrumentStatusAbnormalName = base.getInstrumentStatusAbnormalName(); // 非正常名称
-
-        String instrumentStatus = instrumentStatusNormal;// 总体 先设置为 仪表状态-正常
-
+        String instrumentStatusAbnormal = editStatus(base.getInstrumentStatusNormal()); // 正常
         // 联锁状态
         String interlockStatusTy = base.getInterlockStatusTy(); // 投用
         String interlockStatusWty = editStatus(base.getInterlockStatusTy()); // 未投用
-        String interlockStatusTyName = base.getInterlockStatusTyName(); // 投用-名称
-        String interlockStatusWtyName = base.getInterlockStatusWtyName(); // 未投用-名称
 
-        String interlockStatus = interlockStatusTy;;//	先设置为 联锁状态-投用
-        String interlockStatusName = interlockStatusTyName; // 联锁状态-名称,先设置为 联锁状态-投用
-        String interlockStatusPs = InterlockAllStatus.INTERLOCK_STATUS_TY; // 联锁状态-名称,先设置为 联锁状态-投用
 
+        String interlockStatus = interlockStatusTy;;//	先设置为 联锁状态-投用
         String loopHealthLevel = "";// 回路健康级别
 
+        String controlSystemStatus = controlSystemStatusNormal;// 总体 先设置为 控制系统状态-正常
+        String instrumentStatus = instrumentStatusNormal;// 总体 先设置为 仪表状态-正常
 
         //新增——联锁总表数据
         InterlockSummary interlockSummary = InterlockSummaryConvert.INSTANCE.toInterlockSummary(interlockAddDTO);
@@ -430,41 +334,12 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
 
         for (InterlockDetailAddDTO dto : interlockDetailAddDTOList){
 
-            //控制系统状态-先设置为正常
-            String controlSystemStatusName = controlSystemStatusNormalName; //正常
-            String controlSystemStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_NORMAL; //正常
-            //旁路状态-先设置为是
-            String bypassName = bypassYesName; // 旁路状态-是
-            String bypassPs = InterlockAllStatus.BY_PASS_YES; // 旁路状态-是
-            // 仪表状态-先设置为正常
-            String instrumentStatusName = instrumentStatusNormalName; //正常
-            String instrumentStatusPs = InterlockAllStatus.INSTRUMENT_STATUS_NORMAL; //正常
-            //输入卡件状态-先设置为正常
-            String inputStatusName = controlSystemStatusNormalName; //正常
-            String inputStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_NORMAL; //正常
-            //输出卡件状态-先设置为正常
-            String outputStatusName = controlSystemStatusNormalName; //正常
-            String outputStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_NORMAL; //正常
-            //MP状态-先设置为正常
-            String mpStatusName = controlSystemStatusNormalName; //正常
-            String mpStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_NORMAL; //正常
-
             dto.setThresholdTimeUnit("s"); // TODO 暂定单位为秒
             dto.setSummaryid(summaryId);
 
 
             //联锁状态; 旁路状态是多个的话,任何一个旁路状态为“是”,则联锁状态是“未投用(摘除)”,旁路状态都为“否”,则联锁状态是“投用”。
-            if(dto.getBypass()!=null && bypassYes.equals(dto.getBypass())){
-                interlockStatus = interlockStatusWty;
-                interlockStatusName = interlockStatusWtyName;
-                interlockStatusPs = InterlockAllStatus.INTERLOCK_STATUS_WTY;
-            }
-            if(dto.getBypass()!=null && !bypassYes.equals(dto.getBypass())){
-                bypassName = bypassNoName; // 旁路状态-是
-                bypassPs = InterlockAllStatus.BY_PASS_NO; // 旁路状态-是
-            }
-            dto.setBypassName(bypassName);
-            dto.setBypassPs(bypassPs);
+            if(dto.getBypass()!=null && bypassYes.equals(dto.getBypass())) interlockStatus = interlockStatusWty;
 
             //仪表状态
             if(dto.getInstrumentStatusJuge()!=null){
@@ -514,46 +389,14 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
                     }
                 }
 
-                if(dto.getInstrumentStatus()!=null && dto.getInstrumentStatus().equals(instrumentStatusAbnormal)){
-                    instrumentStatus = instrumentStatusAbnormal;
-                    instrumentStatusPs = InterlockAllStatus.INSTRUMENT_STATUS_GZ;
-                    instrumentStatusName = instrumentStatusAbnormalName;
-                }
-                dto.setInstrumentStatusName(instrumentStatusName);
-                dto.setInstrumentStatusPs(instrumentStatusPs);
-            }
-
-            // MP状态、输入卡件状态、输出卡件状态
-            if(!dto.getInputStatus().equals(controlSystemStatusNormal)){
-                inputStatusName = controlSystemStatusAbnormalName ; //不正常
-                inputStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_ABNORMAL;
-            }
-            dto.setInputStatusPs(inputStatusPs);
-            dto.setInputStatusName(inputStatusName);
-
-            if(!dto.getOutputStatus().equals(controlSystemStatusNormal)){
-                outputStatusName = controlSystemStatusAbnormalName ; //不正常
-                outputStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_ABNORMAL;
-            }
-            dto.setOutputStatusPs(outputStatusPs);
-            dto.setOutputStatusName(outputStatusName);
-
-            if(!dto.getMpStatus().equals(controlSystemStatusNormal)){
-                mpStatusName = controlSystemStatusAbnormalName ; //不正常
-                mpStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_ABNORMAL;
+                if(dto.getInstrumentStatus()!=null && dto.getInstrumentStatus().equals(instrumentStatusAbnormal)) instrumentStatus = instrumentStatusAbnormal;
             }
-            dto.setMpStatusPs(mpStatusPs);
-            dto.setMpStatusName(mpStatusName);
 
             //控制系统状态 ——  MP状态、输入卡件状态、输出卡件状态任何一个非正常则控制系统状态非正常。
             if(controlSystemStatusAbnormal.equals(dto.getMpStatus()) || controlSystemStatusAbnormal.equals(dto.getInputStatus()) || controlSystemStatusAbnormal.equals(dto.getOutputStatus())) {
                 dto.setControlSystemStatus(controlSystemStatusAbnormal); // 非正常
                 controlSystemStatus = controlSystemStatusAbnormal;
-                controlSystemStatusPs = InterlockAllStatus.CONTROL_SYSTEM_STATUS_ABNORMAL;
-                controlSystemStatusName = controlSystemStatusAbnormalName;
             } else dto.setControlSystemStatus(controlSystemStatusNormal); // 正常
-            dto.setControlSystemStatusName(controlSystemStatusName);
-            dto.setControlSystemStatusPs(controlSystemStatusPs);
 
             InterlockDetail detail = InterlockDetailConvert.INSTANCE.toEntity(dto, interlockAddDTO.getInterlockName(), formattedDateTime, interlockAddDTO.getInterlockSystemId());
             //新增联锁详细信息表数据
@@ -572,8 +415,6 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
 
         interlockSummary = InterlockSummaryConvert.INSTANCE.toInterlockSummary2(interlockSummary,interlockStatus,loopHealthLevel);
         //修改联锁总表数据
-        interlockSummary.setInterlockStatusPs(interlockStatusPs);
-        interlockSummary.setInterlockStatusName(interlockStatusName);
         interlockSummaryMapper.updateById(interlockSummary);
         //新增联锁总表临时表数据
         InterlockSummaryTemp interlockSummaryTemp = TempConvert.INSTANCE.toInterlockSummaryTemp(interlockSummary);