Commit 4eae7f59 authored by 刘林's avatar 刘林

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

parents 5988cf04 ec924042
......@@ -229,10 +229,8 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
map.put("equList", PipelineEnum.PRESSURE_PIPELINE.getCode());
registerInfoService.batchDeleteByRecord(map);
}
// 删除装置表信息
this.removeById(sequenceNbr);
eventPublisher.publish(new DataRefreshEvent(this, useInfos.stream().map(IdxBizJgUseInfo::getRecord).collect(Collectors.toList()), DataRefreshEvent.DataType.equipment.name(), DataRefreshEvent.Operation.DELETE));
return Boolean.TRUE;
}
......@@ -961,7 +959,6 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
}
// 删除装置表信息
this.removeByIds(ids);
eventPublisher.publish(new DataRefreshEvent(this, useInfos.stream().map(IdxBizJgUseInfo::getRecord).collect(Collectors.toList()), DataRefreshEvent.DataType.equipment.name(), DataRefreshEvent.Operation.DELETE));
return Boolean.TRUE;
}
......
......@@ -29,7 +29,9 @@ import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.*;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dao.EsEquipmentDao;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.common.api.entity.ESEquipmentInfo;
import com.yeejoin.amos.boot.module.common.api.enums.CylinderTypeEnum;
import com.yeejoin.amos.boot.module.common.api.mapper.CustomBaseMapper;
import com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent;
......@@ -119,8 +121,7 @@ import static com.yeejoin.amos.boot.module.common.api.enums.CylinderTypeEnum.SPE
import static com.yeejoin.amos.boot.module.jg.api.enums.CertificateStatusEnum.YIDENGJI;
import static com.yeejoin.amos.boot.module.jg.api.enums.VehicleApanageEnum.XIAN_YANG;
import static com.yeejoin.amos.boot.module.jg.api.enums.VehicleApanageEnum.XI_XIAN;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.DataHandlerServiceImpl.IDX_BIZ_EQUIPMENT_INFO;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.DataHandlerServiceImpl.IDX_BIZ_VIEW_JG_ALL;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.DataHandlerServiceImpl.*;
/**
......@@ -361,6 +362,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
@Autowired
private TechParamsBackupService techParamsBackupService;
@Autowired
private EsEquipmentDao esEquipmentDao;
public static final String DATA_QUALITY_SCORE = "DATA_QUALITY_SCORE";
public static final String DATA_QUALITY_SCORE_JG = "DATA_QUALITY";
......@@ -1230,10 +1234,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
esEquipmentCategoryDto.setSEQUENCE_NBR(recordList.toString());
list.add(esEquipmentCategoryDto);
}
// 删除校验,被引用时不可删除。管道不做是否引用校验,直接删除已有管道(20251121注释,管道引用不能删除)
//if(!PipelineEnum.PRESSURE_PIPELINE.getCode().equals(map.get("equList"))) {
//this.checkForDelete(records);
//}
this.checkForDelete(records);
if (CollUtil.isNotEmpty(records)) {
// 删除涉及的19张表的数据
......@@ -1242,11 +1242,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (CollUtil.isNotEmpty(list)) {
// 删除es中的数据
esEquipmentCategory.deleteAll(list);
esEquipmentDao.deleteAll(this.buildEquipData(records));
}
eventPublisher.publish(new DataRefreshEvent(this, records, DataRefreshEvent.DataType.equipment.name(), DataRefreshEvent.Operation.DELETE));
return true;
}
private Iterable<? extends ESEquipmentInfo> buildEquipData(List<String> records) {
return records.stream().map(record->{
ESEquipmentInfo esEquipmentInfo = new ESEquipmentInfo();
esEquipmentInfo.setSEQUENCE_NBR(record);
return esEquipmentInfo;
}).collect(Collectors.toList());
}
/**
* 删除校验,被引用时不可删除
*
......
......@@ -4,11 +4,6 @@
"dictDataKey": "0",
"dictDataValue": "按设备种类",
"dictDataDesc": "upload/tzs/common/image/业务场景-设备.png"
},
{
"dictDataKey": "1",
"dictDataValue": "按应用场景",
"dictDataDesc": "upload/tzs/common/image/业务场景-应用.png"
}
],
"SGGZ": [
......
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