Commit 3790d37154600cfb90666df93cc05b74f4d17058
1 parent
98d2e74433
Exists in
dev
1:调整验证档案号以及高危档案号重复的逻辑
Showing 5 changed files with 48 additions and 8 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPatientDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PatientDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPatientDao.java
View file @
3790d37
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PatientDaoImpl.java
View file @
3790d37
| ... | ... | @@ -62,6 +62,24 @@ |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | @Override |
| 65 | + public Patients findOnePatientByFileDoc(String fileCode) { | |
| 66 | + //根据档案号查询患者 | |
| 67 | + Query query = new Query(); | |
| 68 | + query.addCriteria(Criteria.where("fileCode").is(fileCode)); | |
| 69 | + Patients patients = findOne(query); | |
| 70 | + return patients; | |
| 71 | + } | |
| 72 | + | |
| 73 | + @Override | |
| 74 | + public Patients findOnePatientByHighRiskDocNo(String highRiskDocNo) { | |
| 75 | + //根据档高危案号查询患者 | |
| 76 | + Query query = new Query(); | |
| 77 | + query.addCriteria(Criteria.where("highRiskDocNo").is(highRiskDocNo)); | |
| 78 | + Patients patients = findOne(query); | |
| 79 | + return patients; | |
| 80 | + } | |
| 81 | + | |
| 82 | + @Override | |
| 65 | 83 | public void updatePatientLastCheckEmployeeIdOne(String id, String lastCheckEmployeeId){ |
| 66 | 84 | this.mongoTemplate.updateFirst(new Query(Criteria.where("id").is(id)), Update.update("lastCheckEmployeeId", lastCheckEmployeeId), Patients.class); |
| 67 | 85 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
3790d37
| ... | ... | @@ -1076,6 +1076,24 @@ |
| 1076 | 1076 | return iPatientDao.predictedStatistics(); |
| 1077 | 1077 | } |
| 1078 | 1078 | |
| 1079 | + /** | |
| 1080 | + * 根据档案号进行查询patients信息 | |
| 1081 | + * @param fileCode | |
| 1082 | + * @return | |
| 1083 | + */ | |
| 1084 | + public Patients findOnePatientByFileDoc(String fileCode) { | |
| 1085 | + return iPatientDao.findOnePatientByFileDoc(fileCode); | |
| 1086 | + } | |
| 1087 | + | |
| 1088 | + /** | |
| 1089 | + * 根据高危档案号进行查询patients信息 | |
| 1090 | + * @param highRiskFileCode | |
| 1091 | + * @return | |
| 1092 | + */ | |
| 1093 | + public Patients findOnePatientByHighRiskDocNo(String highRiskFileCode) { | |
| 1094 | + return iPatientDao.findOnePatientByHighRiskDocNo(highRiskFileCode); | |
| 1095 | + } | |
| 1096 | + | |
| 1079 | 1097 | private class PatientWorker extends Thread { |
| 1080 | 1098 | |
| 1081 | 1099 | private List<Patients> patientses; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
3790d37
| ... | ... | @@ -87,17 +87,17 @@ |
| 87 | 87 | |
| 88 | 88 | |
| 89 | 89 | @ResponseBody |
| 90 | - @RequestMapping(value = "checkHighRiskDocNo", method = RequestMethod.GET) | |
| 91 | - public BaseObjectResponse checkHighRiskDocNo(@RequestParam("id") String id) { | |
| 92 | - BaseObjectResponse br = viewFacade.findHighRiskDocNoIsDuplicate(id); | |
| 90 | + @RequestMapping(value = "checkDocNoIsReuse", method = RequestMethod.GET) | |
| 91 | + public BaseObjectResponse checkDocNoIsReuse(@RequestParam("id") String id) { | |
| 92 | + BaseObjectResponse br = viewFacade.findFileDocIsDuplicate(id); | |
| 93 | 93 | return br; |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | |
| 97 | 97 | @ResponseBody |
| 98 | - @RequestMapping(value = "checkDocNoIsReuse", method = RequestMethod.GET) | |
| 99 | - public BaseObjectResponse checkDocNoIsReuse(@RequestParam("id") String id) { | |
| 100 | - BaseObjectResponse br = viewFacade.findFileDocIsDuplicate(id); | |
| 98 | + @RequestMapping(value = "checkHighRiskDocNo", method = RequestMethod.GET) | |
| 99 | + public BaseObjectResponse checkHighRiskDocNo(@RequestParam("id") String id) { | |
| 100 | + BaseObjectResponse br = viewFacade.findHighRiskDocNoIsDuplicate(id); | |
| 101 | 101 | return br; |
| 102 | 102 | } |
| 103 | 103 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
3790d37
| ... | ... | @@ -1784,7 +1784,7 @@ |
| 1784 | 1784 | */ |
| 1785 | 1785 | public BaseObjectResponse findFileDocIsDuplicate(String id) { |
| 1786 | 1786 | BaseObjectResponse br = new BaseObjectResponse(); |
| 1787 | - Patients data = patientsService.findOnePatientById(id); | |
| 1787 | + Patients data = patientsService.findOnePatientByFileDoc(id); | |
| 1788 | 1788 | if (data == null || data.getYn() == YnEnums.NO.getId()) { |
| 1789 | 1789 | br.setErrorcode(201); |
| 1790 | 1790 | br.setErrormsg("该档案号可以使用"); |
| ... | ... | @@ -1804,7 +1804,7 @@ |
| 1804 | 1804 | */ |
| 1805 | 1805 | public BaseObjectResponse findHighRiskDocNoIsDuplicate(String id) { |
| 1806 | 1806 | BaseObjectResponse br = new BaseObjectResponse(); |
| 1807 | - Patients data = patientsService.findOnePatientById(id); | |
| 1807 | + Patients data = patientsService.findOnePatientByHighRiskDocNo(id); | |
| 1808 | 1808 | if (data == null || data.getYn() == YnEnums.NO.getId()) { |
| 1809 | 1809 | br.setErrorcode(201); |
| 1810 | 1810 | br.setErrormsg("该高危档案号可以使用"); |