Commit 0d614069 authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 839b7278 fe768f39
package com.yeejoin.amos.boot.module.jg.biz.controller; package com.yeejoin.amos.boot.module.jg.biz.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo; import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
...@@ -161,13 +162,25 @@ public class IdxBizJqEquipmentRegisterController extends BaseController { ...@@ -161,13 +162,25 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
List<DictionarieValueModel> dictionarieValueModels = idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), equList, businessScenarios, dataSource, type); List<DictionarieValueModel> dictionarieValueModels = idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), equList, businessScenarios, dataSource, type);
//bug 24467 新增历史设备--有移动式压力容器,需禁用或者删除 (历史设备录入(有证-his,无证-black)) //bug 24467 新增历史设备--有移动式压力容器,需禁用或者删除 (历史设备录入(有证-his,无证-black))
if ("his".equals(dataSource) && "2000".equals(equList) && "SB_XZ".equals(type) && "0".equals(businessScenarios)) { if ("his".equals(dataSource) && "2000".equals(equList) && ("SB_XZ".equals(type) || "DW_LR".equals(type)) && "0".equals(businessScenarios)) {
dictionarieValueModels = dictionarieValueModels.stream().filter(dictionarieValueModel -> !dictionarieValueModel.getDictDataValue().equals("移动式压力容器")).collect(Collectors.toList()); dictionarieValueModels = dictionarieValueModels.stream().filter(dictionarieValueModel -> !dictionarieValueModel.getDictDataValue().equals("移动式压力容器")).collect(Collectors.toList());
} }
// 历史无证设备录入(有证-his,无证-black)) // 历史无证设备录入(有证-his,无证-black))
if ( "black".equals(dataSource) && "2000".equals(equList) && "SB_XZ".equals(type) && "0".equals(businessScenarios)) { if ( "black".equals(dataSource) && "2000".equals(equList) && ("SB_XZ".equals(type) || "DW_LR".equals(type)) && "0".equals(businessScenarios)) {
dictionarieValueModels = dictionarieValueModels.stream().filter(dictionarieValueModel -> !dictionarieValueModel.getDictDataValue().equals("移动式压力容器")).collect(Collectors.toList()); dictionarieValueModels = dictionarieValueModels.stream().filter(dictionarieValueModel -> !dictionarieValueModel.getDictDataValue().equals("移动式压力容器")).collect(Collectors.toList());
} }
//如果是单位录入只显示气瓶
if(("black".equals(dataSource) || ("his".equals(dataSource) ) && "2000".equals(equList) && "DW_LR".equals(type) && "0".equals(businessScenarios))){
List<DictionarieValueModel> result = new ArrayList<>();
if(CollectionUtil.isNotEmpty(dictionarieValueModels)){
for (DictionarieValueModel dictionarieValueModel : dictionarieValueModels) {
if("2300".equals(dictionarieValueModel.getDictDataKey())){
result.add(dictionarieValueModel);
}
}
}
return ResponseHelper.buildResponse(result);
}
return ResponseHelper.buildResponse(dictionarieValueModels); return ResponseHelper.buildResponse(dictionarieValueModels);
} }
......
...@@ -613,7 +613,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -613,7 +613,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
// 新报检单记录历史数据的逻辑 // 新报检单记录历史数据的逻辑
map.putAll(inspectionHistory.getHistoryData()); map.putAll(inspectionHistory.getHistoryData());
} else { } else {
// 历史单位之前未记录历史数据的逻辑 // 兼容逻辑:历史单据之前未记录历史数据的逻辑
if (model.getEquipClassify().equals(EquipmentClassifityEnum.YLGD.getCode())) { if (model.getEquipClassify().equals(EquipmentClassifityEnum.YLGD.getCode())) {
// 压力管道 // 压力管道
map.putAll(getDeviceListByProjectContraption2(model)); map.putAll(getDeviceListByProjectContraption2(model));
...@@ -1480,11 +1480,19 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -1480,11 +1480,19 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
List<String> records = applicationEquipModels.stream().map(JyjcInspectionApplicationEquipModel::getEquipUnicode).collect(Collectors.toList()); List<String> records = applicationEquipModels.stream().map(JyjcInspectionApplicationEquipModel::getEquipUnicode).collect(Collectors.toList());
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
List<Map<String, Object>> equList = this.getBaseMapper().selectPieLineListOfInspect(records); List<Map<String, Object>> equList = this.getBaseMapper().selectPieLineListOfInspect(records);
return setPieLineInfo(applicationModel, projectContraption, jsonObject, equList);
}
@NotNull
private JSONObject setPieLineInfo(JyjcInspectionApplicationModel applicationModel, IdxBizJgProjectContraption projectContraption, JSONObject jsonObject, List<Map<String, Object>> equList) {
jsonObject.put("equip", equList); jsonObject.put("equip", equList);
jsonObject.put("projectContraption", projectContraption.getProjectContraption()); jsonObject.put("projectContraption", projectContraption.getProjectContraption());
jsonObject.put("projectContraptionId", applicationModel.getProjectContraptionId()); jsonObject.put("projectContraptionId", applicationModel.getProjectContraptionId());
jsonObject.put("projectContraptionNo", projectContraption.getProjectContraptionNo()); jsonObject.put("projectContraptionNo", projectContraption.getProjectContraptionNo());
jsonObject.put("pipelineLength", calTotalLength(equList)); jsonObject.put("pipelineLength", calTotalLength(equList));
jsonObject.put("equListName", projectContraption.getEquListName());
jsonObject.put("equCategoryName", projectContraption.getEquCategoryName());
jsonObject.put("equDefineName" , projectContraption.getEquDefineName());
jsonObject.put("useRegistrationCode", projectContraption.getUseRegistrationCode()); jsonObject.put("useRegistrationCode", projectContraption.getUseRegistrationCode());
this.setInstallAddress(projectContraption, jsonObject); this.setInstallAddress(projectContraption, jsonObject);
this.setUseAddress(projectContraption, jsonObject); this.setUseAddress(projectContraption, jsonObject);
...@@ -1515,15 +1523,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -1515,15 +1523,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
List<JyjcInspectionApplicationEquipModel> applicationEquipModels = applicationEquipService.listApplicationEquipByApplicationSeq(applicationModel.getSequenceNbr()); List<JyjcInspectionApplicationEquipModel> applicationEquipModels = applicationEquipService.listApplicationEquipByApplicationSeq(applicationModel.getSequenceNbr());
List<String> records = applicationEquipModels.stream().map(JyjcInspectionApplicationEquipModel::getEquipUnicode).collect(Collectors.toList()); List<String> records = applicationEquipModels.stream().map(JyjcInspectionApplicationEquipModel::getEquipUnicode).collect(Collectors.toList());
List<Map<String, Object>> equList = this.getBaseMapper().selectPieLineListOfNoInspectInfo(records); List<Map<String, Object>> equList = this.getBaseMapper().selectPieLineListOfNoInspectInfo(records);
jsonObject.put("equip", equList); return setPieLineInfo(applicationModel, projectContraption, jsonObject, equList);
jsonObject.put("projectContraption", projectContraption.getProjectContraption());
jsonObject.put("projectContraptionId", applicationModel.getProjectContraptionId());
jsonObject.put("projectContraptionNo", projectContraption.getProjectContraptionNo());
jsonObject.put("pipelineLength", calTotalLength(equList));
jsonObject.put("useRegistrationCode", projectContraption.getUseRegistrationCode());
this.setInstallAddress(projectContraption, jsonObject);
this.setUseAddress(projectContraption, jsonObject);
return jsonObject;
} }
private String calTotalLength(List<Map<String, Object>> equList) { private String calTotalLength(List<Map<String, Object>> equList) {
......
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