Commit 0ee40935 authored by 王果's avatar 王果

设备详情方法修改

parent 73c8f301
......@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import org.apache.commons.collections.CollectionUtils;
import org.apache.lucene.queryparser.classic.QueryParser;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
......@@ -197,89 +198,89 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
return resultMap;
}
private Map<String, Object> getStringObjectMap(String record) {
Map<String, Object> objMap = new HashMap<>();
//使用信息
IdxBizJgUseInfo useInfo = idxBizJgUseInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(useInfo)) {
Map<String, Object> useInfoMap = new HashMap<>();
String[] fields = null;
useInfoMap = this.convertCamelToUnderscore(useInfo, fields);
Map<String, Object> useInfoMap = convertCamelToUnderscore(useInfo, null);
useInfoMap.put("USEINFO_SEQ", useInfo.getSequenceNbr());
objMap.putAll(useInfoMap);
}
//设计制造
IdxBizJgDesignInfo designInfo = iIdxBizJgDesignInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(designInfo)) {
Map<String, Object> designInfoMap = new HashMap<>();
String[] fields = {"DESIGN_DOC", "DESIGN_STANDARD"};
designInfoMap = this.convertCamelToUnderscore(designInfo, fields);
Map<String, Object> designInfoMap = convertCamelToUnderscore(designInfo, fields);
designInfoMap.put("DESIGNINFO_SEQ", designInfo.getSequenceNbr());
objMap.putAll(designInfoMap);
}
//制造信息
IdxBizJgFactoryInfo factoryInfo = iIdxBizJgFactoryInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(factoryInfo)) {
Map<String, Object> factoryInfoMap = new HashMap<>();
String[] fields = {"FACTORY_STANDARD", "PRODUCT_QUALITY_YIELD_PROVE", "INS_USE_MAINTAIN_EXPLAIN"};
factoryInfoMap = this.convertCamelToUnderscore(factoryInfo, fields);
Map<String, Object> factoryInfoMap = convertCamelToUnderscore(factoryInfo, fields);
String imported = factoryInfo.getImported();
if("0".equals(imported)){
factoryInfoMap.put("IMPORTED_DESC","否");
}else if("1".equals(imported)){
factoryInfoMap.put("IMPORTED_DESC","是");
}
factoryInfoMap.put("FACTORYINFO_SEQ", factoryInfo.getSequenceNbr());
objMap.putAll(factoryInfoMap);
}
//施工信息
IdxBizJgConstructionInfo constructionInfo = iIdxBizJgConstructionInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(constructionInfo)) {
Map<String, Object> constructionInfoMap = new HashMap<>();
String[] fields = null;
constructionInfoMap = this.convertCamelToUnderscore(constructionInfo, fields);
Map<String, Object> constructionInfoMap = convertCamelToUnderscore(constructionInfo, null);
constructionInfoMap.put("CONSTRUCTIONINFO_SEQ", constructionInfo.getSequenceNbr());
objMap.putAll(constructionInfoMap);
}
//注册登记
IdxBizJgRegisterInfo registerInfo = this.getOne(new QueryWrapper<IdxBizJgRegisterInfo>().eq("RECORD", record));
if (!ValidationUtil.isEmpty(registerInfo)) {
Map<String, Object> registerInfoMap = new HashMap<>();
String[] fields = {"PRODUCT_PHOTO"};
registerInfoMap = this.convertCamelToUnderscore(registerInfo, fields);
Map<String, Object> registerInfoMap = convertCamelToUnderscore(registerInfo, fields);
registerInfoMap.put("REGISTERINFO_SEQ", registerInfo.getSequenceNbr());
registerInfoMap.put("SEQUENCE_NBR", registerInfo.getSequenceNbr());
String equCategory = registerInfo.getEquCategory();//设备类别
String equDefine = registerInfo.getEquDefine();//设备品种
List<EquipmentCategory> categoryList1 = commonService.getEquipmentCategoryList(equCategory, null);
if(CollectionUtils.isNotEmpty(categoryList1)){
registerInfoMap.put("EQU_CATEGORY_DESC",categoryList1.get(0).getName());
}
List<EquipmentCategory> categoryList2 = commonService.getEquipmentCategoryList(equDefine, null);
if(CollectionUtils.isNotEmpty(categoryList2)){
registerInfoMap.put("EQU_DEFINE_DESC",categoryList2.get(0).getName());
}
objMap.putAll(registerInfoMap);
}
//维保备案
IdxBizJgMaintenanceRecordInfo maintenanceRecordInfo = iIdxBizJgMaintenanceRecordInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(maintenanceRecordInfo)) {
Map<String, Object> maintenanceRecordInfoMap = new HashMap<>();
String[] fields = null;
maintenanceRecordInfoMap = this.convertCamelToUnderscore(maintenanceRecordInfo, fields);
Map<String, Object> maintenanceRecordInfoMap = convertCamelToUnderscore(maintenanceRecordInfo, null);
maintenanceRecordInfoMap.put("MAINTENANCERECORDINFO_SEQ", maintenanceRecordInfo.getSequenceNbr());
objMap.putAll(maintenanceRecordInfoMap);
}
//监督管理
IdxBizJgSupervisionInfo supervisionInfo = iIdxBizJgSupervisionInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(supervisionInfo)) {
Map<String, Object> supervisionInfoMap = new HashMap<>();
String[] fields = null;
supervisionInfoMap = this.convertCamelToUnderscore(supervisionInfo, fields);
Map<String, Object> supervisionInfoMap = convertCamelToUnderscore(supervisionInfo, null);
supervisionInfoMap.put("SUPERVISIONINFO_SEQ", supervisionInfo.getSequenceNbr());
objMap.putAll(supervisionInfoMap);
}
//其他信息
IdxBizJgOtherInfo otherInfo = iIdxBizJgOtherInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(otherInfo)) {
Map<String, Object> otherInfoMap = new HashMap<>();
String[] fields = null;
otherInfoMap = this.convertCamelToUnderscore(otherInfo, fields);
Map<String, Object> otherInfoMap = convertCamelToUnderscore(otherInfo, null);
otherInfoMap.put("OTHERINFO_SEQ", otherInfo.getSequenceNbr());
objMap.putAll(otherInfoMap);
}
//检验检测
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = iIdxBizJgInspectionDetectionInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(inspectionDetectionInfo)) {
Map<String, Object> inspectionDetectionInfoMap = new HashMap<>();
String[] fields = {"INSPECT_REPORT"};
inspectionDetectionInfoMap = this.convertCamelToUnderscore(inspectionDetectionInfo, fields);
Map<String, Object> inspectionDetectionInfoMap = convertCamelToUnderscore(inspectionDetectionInfo, fields);
inspectionDetectionInfoMap.put("INSPECTIONDETECTIONINFO_SEQ", inspectionDetectionInfo.getSequenceNbr());
objMap.putAll(inspectionDetectionInfoMap);
}
......@@ -287,9 +288,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
//电梯
IdxBizJgTechParamsElevator elevator = iIdxBizJgTechParamsElevatorService.getOneData(record);
if (!ValidationUtil.isEmpty(elevator)) {
Map<String, Object> elevatorMap = new HashMap<>();
String[] fields = {"EXPLOSIONPROOF_SIGN_COMPLETE"};
elevatorMap = this.convertCamelToUnderscore(elevator, fields);
Map<String, Object> elevatorMap = convertCamelToUnderscore(elevator, fields);
elevatorMap.put("ELEVATOR_SEQ", elevator.getSequenceNbr());
objMap.putAll(elevatorMap);
}
......@@ -304,18 +304,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
//主要零部件
IdxBizJgMainParts mainParts = iIdxBizJgMainPartsService.getOneData(record);
if (!ValidationUtil.isEmpty(mainParts)) {
Map<String, Object> mainPartsMap = new HashMap<>();
String[] fields = null;
mainPartsMap = this.convertCamelToUnderscore(mainParts, fields);
Map<String, Object> mainPartsMap = convertCamelToUnderscore(mainParts, null);
mainPartsMap.put("MAINPARTS_SEQ", mainParts.getSequenceNbr());
objMap.putAll(mainPartsMap);
}
//安全附件
IdxBizJgProtectionDevices protectionDevices = iIdxBizJgProtectionDevicesService.getOneData(record);
if (!ValidationUtil.isEmpty(protectionDevices)) {
Map<String, Object> protectionDevicesMap = new HashMap<>();
String[] fields = null;
protectionDevicesMap = this.convertCamelToUnderscore(protectionDevices, fields);
Map<String, Object> protectionDevicesMap = convertCamelToUnderscore(protectionDevices, null);
protectionDevicesMap.put("PROTECTIONDEVICES_SEQ", protectionDevices.getSequenceNbr());
objMap.putAll(protectionDevicesMap);
}
......
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