Commit 72e9746d authored by 刘凡's avatar 刘凡

优化:设备详情返回设备种类描述字段

parent d91bbff4
...@@ -292,8 +292,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -292,8 +292,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
//注册登记 //注册登记
IdxBizJgRegisterInfo registerInfo = this.getOne(new QueryWrapper<IdxBizJgRegisterInfo>().eq("RECORD", record)); IdxBizJgRegisterInfo registerInfo = this.getOne(new QueryWrapper<IdxBizJgRegisterInfo>().eq("RECORD", record));
if (!ValidationUtil.isEmpty(registerInfo)) { if (!ValidationUtil.isEmpty(registerInfo)) {
String equList = registerInfo.getEquList();//设备种类
String equCategory = registerInfo.getEquCategory();//设备类别 String equCategory = registerInfo.getEquCategory();//设备类别
String equDefine = registerInfo.getEquDefine();//设备品种 String equDefine = registerInfo.getEquDefine();//设备品种
List<EquipmentCategory> categoryList0 = commonService.getEquipmentCategoryList(equList, null);
List<EquipmentCategory> categoryList1 = commonService.getEquipmentCategoryList(equCategory, null); List<EquipmentCategory> categoryList1 = commonService.getEquipmentCategoryList(equCategory, null);
List<EquipmentCategory> categoryList2 = commonService.getEquipmentCategoryList(equDefine, null); List<EquipmentCategory> categoryList2 = commonService.getEquipmentCategoryList(equDefine, null);
Map<String, Object> registerInfoMap; Map<String, Object> registerInfoMap;
...@@ -302,6 +304,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -302,6 +304,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
registerInfoMap.put("registerinfoSeq", registerInfo.getSequenceNbr()); registerInfoMap.put("registerinfoSeq", registerInfo.getSequenceNbr());
registerInfoMap.put("sequenceNbr", registerInfo.getSequenceNbr()); registerInfoMap.put("sequenceNbr", registerInfo.getSequenceNbr());
registerInfoMap.put("productPhoto", JSON.parseArray(registerInfo.getProductPhoto())); registerInfoMap.put("productPhoto", JSON.parseArray(registerInfo.getProductPhoto()));
if (CollectionUtils.isNotEmpty(categoryList0)) {
registerInfoMap.put("equListDesc", categoryList0.get(0).getName());
}
if (CollectionUtils.isNotEmpty(categoryList1)) { if (CollectionUtils.isNotEmpty(categoryList1)) {
registerInfoMap.put("equCategoryDesc", categoryList1.get(0).getName()); registerInfoMap.put("equCategoryDesc", categoryList1.get(0).getName());
} }
...@@ -1264,7 +1269,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1264,7 +1269,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
List<IdxBizJgMainParts> mainPartsList = new ArrayList<>(); List<IdxBizJgMainParts> mainPartsList = new ArrayList<>();
List<IdxBizJgProtectionDevices> protectionDevicesList = new ArrayList<>(); List<IdxBizJgProtectionDevices> protectionDevicesList = new ArrayList<>();
if (EQUIP_MAINPARTS_FORM_ID.equals(subFormType)) { if (EQUIP_MAINPARTS_FORM_ID.equals(subFormType) && !ValidationUtil.isEmpty(list)) {
for (Object s : list) { for (Object s : list) {
List subFormMainPartsList = (ArrayList) map.get(s); List subFormMainPartsList = (ArrayList) map.get(s);
if (!ObjectUtils.isEmpty(subFormMainPartsList)) { if (!ObjectUtils.isEmpty(subFormMainPartsList)) {
...@@ -1279,7 +1284,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1279,7 +1284,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} }
} }
return mainPartsList; return mainPartsList;
} else if (EQUIP_PROTECTIONDEVICES_FORM_ID.equals(subFormType)) { } else if (EQUIP_PROTECTIONDEVICES_FORM_ID.equals(subFormType) && !ValidationUtil.isEmpty(list)) {
for (Object s : list) { for (Object s : list) {
List subFormProtectionDevicesList = (ArrayList) map.get(s); List subFormProtectionDevicesList = (ArrayList) map.get(s);
if (!ObjectUtils.isEmpty(subFormProtectionDevicesList)) { if (!ObjectUtils.isEmpty(subFormProtectionDevicesList)) {
......
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