Commit 58b6f1d2 authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_tzs_bugfix' into develop_tzs_bugfix

parents beab8e88 b6054cf2
...@@ -61,7 +61,7 @@ public class EquipQualityScoreUpdateService extends DefaultQualityScoreUpdateSer ...@@ -61,7 +61,7 @@ public class EquipQualityScoreUpdateService extends DefaultQualityScoreUpdateSer
IdxBizJgUseInfo useInfo = getIdxBizJgUseInfo(record); IdxBizJgUseInfo useInfo = getIdxBizJgUseInfo(record);
IdxBizJgRegisterInfo registerInfo = getIdxBizJgRegisterInfo(record); IdxBizJgRegisterInfo registerInfo = getIdxBizJgRegisterInfo(record);
if (ValidationUtil.isEmpty(useInfo) || ValidationUtil.isEmpty(registerInfo)) { if (ValidationUtil.isEmpty(useInfo) || ValidationUtil.isEmpty(registerInfo)) {
return null; return 0;
} }
matchItemDto.setBizType(bizType); matchItemDto.setBizType(bizType);
matchItemDto.setEquList(registerInfo.getEquList()); matchItemDto.setEquList(registerInfo.getEquList());
...@@ -96,6 +96,9 @@ public class EquipQualityScoreUpdateService extends DefaultQualityScoreUpdateSer ...@@ -96,6 +96,9 @@ public class EquipQualityScoreUpdateService extends DefaultQualityScoreUpdateSer
} }
private void sendDataRefreshMsgEquip(List<String> records) { private void sendDataRefreshMsgEquip(List<String> records) {
if (ValidationUtil.isEmpty(records)) {
return;
}
eventPublisher.publish(new DataRefreshEvent(this, records, DataRefreshEvent.DataType.equipment.name(), DataRefreshEvent.Operation.UPDATE)); eventPublisher.publish(new DataRefreshEvent(this, records, DataRefreshEvent.DataType.equipment.name(), DataRefreshEvent.Operation.UPDATE));
} }
......
...@@ -58,7 +58,7 @@ public class ProjectQualityScoreUpdateService extends DefaultQualityScoreUpdateS ...@@ -58,7 +58,7 @@ public class ProjectQualityScoreUpdateService extends DefaultQualityScoreUpdateS
private Integer getReminderLevel(String bizType, String projectContraptionId) { private Integer getReminderLevel(String bizType, String projectContraptionId) {
IdxBizJgProjectContraption projectContraption = idxBizJgProjectContraptionService.getById(projectContraptionId); IdxBizJgProjectContraption projectContraption = idxBizJgProjectContraptionService.getById(projectContraptionId);
if (ValidationUtil.isEmpty(projectContraption)) { if (ValidationUtil.isEmpty(projectContraption)) {
return null; return 0;
} }
MatchItemDto matchItemDto = MatchItemDto.builder().build(); MatchItemDto matchItemDto = MatchItemDto.builder().build();
matchItemDto.setBizType(bizType); matchItemDto.setBizType(bizType);
...@@ -81,6 +81,9 @@ public class ProjectQualityScoreUpdateService extends DefaultQualityScoreUpdateS ...@@ -81,6 +81,9 @@ public class ProjectQualityScoreUpdateService extends DefaultQualityScoreUpdateS
* @param projectContraptionIds 装置ids * @param projectContraptionIds 装置ids
*/ */
private void sendDataRefreshMsg(Set<String> projectContraptionIds) { private void sendDataRefreshMsg(Set<String> projectContraptionIds) {
if (ValidationUtil.isEmpty(projectContraptionIds)) {
return;
}
List<IdxBizJgUseInfo> useInfos = idxBizJgUseInfoService.list(new LambdaQueryWrapper<IdxBizJgUseInfo>() List<IdxBizJgUseInfo> useInfos = idxBizJgUseInfoService.list(new LambdaQueryWrapper<IdxBizJgUseInfo>()
.in(IdxBizJgUseInfo::getProjectContraptionId, projectContraptionIds) .in(IdxBizJgUseInfo::getProjectContraptionId, projectContraptionIds)
.select(IdxBizJgUseInfo::getRecord)); .select(IdxBizJgUseInfo::getRecord));
......
...@@ -2395,8 +2395,9 @@ public class DataHandlerServiceImpl { ...@@ -2395,8 +2395,9 @@ public class DataHandlerServiceImpl {
esEquipmentCategoryList.size(), projectContraptionIds.size(), equipRecord.size()); esEquipmentCategoryList.size(), projectContraptionIds.size(), equipRecord.size());
if (!ValidationUtil.isEmpty(equipRecord)) { if (!ValidationUtil.isEmpty(equipRecord)) {
equipRecord.remove(null); equipRecord.removeIf(Objects::isNull);
log.info("发布设备事件,设备数量: {}", equipRecord.size()); log.info("发布设备事件,设备数量: {}", equipRecord.size());
if (!ValidationUtil.isEmpty(equipRecord)) {
eventPublisher.publish(new EquipCreateOrEditEvent( eventPublisher.publish(new EquipCreateOrEditEvent(
this, this,
BusinessTypeEnum.JG_NEW_EQUIP.name(), BusinessTypeEnum.JG_NEW_EQUIP.name(),
...@@ -2404,10 +2405,12 @@ public class DataHandlerServiceImpl { ...@@ -2404,10 +2405,12 @@ public class DataHandlerServiceImpl {
EquipCreateOrEditEvent.EquipType.equip EquipCreateOrEditEvent.EquipType.equip
)); ));
} }
}
if (!ValidationUtil.isEmpty(projectContraptionIds)) { if (!ValidationUtil.isEmpty(projectContraptionIds)) {
projectContraptionIds.remove(null); projectContraptionIds.removeIf(Objects::isNull);
log.info("发布装置设备事件,设备数量: {}", projectContraptionIds.size()); log.info("发布装置设备事件,设备数量: {}", projectContraptionIds.size());
if (!ValidationUtil.isEmpty(projectContraptionIds)) {
eventPublisher.publish(new EquipCreateOrEditEvent( eventPublisher.publish(new EquipCreateOrEditEvent(
this, this,
BusinessTypeEnum.JG_NEW_PROJECT.name(), BusinessTypeEnum.JG_NEW_PROJECT.name(),
...@@ -2415,6 +2418,7 @@ public class DataHandlerServiceImpl { ...@@ -2415,6 +2418,7 @@ public class DataHandlerServiceImpl {
EquipCreateOrEditEvent.EquipType.project EquipCreateOrEditEvent.EquipType.project
)); ));
} }
}
total.addAndGet(esEquipmentCategoryList.size()); total.addAndGet(esEquipmentCategoryList.size());
log.debug("当前批次处理完成,累计处理{}条设备", total.get()); log.debug("当前批次处理完成,累计处理{}条设备", total.get());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment