Commit 63895466f6411f0eb4a211c9634f07693442c6d2
1 parent
385c38c218
Exists in
master
and in
1 other branch
儿童开通增值服务
Showing 12 changed files with 213 additions and 93 deletions
- platform-common/src/main/java/com/lyms/platform/common/enums/JoinEnums.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientServiceController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyBookbuildingAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBuildResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyPageResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientSerResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/BabyBuildSerToPatientSerWorker.java
platform-common/src/main/java/com/lyms/platform/common/enums/JoinEnums.java
View file @
6389546
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientServiceController.java
View file @
6389546
... | ... | @@ -68,7 +68,7 @@ |
68 | 68 | @RequestMapping(value = "/patSer", method = RequestMethod.GET) |
69 | 69 | public BaseResponse findPatientServiceList(String pid, HttpServletRequest request) { |
70 | 70 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
71 | - return patientServiceFacade.findPatientServiceList(pid, loginState.getId()); | |
71 | + return patientServiceFacade.findPatientServiceList(pid); | |
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
... | ... | @@ -115,6 +115,7 @@ |
115 | 115 | public BaseResponse findOnePatientService(@PathVariable String id) { |
116 | 116 | return patientServiceFacade.findOnePatientService(id); |
117 | 117 | } |
118 | + | |
118 | 119 | |
119 | 120 | /** |
120 | 121 | * 根据条件查询开通服务记录 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
6389546
... | ... | @@ -148,14 +148,12 @@ |
148 | 148 | |
149 | 149 | /** |
150 | 150 | * @param isSkip 是否增量添加 true:增量添加 |
151 | - * @param isZjzx 是否对增值服务,开通专家咨询服务 true:开通增值服务 | |
152 | 151 | * @return |
153 | 152 | */ |
154 | 153 | @RequestMapping(value = "/synBabyBuildToPatientService", method = RequestMethod.GET) |
155 | 154 | @ResponseBody |
156 | 155 | public BaseResponse synBabyBuildToPatientService( |
157 | - @RequestParam(value = "isSkip") boolean isSkip, | |
158 | - @RequestParam(value = "isZjzx") boolean isZjzx | |
156 | + @RequestParam(value = "isSkip") boolean isSkip | |
159 | 157 | ) { |
160 | 158 | BabyModelQuery babyQuery = new BabyModelQuery(); |
161 | 159 | List list = new ArrayList(); |
... | ... | @@ -184,7 +182,7 @@ |
184 | 182 | end = patientCount; |
185 | 183 | } |
186 | 184 | System.out.println("线程处理数据量:" + i + "--至--" + end); |
187 | - commonThreadPool.submit(new BabyBuildSerToPatientSerWorker(i, end, babyBookbuildingService, patientServiceService, isSkip, isZjzx, batchSize, patientCount)); | |
185 | + commonThreadPool.submit(new BabyBuildSerToPatientSerWorker(i, end, babyBookbuildingService, patientServiceService, isSkip, batchSize, patientCount)); | |
188 | 186 | } |
189 | 187 | BaseResponse baseResponse = new BaseResponse(); |
190 | 188 | baseResponse.setErrormsg("一共需要处理数据量:" + patientCount); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
6389546
... | ... | @@ -15,7 +15,6 @@ |
15 | 15 | import com.lyms.platform.common.result.BaseObjectResponse; |
16 | 16 | import com.lyms.platform.common.result.BaseResponse; |
17 | 17 | import com.lyms.platform.common.utils.*; |
18 | -import org.apache.commons.lang.math.NumberUtils; | |
19 | 18 | import com.lyms.platform.operate.web.request.BabyBookbuildingAddRequest; |
20 | 19 | import com.lyms.platform.operate.web.request.BabyGuideSmsequest; |
21 | 20 | import com.lyms.platform.operate.web.request.BabyManageRequest; |
... | ... | @@ -27,6 +26,7 @@ |
27 | 26 | import com.lyms.platform.operate.web.utils.MongoUtil; |
28 | 27 | import com.lyms.platform.permission.model.Organization; |
29 | 28 | import com.lyms.platform.permission.model.OrganizationQuery; |
29 | +import com.lyms.platform.permission.model.PatientService; | |
30 | 30 | import com.lyms.platform.permission.model.Users; |
31 | 31 | import com.lyms.platform.permission.service.CouponService; |
32 | 32 | import com.lyms.platform.permission.service.OrganizationService; |
... | ... | @@ -34,6 +34,7 @@ |
34 | 34 | import com.lyms.platform.pojo.*; |
35 | 35 | import com.lyms.platform.query.*; |
36 | 36 | import org.apache.commons.collections.CollectionUtils; |
37 | +import org.apache.commons.lang.math.NumberUtils; | |
37 | 38 | import org.springframework.beans.factory.annotation.Autowired; |
38 | 39 | import org.springframework.beans.factory.annotation.Qualifier; |
39 | 40 | import org.springframework.data.domain.Sort; |
... | ... | @@ -131,6 +132,8 @@ |
131 | 132 | @Autowired |
132 | 133 | private OperateLogFacade operateLogFacade; |
133 | 134 | |
135 | + @Autowired | |
136 | + private PatientServiceFacade patientServiceFacade; | |
134 | 137 | |
135 | 138 | @Autowired |
136 | 139 | @Qualifier("commonThreadPool") |
... | ... | @@ -414,7 +417,8 @@ |
414 | 417 | if (CollectionUtils.isNotEmpty(list)) { |
415 | 418 | BabyModel babyModel = list.get(0); |
416 | 419 | pid=babyModel.getPid(); |
417 | - if (!(babyModel.getServiceStatus() == ServiceStatusEnums.STANDARD_OPEN.getId() || babyModel.getServiceStatus() == ServiceStatusEnums.ADD_OPEN.getId())) { | |
420 | + //新版服务开通,修改建档不能修改服务 | |
421 | + /*if (!(babyModel.getServiceStatus() == ServiceStatusEnums.STANDARD_OPEN.getId() || babyModel.getServiceStatus() == ServiceStatusEnums.ADD_OPEN.getId())) { | |
418 | 422 | |
419 | 423 | if (babyModel.getServiceType() == ServiceTypeEnums.STANDARD_SERVICE.getId()) { |
420 | 424 | babyModel.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId()); |
... | ... | @@ -424,7 +428,7 @@ |
424 | 428 | |
425 | 429 | // createBuildSms(babyModel); |
426 | 430 | createBuildMsg(babyModel); |
427 | - } | |
431 | + }*/ | |
428 | 432 | } |
429 | 433 | |
430 | 434 | operateLogFacade.addModifyOptLog(userId, Integer.valueOf(model.getHospitalId()), list.get(0), model, OptActionEnums.UPDATE.getId(), "修改儿童建档"); |
... | ... | @@ -678,6 +682,8 @@ |
678 | 682 | model.setmHighRiskReason(request.getmHighRiskReason()); |
679 | 683 | model.setPid(babyPersonId); |
680 | 684 | model.setOperator(userId); |
685 | + | |
686 | + | |
681 | 687 | if (StringUtils.isNotEmpty(request.getMommyCertificateNum())) { |
682 | 688 | |
683 | 689 | String cardId = request.getMommyCertificateNum() + |
... | ... | @@ -700,6 +706,25 @@ |
700 | 706 | // String hospitalName = organizationService.getOrganization(Integer.valueOf(request.getHospitalId())).getName(); |
701 | 707 | |
702 | 708 | operateLogFacade.addAddOptLog(userId, Integer.valueOf(hid), model, OptActionEnums.ADD.getId(), "儿童建档"); |
709 | + //建档开通增值服务 | |
710 | + if (CollectionUtils.isNotEmpty(request.getSerInfos())) { | |
711 | + | |
712 | + PatientService patientService = new PatientService(); | |
713 | + patientService.setPerType(2); | |
714 | + patientService.setSerInfos(request.getSerInfos()); | |
715 | + patientService.setCreateUser(String.valueOf(userId)); | |
716 | + //开通日期与建档日期一致 | |
717 | + patientService.setCreateDate(DateUtil.parseYMD(request.getBuildDate())); | |
718 | + patientService.setParentid(model.getId()); | |
719 | + try { | |
720 | + patientServiceFacade.addPatientService(patientService, userId); | |
721 | + } catch (Exception e) { | |
722 | + System.out.println("儿童建档服务开通异常!"); | |
723 | + e.printStackTrace(); | |
724 | + } | |
725 | + } | |
726 | + | |
727 | + operateLogFacade.addAddOptLog(userId, Integer.valueOf(request.getHospitalId()), model, OptActionEnums.ADD.getId(), "儿童建档"); | |
703 | 728 | model = babyBookbuildingService.addBabyBookbuilding(model); |
704 | 729 | if (model == null || model.getId() == null) { |
705 | 730 | br.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR); |
706 | 731 | |
707 | 732 | |
... | ... | @@ -1150,15 +1175,31 @@ |
1150 | 1175 | } |
1151 | 1176 | |
1152 | 1177 | |
1153 | - bm.setServiceStatus(b.getServiceStatus()); | |
1178 | + // bm.setServiceStatus(b.getServiceStatus()); | |
1179 | + // bm.setServiceType(b.getServiceType()); | |
1154 | 1180 | |
1181 | + //建档开通增值服务,以前数据 | |
1182 | + if (CollectionUtils.isNotEmpty(b.getSerInfos())) { | |
1183 | + for (Map<String, String> serInfo : b.getSerInfos()) { | |
1184 | + //标准服务 | |
1185 | + if (Integer.parseInt(serInfo.get("serType")) == PatientSerEnums.SerTypeEnums.bzfw.getId()) { | |
1186 | + bm.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId()); | |
1187 | + bm.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId()); | |
1188 | + }else if(Integer.parseInt(serInfo.get("serType")) == PatientSerEnums.SerTypeEnums.yqjzzd.getId()){//增值服务:修改为孕期精准指导 | |
1189 | + bm.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId()); | |
1190 | + bm.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId()); | |
1191 | + break; | |
1192 | + } | |
1193 | + } | |
1194 | + } | |
1195 | + | |
1196 | + | |
1155 | 1197 | bm.setDueDate(DateUtil.parseYMD(b.getDueDate())); |
1156 | 1198 | bm.setDueType(b.getDueType()); |
1157 | 1199 | bm.setMalformation(b.getMalformation()); |
1158 | 1200 | bm.setDeliverOrg(b.getDeliverOrg()); |
1159 | 1201 | bm.setBuildDoctor(b.getBuildDoctor()); |
1160 | 1202 | bm.setBuildDate(DateUtil.parseYMD(b.getBuildDate())); |
1161 | - bm.setServiceType(b.getServiceType()); | |
1162 | 1203 | bm.setVcCardNo(b.getVcCardNo()); |
1163 | 1204 | bm.setHospitalId(b.getHospitalId()); |
1164 | 1205 | bm.setApgarScore(JsonUtil.obj2JsonString(b.getApgarScore())); |
... | ... | @@ -1237,7 +1278,9 @@ |
1237 | 1278 | if (models != null && models.size() > 0) { |
1238 | 1279 | BabyModel model = models.get(0); |
1239 | 1280 | result = getBabyBuildResult(model); |
1240 | - | |
1281 | + BaseResponse baseResponse = patientServiceFacade.findPatientServiceList(id); | |
1282 | + List<PatientSerResult> patientSerResults = (List<PatientSerResult>) baseResponse.getObject(); | |
1283 | + result.setPatientSerResults(patientSerResults); | |
1241 | 1284 | } |
1242 | 1285 | |
1243 | 1286 | /** 优惠券编号 */ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
6389546
... | ... | @@ -1290,7 +1290,7 @@ |
1290 | 1290 | result.setLastMenstrualPeriodBasisDoctorId(p.getLastMenstrualPeriodBasisDoctorId()); |
1291 | 1291 | } |
1292 | 1292 | |
1293 | - BaseResponse baseResponse = patientServiceFacade.findPatientServiceList(id,userId); | |
1293 | + BaseResponse baseResponse = patientServiceFacade.findPatientServiceList(id); | |
1294 | 1294 | List<PatientSerResult> patientSerResults = (List<PatientSerResult>) baseResponse.getObject(); |
1295 | 1295 | result.setPatientSerResults(patientSerResults); |
1296 | 1296 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
View file @
6389546
... | ... | @@ -4,10 +4,7 @@ |
4 | 4 | import com.lyms.platform.biz.service.CommonService; |
5 | 5 | import com.lyms.platform.biz.service.PatientsService; |
6 | 6 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
7 | -import com.lyms.platform.common.enums.OptActionEnums; | |
8 | -import com.lyms.platform.common.enums.PatientSerEnums; | |
9 | -import com.lyms.platform.common.enums.ServiceStatusEnums; | |
10 | -import com.lyms.platform.common.enums.ServiceTypeEnums; | |
7 | +import com.lyms.platform.common.enums.*; | |
11 | 8 | import com.lyms.platform.common.result.BaseListResponse; |
12 | 9 | import com.lyms.platform.common.result.BaseObjectResponse; |
13 | 10 | import com.lyms.platform.common.result.BaseResponse; |
14 | 11 | |
... | ... | @@ -116,10 +113,9 @@ |
116 | 113 | * 根据孕妇id查询服务记录 |
117 | 114 | * |
118 | 115 | * @param pid |
119 | - * @param id | |
120 | 116 | * @return |
121 | 117 | */ |
122 | - public BaseResponse findPatientServiceList(String pid, Integer id) { | |
118 | + public BaseResponse findPatientServiceList(String pid) { | |
123 | 119 | |
124 | 120 | //查询档案信息 |
125 | 121 | Patients patients = patientsService.findOnePatientById(pid); |
126 | 122 | |
... | ... | @@ -347,22 +343,31 @@ |
347 | 343 | } |
348 | 344 | PatientSerResult result = new PatientSerResult(); |
349 | 345 | result.setId(ps.getId()); |
350 | - Patients patients = patientsService.findOnePatientById(ps.getParentid()); | |
351 | - if (null != patients) { | |
352 | - String weekDesc = DateUtil.getWeekDesc(patients.getLastMenses(), new Date()); | |
353 | - result.setcDueWeek(weekDesc); | |
354 | - if (null != patients.getDueStatus() && 1 == patients.getDueStatus()) | |
355 | - result.setcDueWeek("终止妊娠"); | |
356 | - else if (patients.getType() == 3) { | |
357 | - result.setcDueWeek("已分娩"); | |
346 | + if(ps.getPerType()!=null&&ps.getPerType()==2){//儿童 | |
347 | + BabyModel model = babyService.getOneBabyById(ps.getParentid()); | |
348 | + result.setSex(model.getSex() == null ? "" : StringUtils.emptyDeal(SexEnum.getTextById(model.getSex()))); | |
349 | + result.setBabyName(StringUtils.emptyDeal(model.getName())); | |
350 | + result.setBirthday(StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getBirth()))); | |
351 | + result.setName(StringUtils.emptyDeal(model.getMname())); | |
352 | + result.setMonthAge(StringUtils.emptyDeal(DateUtil.getBabyMonthAge(model.getBirth(), new Date()))); | |
353 | + }else { | |
354 | + Patients patients = patientsService.findOnePatientById(ps.getParentid()); | |
355 | + if (null != patients) { | |
356 | + String weekDesc = DateUtil.getWeekDesc(patients.getLastMenses(), new Date()); | |
357 | + result.setcDueWeek(weekDesc); | |
358 | + if (null != patients.getDueStatus() && 1 == patients.getDueStatus()) | |
359 | + result.setcDueWeek("终止妊娠"); | |
360 | + else if (patients.getType() == 3) { | |
361 | + result.setcDueWeek("已分娩"); | |
362 | + } | |
363 | + result.setAge(DateUtil.getAge(patients.getBirth()) + "岁"); | |
364 | + result.setName(patients.getUsername()); | |
365 | + result.setDueDate(DateUtil.getyyyy_MM_dd(patients.getDueDate())); | |
366 | + //高危因素 | |
367 | + result.setRiskFactor(commonService.resloveFactor(patients.getRiskFactorId())); | |
368 | + //高危等级颜色 | |
369 | + result.setrLevel(commonService.findRiskLevel(patients.getRiskLevelId())); | |
358 | 370 | } |
359 | - result.setAge(DateUtil.getAge(patients.getBirth()) + "岁"); | |
360 | - result.setName(patients.getUsername()); | |
361 | - result.setDueDate(DateUtil.getyyyy_MM_dd(patients.getDueDate())); | |
362 | - //高危因素 | |
363 | - result.setRiskFactor(commonService.resloveFactor(patients.getRiskFactorId())); | |
364 | - //高危等级颜色 | |
365 | - result.setrLevel(commonService.findRiskLevel(patients.getRiskLevelId())); | |
366 | 371 | } |
367 | 372 | if (StringUtils.isNotEmpty(ps.getHospitalId())) {//查询医院名称 |
368 | 373 | //判断ID是否存在 |
... | ... | @@ -374,9 +379,13 @@ |
374 | 379 | } |
375 | 380 | if (StringUtils.isNotEmpty(ps.getUpdateUser())) { |
376 | 381 | try { |
377 | - Users users = usersService.getUsers(Integer.parseInt(ps.getUpdateUser())); | |
378 | - if (users != null) { | |
379 | - result.setUpdateUser(users.getName()); | |
382 | + if(StringUtils.isNum(ps.getUpdateUser())) { | |
383 | + Users users = usersService.getUsers(Integer.parseInt(ps.getUpdateUser())); | |
384 | + if (users != null) { | |
385 | + result.setUpdateUser(users.getName()); | |
386 | + } | |
387 | + }else{ | |
388 | + result.setUpdateUser("产检医生"); | |
380 | 389 | } |
381 | 390 | } catch (Exception e) { |
382 | 391 | result.setUpdateUser("产检医生"); |
... | ... | @@ -428,6 +437,7 @@ |
428 | 437 | return result; |
429 | 438 | } |
430 | 439 | |
440 | + | |
431 | 441 | /** |
432 | 442 | * 根据条件查询开通服务记录 |
433 | 443 | * |
... | ... | @@ -441,7 +451,7 @@ |
441 | 451 | * @return |
442 | 452 | */ |
443 | 453 | public BaseListResponse getPatientService(Integer serType,Integer perType, String serDoct, Date createStartDate, Date createEndDate, Integer serStatus, BasePageQueryRequest pageInfo, Integer id) { |
444 | -//根据用户id获取医院ID | |
454 | + //根据用户id获取医院ID | |
445 | 455 | String hospitalId = autoMatchFacade.getHospitalId(id); |
446 | 456 | PatientServiceQuery patientQuery = new PatientServiceQuery(); |
447 | 457 | patientQuery.setHospitalId(hospitalId); |
... | ... | @@ -785,6 +795,7 @@ |
785 | 795 | map.put("status", hospitalDoctService.getStatus()); |
786 | 796 | return map; |
787 | 797 | } |
798 | + | |
788 | 799 | |
789 | 800 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
6389546
... | ... | @@ -134,7 +134,7 @@ |
134 | 134 | map.put("lastMenses", DateUtil.getyyyy_MM_dd(data.getFuckLastMens())); |
135 | 135 | } |
136 | 136 | map.put("lastMenstrualPeriodBasisDoctorId", couponMapper.findUserName(data.getLastMenstrualPeriodBasisDoctorId())); |
137 | - BaseResponse baseResponse = patientServiceFacade.findPatientServiceList(id, 0); | |
137 | + BaseResponse baseResponse = patientServiceFacade.findPatientServiceList(id); | |
138 | 138 | List<PatientSerResult> patientSerResults = (List<PatientSerResult>) baseResponse.getObject(); |
139 | 139 | map.put("patientSerResults", patientSerResults); |
140 | 140 | //显示服务信息 |
... | ... | @@ -2944,6 +2944,10 @@ |
2944 | 2944 | List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); |
2945 | 2945 | if (models != null && models.size() > 0) { |
2946 | 2946 | BabyModel model = models.get(0); |
2947 | + | |
2948 | + BaseResponse baseResponse = patientServiceFacade.findPatientServiceList(id); | |
2949 | + List<PatientSerResult> patientSerResults = (List<PatientSerResult>) baseResponse.getObject(); | |
2950 | + result.setPatientSerResults(patientSerResults); | |
2947 | 2951 | |
2948 | 2952 | result = result.convertToResult(model); |
2949 | 2953 | result.setmHighRiskReason(mongoUtil.findNames(model.getmHighRiskReason())); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyBookbuildingAddRequest.java
View file @
6389546
... | ... | @@ -16,6 +16,19 @@ |
16 | 16 | // 儿童高危因素标记 |
17 | 17 | private List<String> babyHighRiskReason; |
18 | 18 | |
19 | + /** | |
20 | + * 服务信息 | |
21 | + */ | |
22 | + private List<Map<String,String>> serInfos; | |
23 | + | |
24 | + public List<Map<String, String>> getSerInfos() { | |
25 | + return serInfos; | |
26 | + } | |
27 | + | |
28 | + public void setSerInfos(List<Map<String, String>> serInfos) { | |
29 | + this.serInfos = serInfos; | |
30 | + } | |
31 | + | |
19 | 32 | public List<String> getBabyHighRiskReason() { |
20 | 33 | return babyHighRiskReason; |
21 | 34 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBuildResult.java
View file @
6389546
... | ... | @@ -22,6 +22,17 @@ |
22 | 22 | |
23 | 23 | private List mHighRiskReason2; |
24 | 24 | |
25 | + //显示服务信息 | |
26 | + private List<PatientSerResult> patientSerResults; | |
27 | + | |
28 | + public List<PatientSerResult> getPatientSerResults() { | |
29 | + return patientSerResults; | |
30 | + } | |
31 | + | |
32 | + public void setPatientSerResults(List<PatientSerResult> patientSerResults) { | |
33 | + this.patientSerResults = patientSerResults; | |
34 | + } | |
35 | + | |
25 | 36 | public List getmHighRiskReason2() { |
26 | 37 | return mHighRiskReason2; |
27 | 38 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyPageResult.java
View file @
6389546
... | ... | @@ -32,6 +32,9 @@ |
32 | 32 | // 母亲高危因素 |
33 | 33 | List<String> mHighRiskReason; |
34 | 34 | |
35 | + //显示服务信息 | |
36 | + private List<PatientSerResult> patientSerResults; | |
37 | + | |
35 | 38 | public List<String> getmHighRiskReason() { |
36 | 39 | return mHighRiskReason; |
37 | 40 | } |
... | ... | @@ -177,6 +180,14 @@ |
177 | 180 | private String blNo; |
178 | 181 | |
179 | 182 | private String couponCode; |
183 | + | |
184 | + public List<PatientSerResult> getPatientSerResults() { | |
185 | + return patientSerResults; | |
186 | + } | |
187 | + | |
188 | + public void setPatientSerResults(List<PatientSerResult> patientSerResults) { | |
189 | + this.patientSerResults = patientSerResults; | |
190 | + } | |
180 | 191 | |
181 | 192 | public String getId() { |
182 | 193 | return id; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientSerResult.java
View file @
6389546
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | public class PatientSerResult { |
12 | 12 | private String id; |
13 | 13 | /** |
14 | - * 孕妇id | |
14 | + * 孕妇id、儿童id | |
15 | 15 | */ |
16 | 16 | private String parentid; |
17 | 17 | /** |
18 | 18 | |
... | ... | @@ -21,13 +21,31 @@ |
21 | 21 | /** |
22 | 22 | * 孕妇姓名 |
23 | 23 | */ |
24 | - | |
25 | 24 | private String name; |
26 | 25 | /** |
27 | 26 | * 孕妇年龄 |
28 | 27 | */ |
29 | 28 | private String age; |
30 | 29 | /** |
30 | + * 儿童名称 | |
31 | + */ | |
32 | + | |
33 | + private String babyName; | |
34 | + /** | |
35 | + * 性别 | |
36 | + */ | |
37 | + private String sex; | |
38 | + /** | |
39 | + * 月龄 | |
40 | + */ | |
41 | + private String monthAge; | |
42 | + | |
43 | + /** | |
44 | + * 出生日期 | |
45 | + */ | |
46 | + private String birthday; | |
47 | + | |
48 | + /** | |
31 | 49 | * 当前孕周 |
32 | 50 | */ |
33 | 51 | private String cDueWeek; |
... | ... | @@ -100,6 +118,38 @@ |
100 | 118 | * 退款人 |
101 | 119 | */ |
102 | 120 | private String backUser; |
121 | + | |
122 | + public String getSex() { | |
123 | + return sex; | |
124 | + } | |
125 | + | |
126 | + public void setSex(String sex) { | |
127 | + this.sex = sex; | |
128 | + } | |
129 | + | |
130 | + public String getBabyName() { | |
131 | + return babyName; | |
132 | + } | |
133 | + | |
134 | + public void setBabyName(String babyName) { | |
135 | + this.babyName = babyName; | |
136 | + } | |
137 | + | |
138 | + public String getMonthAge() { | |
139 | + return monthAge; | |
140 | + } | |
141 | + | |
142 | + public void setMonthAge(String monthAge) { | |
143 | + this.monthAge = monthAge; | |
144 | + } | |
145 | + | |
146 | + public String getBirthday() { | |
147 | + return birthday; | |
148 | + } | |
149 | + | |
150 | + public void setBirthday(String birthday) { | |
151 | + this.birthday = birthday; | |
152 | + } | |
103 | 153 | |
104 | 154 | public String getHospitalName() { |
105 | 155 | return hospitalName; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/BabyBuildSerToPatientSerWorker.java
View file @
6389546
... | ... | @@ -27,18 +27,16 @@ |
27 | 27 | private int batchSize; |
28 | 28 | private int allCount; |
29 | 29 | private boolean isSkip; |
30 | - private boolean isZjzx; | |
31 | 30 | private BabyBookbuildingService babyBookbuildingService; |
32 | 31 | private PatientServiceService patientServiceService; |
33 | 32 | |
34 | - public BabyBuildSerToPatientSerWorker(int startIndex, int endIndex, BabyBookbuildingService babyBookbuildingService, PatientServiceService patientServiceService, boolean isSkip, boolean isZjzx, int batchSize, int allCount) { | |
33 | + public BabyBuildSerToPatientSerWorker(int startIndex, int endIndex, BabyBookbuildingService babyBookbuildingService, PatientServiceService patientServiceService, boolean isSkip, int batchSize, int allCount) { | |
35 | 34 | this.allCount = allCount; |
36 | 35 | this.startIndex = startIndex; |
37 | 36 | this.endIndex = endIndex; |
38 | 37 | this.babyBookbuildingService = babyBookbuildingService; |
39 | 38 | this.patientServiceService = patientServiceService; |
40 | 39 | this.isSkip = isSkip; |
41 | - this.isZjzx = isZjzx; | |
42 | 40 | if (batchSize >= 1000) { |
43 | 41 | this.batchSize = 1000; |
44 | 42 | } else { |
... | ... | @@ -67,6 +65,7 @@ |
67 | 65 | buildType.add(2);//产妇分娩建档 |
68 | 66 | babyQuery.setBuildTypeList(buildType); |
69 | 67 | babyQuery.setYn(YnEnums.YES.getId()); |
68 | + babyQuery.setNeed("need"); | |
70 | 69 | |
71 | 70 | babyQuery.setLimit(batchSize); |
72 | 71 | babyQuery.setPage((i + batchSize) / batchSize); |
73 | 72 | |
... | ... | @@ -92,51 +91,18 @@ |
92 | 91 | pser.setPerType(2); |
93 | 92 | |
94 | 93 | //服务类型 |
95 | - if (pt.getServiceType() == ServiceTypeEnums.STANDARD_SERVICE.getId()) {//标准服务 | |
96 | - pser.setSerType(PatientSerEnums.SerTypeEnums.bzfw.getId()); | |
97 | - //标准服务状态转换成服务状态 | |
98 | - convertBZFWtoPserStatus(pt,pser); | |
99 | - | |
100 | - } else if (pt.getServiceType() == ServiceTypeEnums.ADD_SERVICE.getId()) {//增值服务 | |
101 | - //孕期精准指导 | |
94 | + if (pt.getServiceType() == ServiceTypeEnums.ADD_SERVICE.getId()) {//增值服务 | |
95 | + //精准指导 | |
102 | 96 | pser.setSerType(PatientSerEnums.SerTypeEnums.yqjzzd.getId()); |
103 | 97 | //增值服务有服务医生 |
104 | 98 | pser.setSerDoct(pt.getBuildDoctor()); |
105 | 99 | |
106 | 100 | //增值服务状态转换为服务状态 |
107 | 101 | convertZZFWtoPserStatus(pt, pser); |
108 | - if (isZjzx) {//增值服务是否:开通专家咨询服务 | |
109 | - //开通专家咨询服务 | |
110 | - PatientService pser2 = new PatientService(); | |
111 | - // 服务人类型(1-孕妇、2-儿童) | |
112 | - pser2.setPerType(2); | |
113 | - //数据转换 | |
114 | - convertPatient(pt, pser2); | |
115 | - //增值服务状态转换为服务状态 | |
116 | - convertZZFWtoPserStatus(pt, pser2); | |
117 | - | |
118 | - //专家咨询服务 | |
119 | - pser2.setSerType(PatientSerEnums.SerTypeEnums.zjzx.getId()); | |
120 | - if (isSkip) {//是否是增量 | |
121 | - PatientServiceQuery patientQuery = new PatientServiceQuery(); | |
122 | - patientQuery.setParentid(pt.getId()); | |
123 | - patientQuery.setSerType(pser2.getSerType()); | |
124 | - | |
125 | - List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); | |
126 | - if (CollectionUtils.isEmpty(patientServices)) { | |
127 | - //增值服务数据转换 | |
128 | - convertPatient(pt, pser2); | |
129 | - //增值服务有服务医生 | |
130 | - pser2.setSerDoct(pt.getBuildDoctor()); | |
131 | - patientServiceService.addPatientService(pser2); | |
132 | - } | |
133 | - } else { | |
134 | - convertPatient(pt, pser2); | |
135 | - //增值服务有服务医生 | |
136 | - pser2.setSerDoct(pt.getBuildDoctor()); | |
137 | - patientServiceService.addPatientService(pser2); | |
138 | - } | |
139 | - } | |
102 | + }else{//标准服务 | |
103 | + pser.setSerType(PatientSerEnums.SerTypeEnums.bzfw.getId()); | |
104 | + //标准服务状态转换成服务状态 | |
105 | + convertBZFWtoPserStatus(pt,pser); | |
140 | 106 | } |
141 | 107 | |
142 | 108 | convertPatient(pt,pser); |
... | ... | @@ -166,7 +132,16 @@ |
166 | 132 | public void convertPatient(BabyModel pt, PatientService pser2) { |
167 | 133 | pser2.setIsOld(1); |
168 | 134 | pser2.setCreateUser(pt.getBuildDoctor()); |
169 | - pser2.setCreateDate(pt.getBuildDate()); | |
135 | + if(pt.getBuildDate()!=null){ | |
136 | + pser2.setCreateDate(pt.getBuildDate()); | |
137 | + }else{ | |
138 | + pser2.setCreateDate(new Date()); | |
139 | + } //服务开通操作时间 | |
140 | + if(pt.getBuildDate()!=null){ | |
141 | + pser2.setUpdateDate(pt.getBuildDate()); | |
142 | + }else{ | |
143 | + pser2.setUpdateDate(new Date()); | |
144 | + } | |
170 | 145 | pser2.setParentid(pt.getId()); |
171 | 146 | pser2.setPid(pt.getPid()); |
172 | 147 | pser2.setId(UUID.randomUUID().toString().replace("-", "")); |
173 | 148 | |
... | ... | @@ -177,17 +152,12 @@ |
177 | 152 | pser2.setSynStatus(1); |
178 | 153 | //领取时间 |
179 | 154 | // pser.setReceiveDate(new Date()); |
180 | - //服务开通操作时间 | |
181 | - pser2.setUpdateDate(pt.getBuildDate()); | |
155 | + | |
182 | 156 | //服务开通操作人 |
183 | 157 | pser2.setUpdateUser(pt.getBuildDoctor()); |
184 | 158 | } |
185 | 159 | |
186 | 160 | public void convertZZFWtoPserStatus(BabyModel pt, PatientService pser) { |
187 | - if(pt.getServiceStatus() == null){ | |
188 | - System.out.println("增值服务没有服务状态:"+pt.getId()); | |
189 | - } | |
190 | - | |
191 | 161 | if (pt.getServiceStatus() == ServiceStatusEnums.ADD_OPEN.getId()) { |
192 | 162 | pser.setSerStatus(PatientSerEnums.SerStatusEnums.kt.getId()); |
193 | 163 | } else if (pt.getServiceStatus() == ServiceStatusEnums.UNSUBSCRIBE.getId()) { |
194 | 164 | |
195 | 165 | |
196 | 166 | |
... | ... | @@ -197,12 +167,14 @@ |
197 | 167 | } else if (pt.getServiceStatus() == ServiceStatusEnums.SUSPEND.getId()) { |
198 | 168 | pser.setSerStatus(PatientSerEnums.SerStatusEnums.zt.getId()); |
199 | 169 | } |
200 | - } | |
201 | 170 | |
202 | - public void convertBZFWtoPserStatus(BabyModel pt, PatientService pser) { | |
203 | - if(pt.getServiceStatus() == null){ | |
171 | + if(pser.getSerStatus() == null){ | |
204 | 172 | System.out.println("增值服务没有服务状态:"+pt.getId()); |
173 | + pser.setSerStatus(PatientSerEnums.SerStatusEnums.gq.getId()); | |
205 | 174 | } |
175 | + } | |
176 | + | |
177 | + public void convertBZFWtoPserStatus(BabyModel pt, PatientService pser) { | |
206 | 178 | //默认开通状态 |
207 | 179 | if (pt.getServiceStatus() == ServiceStatusEnums.STANDARD_OPEN.getId()) { |
208 | 180 | pser.setSerStatus(PatientSerEnums.SerStatusEnums.kt.getId()); |
... | ... | @@ -210,6 +182,11 @@ |
210 | 182 | pser.setSerStatus(PatientSerEnums.SerStatusEnums.td.getId()); |
211 | 183 | } else if (pt.getServiceStatus() == ServiceStatusEnums.STANDARD_OVERDUE.getId()) { |
212 | 184 | pser.setSerStatus(PatientSerEnums.SerStatusEnums.gq.getId()); |
185 | + } | |
186 | + | |
187 | + if(pser.getSerStatus() == null){ | |
188 | + System.out.println("标准服务没有服务状态:"+pt.getId()); | |
189 | + pser.setSerStatus(PatientSerEnums.SerStatusEnums.kt.getId()); | |
213 | 190 | } |
214 | 191 | |
215 | 192 | } |