Browse Source

PC管理端实体类上传

humingfen 7 years ago
parent
commit
c1e5afc687

+ 2 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/config/SpringSecurityConfig.java

@ -52,7 +52,8 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
                "/admin/basedata/importData",
                "/admin/wlyyUserRole/importData",
                "/admin/questionnaire/importData",
                "/WEB—INF/views/**"
                "/WEB—INF/views/**",
                "/admin/specialDisease/**"
        );
    }

+ 34 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/special/SpecialDiseaseController.java

@ -0,0 +1,34 @@
package com.yihu.wlyy.controller.manager.special;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.entity.SpecialDisease;
import com.yihu.wlyy.service.manager.special.SpecialDiseaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
 * Created by humingfen on 2018/7/4.
 */
@Controller
@RequestMapping(value="admin/specialDisease/")
public class SpecialDiseaseController extends BaseController {
    @Autowired
    SpecialDiseaseService specialDiseaseService;
    @RequestMapping(value = "list", method = RequestMethod.POST)
    @ResponseBody
    public String list(){
        try {
            List<SpecialDisease> specialDisease = specialDiseaseService.findAll();
            return write(200, "操作成功", "data",specialDisease);
        } catch (Exception ex) {
            error(ex);
            return error(-1, "操作失败");
        }
    }
}

+ 59 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/SpecialDisease.java

@ -0,0 +1,59 @@
package com.yihu.wlyy.entity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by hmf on 2018/7/4.
 */
