Commit b285df1f6317ea10f7d3ba2518fbc9ee03182f14
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 5 changed files
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
b285df1
| ... | ... | @@ -93,7 +93,7 @@ | 
| 93 | 93 | @TokenRequired | 
| 94 | 94 | public BaseResponse addOneAntenatalExamination(@Valid @RequestBody AntExAddRequest antExAddRequest,HttpServletRequest request) { | 
| 95 | 95 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | 
| 96 | - return antenatalExaminationFacade.addOneAntEx(antExAddRequest,loginState.getId()); | |
| 96 | + return antenatalExaminationFacade.addOneAntEx(antExAddRequest, loginState.getId()); | |
| 97 | 97 | } | 
| 98 | 98 | |
| 99 | 99 | /** | 
| ... | ... | @@ -107,7 +107,7 @@ | 
| 107 | 107 | @TokenRequired | 
| 108 | 108 | public BaseResponse addOneAntEx(@Valid @RequestBody AntExcAddRequest antExcAddRequest,HttpServletRequest request) { | 
| 109 | 109 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | 
| 110 | - return antenatalExaminationFacade.addOneAnetExChu(antExcAddRequest,loginState.getId()); | |
| 110 | + return antenatalExaminationFacade.addOneAnetExChu(antExcAddRequest, loginState.getId()); | |
| 111 | 111 | } | 
| 112 | 112 | |
| 113 | 113 | |
| ... | ... | @@ -135,7 +135,7 @@ | 
| 135 | 135 | @TokenRequired | 
| 136 | 136 | public BaseResponse delOneAntById(@Valid AntExQueryRequest antExQueryRequest,HttpServletRequest request) { | 
| 137 | 137 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | 
| 138 | - return antenatalExaminationFacade.delOneAntEx(antExQueryRequest,loginState.getId()); | |
| 138 | + return antenatalExaminationFacade.delOneAntEx(antExQueryRequest, loginState.getId()); | |
| 139 | 139 | } | 
| 140 | 140 | |
| 141 | 141 | @RequestMapping(method = RequestMethod.GET, value = "/antex/getenums") | 
| ... | ... | @@ -143,6 +143,17 @@ | 
| 143 | 143 | public BaseResponse getEnums() { | 
| 144 | 144 | return antenatalExaminationFacade.getEnums(); | 
| 145 | 145 | } | 
| 146 | + | |
| 147 | + /** | |
| 148 | + * 查询高危因素 包括禁用了的 | |
| 149 | + * @return | |
| 150 | + */ | |
| 151 | + @RequestMapping(method = RequestMethod.GET, value = "/antex/getRiskEnums") | |
| 152 | + @ResponseBody | |
| 153 | + public BaseResponse getRiskEnums() { | |
| 154 | + return antenatalExaminationFacade.getRiskEnums(); | |
| 155 | + } | |
| 156 | + | |
| 146 | 157 | |
| 147 | 158 | /** | 
| 148 | 159 | * 获取产妇整个产程的建档记录 | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.java
View file @
b285df1
| ... | ... | @@ -141,10 +141,10 @@ | 
| 141 | 141 | */ | 
| 142 | 142 | @RequestMapping(value = "/sendWomenGuildSms", method = RequestMethod.POST) | 
| 143 | 143 | @ResponseBody | 
| 144 | -// @TokenRequired | |
| 144 | + @TokenRequired | |
| 145 | 145 | public BaseResponse womenGuildSms(@RequestBody @Valid WomenGuideSmsRequest womenGuideSmsRequest,HttpServletRequest request){ | 
| 146 | -// LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 147 | - return residentsArchiveFacade.womenGuildSms(womenGuideSmsRequest, null); | |
| 146 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 147 | + return residentsArchiveFacade.womenGuildSms(womenGuideSmsRequest, loginState.getId()); | |
| 148 | 148 | } | 
| 149 | 149 | |
| 150 | 150 | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
b285df1
| ... | ... | @@ -59,6 +59,8 @@ | 
| 59 | 59 | private DeleteProcessHandler deleteProcessHandler; | 
| 60 | 60 | @Autowired | 
| 61 | 61 | private AntExRecordService recordService; | 
| 62 | + private BaseResponse riskEnums; | |
| 63 | + | |
| 62 | 64 | /** | 
| 63 | 65 | * 修改最后一次产检时间 | 
| 64 | 66 | * | 
| ... | ... | @@ -1201,6 +1203,12 @@ | 
| 1201 | 1203 | return 0; | 
| 1202 | 1204 | } | 
| 1203 | 1205 | }); | 
| 1206 | + } | |
| 1207 | + | |
| 1208 | + public BaseResponse getRiskEnums() { | |
| 1209 | + Map<String, Object> map = new HashMap<>(); | |
| 1210 | + map.put("getHighRisk", basicConfigFacade.getHighRiskAll()); | |
| 1211 | + return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 1204 | 1212 | } | 
| 1205 | 1213 | |
| 1206 | 1214 | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
b285df1
| ... | ... | @@ -235,6 +235,30 @@ | 
| 235 | 235 | return basicConfigs1; | 
| 236 | 236 | } | 
| 237 | 237 | |
| 238 | + | |
| 239 | + public List getHighRiskAll() { | |
| 240 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 241 | + basicConfigQuery.setYn(YnEnums.YES.getId()); | |
| 242 | + basicConfigQuery.setParentId(SystemConfig.HIGH_RISK_ID); | |
| 243 | +// basicConfigQuery.setEnable(1); | |
| 244 | + List<BasicConfig> basicConfigs = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 245 | + List<BasicConfig> basicConfigs1 = new ArrayList<>(); | |
| 246 | + if (CollectionUtils.isNotEmpty(basicConfigs)) { | |
| 247 | + for (BasicConfig basicConfig : basicConfigs) { | |
| 248 | + basicConfigQuery.setParentId(basicConfig.getId()); | |
| 249 | + List<BasicConfig> basicConfigs2 = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 250 | + if (CollectionUtils.isNotEmpty(basicConfigs2)) { | |
| 251 | + for (BasicConfig bc:basicConfigs2) { | |
| 252 | + bc.setColor("risk_"+ RiskDefaultTypeEnum.getColor(basicConfig.getName())); | |
| 253 | + } | |
| 254 | + basicConfigs1.addAll(basicConfigs2); | |
| 255 | + } | |
| 256 | + } | |
| 257 | + } | |
| 258 | + return basicConfigs1; | |
| 259 | + } | |
| 260 | + | |
| 261 | + | |
| 238 | 262 | private List convertToList(List<BasicConfig> list) { | 
| 239 | 263 | List data = new ArrayList<>(); | 
| 240 | 264 | for (BasicConfig basicConfig : list) { | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
View file @
b285df1
| ... | ... | @@ -662,7 +662,7 @@ | 
| 662 | 662 | * @return | 
| 663 | 663 | */ | 
| 664 | 664 | public BaseResponse womenGuildSms(WomenGuideSmsRequest request,Integer userId){ | 
| 665 | - String hospitalId = "216"; | |
| 665 | + String hospitalId = ""; | |
| 666 | 666 | //得到当前登录的医院id | 
| 667 | 667 | if (userId != null) { | 
| 668 | 668 | Users dbuser = usersService.getUsers(userId); | 
| ... | ... | @@ -671,6 +671,10 @@ | 
| 671 | 671 | } | 
| 672 | 672 | } | 
| 673 | 673 | |
| 674 | + if (StringUtils.isEmpty(hospitalId)){ | |
| 675 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("医院ID为空"); | |
| 676 | + } | |
| 677 | + | |
| 674 | 678 | //判断医院是否启动和对应的服务项是否启用 | 
| 675 | 679 | SmsConfigModel configModel = new SmsConfigModel(); | 
| 676 | 680 | BaseResponse response = smsConfigFacade.hospitalIsStart(hospitalId, configModel, SmsServiceEnums.YSGXHZD.getId()); | 
| ... | ... | @@ -702,7 +706,7 @@ | 
| 702 | 706 | MessageRequest mr = new MessageRequest(); | 
| 703 | 707 | String messagePrefix = smsConfigFacade.getSmsPrefix(configModel, model.getBuildDoctor()); | 
| 704 | 708 | mr.setContent("【" + messagePrefix + "】" + request.getSmsContent()); | 
| 705 | - mr.setObjType(Integer.valueOf(request.getType())); | |
| 709 | + mr.setObjType(ServiceObjEnums.FUNV.getId()); | |
| 706 | 710 | mr.setPhone(model.getPhone()); | 
| 707 | 711 | //短信商 | 
| 708 | 712 | mr.setServiceType(SmsProviderEnums.YM.getId()); |