From 49d58ade291552114479c9deb0634ed18877a205 Mon Sep 17 00:00:00 2001 From: zy_Java <654600784@qq.com> Date: Fri, 4 Dec 2020 15:27:10 +0800 Subject: [PATCH] =?UTF-8?q?20201204=E6=96=B0=E5=A2=9E=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=94=BB=E5=9B=BE=E8=BD=A8=E8=BF=B9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ccsens/ht/api/QuestionController.java | 24 + .../com/ccsens/ht/bean/dto/QuestionDto.java | 46 + .../ccsens/ht/bean/po/HtPatientCanvas.java | 139 +++ .../ht/bean/po/HtPatientCanvasExample.java | 871 ++++++++++++++++++ .../ht/bean/po/HtPatientCanvasLine.java | 84 ++ .../bean/po/HtPatientCanvasLineExample.java | 571 ++++++++++++ .../com/ccsens/ht/bean/vo/QuestionVo.java | 38 +- .../ht/persist/dao/HtPatientCanvasDao.java | 19 + .../mapper/HtPatientCanvasLineMapper.java | 30 + .../persist/mapper/HtPatientCanvasMapper.java | 30 + .../ccsens/ht/service/IQuestionService.java | 16 + .../ccsens/ht/service/QuestionService.java | 79 +- ht/src/main/resources/application.yml | 4 +- .../mapper_dao/HtPatientCanvasDao.xml | 15 + .../mapper_raw/HtPatientCanvasLineMapper.xml | 228 +++++ .../mapper_raw/HtPatientCanvasMapper.xml | 306 ++++++ tall/src/main/resources/application.yml | 4 +- 17 files changed, 2496 insertions(+), 8 deletions(-) create mode 100644 ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvas.java create mode 100644 ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvasExample.java create mode 100644 ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvasLine.java create mode 100644 ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvasLineExample.java create mode 100644 ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientCanvasDao.java create mode 100644 ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientCanvasLineMapper.java create mode 100644 ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientCanvasMapper.java create mode 100644 ht/src/main/resources/mapper_dao/HtPatientCanvasDao.xml create mode 100644 ht/src/main/resources/mapper_raw/HtPatientCanvasLineMapper.xml create mode 100644 ht/src/main/resources/mapper_raw/HtPatientCanvasMapper.xml diff --git a/ht/src/main/java/com/ccsens/ht/api/QuestionController.java b/ht/src/main/java/com/ccsens/ht/api/QuestionController.java index 91177a57..5ea2ab61 100644 --- a/ht/src/main/java/com/ccsens/ht/api/QuestionController.java +++ b/ht/src/main/java/com/ccsens/ht/api/QuestionController.java @@ -63,5 +63,29 @@ public class QuestionController { return JsonResponse.newInstance().ok(codeEnum); } + @MustLogin +// @DoctorAudit + @ApiOperation(value = "保存用户画图信息",notes = "zy:保存画板信息画图轨迹等") + @ApiImplicitParams({ + }) + @RequestMapping(value="/saveCanvas", method = RequestMethod.POST) + public JsonResponse saveCanvas(@RequestBody @ApiParam @Valid QueryDto queryDto) throws IOException, NotSupportedFileTypeException { + log.info("保存用户画图信息:{}", queryDto); + QuestionVo.PatientCanvas patientCanvas = questionService.saveCanvas(queryDto.getParam(), queryDto.getUserId()); + log.info("保存用户画图信息成功后返回:{}", patientCanvas); + return JsonResponse.newInstance().ok(patientCanvas); + } + @MustLogin +// @DoctorAudit + @ApiOperation(value = "查看用户画图信息",notes = "zy:查看画板信息画图轨迹等") + @ApiImplicitParams({ + }) + @RequestMapping(value="/queryCanvas", method = RequestMethod.POST) + public JsonResponse queryCanvas(@RequestBody @ApiParam @Valid QueryDto queryDto) throws IOException, NotSupportedFileTypeException { + log.info("查看用户画图信息:{}", queryDto); + QuestionVo.PatientCanvas patientCanvas = questionService.getCanvas(queryDto.getParam(), queryDto.getUserId()); + log.info("查看用户画图信息成功:{}", patientCanvas); + return JsonResponse.newInstance().ok(patientCanvas); + } } diff --git a/ht/src/main/java/com/ccsens/ht/bean/dto/QuestionDto.java b/ht/src/main/java/com/ccsens/ht/bean/dto/QuestionDto.java index d7975653..35c67cbc 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/dto/QuestionDto.java +++ b/ht/src/main/java/com/ccsens/ht/bean/dto/QuestionDto.java @@ -53,4 +53,50 @@ public class QuestionDto { private Long answerTime; } + @Data + @ApiModel("添加画图的信息") + public static class SavePatientCanvas{ + @NotNull(message = "选项ID不能为空") + @ApiModelProperty("报告单id") + private Long patientReportId; + @NotNull(message = "测评试题id不能为空") + @ApiModelProperty("测评试题id") + private Long questionId; + @ApiModelProperty("时间") + private Long beginTime; + @ApiModelProperty("轨迹,每个字符串是一条轨迹,轨迹内格式(x,y,time;x,y,time;.....)") + private List points; + @ApiModelProperty("画板大小") + private Canvas canvas; + @ApiModelProperty("笔触信息") + private CanvasLine line; + } + @Data + @ApiModel("画板信息") + public static class Canvas{ + @ApiModelProperty("画板宽") + private Integer width; + @ApiModelProperty("画板高") + private Integer height; + } + @Data + @ApiModel("笔触信息") + public static class CanvasLine{ + @ApiModelProperty("笔触颜色") + private String color; + @ApiModelProperty("笔触粗细") + private Integer width; + } + + @Data + @ApiModel("添加画图的信息") + public static class QueryPatientCanvas{ + @NotNull(message = "选项ID不能为空") + @ApiModelProperty("报告单id") + private Long patientReportId; + @NotNull(message = "测评试题id不能为空") + @ApiModelProperty("测评试题id") + private Long questionId; + } + } diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvas.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvas.java new file mode 100644 index 00000000..02ccf05e --- /dev/null +++ b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvas.java @@ -0,0 +1,139 @@ +package com.ccsens.ht.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class HtPatientCanvas implements Serializable { + private Long id; + + private Long patientReportId; + + private Long questionId; + + private Long beginTime; + + private Integer canvasWidth; + + private Integer canvasHeight; + + private String lineColor; + + private Integer lineWidth; + + 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 getPatientReportId() { + return patientReportId; + } + + public void setPatientReportId(Long patientReportId) { + this.patientReportId = patientReportId; + } + + public Long getQuestionId() { + return questionId; + } + + public void setQuestionId(Long questionId) { + this.questionId = questionId; + } + + public Long getBeginTime() { + return beginTime; + } + + public void setBeginTime(Long beginTime) { + this.beginTime = beginTime; + } + + public Integer getCanvasWidth() { + return canvasWidth; + } + + public void setCanvasWidth(Integer canvasWidth) { + this.canvasWidth = canvasWidth; + } + + public Integer getCanvasHeight() { + return canvasHeight; + } + + public void setCanvasHeight(Integer canvasHeight) { + this.canvasHeight = canvasHeight; + } + + public String getLineColor() { + return lineColor; + } + + public void setLineColor(String lineColor) { + this.lineColor = lineColor == null ? null : lineColor.trim(); + } + + public Integer getLineWidth() { + return lineWidth; + } + + public void setLineWidth(Integer lineWidth) { + this.lineWidth = lineWidth; + } + + 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(", patientReportId=").append(patientReportId); + sb.append(", questionId=").append(questionId); + sb.append(", beginTime=").append(beginTime); + sb.append(", canvasWidth=").append(canvasWidth); + sb.append(", canvasHeight=").append(canvasHeight); + sb.append(", lineColor=").append(lineColor); + sb.append(", lineWidth=").append(lineWidth); + 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/HtPatientCanvasExample.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvasExample.java new file mode 100644 index 00000000..cbc35411 --- /dev/null +++ b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvasExample.java @@ -0,0 +1,871 @@ +package com.ccsens.ht.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HtPatientCanvasExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public HtPatientCanvasExample() { + 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 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 andBeginTimeIsNull() { + addCriterion("begin_time is null"); + return (Criteria) this; + } + + public Criteria andBeginTimeIsNotNull() { + addCriterion("begin_time is not null"); + return (Criteria) this; + } + + public Criteria andBeginTimeEqualTo(Long value) { + addCriterion("begin_time =", value, "beginTime"); + return (Criteria) this; + } + + public Criteria andBeginTimeNotEqualTo(Long value) { + addCriterion("begin_time <>", value, "beginTime"); + return (Criteria) this; + } + + public Criteria andBeginTimeGreaterThan(Long value) { + addCriterion("begin_time >", value, "beginTime"); + return (Criteria) this; + } + + public Criteria andBeginTimeGreaterThanOrEqualTo(Long value) { + addCriterion("begin_time >=", value, "beginTime"); + return (Criteria) this; + } + + public Criteria andBeginTimeLessThan(Long value) { + addCriterion("begin_time <", value, "beginTime"); + return (Criteria) this; + } + + public Criteria andBeginTimeLessThanOrEqualTo(Long value) { + addCriterion("begin_time <=", value, "beginTime"); + return (Criteria) this; + } + + public Criteria andBeginTimeIn(List values) { + addCriterion("begin_time in", values, "beginTime"); + return (Criteria) this; + } + + public Criteria andBeginTimeNotIn(List values) { + addCriterion("begin_time not in", values, "beginTime"); + return (Criteria) this; + } + + public Criteria andBeginTimeBetween(Long value1, Long value2) { + addCriterion("begin_time between", value1, value2, "beginTime"); + return (Criteria) this; + } + + public Criteria andBeginTimeNotBetween(Long value1, Long value2) { + addCriterion("begin_time not between", value1, value2, "beginTime"); + return (Criteria) this; + } + + public Criteria andCanvasWidthIsNull() { + addCriterion("canvas_width is null"); + return (Criteria) this; + } + + public Criteria andCanvasWidthIsNotNull() { + addCriterion("canvas_width is not null"); + return (Criteria) this; + } + + public Criteria andCanvasWidthEqualTo(Integer value) { + addCriterion("canvas_width =", value, "canvasWidth"); + return (Criteria) this; + } + + public Criteria andCanvasWidthNotEqualTo(Integer value) { + addCriterion("canvas_width <>", value, "canvasWidth"); + return (Criteria) this; + } + + public Criteria andCanvasWidthGreaterThan(Integer value) { + addCriterion("canvas_width >", value, "canvasWidth"); + return (Criteria) this; + } + + public Criteria andCanvasWidthGreaterThanOrEqualTo(Integer value) { + addCriterion("canvas_width >=", value, "canvasWidth"); + return (Criteria) this; + } + + public Criteria andCanvasWidthLessThan(Integer value) { + addCriterion("canvas_width <", value, "canvasWidth"); + return (Criteria) this; + } + + public Criteria andCanvasWidthLessThanOrEqualTo(Integer value) { + addCriterion("canvas_width <=", value, "canvasWidth"); + return (Criteria) this; + } + + public Criteria andCanvasWidthIn(List values) { + addCriterion("canvas_width in", values, "canvasWidth"); + return (Criteria) this; + } + + public Criteria andCanvasWidthNotIn(List values) { + addCriterion("canvas_width not in", values, "canvasWidth"); + return (Criteria) this; + } + + public Criteria andCanvasWidthBetween(Integer value1, Integer value2) { + addCriterion("canvas_width between", value1, value2, "canvasWidth"); + return (Criteria) this; + } + + public Criteria andCanvasWidthNotBetween(Integer value1, Integer value2) { + addCriterion("canvas_width not between", value1, value2, "canvasWidth"); + return (Criteria) this; + } + + public Criteria andCanvasHeightIsNull() { + addCriterion("canvas_height is null"); + return (Criteria) this; + } + + public Criteria andCanvasHeightIsNotNull() { + addCriterion("canvas_height is not null"); + return (Criteria) this; + } + + public Criteria andCanvasHeightEqualTo(Integer value) { + addCriterion("canvas_height =", value, "canvasHeight"); + return (Criteria) this; + } + + public Criteria andCanvasHeightNotEqualTo(Integer value) { + addCriterion("canvas_height <>", value, "canvasHeight"); + return (Criteria) this; + } + + public Criteria andCanvasHeightGreaterThan(Integer value) { + addCriterion("canvas_height >", value, "canvasHeight"); + return (Criteria) this; + } + + public Criteria andCanvasHeightGreaterThanOrEqualTo(Integer value) { + addCriterion("canvas_height >=", value, "canvasHeight"); + return (Criteria) this; + } + + public Criteria andCanvasHeightLessThan(Integer value) { + addCriterion("canvas_height <", value, "canvasHeight"); + return (Criteria) this; + } + + public Criteria andCanvasHeightLessThanOrEqualTo(Integer value) { + addCriterion("canvas_height <=", value, "canvasHeight"); + return (Criteria) this; + } + + public Criteria andCanvasHeightIn(List values) { + addCriterion("canvas_height in", values, "canvasHeight"); + return (Criteria) this; + } + + public Criteria andCanvasHeightNotIn(List values) { + addCriterion("canvas_height not in", values, "canvasHeight"); + return (Criteria) this; + } + + public Criteria andCanvasHeightBetween(Integer value1, Integer value2) { + addCriterion("canvas_height between", value1, value2, "canvasHeight"); + return (Criteria) this; + } + + public Criteria andCanvasHeightNotBetween(Integer value1, Integer value2) { + addCriterion("canvas_height not between", value1, value2, "canvasHeight"); + return (Criteria) this; + } + + public Criteria andLineColorIsNull() { + addCriterion("line_color is null"); + return (Criteria) this; + } + + public Criteria andLineColorIsNotNull() { + addCriterion("line_color is not null"); + return (Criteria) this; + } + + public Criteria andLineColorEqualTo(String value) { + addCriterion("line_color =", value, "lineColor"); + return (Criteria) this; + } + + public Criteria andLineColorNotEqualTo(String value) { + addCriterion("line_color <>", value, "lineColor"); + return (Criteria) this; + } + + public Criteria andLineColorGreaterThan(String value) { + addCriterion("line_color >", value, "lineColor"); + return (Criteria) this; + } + + public Criteria andLineColorGreaterThanOrEqualTo(String value) { + addCriterion("line_color >=", value, "lineColor"); + return (Criteria) this; + } + + public Criteria andLineColorLessThan(String value) { + addCriterion("line_color <", value, "lineColor"); + return (Criteria) this; + } + + public Criteria andLineColorLessThanOrEqualTo(String value) { + addCriterion("line_color <=", value, "lineColor"); + return (Criteria) this; + } + + public Criteria andLineColorLike(String value) { + addCriterion("line_color like", value, "lineColor"); + return (Criteria) this; + } + + public Criteria andLineColorNotLike(String value) { + addCriterion("line_color not like", value, "lineColor"); + return (Criteria) this; + } + + public Criteria andLineColorIn(List values) { + addCriterion("line_color in", values, "lineColor"); + return (Criteria) this; + } + + public Criteria andLineColorNotIn(List values) { + addCriterion("line_color not in", values, "lineColor"); + return (Criteria) this; + } + + public Criteria andLineColorBetween(String value1, String value2) { + addCriterion("line_color between", value1, value2, "lineColor"); + return (Criteria) this; + } + + public Criteria andLineColorNotBetween(String value1, String value2) { + addCriterion("line_color not between", value1, value2, "lineColor"); + return (Criteria) this; + } + + public Criteria andLineWidthIsNull() { + addCriterion("line_width is null"); + return (Criteria) this; + } + + public Criteria andLineWidthIsNotNull() { + addCriterion("line_width is not null"); + return (Criteria) this; + } + + public Criteria andLineWidthEqualTo(Integer value) { + addCriterion("line_width =", value, "lineWidth"); + return (Criteria) this; + } + + public Criteria andLineWidthNotEqualTo(Integer value) { + addCriterion("line_width <>", value, "lineWidth"); + return (Criteria) this; + } + + public Criteria andLineWidthGreaterThan(Integer value) { + addCriterion("line_width >", value, "lineWidth"); + return (Criteria) this; + } + + public Criteria andLineWidthGreaterThanOrEqualTo(Integer value) { + addCriterion("line_width >=", value, "lineWidth"); + return (Criteria) this; + } + + public Criteria andLineWidthLessThan(Integer value) { + addCriterion("line_width <", value, "lineWidth"); + return (Criteria) this; + } + + public Criteria andLineWidthLessThanOrEqualTo(Integer value) { + addCriterion("line_width <=", value, "lineWidth"); + return (Criteria) this; + } + + public Criteria andLineWidthIn(List values) { + addCriterion("line_width in", values, "lineWidth"); + return (Criteria) this; + } + + public Criteria andLineWidthNotIn(List values) { + addCriterion("line_width not in", values, "lineWidth"); + return (Criteria) this; + } + + public Criteria andLineWidthBetween(Integer value1, Integer value2) { + addCriterion("line_width between", value1, value2, "lineWidth"); + return (Criteria) this; + } + + public Criteria andLineWidthNotBetween(Integer value1, Integer value2) { + addCriterion("line_width not between", value1, value2, "lineWidth"); + 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/HtPatientCanvasLine.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvasLine.java new file mode 100644 index 00000000..6b926a60 --- /dev/null +++ b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvasLine.java @@ -0,0 +1,84 @@ +package com.ccsens.ht.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class HtPatientCanvasLine implements Serializable { + private Long id; + + private Long patientCanvasId; + + private String points; + + 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 getPatientCanvasId() { + return patientCanvasId; + } + + public void setPatientCanvasId(Long patientCanvasId) { + this.patientCanvasId = patientCanvasId; + } + + public String getPoints() { + return points; + } + + public void setPoints(String points) { + this.points = points == null ? null : points.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(", patientCanvasId=").append(patientCanvasId); + sb.append(", points=").append(points); + 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/HtPatientCanvasLineExample.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvasLineExample.java new file mode 100644 index 00000000..0c95a370 --- /dev/null +++ b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvasLineExample.java @@ -0,0 +1,571 @@ +package com.ccsens.ht.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HtPatientCanvasLineExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public HtPatientCanvasLineExample() { + 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 andPatientCanvasIdIsNull() { + addCriterion("patient_canvas_id is null"); + return (Criteria) this; + } + + public Criteria andPatientCanvasIdIsNotNull() { + addCriterion("patient_canvas_id is not null"); + return (Criteria) this; + } + + public Criteria andPatientCanvasIdEqualTo(Long value) { + addCriterion("patient_canvas_id =", value, "patientCanvasId"); + return (Criteria) this; + } + + public Criteria andPatientCanvasIdNotEqualTo(Long value) { + addCriterion("patient_canvas_id <>", value, "patientCanvasId"); + return (Criteria) this; + } + + public Criteria andPatientCanvasIdGreaterThan(Long value) { + addCriterion("patient_canvas_id >", value, "patientCanvasId"); + return (Criteria) this; + } + + public Criteria andPatientCanvasIdGreaterThanOrEqualTo(Long value) { + addCriterion("patient_canvas_id >=", value, "patientCanvasId"); + return (Criteria) this; + } + + public Criteria andPatientCanvasIdLessThan(Long value) { + addCriterion("patient_canvas_id <", value, "patientCanvasId"); + return (Criteria) this; + } + + public Criteria andPatientCanvasIdLessThanOrEqualTo(Long value) { + addCriterion("patient_canvas_id <=", value, "patientCanvasId"); + return (Criteria) this; + } + + public Criteria andPatientCanvasIdIn(List values) { + addCriterion("patient_canvas_id in", values, "patientCanvasId"); + return (Criteria) this; + } + + public Criteria andPatientCanvasIdNotIn(List values) { + addCriterion("patient_canvas_id not in", values, "patientCanvasId"); + return (Criteria) this; + } + + public Criteria andPatientCanvasIdBetween(Long value1, Long value2) { + addCriterion("patient_canvas_id between", value1, value2, "patientCanvasId"); + return (Criteria) this; + } + + public Criteria andPatientCanvasIdNotBetween(Long value1, Long value2) { + addCriterion("patient_canvas_id not between", value1, value2, "patientCanvasId"); + return (Criteria) this; + } + + public Criteria andPointsIsNull() { + addCriterion("points is null"); + return (Criteria) this; + } + + public Criteria andPointsIsNotNull() { + addCriterion("points is not null"); + return (Criteria) this; + } + + public Criteria andPointsEqualTo(String value) { + addCriterion("points =", value, "points"); + return (Criteria) this; + } + + public Criteria andPointsNotEqualTo(String value) { + addCriterion("points <>", value, "points"); + return (Criteria) this; + } + + public Criteria andPointsGreaterThan(String value) { + addCriterion("points >", value, "points"); + return (Criteria) this; + } + + public Criteria andPointsGreaterThanOrEqualTo(String value) { + addCriterion("points >=", value, "points"); + return (Criteria) this; + } + + public Criteria andPointsLessThan(String value) { + addCriterion("points <", value, "points"); + return (Criteria) this; + } + + public Criteria andPointsLessThanOrEqualTo(String value) { + addCriterion("points <=", value, "points"); + return (Criteria) this; + } + + public Criteria andPointsLike(String value) { + addCriterion("points like", value, "points"); + return (Criteria) this; + } + + public Criteria andPointsNotLike(String value) { + addCriterion("points not like", value, "points"); + return (Criteria) this; + } + + public Criteria andPointsIn(List values) { + addCriterion("points in", values, "points"); + return (Criteria) this; + } + + public Criteria andPointsNotIn(List values) { + addCriterion("points not in", values, "points"); + return (Criteria) this; + } + + public Criteria andPointsBetween(String value1, String value2) { + addCriterion("points between", value1, value2, "points"); + return (Criteria) this; + } + + public Criteria andPointsNotBetween(String value1, String value2) { + addCriterion("points not between", value1, value2, "points"); + 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 673f7832..98ef2795 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 @@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollectionUtil; import com.ccsens.ht.bean.po.HtPatientQuestionRecord; import com.ccsens.ht.bean.po.HtQuestion; import com.ccsens.ht.bean.po.HtQuestionIntroducer; -import com.ccsens.ht.bean.po.HtQuestionOption; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -264,4 +263,41 @@ public class QuestionVo { } } + + @Data + @ApiModel("病人画图的轨迹信息") + public static class PatientCanvas{ + @ApiModelProperty("画图信息id") + private Long patientCanvasId; + @ApiModelProperty("报告单id") + private Long patientReportId; + @ApiModelProperty("测评试题id") + private Long questionId; + @ApiModelProperty("时间") + private Long beginTime; + @ApiModelProperty("轨迹,每个字符串是一条轨迹,轨迹内格式(x,y,time;x,y,time;.....)") + private List points; + @ApiModelProperty("画板大小") + private Canvas canvas; + @ApiModelProperty("笔触信息") + private CanvasLine line; + } + @Data + @ApiModel("画板信息") + public static class Canvas{ + @ApiModelProperty("画板宽") + private Integer width; + @ApiModelProperty("画板高") + private Integer height; + } + @Data + @ApiModel("笔触信息") + public static class CanvasLine{ + @ApiModelProperty("笔触颜色") + private String color; + @ApiModelProperty("笔触粗细") + private Integer width; + } + + } diff --git a/ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientCanvasDao.java b/ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientCanvasDao.java new file mode 100644 index 00000000..876b9faf --- /dev/null +++ b/ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientCanvasDao.java @@ -0,0 +1,19 @@ +package com.ccsens.ht.persist.dao; + +import com.ccsens.ht.persist.mapper.HtPatientCanvasMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * @author 逗 + */ +@Repository +public interface HtPatientCanvasDao extends HtPatientCanvasMapper { + + /** + * 查看用户画图轨迹 + */ + List getCanvasPoints(@Param("canvasId") Long canvasId); +} diff --git a/ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientCanvasLineMapper.java b/ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientCanvasLineMapper.java new file mode 100644 index 00000000..fb33f84c --- /dev/null +++ b/ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientCanvasLineMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.ht.persist.mapper; + +import com.ccsens.ht.bean.po.HtPatientCanvasLine; +import com.ccsens.ht.bean.po.HtPatientCanvasLineExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface HtPatientCanvasLineMapper { + long countByExample(HtPatientCanvasLineExample example); + + int deleteByExample(HtPatientCanvasLineExample example); + + int deleteByPrimaryKey(Long id); + + int insert(HtPatientCanvasLine record); + + int insertSelective(HtPatientCanvasLine record); + + List selectByExample(HtPatientCanvasLineExample example); + + HtPatientCanvasLine selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") HtPatientCanvasLine record, @Param("example") HtPatientCanvasLineExample example); + + int updateByExample(@Param("record") HtPatientCanvasLine record, @Param("example") HtPatientCanvasLineExample example); + + int updateByPrimaryKeySelective(HtPatientCanvasLine record); + + int updateByPrimaryKey(HtPatientCanvasLine record); +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientCanvasMapper.java b/ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientCanvasMapper.java new file mode 100644 index 00000000..9b9d58ff --- /dev/null +++ b/ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientCanvasMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.ht.persist.mapper; + +import com.ccsens.ht.bean.po.HtPatientCanvas; +import com.ccsens.ht.bean.po.HtPatientCanvasExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface HtPatientCanvasMapper { + long countByExample(HtPatientCanvasExample example); + + int deleteByExample(HtPatientCanvasExample example); + + int deleteByPrimaryKey(Long id); + + int insert(HtPatientCanvas record); + + int insertSelective(HtPatientCanvas record); + + List selectByExample(HtPatientCanvasExample example); + + HtPatientCanvas selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") HtPatientCanvas record, @Param("example") HtPatientCanvasExample example); + + int updateByExample(@Param("record") HtPatientCanvas record, @Param("example") HtPatientCanvasExample example); + + int updateByPrimaryKeySelective(HtPatientCanvas record); + + int updateByPrimaryKey(HtPatientCanvas record); +} \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/service/IQuestionService.java b/ht/src/main/java/com/ccsens/ht/service/IQuestionService.java index 3c84ced5..d6ce3394 100644 --- a/ht/src/main/java/com/ccsens/ht/service/IQuestionService.java +++ b/ht/src/main/java/com/ccsens/ht/service/IQuestionService.java @@ -29,4 +29,20 @@ public interface IQuestionService { * @return */ CodeEnum saveScore(QuestionDto.Score score, Long userId) throws IOException, NotSupportedFileTypeException; + + /** + * 保存画图轨迹信息 + * @param param + * @param userId + * @return + */ + QuestionVo.PatientCanvas saveCanvas(QuestionDto.SavePatientCanvas param, Long userId); + + /** + * 查看用户画图信息 + * @param param + * @param userId + * @return + */ + QuestionVo.PatientCanvas getCanvas(QuestionDto.QueryPatientCanvas param, Long userId); } 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 820bbfa5..3b27074f 100644 --- a/ht/src/main/java/com/ccsens/ht/service/QuestionService.java +++ b/ht/src/main/java/com/ccsens/ht/service/QuestionService.java @@ -1,9 +1,8 @@ package com.ccsens.ht.service; -import cn.hutool.core.codec.Base64; import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; @@ -28,7 +27,6 @@ import javax.annotation.Resource; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; -import java.io.File; import java.io.IOException; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; @@ -62,6 +60,10 @@ public class QuestionService implements IQuestionService { private HtQuestionScoringRuleDao htQuestionScoringRuleDao; @Resource private HtReportDao htReportDao; + @Resource + private HtPatientCanvasDao patientCanvasDao; + @Resource + private HtPatientCanvasLineMapper patientCanvasLineMapper; @@ -424,4 +426,75 @@ public class QuestionService implements IQuestionService { default: patientScore.setScore(questionOption.getScore());break; } } + + + /** + * 保存画图轨迹信息 + */ + @Override + public QuestionVo.PatientCanvas saveCanvas(QuestionDto.SavePatientCanvas param, Long userId) { + //添加画板基本信息 + HtPatientCanvas patientCanvas = new HtPatientCanvas(); + patientCanvas.setId(snowflake.nextId()); + patientCanvas.setPatientReportId(param.getPatientReportId()); + patientCanvas.setQuestionId(param.getQuestionId()); + + patientCanvas.setBeginTime(param.getBeginTime()); + if(ObjectUtil.isNotNull(param.getCanvas())){ + patientCanvas.setCanvasWidth(param.getCanvas().getWidth()); + patientCanvas.setCanvasHeight(param.getCanvas().getHeight()); + } + if(ObjectUtil.isNotNull(param.getLine())){ + patientCanvas.setLineColor(param.getLine().getColor()); + patientCanvas.setLineWidth(param.getLine().getWidth()); + } + patientCanvasDao.insertSelective(patientCanvas); + //添加轨迹信息 + if(CollectionUtil.isNotEmpty(param.getPoints())){ + param.getPoints().forEach(point -> { + HtPatientCanvasLine patientCanvasLine = new HtPatientCanvasLine(); + patientCanvasLine.setId(snowflake.nextId()); + patientCanvasLine.setPatientCanvasId(patientCanvas.getId()); + patientCanvasLine.setPoints(point); + patientCanvasLineMapper.insertSelective(patientCanvasLine); + }); + } + QuestionDto.QueryPatientCanvas patient = new QuestionDto.QueryPatientCanvas(); + patient.setPatientReportId(param.getPatientReportId()); + patient.setQuestionId(param.getQuestionId()); + + return getCanvas(patient,userId); + } + + /** + * 查看用户画图信息 + */ + @Override + public QuestionVo.PatientCanvas getCanvas(QuestionDto.QueryPatientCanvas param, Long userId) { + QuestionVo.PatientCanvas patientCanvas = new QuestionVo.PatientCanvas(); + + HtPatientCanvasExample canvasExample = new HtPatientCanvasExample(); + canvasExample.createCriteria().andPatientReportIdEqualTo(param.getPatientReportId()).andQuestionIdEqualTo(param.getQuestionId()); + List patientCanvasList = patientCanvasDao.selectByExample(canvasExample); + + if(CollectionUtil.isEmpty(patientCanvasList)){ + return patientCanvas; + } + patientCanvas.setPatientCanvasId(patientCanvasList.get(0).getId()); + patientCanvas.setPatientReportId(patientCanvasList.get(0).getPatientReportId()); + patientCanvas.setQuestionId(patientCanvasList.get(0).getQuestionId()); + patientCanvas.setBeginTime(patientCanvasList.get(0).getBeginTime()); + + QuestionVo.Canvas canvas = new QuestionVo.Canvas(); + canvas.setWidth(patientCanvasList.get(0).getCanvasWidth()); + canvas.setHeight(patientCanvasList.get(0).getCanvasHeight()); + patientCanvas.setCanvas(canvas); + QuestionVo.CanvasLine canvasLine = new QuestionVo.CanvasLine(); + canvasLine.setColor(patientCanvasList.get(0).getLineColor()); + canvasLine.setWidth(patientCanvasList.get(0).getLineWidth()); + patientCanvas.setLine(canvasLine); + patientCanvas.setPoints(patientCanvasDao.getCanvasPoints(patientCanvasList.get(0).getId())); + + return patientCanvas; + } } diff --git a/ht/src/main/resources/application.yml b/ht/src/main/resources/application.yml index d082c0ea..5889ff7f 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: test + include: common, util-test \ No newline at end of file diff --git a/ht/src/main/resources/mapper_dao/HtPatientCanvasDao.xml b/ht/src/main/resources/mapper_dao/HtPatientCanvasDao.xml new file mode 100644 index 00000000..65958ff6 --- /dev/null +++ b/ht/src/main/resources/mapper_dao/HtPatientCanvasDao.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/ht/src/main/resources/mapper_raw/HtPatientCanvasLineMapper.xml b/ht/src/main/resources/mapper_raw/HtPatientCanvasLineMapper.xml new file mode 100644 index 00000000..c926adf1 --- /dev/null +++ b/ht/src/main/resources/mapper_raw/HtPatientCanvasLineMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + 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_canvas_id, points, create_time, update_time, is_del + + + + + delete from t_ht_patient_canvas_line + where id = #{id,jdbcType=BIGINT} + + + delete from t_ht_patient_canvas_line + + + + + + insert into t_ht_patient_canvas_line (id, patient_canvas_id, points, + create_time, update_time, is_del + ) + values (#{id,jdbcType=BIGINT}, #{patientCanvasId,jdbcType=BIGINT}, #{points,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT} + ) + + + insert into t_ht_patient_canvas_line + + + id, + + + patient_canvas_id, + + + points, + + + create_time, + + + update_time, + + + is_del, + + + + + #{id,jdbcType=BIGINT}, + + + #{patientCanvasId,jdbcType=BIGINT}, + + + #{points,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{isDel,jdbcType=TINYINT}, + + + + + + update t_ht_patient_canvas_line + + + id = #{record.id,jdbcType=BIGINT}, + + + patient_canvas_id = #{record.patientCanvasId,jdbcType=BIGINT}, + + + points = #{record.points,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + is_del = #{record.isDel,jdbcType=TINYINT}, + + + + + + + + update t_ht_patient_canvas_line + set id = #{record.id,jdbcType=BIGINT}, + patient_canvas_id = #{record.patientCanvasId,jdbcType=BIGINT}, + points = #{record.points,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + is_del = #{record.isDel,jdbcType=TINYINT} + + + + + + update t_ht_patient_canvas_line + + + patient_canvas_id = #{patientCanvasId,jdbcType=BIGINT}, + + + points = #{points,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_patient_canvas_line + set patient_canvas_id = #{patientCanvasId,jdbcType=BIGINT}, + points = #{points,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/HtPatientCanvasMapper.xml b/ht/src/main/resources/mapper_raw/HtPatientCanvasMapper.xml new file mode 100644 index 00000000..bd2c551b --- /dev/null +++ b/ht/src/main/resources/mapper_raw/HtPatientCanvasMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 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, question_id, begin_time, canvas_width, canvas_height, line_color, + line_width, create_time, update_time, is_del + + + + + delete from t_ht_patient_canvas + where id = #{id,jdbcType=BIGINT} + + + delete from t_ht_patient_canvas + + + + + + insert into t_ht_patient_canvas (id, patient_report_id, question_id, + begin_time, canvas_width, canvas_height, + line_color, line_width, create_time, + update_time, is_del) + values (#{id,jdbcType=BIGINT}, #{patientReportId,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT}, + #{beginTime,jdbcType=BIGINT}, #{canvasWidth,jdbcType=INTEGER}, #{canvasHeight,jdbcType=INTEGER}, + #{lineColor,jdbcType=VARCHAR}, #{lineWidth,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, + #{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT}) + + + insert into t_ht_patient_canvas + + + id, + + + patient_report_id, + + + question_id, + + + begin_time, + + + canvas_width, + + + canvas_height, + + + line_color, + + + line_width, + + + create_time, + + + update_time, + + + is_del, + + + + + #{id,jdbcType=BIGINT}, + + + #{patientReportId,jdbcType=BIGINT}, + + + #{questionId,jdbcType=BIGINT}, + + + #{beginTime,jdbcType=BIGINT}, + + + #{canvasWidth,jdbcType=INTEGER}, + + + #{canvasHeight,jdbcType=INTEGER}, + + + #{lineColor,jdbcType=VARCHAR}, + + + #{lineWidth,jdbcType=INTEGER}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{isDel,jdbcType=TINYINT}, + + + + + + update t_ht_patient_canvas + + + id = #{record.id,jdbcType=BIGINT}, + + + patient_report_id = #{record.patientReportId,jdbcType=BIGINT}, + + + question_id = #{record.questionId,jdbcType=BIGINT}, + + + begin_time = #{record.beginTime,jdbcType=BIGINT}, + + + canvas_width = #{record.canvasWidth,jdbcType=INTEGER}, + + + canvas_height = #{record.canvasHeight,jdbcType=INTEGER}, + + + line_color = #{record.lineColor,jdbcType=VARCHAR}, + + + line_width = #{record.lineWidth,jdbcType=INTEGER}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + is_del = #{record.isDel,jdbcType=TINYINT}, + + + + + + + + update t_ht_patient_canvas + set id = #{record.id,jdbcType=BIGINT}, + patient_report_id = #{record.patientReportId,jdbcType=BIGINT}, + question_id = #{record.questionId,jdbcType=BIGINT}, + begin_time = #{record.beginTime,jdbcType=BIGINT}, + canvas_width = #{record.canvasWidth,jdbcType=INTEGER}, + canvas_height = #{record.canvasHeight,jdbcType=INTEGER}, + line_color = #{record.lineColor,jdbcType=VARCHAR}, + line_width = #{record.lineWidth,jdbcType=INTEGER}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + is_del = #{record.isDel,jdbcType=TINYINT} + + + + + + update t_ht_patient_canvas + + + patient_report_id = #{patientReportId,jdbcType=BIGINT}, + + + question_id = #{questionId,jdbcType=BIGINT}, + + + begin_time = #{beginTime,jdbcType=BIGINT}, + + + canvas_width = #{canvasWidth,jdbcType=INTEGER}, + + + canvas_height = #{canvasHeight,jdbcType=INTEGER}, + + + line_color = #{lineColor,jdbcType=VARCHAR}, + + + line_width = #{lineWidth,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + is_del = #{isDel,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_ht_patient_canvas + set patient_report_id = #{patientReportId,jdbcType=BIGINT}, + question_id = #{questionId,jdbcType=BIGINT}, + begin_time = #{beginTime,jdbcType=BIGINT}, + canvas_width = #{canvasWidth,jdbcType=INTEGER}, + canvas_height = #{canvasHeight,jdbcType=INTEGER}, + line_color = #{lineColor,jdbcType=VARCHAR}, + line_width = #{lineWidth,jdbcType=INTEGER}, + 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/tall/src/main/resources/application.yml b/tall/src/main/resources/application.yml index 1d881c2f..eca66951 100644 --- a/tall/src/main/resources/application.yml +++ b/tall/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: dev - include: util-dev,common \ No newline at end of file + active: test + include: util-test,common \ No newline at end of file