Browse Source

按医院+时间查找试题

recovery
zhizhi wu 4 years ago
parent
commit
d6a51986b1
  1. 22
      tcm/src/main/java/com/ccsens/tcm/bean/po/Hospital.java
  2. 130
      tcm/src/main/java/com/ccsens/tcm/bean/po/HospitalExample.java
  3. 11
      tcm/src/main/java/com/ccsens/tcm/bean/po/Inpatient.java
  4. 70
      tcm/src/main/java/com/ccsens/tcm/bean/po/InpatientExample.java
  5. 117
      tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospital.java
  6. 751
      tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospitalExample.java
  7. 12
      tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcr.java
  8. 48
      tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcrExample.java
  9. 117
      tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTime.java
  10. 761
      tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTimeExample.java
  11. 17
      tcm/src/main/java/com/ccsens/tcm/persist/dao/QuestionHospitalDao.java
  12. 30
      tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionHospitalMapper.java
  13. 30
      tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionRecordTimeMapper.java
  14. 83
      tcm/src/main/java/com/ccsens/tcm/service/ImportService.java
  15. 13
      tcm/src/main/java/com/ccsens/tcm/service/QuestionService.java
  16. 4
      tcm/src/main/resources/application.yml
  17. 1
      tcm/src/main/resources/mapper_dao/QuestionDao.xml
  18. 10
      tcm/src/main/resources/mapper_dao/QuestionHospitalDao.xml
  19. 2
      tcm/src/main/resources/mapper_dao/QuestionOcrDao.xml
  20. 52
      tcm/src/main/resources/mapper_raw/HospitalMapper.xml
  21. 27
      tcm/src/main/resources/mapper_raw/InpatientMapper.xml
  22. 276
      tcm/src/main/resources/mapper_raw/QuestionHospitalMapper.xml
  23. 29
      tcm/src/main/resources/mapper_raw/QuestionOcrMapper.xml
  24. 275
      tcm/src/main/resources/mapper_raw/QuestionRecordTimeMapper.xml
  25. 1
      util/src/main/java/com/ccsens/util/CodeEnum.java
  26. 4
      util/src/main/java/com/ccsens/util/PoiUtil.java

22
tcm/src/main/java/com/ccsens/tcm/bean/po/Hospital.java

@ -6,6 +6,8 @@ import java.util.Date;
public class Hospital implements Serializable { public class Hospital implements Serializable {
private Long id; private Long id;
private String code;
private String name; private String name;
private Long operator; private Long operator;
@ -18,6 +20,8 @@ public class Hospital implements Serializable {
private Long projectId; private Long projectId;
private Byte hospitalType;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {
@ -28,6 +32,14 @@ public class Hospital implements Serializable {
this.id = id; this.id = id;
} }
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code == null ? null : code.trim();
}
public String getName() { public String getName() {
return name; return name;
} }
@ -76,6 +88,14 @@ public class Hospital implements Serializable {
this.projectId = projectId; this.projectId = projectId;
} }
public Byte getHospitalType() {
return hospitalType;
}
public void setHospitalType(Byte hospitalType) {
this.hospitalType = hospitalType;
}
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -83,12 +103,14 @@ public class Hospital implements Serializable {
sb.append(" ["); sb.append(" [");
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", code=").append(code);
sb.append(", name=").append(name); sb.append(", name=").append(name);
sb.append(", operator=").append(operator); sb.append(", operator=").append(operator);
sb.append(", createdAt=").append(createdAt); sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt); sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus); sb.append(", recStatus=").append(recStatus);
sb.append(", projectId=").append(projectId); sb.append(", projectId=").append(projectId);
sb.append(", hospitalType=").append(hospitalType);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }

130
tcm/src/main/java/com/ccsens/tcm/bean/po/HospitalExample.java

