Commit e1edb19f authored by suhuiguang's avatar suhuiguang

1.编辑功能增加是否资料齐全功能

2.历史有证编辑增加单位内编号
parent 01422e0d
...@@ -116,12 +116,14 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg ...@@ -116,12 +116,14 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg
EquipFactoryChangeDataDto factoryChangeDataDto = commonEquipDataProcessService.castMap2Bean(itemData, EquipFactoryChangeDataDto.class); EquipFactoryChangeDataDto factoryChangeDataDto = commonEquipDataProcessService.castMap2Bean(itemData, EquipFactoryChangeDataDto.class);
EquipDesignChangeDataDto designChangeDataDto = commonEquipDataProcessService.castMap2Bean(itemData, EquipDesignChangeDataDto.class); EquipDesignChangeDataDto designChangeDataDto = commonEquipDataProcessService.castMap2Bean(itemData, EquipDesignChangeDataDto.class);
EquipOtherInfoChangeDataDto otherInfoChangeDataDto = commonEquipDataProcessService.castMap2Bean(itemData, EquipOtherInfoChangeDataDto.class); EquipOtherInfoChangeDataDto otherInfoChangeDataDto = commonEquipDataProcessService.castMap2Bean(itemData, EquipOtherInfoChangeDataDto.class);
commonEquipDataProcessService.buildChangeFields(record, designChangeDataDto, factoryChangeDataDto, registerChangeDataDto,otherInfoChangeDataDto, allChangeColumns); EquipUseInfoChangeDataDto useInfoChangeDataDto = commonEquipDataProcessService.castMap2Bean(itemData, EquipUseInfoChangeDataDto.class);
commonEquipDataProcessService.buildChangeFields(record, designChangeDataDto, factoryChangeDataDto, registerChangeDataDto, otherInfoChangeDataDto, useInfoChangeDataDto, allChangeColumns);
// 设备制造、设计、注册信息业务处理落库 // 设备制造、设计、注册信息业务处理落库
commonEquipDataProcessService.dealBizDataForEquip(record, registerChangeDataDto); commonEquipDataProcessService.dealBizDataForEquip(record, registerChangeDataDto);
commonEquipDataProcessService.dealBizDataForEquip(record, factoryChangeDataDto); commonEquipDataProcessService.dealBizDataForEquip(record, factoryChangeDataDto);
commonEquipDataProcessService.dealBizDataForEquip(record, designChangeDataDto); commonEquipDataProcessService.dealBizDataForEquip(record, designChangeDataDto);
commonEquipDataProcessService.dealBizDataForEquip(record, otherInfoChangeDataDto); commonEquipDataProcessService.dealBizDataForEquip(record, otherInfoChangeDataDto);
commonEquipDataProcessService.dealBizDataForEquip(record, useInfoChangeDataDto);
// 设备技术参数入库处理 // 设备技术参数入库处理
commonEquipDataProcessService.updateTechParamInfo(registerChangeDataDto, record, itemData, allChangeColumns); commonEquipDataProcessService.updateTechParamInfo(registerChangeDataDto, record, itemData, allChangeColumns);
} }
...@@ -132,7 +134,7 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg ...@@ -132,7 +134,7 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg
} }
private void updateUseRegisterProjectInfo(JgUseRegistration jgUseRegistration, ProjectContraptionChangeDataDto projectContraptionChangeDataDto) { private void updateUseRegisterProjectInfo(JgUseRegistration jgUseRegistration, ProjectContraptionChangeDataDto projectContraptionChangeDataDto) {
LambdaUpdateWrapper<JgUseRegistration> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<JgUseRegistration> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(JgUseRegistration::getSequenceNbr, jgUseRegistration.getSequenceNbr()); updateWrapper.eq(JgUseRegistration::getSequenceNbr, jgUseRegistration.getSequenceNbr());
updateWrapper.set(JgUseRegistration::getProjectContraption, projectContraptionChangeDataDto.getProjectContraption()); updateWrapper.set(JgUseRegistration::getProjectContraption, projectContraptionChangeDataDto.getProjectContraption());
useRegistrationService.update(null, updateWrapper); useRegistrationService.update(null, updateWrapper);
...@@ -155,7 +157,7 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg ...@@ -155,7 +157,7 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg
List<String> records = eqs.stream().map(JgUseRegistrationEq::getEquId).collect(toList()); List<String> records = eqs.stream().map(JgUseRegistrationEq::getEquId).collect(toList());
IdxBizJgRegisterInfo registerInfo = useRegistrationService.getRegisterInfo(jgUseRegistration); IdxBizJgRegisterInfo registerInfo = useRegistrationService.getRegisterInfo(jgUseRegistration);
List<Map<String, Object>> tableData; List<Map<String, Object>> tableData;
if (EquipmentClassifityEnum.YLGD.getCode().equals(registerInfo.getEquList())){ if (EquipmentClassifityEnum.YLGD.getCode().equals(registerInfo.getEquList())) {
IdxBizJgProjectContraption idxBizJgProjectContraption = idxBizJgProjectContraptionService.getById(jgUseRegistration.getProjectContraptionId()); IdxBizJgProjectContraption idxBizJgProjectContraption = idxBizJgProjectContraptionService.getById(jgUseRegistration.getProjectContraptionId());
Map<String, Object> map = IdxBizJgRegisterInfoServiceImpl.convertCamelToUnderscore(idxBizJgProjectContraption, IdxBizJgProjectContraptionServiceImpl.jsonFields); Map<String, Object> map = IdxBizJgRegisterInfoServiceImpl.convertCamelToUnderscore(idxBizJgProjectContraption, IdxBizJgProjectContraptionServiceImpl.jsonFields);
result.putAll(map); result.putAll(map);
......
...@@ -145,37 +145,33 @@ public class CommonEquipDataProcessService { ...@@ -145,37 +145,33 @@ public class CommonEquipDataProcessService {
} }
} }
void buildChangeFields(String record, EquipDesignChangeDataDto equipDesignChangeDataDto, EquipFactoryChangeDataDto equipFactoryChangeDataDto, EquipRegisterChangeDataDto registerChangeDataDto, List<ChangeDataDto> allChangeColumns) {
// 构造新对象行转列
List<ChangeDataDto> designInfoNew = this.buildDesignInfoNew(equipDesignChangeDataDto, record);
List<ChangeDataDto> factoryInfoNew = this.buildFactoryInfoNew(equipFactoryChangeDataDto, record);
List<ChangeDataDto> registerInfoNew = this.buildRegisterInfoNew(registerChangeDataDto, record);
// 老数据查询行转列
List<ChangeDataDto> designInfoOld = this.buildDesignInfoOld(record);
List<ChangeDataDto> factoryInfoOld = this.buildFactoryInfoOld(record);
List<ChangeDataDto> registerInfoOld = this.buildRegisterInfoOld(record);
allChangeColumns.addAll(this.mergeChangeFields(designInfoNew, designInfoOld));
allChangeColumns.addAll(this.mergeChangeFields(factoryInfoNew, factoryInfoOld));
allChangeColumns.addAll(this.mergeChangeFields(registerInfoNew, registerInfoOld));
}
void buildChangeFields(String record, EquipDesignChangeDataDto equipDesignChangeDataDto, EquipFactoryChangeDataDto equipFactoryChangeDataDto, EquipRegisterChangeDataDto registerChangeDataDto,EquipOtherInfoChangeDataDto otherInfoChangeDataDto, List<ChangeDataDto> allChangeColumns) { void buildChangeFields(String record, EquipDesignChangeDataDto equipDesignChangeDataDto, EquipFactoryChangeDataDto equipFactoryChangeDataDto, EquipRegisterChangeDataDto registerChangeDataDto,EquipOtherInfoChangeDataDto otherInfoChangeDataDto, EquipUseInfoChangeDataDto useInfoChangeDataDto, List<ChangeDataDto> allChangeColumns) {
// 构造新对象行转列 // 构造新对象行转列
List<ChangeDataDto> designInfoNew = this.buildDesignInfoNew(equipDesignChangeDataDto, record); List<ChangeDataDto> designInfoNew = this.buildDesignInfoNew(equipDesignChangeDataDto, record);
List<ChangeDataDto> factoryInfoNew = this.buildFactoryInfoNew(equipFactoryChangeDataDto, record); List<ChangeDataDto> factoryInfoNew = this.buildFactoryInfoNew(equipFactoryChangeDataDto, record);
List<ChangeDataDto> registerInfoNew = this.buildRegisterInfoNew(registerChangeDataDto, record); List<ChangeDataDto> registerInfoNew = this.buildRegisterInfoNew(registerChangeDataDto, record);
List<ChangeDataDto> otherInfoNew = this.convertBeanField2Column2(otherInfoChangeDataDto, record); if(useInfoChangeDataDto != null) {
List<ChangeDataDto> useInfoNew = this.convertBeanField2Column2(useInfoChangeDataDto, record);
List<ChangeDataDto> useInfoOld = this.buildUseInfoOld(record);
allChangeColumns.addAll(this.mergeChangeFields(useInfoNew, useInfoOld));
}
if(otherInfoChangeDataDto != null){
List<ChangeDataDto> otherInfoNew = this.convertBeanField2Column2(otherInfoChangeDataDto, record);
List<ChangeDataDto> otherInfoOld = this.buildOtherInfoOld(record);
allChangeColumns.addAll(this.mergeChangeFields(otherInfoNew, otherInfoOld));
}
// 老数据查询行转列 // 老数据查询行转列
List<ChangeDataDto> designInfoOld = this.buildDesignInfoOld(record); List<ChangeDataDto> designInfoOld = this.buildDesignInfoOld(record);
List<ChangeDataDto> factoryInfoOld = this.buildFactoryInfoOld(record); List<ChangeDataDto> factoryInfoOld = this.buildFactoryInfoOld(record);
List<ChangeDataDto> registerInfoOld = this.buildRegisterInfoOld(record); List<ChangeDataDto> registerInfoOld = this.buildRegisterInfoOld(record);
List<ChangeDataDto> otherInfoOld = this.buildOtherInfoOld(record);
allChangeColumns.addAll(this.mergeChangeFields(designInfoNew, designInfoOld)); allChangeColumns.addAll(this.mergeChangeFields(designInfoNew, designInfoOld));
allChangeColumns.addAll(this.mergeChangeFields(factoryInfoNew, factoryInfoOld)); allChangeColumns.addAll(this.mergeChangeFields(factoryInfoNew, factoryInfoOld));
allChangeColumns.addAll(this.mergeChangeFields(registerInfoNew, registerInfoOld)); allChangeColumns.addAll(this.mergeChangeFields(registerInfoNew, registerInfoOld));
allChangeColumns.addAll(this.mergeChangeFields(otherInfoNew, otherInfoOld));
} }
private List<ChangeDataDto> buildOtherInfoOld(String record) { private List<ChangeDataDto> buildOtherInfoOld(String record) {
EquipOtherInfoChangeDataDto changeDataDto = new EquipOtherInfoChangeDataDto(); EquipOtherInfoChangeDataDto changeDataDto = new EquipOtherInfoChangeDataDto();
IdxBizJgOtherInfo otherInfo = idxBizJgOtherInfoMapper.selectOne(new LambdaQueryWrapper<IdxBizJgOtherInfo>().eq(IdxBizJgOtherInfo::getRecord, record)); IdxBizJgOtherInfo otherInfo = idxBizJgOtherInfoMapper.selectOne(new LambdaQueryWrapper<IdxBizJgOtherInfo>().eq(IdxBizJgOtherInfo::getRecord, record));
...@@ -190,23 +186,6 @@ public class CommonEquipDataProcessService { ...@@ -190,23 +186,6 @@ public class CommonEquipDataProcessService {
return changeDataDto; return changeDataDto;
} }
void buildChangeFields(String record, EquipDesignChangeDataDto equipDesignChangeDataDto, EquipFactoryChangeDataDto equipFactoryChangeDataDto, EquipRegisterChangeDataDto registerChangeDataDto, EquipUseInfoChangeDataDto useInfoChangeDataDto, List<ChangeDataDto> allChangeColumns) {
// 构造新对象行转列
List<ChangeDataDto> designInfoNew = this.buildDesignInfoNew(equipDesignChangeDataDto, record);
List<ChangeDataDto> factoryInfoNew = this.buildFactoryInfoNew(equipFactoryChangeDataDto, record);
List<ChangeDataDto> registerInfoNew = this.buildRegisterInfoNew(registerChangeDataDto, record);
List<ChangeDataDto> useInfoChangeNew = this.convertBeanField2Column2(useInfoChangeDataDto, record);
// 老数据查询行转列
List<ChangeDataDto> designInfoOld = this.buildDesignInfoOld(record);
List<ChangeDataDto> factoryInfoOld = this.buildFactoryInfoOld(record);
List<ChangeDataDto> registerInfoOld = this.buildRegisterInfoOld(record);
List<ChangeDataDto> useInfoOld = this.buildUseInfoOld(record);
allChangeColumns.addAll(this.mergeChangeFields(designInfoNew, designInfoOld));
allChangeColumns.addAll(this.mergeChangeFields(factoryInfoNew, factoryInfoOld));
allChangeColumns.addAll(this.mergeChangeFields(registerInfoNew, registerInfoOld));
allChangeColumns.addAll(this.mergeChangeFields(useInfoChangeNew, useInfoOld));
}
/** /**
* 业务处理-业务对象 * 业务处理-业务对象
* *
...@@ -592,4 +571,5 @@ public class CommonEquipDataProcessService { ...@@ -592,4 +571,5 @@ public class CommonEquipDataProcessService {
BeanUtil.copyProperties(useInfo, changeDataDto); BeanUtil.copyProperties(useInfo, changeDataDto);
return changeDataDto; return changeDataDto;
} }
} }
...@@ -58,7 +58,7 @@ public class SingleDataChangeProcessStrategy implements IChangeDataProcessStrate ...@@ -58,7 +58,7 @@ public class SingleDataChangeProcessStrategy implements IChangeDataProcessStrate
EquipFactoryChangeDataDto factoryChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipFactoryChangeDataDto.class); EquipFactoryChangeDataDto factoryChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipFactoryChangeDataDto.class);
EquipDesignChangeDataDto designChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipDesignChangeDataDto.class); EquipDesignChangeDataDto designChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipDesignChangeDataDto.class);
EquipUseInfoChangeDataDto useInfoChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipUseInfoChangeDataDto.class); EquipUseInfoChangeDataDto useInfoChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipUseInfoChangeDataDto.class);
commonEquipDataProcessService.buildChangeFields(record, designChangeDataDto, factoryChangeDataDto, registerChangeDataDto, allChangeColumns); commonEquipDataProcessService.buildChangeFields(record, designChangeDataDto, factoryChangeDataDto, registerChangeDataDto,null, useInfoChangeDataDto, allChangeColumns);
// 前置校验 // 前置校验
commonEquipDataProcessService.checkValidField(record, registerChangeDataDto, null, null, null); commonEquipDataProcessService.checkValidField(record, registerChangeDataDto, null, null, null);
commonEquipDataProcessService.checkValidField(record, factoryChangeDataDto, registerChangeDataDto.getEquList(), registerChangeDataDto.getEquCategory(), registerChangeDataDto.getEquDefine()); commonEquipDataProcessService.checkValidField(record, factoryChangeDataDto, registerChangeDataDto.getEquList(), registerChangeDataDto.getEquCategory(), registerChangeDataDto.getEquDefine());
......
...@@ -78,7 +78,7 @@ public class SingleManageEquipEditHandleImpl implements IBizDataChangeHandleStra ...@@ -78,7 +78,7 @@ public class SingleManageEquipEditHandleImpl implements IBizDataChangeHandleStra
EquipFactoryChangeDataDto factoryChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipFactoryChangeDataDto.class); EquipFactoryChangeDataDto factoryChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipFactoryChangeDataDto.class);
EquipDesignChangeDataDto designChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipDesignChangeDataDto.class); EquipDesignChangeDataDto designChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipDesignChangeDataDto.class);
EquipUseInfoChangeDataDto useInfoChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipUseInfoChangeDataDto.class); EquipUseInfoChangeDataDto useInfoChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipUseInfoChangeDataDto.class);
commonEquipDataProcessService.buildChangeFields(record, designChangeDataDto, factoryChangeDataDto, registerChangeDataDto, useInfoChangeDataDto, allChangeColumns); commonEquipDataProcessService.buildChangeFields(record, designChangeDataDto, factoryChangeDataDto, registerChangeDataDto, null, useInfoChangeDataDto, allChangeColumns);
// 前置校验 // 前置校验
commonEquipDataProcessService.checkValidField(record, registerChangeDataDto, registerChangeDataDto.getEquList(), registerChangeDataDto.getEquCategory(), registerChangeDataDto.getEquDefine()); commonEquipDataProcessService.checkValidField(record, registerChangeDataDto, registerChangeDataDto.getEquList(), registerChangeDataDto.getEquCategory(), registerChangeDataDto.getEquDefine());
commonEquipDataProcessService.checkValidField(record, factoryChangeDataDto, registerChangeDataDto.getEquList(), registerChangeDataDto.getEquCategory(), registerChangeDataDto.getEquDefine()); commonEquipDataProcessService.checkValidField(record, factoryChangeDataDto, registerChangeDataDto.getEquList(), registerChangeDataDto.getEquCategory(), registerChangeDataDto.getEquDefine());
......
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