Browse Source

导入试题

sd
zhizhi wu 4 years ago
parent
commit
2932b871da
  1. 8
      ht/src/main/java/com/ccsens/ht/api/ImportController.java
  2. 117
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportRecordDesc.java
  3. 761
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportRecordDescExample.java
  4. 11
      ht/src/main/java/com/ccsens/ht/bean/po/HtQuestion.java
  5. 60
      ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionExample.java
  6. 117
      ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOptionDesc.java
  7. 761
      ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOptionDescExample.java
  8. 161
      ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecord.java
  9. 1021
      ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordExample.java
  10. 117
      ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordOption.java
  11. 771
      ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordOptionExample.java
  12. 41
      ht/src/main/java/com/ccsens/ht/bean/vo/QuestionVo.java
  13. 26
      ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionOptionDescDao.java
  14. 16
      ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionRecordDao.java
  15. 15
      ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionRecordOptionDao.java
  16. 8
      ht/src/main/java/com/ccsens/ht/persist/dao/HtReportDao.java
  17. 30
      ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientReportRecordDescMapper.java
  18. 30
      ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionOptionDescMapper.java
  19. 30
      ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionRecordMapper.java
  20. 30
      ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionRecordOptionMapper.java
  21. 170
      ht/src/main/java/com/ccsens/ht/service/ImportService.java
  22. 42
      ht/src/main/java/com/ccsens/ht/service/QuestionService.java
  23. 24
      ht/src/main/java/com/ccsens/ht/uitl/Constant.java
  24. 4
      ht/src/main/resources/application.yml
  25. 21
      ht/src/main/resources/mapper_dao/HtQuestionOptionDescDao.xml
  26. 16
      ht/src/main/resources/mapper_dao/HtQuestionRecordDao.xml
  27. 14
      ht/src/main/resources/mapper_dao/HtQuestionRecordOptionDao.xml
  28. 3
      ht/src/main/resources/mapper_dao/HtReportDao.xml
  29. 276
      ht/src/main/resources/mapper_raw/HtPatientReportRecordDescMapper.xml
  30. 35
      ht/src/main/resources/mapper_raw/HtQuestionMapper.xml
  31. 275
      ht/src/main/resources/mapper_raw/HtQuestionOptionDescMapper.xml
  32. 338
      ht/src/main/resources/mapper_raw/HtQuestionRecordMapper.xml
  33. 276
      ht/src/main/resources/mapper_raw/HtQuestionRecordOptionMapper.xml

8
ht/src/main/java/com/ccsens/ht/api/ImportController.java

@ -94,24 +94,16 @@ public class ImportController {
@RequestMapping(value = "/importReportType", method = RequestMethod.POST) @RequestMapping(value = "/importReportType", method = RequestMethod.POST)
public JsonResponse importReportType(@RequestParam(required = true) Part file) throws Exception{ public JsonResponse importReportType(@RequestParam(required = true) Part file) throws Exception{
long time1 = System.currentTimeMillis();
//1.上传文件 //1.上传文件
String allowedExts = "xls,xlsx"; String allowedExts = "xls,xlsx";
String dir = WebConstant.UPLOAD_PROJECT_WBS + File.separator; String dir = WebConstant.UPLOAD_PROJECT_WBS + File.separator;
String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir); String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir);
File excelFile = new File(dir+path); File excelFile = new File(dir+path);
long time2 = System.currentTimeMillis(); long time2 = System.currentTimeMillis();
log.info("解析文件耗时:{}", (time2 - time1));
// importService.importPosition(excelFile, 0);
// long time3 = System.currentTimeMillis();
// log.info("导入职务耗时:{}", (time3 - time2));
// importService.importTitle(excelFile, 1);
long time4 = System.currentTimeMillis(); long time4 = System.currentTimeMillis();
// log.info("导入职称耗时:{}", (time4 - time3));
importService.importReport(excelFile, 2); importService.importReport(excelFile, 2);
long time5 = System.currentTimeMillis(); long time5 = System.currentTimeMillis();
log.info("导入报告单耗时:{}", (time5 - time4)); log.info("导入报告单耗时:{}", (time5 - time4));
// importService.importQuestion(excelFile, Constant.Ht.Question.ALL);
return JsonResponse.newInstance().ok(); return JsonResponse.newInstance().ok();
} }

117
ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportRecordDesc.java

@ -0,0 +1,117 @@
package com.ccsens.ht.bean.po;
import java.io.Serializable;
import java.util.Date;
public class HtPatientReportRecordDesc implements Serializable {
private Long id;
private Long patientReportId;
private Long recordId;
private String answer;
private String remark;
private Date createTime;
private Date updateTime;
private Byte isDel;
private Long answerTime;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getPatientReportId() {
return patientReportId;
}
public void setPatientReportId(Long patientReportId) {
this.patientReportId = patientReportId;
}
public Long getRecordId() {
return recordId;
}
public void setRecordId(Long recordId) {
this.recordId = recordId;
}
public String getAnswer() {
return answer;
}
public void setAnswer(String answer) {
this.answer = answer == null ? null : answer.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Byte getIsDel() {
return isDel;
}
public void setIsDel(Byte isDel) {
this.isDel = isDel;
}
public Long getAnswerTime() {
return answerTime;
}
public void setAnswerTime(Long answerTime) {
this.answerTime = answerTime;
}
@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(", patientReportId=").append(patientReportId);
sb.append(", recordId=").append(recordId);
sb.append(", answer=").append(answer);
sb.append(", remark=").append(remark);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", isDel=").append(isDel);
sb.append(", answerTime=").append(answerTime);
sb.append("]");
return sb.toString();
}
}

761
ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportRecordDescExample.java

