Browse Source

feature: 中医体质测评完成、查看报告接口

new-ays
wzz 3 months ago
parent
commit
f2cc04d640
  1. 24
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/ZytzController.java
  2. 3
      acupuncture-admin/src/main/resources/application-dev.yml
  3. 2
      acupuncture-admin/src/main/resources/application-prod.yml
  4. 3
      acupuncture-admin/src/main/resources/application-stage.yml
  5. 19
      acupuncture-generator/src/main/resources/mbg.xml
  6. 7
      acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/ZytzDto.java
  7. 293
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/ZytzRmsReport.java
  8. 1881
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/ZytzRmsReportExample.java
  9. 140
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/ZytzRmsReportResult.java
  10. 912
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/ZytzRmsReportResultExample.java
  11. 117
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/ZytzRmsReportYsjy.java
  12. 721
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/ZytzRmsReportYsjyExample.java
  13. 29
      acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/ZytzVo.java
  14. 18
      acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/ZytzDao.java
  15. 28
      acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/ZytzRmsReportMapper.java
  16. 28
      acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/ZytzRmsReportResultMapper.java
  17. 34
      acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/ZytzRmsReportYsjyMapper.java
  18. 14
      acupuncture-system/src/main/java/com/acupuncture/system/service/ZytzService.java
  19. 232
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ZytzServiceImpl.java
  20. 216
      acupuncture-system/src/main/resources/mapper/dao/ZytzDao.xml
  21. 522
      acupuncture-system/src/main/resources/mapper/system/ZytzRmsReportMapper.xml
  22. 300
      acupuncture-system/src/main/resources/mapper/system/ZytzRmsReportResultMapper.xml
  23. 318
      acupuncture-system/src/main/resources/mapper/system/ZytzRmsReportYsjyMapper.xml

24
acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/ZytzController.java

@ -53,7 +53,6 @@ public class ZytzController {
return JsonResponse.ok(zytzService.evaQuestionList(dto.getParam()));
}
/**
* 提交测评
*/
@ -62,4 +61,27 @@ public class ZytzController {
public JsonResponse<Integer> evaQuestionSubmit(@Validated @RequestBody BaseDto<ZytzDto.EvaQuestionSubmit> dto) {
return JsonResponse.ok(zytzService.evaQuestionSubmit(dto.getParam()));
}
/**
* 完成测评生成报告单
* @param dto
* @return
*/
@Anonymous
@PostMapping("/eva/complete")
public JsonResponse<Integer> evaComplete(@Validated @RequestBody BaseDto<ZytzDto.EvaComplete> dto) {
return JsonResponse.ok(zytzService.evaComplete(dto.getParam()));
}
/**
* 查看报告单
* @param dto
* @return
*/
@Anonymous
@PostMapping("/report/view")
public JsonResponse<ZytzVo.ReportView> reportView(@Validated @RequestBody BaseDto<ZytzDto.ReportView> dto) {
return JsonResponse.ok(zytzService.reportView(dto.getParam()));
}
}

3
acupuncture-admin/src/main/resources/application-dev.yml

@ -67,6 +67,3 @@ file:
screenQrCodeTemplate: /home/acupuncture/server/profile/screenQrCodeTemplate.docx
hbTemplate: /home/acupuncture/server/profile/screenHbQrCodeTemplate.docx
screenPath: http://test.tall.wiki/acupuncture/web-admin/screening/H5?hospitalId=hosId&hospitalName=hosName&centerId=cId
zytz:
mobileUrl: https://test.tall.wiki/acupuncture/client/medicalEva

2
acupuncture-admin/src/main/resources/application-prod.yml

@ -91,5 +91,3 @@ file:
pgTemplate: /home/acupuncture/server/profile/TreamtmentPgTemplate.docx
jmrsUrl: /home/acupuncture/server/profile/uploads/jmrsTemplate.docx
zytz:
mobileUrl: https://nnzjpt.ylinno.com/acupuncture/clientssl/medicalEva

3
acupuncture-admin/src/main/resources/application-stage.yml

@ -68,6 +68,3 @@ file:
screenPath: http://test.tall.wiki/acupuncture/web-admin/screening/H5?hospitalId=hosId&hospitalName=hosName&centerId=cId
pgTemplate: /home/acupuncture/server/profile/TreamtmentPgTemplate.docx
jmrsUrl: /home/acupuncture/server/profile/uploads/jmrsTemplate.docx
zytz:
mobileUrl: https://test.tall.wiki/acupuncture/client/medicalEva

19
acupuncture-generator/src/main/resources/mbg.xml

@ -66,14 +66,17 @@
<!-- <table tableName="scr_screening_sound" domainObjectName="ScrScreeningSound" enableDeleteByExample="false"/>-->
<!-- <table tableName="ams_screen_wx_qr_code" domainObjectName="AmsScreenWxQrCode" enableDeleteByExample="false"/>-->
<table tableName="zytz_ems_eva_answer" domainObjectName="ZytzEmsEvaAnswer" enableDeleteByExample="false"/>
<table tableName="zytz_qms_scale" domainObjectName="ZytzQmsScale" enableDeleteByExample="false"/>
<table tableName="zytz_qms_scale_consti" domainObjectName="ZytzQmsScaleConsti" enableDeleteByExample="false"/>
<table tableName="zytz_qms_scale_consti_ques_rel" domainObjectName="ZytzQmsScaleConstiQuesRel" enableDeleteByExample="false"/>
<table tableName="zytz_qms_scale_consti_ref_score" domainObjectName="ZytzQmsScaleConstiRefScore" enableDeleteByExample="false"/>
<table tableName="zytz_qms_scale_consti_ysfa" domainObjectName="ZytzQmsScaleConstiYsfa" enableDeleteByExample="false"/>
<table tableName="zytz_qms_scale_question" domainObjectName="ZytzQmsScaleQuestion" enableDeleteByExample="false"/>
<table tableName="zytz_qms_scale_question_option" domainObjectName="ZytzQmsScaleQuestionOption" enableDeleteByExample="false"/>
<!-- <table tableName="zytz_ems_eva_answer" domainObjectName="ZytzEmsEvaAnswer" enableDeleteByExample="false"/>-->
<!-- <table tableName="zytz_qms_scale" domainObjectName="ZytzQmsScale" enableDeleteByExample="false"/>-->
<!-- <table tableName="zytz_qms_scale_consti" domainObjectName="ZytzQmsScaleConsti" enableDeleteByExample="false"/>-->
<!-- <table tableName="zytz_qms_scale_consti_ques_rel" domainObjectName="ZytzQmsScaleConstiQuesRel" enableDeleteByExample="false"/>-->
<!-- <table tableName="zytz_qms_scale_consti_ref_score" domainObjectName="ZytzQmsScaleConstiRefScore" enableDeleteByExample="false"/>-->
<!-- <table tableName="zytz_qms_scale_consti_ysfa" domainObjectName="ZytzQmsScaleConstiYsfa" enableDeleteByExample="false"/>-->
<!-- <table tableName="zytz_qms_scale_question" domainObjectName="ZytzQmsScaleQuestion" enableDeleteByExample="false"/>-->
<!-- <table tableName="zytz_qms_scale_question_option" domainObjectName="ZytzQmsScaleQuestionOption" enableDeleteByExample="false"/>-->
<table tableName="zytz_rms_report" domainObjectName="ZytzRmsReport" enableDeleteByExample="false"/>
<table tableName="zytz_rms_report_result" domainObjectName="ZytzRmsReportResult" enableDeleteByExample="false"/>
<table tableName="zytz_rms_report_ysjy" domainObjectName="ZytzRmsReportYsjy" enableDeleteByExample="false"/>
<!-- <table tableName="fms_followup_queue" domainObjectName="FmsFollowupQueue" enableDeleteByExample="false"/>-->
<!-- <table tableName="fms_followup_task" domainObjectName="FmsFollowupTask" enableDeleteByExample="false"/>-->
<!-- <table tableName="fms_patient_queue_relation" domainObjectName="FmsPatientQueueRelation" enableDeleteByExample="false"/>-->

7
acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/ZytzDto.java

@ -31,10 +31,9 @@ public class ZytzDto {
//诊疗档案id
@NotNull(message = "id不能为空")
private Long id;
//患者姓名
private String name;
//患者电话
private String phone;
//路径
@NotNull(message = "path不能为空")
private String path;
//是否总是重新生成(1总是重新生成),测试用
int rewrite = 0;
}

293
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/ZytzRmsReport.java

@ -0,0 +1,293 @@
package com.acupuncture.system.domain.po;
import java.io.Serializable;
import java.util.Date;
public class ZytzRmsReport implements Serializable {
private Long reportId;
private Long deptId;
private Long patientId;
private String patientName;
private String patientAge;
private String patientGender;
private String patientHeight;
private String patientWeight;
private String patientWaistline;
private Long evaId;
private String evaScaleCode;
private Date evaTime;
private String evaUsername;
private String evaNickname;
private String blh;
private String delFlag;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
private String patientNamePinyin;
private String patientNamePy;
private String patientBirthday;
private String patientIdcard;
private String patientPhone;
private static final long serialVersionUID = 1L;
public Long getReportId() {
return reportId;
}
public void setReportId(Long reportId) {
this.reportId = reportId;
}
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
public Long getPatientId() {
return patientId;
}
public void setPatientId(Long patientId) {
this.patientId = patientId;
}
public String getPatientName() {
return patientName;
}
public void setPatientName(String patientName) {
this.patientName = patientName == null ? null : patientName.trim();
}
public String getPatientAge() {
return patientAge;
}
public void setPatientAge(String patientAge) {
this.patientAge = patientAge == null ? null : patientAge.trim();
}
public String getPatientGender() {
return patientGender;
}
public void setPatientGender(String patientGender) {
this.patientGender = patientGender == null ? null : patientGender.trim();
}
public String getPatientHeight() {
return patientHeight;
}
public void setPatientHeight(String patientHeight) {
this.patientHeight = patientHeight == null ? null : patientHeight.trim();
}
public String getPatientWeight() {
return patientWeight;
}
public void setPatientWeight(String patientWeight) {
this.patientWeight = patientWeight == null ? null : patientWeight.trim();
}
public String getPatientWaistline() {
return patientWaistline;
}
public void setPatientWaistline(String patientWaistline) {
this.patientWaistline = patientWaistline == null ? null : patientWaistline.trim();
}
public Long getEvaId() {
return evaId;
}
public void setEvaId(Long evaId) {
this.evaId = evaId;
}
public String getEvaScaleCode() {
return evaScaleCode;
}
public void setEvaScaleCode(String evaScaleCode) {
this.evaScaleCode = evaScaleCode == null ? null : evaScaleCode.trim();
}
public Date getEvaTime() {
return evaTime;
}
public void setEvaTime(Date evaTime) {
this.evaTime = evaTime;
}
public String getEvaUsername() {
return evaUsername;
}
public void setEvaUsername(String evaUsername) {
this.evaUsername = evaUsername == null ? null : evaUsername.trim();
}
public String getEvaNickname() {
return evaNickname;
}
public void setEvaNickname(String evaNickname) {
this.evaNickname = evaNickname == null ? null : evaNickname.trim();
}
public String getBlh() {
return blh;
}
public void setBlh(String blh) {
this.blh = blh == null ? null : blh.trim();
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag == null ? null : delFlag.trim();
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getPatientNamePinyin() {
return patientNamePinyin;
}
public void setPatientNamePinyin(String patientNamePinyin) {
this.patientNamePinyin = patientNamePinyin == null ? null : patientNamePinyin.trim();
}
public String getPatientNamePy() {
return patientNamePy;
}
public void setPatientNamePy(String patientNamePy) {
this.patientNamePy = patientNamePy == null ? null : patientNamePy.trim();
}
public String getPatientBirthday() {
return patientBirthday;
}
public void setPatientBirthday(String patientBirthday) {
this.patientBirthday = patientBirthday == null ? null : patientBirthday.trim();
}
public String getPatientIdcard() {
return patientIdcard;
}
public void setPatientIdcard(String patientIdcard) {
this.patientIdcard = patientIdcard == null ? null : patientIdcard.trim();
}
public String getPatientPhone() {
return patientPhone;
}
public void setPatientPhone(String patientPhone) {
this.patientPhone = patientPhone == null ? null : patientPhone.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", reportId=").append(reportId);
sb.append(", deptId=").append(deptId);
sb.append(", patientId=").append(patientId);
sb.append(", patientName=").append(patientName);
sb.append(", patientAge=").append(patientAge);
sb.append(", patientGender=").append(patientGender);
sb.append(", patientHeight=").append(patientHeight);
sb.append(", patientWeight=").append(patientWeight);
sb.append(", patientWaistline=").append(patientWaistline);
sb.append(", evaId=").append(evaId);
sb.append(", evaScaleCode=").append(evaScaleCode);
sb.append(", evaTime=").append(evaTime);
sb.append(", evaUsername=").append(evaUsername);
sb.append(", evaNickname=").append(evaNickname);
sb.append(", blh=").append(blh);
sb.append(", delFlag=").append(delFlag);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", patientNamePinyin=").append(patientNamePinyin);
sb.append(", patientNamePy=").append(patientNamePy);
sb.append(", patientBirthday=").append(patientBirthday);
sb.append(", patientIdcard=").append(patientIdcard);
sb.append(", patientPhone=").append(patientPhone);
sb.append("]");
return sb.toString();
}
}

