Commit 755fed04eca8fd4a5171f2bebe303ca85a4f705c

Authored by liquanyu
1 parent 34595e1770

配置

Showing 5 changed files with 108 additions and 3 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/SmsConfigModel.java View file @ 755fed0
... ... @@ -47,6 +47,27 @@
47 47 //医院ID
48 48 private String hospitalId;
49 49  
  50 + //高危配置
  51 + private String highConfig;
  52 + //运行状态 0运行 1试运行 2停止
  53 + private Integer status;
  54 +
  55 + public String getHighConfig() {
  56 + return highConfig;
  57 + }
  58 +
  59 + public void setHighConfig(String highConfig) {
  60 + this.highConfig = highConfig;
  61 + }
  62 +
  63 + public Integer getStatus() {
  64 + return status;
  65 + }
  66 +
  67 + public void setStatus(Integer status) {
  68 + this.status = status;
  69 + }
  70 +
50 71 public String getHospitalId() {
51 72 return hospitalId;
52 73 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SmsConfigController.java View file @ 755fed0
... ... @@ -103,5 +103,15 @@
103 103 return list;
104 104 }
105 105  
  106 +
  107 + /**
  108 + * 查询医院
  109 + * @return
  110 + */
  111 + @RequestMapping(value = "/queryHospitalConfig/{hid}", method = RequestMethod.GET)
  112 + @ResponseBody
  113 + public BaseResponse queryHospitalConfig(@PathVariable("hid") String hid) {
  114 + return smsConfigFacade.queryHospitalConfig(hid);
  115 + }
106 116 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsConfigFacade.java View file @ 755fed0
... ... @@ -13,7 +13,9 @@
13 13 import com.lyms.platform.operate.web.result.*;
14 14 import com.lyms.platform.permission.model.Departments;
15 15 import com.lyms.platform.permission.model.DepartmentsQuery;
  16 +import com.lyms.platform.permission.model.Organization;
16 17 import com.lyms.platform.permission.service.DepartmentsService;
  18 +import com.lyms.platform.permission.service.OrganizationService;
17 19 import com.lyms.platform.pojo.*;
18 20 import com.lyms.platform.query.*;
19 21 import com.qiniu.util.Json;
... ... @@ -35,6 +37,9 @@
35 37 @Autowired
36 38 private DepartmentsService departmentsService;
37 39  
  40 + @Autowired
  41 + private OrganizationService organizationService;
  42 +
38 43 /**
39 44 * 更新短信服务配置
40 45 * @param request
... ... @@ -316,6 +321,61 @@
316 321 sr.setDeptPrefix(list);
317 322 }
318 323 return sr;
  324 + }
  325 +
  326 + /**
  327 + * 查询医院基础配置
  328 + * @param hid
  329 + * @return
  330 + */
  331 + public BaseResponse queryHospitalConfig(String hid) {
  332 + Map<String,String> hospital = new HashMap<>();
  333 + Organization org = organizationService.getOrganization(Integer.parseInt(hid));
  334 + if (org != null)
  335 + {
  336 + hospital.put("hospitalName",org.getName());
  337 + hospital.put("shortCode",org.getShortCode());
  338 + String allAddress = "";
  339 + String provinceId = org.getProvinceId();
  340 + if (StringUtils.isNotEmpty(provinceId))
  341 + {
  342 +
  343 + }
  344 + String areaId = org.getAreaId();
  345 + if (StringUtils.isNotEmpty(provinceId))
  346 + {
  347 +
  348 + }
  349 + String cityId = org.getCityId();
  350 + if (StringUtils.isNotEmpty(provinceId))
  351 + {
  352 +
  353 + }
  354 + String address = org.getAddress();
  355 + allAddress+=address;
  356 + hospital.put("address",allAddress);
  357 +
  358 + hospital.put("remark","");
  359 + }
  360 + SmsConfigQuery query = new SmsConfigQuery();
  361 + query.setYn(YnEnums.YES.getId());
  362 + query.setHospitalId(hid);
  363 + List<SmsConfigModel> smsmodels = smsConfigService.querySmsConfigByHid(query);
  364 + if (CollectionUtils.isNotEmpty(smsmodels))
  365 + {
  366 + SmsConfigModel model = smsmodels.get(0);
  367 + if (model != null)
  368 + {
  369 + hospital.put("highConfig",model.getHighConfig());
  370 + hospital.put("status",model.getStatus()+"");
  371 + }
  372 +
  373 + }
  374 + BaseObjectResponse objectResponse = new BaseObjectResponse();
  375 + objectResponse.setData(hospital);
  376 + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
  377 + objectResponse.setErrormsg("成功");
  378 + return objectResponse;
319 379 }
320 380 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java View file @ 755fed0
... ... @@ -224,18 +224,19 @@
224 224 usersQuery.setYn(YnEnums.YES.getId());
225 225 usersQuery.setOrgId(hospitalId);
226 226 List<Users> users = usersService.queryUsers2(usersQuery);
227   - Map pmap = new HashMap();
  227 + List<Map> list = new ArrayList<>();
228 228 if (CollectionUtils.isNotEmpty(users))
229 229 {
230 230 for(Users user : users)
231 231 {
  232 + Map pmap = new HashMap();
232 233 pmap.put("id",user.getId());
233 234 pmap.put("name",user.getName());
  235 + list.add(pmap);
234 236 }
235 237 }
236   -
237 238 BaseObjectResponse objectResponse = new BaseObjectResponse();
238   - objectResponse.setData(pmap);
  239 + objectResponse.setData(list);
239 240 objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
240 241 objectResponse.setErrormsg("成功");
241 242 return objectResponse;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SmsConfigRequest.java View file @ 755fed0
... ... @@ -35,6 +35,19 @@
35 35  
36 36 private String hospitalId;
37 37  
  38 + //高危配置
  39 + private String highConfig;
  40 + //运行状态 0运行 1试运行 2停止
  41 + private Integer status;
  42 +
  43 + public String getHighConfig() {
  44 + return highConfig;
  45 + }
  46 +
  47 + public void setHighConfig(String highConfig) {
  48 + this.highConfig = highConfig;
  49 + }
  50 +
38 51 public String getHospitalId() {
39 52 return hospitalId;
40 53 }