Commit 253975e0 authored by 刘林's avatar 刘林

fix(JG):使用登记证添加气瓶类别

parent 15631a14
......@@ -1484,12 +1484,10 @@ public class CommonServiceImpl implements ICommonService {
String equCategory = equipRegistrationInfo.getEquCategory(); // 设备类别 "3100"
String equDefine = equipRegistrationInfo.getEquDefine(); // 设备品种 "3110"
if (!ObjectUtils.isEmpty(equCategory)) {
// 设备种类简称
String equCategoryAbbrName = Optional.ofNullable(CylinderTypeEnum.CYLINDER.getCode().equals(equCategory) ?
CylinderTypeEnum.CYLINDER.getName() : equCategory)
.map(category -> category.substring(0, 1))
.map(EquipTypeEnum::getMessage)
.orElse(null);
// 设备种类简称,如果是气瓶返回瓶
String equCategoryAbbrName = CylinderTypeEnum.CYLINDER.getCode().equals(equCategory) ?
CylinderTypeEnum.CYLINDER.getName() :
EquipTypeEnum.getMessage(equCategory.substring(0, 1));
// 设备代码中间两位
String equipType2MidDigits;
......
......@@ -268,9 +268,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
public void addNotInDJJGDictionary(List<BaseUnitLicence> baseUnitLicences) {
List<String> approvedOrganList = baseUnitLicences.stream()
.map(BaseUnitLicence::getApprovedOrgan)
.distinct()
.collect(Collectors.toList());
List<DataDictionary> allDictionaryList = this.initAllDataDictionaryList();
Set<String> existingNames = allDictionaryList.stream()
.filter(d -> d.getType().equals(DICT_TYPE_DJJG))
.map(DataDictionary::getName)
......
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