张延森 3 anni fa
parent
commit
40a6560c42

+ 1
- 1
deploy/bootstrap Vedi File

2
 #
2
 #
3
 #
3
 #
4
 
4
 
5
-appVer="0.0.6"
5
+appVer="0.0.8"
6
 
6
 
7
 java -jar ./medical-plat-${appVer}.jar
7
 java -jar ./medical-plat-${appVer}.jar

+ 1
- 1
deploy/template.yml Vedi File

11
       Properties:
11
       Properties:
12
         Handler: com.yunzhi.demo.SpringApplication::main
12
         Handler: com.yunzhi.demo.SpringApplication::main
13
         Runtime: custom
13
         Runtime: custom
14
-        CodeUri: 'oss://yz-serverless/medical-plat/medical-plat-0.0.6.zip'
14
+        CodeUri: 'oss://yz-serverless/medical-plat/medical-plat-0.0.8.zip'
15
         MemorySize: 1024
15
         MemorySize: 1024
16
         Timeout: 30
16
         Timeout: 30
17
         InitializationTimeout: 30
17
         InitializationTimeout: 30

+ 1
- 1
pom.xml Vedi File

10
 	</parent>
10
 	</parent>
11
 	<groupId>com.yunzhi</groupId>
11
 	<groupId>com.yunzhi</groupId>
12
 	<artifactId>medical-plat</artifactId>
12
 	<artifactId>medical-plat</artifactId>
13
-	<version>0.0.6</version>
13
+	<version>0.0.8</version>
14
 	<name>medical-plat</name>
14
 	<name>medical-plat</name>
15
 	<description>Demo project for Spring Boot</description>
15
 	<description>Demo project for Spring Boot</description>
16
 
16
 

+ 12
- 2
src/main/java/com/yunzhi/demo/controller/TaTestLogController.java Vedi File

62
                                       @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
62
                                       @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
63
         TaPerson taPerson = getCurrentPerson();
63
         TaPerson taPerson = getCurrentPerson();
64
         TaStudent taStudent = iTaStudentService.getByPersonId(taPerson.getPersonId());
64
         TaStudent taStudent = iTaStudentService.getByPersonId(taPerson.getPersonId());
65
-        String studentId = taStudent == null ? "******" : taStudent.getStudentId();
65
+        String schoolId = taStudent == null ? "******" : taStudent.getSchoolId();
66
+        String studentNo = taStudent == null ? "******" : taStudent.getStudentNo();
66
 
67
 
67
         IPage<TaTestLog> pg = new Page<>(pageNum, pageSize);
68
         IPage<TaTestLog> pg = new Page<>(pageNum, pageSize);
68
         QueryWrapper<TaTestLog> queryWrapper = new QueryWrapper<>();
69
         QueryWrapper<TaTestLog> queryWrapper = new QueryWrapper<>();
69
-        queryWrapper.eq("student_id", studentId);
70
+        queryWrapper.eq("school_id", schoolId);
71
+        queryWrapper.eq("student_no", studentNo);
70
         queryWrapper.eq("status", Constants.STATUS_NORMAL);
72
         queryWrapper.eq("status", Constants.STATUS_NORMAL);
71
         queryWrapper.orderByDesc("create_date");
73
         queryWrapper.orderByDesc("create_date");
72
 
74
 
103
     @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
105
     @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
