Commit 2de44a8690f521a41aaaf79e1eae686e23e6b8c7
1 parent
71ef7bdb56
Exists in
master
and in
7 other branches
1
Showing 1 changed file with 42 additions and 41 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
2de44a8
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | * @param userId |
76 | 76 | * @return |
77 | 77 | */ |
78 | - public String handHideBuild(String pid, String parentId, Integer userId,int type) { | |
78 | + public String handHideBuild(String pid, String parentId, Integer userId, int type) { | |
79 | 79 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
80 | 80 | |
81 | 81 | List li = new ArrayList(); |
82 | 82 | |
... | ... | @@ -86,9 +86,9 @@ |
86 | 86 | return patients.getId(); |
87 | 87 | } |
88 | 88 | |
89 | - Patients patients1= patientsService.findOnePatientById(parentId); | |
89 | + Patients patients1 = patientsService.findOnePatientById(parentId); | |
90 | 90 | |
91 | - if(patients1.getHospitalId().equals(hospitalId)){ | |
91 | + if (patients1.getHospitalId().equals(hospitalId)) { | |
92 | 92 | return patients1.getId(); |
93 | 93 | } |
94 | 94 | |
... | ... | @@ -180,7 +180,7 @@ |
180 | 180 | AntenatalExaminationModel model = antExAddRequest.convertToDataModel(); |
181 | 181 | //表示区域的 |
182 | 182 | if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) { |
183 | - String parentId = handHideBuild(antExAddRequest.getPid(), antExAddRequest.getParentId(), userId,1); | |
183 | + String parentId = handHideBuild(antExAddRequest.getPid(), antExAddRequest.getParentId(), userId, 1); | |
184 | 184 | if (StringUtils.isEmpty(parentId)) { |
185 | 185 | //打印日志 |
186 | 186 | } |
187 | 187 | |
188 | 188 | |
... | ... | @@ -231,16 +231,16 @@ |
231 | 231 | // 修改关联券的使用状态,如果已使用,则返回错误码 |
232 | 232 | //初诊只能建一次 |
233 | 233 | if (StringUtils.isNotBlank(model.getBarCode())) { |
234 | - PatientCheckTicketQuery checkTicketQuery=new PatientCheckTicketQuery(); | |
234 | + PatientCheckTicketQuery checkTicketQuery = new PatientCheckTicketQuery(); | |
235 | 235 | checkTicketQuery.setPid(model.getPid()); |
236 | 236 | checkTicketQuery.setId(model.getBarCode()); |
237 | 237 | checkTicketQuery.setStatus(1); |
238 | - if(patientCheckTicketService.queryTicketCount(checkTicketQuery)>0){ | |
238 | + if (patientCheckTicketService.queryTicketCount(checkTicketQuery) > 0) { | |
239 | 239 | String code = patientCheckTicketService.updateTicket(model.getBarCode(), 2, model.getHospitalId()); |
240 | 240 | if (code != null) { |
241 | 241 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg(code); |
242 | 242 | } |
243 | - }else{ | |
243 | + } else { | |
244 | 244 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("该产检劵不属于本人"); |
245 | 245 | } |
246 | 246 | } |
... | ... | @@ -336,7 +336,7 @@ |
336 | 336 | |
337 | 337 | //表示区域的 |
338 | 338 | if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) { |
339 | - String parentId = handHideBuild(excAddRequest.getPid(), excAddRequest.getParentId(), userId,1); | |
339 | + String parentId = handHideBuild(excAddRequest.getPid(), excAddRequest.getParentId(), userId, 1); | |
340 | 340 | if (StringUtils.isEmpty(parentId)) { |
341 | 341 | //打印日志 |
342 | 342 | } |
343 | 343 | |
... | ... | @@ -384,18 +384,18 @@ |
384 | 384 | //初诊只能建一次 |
385 | 385 | // 修改关联券的使用状态,如果已使用,则返回错误码 |
386 | 386 | if (StringUtils.isNotBlank(antExChuModel.getBarCode())) { |
387 | - PatientCheckTicketQuery checkTicketQuery=new PatientCheckTicketQuery(); | |
387 | + PatientCheckTicketQuery checkTicketQuery = new PatientCheckTicketQuery(); | |
388 | 388 | checkTicketQuery.setPid(antExChuModel.getPid()); |
389 | 389 | checkTicketQuery.setId(antExChuModel.getBarCode()); |
390 | 390 | checkTicketQuery.setStatus(1); |
391 | - if(patientCheckTicketService.queryTicketCount(checkTicketQuery)>0){ | |
392 | - String code = patientCheckTicketService.updateTicket(antExChuModel.getBarCode(), 2, antExChuModel.getHospitalId()); | |
393 | - if (code != null) { | |
394 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg(code); | |
395 | - } | |
396 | - }else{ | |
397 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("该产检劵不属于本人"); | |
398 | - } | |
391 | + if (patientCheckTicketService.queryTicketCount(checkTicketQuery) > 0) { | |
392 | + String code = patientCheckTicketService.updateTicket(antExChuModel.getBarCode(), 2, antExChuModel.getHospitalId()); | |
393 | + if (code != null) { | |
394 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg(code); | |
395 | + } | |
396 | + } else { | |
397 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("该产检劵不属于本人"); | |
398 | + } | |
399 | 399 | } |
400 | 400 | if (CollectionUtils.isEmpty(data1)) { |
401 | 401 | Patients patients = patientsService.findOnePatientById(excAddRequest.getParentId()); |
... | ... | @@ -794,7 +794,7 @@ |
794 | 794 | |
795 | 795 | if (CollectionUtils.isNotEmpty(list)) { |
796 | 796 | // Patients patients2 = findOnePatient(null, null, null, hospital, -1, true, exListQueryRequest.getPid(),false); |
797 | - Patients patients2 = findOnePatient(null, null, null, groupsFacade.findGroupHospital(userId,true), -1, true, exListQueryRequest.getPid(), false); | |
797 | + Patients patients2 = findOnePatient(null, null, null, groupsFacade.findGroupHospital(userId, true), -1, true, exListQueryRequest.getPid(), false); | |
798 | 798 | antexListResult.convertToResult(null, patients2, null); |
799 | 799 | |
800 | 800 | HighScoreResult highScoreResult = findLastRisk(list.get(0).getPid(), false); |
801 | 801 | |
... | ... | @@ -984,14 +984,14 @@ |
984 | 984 | Date currentDate = DateUtil.formatDate(new Date()); |
985 | 985 | |
986 | 986 | |
987 | - if ((date.getTime() <= currentDate.getTime() || patients.getBuildType() == 2)||patients.getType()==3&&patients.getFmDate()!=null) { | |
987 | + if ((date.getTime() <= currentDate.getTime() || patients.getBuildType() == 2) || patients.getType() == 3 && patients.getFmDate() != null) { | |
988 | 988 | //建档记录 |
989 | 989 | if (null != patients.getHospitalId()) { |
990 | 990 | organization = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())); |
991 | 991 | } |
992 | 992 | pid = patients.getPid(); |
993 | 993 | //当主档案的医院不在group组里需要显示本来的隐藏档案 |
994 | - if(!"2".equals(patients.getEnable())){ | |
994 | + if (!"2".equals(patients.getEnable())) { | |
995 | 995 | listData.add(new AntData(patients, null != organization ? organization.getName() : "")); |
996 | 996 | } |
997 | 997 | |
... | ... | @@ -1060,7 +1060,7 @@ |
1060 | 1060 | } |
1061 | 1061 | |
1062 | 1062 | PostReviewQuery postReviewQuery = new PostReviewQuery(); |
1063 | - if (list.size() - 1 >i) { | |
1063 | + if (list.size() - 1 > i) { | |
1064 | 1064 | postReviewQuery.setStart(dueDate); |
1065 | 1065 | if (CollectionUtils.isNotEmpty(listDate)) { |
1066 | 1066 | //下次建档记录前都是产后复查,如果没有下个产程的数据就直接显示 |
... | ... | @@ -1075,7 +1075,7 @@ |
1075 | 1075 | //产后复查记录 |
1076 | 1076 | List<PostReviewModel> reviewModels = postReviewService.findWithList(postReviewQuery); |
1077 | 1077 | if (CollectionUtils.isNotEmpty(reviewModels)) { |
1078 | - if(CollectionUtils.isNotEmpty(listData)){ | |
1078 | + if (CollectionUtils.isNotEmpty(listData)) { | |
1079 | 1079 | for (PostReviewModel postReviewModel : reviewModels) { |
1080 | 1080 | if (postReviewModel.getYn() == YnEnums.YES.getId()) { |
1081 | 1081 | if (null != postReviewModel.getHospitalId()) { |
... | ... | @@ -1088,7 +1088,7 @@ |
1088 | 1088 | } |
1089 | 1089 | } |
1090 | 1090 | iterator.remove(); |
1091 | - if(CollectionUtils.isNotEmpty(listData)){ | |
1091 | + if (CollectionUtils.isNotEmpty(listData)) { | |
1092 | 1092 | sort(listData); |
1093 | 1093 | updateEditEnable(listData, sortList); |
1094 | 1094 | sortList.add(listData); |
... | ... | @@ -1158,7 +1158,7 @@ |
1158 | 1158 | organization = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())); |
1159 | 1159 | } |
1160 | 1160 | pid = patients.getPid(); |
1161 | - if(!"2".equals(patients.getEnable())) { | |
1161 | + if (!"2".equals(patients.getEnable())) { | |
1162 | 1162 | listData.add(new AntData(patients, null != organization ? organization.getName() : "")); |
1163 | 1163 | } |
1164 | 1164 | } |
1165 | 1165 | |
1166 | 1166 | |
1167 | 1167 | |
... | ... | @@ -1679,26 +1679,27 @@ |
1679 | 1679 | if (CollectionUtils.isNotEmpty(list)) { |
1680 | 1680 | patients = list.get(0); |
1681 | 1681 | } |
1682 | - } else if(StringUtils.isNotEmpty(queryRequest.getBarCode())){ | |
1683 | - | |
1684 | - String code = patientCheckTicketService.updateTicket(queryRequest.getBarCode(), 2, hospitalId); | |
1685 | - if (code != null) { | |
1686 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.TICKET_USED).setErrormsg(code); | |
1682 | + } else if (StringUtils.isNotEmpty(queryRequest.getBarCode())) { | |
1683 | + PatientCheckTicketQuery checkTicketQuery = new PatientCheckTicketQuery(); | |
1684 | + checkTicketQuery.setId(queryRequest.getBarCode()); | |
1685 | + checkTicketQuery.setStatus(1); | |
1686 | + if (patientCheckTicketService.queryTicketCount(checkTicketQuery) ==0) { | |
1687 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.TICKET_USED).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION); | |
1687 | 1688 | } |
1688 | 1689 | |
1689 | - PatientCheckTicket checkTicket =patientCheckTicketService.getTicket(queryRequest.getBarCode()); | |
1690 | - if(null!=checkTicket){ | |
1690 | + PatientCheckTicket checkTicket = patientCheckTicketService.getTicket(queryRequest.getBarCode()); | |
1691 | + if (null != checkTicket) { | |
1691 | 1692 | Patients patients1 = patientsService.findOnePatientById(checkTicket.getPatientId()); |
1692 | - if(null!=patients1){ | |
1693 | - if(StringUtils.isNotEmpty(patients1.getSource())){ | |
1694 | - patients= patientsService.findOnePatientById(patients1.getSource()); | |
1695 | - }else{ | |
1696 | - patients=patients1; | |
1693 | + if (null != patients1) { | |
1694 | + if (StringUtils.isNotEmpty(patients1.getSource())) { | |
1695 | + patients = patientsService.findOnePatientById(patients1.getSource()); | |
1696 | + } else { | |
1697 | + patients = patients1; | |
1697 | 1698 | } |
1698 | 1699 | } |
1699 | 1700 | } |
1700 | - }else { | |
1701 | - patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, groupsFacade.findGroupHospital(userId,false), 1, false, null, og.getbStatus() == 1); | |
1701 | + } else { | |
1702 | + patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, groupsFacade.findGroupHospital(userId, false), 1, false, null, og.getbStatus() == 1); | |
1702 | 1703 | //查询产妇数据 |
1703 | 1704 | // patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, hospitalId, 1, false, null, false); |
1704 | 1705 | } |
... | ... | @@ -1711,7 +1712,7 @@ |
1711 | 1712 | // //查询是否还有其他记录 |
1712 | 1713 | // patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, hospitalId, 3, false, null, false); |
1713 | 1714 | // } |
1714 | - patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, groupsFacade.findGroupHospital(userId,false), 3, false, null, og.getbStatus() == 1); | |
1715 | + patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, groupsFacade.findGroupHospital(userId, false), 3, false, null, og.getbStatus() == 1); | |
1715 | 1716 | |
1716 | 1717 | //原来单机 |
1717 | 1718 | if (null != patients) { |
... | ... | @@ -1794,7 +1795,7 @@ |
1794 | 1795 | AntExChuQuery antExChuQuery1 = new AntExChuQuery(); |
1795 | 1796 | antExChuQuery1.setPid(patients.getPid()); |
1796 | 1797 | // antExChuQuery1.setHospitalId(hospitalId); |
1797 | - antExChuQuery1.setHospitalList(groupsFacade.findGroupHospital(userId,false)); | |
1798 | + antExChuQuery1.setHospitalList(groupsFacade.findGroupHospital(userId, false)); | |
1798 | 1799 | |
1799 | 1800 | antExChuQuery1.setYn(YnEnums.YES.getId()); |
1800 | 1801 | antExChuQuery1.setStart(max); |
... | ... | @@ -1808,7 +1809,7 @@ |
1808 | 1809 | patientsQuery1.setYn(YnEnums.YES.getId()); |
1809 | 1810 | patientsQuery1.setPid(patients.getPid()); |
1810 | 1811 | // patientsQuery1.setHospitalId(hospitalId); |
1811 | - patientsQuery1.setHospitalList(groupsFacade.findGroupHospital(userId,false)); | |
1812 | + patientsQuery1.setHospitalList(groupsFacade.findGroupHospital(userId, false)); | |
1812 | 1813 | List<Patients> patientses = patientsService.queryPatient(patientsQuery1); |
1813 | 1814 | |
1814 | 1815 | if (CollectionUtils.isNotEmpty(patientses)) { |