Browse Source

# 设备信息导入添加机组类别自动填充逻辑

zhongwei
haungxing 9 months ago
parent
commit
7f69552f90
  1. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java
  2. 3
      hzims-service/equipment/src/main/resources/db/2.0.0.sql.1

2
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java

@ -852,6 +852,7 @@ public class EmInfoServiceImpl extends BaseServiceImpl<EmInfoMapper, EmInfoEntit
private void copyDeviceTree(StationEntity station, Long pid, Long definitionId, String modelSignage, List<EmTreeIdsDTO> treeIds) { private void copyDeviceTree(StationEntity station, Long pid, Long definitionId, String modelSignage, List<EmTreeIdsDTO> treeIds) {
List<ProjectDTO> projectDTOList = new ArrayList<>(); List<ProjectDTO> projectDTOList = new ArrayList<>();
EmDefinitionEntity definition = emDefinitionService.getById(definitionId);
LambdaQueryWrapper<EmTreeEntity> wrapper = new LambdaQueryWrapper(); LambdaQueryWrapper<EmTreeEntity> wrapper = new LambdaQueryWrapper();
wrapper.eq(EmTreeEntity::getDefinitionId, definitionId); wrapper.eq(EmTreeEntity::getDefinitionId, definitionId);
List<EmTreeEntity> definitionEmTrees = emTreeService.list(wrapper); List<EmTreeEntity> definitionEmTrees = emTreeService.list(wrapper);
@ -866,6 +867,7 @@ public class EmInfoServiceImpl extends BaseServiceImpl<EmInfoMapper, EmInfoEntit
emInfo.setId(infoId); emInfo.setId(infoId);
emInfo.setGpid(pid); emInfo.setGpid(pid);
emInfo.setTreeId(emTree.getId()); emInfo.setTreeId(emTree.getId());
emInfo.setSetCategory(definition.getType());
emInfo.setInsLocation(station.getAddress()); emInfo.setInsLocation(station.getAddress());
emInfo.setNumber(number); emInfo.setNumber(number);
emInfo.setStationCode(station.getCode()); emInfo.setStationCode(station.getCode());

3
hzims-service/equipment/src/main/resources/db/2.0.0.sql.1

@ -27,3 +27,6 @@ alter table `HZIMS_PARAM_BACKUPS_DETAIL` add column `model_classify_name` BIGINT
alter table `HZIMS_PARAM_BACKUPS_DETAIL` modify column `model_classify_name` varchar(100) NULL COMMENT '参数分组名称'; alter table `HZIMS_PARAM_BACKUPS_DETAIL` modify column `model_classify_name` varchar(100) NULL COMMENT '参数分组名称';
alter table `HZIMS_PARAM_BACKUPS` add column `em_name` varchar(100) COMMENT '设备名称'; alter table `HZIMS_PARAM_BACKUPS` add column `em_name` varchar(100) COMMENT '设备名称';
update HZIMS_PARAM_BACKUPS pb,HZIMS_EM_INFO ei set pb.EM_NAME = ei.`NAME` WHERE pb.EM_CODE = ei.NUMBER; update HZIMS_PARAM_BACKUPS pb,HZIMS_EM_INFO ei set pb.EM_NAME = ei.`NAME` WHERE pb.EM_CODE = ei.NUMBER;
update bladex.blade_dict set dict_key = '2' where id = 1675699613977288706;
update equipment.hzims_em_definition set type = '2' where type = '0';
Loading…
Cancel
Save