Commit 76f55cee02ca04a03eefb01becbccbdf30c38f80
1 parent
29846d9e92
Exists in
master
and in
6 other branches
结算管理
Showing 3 changed files with 38 additions and 7 deletions
platform-msg-generate/src/main/java/com/lyms/platform/msg/worker/CourseMsgGenerateWorker.java
View file @
76f55ce
| ... | ... | @@ -156,12 +156,18 @@ | 
| 156 | 156 | String courseTime = DateUtils.getDateStr(course.getCourseTime(),DateUtils.Y_M_D_H_M)+" ("+DateUtils.getWeekOfDate(course.getCourseTime())+")"; | 
| 157 | 157 | |
| 158 | 158 | String messageContent = "【"+messagePrefix+"】有新的孕妇学校课程发布啦,点击详情进一步了解和报名啦。"; | 
| 159 | +// MsgRequest request = HelperUtils.getMessageRequest(messageContent, pat.getPhone(), | |
| 160 | +// ServiceObjEnums.YUNOBJ.getId(), SmsServiceEnums.YFXXKCTX.getId(), | |
| 161 | +// course.getHospitalId(), course.getId(), pat.getId(), course.getCourseName(), | |
| 162 | +// course.getCourseSpeaker(), courseTime, | |
| 163 | +// WxTempleteIdEnums.YUN_XUE_KE_CHEN_TX.getId(),service,SmsTimeTypeEnums.ONTIME.getId()); | |
| 164 | + | |
| 165 | + | |
| 159 | 166 | MsgRequest request = HelperUtils.getMessageRequest(messageContent, pat.getPhone(), | 
| 160 | 167 | ServiceObjEnums.YUNOBJ.getId(), SmsServiceEnums.YFXXKCTX.getId(), | 
| 161 | 168 | course.getHospitalId(), course.getId(), pat.getId(), course.getCourseName(), | 
| 162 | - course.getCourseSpeaker(), courseTime, | |
| 169 | + courseTime, course.getCourseSpeaker(), | |
| 163 | 170 | WxTempleteIdEnums.YUN_XUE_KE_CHEN_TX.getId(),service,SmsTimeTypeEnums.ONTIME.getId()); | 
| 164 | - | |
| 165 | 171 | messages.add(request); | 
| 166 | 172 | } | 
| 167 | 173 | } | 
platform-msg-generate/src/main/java/com/lyms/platform/msg/worker/YunAmsMsgGenerateWorker.java
View file @
76f55ce
| ... | ... | @@ -5,6 +5,7 @@ | 
| 5 | 5 | import com.lyms.platform.biz.service.HighRiskService; | 
| 6 | 6 | import com.lyms.platform.biz.service.YunBookbuildingService; | 
| 7 | 7 | import com.lyms.platform.common.enums.*; | 
| 8 | +import com.lyms.platform.common.utils.DateUtil; | |
| 8 | 9 | import com.lyms.platform.common.utils.JsonUtil; | 
| 9 | 10 | import com.lyms.platform.common.utils.StringUtils; | 
| 10 | 11 | import com.lyms.platform.msg.model.MessageContent; | 
| ... | ... | @@ -216,6 +217,9 @@ | 
| 216 | 217 | } | 
| 217 | 218 | } | 
| 218 | 219 | if (highRiskContents.size() > 0) { | 
| 220 | + | |
| 221 | + String serDoct = getServiceDoctorId(pat.getId()); | |
| 222 | + | |
| 219 | 223 | for (String riskName : highRiskContents.keySet()) { | 
| 220 | 224 | MessageContent message = highRiskContents.get(riskName); | 
| 221 | 225 | String weekDay = HelperUtils.getYunWeekDay(pat.getLastMenses()); | 
| ... | ... | @@ -224,7 +228,7 @@ | 
| 224 | 228 | String messageContent = "【" + messagePrefix + "】" + message.getContent(); | 
| 225 | 229 | MsgRequest request = HelperUtils.getMessageRequest(messageContent, pat.getPhone(), | 
| 226 | 230 | ServiceObjEnums.YUNOBJ.getId(), SmsServiceEnums.GWZD.getId(), | 
| 227 | - pat.getHospitalId(), message.getId(), pat.getId(), weekDay, title, "", | |
| 231 | + pat.getHospitalId(), message.getId(), pat.getId(), weekDay, title, serDoct, | |
| 228 | 232 | WxTempleteIdEnums.GAO_WEI_ZHI_DAO.getId(), serviceGwzd); | 
| 229 | 233 | |
| 230 | 234 | messages.add(request); | 
| ... | ... | @@ -247,7 +251,7 @@ | 
| 247 | 251 | |
| 248 | 252 | if (CollectionUtils.isNotEmpty(messageContents) && serviceYbzd > 0) { | 
| 249 | 253 | |
| 250 | - String serDoct = getDoctorId(pat.getId()); | |
| 254 | + String serDoct = getServiceDoctorId(pat.getId()); | |
| 251 | 255 | |
| 252 | 256 | for (MessageContent message : messageContents) { | 
| 253 | 257 | //判断当前短信是否已经发送 通过短信ID和孕妇ID | 
| 254 | 258 | |
| 255 | 259 | |
| ... | ... | @@ -277,15 +281,34 @@ | 
| 277 | 281 | } | 
| 278 | 282 | } | 
| 279 | 283 | |
| 280 | - public String getDoctorId(String patientId) | |
| 284 | + /** | |
| 285 | + * 获取开通服务的医生id | |
| 286 | + * @param patientId | |
| 287 | + * @return | |
| 288 | + */ | |
| 289 | + public String getServiceDoctorId(String patientId) | |
| 281 | 290 | { | 
| 282 | 291 | PatientServiceQuery patientQuery = new PatientServiceQuery(); | 
| 283 | 292 | patientQuery.setSerType(PatientSerEnums.SerTypeEnums.yqjzzd.getId()); | 
| 293 | + patientQuery.setParentid(patientId); | |
| 284 | 294 | List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); | 
| 285 | 295 | if (CollectionUtils.isNotEmpty(patientServices)) | 
| 286 | 296 | { | 
| 287 | - String serDoct = patientServices.get(0).getSerDoct(); | |
| 288 | - return serDoct == null ? "" : serDoct; | |
| 297 | + PatientService patientService = patientServices.get(0); | |
| 298 | + if (patientService != null) | |
| 299 | + { | |
| 300 | + if (patientService.getDocEndTime() != null) | |
| 301 | + { | |
| 302 | + if (patientService.getDocEndTime().getTime() > new Date().getTime()) | |
| 303 | + { | |
| 304 | + return patientService.getSerDoct() == null ? "" : patientService.getSerDoct(); | |
| 305 | + } | |
| 306 | + } | |
| 307 | + else | |
| 308 | + { | |
| 309 | + return patientService.getSerDoct() == null ? "" : patientService.getSerDoct(); | |
| 310 | + } | |
| 311 | + } | |
| 289 | 312 | } | 
| 290 | 313 | return ""; | 
| 291 | 314 | } | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
76f55ce
| ... | ... | @@ -2102,6 +2102,8 @@ | 
| 2102 | 2102 | if (datas.containsKey("3") && datas.containsKey("8")) { | 
| 2103 | 2103 | datas.put("2", datas.get("8")); | 
| 2104 | 2104 | } | 
| 2105 | + | |
| 2106 | + healthChargeFacade.addHealthCharge(patientWeight.getHospitalId(),2,patientWeight.getPatientId(),1,1,userId); | |
| 2105 | 2107 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(this.getFirstOrNull(datas)); | 
| 2106 | 2108 | } | 
| 2107 | 2109 |