Commit affc0fb21eb24991eeca97f3561af618c8a83af5
Exists in
master
and in
8 other branches
Merge remote-tracking branch 'origin/master'
Showing 3 changed files
platform-dal/src/main/java/com/lyms/platform/pojo/SmsConfigModel.java
View file @
affc0fb
| ... | ... | @@ -50,6 +50,16 @@ |
| 50 | 50 | //高危配置 |
| 51 | 51 | private String highConfig; |
| 52 | 52 | |
| 53 | + //备注 | |
| 54 | + private String remark; | |
| 55 | + | |
| 56 | + public String getRemark() { | |
| 57 | + return remark; | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void setRemark(String remark) { | |
| 61 | + this.remark = remark; | |
| 62 | + } | |
| 53 | 63 | |
| 54 | 64 | public String getHighConfig() { |
| 55 | 65 | return highConfig; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SmsConfigController.java
View file @
affc0fb
| ... | ... | @@ -123,8 +123,19 @@ |
| 123 | 123 | */ |
| 124 | 124 | @RequestMapping(value = "/addOrUpdateHospitalConfig", method = RequestMethod.PUT) |
| 125 | 125 | @ResponseBody |
| 126 | - public BaseResponse addOrUpdateHospitalConfig(@RequestParam(required = true) String hid,@RequestParam(required = true) String highConfig,@RequestParam(required = true) Integer status) { | |
| 127 | - return smsConfigFacade.addOrUpdateHospitalConfig(hid, highConfig, status); | |
| 126 | + public BaseResponse addOrUpdateHospitalConfig( | |
| 127 | + @RequestParam(required = true) String hospitalName, | |
| 128 | + @RequestParam(required = false) String shortCode, | |
| 129 | + @RequestParam(required = true) String provinceId, | |
| 130 | + @RequestParam(required = true) String cityId, | |
| 131 | + @RequestParam(required = true) String areaId, | |
| 132 | + @RequestParam(required = true) String address, | |
| 133 | + @RequestParam(required = true) String remark, | |
| 134 | + @RequestParam(required = true) String hid, | |
| 135 | + @RequestParam(required = true) String highConfig, | |
| 136 | + @RequestParam(required = true) Integer status) { | |
| 137 | + return smsConfigFacade.addOrUpdateHospitalConfig(hospitalName,shortCode,provinceId,cityId,areaId,address,remark, | |
| 138 | + hid, highConfig, status); | |
| 128 | 139 | } |
| 129 | 140 | |
| 130 | 141 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsConfigFacade.java
View file @
affc0fb
| ... | ... | @@ -339,47 +339,51 @@ |
| 339 | 339 | { |
| 340 | 340 | hospital.put("hospitalName",org.getName()); |
| 341 | 341 | hospital.put("shortCode",org.getShortCode()); |
| 342 | - String allAddress = ""; | |
| 343 | 342 | String provinceId = org.getProvinceId(); |
| 344 | - BasicConfigQuery query = new BasicConfigQuery(); | |
| 345 | - query.setYn(YnEnums.YES.getId()); | |
| 346 | - if (StringUtils.isNotEmpty(provinceId)) | |
| 347 | - { | |
| 348 | - query.setId(provinceId); | |
| 349 | - List<BasicConfig> configList = basicConfigService.queryBasicConfig(query); | |
| 350 | - if (CollectionUtils.isNotEmpty(configList)) | |
| 351 | - { | |
| 352 | - allAddress+=configList.get(0).getName(); | |
| 353 | - } | |
| 354 | - } | |
| 355 | - | |
| 343 | + hospital.put("provinceId",provinceId); | |
| 356 | 344 | String cityId = org.getCityId(); |
| 357 | - if (StringUtils.isNotEmpty(provinceId)) | |
| 358 | - { | |
| 359 | - query.setId(cityId); | |
| 360 | - List<BasicConfig> configList = basicConfigService.queryBasicConfig(query); | |
| 361 | - if (CollectionUtils.isNotEmpty(configList)) | |
| 362 | - { | |
| 363 | - allAddress+=configList.get(0).getName(); | |
| 364 | - } | |
| 365 | - } | |
| 366 | - | |
| 345 | + hospital.put("cityId",cityId); | |
| 367 | 346 | String areaId = org.getAreaId(); |
| 368 | - if (StringUtils.isNotEmpty(provinceId)) | |
| 369 | - { | |
| 370 | - query.setId(areaId); | |
| 371 | - List<BasicConfig> configList = basicConfigService.queryBasicConfig(query); | |
| 372 | - if (CollectionUtils.isNotEmpty(configList)) | |
| 373 | - { | |
| 374 | - allAddress+=configList.get(0).getName(); | |
| 375 | - } | |
| 376 | - } | |
| 347 | + hospital.put("areaId",areaId); | |
| 377 | 348 | |
| 349 | +// BasicConfigQuery query = new BasicConfigQuery(); | |
| 350 | +// query.setYn(YnEnums.YES.getId()); | |
| 351 | +// if (StringUtils.isNotEmpty(provinceId)) | |
| 352 | +// { | |
| 353 | +// query.setId(provinceId); | |
| 354 | +// List<BasicConfig> configList = basicConfigService.queryBasicConfig(query); | |
| 355 | +// if (CollectionUtils.isNotEmpty(configList)) | |
| 356 | +// { | |
| 357 | +// allAddress+=configList.get(0).getName(); | |
| 358 | +// } | |
| 359 | +// } | |
| 360 | +// | |
| 361 | +// String cityId = org.getCityId(); | |
| 362 | +// if (StringUtils.isNotEmpty(provinceId)) | |
| 363 | +// { | |
| 364 | +// query.setId(cityId); | |
| 365 | +// List<BasicConfig> configList = basicConfigService.queryBasicConfig(query); | |
| 366 | +// if (CollectionUtils.isNotEmpty(configList)) | |
| 367 | +// { | |
| 368 | +// allAddress+=configList.get(0).getName(); | |
| 369 | +// } | |
| 370 | +// } | |
| 371 | +// | |
| 372 | +// String areaId = org.getAreaId(); | |
| 373 | +// if (StringUtils.isNotEmpty(provinceId)) | |
| 374 | +// { | |
| 375 | +// query.setId(areaId); | |
| 376 | +// List<BasicConfig> configList = basicConfigService.queryBasicConfig(query); | |
| 377 | +// if (CollectionUtils.isNotEmpty(configList)) | |
| 378 | +// { | |
| 379 | +// allAddress+=configList.get(0).getName(); | |
| 380 | +// } | |
| 381 | +// } | |
| 382 | + | |
| 378 | 383 | String address = org.getAddress(); |
| 379 | - allAddress+=address; | |
| 380 | - hospital.put("address", allAddress); | |
| 384 | + hospital.put("address", address); | |
| 381 | 385 | hospital.put("status",org.getStatus() == null ? "" : String.valueOf(org.getStatus())); |
| 382 | - hospital.put("remark", ""); | |
| 386 | + | |
| 383 | 387 | } |
| 384 | 388 | SmsConfigQuery query = new SmsConfigQuery(); |
| 385 | 389 | query.setYn(YnEnums.YES.getId()); |
| ... | ... | @@ -391,7 +395,7 @@ |
| 391 | 395 | if (model != null) |
| 392 | 396 | { |
| 393 | 397 | hospital.put("highConfig",model.getHighConfig()); |
| 394 | - | |
| 398 | + hospital.put("remark", model.getRemark()); | |
| 395 | 399 | } |
| 396 | 400 | |
| 397 | 401 | } |
| ... | ... | @@ -409,7 +413,8 @@ |
| 409 | 413 | * @param status |
| 410 | 414 | * @return |
| 411 | 415 | */ |
| 412 | - public BaseResponse addOrUpdateHospitalConfig(String hid, String highConfig, Integer status) { | |
| 416 | + public BaseResponse addOrUpdateHospitalConfig(String hospitalName,String shortCode,String provinceId,String cityId,String areaId, | |
| 417 | + String address,String remark,String hid, String highConfig, Integer status) { | |
| 413 | 418 | SmsConfigQuery query = new SmsConfigQuery(); |
| 414 | 419 | query.setYn(YnEnums.YES.getId()); |
| 415 | 420 | query.setHospitalId(hid); |
| 416 | 421 | |
| ... | ... | @@ -432,11 +437,18 @@ |
| 432 | 437 | model.setHospitalId(hid); |
| 433 | 438 | model.setYn(YnEnums.YES.getId()); |
| 434 | 439 | model.setHighConfig(highConfig); |
| 440 | + model.setRemark(remark); | |
| 435 | 441 | smsConfigService.addSmsConfig(model); |
| 436 | 442 | } |
| 437 | 443 | Organization obj = new Organization(); |
| 438 | 444 | obj.setId(Integer.parseInt(hid)); |
| 439 | 445 | obj.setStatus(status); |
| 446 | + obj.setName(hospitalName); | |
| 447 | + obj.setShortCode(shortCode); | |
| 448 | + obj.setProvinceId(provinceId); | |
| 449 | + obj.setCityId(cityId); | |
| 450 | + obj.setAreaId(areaId); | |
| 451 | + obj.setAddress(address); | |
| 440 | 452 | organizationService.updateOrganization(obj); |
| 441 | 453 | |
| 442 | 454 | BaseResponse objectResponse = new BaseResponse(); |