104
     public ResponseBean taTestLogAdd(@ApiParam("保存内容") @RequestBody TaTestLog taTestLog) throws Exception{
106
     public ResponseBean taTestLogAdd(@ApiParam("保存内容") @RequestBody TaTestLog taTestLog) throws Exception{
105
 
107
 
108
+        if (StringUtils.isEmpty(taTestLog.getSchoolId())) {
109
+            return ResponseBean.error("没有找到学校信息", ResponseBean.ERROR_UNAVAILABLE);
110
+        }
111
+
106
         if (iTaTestLogService.save(taTestLog)){
112
         if (iTaTestLogService.save(taTestLog)){
107
             return ResponseBean.success(taTestLog);
113
             return ResponseBean.success(taTestLog);
108
         }else {
114
         }else {
171
     public ResponseBean taTestLogUpdate(@ApiParam("对象ID") @PathVariable Integer id,
177
     public ResponseBean taTestLogUpdate(@ApiParam("对象ID") @PathVariable Integer id,
172
                                         @ApiParam("更新内容") @RequestBody TaTestLog taTestLog) throws Exception{
178
                                         @ApiParam("更新内容") @RequestBody TaTestLog taTestLog) throws Exception{
173
 
179
 
180
+        if (StringUtils.isEmpty(taTestLog.getSchoolId())) {
181
+            return ResponseBean.error("没有找到学校信息", ResponseBean.ERROR_UNAVAILABLE);
182
+        }
183
+
174
         if (iTaTestLogService.updateById(taTestLog)){
184
         if (iTaTestLogService.updateById(taTestLog)){
175
             return ResponseBean.success(iTaTestLogService.getById(id));
185
             return ResponseBean.success(iTaTestLogService.getById(id));
176
         }else {
186
         }else {

+ 3
- 3
src/main/java/com/yunzhi/demo/controller/TdSpecialtyController.java Vedi File

41
     public ResponseBean maSchoolList(@ApiParam(value = "学校ID", required = false) @RequestParam(value ="school", required = false) String school,
41
     public ResponseBean maSchoolList(@ApiParam(value = "学校ID", required = false) @RequestParam(value ="school", required = false) String school,
42
                                      @ApiParam(value = "名称", required = false) @RequestParam(value ="name", required = false) String name) throws Exception {
42
                                      @ApiParam(value = "名称", required = false) @RequestParam(value ="name", required = false) String name) throws Exception {
43
         QueryWrapper<TdSpecialty> queryWrapper = new QueryWrapper<TdSpecialty>()
43
         QueryWrapper<TdSpecialty> queryWrapper = new QueryWrapper<TdSpecialty>()
44
-                .eq(!StringUtils.isEmpty(school),"schoolId", school)
44
+                .eq(!StringUtils.isEmpty(school),"school_id", school)
45
                 .like(!StringUtils.isEmpty(name), "name", "%"+name+"%")
45
                 .like(!StringUtils.isEmpty(name), "name", "%"+name+"%")
46
                 .eq("status", Constants.STATUS_NORMAL)
46
                 .eq("status", Constants.STATUS_NORMAL)
47
                 .orderByAsc("sort_no")
47
                 .orderByAsc("sort_no")
77
     @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
77
     @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
78
     public ResponseBean adminSpecialtyList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
78
     public ResponseBean adminSpecialtyList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
79
                                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
79
                                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
80
-                                           @ApiParam(value = "学校ID", required = false) @RequestParam(value ="schoolId", required = false) String schoolId,
80
+                                           @ApiParam(value = "学校ID", required = false) @RequestParam(value ="school", required = false) String school,
81
                                            @ApiParam(value = "名称", required = false) @RequestParam(value ="name", required = false) String name) throws Exception {
81
                                            @ApiParam(value = "名称", required = false) @RequestParam(value ="name", required = false) String name) throws Exception {
82
 
82
 
83
         IPage<TdSpecialty> pg = new Page<>(pageNum, pageSize);
83
         IPage<TdSpecialty> pg = new Page<>(pageNum, pageSize);
84
         QueryWrapper<TdSpecialty> queryWrapper = new QueryWrapper<TdSpecialty>()
84
         QueryWrapper<TdSpecialty> queryWrapper = new QueryWrapper<TdSpecialty>()
85
-                .eq(!StringUtils.isEmpty(schoolId),"school_id", schoolId)
85
+                .eq(!StringUtils.isEmpty(school),"school_id", school)
86
                 .like(!StringUtils.isEmpty(name), "name", "%"+name+"%")
86
                 .like(!StringUtils.isEmpty(name), "name", "%"+name+"%")
87
                 .eq("status", Constants.STATUS_NORMAL)
87
                 .eq("status", Constants.STATUS_NORMAL)
88
                 .orderByAsc("sort_no")
88
                 .orderByAsc("sort_no")

+ 17
- 5
src/main/resources/mapper/TaTestLogMapper.xml Vedi File

4
 
4
 
5
     <select id="getTestLogWithStudent" resultType="com.yunzhi.demo.vo.StudentTestLog">
5
     <select id="getTestLogWithStudent" resultType="com.yunzhi.demo.vo.StudentTestLog">
6
         SELECT
6
         SELECT
7
-            b.*,
7
+            b.student_id,
8
+            b.name,
9
+            b.sex,
10
+            b.phone,
11
+            b.e_mail,
12
+            a.school_id,
13
+            b.school_batch,
14
+            b.specialty_id,
15
+            a.student_no,
16
+            b.person_id,
17
+            b.status,
18
+            b.create_date,
19
+            b.update_date,
8
             a.`name` as test_name,
20
             a.`name` as test_name,
9
             a.serial_no,
21
             a.serial_no,
10
             a.attchment,
22
             a.attchment,
12
             d.`name` as specialty_name
24
             d.`name` as specialty_name
13
         FROM
25
         FROM
14
             ta_test_log a
26
             ta_test_log a
15
-            LEFT JOIN ta_student b on a.student_id = b.student_id
16
-            LEFT JOIN td_school c on b.school_id = c.school_id
27
+            LEFT JOIN ta_student b on a.student_no = b.student_no
28
+            LEFT JOIN td_school c on a.school_id = c.school_id
17
             LEFT JOIN td_specialty d on b.specialty_id = d.specialty_id
29
             LEFT JOIN td_specialty d on b.specialty_id = d.specialty_id
18
         WHERE
30
         WHERE
19
             a.`status` > - 1
31
             a.`status` > - 1
20
         <if test="studentNo != null and studentNo != ''">
32
         <if test="studentNo != null and studentNo != ''">
21
-            AND b.student_no LIKE CONCAT( '%', #{studentNo}, '%' )
33
+            AND a.student_no LIKE CONCAT( '%', #{studentNo}, '%' )
22
         </if>
34
         </if>
23
         <if test="schoolId != null and schoolId != ''">
35
         <if test="schoolId != null and schoolId != ''">
24
-            AND b.school_id = #{schoolId}
36
+            AND a.school_id = #{schoolId}
25
         </if>
37
         </if>
26
         <if test="specialtyId != null and specialtyId != ''">
38
         <if test="specialtyId != null and specialtyId != ''">
27
             AND b.specialty_id = #{specialtyId}
39
             AND b.specialty_id = #{specialtyId}