@Entity
@Table(name = "wlyy_special_disease")
public class SpecialDisease extends IdEntity{
    private static final long serialVersionUID = 1L;
    private String code;//专病code
    private String name;//专病名称
    private String del;//正常:1,删除:0
    private Date updateTime;//更新时间
    private Date createTime;//创建时间
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 51 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/survey/SurveyAdvice.java

@ -0,0 +1,51 @@
package com.yihu.wlyy.entity.survey;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by hmf on 2018/7/4.
 */
@Entity
@Table(name = "wlyy_survey_advice")
public class SurveyAdvice extends IdEntity {
    private String code;
    private String advice;//建议内容
    private Date czrq;//创建时间
    private Integer diseaseType;//疾病类型
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getAdvice() {
        return advice;
    }
    public void setAdvice(String advice) {
        this.advice = advice;
    }
    public Date getCzrq() {
        return czrq;
    }
    public void setCzrq(Date czrq) {
        this.czrq = czrq;
    }
    public Integer getDiseaseType() {
        return diseaseType;
    }
    public void setDiseaseType(Integer diseaseType) {
        this.diseaseType = diseaseType;
    }
}

+ 18 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/survey/SurveyTemplate.java

@ -18,6 +18,8 @@ public class SurveyTemplate extends IdEntity{
    private String code;
    private String title;//标题
    private String comment;//模板说明
    private Integer diseaseType;//疾病类型,对应专病code
    private String organization;//发布机构
    private String creater;//创建人
    private String del;//删除标志(1正常,0删除)
    private Date createTime;              //创建时间
@ -48,6 +50,22 @@ public class SurveyTemplate extends IdEntity{
        this.comment = comment;
    }
    public Integer getDiseaseType() {
        return diseaseType;
    }
    public void setDiseaseType(Integer diseaseType) {
        this.diseaseType = diseaseType;
    }
    public String getOrganization() {
        return organization;
    }
    public void setOrganization(String organization) {
        this.organization = organization;
    }
    public String getCreater() {
        return creater;
    }

+ 42 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/survey/SurveyTemplateAdvice.java

@ -0,0 +1,42 @@
package com.yihu.wlyy.entity.survey;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by hmf on 2018/7/4.
 */
@Entity
@Table(name = "wlyy_survey_template_advice")
public class SurveyTemplateAdvice extends IdEntity {
    private String templateCode;//关联的筛查模板code
    private String adviceCode;//建议code
    private Date czrq;//创建时间
    public String getTemplateCode() {
        return templateCode;
    }
    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }
    public String getAdviceCode() {
        return adviceCode;
    }
    public void setAdviceCode(String adviceCode) {
        this.adviceCode = adviceCode;
    }
    public Date getCzrq() {
        return czrq;
    }
    public void setCzrq(Date czrq) {
        this.czrq = czrq;
    }
}

+ 9 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/survey/SurveyTemplateOption.java

@ -24,6 +24,7 @@ public class SurveyTemplateOption extends IdEntity{
    private Integer isRequired;//选项说明是否必填(0否 1是)
    private Integer sort;//单题内排序
    private String del;//删除标志(1正常,0删除)
    private Integer score; //评分
    public String getCode() {
        return code;
@ -108,4 +109,12 @@ public class SurveyTemplateOption extends IdEntity{
    public void setQuestionCodeNext(String questionCodeNext) {
        this.questionCodeNext = questionCodeNext;
    }
    public Integer getScore() {
        return score;
    }
    public void setScore(Integer score) {
        this.score = score;
    }
}

+ 143 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/survey/SurveyTemplateResult.java

@ -0,0 +1,143 @@
package com.yihu.wlyy.entity.survey;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 问卷调查模板评分筛查表
 * Created by hmf on 2018/7/3.
 */
@Entity
@Table(name = "wlyy_survey_template_result")
public class SurveyTemplateResult extends IdEntity {
    private static final long serialVersionUID = 1L;
    private String code;//筛选结果编码
    private String templateCode;//模板编码
    private Integer lowScore;//分值范围低分
    private Integer highScore;//分值范围高分
    private String result;//分析结果
    private String advice;//筛查建议
    private Integer warning;//是否高危预警(1是,0否)
    private Integer del;//删除标志(1正常,0删除)
    private Date createTime;             //创建时间
    private String createUser;
    private String createUserName;
    private String updateUser;
    private String updateUserName;
    private Date updateTime;//修改时间
    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 Integer getLowScore() {
        return lowScore;
    }
    public void setLowScore(Integer lowScore) {
        this.lowScore = lowScore;
    }
    public Integer getHighScore() {
        return highScore;
    }
    public void setHighScore(Integer highScore) {
        this.highScore = highScore;
    }
    public String getResult() {
        return result;
    }
    public void setResult(String result) {
        this.result = result;
    }
    public String getAdvice() {
        return advice;
    }
    public void setAdvice(String advice) {
        this.advice = advice;
    }
    public Integer getWarning() {
        return warning;
    }
    public void setWarning(Integer warning) {
        this.warning = warning;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getCreateUser() {
        return createUser;
    }
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }
    public String getCreateUserName() {
        return createUserName;
    }
    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }
    public String getUpdateUser() {
        return updateUser;
    }
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }
    public String getUpdateUserName() {
        return updateUserName;
    }
    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}

+ 8 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/SpecialDiseaseDao.java

@ -0,0 +1,8 @@
package com.yihu.wlyy.repository;
import com.yihu.wlyy.entity.SpecialDisease;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface SpecialDiseaseDao extends PagingAndSortingRepository<SpecialDisease,Long>,JpaSpecificationExecutor<SpecialDisease> {
}

+ 1 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/survey/SurveyTemplateOptionDao.java

@ -19,6 +19,7 @@ public interface SurveyTemplateOptionDao extends PagingAndSortingRepository<Surv
    void deleteByTemplateCode(String templateCode);
    @Query("select s from SurveyTemplateOption s where s.templateCode=?1 and s.del=?2 and s.questionCode=?3")
    List<SurveyTemplateOption>  findByTemplateCodeAndDelAndQuestionCode(String templateCode,String del,String questionCode);
}

+ 23 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/special/SpecialDiseaseService.java

@ -0,0 +1,23 @@
package com.yihu.wlyy.service.manager.special;
import com.yihu.wlyy.entity.SpecialDisease;
import com.yihu.wlyy.repository.SpecialDiseaseDao;
import com.yihu.wlyy.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * Created by hmf on 2018/7/4.
 */
@Service
public class SpecialDiseaseService extends BaseService {
    @Autowired
    private SpecialDiseaseDao specialDiseaseDao;
    public List<SpecialDisease> findAll() {
        return (List<SpecialDisease>) specialDiseaseDao.findAll();
    }
}