wujunjie 8 年 前
コミット
a6d831d2f4

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/template/DoctorGuidanceTempService.java

@ -152,10 +152,10 @@ public class DoctorGuidanceTempService extends BaseService {
     * @param type   模板类型
     * @param type   模板类型
     * @return
     * @return
     */
     */
    public List<Map<String,Object>> list(String doctor, String type,int pageSize) throws Exception {
    public List<Map<String,Object>> list(String doctor, String type,int pageSize,int pageNo) throws Exception {
//        List<DoctorGuidanceTemp> temps = null;
//        List<DoctorGuidanceTemp> temps = null;
        Page<List<DoctorGuidanceTemp>> temps = null;
        Page<List<DoctorGuidanceTemp>> temps = null;
        PageRequest pageRequest = new PageRequest(0, pageSize);
        PageRequest pageRequest = new PageRequest(pageNo, pageSize);
        List<Map<String,Object>> listMap = new ArrayList<>();
        List<Map<String,Object>> listMap = new ArrayList<>();

+ 4 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/template/DoctorGuidanceTempController.java

@ -178,10 +178,12 @@ public class DoctorGuidanceTempController extends BaseController {
    @ApiOperation(value = "查询指导模板")
    @ApiOperation(value = "查询指导模板")
    public String list(@RequestParam(required = false, defaultValue = "")
    public String list(@RequestParam(required = false, defaultValue = "")
                       @ApiParam(value = "模板类型 1:系统 2:自定义 为空:所有") String type,
                       @ApiParam(value = "模板类型 1:系统 2:自定义 为空:所有") String type,
                       @RequestParam(defaultValue = "10") String pageSize) {
                       @RequestParam(defaultValue = "10")  String pageSize,
                       @RequestParam(defaultValue = "1") @ApiParam(value = "当前页码") String pageNo) {
        try {
        try {
            int pagesize = Integer.parseInt(pageSize);
            int pagesize = Integer.parseInt(pageSize);
            List<Map<String,Object>> temps = guidanceTempService.list(getUID(), type,pagesize);
            int pageno = Integer.parseInt(pageNo)-1;
            List<Map<String,Object>> temps = guidanceTempService.list(getUID(), type,pagesize,pageno);
            if (temps == null || temps.size() < 1) {
            if (temps == null || temps.size() < 1) {
                return write(200, "查询成功", "data", new JSONArray());
                return write(200, "查询成功", "data", new JSONArray());