张延森 4 年之前
父節點
當前提交
dbf4e8ee4f

+ 4
- 28
src/main/java/com/yunzhi/demo/controller/TaMedicalLogController.java 查看文件

@@ -85,35 +85,11 @@ public class TaMedicalLogController extends BaseController {
85 85
                                        @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
86 86
                                        @ApiParam("学校ID") @RequestParam(value ="schoolId", required = false) String schoolId,
87 87
                                        @ApiParam("专业ID") @RequestParam(value ="specialtyId", required = false) String specialtyId,
88
-                                       @ApiParam("学号") @RequestParam(value ="studentId", required = false) String studentId) throws Exception{
88
+                                       @ApiParam("学号") @RequestParam(value ="studentNo", required = false) String studentNo) throws Exception{
89 89
 
90
-		    IPage<TaMedicalLog> pg = new Page<>(pageNum, pageSize);
91
-//            QueryWrapper<TaMedicalLog> queryWrapper = new QueryWrapper<>();
92
-//            queryWrapper.orderByDesc("create_date");
93
-
94
-//            IPage<TaPerson> pg = new Page<>(pageNum, pageSize);
95
-//            QueryWrapper<TaPerson> queryWrapper = new QueryWrapper<TaPerson>()
96
-//                    .gt("status", Constants.STATUS_DELETED)
97
-//                    .eq(!StringUtils.isEmpty(schoolId), "school_id", schoolId)
98
-//                    .eq(!StringUtils.isEmpty(specialtyId), "specialty_id", specialtyId)
99
-//                    .like(!StringUtils.isEmpty(studentId), "student_id", "%"+studentId+"%");
100
-
101
-//        IPage<TaPerson> pg = new Page<>(pageNum, pageSize);
102
-//        QueryWrapper<TaPerson> queryWrapper = new QueryWrapper<TaPerson>()
103
-//                .gt("student_id", "")
104
-//                .gt("status", Constants.STATUS_DELETED)
105
-//                .like(!StringUtils.isEmpty(name), "name", "%"+name+"%")
106
-//                .eq(!StringUtils.isEmpty(schoolId), "school_id", schoolId)
107
-//                .eq(!StringUtils.isEmpty(specialtyId), "specialty_id", specialtyId)
108
-//                .like(!StringUtils.isEmpty(phone), "phone", "%"+phone+"%")
109
-//                .like(!StringUtils.isEmpty(studentId), "student_id", "%"+studentId+"%")
110
-//                .orderByDesc("create_date");
111
-//
112
-        IPage<TaMedicalLog> result = iTaMedicalLogService.getMedicalLogPagedBy(pg, schoolId, specialtyId, studentId);
113
-//        return ResponseBean.success(result);
114
-
115
-//            IPage<TaMedicalLog> result = iTaMedicalLogService.page(pg, queryWrapper);
116
-            return ResponseBean.success(result);
90
+        IPage<TaMedicalLog> pg = new Page<>(pageNum, pageSize);
91
+        IPage<TaMedicalLog> result = iTaMedicalLogService.getMedicalLogPagedBy(pg, schoolId, specialtyId, studentNo);
92
+        return ResponseBean.success(result);
117 93
     }
118 94
 
119 95
     /**

+ 1
- 1
src/main/java/com/yunzhi/demo/mapper/TaMedicalLogMapper.java 查看文件

@@ -21,5 +21,5 @@ public interface TaMedicalLogMapper extends BaseMapper<TaMedicalLog> {
21 21
     IPage<TaMedicalLog> getMedicalLogPagedBy(IPage<TaMedicalLog> pg,
22 22
                                           @Param("schoolId") String schoolId,
23 23
                                           @Param("specialtyId") String specialtyId,
24
-                                          @Param("studentId") String studentId);
24
+                                          @Param("studentNo") String studentNo);
25 25
 }

+ 1
- 1
src/main/java/com/yunzhi/demo/service/ITaMedicalLogService.java 查看文件

@@ -15,5 +15,5 @@ import com.yunzhi.demo.entity.TaPerson;
15 15
  */
16 16
 public interface ITaMedicalLogService extends IService<TaMedicalLog> {
17 17
 
18
-    IPage<TaMedicalLog> getMedicalLogPagedBy(IPage<TaMedicalLog> pg, String schoolId, String specialtyId, String studentId);
18
+    IPage<TaMedicalLog> getMedicalLogPagedBy(IPage<TaMedicalLog> pg, String schoolId, String specialtyId, String studentNo);
19 19
 }

