Commit 4302d070aeb223e077e0a5018ee1f4d57bd420f5
1 parent
addc36c1c8
Exists in
master
and in
6 other branches
追访
Showing 1 changed file with 18 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ModularFunctionConfigFacde.java
View file @
4302d07
... | ... | @@ -81,11 +81,24 @@ |
81 | 81 | }else{ |
82 | 82 | System.out.println("进入修改医院配置:"+organization.getId()); |
83 | 83 | ModularFunctionConfigModel modularFunctionConfigModel = modularFunctionConfigModels.get(0); |
84 | - Map<String, Object> conMap1 = new HashMap(); | |
85 | - conMap1.put("type", "2"); | |
86 | - conMap1.put("value", "2"); | |
87 | - modularFunctionConfigModel.getConfigs().add(conMap1); | |
88 | - modularFunctionConfigServcie.updateDiagnoseConfig(modularFunctionConfigModel); | |
84 | + List<Map<String, Object>> configs = modularFunctionConfigModel.getConfigs(); | |
85 | + boolean isAdd = true; | |
86 | + for(Map<String, Object> map:configs){ | |
87 | + if("2".equals(map.get("type"))){ | |
88 | + isAdd = false; | |
89 | + break; | |
90 | + } | |
91 | + } | |
92 | + if(isAdd){ | |
93 | + System.out.println(organization.getId()+"开通儿童高危配置"); | |
94 | + Map<String, Object> conMap1 = new HashMap(); | |
95 | + conMap1.put("type", "2"); | |
96 | + conMap1.put("value", "2"); | |
97 | + modularFunctionConfigModel.getConfigs().add(conMap1); | |
98 | + modularFunctionConfigServcie.updateDiagnoseConfig(modularFunctionConfigModel); | |
99 | + }else{ | |
100 | + System.out.println(organization.getId()+"已经配置儿童高危跳过"); | |
101 | + } | |
89 | 102 | } |
90 | 103 | } |
91 | 104 | } |