@ -0,0 +1,761 @@
package com.ccsens.ht.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class HtPatientReportRecordDescExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public HtPatientReportRecordDescExample() {
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 andPatientReportIdIsNull() {
addCriterion("patient_report_id is null");
return (Criteria) this;
}
public Criteria andPatientReportIdIsNotNull() {
addCriterion("patient_report_id is not null");
return (Criteria) this;
}
public Criteria andPatientReportIdEqualTo(Long value) {
addCriterion("patient_report_id =", value, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdNotEqualTo(Long value) {
addCriterion("patient_report_id <>", value, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdGreaterThan(Long value) {
addCriterion("patient_report_id >", value, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdGreaterThanOrEqualTo(Long value) {
addCriterion("patient_report_id >=", value, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdLessThan(Long value) {
addCriterion("patient_report_id <", value, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdLessThanOrEqualTo(Long value) {
addCriterion("patient_report_id <=", value, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdIn(List<Long> values) {
addCriterion("patient_report_id in", values, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdNotIn(List<Long> values) {
addCriterion("patient_report_id not in", values, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdBetween(Long value1, Long value2) {
addCriterion("patient_report_id between", value1, value2, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdNotBetween(Long value1, Long value2) {
addCriterion("patient_report_id not between", value1, value2, "patientReportId");
return (Criteria) this;
}
public Criteria andRecordIdIsNull() {
addCriterion("record_id is null");
return (Criteria) this;
}
public Criteria andRecordIdIsNotNull() {
addCriterion("record_id is not null");
return (Criteria) this;
}
public Criteria andRecordIdEqualTo(Long value) {
addCriterion("record_id =", value, "recordId");
return (Criteria) this;
}
public Criteria andRecordIdNotEqualTo(Long value) {
addCriterion("record_id <>", value, "recordId");
return (Criteria) this;
}
public Criteria andRecordIdGreaterThan(Long value) {
addCriterion("record_id >", value, "recordId");
return (Criteria) this;
}
public Criteria andRecordIdGreaterThanOrEqualTo(Long value) {
addCriterion("record_id >=", value, "recordId");
return (Criteria) this;
}
public Criteria andRecordIdLessThan(Long value) {
addCriterion("record_id <", value, "recordId");
return (Criteria) this;
}
public Criteria andRecordIdLessThanOrEqualTo(Long value) {
addCriterion("record_id <=", value, "recordId");
return (Criteria) this;
}
public Criteria andRecordIdIn(List<Long> values) {
addCriterion("record_id in", values, "recordId");
return (Criteria) this;
}
public Criteria andRecordIdNotIn(List<Long> values) {
addCriterion("record_id not in", values, "recordId");
return (Criteria) this;
}
public Criteria andRecordIdBetween(Long value1, Long value2) {
addCriterion("record_id between", value1, value2, "recordId");
return (Criteria) this;
}
public Criteria andRecordIdNotBetween(Long value1, Long value2) {
addCriterion("record_id not between", value1, value2, "recordId");
return (Criteria) this;
}
public Criteria andAnswerIsNull() {
addCriterion("answer is null");
return (Criteria) this;
}
public Criteria andAnswerIsNotNull() {
addCriterion("answer is not null");
return (Criteria) this;
}
public Criteria andAnswerEqualTo(String value) {
addCriterion("answer =", value, "answer");
return (Criteria) this;
}
public Criteria andAnswerNotEqualTo(String value) {
addCriterion("answer <>", value, "answer");
return (Criteria) this;
}
public Criteria andAnswerGreaterThan(String value) {
addCriterion("answer >", value, "answer");
return (Criteria) this;
}
public Criteria andAnswerGreaterThanOrEqualTo(String value) {
addCriterion("answer >=", value, "answer");
return (Criteria) this;
}
public Criteria andAnswerLessThan(String value) {
addCriterion("answer <", value, "answer");
return (Criteria) this;
}
public Criteria andAnswerLessThanOrEqualTo(String value) {
addCriterion("answer <=", value, "answer");
return (Criteria) this;
}
public Criteria andAnswerLike(String value) {
addCriterion("answer like", value, "answer");
return (Criteria) this;
}
public Criteria andAnswerNotLike(String value) {
addCriterion("answer not like", value, "answer");
return (Criteria) this;
}
public Criteria andAnswerIn(List<String> values) {
addCriterion("answer in", values, "answer");
return (Criteria) this;
}
public Criteria andAnswerNotIn(List<String> values) {
addCriterion("answer not in", values, "answer");
return (Criteria) this;
}
public Criteria andAnswerBetween(String value1, String value2) {
addCriterion("answer between", value1, value2, "answer");
return (Criteria) this;
}
public Criteria andAnswerNotBetween(String value1, String value2) {
addCriterion("answer not between", value1, value2, "answer");
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 andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andIsDelIsNull() {
addCriterion("is_del is null");
return (Criteria) this;
}
public Criteria andIsDelIsNotNull() {
addCriterion("is_del is not null");
return (Criteria) this;
}
public Criteria andIsDelEqualTo(Byte value) {
addCriterion("is_del =", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotEqualTo(Byte value) {
addCriterion("is_del <>", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelGreaterThan(Byte value) {
addCriterion("is_del >", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelGreaterThanOrEqualTo(Byte value) {
addCriterion("is_del >=", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelLessThan(Byte value) {
addCriterion("is_del <", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelLessThanOrEqualTo(Byte value) {
addCriterion("is_del <=", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelIn(List<Byte> values) {
addCriterion("is_del in", values, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotIn(List<Byte> values) {
addCriterion("is_del not in", values, "isDel");
return (Criteria) this;
}
public Criteria andIsDelBetween(Byte value1, Byte value2) {
addCriterion("is_del between", value1, value2, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotBetween(Byte value1, Byte value2) {
addCriterion("is_del not between", value1, value2, "isDel");
return (Criteria) this;
}
public Criteria andAnswerTimeIsNull() {
addCriterion("answer_time is null");
return (Criteria) this;
}
public Criteria andAnswerTimeIsNotNull() {
addCriterion("answer_time is not null");
return (Criteria) this;
}
public Criteria andAnswerTimeEqualTo(Long value) {
addCriterion("answer_time =", value, "answerTime");
return (Criteria) this;
}
public Criteria andAnswerTimeNotEqualTo(Long value) {
addCriterion("answer_time <>", value, "answerTime");
return (Criteria) this;
}
public Criteria andAnswerTimeGreaterThan(Long value) {
addCriterion("answer_time >", value, "answerTime");
return (Criteria) this;
}
public Criteria andAnswerTimeGreaterThanOrEqualTo(Long value) {
addCriterion("answer_time >=", value, "answerTime");
return (Criteria) this;
}
public Criteria andAnswerTimeLessThan(Long value) {
addCriterion("answer_time <", value, "answerTime");
return (Criteria) this;
}
public Criteria andAnswerTimeLessThanOrEqualTo(Long value) {
addCriterion("answer_time <=", value, "answerTime");
return (Criteria) this;
}
public Criteria andAnswerTimeIn(List<Long> values) {
addCriterion("answer_time in", values, "answerTime");
return (Criteria) this;
}
public Criteria andAnswerTimeNotIn(List<Long> values) {
addCriterion("answer_time not in", values, "answerTime");
return (Criteria) this;
}
public Criteria andAnswerTimeBetween(Long value1, Long value2) {
addCriterion("answer_time between", value1, value2, "answerTime");
return (Criteria) this;
}
public Criteria andAnswerTimeNotBetween(Long value1, Long value2) {
addCriterion("answer_time not between", value1, value2, "answerTime");
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);
}
}
}

11
ht/src/main/java/com/ccsens/ht/bean/po/HtQuestion.java

@ -22,6 +22,8 @@ public class HtQuestion implements Serializable {
private String relationCode; private String relationCode;
private Long relationId;
private Byte operateType; private Byte operateType;
private Byte recodeStarttime; private Byte recodeStarttime;
@ -116,6 +118,14 @@ public class HtQuestion implements Serializable {
this.relationCode = relationCode == null ? null : relationCode.trim(); this.relationCode = relationCode == null ? null : relationCode.trim();
} }
public Long getRelationId() {
return relationId;
}
public void setRelationId(Long relationId) {
this.relationId = relationId;
}
public Byte getOperateType() { public Byte getOperateType() {
return operateType; return operateType;
} }
@ -211,6 +221,7 @@ public class HtQuestion implements Serializable {
sb.append(", recordType=").append(recordType); sb.append(", recordType=").append(recordType);
sb.append(", recordContent=").append(recordContent); sb.append(", recordContent=").append(recordContent);
sb.append(", relationCode=").append(relationCode); sb.append(", relationCode=").append(relationCode);
sb.append(", relationId=").append(relationId);
sb.append(", operateType=").append(operateType); sb.append(", operateType=").append(operateType);
sb.append(", recodeStarttime=").append(recodeStarttime); sb.append(", recodeStarttime=").append(recodeStarttime);
sb.append(", timeWabei=").append(timeWabei); sb.append(", timeWabei=").append(timeWabei);

60
ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionExample.java

@ -705,6 +705,66 @@ public class HtQuestionExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andRelationIdIsNull() {
addCriterion("relation_id is null");
return (Criteria) this;
}
public Criteria andRelationIdIsNotNull() {
addCriterion("relation_id is not null");
return (Criteria) this;
}
public Criteria andRelationIdEqualTo(Long value) {
addCriterion("relation_id =", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdNotEqualTo(Long value) {
addCriterion("relation_id <>", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdGreaterThan(Long value) {
addCriterion("relation_id >", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdGreaterThanOrEqualTo(Long value) {
addCriterion("relation_id >=", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdLessThan(Long value) {
addCriterion("relation_id <", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdLessThanOrEqualTo(Long value) {
addCriterion("relation_id <=", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdIn(List<Long> values) {
addCriterion("relation_id in", values, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdNotIn(List<Long> values) {
addCriterion("relation_id not in", values, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdBetween(Long value1, Long value2) {
addCriterion("relation_id between", value1, value2, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdNotBetween(Long value1, Long value2) {
addCriterion("relation_id not between", value1, value2, "relationId");
return (Criteria) this;
}
public Criteria andOperateTypeIsNull() { public Criteria andOperateTypeIsNull() {
addCriterion("operate_type is null"); addCriterion("operate_type is null");
return (Criteria) this; return (Criteria) this;

117
ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOptionDesc.java

@ -0,0 +1,117 @@
package com.ccsens.ht.bean.po;
import java.io.Serializable;
import java.util.Date;
public class HtQuestionOptionDesc implements Serializable {
private Long id;
private Long optionId;
private Integer sort;
private Byte type;
private String content;
private String remark;
private Date createTime;
private Date updateTime;
private Byte isDel;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getOptionId() {
return optionId;
}
public void setOptionId(Long optionId) {
this.optionId = optionId;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Byte getType() {
return type;
}
public void setType(Byte type) {
this.type = type;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Byte getIsDel() {
return isDel;
}
public void setIsDel(Byte isDel) {
this.isDel = isDel;
}
@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(", optionId=").append(optionId);
sb.append(", sort=").append(sort);
sb.append(", type=").append(type);
sb.append(", content=").append(content);
sb.append(", remark=").append(remark);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", isDel=").append(isDel);
sb.append("]");
return sb.toString();
}
}

761
ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOptionDescExample.java

@ -0,0 +1,761 @@
package com.ccsens.ht.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class HtQuestionOptionDescExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public HtQuestionOptionDescExample() {
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 andOptionIdIsNull() {
addCriterion("option_id is null");
return (Criteria) this;
}
public Criteria andOptionIdIsNotNull() {
addCriterion("option_id is not null");
return (Criteria) this;
}
public Criteria andOptionIdEqualTo(Long value) {
addCriterion("option_id =", value, "optionId");
return (Criteria) this;
}
public Criteria andOptionIdNotEqualTo(Long value) {
addCriterion("option_id <>", value, "optionId");
return (Criteria) this;
}
public Criteria andOptionIdGreaterThan(Long value) {
addCriterion("option_id >", value, "optionId");
return (Criteria) this;
}
public Criteria andOptionIdGreaterThanOrEqualTo(Long value) {
addCriterion("option_id >=", value, "optionId");
return (Criteria) this;
}
public Criteria andOptionIdLessThan(Long value) {
addCriterion("option_id <", value, "optionId");
return (Criteria) this;
}
public Criteria andOptionIdLessThanOrEqualTo(Long value) {
addCriterion("option_id <=", value, "optionId");
return (Criteria) this;
}
public Criteria andOptionIdIn(List<Long> values) {
addCriterion("option_id in", values, "optionId");
return (Criteria) this;
}
public Criteria andOptionIdNotIn(List<Long> values) {
addCriterion("option_id not in", values, "optionId");
return (Criteria) this;
}
public Criteria andOptionIdBetween(Long value1, Long value2) {
addCriterion("option_id between", value1, value2, "optionId");
return (Criteria) this;
}
public Criteria andOptionIdNotBetween(Long value1, Long value2) {
addCriterion("option_id not between", value1, value2, "optionId");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("type is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Byte value) {
addCriterion("type =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Byte value) {
addCriterion("type <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Byte value) {
addCriterion("type >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("type >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Byte value) {
addCriterion("type <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Byte value) {
addCriterion("type <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Byte> values) {
addCriterion("type in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Byte> values) {
addCriterion("type not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Byte value1, Byte value2) {
addCriterion("type between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Byte value1, Byte value2) {
addCriterion("type not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andContentIsNull() {
addCriterion("content is null");
return (Criteria) this;
}
public Criteria andContentIsNotNull() {
addCriterion("content is not null");
return (Criteria) this;
}
public Criteria andContentEqualTo(String value) {
addCriterion("content =", value, "content");
return (Criteria) this;
}
public Criteria andContentNotEqualTo(String value) {
addCriterion("content <>", value, "content");
return (Criteria) this;
}
public Criteria andContentGreaterThan(String value) {
addCriterion("content >", value, "content");
return (Criteria) this;
}
public Criteria andContentGreaterThanOrEqualTo(String value) {
addCriterion("content >=", value, "content");
return (Criteria) this;
}
public Criteria andContentLessThan(String value) {
addCriterion("content <", value, "content");
return (Criteria) this;
}
public Criteria andContentLessThanOrEqualTo(String value) {
addCriterion("content <=", value, "content");
return (Criteria) this;
}
public Criteria andContentLike(String value) {
addCriterion("content like", value, "content");
return (Criteria) this;
}
public Criteria andContentNotLike(String value) {
addCriterion("content not like", value, "content");
return (Criteria) this;
}
public Criteria andContentIn(List<String> values) {
addCriterion("content in", values, "content");
return (Criteria) this;
}
public Criteria andContentNotIn(List<String> values) {
addCriterion("content not in", values, "content");
return (Criteria) this;
}
public Criteria andContentBetween(String value1, String value2) {
addCriterion("content between", value1, value2, "content");
return (Criteria) this;
}
public Criteria andContentNotBetween(String value1, String value2) {
addCriterion("content not between", value1, value2, "content");
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 andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andIsDelIsNull() {
addCriterion("is_del is null");
return (Criteria) this;
}
public Criteria andIsDelIsNotNull() {
addCriterion("is_del is not null");
return (Criteria) this;
}
public Criteria andIsDelEqualTo(Byte value) {
addCriterion("is_del =", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotEqualTo(Byte value) {
addCriterion("is_del <>", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelGreaterThan(Byte value) {
addCriterion("is_del >", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelGreaterThanOrEqualTo(Byte value) {
addCriterion("is_del >=", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelLessThan(Byte value) {
addCriterion("is_del <", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelLessThanOrEqualTo(Byte value) {
addCriterion("is_del <=", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelIn(List<Byte> values) {
addCriterion("is_del in", values, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotIn(List<Byte> values) {
addCriterion("is_del not in", values, "isDel");
return (Criteria) this;
}
public Criteria andIsDelBetween(Byte value1, Byte value2) {
addCriterion("is_del between", value1, value2, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotBetween(Byte value1, Byte value2) {
addCriterion("is_del not between", value1, value2, "isDel");
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);
}
}
}

161
ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecord.java

@ -0,0 +1,161 @@
package com.ccsens.ht.bean.po;
import java.io.Serializable;
import java.util.Date;
public class HtQuestionRecord implements Serializable {
private Long id;
private Byte recordType;
private Long questionId;
private Integer sort;
private Byte calcType;
private String showTitle;
private String showForm;
private String defaultValue;
private Byte type;
private String remark;
private Date createTime;
private Date updateTime;
private Byte isDel;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Byte getRecordType() {
return recordType;
}
public void setRecordType(Byte recordType) {
this.recordType = recordType;
}
public Long getQuestionId() {
return questionId;
}
public void setQuestionId(Long questionId) {
this.questionId = questionId;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Byte getCalcType() {
return calcType;
}
public void setCalcType(Byte calcType) {
this.calcType = calcType;
}
public String getShowTitle() {
return showTitle;
}
public void setShowTitle(String showTitle) {
this.showTitle = showTitle == null ? null : showTitle.trim();
}
public String getShowForm() {
return showForm;
}
public void setShowForm(String showForm) {
this.showForm = showForm == null ? null : showForm.trim();
}
public String getDefaultValue() {
return defaultValue;
}
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue == null ? null : defaultValue.trim();
}
public Byte getType() {
return type;
}
public void setType(Byte type) {
this.type = type;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Byte getIsDel() {
return isDel;
}
public void setIsDel(Byte isDel) {
this.isDel = isDel;
}
@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(", recordType=").append(recordType);
sb.append(", questionId=").append(questionId);
sb.append(", sort=").append(sort);
sb.append(", calcType=").append(calcType);
sb.append(", showTitle=").append(showTitle);
sb.append(", showForm=").append(showForm);
sb.append(", defaultValue=").append(defaultValue);
sb.append(", type=").append(type);
sb.append(", remark=").append(remark);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", isDel=").append(isDel);
sb.append("]");
return sb.toString();
}
}

1021
ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordExample.java

File diff suppressed because it is too large

117
ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordOption.java

@ -0,0 +1,117 @@
package com.ccsens.ht.bean.po;
import java.io.Serializable;
import java.util.Date;
public class HtQuestionRecordOption implements Serializable {
private Long id;
private Long questionRecordId;
private Integer sort;
private String dataKey;
private String dataValue;
private String remark;
private Date createTime;
private Date updateTime;
private Byte isDel;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getQuestionRecordId() {
return questionRecordId;
}
public void setQuestionRecordId(Long questionRecordId) {
this.questionRecordId = questionRecordId;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getDataKey() {
return dataKey;
}
public void setDataKey(String dataKey) {
this.dataKey = dataKey == null ? null : dataKey.trim();
}
public String getDataValue() {
return dataValue;
}
public void setDataValue(String dataValue) {
this.dataValue = dataValue == null ? null : dataValue.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Byte getIsDel() {
return isDel;
}
public void setIsDel(Byte isDel) {
this.isDel = isDel;
}
@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(", questionRecordId=").append(questionRecordId);
sb.append(", sort=").append(sort);
sb.append(", dataKey=").append(dataKey);
sb.append(", dataValue=").append(dataValue);
sb.append(", remark=").append(remark);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", isDel=").append(isDel);
sb.append("]");
return sb.toString();
}
}

771
ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordOptionExample.java

@ -0,0 +1,771 @@
package com.ccsens.ht.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class HtQuestionRecordOptionExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public HtQuestionRecordOptionExample() {
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 andQuestionRecordIdIsNull() {
addCriterion("question_record_id is null");
return (Criteria) this;
}
public Criteria andQuestionRecordIdIsNotNull() {
addCriterion("question_record_id is not null");
return (Criteria) this;
}
public Criteria andQuestionRecordIdEqualTo(Long value) {
addCriterion("question_record_id =", value, "questionRecordId");
return (Criteria) this;
}
public Criteria andQuestionRecordIdNotEqualTo(Long value) {
addCriterion("question_record_id <>", value, "questionRecordId");
return (Criteria) this;
}
public Criteria andQuestionRecordIdGreaterThan(Long value) {
addCriterion("question_record_id >", value, "questionRecordId");
return (Criteria) this;
}
public Criteria andQuestionRecordIdGreaterThanOrEqualTo(Long value) {
addCriterion("question_record_id >=", value, "questionRecordId");
return (Criteria) this;
}
public Criteria andQuestionRecordIdLessThan(Long value) {
addCriterion("question_record_id <", value, "questionRecordId");
return (Criteria) this;
}
public Criteria andQuestionRecordIdLessThanOrEqualTo(Long value) {
addCriterion("question_record_id <=", value, "questionRecordId");
return (Criteria) this;
}
public Criteria andQuestionRecordIdIn(List<Long> values) {
addCriterion("question_record_id in", values, "questionRecordId");
return (Criteria) this;
}
public Criteria andQuestionRecordIdNotIn(List<Long> values) {
addCriterion("question_record_id not in", values, "questionRecordId");
return (Criteria) this;
}
public Criteria andQuestionRecordIdBetween(Long value1, Long value2) {
addCriterion("question_record_id between", value1, value2, "questionRecordId");
return (Criteria) this;
}
public Criteria andQuestionRecordIdNotBetween(Long value1, Long value2) {
addCriterion("question_record_id not between", value1, value2, "questionRecordId");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andDataKeyIsNull() {
addCriterion("data_key is null");
return (Criteria) this;
}
public Criteria andDataKeyIsNotNull() {
addCriterion("data_key is not null");
return (Criteria) this;
}
public Criteria andDataKeyEqualTo(String value) {
addCriterion("data_key =", value, "dataKey");
return (Criteria) this;
}
public Criteria andDataKeyNotEqualTo(String value) {
addCriterion("data_key <>", value, "dataKey");
return (Criteria) this;
}
public Criteria andDataKeyGreaterThan(String value) {
addCriterion("data_key >", value, "dataKey");
return (Criteria) this;
}
public Criteria andDataKeyGreaterThanOrEqualTo(String value) {
addCriterion("data_key >=", value, "dataKey");
return (Criteria) this;
}
public Criteria andDataKeyLessThan(String value) {
addCriterion("data_key <", value, "dataKey");
return (Criteria) this;
}
public Criteria andDataKeyLessThanOrEqualTo(String value) {
addCriterion("data_key <=", value, "dataKey");
return (Criteria) this;
}
public Criteria andDataKeyLike(String value) {
addCriterion("data_key like", value, "dataKey");
return (Criteria) this;
}
public Criteria andDataKeyNotLike(String value) {
addCriterion("data_key not like", value, "dataKey");
return (Criteria) this;
}
public Criteria andDataKeyIn(List<String> values) {
addCriterion("data_key in", values, "dataKey");
return (Criteria) this;
}
public Criteria andDataKeyNotIn(List<String> values) {
addCriterion("data_key not in", values, "dataKey");
return (Criteria) this;
}
public Criteria andDataKeyBetween(String value1, String value2) {
addCriterion("data_key between", value1, value2, "dataKey");
return (Criteria) this;
}
public Criteria andDataKeyNotBetween(String value1, String value2) {
addCriterion("data_key not between", value1, value2, "dataKey");
return (Criteria) this;
}
public Criteria andDataValueIsNull() {
addCriterion("data_value is null");
return (Criteria) this;
}
public Criteria andDataValueIsNotNull() {
addCriterion("data_value is not null");
return (Criteria) this;
}
public Criteria andDataValueEqualTo(String value) {
addCriterion("data_value =", value, "dataValue");
return (Criteria) this;
}
public Criteria andDataValueNotEqualTo(String value) {
addCriterion("data_value <>", value, "dataValue");
return (Criteria) this;
}
public Criteria andDataValueGreaterThan(String value) {
addCriterion("data_value >", value, "dataValue");
return (Criteria) this;
}
public Criteria andDataValueGreaterThanOrEqualTo(String value) {
addCriterion("data_value >=", value, "dataValue");
return (Criteria) this;
}
public Criteria andDataValueLessThan(String value) {
addCriterion("data_value <", value, "dataValue");
return (Criteria) this;
}
public Criteria andDataValueLessThanOrEqualTo(String value) {
addCriterion("data_value <=", value, "dataValue");
return (Criteria) this;
}
public Criteria andDataValueLike(String value) {
addCriterion("data_value like", value, "dataValue");
return (Criteria) this;
}
public Criteria andDataValueNotLike(String value) {
addCriterion("data_value not like", value, "dataValue");
return (Criteria) this;
}
public Criteria andDataValueIn(List<String> values) {
addCriterion("data_value in", values, "dataValue");
return (Criteria) this;
}
public Criteria andDataValueNotIn(List<String> values) {
addCriterion("data_value not in", values, "dataValue");
return (Criteria) this;
}
public Criteria andDataValueBetween(String value1, String value2) {
addCriterion("data_value between", value1, value2, "dataValue");
return (Criteria) this;
}
public Criteria andDataValueNotBetween(String value1, String value2) {
addCriterion("data_value not between", value1, value2, "dataValue");
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 andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andIsDelIsNull() {
addCriterion("is_del is null");
return (Criteria) this;
}
public Criteria andIsDelIsNotNull() {
addCriterion("is_del is not null");
return (Criteria) this;
}
public Criteria andIsDelEqualTo(Byte value) {
addCriterion("is_del =", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotEqualTo(Byte value) {
addCriterion("is_del <>", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelGreaterThan(Byte value) {
addCriterion("is_del >", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelGreaterThanOrEqualTo(Byte value) {
addCriterion("is_del >=", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelLessThan(Byte value) {
addCriterion("is_del <", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelLessThanOrEqualTo(Byte value) {
addCriterion("is_del <=", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelIn(List<Byte> values) {
addCriterion("is_del in", values, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotIn(List<Byte> values) {
addCriterion("is_del not in", values, "isDel");
return (Criteria) this;
}
public Criteria andIsDelBetween(Byte value1, Byte value2) {
addCriterion("is_del between", value1, value2, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotBetween(Byte value1, Byte value2) {
addCriterion("is_del not between", value1, value2, "isDel");
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);
}
}
}

41
ht/src/main/java/com/ccsens/ht/bean/vo/QuestionVo.java

@ -7,6 +7,7 @@ import com.ccsens.ht.bean.po.HtQuestionIntroducer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.apache.ibatis.javassist.runtime.Desc;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
@ -71,12 +72,14 @@ public class QuestionVo {
} }
@Data @Data
@ApiModel("QuestionVoReport") @ApiModel("报告单类型")
public static class Report{ public static class Report{
@ApiModelProperty("报告单编码") @ApiModelProperty("报告单编码")
private String code; private String code;
@ApiModelProperty("") @ApiModelProperty("名字")
private String name; private String name;
@ApiModelProperty("补充内容")
List<QuestionRecord> codeRecords;
} }
@Data @Data
@ -146,7 +149,8 @@ public class QuestionVo {
private byte showShareAnswer; private byte showShareAnswer;
@ApiModelProperty("关联试题") @ApiModelProperty("关联试题")
List<QuestionOption> relationQuestions = new ArrayList<>(); List<QuestionOption> relationQuestions = new ArrayList<>();
@ApiModelProperty("补充内容")
List<QuestionRecord> questionRecords;
/** /**
* 将HtQuestion转化成Question * 将HtQuestion转化成Question
* @param question * @param question
@ -177,6 +181,37 @@ public class QuestionVo {
} }
} }
@Data
@ApiModel("题目或code补充")
public static final class QuestionRecord{
@ApiModelProperty("id")
private Long id;
private Byte recordType;
private Long questionId;
private Integer sort;
@ApiModelProperty("0:点击过程 1:自动计算 2:手动计算")
private Byte calcType;
@ApiModelProperty("显示内容")
private String showTitle;
@ApiModelProperty("显示形式")
private String showForm;
@ApiModelProperty("默认值")
private String defaultValue;
@ApiModelProperty("自动计算规则:0:答案个数 1:插入数 同一物品两次以上插入算为一个插入 2:重复数 每次重复均算为一次重复")
private Byte type;
@ApiModelProperty("备注")
private String remark;
}
@Data
@ApiModel("选项补充")
public static final class OptionDesc{
@ApiModelProperty("id")
private Long id;
private Byte type;
private String content;
}
@Data @Data
@ApiModel("(可以共享答案的试题)关联的试题id") @ApiModel("(可以共享答案的试题)关联的试题id")

26
ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionOptionDescDao.java

@ -0,0 +1,26 @@
package com.ccsens.ht.persist.dao;
import com.ccsens.ht.bean.po.HtQuestionOptionDesc;
import com.ccsens.ht.persist.mapper.HtQuestionOptionDescMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @description: 选项补充
* @author: whj
* @time: 2021/4/21 0:43
*/
public interface HtQuestionOptionDescDao extends HtQuestionOptionDescMapper {
/**
* 删除指定选项的补充
* @param optionDescDelList 指定选项
*/
void delete(@Param("list") List<Long> optionDescDelList);
/**
* 批量插入
* @param optionDescList 选项补充
*/
void insertBatch(List<HtQuestionOptionDesc> optionDescList);
}

16
ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionRecordDao.java

@ -0,0 +1,16 @@
package com.ccsens.ht.persist.dao;
import com.ccsens.ht.bean.po.HtQuestionRecord;
import com.ccsens.ht.persist.mapper.HtQuestionRecordMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface HtQuestionRecordDao extends HtQuestionRecordMapper {
/**
* 批量添加试题
* @param questionRecords 试题
*/
void insertBatch(@Param("list") List<HtQuestionRecord> questionRecords);
}

15
ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionRecordOptionDao.java

@ -0,0 +1,15 @@
package com.ccsens.ht.persist.dao;
import com.ccsens.ht.bean.po.HtQuestionRecordOption;
import com.ccsens.ht.persist.mapper.HtQuestionRecordOptionMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface HtQuestionRecordOptionDao extends HtQuestionRecordOptionMapper {
/**
* 批量插入
* @param questionRecordOptions options
*/
void insertBatch(@Param("list") List<HtQuestionRecordOption> questionRecordOptions);
}

8
ht/src/main/java/com/ccsens/ht/persist/dao/HtReportDao.java

@ -5,6 +5,7 @@ import com.ccsens.ht.bean.vo.PatientReportSearchVo;
import com.ccsens.ht.persist.mapper.HtReportMapper; import com.ccsens.ht.persist.mapper.HtReportMapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List; import java.util.List;
/** /**
@ -37,4 +38,11 @@ public interface HtReportDao extends HtReportMapper {
* @return 搜索条件 * @return 搜索条件
*/ */
List<PatientReportSearchVo.SearchParam> queryParam(@Param("parentCode") String parentCode); List<PatientReportSearchVo.SearchParam> queryParam(@Param("parentCode") String parentCode);
/**
* 查询指定等级的报告单code
* @param type type
* @return code
*/
List<String> queryCode(@Param("type") byte type);
} }

30
ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientReportRecordDescMapper.java

@ -0,0 +1,30 @@
package com.ccsens.ht.persist.mapper;
import com.ccsens.ht.bean.po.HtPatientReportRecordDesc;
import com.ccsens.ht.bean.po.HtPatientReportRecordDescExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface HtPatientReportRecordDescMapper {
long countByExample(HtPatientReportRecordDescExample example);
int deleteByExample(HtPatientReportRecordDescExample example);
int deleteByPrimaryKey(Long id);
int insert(HtPatientReportRecordDesc record);
int insertSelective(HtPatientReportRecordDesc record);
List<HtPatientReportRecordDesc> selectByExample(HtPatientReportRecordDescExample example);
HtPatientReportRecordDesc selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") HtPatientReportRecordDesc record, @Param("example") HtPatientReportRecordDescExample example);
int updateByExample(@Param("record") HtPatientReportRecordDesc record, @Param("example") HtPatientReportRecordDescExample example);
int updateByPrimaryKeySelective(HtPatientReportRecordDesc record);
int updateByPrimaryKey(HtPatientReportRecordDesc record);
}

30
ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionOptionDescMapper.java

@ -0,0 +1,30 @@
package com.ccsens.ht.persist.mapper;
import com.ccsens.ht.bean.po.HtQuestionOptionDesc;
import com.ccsens.ht.bean.po.HtQuestionOptionDescExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface HtQuestionOptionDescMapper {
long countByExample(HtQuestionOptionDescExample example);
int deleteByExample(HtQuestionOptionDescExample example);
int deleteByPrimaryKey(Long id);
int insert(HtQuestionOptionDesc record);
int insertSelective(HtQuestionOptionDesc record);
List<HtQuestionOptionDesc> selectByExample(HtQuestionOptionDescExample example);
HtQuestionOptionDesc selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") HtQuestionOptionDesc record, @Param("example") HtQuestionOptionDescExample example);
int updateByExample(@Param("record") HtQuestionOptionDesc record, @Param("example") HtQuestionOptionDescExample example);
int updateByPrimaryKeySelective(HtQuestionOptionDesc record);
int updateByPrimaryKey(HtQuestionOptionDesc record);
}

30
ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionRecordMapper.java

@ -0,0 +1,30 @@
package com.ccsens.ht.persist.mapper;
import com.ccsens.ht.bean.po.HtQuestionRecord;
import com.ccsens.ht.bean.po.HtQuestionRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface HtQuestionRecordMapper {
long countByExample(HtQuestionRecordExample example);
int deleteByExample(HtQuestionRecordExample example);
int deleteByPrimaryKey(Long id);
int insert(HtQuestionRecord record);
int insertSelective(HtQuestionRecord record);
List<HtQuestionRecord> selectByExample(HtQuestionRecordExample example);
HtQuestionRecord selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") HtQuestionRecord record, @Param("example") HtQuestionRecordExample example);
int updateByExample(@Param("record") HtQuestionRecord record, @Param("example") HtQuestionRecordExample example);
int updateByPrimaryKeySelective(HtQuestionRecord record);
int updateByPrimaryKey(HtQuestionRecord record);
}

30
ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionRecordOptionMapper.java

@ -0,0 +1,30 @@
package com.ccsens.ht.persist.mapper;
import com.ccsens.ht.bean.po.HtQuestionRecordOption;
import com.ccsens.ht.bean.po.HtQuestionRecordOptionExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface HtQuestionRecordOptionMapper {
long countByExample(HtQuestionRecordOptionExample example);
int deleteByExample(HtQuestionRecordOptionExample example);
int deleteByPrimaryKey(Long id);
int insert(HtQuestionRecordOption record);
int insertSelective(HtQuestionRecordOption record);
List<HtQuestionRecordOption> selectByExample(HtQuestionRecordOptionExample example);
HtQuestionRecordOption selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") HtQuestionRecordOption record, @Param("example") HtQuestionRecordOptionExample example);
int updateByExample(@Param("record") HtQuestionRecordOption record, @Param("example") HtQuestionRecordOptionExample example);
int updateByPrimaryKeySelective(HtQuestionRecordOption record);
int updateByPrimaryKey(HtQuestionRecordOption record);
}

170
ht/src/main/java/com/ccsens/ht/service/ImportService.java

@ -3,6 +3,8 @@ package com.ccsens.ht.service;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake; import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.ccsens.ht.bean.po.*; import com.ccsens.ht.bean.po.*;
import com.ccsens.ht.persist.dao.*; import com.ccsens.ht.persist.dao.*;
@ -11,13 +13,14 @@ import com.ccsens.util.PoiUtil;
import com.ccsens.util.PropUtil; import com.ccsens.util.PropUtil;
import com.ccsens.util.StringUtil; import com.ccsens.util.StringUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.io.File; import java.io.File;
import java.util.*; import java.util.*;
@ -31,22 +34,29 @@ import java.util.*;
@Service @Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class ImportService implements IImportService { public class ImportService implements IImportService {
@Autowired @Resource
private Snowflake snowflake; private Snowflake snowflake;
@Autowired @Resource
private HtTitleDao htTitleDao; private HtTitleDao htTitleDao;
@Autowired @Resource
private HtPositionDao htPositionDao; private HtPositionDao htPositionDao;
@Autowired @Resource
private HtReportDao htReportDao; private HtReportDao htReportDao;
@Autowired @Resource
private HtQuestionDao htQuestionDao; private HtQuestionDao htQuestionDao;
@Autowired @Resource
private HtQuestionOptionDao htQuestionOptionDao; private HtQuestionOptionDao htQuestionOptionDao;
@Autowired @Resource
private HtQuestionIntroducerDao htQuestionIntroducerDao; private HtQuestionIntroducerDao htQuestionIntroducerDao;
@Autowired @Resource
private HtQuestionScoringRuleDao htQuestionScoringRuleDao; private HtQuestionScoringRuleDao htQuestionScoringRuleDao;
@Resource
private HtQuestionRecordDao htQuestionRecordDao;
@Resource
private HtQuestionRecordOptionDao htQuestionRecordOptionDao;
@Resource
private HtQuestionOptionDescDao htQuestionOptionDescDao;
@Override @Override
public String importPosition(File file, int sheetIndex) throws Exception { public String importPosition(File file, int sheetIndex) throws Exception {
@ -216,7 +226,7 @@ public class ImportService implements IImportService {
log.info("导入试题参数:{}, {}", file, type); log.info("导入试题参数:{}, {}", file, type);
List<String> types = new ArrayList<>(); List<String> types = new ArrayList<>();
if (Constant.Ht.Question.ALL.equalsIgnoreCase(type)) { if (Constant.Ht.Question.ALL.equalsIgnoreCase(type)) {
types.addAll(Constant.Ht.Question.QUESTION_TYPE); types.addAll(htReportDao.queryCode(Constant.Ht.Report.TYPE_EVALUATION));
} else { } else {
types.add(type); types.add(type);
} }
@ -235,6 +245,10 @@ public class ImportService implements IImportService {
List<HtQuestionOption> optionList = new ArrayList<>(); List<HtQuestionOption> optionList = new ArrayList<>();
List<HtQuestionIntroducer> introduceList = new ArrayList<>(); List<HtQuestionIntroducer> introduceList = new ArrayList<>();
List<HtQuestionScoringRule> ruleList = new ArrayList<>(); List<HtQuestionScoringRule> ruleList = new ArrayList<>();
List<HtQuestionRecord> questionRecordList = new ArrayList<>();
List<HtQuestionRecordOption> questionRecordOptionList = new ArrayList<>();
List<HtQuestionOptionDesc> optionDescList = new ArrayList<>();
List<Long> optionDescDelList = new ArrayList<>();
//记录那类型题是关联试题 //记录那类型题是关联试题
Map<String, String> parentCode = new HashMap<>(); Map<String, String> parentCode = new HashMap<>();
for(Object[] objs : questions) { for(Object[] objs : questions) {
@ -246,40 +260,52 @@ public class ImportService implements IImportService {
int sort = objs.length > 3 && StringUtil.checkNum(String.valueOf(objs[3]), false) ? Integer.parseInt(String.valueOf(objs[3])) : 1; int sort = objs.length > 3 && StringUtil.checkNum(String.valueOf(objs[3]), false) ? Integer.parseInt(String.valueOf(objs[3])) : 1;
String type = String.valueOf(objs[0]); String type = String.valueOf(objs[0]);
switch (type) { switch (type) {
case "题目" : case Constant.Import.EVALUATION_QUESTION :
HtQuestion question = initQuestion(objs, evaluationCode, sort); HtQuestion question = initQuestion(objs, evaluationCode, sort);
if (StrUtil.isNotEmpty(question.getRelationCode())) { question.setEvaluationCode(parentCode.getOrDefault(question.getParentCode(), question.getEvaluationCode()));
String[] split = question.getRelationCode().split("[,,]"); questionList.add(question);
for (String code: split) { break;
parentCode.put(code, question.getParentCode()); case Constant.Import.EVALUATION_RELATION:
HtQuestion relationQuestion = initQuestion(objs, evaluationCode, sort);
relationQuestion.setEvaluationCode(parentCode.getOrDefault(relationQuestion.getParentCode(), relationQuestion.getEvaluationCode()));
if (CollectionUtil.isNotEmpty(questionList)) {
HtQuestion prev = questionList.get(questionList.size() - 1);
if (prev.getRelationId() != null && prev.getRelationId() >0) {
prev.setRelationId(prev.getRelationId());
} else {
prev.setRelationId(prev.getId());
} }
} }
if (parentCode.containsKey(question.getParentCode())) { questionList.add(relationQuestion);
question.setEvaluationCode(parentCode.get(question.getParentCode()));
}
questionList.add(question);
break; break;
case "选项" : case Constant.Import.EVALUATION_OPTION :
if (questionList.isEmpty()) { if (questionList.isEmpty()) {
break; break;
} }
HtQuestionOption option = initOption(objs, questionList.get(questionList.size()-1).getId(), sort); HtQuestionOption option = initOption(objs, questionList.get(questionList.size()-1).getId(), sort, optionDescList, optionDescDelList);
optionList.add(option); optionList.add(option);
break; break;
case "解析" : case Constant.Import.EVALUATION_PARSE :
if (questionList.isEmpty()) { if (questionList.isEmpty()) {
break; break;
} }
HtQuestionIntroducer introduce = initIntroduce(objs, questionList.get(questionList.size()-1).getId(), sort); HtQuestionIntroducer introduce = initIntroduce(objs, questionList.get(questionList.size()-1).getId(), sort);
introduceList.add(introduce); introduceList.add(introduce);
break; break;
case "规则" : case Constant.Import.EVALUATION_RULE :
if (questionList.isEmpty()) { if (questionList.isEmpty()) {
break; break;
} }
HtQuestionScoringRule rule = initRule(objs, questionList.get(questionList.size() - 1).getId()); HtQuestionScoringRule rule = initRule(objs, questionList.get(questionList.size() - 1).getId());
ruleList.add(rule); ruleList.add(rule);
break; break;
case Constant.Import.EVALUATION_RECORD:
if (questionList.isEmpty()) {
break;
}
HtQuestionRecord record = initRecord(objs, questionList.get(questionList.size() - 1).getId(), questionRecordOptionList);
questionRecordList.add(record);
break;
default: default:
log.info("{}类型未知,不解析", type); log.info("{}类型未知,不解析", type);
break; break;
@ -301,8 +327,72 @@ public class ImportService implements IImportService {
if (!ruleList.isEmpty()) { if (!ruleList.isEmpty()) {
htQuestionScoringRuleDao.insertBatch(ruleList); htQuestionScoringRuleDao.insertBatch(ruleList);
} }
if (!questionRecordList.isEmpty()) {
htQuestionRecordDao.insertBatch(questionRecordList);
}
if (!questionRecordOptionList.isEmpty()) {
htQuestionRecordOptionDao.insertBatch(questionRecordOptionList);
}
if (!optionDescDelList.isEmpty()) {
htQuestionOptionDescDao.delete(optionDescDelList);
}
if (!optionDescList.isEmpty()) {
htQuestionOptionDescDao.insertBatch(optionDescList);
}
}
/**
* 封装record option
* @param objs 一列
* @param id 试题ID
* @param questionRecordOptions record选项
* @return record
*/
private HtQuestionRecord initRecord(Object[] objs, Long id, List<HtQuestionRecordOption> questionRecordOptions) {
HtQuestionRecord record = new HtQuestionRecord();
String content = (String)objs[2];
JSONObject json = JSONObject.parseObject(content);
BeanUtils.copyProperties(json, record);
record.setRecordType(Constant.Ht.QuestionRecord.RECORD_TYPE_QUESTION);
// 判断是否存在,设置id
int sortIndex = 3;
int sort = StringUtil.checkNum(String.valueOf(objs[sortIndex]), false) ?
Integer.parseInt(String.valueOf(objs[sortIndex])) : Constant.Ht.Question.RULE_TYPE_DEFAULT;
HtQuestionRecordExample recordExample = new HtQuestionRecordExample();
recordExample.createCriteria().andQuestionIdEqualTo(id).andSortEqualTo(sort);
List<HtQuestionRecord> questionRecords = htQuestionRecordDao.selectByExample(recordExample);
if (CollectionUtil.isEmpty(questionRecords)) {
record.setId(snowflake.nextId());
} else {
record.setId(questionRecords.get(0).getId());
}
log.info("添加record:{}", record);
if (!json.containsKey(Constant.Import.RELATION_OPTION)) {
return record;
}
log.info("追加选项{}", json.getShort(Constant.Import.RELATION_OPTION));
JSONArray options = json.getJSONArray(Constant.Import.RELATION_OPTION);
for (Object obj: options) {
HtQuestionRecordOption recordOption = JSONObject.parseObject(((JSONObject) obj).toJSONString(), HtQuestionRecordOption.class);
if (CollectionUtil.isEmpty(questionRecords)) {
recordOption.setId(snowflake.nextId());
questionRecordOptions.add(recordOption);
continue;
}
HtQuestionRecordOptionExample optionExample = new HtQuestionRecordOptionExample();
optionExample.createCriteria().andQuestionRecordIdEqualTo(questionRecords.get(0).getId())
.andSortEqualTo(recordOption.getSort());
List<HtQuestionRecordOption> optionList = htQuestionRecordOptionDao.selectByExample(optionExample);
if (CollectionUtil.isNotEmpty(optionList)) {
recordOption.setId(optionList.get(0).getId());
} else {
recordOption.setId(snowflake.nextId());
}
questionRecordOptions.add(recordOption);
}
return record;
} }
private HtQuestionScoringRule initRule(Object[] objs, Long questionId) { private HtQuestionScoringRule initRule(Object[] objs, Long questionId) {
@ -344,8 +434,14 @@ public class ImportService implements IImportService {
return introduce; return introduce;
} }
/**初始化选项*/ /**初始化选项
private HtQuestionOption initOption(Object[] objs, Long questionId, int sort) throws Exception { * @param objs 表格一行
* @param questionId 试题ID
* @param sort 排序
* @param optionDescList 记录其他补充
* @return 选项
*/
private HtQuestionOption initOption(Object[] objs, Long questionId, int sort, List<HtQuestionOptionDesc> optionDescList, List<Long> optionIds) {
HtQuestionOptionExample example = new HtQuestionOptionExample(); HtQuestionOptionExample example = new HtQuestionOptionExample();
@ -367,7 +463,27 @@ public class ImportService implements IImportService {
option.setQuestionId(questionId); option.setQuestionId(questionId);
option.setSort(sort); option.setSort(sort);
option.setScore(option.getScore() == null ? Constant.Ht.NUMBER_DEFAULT_BIGDECIMAL : option.getScore()); option.setScore(option.getScore() == null ? Constant.Ht.NUMBER_DEFAULT_BIGDECIMAL : option.getScore());
// 判断有无补充
JSONObject json = JSONObject.parseObject(String.valueOf(objs[2]));
if (json.containsKey(Constant.Import.OPTION_DESC)) {
log.info("选项补充:{}",json.get(Constant.Import.OPTION_DESC));
// 删除原有的补充
if (CollectionUtil.isNotEmpty(options)) {
// 统计选项是否有补充
HtQuestionOptionDescExample descExample = new HtQuestionOptionDescExample();
descExample.createCriteria().andOptionIdEqualTo(option.getId());
long count = htQuestionOptionDescDao.countByExample(descExample);
if (count > 0) {
optionIds.add(options.get(0).getId());
}
}
JSONArray descArr = json.getJSONArray(Constant.Import.OPTION_DESC);
for (Object obj: descArr) {
HtQuestionOptionDesc desc = JSONObject.parseObject(JSON.toJSONString(obj), HtQuestionOptionDesc.class);
optionDescList.add(desc);
}
}
log.info("导入选项:{}", option); log.info("导入选项:{}", option);
return option; return option;
} }
@ -516,7 +632,7 @@ public class ImportService implements IImportService {
report.setParentCode(objs.length > 2 && !StringUtils.isEmpty(objs[2]) ? (String) objs[2] : Constant.Ht.STRING_DEFAULT); report.setParentCode(objs.length > 2 && !StringUtils.isEmpty(objs[2]) ? (String) objs[2] : Constant.Ht.STRING_DEFAULT);
report.setDescription(objs.length > 3 && !StringUtils.isEmpty(objs[3]) ? (String) objs[3] : Constant.Ht.STRING_DEFAULT); report.setDescription(objs.length > 3 && !StringUtils.isEmpty(objs[3]) ? (String) objs[3] : Constant.Ht.STRING_DEFAULT);
report.setTotalScore(objs.length > 4 && StringUtil.checkNum(String.valueOf(objs[4]), false) ? Integer.parseInt(String.valueOf(objs[4])) : Constant.Ht.NUMBER_DEFAULT); report.setTotalScore(objs.length > 4 && StringUtil.checkNum(String.valueOf(objs[4]), false) ? Integer.parseInt(String.valueOf(objs[4])) : Constant.Ht.NUMBER_DEFAULT);
report.setType(objs.length > 5 && Constant.Ht.Report.TYPE.get((String)objs[5])!=null ? Constant.Ht.Report.TYPE.get((String)objs[5]) : Constant.Ht.NUMBER_DEFAULT); report.setType(objs.length > 5 && Constant.Ht.Report.TYPE.get(objs[5])!=null ? Constant.Ht.Report.TYPE.get((String)objs[5]) : Constant.Ht.NUMBER_DEFAULT);
report.setIsShow(objs.length>6 && StringUtil.checkNum(String.valueOf(objs[6]), false) ? Byte.parseByte(String.valueOf(objs[6])) : Constant.Ht.NUMBER_DEFAULT); report.setIsShow(objs.length>6 && StringUtil.checkNum(String.valueOf(objs[6]), false) ? Byte.parseByte(String.valueOf(objs[6])) : Constant.Ht.NUMBER_DEFAULT);
report.setRemark(objs.length>7 && !StringUtils.isEmpty(objs[7]) ? (String) objs[7] : Constant.Ht.STRING_DEFAULT); report.setRemark(objs.length>7 && !StringUtils.isEmpty(objs[7]) ? (String) objs[7] : Constant.Ht.STRING_DEFAULT);
report.setSort(objs.length > 8 && StringUtil.checkNum(String.valueOf(objs[8]), false) ? Integer.parseInt(String.valueOf(objs[8])) : Constant.Ht.NUMBER_DEFAULT); report.setSort(objs.length > 8 && StringUtil.checkNum(String.valueOf(objs[8]), false) ? Integer.parseInt(String.valueOf(objs[8])) : Constant.Ht.NUMBER_DEFAULT);

42
ht/src/main/java/com/ccsens/ht/service/QuestionService.java

@ -75,7 +75,7 @@ public class QuestionService implements IQuestionService {
@Override @Override
public QuestionVo.Query queryQuestion(QuestionDto.Query query, Long userId) { public QuestionVo.Query queryQuestion(QuestionDto.Query query, Long userId) {
log.info("请求参数:{},{}", query, userId); log.info("请求参数:{},{}", query, userId);
//1.根据类型和题号,查询试题 //TODO 1.根据类型和题号,查询试题 和 补充内容(含code的补充内容)
HtQuestionExample questionExample = new HtQuestionExample(); HtQuestionExample questionExample = new HtQuestionExample();
questionExample.createCriteria().andEvaluationCodeEqualTo(query.getCode()).andSortEqualTo(query.getNum()); questionExample.createCriteria().andEvaluationCodeEqualTo(query.getCode()).andSortEqualTo(query.getNum());
List<HtQuestion> questionList = htQuestionDao.selectByExample(questionExample); List<HtQuestion> questionList = htQuestionDao.selectByExample(questionExample);
@ -86,6 +86,9 @@ public class QuestionService implements IQuestionService {
} }
HtQuestion question = questionList.get(0); HtQuestion question = questionList.get(0);
QuestionVo.Question questionVo = QuestionVo.Question.toQuestionVo(question); QuestionVo.Question questionVo = QuestionVo.Question.toQuestionVo(question);
// TODO 查询code的补充内容,做缓存
//检查当前试题是否有答案,共享答案的试题是否有答案 //检查当前试题是否有答案,共享答案的试题是否有答案
boolean f = false; boolean f = false;
if(ObjectUtil.isNotNull(query.getPatientReportId())){ if(ObjectUtil.isNotNull(query.getPatientReportId())){
@ -119,7 +122,7 @@ public class QuestionService implements IQuestionService {
//获取评测信息 //TODO 获取评测信息及补充信息
HtReportExample reportExample = new HtReportExample(); HtReportExample reportExample = new HtReportExample();
reportExample.createCriteria().andCodeEqualTo(question.getEvaluationCode()); reportExample.createCriteria().andCodeEqualTo(question.getEvaluationCode());
List<HtReport> htReports = htReportDao.selectByExample(reportExample); List<HtReport> htReports = htReportDao.selectByExample(reportExample);
@ -133,32 +136,29 @@ public class QuestionService implements IQuestionService {
Integer maxSort = htQuestionDao.selectMaxSort(query.getCode()); Integer maxSort = htQuestionDao.selectMaxSort(query.getCode());
//查询关联题目 //查询关联题目
if (!StrUtil.isEmpty(question.getRelationCode())) { HtQuestionExample example = new HtQuestionExample();
String[] codes = question.getRelationCode().split(Constant.COMMA); example.createCriteria().andRelationIdEqualTo(question.getId());
HtQuestionExample example = new HtQuestionExample(); example.setOrderByClause("id");
example.createCriteria().andParentCodeIn(CollectionUtils.arrayToList(codes)); List<HtQuestion> relationQuestions = htQuestionDao.selectByExample(example);
example.setOrderByClause("id"); List<QuestionVo.QuestionOption> vos = new ArrayList<>();
List<HtQuestion> relationQuestions = htQuestionDao.selectByExample(example); if (CollectionUtil.isNotEmpty(relationQuestions)) {
List<QuestionVo.QuestionOption> vos = new ArrayList<>(); relationQuestions.forEach(relation -> {
if (CollectionUtil.isNotEmpty(relationQuestions)) { //试题选项
relationQuestions.forEach(relation -> { List<QuestionVo.Option> options = htQuestionOptionDao.queryOption(relation.getId(), query.getPatientReportId());
//试题选项 QuestionVo.QuestionOption questionOption = QuestionVo.QuestionOption.toQuestionOption(relation, options);
List<QuestionVo.Option> options = htQuestionOptionDao.queryOption(relation.getId(), query.getPatientReportId()); vos.add(questionOption);
QuestionVo.QuestionOption questionOption = QuestionVo.QuestionOption.toQuestionOption(relation, options); });
vos.add(questionOption);
});
}
log.info("关联试题:{}", vos);
questionVo.setRelationQuestions(vos);
} }
log.info("关联试题:{}", vos);
questionVo.setRelationQuestions(vos);
//试题引导语 //试题引导语
HtQuestionIntroducerExample introduceExample = new HtQuestionIntroducerExample(); HtQuestionIntroducerExample introduceExample = new HtQuestionIntroducerExample();
introduceExample.createCriteria().andQuestionIdEqualTo(question.getId()); introduceExample.createCriteria().andQuestionIdEqualTo(question.getId());
introduceExample.setOrderByClause("sort"); introduceExample.setOrderByClause("sort");
List<HtQuestionIntroducer> introduces = htQuestionIntroducerDao.selectByExample(introduceExample); List<HtQuestionIntroducer> introduces = htQuestionIntroducerDao.selectByExample(introduceExample);
List<QuestionVo.Introduce> introduceVos = QuestionVo.Introduce.toIntroduces(introduces); List<QuestionVo.Introduce> introduceVos = QuestionVo.Introduce.toIntroduces(introduces);
//试题选项 //TODO 试题选项 及补充
List<QuestionVo.Option> optionList = htQuestionOptionDao.queryOption(question.getId(), query.getPatientReportId()); List<QuestionVo.Option> optionList = htQuestionOptionDao.queryOption(question.getId(), query.getPatientReportId());
//答题记录 //答题记录

24
ht/src/main/java/com/ccsens/ht/uitl/Constant.java

@ -1,7 +1,5 @@
package com.ccsens.ht.uitl; package com.ccsens.ht.uitl;
import com.ccsens.util.PropUtil;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -23,6 +21,22 @@ public class Constant {
/**上传图片访问路径*/ /**上传图片访问路径*/
public static final String UPLOAD_URL = "uploads/"; public static final String UPLOAD_URL = "uploads/";
/**导入相关*/
public static final class Import{
public final static String EVALUATION_RECORD = "其他记录";
public final static String EVALUATION_QUESTION = "题目";
public final static String EVALUATION_OPTION = "选项";
public final static String EVALUATION_RELATION = "关联题目";
public final static String EVALUATION_PARSE = "解析";
public final static String EVALUATION_RULE = "规则";
public final static String RELATION_OPTION = "option";
public static final String RELATION_OPTION_SORT = "sort";
public static final String OPTION_DESC = "desc";
}
/**病友画图轨迹颜色*/ /**病友画图轨迹颜色*/
public static final class LineColour { public static final class LineColour {
@ -68,6 +82,12 @@ public class Constant {
/**删除*/ /**删除*/
public final static byte IS_DEL = 1; public final static byte IS_DEL = 1;
public final static class QuestionRecord{
public static final byte RECORD_TYPE_CODE = 0;
public static final byte RECORD_TYPE_QUESTION = 1;
}
public final static class Operation { public final static class Operation {
//用户操作类型(0无,1语音,2画图,3.画图显示中线和图形,4敲击,5画图不显示图形,6画图只显示中线) //用户操作类型(0无,1语音,2画图,3.画图显示中线和图形,4敲击,5画图不显示图形,6画图只显示中线)
/**画图*/ /**画图*/

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

@ -1,4 +1,4 @@
spring: spring:
profiles: profiles:
active: prod active: dev
include: common, util-prod include: common, util-dev

21
ht/src/main/resources/mapper_dao/HtQuestionOptionDescDao.xml

@ -0,0 +1,21 @@
<?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.ht.persist.dao.HtQuestionOptionDescDao">
<insert id="insertBatch">
replace into t_ht_question_option_desc (id, option_id, type,
sort, content, remark)
values
<foreach collection="list" item="item" separator=",">
(#{item.id}, #{item.optionId}, #{item.type}, #{item.sort},
#{item.content}, #{item.remark})
</foreach>
</insert>
<delete id="delete">
update t_ht_question_option_desc set rec_status = 0 where option_id in
<foreach collection="list" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</delete>
</mapper>

16
ht/src/main/resources/mapper_dao/HtQuestionRecordDao.xml

@ -0,0 +1,16 @@
<?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.ht.persist.dao.HtQuestionRecordDao">
<insert id="insertBatch">
replace into t_ht_question_record (id, record_type, question_id,
sort, calc_type, show_title, show_form, default_value, type, remark)
values
<foreach collection="list" item="item" separator=",">
(#{item.id}, #{item.recordType}, #{item.questionId}, #{item.sort},
#{item.calcType}, #{item.showTitle}, #{item.showForm}, #{item.defaultValue},
#{item.type}, #{item.remark})
</foreach>
</insert>
</mapper>

14
ht/src/main/resources/mapper_dao/HtQuestionRecordOptionDao.xml

@ -0,0 +1,14 @@
<?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.ht.persist.dao.HtQuestionRecordOptionDao">
<insert id="insertBatch">
replace into t_ht_question_record_option (id, question_record_id, sort, data_key, data_value, remark)
values
<foreach collection="list" item="item" separator=",">
(#{item.id}, #{item.questionRecordId}, #{item.sort}, #{item.dataKey},
#{item.dataValue}, #{item.remark})
</foreach>
</insert>
</mapper>

3
ht/src/main/resources/mapper_dao/HtReportDao.xml

@ -66,5 +66,8 @@
GROUP BY t.CODE GROUP BY t.CODE
ORDER BY t.type,t.parent_code,t.sort ORDER BY t.type,t.parent_code,t.sort
</select> </select>
<select id="queryCode" resultType="java.lang.String">
select code from t_ht_report where type = #{type} and is_del = 0
</select>
</mapper> </mapper>

276
ht/src/main/resources/mapper_raw/HtPatientReportRecordDescMapper.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.ht.persist.mapper.HtPatientReportRecordDescMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtPatientReportRecordDesc">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="patient_report_id" jdbcType="BIGINT" property="patientReportId" />
<result column="record_id" jdbcType="BIGINT" property="recordId" />
<result column="answer" jdbcType="VARCHAR" property="answer" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" />
<result column="answer_time" jdbcType="BIGINT" property="answerTime" />
</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, patient_report_id, record_id, answer, remark, create_time, update_time, is_del,
answer_time
</sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientReportRecordDescExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_ht_patient_report_record_desc
<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_ht_patient_report_record_desc
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_ht_patient_report_record_desc
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtPatientReportRecordDescExample">
delete from t_ht_patient_report_record_desc
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtPatientReportRecordDesc">
insert into t_ht_patient_report_record_desc (id, patient_report_id, record_id,
answer, remark, create_time,
update_time, is_del, answer_time
)
values (#{id,jdbcType=BIGINT}, #{patientReportId,jdbcType=BIGINT}, #{recordId,jdbcType=BIGINT},
#{answer,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT}, #{answerTime,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientReportRecordDesc">
insert into t_ht_patient_report_record_desc
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="patientReportId != null">
patient_report_id,
</if>
<if test="recordId != null">
record_id,
</if>
<if test="answer != null">
answer,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isDel != null">
is_del,
</if>
<if test="answerTime != null">
answer_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="patientReportId != null">
#{patientReportId,jdbcType=BIGINT},
</if>
<if test="recordId != null">
#{recordId,jdbcType=BIGINT},
</if>
<if test="answer != null">
#{answer,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
#{isDel,jdbcType=TINYINT},
</if>
<if test="answerTime != null">
#{answerTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientReportRecordDescExample" resultType="java.lang.Long">
select count(*) from t_ht_patient_report_record_desc
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_ht_patient_report_record_desc
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.patientReportId != null">
patient_report_id = #{record.patientReportId,jdbcType=BIGINT},
</if>
<if test="record.recordId != null">
record_id = #{record.recordId,jdbcType=BIGINT},
</if>
<if test="record.answer != null">
answer = #{record.answer,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDel != null">
is_del = #{record.isDel,jdbcType=TINYINT},
</if>
<if test="record.answerTime != null">
answer_time = #{record.answerTime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_ht_patient_report_record_desc
set id = #{record.id,jdbcType=BIGINT},
patient_report_id = #{record.patientReportId,jdbcType=BIGINT},
record_id = #{record.recordId,jdbcType=BIGINT},
answer = #{record.answer,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_del = #{record.isDel,jdbcType=TINYINT},
answer_time = #{record.answerTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtPatientReportRecordDesc">
update t_ht_patient_report_record_desc
<set>
<if test="patientReportId != null">
patient_report_id = #{patientReportId,jdbcType=BIGINT},
</if>
<if test="recordId != null">
record_id = #{recordId,jdbcType=BIGINT},
</if>
<if test="answer != null">
answer = #{answer,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
is_del = #{isDel,jdbcType=TINYINT},
</if>
<if test="answerTime != null">
answer_time = #{answerTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtPatientReportRecordDesc">
update t_ht_patient_report_record_desc
set patient_report_id = #{patientReportId,jdbcType=BIGINT},
record_id = #{recordId,jdbcType=BIGINT},
answer = #{answer,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=TINYINT},
answer_time = #{answerTime,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

35
ht/src/main/resources/mapper_raw/HtQuestionMapper.xml

@ -11,6 +11,7 @@
<result column="record_type" jdbcType="VARCHAR" property="recordType" /> <result column="record_type" jdbcType="VARCHAR" property="recordType" />
<result column="record_content" jdbcType="VARCHAR" property="recordContent" /> <result column="record_content" jdbcType="VARCHAR" property="recordContent" />
<result column="relation_code" jdbcType="VARCHAR" property="relationCode" /> <result column="relation_code" jdbcType="VARCHAR" property="relationCode" />
<result column="relation_id" jdbcType="BIGINT" property="relationId" />
<result column="operate_type" jdbcType="TINYINT" property="operateType" /> <result column="operate_type" jdbcType="TINYINT" property="operateType" />
<result column="recode_starttime" jdbcType="TINYINT" property="recodeStarttime" /> <result column="recode_starttime" jdbcType="TINYINT" property="recodeStarttime" />
<result column="time_wabei" jdbcType="TINYINT" property="timeWabei" /> <result column="time_wabei" jdbcType="TINYINT" property="timeWabei" />
@ -82,8 +83,8 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, evaluation_code, parent_code, sort, question, type, record_type, record_content, id, evaluation_code, parent_code, sort, question, type, record_type, record_content,
relation_code, operate_type, recode_starttime, time_wabei, allow_clear, clear_times, relation_code, relation_id, operate_type, recode_starttime, time_wabei, allow_clear,
timing_length, remark, create_time, update_time, is_del clear_times, timing_length, remark, create_time, update_time, is_del
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionExample" resultMap="BaseResultMap">
select select
@ -119,17 +120,17 @@
insert into t_ht_question (id, evaluation_code, parent_code, insert into t_ht_question (id, evaluation_code, parent_code,
sort, question, type, sort, question, type,
record_type, record_content, relation_code, record_type, record_content, relation_code,
operate_type, recode_starttime, time_wabei, relation_id, operate_type, recode_starttime,
allow_clear, clear_times, timing_length, time_wabei, allow_clear, clear_times,
remark, create_time, update_time, timing_length, remark, create_time,
is_del) update_time, is_del)
values (#{id,jdbcType=BIGINT}, #{evaluationCode,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{evaluationCode,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER}, #{question,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, #{sort,jdbcType=INTEGER}, #{question,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT},
#{recordType,jdbcType=VARCHAR}, #{recordContent,jdbcType=VARCHAR}, #{relationCode,jdbcType=VARCHAR}, #{recordType,jdbcType=VARCHAR}, #{recordContent,jdbcType=VARCHAR}, #{relationCode,jdbcType=VARCHAR},
#{operateType,jdbcType=TINYINT}, #{recodeStarttime,jdbcType=TINYINT}, #{timeWabei,jdbcType=TINYINT}, #{relationId,jdbcType=BIGINT}, #{operateType,jdbcType=TINYINT}, #{recodeStarttime,jdbcType=TINYINT},
#{allowClear,jdbcType=TINYINT}, #{clearTimes,jdbcType=INTEGER}, #{timingLength,jdbcType=INTEGER}, #{timeWabei,jdbcType=TINYINT}, #{allowClear,jdbcType=TINYINT}, #{clearTimes,jdbcType=INTEGER},
#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{timingLength,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{isDel,jdbcType=TINYINT}) #{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT})
</insert> </insert>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtQuestion"> <insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtQuestion">
insert into t_ht_question insert into t_ht_question
@ -161,6 +162,9 @@
<if test="relationCode != null"> <if test="relationCode != null">
relation_code, relation_code,
</if> </if>
<if test="relationId != null">
relation_id,
</if>
<if test="operateType != null"> <if test="operateType != null">
operate_type, operate_type,
</if> </if>
@ -220,6 +224,9 @@
<if test="relationCode != null"> <if test="relationCode != null">
#{relationCode,jdbcType=VARCHAR}, #{relationCode,jdbcType=VARCHAR},
</if> </if>
<if test="relationId != null">
#{relationId,jdbcType=BIGINT},
</if>
<if test="operateType != null"> <if test="operateType != null">
#{operateType,jdbcType=TINYINT}, #{operateType,jdbcType=TINYINT},
</if> </if>
@ -288,6 +295,9 @@
<if test="record.relationCode != null"> <if test="record.relationCode != null">
relation_code = #{record.relationCode,jdbcType=VARCHAR}, relation_code = #{record.relationCode,jdbcType=VARCHAR},
</if> </if>
<if test="record.relationId != null">
relation_id = #{record.relationId,jdbcType=BIGINT},
</if>
<if test="record.operateType != null"> <if test="record.operateType != null">
operate_type = #{record.operateType,jdbcType=TINYINT}, operate_type = #{record.operateType,jdbcType=TINYINT},
</if> </if>
@ -334,6 +344,7 @@
record_type = #{record.recordType,jdbcType=VARCHAR}, record_type = #{record.recordType,jdbcType=VARCHAR},
record_content = #{record.recordContent,jdbcType=VARCHAR}, record_content = #{record.recordContent,jdbcType=VARCHAR},
relation_code = #{record.relationCode,jdbcType=VARCHAR}, relation_code = #{record.relationCode,jdbcType=VARCHAR},
relation_id = #{record.relationId,jdbcType=BIGINT},
operate_type = #{record.operateType,jdbcType=TINYINT}, operate_type = #{record.operateType,jdbcType=TINYINT},
recode_starttime = #{record.recodeStarttime,jdbcType=TINYINT}, recode_starttime = #{record.recodeStarttime,jdbcType=TINYINT},
time_wabei = #{record.timeWabei,jdbcType=TINYINT}, time_wabei = #{record.timeWabei,jdbcType=TINYINT},
@ -375,6 +386,9 @@
<if test="relationCode != null"> <if test="relationCode != null">
relation_code = #{relationCode,jdbcType=VARCHAR}, relation_code = #{relationCode,jdbcType=VARCHAR},
</if> </if>
<if test="relationId != null">
relation_id = #{relationId,jdbcType=BIGINT},
</if>
<if test="operateType != null"> <if test="operateType != null">
operate_type = #{operateType,jdbcType=TINYINT}, operate_type = #{operateType,jdbcType=TINYINT},
</if> </if>
@ -418,6 +432,7 @@
record_type = #{recordType,jdbcType=VARCHAR}, record_type = #{recordType,jdbcType=VARCHAR},
record_content = #{recordContent,jdbcType=VARCHAR}, record_content = #{recordContent,jdbcType=VARCHAR},
relation_code = #{relationCode,jdbcType=VARCHAR}, relation_code = #{relationCode,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=BIGINT},
operate_type = #{operateType,jdbcType=TINYINT}, operate_type = #{operateType,jdbcType=TINYINT},
recode_starttime = #{recodeStarttime,jdbcType=TINYINT}, recode_starttime = #{recodeStarttime,jdbcType=TINYINT},
time_wabei = #{timeWabei,jdbcType=TINYINT}, time_wabei = #{timeWabei,jdbcType=TINYINT},

275
ht/src/main/resources/mapper_raw/HtQuestionOptionDescMapper.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.ht.persist.mapper.HtQuestionOptionDescMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtQuestionOptionDesc">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="option_id" jdbcType="BIGINT" property="optionId" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" />
</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, option_id, sort, type, content, remark, create_time, update_time, is_del
</sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionDescExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_ht_question_option_desc
<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_ht_question_option_desc
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_ht_question_option_desc
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionDescExample">
delete from t_ht_question_option_desc
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionDesc">
insert into t_ht_question_option_desc (id, option_id, sort,
type, content, remark,
create_time, update_time, is_del
)
values (#{id,jdbcType=BIGINT}, #{optionId,jdbcType=BIGINT}, #{sort,jdbcType=INTEGER},
#{type,jdbcType=TINYINT}, #{content,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionDesc">
insert into t_ht_question_option_desc
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="optionId != null">
option_id,
</if>
<if test="sort != null">
sort,
</if>
<if test="type != null">
type,
</if>
<if test="content != null">
content,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isDel != null">
is_del,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="optionId != null">
#{optionId,jdbcType=BIGINT},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
#{isDel,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionDescExample" resultType="java.lang.Long">
select count(*) from t_ht_question_option_desc
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_ht_question_option_desc
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.optionId != null">
option_id = #{record.optionId,jdbcType=BIGINT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=TINYINT},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDel != null">
is_del = #{record.isDel,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_ht_question_option_desc
set id = #{record.id,jdbcType=BIGINT},
option_id = #{record.optionId,jdbcType=BIGINT},
sort = #{record.sort,jdbcType=INTEGER},
type = #{record.type,jdbcType=TINYINT},
content = #{record.content,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_del = #{record.isDel,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionDesc">
update t_ht_question_option_desc
<set>
<if test="optionId != null">
option_id = #{optionId,jdbcType=BIGINT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
is_del = #{isDel,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionDesc">
update t_ht_question_option_desc
set option_id = #{optionId,jdbcType=BIGINT},
sort = #{sort,jdbcType=INTEGER},
type = #{type,jdbcType=TINYINT},
content = #{content,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

338
ht/src/main/resources/mapper_raw/HtQuestionRecordMapper.xml

@ -0,0 +1,338 @@
<?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.ht.persist.mapper.HtQuestionRecordMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtQuestionRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="record_type" jdbcType="TINYINT" property="recordType" />
<result column="question_id" jdbcType="BIGINT" property="questionId" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="calc_type" jdbcType="TINYINT" property="calcType" />
<result column="show_title" jdbcType="VARCHAR" property="showTitle" />
<result column="show_form" jdbcType="VARCHAR" property="showForm" />
<result column="default_value" jdbcType="VARCHAR" property="defaultValue" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" />
</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, record_type, question_id, sort, calc_type, show_title, show_form, default_value,
type, remark, create_time, update_time, is_del
</sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionRecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_ht_question_record
<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_ht_question_record
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_ht_question_record
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionRecordExample">
delete from t_ht_question_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtQuestionRecord">
insert into t_ht_question_record (id, record_type, question_id,
sort, calc_type, show_title,
show_form, default_value, type,
remark, create_time, update_time,
is_del)
values (#{id,jdbcType=BIGINT}, #{recordType,jdbcType=TINYINT}, #{questionId,jdbcType=BIGINT},
#{sort,jdbcType=INTEGER}, #{calcType,jdbcType=TINYINT}, #{showTitle,jdbcType=VARCHAR},
#{showForm,jdbcType=VARCHAR}, #{defaultValue,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT},
#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{isDel,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtQuestionRecord">
insert into t_ht_question_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="recordType != null">
record_type,
</if>
<if test="questionId != null">
question_id,
</if>
<if test="sort != null">
sort,
</if>
<if test="calcType != null">
calc_type,
</if>
<if test="showTitle != null">
show_title,
</if>
<if test="showForm != null">
show_form,
</if>
<if test="defaultValue != null">
default_value,
</if>
<if test="type != null">
type,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isDel != null">
is_del,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="recordType != null">
#{recordType,jdbcType=TINYINT},
</if>
<if test="questionId != null">
#{questionId,jdbcType=BIGINT},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="calcType != null">
#{calcType,jdbcType=TINYINT},
</if>
<if test="showTitle != null">
#{showTitle,jdbcType=VARCHAR},
</if>
<if test="showForm != null">
#{showForm,jdbcType=VARCHAR},
</if>
<if test="defaultValue != null">
#{defaultValue,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
#{isDel,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionRecordExample" resultType="java.lang.Long">
select count(*) from t_ht_question_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_ht_question_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.recordType != null">
record_type = #{record.recordType,jdbcType=TINYINT},
</if>
<if test="record.questionId != null">
question_id = #{record.questionId,jdbcType=BIGINT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.calcType != null">
calc_type = #{record.calcType,jdbcType=TINYINT},
</if>
<if test="record.showTitle != null">
show_title = #{record.showTitle,jdbcType=VARCHAR},
</if>
<if test="record.showForm != null">
show_form = #{record.showForm,jdbcType=VARCHAR},
</if>
<if test="record.defaultValue != null">
default_value = #{record.defaultValue,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=TINYINT},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDel != null">
is_del = #{record.isDel,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_ht_question_record
set id = #{record.id,jdbcType=BIGINT},
record_type = #{record.recordType,jdbcType=TINYINT},
question_id = #{record.questionId,jdbcType=BIGINT},
sort = #{record.sort,jdbcType=INTEGER},
calc_type = #{record.calcType,jdbcType=TINYINT},
show_title = #{record.showTitle,jdbcType=VARCHAR},
show_form = #{record.showForm,jdbcType=VARCHAR},
default_value = #{record.defaultValue,jdbcType=VARCHAR},
type = #{record.type,jdbcType=TINYINT},
remark = #{record.remark,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_del = #{record.isDel,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtQuestionRecord">
update t_ht_question_record
<set>
<if test="recordType != null">
record_type = #{recordType,jdbcType=TINYINT},
</if>
<if test="questionId != null">
question_id = #{questionId,jdbcType=BIGINT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="calcType != null">
calc_type = #{calcType,jdbcType=TINYINT},
</if>
<if test="showTitle != null">
show_title = #{showTitle,jdbcType=VARCHAR},
</if>
<if test="showForm != null">
show_form = #{showForm,jdbcType=VARCHAR},
</if>
<if test="defaultValue != null">
default_value = #{defaultValue,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
is_del = #{isDel,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtQuestionRecord">
update t_ht_question_record
set record_type = #{recordType,jdbcType=TINYINT},
question_id = #{questionId,jdbcType=BIGINT},
sort = #{sort,jdbcType=INTEGER},
calc_type = #{calcType,jdbcType=TINYINT},
show_title = #{showTitle,jdbcType=VARCHAR},
show_form = #{showForm,jdbcType=VARCHAR},
default_value = #{defaultValue,jdbcType=VARCHAR},
type = #{type,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

276
ht/src/main/resources/mapper_raw/HtQuestionRecordOptionMapper.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.ht.persist.mapper.HtQuestionRecordOptionMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtQuestionRecordOption">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="question_record_id" jdbcType="BIGINT" property="questionRecordId" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="data_key" jdbcType="VARCHAR" property="dataKey" />
<result column="data_value" jdbcType="VARCHAR" property="dataValue" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" />
</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_record_id, sort, data_key, data_value, remark, create_time, update_time,
is_del
</sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionRecordOptionExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_ht_question_record_option
<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_ht_question_record_option
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_ht_question_record_option
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionRecordOptionExample">
delete from t_ht_question_record_option
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtQuestionRecordOption">
insert into t_ht_question_record_option (id, question_record_id, sort,
data_key, data_value, remark,
create_time, update_time, is_del
)
values (#{id,jdbcType=BIGINT}, #{questionRecordId,jdbcType=BIGINT}, #{sort,jdbcType=INTEGER},
#{dataKey,jdbcType=VARCHAR}, #{dataValue,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtQuestionRecordOption">
insert into t_ht_question_record_option
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="questionRecordId != null">
question_record_id,
</if>
<if test="sort != null">
sort,
</if>
<if test="dataKey != null">
data_key,
</if>
<if test="dataValue != null">
data_value,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isDel != null">
is_del,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="questionRecordId != null">
#{questionRecordId,jdbcType=BIGINT},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="dataKey != null">
#{dataKey,jdbcType=VARCHAR},
</if>
<if test="dataValue != null">
#{dataValue,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
#{isDel,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionRecordOptionExample" resultType="java.lang.Long">
select count(*) from t_ht_question_record_option
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_ht_question_record_option
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.questionRecordId != null">
question_record_id = #{record.questionRecordId,jdbcType=BIGINT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.dataKey != null">
data_key = #{record.dataKey,jdbcType=VARCHAR},
</if>
<if test="record.dataValue != null">
data_value = #{record.dataValue,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDel != null">
is_del = #{record.isDel,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_ht_question_record_option
set id = #{record.id,jdbcType=BIGINT},
question_record_id = #{record.questionRecordId,jdbcType=BIGINT},
sort = #{record.sort,jdbcType=INTEGER},
data_key = #{record.dataKey,jdbcType=VARCHAR},
data_value = #{record.dataValue,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_del = #{record.isDel,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtQuestionRecordOption">
update t_ht_question_record_option
<set>
<if test="questionRecordId != null">
question_record_id = #{questionRecordId,jdbcType=BIGINT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="dataKey != null">
data_key = #{dataKey,jdbcType=VARCHAR},
</if>
<if test="dataValue != null">
data_value = #{dataValue,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
is_del = #{isDel,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtQuestionRecordOption">
update t_ht_question_record_option
set question_record_id = #{questionRecordId,jdbcType=BIGINT},
sort = #{sort,jdbcType=INTEGER},
data_key = #{dataKey,jdbcType=VARCHAR},
data_value = #{dataValue,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
Loading…
Cancel
Save