Progr1mmer 6 年之前
父節點
當前提交
f9fd515fb1

+ 4 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/specialist/SpecialistMapping.java

@ -45,4 +45,8 @@ public class SpecialistMapping {
        public static final String getScreenCount = "/getScreenCount";
        public static final String getScreenResultDetail = "/getScreenResultDetail";
    }
    public static class rehabilitation{
        public static final String findRehabilitationPlan = "/findRehabilitationPlan";
    }
}

+ 43 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationManageController.java

@ -0,0 +1,43 @@
package com.yihu.jw.controller.rehabilitation;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.specialist.SpecialistMapping;
import com.yihu.jw.service.rehabilitation.RehabilitationManageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by 刘文彬 on 2018/8/16.
 */
@RestController
@RequestMapping(SpecialistMapping.api_specialist_common)
@Api(tags = "康复计划管理相关操作", description = "康复计划管理相关操作")
public class RehabilitationManageController {
    @Autowired
    private RehabilitationManageService rehabilitationManageService;
    @Autowired
    private Tracer tracer;
    @GetMapping(value = SpecialistMapping.rehabilitation.findRehabilitationPlan)
    @ApiOperation(value = "康复管理列表")
    public Envelop findRehabilitationPlan(@ApiParam(name = "page", value = "第几页,从1开始")
                                             @RequestParam(value = "page", required = false)Integer page,
                                          @ApiParam(name = "size", value = ",每页分页大小")
                                             @RequestParam(value = "size", required = false)Integer size){
        try {
            return null;
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
}

+ 13 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/rehabilitation/PatientRehabilitationPlanDao.java

@ -0,0 +1,13 @@
package com.yihu.jw.dao.rehabilitation;
import com.yihu.jw.entity.specialist.rehabilitation.PatientRehabilitationPlanDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by 刘文彬 on 2018/8/16.
 */
public interface PatientRehabilitationPlanDao extends PagingAndSortingRepository<PatientRehabilitationPlanDO, Long>,JpaSpecificationExecutor<PatientRehabilitationPlanDO> {
}

+ 26 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -0,0 +1,26 @@
package com.yihu.jw.service.rehabilitation;
import com.yihu.jw.restmodel.common.Envelop;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Map;
/**
 * Created by 刘文彬 on 2018/8/16.
 */
@Service
@Transactional
public class RehabilitationManageService {
    public Envelop<Map<String,Object>> findRehabilitationPlan(String doctorCode, String diseaseCode, Integer planType, Integer page, Integer pageSize){
        page = page-1;
        Pageable pageRequest = new PageRequest(page, pageSize);
        return null;
    }
}