Bläddra i källkod

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

huangwenjie 6 år sedan
förälder
incheckning
c8ce4e396a

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

@ -37,5 +37,11 @@ public class SpecialistMapping {
    }
    public static class screen{
        public static final String getScreenResult ="/getScreenResult";
        public static final String getScreenCount = "/getScreenCount";
        public static final String getScreenResultDetail = "/getScreenResultDetail";
    }
}

+ 310 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/specialist/SurveyScreenResultVo.java

@ -0,0 +1,310 @@
package com.yihu.jw.restmodel.specialist;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
/**
 * Created by zhangdan on 2018/7/6.
 */
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(value = "筛查结果", description = "筛查结果")
public class SurveyScreenResultVo{
    @ApiModelProperty("id")
    private long id;
    @ApiModelProperty("唯一标识")
    private String code;
    //
    @ApiModelProperty("模板编码")
    private String templateCode;
    //模板标题
    @ApiModelProperty("模板标题")
    private  String templateTitle;
    //
    @ApiModelProperty("疾病类型(根据模板表的疾病类型定义)")
    private int disease;
    //
    @ApiModelProperty("全科医生code")
    private String doctor;
    //
    @ApiModelProperty("居民code")
    private String patientCode;
    //
    @ApiModelProperty("居民openid")
    private String openId;
    //
    @ApiModelProperty("居民名字")
    private String patientName;
    //筛查结果设置中相关code
    @ApiModelProperty("筛查结果唯一标识")
    private String screenResultCode;
    //筛查结果分值
    @ApiModelProperty("筛查结果分数")
    private Integer screenResultScore;
    //筛查结果
    @ApiModelProperty("筛查结果")
    private String screenResult;
    //是否高危预警(0不是  1是)
    @ApiModelProperty("是否高危预警(0不是  1是)")
    private Integer isDanger;
    //是否预约(0未预约 1已预约)
    @ApiModelProperty("是否预约(0未预约 1已预约)")
    private Integer order;
    //是否跟踪(0未跟踪 1已跟踪)
    @ApiModelProperty("是否跟踪(0未跟踪 1已跟踪)")
    private Integer following;
    //是否进行健康教育(0没有  1有)
    @ApiModelProperty("是否进行健康教育(0没有  1有)")
    private Integer isEducate;
    //是否完成(0未完成 1已完成)
    @ApiModelProperty("是否完成(0未完成 1已完成)")
    private Integer over;
    //预约记录code
    @ApiModelProperty("预约记录code")
    private String reservationCode;
    //创建时间
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date czrq;
    //是否可以再次评估(0不可以 1可以)
    @ApiModelProperty("是否可以再次评估(0不可以 1可以)")
    private int isAgain;
    //再次筛查的上一份记录code
    @ApiModelProperty("再次筛查的上一份记录code")
    private String parentCode;
    //首份记录code
    @ApiModelProperty("首份记录code")
    private String originCode;
    //建议code,多个逗号隔开
    @ApiModelProperty("建议code,多个逗号隔开")
    private String adviceCode;
    //其他建议
    @ApiModelProperty("其他建议")
    private String otherAdvice;
    //来源(1医生发放  2居民自我评估)
    @ApiModelProperty("来源(1医生发放  2居民自我评估)")
    private int source;
    //更新时间
    @ApiModelProperty("更新时间")
    private Date updateTime;
    @ApiModelProperty("身份证号码")
    private String idcard;
    public SurveyScreenResultVo() {
    }
    public long getId() {
        return id;
    }
    public void setId(long id) {
        this.id = id;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getTemplateCode() {
        return templateCode;
    }
    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }
    public String getTemplateTitle() {
        return templateTitle;
    }
    public void setTemplateTitle(String templateTitle) {
        this.templateTitle = templateTitle;
    }
    public int getDisease() {
        return disease;
    }
    public void setDisease(int disease) {
        this.disease = disease;
    }
    public String getDoctor() {
        return doctor;
    }
    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }
    public String getPatientCode() {
        return patientCode;
    }
    public void setPatientCode(String patientCode) {
        this.patientCode = patientCode;
    }
    public String getOpenId() {
        return openId;
    }
    public void setOpenId(String openId) {
        this.openId = openId;
    }
    public String getPatientName() {
        return patientName;
    }
    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }
    public String getScreenResultCode() {
        return screenResultCode;
    }
    public void setScreenResultCode(String screenResultCode) {
        this.screenResultCode = screenResultCode;
    }
    public Integer getScreenResultScore() {
        return screenResultScore;
    }
    public void setScreenResultScore(Integer screenResultScore) {
        this.screenResultScore = screenResultScore;
    }
    public String getScreenResult() {
        return screenResult;
    }
    public void setScreenResult(String screenResult) {
        this.screenResult = screenResult;
    }
    public Integer getIsDanger() {
        return isDanger;
    }
    public void setIsDanger(Integer isDanger) {
        this.isDanger = isDanger;
    }
    public Integer getOrder() {
        return order;
    }
    public void setOrder(Integer order) {
        this.order = order;
    }
    public Integer getFollowing() {
        return following;
    }
    public void setFollowing(Integer following) {
        this.following = following;
    }
    public Integer getIsEducate() {
        return isEducate;
    }
    public void setIsEducate(Integer isEducate) {
        this.isEducate = isEducate;
    }
    public Integer getOver() {
        return over;
    }
    public void setOver(Integer over) {
        this.over = over;
    }
    public String getReservationCode() {
        return reservationCode;
    }
    public void setReservationCode(String reservationCode) {
        this.reservationCode = reservationCode;
    }
    public Date getCzrq() {
        return czrq;
    }
    public void setCzrq(Date czrq) {
        this.czrq = czrq;
    }
    public int getIsAgain() {
        return isAgain;
    }
    public void setIsAgain(int isAgain) {
        this.isAgain = isAgain;
    }
    public String getParentCode() {
        return parentCode;
    }
    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }
    public String getOriginCode() {
        return originCode;
    }
    public void setOriginCode(String originCode) {
        this.originCode = originCode;
    }
    public String getAdviceCode() {
        return adviceCode;
    }
    public void setAdviceCode(String adviceCode) {
        this.adviceCode = adviceCode;
    }
    public String getOtherAdvice() {
        return otherAdvice;
    }
    public void setOtherAdvice(String otherAdvice) {
        this.otherAdvice = otherAdvice;
    }
    public int getSource() {
        return source;
    }
    public void setSource(int source) {
        this.source = source;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}

