Browse Source

20201204新增保存用户画图轨迹功能

sd
zy_Java 5 years ago
parent
commit
49d58ade29
  1. 24
      ht/src/main/java/com/ccsens/ht/api/QuestionController.java
  2. 46
      ht/src/main/java/com/ccsens/ht/bean/dto/QuestionDto.java
  3. 139
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvas.java
  4. 871
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvasExample.java
  5. 84
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvasLine.java
  6. 571
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientCanvasLineExample.java
  7. 38
      ht/src/main/java/com/ccsens/ht/bean/vo/QuestionVo.java
  8. 19
      ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientCanvasDao.java
  9. 30
      ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientCanvasLineMapper.java
  10. 30
      ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientCanvasMapper.java
  11. 16
      ht/src/main/java/com/ccsens/ht/service/IQuestionService.java
  12. 79
      ht/src/main/java/com/ccsens/ht/service/QuestionService.java
  13. 4
      ht/src/main/resources/application.yml
  14. 15
      ht/src/main/resources/mapper_dao/HtPatientCanvasDao.xml
  15. 228
      ht/src/main/resources/mapper_raw/HtPatientCanvasLineMapper.xml
  16. 306
      ht/src/main/resources/mapper_raw/HtPatientCanvasMapper.xml
  17. 4
      tall/src/main/resources/application.yml

24
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<QuestionVo.PatientCanvas> saveCanvas(@RequestBody @ApiParam @Valid QueryDto<QuestionDto.SavePatientCanvas> 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<QuestionVo.PatientCanvas> queryCanvas(@RequestBody @ApiParam @Valid QueryDto<QuestionDto.QueryPatientCanvas> queryDto) throws IOException, NotSupportedFileTypeException {
log.info("查看用户画图信息:{}", queryDto);
QuestionVo.PatientCanvas patientCanvas = questionService.getCanvas(queryDto.getParam(), queryDto.getUserId());
log.info("查看用户画图信息成功:{}", patientCanvas);
return JsonResponse.newInstance().ok(patientCanvas);
}
}

46
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<String> 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;
}
}

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

