Pārlūkot izejas kodu

Merge branch 'dev' of liuwenbin/wlyy2.0 into dev

suxiaoyang 6 gadi atpakaļ
vecāks
revīzija
3544005c75

+ 2 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/PatientRehabilitationPlanDO.java

@ -1,6 +1,6 @@
package com.yihu.jw.entity.specialist.rehabilitation;
import com.yihu.jw.IdEntityWithOperation;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -12,7 +12,7 @@ import java.io.Serializable;
 */
@Entity
@Table(name = "wlyy_patient_rehabilitation_plan")
public class PatientRehabilitationPlanDO extends IdEntityWithOperation implements Serializable {
public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator implements Serializable {
    @Column(name = "saas_id")
    private String saasId;

+ 2 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationDetailDO.java

@ -1,6 +1,6 @@
package com.yihu.jw.entity.specialist.rehabilitation;
import com.yihu.jw.IdEntityWithOperation;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -13,7 +13,7 @@ import java.util.Date;
 */
@Entity
@Table(name = "wlyy_rehabilitation_detail")
public class RehabilitationDetailDO extends IdEntityWithOperation implements Serializable {
public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator implements Serializable {
    @Column(name = "saas_id")
    private String saasId;

+ 2 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationPlanTemplateDO.java

@ -1,6 +1,6 @@
package com.yihu.jw.entity.specialist.rehabilitation;
import com.yihu.jw.IdEntityWithOperation;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -11,7 +11,7 @@ import java.io.Serializable;
 */
@Entity
@Table(name = "wlyy_rehabilitation_plan_template")
public class RehabilitationPlanTemplateDO extends IdEntityWithOperation implements Serializable {
public class RehabilitationPlanTemplateDO extends UuidIdentityEntityWithOperator implements Serializable {
    @Column(name = "saas_id")
    private String saasId;

+ 2 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationTemplateDetailDO.java

@ -1,6 +1,6 @@
package com.yihu.jw.entity.specialist.rehabilitation;
import com.yihu.jw.IdEntityWithOperation;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -11,7 +11,7 @@ import java.io.Serializable;
 */
@Entity
@Table(name = "wlyy_rehabilitation_template_detail")
public class RehabilitationTemplateDetailDO extends IdEntityWithOperation implements Serializable {
public class RehabilitationTemplateDetailDO extends UuidIdentityEntityWithOperator implements Serializable {
    @Column(name = "saas_id")
    private String saasId;

+ 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;
    }
}