1881
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/ZytzRmsReportExample.java

File diff suppressed because it is too large

140
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/ZytzRmsReportResult.java

@ -0,0 +1,140 @@
package com.acupuncture.system.domain.po;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
public class ZytzRmsReportResult implements Serializable {
private Long resultId;
private Long reportId;
private String constiCode;
private String constiName;
private String constiLevel;
private BigDecimal constiScore;
private Integer mainFlag;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
private static final long serialVersionUID = 1L;
public Long getResultId() {
return resultId;
}
public void setResultId(Long resultId) {
this.resultId = resultId;
}
public Long getReportId() {
return reportId;
}
public void setReportId(Long reportId) {
this.reportId = reportId;
}
public String getConstiCode() {
return constiCode;
}
public void setConstiCode(String constiCode) {
this.constiCode = constiCode == null ? null : constiCode.trim();
}
public String getConstiName() {
return constiName;
}
public void setConstiName(String constiName) {
this.constiName = constiName == null ? null : constiName.trim();
}
public String getConstiLevel() {
return constiLevel;
}
public void setConstiLevel(String constiLevel) {
this.constiLevel = constiLevel == null ? null : constiLevel.trim();
}
public BigDecimal getConstiScore() {
return constiScore;
}
public void setConstiScore(BigDecimal constiScore) {
this.constiScore = constiScore;
}
public Integer getMainFlag() {
return mainFlag;
}
public void setMainFlag(Integer mainFlag) {
this.mainFlag = mainFlag;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", resultId=").append(resultId);
sb.append(", reportId=").append(reportId);
sb.append(", constiCode=").append(constiCode);
sb.append(", constiName=").append(constiName);
sb.append(", constiLevel=").append(constiLevel);
sb.append(", constiScore=").append(constiScore);
sb.append(", mainFlag=").append(mainFlag);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append("]");
return sb.toString();
}
}

912
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/ZytzRmsReportResultExample.java