+ 85 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/specialist/SurveyTemplateQuestionsVo.java

@ -0,0 +1,85 @@
package com.yihu.jw.restmodel.specialist;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
/**
 * Created by Reece on 2018/7/8.
 */
public class SurveyTemplateQuestionsVo{
    @ApiModelProperty("问题编码")
    private String code;
    @ApiModelProperty("问题标题")
    private String title;
    @ApiModelProperty("问题说明(可为null)")
    private String questionComment;
    @ApiModelProperty("问题类型(0单选 1多选 2问答)")
    private Integer questionType;
    @ApiModelProperty("模板编码")
    private String templateCode;
    @ApiModelProperty("排序")
    private Integer sort;
    @ApiModelProperty("删除标志(1正常,0删除)")
    private Integer del;
    public SurveyTemplateQuestionsVo() {
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public String getQuestionComment() {
        return questionComment;
    }
    public void setQuestionComment(String questionComment) {
        this.questionComment = questionComment;
    }
    public Integer getQuestionType() {
        return questionType;
    }
    public void setQuestionType(Integer questionType) {
        this.questionType = questionType;
    }
    public String getTemplateCode() {
        return templateCode;
    }
    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }
    public Integer getSort() {
        return sort;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 74 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/SpecialistScreenResultController.java

@ -0,0 +1,74 @@
package com.yihu.jw.controller;
import com.alibaba.fastjson.JSONArray;
import com.yihu.jw.entity.specialist.SpecialistPatientRelationDO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.EnvelopRestController;
import com.yihu.jw.restmodel.specialist.*;
import com.yihu.jw.rm.specialist.SpecialistMapping;
import com.yihu.jw.service.SpecialistScreenResultService;
import com.yihu.jw.service.SpecialistService;
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.*;
import java.util.List;
import java.util.Map;
/**
 * Created by zhangdan on 2018/7/6.
 */
@RestController
@RequestMapping(SpecialistMapping.api_specialist_common)
@Api(tags = "专科医生疾病筛查相关操作", description = "专科医生疾病筛查相关操作")
public class SpecialistScreenResultController extends EnvelopRestController {
    @Autowired
    private SpecialistService specialistService;
    @Autowired
    private Tracer tracer;
    @Autowired
    private SpecialistScreenResultService specialistScreenResultService;
    @GetMapping(value = SpecialistMapping.screen.getScreenResult)
    @ApiOperation(value = "专科医生获取筛查记录列表")
    public Envelop<SurveyScreenResultVo> createSpecialistPatientRelation(@ApiParam(name = "doctor", value = "专科医生ID")@RequestParam(value = "doctor")String doctor,
                                                            @ApiParam(value = "当前页")@RequestParam(value = "pageNo") int pageNo,
                                                            @ApiParam(value = "显示记录数")@RequestParam(value = "pageSize") int pageSize,
                                                            @ApiParam(value = "1已跟踪 2已预约")@RequestParam(value = "type",required = false) int type){
        try {
            return specialistScreenResultService.getScreenList(doctor,type,pageNo,pageSize);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = SpecialistMapping.screen.getScreenCount)
    @ApiOperation(value = "专科医生首页--筛查已跟踪和已预约的数目")
    public Envelop<Map<String,Object>> findSpecialistPatientRelation(@ApiParam(name = "doctor", value = "专科医生ID")@RequestParam(value = "doctor")String doctor){
        try {
            return specialistScreenResultService.getResultCount(doctor);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = SpecialistMapping.screen.getScreenResultDetail)
    @ApiOperation(value = "查看筛查结果记录详情")
    public Envelop<Map<String,Object>> getScreenResultDetail(@ApiParam(value = "筛查结果唯一code")@RequestParam(value = "code") String code) {
        try {
            return specialistScreenResultService.getScreenResultDetail(code);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 131 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistScreenResultService.java