Commit ef76049bca9bf11261a17b56f7f3f5cf60d3c2fe

Authored by liquanyu
1 parent 3efedf6dd2

短信修改

Showing 3 changed files with 44 additions and 1 deletions

platform-common/src/main/java/com/lyms/platform/common/enums/SmsServiceEnums.java View file @ ef76049
... ... @@ -47,7 +47,8 @@
47 47 TSGQTX(33,"儿童听筛过期提醒",32,"2"),
48 48 YKGQTX(34,"儿童眼科过期提醒",32,"2"),
49 49 EBGQTX(35,"儿童儿保过期提醒",32,"2"),
50   - FWDGTX(36,"服务订购提醒",18,"1");
  50 + FWDGTX(36,"服务订购提醒",18,"1"),
  51 + JSGWZD(37,"及时高危指导",1,"");
51 52  
52 53 private SmsServiceEnums(int id,String name,int pid,String serviceObj){
53 54 this.id = id;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ModularFunctionConfigController.java View file @ ef76049
... ... @@ -66,5 +66,17 @@
66 66 return modularFunctionConfigFacde.queryDiagnoseConfig(hospitalId);
67 67 }
68 68  
  69 +
  70 + /**
  71 + * 查询医院是否补发推送失败后的短信
  72 + * @param hospitalId
  73 + * @return
  74 + */
  75 + @RequestMapping(method = RequestMethod.GET, value = "/queryHospitalSmsSendConfig")
  76 + @ResponseBody
  77 + public BaseResponse queryHospitalSmsSendConfig(@RequestParam(required = false) String hospitalId) {
  78 + return modularFunctionConfigFacde.queryHospitalSmsSendConfig(hospitalId);
  79 + }
  80 +
69 81 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ModularFunctionConfigFacde.java View file @ ef76049
... ... @@ -121,5 +121,35 @@
121 121 return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有数据");
122 122 }
123 123  
  124 + public BaseResponse queryHospitalSmsSendConfig(String hospitalId) {
  125 + Map<String,String> map = new HashMap<>();
  126 + ModularFunctionConfigQuery diagnoseConfigQuery = new ModularFunctionConfigQuery();
  127 + if(StringUtils.isNotEmpty(hospitalId))
  128 + {
  129 + diagnoseConfigQuery.setHospitalId(hospitalId);
  130 + }
  131 +
  132 + List<ModularFunctionConfigModel> configModels = modularFunctionConfigServcie.queryDiagnoseConfigs(diagnoseConfigQuery);
  133 + if (CollectionUtils.isNotEmpty(configModels))
  134 + {
  135 + for (ModularFunctionConfigModel model : configModels)
  136 + {
  137 + List<Map<String, Object>> list = model.getConfigs();
  138 + if (CollectionUtils.isNotEmpty(list))
  139 + {
  140 + for (Map<String, Object> config : list)
  141 + {
  142 + //是否推送发送失败后补发短信
  143 + if ("10".equals(String.valueOf(config.get("type"))))
  144 + {
  145 + String isOpen = "1".equals(String.valueOf(config.get("value"))) ? "ture" : "false";
  146 + map.put(model.getHospitalId(),isOpen);
  147 + }
  148 + }
  149 + }
  150 + }
  151 + }
  152 + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setData(map);
  153 + }
124 154 }