Commit 9c405b21 authored by suhuiguang's avatar suhuiguang

feat(综合搜索):数据同步调整

1.后续业务编辑评分使用设备编辑、装置编辑
parent 3d940026
package com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.adapter;
import com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent;
import com.yeejoin.amos.boot.module.common.biz.constats.Constants;
import com.yeejoin.amos.boot.module.jg.biz.edit.event.EmptyDataChangeEvent;
import com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.EquipCreateOrEditEvent;
import lombok.RequiredArgsConstructor;
......@@ -31,10 +31,16 @@ public class BizDataChange2EditEventAdapter {
}
/**
* 特殊处理由于其他业务类型还没评分准则,故使用设备或者装置的
*
* @param eventA 事件
* @return 转换后事件
*/
private EquipCreateOrEditEvent convertToEvent(EmptyDataChangeEvent eventA) {
return new EquipCreateOrEditEvent(
this,
eventA.getBizRelationData().getBizType(),
eventA.getBizRelationData().getProjectContraptionIds().isEmpty() ? Constants.JG_EDIT_EQUIP : Constants.JG_EDIT_PROJECT,
eventA.getBizRelationData().getProjectContraptionIds().isEmpty() ? eventA.getBizRelationData().getRecords() : eventA.getBizRelationData().getProjectContraptionIds(),
eventA.getBizRelationData().getProjectContraptionIds().isEmpty() ? EquipCreateOrEditEvent.EquipType.equip : EquipCreateOrEditEvent.EquipType.project
);
......
......@@ -10,10 +10,10 @@ public abstract class DefaultQualityScoreUpdateService implements IQualityScoreU
* @param bizType 业务类型
* @return 是否通过前置检验
*/
protected abstract Boolean preHandle(String bizType);
protected abstract Boolean shouldProcess(String bizType);
public void doUpdate(String bizType, Set<String> recordOrPIds) {
if (preHandle(bizType)) {
if (shouldProcess(bizType)) {
doHandle(bizType, recordOrPIds);
}
afterHandle(recordOrPIds);
......
......@@ -96,7 +96,7 @@ public class EquipQualityScoreUpdateService extends DefaultQualityScoreUpdateSer
}
@Override
protected Boolean preHandle(String bizType) {
protected Boolean shouldProcess(String bizType) {
return BusinessTypeEnum.JG_USAGE_REGISTRATION.name().equals(bizType) ||
BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.name().equals(bizType) ||
BusinessTypeEnum.JG_NEW_EQUIP.name().equals(bizType) ||
......
......@@ -80,7 +80,7 @@ public class ProjectQualityScoreUpdateService extends DefaultQualityScoreUpdateS
}
@Override
protected Boolean preHandle(String bizType) {
protected Boolean shouldProcess(String bizType) {
return BusinessTypeEnum.JG_USAGE_REGISTRATION.name().equals(bizType) ||
BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.name().equals(bizType) ||
BusinessTypeEnum.JG_NEW_PROJECT.name().equals(bizType) ||
......
......@@ -111,6 +111,7 @@
ibjui."PHONE",
ibjui."USE_DATE",
ibjui."USE_PLACE" as USE_SITE_CODE,
ibjui."DATA_QUALITY_SCORE",
ibjoi."INFORMATION_SITUATION",
di."DESIGN_UNIT_CREDIT_CODE",
di."DESIGN_UNIT_NAME",
......
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