From 2932b871da42f965963299a4258e874a22858187 Mon Sep 17 00:00:00 2001 From: zhizhi wu <2377881365@qq.com> Date: Wed, 21 Apr 2021 09:54:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=AF=95=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ccsens/ht/api/ImportController.java | 8 - .../ht/bean/po/HtPatientReportRecordDesc.java | 117 ++ .../po/HtPatientReportRecordDescExample.java | 761 ++++++++++++ .../com/ccsens/ht/bean/po/HtQuestion.java | 11 + .../ccsens/ht/bean/po/HtQuestionExample.java | 60 + .../ht/bean/po/HtQuestionOptionDesc.java | 117 ++ .../bean/po/HtQuestionOptionDescExample.java | 761 ++++++++++++ .../ccsens/ht/bean/po/HtQuestionRecord.java | 161 +++ .../ht/bean/po/HtQuestionRecordExample.java | 1021 +++++++++++++++++ .../ht/bean/po/HtQuestionRecordOption.java | 117 ++ .../po/HtQuestionRecordOptionExample.java | 771 +++++++++++++ .../com/ccsens/ht/bean/vo/QuestionVo.java | 41 +- .../persist/dao/HtQuestionOptionDescDao.java | 26 + .../ht/persist/dao/HtQuestionRecordDao.java | 16 + .../dao/HtQuestionRecordOptionDao.java | 15 + .../ccsens/ht/persist/dao/HtReportDao.java | 8 + .../HtPatientReportRecordDescMapper.java | 30 + .../mapper/HtQuestionOptionDescMapper.java | 30 + .../mapper/HtQuestionRecordMapper.java | 30 + .../mapper/HtQuestionRecordOptionMapper.java | 30 + .../com/ccsens/ht/service/ImportService.java | 170 ++- .../ccsens/ht/service/QuestionService.java | 42 +- .../java/com/ccsens/ht/uitl/Constant.java | 24 +- ht/src/main/resources/application.yml | 4 +- .../mapper_dao/HtQuestionOptionDescDao.xml | 21 + .../mapper_dao/HtQuestionRecordDao.xml | 16 + .../mapper_dao/HtQuestionRecordOptionDao.xml | 14 + .../main/resources/mapper_dao/HtReportDao.xml | 3 + .../HtPatientReportRecordDescMapper.xml | 276 +++++ .../resources/mapper_raw/HtQuestionMapper.xml | 35 +- .../mapper_raw/HtQuestionOptionDescMapper.xml | 275 +++++ .../mapper_raw/HtQuestionRecordMapper.xml | 338 ++++++ .../HtQuestionRecordOptionMapper.xml | 276 +++++ 33 files changed, 5552 insertions(+), 73 deletions(-) create mode 100644 ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportRecordDesc.java create mode 100644 ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportRecordDescExample.java create mode 100644 ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOptionDesc.java create mode 100644 ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOptionDescExample.java create mode 100644 ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecord.java create mode 100644 ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordExample.java create mode 100644 ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordOption.java create mode 100644 ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordOptionExample.java create mode 100644 ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionOptionDescDao.java create mode 100644 ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionRecordDao.java create mode 100644 ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionRecordOptionDao.java create mode 100644 ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientReportRecordDescMapper.java create mode 100644 ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionOptionDescMapper.java create mode 100644 ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionRecordMapper.java create mode 100644 ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionRecordOptionMapper.java create mode 100644 ht/src/main/resources/mapper_dao/HtQuestionOptionDescDao.xml create mode 100644 ht/src/main/resources/mapper_dao/HtQuestionRecordDao.xml create mode 100644 ht/src/main/resources/mapper_dao/HtQuestionRecordOptionDao.xml create mode 100644 ht/src/main/resources/mapper_raw/HtPatientReportRecordDescMapper.xml create mode 100644 ht/src/main/resources/mapper_raw/HtQuestionOptionDescMapper.xml create mode 100644 ht/src/main/resources/mapper_raw/HtQuestionRecordMapper.xml create mode 100644 ht/src/main/resources/mapper_raw/HtQuestionRecordOptionMapper.xml diff --git a/ht/src/main/java/com/ccsens/ht/api/ImportController.java b/ht/src/main/java/com/ccsens/ht/api/ImportController.java index efee911e..6e9a82c8 100644 --- a/ht/src/main/java/com/ccsens/ht/api/ImportController.java +++ b/ht/src/main/java/com/ccsens/ht/api/ImportController.java @@ -94,24 +94,16 @@ public class ImportController { @RequestMapping(value = "/importReportType", method = RequestMethod.POST) public JsonResponse importReportType(@RequestParam(required = true) Part file) throws Exception{ - long time1 = System.currentTimeMillis(); //1.上传文件 String allowedExts = "xls,xlsx"; String dir = WebConstant.UPLOAD_PROJECT_WBS + File.separator; String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir); File excelFile = new File(dir+path); 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(); -// log.info("导入职称耗时:{}", (time4 - time3)); importService.importReport(excelFile, 2); long time5 = System.currentTimeMillis(); log.info("导入报告单耗时:{}", (time5 - time4)); -// importService.importQuestion(excelFile, Constant.Ht.Question.ALL); return JsonResponse.newInstance().ok(); } diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportRecordDesc.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportRecordDesc.java new file mode 100644 index 00000000..ea87d55c --- /dev/null +++ b/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(); + } +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportRecordDescExample.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportRecordDescExample.java new file mode 100644 index 00000000..b3197b3c --- /dev/null +++ b/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 oredCriteria; + + public HtPatientReportRecordDescExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria 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 values) { + addCriterion("patient_report_id in", values, "patientReportId"); + return (Criteria) this; + } + + public Criteria andPatientReportIdNotIn(List 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 values) { + addCriterion("record_id in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotIn(List 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 values) { + addCriterion("answer in", values, "answer"); + return (Criteria) this; + } + + public Criteria andAnswerNotIn(List 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 values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria 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 values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List 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 values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List 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 values) { + addCriterion("is_del in", values, "isDel"); + return (Criteria) this; + } + + public Criteria andIsDelNotIn(List 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 values) { + addCriterion("answer_time in", values, "answerTime"); + return (Criteria) this; + } + + public Criteria andAnswerTimeNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestion.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestion.java index 1b662016..b0d06c7b 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestion.java +++ b/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestion.java @@ -22,6 +22,8 @@ public class HtQuestion implements Serializable { private String relationCode; + private Long relationId; + private Byte operateType; private Byte recodeStarttime; @@ -116,6 +118,14 @@ public class HtQuestion implements Serializable { this.relationCode = relationCode == null ? null : relationCode.trim(); } + public Long getRelationId() { + return relationId; + } + + public void setRelationId(Long relationId) { + this.relationId = relationId; + } + public Byte getOperateType() { return operateType; } @@ -211,6 +221,7 @@ public class HtQuestion implements Serializable { sb.append(", recordType=").append(recordType); sb.append(", recordContent=").append(recordContent); sb.append(", relationCode=").append(relationCode); + sb.append(", relationId=").append(relationId); sb.append(", operateType=").append(operateType); sb.append(", recodeStarttime=").append(recodeStarttime); sb.append(", timeWabei=").append(timeWabei); diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionExample.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionExample.java index bfb64772..283522f7 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionExample.java +++ b/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionExample.java @@ -705,6 +705,66 @@ public class HtQuestionExample { 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 values) { + addCriterion("relation_id in", values, "relationId"); + return (Criteria) this; + } + + public Criteria andRelationIdNotIn(List 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() { addCriterion("operate_type is null"); return (Criteria) this; diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOptionDesc.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOptionDesc.java new file mode 100644 index 00000000..443f62a9 --- /dev/null +++ b/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(); + } +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOptionDescExample.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOptionDescExample.java new file mode 100644 index 00000000..24c87bb4 --- /dev/null +++ b/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 oredCriteria; + + public HtQuestionOptionDescExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria 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 values) { + addCriterion("option_id in", values, "optionId"); + return (Criteria) this; + } + + public Criteria andOptionIdNotIn(List 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 values) { + addCriterion("sort in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotIn(List 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 values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List 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 values) { + addCriterion("content in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentNotIn(List 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 values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria 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 values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List 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 values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List 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 values) { + addCriterion("is_del in", values, "isDel"); + return (Criteria) this; + } + + public Criteria andIsDelNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecord.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecord.java new file mode 100644 index 00000000..001d7dee --- /dev/null +++ b/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(); + } +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordExample.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordExample.java new file mode 100644 index 00000000..e4a669ca --- /dev/null +++ b/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordExample.java @@ -0,0 +1,1021 @@ +package com.ccsens.ht.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HtQuestionRecordExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public HtQuestionRecordExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andRecordTypeIsNull() { + addCriterion("record_type is null"); + return (Criteria) this; + } + + public Criteria andRecordTypeIsNotNull() { + addCriterion("record_type is not null"); + return (Criteria) this; + } + + public Criteria andRecordTypeEqualTo(Byte value) { + addCriterion("record_type =", value, "recordType"); + return (Criteria) this; + } + + public Criteria andRecordTypeNotEqualTo(Byte value) { + addCriterion("record_type <>", value, "recordType"); + return (Criteria) this; + } + + public Criteria andRecordTypeGreaterThan(Byte value) { + addCriterion("record_type >", value, "recordType"); + return (Criteria) this; + } + + public Criteria andRecordTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("record_type >=", value, "recordType"); + return (Criteria) this; + } + + public Criteria andRecordTypeLessThan(Byte value) { + addCriterion("record_type <", value, "recordType"); + return (Criteria) this; + } + + public Criteria andRecordTypeLessThanOrEqualTo(Byte value) { + addCriterion("record_type <=", value, "recordType"); + return (Criteria) this; + } + + public Criteria andRecordTypeIn(List values) { + addCriterion("record_type in", values, "recordType"); + return (Criteria) this; + } + + public Criteria andRecordTypeNotIn(List values) { + addCriterion("record_type not in", values, "recordType"); + return (Criteria) this; + } + + public Criteria andRecordTypeBetween(Byte value1, Byte value2) { + addCriterion("record_type between", value1, value2, "recordType"); + return (Criteria) this; + } + + public Criteria andRecordTypeNotBetween(Byte value1, Byte value2) { + addCriterion("record_type not between", value1, value2, "recordType"); + return (Criteria) this; + } + + public Criteria andQuestionIdIsNull() { + addCriterion("question_id is null"); + return (Criteria) this; + } + + public Criteria andQuestionIdIsNotNull() { + addCriterion("question_id is not null"); + return (Criteria) this; + } + + public Criteria andQuestionIdEqualTo(Long value) { + addCriterion("question_id =", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdNotEqualTo(Long value) { + addCriterion("question_id <>", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdGreaterThan(Long value) { + addCriterion("question_id >", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdGreaterThanOrEqualTo(Long value) { + addCriterion("question_id >=", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdLessThan(Long value) { + addCriterion("question_id <", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdLessThanOrEqualTo(Long value) { + addCriterion("question_id <=", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdIn(List values) { + addCriterion("question_id in", values, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdNotIn(List values) { + addCriterion("question_id not in", values, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdBetween(Long value1, Long value2) { + addCriterion("question_id between", value1, value2, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdNotBetween(Long value1, Long value2) { + addCriterion("question_id not between", value1, value2, "questionId"); + return (Criteria) this; + } + + public Criteria 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 values) { + addCriterion("sort in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotIn(List 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 andCalcTypeIsNull() { + addCriterion("calc_type is null"); + return (Criteria) this; + } + + public Criteria andCalcTypeIsNotNull() { + addCriterion("calc_type is not null"); + return (Criteria) this; + } + + public Criteria andCalcTypeEqualTo(Byte value) { + addCriterion("calc_type =", value, "calcType"); + return (Criteria) this; + } + + public Criteria andCalcTypeNotEqualTo(Byte value) { + addCriterion("calc_type <>", value, "calcType"); + return (Criteria) this; + } + + public Criteria andCalcTypeGreaterThan(Byte value) { + addCriterion("calc_type >", value, "calcType"); + return (Criteria) this; + } + + public Criteria andCalcTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("calc_type >=", value, "calcType"); + return (Criteria) this; + } + + public Criteria andCalcTypeLessThan(Byte value) { + addCriterion("calc_type <", value, "calcType"); + return (Criteria) this; + } + + public Criteria andCalcTypeLessThanOrEqualTo(Byte value) { + addCriterion("calc_type <=", value, "calcType"); + return (Criteria) this; + } + + public Criteria andCalcTypeIn(List values) { + addCriterion("calc_type in", values, "calcType"); + return (Criteria) this; + } + + public Criteria andCalcTypeNotIn(List values) { + addCriterion("calc_type not in", values, "calcType"); + return (Criteria) this; + } + + public Criteria andCalcTypeBetween(Byte value1, Byte value2) { + addCriterion("calc_type between", value1, value2, "calcType"); + return (Criteria) this; + } + + public Criteria andCalcTypeNotBetween(Byte value1, Byte value2) { + addCriterion("calc_type not between", value1, value2, "calcType"); + return (Criteria) this; + } + + public Criteria andShowTitleIsNull() { + addCriterion("show_title is null"); + return (Criteria) this; + } + + public Criteria andShowTitleIsNotNull() { + addCriterion("show_title is not null"); + return (Criteria) this; + } + + public Criteria andShowTitleEqualTo(String value) { + addCriterion("show_title =", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleNotEqualTo(String value) { + addCriterion("show_title <>", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleGreaterThan(String value) { + addCriterion("show_title >", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleGreaterThanOrEqualTo(String value) { + addCriterion("show_title >=", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleLessThan(String value) { + addCriterion("show_title <", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleLessThanOrEqualTo(String value) { + addCriterion("show_title <=", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleLike(String value) { + addCriterion("show_title like", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleNotLike(String value) { + addCriterion("show_title not like", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleIn(List values) { + addCriterion("show_title in", values, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleNotIn(List values) { + addCriterion("show_title not in", values, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleBetween(String value1, String value2) { + addCriterion("show_title between", value1, value2, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleNotBetween(String value1, String value2) { + addCriterion("show_title not between", value1, value2, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowFormIsNull() { + addCriterion("show_form is null"); + return (Criteria) this; + } + + public Criteria andShowFormIsNotNull() { + addCriterion("show_form is not null"); + return (Criteria) this; + } + + public Criteria andShowFormEqualTo(String value) { + addCriterion("show_form =", value, "showForm"); + return (Criteria) this; + } + + public Criteria andShowFormNotEqualTo(String value) { + addCriterion("show_form <>", value, "showForm"); + return (Criteria) this; + } + + public Criteria andShowFormGreaterThan(String value) { + addCriterion("show_form >", value, "showForm"); + return (Criteria) this; + } + + public Criteria andShowFormGreaterThanOrEqualTo(String value) { + addCriterion("show_form >=", value, "showForm"); + return (Criteria) this; + } + + public Criteria andShowFormLessThan(String value) { + addCriterion("show_form <", value, "showForm"); + return (Criteria) this; + } + + public Criteria andShowFormLessThanOrEqualTo(String value) { + addCriterion("show_form <=", value, "showForm"); + return (Criteria) this; + } + + public Criteria andShowFormLike(String value) { + addCriterion("show_form like", value, "showForm"); + return (Criteria) this; + } + + public Criteria andShowFormNotLike(String value) { + addCriterion("show_form not like", value, "showForm"); + return (Criteria) this; + } + + public Criteria andShowFormIn(List values) { + addCriterion("show_form in", values, "showForm"); + return (Criteria) this; + } + + public Criteria andShowFormNotIn(List values) { + addCriterion("show_form not in", values, "showForm"); + return (Criteria) this; + } + + public Criteria andShowFormBetween(String value1, String value2) { + addCriterion("show_form between", value1, value2, "showForm"); + return (Criteria) this; + } + + public Criteria andShowFormNotBetween(String value1, String value2) { + addCriterion("show_form not between", value1, value2, "showForm"); + return (Criteria) this; + } + + public Criteria andDefaultValueIsNull() { + addCriterion("default_value is null"); + return (Criteria) this; + } + + public Criteria andDefaultValueIsNotNull() { + addCriterion("default_value is not null"); + return (Criteria) this; + } + + public Criteria andDefaultValueEqualTo(String value) { + addCriterion("default_value =", value, "defaultValue"); + return (Criteria) this; + } + + public Criteria andDefaultValueNotEqualTo(String value) { + addCriterion("default_value <>", value, "defaultValue"); + return (Criteria) this; + } + + public Criteria andDefaultValueGreaterThan(String value) { + addCriterion("default_value >", value, "defaultValue"); + return (Criteria) this; + } + + public Criteria andDefaultValueGreaterThanOrEqualTo(String value) { + addCriterion("default_value >=", value, "defaultValue"); + return (Criteria) this; + } + + public Criteria andDefaultValueLessThan(String value) { + addCriterion("default_value <", value, "defaultValue"); + return (Criteria) this; + } + + public Criteria andDefaultValueLessThanOrEqualTo(String value) { + addCriterion("default_value <=", value, "defaultValue"); + return (Criteria) this; + } + + public Criteria andDefaultValueLike(String value) { + addCriterion("default_value like", value, "defaultValue"); + return (Criteria) this; + } + + public Criteria andDefaultValueNotLike(String value) { + addCriterion("default_value not like", value, "defaultValue"); + return (Criteria) this; + } + + public Criteria andDefaultValueIn(List values) { + addCriterion("default_value in", values, "defaultValue"); + return (Criteria) this; + } + + public Criteria andDefaultValueNotIn(List values) { + addCriterion("default_value not in", values, "defaultValue"); + return (Criteria) this; + } + + public Criteria andDefaultValueBetween(String value1, String value2) { + addCriterion("default_value between", value1, value2, "defaultValue"); + return (Criteria) this; + } + + public Criteria andDefaultValueNotBetween(String value1, String value2) { + addCriterion("default_value not between", value1, value2, "defaultValue"); + 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 values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List 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 andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria 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 values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List 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 values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List 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 values) { + addCriterion("is_del in", values, "isDel"); + return (Criteria) this; + } + + public Criteria andIsDelNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordOption.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordOption.java new file mode 100644 index 00000000..114a11a8 --- /dev/null +++ b/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(); + } +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordOptionExample.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionRecordOptionExample.java new file mode 100644 index 00000000..9ea20ee4 --- /dev/null +++ b/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 oredCriteria; + + public HtQuestionRecordOptionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria 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 values) { + addCriterion("question_record_id in", values, "questionRecordId"); + return (Criteria) this; + } + + public Criteria andQuestionRecordIdNotIn(List 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 values) { + addCriterion("sort in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotIn(List 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 values) { + addCriterion("data_key in", values, "dataKey"); + return (Criteria) this; + } + + public Criteria andDataKeyNotIn(List 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 values) { + addCriterion("data_value in", values, "dataValue"); + return (Criteria) this; + } + + public Criteria andDataValueNotIn(List 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 values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria 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 values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List 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 values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List 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 values) { + addCriterion("is_del in", values, "isDel"); + return (Criteria) this; + } + + public Criteria andIsDelNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/bean/vo/QuestionVo.java b/ht/src/main/java/com/ccsens/ht/bean/vo/QuestionVo.java index 4c73f908..e57226d1 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/vo/QuestionVo.java +++ b/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.ApiModelProperty; import lombok.Data; +import org.apache.ibatis.javassist.runtime.Desc; import org.springframework.beans.BeanUtils; import org.springframework.util.CollectionUtils; @@ -71,12 +72,14 @@ public class QuestionVo { } @Data - @ApiModel("QuestionVoReport") + @ApiModel("报告单类型") public static class Report{ @ApiModelProperty("报告单编码") private String code; - @ApiModelProperty("") + @ApiModelProperty("名字") private String name; + @ApiModelProperty("补充内容") + List codeRecords; } @Data @@ -146,7 +149,8 @@ public class QuestionVo { private byte showShareAnswer; @ApiModelProperty("关联试题") List relationQuestions = new ArrayList<>(); - + @ApiModelProperty("补充内容") + List questionRecords; /** * 将HtQuestion转化成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 @ApiModel("(可以共享答案的试题)关联的试题id") diff --git a/ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionOptionDescDao.java b/ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionOptionDescDao.java new file mode 100644 index 00000000..ac852bba --- /dev/null +++ b/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 optionDescDelList); + + /** + * 批量插入 + * @param optionDescList 选项补充 + */ + void insertBatch(List optionDescList); +} diff --git a/ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionRecordDao.java b/ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionRecordDao.java new file mode 100644 index 00000000..e2e9ffb3 --- /dev/null +++ b/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 questionRecords); +} diff --git a/ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionRecordOptionDao.java b/ht/src/main/java/com/ccsens/ht/persist/dao/HtQuestionRecordOptionDao.java new file mode 100644 index 00000000..0b827df0 --- /dev/null +++ b/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 questionRecordOptions); +} diff --git a/ht/src/main/java/com/ccsens/ht/persist/dao/HtReportDao.java b/ht/src/main/java/com/ccsens/ht/persist/dao/HtReportDao.java index 2d7399cf..68e84f72 100644 --- a/ht/src/main/java/com/ccsens/ht/persist/dao/HtReportDao.java +++ b/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 org.apache.ibatis.annotations.Param; +import java.util.Collection; import java.util.List; /** @@ -37,4 +38,11 @@ public interface HtReportDao extends HtReportMapper { * @return 搜索条件 */ List queryParam(@Param("parentCode") String parentCode); + + /** + * 查询指定等级的报告单code + * @param type type + * @return code + */ + List queryCode(@Param("type") byte type); } diff --git a/ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientReportRecordDescMapper.java b/ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientReportRecordDescMapper.java new file mode 100644 index 00000000..f793f800 --- /dev/null +++ b/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 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); +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionOptionDescMapper.java b/ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionOptionDescMapper.java new file mode 100644 index 00000000..cfa42b2e --- /dev/null +++ b/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 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); +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionRecordMapper.java b/ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionRecordMapper.java new file mode 100644 index 00000000..f44bb695 --- /dev/null +++ b/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 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); +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionRecordOptionMapper.java b/ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionRecordOptionMapper.java new file mode 100644 index 00000000..b8fc3429 --- /dev/null +++ b/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 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); +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/service/ImportService.java b/ht/src/main/java/com/ccsens/ht/service/ImportService.java index a230d548..f89ac511 100644 --- a/ht/src/main/java/com/ccsens/ht/service/ImportService.java +++ b/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.lang.Snowflake; import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.ccsens.ht.bean.po.*; import com.ccsens.ht.persist.dao.*; @@ -11,13 +13,14 @@ import com.ccsens.util.PoiUtil; import com.ccsens.util.PropUtil; import com.ccsens.util.StringUtil; 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.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; +import javax.annotation.Resource; import java.io.File; import java.util.*; @@ -31,22 +34,29 @@ import java.util.*; @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class ImportService implements IImportService { - @Autowired + @Resource private Snowflake snowflake; - @Autowired + @Resource private HtTitleDao htTitleDao; - @Autowired + @Resource private HtPositionDao htPositionDao; - @Autowired + @Resource private HtReportDao htReportDao; - @Autowired + @Resource private HtQuestionDao htQuestionDao; - @Autowired + @Resource private HtQuestionOptionDao htQuestionOptionDao; - @Autowired + @Resource private HtQuestionIntroducerDao htQuestionIntroducerDao; - @Autowired + @Resource private HtQuestionScoringRuleDao htQuestionScoringRuleDao; + @Resource + private HtQuestionRecordDao htQuestionRecordDao; + @Resource + private HtQuestionRecordOptionDao htQuestionRecordOptionDao; + @Resource + private HtQuestionOptionDescDao htQuestionOptionDescDao; + @Override public String importPosition(File file, int sheetIndex) throws Exception { @@ -216,7 +226,7 @@ public class ImportService implements IImportService { log.info("导入试题参数:{}, {}", file, type); List types = new ArrayList<>(); if (Constant.Ht.Question.ALL.equalsIgnoreCase(type)) { - types.addAll(Constant.Ht.Question.QUESTION_TYPE); + types.addAll(htReportDao.queryCode(Constant.Ht.Report.TYPE_EVALUATION)); } else { types.add(type); } @@ -235,6 +245,10 @@ public class ImportService implements IImportService { List optionList = new ArrayList<>(); List introduceList = new ArrayList<>(); List ruleList = new ArrayList<>(); + List questionRecordList = new ArrayList<>(); + List questionRecordOptionList = new ArrayList<>(); + List optionDescList = new ArrayList<>(); + List optionDescDelList = new ArrayList<>(); //记录那类型题是关联试题 Map parentCode = new HashMap<>(); 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; String type = String.valueOf(objs[0]); switch (type) { - case "题目" : + case Constant.Import.EVALUATION_QUESTION : HtQuestion question = initQuestion(objs, evaluationCode, sort); - if (StrUtil.isNotEmpty(question.getRelationCode())) { - String[] split = question.getRelationCode().split("[,,]"); - for (String code: split) { - parentCode.put(code, question.getParentCode()); + question.setEvaluationCode(parentCode.getOrDefault(question.getParentCode(), question.getEvaluationCode())); + questionList.add(question); + break; + 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())) { - question.setEvaluationCode(parentCode.get(question.getParentCode())); - } - questionList.add(question); + questionList.add(relationQuestion); break; - case "选项" : + case Constant.Import.EVALUATION_OPTION : if (questionList.isEmpty()) { 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); break; - case "解析" : + case Constant.Import.EVALUATION_PARSE : if (questionList.isEmpty()) { break; } HtQuestionIntroducer introduce = initIntroduce(objs, questionList.get(questionList.size()-1).getId(), sort); introduceList.add(introduce); break; - case "规则" : + case Constant.Import.EVALUATION_RULE : if (questionList.isEmpty()) { break; } HtQuestionScoringRule rule = initRule(objs, questionList.get(questionList.size() - 1).getId()); ruleList.add(rule); 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: log.info("{}类型未知,不解析", type); break; @@ -301,8 +327,72 @@ public class ImportService implements IImportService { if (!ruleList.isEmpty()) { 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 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 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 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) { @@ -344,8 +434,14 @@ public class ImportService implements IImportService { 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 optionDescList, List optionIds) { HtQuestionOptionExample example = new HtQuestionOptionExample(); @@ -367,7 +463,27 @@ public class ImportService implements IImportService { option.setQuestionId(questionId); option.setSort(sort); 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); 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.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.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.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); diff --git a/ht/src/main/java/com/ccsens/ht/service/QuestionService.java b/ht/src/main/java/com/ccsens/ht/service/QuestionService.java index 5c0df4b4..b3c7ca30 100644 --- a/ht/src/main/java/com/ccsens/ht/service/QuestionService.java +++ b/ht/src/main/java/com/ccsens/ht/service/QuestionService.java @@ -75,7 +75,7 @@ public class QuestionService implements IQuestionService { @Override public QuestionVo.Query queryQuestion(QuestionDto.Query query, Long userId) { log.info("请求参数:{},{}", query, userId); - //1.根据类型和题号,查询试题 + //TODO 1.根据类型和题号,查询试题 和 补充内容(含code的补充内容) HtQuestionExample questionExample = new HtQuestionExample(); questionExample.createCriteria().andEvaluationCodeEqualTo(query.getCode()).andSortEqualTo(query.getNum()); List questionList = htQuestionDao.selectByExample(questionExample); @@ -86,6 +86,9 @@ public class QuestionService implements IQuestionService { } HtQuestion question = questionList.get(0); QuestionVo.Question questionVo = QuestionVo.Question.toQuestionVo(question); + + // TODO 查询code的补充内容,做缓存 + //检查当前试题是否有答案,共享答案的试题是否有答案 boolean f = false; if(ObjectUtil.isNotNull(query.getPatientReportId())){ @@ -119,7 +122,7 @@ public class QuestionService implements IQuestionService { - //获取评测信息 + //TODO 获取评测信息及补充信息 HtReportExample reportExample = new HtReportExample(); reportExample.createCriteria().andCodeEqualTo(question.getEvaluationCode()); List htReports = htReportDao.selectByExample(reportExample); @@ -133,32 +136,29 @@ public class QuestionService implements IQuestionService { Integer maxSort = htQuestionDao.selectMaxSort(query.getCode()); //查询关联题目 - if (!StrUtil.isEmpty(question.getRelationCode())) { - String[] codes = question.getRelationCode().split(Constant.COMMA); - HtQuestionExample example = new HtQuestionExample(); - example.createCriteria().andParentCodeIn(CollectionUtils.arrayToList(codes)); - example.setOrderByClause("id"); - List relationQuestions = htQuestionDao.selectByExample(example); - List vos = new ArrayList<>(); - if (CollectionUtil.isNotEmpty(relationQuestions)) { - relationQuestions.forEach(relation -> { - //试题选项 - List options = htQuestionOptionDao.queryOption(relation.getId(), query.getPatientReportId()); - QuestionVo.QuestionOption questionOption = QuestionVo.QuestionOption.toQuestionOption(relation, options); - vos.add(questionOption); - }); - } - log.info("关联试题:{}", vos); - - questionVo.setRelationQuestions(vos); + HtQuestionExample example = new HtQuestionExample(); + example.createCriteria().andRelationIdEqualTo(question.getId()); + example.setOrderByClause("id"); + List relationQuestions = htQuestionDao.selectByExample(example); + List vos = new ArrayList<>(); + if (CollectionUtil.isNotEmpty(relationQuestions)) { + relationQuestions.forEach(relation -> { + //试题选项 + List options = htQuestionOptionDao.queryOption(relation.getId(), query.getPatientReportId()); + QuestionVo.QuestionOption questionOption = QuestionVo.QuestionOption.toQuestionOption(relation, options); + vos.add(questionOption); + }); } + log.info("关联试题:{}", vos); + questionVo.setRelationQuestions(vos); + //试题引导语 HtQuestionIntroducerExample introduceExample = new HtQuestionIntroducerExample(); introduceExample.createCriteria().andQuestionIdEqualTo(question.getId()); introduceExample.setOrderByClause("sort"); List introduces = htQuestionIntroducerDao.selectByExample(introduceExample); List introduceVos = QuestionVo.Introduce.toIntroduces(introduces); - //试题选项 + //TODO 试题选项 及补充 List optionList = htQuestionOptionDao.queryOption(question.getId(), query.getPatientReportId()); //答题记录 diff --git a/ht/src/main/java/com/ccsens/ht/uitl/Constant.java b/ht/src/main/java/com/ccsens/ht/uitl/Constant.java index 36c51a90..338f62f4 100644 --- a/ht/src/main/java/com/ccsens/ht/uitl/Constant.java +++ b/ht/src/main/java/com/ccsens/ht/uitl/Constant.java @@ -1,7 +1,5 @@ package com.ccsens.ht.uitl; -import com.ccsens.util.PropUtil; - import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; @@ -23,6 +21,22 @@ public class Constant { /**上传图片访问路径*/ 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 { @@ -68,6 +82,12 @@ public class Constant { /**删除*/ 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 { //用户操作类型(0无,1语音,2画图,3.画图显示中线和图形,4敲击,5画图不显示图形,6画图只显示中线) /**画图*/ diff --git a/ht/src/main/resources/application.yml b/ht/src/main/resources/application.yml index d082c0ea..5c2cd5c4 100644 --- a/ht/src/main/resources/application.yml +++ b/ht/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: prod - include: common, util-prod \ No newline at end of file + active: dev + include: common, util-dev \ No newline at end of file diff --git a/ht/src/main/resources/mapper_dao/HtQuestionOptionDescDao.xml b/ht/src/main/resources/mapper_dao/HtQuestionOptionDescDao.xml new file mode 100644 index 00000000..01d349a6 --- /dev/null +++ b/ht/src/main/resources/mapper_dao/HtQuestionOptionDescDao.xml @@ -0,0 +1,21 @@ + + + + + + + replace into t_ht_question_option_desc (id, option_id, type, + sort, content, remark) + values + + (#{item.id}, #{item.optionId}, #{item.type}, #{item.sort}, + #{item.content}, #{item.remark}) + + + + update t_ht_question_option_desc set rec_status = 0 where option_id in + + #{item} + + + \ No newline at end of file diff --git a/ht/src/main/resources/mapper_dao/HtQuestionRecordDao.xml b/ht/src/main/resources/mapper_dao/HtQuestionRecordDao.xml new file mode 100644 index 00000000..f28558ac --- /dev/null +++ b/ht/src/main/resources/mapper_dao/HtQuestionRecordDao.xml @@ -0,0 +1,16 @@ + + + + + + + replace into t_ht_question_record (id, record_type, question_id, + sort, calc_type, show_title, show_form, default_value, type, remark) + values + + (#{item.id}, #{item.recordType}, #{item.questionId}, #{item.sort}, + #{item.calcType}, #{item.showTitle}, #{item.showForm}, #{item.defaultValue}, + #{item.type}, #{item.remark}) + + + \ No newline at end of file diff --git a/ht/src/main/resources/mapper_dao/HtQuestionRecordOptionDao.xml b/ht/src/main/resources/mapper_dao/HtQuestionRecordOptionDao.xml new file mode 100644 index 00000000..e095a6bb --- /dev/null +++ b/ht/src/main/resources/mapper_dao/HtQuestionRecordOptionDao.xml @@ -0,0 +1,14 @@ + + + + + + + replace into t_ht_question_record_option (id, question_record_id, sort, data_key, data_value, remark) + values + + (#{item.id}, #{item.questionRecordId}, #{item.sort}, #{item.dataKey}, + #{item.dataValue}, #{item.remark}) + + + \ No newline at end of file diff --git a/ht/src/main/resources/mapper_dao/HtReportDao.xml b/ht/src/main/resources/mapper_dao/HtReportDao.xml index 5fb147b6..68da8ab4 100644 --- a/ht/src/main/resources/mapper_dao/HtReportDao.xml +++ b/ht/src/main/resources/mapper_dao/HtReportDao.xml @@ -66,5 +66,8 @@ GROUP BY t.CODE ORDER BY t.type,t.parent_code,t.sort + \ No newline at end of file diff --git a/ht/src/main/resources/mapper_raw/HtPatientReportRecordDescMapper.xml b/ht/src/main/resources/mapper_raw/HtPatientReportRecordDescMapper.xml new file mode 100644 index 00000000..10073a09 --- /dev/null +++ b/ht/src/main/resources/mapper_raw/HtPatientReportRecordDescMapper.xml @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, patient_report_id, record_id, answer, remark, create_time, update_time, is_del, + answer_time + + + + + delete from t_ht_patient_report_record_desc + where id = #{id,jdbcType=BIGINT} + + + delete from t_ht_patient_report_record_desc + + + + + + 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 into t_ht_patient_report_record_desc + + + id, + + + patient_report_id, + + + record_id, + + + answer, + + + remark, + + + create_time, + + + update_time, + + + is_del, + + + answer_time, + + + + + #{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}, + + + + + + update t_ht_patient_report_record_desc + + + 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}, + + + + + + + + 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} + + + + + + update t_ht_patient_report_record_desc + + + 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 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} + + \ No newline at end of file diff --git a/ht/src/main/resources/mapper_raw/HtQuestionMapper.xml b/ht/src/main/resources/mapper_raw/HtQuestionMapper.xml index 8675e6b5..bbcd9f56 100644 --- a/ht/src/main/resources/mapper_raw/HtQuestionMapper.xml +++ b/ht/src/main/resources/mapper_raw/HtQuestionMapper.xml @@ -11,6 +11,7 @@ + @@ -82,8 +83,8 @@ id, evaluation_code, parent_code, sort, question, type, record_type, record_content, - relation_code, operate_type, recode_starttime, time_wabei, allow_clear, clear_times, - timing_length, remark, create_time, update_time, is_del + relation_code, relation_id, operate_type, recode_starttime, time_wabei, allow_clear, + clear_times, timing_length, remark, create_time, update_time, is_del + select + + distinct + + + from t_ht_question_option_desc + + + + + order by ${orderByClause} + + + + + delete from t_ht_question_option_desc + where id = #{id,jdbcType=BIGINT} + + + delete from t_ht_question_option_desc + + + + + + 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 into t_ht_question_option_desc + + + id, + + + option_id, + + + sort, + + + type, + + + content, + + + remark, + + + create_time, + + + update_time, + + + is_del, + + + + + #{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}, + + + + + + update t_ht_question_option_desc + + + 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}, + + + + + + + + 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} + + + + + + update t_ht_question_option_desc + + + 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 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} + + \ No newline at end of file diff --git a/ht/src/main/resources/mapper_raw/HtQuestionRecordMapper.xml b/ht/src/main/resources/mapper_raw/HtQuestionRecordMapper.xml new file mode 100644 index 00000000..496d8ea1 --- /dev/null +++ b/ht/src/main/resources/mapper_raw/HtQuestionRecordMapper.xml @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, record_type, question_id, sort, calc_type, show_title, show_form, default_value, + type, remark, create_time, update_time, is_del + + + + + delete from t_ht_question_record + where id = #{id,jdbcType=BIGINT} + + + delete from t_ht_question_record + + + + + + 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 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, + + + + + #{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}, + + + + + + update t_ht_question_record + + + 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}, + + + + + + + + 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} + + + + + + update t_ht_question_record + + + 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 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} + + \ No newline at end of file diff --git a/ht/src/main/resources/mapper_raw/HtQuestionRecordOptionMapper.xml b/ht/src/main/resources/mapper_raw/HtQuestionRecordOptionMapper.xml new file mode 100644 index 00000000..d7974c20 --- /dev/null +++ b/ht/src/main/resources/mapper_raw/HtQuestionRecordOptionMapper.xml @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, question_record_id, sort, data_key, data_value, remark, create_time, update_time, + is_del + + + + + delete from t_ht_question_record_option + where id = #{id,jdbcType=BIGINT} + + + delete from t_ht_question_record_option + + + + + + 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 into t_ht_question_record_option + + + id, + + + question_record_id, + + + sort, + + + data_key, + + + data_value, + + + remark, + + + create_time, + + + update_time, + + + is_del, + + + + + #{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}, + + + + + + update t_ht_question_record_option + + + 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}, + + + + + + + + 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} + + + + + + update t_ht_question_record_option + + + 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 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} + + \ No newline at end of file