|
@@ -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));
|