871
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<Criteria> oredCriteria;
public HtPatientCanvasExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andPatientReportIdIsNull() {
addCriterion("patient_report_id is null");
return (Criteria) this;
}
public Criteria andPatientReportIdIsNotNull() {
addCriterion("patient_report_id is not null");
return (Criteria) this;
}
public Criteria andPatientReportIdEqualTo(Long value) {
addCriterion("patient_report_id =", value, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdNotEqualTo(Long value) {
addCriterion("patient_report_id <>", value, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdGreaterThan(Long value) {
addCriterion("patient_report_id >", value, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdGreaterThanOrEqualTo(Long value) {
addCriterion("patient_report_id >=", value, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdLessThan(Long value) {
addCriterion("patient_report_id <", value, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdLessThanOrEqualTo(Long value) {
addCriterion("patient_report_id <=", value, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdIn(List<Long> values) {
addCriterion("patient_report_id in", values, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdNotIn(List<Long> values) {
addCriterion("patient_report_id not in", values, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdBetween(Long value1, Long value2) {
addCriterion("patient_report_id between", value1, value2, "patientReportId");
return (Criteria) this;
}
public Criteria andPatientReportIdNotBetween(Long value1, Long value2) {
addCriterion("patient_report_id not between", value1, value2, "patientReportId");
return (Criteria) this;
}
public Criteria andQuestionIdIsNull() {
addCriterion("question_id is null");
return (Criteria) this;
}
public Criteria andQuestionIdIsNotNull() {
addCriterion("question_id is not null");
return (Criteria) this;
}
public Criteria andQuestionIdEqualTo(Long value) {
addCriterion("question_id =", value, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdNotEqualTo(Long value) {
addCriterion("question_id <>", value, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdGreaterThan(Long value) {
addCriterion("question_id >", value, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdGreaterThanOrEqualTo(Long value) {
addCriterion("question_id >=", value, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdLessThan(Long value) {
addCriterion("question_id <", value, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdLessThanOrEqualTo(Long value) {
addCriterion("question_id <=", value, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdIn(List<Long> values) {
addCriterion("question_id in", values, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdNotIn(List<Long> values) {
addCriterion("question_id not in", values, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdBetween(Long value1, Long value2) {
addCriterion("question_id between", value1, value2, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdNotBetween(Long value1, Long value2) {
addCriterion("question_id not between", value1, value2, "questionId");
return (Criteria) this;
}
public Criteria 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<Long> values) {
addCriterion("begin_time in", values, "beginTime");
return (Criteria) this;
}
public Criteria andBeginTimeNotIn(List<Long> 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<Integer> values) {
addCriterion("canvas_width in", values, "canvasWidth");
return (Criteria) this;
}
public Criteria andCanvasWidthNotIn(List<Integer> 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<Integer> values) {
addCriterion("canvas_height in", values, "canvasHeight");
return (Criteria) this;
}
public Criteria andCanvasHeightNotIn(List<Integer> 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<String> values) {
addCriterion("line_color in", values, "lineColor");
return (Criteria) this;
}
public Criteria andLineColorNotIn(List<String> 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<Integer> values) {
addCriterion("line_width in", values, "lineWidth");
return (Criteria) this;
}
public Criteria andLineWidthNotIn(List<Integer> 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<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andIsDelIsNull() {
addCriterion("is_del is null");
return (Criteria) this;
}
public Criteria andIsDelIsNotNull() {
addCriterion("is_del is not null");
return (Criteria) this;
}
public Criteria andIsDelEqualTo(Byte value) {
addCriterion("is_del =", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotEqualTo(Byte value) {
addCriterion("is_del <>", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelGreaterThan(Byte value) {
addCriterion("is_del >", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelGreaterThanOrEqualTo(Byte value) {
addCriterion("is_del >=", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelLessThan(Byte value) {
addCriterion("is_del <", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelLessThanOrEqualTo(Byte value) {
addCriterion("is_del <=", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelIn(List<Byte> values) {
addCriterion("is_del in", values, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotIn(List<Byte> values) {
addCriterion("is_del not in", values, "isDel");
return (Criteria) this;
}
public Criteria andIsDelBetween(Byte value1, Byte value2) {
addCriterion("is_del between", value1, value2, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotBetween(Byte value1, Byte value2) {
addCriterion("is_del not between", value1, value2, "isDel");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

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

571
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<Criteria> oredCriteria;
public HtPatientCanvasLineExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria 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<Long> values) {
addCriterion("patient_canvas_id in", values, "patientCanvasId");
return (Criteria) this;
}
public Criteria andPatientCanvasIdNotIn(List<Long> 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<String> values) {
addCriterion("points in", values, "points");
return (Criteria) this;
}
public Criteria andPointsNotIn(List<String> 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<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andIsDelIsNull() {
addCriterion("is_del is null");
return (Criteria) this;
}
public Criteria andIsDelIsNotNull() {
addCriterion("is_del is not null");
return (Criteria) this;
}
public Criteria andIsDelEqualTo(Byte value) {
addCriterion("is_del =", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotEqualTo(Byte value) {
addCriterion("is_del <>", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelGreaterThan(Byte value) {
addCriterion("is_del >", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelGreaterThanOrEqualTo(Byte value) {
addCriterion("is_del >=", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelLessThan(Byte value) {
addCriterion("is_del <", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelLessThanOrEqualTo(Byte value) {
addCriterion("is_del <=", value, "isDel");
return (Criteria) this;
}
public Criteria andIsDelIn(List<Byte> values) {
addCriterion("is_del in", values, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotIn(List<Byte> values) {
addCriterion("is_del not in", values, "isDel");
return (Criteria) this;
}
public Criteria andIsDelBetween(Byte value1, Byte value2) {
addCriterion("is_del between", value1, value2, "isDel");
return (Criteria) this;
}
public Criteria andIsDelNotBetween(Byte value1, Byte value2) {
addCriterion("is_del not between", value1, value2, "isDel");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

38
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<String> 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;
}
}

19
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<String> getCanvasPoints(@Param("canvasId") Long canvasId);
}

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

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

16
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);
}

79
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<HtPatientCanvas> 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;
}
}

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

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

15
ht/src/main/resources/mapper_dao/HtPatientCanvasDao.xml

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.ht.persist.dao.HtPatientCanvasDao">
<select id="getCanvasPoints" resultType="java.lang.String">
SELECT
points
FROM
t_ht_patient_canvas_line cl
WHERE
cl.patient_canvas_id = #{canvasId}
and cl.is_del = 0
</select>
</mapper>

228
ht/src/main/resources/mapper_raw/HtPatientCanvasLineMapper.xml

@ -0,0 +1,228 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.ht.persist.mapper.HtPatientCanvasLineMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtPatientCanvasLine">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="patient_canvas_id" jdbcType="BIGINT" property="patientCanvasId" />
<result column="points" jdbcType="VARCHAR" property="points" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, patient_canvas_id, points, create_time, update_time, is_del
</sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasLineExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_ht_patient_canvas_line
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_ht_patient_canvas_line
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_ht_patient_canvas_line
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasLineExample">
delete from t_ht_patient_canvas_line
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasLine">
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>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasLine">
insert into t_ht_patient_canvas_line
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="patientCanvasId != null">
patient_canvas_id,
</if>
<if test="points != null">
points,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isDel != null">
is_del,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="patientCanvasId != null">
#{patientCanvasId,jdbcType=BIGINT},
</if>
<if test="points != null">
#{points,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
#{isDel,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasLineExample" resultType="java.lang.Long">
select count(*) from t_ht_patient_canvas_line
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_ht_patient_canvas_line
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.patientCanvasId != null">
patient_canvas_id = #{record.patientCanvasId,jdbcType=BIGINT},
</if>
<if test="record.points != null">
points = #{record.points,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDel != null">
is_del = #{record.isDel,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_ht_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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasLine">
update t_ht_patient_canvas_line
<set>
<if test="patientCanvasId != null">
patient_canvas_id = #{patientCanvasId,jdbcType=BIGINT},
</if>
<if test="points != null">
points = #{points,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
is_del = #{isDel,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasLine">
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}
</update>
</mapper>

306
ht/src/main/resources/mapper_raw/HtPatientCanvasMapper.xml

@ -0,0 +1,306 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.ht.persist.mapper.HtPatientCanvasMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtPatientCanvas">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="patient_report_id" jdbcType="BIGINT" property="patientReportId" />
<result column="question_id" jdbcType="BIGINT" property="questionId" />
<result column="begin_time" jdbcType="BIGINT" property="beginTime" />
<result column="canvas_width" jdbcType="INTEGER" property="canvasWidth" />
<result column="canvas_height" jdbcType="INTEGER" property="canvasHeight" />
<result column="line_color" jdbcType="VARCHAR" property="lineColor" />
<result column="line_width" jdbcType="INTEGER" property="lineWidth" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, patient_report_id, question_id, begin_time, canvas_width, canvas_height, line_color,
line_width, create_time, update_time, is_del
</sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_ht_patient_canvas
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_ht_patient_canvas
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_ht_patient_canvas
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasExample">
delete from t_ht_patient_canvas
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtPatientCanvas">
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>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientCanvas">
insert into t_ht_patient_canvas
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="patientReportId != null">
patient_report_id,
</if>
<if test="questionId != null">
question_id,
</if>
<if test="beginTime != null">
begin_time,
</if>
<if test="canvasWidth != null">
canvas_width,
</if>
<if test="canvasHeight != null">
canvas_height,
</if>
<if test="lineColor != null">
line_color,
</if>
<if test="lineWidth != null">
line_width,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isDel != null">
is_del,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="patientReportId != null">
#{patientReportId,jdbcType=BIGINT},
</if>
<if test="questionId != null">
#{questionId,jdbcType=BIGINT},
</if>
<if test="beginTime != null">
#{beginTime,jdbcType=BIGINT},
</if>
<if test="canvasWidth != null">
#{canvasWidth,jdbcType=INTEGER},
</if>
<if test="canvasHeight != null">
#{canvasHeight,jdbcType=INTEGER},
</if>
<if test="lineColor != null">
#{lineColor,jdbcType=VARCHAR},
</if>
<if test="lineWidth != null">
#{lineWidth,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
#{isDel,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientCanvasExample" resultType="java.lang.Long">
select count(*) from t_ht_patient_canvas
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_ht_patient_canvas
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.patientReportId != null">
patient_report_id = #{record.patientReportId,jdbcType=BIGINT},
</if>
<if test="record.questionId != null">
question_id = #{record.questionId,jdbcType=BIGINT},
</if>
<if test="record.beginTime != null">
begin_time = #{record.beginTime,jdbcType=BIGINT},
</if>
<if test="record.canvasWidth != null">
canvas_width = #{record.canvasWidth,jdbcType=INTEGER},
</if>
<if test="record.canvasHeight != null">
canvas_height = #{record.canvasHeight,jdbcType=INTEGER},
</if>
<if test="record.lineColor != null">
line_color = #{record.lineColor,jdbcType=VARCHAR},
</if>
<if test="record.lineWidth != null">
line_width = #{record.lineWidth,jdbcType=INTEGER},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDel != null">
is_del = #{record.isDel,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_ht_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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtPatientCanvas">
update t_ht_patient_canvas
<set>
<if test="patientReportId != null">
patient_report_id = #{patientReportId,jdbcType=BIGINT},
</if>
<if test="questionId != null">
question_id = #{questionId,jdbcType=BIGINT},
</if>
<if test="beginTime != null">
begin_time = #{beginTime,jdbcType=BIGINT},
</if>
<if test="canvasWidth != null">
canvas_width = #{canvasWidth,jdbcType=INTEGER},
</if>
<if test="canvasHeight != null">
canvas_height = #{canvasHeight,jdbcType=INTEGER},
</if>
<if test="lineColor != null">
line_color = #{lineColor,jdbcType=VARCHAR},
</if>
<if test="lineWidth != null">
line_width = #{lineWidth,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
is_del = #{isDel,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtPatientCanvas">
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}
</update>
</mapper>

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

@ -1,4 +1,4 @@
spring:
profiles:
active: dev
include: util-dev,common
active: test
include: util-test,common
Loading…
Cancel
Save