Commit 65be5eabb065c8f1da871d5ed55684e32076742a

Authored by liquanyu
1 parent cd2cccf551

高危修改

Showing 3 changed files with 66 additions and 0 deletions

platform-dal/src/main/java/com/lyms/platform/query/PatientCourseQuery.java View file @ 65be5ea
... ... @@ -5,6 +5,7 @@
5 5 import com.lyms.platform.common.dao.operator.MongoCondition;
6 6 import com.lyms.platform.common.dao.operator.MongoOper;
7 7 import com.lyms.platform.common.dao.operator.MongoQuery;
  8 +import org.springframework.data.mongodb.core.query.Criteria;
8 9  
9 10 import java.util.Date;
10 11  
... ... @@ -60,6 +61,8 @@
60 61  
61 62 private String hospitalId;
62 63  
  64 + private String queryNo;
  65 +
63 66 @Override
64 67 public MongoQuery convertToQuery() {
65 68 MongoCondition condition = MongoCondition.newInstance();
66 69  
67 70  
... ... @@ -106,10 +109,36 @@
106 109 if (null != yn) {
107 110 condition = condition.and("yn", yn, MongoOper.IS);
108 111 }
  112 + Criteria c1 = null;
109 113  
  114 + if (null != queryNo) {
  115 + MongoCondition c = MongoCondition.newInstance();
  116 + MongoCondition con1 = MongoCondition.newInstance("phone", queryNo, MongoOper.IS);
  117 + MongoCondition con3 = MongoCondition.newInstance("cardNo", queryNo, MongoOper.IS);
  118 + MongoCondition con5 = MongoCondition.newInstance("vcCardNo", queryNo, MongoOper.IS);
  119 + if (c1 != null) {
  120 + c1 = c1.andOperator(c.orCondition(new MongoCondition[]{con1, con3, con5}).getCriteria());
  121 + } else {
  122 + c1 = c.orCondition(new MongoCondition[]{con1, con3, con5}).getCriteria();
  123 + }
  124 + }
  125 +
  126 +
  127 + if (null != c1) {
  128 + condition = condition.andCondition(new MongoCondition(c1));
  129 +
  130 + }
  131 +
110 132 return condition.toMongoQuery();
111 133 }
112 134  
  135 + public String getQueryNo() {
  136 + return queryNo;
  137 + }
  138 +
  139 + public void setQueryNo(String queryNo) {
  140 + this.queryNo = queryNo;
  141 + }
113 142  
114 143 public String getId() {
115 144 return id;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientCourseController.java View file @ 65be5ea
... ... @@ -56,5 +56,22 @@
56 56  
57 57 return patientCourseFacade.getPatientCourseList(2,courseId, page, limit, getUserId(request));
58 58 }
  59 +
  60 +
  61 + /**
  62 + * 搜索预约详情
  63 + * @param queryNo
  64 + * @param request
  65 + * @return
  66 + */
  67 + @RequestMapping(method = RequestMethod.GET, value = "/queryOrderPatient")
  68 + @ResponseBody
  69 + @TokenRequired
  70 + public BaseResponse queryOrderPatient(
  71 + @RequestParam(required = true) String queryNo,
  72 + HttpServletRequest request) {
  73 +
  74 + return patientCourseFacade.queryOrderPatient(queryNo, getUserId(request));
  75 + }
59 76 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientCourseFacade.java View file @ 65be5ea
... ... @@ -11,10 +11,13 @@
11 11 import com.lyms.platform.common.utils.DateUtil;
12 12 import com.lyms.platform.operate.web.result.PatientCourseResult;
13 13 import com.lyms.platform.permission.service.UsersService;
  14 +import com.lyms.platform.pojo.CourseModel;
14 15 import com.lyms.platform.pojo.PatientCourseModel;
15 16 import com.lyms.platform.pojo.Patients;
  17 +import com.lyms.platform.query.CourseQuery;
16 18 import com.lyms.platform.query.PatientCourseQuery;
17 19 import org.apache.commons.collections.CollectionUtils;
  20 +import org.apache.commons.lang.StringUtils;
18 21 import org.springframework.beans.factory.annotation.Autowired;
19 22 import org.springframework.stereotype.Component;
20 23  
... ... @@ -96,5 +99,22 @@
96 99 return objectResponse;
97 100 }
98 101  
  102 + public BaseResponse queryOrderPatient(String queryNo, Integer userId) {
  103 + String hospitalId = autoMatchFacade.getHospitalId(userId);
  104 +
  105 + PatientCourseQuery patientCourseQuery = new PatientCourseQuery();
  106 + patientCourseQuery.setYn(YnEnums.YES.getId());
  107 +
  108 + patientCourseQuery.setHospitalId(hospitalId);
  109 + patientCourseQuery.setQueryNo(queryNo);
  110 + //状态 1预约,2签到
  111 + patientCourseQuery.setStatus(1);
  112 +
  113 + List<PatientCourseResult> results = new ArrayList<>();
  114 +
  115 +
  116 + List<PatientCourseModel> patientCourseModels = patientCourseService.queryPatientCourseList(patientCourseQuery);
  117 + return null;
  118 + }
99 119 }