Commit 81a2eb36 authored by 韩桐桐's avatar 韩桐桐

fix(jg):撬装式承压设备

parent 20858eff
......@@ -250,8 +250,8 @@ public class CommonController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询监管业务名称列表", notes = "查询监管业务名称列表")
@GetMapping(value = "/superviseBusinessCategory")
public ResponseModel<Object> equipTree(String type) {
return ResponseHelper.buildResponse(commonService.superviseBusinessCategory(type));
public ResponseModel<Object> equipTree(@RequestParam(value = "businessType") String businessType) {
return ResponseHelper.buildResponse(commonService.superviseBusinessCategory(businessType));
}
/**
......@@ -413,10 +413,16 @@ public class CommonController extends BaseController {
@GetMapping(value = "/equ-category/{categoryCode}/list")
@ApiOperation(httpMethod = "GET", value = "按照业务类型、设备种类查询设备类别", notes = "按照业务类型、设备种类查询设备类别")
public ResponseModel<List<DictionarieValueModel>> equCategoryList(@RequestParam(value = "type") String bizType,
@RequestParam(value = "businessScenarios") String businessScenarios,
@PathVariable String categoryCode) {
// 在平台字典配置的自定义业务的设备种类:格式{bizType}_{categoryCode},如BF_YZ_1000==》移装注销-锅炉
String dictCode = String.format("%s_%s", bizType, categoryCode);
return ResponseHelper.buildResponse(Systemctl.dictionarieClient.dictValues(dictCode).getResult());
List<DictionarieValueModel> result = Systemctl.dictionarieClient.dictValues(dictCode).getResult();
//使用登记bizType(DJ_SY) + 压力容器categoryCode(2000) + 按照场景选择businessScenarios(1) => 只展示固定式压力容器(2100)
boolean isFlag = "DJ_SY".equals(bizType) && "2000".equals(categoryCode) && "1".equals(businessScenarios);
List<DictionarieValueModel> collect = result.stream()
.filter(x -> !isFlag || x.getDictDataKey().equals("2100")).collect(Collectors.toList());
return ResponseHelper.buildResponse(collect);
}
......
......@@ -49,7 +49,7 @@ public interface ICommonService {
List<LinkedHashMap> creatApproveTree();
List<Map<String, Object>> superviseBusinessCategory(String type);
List<Map<String, Object>> superviseBusinessCategory(String businessType);
List<Map<String, Object>> businessScenarios(String type);
......
......@@ -611,20 +611,20 @@ public class CommonServiceImpl implements ICommonService {
}
@Override
public List<Map<String, Object>> superviseBusinessCategory(String type) {
public List<Map<String, Object>> superviseBusinessCategory(String businessType) {
ReginParams reginParams = getSelectedOrgInfo();
Map<String, List<Map<String, Object>>> resourceJson = JsonUtils.getResourceJson(superviseBusinessCategory);
if (XZSB.equals(type) && CompanyTypeEnum.CONSTRUCTION.getName().equals(reginParams.getCompany().getCompanyType())){
Iterator<Map<String, Object>> iterator = resourceJson.get(type).iterator();
if (XZSB.equals(businessType) && CompanyTypeEnum.CONSTRUCTION.getName().equals(reginParams.getCompany().getCompanyType())){
Iterator<Map<String, Object>> iterator = resourceJson.get(businessType).iterator();
while (iterator.hasNext()) {
Map<String, Object> item = iterator.next();
if (item.get(CODE).equals(PL_DR)) {
iterator.remove();
}
}
return resourceJson.get(type);
return resourceJson.get(businessType);
}
return resourceJson.get(type);
return resourceJson.get(businessType);
}
@Override
......
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