Browse Source

将分数修改为bigDecimal

sd
zy_Java 5 years ago
parent
commit
590282b10e
  1. 2
      cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java
  2. 61
      ht/src/main/java/com/ccsens/ht/api/ImportController.java
  3. 386
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientAcp.java
  4. 2520
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientAcpExample.java
  5. 365
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientScore.java
  6. 2281
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientScoreExample.java
  7. 277
      ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOption.java
  8. 1801
      ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOptionExample.java
  9. 3
      ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java
  10. 19
      ht/src/main/java/com/ccsens/ht/bean/vo/QuestionVo.java
  11. 58
      ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientAcpMapper.java
  12. 58
      ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientScoreMapper.java
  13. 58
      ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionOptionMapper.java
  14. 2
      ht/src/main/java/com/ccsens/ht/service/ImportService.java
  15. 16
      ht/src/main/java/com/ccsens/ht/service/PatientReportService.java
  16. 83
      ht/src/main/java/com/ccsens/ht/service/QuestionService.java
  17. 5
      ht/src/main/java/com/ccsens/ht/uitl/Constant.java
  18. 2
      ht/src/main/resources/application-dev.yml
  19. 1
      ht/src/main/resources/mapper_dao/HtPatientCanvasDao.xml
  20. 764
      ht/src/main/resources/mapper_raw/HtPatientAcpMapper.xml
  21. 738
      ht/src/main/resources/mapper_raw/HtPatientScoreMapper.xml
  22. 610
      ht/src/main/resources/mapper_raw/HtQuestionOptionMapper.xml
  23. 50
      tall/src/main/java/com/ccsens/tall/rabbitMQ/MessageTest.java
  24. 6
      tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java
  25. 25
      tall/src/main/java/com/ccsens/tall/service/UserService.java
  26. 8
      tall/src/main/resources/application-dev.yml
  27. 5
      tall/src/main/resources/application-prod.yml
  28. 7
      tall/src/main/resources/application-test.yml
  29. 4
      tall/src/main/resources/application.yml
  30. 6
      util/src/main/java/com/ccsens/util/PropUtil.java
  31. 51
      util/src/main/java/com/ccsens/util/SmsUtil.java

2
cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java

@ -28,7 +28,7 @@ import java.util.Map;
* @create: 2019/11/27 10:03 * @create: 2019/11/27 10:03
*/ */
@FeignClient(name = "tall", path = "v1.0", fallbackFactory = TallFeignClientFallBack.class) @FeignClient(name = "tall-ht", path = "v1.0", fallbackFactory = TallFeignClientFallBack.class)
public interface TallFeignClient { public interface TallFeignClient {
/** /**

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

@ -70,6 +70,41 @@ public class ImportController {
return JsonResponse.newInstance().ok(); return JsonResponse.newInstance().ok();
} }
/**
*@Description:
*@Param:
*@return: com.ccsens.ptpro.util.JsonResponse
*@Author: wuhuijuan
*@date: 2019/10/21 10:04
*/
@ApiOperation(value = "单独导入报告单类型",notes = "文件大小不能超过20M,支持后缀:.xls|.xlsx")
@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "医疗项目表", required = true, paramType = "form",dataType = "__file")
})
@RequestMapping(value = "/importReportType", method = RequestMethod.POST)
public JsonResponse importReportType(@RequestParam(required = true) Part file) throws Exception{
long time1 = System.currentTimeMillis();
//1.上传文件
String allowedExts = "xls,xlsx";
String dir = WebConstant.UPLOAD_PROJECT_WBS + File.separator;
String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir);
File execlFile = new File(dir+path);
long time2 = System.currentTimeMillis();
log.info("解析文件耗时:{}", (time2 - time1));
// importService.importPosition(execlFile, 0);
// long time3 = System.currentTimeMillis();
// log.info("导入职务耗时:{}", (time3 - time2));
// importService.importTitle(execlFile, 1);
long time4 = System.currentTimeMillis();
// log.info("导入职称耗时:{}", (time4 - time3));
importService.importReport(execlFile, 2);
long time5 = System.currentTimeMillis();
log.info("导入报告单耗时:{}", (time5 - time4));
// importService.importQuestion(execlFile, Constant.Ht.Question.ALL);
return JsonResponse.newInstance().ok();
}
/** /**
*@Description: *@Description:
@ -149,4 +184,30 @@ public class ImportController {
return JsonResponse.newInstance().ok(); return JsonResponse.newInstance().ok();
} }
/**
*@Description:
*@Param:
*@return: com.ccsens.ptpro.util.JsonResponse
*@Author: wuhuijuan
*@date: 2020/5/14 11:21
*/
@ApiOperation(value = "导入importXFXPD",notes = "文件大小不能超过20M,支持后缀:.xls|.xlsx")
@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "医疗项目表", required = true, paramType = "form",dataType = "__file")
})
@RequestMapping(value = "/importXFXPD", method = RequestMethod.POST)
public JsonResponse importXFXPD(@RequestParam(required = true) Part file) throws Exception{
long time1 = System.currentTimeMillis();
//1.上传文件
String allowedExts = "xls,xlsx";
String dir = WebConstant.UPLOAD_PROJECT_WBS + File.separator;
String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir);
File execlFile = new File(dir+path);
long time2 = System.currentTimeMillis();
importService.importQuestion(execlFile, Constant.Ht.Report.XFXPD);
log.info("导入XFXPD");
return JsonResponse.newInstance().ok();
}
} }

386
ht/src/main/java/com/ccsens/ht/bean/po/HtPatientAcp.java

@ -1,183 +1,205 @@
package com.ccsens.ht.bean.po; package com.ccsens.ht.bean.po;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
public class HtPatientAcp implements Serializable { public class HtPatientAcp implements Serializable {
private Long id; private Long id;
private Long patientId; private Long patientId;
private String ct; private String ct;
private String mri; private String mri;
private String hcy; private String hcy;
private String vb12; private String vb12;
private String folicAcid; private String folicAcid;
private String tt3; private String tt3;
private String tt4; private String tt4;
private String tsh; private String tsh;
private String remark; private String remark;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
private Byte isDel; private Byte isDel;
private Long recorder; private Long recorder;
private static final long serialVersionUID = 1L; private String ta1;
public Long getId() { private String tpt;
return id;
} private static final long serialVersionUID = 1L;
public void setId(Long id) { public Long getId() {
this.id = id; return id;
} }
public Long getPatientId() { public void setId(Long id) {
return patientId; this.id = id;
} }
public void setPatientId(Long patientId) { public Long getPatientId() {
this.patientId = patientId; return patientId;
} }
public String getCt() { public void setPatientId(Long patientId) {
return ct; this.patientId = patientId;
} }
public void setCt(String ct) { public String getCt() {
this.ct = ct == null ? null : ct.trim(); return ct;
} }
public String getMri() { public void setCt(String ct) {
return mri; this.ct = ct == null ? null : ct.trim();
} }
public void setMri(String mri) { public String getMri() {
this.mri = mri == null ? null : mri.trim(); return mri;
} }
public String getHcy() { public void setMri(String mri) {
return hcy; this.mri = mri == null ? null : mri.trim();
} }
public void setHcy(String hcy) { public String getHcy() {
this.hcy = hcy == null ? null : hcy.trim(); return hcy;
} }
public String getVb12() { public void setHcy(String hcy) {
return vb12; this.hcy = hcy == null ? null : hcy.trim();
} }
public void setVb12(String vb12) { public String getVb12() {
this.vb12 = vb12 == null ? null : vb12.trim(); return vb12;
} }
public String getFolicAcid() { public void setVb12(String vb12) {
return folicAcid; this.vb12 = vb12 == null ? null : vb12.trim();
} }
public void setFolicAcid(String folicAcid) { public String getFolicAcid() {
this.folicAcid = folicAcid == null ? null : folicAcid.trim(); return folicAcid;
} }
public String getTt3() { public void setFolicAcid(String folicAcid) {
return tt3; this.folicAcid = folicAcid == null ? null : folicAcid.trim();
} }
public void setTt3(String tt3) { public String getTt3() {
this.tt3 = tt3 == null ? null : tt3.trim(); return tt3;
} }
public String getTt4() { public void setTt3(String tt3) {
return tt4; this.tt3 = tt3 == null ? null : tt3.trim();
} }
public void setTt4(String tt4) { public String getTt4() {
this.tt4 = tt4 == null ? null : tt4.trim(); return tt4;
} }
public String getTsh() { public void setTt4(String tt4) {
return tsh; this.tt4 = tt4 == null ? null : tt4.trim();
} }
public void setTsh(String tsh) { public String getTsh() {
this.tsh = tsh == null ? null : tsh.trim(); return tsh;
} }
public String getRemark() { public void setTsh(String tsh) {
return remark; this.tsh = tsh == null ? null : tsh.trim();
} }
public void setRemark(String remark) { public String getRemark() {
this.remark = remark == null ? null : remark.trim(); return remark;
} }
public Date getCreateTime() { public void setRemark(String remark) {
return createTime; this.remark = remark == null ? null : remark.trim();
} }
public void setCreateTime(Date createTime) { public Date getCreateTime() {
this.createTime = createTime; return createTime;
} }
public Date getUpdateTime() { public void setCreateTime(Date createTime) {
return updateTime; this.createTime = createTime;
} }
public void setUpdateTime(Date updateTime) { public Date getUpdateTime() {
this.updateTime = updateTime; return updateTime;
} }
public Byte getIsDel() { public void setUpdateTime(Date updateTime) {
return isDel; this.updateTime = updateTime;
} }
public void setIsDel(Byte isDel) { public Byte getIsDel() {
this.isDel = isDel; return isDel;
} }
public Long getRecorder() { public void setIsDel(Byte isDel) {
return recorder; this.isDel = isDel;
} }
public void setRecorder(Long recorder) { public Long getRecorder() {
this.recorder = recorder; return recorder;
} }
@Override public void setRecorder(Long recorder) {
public String toString() { this.recorder = recorder;
StringBuilder sb = new StringBuilder(); }
sb.append(getClass().getSimpleName());
sb.append(" ["); public String getTa1() {
sb.append("Hash = ").append(hashCode()); return ta1;
sb.append(", id=").append(id); }
sb.append(", patientId=").append(patientId);
sb.append(", ct=").append(ct); public void setTa1(String ta1) {
sb.append(", mri=").append(mri); this.ta1 = ta1 == null ? null : ta1.trim();
sb.append(", hcy=").append(hcy); }
sb.append(", vb12=").append(vb12);
sb.append(", folicAcid=").append(folicAcid); public String getTpt() {
sb.append(", tt3=").append(tt3); return tpt;
sb.append(", tt4=").append(tt4); }
sb.append(", tsh=").append(tsh);
sb.append(", remark=").append(remark); public void setTpt(String tpt) {
sb.append(", createTime=").append(createTime); this.tpt = tpt == null ? null : tpt.trim();
sb.append(", updateTime=").append(updateTime); }
sb.append(", isDel=").append(isDel);
sb.append(", recorder=").append(recorder); @Override
sb.append("]"); public String toString() {
return sb.toString(); StringBuilder sb = new StringBuilder();
} sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", patientId=").append(patientId);
sb.append(", ct=").append(ct);
sb.append(", mri=").append(mri);
sb.append(", hcy=").append(hcy);
sb.append(", vb12=").append(vb12);
sb.append(", folicAcid=").append(folicAcid);
sb.append(", tt3=").append(tt3);
sb.append(", tt4=").append(tt4);
sb.append(", tsh=").append(tsh);
sb.append(", remark=").append(remark);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", isDel=").append(isDel);
sb.append(", recorder=").append(recorder);
sb.append(", ta1=").append(ta1);
sb.append(", tpt=").append(tpt);
sb.append("]");
return sb.toString();
}
} }

2520
ht/src/main/java/com/ccsens/ht/bean/po/HtPatientAcpExample.java

File diff suppressed because it is too large

365
ht/src/main/java/com/ccsens/ht/bean/po/HtPatientScore.java

