Ver código fonte

修改问题:仪表状态判断依据添加默认正常的情况

sl 3 meses atrás
pai
commit
6a501123da

+ 2 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/convert/InterlockDetailConvert.java

@@ -40,6 +40,8 @@ public interface InterlockDetailConvert {
             return InterlockAllStatus.INSTRUMENT_STATUS_JUDGE1_NAME;
         } else if(InterlockAllStatus.INSTRUMENT_STATUS_JUDGE2.equals(instrumentStatusJuge)){
             return InterlockAllStatus.INSTRUMENT_STATUS_JUDGE2_NAME;
+        } else if(InterlockAllStatus.INSTRUMENT_STATUS_JUDGE3.equals(instrumentStatusJuge)){
+            return InterlockAllStatus.INSTRUMENT_STATUS_JUDGE3_NAME;
         }else return null;
     }
 

+ 3 - 3
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/dto/InterlockDetailAddDTO.java

@@ -52,10 +52,10 @@ public class InterlockDetailAddDTO {
     @Dict(dicCode = "instrument_status")
     @ApiModelProperty(value = "仪表状态(0正常1故障)")
     private java.lang.String instrumentStatus;
-    /**仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断)*/
-    @Excel(name = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断)", width = 15, dicCode = "instrument_status_juge")
+    /**仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断3默认正常)*/
+    @Excel(name = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断3默认正常)", width = 15, dicCode = "instrument_status_juge")
     @Dict(dicCode = "instrument_status_juge")
-    @ApiModelProperty(value = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断)")
+    @ApiModelProperty(value = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断3默认正常)")
     private java.lang.String instrumentStatusJuge;
     /**仪表状态-设备id*/
     @Excel(name = "仪表状态-设备id", width = 15)

+ 3 - 3
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/entity/InterlockDetail.java

@@ -69,10 +69,10 @@ public class InterlockDetail implements Serializable {
     @Dict(dicCode = "instrument_status")
     @ApiModelProperty(value = "仪表状态(0正常1故障)")
     private java.lang.String instrumentStatus;
-    /**仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断)*/
-    @Excel(name = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断)", width = 15, dicCode = "instrument_status_juge")
+    /**仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断3默认正常)*/
+    @Excel(name = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断3默认正常)", width = 15, dicCode = "instrument_status_juge")
     @Dict(dicCode = "instrument_status_juge")
-    @ApiModelProperty(value = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断)")
+    @ApiModelProperty(value = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断3默认正常)")
     private java.lang.String instrumentStatusJuge;
     /**仪表状态-设备id*/
     @Excel(name = "仪表状态-设备id", width = 15)

+ 3 - 3
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/vo/InterlockDetailEditQueryVO.java

@@ -57,10 +57,10 @@ public class InterlockDetailEditQueryVO {
     private java.lang.String instrumentStatus;
     private java.lang.String instrumentStatus_dictText;
     private java.lang.String instrumentStatusNormalName;
-    /**仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断)*/
-    @Excel(name = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断)", width = 15, dicCode = "instrument_status_juge")
+    /**仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断3默认正常)*/
+    @Excel(name = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断3默认正常)", width = 15, dicCode = "instrument_status_juge")
     @Dict(dicCode = "instrument_status_juge")
-    @ApiModelProperty(value = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断)")
+    @ApiModelProperty(value = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断3默认正常)")
     private java.lang.String instrumentStatusJuge;
     private java.lang.String instrumentStatusJuge_dictText;
     /**仪表状态-设备id*/

+ 4 - 1
jeecg-module-interlock/src/main/java/org/jeecg/modules/summary/constants/InterlockAllStatus.java

@@ -26,14 +26,17 @@ public class InterlockAllStatus {
     public static final String BY_PASS_NO = "0"; // 旁路状态-否
     public static final String BY_PASS_YES = "1"; // 旁路状态-是
 
-    // 仪表状态判断方式 0直接读取位号1高低限判断2突变超限判断
+    // 仪表状态判断方式 0直接读取位号1高低限判断2突变超限判断3默认正常
     public static final String INSTRUMENT_STATUS_JUDGE0 = "0"; // 仪表状态判断方式-直接读取位号
     public static final String INSTRUMENT_STATUS_JUDGE1 = "1"; // 仪表状态判断方式-高低限判断
     public static final String INSTRUMENT_STATUS_JUDGE2 = "2"; // 仪表状态判断方式-突变超限判断
 
+    public static final String INSTRUMENT_STATUS_JUDGE3 = "3"; // 仪表状态判断方式-默认正常
+
     public static final String INSTRUMENT_STATUS_JUDGE0_NAME = "直接读取位号"; // 仪表状态判断方式-直接读取位号
     public static final String INSTRUMENT_STATUS_JUDGE1_NAME = "高低限判断"; // 仪表状态判断方式-高低限判断
     public static final String INSTRUMENT_STATUS_JUDGE2_NAME = "突变超限判断"; // 仪表状态判断方式-突变超限判断
+    public static final String INSTRUMENT_STATUS_JUDGE3_NAME = "默认正常"; // 仪表状态判断方式-默认正常
 
     // 仪表状态 0正常1故障
     public static final String INSTRUMENT_STATUS_NORMAL = "0"; // 仪表状态-正常

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

@@ -305,6 +305,9 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
                     }
 
 
+                } else if(InterlockAllStatus.INSTRUMENT_STATUS_JUDGE3.equals(dto.getInstrumentStatusJuge())){
+                    //3默认正常
+                    dto.setInstrumentStatus(instrumentStatusNormal);
                 }
 
                 if(dto.getInstrumentStatus()!=null && dto.getInstrumentStatus().equals(instrumentStatusAbnormal)) instrumentStatus = instrumentStatusAbnormal;
@@ -325,7 +328,7 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
             detailTempMapper.insert(detailTemp);
 
             //新增对应联锁详细信息的点位列表
-            interlockTagService.saveBatch(toTagList(dto,detail.getId(),summaryId));
+            interlockTagService.saveBatch(toTagList(instrumentStatusNormal, dto,detail.getId(),summaryId));
         }
 
         //回路健康等级
@@ -437,6 +440,9 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
                             dto.setInstrumentStatus(instrumentStatusAbnormal); // 故障
                         }else dto.setInstrumentStatus(instrumentStatusNormal); // 正常
                     }
