|
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
6
|
6
|
import com.yunzhi.demo.common.BaseController;
|
7
|
7
|
import com.yunzhi.demo.common.Constants;
|
8
|
8
|
import com.yunzhi.demo.common.ResponseBean;
|
|
9
|
+import com.yunzhi.demo.common.StringUtils;
|
9
|
10
|
import com.yunzhi.demo.entity.TaPerson;
|
10
|
11
|
import io.swagger.annotations.Api;
|
11
|
12
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -81,14 +82,38 @@ public class TaMedicalLogController extends BaseController {
|
81
|
82
|
@RequestMapping(value="/admin/medicalLog",method= RequestMethod.GET)
|
82
|
83
|
@ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
|
83
|
84
|
public ResponseBean medicalLogList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
84
|
|
- @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
|
|
85
|
+ @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
|
86
|
+ @ApiParam("学校ID") @RequestParam(value ="schoolId", required = false) String schoolId,
|
|
87
|
+ @ApiParam("专业ID") @RequestParam(value ="specialtyId", required = false) String specialtyId,
|
|
88
|
+ @ApiParam("学号") @RequestParam(value ="studentId", required = false) String studentId) throws Exception{
|
85
|
89
|
|
86
|
|
- IPage<TaMedicalLog> pg = new Page<>(pageNum, pageSize);
|
87
|
|
- QueryWrapper<TaMedicalLog> queryWrapper = new QueryWrapper<>();
|
88
|
|
- queryWrapper.orderByDesc("create_date");
|
89
|
|
-
|
90
|
|
- IPage<TaMedicalLog> result = iTaMedicalLogService.page(pg, queryWrapper);
|
91
|
|
- return ResponseBean.success(result);
|
|
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);
|
92
|
117
|
}
|
93
|
118
|
|
94
|
119
|
/**
|