+ 2
- 2
src/main/java/com/yunzhi/demo/service/impl/TaMedicalLogServiceImpl.java 查看文件

@@ -25,7 +25,7 @@ public class TaMedicalLogServiceImpl extends ServiceImpl<TaMedicalLogMapper, TaM
25 25
     TaMedicalLogMapper taMedicalLogMapper;
26 26
 
27 27
     @Override
28
-    public IPage<TaMedicalLog> getMedicalLogPagedBy(IPage<TaMedicalLog> pg, String schoolId, String specialtyId, String studentId) {
29
-        return taMedicalLogMapper.getMedicalLogPagedBy(pg, schoolId, specialtyId, studentId);
28
+    public IPage<TaMedicalLog> getMedicalLogPagedBy(IPage<TaMedicalLog> pg, String schoolId, String specialtyId, String studentNo) {
29
+        return taMedicalLogMapper.getMedicalLogPagedBy(pg, schoolId, specialtyId, studentNo);
30 30
     }
31 31
 }

+ 2
- 2
src/main/resources/application.yml 查看文件

@@ -45,8 +45,8 @@ aliyun:
45 45
 ###
46 46
 weixin:
47 47
   miniapp:
48
-    appid: wxf2956bfef9daf0ae
49
-    secret: 50898eb0e8800c9a0b7c5056a2d1446a
48
+    appid: wx75ce0dc4b59e0458
49
+    secret: 0fb386cad221580dda74b7471460a73e
50 50
     token:
51 51
     aesKey:
52 52
     msgDataFormat: JSON

+ 12
- 29
src/main/resources/mapper/TaMedicalLogMapper.xml 查看文件

@@ -2,44 +2,27 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.yunzhi.demo.mapper.TaMedicalLogMapper">
4 4
 
5
-<!--    SELECT-->
6
-<!--    a.*,-->
7
-<!--    b.`name`,-->
8
-<!--    b.sex,-->
9
-<!--    b.school_id,-->
10
-<!--    b.student_id,-->
11
-<!--    c.`name` as school_name,-->
12
-<!--    d.`name` as specialty_name,-->
13
-<!--    e.user_name as doctor_name-->
14
-<!--    FROM-->
15
-<!--    ta_medical_log a-->
16
-<!--    LEFT JOIN ta_person b on a.person_id = b.person_id-->
17
-<!--    LEFT JOIN td_school c on b.school_id = c.school_id-->
18
-<!--    LEFT JOIN td_specialty d on b.specialty_id = d.specialty_id-->
19
-<!--    LEFT JOIN sys_user e on a.doctor_id = e.user_id-->
20
-<!--    WHERE-->
21
-
22 5
     <select id="getMedicalLogPagedBy" resultType="com.yunzhi.demo.entity.TaMedicalLog">
23 6
         SELECT
24
-        a.*,
25
-        b.`name`,
26
-        b.sex,
27
-        b.school_id,
28
-        b.specialty_id,
29
-        b.student_id,
30
-        c.`name` as school_name,
31
-        d.`name` as specialty_name,
32
-        e.user_name as doctor_name
7
+            a.*,
8
+            b.`name`,
9
+            b.sex,
10
+            b.school_id,
11
+            b.specialty_id,
12
+            b.student_id,
13
+            c.`name` as school_name,
14
+            d.`name` as specialty_name,
15
+            e.user_name as doctor_name
33 16
         FROM
34 17
         ta_medical_log a
35
-        LEFT JOIN ta_person b on a.person_id = b.person_id
18
+        LEFT JOIN ta_student b on a.person_id = b.person_id
36 19
         LEFT JOIN td_school c on b.school_id = c.school_id
37 20
         LEFT JOIN td_specialty d on b.specialty_id = d.specialty_id
38 21
         LEFT JOIN sys_user e on a.doctor_id = e.user_id
39 22
         WHERE
40 23
         a.`status` > - 1
41
-        <if test="studentId != null and studentId != ''">
42
-            AND b.student_id LIKE CONCAT( '%', #{studentId}, '%' )
24
+        <if test="studentNo != null and studentNo != ''">
25
+            AND b.student_no LIKE CONCAT( '%', #{studentNo}, '%' )
43 26
         </if>
44 27
         <if test="schoolId != null and schoolId != ''">
45 28
             AND b.school_id = #{schoolId}