@ -0,0 +1,912 @@
package com.acupuncture.system.domain.po;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ZytzRmsReportResultExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ZytzRmsReportResultExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andResultIdIsNull() {
addCriterion("result_id is null");
return (Criteria) this;
}
public Criteria andResultIdIsNotNull() {
addCriterion("result_id is not null");
return (Criteria) this;
}
public Criteria andResultIdEqualTo(Long value) {
addCriterion("result_id =", value, "resultId");
return (Criteria) this;
}
public Criteria andResultIdNotEqualTo(Long value) {
addCriterion("result_id <>", value, "resultId");
return (Criteria) this;
}
public Criteria andResultIdGreaterThan(Long value) {
addCriterion("result_id >", value, "resultId");
return (Criteria) this;
}
public Criteria andResultIdGreaterThanOrEqualTo(Long value) {
addCriterion("result_id >=", value, "resultId");
return (Criteria) this;
}
public Criteria andResultIdLessThan(Long value) {
addCriterion("result_id <", value, "resultId");
return (Criteria) this;
}
public Criteria andResultIdLessThanOrEqualTo(Long value) {
addCriterion("result_id <=", value, "resultId");
return (Criteria) this;
}
public Criteria andResultIdIn(List<Long> values) {
addCriterion("result_id in", values, "resultId");
return (Criteria) this;
}
public Criteria andResultIdNotIn(List<Long> values) {
addCriterion("result_id not in", values, "resultId");
return (Criteria) this;
}
public Criteria andResultIdBetween(Long value1, Long value2) {
addCriterion("result_id between", value1, value2, "resultId");
return (Criteria) this;
}
public Criteria andResultIdNotBetween(Long value1, Long value2) {
addCriterion("result_id not between", value1, value2, "resultId");
return (Criteria) this;
}
public Criteria andReportIdIsNull() {
addCriterion("report_id is null");
return (Criteria) this;
}
public Criteria andReportIdIsNotNull() {
addCriterion("report_id is not null");
return (Criteria) this;
}
public Criteria andReportIdEqualTo(Long value) {
addCriterion("report_id =", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdNotEqualTo(Long value) {
addCriterion("report_id <>", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdGreaterThan(Long value) {
addCriterion("report_id >", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdGreaterThanOrEqualTo(Long value) {
addCriterion("report_id >=", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdLessThan(Long value) {
addCriterion("report_id <", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdLessThanOrEqualTo(Long value) {
addCriterion("report_id <=", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdIn(List<Long> values) {
addCriterion("report_id in", values, "reportId");
return (Criteria) this;
}
public Criteria andReportIdNotIn(List<Long> values) {
addCriterion("report_id not in", values, "reportId");
return (Criteria) this;
}
public Criteria andReportIdBetween(Long value1, Long value2) {
addCriterion("report_id between", value1, value2, "reportId");
return (Criteria) this;
}
public Criteria andReportIdNotBetween(Long value1, Long value2) {
addCriterion("report_id not between", value1, value2, "reportId");
return (Criteria) this;
}
public Criteria andConstiCodeIsNull() {
addCriterion("consti_code is null");
return (Criteria) this;
}
public Criteria andConstiCodeIsNotNull() {
addCriterion("consti_code is not null");
return (Criteria) this;
}
public Criteria andConstiCodeEqualTo(String value) {
addCriterion("consti_code =", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeNotEqualTo(String value) {
addCriterion("consti_code <>", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeGreaterThan(String value) {
addCriterion("consti_code >", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeGreaterThanOrEqualTo(String value) {
addCriterion("consti_code >=", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeLessThan(String value) {
addCriterion("consti_code <", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeLessThanOrEqualTo(String value) {
addCriterion("consti_code <=", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeLike(String value) {
addCriterion("consti_code like", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeNotLike(String value) {
addCriterion("consti_code not like", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeIn(List<String> values) {
addCriterion("consti_code in", values, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeNotIn(List<String> values) {
addCriterion("consti_code not in", values, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeBetween(String value1, String value2) {
addCriterion("consti_code between", value1, value2, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeNotBetween(String value1, String value2) {
addCriterion("consti_code not between", value1, value2, "constiCode");
return (Criteria) this;
}
public Criteria andConstiNameIsNull() {
addCriterion("consti_name is null");
return (Criteria) this;
}
public Criteria andConstiNameIsNotNull() {
addCriterion("consti_name is not null");
return (Criteria) this;
}
public Criteria andConstiNameEqualTo(String value) {
addCriterion("consti_name =", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameNotEqualTo(String value) {
addCriterion("consti_name <>", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameGreaterThan(String value) {
addCriterion("consti_name >", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameGreaterThanOrEqualTo(String value) {
addCriterion("consti_name >=", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameLessThan(String value) {
addCriterion("consti_name <", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameLessThanOrEqualTo(String value) {
addCriterion("consti_name <=", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameLike(String value) {
addCriterion("consti_name like", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameNotLike(String value) {
addCriterion("consti_name not like", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameIn(List<String> values) {
addCriterion("consti_name in", values, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameNotIn(List<String> values) {
addCriterion("consti_name not in", values, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameBetween(String value1, String value2) {
addCriterion("consti_name between", value1, value2, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameNotBetween(String value1, String value2) {
addCriterion("consti_name not between", value1, value2, "constiName");
return (Criteria) this;
}
public Criteria andConstiLevelIsNull() {
addCriterion("consti_level is null");
return (Criteria) this;
}
public Criteria andConstiLevelIsNotNull() {
addCriterion("consti_level is not null");
return (Criteria) this;
}
public Criteria andConstiLevelEqualTo(String value) {
addCriterion("consti_level =", value, "constiLevel");
return (Criteria) this;
}
public Criteria andConstiLevelNotEqualTo(String value) {
addCriterion("consti_level <>", value, "constiLevel");
return (Criteria) this;
}
public Criteria andConstiLevelGreaterThan(String value) {
addCriterion("consti_level >", value, "constiLevel");
return (Criteria) this;
}
public Criteria andConstiLevelGreaterThanOrEqualTo(String value) {
addCriterion("consti_level >=", value, "constiLevel");
return (Criteria) this;
}
public Criteria andConstiLevelLessThan(String value) {
addCriterion("consti_level <", value, "constiLevel");
return (Criteria) this;
}
public Criteria andConstiLevelLessThanOrEqualTo(String value) {
addCriterion("consti_level <=", value, "constiLevel");
return (Criteria) this;
}
public Criteria andConstiLevelLike(String value) {
addCriterion("consti_level like", value, "constiLevel");
return (Criteria) this;
}
public Criteria andConstiLevelNotLike(String value) {
addCriterion("consti_level not like", value, "constiLevel");
return (Criteria) this;
}
public Criteria andConstiLevelIn(List<String> values) {
addCriterion("consti_level in", values, "constiLevel");
return (Criteria) this;
}
public Criteria andConstiLevelNotIn(List<String> values) {
addCriterion("consti_level not in", values, "constiLevel");
return (Criteria) this;
}
public Criteria andConstiLevelBetween(String value1, String value2) {
addCriterion("consti_level between", value1, value2, "constiLevel");
return (Criteria) this;
}
public Criteria andConstiLevelNotBetween(String value1, String value2) {
addCriterion("consti_level not between", value1, value2, "constiLevel");
return (Criteria) this;
}
public Criteria andConstiScoreIsNull() {
addCriterion("consti_score is null");
return (Criteria) this;
}
public Criteria andConstiScoreIsNotNull() {
addCriterion("consti_score is not null");
return (Criteria) this;
}
public Criteria andConstiScoreEqualTo(BigDecimal value) {
addCriterion("consti_score =", value, "constiScore");
return (Criteria) this;
}
public Criteria andConstiScoreNotEqualTo(BigDecimal value) {
addCriterion("consti_score <>", value, "constiScore");
return (Criteria) this;
}
public Criteria andConstiScoreGreaterThan(BigDecimal value) {
addCriterion("consti_score >", value, "constiScore");
return (Criteria) this;
}
public Criteria andConstiScoreGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("consti_score >=", value, "constiScore");
return (Criteria) this;
}
public Criteria andConstiScoreLessThan(BigDecimal value) {
addCriterion("consti_score <", value, "constiScore");
return (Criteria) this;
}
public Criteria andConstiScoreLessThanOrEqualTo(BigDecimal value) {
addCriterion("consti_score <=", value, "constiScore");
return (Criteria) this;
}
public Criteria andConstiScoreIn(List<BigDecimal> values) {
addCriterion("consti_score in", values, "constiScore");
return (Criteria) this;
}
public Criteria andConstiScoreNotIn(List<BigDecimal> values) {
addCriterion("consti_score not in", values, "constiScore");
return (Criteria) this;
}
public Criteria andConstiScoreBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("consti_score between", value1, value2, "constiScore");
return (Criteria) this;
}
public Criteria andConstiScoreNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("consti_score not between", value1, value2, "constiScore");
return (Criteria) this;
}
public Criteria andMainFlagIsNull() {
addCriterion("main_flag is null");
return (Criteria) this;
}
public Criteria andMainFlagIsNotNull() {
addCriterion("main_flag is not null");
return (Criteria) this;
}
public Criteria andMainFlagEqualTo(Integer value) {
addCriterion("main_flag =", value, "mainFlag");
return (Criteria) this;
}
public Criteria andMainFlagNotEqualTo(Integer value) {
addCriterion("main_flag <>", value, "mainFlag");
return (Criteria) this;
}
public Criteria andMainFlagGreaterThan(Integer value) {
addCriterion("main_flag >", value, "mainFlag");
return (Criteria) this;
}
public Criteria andMainFlagGreaterThanOrEqualTo(Integer value) {
addCriterion("main_flag >=", value, "mainFlag");
return (Criteria) this;
}
public Criteria andMainFlagLessThan(Integer value) {
addCriterion("main_flag <", value, "mainFlag");
return (Criteria) this;
}
public Criteria andMainFlagLessThanOrEqualTo(Integer value) {
addCriterion("main_flag <=", value, "mainFlag");
return (Criteria) this;
}
public Criteria andMainFlagIn(List<Integer> values) {
addCriterion("main_flag in", values, "mainFlag");
return (Criteria) this;
}
public Criteria andMainFlagNotIn(List<Integer> values) {
addCriterion("main_flag not in", values, "mainFlag");
return (Criteria) this;
}
public Criteria andMainFlagBetween(Integer value1, Integer value2) {
addCriterion("main_flag between", value1, value2, "mainFlag");
return (Criteria) this;
}
public Criteria andMainFlagNotBetween(Integer value1, Integer value2) {
addCriterion("main_flag not between", value1, value2, "mainFlag");
return (Criteria) this;
}
public Criteria andCreateByIsNull() {
addCriterion("create_by is null");
return (Criteria) this;
}
public Criteria andCreateByIsNotNull() {
addCriterion("create_by is not null");
return (Criteria) this;
}
public Criteria andCreateByEqualTo(String value) {
addCriterion("create_by =", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotEqualTo(String value) {
addCriterion("create_by <>", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThan(String value) {
addCriterion("create_by >", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThanOrEqualTo(String value) {
addCriterion("create_by >=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThan(String value) {
addCriterion("create_by <", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThanOrEqualTo(String value) {
addCriterion("create_by <=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLike(String value) {
addCriterion("create_by like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotLike(String value) {
addCriterion("create_by not like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByIn(List<String> values) {
addCriterion("create_by in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotIn(List<String> values) {
addCriterion("create_by not in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByBetween(String value1, String value2) {
addCriterion("create_by between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotBetween(String value1, String value2) {
addCriterion("create_by not between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateByIsNull() {
addCriterion("update_by is null");
return (Criteria) this;
}
public Criteria andUpdateByIsNotNull() {
addCriterion("update_by is not null");
return (Criteria) this;
}
public Criteria andUpdateByEqualTo(String value) {
addCriterion("update_by =", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotEqualTo(String value) {
addCriterion("update_by <>", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThan(String value) {
addCriterion("update_by >", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
addCriterion("update_by >=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThan(String value) {
addCriterion("update_by <", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThanOrEqualTo(String value) {
addCriterion("update_by <=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLike(String value) {
addCriterion("update_by like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotLike(String value) {
addCriterion("update_by not like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByIn(List<String> values) {
addCriterion("update_by in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotIn(List<String> values) {
addCriterion("update_by not in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByBetween(String value1, String value2) {
addCriterion("update_by between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotBetween(String value1, String value2) {
addCriterion("update_by not between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

117
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/ZytzRmsReportYsjy.java

@ -0,0 +1,117 @@
package com.acupuncture.system.domain.po;
import java.io.Serializable;
import java.util.Date;
public class ZytzRmsReportYsjy implements Serializable {
private Long ysjyId;
private Long reportId;
private String constiCode;
private String constiName;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
private String constiYsjy;
private static final long serialVersionUID = 1L;
public Long getYsjyId() {
return ysjyId;
}
public void setYsjyId(Long ysjyId) {
this.ysjyId = ysjyId;
}
public Long getReportId() {
return reportId;
}
public void setReportId(Long reportId) {
this.reportId = reportId;
}
public String getConstiCode() {
return constiCode;
}
public void setConstiCode(String constiCode) {
this.constiCode = constiCode == null ? null : constiCode.trim();
}
public String getConstiName() {
return constiName;
}
public void setConstiName(String constiName) {
this.constiName = constiName == null ? null : constiName.trim();
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getConstiYsjy() {
return constiYsjy;
}
public void setConstiYsjy(String constiYsjy) {
this.constiYsjy = constiYsjy == null ? null : constiYsjy.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", ysjyId=").append(ysjyId);
sb.append(", reportId=").append(reportId);
sb.append(", constiCode=").append(constiCode);
sb.append(", constiName=").append(constiName);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", constiYsjy=").append(constiYsjy);
sb.append("]");
return sb.toString();
}
}

721
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/ZytzRmsReportYsjyExample.java

@ -0,0 +1,721 @@
package com.acupuncture.system.domain.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ZytzRmsReportYsjyExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ZytzRmsReportYsjyExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andYsjyIdIsNull() {
addCriterion("ysjy_id is null");
return (Criteria) this;
}
public Criteria andYsjyIdIsNotNull() {
addCriterion("ysjy_id is not null");
return (Criteria) this;
}
public Criteria andYsjyIdEqualTo(Long value) {
addCriterion("ysjy_id =", value, "ysjyId");
return (Criteria) this;
}
public Criteria andYsjyIdNotEqualTo(Long value) {
addCriterion("ysjy_id <>", value, "ysjyId");
return (Criteria) this;
}
public Criteria andYsjyIdGreaterThan(Long value) {
addCriterion("ysjy_id >", value, "ysjyId");
return (Criteria) this;
}
public Criteria andYsjyIdGreaterThanOrEqualTo(Long value) {
addCriterion("ysjy_id >=", value, "ysjyId");
return (Criteria) this;
}
public Criteria andYsjyIdLessThan(Long value) {
addCriterion("ysjy_id <", value, "ysjyId");
return (Criteria) this;
}
public Criteria andYsjyIdLessThanOrEqualTo(Long value) {
addCriterion("ysjy_id <=", value, "ysjyId");
return (Criteria) this;
}
public Criteria andYsjyIdIn(List<Long> values) {
addCriterion("ysjy_id in", values, "ysjyId");
return (Criteria) this;
}
public Criteria andYsjyIdNotIn(List<Long> values) {
addCriterion("ysjy_id not in", values, "ysjyId");
return (Criteria) this;
}
public Criteria andYsjyIdBetween(Long value1, Long value2) {
addCriterion("ysjy_id between", value1, value2, "ysjyId");
return (Criteria) this;
}
public Criteria andYsjyIdNotBetween(Long value1, Long value2) {
addCriterion("ysjy_id not between", value1, value2, "ysjyId");
return (Criteria) this;
}
public Criteria andReportIdIsNull() {
addCriterion("report_id is null");
return (Criteria) this;
}
public Criteria andReportIdIsNotNull() {
addCriterion("report_id is not null");
return (Criteria) this;
}
public Criteria andReportIdEqualTo(Long value) {
addCriterion("report_id =", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdNotEqualTo(Long value) {
addCriterion("report_id <>", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdGreaterThan(Long value) {
addCriterion("report_id >", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdGreaterThanOrEqualTo(Long value) {
addCriterion("report_id >=", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdLessThan(Long value) {
addCriterion("report_id <", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdLessThanOrEqualTo(Long value) {
addCriterion("report_id <=", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdIn(List<Long> values) {
addCriterion("report_id in", values, "reportId");
return (Criteria) this;
}
public Criteria andReportIdNotIn(List<Long> values) {
addCriterion("report_id not in", values, "reportId");
return (Criteria) this;
}
public Criteria andReportIdBetween(Long value1, Long value2) {
addCriterion("report_id between", value1, value2, "reportId");
return (Criteria) this;
}
public Criteria andReportIdNotBetween(Long value1, Long value2) {
addCriterion("report_id not between", value1, value2, "reportId");
return (Criteria) this;
}
public Criteria andConstiCodeIsNull() {
addCriterion("consti_code is null");
return (Criteria) this;
}
public Criteria andConstiCodeIsNotNull() {
addCriterion("consti_code is not null");
return (Criteria) this;
}
public Criteria andConstiCodeEqualTo(String value) {
addCriterion("consti_code =", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeNotEqualTo(String value) {
addCriterion("consti_code <>", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeGreaterThan(String value) {
addCriterion("consti_code >", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeGreaterThanOrEqualTo(String value) {
addCriterion("consti_code >=", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeLessThan(String value) {
addCriterion("consti_code <", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeLessThanOrEqualTo(String value) {
addCriterion("consti_code <=", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeLike(String value) {
addCriterion("consti_code like", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeNotLike(String value) {
addCriterion("consti_code not like", value, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeIn(List<String> values) {
addCriterion("consti_code in", values, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeNotIn(List<String> values) {
addCriterion("consti_code not in", values, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeBetween(String value1, String value2) {
addCriterion("consti_code between", value1, value2, "constiCode");
return (Criteria) this;
}
public Criteria andConstiCodeNotBetween(String value1, String value2) {
addCriterion("consti_code not between", value1, value2, "constiCode");
return (Criteria) this;
}
public Criteria andConstiNameIsNull() {
addCriterion("consti_name is null");
return (Criteria) this;
}
public Criteria andConstiNameIsNotNull() {
addCriterion("consti_name is not null");
return (Criteria) this;
}
public Criteria andConstiNameEqualTo(String value) {
addCriterion("consti_name =", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameNotEqualTo(String value) {
addCriterion("consti_name <>", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameGreaterThan(String value) {
addCriterion("consti_name >", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameGreaterThanOrEqualTo(String value) {
addCriterion("consti_name >=", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameLessThan(String value) {
addCriterion("consti_name <", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameLessThanOrEqualTo(String value) {
addCriterion("consti_name <=", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameLike(String value) {
addCriterion("consti_name like", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameNotLike(String value) {
addCriterion("consti_name not like", value, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameIn(List<String> values) {
addCriterion("consti_name in", values, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameNotIn(List<String> values) {
addCriterion("consti_name not in", values, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameBetween(String value1, String value2) {
addCriterion("consti_name between", value1, value2, "constiName");
return (Criteria) this;
}
public Criteria andConstiNameNotBetween(String value1, String value2) {
addCriterion("consti_name not between", value1, value2, "constiName");
return (Criteria) this;
}
public Criteria andCreateByIsNull() {
addCriterion("create_by is null");
return (Criteria) this;
}
public Criteria andCreateByIsNotNull() {
addCriterion("create_by is not null");
return (Criteria) this;
}
public Criteria andCreateByEqualTo(String value) {
addCriterion("create_by =", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotEqualTo(String value) {
addCriterion("create_by <>", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThan(String value) {
addCriterion("create_by >", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThanOrEqualTo(String value) {
addCriterion("create_by >=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThan(String value) {
addCriterion("create_by <", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThanOrEqualTo(String value) {
addCriterion("create_by <=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLike(String value) {
addCriterion("create_by like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotLike(String value) {
addCriterion("create_by not like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByIn(List<String> values) {
addCriterion("create_by in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotIn(List<String> values) {
addCriterion("create_by not in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByBetween(String value1, String value2) {
addCriterion("create_by between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotBetween(String value1, String value2) {
addCriterion("create_by not between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateByIsNull() {
addCriterion("update_by is null");
return (Criteria) this;
}
public Criteria andUpdateByIsNotNull() {
addCriterion("update_by is not null");
return (Criteria) this;
}
public Criteria andUpdateByEqualTo(String value) {
addCriterion("update_by =", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotEqualTo(String value) {
addCriterion("update_by <>", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThan(String value) {
addCriterion("update_by >", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
addCriterion("update_by >=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThan(String value) {
addCriterion("update_by <", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThanOrEqualTo(String value) {
addCriterion("update_by <=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLike(String value) {
addCriterion("update_by like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotLike(String value) {
addCriterion("update_by not like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByIn(List<String> values) {
addCriterion("update_by in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotIn(List<String> values) {
addCriterion("update_by not in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByBetween(String value1, String value2) {
addCriterion("update_by between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotBetween(String value1, String value2) {
addCriterion("update_by not between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

29
acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/ZytzVo.java

@ -391,4 +391,33 @@ public class ZytzVo {
return result.toString();
}
}
@Data
public static class EvaResult {
//测评id
private Long evaId;
//量表代码
private String scaleCode;
//量表名称
private String scaleName;
//体质代码
private String constiCode;
//体质名称
private String constiName;
//原始分
private BigDecimal score;
//转化分
private BigDecimal zhScore;
//题目数量
private Integer quesNum;
//体质level
private String constiLevel;
//是否主体质
private Integer mainFlag;
public BigDecimal getScore() {
return score == null ? BigDecimal.ZERO : score;
}
}
}

18
acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/ZytzDao.java

@ -2,6 +2,7 @@ package com.acupuncture.system.persist.dao;
import com.acupuncture.system.domain.dto.AdminDataSourceDto;
import com.acupuncture.system.domain.po.ZytzEmsEvaAnswer;
import com.acupuncture.system.domain.po.ZytzRmsReportResult;
import com.acupuncture.system.domain.vo.AdminDataSourceVo;
import com.acupuncture.system.domain.vo.ZytzVo;
import org.apache.ibatis.annotations.Param;
@ -59,6 +60,21 @@ public interface ZytzDao {
*/
void batchInsertAnswer(@Param("list") List<ZytzEmsEvaAnswer> answerList);
/**
* 批量插入reportResult
*
* @param reportResultList
*/
void batchInsertReportResult(@Param("list") List<ZytzRmsReportResult> reportResultList);
/**
* 查询测评分数
*
* @param evaId
* @return
*/
List<ZytzVo.EvaResult> countReportResult(@Param("evaId") Long evaId);
/**
* 查询养生建议
*
@ -74,7 +90,7 @@ public interface ZytzDao {
* @param evaId
* @return
*/
// ZytzVo.ReportView reportView(@Param("evaId") Long evaId);
ZytzVo.ReportView reportView(@Param("evaId") Long evaId);
/**
* 查询测评列表

28
acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/ZytzRmsReportMapper.java

@ -0,0 +1,28 @@
package com.acupuncture.system.persist.mapper;
import com.acupuncture.system.domain.po.ZytzRmsReport;
import com.acupuncture.system.domain.po.ZytzRmsReportExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ZytzRmsReportMapper {
long countByExample(ZytzRmsReportExample example);
int deleteByPrimaryKey(Long reportId);
int insert(ZytzRmsReport record);
int insertSelective(ZytzRmsReport record);
List<ZytzRmsReport> selectByExample(ZytzRmsReportExample example);
ZytzRmsReport selectByPrimaryKey(Long reportId);
int updateByExampleSelective(@Param("record") ZytzRmsReport record, @Param("example") ZytzRmsReportExample example);
int updateByExample(@Param("record") ZytzRmsReport record, @Param("example") ZytzRmsReportExample example);
int updateByPrimaryKeySelective(ZytzRmsReport record);
int updateByPrimaryKey(ZytzRmsReport record);
}

28
acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/ZytzRmsReportResultMapper.java

@ -0,0 +1,28 @@
package com.acupuncture.system.persist.mapper;
import com.acupuncture.system.domain.po.ZytzRmsReportResult;
import com.acupuncture.system.domain.po.ZytzRmsReportResultExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ZytzRmsReportResultMapper {
long countByExample(ZytzRmsReportResultExample example);
int deleteByPrimaryKey(Long resultId);
int insert(ZytzRmsReportResult record);
int insertSelective(ZytzRmsReportResult record);
List<ZytzRmsReportResult> selectByExample(ZytzRmsReportResultExample example);
ZytzRmsReportResult selectByPrimaryKey(Long resultId);
int updateByExampleSelective(@Param("record") ZytzRmsReportResult record, @Param("example") ZytzRmsReportResultExample example);
int updateByExample(@Param("record") ZytzRmsReportResult record, @Param("example") ZytzRmsReportResultExample example);
int updateByPrimaryKeySelective(ZytzRmsReportResult record);
int updateByPrimaryKey(ZytzRmsReportResult record);
}

34
acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/ZytzRmsReportYsjyMapper.java

@ -0,0 +1,34 @@
package com.acupuncture.system.persist.mapper;
import com.acupuncture.system.domain.po.ZytzRmsReportYsjy;
import com.acupuncture.system.domain.po.ZytzRmsReportYsjyExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ZytzRmsReportYsjyMapper {
long countByExample(ZytzRmsReportYsjyExample example);
int deleteByPrimaryKey(Long ysjyId);
int insert(ZytzRmsReportYsjy record);
int insertSelective(ZytzRmsReportYsjy record);
List<ZytzRmsReportYsjy> selectByExampleWithBLOBs(ZytzRmsReportYsjyExample example);
List<ZytzRmsReportYsjy> selectByExample(ZytzRmsReportYsjyExample example);
ZytzRmsReportYsjy selectByPrimaryKey(Long ysjyId);
int updateByExampleSelective(@Param("record") ZytzRmsReportYsjy record, @Param("example") ZytzRmsReportYsjyExample example);
int updateByExampleWithBLOBs(@Param("record") ZytzRmsReportYsjy record, @Param("example") ZytzRmsReportYsjyExample example);
int updateByExample(@Param("record") ZytzRmsReportYsjy record, @Param("example") ZytzRmsReportYsjyExample example);
int updateByPrimaryKeySelective(ZytzRmsReportYsjy record);
int updateByPrimaryKeyWithBLOBs(ZytzRmsReportYsjy record);
int updateByPrimaryKey(ZytzRmsReportYsjy record);
}

14
acupuncture-system/src/main/java/com/acupuncture/system/service/ZytzService.java

@ -33,4 +33,18 @@ public interface ZytzService {
* @return
*/
Integer evaQuestionSubmit(ZytzDto.EvaQuestionSubmit param);
/**
* 完成测评生成报告单
* @param param
* @return
*/
Integer evaComplete(ZytzDto.EvaComplete param);
/**
* 查看报告单
* @param param
* @return
*/
ZytzVo.ReportView reportView(ZytzDto.ReportView param);
}

232
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ZytzServiceImpl.java

@ -2,18 +2,23 @@ package com.acupuncture.system.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.qrcode.QrCodeUtil;
import cn.hutool.http.HtmlUtil;
import com.acupuncture.common.config.RuoYiConfig;
import com.acupuncture.common.exception.base.BaseException;
import com.acupuncture.common.utils.SecurityUtils;
import com.acupuncture.common.utils.uuid.IdUtils;
import com.acupuncture.system.domain.dto.ZytzDto;
import com.acupuncture.system.domain.po.ZytzEmsEvaAnswer;
import com.acupuncture.system.domain.po.*;
import com.acupuncture.system.domain.vo.ZytzVo;
import com.acupuncture.system.persist.dao.ZytzDao;
import com.acupuncture.system.persist.mapper.PmsTreatmentMapper;
import com.acupuncture.system.persist.mapper.ZytzRmsReportMapper;
import com.acupuncture.system.service.ZytzService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
@ -22,7 +27,9 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.validation.constraints.NotNull;
import java.io.File;
import java.math.BigDecimal;
import java.util.List;
/**
@ -34,25 +41,25 @@ import java.util.List;
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class ZytzServiceImpl implements ZytzService {
@Value("${zytz.mobileUrl}")
private String zytzMobileUrl;
@Resource
private ZytzDao zytzDao;
@Resource
private ZytzRmsReportMapper zytzRmsReportMapper;
@Resource
private PmsTreatmentMapper pmsTreatmentMapper;
@Override
public String getZytzQrcode(ZytzDto.ZytzQrcode dto, Long tenantId) {
String qrcodePath = RuoYiConfig.getZytzQrcodePath() + "/" + dto.getId() + ".png";
String qrcodeUrl = RuoYiConfig.getZytzQrcodeUrl() + "/" + dto.getId() + ".png";
String url = StrUtil.format("{}?id={}&name={}&phone={}&tenantId={}",
zytzMobileUrl, dto.getId(), dto.getName(), dto.getPhone(), tenantId);
String url = dto.getPath();
log.info("qrcodePath:{}", qrcodePath);
log.info("qrcodeUrl:{}", qrcodeUrl);
log.info("url:{}", url);
//存在则直接返回
if (FileUtil.exist(qrcodePath) && dto.getRewrite() != 1) {
log.info("zytz qrcode exists.");
log.info("zytz qrcode exists,return it");
return qrcodeUrl;
}
@ -82,10 +89,219 @@ public class ZytzServiceImpl implements ZytzService {
answer.setOptionCode(question.getOptionCode());
answer.setOptionName(question.getOptionName());
answer.setOptionScore(Convert.toBigDecimal(question.getOptionScore()));
// answer.setCreateBy(SecurityUtils.getUsername());
answerList.add(answer);
}
zytzDao.batchInsertAnswer(answerList);
return 0;
}
@Override
public Integer evaComplete(ZytzDto.EvaComplete param) {
//1.设置测评状态为完成
// PmsTreatment emsEvaluation = new PmsTreatment();
// emsEvaluation.setId(param.getEvaId());
// emsEvaluation.setStatus((byte) 1);
// emsEvaluation.setUpdateBy(SecurityUtils.getUsername());
// emsEvaluationMapper.updateByPrimaryKeySelective(emsEvaluation);
//2.删除之前的报告单
ZytzRmsReportExample reportExample = new ZytzRmsReportExample();
reportExample.createCriteria().andEvaIdEqualTo(param.getEvaId());
ZytzRmsReport willDeletedReport = new ZytzRmsReport();
willDeletedReport.setDelFlag("1");
// willDeletedReport.setUpdateBy(SecurityUtils.getUsername());
zytzRmsReportMapper.updateByExampleSelective(willDeletedReport, reportExample);
//3.生成新的报告单
//3.1 生成报告单
PmsTreatment emsEvaluation = pmsTreatmentMapper.selectByPrimaryKey(param.getEvaId());
ZytzRmsReport rmsReport = new ZytzRmsReport();
rmsReport.setReportId(IdUtil.getSnowflakeNextId());
// rmsReport.setDeptId(SecurityUtils.getDeptId());
rmsReport.setEvaId(param.getEvaId());
rmsReport.setEvaUsername("");
rmsReport.setEvaNickname("");
rmsReport.setEvaScaleCode("TZBS_LN");
rmsReport.setEvaTime(DateUtil.date());
rmsReport.setPatientId(emsEvaluation.getPatientId());
rmsReport.setPatientName(emsEvaluation.getName());
rmsReport.setPatientNamePinyin(emsEvaluation.getPinyinFull());
rmsReport.setPatientNamePy(emsEvaluation.getPinyinSimple());
rmsReport.setPatientBirthday(emsEvaluation.getBirthDate() == null ? null : DateUtil.format(emsEvaluation.getBirthDate(), "yyyy-MM-dd"));
rmsReport.setPatientAge(emsEvaluation.getAge() + "");
rmsReport.setPatientGender(emsEvaluation.getGender() + "");
rmsReport.setPatientHeight("");
rmsReport.setPatientWeight("");
rmsReport.setPatientWaistline("");
rmsReport.setPatientIdcard(emsEvaluation.getIdCard());
rmsReport.setPatientPhone(emsEvaluation.getPhone());
// rmsReport.setCreateBy(SecurityUtils.getUsername());
zytzRmsReportMapper.insertSelective(rmsReport);
//3.2 生成报告单辨识结果
List<ZytzVo.EvaResult> resultList = countReportResult(param.getEvaId(), rmsReport.getReportId());
List<ZytzRmsReportResult> reportResultList = CollectionUtil.newArrayList();
for (ZytzVo.EvaResult resultVo : resultList) {
//转换为RmsReportResult对象
ZytzRmsReportResult reportResult = new ZytzRmsReportResult();
reportResult.setResultId(IdUtil.getSnowflakeNextId());
reportResult.setReportId(rmsReport.getReportId());
reportResult.setConstiCode(resultVo.getConstiCode());
reportResult.setConstiName(resultVo.getConstiName());
reportResult.setConstiLevel(resultVo.getConstiLevel());
reportResult.setConstiScore(resultVo.getZhScore());
reportResult.setMainFlag(resultVo.getMainFlag());
// reportResult.setCreateBy(SecurityUtils.getUsername());
reportResultList.add(reportResult);
}
zytzDao.batchInsertReportResult(reportResultList);
//3.3 生成养生建议
// for (RmsReportResult result : reportResultList) {
// if (result.getConstiLevel().equals("20")) {
// continue;
// }
// RmsReportYsjy rmsReportYsjy = new RmsReportYsjy();
// rmsReportYsjy.setYsjyId(IdUtils.nextSnowFlakeId());
// rmsReportYsjy.setReportId(result.getReportId());
// rmsReportYsjy.setConstiCode(result.getConstiCode());
// rmsReportYsjy.setConstiName(result.getConstiName());
// rmsReportYsjy.setConstiYsjy(
// clientEvaDao.queryYsjy(result.getConstiCode(), emsEvaluation.getDeptId())
// );
// rmsReportYsjyMapper.insertSelective(rmsReportYsjy);
// }
return 0;
}
private List<ZytzVo.EvaResult> countReportResult(@NotNull Long evaId, Long reportId) {
//1.查询体质分数(原始分)
List<ZytzVo.EvaResult> resultList = zytzDao.countReportResult(evaId);
if (CollectionUtil.isEmpty(resultList)) {
throw new BaseException("未找到体质信息");
}
//2.计算level和mainflag
if ("TZBS_BZ".equals(resultList.get(0).getScaleCode())) {
//标准版体质辨识
// countReportResult_TZBS_BZ(resultList);
} else if ("TZBS_LN".equals(resultList.get(0).getScaleCode())) {
//老年版体质辨识
countReportResult_TZBS_LN(resultList);
}
return resultList;
}
private void countReportResult_TZBS_LN(List<ZytzVo.EvaResult> resultList) {
//1.根据原始分、题目数量计算转化分
for (ZytzVo.EvaResult evaResult : resultList) {
//转化分 = 原始分
evaResult.setZhScore(
evaResult.getScore()
);
}
//2.计算平和质level
boolean other8LessThan9Flag = true, other8LessThan11Flag = true;
ZytzVo.EvaResult constiAResult = null;
for (ZytzVo.EvaResult r : resultList) {
if ("TZBS_LN_A".equals(r.getConstiCode())) {
constiAResult = r;
} else {
if (r.getZhScore().compareTo(BigDecimal.valueOf(9)) >= 0) {
other8LessThan9Flag = false;
}
if (r.getZhScore().compareTo(BigDecimal.valueOf(11)) >= 0) {
other8LessThan11Flag = false;
}
}
}
if (constiAResult == null) {
throw new BaseException("系统错误,未找到平和体质");
}
//转化分>=17分,其他体质均<9分,是平和质
//转化分>=17分,其他体质均<11分,基本是平和质
//其他情况,不是平和质
//默认为否
constiAResult.setConstiLevel("20");
if (constiAResult.getZhScore().compareTo(new BigDecimal(17)) >= 0) {
if (other8LessThan9Flag) {
//是
constiAResult.setConstiLevel("00");
} else if (other8LessThan11Flag) {
//基本是
constiAResult.setConstiLevel("10");
} else {
//否
constiAResult.setConstiLevel("20");
}
}
//3.计算其他体质level
for (ZytzVo.EvaResult r : resultList) {
if ("TZBS_LN_A".equals(r.getConstiCode())) {
continue;
}
if (r.getZhScore().compareTo(new BigDecimal(11)) >= 0) {
//是
r.setConstiLevel("00");
} else if (r.getZhScore().compareTo(new BigDecimal(9)) >= 0) {
//倾向是
r.setConstiLevel("11");
} else {
//否
r.setConstiLevel("20");
}
}
//4.设置mainflag字段
//优先选择平和质为主体质
//选择偏颇体质中最高分为主体质
for (ZytzVo.EvaResult result : resultList) {
result.setMainFlag(0);
}
ZytzVo.EvaResult ppResult = null;
for (ZytzVo.EvaResult result : resultList) {
if (result.getConstiLevel().equals("20")) {
//默认所有体质都置为0
result.setMainFlag(0);
//跳过所有level为否的体质
continue;
}
//先判断平和质
if ("TZBS_LN_A".equals(result.getConstiCode())) {
result.setMainFlag(1);
break;
}
//先把非20的所有体质都设置为兼夹体质
result.setMainFlag(2);
//找出兼夹体质中得分最高的
if (ppResult == null) {
ppResult = result;
} else {
if (result.getZhScore().compareTo(ppResult.getZhScore()) > 0) {
ppResult = result;
}
}
}
if (ppResult != null) {
//得分最高的兼夹体质为主体质
ppResult.setMainFlag(1);
}
}
@Override
public ZytzVo.ReportView reportView(ZytzDto.ReportView param) {
ZytzVo.ReportView vo = zytzDao.reportView(param.getEvaId());
if (vo != null && CollectionUtil.isNotEmpty(vo.getYsfa())) {
for (ZytzVo.ReportView.Ysfa ysfa : vo.getYsfa()) {
//html转义
ysfa.setYsjy(HtmlUtil.unescape(ysfa.getYsjy()));
}
}
return vo;
}
}

216
acupuncture-system/src/main/resources/mapper/dao/ZytzDao.xml

@ -56,38 +56,38 @@
</foreach>
</insert>
<!-- <insert id="batchInsertReportResult">-->
<!-- replace into rms_report_result(result_id,report_id,consti_code,consti_name,consti_level,consti_score,main_flag,create_by)-->
<!-- values-->
<!-- <foreach collection="list" item="item" separator=",">-->
<!-- (#{item.resultId},#{item.reportId},#{item.constiCode},#{item.constiName},#{item.constiLevel},#{item.constiScore},#{item.mainFlag},#{item.createBy})-->
<!-- </foreach>-->
<!-- </insert>-->
<insert id="batchInsertReportResult">
replace into zytz_rms_report_result(result_id,report_id,consti_code,consti_name,consti_level,consti_score,main_flag,create_by)
values
<foreach collection="list" item="item" separator=",">
(#{item.resultId},#{item.reportId},#{item.constiCode},#{item.constiName},#{item.constiLevel},#{item.constiScore},#{item.mainFlag},#{item.createBy})
</foreach>
</insert>
<!-- <select id="countReportResult" resultType="com.ruoyi.system.domain.vo.ReportVo$EvaResult">-->
<!-- select-->
<!-- eva.eva_id as evaId,-->
<!-- s.scale_code as scaleCode,-->
<!-- s.scale_name as scaleName,-->
<!-- cst.consti_code as constiCode,-->
<!-- cst.consti_name as constiName,-->
<!-- sum(-->
<!-- if(rel.reverse = 0,a.option_score,(6-a.option_score))-->
<!-- ) as score,-->
<!-- count(rel.ques_code) as quesNum-->
<!-- from-->
<!-- ems_evaluation eva-->
<!-- join qms_scale s on eva.eva_scale_code = s.scale_code and s.del_flag = 0-->
<!-- left join qms_scale_consti cst on eva.eva_scale_code = cst.scale_code and cst.del_flag = 0-->
<!-- left join qms_scale_consti_ques_rel rel on cst.consti_code = rel.consti_code and rel.del_flag = 0-->
<!-- left join ems_eva_answer a on eva.eva_id = a.eva_id and rel.ques_code = a.ques_code-->
<!-- where-->
<!-- eva.eva_id = #{evaId}-->
<!-- group by-->
<!-- eva.eva_id, s.scale_code, s.scale_name, cst.consti_id, cst.consti_code-->
<!-- order by-->
<!-- cst.consti_id-->
<!-- </select>-->
<select id="countReportResult" resultType="com.acupuncture.system.domain.vo.ZytzVo$EvaResult">
select
eva.id as evaId,
s.scale_code as scaleCode,
s.scale_name as scaleName,
cst.consti_code as constiCode,
cst.consti_name as constiName,
sum(
if(rel.reverse = 0,a.option_score,(6-a.option_score))
) as score,
count(rel.ques_code) as quesNum
from
pms_treatment eva
join zytz_qms_scale s on s.scale_code = 'TZBS_LN' and s.del_flag = 0
left join zytz_qms_scale_consti cst on cst.scale_code = 'TZBS_LN' and cst.del_flag = 0
left join zytz_qms_scale_consti_ques_rel rel on cst.consti_code = rel.consti_code and rel.del_flag = 0
left join zytz_ems_eva_answer a on eva.id = a.eva_id and rel.ques_code = a.ques_code
where
eva.id = #{evaId}
group by
eva.id, s.scale_code, s.scale_name, cst.consti_id, cst.consti_code
order by
cst.consti_id
</select>
<!-- <select id="queryYsjy" resultType="java.lang.String">-->
<!-- select-->
@ -104,84 +104,84 @@
<!-- cst.consti_id-->
<!-- </select>-->
<!-- <resultMap id="map_reportView" type="com.ruoyi.system.domain.vo.ClientEvaVo$ReportView">-->
<!-- <id column="reportId" property="reportId"/>-->
<!-- <result column="patientId" property="patientId"/>-->
<!-- <result column="name" property="name"/>-->
<!-- <result column="birthday" property="birthday"/>-->
<!-- <result column="age" property="age"/>-->
<!-- <result column="gender" property="gender"/>-->
<!-- <result column="height" property="height"/>-->
<!-- <result column="weight" property="weight"/>-->
<!-- <result column="waistline" property="waistline"/>-->
<!-- <result column="idcard" property="idcard"/>-->
<!-- <result column="phone" property="phone"/>-->
<!-- <result column="evaId" property="evaId"/>-->
<!-- <result column="evaTime" property="evaTime"/>-->
<!-- <result column="evaUsername" property="evaUsername"/>-->
<!-- <result column="evaNickname" property="evaNickname"/>-->
<!-- <result column="evaScaleCode" property="evaScaleCode"/>-->
<!-- <result column="evaScaleName" property="evaScaleName"/>-->
<!-- <result column="blh" property="blh"/>-->
<!-- <collection property="scores" ofType="com.ruoyi.system.domain.vo.ClientEvaVo$ReportView$Score">-->
<!-- <id column="constiCode" property="constiCode"/>-->
<!-- <result column="constiName" property="constiName"/>-->
<!-- <result column="constiLevel" property="constiLevel"/>-->
<!-- <result column="constiScore" property="constiScore"/>-->
<!-- <result column="mainFlag" property="mainFlag"/>-->
<!-- <result column="refScoreYes" property="refScoreYes"/>-->
<!-- <result column="refScoreMaybe" property="refScoreMaybe"/>-->
<!-- <result column="fullScore" property="fullScore"/>-->
<!-- </collection>-->
<!-- <collection property="ysfa" ofType="com.ruoyi.system.domain.vo.ClientEvaVo$ReportView$Ysfa">-->
<!-- <id column="jyConstiCode" property="constiCode"/>-->
<!-- <result column="jyConstiName" property="constiName"/>-->
<!-- <result column="ysjy" property="ysjy"/>-->
<!-- </collection>-->
<!-- </resultMap>-->
<resultMap id="map_reportView" type="com.acupuncture.system.domain.vo.ZytzVo$ReportView">
<id column="reportId" property="reportId"/>
<result column="patientId" property="patientId"/>
<result column="name" property="name"/>
<result column="birthday" property="birthday"/>
<result column="age" property="age"/>
<result column="gender" property="gender"/>
<result column="height" property="height"/>
<result column="weight" property="weight"/>
<result column="waistline" property="waistline"/>
<result column="idcard" property="idcard"/>
<result column="phone" property="phone"/>
<result column="evaId" property="evaId"/>
<result column="evaTime" property="evaTime"/>
<result column="evaUsername" property="evaUsername"/>
<result column="evaNickname" property="evaNickname"/>
<result column="evaScaleCode" property="evaScaleCode"/>
<result column="evaScaleName" property="evaScaleName"/>
<result column="blh" property="blh"/>
<collection property="scores" ofType="com.acupuncture.system.domain.vo.ZytzVo$ReportView$Score">
<id column="constiCode" property="constiCode"/>
<result column="constiName" property="constiName"/>
<result column="constiLevel" property="constiLevel"/>
<result column="constiScore" property="constiScore"/>
<result column="mainFlag" property="mainFlag"/>
<result column="refScoreYes" property="refScoreYes"/>
<result column="refScoreMaybe" property="refScoreMaybe"/>
<result column="fullScore" property="fullScore"/>
</collection>
<collection property="ysfa" ofType="com.acupuncture.system.domain.vo.ZytzVo$ReportView$Ysfa">
<id column="jyConstiCode" property="constiCode"/>
<result column="jyConstiName" property="constiName"/>
<result column="ysjy" property="ysjy"/>
</collection>
</resultMap>
<!-- <select id="reportView" resultMap="map_reportView">-->
<!-- select-->
<!-- r.report_id as reportId,-->
<!-- r.patient_id as patientId,-->
<!-- r.patient_name as name,-->
<!-- r.patient_gender as gender,-->
<!-- r.patient_birthday as birthday,-->
<!-- r.patient_age as age,-->
<!-- r.patient_height as height,-->
<!-- r.patient_weight as weight,-->
<!-- r.patient_waistline as waistline,-->
<!-- r.patient_idcard as idcard,-->
<!-- r.patient_phone as phone,-->
<!-- r.eva_id as evaId,-->
<!-- r.eva_time as evaTime,-->
<!-- r.eva_username as evaUsername,-->
<!-- r.eva_nickname as evaNickname,-->
<!-- r.eva_scale_code as evaScaleCode,-->
<!-- s.scale_name as evaScaleName,-->
<!-- r.blh as blh,-->
<!-- res.consti_code as constiCode,-->
<!-- res.consti_name as constiName,-->
<!-- res.consti_level as constiLevel,-->
<!-- res.consti_score as constiScore,-->
<!-- ref.ref_score_yes as refScoreYes,-->
<!-- ref.ref_score_maybe as refScoreMaybe,-->
<!-- ref.full_score as fullScore,-->
<!-- res.main_flag as mainFlag,-->
<!-- jy.consti_code as jyConstiCode,-->
<!-- jy.consti_name as jyConstiName,-->
<!-- jy.consti_ysjy as ysjy-->
<!-- from-->
<!-- rms_report r join qms_scale s on r.eva_scale_code = s.scale_code and s.del_flag = '0'-->
<!-- left join rms_report_result res on r.report_id = res.report_id-->
<!-- left join qms_scale_consti_ref_score ref on res.consti_code = ref.consti_code and ref.del_flag = 0-->
<!-- left join rms_report_ysjy jy on r.report_id = jy.report_id-->
<!-- where-->
<!-- r.del_flag = 0-->
<!-- and r.eva_id = #{evaId}-->
<!-- order by-->
<!-- res.result_id-->
<!-- </select>-->
<select id="reportView" resultMap="map_reportView">
select
r.report_id as reportId,
r.patient_id as patientId,
r.patient_name as name,
r.patient_gender as gender,
r.patient_birthday as birthday,
r.patient_age as age,
r.patient_height as height,
r.patient_weight as weight,
r.patient_waistline as waistline,
r.patient_idcard as idcard,
r.patient_phone as phone,
r.eva_id as evaId,
r.eva_time as evaTime,
r.eva_username as evaUsername,
r.eva_nickname as evaNickname,
r.eva_scale_code as evaScaleCode,
s.scale_name as evaScaleName,
r.blh as blh,
res.consti_code as constiCode,
res.consti_name as constiName,
res.consti_level as constiLevel,
res.consti_score as constiScore,
ref.ref_score_yes as refScoreYes,
ref.ref_score_maybe as refScoreMaybe,
ref.full_score as fullScore,
res.main_flag as mainFlag,
jy.consti_code as jyConstiCode,
jy.consti_name as jyConstiName,
jy.consti_ysjy as ysjy
from
zytz_rms_report r join zytz_qms_scale s on r.eva_scale_code = s.scale_code and s.del_flag = '0'
left join zytz_rms_report_result res on r.report_id = res.report_id
left join zytz_qms_scale_consti_ref_score ref on res.consti_code = ref.consti_code and ref.del_flag = 0
left join zytz_rms_report_ysjy jy on r.report_id = jy.report_id
where
r.del_flag = 0
and r.eva_id = #{evaId}
order by
res.result_id
</select>
<!-- <select id="queryEvaList" resultType="com.ruoyi.system.domain.vo.ClientEvaVo$EvaList">-->
<!-- SELECT-->

522
acupuncture-system/src/main/resources/mapper/system/ZytzRmsReportMapper.xml

@ -0,0 +1,522 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.acupuncture.system.persist.mapper.ZytzRmsReportMapper">
<resultMap id="BaseResultMap" type="com.acupuncture.system.domain.po.ZytzRmsReport">
<id column="report_id" jdbcType="BIGINT" property="reportId" />
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
<result column="patient_id" jdbcType="BIGINT" property="patientId" />
<result column="patient_name" jdbcType="VARCHAR" property="patientName" />
<result column="patient_age" jdbcType="VARCHAR" property="patientAge" />
<result column="patient_gender" jdbcType="VARCHAR" property="patientGender" />
<result column="patient_height" jdbcType="VARCHAR" property="patientHeight" />
<result column="patient_weight" jdbcType="VARCHAR" property="patientWeight" />
<result column="patient_waistline" jdbcType="VARCHAR" property="patientWaistline" />
<result column="eva_id" jdbcType="BIGINT" property="evaId" />
<result column="eva_scale_code" jdbcType="VARCHAR" property="evaScaleCode" />
<result column="eva_time" jdbcType="TIMESTAMP" property="evaTime" />
<result column="eva_username" jdbcType="VARCHAR" property="evaUsername" />
<result column="eva_nickname" jdbcType="VARCHAR" property="evaNickname" />
<result column="blh" jdbcType="VARCHAR" property="blh" />
<result column="del_flag" jdbcType="CHAR" property="delFlag" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="patient_name_pinyin" jdbcType="VARCHAR" property="patientNamePinyin" />
<result column="patient_name_py" jdbcType="VARCHAR" property="patientNamePy" />
<result column="patient_birthday" jdbcType="VARCHAR" property="patientBirthday" />
<result column="patient_idcard" jdbcType="VARCHAR" property="patientIdcard" />
<result column="patient_phone" jdbcType="VARCHAR" property="patientPhone" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
report_id, dept_id, patient_id, patient_name, patient_age, patient_gender, patient_height,
patient_weight, patient_waistline, eva_id, eva_scale_code, eva_time, eva_username,
eva_nickname, blh, del_flag, create_by, create_time, update_by, update_time, patient_name_pinyin,
patient_name_py, patient_birthday, patient_idcard, patient_phone
</sql>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from zytz_rms_report
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from zytz_rms_report
where report_id = #{reportId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from zytz_rms_report
where report_id = #{reportId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.acupuncture.system.domain.po.ZytzRmsReport">
insert into zytz_rms_report (report_id, dept_id, patient_id,
patient_name, patient_age, patient_gender,
patient_height, patient_weight, patient_waistline,
eva_id, eva_scale_code, eva_time,
eva_username, eva_nickname, blh,
del_flag, create_by, create_time,
update_by, update_time, patient_name_pinyin,
patient_name_py, patient_birthday, patient_idcard,
patient_phone)
values (#{reportId,jdbcType=BIGINT}, #{deptId,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT},
#{patientName,jdbcType=VARCHAR}, #{patientAge,jdbcType=VARCHAR}, #{patientGender,jdbcType=VARCHAR},
#{patientHeight,jdbcType=VARCHAR}, #{patientWeight,jdbcType=VARCHAR}, #{patientWaistline,jdbcType=VARCHAR},
#{evaId,jdbcType=BIGINT}, #{evaScaleCode,jdbcType=VARCHAR}, #{evaTime,jdbcType=TIMESTAMP},
#{evaUsername,jdbcType=VARCHAR}, #{evaNickname,jdbcType=VARCHAR}, #{blh,jdbcType=VARCHAR},
#{delFlag,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{patientNamePinyin,jdbcType=VARCHAR},
#{patientNamePy,jdbcType=VARCHAR}, #{patientBirthday,jdbcType=VARCHAR}, #{patientIdcard,jdbcType=VARCHAR},
#{patientPhone,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.ZytzRmsReport">
insert into zytz_rms_report
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="reportId != null">
report_id,
</if>
<if test="deptId != null">
dept_id,
</if>
<if test="patientId != null">
patient_id,
</if>
<if test="patientName != null">
patient_name,
</if>
<if test="patientAge != null">
patient_age,
</if>
<if test="patientGender != null">
patient_gender,
</if>
<if test="patientHeight != null">
patient_height,
</if>
<if test="patientWeight != null">
patient_weight,
</if>
<if test="patientWaistline != null">
patient_waistline,
</if>
<if test="evaId != null">
eva_id,
</if>
<if test="evaScaleCode != null">
eva_scale_code,
</if>
<if test="evaTime != null">
eva_time,
</if>
<if test="evaUsername != null">
eva_username,
</if>
<if test="evaNickname != null">
eva_nickname,
</if>
<if test="blh != null">
blh,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="patientNamePinyin != null">
patient_name_pinyin,
</if>
<if test="patientNamePy != null">
patient_name_py,
</if>
<if test="patientBirthday != null">
patient_birthday,
</if>
<if test="patientIdcard != null">
patient_idcard,
</if>
<if test="patientPhone != null">
patient_phone,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="reportId != null">
#{reportId,jdbcType=BIGINT},
</if>
<if test="deptId != null">
#{deptId,jdbcType=BIGINT},
</if>
<if test="patientId != null">
#{patientId,jdbcType=BIGINT},
</if>
<if test="patientName != null">
#{patientName,jdbcType=VARCHAR},
</if>
<if test="patientAge != null">
#{patientAge,jdbcType=VARCHAR},
</if>
<if test="patientGender != null">
#{patientGender,jdbcType=VARCHAR},
</if>
<if test="patientHeight != null">
#{patientHeight,jdbcType=VARCHAR},
</if>
<if test="patientWeight != null">
#{patientWeight,jdbcType=VARCHAR},
</if>
<if test="patientWaistline != null">
#{patientWaistline,jdbcType=VARCHAR},
</if>
<if test="evaId != null">
#{evaId,jdbcType=BIGINT},
</if>
<if test="evaScaleCode != null">
#{evaScaleCode,jdbcType=VARCHAR},
</if>
<if test="evaTime != null">
#{evaTime,jdbcType=TIMESTAMP},
</if>
<if test="evaUsername != null">
#{evaUsername,jdbcType=VARCHAR},
</if>
<if test="evaNickname != null">
#{evaNickname,jdbcType=VARCHAR},
</if>
<if test="blh != null">
#{blh,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=CHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="patientNamePinyin != null">
#{patientNamePinyin,jdbcType=VARCHAR},
</if>
<if test="patientNamePy != null">
#{patientNamePy,jdbcType=VARCHAR},
</if>
<if test="patientBirthday != null">
#{patientBirthday,jdbcType=VARCHAR},
</if>
<if test="patientIdcard != null">
#{patientIdcard,jdbcType=VARCHAR},
</if>
<if test="patientPhone != null">
#{patientPhone,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportExample" resultType="java.lang.Long">
select count(*) from zytz_rms_report
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update zytz_rms_report
<set>
<if test="record.reportId != null">
report_id = #{record.reportId,jdbcType=BIGINT},
</if>
<if test="record.deptId != null">
dept_id = #{record.deptId,jdbcType=BIGINT},
</if>
<if test="record.patientId != null">
patient_id = #{record.patientId,jdbcType=BIGINT},
</if>
<if test="record.patientName != null">
patient_name = #{record.patientName,jdbcType=VARCHAR},
</if>
<if test="record.patientAge != null">
patient_age = #{record.patientAge,jdbcType=VARCHAR},
</if>
<if test="record.patientGender != null">
patient_gender = #{record.patientGender,jdbcType=VARCHAR},
</if>
<if test="record.patientHeight != null">
patient_height = #{record.patientHeight,jdbcType=VARCHAR},
</if>
<if test="record.patientWeight != null">
patient_weight = #{record.patientWeight,jdbcType=VARCHAR},
</if>
<if test="record.patientWaistline != null">
patient_waistline = #{record.patientWaistline,jdbcType=VARCHAR},
</if>
<if test="record.evaId != null">
eva_id = #{record.evaId,jdbcType=BIGINT},
</if>
<if test="record.evaScaleCode != null">
eva_scale_code = #{record.evaScaleCode,jdbcType=VARCHAR},
</if>
<if test="record.evaTime != null">
eva_time = #{record.evaTime,jdbcType=TIMESTAMP},
</if>
<if test="record.evaUsername != null">
eva_username = #{record.evaUsername,jdbcType=VARCHAR},
</if>
<if test="record.evaNickname != null">
eva_nickname = #{record.evaNickname,jdbcType=VARCHAR},
</if>
<if test="record.blh != null">
blh = #{record.blh,jdbcType=VARCHAR},
</if>
<if test="record.delFlag != null">
del_flag = #{record.delFlag,jdbcType=CHAR},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.patientNamePinyin != null">
patient_name_pinyin = #{record.patientNamePinyin,jdbcType=VARCHAR},
</if>
<if test="record.patientNamePy != null">
patient_name_py = #{record.patientNamePy,jdbcType=VARCHAR},
</if>
<if test="record.patientBirthday != null">
patient_birthday = #{record.patientBirthday,jdbcType=VARCHAR},
</if>
<if test="record.patientIdcard != null">
patient_idcard = #{record.patientIdcard,jdbcType=VARCHAR},
</if>
<if test="record.patientPhone != null">
patient_phone = #{record.patientPhone,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update zytz_rms_report
set report_id = #{record.reportId,jdbcType=BIGINT},
dept_id = #{record.deptId,jdbcType=BIGINT},
patient_id = #{record.patientId,jdbcType=BIGINT},
patient_name = #{record.patientName,jdbcType=VARCHAR},
patient_age = #{record.patientAge,jdbcType=VARCHAR},
patient_gender = #{record.patientGender,jdbcType=VARCHAR},
patient_height = #{record.patientHeight,jdbcType=VARCHAR},
patient_weight = #{record.patientWeight,jdbcType=VARCHAR},
patient_waistline = #{record.patientWaistline,jdbcType=VARCHAR},
eva_id = #{record.evaId,jdbcType=BIGINT},
eva_scale_code = #{record.evaScaleCode,jdbcType=VARCHAR},
eva_time = #{record.evaTime,jdbcType=TIMESTAMP},
eva_username = #{record.evaUsername,jdbcType=VARCHAR},
eva_nickname = #{record.evaNickname,jdbcType=VARCHAR},
blh = #{record.blh,jdbcType=VARCHAR},
del_flag = #{record.delFlag,jdbcType=CHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
patient_name_pinyin = #{record.patientNamePinyin,jdbcType=VARCHAR},
patient_name_py = #{record.patientNamePy,jdbcType=VARCHAR},
patient_birthday = #{record.patientBirthday,jdbcType=VARCHAR},
patient_idcard = #{record.patientIdcard,jdbcType=VARCHAR},
patient_phone = #{record.patientPhone,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.acupuncture.system.domain.po.ZytzRmsReport">
update zytz_rms_report
<set>
<if test="deptId != null">
dept_id = #{deptId,jdbcType=BIGINT},
</if>
<if test="patientId != null">
patient_id = #{patientId,jdbcType=BIGINT},
</if>
<if test="patientName != null">
patient_name = #{patientName,jdbcType=VARCHAR},
</if>
<if test="patientAge != null">
patient_age = #{patientAge,jdbcType=VARCHAR},
</if>
<if test="patientGender != null">
patient_gender = #{patientGender,jdbcType=VARCHAR},
</if>
<if test="patientHeight != null">
patient_height = #{patientHeight,jdbcType=VARCHAR},
</if>
<if test="patientWeight != null">
patient_weight = #{patientWeight,jdbcType=VARCHAR},
</if>
<if test="patientWaistline != null">
patient_waistline = #{patientWaistline,jdbcType=VARCHAR},
</if>
<if test="evaId != null">
eva_id = #{evaId,jdbcType=BIGINT},
</if>
<if test="evaScaleCode != null">
eva_scale_code = #{evaScaleCode,jdbcType=VARCHAR},
</if>
<if test="evaTime != null">
eva_time = #{evaTime,jdbcType=TIMESTAMP},
</if>
<if test="evaUsername != null">
eva_username = #{evaUsername,jdbcType=VARCHAR},
</if>
<if test="evaNickname != null">
eva_nickname = #{evaNickname,jdbcType=VARCHAR},
</if>
<if test="blh != null">
blh = #{blh,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=CHAR},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="patientNamePinyin != null">
patient_name_pinyin = #{patientNamePinyin,jdbcType=VARCHAR},
</if>
<if test="patientNamePy != null">
patient_name_py = #{patientNamePy,jdbcType=VARCHAR},
</if>
<if test="patientBirthday != null">
patient_birthday = #{patientBirthday,jdbcType=VARCHAR},
</if>
<if test="patientIdcard != null">
patient_idcard = #{patientIdcard,jdbcType=VARCHAR},
</if>
<if test="patientPhone != null">
patient_phone = #{patientPhone,jdbcType=VARCHAR},
</if>
</set>
where report_id = #{reportId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.acupuncture.system.domain.po.ZytzRmsReport">
update zytz_rms_report
set dept_id = #{deptId,jdbcType=BIGINT},
patient_id = #{patientId,jdbcType=BIGINT},
patient_name = #{patientName,jdbcType=VARCHAR},
patient_age = #{patientAge,jdbcType=VARCHAR},
patient_gender = #{patientGender,jdbcType=VARCHAR},
patient_height = #{patientHeight,jdbcType=VARCHAR},
patient_weight = #{patientWeight,jdbcType=VARCHAR},
patient_waistline = #{patientWaistline,jdbcType=VARCHAR},
eva_id = #{evaId,jdbcType=BIGINT},
eva_scale_code = #{evaScaleCode,jdbcType=VARCHAR},
eva_time = #{evaTime,jdbcType=TIMESTAMP},
eva_username = #{evaUsername,jdbcType=VARCHAR},
eva_nickname = #{evaNickname,jdbcType=VARCHAR},
blh = #{blh,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=CHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
patient_name_pinyin = #{patientNamePinyin,jdbcType=VARCHAR},
patient_name_py = #{patientNamePy,jdbcType=VARCHAR},
patient_birthday = #{patientBirthday,jdbcType=VARCHAR},
patient_idcard = #{patientIdcard,jdbcType=VARCHAR},
patient_phone = #{patientPhone,jdbcType=VARCHAR}
where report_id = #{reportId,jdbcType=BIGINT}
</update>
</mapper>

300
acupuncture-system/src/main/resources/mapper/system/ZytzRmsReportResultMapper.xml

@ -0,0 +1,300 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.acupuncture.system.persist.mapper.ZytzRmsReportResultMapper">
<resultMap id="BaseResultMap" type="com.acupuncture.system.domain.po.ZytzRmsReportResult">
<id column="result_id" jdbcType="BIGINT" property="resultId" />
<result column="report_id" jdbcType="BIGINT" property="reportId" />
<result column="consti_code" jdbcType="VARCHAR" property="constiCode" />
<result column="consti_name" jdbcType="VARCHAR" property="constiName" />
<result column="consti_level" jdbcType="VARCHAR" property="constiLevel" />
<result column="consti_score" jdbcType="DECIMAL" property="constiScore" />
<result column="main_flag" jdbcType="INTEGER" property="mainFlag" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
result_id, report_id, consti_code, consti_name, consti_level, consti_score, main_flag,
create_by, create_time, update_by, update_time
</sql>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportResultExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from zytz_rms_report_result
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from zytz_rms_report_result
where result_id = #{resultId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from zytz_rms_report_result
where result_id = #{resultId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportResult">
insert into zytz_rms_report_result (result_id, report_id, consti_code,
consti_name, consti_level, consti_score,
main_flag, create_by, create_time,
update_by, update_time)
values (#{resultId,jdbcType=BIGINT}, #{reportId,jdbcType=BIGINT}, #{constiCode,jdbcType=VARCHAR},
#{constiName,jdbcType=VARCHAR}, #{constiLevel,jdbcType=VARCHAR}, #{constiScore,jdbcType=DECIMAL},
#{mainFlag,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportResult">
insert into zytz_rms_report_result
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="resultId != null">
result_id,
</if>
<if test="reportId != null">
report_id,
</if>
<if test="constiCode != null">
consti_code,
</if>
<if test="constiName != null">
consti_name,
</if>
<if test="constiLevel != null">
consti_level,
</if>
<if test="constiScore != null">
consti_score,
</if>
<if test="mainFlag != null">
main_flag,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="resultId != null">
#{resultId,jdbcType=BIGINT},
</if>
<if test="reportId != null">
#{reportId,jdbcType=BIGINT},
</if>
<if test="constiCode != null">
#{constiCode,jdbcType=VARCHAR},
</if>
<if test="constiName != null">
#{constiName,jdbcType=VARCHAR},
</if>
<if test="constiLevel != null">
#{constiLevel,jdbcType=VARCHAR},
</if>
<if test="constiScore != null">
#{constiScore,jdbcType=DECIMAL},
</if>
<if test="mainFlag != null">
#{mainFlag,jdbcType=INTEGER},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportResultExample" resultType="java.lang.Long">
select count(*) from zytz_rms_report_result
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update zytz_rms_report_result
<set>
<if test="record.resultId != null">
result_id = #{record.resultId,jdbcType=BIGINT},
</if>
<if test="record.reportId != null">
report_id = #{record.reportId,jdbcType=BIGINT},
</if>
<if test="record.constiCode != null">
consti_code = #{record.constiCode,jdbcType=VARCHAR},
</if>
<if test="record.constiName != null">
consti_name = #{record.constiName,jdbcType=VARCHAR},
</if>
<if test="record.constiLevel != null">
consti_level = #{record.constiLevel,jdbcType=VARCHAR},
</if>
<if test="record.constiScore != null">
consti_score = #{record.constiScore,jdbcType=DECIMAL},
</if>
<if test="record.mainFlag != null">
main_flag = #{record.mainFlag,jdbcType=INTEGER},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update zytz_rms_report_result
set result_id = #{record.resultId,jdbcType=BIGINT},
report_id = #{record.reportId,jdbcType=BIGINT},
consti_code = #{record.constiCode,jdbcType=VARCHAR},
consti_name = #{record.constiName,jdbcType=VARCHAR},
consti_level = #{record.constiLevel,jdbcType=VARCHAR},
consti_score = #{record.constiScore,jdbcType=DECIMAL},
main_flag = #{record.mainFlag,jdbcType=INTEGER},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportResult">
update zytz_rms_report_result
<set>
<if test="reportId != null">
report_id = #{reportId,jdbcType=BIGINT},
</if>
<if test="constiCode != null">
consti_code = #{constiCode,jdbcType=VARCHAR},
</if>
<if test="constiName != null">
consti_name = #{constiName,jdbcType=VARCHAR},
</if>
<if test="constiLevel != null">
consti_level = #{constiLevel,jdbcType=VARCHAR},
</if>
<if test="constiScore != null">
consti_score = #{constiScore,jdbcType=DECIMAL},
</if>
<if test="mainFlag != null">
main_flag = #{mainFlag,jdbcType=INTEGER},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where result_id = #{resultId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportResult">
update zytz_rms_report_result
set report_id = #{reportId,jdbcType=BIGINT},
consti_code = #{constiCode,jdbcType=VARCHAR},
consti_name = #{constiName,jdbcType=VARCHAR},
consti_level = #{constiLevel,jdbcType=VARCHAR},
consti_score = #{constiScore,jdbcType=DECIMAL},
main_flag = #{mainFlag,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where result_id = #{resultId,jdbcType=BIGINT}
</update>
</mapper>

318
acupuncture-system/src/main/resources/mapper/system/ZytzRmsReportYsjyMapper.xml

@ -0,0 +1,318 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.acupuncture.system.persist.mapper.ZytzRmsReportYsjyMapper">
<resultMap id="BaseResultMap" type="com.acupuncture.system.domain.po.ZytzRmsReportYsjy">
<id column="ysjy_id" jdbcType="BIGINT" property="ysjyId" />
<result column="report_id" jdbcType="BIGINT" property="reportId" />
<result column="consti_code" jdbcType="VARCHAR" property="constiCode" />
<result column="consti_name" jdbcType="VARCHAR" property="constiName" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.acupuncture.system.domain.po.ZytzRmsReportYsjy">
<result column="consti_ysjy" jdbcType="LONGVARCHAR" property="constiYsjy" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
ysjy_id, report_id, consti_code, consti_name, create_by, create_time, update_by,
update_time
</sql>
<sql id="Blob_Column_List">
consti_ysjy
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportYsjyExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from zytz_rms_report_ysjy
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportYsjyExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from zytz_rms_report_ysjy
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from zytz_rms_report_ysjy
where ysjy_id = #{ysjyId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from zytz_rms_report_ysjy
where ysjy_id = #{ysjyId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportYsjy">
insert into zytz_rms_report_ysjy (ysjy_id, report_id, consti_code,
consti_name, create_by, create_time,
update_by, update_time, consti_ysjy
)
values (#{ysjyId,jdbcType=BIGINT}, #{reportId,jdbcType=BIGINT}, #{constiCode,jdbcType=VARCHAR},
#{constiName,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{constiYsjy,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportYsjy">
insert into zytz_rms_report_ysjy
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ysjyId != null">
ysjy_id,
</if>
<if test="reportId != null">
report_id,
</if>
<if test="constiCode != null">
consti_code,
</if>
<if test="constiName != null">
consti_name,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="constiYsjy != null">
consti_ysjy,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ysjyId != null">
#{ysjyId,jdbcType=BIGINT},
</if>
<if test="reportId != null">
#{reportId,jdbcType=BIGINT},
</if>
<if test="constiCode != null">
#{constiCode,jdbcType=VARCHAR},
</if>
<if test="constiName != null">
#{constiName,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="constiYsjy != null">
#{constiYsjy,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportYsjyExample" resultType="java.lang.Long">
select count(*) from zytz_rms_report_ysjy
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update zytz_rms_report_ysjy
<set>
<if test="record.ysjyId != null">
ysjy_id = #{record.ysjyId,jdbcType=BIGINT},
</if>
<if test="record.reportId != null">
report_id = #{record.reportId,jdbcType=BIGINT},
</if>
<if test="record.constiCode != null">
consti_code = #{record.constiCode,jdbcType=VARCHAR},
</if>
<if test="record.constiName != null">
consti_name = #{record.constiName,jdbcType=VARCHAR},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.constiYsjy != null">
consti_ysjy = #{record.constiYsjy,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update zytz_rms_report_ysjy
set ysjy_id = #{record.ysjyId,jdbcType=BIGINT},
report_id = #{record.reportId,jdbcType=BIGINT},
consti_code = #{record.constiCode,jdbcType=VARCHAR},
consti_name = #{record.constiName,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
consti_ysjy = #{record.constiYsjy,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update zytz_rms_report_ysjy
set ysjy_id = #{record.ysjyId,jdbcType=BIGINT},
report_id = #{record.reportId,jdbcType=BIGINT},
consti_code = #{record.constiCode,jdbcType=VARCHAR},
consti_name = #{record.constiName,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportYsjy">
update zytz_rms_report_ysjy
<set>
<if test="reportId != null">
report_id = #{reportId,jdbcType=BIGINT},
</if>
<if test="constiCode != null">
consti_code = #{constiCode,jdbcType=VARCHAR},
</if>
<if test="constiName != null">
consti_name = #{constiName,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="constiYsjy != null">
consti_ysjy = #{constiYsjy,jdbcType=LONGVARCHAR},
</if>
</set>
where ysjy_id = #{ysjyId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportYsjy">
update zytz_rms_report_ysjy
set report_id = #{reportId,jdbcType=BIGINT},
consti_code = #{constiCode,jdbcType=VARCHAR},
consti_name = #{constiName,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
consti_ysjy = #{constiYsjy,jdbcType=LONGVARCHAR}
where ysjy_id = #{ysjyId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.acupuncture.system.domain.po.ZytzRmsReportYsjy">
update zytz_rms_report_ysjy
set report_id = #{reportId,jdbcType=BIGINT},
consti_code = #{constiCode,jdbcType=VARCHAR},
consti_name = #{constiName,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where ysjy_id = #{ysjyId,jdbcType=BIGINT}
</update>
</mapper>
Loading…
Cancel
Save