Commit f636b9494e8e438292c27c9d17a1b2d0ba8aa2b7
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 5 changed files
- platform-biz-service/src/main/resources/mainOrm/master/MeasureDataInfoMapper.xml
- platform-dal/src/main/java/com/lyms/platform/query/MeasureDataInfoQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientCourseController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientCourseFacade.java
platform-biz-service/src/main/resources/mainOrm/master/MeasureDataInfoMapper.xml
View file @
f636b94
| ... | ... | @@ -107,6 +107,11 @@ |
| 107 | 107 | <if test="recordCount != null and recordCount >= 0"> |
| 108 | 108 | and m.record_count = #{m.recordCount,jdbcType=INTEGER} |
| 109 | 109 | </if> |
| 110 | + | |
| 111 | + <if test="modified != null"> | |
| 112 | + AND date_format(m.modified,'%Y-%m-%d') = #{modified} | |
| 113 | + </if> | |
| 114 | + | |
| 110 | 115 | <if test="createdTimeStart != null"> |
| 111 | 116 | AND m.created >= date_format(#{createdTimeStart},'%Y-%m-%d') |
| 112 | 117 | </if> |
platform-dal/src/main/java/com/lyms/platform/query/MeasureDataInfoQuery.java
View file @
f636b94
| ... | ... | @@ -53,6 +53,7 @@ |
| 53 | 53 | private Date modifiedTimeStart; |
| 54 | 54 | |
| 55 | 55 | private Date modifiedTimeEnd; |
| 56 | + | |
| 56 | 57 | //面部 |
| 57 | 58 | private String face; |
| 58 | 59 | |
| 59 | 60 | |
| ... | ... | @@ -75,9 +76,9 @@ |
| 75 | 76 | private Integer recordCount; |
| 76 | 77 | |
| 77 | 78 | //创建时间 |
| 78 | - private Date created; | |
| 79 | + private String created; | |
| 79 | 80 | //修改时间 |
| 80 | - private Date modified; | |
| 81 | + private String modified; | |
| 81 | 82 | |
| 82 | 83 | //当天记录次数 |
| 83 | 84 | private Integer todayCount; |
| 84 | 85 | |
| 85 | 86 | |
| ... | ... | @@ -178,12 +179,19 @@ |
| 178 | 179 | } |
| 179 | 180 | |
| 180 | 181 | |
| 182 | + public Date getModifiedTimeEnd() { | |
| 183 | + return modifiedTimeEnd; | |
| 184 | + } | |
| 181 | 185 | |
| 182 | - public Date getCreated() { | |
| 186 | + public void setModifiedTimeEnd(Date modifiedTimeEnd) { | |
| 187 | + this.modifiedTimeEnd = modifiedTimeEnd; | |
| 188 | + } | |
| 189 | + | |
| 190 | + public String getCreated() { | |
| 183 | 191 | return created; |
| 184 | 192 | } |
| 185 | 193 | |
| 186 | - public void setCreated(Date created) { | |
| 194 | + public void setCreated(String created) { | |
| 187 | 195 | this.created = created; |
| 188 | 196 | } |
| 189 | 197 | |
| 190 | 198 | |
| ... | ... | @@ -299,11 +307,11 @@ |
| 299 | 307 | this.recordCount = recordCount; |
| 300 | 308 | } |
| 301 | 309 | |
| 302 | - public Date getModified() { | |
| 310 | + public String getModified() { | |
| 303 | 311 | return modified; |
| 304 | 312 | } |
| 305 | 313 | |
| 306 | - public void setModified(Date modified) { | |
| 314 | + public void setModified(String modified) { | |
| 307 | 315 | this.modified = modified; |
| 308 | 316 | } |
| 309 | 317 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientCourseController.java
View file @
f636b94
| ... | ... | @@ -22,26 +22,22 @@ |
| 22 | 22 | private PatientCourseFacade patientCourseFacade; |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | - * 预约列表 | |
| 26 | - * @param courseId 课程id | |
| 25 | + * 可预约课程 | |
| 27 | 26 | * @param request |
| 28 | 27 | * @return |
| 29 | 28 | */ |
| 30 | 29 | @RequestMapping(method = RequestMethod.GET, value = "/getOrderPatientCourseList") |
| 31 | 30 | @ResponseBody |
| 32 | 31 | @TokenRequired |
| 33 | - public BaseResponse getOrderPatientCourseList(@RequestParam(required = false) String courseId, | |
| 34 | - @RequestParam("page") Integer page, | |
| 35 | - @RequestParam("limit") Integer limit, | |
| 32 | + public BaseResponse getOrderPatientCourseList( | |
| 36 | 33 | HttpServletRequest request) { |
| 37 | 34 | |
| 38 | - return patientCourseFacade.getPatientCourseList(1,courseId, page,limit,getUserId(request)); | |
| 35 | + return patientCourseFacade.getPatientCourseList(getUserId(request)); | |
| 39 | 36 | } |
| 40 | 37 | |
| 41 | 38 | |
| 42 | 39 | /** |
| 43 | 40 | * 签到列表 |
| 44 | - * @param courseId 课程id | |
| 45 | 41 | * @param request |
| 46 | 42 | * @return |
| 47 | 43 | */ |
| 48 | 44 | |
| ... | ... | @@ -49,12 +45,9 @@ |
| 49 | 45 | @ResponseBody |
| 50 | 46 | @TokenRequired |
| 51 | 47 | public BaseResponse getSignPatientCourseList( |
| 52 | - @RequestParam(required = false) String courseId, | |
| 53 | - @RequestParam("page") Integer page, | |
| 54 | - @RequestParam("limit") Integer limit, | |
| 55 | 48 | HttpServletRequest request) { |
| 56 | 49 | |
| 57 | - return patientCourseFacade.getPatientCourseList(2,courseId, page, limit, getUserId(request)); | |
| 50 | + return patientCourseFacade.getPatientCourseList(getUserId(request)); | |
| 58 | 51 | } |
| 59 | 52 | |
| 60 | 53 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
View file @
f636b94
| ... | ... | @@ -540,6 +540,7 @@ |
| 540 | 540 | query.setCertNo(certNo); |
| 541 | 541 | query.setCertType(certType); |
| 542 | 542 | query.setHospitalId(hospitalId); |
| 543 | + query.setModified(DateUtil.getyyyy_MM_dd(new Date())); | |
| 543 | 544 | List<MeasureDataInfoModel> list = mysqlMeasureDataInfoService.queryMeasureList(query); |
| 544 | 545 | if (CollectionUtils.isNotEmpty(list)) |
| 545 | 546 | { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientCourseFacade.java
View file @
f636b94
| ... | ... | @@ -6,14 +6,17 @@ |
| 6 | 6 | import com.lyms.platform.biz.service.PatientCourseService; |
| 7 | 7 | import com.lyms.platform.biz.service.PatientsService; |
| 8 | 8 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 9 | +import com.lyms.platform.common.enums.CourseStatusEnums; | |
| 9 | 10 | import com.lyms.platform.common.enums.YnEnums; |
| 10 | 11 | import com.lyms.platform.common.result.BaseListResponse; |
| 11 | 12 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 12 | 13 | import com.lyms.platform.common.result.BaseResponse; |
| 13 | 14 | import com.lyms.platform.common.utils.DateUtil; |
| 15 | +import com.lyms.platform.operate.web.result.CourseResult; | |
| 14 | 16 | import com.lyms.platform.operate.web.result.CourseTypeResult; |
| 15 | 17 | import com.lyms.platform.operate.web.result.PatientCourseResult; |
| 16 | 18 | import com.lyms.platform.permission.model.Organization; |
| 19 | +import com.lyms.platform.permission.model.Users; | |
| 17 | 20 | import com.lyms.platform.permission.service.OrganizationService; |
| 18 | 21 | import com.lyms.platform.permission.service.UsersService; |
| 19 | 22 | import com.lyms.platform.pojo.CourseModel; |
| 20 | 23 | |
| 21 | 24 | |
| 22 | 25 | |
| 23 | 26 | |
| ... | ... | @@ -61,31 +64,74 @@ |
| 61 | 64 | private OrganizationService organizationService; |
| 62 | 65 | |
| 63 | 66 | |
| 64 | - public BaseResponse getPatientCourseList(Integer status,String courseId, Integer page, | |
| 65 | - Integer limit, Integer userId) { | |
| 67 | + public BaseResponse getPatientCourseList(Integer userId) { | |
| 66 | 68 | |
| 67 | 69 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 70 | + CourseQuery query = new CourseQuery(); | |
| 71 | + query.setYn(YnEnums.YES.getId()); | |
| 72 | + query.setStatus(CourseStatusEnums.YFB.getId()); | |
| 73 | + query.setHospitalId(hospitalId); | |
| 74 | + List<CourseResult> results = getCourseList(query); | |
| 68 | 75 | |
| 69 | - PatientCourseQuery patientCourseQuery = new PatientCourseQuery(); | |
| 70 | - patientCourseQuery.setYn(YnEnums.YES.getId()); | |
| 71 | - patientCourseQuery.setNeed("true"); | |
| 72 | - patientCourseQuery.setPage(page); | |
| 73 | - patientCourseQuery.setLimit(limit); | |
| 74 | - patientCourseQuery.setHospitalId(hospitalId); | |
| 75 | - patientCourseQuery.setCourseId(courseId); | |
| 76 | - //状态 1预约,2签到 | |
| 77 | - patientCourseQuery.setStatus(status); | |
| 78 | - | |
| 79 | - List<PatientCourseResult> results = getPatientCourse(patientCourseQuery); | |
| 80 | - | |
| 81 | 76 | BaseListResponse objectResponse = new BaseListResponse(); |
| 82 | 77 | objectResponse.setData(results); |
| 83 | - objectResponse.setPageInfo(patientCourseQuery.getPageInfo()); | |
| 78 | + objectResponse.setPageInfo(query.getPageInfo()); | |
| 84 | 79 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 85 | 80 | objectResponse.setErrormsg("成功"); |
| 86 | 81 | return objectResponse; |
| 87 | 82 | } |
| 88 | 83 | |
| 84 | + private List<CourseResult> getCourseList(CourseQuery query) { | |
| 85 | + | |
| 86 | + List<CourseModel> courseModels = courseService.queryCourseList(query); | |
| 87 | + List<CourseResult> results = new ArrayList<>(); | |
| 88 | + CourseTypeQuery courseTypeQuery = new CourseTypeQuery(); | |
| 89 | + courseTypeQuery.setYn(YnEnums.YES.getId()); | |
| 90 | + | |
| 91 | + if (CollectionUtils.isNotEmpty(courseModels)) | |
| 92 | + { | |
| 93 | + for (CourseModel model : courseModels) | |
| 94 | + { | |
| 95 | + CourseResult result = new CourseResult(); | |
| 96 | + result.setId(model.getId()); | |
| 97 | + | |
| 98 | + String courseType = ""; | |
| 99 | + courseTypeQuery.setId(model.getCourseTypeId()); | |
| 100 | + List<CourseTypeModel> typeModels = courseTypeService.queryCourseTypeList(courseTypeQuery); | |
| 101 | + if (CollectionUtils.isNotEmpty(typeModels)) | |
| 102 | + { | |
| 103 | + courseType = typeModels.get(0).getCourseTypeName(); | |
| 104 | + } | |
| 105 | + result.setCourseType(courseType); | |
| 106 | + result.setCourseTypeId(model.getCourseTypeId()); | |
| 107 | + | |
| 108 | + result.setCourseName(model.getCourseName()); | |
| 109 | + result.setCourseSpeaker(model.getCourseSpeaker()); | |
| 110 | + result.setCourseAddress(model.getCourseAddress()); | |
| 111 | + result.setCourseTime(DateUtil.gety_m_dhm(model.getCourseTime())); | |
| 112 | + result.setTimeLong(model.getTimeLong()); | |
| 113 | + result.setLimitNum(model.getLimitNum()); | |
| 114 | + result.setEnrolmentNum(model.getEnrolmentNum()); | |
| 115 | + result.setSignNum(model.getSignNum()); | |
| 116 | + result.setStatus(CourseStatusEnums.getNameById(model.getStatus())); | |
| 117 | + result.setCourseRemark(model.getCourseRemark()); | |
| 118 | + result.setCourseDesc(model.getCourseDesc()); | |
| 119 | + | |
| 120 | + String createUser = ""; | |
| 121 | + Users users = usersService.getUsers(Integer.parseInt(model.getCreateUserId())); | |
| 122 | + if (users != null && users.getYn() == YnEnums.YES.getId()) { | |
| 123 | + createUser = users.getName(); | |
| 124 | + } | |
| 125 | + result.setCreateUser(createUser); | |
| 126 | + | |
| 127 | + result.setCreated(DateUtil.getyyyy_MM_dd_hms(model.getCreated())); | |
| 128 | + results.add(result); | |
| 129 | + } | |
| 130 | + } | |
| 131 | + | |
| 132 | + return results; | |
| 133 | + } | |
| 134 | + | |
| 89 | 135 | public BaseResponse queryOrderPatient(String queryNo,String courseId, Integer userId) { |
| 90 | 136 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 91 | 137 | |
| ... | ... | @@ -143,6 +189,7 @@ |
| 143 | 189 | |
| 144 | 190 | private List<PatientCourseResult> getPatientCourse(PatientCourseQuery patientCourseQuery) |
| 145 | 191 | { |
| 192 | + | |
| 146 | 193 | List<PatientCourseResult> results = new ArrayList<>(); |
| 147 | 194 | List<PatientCourseModel> patientCourseModels = patientCourseService.queryPatientCourseList(patientCourseQuery); |
| 148 | 195 | if (CollectionUtils.isNotEmpty(patientCourseModels)) |