From d6a51986b1ca57d26a986261cd5cc9e2d5148036 Mon Sep 17 00:00:00 2001 From: zhizhi wu <2377881365@qq.com> Date: Tue, 13 Apr 2021 10:24:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E5=8C=BB=E9=99=A2+=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=9F=A5=E6=89=BE=E8=AF=95=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ccsens/tcm/bean/po/Hospital.java | 22 + .../ccsens/tcm/bean/po/HospitalExample.java | 130 +++ .../com/ccsens/tcm/bean/po/Inpatient.java | 11 + .../ccsens/tcm/bean/po/InpatientExample.java | 70 ++ .../ccsens/tcm/bean/po/QuestionHospital.java | 117 +++ .../tcm/bean/po/QuestionHospitalExample.java | 751 +++++++++++++++++ .../com/ccsens/tcm/bean/po/QuestionOcr.java | 12 +- .../tcm/bean/po/QuestionOcrExample.java | 48 +- .../tcm/bean/po/QuestionRecordTime.java | 117 +++ .../bean/po/QuestionRecordTimeExample.java | 761 ++++++++++++++++++ .../tcm/persist/dao/QuestionHospitalDao.java | 17 + .../mapper/QuestionHospitalMapper.java | 30 + .../mapper/QuestionRecordTimeMapper.java | 30 + .../com/ccsens/tcm/service/ImportService.java | 83 +- .../ccsens/tcm/service/QuestionService.java | 13 + tcm/src/main/resources/application.yml | 4 +- .../main/resources/mapper_dao/QuestionDao.xml | 1 + .../mapper_dao/QuestionHospitalDao.xml | 10 + .../resources/mapper_dao/QuestionOcrDao.xml | 2 +- .../resources/mapper_raw/HospitalMapper.xml | 52 +- .../resources/mapper_raw/InpatientMapper.xml | 27 +- .../mapper_raw/QuestionHospitalMapper.xml | 276 +++++++ .../mapper_raw/QuestionOcrMapper.xml | 29 +- .../mapper_raw/QuestionRecordTimeMapper.xml | 275 +++++++ .../main/java/com/ccsens/util/CodeEnum.java | 1 + .../main/java/com/ccsens/util/PoiUtil.java | 4 +- 26 files changed, 2823 insertions(+), 70 deletions(-) create mode 100644 tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospital.java create mode 100644 tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospitalExample.java create mode 100644 tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTime.java create mode 100644 tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTimeExample.java create mode 100644 tcm/src/main/java/com/ccsens/tcm/persist/dao/QuestionHospitalDao.java create mode 100644 tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionHospitalMapper.java create mode 100644 tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionRecordTimeMapper.java create mode 100644 tcm/src/main/resources/mapper_dao/QuestionHospitalDao.xml create mode 100644 tcm/src/main/resources/mapper_raw/QuestionHospitalMapper.xml create mode 100644 tcm/src/main/resources/mapper_raw/QuestionRecordTimeMapper.xml diff --git a/tcm/src/main/java/com/ccsens/tcm/bean/po/Hospital.java b/tcm/src/main/java/com/ccsens/tcm/bean/po/Hospital.java index 8fb735a8..f0cf98c2 100644 --- a/tcm/src/main/java/com/ccsens/tcm/bean/po/Hospital.java +++ b/tcm/src/main/java/com/ccsens/tcm/bean/po/Hospital.java @@ -6,6 +6,8 @@ import java.util.Date; public class Hospital implements Serializable { private Long id; + private String code; + private String name; private Long operator; @@ -18,6 +20,8 @@ public class Hospital implements Serializable { private Long projectId; + private Byte hospitalType; + private static final long serialVersionUID = 1L; public Long getId() { @@ -28,6 +32,14 @@ public class Hospital implements Serializable { this.id = id; } + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + public String getName() { return name; } @@ -76,6 +88,14 @@ public class Hospital implements Serializable { this.projectId = projectId; } + public Byte getHospitalType() { + return hospitalType; + } + + public void setHospitalType(Byte hospitalType) { + this.hospitalType = hospitalType; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -83,12 +103,14 @@ public class Hospital implements Serializable { sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); + sb.append(", code=").append(code); sb.append(", name=").append(name); sb.append(", operator=").append(operator); sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); sb.append(", projectId=").append(projectId); + sb.append(", hospitalType=").append(hospitalType); sb.append("]"); return sb.toString(); } diff --git a/tcm/src/main/java/com/ccsens/tcm/bean/po/HospitalExample.java b/tcm/src/main/java/com/ccsens/tcm/bean/po/HospitalExample.java index 40b244aa..c3b180a0 100644 --- a/tcm/src/main/java/com/ccsens/tcm/bean/po/HospitalExample.java +++ b/tcm/src/main/java/com/ccsens/tcm/bean/po/HospitalExample.java @@ -165,6 +165,76 @@ public class HospitalExample { return (Criteria) this; } + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + public Criteria andNameIsNull() { addCriterion("name is null"); return (Criteria) this; @@ -534,6 +604,66 @@ public class HospitalExample { addCriterion("project_id not between", value1, value2, "projectId"); return (Criteria) this; } + + public Criteria andHospitalTypeIsNull() { + addCriterion("hospital_type is null"); + return (Criteria) this; + } + + public Criteria andHospitalTypeIsNotNull() { + addCriterion("hospital_type is not null"); + return (Criteria) this; + } + + public Criteria andHospitalTypeEqualTo(Byte value) { + addCriterion("hospital_type =", value, "hospitalType"); + return (Criteria) this; + } + + public Criteria andHospitalTypeNotEqualTo(Byte value) { + addCriterion("hospital_type <>", value, "hospitalType"); + return (Criteria) this; + } + + public Criteria andHospitalTypeGreaterThan(Byte value) { + addCriterion("hospital_type >", value, "hospitalType"); + return (Criteria) this; + } + + public Criteria andHospitalTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("hospital_type >=", value, "hospitalType"); + return (Criteria) this; + } + + public Criteria andHospitalTypeLessThan(Byte value) { + addCriterion("hospital_type <", value, "hospitalType"); + return (Criteria) this; + } + + public Criteria andHospitalTypeLessThanOrEqualTo(Byte value) { + addCriterion("hospital_type <=", value, "hospitalType"); + return (Criteria) this; + } + + public Criteria andHospitalTypeIn(List values) { + addCriterion("hospital_type in", values, "hospitalType"); + return (Criteria) this; + } + + public Criteria andHospitalTypeNotIn(List values) { + addCriterion("hospital_type not in", values, "hospitalType"); + return (Criteria) this; + } + + public Criteria andHospitalTypeBetween(Byte value1, Byte value2) { + addCriterion("hospital_type between", value1, value2, "hospitalType"); + return (Criteria) this; + } + + public Criteria andHospitalTypeNotBetween(Byte value1, Byte value2) { + addCriterion("hospital_type not between", value1, value2, "hospitalType"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/tcm/src/main/java/com/ccsens/tcm/bean/po/Inpatient.java b/tcm/src/main/java/com/ccsens/tcm/bean/po/Inpatient.java index 8460068e..755c197e 100644 --- a/tcm/src/main/java/com/ccsens/tcm/bean/po/Inpatient.java +++ b/tcm/src/main/java/com/ccsens/tcm/bean/po/Inpatient.java @@ -20,6 +20,8 @@ public class Inpatient implements Serializable { private Byte recStatus; + private String code; + private static final long serialVersionUID = 1L; public Long getId() { @@ -86,6 +88,14 @@ public class Inpatient implements Serializable { this.recStatus = recStatus; } + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -100,6 +110,7 @@ public class Inpatient implements Serializable { sb.append(", createdAt=").append(createdAt); sb.append(", updateAt=").append(updateAt); sb.append(", recStatus=").append(recStatus); + sb.append(", code=").append(code); sb.append("]"); return sb.toString(); } diff --git a/tcm/src/main/java/com/ccsens/tcm/bean/po/InpatientExample.java b/tcm/src/main/java/com/ccsens/tcm/bean/po/InpatientExample.java index fece44fd..2a982752 100644 --- a/tcm/src/main/java/com/ccsens/tcm/bean/po/InpatientExample.java +++ b/tcm/src/main/java/com/ccsens/tcm/bean/po/InpatientExample.java @@ -604,6 +604,76 @@ public class InpatientExample { addCriterion("rec_status not between", value1, value2, "recStatus"); return (Criteria) this; } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospital.java b/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospital.java new file mode 100644 index 00000000..a7fec0b1 --- /dev/null +++ b/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospital.java @@ -0,0 +1,117 @@ +package com.ccsens.tcm.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class QuestionHospital implements Serializable { + private Long id; + + private Long questionId; + + private Long hospitalId; + + private Byte fillType; + + private String remark; + + private Long operator; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getQuestionId() { + return questionId; + } + + public void setQuestionId(Long questionId) { + this.questionId = questionId; + } + + public Long getHospitalId() { + return hospitalId; + } + + public void setHospitalId(Long hospitalId) { + this.hospitalId = hospitalId; + } + + public Byte getFillType() { + return fillType; + } + + public void setFillType(Byte fillType) { + this.fillType = fillType; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public Long getOperator() { + return operator; + } + + public void setOperator(Long operator) { + this.operator = operator; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", questionId=").append(questionId); + sb.append(", hospitalId=").append(hospitalId); + sb.append(", fillType=").append(fillType); + sb.append(", remark=").append(remark); + sb.append(", operator=").append(operator); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospitalExample.java b/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospitalExample.java new file mode 100644 index 00000000..cd9d5991 --- /dev/null +++ b/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospitalExample.java @@ -0,0 +1,751 @@ +package com.ccsens.tcm.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class QuestionHospitalExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public QuestionHospitalExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andQuestionIdIsNull() { + addCriterion("question_id is null"); + return (Criteria) this; + } + + public Criteria andQuestionIdIsNotNull() { + addCriterion("question_id is not null"); + return (Criteria) this; + } + + public Criteria andQuestionIdEqualTo(Long value) { + addCriterion("question_id =", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdNotEqualTo(Long value) { + addCriterion("question_id <>", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdGreaterThan(Long value) { + addCriterion("question_id >", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdGreaterThanOrEqualTo(Long value) { + addCriterion("question_id >=", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdLessThan(Long value) { + addCriterion("question_id <", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdLessThanOrEqualTo(Long value) { + addCriterion("question_id <=", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdIn(List values) { + addCriterion("question_id in", values, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdNotIn(List values) { + addCriterion("question_id not in", values, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdBetween(Long value1, Long value2) { + addCriterion("question_id between", value1, value2, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdNotBetween(Long value1, Long value2) { + addCriterion("question_id not between", value1, value2, "questionId"); + return (Criteria) this; + } + + public Criteria andHospitalIdIsNull() { + addCriterion("hospital_id is null"); + return (Criteria) this; + } + + public Criteria andHospitalIdIsNotNull() { + addCriterion("hospital_id is not null"); + return (Criteria) this; + } + + public Criteria andHospitalIdEqualTo(Long value) { + addCriterion("hospital_id =", value, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdNotEqualTo(Long value) { + addCriterion("hospital_id <>", value, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdGreaterThan(Long value) { + addCriterion("hospital_id >", value, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdGreaterThanOrEqualTo(Long value) { + addCriterion("hospital_id >=", value, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdLessThan(Long value) { + addCriterion("hospital_id <", value, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdLessThanOrEqualTo(Long value) { + addCriterion("hospital_id <=", value, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdIn(List values) { + addCriterion("hospital_id in", values, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdNotIn(List values) { + addCriterion("hospital_id not in", values, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdBetween(Long value1, Long value2) { + addCriterion("hospital_id between", value1, value2, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdNotBetween(Long value1, Long value2) { + addCriterion("hospital_id not between", value1, value2, "hospitalId"); + return (Criteria) this; + } + + public Criteria andFillTypeIsNull() { + addCriterion("fill_type is null"); + return (Criteria) this; + } + + public Criteria andFillTypeIsNotNull() { + addCriterion("fill_type is not null"); + return (Criteria) this; + } + + public Criteria andFillTypeEqualTo(Byte value) { + addCriterion("fill_type =", value, "fillType"); + return (Criteria) this; + } + + public Criteria andFillTypeNotEqualTo(Byte value) { + addCriterion("fill_type <>", value, "fillType"); + return (Criteria) this; + } + + public Criteria andFillTypeGreaterThan(Byte value) { + addCriterion("fill_type >", value, "fillType"); + return (Criteria) this; + } + + public Criteria andFillTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("fill_type >=", value, "fillType"); + return (Criteria) this; + } + + public Criteria andFillTypeLessThan(Byte value) { + addCriterion("fill_type <", value, "fillType"); + return (Criteria) this; + } + + public Criteria andFillTypeLessThanOrEqualTo(Byte value) { + addCriterion("fill_type <=", value, "fillType"); + return (Criteria) this; + } + + public Criteria andFillTypeIn(List values) { + addCriterion("fill_type in", values, "fillType"); + return (Criteria) this; + } + + public Criteria andFillTypeNotIn(List values) { + addCriterion("fill_type not in", values, "fillType"); + return (Criteria) this; + } + + public Criteria andFillTypeBetween(Byte value1, Byte value2) { + addCriterion("fill_type between", value1, value2, "fillType"); + return (Criteria) this; + } + + public Criteria andFillTypeNotBetween(Byte value1, Byte value2) { + addCriterion("fill_type not between", value1, value2, "fillType"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andOperatorIsNull() { + addCriterion("operator is null"); + return (Criteria) this; + } + + public Criteria andOperatorIsNotNull() { + addCriterion("operator is not null"); + return (Criteria) this; + } + + public Criteria andOperatorEqualTo(Long value) { + addCriterion("operator =", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotEqualTo(Long value) { + addCriterion("operator <>", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThan(Long value) { + addCriterion("operator >", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThanOrEqualTo(Long value) { + addCriterion("operator >=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThan(Long value) { + addCriterion("operator <", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThanOrEqualTo(Long value) { + addCriterion("operator <=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorIn(List values) { + addCriterion("operator in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotIn(List values) { + addCriterion("operator not in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorBetween(Long value1, Long value2) { + addCriterion("operator between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotBetween(Long value1, Long value2) { + addCriterion("operator not between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcr.java b/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcr.java index 821eaa44..6d7eb0db 100644 --- a/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcr.java +++ b/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcr.java @@ -10,7 +10,7 @@ public class QuestionOcr implements Serializable { private Integer sort; - private Long hospital; + private Long hospitalId; private String start; @@ -52,12 +52,12 @@ public class QuestionOcr implements Serializable { this.sort = sort; } - public Long getHospital() { - return hospital; + public Long getHospitalId() { + return hospitalId; } - public void setHospital(Long hospital) { - this.hospital = hospital; + public void setHospitalId(Long hospitalId) { + this.hospitalId = hospitalId; } public String getStart() { @@ -125,7 +125,7 @@ public class QuestionOcr implements Serializable { sb.append(", id=").append(id); sb.append(", code=").append(code); sb.append(", sort=").append(sort); - sb.append(", hospital=").append(hospital); + sb.append(", hospitalId=").append(hospitalId); sb.append(", start=").append(start); sb.append(", end=").append(end); sb.append(", remark=").append(remark); diff --git a/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcrExample.java b/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcrExample.java index d5383b79..99f9e6d8 100644 --- a/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcrExample.java +++ b/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcrExample.java @@ -295,63 +295,63 @@ public class QuestionOcrExample { return (Criteria) this; } - public Criteria andHospitalIsNull() { - addCriterion("hospital is null"); + public Criteria andHospitalIdIsNull() { + addCriterion("hospital_id is null"); return (Criteria) this; } - public Criteria andHospitalIsNotNull() { - addCriterion("hospital is not null"); + public Criteria andHospitalIdIsNotNull() { + addCriterion("hospital_id is not null"); return (Criteria) this; } - public Criteria andHospitalEqualTo(Long value) { - addCriterion("hospital =", value, "hospital"); + public Criteria andHospitalIdEqualTo(Long value) { + addCriterion("hospital_id =", value, "hospitalId"); return (Criteria) this; } - public Criteria andHospitalNotEqualTo(Long value) { - addCriterion("hospital <>", value, "hospital"); + public Criteria andHospitalIdNotEqualTo(Long value) { + addCriterion("hospital_id <>", value, "hospitalId"); return (Criteria) this; } - public Criteria andHospitalGreaterThan(Long value) { - addCriterion("hospital >", value, "hospital"); + public Criteria andHospitalIdGreaterThan(Long value) { + addCriterion("hospital_id >", value, "hospitalId"); return (Criteria) this; } - public Criteria andHospitalGreaterThanOrEqualTo(Long value) { - addCriterion("hospital >=", value, "hospital"); + public Criteria andHospitalIdGreaterThanOrEqualTo(Long value) { + addCriterion("hospital_id >=", value, "hospitalId"); return (Criteria) this; } - public Criteria andHospitalLessThan(Long value) { - addCriterion("hospital <", value, "hospital"); + public Criteria andHospitalIdLessThan(Long value) { + addCriterion("hospital_id <", value, "hospitalId"); return (Criteria) this; } - public Criteria andHospitalLessThanOrEqualTo(Long value) { - addCriterion("hospital <=", value, "hospital"); + public Criteria andHospitalIdLessThanOrEqualTo(Long value) { + addCriterion("hospital_id <=", value, "hospitalId"); return (Criteria) this; } - public Criteria andHospitalIn(List values) { - addCriterion("hospital in", values, "hospital"); + public Criteria andHospitalIdIn(List values) { + addCriterion("hospital_id in", values, "hospitalId"); return (Criteria) this; } - public Criteria andHospitalNotIn(List values) { - addCriterion("hospital not in", values, "hospital"); + public Criteria andHospitalIdNotIn(List values) { + addCriterion("hospital_id not in", values, "hospitalId"); return (Criteria) this; } - public Criteria andHospitalBetween(Long value1, Long value2) { - addCriterion("hospital between", value1, value2, "hospital"); + public Criteria andHospitalIdBetween(Long value1, Long value2) { + addCriterion("hospital_id between", value1, value2, "hospitalId"); return (Criteria) this; } - public Criteria andHospitalNotBetween(Long value1, Long value2) { - addCriterion("hospital not between", value1, value2, "hospital"); + public Criteria andHospitalIdNotBetween(Long value1, Long value2) { + addCriterion("hospital_id not between", value1, value2, "hospitalId"); return (Criteria) this; } diff --git a/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTime.java b/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTime.java new file mode 100644 index 00000000..53707eb6 --- /dev/null +++ b/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTime.java @@ -0,0 +1,117 @@ +package com.ccsens.tcm.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class QuestionRecordTime implements Serializable { + private Long id; + + private String code; + + private Integer recodeTime; + + private Long hospitalId; + + private String remark; + + private Long operator; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + 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 == null ? null : code.trim(); + } + + public Integer getRecodeTime() { + return recodeTime; + } + + public void setRecodeTime(Integer recodeTime) { + this.recodeTime = recodeTime; + } + + public Long getHospitalId() { + return hospitalId; + } + + public void setHospitalId(Long hospitalId) { + this.hospitalId = hospitalId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public Long getOperator() { + return operator; + } + + public void setOperator(Long operator) { + this.operator = operator; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", code=").append(code); + sb.append(", recodeTime=").append(recodeTime); + sb.append(", hospitalId=").append(hospitalId); + sb.append(", remark=").append(remark); + sb.append(", operator=").append(operator); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTimeExample.java b/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTimeExample.java new file mode 100644 index 00000000..42e4ca87 --- /dev/null +++ b/tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTimeExample.java @@ -0,0 +1,761 @@ +package com.ccsens.tcm.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class QuestionRecordTimeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public QuestionRecordTimeExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andRecodeTimeIsNull() { + addCriterion("recode_time is null"); + return (Criteria) this; + } + + public Criteria andRecodeTimeIsNotNull() { + addCriterion("recode_time is not null"); + return (Criteria) this; + } + + public Criteria andRecodeTimeEqualTo(Integer value) { + addCriterion("recode_time =", value, "recodeTime"); + return (Criteria) this; + } + + public Criteria andRecodeTimeNotEqualTo(Integer value) { + addCriterion("recode_time <>", value, "recodeTime"); + return (Criteria) this; + } + + public Criteria andRecodeTimeGreaterThan(Integer value) { + addCriterion("recode_time >", value, "recodeTime"); + return (Criteria) this; + } + + public Criteria andRecodeTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("recode_time >=", value, "recodeTime"); + return (Criteria) this; + } + + public Criteria andRecodeTimeLessThan(Integer value) { + addCriterion("recode_time <", value, "recodeTime"); + return (Criteria) this; + } + + public Criteria andRecodeTimeLessThanOrEqualTo(Integer value) { + addCriterion("recode_time <=", value, "recodeTime"); + return (Criteria) this; + } + + public Criteria andRecodeTimeIn(List values) { + addCriterion("recode_time in", values, "recodeTime"); + return (Criteria) this; + } + + public Criteria andRecodeTimeNotIn(List values) { + addCriterion("recode_time not in", values, "recodeTime"); + return (Criteria) this; + } + + public Criteria andRecodeTimeBetween(Integer value1, Integer value2) { + addCriterion("recode_time between", value1, value2, "recodeTime"); + return (Criteria) this; + } + + public Criteria andRecodeTimeNotBetween(Integer value1, Integer value2) { + addCriterion("recode_time not between", value1, value2, "recodeTime"); + return (Criteria) this; + } + + public Criteria andHospitalIdIsNull() { + addCriterion("hospital_id is null"); + return (Criteria) this; + } + + public Criteria andHospitalIdIsNotNull() { + addCriterion("hospital_id is not null"); + return (Criteria) this; + } + + public Criteria andHospitalIdEqualTo(Long value) { + addCriterion("hospital_id =", value, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdNotEqualTo(Long value) { + addCriterion("hospital_id <>", value, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdGreaterThan(Long value) { + addCriterion("hospital_id >", value, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdGreaterThanOrEqualTo(Long value) { + addCriterion("hospital_id >=", value, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdLessThan(Long value) { + addCriterion("hospital_id <", value, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdLessThanOrEqualTo(Long value) { + addCriterion("hospital_id <=", value, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdIn(List values) { + addCriterion("hospital_id in", values, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdNotIn(List values) { + addCriterion("hospital_id not in", values, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdBetween(Long value1, Long value2) { + addCriterion("hospital_id between", value1, value2, "hospitalId"); + return (Criteria) this; + } + + public Criteria andHospitalIdNotBetween(Long value1, Long value2) { + addCriterion("hospital_id not between", value1, value2, "hospitalId"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andOperatorIsNull() { + addCriterion("operator is null"); + return (Criteria) this; + } + + public Criteria andOperatorIsNotNull() { + addCriterion("operator is not null"); + return (Criteria) this; + } + + public Criteria andOperatorEqualTo(Long value) { + addCriterion("operator =", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotEqualTo(Long value) { + addCriterion("operator <>", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThan(Long value) { + addCriterion("operator >", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThanOrEqualTo(Long value) { + addCriterion("operator >=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThan(Long value) { + addCriterion("operator <", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThanOrEqualTo(Long value) { + addCriterion("operator <=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorIn(List values) { + addCriterion("operator in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotIn(List values) { + addCriterion("operator not in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorBetween(Long value1, Long value2) { + addCriterion("operator between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotBetween(Long value1, Long value2) { + addCriterion("operator not between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tcm/src/main/java/com/ccsens/tcm/persist/dao/QuestionHospitalDao.java b/tcm/src/main/java/com/ccsens/tcm/persist/dao/QuestionHospitalDao.java new file mode 100644 index 00000000..2caecca5 --- /dev/null +++ b/tcm/src/main/java/com/ccsens/tcm/persist/dao/QuestionHospitalDao.java @@ -0,0 +1,17 @@ +package com.ccsens.tcm.persist.dao; + +import com.ccsens.tcm.bean.po.QuestionHospital; +import com.ccsens.tcm.persist.mapper.QuestionHospitalMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface QuestionHospitalDao extends QuestionHospitalMapper { + + /** + * 查询ID + * @param type 类型 0:项目 1:医院 null:全部 + * @return 医院ID + */ + List queryAll(@Param("type") Byte type); +} diff --git a/tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionHospitalMapper.java b/tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionHospitalMapper.java new file mode 100644 index 00000000..17d9e5b5 --- /dev/null +++ b/tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionHospitalMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tcm.persist.mapper; + +import com.ccsens.tcm.bean.po.QuestionHospital; +import com.ccsens.tcm.bean.po.QuestionHospitalExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface QuestionHospitalMapper { + long countByExample(QuestionHospitalExample example); + + int deleteByExample(QuestionHospitalExample example); + + int deleteByPrimaryKey(Long id); + + int insert(QuestionHospital record); + + int insertSelective(QuestionHospital record); + + List selectByExample(QuestionHospitalExample example); + + QuestionHospital selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") QuestionHospital record, @Param("example") QuestionHospitalExample example); + + int updateByExample(@Param("record") QuestionHospital record, @Param("example") QuestionHospitalExample example); + + int updateByPrimaryKeySelective(QuestionHospital record); + + int updateByPrimaryKey(QuestionHospital record); +} \ No newline at end of file diff --git a/tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionRecordTimeMapper.java b/tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionRecordTimeMapper.java new file mode 100644 index 00000000..09f531c8 --- /dev/null +++ b/tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionRecordTimeMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tcm.persist.mapper; + +import com.ccsens.tcm.bean.po.QuestionRecordTime; +import com.ccsens.tcm.bean.po.QuestionRecordTimeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface QuestionRecordTimeMapper { + long countByExample(QuestionRecordTimeExample example); + + int deleteByExample(QuestionRecordTimeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(QuestionRecordTime record); + + int insertSelective(QuestionRecordTime record); + + List selectByExample(QuestionRecordTimeExample example); + + QuestionRecordTime selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") QuestionRecordTime record, @Param("example") QuestionRecordTimeExample example); + + int updateByExample(@Param("record") QuestionRecordTime record, @Param("example") QuestionRecordTimeExample example); + + int updateByPrimaryKeySelective(QuestionRecordTime record); + + int updateByPrimaryKey(QuestionRecordTime record); +} \ No newline at end of file diff --git a/tcm/src/main/java/com/ccsens/tcm/service/ImportService.java b/tcm/src/main/java/com/ccsens/tcm/service/ImportService.java index adafb7fe..4fc45e74 100644 --- a/tcm/src/main/java/com/ccsens/tcm/service/ImportService.java +++ b/tcm/src/main/java/com/ccsens/tcm/service/ImportService.java @@ -7,12 +7,14 @@ import com.ccsens.tcm.bean.dto.CodeVo; import com.ccsens.tcm.bean.po.*; import com.ccsens.tcm.bean.vo.QuestionVo; import com.ccsens.tcm.persist.dao.QuestionDao; +import com.ccsens.tcm.persist.dao.QuestionHospitalDao; import com.ccsens.tcm.persist.dao.QuestionOptionDao; import com.ccsens.tcm.persist.dao.ReportCodeDao; +import com.ccsens.tcm.persist.mapper.HospitalMapper; +import com.ccsens.tcm.persist.mapper.QuestionRecordTimeMapper; import com.ccsens.tcm.uitl.Constant; -import com.ccsens.util.PoiUtil; -import com.ccsens.util.RedisUtil; -import com.ccsens.util.StringUtil; +import com.ccsens.util.*; +import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; @@ -40,6 +42,14 @@ public class ImportService implements IImportService { private QuestionDao questionDao; @Resource private QuestionOptionDao questionOptionDao; + @Resource + private QuestionRecordTimeMapper questionRecordTimeMapper; + @Resource + private QuestionHospitalDao questionHospitalDao; + @Resource + private HospitalMapper hospitalMapper; + + @Resource private RedisUtil redisUtil; @@ -88,6 +98,19 @@ public class ImportService implements IImportService { Long questionId = null; Long optionQuestionId = null; Long optionId = null; + HospitalExample hospitalExample = new HospitalExample(); + hospitalExample.createCriteria().andHospitalTypeEqualTo((byte)1); + List hospitals = hospitalMapper.selectByExample(hospitalExample); + if (CollectionUtil.isEmpty(hospitals)) { + throw new BaseException(CodeEnum.HOSPITAL_NOT_FOUND); + } + // 医院 + Map hospitalMap = new HashMap<>(); + hospitals.forEach(hospital -> { + hospitalMap.put(hospital.getCode(), hospital.getId()); + }); + + for(Object[] objs : questions) { if (objs == null || objs.length < 4 || StringUtils.isEmpty(objs[2])) { log.info("数据不足,跳转下一行"); @@ -98,7 +121,7 @@ public class ImportService implements IImportService { String type = String.valueOf(objs[0]); switch (type) { case "题目" : - Question question = initQuestion(objs, code, sort,null); + Question question = initQuestion(objs, code, sort,null, hospitalMap); questionId = question.getId(); questionList.add(question); break; @@ -114,7 +137,7 @@ public class ImportService implements IImportService { if (optionList.isEmpty()) { break; } - Question relevanceQuestion = initQuestion(objs, code, sort, optionId); + Question relevanceQuestion = initQuestion(objs, code, sort, optionId, hospitalMap); questionList.add(relevanceQuestion); optionQuestionId = relevanceQuestion.getId(); break; @@ -181,6 +204,11 @@ public class ImportService implements IImportService { ReportCode report; if (!CollectionUtils.isEmpty(list)) { report = list.get(0); + QuestionRecordTimeExample timeExample = new QuestionRecordTimeExample(); + timeExample.createCriteria().andCodeEqualTo(report.getCode()); + QuestionRecordTime time = new QuestionRecordTime(); + time.setRecStatus(WebConstant.REC_STATUS.Deleted.value); + questionRecordTimeMapper.updateByExampleSelective(time, timeExample); } else { report = new ReportCode(); report.setId(snowflake.nextId()); @@ -188,7 +216,25 @@ public class ImportService implements IImportService { report.setCode((String) objs[0]); report.setName((String) objs[1]); report.setParentCode(objs.length > 2 && !StringUtils.isEmpty(objs[2]) ? (String) objs[2] : Constant.STRING_DEFAULT); - report.setReportType(objs.length > 3 && StringUtil.checkNum(String.valueOf(objs[3]),false)? Byte.parseByte((String) objs[3]) : Constant.NUMBER_DEFAULT); + if (objs.length > 3 && objs[3] != null && ((String)objs[3]).length() > 0) { +// report.setReportType(objs.length > 3 && StringUtil.checkNum(String.valueOf(objs[3]),false)? Byte.parseByte((String) objs[3]) : Constant.NUMBER_DEFAULT); + String types = (String)objs[3]; + String[] split = types.split("[,,]"); + + for (String type: split) { + + if (StringUtil.checkNum(type, false)) { + QuestionRecordTime time = new QuestionRecordTime(); + time.setId(snowflake.nextId()); + time.setCode(report.getCode()); + time.setRecodeTime(Integer.parseInt(type)); + questionRecordTimeMapper.insertSelective(time); + } + } + + + } + report.setMust(objs.length > 4 && StringUtil.checkNum(String.valueOf(objs[4]), false) ? Byte.parseByte((String) (objs[4])) : Constant.NUMBER_DEFAULT); report.setSort(objs.length > 5 && StringUtil.checkNum(String.valueOf(objs[5]), false) ? Integer.parseInt((String) (objs[5])) : Constant.NUMBER_DEFAULT_SORT); report.setLevel(objs.length > 6 && StringUtil.checkNum(String.valueOf(objs[6]), false) ? Byte.parseByte((String)(objs[6])) : Constant.NUMBER_DEFAULT_SORT); @@ -201,9 +247,10 @@ public class ImportService implements IImportService { * @param objs 表格内读取的数据 * @param evaluationCode 试题类型 * @param sort 排序 + * @param hospitalMap * @return 返回试题 */ - private Question initQuestion(Object[] objs, String evaluationCode, int sort,Long optionId) { + private Question initQuestion(Object[] objs, String evaluationCode, int sort, Long optionId, Map hospitalMap) { QuestionExample example = new QuestionExample(); example.createCriteria().andCodeEqualTo(evaluationCode).andSortEqualTo(sort); List questions = questionDao.selectByExample(example); @@ -235,6 +282,28 @@ public class ImportService implements IImportService { } } question.setRelevanceOptionId(optionId == null ? 0 : optionId); + // 设置关联那个医院 + List hospitalIds = null; + int hospitalIndex = 10; + if (objs.length > hospitalIndex && !StringUtils.isEmpty(objs[hospitalIndex])) { + hospitalMap.forEach((key, value)->{ + hospitalIds.add(value); + + }); + } else { + String[] codes = ((String) objs[hospitalIndex]).split("[,,]"); + for (String code:codes) { + hospitalIds.add(hospitalMap.get(code)); + } + } + + hospitalIds.forEach(id->{ + QuestionHospital questionHospital = new QuestionHospital(); + questionHospital.setId(snowflake.nextId()); + questionHospital.setQuestionId(question.getId()); + questionHospital.setHospitalId(id); + questionHospitalDao.insert(questionHospital); + }); log.info("导入试题:{}", question); return question; diff --git a/tcm/src/main/java/com/ccsens/tcm/service/QuestionService.java b/tcm/src/main/java/com/ccsens/tcm/service/QuestionService.java index c0b7f1c5..19d35a0a 100644 --- a/tcm/src/main/java/com/ccsens/tcm/service/QuestionService.java +++ b/tcm/src/main/java/com/ccsens/tcm/service/QuestionService.java @@ -2,11 +2,15 @@ package com.ccsens.tcm.service; import cn.hutool.core.collection.CollectionUtil; import com.ccsens.tcm.bean.dto.QuestionDto; +import com.ccsens.tcm.bean.po.PatientInformation; import com.ccsens.tcm.bean.po.QuestionOption; import com.ccsens.tcm.bean.vo.QuestionVo; import com.ccsens.tcm.persist.dao.QuestionDao; import com.ccsens.tcm.persist.dao.ReportCodeDao; +import com.ccsens.tcm.persist.mapper.PatientInformationMapper; +import com.ccsens.util.CodeEnum; import com.ccsens.util.RedisUtil; +import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; @@ -25,9 +29,18 @@ public class QuestionService implements IQuestionService{ private ReportCodeDao reportCodeDao; @Resource private QuestionDao questionDao; + @Resource + private PatientInformationMapper patientInformationMapper; + @Override public List getQuestionAndAnswer(QuestionDto.QueryQuestionAndAnswer param) { + // 查询患者录入人ID + PatientInformation patient = patientInformationMapper.selectByPrimaryKey(param.getId()); + if (patient == null) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + List patientCodeList = reportCodeDao.selectCodeByCode(param.getCode(),param.getNums()); if(CollectionUtil.isNotEmpty(patientCodeList)){ //循环一级code diff --git a/tcm/src/main/resources/application.yml b/tcm/src/main/resources/application.yml index 4ecd13fd..33b76558 100644 --- a/tcm/src/main/resources/application.yml +++ b/tcm/src/main/resources/application.yml @@ -1,5 +1,5 @@ spring: profiles: - active: dev - include: common, util-dev + active: green + include: common, util-green diff --git a/tcm/src/main/resources/mapper_dao/QuestionDao.xml b/tcm/src/main/resources/mapper_dao/QuestionDao.xml index 7f2446a3..ad1a9a6e 100644 --- a/tcm/src/main/resources/mapper_dao/QuestionDao.xml +++ b/tcm/src/main/resources/mapper_dao/QuestionDao.xml @@ -162,6 +162,7 @@ SUBSTRING(r.contents,char_length(o.submit_value)+2),null ) as otherInformation FROM + t_question q LEFT JOIN t_question_option o on q.id = o.question_id and o.rec_status = 0 LEFT JOIN t_patient_record r on r.test_questions_id = q.id and r.rec_status = 0 and r.patient_id = #{patientId} diff --git a/tcm/src/main/resources/mapper_dao/QuestionHospitalDao.xml b/tcm/src/main/resources/mapper_dao/QuestionHospitalDao.xml new file mode 100644 index 00000000..27b59fb7 --- /dev/null +++ b/tcm/src/main/resources/mapper_dao/QuestionHospitalDao.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/tcm/src/main/resources/mapper_dao/QuestionOcrDao.xml b/tcm/src/main/resources/mapper_dao/QuestionOcrDao.xml index 770dc5ff..b928ace0 100644 --- a/tcm/src/main/resources/mapper_dao/QuestionOcrDao.xml +++ b/tcm/src/main/resources/mapper_dao/QuestionOcrDao.xml @@ -18,7 +18,7 @@ o.CODE = q.CODE AND o.sort = q.sort AND o.CODE = #{code} - AND o.hospital = #{hospitalId} + AND o.hospital_id = #{hospitalId} AND o.rec_status = 0 AND q.rec_status = 0 diff --git a/tcm/src/main/resources/mapper_raw/HospitalMapper.xml b/tcm/src/main/resources/mapper_raw/HospitalMapper.xml index abf5142b..5c2d0db1 100644 --- a/tcm/src/main/resources/mapper_raw/HospitalMapper.xml +++ b/tcm/src/main/resources/mapper_raw/HospitalMapper.xml @@ -3,12 +3,14 @@ + + @@ -69,7 +71,7 @@ - id, name, operator, created_at, updated_at, rec_status, project_id + id, code, name, operator, created_at, updated_at, rec_status, project_id, hospital_type @@ -170,6 +186,9 @@ id = #{record.id,jdbcType=BIGINT}, + + code = #{record.code,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, @@ -188,6 +207,9 @@ project_id = #{record.projectId,jdbcType=BIGINT}, + + hospital_type = #{record.hospitalType,jdbcType=TINYINT}, + @@ -196,12 +218,14 @@ update t_hospital set id = #{record.id,jdbcType=BIGINT}, + code = #{record.code,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR}, operator = #{record.operator,jdbcType=BIGINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, rec_status = #{record.recStatus,jdbcType=TINYINT}, - project_id = #{record.projectId,jdbcType=BIGINT} + project_id = #{record.projectId,jdbcType=BIGINT}, + hospital_type = #{record.hospitalType,jdbcType=TINYINT} @@ -209,6 +233,9 @@ update t_hospital + + code = #{code,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, @@ -227,17 +254,22 @@ project_id = #{projectId,jdbcType=BIGINT}, + + hospital_type = #{hospitalType,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} update t_hospital - set name = #{name,jdbcType=VARCHAR}, + set code = #{code,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, operator = #{operator,jdbcType=BIGINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, rec_status = #{recStatus,jdbcType=TINYINT}, - project_id = #{projectId,jdbcType=BIGINT} + project_id = #{projectId,jdbcType=BIGINT}, + hospital_type = #{hospitalType,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/tcm/src/main/resources/mapper_raw/InpatientMapper.xml b/tcm/src/main/resources/mapper_raw/InpatientMapper.xml index 5fb81f59..6e079771 100644 --- a/tcm/src/main/resources/mapper_raw/InpatientMapper.xml +++ b/tcm/src/main/resources/mapper_raw/InpatientMapper.xml @@ -10,6 +10,7 @@ + @@ -70,7 +71,7 @@ - id, name, remarks, collection_num, user_id, created_at, update_at, rec_status + id, name, remarks, collection_num, user_id, created_at, update_at, rec_status, code @@ -198,6 +207,9 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + code = #{record.code,jdbcType=VARCHAR}, + @@ -212,7 +224,8 @@ user_id = #{record.userId,jdbcType=BIGINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, update_at = #{record.updateAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + code = #{record.code,jdbcType=VARCHAR} @@ -241,6 +254,9 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + code = #{code,jdbcType=VARCHAR}, + where id = #{id,jdbcType=BIGINT} @@ -252,7 +268,8 @@ user_id = #{userId,jdbcType=BIGINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, update_at = #{updateAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + code = #{code,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/tcm/src/main/resources/mapper_raw/QuestionHospitalMapper.xml b/tcm/src/main/resources/mapper_raw/QuestionHospitalMapper.xml new file mode 100644 index 00000000..43c2646e --- /dev/null +++ b/tcm/src/main/resources/mapper_raw/QuestionHospitalMapper.xml @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, question_id, hospital_id, fill_type, remark, operator, created_at, updated_at, + rec_status + + + + + delete from t_question_hospital + where id = #{id,jdbcType=BIGINT} + + + delete from t_question_hospital + + + + + + insert into t_question_hospital (id, question_id, hospital_id, + fill_type, remark, operator, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT}, #{hospitalId,jdbcType=BIGINT}, + #{fillType,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_question_hospital + + + id, + + + question_id, + + + hospital_id, + + + fill_type, + + + remark, + + + operator, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{questionId,jdbcType=BIGINT}, + + + #{hospitalId,jdbcType=BIGINT}, + + + #{fillType,jdbcType=TINYINT}, + + + #{remark,jdbcType=VARCHAR}, + + + #{operator,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_question_hospital + + + id = #{record.id,jdbcType=BIGINT}, + + + question_id = #{record.questionId,jdbcType=BIGINT}, + + + hospital_id = #{record.hospitalId,jdbcType=BIGINT}, + + + fill_type = #{record.fillType,jdbcType=TINYINT}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + operator = #{record.operator,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_question_hospital + set id = #{record.id,jdbcType=BIGINT}, + question_id = #{record.questionId,jdbcType=BIGINT}, + hospital_id = #{record.hospitalId,jdbcType=BIGINT}, + fill_type = #{record.fillType,jdbcType=TINYINT}, + remark = #{record.remark,jdbcType=VARCHAR}, + operator = #{record.operator,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_question_hospital + + + question_id = #{questionId,jdbcType=BIGINT}, + + + hospital_id = #{hospitalId,jdbcType=BIGINT}, + + + fill_type = #{fillType,jdbcType=TINYINT}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + operator = #{operator,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_question_hospital + set question_id = #{questionId,jdbcType=BIGINT}, + hospital_id = #{hospitalId,jdbcType=BIGINT}, + fill_type = #{fillType,jdbcType=TINYINT}, + remark = #{remark,jdbcType=VARCHAR}, + operator = #{operator,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tcm/src/main/resources/mapper_raw/QuestionOcrMapper.xml b/tcm/src/main/resources/mapper_raw/QuestionOcrMapper.xml index 234718b9..990dd775 100644 --- a/tcm/src/main/resources/mapper_raw/QuestionOcrMapper.xml +++ b/tcm/src/main/resources/mapper_raw/QuestionOcrMapper.xml @@ -5,7 +5,7 @@ - + @@ -73,7 +73,8 @@ - id, code, sort, hospital, start, end, remark, operator, created_at, updated_at, rec_status + id, code, sort, hospital_id, start, end, remark, operator, created_at, updated_at, + rec_status + select + + distinct + + + from t_question_record_time + + + + + order by ${orderByClause} + + + + + delete from t_question_record_time + where id = #{id,jdbcType=BIGINT} + + + delete from t_question_record_time + + + + + + insert into t_question_record_time (id, code, recode_time, + hospital_id, remark, operator, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{recodeTime,jdbcType=INTEGER}, + #{hospitalId,jdbcType=BIGINT}, #{remark,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_question_record_time + + + id, + + + code, + + + recode_time, + + + hospital_id, + + + remark, + + + operator, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{code,jdbcType=VARCHAR}, + + + #{recodeTime,jdbcType=INTEGER}, + + + #{hospitalId,jdbcType=BIGINT}, + + + #{remark,jdbcType=VARCHAR}, + + + #{operator,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_question_record_time + + + id = #{record.id,jdbcType=BIGINT}, + + + code = #{record.code,jdbcType=VARCHAR}, + + + recode_time = #{record.recodeTime,jdbcType=INTEGER}, + + + hospital_id = #{record.hospitalId,jdbcType=BIGINT}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + operator = #{record.operator,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_question_record_time + set id = #{record.id,jdbcType=BIGINT}, + code = #{record.code,jdbcType=VARCHAR}, + recode_time = #{record.recodeTime,jdbcType=INTEGER}, + hospital_id = #{record.hospitalId,jdbcType=BIGINT}, + remark = #{record.remark,jdbcType=VARCHAR}, + operator = #{record.operator,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_question_record_time + + + code = #{code,jdbcType=VARCHAR}, + + + recode_time = #{recodeTime,jdbcType=INTEGER}, + + + hospital_id = #{hospitalId,jdbcType=BIGINT}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + operator = #{operator,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_question_record_time + set code = #{code,jdbcType=VARCHAR}, + recode_time = #{recodeTime,jdbcType=INTEGER}, + hospital_id = #{hospitalId,jdbcType=BIGINT}, + remark = #{remark,jdbcType=VARCHAR}, + operator = #{operator,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/util/src/main/java/com/ccsens/util/CodeEnum.java b/util/src/main/java/com/ccsens/util/CodeEnum.java index 39531c53..c3596d9b 100644 --- a/util/src/main/java/com/ccsens/util/CodeEnum.java +++ b/util/src/main/java/com/ccsens/util/CodeEnum.java @@ -196,6 +196,7 @@ public enum CodeEnum { BAOHANJINLI(162,"不能删除包含经理得角色",true), CHONGFUTIJIAO(163,"不要重复提交",true), ZUISHAOCHUANLIANGE(164,"排序最少需要传入两个",true), + HOSPITAL_NOT_FOUND(165,"没有找到医院",true), ; diff --git a/util/src/main/java/com/ccsens/util/PoiUtil.java b/util/src/main/java/com/ccsens/util/PoiUtil.java index 654acf07..1c3f482e 100644 --- a/util/src/main/java/com/ccsens/util/PoiUtil.java +++ b/util/src/main/java/com/ccsens/util/PoiUtil.java @@ -328,9 +328,11 @@ public class PoiUtil { for (int i = 0; i < rows; i++) { Row row = getRow(sheet, i, dataIndex); - if (row == null) { + if (row == null || row.getLastCellNum() <= 0) { continue; } + System.out.println(row); + System.out.println(row.getLastCellNum()); Object[] objects = new Object[row.getLastCellNum()]; if (hasImg && imgMap != null) { for (String key : imgMap.keySet()) {