@ -165,6 +165,76 @@ public class HospitalExample {
return (Criteria) this; 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<String> values) {
addCriterion("code in", values, "code");
return (Criteria) this;
}
public Criteria andCodeNotIn(List<String> 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() { public Criteria andNameIsNull() {
addCriterion("name is null"); addCriterion("name is null");
return (Criteria) this; return (Criteria) this;
@ -534,6 +604,66 @@ public class HospitalExample {
addCriterion("project_id not between", value1, value2, "projectId"); addCriterion("project_id not between", value1, value2, "projectId");
return (Criteria) this; 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<Byte> values) {
addCriterion("hospital_type in", values, "hospitalType");
return (Criteria) this;
}
public Criteria andHospitalTypeNotIn(List<Byte> 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 { public static class Criteria extends GeneratedCriteria {

11
tcm/src/main/java/com/ccsens/tcm/bean/po/Inpatient.java

@ -20,6 +20,8 @@ public class Inpatient implements Serializable {
private Byte recStatus; private Byte recStatus;
private String code;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {
@ -86,6 +88,14 @@ public class Inpatient implements Serializable {
this.recStatus = recStatus; this.recStatus = recStatus;
} }
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code == null ? null : code.trim();
}
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -100,6 +110,7 @@ public class Inpatient implements Serializable {
sb.append(", createdAt=").append(createdAt); sb.append(", createdAt=").append(createdAt);
sb.append(", updateAt=").append(updateAt); sb.append(", updateAt=").append(updateAt);
sb.append(", recStatus=").append(recStatus); sb.append(", recStatus=").append(recStatus);
sb.append(", code=").append(code);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }

70
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"); addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this; 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<String> values) {
addCriterion("code in", values, "code");
return (Criteria) this;
}
public Criteria andCodeNotIn(List<String> 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 { public static class Criteria extends GeneratedCriteria {

117
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();
}
}

751
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<Criteria> oredCriteria;
public QuestionHospitalExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> 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<Long> values) {
addCriterion("question_id in", values, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdNotIn(List<Long> 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<Long> values) {
addCriterion("hospital_id in", values, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdNotIn(List<Long> 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<Byte> values) {
addCriterion("fill_type in", values, "fillType");
return (Criteria) this;
}
public Criteria andFillTypeNotIn(List<Byte> 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<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> 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<Long> values) {
addCriterion("operator in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotIn(List<Long> 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<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> 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);
}
}
}

12
tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcr.java

@ -10,7 +10,7 @@ public class QuestionOcr implements Serializable {
private Integer sort; private Integer sort;
private Long hospital; private Long hospitalId;
private String start; private String start;
@ -52,12 +52,12 @@ public class QuestionOcr implements Serializable {
this.sort = sort; this.sort = sort;
} }
public Long getHospital() { public Long getHospitalId() {
return hospital; return hospitalId;
} }
public void setHospital(Long hospital) { public void setHospitalId(Long hospitalId) {
this.hospital = hospital; this.hospitalId = hospitalId;
} }
public String getStart() { public String getStart() {
@ -125,7 +125,7 @@ public class QuestionOcr implements Serializable {
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", code=").append(code); sb.append(", code=").append(code);
sb.append(", sort=").append(sort); sb.append(", sort=").append(sort);
sb.append(", hospital=").append(hospital); sb.append(", hospitalId=").append(hospitalId);
sb.append(", start=").append(start); sb.append(", start=").append(start);
sb.append(", end=").append(end); sb.append(", end=").append(end);
sb.append(", remark=").append(remark); sb.append(", remark=").append(remark);

48
tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcrExample.java

@ -295,63 +295,63 @@ public class QuestionOcrExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHospitalIsNull() { public Criteria andHospitalIdIsNull() {
addCriterion("hospital is null"); addCriterion("hospital_id is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHospitalIsNotNull() { public Criteria andHospitalIdIsNotNull() {
addCriterion("hospital is not null"); addCriterion("hospital_id is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHospitalEqualTo(Long value) { public Criteria andHospitalIdEqualTo(Long value) {
addCriterion("hospital =", value, "hospital"); addCriterion("hospital_id =", value, "hospitalId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHospitalNotEqualTo(Long value) { public Criteria andHospitalIdNotEqualTo(Long value) {
addCriterion("hospital <>", value, "hospital"); addCriterion("hospital_id <>", value, "hospitalId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHospitalGreaterThan(Long value) { public Criteria andHospitalIdGreaterThan(Long value) {
addCriterion("hospital >", value, "hospital"); addCriterion("hospital_id >", value, "hospitalId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHospitalGreaterThanOrEqualTo(Long value) { public Criteria andHospitalIdGreaterThanOrEqualTo(Long value) {
addCriterion("hospital >=", value, "hospital"); addCriterion("hospital_id >=", value, "hospitalId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHospitalLessThan(Long value) { public Criteria andHospitalIdLessThan(Long value) {
addCriterion("hospital <", value, "hospital"); addCriterion("hospital_id <", value, "hospitalId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHospitalLessThanOrEqualTo(Long value) { public Criteria andHospitalIdLessThanOrEqualTo(Long value) {
addCriterion("hospital <=", value, "hospital"); addCriterion("hospital_id <=", value, "hospitalId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHospitalIn(List<Long> values) { public Criteria andHospitalIdIn(List<Long> values) {
addCriterion("hospital in", values, "hospital"); addCriterion("hospital_id in", values, "hospitalId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHospitalNotIn(List<Long> values) { public Criteria andHospitalIdNotIn(List<Long> values) {
addCriterion("hospital not in", values, "hospital"); addCriterion("hospital_id not in", values, "hospitalId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHospitalBetween(Long value1, Long value2) { public Criteria andHospitalIdBetween(Long value1, Long value2) {
addCriterion("hospital between", value1, value2, "hospital"); addCriterion("hospital_id between", value1, value2, "hospitalId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHospitalNotBetween(Long value1, Long value2) { public Criteria andHospitalIdNotBetween(Long value1, Long value2) {
addCriterion("hospital not between", value1, value2, "hospital"); addCriterion("hospital_id not between", value1, value2, "hospitalId");
return (Criteria) this; return (Criteria) this;
} }

117
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();
}
}

761
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<Criteria> oredCriteria;
public QuestionRecordTimeExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> 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<String> values) {
addCriterion("code in", values, "code");
return (Criteria) this;
}
public Criteria andCodeNotIn(List<String> 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<Integer> values) {
addCriterion("recode_time in", values, "recodeTime");
return (Criteria) this;
}
public Criteria andRecodeTimeNotIn(List<Integer> 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<Long> values) {
addCriterion("hospital_id in", values, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdNotIn(List<Long> 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<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> 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<Long> values) {
addCriterion("operator in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotIn(List<Long> 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<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> 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);
}
}
}

17
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<QuestionHospital> queryAll(@Param("type") Byte type);
}

30
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<QuestionHospital> 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);
}

30
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<QuestionRecordTime> 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);
}

83
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.po.*;
import com.ccsens.tcm.bean.vo.QuestionVo; import com.ccsens.tcm.bean.vo.QuestionVo;
import com.ccsens.tcm.persist.dao.QuestionDao; 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.QuestionOptionDao;
import com.ccsens.tcm.persist.dao.ReportCodeDao; 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.tcm.uitl.Constant;
import com.ccsens.util.PoiUtil; import com.ccsens.util.*;
import com.ccsens.util.RedisUtil; import com.ccsens.util.exception.BaseException;
import com.ccsens.util.StringUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
@ -40,6 +42,14 @@ public class ImportService implements IImportService {
private QuestionDao questionDao; private QuestionDao questionDao;
@Resource @Resource
private QuestionOptionDao questionOptionDao; private QuestionOptionDao questionOptionDao;
@Resource
private QuestionRecordTimeMapper questionRecordTimeMapper;
@Resource
private QuestionHospitalDao questionHospitalDao;
@Resource
private HospitalMapper hospitalMapper;
@Resource @Resource
private RedisUtil redisUtil; private RedisUtil redisUtil;
@ -88,6 +98,19 @@ public class ImportService implements IImportService {
Long questionId = null; Long questionId = null;
Long optionQuestionId = null; Long optionQuestionId = null;
Long optionId = null; Long optionId = null;
HospitalExample hospitalExample = new HospitalExample();
hospitalExample.createCriteria().andHospitalTypeEqualTo((byte)1);
List<Hospital> hospitals = hospitalMapper.selectByExample(hospitalExample);
if (CollectionUtil.isEmpty(hospitals)) {
throw new BaseException(CodeEnum.HOSPITAL_NOT_FOUND);
}
// 医院
Map<String, Long> hospitalMap = new HashMap<>();
hospitals.forEach(hospital -> {
hospitalMap.put(hospital.getCode(), hospital.getId());
});
for(Object[] objs : questions) { for(Object[] objs : questions) {
if (objs == null || objs.length < 4 || StringUtils.isEmpty(objs[2])) { if (objs == null || objs.length < 4 || StringUtils.isEmpty(objs[2])) {
log.info("数据不足,跳转下一行"); log.info("数据不足,跳转下一行");
@ -98,7 +121,7 @@ public class ImportService implements IImportService {
String type = String.valueOf(objs[0]); String type = String.valueOf(objs[0]);
switch (type) { switch (type) {
case "题目" : case "题目" :
Question question = initQuestion(objs, code, sort,null); Question question = initQuestion(objs, code, sort,null, hospitalMap);
questionId = question.getId(); questionId = question.getId();
questionList.add(question); questionList.add(question);
break; break;
@ -114,7 +137,7 @@ public class ImportService implements IImportService {
if (optionList.isEmpty()) { if (optionList.isEmpty()) {
break; break;
} }
Question relevanceQuestion = initQuestion(objs, code, sort, optionId); Question relevanceQuestion = initQuestion(objs, code, sort, optionId, hospitalMap);
questionList.add(relevanceQuestion); questionList.add(relevanceQuestion);
optionQuestionId = relevanceQuestion.getId(); optionQuestionId = relevanceQuestion.getId();
break; break;
@ -181,6 +204,11 @@ public class ImportService implements IImportService {
ReportCode report; ReportCode report;
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
report = list.get(0); 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 { } else {
report = new ReportCode(); report = new ReportCode();
report.setId(snowflake.nextId()); report.setId(snowflake.nextId());
@ -188,7 +216,25 @@ public class ImportService implements IImportService {
report.setCode((String) objs[0]); report.setCode((String) objs[0]);
report.setName((String) objs[1]); report.setName((String) objs[1]);
report.setParentCode(objs.length > 2 && !StringUtils.isEmpty(objs[2]) ? (String) objs[2] : Constant.STRING_DEFAULT); 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.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.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); 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 objs 表格内读取的数据
* @param evaluationCode 试题类型 * @param evaluationCode 试题类型
* @param sort 排序 * @param sort 排序
* @param hospitalMap
* @return 返回试题 * @return 返回试题
*/ */
private Question initQuestion(Object[] objs, String evaluationCode, int sort,Long optionId) { private Question initQuestion(Object[] objs, String evaluationCode, int sort, Long optionId, Map<String, Long> hospitalMap) {
QuestionExample example = new QuestionExample(); QuestionExample example = new QuestionExample();
example.createCriteria().andCodeEqualTo(evaluationCode).andSortEqualTo(sort); example.createCriteria().andCodeEqualTo(evaluationCode).andSortEqualTo(sort);
List<Question> questions = questionDao.selectByExample(example); List<Question> questions = questionDao.selectByExample(example);
@ -235,6 +282,28 @@ public class ImportService implements IImportService {
} }
} }
question.setRelevanceOptionId(optionId == null ? 0 : optionId); question.setRelevanceOptionId(optionId == null ? 0 : optionId);
// 设置关联那个医院
List<Long> 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); log.info("导入试题:{}", question);
return question; return question;

13
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 cn.hutool.core.collection.CollectionUtil;
import com.ccsens.tcm.bean.dto.QuestionDto; 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.po.QuestionOption;
import com.ccsens.tcm.bean.vo.QuestionVo; import com.ccsens.tcm.bean.vo.QuestionVo;
import com.ccsens.tcm.persist.dao.QuestionDao; import com.ccsens.tcm.persist.dao.QuestionDao;
import com.ccsens.tcm.persist.dao.ReportCodeDao; 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.RedisUtil;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
@ -25,9 +29,18 @@ public class QuestionService implements IQuestionService{
private ReportCodeDao reportCodeDao; private ReportCodeDao reportCodeDao;
@Resource @Resource
private QuestionDao questionDao; private QuestionDao questionDao;
@Resource
private PatientInformationMapper patientInformationMapper;
@Override @Override
public List<QuestionVo.PatientCode> getQuestionAndAnswer(QuestionDto.QueryQuestionAndAnswer param) { public List<QuestionVo.PatientCode> getQuestionAndAnswer(QuestionDto.QueryQuestionAndAnswer param) {
// 查询患者录入人ID
PatientInformation patient = patientInformationMapper.selectByPrimaryKey(param.getId());
if (patient == null) {
throw new BaseException(CodeEnum.PARAM_ERROR);
}
List<QuestionVo.PatientCode> patientCodeList = reportCodeDao.selectCodeByCode(param.getCode(),param.getNums()); List<QuestionVo.PatientCode> patientCodeList = reportCodeDao.selectCodeByCode(param.getCode(),param.getNums());
if(CollectionUtil.isNotEmpty(patientCodeList)){ if(CollectionUtil.isNotEmpty(patientCodeList)){
//循环一级code //循环一级code

4
tcm/src/main/resources/application.yml

@ -1,5 +1,5 @@
spring: spring:
profiles: profiles:
active: dev active: green
include: common, util-dev include: common, util-green

1
tcm/src/main/resources/mapper_dao/QuestionDao.xml

@ -162,6 +162,7 @@
SUBSTRING(r.contents,char_length(o.submit_value)+2),null SUBSTRING(r.contents,char_length(o.submit_value)+2),null
) as otherInformation ) as otherInformation
FROM FROM
t_question q t_question q
LEFT JOIN t_question_option o on q.id = o.question_id and o.rec_status = 0 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} LEFT JOIN t_patient_record r on r.test_questions_id = q.id and r.rec_status = 0 and r.patient_id = #{patientId}

10
tcm/src/main/resources/mapper_dao/QuestionHospitalDao.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tcm.persist.dao.QuestionHospitalDao">
<select id="queryAll" resultType="com.ccsens.tcm.bean.po.QuestionHospital">
select id from t_hospital where rec_status = 0
<if test="type != null and type != ''">
and hospital_type = #{type}
</if>
</select>
</mapper>

2
tcm/src/main/resources/mapper_dao/QuestionOcrDao.xml

@ -18,7 +18,7 @@
o.CODE = q.CODE o.CODE = q.CODE
AND o.sort = q.sort AND o.sort = q.sort
AND o.CODE = #{code} AND o.CODE = #{code}
AND o.hospital = #{hospitalId} AND o.hospital_id = #{hospitalId}
AND o.rec_status = 0 AND o.rec_status = 0
AND q.rec_status = 0 AND q.rec_status = 0
</select> </select>

52
tcm/src/main/resources/mapper_raw/HospitalMapper.xml

@ -3,12 +3,14 @@
<mapper namespace="com.ccsens.tcm.persist.mapper.HospitalMapper"> <mapper namespace="com.ccsens.tcm.persist.mapper.HospitalMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tcm.bean.po.Hospital"> <resultMap id="BaseResultMap" type="com.ccsens.tcm.bean.po.Hospital">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name" />
<result column="operator" jdbcType="BIGINT" property="operator" /> <result column="operator" jdbcType="BIGINT" property="operator" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> <result column="rec_status" jdbcType="TINYINT" property="recStatus" />
<result column="project_id" jdbcType="BIGINT" property="projectId" /> <result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="hospital_type" jdbcType="TINYINT" property="hospitalType" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -69,7 +71,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
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
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.HospitalExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.HospitalExample" resultMap="BaseResultMap">
select select
@ -102,12 +104,14 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.Hospital"> <insert id="insert" parameterType="com.ccsens.tcm.bean.po.Hospital">
insert into t_hospital (id, name, operator, insert into t_hospital (id, code, name,
created_at, updated_at, rec_status, operator, created_at, updated_at,
project_id) rec_status, project_id, hospital_type
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, )
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{projectId,jdbcType=BIGINT}) #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT}, #{projectId,jdbcType=BIGINT}, #{hospitalType,jdbcType=TINYINT}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.Hospital"> <insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.Hospital">
insert into t_hospital insert into t_hospital
@ -115,6 +119,9 @@
<if test="id != null"> <if test="id != null">
id, id,
</if> </if>
<if test="code != null">
code,
</if>
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -133,11 +140,17 @@
<if test="projectId != null"> <if test="projectId != null">
project_id, project_id,
</if> </if>
<if test="hospitalType != null">
hospital_type,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
#{id,jdbcType=BIGINT}, #{id,jdbcType=BIGINT},
</if> </if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
@ -156,6 +169,9 @@
<if test="projectId != null"> <if test="projectId != null">
#{projectId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
</if> </if>
<if test="hospitalType != null">
#{hospitalType,jdbcType=TINYINT},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.ccsens.tcm.bean.po.HospitalExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.ccsens.tcm.bean.po.HospitalExample" resultType="java.lang.Long">
@ -170,6 +186,9 @@
<if test="record.id != null"> <if test="record.id != null">
id = #{record.id,jdbcType=BIGINT}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="record.code != null">
code = #{record.code,jdbcType=VARCHAR},
</if>
<if test="record.name != null"> <if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR},
</if> </if>
@ -188,6 +207,9 @@
<if test="record.projectId != null"> <if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=BIGINT}, project_id = #{record.projectId,jdbcType=BIGINT},
</if> </if>
<if test="record.hospitalType != null">
hospital_type = #{record.hospitalType,jdbcType=TINYINT},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -196,12 +218,14 @@
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update t_hospital update t_hospital
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
code = #{record.code,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR},
operator = #{record.operator,jdbcType=BIGINT}, operator = #{record.operator,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}, rec_status = #{record.recStatus,jdbcType=TINYINT},
project_id = #{record.projectId,jdbcType=BIGINT} project_id = #{record.projectId,jdbcType=BIGINT},
hospital_type = #{record.hospitalType,jdbcType=TINYINT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -209,6 +233,9 @@
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tcm.bean.po.Hospital"> <update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tcm.bean.po.Hospital">
update t_hospital update t_hospital
<set> <set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="name != null"> <if test="name != null">
name = #{name,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR},
</if> </if>
@ -227,17 +254,22 @@
<if test="projectId != null"> <if test="projectId != null">
project_id = #{projectId,jdbcType=BIGINT}, project_id = #{projectId,jdbcType=BIGINT},
</if> </if>
<if test="hospitalType != null">
hospital_type = #{hospitalType,jdbcType=TINYINT},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tcm.bean.po.Hospital"> <update id="updateByPrimaryKey" parameterType="com.ccsens.tcm.bean.po.Hospital">
update t_hospital update t_hospital
set name = #{name,jdbcType=VARCHAR}, set code = #{code,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
operator = #{operator,jdbcType=BIGINT}, operator = #{operator,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP}, created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}, 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} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

27
tcm/src/main/resources/mapper_raw/InpatientMapper.xml

@ -10,6 +10,7 @@
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="update_at" jdbcType="TIMESTAMP" property="updateAt" /> <result column="update_at" jdbcType="TIMESTAMP" property="updateAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> <result column="rec_status" jdbcType="TINYINT" property="recStatus" />
<result column="code" jdbcType="VARCHAR" property="code" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -70,7 +71,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
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
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.InpatientExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.InpatientExample" resultMap="BaseResultMap">
select select
@ -105,10 +106,12 @@
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.Inpatient"> <insert id="insert" parameterType="com.ccsens.tcm.bean.po.Inpatient">
insert into t_inpatient (id, name, remarks, insert into t_inpatient (id, name, remarks,
collection_num, user_id, created_at, collection_num, user_id, created_at,
update_at, rec_status) update_at, rec_status, code
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},
#{collectionNum,jdbcType=INTEGER}, #{userId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{collectionNum,jdbcType=INTEGER}, #{userId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updateAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) #{updateAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{code,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.Inpatient"> <insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.Inpatient">
insert into t_inpatient insert into t_inpatient
@ -137,6 +140,9 @@
<if test="recStatus != null"> <if test="recStatus != null">
rec_status, rec_status,
</if> </if>
<if test="code != null">
code,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -163,6 +169,9 @@
<if test="recStatus != null"> <if test="recStatus != null">
#{recStatus,jdbcType=TINYINT}, #{recStatus,jdbcType=TINYINT},
</if> </if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.ccsens.tcm.bean.po.InpatientExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.ccsens.tcm.bean.po.InpatientExample" resultType="java.lang.Long">
@ -198,6 +207,9 @@
<if test="record.recStatus != null"> <if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT}, rec_status = #{record.recStatus,jdbcType=TINYINT},
</if> </if>
<if test="record.code != null">
code = #{record.code,jdbcType=VARCHAR},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -212,7 +224,8 @@
user_id = #{record.userId,jdbcType=BIGINT}, user_id = #{record.userId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, created_at = #{record.createdAt,jdbcType=TIMESTAMP},
update_at = #{record.updateAt,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}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -241,6 +254,9 @@
<if test="recStatus != null"> <if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT}, rec_status = #{recStatus,jdbcType=TINYINT},
</if> </if>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
@ -252,7 +268,8 @@
user_id = #{userId,jdbcType=BIGINT}, user_id = #{userId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP}, created_at = #{createdAt,jdbcType=TIMESTAMP},
update_at = #{updateAt,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} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

276
tcm/src/main/resources/mapper_raw/QuestionHospitalMapper.xml

@ -0,0 +1,276 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tcm.persist.mapper.QuestionHospitalMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tcm.bean.po.QuestionHospital">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="question_id" jdbcType="BIGINT" property="questionId" />
<result column="hospital_id" jdbcType="BIGINT" property="hospitalId" />
<result column="fill_type" jdbcType="TINYINT" property="fillType" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, question_id, hospital_id, fill_type, remark, operator, created_at, updated_at,
rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.QuestionHospitalExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_question_hospital
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_question_hospital
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_question_hospital
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tcm.bean.po.QuestionHospitalExample">
delete from t_question_hospital
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.QuestionHospital">
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>
<insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.QuestionHospital">
insert into t_question_hospital
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="questionId != null">
question_id,
</if>
<if test="hospitalId != null">
hospital_id,
</if>
<if test="fillType != null">
fill_type,
</if>
<if test="remark != null">
remark,
</if>
<if test="operator != null">
operator,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="questionId != null">
#{questionId,jdbcType=BIGINT},
</if>
<if test="hospitalId != null">
#{hospitalId,jdbcType=BIGINT},
</if>
<if test="fillType != null">
#{fillType,jdbcType=TINYINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="operator != null">
#{operator,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tcm.bean.po.QuestionHospitalExample" resultType="java.lang.Long">
select count(*) from t_question_hospital
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_question_hospital
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.questionId != null">
question_id = #{record.questionId,jdbcType=BIGINT},
</if>
<if test="record.hospitalId != null">
hospital_id = #{record.hospitalId,jdbcType=BIGINT},
</if>
<if test="record.fillType != null">
fill_type = #{record.fillType,jdbcType=TINYINT},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.operator != null">
operator = #{record.operator,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tcm.bean.po.QuestionHospital">
update t_question_hospital
<set>
<if test="questionId != null">
question_id = #{questionId,jdbcType=BIGINT},
</if>
<if test="hospitalId != null">
hospital_id = #{hospitalId,jdbcType=BIGINT},
</if>
<if test="fillType != null">
fill_type = #{fillType,jdbcType=TINYINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="operator != null">
operator = #{operator,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tcm.bean.po.QuestionHospital">
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}
</update>
</mapper>

29
tcm/src/main/resources/mapper_raw/QuestionOcrMapper.xml

@ -5,7 +5,7 @@
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" /> <result column="code" jdbcType="VARCHAR" property="code" />
<result column="sort" jdbcType="INTEGER" property="sort" /> <result column="sort" jdbcType="INTEGER" property="sort" />
<result column="hospital" jdbcType="BIGINT" property="hospital" /> <result column="hospital_id" jdbcType="BIGINT" property="hospitalId" />
<result column="start" jdbcType="VARCHAR" property="start" /> <result column="start" jdbcType="VARCHAR" property="start" />
<result column="end" jdbcType="VARCHAR" property="end" /> <result column="end" jdbcType="VARCHAR" property="end" />
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
@ -73,7 +73,8 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
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
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.QuestionOcrExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.QuestionOcrExample" resultMap="BaseResultMap">
select select
@ -107,11 +108,11 @@
</delete> </delete>
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.QuestionOcr"> <insert id="insert" parameterType="com.ccsens.tcm.bean.po.QuestionOcr">
insert into t_question_ocr (id, code, sort, insert into t_question_ocr (id, code, sort,
hospital, start, end, hospital_id, start, end,
remark, operator, created_at, remark, operator, created_at,
updated_at, rec_status) updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{hospital,jdbcType=BIGINT}, #{start,jdbcType=VARCHAR}, #{end,jdbcType=VARCHAR}, #{hospitalId,jdbcType=BIGINT}, #{start,jdbcType=VARCHAR}, #{end,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert> </insert>
@ -127,8 +128,8 @@
<if test="sort != null"> <if test="sort != null">
sort, sort,
</if> </if>
<if test="hospital != null"> <if test="hospitalId != null">
hospital, hospital_id,
</if> </if>
<if test="start != null"> <if test="start != null">
start, start,
@ -162,8 +163,8 @@
<if test="sort != null"> <if test="sort != null">
#{sort,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
</if> </if>
<if test="hospital != null"> <if test="hospitalId != null">
#{hospital,jdbcType=BIGINT}, #{hospitalId,jdbcType=BIGINT},
</if> </if>
<if test="start != null"> <if test="start != null">
#{start,jdbcType=VARCHAR}, #{start,jdbcType=VARCHAR},
@ -206,8 +207,8 @@
<if test="record.sort != null"> <if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER}, sort = #{record.sort,jdbcType=INTEGER},
</if> </if>
<if test="record.hospital != null"> <if test="record.hospitalId != null">
hospital = #{record.hospital,jdbcType=BIGINT}, hospital_id = #{record.hospitalId,jdbcType=BIGINT},
</if> </if>
<if test="record.start != null"> <if test="record.start != null">
start = #{record.start,jdbcType=VARCHAR}, start = #{record.start,jdbcType=VARCHAR},
@ -240,7 +241,7 @@
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
code = #{record.code,jdbcType=VARCHAR}, code = #{record.code,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER}, sort = #{record.sort,jdbcType=INTEGER},
hospital = #{record.hospital,jdbcType=BIGINT}, hospital_id = #{record.hospitalId,jdbcType=BIGINT},
start = #{record.start,jdbcType=VARCHAR}, start = #{record.start,jdbcType=VARCHAR},
end = #{record.end,jdbcType=VARCHAR}, end = #{record.end,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
@ -261,8 +262,8 @@
<if test="sort != null"> <if test="sort != null">
sort = #{sort,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER},
</if> </if>
<if test="hospital != null"> <if test="hospitalId != null">
hospital = #{hospital,jdbcType=BIGINT}, hospital_id = #{hospitalId,jdbcType=BIGINT},
</if> </if>
<if test="start != null"> <if test="start != null">
start = #{start,jdbcType=VARCHAR}, start = #{start,jdbcType=VARCHAR},
@ -292,7 +293,7 @@
update t_question_ocr update t_question_ocr
set code = #{code,jdbcType=VARCHAR}, set code = #{code,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER},
hospital = #{hospital,jdbcType=BIGINT}, hospital_id = #{hospitalId,jdbcType=BIGINT},
start = #{start,jdbcType=VARCHAR}, start = #{start,jdbcType=VARCHAR},
end = #{end,jdbcType=VARCHAR}, end = #{end,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},

275
tcm/src/main/resources/mapper_raw/QuestionRecordTimeMapper.xml

@ -0,0 +1,275 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tcm.persist.mapper.QuestionRecordTimeMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tcm.bean.po.QuestionRecordTime">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="recode_time" jdbcType="INTEGER" property="recodeTime" />
<result column="hospital_id" jdbcType="BIGINT" property="hospitalId" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, code, recode_time, hospital_id, remark, operator, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTimeExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_question_record_time
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_question_record_time
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_question_record_time
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTimeExample">
delete from t_question_record_time
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTime">
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>
<insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTime">
insert into t_question_record_time
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="recodeTime != null">
recode_time,
</if>
<if test="hospitalId != null">
hospital_id,
</if>
<if test="remark != null">
remark,
</if>
<if test="operator != null">
operator,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="recodeTime != null">
#{recodeTime,jdbcType=INTEGER},
</if>
<if test="hospitalId != null">
#{hospitalId,jdbcType=BIGINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="operator != null">
#{operator,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTimeExample" resultType="java.lang.Long">
select count(*) from t_question_record_time
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_question_record_time
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.code != null">
code = #{record.code,jdbcType=VARCHAR},
</if>
<if test="record.recodeTime != null">
recode_time = #{record.recodeTime,jdbcType=INTEGER},
</if>
<if test="record.hospitalId != null">
hospital_id = #{record.hospitalId,jdbcType=BIGINT},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.operator != null">
operator = #{record.operator,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTime">
update t_question_record_time
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="recodeTime != null">
recode_time = #{recodeTime,jdbcType=INTEGER},
</if>
<if test="hospitalId != null">
hospital_id = #{hospitalId,jdbcType=BIGINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="operator != null">
operator = #{operator,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTime">
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}
</update>
</mapper>

1
util/src/main/java/com/ccsens/util/CodeEnum.java

@ -196,6 +196,7 @@ public enum CodeEnum {
BAOHANJINLI(162,"不能删除包含经理得角色",true), BAOHANJINLI(162,"不能删除包含经理得角色",true),
CHONGFUTIJIAO(163,"不要重复提交",true), CHONGFUTIJIAO(163,"不要重复提交",true),
ZUISHAOCHUANLIANGE(164,"排序最少需要传入两个",true), ZUISHAOCHUANLIANGE(164,"排序最少需要传入两个",true),
HOSPITAL_NOT_FOUND(165,"没有找到医院",true),
; ;

4
util/src/main/java/com/ccsens/util/PoiUtil.java

@ -328,9 +328,11 @@ public class PoiUtil {
for (int i = 0; i < rows; i++) { for (int i = 0; i < rows; i++) {
Row row = getRow(sheet, i, dataIndex); Row row = getRow(sheet, i, dataIndex);
if (row == null) { if (row == null || row.getLastCellNum() <= 0) {
continue; continue;
} }
System.out.println(row);
System.out.println(row.getLastCellNum());
Object[] objects = new Object[row.getLastCellNum()]; Object[] objects = new Object[row.getLastCellNum()];
if (hasImg && imgMap != null) { if (hasImg && imgMap != null) {
for (String key : imgMap.keySet()) { for (String key : imgMap.keySet()) {

Loading…
Cancel
Save