Commit b4c86cb7ae38ab850d2375c57863b94a2f602035
1 parent
a29e6a3b5b
Exists in
master
and in
6 other branches
建档增加服务开通
Showing 6 changed files with 137 additions and 74 deletions
- platform-common/src/main/java/com/lyms/platform/common/enums/PatientSerEnums.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.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/PatientServiceSysFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PregnantInfoResult.java
platform-common/src/main/java/com/lyms/platform/common/enums/PatientSerEnums.java
View file @
b4c86cb
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java
View file @
b4c86cb
... | ... | @@ -18,7 +18,6 @@ |
18 | 18 | import com.lyms.platform.operate.web.request.BookbuildingQueryRequest; |
19 | 19 | import com.lyms.platform.operate.web.request.YunBookbuildingAddRequest; |
20 | 20 | import com.lyms.platform.permission.service.CouponService; |
21 | -import com.lyms.platform.pojo.Patients; | |
22 | 21 | import org.apache.commons.httpclient.HttpClient; |
23 | 22 | import org.springframework.beans.factory.annotation.Autowired; |
24 | 23 | import org.springframework.data.mongodb.core.MongoTemplate; |
... | ... | @@ -156,8 +155,10 @@ |
156 | 155 | */ |
157 | 156 | @RequestMapping(value = "/queryPregnantBuildById/{id}", method = RequestMethod.GET) |
158 | 157 | @ResponseBody |
159 | - public BaseObjectResponse queryPregnantBuildRecord(@PathVariable("id")String id){ | |
160 | - BaseObjectResponse objectResponse = bookbuildingFacade.queryPregnantBuildById(id); | |
158 | + @TokenRequired | |
159 | + public BaseObjectResponse queryPregnantBuildRecord(@PathVariable("id")String id,HttpServletRequest request){ | |
160 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
161 | + BaseObjectResponse objectResponse = bookbuildingFacade.queryPregnantBuildById(id,loginState.getId()); | |
161 | 162 | return objectResponse; |
162 | 163 | } |
163 | 164 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
b4c86cb
... | ... | @@ -20,9 +20,7 @@ |
20 | 20 | import com.lyms.platform.operate.web.utils.JdbcUtil; |
21 | 21 | import com.lyms.platform.operate.web.utils.MessageCenterService; |
22 | 22 | import com.lyms.platform.permission.dao.master.CouponMapper; |
23 | -import com.lyms.platform.permission.model.Organization; | |
24 | -import com.lyms.platform.permission.model.OrganizationQuery; | |
25 | -import com.lyms.platform.permission.model.Users; | |
23 | +import com.lyms.platform.permission.model.*; | |
26 | 24 | import com.lyms.platform.permission.service.CouponService; |
27 | 25 | import com.lyms.platform.permission.service.OrganizationService; |
28 | 26 | import com.lyms.platform.permission.service.UsersService; |
... | ... | @@ -33,7 +31,6 @@ |
33 | 31 | import org.slf4j.LoggerFactory; |
34 | 32 | import org.springframework.beans.factory.annotation.Autowired; |
35 | 33 | import org.springframework.data.domain.Sort; |
36 | -import org.springframework.data.mongodb.core.MongoTemplate; | |
37 | 34 | import org.springframework.stereotype.Component; |
38 | 35 | |
39 | 36 | import javax.servlet.http.HttpServletResponse; |
40 | 37 | |
... | ... | @@ -124,13 +121,16 @@ |
124 | 121 | private PatientCheckTicketService patientCheckTicketService; |
125 | 122 | @Autowired |
126 | 123 | private AreaCodeService areaCodeService; |
127 | - | |
124 | + | |
128 | 125 | @Autowired |
129 | 126 | private GenSequenceIdService genSequenceIdService; |
130 | 127 | |
131 | 128 | @Autowired |
132 | 129 | private CouponService couponService; |
133 | 130 | |
131 | + @Autowired | |
132 | + private PatientServiceFacade patientServiceFacade; | |
133 | + | |
134 | 134 | /** |
135 | 135 | * 根据患者的建档ID,查询还未使用的免费产检查券 |
136 | 136 | * |
... | ... | @@ -257,6 +257,7 @@ |
257 | 257 | patient.setCreated(new Date()); |
258 | 258 | patient.setModified(new Date()); |
259 | 259 | patient.setOperator(userId); |
260 | + | |
260 | 261 | Patients p = yunBookbuildingService.addPregnantBookbuilding(patient); |
261 | 262 | |
262 | 263 | operateLogFacade.addAddOptLog(userId, Integer.valueOf(yunRequest.getHospitalId()), p, OptActionEnums.ADD.getId(), "孕妇建档"); |
... | ... | @@ -266,7 +267,7 @@ |
266 | 267 | |
267 | 268 | |
268 | 269 | if (resperson != null) { |
269 | - Patients p1 =new Patients(); | |
270 | + Patients p1 = new Patients(); | |
270 | 271 | |
271 | 272 | p1.setId(p.getId()); |
272 | 273 | HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(resperson.getId(), true); |
... | ... | @@ -277,7 +278,7 @@ |
277 | 278 | if (CollectionUtils.isNotEmpty(highScoreResult.getLevelId())) { |
278 | 279 | p1.setRiskLevelId(JsonUtil.array2JsonString(highScoreResult.getLevelId())); |
279 | 280 | } |
280 | - yunBookbuildingService.updatePregnant(p1,p.getId()); | |
281 | + yunBookbuildingService.updatePregnant(p1, p.getId()); | |
281 | 282 | |
282 | 283 | } |
283 | 284 | |
284 | 285 | |
... | ... | @@ -292,13 +293,7 @@ |
292 | 293 | //加入产筛 |
293 | 294 | patientsService.validata(p); |
294 | 295 | |
295 | - if (type == ServiceObjEnums.YUNOBJ.getId()) { | |
296 | - //生成建档短信 | |
297 | -// createBuildSms(p); | |
298 | - createBuildMsg(p); | |
299 | - } | |
300 | 296 | |
301 | - | |
302 | 297 | if (p.getType() != null && p.getType() == 1) { |
303 | 298 | |
304 | 299 | Organization organization = organizationService.getOrganization(Integer.valueOf(yunRequest.getHospitalId())); |
305 | 300 | |
306 | 301 | |
307 | 302 | |
... | ... | @@ -310,19 +305,19 @@ |
310 | 305 | AreaCodeModel areaCode = null; |
311 | 306 | |
312 | 307 | |
313 | - String groupId= groupsFacade.findItemIdByCurrentUserId(autoMatchFacade.getHospitalId(userId)); | |
314 | - if(org.apache.commons.lang.StringUtils.isNotEmpty(groupId)){ | |
308 | + String groupId = groupsFacade.findItemIdByCurrentUserId(autoMatchFacade.getHospitalId(userId)); | |
309 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(groupId)) { | |
315 | 310 | OrganizationGroupsItems groupsItems = groupsFacade.findById(groupId); |
316 | - if(null!=groupsItems){ | |
311 | + if (null != groupsItems) { | |
317 | 312 | if (CollectionUtils.isNotEmpty(code)) { |
318 | 313 | areaCode = code.get(0); |
319 | 314 | } |
320 | - if (null != areaCode&&StringUtils.isNotEmpty(areaCode.getAreaCode())) { | |
315 | + if (null != areaCode && StringUtils.isNotEmpty(areaCode.getAreaCode())) { | |
321 | 316 | // 建档成功后,给孕妇造五个条形码 |
322 | 317 | String ticketPid = autoIncermentService.nextPatientTicketId(areaCode.getAreaCode()); |
323 | 318 | |
324 | - int start = TicketTypeEnums.TICKTE_ALL.getType().equals(groupsItems.getTicketType()) ?1:PatientCheckTicketFacade.complyCurrentDay(p.getLastMenses()); | |
325 | - for (Integer i =start; i <= 5; i++) { | |
319 | + int start = TicketTypeEnums.TICKTE_ALL.getType().equals(groupsItems.getTicketType()) ? 1 : PatientCheckTicketFacade.complyCurrentDay(p.getLastMenses()); | |
320 | + for (Integer i = start; i <= 5; i++) { | |
326 | 321 | PatientCheckTicket ticket = new PatientCheckTicket(); |
327 | 322 | ticket.setStatus(1); |
328 | 323 | ticket.setHospitalId(p.getHospitalId()); |
329 | 324 | |
... | ... | @@ -338,13 +333,38 @@ |
338 | 333 | } |
339 | 334 | } |
340 | 335 | |
336 | + //建档开通增值服务 | |
337 | + if (CollectionUtils.isNotEmpty(yunRequest.getSerInfos())) { | |
338 | + | |
339 | + PatientService patientService = new PatientService(); | |
340 | + patientService.setSerInfos(yunRequest.getSerInfos()); | |
341 | + patientService.setCreateUser(String.valueOf(userId)); | |
342 | + //开通日期与建档日期一致 | |
343 | + patientService.setCreateDate(DateUtil.parseYMD(yunRequest.getBookbuildingDate())); | |
344 | + patientService.setParentid(p.getId()); | |
345 | + try { | |
346 | + patientServiceFacade.addPatientService(patientService, userId); | |
347 | + } catch (Exception e) { | |
348 | + System.out.println("孕妇建档服务开通异常!"); | |
349 | + e.printStackTrace(); | |
350 | + } | |
351 | + } | |
352 | + | |
353 | + | |
354 | + if (type == ServiceObjEnums.YUNOBJ.getId()) { | |
355 | + //生成建档短信 | |
356 | +// createBuildSms(p); | |
357 | + createBuildMsg(p); | |
358 | + } | |
359 | + | |
360 | + | |
341 | 361 | br.setErrorcode(ErrorCodeConstants.SUCCESS); |
342 | 362 | br.setErrormsg("成功"); |
343 | 363 | br.setData(p.getId()); |
344 | 364 | return br; |
345 | 365 | |
346 | 366 | } |
347 | - | |
367 | + | |
348 | 368 | /** |
349 | 369 | * 添加孕妇建档 |
350 | 370 | * |
351 | 371 | |
352 | 372 | |
353 | 373 | |
... | ... | @@ -499,19 +519,19 @@ |
499 | 519 | AreaCodeModel areaCode = null; |
500 | 520 | |
501 | 521 | |
502 | - String groupId= groupsFacade.findItemIdByCurrentUserId(autoMatchFacade.getHospitalId(userId)); | |
503 | - if(org.apache.commons.lang.StringUtils.isNotEmpty(groupId)){ | |
522 | + String groupId = groupsFacade.findItemIdByCurrentUserId(autoMatchFacade.getHospitalId(userId)); | |
523 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(groupId)) { | |
504 | 524 | OrganizationGroupsItems groupsItems = groupsFacade.findById(groupId); |
505 | - if(null!=groupsItems){ | |
525 | + if (null != groupsItems) { | |
506 | 526 | if (CollectionUtils.isNotEmpty(code)) { |
507 | 527 | areaCode = code.get(0); |
508 | 528 | } |
509 | - if (null != areaCode&&StringUtils.isNotEmpty(areaCode.getAreaCode())) { | |
529 | + if (null != areaCode && StringUtils.isNotEmpty(areaCode.getAreaCode())) { | |
510 | 530 | // 建档成功后,给孕妇造五个条形码 |
511 | 531 | // String ticketPid = autoIncermentService.nextPatientTicketId(areaCode.getAreaCode()); |
512 | 532 | |
513 | - int start = TicketTypeEnums.TICKTE_ALL.getType().equals(groupsItems.getTicketType()) ?1:PatientCheckTicketFacade.complyCurrentDay(p.getLastMenses()); | |
514 | - for (Integer i =start; i <= 5; i++) { | |
533 | + int start = TicketTypeEnums.TICKTE_ALL.getType().equals(groupsItems.getTicketType()) ? 1 : PatientCheckTicketFacade.complyCurrentDay(p.getLastMenses()); | |
534 | + for (Integer i = start; i <= 5; i++) { | |
515 | 535 | PatientCheckTicket ticket = new PatientCheckTicket(); |
516 | 536 | ticket.setStatus(1); |
517 | 537 | ticket.setHospitalId(p.getHospitalId()); |
518 | 538 | |
... | ... | @@ -627,14 +647,11 @@ |
627 | 647 | smsList.setTypeId(ProjectTypeEnums.YNXT.getId()); |
628 | 648 | smsList.setMessages(messages); |
629 | 649 | //调用发送接口 |
630 | - if ("4".equals(HIS_VERSION) || "20".equals(HIS_VERSION)) | |
631 | - { | |
650 | + if ("4".equals(HIS_VERSION) || "20".equals(HIS_VERSION)) { | |
632 | 651 | //秦皇岛 |
633 | 652 | //保存到同步表中 |
634 | 653 | syncDataService.savePostMsg(JsonUtil.obj2JsonString(smsList), messages.get(0).getHospitalId()); |
635 | - } | |
636 | - else | |
637 | - { | |
654 | + } else { | |
638 | 655 | //保存到短信中心 线上 |
639 | 656 | MessageCenterService.saveMsgCenter(smsList); |
640 | 657 | } |
... | ... | @@ -646,7 +663,6 @@ |
646 | 663 | } |
647 | 664 | |
648 | 665 | |
649 | - | |
650 | 666 | /** |
651 | 667 | * 创建孕妇建档短信 |
652 | 668 | */ |
653 | 669 | |
... | ... | @@ -730,15 +746,12 @@ |
730 | 746 | smsList.setMessages(messages); |
731 | 747 | //调用发送接口 |
732 | 748 | |
733 | - ExceptionUtils.catchException("patient build msg = "+ messages); | |
734 | - if ("4".equals(HIS_VERSION)) | |
735 | - { | |
749 | + ExceptionUtils.catchException("patient build msg = " + messages); | |
750 | + if ("4".equals(HIS_VERSION)) { | |
736 | 751 | //秦皇岛 |
737 | 752 | //保存到同步表中 |
738 | 753 | syncDataService.savePostMsg(JsonUtil.obj2JsonString(smsList), messages.get(0).getExt1()); |
739 | - } | |
740 | - else | |
741 | - { | |
754 | + } else { | |
742 | 755 | //保存到短信中心 线上 |
743 | 756 | MessageCenterService.saveSmsCenter(smsList); |
744 | 757 | } |
745 | 758 | |
746 | 759 | |
747 | 760 | |
748 | 761 | |
... | ... | @@ -897,21 +910,23 @@ |
897 | 910 | |
898 | 911 | /** |
899 | 912 | * 修改初诊 复诊的末次月经字段 |
913 | + * | |
900 | 914 | * @param lastMenses |
901 | 915 | */ |
902 | - private void updateAntExLastMenses(Date lastMenses,String pid,Date bookBuildDate){ | |
903 | - AntExQuery antExQuery=new AntExQuery(); | |
916 | + private void updateAntExLastMenses(Date lastMenses, String pid, Date bookBuildDate) { | |
917 | + AntExQuery antExQuery = new AntExQuery(); | |
904 | 918 | antExQuery.setStart(bookBuildDate); |
905 | 919 | antExQuery.setPid(pid); |
906 | 920 | antExQuery.setYn(YnEnums.YES.getId()); |
907 | - List<AntenatalExaminationModel> antexList = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
908 | - if(CollectionUtils.isNotEmpty(antexList)){ | |
909 | - for(AntenatalExaminationModel antex:antexList){ | |
921 | + List<AntenatalExaminationModel> antexList = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
922 | + if (CollectionUtils.isNotEmpty(antexList)) { | |
923 | + for (AntenatalExaminationModel antex : antexList) { | |
910 | 924 | antex.setLastMenses(lastMenses); |
911 | - antenatalExaminationService.updateOneAnt(antex,antex.getId()); | |
925 | + antenatalExaminationService.updateOneAnt(antex, antex.getId()); | |
912 | 926 | } |
913 | 927 | } |
914 | 928 | } |
929 | + | |
915 | 930 | /** |
916 | 931 | * 查询孕妇建档记录 |
917 | 932 | * |
918 | 933 | |
... | ... | @@ -940,12 +955,9 @@ |
940 | 955 | //优先查询本院通过就诊卡 |
941 | 956 | List<Patients> localPatients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
942 | 957 | patientsQuery.setHospitalId(null); |
943 | - if (CollectionUtils.isNotEmpty(localPatients)) | |
944 | - { | |
958 | + if (CollectionUtils.isNotEmpty(localPatients)) { | |
945 | 959 | patients = localPatients; |
946 | - } | |
947 | - else | |
948 | - { | |
960 | + } else { | |
949 | 961 | //区域模式 |
950 | 962 | patientsQuery.setHospitalList(groupsFacade.findGroupHospital(userId, false)); |
951 | 963 | |
... | ... | @@ -970,7 +982,7 @@ |
970 | 982 | typeMap.put("hisPatient", fnfyHisService.getPatientInfoList(bookbuildingQueryRequest.getVcCardNo())); |
971 | 983 | } else if ("4".equals(HIS_VERSION)) { |
972 | 984 | typeMap.put("hisPatient", qhdfyHisService.getPatientInfoList(bookbuildingQueryRequest.getVcCardNo())); |
973 | - }else if ("6".equals(HIS_VERSION)){ | |
985 | + } else if ("6".equals(HIS_VERSION)) { | |
974 | 986 | typeMap.put("hisPatient", dzfyHisService.getPatientInfoList(bookbuildingQueryRequest.getVcCardNo())); |
975 | 987 | } |
976 | 988 | } |
... | ... | @@ -1008,7 +1020,7 @@ |
1008 | 1020 | //历史建档记录 |
1009 | 1021 | List<Map> list = new ArrayList<>(); |
1010 | 1022 | List<BookbuildingRecordResult> results = new ArrayList<>(); |
1011 | - String pid =null; | |
1023 | + String pid = null; | |
1012 | 1024 | if (CollectionUtils.isNotEmpty(patients)) { |
1013 | 1025 | |
1014 | 1026 | for (Patients pat : patients) { |
... | ... | @@ -1027,7 +1039,7 @@ |
1027 | 1039 | result.setType(pat.getType()); |
1028 | 1040 | result.setDueStatus(pat.getDueStatus()); |
1029 | 1041 | result.setPid(pat.getPid()); |
1030 | - pid=pat.getPid(); | |
1042 | + pid = pat.getPid(); | |
1031 | 1043 | results.add(result); |
1032 | 1044 | } |
1033 | 1045 | } |
1034 | 1046 | |
1035 | 1047 | |
... | ... | @@ -1104,17 +1116,17 @@ |
1104 | 1116 | |
1105 | 1117 | |
1106 | 1118 | // 纠正末次月经和末次月经反起存 |
1107 | - if(StringUtils.isEmpty(yunRequest.getFuckLastMens())) { | |
1119 | + if (StringUtils.isEmpty(yunRequest.getFuckLastMens())) { | |
1108 | 1120 | patient.setLastMenses(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod())); |
1109 | 1121 | } else { |
1110 | 1122 | patient.setFuckLastMens(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod())); |
1111 | 1123 | patient.setLastMenses(DateUtil.parseYMD(yunRequest.getFuckLastMens())); |
1112 | 1124 | } |
1125 | + patient.setLastMenses(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod())); | |
1113 | 1126 | |
1114 | 1127 | patient.setLastMenstrualPeriodBasis(yunRequest.getLastMenstrualPeriodBasis()); |
1115 | 1128 | patient.setLastMenstrualPeriodBasisDoctorId(yunRequest.getLastMenstrualPeriodBasisDoctorId()); |
1116 | 1129 | patient.setLastMenstrualPeriodBasisDate(yunRequest.getLastMenstrualPeriodBasisDate()); |
1117 | - patient.setLastMenstrualPeriodBasisOther(yunRequest.getLastMenstrualPeriodBasisOther()); | |
1118 | 1130 | |
1119 | 1131 | patient.setMensStartDay(yunRequest.getMensStartDay()); |
1120 | 1132 | |
... | ... | @@ -1194,8 +1206,6 @@ |
1194 | 1206 | patient.setHstreetRegisterId(yunRequest.getHusbandStreetRegisterId()); |
1195 | 1207 | patient.setHlevelTypeId(yunRequest.getHusbandLevelTypeId()); |
1196 | 1208 | |
1197 | - patient.setServiceStatus(yunRequest.getServiceStatus()); | |
1198 | - | |
1199 | 1209 | if (yunRequest.getExpType() != null) { |
1200 | 1210 | if (yunRequest.getExpType() == ExpYunEnums.SGY.getId()) { |
1201 | 1211 | Date vipEndTime = DateUtil.addMonth(DateUtil.parseYMD(yunRequest.getBookbuildingDate()), 3); |
1202 | 1212 | |
... | ... | @@ -1218,12 +1228,25 @@ |
1218 | 1228 | |
1219 | 1229 | // patient.setLastMenses(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod())); |
1220 | 1230 | |
1231 | + //建档开通增值服务,以前数据 | |
1232 | + if (CollectionUtils.isNotEmpty(yunRequest.getSerInfos())) { | |
1233 | + for (Map<String, String> serInfo : yunRequest.getSerInfos()) { | |
1234 | + //标准服务 | |
1235 | + if (Integer.parseInt(serInfo.get("serType")) == PatientSerEnums.SerTypeEnums.bzfw.getId()) { | |
1236 | + patient.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId()); | |
1237 | + patient.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId()); | |
1238 | + }else if(Integer.parseInt(serInfo.get("serType")) == PatientSerEnums.SerTypeEnums.yqjzzd.getId()){//增值服务:修改为孕期精准指导 | |
1239 | + patient.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId()); | |
1240 | + patient.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId()); | |
1241 | + break; | |
1242 | + } | |
1243 | + } | |
1244 | + } | |
1221 | 1245 | |
1222 | 1246 | patient.setDueDate(DateUtil.parseYMD(yunRequest.getDueDate())); |
1223 | 1247 | patient.setFileCode(yunRequest.getFileCode()); |
1224 | 1248 | patient.setBookbuildingDoctor(yunRequest.getBookbuildingDoctor()); |
1225 | 1249 | patient.setBookbuildingDate(DateUtil.parseYMD(yunRequest.getBookbuildingDate())); |
1226 | - patient.setServiceType(yunRequest.getServiceType()); | |
1227 | 1250 | patient.setVcCardNo(yunRequest.getVcCardNo()); |
1228 | 1251 | patient.setHospitalId(yunRequest.getHospitalId()); |
1229 | 1252 | patient.setYn(YnEnums.YES.getId()); |
1230 | 1253 | |
1231 | 1254 | |
... | ... | @@ -1238,17 +1261,17 @@ |
1238 | 1261 | * @param id |
1239 | 1262 | * @return |
1240 | 1263 | */ |
1241 | - public BaseObjectResponse queryPregnantBuildById(String id) { | |
1264 | + public BaseObjectResponse queryPregnantBuildById(String id, Integer userId) { | |
1242 | 1265 | |
1243 | 1266 | PatientsQuery patientsQuery = new PatientsQuery(); |
1244 | 1267 | patientsQuery.setId(id); |
1245 | 1268 | patientsQuery.setYn(YnEnums.YES.getId()); |
1246 | 1269 | PregnantInfoResult result = new PregnantInfoResult(); |
1270 | + | |
1247 | 1271 | List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
1248 | 1272 | if (patients != null && patients.size() > 0) { |
1249 | 1273 | Patients p = patients.get(0); |
1250 | 1274 | result = getResult(p); |
1251 | - result.setLastMenstrualPeriodBasis(p.getLastMenstrualPeriodBasis()); | |
1252 | 1275 | /** 末次月经和纠正末次月经反起来返回 */ |
1253 | 1276 | if(p.getFuckLastMens() != null) { |
1254 | 1277 | result.setFuckLastMens(DateUtil.getyyyy_MM_dd(p.getLastMenses())); |
... | ... | @@ -1261,6 +1284,9 @@ |
1261 | 1284 | result.setLastMenstrualPeriodBasisDoctorId(couponMapper.getUserName(p.getLastMenstrualPeriodBasisDoctorId())); |
1262 | 1285 | } |
1263 | 1286 | |
1287 | + BaseResponse baseResponse = patientServiceFacade.findPatientServiceList(id,userId); | |
1288 | + List<PatientSerResult> patientSerResults = (List<PatientSerResult>) baseResponse.getObject(); | |
1289 | + result.setPatientSerResults(patientSerResults); | |
1264 | 1290 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
1265 | 1291 | objectResponse.setData(result); |
1266 | 1292 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
... | ... | @@ -1272,8 +1298,6 @@ |
1272 | 1298 | public PregnantInfoResult getResult(Patients p) { |
1273 | 1299 | PregnantInfoResult result = new PregnantInfoResult(); |
1274 | 1300 | |
1275 | - result.setLastMenstrualPeriodBasisOther(p.getLastMenstrualPeriodBasisOther()); | |
1276 | - | |
1277 | 1301 | result.setFuckLastMens(DateUtil.getyyyy_MM_dd(p.getFuckLastMens())); |
1278 | 1302 | result.setLastMenstrualPeriodBasis(BasisEnums.getName(p.getLastMenstrualPeriodBasis())); |
1279 | 1303 | result.setLastMenstrualPeriodBasisId(p.getLastMenstrualPeriodBasis()); |
... | ... | @@ -1434,7 +1458,7 @@ |
1434 | 1458 | */ |
1435 | 1459 | public BaseResponse deletePregnantById(String id, Integer userId) { |
1436 | 1460 | |
1437 | - if(org.apache.commons.lang.StringUtils.isNotEmpty(id)){ | |
1461 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(id)) { | |
1438 | 1462 | //获取初诊记录 |
1439 | 1463 | String hospital = autoMatchFacade.getHospitalId(userId); |
1440 | 1464 | Patients patients = yunBookbuildingService.findOneById(id); |
1441 | 1465 | |
1442 | 1466 | |
... | ... | @@ -1451,13 +1475,13 @@ |
1451 | 1475 | sieveQuery.setParentId(id); |
1452 | 1476 | sieveService.deleteById(sieveQuery); |
1453 | 1477 | |
1454 | - PatientCheckTicketQuery patientCheckTicketQuery=new PatientCheckTicketQuery(); | |
1478 | + PatientCheckTicketQuery patientCheckTicketQuery = new PatientCheckTicketQuery(); | |
1455 | 1479 | patientCheckTicketQuery.setPatientId(id); |
1456 | 1480 | patientCheckTicketQuery.setStatus(1); |
1457 | - PatientCheckTicket patientCheckTicket=new PatientCheckTicket(); | |
1481 | + PatientCheckTicket patientCheckTicket = new PatientCheckTicket(); | |
1458 | 1482 | patientCheckTicket.setStatus(3); |
1459 | 1483 | patientCheckTicket.setPatientId(id); |
1460 | - patientCheckTicketService.findAndModify(patientCheckTicketQuery,patientCheckTicket); | |
1484 | + patientCheckTicketService.findAndModify(patientCheckTicketQuery, patientCheckTicket); | |
1461 | 1485 | |
1462 | 1486 | |
1463 | 1487 | /** 删除建档应该是把全部未使用的优惠券状态更新为3【已作废】 */ |
... | ... | @@ -1930,8 +1954,7 @@ |
1930 | 1954 | patientResult.setHusbandPhone(result.getHusbandPhone()); |
1931 | 1955 | } |
1932 | 1956 | // 增加初诊信息,桓台医院打印使用 |
1933 | - if (StringUtils.isNotEmpty(patientResult.getId())) | |
1934 | - { | |
1957 | + if (StringUtils.isNotEmpty(patientResult.getId())) { | |
1935 | 1958 | AntExChuQuery antExChuQuery = new AntExChuQuery(); |
1936 | 1959 | antExChuQuery.setParentId(patientResult.getId()); |
1937 | 1960 | antExChuQuery.setYn(YnEnums.YES.getId()); |
... | ... | @@ -1961,8 +1984,6 @@ |
1961 | 1984 | } |
1962 | 1985 | return ""; |
1963 | 1986 | } |
1964 | - | |
1965 | - | |
1966 | 1987 | |
1967 | 1988 | |
1968 | 1989 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceSysFacade.java
View file @
b4c86cb
... | ... | @@ -62,7 +62,7 @@ |
62 | 62 | patientService.setId(UUID.randomUUID().toString().replace("-", "")); |
63 | 63 | int serType = patientService.getSerType(); |
64 | 64 | // 1高危精准指导、5-专家咨询默认已经领取 |
65 | - if(serType == PatientSerEnums.SerTypeEnums.gwjzzd.getId()||serType == PatientSerEnums.SerTypeEnums.zjzx.getId()){ | |
65 | + if(serType == PatientSerEnums.SerTypeEnums.yqjzzd.getId()||serType == PatientSerEnums.SerTypeEnums.zjzx.getId()){ | |
66 | 66 | //默认已领取 |
67 | 67 | patientService.setStatus(2); |
68 | 68 | }else{ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java
View file @
b4c86cb
... | ... | @@ -4,6 +4,9 @@ |
4 | 4 | import com.lyms.platform.common.core.annotation.form.FormParam; |
5 | 5 | import org.hibernate.validator.constraints.NotEmpty; |
6 | 6 | |
7 | +import java.util.List; | |
8 | +import java.util.Map; | |
9 | + | |
7 | 10 | /** |
8 | 11 | * Created by lqy on 2016/6/15. |
9 | 12 | */ |
10 | 13 | |
... | ... | @@ -80,12 +83,25 @@ |
80 | 83 | this.lastMenstrualPeriodBasisDate = lastMenstrualPeriodBasisDate; |
81 | 84 | } |
82 | 85 | |
86 | + /** | |
87 | + * 服务信息 | |
88 | + */ | |
89 | + private List<Map<String,String>> serInfos; | |
90 | + | |
83 | 91 | /***********孕妇基本信息***********/ |
84 | 92 | // 月经周期开始天数 |
85 | 93 | private String mensStartDay; |
86 | 94 | |
87 | 95 | // 月经周期开始天数 |
88 | 96 | private String mensEndDay; |
97 | + | |
98 | + public List<Map<String, String>> getSerInfos() { | |
99 | + return serInfos; | |
100 | + } | |
101 | + | |
102 | + public void setSerInfos(List<Map<String, String>> serInfos) { | |
103 | + this.serInfos = serInfos; | |
104 | + } | |
89 | 105 | |
90 | 106 | public String getMensEndDay() { |
91 | 107 | return mensEndDay; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PregnantInfoResult.java
View file @
b4c86cb
1 | 1 | package com.lyms.platform.operate.web.result; |
2 | 2 | |
3 | +import java.util.List; | |
3 | 4 | import java.util.Map; |
4 | 5 | |
5 | 6 | /** |
... | ... | @@ -17,6 +18,30 @@ |
17 | 18 | // 末次月经纠正医生ID |
18 | 19 | private String lastMenstrualPeriodBasisDoctorId; |
19 | 20 | private String lastMenstrualPeriodBasisDoctorName; |
21 | + | |
22 | + /** | |
23 | + * 编辑时服务信息 | |
24 | + */ | |
25 | + private List<Map<String,String>> serInfos; | |
26 | + //显示服务信息 | |
27 | + private List<PatientSerResult> patientSerResults; | |
28 | + | |
29 | + | |
30 | + public List<PatientSerResult> getPatientSerResults() { | |
31 | + return patientSerResults; | |
32 | + } | |
33 | + | |
34 | + public void setPatientSerResults(List<PatientSerResult> patientSerResults) { | |
35 | + this.patientSerResults = patientSerResults; | |
36 | + } | |
37 | + | |
38 | + public List<Map<String, String>> getSerInfos() { | |
39 | + return serInfos; | |
40 | + } | |
41 | + | |
42 | + public void setSerInfos(List<Map<String, String>> serInfos) { | |
43 | + this.serInfos = serInfos; | |
44 | + } | |
20 | 45 | |
21 | 46 | public String getLastMenstrualPeriodBasisDoctorName() { |
22 | 47 | return lastMenstrualPeriodBasisDoctorName; |