@ -1,183 +1,184 @@
package com.ccsens.ht.bean.po; package com.ccsens.ht.bean.po;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.math.BigDecimal;
import java.util.Date;
public class HtPatientScore implements Serializable {
private Long id; public class HtPatientScore implements Serializable {
private Long id;
private Long patientReportId;
private Long patientReportId;
private Long patientId;
private Long patientId;
private String questionParentCode;
private String questionParentCode;
private Long questionId;
private Long questionId;
private Long optionId;
private Long optionId;
private String optionName;
private String optionName;
private Integer score;
private BigDecimal score;
private Byte type;
private Byte type;
private String answer;
private String answer;
private String remark;
private String remark;
private Date createTime;
private Date createTime;
private Date updateTime;
private Date updateTime;
private Byte isDel;
private Byte isDel;
private Long answerTime;
private Long answerTime;
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
public Long getId() {
return id; public Long getId() {
} return id;
}
public void setId(Long id) {
this.id = id; public void setId(Long id) {
} this.id = id;
}
public Long getPatientReportId() {
return patientReportId; public Long getPatientReportId() {
} return patientReportId;
}
public void setPatientReportId(Long patientReportId) {
this.patientReportId = patientReportId; public void setPatientReportId(Long patientReportId) {
} this.patientReportId = patientReportId;
}
public Long getPatientId() {
return patientId; public Long getPatientId() {
} return patientId;
}
public void setPatientId(Long patientId) {
this.patientId = patientId; public void setPatientId(Long patientId) {
} this.patientId = patientId;
}
public String getQuestionParentCode() {
return questionParentCode; public String getQuestionParentCode() {
} return questionParentCode;
}
public void setQuestionParentCode(String questionParentCode) {
this.questionParentCode = questionParentCode == null ? null : questionParentCode.trim(); public void setQuestionParentCode(String questionParentCode) {
} this.questionParentCode = questionParentCode == null ? null : questionParentCode.trim();
}
public Long getQuestionId() {
return questionId; public Long getQuestionId() {
} return questionId;
}
public void setQuestionId(Long questionId) {
this.questionId = questionId; public void setQuestionId(Long questionId) {
} this.questionId = questionId;
}
public Long getOptionId() {
return optionId; public Long getOptionId() {
} return optionId;
}
public void setOptionId(Long optionId) {
this.optionId = optionId; public void setOptionId(Long optionId) {
} this.optionId = optionId;
}
public String getOptionName() {
return optionName; public String getOptionName() {
} return optionName;
}
public void setOptionName(String optionName) {
this.optionName = optionName == null ? null : optionName.trim(); public void setOptionName(String optionName) {
} this.optionName = optionName == null ? null : optionName.trim();
}
public Integer getScore() {
return score; public BigDecimal getScore() {
} return score;
}
public void setScore(Integer score) {
this.score = score; public void setScore(BigDecimal score) {
} this.score = score;
}
public Byte getType() {
return type; public Byte getType() {
} return type;
}
public void setType(Byte type) {
this.type = type; public void setType(Byte type) {
} this.type = type;
}
public String getAnswer() {
return answer; public String getAnswer() {
} return answer;
}
public void setAnswer(String answer) {
this.answer = answer == null ? null : answer.trim(); public void setAnswer(String answer) {
} this.answer = answer == null ? null : answer.trim();
}
public String getRemark() {
return remark; public String getRemark() {
} return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim(); public void setRemark(String remark) {
} this.remark = remark == null ? null : remark.trim();
}
public Date getCreateTime() {
return createTime; public Date getCreateTime() {
} return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime; public void setCreateTime(Date createTime) {
} this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime; public Date getUpdateTime() {
} return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; public void setUpdateTime(Date updateTime) {
} this.updateTime = updateTime;
}
public Byte getIsDel() {
return isDel; public Byte getIsDel() {
} return isDel;
}
public void setIsDel(Byte isDel) {
this.isDel = isDel; public void setIsDel(Byte isDel) {
} this.isDel = isDel;
}
public Long getAnswerTime() {
return answerTime; public Long getAnswerTime() {
} return answerTime;
}
public void setAnswerTime(Long answerTime) {
this.answerTime = answerTime; public void setAnswerTime(Long answerTime) {
} this.answerTime = answerTime;
}
@Override
public String toString() { @Override
StringBuilder sb = new StringBuilder(); public String toString() {
sb.append(getClass().getSimpleName()); StringBuilder sb = new StringBuilder();
sb.append(" ["); sb.append(getClass().getSimpleName());
sb.append("Hash = ").append(hashCode()); sb.append(" [");
sb.append(", id=").append(id); sb.append("Hash = ").append(hashCode());
sb.append(", patientReportId=").append(patientReportId); sb.append(", id=").append(id);
sb.append(", patientId=").append(patientId); sb.append(", patientReportId=").append(patientReportId);
sb.append(", questionParentCode=").append(questionParentCode); sb.append(", patientId=").append(patientId);
sb.append(", questionId=").append(questionId); sb.append(", questionParentCode=").append(questionParentCode);
sb.append(", optionId=").append(optionId); sb.append(", questionId=").append(questionId);
sb.append(", optionName=").append(optionName); sb.append(", optionId=").append(optionId);
sb.append(", score=").append(score); sb.append(", optionName=").append(optionName);
sb.append(", type=").append(type); sb.append(", score=").append(score);
sb.append(", answer=").append(answer); sb.append(", type=").append(type);
sb.append(", remark=").append(remark); sb.append(", answer=").append(answer);
sb.append(", createTime=").append(createTime); sb.append(", remark=").append(remark);
sb.append(", updateTime=").append(updateTime); sb.append(", createTime=").append(createTime);
sb.append(", isDel=").append(isDel); sb.append(", updateTime=").append(updateTime);
sb.append(", answerTime=").append(answerTime); sb.append(", isDel=").append(isDel);
sb.append("]"); sb.append(", answerTime=").append(answerTime);
return sb.toString(); sb.append("]");
} return sb.toString();
}
} }

2281
ht/src/main/java/com/ccsens/ht/bean/po/HtPatientScoreExample.java

File diff suppressed because it is too large

277
ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOption.java

@ -1,139 +1,140 @@
package com.ccsens.ht.bean.po; package com.ccsens.ht.bean.po;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.math.BigDecimal;
import java.util.Date;
public class HtQuestionOption implements Serializable {
private Long id; public class HtQuestionOption implements Serializable {
private Long id;
private Long questionId;
private Long questionId;
private Integer sort;
private Integer sort;
private String type;
private String type;
private String name;
private String name;
private Integer score;
private BigDecimal score;
private String display;
private String display;
private String remark;
private String remark;
private Date createTime;
private Date createTime;
private Date updateTime;
private Date updateTime;
private Byte isDel;
private Byte isDel;
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
public Long getId() {
return id; public Long getId() {
} return id;
}
public void setId(Long id) {
this.id = id; public void setId(Long id) {
} this.id = id;
}
public Long getQuestionId() {
return questionId; public Long getQuestionId() {
} return questionId;
}
public void setQuestionId(Long questionId) {
this.questionId = questionId; public void setQuestionId(Long questionId) {
} this.questionId = questionId;
}
public Integer getSort() {
return sort; public Integer getSort() {
} return sort;
}
public void setSort(Integer sort) {
this.sort = sort; public void setSort(Integer sort) {
} this.sort = sort;
}
public String getType() {
return type; public String getType() {
} return type;
}
public void setType(String type) {
this.type = type == null ? null : type.trim(); public void setType(String type) {
} this.type = type == null ? null : type.trim();
}
public String getName() {
return name; public String getName() {
} return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim(); public void setName(String name) {
} this.name = name == null ? null : name.trim();
}
public Integer getScore() {
return score; public BigDecimal getScore() {
} return score;
}
public void setScore(Integer score) {
this.score = score; public void setScore(BigDecimal score) {
} this.score = score;
}
public String getDisplay() {
return display; public String getDisplay() {
} return display;
}
public void setDisplay(String display) {
this.display = display == null ? null : display.trim(); public void setDisplay(String display) {
} this.display = display == null ? null : display.trim();
}
public String getRemark() {
return remark; public String getRemark() {
} return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim(); public void setRemark(String remark) {
} this.remark = remark == null ? null : remark.trim();
}
public Date getCreateTime() {
return createTime; public Date getCreateTime() {
} return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime; public void setCreateTime(Date createTime) {
} this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime; public Date getUpdateTime() {
} return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; public void setUpdateTime(Date updateTime) {
} this.updateTime = updateTime;
}
public Byte getIsDel() {
return isDel; public Byte getIsDel() {
} return isDel;
}
public void setIsDel(Byte isDel) {
this.isDel = isDel; public void setIsDel(Byte isDel) {
} this.isDel = isDel;
}
@Override
public String toString() { @Override
StringBuilder sb = new StringBuilder(); public String toString() {
sb.append(getClass().getSimpleName()); StringBuilder sb = new StringBuilder();
sb.append(" ["); sb.append(getClass().getSimpleName());
sb.append("Hash = ").append(hashCode()); sb.append(" [");
sb.append(", id=").append(id); sb.append("Hash = ").append(hashCode());
sb.append(", questionId=").append(questionId); sb.append(", id=").append(id);
sb.append(", sort=").append(sort); sb.append(", questionId=").append(questionId);
sb.append(", type=").append(type); sb.append(", sort=").append(sort);
sb.append(", name=").append(name); sb.append(", type=").append(type);
sb.append(", score=").append(score); sb.append(", name=").append(name);
sb.append(", display=").append(display); sb.append(", score=").append(score);
sb.append(", remark=").append(remark); sb.append(", display=").append(display);
sb.append(", createTime=").append(createTime); sb.append(", remark=").append(remark);
sb.append(", updateTime=").append(updateTime); sb.append(", createTime=").append(createTime);
sb.append(", isDel=").append(isDel); sb.append(", updateTime=").append(updateTime);
sb.append("]"); sb.append(", isDel=").append(isDel);
return sb.toString(); sb.append("]");
} return sb.toString();
}
} }

1801
ht/src/main/java/com/ccsens/ht/bean/po/HtQuestionOptionExample.java

File diff suppressed because it is too large

3
ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java

@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
/** /**
@ -210,7 +211,7 @@ public class PatientReportVo {
@ApiModelProperty("总分(<0:不需要显示总分,=0:不计分, >0:总分)") @ApiModelProperty("总分(<0:不需要显示总分,=0:不计分, >0:总分)")
private Integer totalScore; private Integer totalScore;
@ApiModelProperty("病人得分") @ApiModelProperty("病人得分")
private Integer score; private BigDecimal score;
@ApiModelProperty("备注") @ApiModelProperty("备注")
private String remark; private String remark;
@ApiModelProperty("类型(1:报告单 2:测评 3:测评子类 4:二级子类)") @ApiModelProperty("类型(1:报告单 2:测评 3:测评子类 4:二级子类)")

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

@ -307,6 +307,8 @@ public class QuestionVo {
@Data @Data
@ApiModel("轨迹信息及颜色") @ApiModel("轨迹信息及颜色")
public static class Point{ public static class Point{
@ApiModelProperty("id")
private Long pointId;
@ApiModelProperty("颜色") @ApiModelProperty("颜色")
private Integer color; private Integer color;
@ApiModelProperty("轨迹坐标值") @ApiModelProperty("轨迹坐标值")
@ -339,9 +341,9 @@ public class QuestionVo {
private Long totalDuration; private Long totalDuration;
@ApiModelProperty("总笔画数") @ApiModelProperty("总笔画数")
private int lineNums; private int lineNums;
@ApiModelProperty("最长笔画") @ApiModelProperty("最长笔画长度")
private double longLine; private double longLine;
@ApiModelProperty("最短笔画") @ApiModelProperty("最短笔画长度")
private double shortLine; private double shortLine;
@ApiModelProperty("笔画中间值") @ApiModelProperty("笔画中间值")
private double centre; private double centre;
@ -351,6 +353,19 @@ public class QuestionVo {
private String beyondProportion; private String beyondProportion;
@ApiModelProperty("每条轨迹的参数") @ApiModelProperty("每条轨迹的参数")
private List<LineParameter> lineParameterList; private List<LineParameter> lineParameterList;
/*20210112新加统计数据*/
@ApiModelProperty("思考总时间(所有笔画间隔时间)")
private Long reflectOnTime;
@ApiModelProperty("中心 暂定为坐标:X,Y")
private String centreCoordinate;
@ApiModelProperty("面积 暂定均为最小外接长方形 单位为px")
private double acreage;
@ApiModelProperty("平均笔画长度")
private double aveLength;
@ApiModelProperty("长笔画数量")
private int longNums;
@ApiModelProperty("长笔画数量")
private int shortNums;
} }
@Data @Data

58
ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientAcpMapper.java

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

58
ht/src/main/java/com/ccsens/ht/persist/mapper/HtPatientScoreMapper.java

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

58
ht/src/main/java/com/ccsens/ht/persist/mapper/HtQuestionOptionMapper.java

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

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