+                } else if(InterlockAllStatus.INSTRUMENT_STATUS_JUDGE3.equals(dto.getInstrumentStatusJuge())){
+                    //3默认正常
+                    dto.setInstrumentStatus(instrumentStatusNormal);
                 }
 
                 if(dto.getInstrumentStatus()!=null && dto.getInstrumentStatus().equals(instrumentStatusAbnormal)) instrumentStatus = instrumentStatusAbnormal;
@@ -456,7 +462,7 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
             detailTempMapper.insert(detailTemp);
 
             //新增对应联锁详细信息的点位列表
-            interlockTagService.saveBatch(toTagList(dto,detail.getId(),summaryId));
+            interlockTagService.saveBatch(toTagList(instrumentStatusNormal, dto,detail.getId(),summaryId));
         }
 
         //回路健康等级
@@ -471,7 +477,7 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
         summaryTempMapper.insert(interlockSummaryTemp);
     }
 
-    private List<InterlockTag> toTagList(InterlockDetailAddDTO dto,String interlockConditionId,String interlockSummaryId){
+    private List<InterlockTag> toTagList(String instrumentStatusNormal, InterlockDetailAddDTO dto,String interlockConditionId,String interlockSummaryId){
         List<InterlockTag> interlockTagList = new ArrayList<>();
         //联锁条件(当前值)
         interlockTagList.add(createInterlockTag(dto.getInterlockConditionDeviceId(), dto.getInterlockConditionModuleName(), dto.getInterlockConditionTag(), dto.getInterlockCondition(), InterlockConstants.INTERLOCK_CONDITION,interlockConditionId,interlockSummaryId));
@@ -483,6 +489,10 @@ public class InterlockSummaryServiceImpl extends ServiceImpl<InterlockSummaryMap
         if((InterlockAllStatus.INSTRUMENT_STATUS_JUDGE1.equals(dto.getInstrumentStatusJuge()) || InterlockAllStatus.INSTRUMENT_STATUS_JUDGE2.equals(dto.getInstrumentStatusJuge())) && dto.getYsmnlTag() != null){
             interlockTagList.add(createInterlockTag(dto.getYsmnlDeviceId(),dto.getYsmnlModuleName(),dto.getYsmnlTag(),dto.getYsmnlValue(),InterlockConstants.ORIGINAL_ANALOG_VALUE,interlockConditionId,interlockSummaryId));
         }
+        //仪表状态 3默认正常
+        if(InterlockAllStatus.INSTRUMENT_STATUS_JUDGE3.equals(dto.getInstrumentStatusJuge()) && dto.getInstrumentStatusTag() != null){
+            interlockTagList.add(createInterlockTag(dto.getInstrumentStatusDeviceId(), dto.getInstrumentStatusModuleName(), dto.getInstrumentStatusTag(), instrumentStatusNormal, InterlockConstants.INSTRUMENT_STATUS,interlockConditionId,interlockSummaryId));
+        }
         //旁路状态
         if(dto.getIfBypass().equals(InterlockAllStatus.IF_BY_PASS_YES) && dto.getBypassTag()!=null){
             interlockTagList.add(createInterlockTag(dto.getBypassDeviceId(),dto.getBypassModuleName(),dto.getBypassTag(),dto.getBypass(),InterlockConstants.BYPASS_STATUS,interlockConditionId,interlockSummaryId));

+ 3 - 3
jeecg-module-interlock/src/main/java/org/jeecg/modules/temp/entity/InterlockDetailTemp.java

@@ -69,10 +69,10 @@ public class InterlockDetailTemp implements Serializable {
     @Dict(dicCode = "instrument_status")
     @ApiModelProperty(value = "仪表状态(0正常1故障)")
     private java.lang.String instrumentStatus;
-    /**仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断)*/
-    @Excel(name = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断)", width = 15, dicCode = "instrument_status_juge")
+    /**仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断3默认正常)*/
+    @Excel(name = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断3默认正常)", width = 15, dicCode = "instrument_status_juge")
     @Dict(dicCode = "instrument_status_juge")
-    @ApiModelProperty(value = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断)")
+    @ApiModelProperty(value = "仪表状态判断方式(0直接读取位号1高低限判断2突变超限判断3默认正常)")
     private java.lang.String instrumentStatusJuge;
     /**仪表状态-设备id*/
     @Excel(name = "仪表状态-设备id", width = 15)