Commit 9a55e121 authored by chenzhao's avatar chenzhao

超设计年限登记增加功能入口设备种类增加提示

parent b01a24d2
...@@ -545,30 +545,27 @@ public class CommonController extends BaseController { ...@@ -545,30 +545,27 @@ public class CommonController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equList") @GetMapping(value = "/equList")
@ApiOperation(httpMethod = "GET", value = "按照业务类型查询设备种类,工作台使用", notes = "按照业务类型查询设备种类,工作台使用") @ApiOperation(httpMethod = "GET", value = "按照业务类型查询设备种类,工作台使用", notes = "按照业务类型查询设备种类,工作台使用")
public ResponseModel<List<DictionarieValueModel>> equList(@RequestParam(value = "type") String bizType) { public ResponseModel<List<Map<String, Object>>> equList(@RequestParam(value = "type") String bizType) {
// 在平台字典配置的自定义业务的设备种类:格式{bizType}_SBZL,如BF_YZ_SBZL==》移装注销-设备种类 // 在平台字典配置的自定义业务的设备种类:格式{bizType}_SBZL,如BF_YZ_SBZL==》移装注销-设备种类
String suffix = "_SBZL"; String suffix = "_SBZL";
String dictCode = bizType + suffix; String dictCode = bizType + suffix;
List<JSONObject> result = new ArrayList<>();
List<DictionarieValueModel> resultObj = Systemctl.dictionarieClient.dictValues(dictCode).getResult(); List<DictionarieValueModel> resultObj = Systemctl.dictionarieClient.dictValues(dictCode).getResult();
List<Map<String, Object>> result = resultObj.stream()
.filter(obj -> obj instanceof Map)
.map(obj -> (Map<String, Object>) obj).collect(Collectors.toList());
if (bizType.equals("DJ_CSJ")){ if (bizType.equals("DJ_CSJ")){
for (DictionarieValueModel dictionarieValueModel : resultObj) { result.forEach(e->{
if (dictionarieValueModel.getDictCode().equals("2000")){ if (e.getOrDefault("dictDataKey","").equals("2000")){
JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(dictionarieValueModel)); e.put("tips","变更前需先进行委托检验,在办理变更登记时上传委托检验报告");
jsonObject.put("tips","压力容器需先进行委托检验,在办理变更登记时上传委托检验报告");
result.add(jsonObject );
}else { }else {
JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(dictionarieValueModel)); e.put("tips","变更前需先进行安全评估,评估结果为改造或重大维修,需办理改造告知或维修告知,进行监督检验后,再进行变更登记;安全评估结果为一般维修,需办理定期检验,再进行变更登记");
jsonObject.put("tips","大型游乐设施需先进行安全评估,如评估结果为改造或重大维修,则需先办理改造告知或维修告知,进行监督检验后,再进行变更登记;如安全评估结果为一般维修的,需先办理定期检验,再进行变更登记");
result.add(jsonObject );
}
} }
});
} }
return ResponseHelper.buildResponse(Systemctl.dictionarieClient.dictValues(dictCode).getResult()); return ResponseHelper.buildResponse(result);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
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