Commit e5c881adf437488fcd23960726fa123baed88795
1 parent
5e89e3be89
Exists in
master
and in
6 other branches
结算管理
Showing 7 changed files with 52 additions and 15 deletions
- platform-msg-generate/src/main/java/com/lyms/platform/msg/service/impl/MsgGenerateServiceImpl.java
- platform-msg-generate/src/main/java/com/lyms/platform/msg/worker/YunAmsMsgGenerateWorker.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BloodPressureController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IBloodPressureService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
platform-msg-generate/src/main/java/com/lyms/platform/msg/service/impl/MsgGenerateServiceImpl.java
View file @
e5c881a
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | import com.lyms.platform.permission.service.BabyPatientExtendEarFollowUpService; |
| 13 | 13 | import com.lyms.platform.permission.service.BabyPatientExtendEarHearingDiagnoseService; |
| 14 | 14 | import com.lyms.platform.permission.service.BabyPatientExtendEarScreenService; |
| 15 | +import com.lyms.platform.permission.service.PatientServiceService; | |
| 15 | 16 | import com.lyms.platform.pojo.BasicConfig; |
| 16 | 17 | import com.lyms.platform.pojo.CourseModel; |
| 17 | 18 | import com.lyms.platform.pojo.SmsConfigModel; |
| 18 | 19 | |
| ... | ... | @@ -78,7 +79,10 @@ |
| 78 | 79 | @Autowired |
| 79 | 80 | private BasicConfigService basicConfigService; |
| 80 | 81 | |
| 82 | + @Autowired | |
| 83 | + private PatientServiceService patientServiceService; | |
| 81 | 84 | |
| 85 | + | |
| 82 | 86 | /** |
| 83 | 87 | * 生成孕妇的AMS推送消息 |
| 84 | 88 | * @param generateHospitalId 医院id |
| ... | ... | @@ -97,7 +101,7 @@ |
| 97 | 101 | end = configModels.size(); |
| 98 | 102 | } |
| 99 | 103 | YunAmsMsgGenerateWorker checkPointCountWorker = new YunAmsMsgGenerateWorker(configModels.subList(i,end), |
| 100 | - baseService,yunBookbuildingService,week,highRiskService); | |
| 104 | + baseService,yunBookbuildingService,week,highRiskService, patientServiceService); | |
| 101 | 105 | pool.execute(checkPointCountWorker); |
| 102 | 106 | } |
| 103 | 107 |
platform-msg-generate/src/main/java/com/lyms/platform/msg/worker/YunAmsMsgGenerateWorker.java
View file @
e5c881a
| ... | ... | @@ -13,6 +13,9 @@ |
| 13 | 13 | import com.lyms.platform.msg.service.IBaseService; |
| 14 | 14 | import com.lyms.platform.msg.utils.DateUtils; |
| 15 | 15 | import com.lyms.platform.msg.utils.HelperUtils; |
| 16 | +import com.lyms.platform.permission.model.PatientService; | |
| 17 | +import com.lyms.platform.permission.model.PatientServiceQuery; | |
| 18 | +import com.lyms.platform.permission.service.PatientServiceService; | |
| 16 | 19 | import com.lyms.platform.pojo.HighRiskSmsModel; |
| 17 | 20 | import com.lyms.platform.pojo.Patients; |
| 18 | 21 | import com.lyms.platform.pojo.SmsConfigModel; |
| 19 | 22 | |
| ... | ... | @@ -43,10 +46,11 @@ |
| 43 | 46 | private String week; |
| 44 | 47 | |
| 45 | 48 | private HighRiskService highRiskService; |
| 49 | + private PatientServiceService patientServiceService; | |
| 46 | 50 | |
| 47 | 51 | public YunAmsMsgGenerateWorker(List<SmsConfigModel> configs,IBaseService baseService, |
| 48 | 52 | YunBookbuildingService yunBookbuildingService, |
| 49 | - String week,HighRiskService highRiskService) | |
| 53 | + String week,HighRiskService highRiskService,PatientServiceService patientServiceService) | |
| 50 | 54 | { |
| 51 | 55 | this.configs = configs; |
| 52 | 56 | this.baseService = baseService; |
| ... | ... | @@ -242,6 +246,9 @@ |
| 242 | 246 | List<MessageContent> messageContents = amsSmses.get(yunWeek); |
| 243 | 247 | |
| 244 | 248 | if (CollectionUtils.isNotEmpty(messageContents) && serviceYbzd > 0) { |
| 249 | + | |
| 250 | + String serDoct = getDoctorId(pat.getId()); | |
| 251 | + | |
| 245 | 252 | for (MessageContent message : messageContents) { |
| 246 | 253 | //判断当前短信是否已经发送 通过短信ID和孕妇ID |
| 247 | 254 | boolean isExist = SaveMessageService.isExistMsg(pat.getId(), message.getId()); |
| ... | ... | @@ -255,7 +262,7 @@ |
| 255 | 262 | String messageContent = "【" + messagePrefix + "】" + message.getContent(); |
| 256 | 263 | MsgRequest request = HelperUtils.getMessageRequest(messageContent, pat.getPhone(), |
| 257 | 264 | ServiceObjEnums.YUNOBJ.getId(), SmsServiceEnums.YBZD.getId(), |
| 258 | - pat.getHospitalId(), message.getId(), pat.getId(), weekDay, title, "", | |
| 265 | + pat.getHospitalId(), message.getId(), pat.getId(), weekDay, title,serDoct, | |
| 259 | 266 | WxTempleteIdEnums.YUN_YI_BAN_ZHI_DAO.getId(), serviceYbzd); |
| 260 | 267 | |
| 261 | 268 | messages.add(request); |
| ... | ... | @@ -268,6 +275,19 @@ |
| 268 | 275 | } |
| 269 | 276 | } |
| 270 | 277 | } |
| 278 | + } | |
| 279 | + | |
| 280 | + public String getDoctorId(String patientId) | |
| 281 | + { | |
| 282 | + PatientServiceQuery patientQuery = new PatientServiceQuery(); | |
| 283 | + patientQuery.setSerType(PatientSerEnums.SerTypeEnums.yqjzzd.getId()); | |
| 284 | + List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); | |
| 285 | + if (CollectionUtils.isNotEmpty(patientServices)) | |
| 286 | + { | |
| 287 | + String serDoct = patientServices.get(0).getSerDoct(); | |
| 288 | + return serDoct == null ? "" : serDoct; | |
| 289 | + } | |
| 290 | + return ""; | |
| 271 | 291 | } |
| 272 | 292 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BloodPressureController.java
View file @
e5c881a
| ... | ... | @@ -145,11 +145,12 @@ |
| 145 | 145 | //血压报告 |
| 146 | 146 | @ResponseBody |
| 147 | 147 | @RequestMapping(value = "/getXyPresentation/{bloodId}", method = RequestMethod.GET) |
| 148 | - public BaseResponse getXyPresentation(@PathVariable String bloodId) { | |
| 148 | + @TokenRequired | |
| 149 | + public BaseResponse getXyPresentation(@PathVariable String bloodId,HttpServletRequest request) { | |
| 149 | 150 | if (StringUtils.isEmpty(bloodId) || "null".equals(bloodId)) { |
| 150 | 151 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("bloodId参数不能为空"); |
| 151 | 152 | } |
| 152 | - return bloodPressureService.getXyPresentation(bloodId); | |
| 153 | + return bloodPressureService.getXyPresentation(bloodId,getUserId(request)); | |
| 153 | 154 | } |
| 154 | 155 | |
| 155 | 156 | @Autowired |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IBloodPressureService.java
View file @
e5c881a
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
View file @
e5c881a
| ... | ... | @@ -15,10 +15,7 @@ |
| 15 | 15 | import com.lyms.platform.common.result.RespBuilder; |
| 16 | 16 | import com.lyms.platform.common.utils.DateUtil; |
| 17 | 17 | import com.lyms.platform.common.utils.StringUtils; |
| 18 | -import com.lyms.platform.operate.web.facade.AccessPermissionFacade; | |
| 19 | -import com.lyms.platform.operate.web.facade.AutoMatchFacade; | |
| 20 | -import com.lyms.platform.operate.web.facade.OrganizationGroupsFacade; | |
| 21 | -import com.lyms.platform.operate.web.facade.SmsConfigFacade; | |
| 18 | +import com.lyms.platform.operate.web.facade.*; | |
| 22 | 19 | import com.lyms.platform.operate.web.service.IBloodPressureService; |
| 23 | 20 | import com.lyms.platform.operate.web.service.PatientWeightService; |
| 24 | 21 | import com.lyms.platform.operate.web.utils.CollectionUtils; |
| ... | ... | @@ -73,6 +70,9 @@ |
| 73 | 70 | @Autowired |
| 74 | 71 | private PatientWeightService patientWeightService; |
| 75 | 72 | |
| 73 | + @Autowired | |
| 74 | + private HealthChargeFacade healthChargeFacade; | |
| 75 | + | |
| 76 | 76 | private static Map<String, String> typeGuideMap = new HashMap<>(); |
| 77 | 77 | |
| 78 | 78 | static { |
| ... | ... | @@ -677,7 +677,7 @@ |
| 677 | 677 | } |
| 678 | 678 | |
| 679 | 679 | @Override |
| 680 | - public BaseResponse getXyPresentation(String bloodId) { | |
| 680 | + public BaseResponse getXyPresentation(String bloodId,Integer userId) { | |
| 681 | 681 | //1.通过血压ID 查询到pnationId |
| 682 | 682 | Map<String, Object> datas = new HashMap<>(); |
| 683 | 683 | Map<String, Map<Integer, Double>> series = new HashMap<>(); |
| ... | ... | @@ -790,6 +790,8 @@ |
| 790 | 790 | } |
| 791 | 791 | datas.put("motion", motionList); |
| 792 | 792 | } |
| 793 | + | |
| 794 | + healthChargeFacade.addHealthCharge(bloodPressure.getHospitalId(),3,bloodPressure.getParentId(),1,1,userId); | |
| 793 | 795 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(datas); |
| 794 | 796 | } else { |
| 795 | 797 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("失败").setData("请检查数据是否填写完整!"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
e5c881a
| ... | ... | @@ -93,7 +93,11 @@ |
| 93 | 93 | @Autowired |
| 94 | 94 | private PatientWeightService patientWeightService; |
| 95 | 95 | |
| 96 | + | |
| 96 | 97 | @Autowired |
| 98 | + private HealthChargeFacade healthChargeFacade; | |
| 99 | + | |
| 100 | + @Autowired | |
| 97 | 101 | private UsersService usersService; |
| 98 | 102 | |
| 99 | 103 | public BaseResponse add(Integer userId, BloodSugar bloodSugar) { |
| ... | ... | @@ -1257,6 +1261,9 @@ |
| 1257 | 1261 | weekRange = "3"; |
| 1258 | 1262 | } |
| 1259 | 1263 | data.put("weekRange",weekRange); |
| 1264 | + | |
| 1265 | + | |
| 1266 | + healthChargeFacade.addHealthCharge(hospitalId, 2, patientId, 1, 1, userId); | |
| 1260 | 1267 | |
| 1261 | 1268 | resp.setData(data); |
| 1262 | 1269 | resp.setErrorcode(ResponseCode.SUCCESS.getCode()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
e5c881a
| ... | ... | @@ -9,10 +9,7 @@ |
| 9 | 9 | import com.lyms.platform.common.enums.*; |
| 10 | 10 | import com.lyms.platform.common.result.*; |
| 11 | 11 | import com.lyms.platform.common.utils.*; |
| 12 | -import com.lyms.platform.operate.web.facade.AutoMatchFacade; | |
| 13 | -import com.lyms.platform.operate.web.facade.OperateLogFacade; | |
| 14 | -import com.lyms.platform.operate.web.facade.OrganizationGroupsFacade; | |
| 15 | -import com.lyms.platform.operate.web.facade.SmsConfigFacade; | |
| 12 | +import com.lyms.platform.operate.web.facade.*; | |
| 16 | 13 | import com.lyms.platform.operate.web.service.PatientWeightService; |
| 17 | 14 | import com.lyms.platform.operate.web.utils.CollectionUtils; |
| 18 | 15 | import com.lyms.platform.operate.web.utils.MathUtil; |
| 19 | 16 | |
| ... | ... | @@ -96,7 +93,10 @@ |
| 96 | 93 | /*@Autowired |
| 97 | 94 | private PatientWeightService patientWeightService;*/ |
| 98 | 95 | |
| 96 | + @Autowired | |
| 97 | + private HealthChargeFacade healthChargeFacade; | |
| 99 | 98 | |
| 99 | + | |
| 100 | 100 | /** |
| 101 | 101 | * 最低:0~13 : 0~1.9 13~40 1.9~11.9 |
| 102 | 102 | * 最高: 0~2.2 2.2~15.9 |
| ... | ... | @@ -662,6 +662,9 @@ |
| 662 | 662 | } |
| 663 | 663 | setReport(map, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic()); |
| 664 | 664 | CollectionUtils.removeNullValue(map); |
| 665 | + | |
| 666 | + | |
| 667 | + healthChargeFacade.addHealthCharge(hospitalId,1,patientWeight.getPatientId(),1,1,userId); | |
| 665 | 668 | return RespBuilder.buildSuccess(map); |
| 666 | 669 | } |
| 667 | 670 | return RespBuilder.buildSuccess(); |