@ -362,7 +362,7 @@ public class ImportService implements IImportService {
option.setQuestionId(questionId); option.setQuestionId(questionId);
option.setSort(sort); option.setSort(sort);
option.setScore(option.getScore() == null ? Constant.Ht.NUMBER_DEFAULT : option.getScore()); option.setScore(option.getScore() == null ? Constant.Ht.NUMBER_DEFAULT_BIGDECIMAL : option.getScore());
log.info("导入选项:{}", option); log.info("导入选项:{}", option);
return option; return option;

16
ht/src/main/java/com/ccsens/ht/service/PatientReportService.java

@ -258,7 +258,7 @@ public class PatientReportService implements IPatientReportService {
carer.setCode("carer"); carer.setCode("carer");
carer.setName("照顾者"); carer.setName("照顾者");
carer.setTotalScore(-1); carer.setTotalScore(-1);
carer.setScore(npiScore == null || npiScore.get("carer") == null ? null : ((BigDecimal) npiScore.get("carer")).intValue()); carer.setScore(npiScore == null || npiScore.get("carer") == null ? null : ((BigDecimal) npiScore.get("carer")));
carer.setType((byte)3); carer.setType((byte)3);
carer.setParentCode("NPI"); carer.setParentCode("NPI");
score.addSub(carer); score.addSub(carer);
@ -266,7 +266,7 @@ public class PatientReportService implements IPatientReportService {
patient.setCode("result"); patient.setCode("result");
patient.setName("患者"); patient.setName("患者");
patient.setTotalScore(-1); patient.setTotalScore(-1);
patient.setScore(npiScore == null || npiScore.get("result") == null ? null : ((BigDecimal) npiScore.get("result")).intValue()); patient.setScore(npiScore == null || npiScore.get("result") == null ? null : ((BigDecimal) npiScore.get("result")));
patient.setType((byte)3); patient.setType((byte)3);
patient.setParentCode("NPI"); patient.setParentCode("NPI");
score.addSub(patient); score.addSub(patient);
@ -318,23 +318,25 @@ public class PatientReportService implements IPatientReportService {
*@Author: wuHuiJuan *@Author: wuHuiJuan
*@date: 2019/11/19 15:42 *@date: 2019/11/19 15:42
*/ */
private Integer sumScore(PatientReportVo.ReportScore score){ private BigDecimal sumScore(PatientReportVo.ReportScore score){
AtomicReference<Integer> sum = new AtomicReference<>(score.getScore() == null ? 0 : score.getScore()); AtomicReference<BigDecimal> sum = new AtomicReference<>(score.getScore() == null ? BigDecimal.valueOf(0) : score.getScore());
AtomicBoolean hasAdd = new AtomicBoolean(false); AtomicBoolean hasAdd = new AtomicBoolean(false);
if (!CollectionUtils.isEmpty(score.getSubReport())) { if (!CollectionUtils.isEmpty(score.getSubReport())) {
score.getSubReport().forEach(sub -> { score.getSubReport().forEach(sub -> {
sum.updateAndGet(v -> { sum.updateAndGet(v -> {
Integer sumScore = sumScore(sub); BigDecimal sumScore = sumScore(sub);
if (sumScore== null) { if (sumScore== null) {
return v; return v;
} }
hasAdd.set(true); hasAdd.set(true);
return v += sumScore; // return v += sumScore;
v = v.add(sumScore);
return v;
}); });
}); });
} else { } else {
if (StringUtil.isNotEmpty(score.getRemark()) && score.getRemark().matches(Constant.Ht.Report.IGNORE_SCORE)) { if (StringUtil.isNotEmpty(score.getRemark()) && score.getRemark().matches(Constant.Ht.Report.IGNORE_SCORE)) {
return score.getScore() == null ? null : 0; return score.getScore() == null ? null : BigDecimal.valueOf(0);
} }
if (Constant.Ht.Report.MOCA_SJZ.equals(score.getCode())) { if (Constant.Ht.Report.MOCA_SJZ.equals(score.getCode())) {
return null; return null;

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

@ -29,6 +29,7 @@ import javax.script.ScriptEngineManager;
import javax.script.ScriptException; import javax.script.ScriptException;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
@ -273,7 +274,7 @@ public class QuestionService implements IQuestionService {
//保存现在的答案 //保存现在的答案
if (CollectionUtil.isEmpty(scores)) { if (CollectionUtil.isEmpty(scores)) {
// 选项为空,默认0分 // 选项为空,默认0分
HtPatientScore zeroScore = getHtPatientScore(score, parentCode, report, 0); HtPatientScore zeroScore = getHtPatientScore(score, parentCode, report, BigDecimal.valueOf(0));
scores.add(zeroScore); scores.add(zeroScore);
} }
htPatientScoreDao.insertBatch(scores); htPatientScoreDao.insertBatch(scores);
@ -285,7 +286,7 @@ public class QuestionService implements IQuestionService {
return CodeEnum.SUCCESS; return CodeEnum.SUCCESS;
} }
private HtPatientScore getHtPatientScore(QuestionDto.Score score, String parentCode, HtPatientReport report, int i) { private HtPatientScore getHtPatientScore(QuestionDto.Score score, String parentCode, HtPatientReport report, BigDecimal i) {
HtPatientScore zeroScore = new HtPatientScore(); HtPatientScore zeroScore = new HtPatientScore();
zeroScore.setId(snowflake.nextId()); zeroScore.setId(snowflake.nextId());
zeroScore.setPatientReportId(score.getPatientReportId()); zeroScore.setPatientReportId(score.getPatientReportId());
@ -363,7 +364,7 @@ public class QuestionService implements IQuestionService {
patientScore.set(next.getIntValue(Constant.Ht.Rule.SMALL_SCORE)); patientScore.set(next.getIntValue(Constant.Ht.Rule.SMALL_SCORE));
} }
} }
HtPatientScore singleScore = getHtPatientScore(score, parentCode, report, patientScore.get()); HtPatientScore singleScore = getHtPatientScore(score, parentCode, report, BigDecimal.valueOf(patientScore.get()));
scores.add(singleScore); scores.add(singleScore);
} }
@ -378,7 +379,7 @@ public class QuestionService implements IQuestionService {
return 0; return 0;
} }
// 分数>0, 算1道题 // 分数>0, 算1道题
return scores.stream().mapToInt(score -> score.getScore() > 0 ? 1 : 0).sum(); return scores.stream().mapToInt(score -> score.getScore().compareTo(BigDecimal.valueOf(0)) > 0 ? 1 : 0).sum();
} }
private void optionUniq(QuestionDto.Score score) { private void optionUniq(QuestionDto.Score score) {
@ -469,7 +470,7 @@ public class QuestionService implements IQuestionService {
ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine js = manager.getEngineByName("js"); ScriptEngine js = manager.getEngineByName("js");
try { try {
Integer result = (Integer)js.eval(substring); BigDecimal result = BigDecimal.valueOf((Integer)js.eval(substring));
patientScore.setScore(result); patientScore.setScore(result);
} catch (ScriptException e) { } catch (ScriptException e) {
log.error("计算出现异常",e); log.error("计算出现异常",e);
@ -637,7 +638,7 @@ public class QuestionService implements IQuestionService {
//共几分钟 //共几分钟
double d = (double) endTime / 1000 / 60; double d = (double) endTime / 1000 / 60;
//每分钟几笔 //每分钟几笔
parameter.setAveTimes((int) Math.floor(canvasPoints.size() / d)); parameter.setAveTimes((int) Math.round(canvasPoints.size() / d));
//每笔数据 //每笔数据
List<QuestionVo.LineParameter> lineParameterList = new ArrayList<>(); List<QuestionVo.LineParameter> lineParameterList = new ArrayList<>();
long intervalDuration = 0; long intervalDuration = 0;
@ -645,6 +646,18 @@ public class QuestionService implements IQuestionService {
double longLine = 0; double longLine = 0;
//最短的笔画 //最短的笔画
double shortLine = 0; double shortLine = 0;
//思考总时间 每笔间隔相加
long reflectOnTime = 0;
//X最小值
int minX = 0;
//X最大值
int maxX = 0;
//Y最小值
int minY = 0;
//Y最大值
int maxY = 0;
//总长度
double totalLength = 0;
for(QuestionVo.Point canvas : canvasPoints){ for(QuestionVo.Point canvas : canvasPoints){
//时间 //时间
QuestionVo.LineParameter lineParameter = new QuestionVo.LineParameter(); QuestionVo.LineParameter lineParameter = new QuestionVo.LineParameter();
@ -652,6 +665,14 @@ public class QuestionService implements IQuestionService {
if(a.length <= 0){ if(a.length <= 0){
continue; continue;
} }
//获取最边缘的四个点
for (String value : a) {
String[] split1 = value.split(",");
minX = Math.min(Integer.parseInt(split1[0]), minX);
maxX = Math.max(Integer.parseInt(split1[0]), maxX);
minY = Math.min(Integer.parseInt(split1[1]), minY);
maxY = Math.max(Integer.parseInt(split1[1]), maxY);
}
String[] s = a[0].split(","); String[] s = a[0].split(",");
if(s.length <= 0){ if(s.length <= 0){
continue; continue;
@ -664,6 +685,8 @@ public class QuestionService implements IQuestionService {
lineParameter.setDuration(duration); lineParameter.setDuration(duration);
//长度 //长度
double length = getLengthByCanvas(a); double length = getLengthByCanvas(a);
//计算总长度
totalLength += length;
lineParameter.setLength(length); lineParameter.setLength(length);
//计算最长最短 //计算最长最短
if(longLine == 0){ if(longLine == 0){
@ -679,27 +702,69 @@ public class QuestionService implements IQuestionService {
//速度 //速度
double speed = 0; double speed = 0;
if(length != 0 && duration != 0){ if(length != 0 && duration != 0){
speed = BigDecimal.valueOf(length / duration).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); speed = BigDecimal.valueOf(length / duration).setScale(2, RoundingMode.HALF_UP).doubleValue();
} }
lineParameter.setSpeed(speed); lineParameter.setSpeed(speed);
//和上一笔的间隔 //和上一笔的间隔 & 思考总时长
if(Long.parseLong(e[e.length - 1]) == 0){ if(Long.parseLong(e[e.length - 1]) == 0){
lineParameter.setIntervalDuration(htPatientCanvas.getBeginTime() - htPatientCanvas.getOpenCanvasTime()); lineParameter.setIntervalDuration(htPatientCanvas.getBeginTime() - htPatientCanvas.getOpenCanvasTime());
reflectOnTime += htPatientCanvas.getBeginTime() - htPatientCanvas.getOpenCanvasTime();
}else { }else {
intervalDuration = Long.parseLong(e[e.length - 1]) - intervalDuration; intervalDuration = Long.parseLong(e[e.length - 1]) - intervalDuration;
lineParameter.setIntervalDuration(intervalDuration); lineParameter.setIntervalDuration(intervalDuration);
reflectOnTime += intervalDuration;
} }
lineParameterList.add(lineParameter); lineParameterList.add(lineParameter);
} }
parameter.setLineParameterList(lineParameterList); parameter.setLineParameterList(lineParameterList);
//最长笔画 //最长笔画
parameter.setLongLine(longLine); parameter.setLongLine(longLine);
//最短笔画 //最短笔画
parameter.setShortLine(shortLine); parameter.setShortLine(shortLine);
//思考总时长
parameter.setReflectOnTime(reflectOnTime);
//计算中心
int x = minX + ((maxX - minX) / 2);
int y = minY + ((maxY - minY) / 2);
String centreCoordinate = x + "," + y;
parameter.setCentreCoordinate(centreCoordinate);
//面积
double acreage = (maxX - minX) * (maxY - minY);
parameter.setAcreage(acreage);
//平均长度
double aveLength = BigDecimal.valueOf(totalLength / canvasPoints.size()).setScale(2, RoundingMode.HALF_UP).doubleValue();
parameter.setAveLength(aveLength);
//短笔画数量
double coefficient = 1.00;
int shortNums = getShortNums(aveLength,coefficient,lineParameterList);
parameter.setShortNums(shortNums);
//长笔画数量,等于总笔画减去短笔画的数量
parameter.setLongNums(lineParameterList.size() - shortNums);
//TODO 笔画中间值 //TODO 笔画中间值
return parameter; return parameter;
} }
/**
* 获取短笔画的数量
* @param aveLength 平均长度
* @param coefficient 自定义系数
* @param lineParameterList 所有笔画的参数
* @return 返回短笔画的数量
*/
private int getShortNums(double aveLength, double coefficient, List<QuestionVo.LineParameter> lineParameterList) {
int shortNums = 0;
double a = aveLength * coefficient;
if(CollectionUtil.isNotEmpty(lineParameterList)){
for(QuestionVo.LineParameter lineParameter : lineParameterList){
if(lineParameter.getLength() <= a){
shortNums++;
}
}
}
return shortNums;
}
private double getLengthByCanvas(String[] canvas) { private double getLengthByCanvas(String[] canvas) {
double l = 0; double l = 0;
for (int i = 1; i < canvas.length; i++){ for (int i = 1; i < canvas.length; i++){
@ -710,6 +775,6 @@ public class QuestionService implements IQuestionService {
double sqrt = Math.sqrt(pow + pow1); double sqrt = Math.sqrt(pow + pow1);
l += sqrt; l += sqrt;
} }
return BigDecimal.valueOf(l).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); return BigDecimal.valueOf(l).setScale(2, RoundingMode.HALF_UP).doubleValue();
} }
} }

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

@ -2,6 +2,7 @@ package com.ccsens.ht.uitl;
import com.ccsens.util.PropUtil; import com.ccsens.util.PropUtil;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -49,6 +50,8 @@ public class Constant {
public static class Ht { public static class Ht {
/**数字默认值*/ /**数字默认值*/
public final static byte NUMBER_DEFAULT = 0; public final static byte NUMBER_DEFAULT = 0;
/**数字默认值*/
public final static BigDecimal NUMBER_DEFAULT_BIGDECIMAL = BigDecimal.valueOf(0);
/**字符串默认值*/ /**字符串默认值*/
public final static String STRING_DEFAULT = ""; public final static String STRING_DEFAULT = "";
public final static String DOCTOR_PARAM = "doctor"; public final static String DOCTOR_PARAM = "doctor";
@ -117,6 +120,7 @@ public class Constant {
QUESTION_TYPE.add("MMSE"); QUESTION_TYPE.add("MMSE");
QUESTION_TYPE.add("MoCA"); QUESTION_TYPE.add("MoCA");
QUESTION_TYPE.add("Rey"); QUESTION_TYPE.add("Rey");
QUESTION_TYPE.add("XFXPD");
} }
} }
@ -130,6 +134,7 @@ public class Constant {
public final static String MMSE = "MMSE"; public final static String MMSE = "MMSE";
public final static String NPI = "NPI"; public final static String NPI = "NPI";
public final static String REY = "Rey"; public final static String REY = "Rey";
public final static String XFXPD = "XFXPD";
/**报告单未完成*/ /**报告单未完成*/
public final static Byte COMPLETE_NO = 0; public final static Byte COMPLETE_NO = 0;
/**报告单已完成*/ /**报告单已完成*/

2
ht/src/main/resources/application-dev.yml

@ -8,7 +8,7 @@ spring:
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
rabbitmq: rabbitmq:
host: api.ccsens.com host: 127.0.0.1
password: 111111 password: 111111
port: 5672 port: 5672
username: admin username: admin

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

@ -5,6 +5,7 @@
<select id="getCanvasPoints" resultType="com.ccsens.ht.bean.vo.QuestionVo$Point"> <select id="getCanvasPoints" resultType="com.ccsens.ht.bean.vo.QuestionVo$Point">
SELECT SELECT
id as pointId,
points as `value` points as `value`
FROM FROM
t_ht_patient_canvas_line cl t_ht_patient_canvas_line cl

764
ht/src/main/resources/mapper_raw/HtPatientAcpMapper.xml

@ -1,368 +1,398 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.HtPatientAcpMapper"> <mapper namespace="com.ccsens.ht.persist.mapper.HtPatientAcpMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtPatientAcp"> <resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtPatientAcp">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="patient_id" jdbcType="BIGINT" property="patientId" /> <result column="patient_id" jdbcType="BIGINT" property="patientId" />
<result column="ct" jdbcType="VARCHAR" property="ct" /> <result column="ct" jdbcType="VARCHAR" property="ct" />
<result column="mri" jdbcType="VARCHAR" property="mri" /> <result column="mri" jdbcType="VARCHAR" property="mri" />
<result column="hcy" jdbcType="VARCHAR" property="hcy" /> <result column="hcy" jdbcType="VARCHAR" property="hcy" />
<result column="vb12" jdbcType="VARCHAR" property="vb12" /> <result column="vb12" jdbcType="VARCHAR" property="vb12" />
<result column="folic_acid" jdbcType="VARCHAR" property="folicAcid" /> <result column="folic_acid" jdbcType="VARCHAR" property="folicAcid" />
<result column="tt3" jdbcType="VARCHAR" property="tt3" /> <result column="tt3" jdbcType="VARCHAR" property="tt3" />
<result column="tt4" jdbcType="VARCHAR" property="tt4" /> <result column="tt4" jdbcType="VARCHAR" property="tt4" />
<result column="tsh" jdbcType="VARCHAR" property="tsh" /> <result column="tsh" jdbcType="VARCHAR" property="tsh" />
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" /> <result column="is_del" jdbcType="TINYINT" property="isDel" />
<result column="recorder" jdbcType="BIGINT" property="recorder" /> <result column="recorder" jdbcType="BIGINT" property="recorder" />
</resultMap> <result column="ta1" jdbcType="VARCHAR" property="ta1" />
<sql id="Example_Where_Clause"> <result column="tpt" jdbcType="VARCHAR" property="tpt" />
<where> </resultMap>
<foreach collection="oredCriteria" item="criteria" separator="or"> <sql id="Example_Where_Clause">
<if test="criteria.valid"> <where>
<trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="oredCriteria" item="criteria" separator="or">
<foreach collection="criteria.criteria" item="criterion"> <if test="criteria.valid">
<choose> <trim prefix="(" prefixOverrides="and" suffix=")">
<when test="criterion.noValue"> <foreach collection="criteria.criteria" item="criterion">
and ${criterion.condition} <choose>
</when> <when test="criterion.noValue">
<when test="criterion.singleValue"> and ${criterion.condition}
and ${criterion.condition} #{criterion.value} </when>
</when> <when test="criterion.singleValue">
<when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value}
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when>
</when> <when test="criterion.betweenValue">
<when test="criterion.listValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
and ${criterion.condition} </when>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <when test="criterion.listValue">
#{listItem} and ${criterion.condition}
</foreach> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
</when> #{listItem}
</choose> </foreach>
</foreach> </when>
</trim> </choose>
</if> </foreach>
</foreach> </trim>
</where> </if>
</sql> </foreach>
<sql id="Update_By_Example_Where_Clause"> </where>
<where> </sql>
<foreach collection="example.oredCriteria" item="criteria" separator="or"> <sql id="Update_By_Example_Where_Clause">
<if test="criteria.valid"> <where>
<trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="example.oredCriteria" item="criteria" separator="or">
<foreach collection="criteria.criteria" item="criterion"> <if test="criteria.valid">
<choose> <trim prefix="(" prefixOverrides="and" suffix=")">
<when test="criterion.noValue"> <foreach collection="criteria.criteria" item="criterion">
and ${criterion.condition} <choose>
</when> <when test="criterion.noValue">
<when test="criterion.singleValue"> and ${criterion.condition}
and ${criterion.condition} #{criterion.value} </when>
</when> <when test="criterion.singleValue">
<when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value}
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when>
</when> <when test="criterion.betweenValue">
<when test="criterion.listValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
and ${criterion.condition} </when>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <when test="criterion.listValue">
#{listItem} and ${criterion.condition}
</foreach> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
</when> #{listItem}
</choose> </foreach>
</foreach> </when>
</trim> </choose>
</if> </foreach>
</foreach> </trim>
</where> </if>
</sql> </foreach>
<sql id="Base_Column_List"> </where>
id, patient_id, ct, mri, hcy, vb12, folic_acid, tt3, tt4, tsh, remark, create_time, </sql>
update_time, is_del, recorder <sql id="Base_Column_List">
</sql> id, patient_id, ct, mri, hcy, vb12, folic_acid, tt3, tt4, tsh, remark, create_time,
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientAcpExample" resultMap="BaseResultMap"> update_time, is_del, recorder, ta1, tpt
select </sql>
<if test="distinct"> <select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientAcpExample" resultMap="BaseResultMap">
distinct select
</if> <if test="distinct">
<include refid="Base_Column_List" /> distinct
from t_ht_patient_acp </if>
<if test="_parameter != null"> <include refid="Base_Column_List" />
<include refid="Example_Where_Clause" /> from t_ht_patient_acp
</if> <if test="_parameter != null">
<if test="orderByClause != null"> <include refid="Example_Where_Clause" />
order by ${orderByClause} </if>
</if> <if test="orderByClause != null">
</select> order by ${orderByClause}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </if>
select </select>
<include refid="Base_Column_List" /> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
from t_ht_patient_acp select
where id = #{id,jdbcType=BIGINT} <include refid="Base_Column_List" />
</select> from t_ht_patient_acp
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> where id = #{id,jdbcType=BIGINT}
delete from t_ht_patient_acp </select>
where id = #{id,jdbcType=BIGINT} <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
</delete> delete from t_ht_patient_acp
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtPatientAcpExample"> where id = #{id,jdbcType=BIGINT}
delete from t_ht_patient_acp </delete>
<if test="_parameter != null"> <delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtPatientAcpExample">
<include refid="Example_Where_Clause" /> delete from t_ht_patient_acp
</if> <if test="_parameter != null">
</delete> <include refid="Example_Where_Clause" />
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtPatientAcp"> </if>
insert into t_ht_patient_acp (id, patient_id, ct, </delete>
mri, hcy, vb12, folic_acid, <insert id="insert" parameterType="com.ccsens.ht.bean.po.HtPatientAcp">
tt3, tt4, tsh, remark, insert into t_ht_patient_acp (id, patient_id, ct,
create_time, update_time, is_del, mri, hcy, vb12, folic_acid,
recorder) tt3, tt4, tsh, remark,
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{ct,jdbcType=VARCHAR}, create_time, update_time, is_del,
#{mri,jdbcType=VARCHAR}, #{hcy,jdbcType=VARCHAR}, #{vb12,jdbcType=VARCHAR}, #{folicAcid,jdbcType=VARCHAR}, recorder, ta1, tpt)
#{tt3,jdbcType=VARCHAR}, #{tt4,jdbcType=VARCHAR}, #{tsh,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{ct,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT}, #{mri,jdbcType=VARCHAR}, #{hcy,jdbcType=VARCHAR}, #{vb12,jdbcType=VARCHAR}, #{folicAcid,jdbcType=VARCHAR},
#{recorder,jdbcType=BIGINT}) #{tt3,jdbcType=VARCHAR}, #{tt4,jdbcType=VARCHAR}, #{tsh,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
</insert> #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT},
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientAcp"> #{recorder,jdbcType=BIGINT}, #{ta1,jdbcType=VARCHAR}, #{tpt,jdbcType=VARCHAR})
insert into t_ht_patient_acp </insert>
<trim prefix="(" suffix=")" suffixOverrides=","> <insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientAcp">
<if test="id != null"> insert into t_ht_patient_acp
id, <trim prefix="(" suffix=")" suffixOverrides=",">
</if> <if test="id != null">
<if test="patientId != null"> id,
patient_id, </if>
</if> <if test="patientId != null">
<if test="ct != null"> patient_id,
ct, </if>
</if> <if test="ct != null">
<if test="mri != null"> ct,
mri, </if>
</if> <if test="mri != null">
<if test="hcy != null"> mri,
hcy, </if>
</if> <if test="hcy != null">
<if test="vb12 != null"> hcy,
vb12, </if>
</if> <if test="vb12 != null">
<if test="folicAcid != null"> vb12,
folic_acid, </if>
</if> <if test="folicAcid != null">
<if test="tt3 != null"> folic_acid,
tt3, </if>
</if> <if test="tt3 != null">
<if test="tt4 != null"> tt3,
tt4, </if>
</if> <if test="tt4 != null">
<if test="tsh != null"> tt4,
tsh, </if>
</if> <if test="tsh != null">
<if test="remark != null"> tsh,
remark, </if>
</if> <if test="remark != null">
<if test="createTime != null"> remark,
create_time, </if>
</if> <if test="createTime != null">
<if test="updateTime != null"> create_time,
update_time, </if>
</if> <if test="updateTime != null">
<if test="isDel != null"> update_time,
is_del, </if>
</if> <if test="isDel != null">
<if test="recorder != null"> is_del,
recorder, </if>
</if> <if test="recorder != null">
</trim> recorder,
<trim prefix="values (" suffix=")" suffixOverrides=","> </if>
<if test="id != null"> <if test="ta1 != null">
#{id,jdbcType=BIGINT}, ta1,
</if> </if>
<if test="patientId != null"> <if test="tpt != null">
#{patientId,jdbcType=BIGINT}, tpt,
</if> </if>
<if test="ct != null"> </trim>
#{ct,jdbcType=VARCHAR}, <trim prefix="values (" suffix=")" suffixOverrides=",">
</if> <if test="id != null">
<if test="mri != null"> #{id,jdbcType=BIGINT},
#{mri,jdbcType=VARCHAR}, </if>
</if> <if test="patientId != null">
<if test="hcy != null"> #{patientId,jdbcType=BIGINT},
#{hcy,jdbcType=VARCHAR}, </if>
</if> <if test="ct != null">
<if test="vb12 != null"> #{ct,jdbcType=VARCHAR},
#{vb12,jdbcType=VARCHAR}, </if>
</if> <if test="mri != null">
<if test="folicAcid != null"> #{mri,jdbcType=VARCHAR},
#{folicAcid,jdbcType=VARCHAR}, </if>
</if> <if test="hcy != null">
<if test="tt3 != null"> #{hcy,jdbcType=VARCHAR},
#{tt3,jdbcType=VARCHAR}, </if>
</if> <if test="vb12 != null">
<if test="tt4 != null"> #{vb12,jdbcType=VARCHAR},
#{tt4,jdbcType=VARCHAR}, </if>
</if> <if test="folicAcid != null">
<if test="tsh != null"> #{folicAcid,jdbcType=VARCHAR},
#{tsh,jdbcType=VARCHAR}, </if>
</if> <if test="tt3 != null">
<if test="remark != null"> #{tt3,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, </if>
</if> <if test="tt4 != null">
<if test="createTime != null"> #{tt4,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, </if>
</if> <if test="tsh != null">
<if test="updateTime != null"> #{tsh,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, </if>
</if> <if test="remark != null">
<if test="isDel != null"> #{remark,jdbcType=VARCHAR},
#{isDel,jdbcType=TINYINT}, </if>
</if> <if test="createTime != null">
<if test="recorder != null"> #{createTime,jdbcType=TIMESTAMP},
#{recorder,jdbcType=BIGINT}, </if>
</if> <if test="updateTime != null">
</trim> #{updateTime,jdbcType=TIMESTAMP},
</insert> </if>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientAcpExample" resultType="java.lang.Long"> <if test="isDel != null">
select count(*) from t_ht_patient_acp #{isDel,jdbcType=TINYINT},
<if test="_parameter != null"> </if>
<include refid="Example_Where_Clause" /> <if test="recorder != null">
</if> #{recorder,jdbcType=BIGINT},
</select> </if>
<update id="updateByExampleSelective" parameterType="map"> <if test="ta1 != null">
update t_ht_patient_acp #{ta1,jdbcType=VARCHAR},
<set> </if>
<if test="record.id != null"> <if test="tpt != null">
id = #{record.id,jdbcType=BIGINT}, #{tpt,jdbcType=VARCHAR},
</if> </if>
<if test="record.patientId != null"> </trim>
patient_id = #{record.patientId,jdbcType=BIGINT}, </insert>
</if> <select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientAcpExample" resultType="java.lang.Long">
<if test="record.ct != null"> select count(*) from t_ht_patient_acp
ct = #{record.ct,jdbcType=VARCHAR}, <if test="_parameter != null">
</if> <include refid="Example_Where_Clause" />
<if test="record.mri != null"> </if>
mri = #{record.mri,jdbcType=VARCHAR}, </select>
</if> <update id="updateByExampleSelective" parameterType="map">
<if test="record.hcy != null"> update t_ht_patient_acp
hcy = #{record.hcy,jdbcType=VARCHAR}, <set>
</if> <if test="record.id != null">
<if test="record.vb12 != null"> id = #{record.id,jdbcType=BIGINT},
vb12 = #{record.vb12,jdbcType=VARCHAR}, </if>
</if> <if test="record.patientId != null">
<if test="record.folicAcid != null"> patient_id = #{record.patientId,jdbcType=BIGINT},
folic_acid = #{record.folicAcid,jdbcType=VARCHAR}, </if>
</if> <if test="record.ct != null">
<if test="record.tt3 != null"> ct = #{record.ct,jdbcType=VARCHAR},
tt3 = #{record.tt3,jdbcType=VARCHAR}, </if>
</if> <if test="record.mri != null">
<if test="record.tt4 != null"> mri = #{record.mri,jdbcType=VARCHAR},
tt4 = #{record.tt4,jdbcType=VARCHAR}, </if>
</if> <if test="record.hcy != null">
<if test="record.tsh != null"> hcy = #{record.hcy,jdbcType=VARCHAR},
tsh = #{record.tsh,jdbcType=VARCHAR}, </if>
</if> <if test="record.vb12 != null">
<if test="record.remark != null"> vb12 = #{record.vb12,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}, </if>
</if> <if test="record.folicAcid != null">
<if test="record.createTime != null"> folic_acid = #{record.folicAcid,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if>
</if> <if test="record.tt3 != null">
<if test="record.updateTime != null"> tt3 = #{record.tt3,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, </if>
</if> <if test="record.tt4 != null">
<if test="record.isDel != null"> tt4 = #{record.tt4,jdbcType=VARCHAR},
is_del = #{record.isDel,jdbcType=TINYINT}, </if>
</if> <if test="record.tsh != null">
<if test="record.recorder != null"> tsh = #{record.tsh,jdbcType=VARCHAR},
recorder = #{record.recorder,jdbcType=BIGINT}, </if>
</if> <if test="record.remark != null">
</set> remark = #{record.remark,jdbcType=VARCHAR},
<if test="_parameter != null"> </if>
<include refid="Update_By_Example_Where_Clause" /> <if test="record.createTime != null">
</if> create_time = #{record.createTime,jdbcType=TIMESTAMP},
</update> </if>
<update id="updateByExample" parameterType="map"> <if test="record.updateTime != null">
update t_ht_patient_acp update_time = #{record.updateTime,jdbcType=TIMESTAMP},
set id = #{record.id,jdbcType=BIGINT}, </if>
patient_id = #{record.patientId,jdbcType=BIGINT}, <if test="record.isDel != null">
ct = #{record.ct,jdbcType=VARCHAR}, is_del = #{record.isDel,jdbcType=TINYINT},
mri = #{record.mri,jdbcType=VARCHAR}, </if>
hcy = #{record.hcy,jdbcType=VARCHAR}, <if test="record.recorder != null">
vb12 = #{record.vb12,jdbcType=VARCHAR}, recorder = #{record.recorder,jdbcType=BIGINT},
folic_acid = #{record.folicAcid,jdbcType=VARCHAR}, </if>
tt3 = #{record.tt3,jdbcType=VARCHAR}, <if test="record.ta1 != null">
tt4 = #{record.tt4,jdbcType=VARCHAR}, ta1 = #{record.ta1,jdbcType=VARCHAR},
tsh = #{record.tsh,jdbcType=VARCHAR}, </if>
remark = #{record.remark,jdbcType=VARCHAR}, <if test="record.tpt != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP}, tpt = #{record.tpt,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, </if>
is_del = #{record.isDel,jdbcType=TINYINT}, </set>
recorder = #{record.recorder,jdbcType=BIGINT} <if test="_parameter != null">
<if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" />
<include refid="Update_By_Example_Where_Clause" /> </if>
</if> </update>
</update> <update id="updateByExample" parameterType="map">
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtPatientAcp"> update t_ht_patient_acp
update t_ht_patient_acp set id = #{record.id,jdbcType=BIGINT},
<set> patient_id = #{record.patientId,jdbcType=BIGINT},
<if test="patientId != null"> ct = #{record.ct,jdbcType=VARCHAR},
patient_id = #{patientId,jdbcType=BIGINT}, mri = #{record.mri,jdbcType=VARCHAR},
</if> hcy = #{record.hcy,jdbcType=VARCHAR},
<if test="ct != null"> vb12 = #{record.vb12,jdbcType=VARCHAR},
ct = #{ct,jdbcType=VARCHAR}, folic_acid = #{record.folicAcid,jdbcType=VARCHAR},
</if> tt3 = #{record.tt3,jdbcType=VARCHAR},
<if test="mri != null"> tt4 = #{record.tt4,jdbcType=VARCHAR},
mri = #{mri,jdbcType=VARCHAR}, tsh = #{record.tsh,jdbcType=VARCHAR},
</if> remark = #{record.remark,jdbcType=VARCHAR},
<if test="hcy != null"> create_time = #{record.createTime,jdbcType=TIMESTAMP},
hcy = #{hcy,jdbcType=VARCHAR}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if> is_del = #{record.isDel,jdbcType=TINYINT},
<if test="vb12 != null"> recorder = #{record.recorder,jdbcType=BIGINT},
vb12 = #{vb12,jdbcType=VARCHAR}, ta1 = #{record.ta1,jdbcType=VARCHAR},
</if> tpt = #{record.tpt,jdbcType=VARCHAR}
<if test="folicAcid != null"> <if test="_parameter != null">
folic_acid = #{folicAcid,jdbcType=VARCHAR}, <include refid="Update_By_Example_Where_Clause" />
</if> </if>
<if test="tt3 != null"> </update>
tt3 = #{tt3,jdbcType=VARCHAR}, <update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtPatientAcp">
</if> update t_ht_patient_acp
<if test="tt4 != null"> <set>
tt4 = #{tt4,jdbcType=VARCHAR}, <if test="patientId != null">
</if> patient_id = #{patientId,jdbcType=BIGINT},
<if test="tsh != null"> </if>
tsh = #{tsh,jdbcType=VARCHAR}, <if test="ct != null">
</if> ct = #{ct,jdbcType=VARCHAR},
<if test="remark != null"> </if>
remark = #{remark,jdbcType=VARCHAR}, <if test="mri != null">
</if> mri = #{mri,jdbcType=VARCHAR},
<if test="createTime != null"> </if>
create_time = #{createTime,jdbcType=TIMESTAMP}, <if test="hcy != null">
</if> hcy = #{hcy,jdbcType=VARCHAR},
<if test="updateTime != null"> </if>
update_time = #{updateTime,jdbcType=TIMESTAMP}, <if test="vb12 != null">
</if> vb12 = #{vb12,jdbcType=VARCHAR},
<if test="isDel != null"> </if>
is_del = #{isDel,jdbcType=TINYINT}, <if test="folicAcid != null">
</if> folic_acid = #{folicAcid,jdbcType=VARCHAR},
<if test="recorder != null"> </if>
recorder = #{recorder,jdbcType=BIGINT}, <if test="tt3 != null">
</if> tt3 = #{tt3,jdbcType=VARCHAR},
</set> </if>
where id = #{id,jdbcType=BIGINT} <if test="tt4 != null">
</update> tt4 = #{tt4,jdbcType=VARCHAR},
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtPatientAcp"> </if>
update t_ht_patient_acp <if test="tsh != null">
set patient_id = #{patientId,jdbcType=BIGINT}, tsh = #{tsh,jdbcType=VARCHAR},
ct = #{ct,jdbcType=VARCHAR}, </if>
mri = #{mri,jdbcType=VARCHAR}, <if test="remark != null">
hcy = #{hcy,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
vb12 = #{vb12,jdbcType=VARCHAR}, </if>
folic_acid = #{folicAcid,jdbcType=VARCHAR}, <if test="createTime != null">
tt3 = #{tt3,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP},
tt4 = #{tt4,jdbcType=VARCHAR}, </if>
tsh = #{tsh,jdbcType=VARCHAR}, <if test="updateTime != null">
remark = #{remark,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP}, </if>
update_time = #{updateTime,jdbcType=TIMESTAMP}, <if test="isDel != null">
is_del = #{isDel,jdbcType=TINYINT}, is_del = #{isDel,jdbcType=TINYINT},
recorder = #{recorder,jdbcType=BIGINT} </if>
where id = #{id,jdbcType=BIGINT} <if test="recorder != null">
</update> recorder = #{recorder,jdbcType=BIGINT},
</if>
<if test="ta1 != null">
ta1 = #{ta1,jdbcType=VARCHAR},
</if>
<if test="tpt != null">
tpt = #{tpt,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtPatientAcp">
update t_ht_patient_acp
set patient_id = #{patientId,jdbcType=BIGINT},
ct = #{ct,jdbcType=VARCHAR},
mri = #{mri,jdbcType=VARCHAR},
hcy = #{hcy,jdbcType=VARCHAR},
vb12 = #{vb12,jdbcType=VARCHAR},
folic_acid = #{folicAcid,jdbcType=VARCHAR},
tt3 = #{tt3,jdbcType=VARCHAR},
tt4 = #{tt4,jdbcType=VARCHAR},
tsh = #{tsh,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=TINYINT},
recorder = #{recorder,jdbcType=BIGINT},
ta1 = #{ta1,jdbcType=VARCHAR},
tpt = #{tpt,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper> </mapper>

738
ht/src/main/resources/mapper_raw/HtPatientScoreMapper.xml

@ -1,370 +1,370 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.HtPatientScoreMapper"> <mapper namespace="com.ccsens.ht.persist.mapper.HtPatientScoreMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtPatientScore"> <resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtPatientScore">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="patient_report_id" jdbcType="BIGINT" property="patientReportId" /> <result column="patient_report_id" jdbcType="BIGINT" property="patientReportId" />
<result column="patient_id" jdbcType="BIGINT" property="patientId" /> <result column="patient_id" jdbcType="BIGINT" property="patientId" />
<result column="question_parent_code" jdbcType="VARCHAR" property="questionParentCode" /> <result column="question_parent_code" jdbcType="VARCHAR" property="questionParentCode" />
<result column="question_id" jdbcType="BIGINT" property="questionId" /> <result column="question_id" jdbcType="BIGINT" property="questionId" />
<result column="option_id" jdbcType="BIGINT" property="optionId" /> <result column="option_id" jdbcType="BIGINT" property="optionId" />
<result column="option_name" jdbcType="VARCHAR" property="optionName" /> <result column="option_name" jdbcType="VARCHAR" property="optionName" />
<result column="score" jdbcType="INTEGER" property="score" /> <result column="score" jdbcType="DECIMAL" property="score" />
<result column="type" jdbcType="TINYINT" property="type" /> <result column="type" jdbcType="TINYINT" property="type" />
<result column="answer" jdbcType="VARCHAR" property="answer" /> <result column="answer" jdbcType="VARCHAR" property="answer" />
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" /> <result column="is_del" jdbcType="TINYINT" property="isDel" />
<result column="answer_time" jdbcType="BIGINT" property="answerTime" /> <result column="answer_time" jdbcType="BIGINT" property="answerTime" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
<foreach collection="oredCriteria" item="criteria" separator="or"> <foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")"> <trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion"> <foreach collection="criteria.criteria" item="criterion">
<choose> <choose>
<when test="criterion.noValue"> <when test="criterion.noValue">
and ${criterion.condition} and ${criterion.condition}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
</if> </if>
</foreach> </foreach>
</where> </where>
</sql> </sql>
<sql id="Update_By_Example_Where_Clause"> <sql id="Update_By_Example_Where_Clause">
<where> <where>
<foreach collection="example.oredCriteria" item="criteria" separator="or"> <foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")"> <trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion"> <foreach collection="criteria.criteria" item="criterion">
<choose> <choose>
<when test="criterion.noValue"> <when test="criterion.noValue">
and ${criterion.condition} and ${criterion.condition}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
</if> </if>
</foreach> </foreach>
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, patient_report_id, patient_id, question_parent_code, question_id, option_id, id, patient_report_id, patient_id, question_parent_code, question_id, option_id,
option_name, score, type, answer, remark, create_time, update_time, is_del, answer_time option_name, score, type, answer, remark, create_time, update_time, is_del, answer_time
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientScoreExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientScoreExample" resultMap="BaseResultMap">
select select
<if test="distinct"> <if test="distinct">
distinct distinct
</if> </if>
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from t_ht_patient_score from t_ht_patient_score
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
<if test="orderByClause != null"> <if test="orderByClause != null">
order by ${orderByClause} order by ${orderByClause}
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from t_ht_patient_score from t_ht_patient_score
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_ht_patient_score delete from t_ht_patient_score
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtPatientScoreExample"> <delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtPatientScoreExample">
delete from t_ht_patient_score delete from t_ht_patient_score
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtPatientScore"> <insert id="insert" parameterType="com.ccsens.ht.bean.po.HtPatientScore">
insert into t_ht_patient_score (id, patient_report_id, patient_id, insert into t_ht_patient_score (id, patient_report_id, patient_id,
question_parent_code, question_id, option_id, question_parent_code, question_id, option_id,
option_name, score, type, option_name, score, type,
answer, remark, create_time, answer, remark, create_time,
update_time, is_del, answer_time update_time, is_del, answer_time
) )
values (#{id,jdbcType=BIGINT}, #{patientReportId,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, values (#{id,jdbcType=BIGINT}, #{patientReportId,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT},
#{questionParentCode,jdbcType=VARCHAR}, #{questionId,jdbcType=BIGINT}, #{optionId,jdbcType=BIGINT}, #{questionParentCode,jdbcType=VARCHAR}, #{questionId,jdbcType=BIGINT}, #{optionId,jdbcType=BIGINT},
#{optionName,jdbcType=VARCHAR}, #{score,jdbcType=INTEGER}, #{type,jdbcType=TINYINT}, #{optionName,jdbcType=VARCHAR}, #{score,jdbcType=DECIMAL}, #{type,jdbcType=TINYINT},
#{answer,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{answer,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT}, #{answerTime,jdbcType=BIGINT} #{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT}, #{answerTime,jdbcType=BIGINT}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientScore"> <insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientScore">
insert into t_ht_patient_score insert into t_ht_patient_score
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
id, id,
</if> </if>
<if test="patientReportId != null"> <if test="patientReportId != null">
patient_report_id, patient_report_id,
</if> </if>
<if test="patientId != null"> <if test="patientId != null">
patient_id, patient_id,
</if> </if>
<if test="questionParentCode != null"> <if test="questionParentCode != null">
question_parent_code, question_parent_code,
</if> </if>
<if test="questionId != null"> <if test="questionId != null">
question_id, question_id,
</if> </if>
<if test="optionId != null"> <if test="optionId != null">
option_id, option_id,
</if> </if>
<if test="optionName != null"> <if test="optionName != null">
option_name, option_name,
</if> </if>
<if test="score != null"> <if test="score != null">
score, score,
</if> </if>
<if test="type != null"> <if test="type != null">
type, type,
</if> </if>
<if test="answer != null"> <if test="answer != null">
answer, answer,
</if> </if>
<if test="remark != null"> <if test="remark != null">
remark, remark,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
<if test="isDel != null"> <if test="isDel != null">
is_del, is_del,
</if> </if>
<if test="answerTime != null"> <if test="answerTime != null">
answer_time, answer_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
#{id,jdbcType=BIGINT}, #{id,jdbcType=BIGINT},
</if> </if>
<if test="patientReportId != null"> <if test="patientReportId != null">
#{patientReportId,jdbcType=BIGINT}, #{patientReportId,jdbcType=BIGINT},
</if> </if>
<if test="patientId != null"> <if test="patientId != null">
#{patientId,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT},
</if> </if>
<if test="questionParentCode != null"> <if test="questionParentCode != null">
#{questionParentCode,jdbcType=VARCHAR}, #{questionParentCode,jdbcType=VARCHAR},
</if> </if>
<if test="questionId != null"> <if test="questionId != null">
#{questionId,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT},
</if> </if>
<if test="optionId != null"> <if test="optionId != null">
#{optionId,jdbcType=BIGINT}, #{optionId,jdbcType=BIGINT},
</if> </if>
<if test="optionName != null"> <if test="optionName != null">
#{optionName,jdbcType=VARCHAR}, #{optionName,jdbcType=VARCHAR},
</if> </if>
<if test="score != null"> <if test="score != null">
#{score,jdbcType=INTEGER}, #{score,jdbcType=DECIMAL},
</if> </if>
<if test="type != null"> <if test="type != null">
#{type,jdbcType=TINYINT}, #{type,jdbcType=TINYINT},
</if> </if>
<if test="answer != null"> <if test="answer != null">
#{answer,jdbcType=VARCHAR}, #{answer,jdbcType=VARCHAR},
</if> </if>
<if test="remark != null"> <if test="remark != null">
#{remark,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="isDel != null"> <if test="isDel != null">
#{isDel,jdbcType=TINYINT}, #{isDel,jdbcType=TINYINT},
</if> </if>
<if test="answerTime != null"> <if test="answerTime != null">
#{answerTime,jdbcType=BIGINT}, #{answerTime,jdbcType=BIGINT},
</if> </if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientScoreExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientScoreExample" resultType="java.lang.Long">
select count(*) from t_ht_patient_score select count(*) from t_ht_patient_score
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</select> </select>
<update id="updateByExampleSelective" parameterType="map"> <update id="updateByExampleSelective" parameterType="map">
update t_ht_patient_score update t_ht_patient_score
<set> <set>
<if test="record.id != null"> <if test="record.id != null">
id = #{record.id,jdbcType=BIGINT}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="record.patientReportId != null"> <if test="record.patientReportId != null">
patient_report_id = #{record.patientReportId,jdbcType=BIGINT}, patient_report_id = #{record.patientReportId,jdbcType=BIGINT},
</if> </if>
<if test="record.patientId != null"> <if test="record.patientId != null">
patient_id = #{record.patientId,jdbcType=BIGINT}, patient_id = #{record.patientId,jdbcType=BIGINT},
</if> </if>
<if test="record.questionParentCode != null"> <if test="record.questionParentCode != null">
question_parent_code = #{record.questionParentCode,jdbcType=VARCHAR}, question_parent_code = #{record.questionParentCode,jdbcType=VARCHAR},
</if> </if>
<if test="record.questionId != null"> <if test="record.questionId != null">
question_id = #{record.questionId,jdbcType=BIGINT}, question_id = #{record.questionId,jdbcType=BIGINT},
</if> </if>
<if test="record.optionId != null"> <if test="record.optionId != null">
option_id = #{record.optionId,jdbcType=BIGINT}, option_id = #{record.optionId,jdbcType=BIGINT},
</if> </if>
<if test="record.optionName != null"> <if test="record.optionName != null">
option_name = #{record.optionName,jdbcType=VARCHAR}, option_name = #{record.optionName,jdbcType=VARCHAR},
</if> </if>
<if test="record.score != null"> <if test="record.score != null">
score = #{record.score,jdbcType=INTEGER}, score = #{record.score,jdbcType=DECIMAL},
</if> </if>
<if test="record.type != null"> <if test="record.type != null">
type = #{record.type,jdbcType=TINYINT}, type = #{record.type,jdbcType=TINYINT},
</if> </if>
<if test="record.answer != null"> <if test="record.answer != null">
answer = #{record.answer,jdbcType=VARCHAR}, answer = #{record.answer,jdbcType=VARCHAR},
</if> </if>
<if test="record.remark != null"> <if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
</if> </if>
<if test="record.createTime != null"> <if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.updateTime != null"> <if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.isDel != null"> <if test="record.isDel != null">
is_del = #{record.isDel,jdbcType=TINYINT}, is_del = #{record.isDel,jdbcType=TINYINT},
</if> </if>
<if test="record.answerTime != null"> <if test="record.answerTime != null">
answer_time = #{record.answerTime,jdbcType=BIGINT}, answer_time = #{record.answerTime,jdbcType=BIGINT},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update t_ht_patient_score update t_ht_patient_score
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
patient_report_id = #{record.patientReportId,jdbcType=BIGINT}, patient_report_id = #{record.patientReportId,jdbcType=BIGINT},
patient_id = #{record.patientId,jdbcType=BIGINT}, patient_id = #{record.patientId,jdbcType=BIGINT},
question_parent_code = #{record.questionParentCode,jdbcType=VARCHAR}, question_parent_code = #{record.questionParentCode,jdbcType=VARCHAR},
question_id = #{record.questionId,jdbcType=BIGINT}, question_id = #{record.questionId,jdbcType=BIGINT},
option_id = #{record.optionId,jdbcType=BIGINT}, option_id = #{record.optionId,jdbcType=BIGINT},
option_name = #{record.optionName,jdbcType=VARCHAR}, option_name = #{record.optionName,jdbcType=VARCHAR},
score = #{record.score,jdbcType=INTEGER}, score = #{record.score,jdbcType=DECIMAL},
type = #{record.type,jdbcType=TINYINT}, type = #{record.type,jdbcType=TINYINT},
answer = #{record.answer,jdbcType=VARCHAR}, answer = #{record.answer,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_del = #{record.isDel,jdbcType=TINYINT}, is_del = #{record.isDel,jdbcType=TINYINT},
answer_time = #{record.answerTime,jdbcType=BIGINT} answer_time = #{record.answerTime,jdbcType=BIGINT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtPatientScore"> <update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtPatientScore">
update t_ht_patient_score update t_ht_patient_score
<set> <set>
<if test="patientReportId != null"> <if test="patientReportId != null">
patient_report_id = #{patientReportId,jdbcType=BIGINT}, patient_report_id = #{patientReportId,jdbcType=BIGINT},
</if> </if>
<if test="patientId != null"> <if test="patientId != null">
patient_id = #{patientId,jdbcType=BIGINT}, patient_id = #{patientId,jdbcType=BIGINT},
</if> </if>
<if test="questionParentCode != null"> <if test="questionParentCode != null">
question_parent_code = #{questionParentCode,jdbcType=VARCHAR}, question_parent_code = #{questionParentCode,jdbcType=VARCHAR},
</if> </if>
<if test="questionId != null"> <if test="questionId != null">
question_id = #{questionId,jdbcType=BIGINT}, question_id = #{questionId,jdbcType=BIGINT},
</if> </if>
<if test="optionId != null"> <if test="optionId != null">
option_id = #{optionId,jdbcType=BIGINT}, option_id = #{optionId,jdbcType=BIGINT},
</if> </if>
<if test="optionName != null"> <if test="optionName != null">
option_name = #{optionName,jdbcType=VARCHAR}, option_name = #{optionName,jdbcType=VARCHAR},
</if> </if>
<if test="score != null"> <if test="score != null">
score = #{score,jdbcType=INTEGER}, score = #{score,jdbcType=DECIMAL},
</if> </if>
<if test="type != null"> <if test="type != null">
type = #{type,jdbcType=TINYINT}, type = #{type,jdbcType=TINYINT},
</if> </if>
<if test="answer != null"> <if test="answer != null">
answer = #{answer,jdbcType=VARCHAR}, answer = #{answer,jdbcType=VARCHAR},
</if> </if>
<if test="remark != null"> <if test="remark != null">
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="isDel != null"> <if test="isDel != null">
is_del = #{isDel,jdbcType=TINYINT}, is_del = #{isDel,jdbcType=TINYINT},
</if> </if>
<if test="answerTime != null"> <if test="answerTime != null">
answer_time = #{answerTime,jdbcType=BIGINT}, answer_time = #{answerTime,jdbcType=BIGINT},
</if> </if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtPatientScore"> <update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtPatientScore">
update t_ht_patient_score update t_ht_patient_score
set patient_report_id = #{patientReportId,jdbcType=BIGINT}, set patient_report_id = #{patientReportId,jdbcType=BIGINT},
patient_id = #{patientId,jdbcType=BIGINT}, patient_id = #{patientId,jdbcType=BIGINT},
question_parent_code = #{questionParentCode,jdbcType=VARCHAR}, question_parent_code = #{questionParentCode,jdbcType=VARCHAR},
question_id = #{questionId,jdbcType=BIGINT}, question_id = #{questionId,jdbcType=BIGINT},
option_id = #{optionId,jdbcType=BIGINT}, option_id = #{optionId,jdbcType=BIGINT},
option_name = #{optionName,jdbcType=VARCHAR}, option_name = #{optionName,jdbcType=VARCHAR},
score = #{score,jdbcType=INTEGER}, score = #{score,jdbcType=DECIMAL},
type = #{type,jdbcType=TINYINT}, type = #{type,jdbcType=TINYINT},
answer = #{answer,jdbcType=VARCHAR}, answer = #{answer,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=TINYINT}, is_del = #{isDel,jdbcType=TINYINT},
answer_time = #{answerTime,jdbcType=BIGINT} answer_time = #{answerTime,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

610
ht/src/main/resources/mapper_raw/HtQuestionOptionMapper.xml

@ -1,306 +1,306 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.HtQuestionOptionMapper"> <mapper namespace="com.ccsens.ht.persist.mapper.HtQuestionOptionMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtQuestionOption"> <resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtQuestionOption">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="question_id" jdbcType="BIGINT" property="questionId" /> <result column="question_id" jdbcType="BIGINT" property="questionId" />
<result column="sort" jdbcType="INTEGER" property="sort" /> <result column="sort" jdbcType="INTEGER" property="sort" />
<result column="type" jdbcType="VARCHAR" property="type" /> <result column="type" jdbcType="VARCHAR" property="type" />
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name" />
<result column="score" jdbcType="INTEGER" property="score" /> <result column="score" jdbcType="DECIMAL" property="score" />
<result column="display" jdbcType="VARCHAR" property="display" /> <result column="display" jdbcType="VARCHAR" property="display" />
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" /> <result column="is_del" jdbcType="TINYINT" property="isDel" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
<foreach collection="oredCriteria" item="criteria" separator="or"> <foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")"> <trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion"> <foreach collection="criteria.criteria" item="criterion">
<choose> <choose>
<when test="criterion.noValue"> <when test="criterion.noValue">
and ${criterion.condition} and ${criterion.condition}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
</if> </if>
</foreach> </foreach>
</where> </where>
</sql> </sql>
<sql id="Update_By_Example_Where_Clause"> <sql id="Update_By_Example_Where_Clause">
<where> <where>
<foreach collection="example.oredCriteria" item="criteria" separator="or"> <foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")"> <trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion"> <foreach collection="criteria.criteria" item="criterion">
<choose> <choose>
<when test="criterion.noValue"> <when test="criterion.noValue">
and ${criterion.condition} and ${criterion.condition}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
</if> </if>
</foreach> </foreach>
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, question_id, sort, type, name, score, display, remark, create_time, update_time, id, question_id, sort, type, name, score, display, remark, create_time, update_time,
is_del is_del
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionExample" resultMap="BaseResultMap">
select select
<if test="distinct"> <if test="distinct">
distinct distinct
</if> </if>
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from t_ht_question_option from t_ht_question_option
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
<if test="orderByClause != null"> <if test="orderByClause != null">
order by ${orderByClause} order by ${orderByClause}
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from t_ht_question_option from t_ht_question_option
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_ht_question_option delete from t_ht_question_option
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionExample"> <delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionExample">
delete from t_ht_question_option delete from t_ht_question_option
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtQuestionOption"> <insert id="insert" parameterType="com.ccsens.ht.bean.po.HtQuestionOption">
insert into t_ht_question_option (id, question_id, sort, insert into t_ht_question_option (id, question_id, sort,
type, name, score, type, name, score,
display, remark, create_time, display, remark, create_time,
update_time, is_del) update_time, is_del)
values (#{id,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT}, #{sort,jdbcType=INTEGER}, values (#{id,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT}, #{sort,jdbcType=INTEGER},
#{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{score,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{score,jdbcType=DECIMAL},
#{display,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{display,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT}) #{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT})
</insert> </insert>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtQuestionOption"> <insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtQuestionOption">
insert into t_ht_question_option insert into t_ht_question_option
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
id, id,
</if> </if>
<if test="questionId != null"> <if test="questionId != null">
question_id, question_id,
</if> </if>
<if test="sort != null"> <if test="sort != null">
sort, sort,
</if> </if>
<if test="type != null"> <if test="type != null">
type, type,
</if> </if>
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
<if test="score != null"> <if test="score != null">
score, score,
</if> </if>
<if test="display != null"> <if test="display != null">
display, display,
</if> </if>
<if test="remark != null"> <if test="remark != null">
remark, remark,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
<if test="isDel != null"> <if test="isDel != null">
is_del, is_del,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
#{id,jdbcType=BIGINT}, #{id,jdbcType=BIGINT},
</if> </if>
<if test="questionId != null"> <if test="questionId != null">
#{questionId,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT},
</if> </if>
<if test="sort != null"> <if test="sort != null">
#{sort,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
</if> </if>
<if test="type != null"> <if test="type != null">
#{type,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
</if> </if>
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
<if test="score != null"> <if test="score != null">
#{score,jdbcType=INTEGER}, #{score,jdbcType=DECIMAL},
</if> </if>
<if test="display != null"> <if test="display != null">
#{display,jdbcType=VARCHAR}, #{display,jdbcType=VARCHAR},
</if> </if>
<if test="remark != null"> <if test="remark != null">
#{remark,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="isDel != null"> <if test="isDel != null">
#{isDel,jdbcType=TINYINT}, #{isDel,jdbcType=TINYINT},
</if> </if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionOptionExample" resultType="java.lang.Long">
select count(*) from t_ht_question_option select count(*) from t_ht_question_option
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</select> </select>
<update id="updateByExampleSelective" parameterType="map"> <update id="updateByExampleSelective" parameterType="map">
update t_ht_question_option update t_ht_question_option
<set> <set>
<if test="record.id != null"> <if test="record.id != null">
id = #{record.id,jdbcType=BIGINT}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="record.questionId != null"> <if test="record.questionId != null">
question_id = #{record.questionId,jdbcType=BIGINT}, question_id = #{record.questionId,jdbcType=BIGINT},
</if> </if>
<if test="record.sort != null"> <if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER}, sort = #{record.sort,jdbcType=INTEGER},
</if> </if>
<if test="record.type != null"> <if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR}, type = #{record.type,jdbcType=VARCHAR},
</if> </if>
<if test="record.name != null"> <if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR},
</if> </if>
<if test="record.score != null"> <if test="record.score != null">
score = #{record.score,jdbcType=INTEGER}, score = #{record.score,jdbcType=DECIMAL},
</if> </if>
<if test="record.display != null"> <if test="record.display != null">
display = #{record.display,jdbcType=VARCHAR}, display = #{record.display,jdbcType=VARCHAR},
</if> </if>
<if test="record.remark != null"> <if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
</if> </if>
<if test="record.createTime != null"> <if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.updateTime != null"> <if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.isDel != null"> <if test="record.isDel != null">
is_del = #{record.isDel,jdbcType=TINYINT}, is_del = #{record.isDel,jdbcType=TINYINT},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update t_ht_question_option update t_ht_question_option
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
question_id = #{record.questionId,jdbcType=BIGINT}, question_id = #{record.questionId,jdbcType=BIGINT},
sort = #{record.sort,jdbcType=INTEGER}, sort = #{record.sort,jdbcType=INTEGER},
type = #{record.type,jdbcType=VARCHAR}, type = #{record.type,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR},
score = #{record.score,jdbcType=INTEGER}, score = #{record.score,jdbcType=DECIMAL},
display = #{record.display,jdbcType=VARCHAR}, display = #{record.display,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_del = #{record.isDel,jdbcType=TINYINT} is_del = #{record.isDel,jdbcType=TINYINT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtQuestionOption"> <update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtQuestionOption">
update t_ht_question_option update t_ht_question_option
<set> <set>
<if test="questionId != null"> <if test="questionId != null">
question_id = #{questionId,jdbcType=BIGINT}, question_id = #{questionId,jdbcType=BIGINT},
</if> </if>
<if test="sort != null"> <if test="sort != null">
sort = #{sort,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER},
</if> </if>
<if test="type != null"> <if test="type != null">
type = #{type,jdbcType=VARCHAR}, type = #{type,jdbcType=VARCHAR},
</if> </if>
<if test="name != null"> <if test="name != null">
name = #{name,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR},
</if> </if>
<if test="score != null"> <if test="score != null">
score = #{score,jdbcType=INTEGER}, score = #{score,jdbcType=DECIMAL},
</if> </if>
<if test="display != null"> <if test="display != null">
display = #{display,jdbcType=VARCHAR}, display = #{display,jdbcType=VARCHAR},
</if> </if>
<if test="remark != null"> <if test="remark != null">
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="isDel != null"> <if test="isDel != null">
is_del = #{isDel,jdbcType=TINYINT}, is_del = #{isDel,jdbcType=TINYINT},
</if> </if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtQuestionOption"> <update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtQuestionOption">
update t_ht_question_option update t_ht_question_option
set question_id = #{questionId,jdbcType=BIGINT}, set question_id = #{questionId,jdbcType=BIGINT},
sort = #{sort,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER},
type = #{type,jdbcType=VARCHAR}, type = #{type,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR},
score = #{score,jdbcType=INTEGER}, score = #{score,jdbcType=DECIMAL},
display = #{display,jdbcType=VARCHAR}, display = #{display,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=TINYINT} is_del = #{isDel,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

50
tall/src/main/java/com/ccsens/tall/rabbitMQ/MessageTest.java

@ -1,25 +1,25 @@
package com.ccsens.tall.rabbitMQ; //package com.ccsens.tall.rabbitMQ;
//
import com.ccsens.util.JacksonUtil; //import com.ccsens.util.JacksonUtil;
import com.ccsens.util.bean.message.common.InMessage; //import com.ccsens.util.bean.message.common.InMessage;
import com.ccsens.util.bean.message.common.MessageConstant; //import com.ccsens.util.bean.message.common.MessageConstant;
import com.ccsens.util.bean.message.common.ServerMessage; //import com.ccsens.util.bean.message.common.ServerMessage;
import com.ccsens.util.config.RabbitMQConfig; //import com.ccsens.util.config.RabbitMQConfig;
//
import org.springframework.amqp.core.AmqpTemplate; //import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
//
public class MessageTest { //public class MessageTest {
@Autowired // @Autowired
private AmqpTemplate rabbitTemplate; // private AmqpTemplate rabbitTemplate;
//
public void messageTest() throws Exception { // public void messageTest() throws Exception {
ServerMessage serverMessage = new ServerMessage(); // ServerMessage serverMessage = new ServerMessage();
serverMessage.setType("Ping"); // serverMessage.setType("Ping");
InMessage inMessage = InMessage.newToServerMessage(MessageConstant.DomainType.Server,serverMessage); // InMessage inMessage = InMessage.newToServerMessage(MessageConstant.DomainType.Server,serverMessage);
String j = JacksonUtil.beanToJson(inMessage); // String j = JacksonUtil.beanToJson(inMessage);
System.out.println(j); // System.out.println(j);
//FixMe 发送到消息队列 // //FixMe 发送到消息队列
rabbitTemplate.convertAndSend(RabbitMQConfig.TALL_MESSAGE_1,j); // rabbitTemplate.convertAndSend(RabbitMQConfig.TALL_MESSAGE_1,j);
} // }
} //}

6
tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java

@ -374,6 +374,7 @@ public class ProTaskDetailService implements IProTaskDetailService {
longSet.add(secondTaskVo.getEndTime()); longSet.add(secondTaskVo.getEndTime());
} }
timeList.addAll(longSet); timeList.addAll(longSet);
for (int i = 0; i < timeList.size(); i++) { for (int i = 0; i < timeList.size(); i++) {
for (int j = 0; j < timeList.size() - i - 1; j++) { for (int j = 0; j < timeList.size() - i - 1; j++) {
if (timeList.get(j) > timeList.get(j + 1)) { if (timeList.get(j) > timeList.get(j + 1)) {
@ -383,6 +384,7 @@ public class ProTaskDetailService implements IProTaskDetailService {
} }
} }
} }
timeList.forEach(System.out::println);
int sequence = 1; int sequence = 1;
for (int i = 0; i < timeList.size() - 1; i++) { for (int i = 0; i < timeList.size() - 1; i++) {
TaskVo.NormalTask normalTask = null; TaskVo.NormalTask normalTask = null;
@ -1181,9 +1183,11 @@ public class ProTaskDetailService implements IProTaskDetailService {
//返回的任务详细信息 //返回的任务详细信息
Long subTimeId = taskDeliverService.isTaskOrSubTime(taskDetail.getId()); Long subTimeId = taskDeliverService.isTaskOrSubTime(taskDetail.getId());
normalTask = getTaskInfoByTaskId(currentUserId,project.getId(),subTimeId); normalTask = getTaskInfoByTaskId(currentUserId,project.getId(),subTimeId);
}else {
throw new BaseException(CodeEnum.NOT_POWER);
} }
}else { }else {
throw new BaseException(CodeEnum.NOT_POWER); throw new BaseException(CodeEnum.NOT_PROJECT);
} }
}else { }else {
throw new BaseException(CodeEnum.NOT_TASK); throw new BaseException(CodeEnum.NOT_TASK);

25
tall/src/main/java/com/ccsens/tall/service/UserService.java

@ -622,18 +622,35 @@ public class UserService implements IUserService {
throw new SmsException(SmsException.Error_SendTooFast); throw new SmsException(SmsException.Error_SendTooFast);
} }
//// String verifyCode = RandomUtil.randomNumbers(4);
// String verifyCode = "1111";
//
// //3.保存到redis中
// Integer codeValidInSeconds = WebConstant.Expired_Verify_Code_In_Seconds;
// Integer codeExistINSeconds = WebConstant.Exist_Verify_Code_In_Seconds;
// redisUtil.set(RedisKeyManager.getSigninSmsKey(phone), verifyCode, codeValidInSeconds);
// redisUtil.set(RedisKeyManager.getSigninSmsExistKey(phone), verifyCode, codeExistINSeconds);
//
// //5.发送验证码
// SmsUtil.sendSms(phone, verifyCode, client_type.phase, codeValidInSeconds);
//2.生成随机验证码 //2.生成随机验证码
// String verifyCode = RandomUtil.randomNumbers(4);
String verifyCode = "1111"; String verifyCode = "1111";
if("1".equalsIgnoreCase(PropUtil.smsCode)){
verifyCode = RandomUtil.randomNumbers(4);
}
//3.保存到redis中 //3.保存到redis中
Integer codeValidInSeconds = WebConstant.Expired_Verify_Code_In_Seconds; Integer codeValidInSeconds = WebConstant.Expired_Verify_Code_In_Seconds;
Integer codeExistINSeconds = WebConstant.Exist_Verify_Code_In_Seconds; Integer codeExistInSeconds = WebConstant.Exist_Verify_Code_In_Seconds;
redisUtil.set(RedisKeyManager.getSigninSmsKey(phone), verifyCode, codeValidInSeconds); redisUtil.set(RedisKeyManager.getSigninSmsKey(phone), verifyCode, codeValidInSeconds);
redisUtil.set(RedisKeyManager.getSigninSmsExistKey(phone), verifyCode, codeExistINSeconds); redisUtil.set(RedisKeyManager.getSigninSmsExistKey(phone), verifyCode, codeExistInSeconds);
//5.发送验证码 //5.发送验证码
// SmsUtil.sendSms(phone, verifyCode, client_type.phase, codeValidInSeconds); if("1".equalsIgnoreCase(PropUtil.smsCode)) {
SmsUtil.sendSms(phone, verifyCode,"", codeValidInSeconds);
}
//6.返回 //6.返回
smsCodeVo = new UserVo.SmsCode(); smsCodeVo = new UserVo.SmsCode();

8
tall/src/main/resources/application-dev.yml

@ -11,10 +11,11 @@ spring:
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
rabbitmq: rabbitmq:
host: 192.168.0.99 # host: 192.168.0.99
password: 111111 host: 127.0.0.1
password: guest
port: 5672 port: 5672
username: admin username: guest
redis: redis:
database: 0 database: 0
host: 127.0.0.1 host: 127.0.0.1
@ -30,3 +31,4 @@ spring:
swagger: swagger:
enable: true enable: true
smsCode: 0

5
tall/src/main/resources/application-prod.yml

@ -7,7 +7,7 @@ spring:
datacenterId: 1 datacenterId: 1
workerId: 1 workerId: 1
application: application:
name: tall name: tall-ht
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
rabbitmq: rabbitmq:
@ -36,4 +36,5 @@ eureka:
# ip-address: 192.144.182.42 # ip-address: 192.144.182.42
ip-address: 81.70.54.64 ip-address: 81.70.54.64
gatewayUrl: https://sd.tall.wiki/gateway/ gatewayUrl: https://sd.tall.wiki/gateway/
smsCode: 1

7
tall/src/main/resources/application-test.yml

@ -1,5 +1,5 @@
server: server:
port: 7030 port: 7031
servlet: servlet:
context-path: /v1.0 context-path: /v1.0
spring: spring:
@ -7,7 +7,7 @@ spring:
datacenterId: 1 datacenterId: 1
workerId: 1 workerId: 1
application: application:
name: tall name: tall-ht
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
rabbitmq: rabbitmq:
@ -32,4 +32,5 @@ swagger:
eureka: eureka:
instance: instance:
ip-address: 192.168.0.99 ip-address: 192.168.0.99
gatewayUrl: http://192.168.0.99/gateway/ gatewayUrl: http://192.168.0.99/gateway/
smsCode: 0

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

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

6
util/src/main/java/com/ccsens/util/PropUtil.java

@ -18,6 +18,7 @@ public class PropUtil {
public static String contextPath; public static String contextPath;
public static String gatewayUrl; public static String gatewayUrl;
public static String qrCode; public static String qrCode;
public static String smsCode;
@Value("${gatewayUrl:}") @Value("${gatewayUrl:}")
public void setGatewayUrl(String gatewayUrl) { public void setGatewayUrl(String gatewayUrl) {
@ -49,4 +50,9 @@ public class PropUtil {
PropUtil.contextPath = contextPath; PropUtil.contextPath = contextPath;
} }
@Value("${smsCode:}")
public void setSmsCode(String smsCode) {
PropUtil.smsCode = smsCode;
}
} }

51
util/src/main/java/com/ccsens/util/SmsUtil.java

@ -11,20 +11,61 @@ import java.io.IOException;
@Component @Component
public class SmsUtil { public class SmsUtil {
private static final int appid = 1400188778; // 1400开头 // private static final int appid = 1400188778; // 1400开头
// private static final String appkey = "c86ca104521ab2e28e1d4b558fdd665e";
// private static final int templateId = 286731; //{1} 验证码{1}, 您正在通过{2}登录传控科技“时物链条”会议管理系统,请与{3}分钟内填写,如非本人操作,请忽略本短信。
// private static final int templateId1 = 286682; //{1} 您正在通过{2}登录传控科技“时物链条”会议管理系统,请与{2}分钟内填写,如非本人操作,请忽略本短信。
// private static final String smsSign = "传控科技";
//
// public static void sendSms(String phone,String code,String appName,Integer seconds){
// String phoneNumbers[] = {phone};
// Integer minutes = (seconds - 1) / 60 + 1;
// try {
// String[] params = {code,appName,String.valueOf(minutes)};//数组具体的元素个数和模板中变量个数必须一致,例如事例中templateId:5678对应一个变量,参数数组中元素个数也必须是一个
// SmsSingleSender ssender = new SmsSingleSender(appid, appkey);
// SmsSingleSenderResult result = ssender.sendWithParam("86", phoneNumbers[0],
// templateId, params, smsSign, "", ""); // 签名参数未提供或者为空时,会使用默认签名发送短信
// System.out.println(result);
// } catch (HTTPException e) {
// // HTTP响应码错误
// e.printStackTrace();
// } catch (JSONException e) {
// // json解析错误
// e.printStackTrace();
// } catch (IOException e) {
// // 网络IO错误
// e.printStackTrace();
// }
// }
// 1400开头
private static final int appid = 1400188778;
private static final String appkey = "c86ca104521ab2e28e1d4b558fdd665e"; private static final String appkey = "c86ca104521ab2e28e1d4b558fdd665e";
private static final int templateId = 286731; //{1} 验证码{1}, 您正在通过{2}登录传控科技“时物链条”会议管理系统,请与{3}分钟内填写,如非本人操作,请忽略本短信。 /**
private static final int templateId1 = 286682; //{1} 您正在通过{2}登录传控科技“时物链条”会议管理系统,请与{2}分钟内填写,如非本人操作,请忽略本短信。 * {1} 验证码{1} 您正在通过{2}登录传控科技时物链条会议管理系统请与{3}分钟内填写如非本人操作请忽略本短信\
*/
private static final int templateId = 286731;
/**
* {1} 您正在通过{2}登录传控科技时物链条会议管理系统请与{2}分钟内填写如非本人操作请忽略本短信
*/
private static final int templateId1 = 286682;
/**验证码{1},{2}分钟内有效,如非本人操作请忽略
*
*/
private static final int templateId2 = 686476;
private static final String smsSign = "传控科技"; private static final String smsSign = "传控科技";
public static void sendSms(String phone,String code,String appName,Integer seconds){ public static void sendSms(String phone,String code,String appName,Integer seconds){
String phoneNumbers[] = {phone}; String phoneNumbers[] = {phone};
Integer minutes = (seconds - 1) / 60 + 1; Integer minutes = (seconds - 1) / 60 + 1;
try { try {
String[] params = {code,appName,String.valueOf(minutes)};//数组具体的元素个数和模板中变量个数必须一致,例如事例中templateId:5678对应一个变量,参数数组中元素个数也必须是一个 //数组具体的元素个数和模板中变量个数必须一致,例如事例中templateId:5678对应一个变量,参数数组中元素个数也必须是一个
String[] params = {code,String.valueOf(minutes)};
SmsSingleSender ssender = new SmsSingleSender(appid, appkey); SmsSingleSender ssender = new SmsSingleSender(appid, appkey);
// 签名参数未提供或者为空时,会使用默认签名发送短信
SmsSingleSenderResult result = ssender.sendWithParam("86", phoneNumbers[0], SmsSingleSenderResult result = ssender.sendWithParam("86", phoneNumbers[0],
templateId, params, smsSign, "", ""); // 签名参数未提供或者为空时,会使用默认签名发送短信 templateId2, params, smsSign, "", "");
System.out.println(result); System.out.println(result);
} catch (HTTPException e) { } catch (HTTPException e) {
// HTTP响应码错误 // HTTP响应码错误

Loading…
Cancel
Save