Browse Source

修改同步任务

hnzxyjhyy
zhangye 2 weeks ago
parent
commit
f2630a9a55
  1. 16
      ruisi_java/ruisi-cc-generator/src/main/resources/mbg.xml
  2. 11
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockDept.java
  3. 70
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockDeptExample.java
  4. 11
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockEmpl.java
  5. 70
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockEmplExample.java
  6. 11
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientBaseInfo.java
  7. 70
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientBaseInfoExample.java
  8. 11
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientDiagnosis.java
  9. 70
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientDiagnosisExample.java
  10. 11
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientMedicationInfo.java
  11. 70
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientMedicationInfoExample.java
  12. 11
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientVisitInfo.java
  13. 70
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientVisitInfoExample.java
  14. 1
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/DockService.java
  15. 433
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/impl/DockServiceImpl.java
  16. 28
      ruisi_java/ruisi-system/src/main/resources/mapper/system/DockDeptMapper.xml
  17. 25
      ruisi_java/ruisi-system/src/main/resources/mapper/system/DockEmplMapper.xml
  18. 27
      ruisi_java/ruisi-system/src/main/resources/mapper/system/DockPatientBaseInfoMapper.xml
  19. 26
      ruisi_java/ruisi-system/src/main/resources/mapper/system/DockPatientDiagnosisMapper.xml
  20. 29
      ruisi_java/ruisi-system/src/main/resources/mapper/system/DockPatientMedicationInfoMapper.xml
  21. 25
      ruisi_java/ruisi-system/src/main/resources/mapper/system/DockPatientVisitInfoMapper.xml
  22. 2
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/scheduled/DatasourceController.java
  23. 27
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/scheduled/SyncHospitalData.java
  24. 2
      ruisi_java/ruisi-web-client/src/main/resources/application-dev.yml

16
ruisi_java/ruisi-cc-generator/src/main/resources/mbg.xml

@ -22,7 +22,7 @@
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/ruisi_cga_yf1?useUnicode=true&amp;characterEncoding=UTF-8&amp;serverTimezone=GMT%2B8&amp;tinyInt1isBit=false"
userId="root"
password="q7510327">
password="123456">
<!--仅仅查询当前库的表,不查询其他库-->
<property name="nullCatalogMeansCurrent" value="true"/>
</jdbcConnection>
@ -70,13 +70,13 @@
<!-- <table tableName="pms_patient_parent_illness" domainObjectName="PmsPatientParentIllness"/>-->
<!-- <table tableName="pms_patient_personal" domainObjectName="PmsPatientPersonal"/>-->
<!-- <table tableName="pms_patient_diagnosis" domainObjectName="PmsPatientDiagnosis"/>-->
<!-- <table tableName="dock_patient_base_info" domainObjectName="DockPatientBaseInfo"/>-->
<!-- <table tableName="dock_patient_diagnosis" domainObjectName="DockPatientDiagnosis"/>-->
<!-- <table tableName="dock_patient_medication_info" domainObjectName="DockPatientMedicationInfo"/>-->
<!-- <table tableName="dock_patient_visit_info" domainObjectName="DockPatientVisitInfo"/>-->
<!-- <table tableName="dock_empl" domainObjectName="DockEmpl"/>-->
<!-- <table tableName="dock_dept" domainObjectName="DockDept"/>-->
<table tableName="dms_running_log" domainObjectName="DmsRunningLog"/>
<table tableName="dock_patient_base_info" domainObjectName="DockPatientBaseInfo"/>
<table tableName="dock_patient_diagnosis" domainObjectName="DockPatientDiagnosis"/>
<table tableName="dock_patient_medication_info" domainObjectName="DockPatientMedicationInfo"/>
<table tableName="dock_patient_visit_info" domainObjectName="DockPatientVisitInfo"/>
<table tableName="dock_empl" domainObjectName="DockEmpl"/>
<table tableName="dock_dept" domainObjectName="DockDept"/>
<!-- <table tableName="dms_running_log" domainObjectName="DmsRunningLog"/>-->
<!-- <table tableName="hms_combo" domainObjectName="HmsCombo"/>-->
<!-- <table tableName="hms_combo_scale_relevance" domainObjectName="HmsComboScaleRelevance"/>-->
<!-- <table tableName="hms_doctor" domainObjectName="HmsDoctor"/>-->

11
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockDept.java

@ -20,6 +20,8 @@ public class DockDept implements Serializable {
private Date updateTime;
private String sync;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -86,6 +88,14 @@ public class DockDept implements Serializable {
this.updateTime = updateTime;
}
public String getSync() {
return sync;
}
public void setSync(String sync) {
this.sync = sync == null ? null : sync.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -100,6 +110,7 @@ public class DockDept implements Serializable {
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", sync=").append(sync);
sb.append("]");
return sb.toString();
}

70
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockDeptExample.java

@ -634,6 +634,76 @@ public class DockDeptExample {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andSyncIsNull() {
addCriterion("sync is null");
return (Criteria) this;
}
public Criteria andSyncIsNotNull() {
addCriterion("sync is not null");
return (Criteria) this;
}
public Criteria andSyncEqualTo(String value) {
addCriterion("sync =", value, "sync");
return (Criteria) this;
}
public Criteria andSyncNotEqualTo(String value) {
addCriterion("sync <>", value, "sync");
return (Criteria) this;
}
public Criteria andSyncGreaterThan(String value) {
addCriterion("sync >", value, "sync");
return (Criteria) this;
}
public Criteria andSyncGreaterThanOrEqualTo(String value) {
addCriterion("sync >=", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLessThan(String value) {
addCriterion("sync <", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLessThanOrEqualTo(String value) {
addCriterion("sync <=", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLike(String value) {
addCriterion("sync like", value, "sync");
return (Criteria) this;
}
public Criteria andSyncNotLike(String value) {
addCriterion("sync not like", value, "sync");
return (Criteria) this;
}
public Criteria andSyncIn(List<String> values) {
addCriterion("sync in", values, "sync");
return (Criteria) this;
}
public Criteria andSyncNotIn(List<String> values) {
addCriterion("sync not in", values, "sync");
return (Criteria) this;
}
public Criteria andSyncBetween(String value1, String value2) {
addCriterion("sync between", value1, value2, "sync");
return (Criteria) this;
}
public Criteria andSyncNotBetween(String value1, String value2) {
addCriterion("sync not between", value1, value2, "sync");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

11
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockEmpl.java

@ -24,6 +24,8 @@ public class DockEmpl implements Serializable {
private Date updateTime;
private String sync;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -106,6 +108,14 @@ public class DockEmpl implements Serializable {
this.updateTime = updateTime;
}
public String getSync() {
return sync;
}
public void setSync(String sync) {
this.sync = sync == null ? null : sync.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -122,6 +132,7 @@ public class DockEmpl implements Serializable {
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", sync=").append(sync);
sb.append("]");
return sb.toString();
}

70
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockEmplExample.java

@ -774,6 +774,76 @@ public class DockEmplExample {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andSyncIsNull() {
addCriterion("sync is null");
return (Criteria) this;
}
public Criteria andSyncIsNotNull() {
addCriterion("sync is not null");
return (Criteria) this;
}
public Criteria andSyncEqualTo(String value) {
addCriterion("sync =", value, "sync");
return (Criteria) this;
}
public Criteria andSyncNotEqualTo(String value) {
addCriterion("sync <>", value, "sync");
return (Criteria) this;
}
public Criteria andSyncGreaterThan(String value) {
addCriterion("sync >", value, "sync");
return (Criteria) this;
}
public Criteria andSyncGreaterThanOrEqualTo(String value) {
addCriterion("sync >=", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLessThan(String value) {
addCriterion("sync <", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLessThanOrEqualTo(String value) {
addCriterion("sync <=", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLike(String value) {
addCriterion("sync like", value, "sync");
return (Criteria) this;
}
public Criteria andSyncNotLike(String value) {
addCriterion("sync not like", value, "sync");
return (Criteria) this;
}
public Criteria andSyncIn(List<String> values) {
addCriterion("sync in", values, "sync");
return (Criteria) this;
}
public Criteria andSyncNotIn(List<String> values) {
addCriterion("sync not in", values, "sync");
return (Criteria) this;
}
public Criteria andSyncBetween(String value1, String value2) {
addCriterion("sync between", value1, value2, "sync");
return (Criteria) this;
}
public Criteria andSyncNotBetween(String value1, String value2) {
addCriterion("sync not between", value1, value2, "sync");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

11
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientBaseInfo.java

@ -56,6 +56,8 @@ public class DockPatientBaseInfo implements Serializable {
private String remark;
private String sync;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -266,6 +268,14 @@ public class DockPatientBaseInfo implements Serializable {
this.remark = remark == null ? null : remark.trim();
}
public String getSync() {
return sync;
}
public void setSync(String sync) {
this.sync = sync == null ? null : sync.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -298,6 +308,7 @@ public class DockPatientBaseInfo implements Serializable {
sb.append(", updateTime=").append(updateTime);
sb.append(", delFlag=").append(delFlag);
sb.append(", remark=").append(remark);
sb.append(", sync=").append(sync);
sb.append("]");
return sb.toString();
}

70
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientBaseInfoExample.java

@ -1901,6 +1901,76 @@ public class DockPatientBaseInfoExample {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andSyncIsNull() {
addCriterion("sync is null");
return (Criteria) this;
}
public Criteria andSyncIsNotNull() {
addCriterion("sync is not null");
return (Criteria) this;
}
public Criteria andSyncEqualTo(String value) {
addCriterion("sync =", value, "sync");
return (Criteria) this;
}
public Criteria andSyncNotEqualTo(String value) {
addCriterion("sync <>", value, "sync");
return (Criteria) this;
}
public Criteria andSyncGreaterThan(String value) {
addCriterion("sync >", value, "sync");
return (Criteria) this;
}
public Criteria andSyncGreaterThanOrEqualTo(String value) {
addCriterion("sync >=", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLessThan(String value) {
addCriterion("sync <", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLessThanOrEqualTo(String value) {
addCriterion("sync <=", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLike(String value) {
addCriterion("sync like", value, "sync");
return (Criteria) this;
}
public Criteria andSyncNotLike(String value) {
addCriterion("sync not like", value, "sync");
return (Criteria) this;
}
public Criteria andSyncIn(List<String> values) {
addCriterion("sync in", values, "sync");
return (Criteria) this;
}
public Criteria andSyncNotIn(List<String> values) {
addCriterion("sync not in", values, "sync");
return (Criteria) this;
}
public Criteria andSyncBetween(String value1, String value2) {
addCriterion("sync between", value1, value2, "sync");
return (Criteria) this;
}
public Criteria andSyncNotBetween(String value1, String value2) {
addCriterion("sync not between", value1, value2, "sync");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

11
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientDiagnosis.java

@ -30,6 +30,8 @@ public class DockPatientDiagnosis implements Serializable {
private String remark;
private String sync;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -136,6 +138,14 @@ public class DockPatientDiagnosis implements Serializable {
this.remark = remark == null ? null : remark.trim();
}
public String getSync() {
return sync;
}
public void setSync(String sync) {
this.sync = sync == null ? null : sync.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -155,6 +165,7 @@ public class DockPatientDiagnosis implements Serializable {
sb.append(", updateTime=").append(updateTime);
sb.append(", delFlag=").append(delFlag);
sb.append(", remark=").append(remark);
sb.append(", sync=").append(sync);
sb.append("]");
return sb.toString();
}

70
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientDiagnosisExample.java

@ -981,6 +981,76 @@ public class DockPatientDiagnosisExample {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andSyncIsNull() {
addCriterion("sync is null");
return (Criteria) this;
}
public Criteria andSyncIsNotNull() {
addCriterion("sync is not null");
return (Criteria) this;
}
public Criteria andSyncEqualTo(String value) {
addCriterion("sync =", value, "sync");
return (Criteria) this;
}
public Criteria andSyncNotEqualTo(String value) {
addCriterion("sync <>", value, "sync");
return (Criteria) this;
}
public Criteria andSyncGreaterThan(String value) {
addCriterion("sync >", value, "sync");
return (Criteria) this;
}
public Criteria andSyncGreaterThanOrEqualTo(String value) {
addCriterion("sync >=", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLessThan(String value) {
addCriterion("sync <", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLessThanOrEqualTo(String value) {
addCriterion("sync <=", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLike(String value) {
addCriterion("sync like", value, "sync");
return (Criteria) this;
}
public Criteria andSyncNotLike(String value) {
addCriterion("sync not like", value, "sync");
return (Criteria) this;
}
public Criteria andSyncIn(List<String> values) {
addCriterion("sync in", values, "sync");
return (Criteria) this;
}
public Criteria andSyncNotIn(List<String> values) {
addCriterion("sync not in", values, "sync");
return (Criteria) this;
}
public Criteria andSyncBetween(String value1, String value2) {
addCriterion("sync between", value1, value2, "sync");
return (Criteria) this;
}
public Criteria andSyncNotBetween(String value1, String value2) {
addCriterion("sync not between", value1, value2, "sync");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

11
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientMedicationInfo.java

@ -29,6 +29,8 @@ public class DockPatientMedicationInfo implements Serializable {
private String remark;
private String sync;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -127,6 +129,14 @@ public class DockPatientMedicationInfo implements Serializable {
this.remark = remark == null ? null : remark.trim();
}
public String getSync() {
return sync;
}
public void setSync(String sync) {
this.sync = sync == null ? null : sync.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -145,6 +155,7 @@ public class DockPatientMedicationInfo implements Serializable {
sb.append(", updateTime=").append(updateTime);
sb.append(", delFlag=").append(delFlag);
sb.append(", remark=").append(remark);
sb.append(", sync=").append(sync);
sb.append("]");
return sb.toString();
}

70
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientMedicationInfoExample.java

@ -895,6 +895,76 @@ public class DockPatientMedicationInfoExample {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andSyncIsNull() {
addCriterion("sync is null");
return (Criteria) this;
}
public Criteria andSyncIsNotNull() {
addCriterion("sync is not null");
return (Criteria) this;
}
public Criteria andSyncEqualTo(String value) {
addCriterion("sync =", value, "sync");
return (Criteria) this;
}
public Criteria andSyncNotEqualTo(String value) {
addCriterion("sync <>", value, "sync");
return (Criteria) this;
}
public Criteria andSyncGreaterThan(String value) {
addCriterion("sync >", value, "sync");
return (Criteria) this;
}
public Criteria andSyncGreaterThanOrEqualTo(String value) {
addCriterion("sync >=", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLessThan(String value) {
addCriterion("sync <", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLessThanOrEqualTo(String value) {
addCriterion("sync <=", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLike(String value) {
addCriterion("sync like", value, "sync");
return (Criteria) this;
}
public Criteria andSyncNotLike(String value) {
addCriterion("sync not like", value, "sync");
return (Criteria) this;
}
public Criteria andSyncIn(List<String> values) {
addCriterion("sync in", values, "sync");
return (Criteria) this;
}
public Criteria andSyncNotIn(List<String> values) {
addCriterion("sync not in", values, "sync");
return (Criteria) this;
}
public Criteria andSyncBetween(String value1, String value2) {
addCriterion("sync between", value1, value2, "sync");
return (Criteria) this;
}
public Criteria andSyncNotBetween(String value1, String value2) {
addCriterion("sync not between", value1, value2, "sync");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

11
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientVisitInfo.java

@ -91,6 +91,8 @@ public class DockPatientVisitInfo implements Serializable {
private String remark;
private String sync;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -437,6 +439,14 @@ public class DockPatientVisitInfo implements Serializable {
this.remark = remark == null ? null : remark.trim();
}
public String getSync() {
return sync;
}
public void setSync(String sync) {
this.sync = sync == null ? null : sync.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -486,6 +496,7 @@ public class DockPatientVisitInfo implements Serializable {
sb.append(", updateTime=").append(updateTime);
sb.append(", delFlag=").append(delFlag);
sb.append(", remark=").append(remark);
sb.append(", sync=").append(sync);
sb.append("]");
return sb.toString();
}

70
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientVisitInfoExample.java

@ -2805,6 +2805,76 @@ public class DockPatientVisitInfoExample {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andSyncIsNull() {
addCriterion("sync is null");
return (Criteria) this;
}
public Criteria andSyncIsNotNull() {
addCriterion("sync is not null");
return (Criteria) this;
}
public Criteria andSyncEqualTo(String value) {
addCriterion("sync =", value, "sync");
return (Criteria) this;
}
public Criteria andSyncNotEqualTo(String value) {
addCriterion("sync <>", value, "sync");
return (Criteria) this;
}
public Criteria andSyncGreaterThan(String value) {
addCriterion("sync >", value, "sync");
return (Criteria) this;
}
public Criteria andSyncGreaterThanOrEqualTo(String value) {
addCriterion("sync >=", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLessThan(String value) {
addCriterion("sync <", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLessThanOrEqualTo(String value) {
addCriterion("sync <=", value, "sync");
return (Criteria) this;
}
public Criteria andSyncLike(String value) {
addCriterion("sync like", value, "sync");
return (Criteria) this;
}
public Criteria andSyncNotLike(String value) {
addCriterion("sync not like", value, "sync");
return (Criteria) this;
}
public Criteria andSyncIn(List<String> values) {
addCriterion("sync in", values, "sync");
return (Criteria) this;
}
public Criteria andSyncNotIn(List<String> values) {
addCriterion("sync not in", values, "sync");
return (Criteria) this;
}
public Criteria andSyncBetween(String value1, String value2) {
addCriterion("sync between", value1, value2, "sync");
return (Criteria) this;
}
public Criteria andSyncNotBetween(String value1, String value2) {
addCriterion("sync not between", value1, value2, "sync");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

1
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/DockService.java

@ -23,4 +23,5 @@ public interface DockService {
*/
void pulling(Date startTime, Date endTime);
void synchrodata();
}

433
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/impl/DockServiceImpl.java

@ -14,6 +14,7 @@ import com.ccsens.system.persist.dao.DockDao;
import com.ccsens.system.persist.mapper.*;
import com.ccsens.system.service.DmsDataValueService;
import com.ccsens.system.service.DockService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@ -21,6 +22,8 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Author zzc
@ -28,6 +31,7 @@ import java.util.List;
* @Date 2026/2/9 14:55
* @description:
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class DockServiceImpl implements DockService {
@ -249,4 +253,433 @@ public class DockServiceImpl implements DockService {
}
}
}
public void synchrodata(){
//患者信息
try {
syncPmsPatient();
}catch (Exception e){
log.error("患者信息同步失败",e);
}
//就诊信息
try {
syncPmsPatientVisitInfo();
}catch (Exception e){
log.error("就诊信息同步失败",e);
}
//诊断信息
try {
syncPmsPatientDiagnosis();
}catch (Exception e){
log.error("诊断信息同步失败",e);
}
//用药信息
try {
syncPmsPatientParentIllness();
}catch (Exception e){
log.error("用药信息同步失败",e);
}
}
private void syncPmsPatient() {
DockPatientBaseInfoExample dockPatientBaseInfoExample = new DockPatientBaseInfoExample();
dockPatientBaseInfoExample.createCriteria().andSyncEqualTo("0").andDelFlagEqualTo((byte) 0);
List<DockPatientBaseInfo> dockPatientBaseInfos = dockPatientBaseInfoMapper.selectByExample(dockPatientBaseInfoExample);
if (CollUtil.isEmpty(dockPatientBaseInfos)) {
return;
}
for (DockPatientBaseInfo dockPatientBaseInfo : dockPatientBaseInfos) {
if(ObjectUtil.isNull(dockPatientBaseInfo.getIdCard())){
continue;
}
//根据患者身份证号查询业务表内患者信息
PmsPatient pmsPatient;
PmsPatientExample pmsPatientExample = new PmsPatientExample();
pmsPatientExample.createCriteria().andIdcardEqualTo(dockPatientBaseInfo.getIdCard()).andDelFlagEqualTo((byte) 0);
List<PmsPatient> pmsPatients = pmsPatientMapper.selectByExample(pmsPatientExample);
if (CollUtil.isNotEmpty(pmsPatients)) {
//存在就更新
pmsPatient = pmsPatients.get(0);
disposePmsPatient(dockPatientBaseInfo, pmsPatient);
pmsPatientMapper.updateByPrimaryKeySelective(pmsPatient);
}else {
//不存在则插入
pmsPatient = new PmsPatient();
pmsPatient.setId(IdUtil.getSnowflake().nextId());
disposePmsPatient(dockPatientBaseInfo, pmsPatient);
pmsPatientMapper.insertSelective(pmsPatient);
}
}
}
private void syncPmsPatientVisitInfo() {
//查询同步表内的就诊信息表
DockPatientVisitInfoExample dockPatientVisitInfoExample = new DockPatientVisitInfoExample();
dockPatientVisitInfoExample.createCriteria().andSyncEqualTo("0");
List<DockPatientVisitInfo> dockPatientVisitInfos = dockPatientVisitInfoMapper.selectByExample(dockPatientVisitInfoExample);
if(CollUtil.isEmpty(dockPatientVisitInfos)){
return;
}
for (DockPatientVisitInfo dockPatientVisitInfo : dockPatientVisitInfos) {
savePatientBady(dockPatientVisitInfo);
}
}
private PmsPatientBody savePatientBady(DockPatientVisitInfo dockPatientVisitInfo) {
//根据身份证号查找业务表内患者信息
PmsPatient pmsPatient;
PmsPatientExample pmsPatientExample = new PmsPatientExample();
pmsPatientExample.createCriteria().andIdcardEqualTo(dockPatientVisitInfo.getIdCard()).andDelFlagEqualTo((byte) 0);
List<PmsPatient> pmsPatients = pmsPatientMapper.selectByExample(pmsPatientExample);
if (CollUtil.isEmpty(pmsPatients)) {
//根据身份证号查找同步表的患者信息
DockPatientBaseInfoExample dockPatientBaseInfoExample = new DockPatientBaseInfoExample();
dockPatientBaseInfoExample.createCriteria().andIdCardEqualTo(dockPatientVisitInfo.getIdCard()).andDelFlagEqualTo((byte) 0);
List<DockPatientBaseInfo> dockPatientBaseInfos = dockPatientBaseInfoMapper.selectByExample(dockPatientBaseInfoExample);
if (CollUtil.isNotEmpty(dockPatientBaseInfos)) {
//存在则更新
pmsPatient = new PmsPatient();
pmsPatient.setId(IdUtil.getSnowflake().nextId());
disposePmsPatient(dockPatientBaseInfos.get(0), pmsPatient);
pmsPatientMapper.insertSelective(pmsPatient);
}else {
//不存在表示患者确实不存在,直接跳过这个就诊信息
return null;
}
}else {
pmsPatient = pmsPatients.get(0);
}
//根据就诊流水号查询业务表内患者就诊信息
PmsPatientBody pmsPatientBody;
PmsPatientBodyExample pmsPatientBodyExample = new PmsPatientBodyExample();
pmsPatientBodyExample.createCriteria().andOutpatientNoEqualTo(dockPatientVisitInfo.getVisitNo()).andDelFlagEqualTo((byte) 0);
List<PmsPatientBody> pmsPatientBodies = pmsPatientBodyMapper.selectByExample(pmsPatientBodyExample);
if (CollUtil.isNotEmpty(pmsPatientBodies)) {
pmsPatientBody = pmsPatientBodies.get(0);
pmsPatientBody.setPatientId(pmsPatient.getId());
disposePmsPatientBody(dockPatientVisitInfo, pmsPatientBody);
pmsPatientBodyMapper.updateByPrimaryKeySelective(pmsPatientBody);
}else {
pmsPatientBody = new PmsPatientBody();
pmsPatientBody.setId(IdUtil.getSnowflake().nextId());
pmsPatientBody.setPatientId(pmsPatient.getId());
disposePmsPatientBody(dockPatientVisitInfo, pmsPatientBody);
pmsPatientBodyMapper.insertSelective(pmsPatientBody);
}
return pmsPatientBody;
}
private void syncPmsPatientDiagnosis() {
//查找同步表的诊断信息
DockPatientDiagnosisExample dockPatientDiagnosisExample = new DockPatientDiagnosisExample();
dockPatientDiagnosisExample.createCriteria().andSyncEqualTo("0");
List<DockPatientDiagnosis> dockPatientDiagnosiss = dockPatientDiagnosisMapper.selectByExample(dockPatientDiagnosisExample);
if (CollUtil.isEmpty(dockPatientDiagnosiss)) {
return;
}
//将诊断数据根据就诊流水号进行分组
Map<String, List<DockPatientDiagnosis>> dockPatientDiagnosisMap = dockPatientDiagnosiss.stream().collect(Collectors.groupingBy(DockPatientDiagnosis::getVisitNo));
for (String key : dockPatientDiagnosisMap.keySet()) {
//根据就诊流水号查找业务表内患者就诊信息
PmsPatientBody pmsPatientBody;
PmsPatientBodyExample pmsPatientBodyExample = new PmsPatientBodyExample();
pmsPatientBodyExample.createCriteria().andOutpatientNoEqualTo(key).andDelFlagEqualTo((byte) 0);
List<PmsPatientBody> pmsPatientBodies = pmsPatientBodyMapper.selectByExample(pmsPatientBodyExample);
if (CollUtil.isNotEmpty(pmsPatientBodies)) {
pmsPatientBody = pmsPatientBodies.get(0);
} else {
//不存在则查找同步表的就诊信息
DockPatientVisitInfoExample dockPatientVisitInfoExample = new DockPatientVisitInfoExample();
dockPatientVisitInfoExample.createCriteria().andVisitNoEqualTo(key).andDelFlagEqualTo((byte) 0);
List<DockPatientVisitInfo> dockPatientVisitInfos = dockPatientVisitInfoMapper.selectByExample(dockPatientVisitInfoExample);
if (CollUtil.isNotEmpty(dockPatientVisitInfos)) {
pmsPatientBody = savePatientBady(dockPatientVisitInfos.get(0));
if (pmsPatientBody == null) {
continue;
}
}else {
//不存在则跳过
continue;
}
}
//根据流水号删除业务表内的旧数据
PmsPatientDiagnosisExample pmsPatientDiagnosisExample = new PmsPatientDiagnosisExample();
pmsPatientDiagnosisExample.createCriteria().andVisitNoEqualTo(key);
pmsPatientDiagnosisMapper.deleteByExample(pmsPatientDiagnosisExample);
for (DockPatientDiagnosis dockPatientDiagnosis : dockPatientDiagnosisMap.get(key)) {
//添加业务表
PmsPatientDiagnosis pmsPatientDiagnosis = new PmsPatientDiagnosis();
pmsPatientDiagnosis.setId(IdUtil.getSnowflake().nextId());
pmsPatientDiagnosis.setPatientId(pmsPatientBody.getPatientId());
pmsPatientDiagnosis.setVisitNo(dockPatientDiagnosis.getVisitNo());
pmsPatientDiagnosis.setDiagnosisType(dockPatientDiagnosis.getDiagnosisType());
pmsPatientDiagnosis.setIsMainDiagnosis(dockPatientDiagnosis.getIsMainDiagnosis().toString());
pmsPatientDiagnosis.setDiagnosisCode(dockPatientDiagnosis.getDiagnosisCode());
pmsPatientDiagnosis.setDiagnosisName(dockPatientDiagnosis.getDiagnosisName());
pmsPatientDiagnosis.setDiagnosisDate(DateUtil.format(dockPatientDiagnosis.getDiagnosisDate(), "yyyy-MM-dd HH:mm:ss"));
pmsPatientDiagnosisMapper.insertSelective(pmsPatientDiagnosis);
}
}
}
private void syncPmsPatientParentIllness() {
//查找同步表的疾病信息
DockPatientMedicationInfoExample dockPatientMedicationInfoExample = new DockPatientMedicationInfoExample();
dockPatientMedicationInfoExample.createCriteria().andSyncEqualTo("0");
List<DockPatientMedicationInfo> dockPatientMedicationInfos = dockPatientMedicationInfoMapper.selectByExample(dockPatientMedicationInfoExample);
if (CollUtil.isEmpty(dockPatientMedicationInfos)) {
return;
}
//将疾病信息根据就诊流水号进行分组
Map<String, List<DockPatientMedicationInfo>> dockPatientMedicationInfoMap = dockPatientMedicationInfos.stream().collect(Collectors.groupingBy(DockPatientMedicationInfo::getVisitNo));
for (String key : dockPatientMedicationInfoMap.keySet()) {
//根据就诊流水号查找业务表内患者就诊信息
PmsPatientBody pmsPatientBody;
PmsPatientBodyExample pmsPatientBodyExample = new PmsPatientBodyExample();
pmsPatientBodyExample.createCriteria().andOutpatientNoEqualTo(key).andDelFlagEqualTo((byte) 0);
List<PmsPatientBody> pmsPatientBodies = pmsPatientBodyMapper.selectByExample(pmsPatientBodyExample);
if (CollUtil.isNotEmpty(pmsPatientBodies)) {
pmsPatientBody = pmsPatientBodies.get(0);
}else {
//不存在则查找同步表的就诊信息
DockPatientVisitInfoExample dockPatientVisitInfoExample = new DockPatientVisitInfoExample();
dockPatientVisitInfoExample.createCriteria().andVisitNoEqualTo(key).andDelFlagEqualTo((byte) 0);
List<DockPatientVisitInfo> dockPatientVisitInfos = dockPatientVisitInfoMapper.selectByExample(dockPatientVisitInfoExample);
if (CollUtil.isNotEmpty(dockPatientVisitInfos)){
pmsPatientBody = savePatientBady(dockPatientVisitInfos.get(0));
if (pmsPatientBody == null) {
continue;
}
}else {
//不存在则跳过
continue;
}
}
//根据流水号删除业务表内的旧数据
PmsPatientParentIllnessExample pmsPatientParentIllnessExample = new PmsPatientParentIllnessExample();
pmsPatientParentIllnessExample.createCriteria().andVisitNoEqualTo(key);
pmsPatientParentIllnessMapper.deleteByExample(pmsPatientParentIllnessExample);
for (DockPatientMedicationInfo dockPatientMedicationInfo : dockPatientMedicationInfoMap.get(key)) {
PmsPatientParentIllness pmsPatientParentIllness = new PmsPatientParentIllness();
pmsPatientParentIllness.setId(IdUtil.getSnowflake().nextId());
pmsPatientParentIllness.setPatientId(pmsPatientBody.getPatientId());
pmsPatientParentIllness.setVisitNo(dockPatientMedicationInfo.getVisitNo());
pmsPatientParentIllness.setDrugName(dockPatientMedicationInfo.getDrugName());
pmsPatientParentIllness.setDose(dockPatientMedicationInfo.getDose().toString());
pmsPatientParentIllness.setUnit(dockPatientMedicationInfo.getUnit());
pmsPatientParentIllness.setFrequency(dockPatientMedicationInfo.getFrequency());
pmsPatientParentIllnessMapper.insertSelective(pmsPatientParentIllness);
}
}
}
private void disposePmsPatientBody(DockPatientVisitInfo dockPatientVisitInfo, PmsPatientBody pmsPatientBody) {
pmsPatientBody.setVisitType(dockPatientVisitInfo.getVisitType());
pmsPatientBody.setOutpatientNo(dockPatientVisitInfo.getVisitNo());
pmsPatientBody.setAge(dockPatientVisitInfo.getAge() != null ? String.valueOf(dockPatientVisitInfo.getAge()) : null);
pmsPatientBody.setDepartment(dockPatientVisitInfo.getDepartment());
pmsPatientBody.setDoctor(dockPatientVisitInfo.getDoctor());
// 入院信息
pmsPatientBody.setAdmissionDate(dockPatientVisitInfo.getAdmissionDate() != null ? dockPatientVisitInfo.getAdmissionDate().toString() : null);
pmsPatientBody.setAdmissionCount(dockPatientVisitInfo.getAdmissionCount() != null ? String.valueOf(dockPatientVisitInfo.getAdmissionCount()) : null);
pmsPatientBody.setAdmissionMethod(dockPatientVisitInfo.getAdmissionMethod());
pmsPatientBody.setBedNumber(dockPatientVisitInfo.getBedNumber());
pmsPatientBody.setDischargeDate(dockPatientVisitInfo.getDischargeDate() != null ? dockPatientVisitInfo.getDischargeDate().toString() : null);
pmsPatientBody.setDischargeMethod(dockPatientVisitInfo.getDischargeMethod());
// 身体指标
pmsPatientBody.setHeight(dockPatientVisitInfo.getHeight() != null ? String.valueOf(dockPatientVisitInfo.getHeight()) : null);
pmsPatientBody.setWeight(dockPatientVisitInfo.getWeight() != null ? String.valueOf(dockPatientVisitInfo.getWeight()) : null);
pmsPatientBody.setTz(dockPatientVisitInfo.getTz() != null ? String.valueOf(dockPatientVisitInfo.getTz()) : null);
pmsPatientBody.setTemperature(dockPatientVisitInfo.getTemperature() != null ? String.valueOf(dockPatientVisitInfo.getTemperature()) : null);
pmsPatientBody.setBloodPressureShrink(dockPatientVisitInfo.getBloodPressureShrink() != null ? String.valueOf(dockPatientVisitInfo.getBloodPressureShrink()) : null);
pmsPatientBody.setBloodPressureDiastole(dockPatientVisitInfo.getBloodPressureDiastole() != null ? String.valueOf(dockPatientVisitInfo.getBloodPressureDiastole()) : null);
pmsPatientBody.setPulse(dockPatientVisitInfo.getPulse() != null ? String.valueOf(dockPatientVisitInfo.getPulse()) : null);
// 化验指标
pmsPatientBody.setCreatinine(dockPatientVisitInfo.getCreatinine() != null ? String.valueOf(dockPatientVisitInfo.getCreatinine()) : null);
pmsPatientBody.setOxygenSaturation(dockPatientVisitInfo.getOxygenSaturation() != null ? String.valueOf(dockPatientVisitInfo.getOxygenSaturation()) : null);
pmsPatientBody.setAlbumin(dockPatientVisitInfo.getAlbumin() != null ? String.valueOf(dockPatientVisitInfo.getAlbumin()) : null);
pmsPatientBody.setTotalProtein(dockPatientVisitInfo.getTotalProtein() != null ? String.valueOf(dockPatientVisitInfo.getTotalProtein()) : null);
pmsPatientBody.setVitaminD3(dockPatientVisitInfo.getVitaminD3() != null ? String.valueOf(dockPatientVisitInfo.getVitaminD3()) : null);
pmsPatientBody.setHematocrit(dockPatientVisitInfo.getHematocrit() != null ? String.valueOf(dockPatientVisitInfo.getHematocrit()) : null);
pmsPatientBody.setDimer(dockPatientVisitInfo.getDimer() != null ? String.valueOf(dockPatientVisitInfo.getDimer()) : null);
}
private void disposePmsPatient(DockPatientBaseInfo dockPatientBaseInfo, PmsPatient pmsPatient) {
// pmsPatient.setName(dockPatientBaseInfo.getName());
// pmsPatient.setNameFull(PinyinUtil.getPinyin(pmsPatient.getName(), ""));
// pmsPatient.setNameInitial(PinyinUtil.getFirstLetter(pmsPatient.getName(), ""));
// pmsPatient.setIdcard(dockPatientBaseInfo.getIdCard());
// pmsPatient.setPhone(dockPatientBaseInfo.getPhone());
// pmsPatient.setSex(Byte.parseByte(dockPatientBaseInfo.getSex()));
// pmsPatient.setBirthday(DateUtil.format(dockPatientBaseInfo.getBirthday(), "yyyy-MM-dd"));
// pmsPatient.setEducationalStatus(Byte.parseByte(dockPatientBaseInfo.getEducationalStatus()));
// pmsPatient.setCareer(Byte.parseByte(dockPatientBaseInfo.getCareer()));
// pmsPatient.setMaritalStatus(Byte.parseByte(dockPatientBaseInfo.getMaritalStatus()));
// pmsPatient.setNation(dockPatientBaseInfo.getNation());
// pmsPatient.setNativePlace(dockPatientBaseInfo.getNativePlace());
// pmsPatient.setAddress(dockPatientBaseInfo.getAddress());
// pmsPatient.setDwellingState(Byte.parseByte(dockPatientBaseInfo.getDwellingState()));
// pmsPatient.setContactName(dockPatientBaseInfo.getContactName());
// pmsPatient.setContactMobile(dockPatientBaseInfo.getContactMobile());
// pmsPatient.setContactRelation(dockPatientBaseInfo.getContactRelation());
// pmsPatient.setAboBloodType(dockPatientBaseInfo.getAboBloodType());
// pmsPatient.setRhBloodType(dockPatientBaseInfo.getRhBloodType());
// pmsPatient.setBelief(dockPatientBaseInfo.getBelief());
// pmsPatient.setHobby(dockPatientBaseInfo.getHobby());
// 姓名相关
pmsPatient.setName(dockPatientBaseInfo.getName());
pmsPatient.setNameFull(PinyinUtil.getPinyin(pmsPatient.getName(), ""));
pmsPatient.setNameInitial(PinyinUtil.getFirstLetter(pmsPatient.getName(), ""));
// 证件信息
pmsPatient.setIdcard(dockPatientBaseInfo.getIdCard());
pmsPatient.setPhone(dockPatientBaseInfo.getPhone());
// 性别转换:将"男"/"女"转换为 0/1
String sex = dockPatientBaseInfo.getSex();
if ("男".equals(sex)) {
pmsPatient.setSex((byte)0);
} else if ("女".equals(sex)) {
pmsPatient.setSex((byte)1);
} else {
// 如果已经有数字代码,直接转换
try {
pmsPatient.setSex(Byte.parseByte(sex));
} catch (NumberFormatException e) {
pmsPatient.setSex((byte)0); // 默认值
}
}
// 出生日期
pmsPatient.setBirthday(DateUtil.format(dockPatientBaseInfo.getBirthday(), "yyyy-MM-dd"));
// 教育程度转换
String educationalStatus = dockPatientBaseInfo.getEducationalStatus();
if ("文盲".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)1);
} else if ("小学".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)2);
} else if ("初中".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)3);
} else if ("高中".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)4);
} else if ("大学".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)5);
} else if ("大学以上".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)6);
} else if ("其他".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)7);
} else {
try {
pmsPatient.setEducationalStatus(Byte.parseByte(educationalStatus));
} catch (NumberFormatException e) {
pmsPatient.setEducationalStatus((byte)7); // 默认其他
}
}
// 职业转换
String career = dockPatientBaseInfo.getCareer();
if ("农林牧渔水利生产人员".equals(career)) {
pmsPatient.setCareer((byte)1);
} else if ("教师".equals(career)) {
pmsPatient.setCareer((byte)2);
} else if ("医务工作者".equals(career)) {
pmsPatient.setCareer((byte)3);
} else if ("专业技术人员".equals(career)) {
pmsPatient.setCareer((byte)4);
} else if ("生产、运输设备操作人员及有关人员".equals(career)) {
pmsPatient.setCareer((byte)5);
} else if ("商业、服务业人员".equals(career)) {
pmsPatient.setCareer((byte)6);
} else if ("国家机关、事业单位、企业负责人".equals(career)) {
pmsPatient.setCareer((byte)7);
} else if ("国家机关、事业单位、企业办事人员和有关人员".equals(career)) {
pmsPatient.setCareer((byte)8);
} else if ("军人".equals(career)) {
pmsPatient.setCareer((byte)9);
} else if ("媒体、文体类工作人员".equals(career)) {
pmsPatient.setCareer((byte)10);
} else if ("在校学生".equals(career)) {
pmsPatient.setCareer((byte)11);
} else if ("未就业".equals(career)) {
pmsPatient.setCareer((byte)12);
} else if ("家务".equals(career)) {
pmsPatient.setCareer((byte)13);
} else if ("其他".equals(career)) {
pmsPatient.setCareer((byte)14);
} else {
try {
pmsPatient.setCareer(Byte.parseByte(career));
} catch (NumberFormatException e) {
pmsPatient.setCareer(null);
}
}
// 婚姻状况转换
String maritalStatus = dockPatientBaseInfo.getMaritalStatus();
if ("未婚".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)1);
} else if ("已婚".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)2);
} else if ("离异".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)3);
} else if ("分居".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)4);
} else if ("丧偶".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)5);
} else if ("同居".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)6);
} else if ("其他".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)7);
} else {
try {
pmsPatient.setMaritalStatus(Byte.parseByte(maritalStatus));
} catch (NumberFormatException e) {
pmsPatient.setMaritalStatus(null);
}
}
// 其他字段直接设置
pmsPatient.setNation(dockPatientBaseInfo.getNation());
pmsPatient.setNativePlace(dockPatientBaseInfo.getNativePlace());
pmsPatient.setAddress(dockPatientBaseInfo.getAddress());
// 居住状态转换
String dwellingState = dockPatientBaseInfo.getDwellingState();
if ("独居".equals(dwellingState)) {
pmsPatient.setDwellingState((byte)1);
} else if ("与配偶或对象或子女".equals(dwellingState)) {
pmsPatient.setDwellingState((byte)2);
} else if ("与亲戚或朋友居住".equals(dwellingState)) {
pmsPatient.setDwellingState((byte)3);
} else {
try {
pmsPatient.setDwellingState(Byte.parseByte(dwellingState));
} catch (NumberFormatException e) {
pmsPatient.setDwellingState(null);
}
}
// 联系人信息
pmsPatient.setContactName(dockPatientBaseInfo.getContactName());
pmsPatient.setContactMobile(dockPatientBaseInfo.getContactMobile());
pmsPatient.setContactRelation(dockPatientBaseInfo.getContactRelation());
// 血型信息
pmsPatient.setAboBloodType(dockPatientBaseInfo.getAboBloodType());
pmsPatient.setRhBloodType(dockPatientBaseInfo.getRhBloodType());
// 其他信息
pmsPatient.setBelief(dockPatientBaseInfo.getBelief());
pmsPatient.setHobby(dockPatientBaseInfo.getHobby());
}
}

28
ruisi_java/ruisi-system/src/main/resources/mapper/system/DockDeptMapper.xml

@ -10,6 +10,7 @@
<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="sync" jdbcType="VARCHAR" property="sync" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -70,7 +71,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, dept_name, dept_code, del_flag, create_by, create_time, update_by, update_time
id, dept_name, dept_code, del_flag, create_by, create_time, update_by, update_time,
sync
</sql>
<select id="selectByExample" parameterType="com.ccsens.system.domain.po.DockDeptExample" resultMap="BaseResultMap">
select
@ -105,10 +107,12 @@
<insert id="insert" parameterType="com.ccsens.system.domain.po.DockDept">
insert into dock_dept (id, dept_name, dept_code,
del_flag, create_by, create_time,
update_by, update_time)
update_by, update_time, sync
)
values (#{id,jdbcType=BIGINT}, #{deptName,jdbcType=VARCHAR}, #{deptCode,jdbcType=VARCHAR},
#{delFlag,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{sync,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.system.domain.po.DockDept">
insert into dock_dept
@ -137,6 +141,9 @@
<if test="updateTime != null">
update_time,
</if>
<if test="sync != null">
sync,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -163,6 +170,9 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="sync != null">
#{sync,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.system.domain.po.DockDeptExample" resultType="java.lang.Long">
@ -198,6 +208,9 @@
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.sync != null">
sync = #{record.sync,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -212,7 +225,8 @@
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
sync = #{record.sync,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -241,6 +255,9 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="sync != null">
sync = #{sync,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -252,7 +269,8 @@
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
sync = #{sync,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

25
ruisi_java/ruisi-system/src/main/resources/mapper/system/DockEmplMapper.xml

@ -12,6 +12,7 @@
<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="sync" jdbcType="VARCHAR" property="sync" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -73,7 +74,7 @@
</sql>
<sql id="Base_Column_List">
id, empl_name, empl_code, empl_type, dept_code, del_flag, create_by, create_time,
update_by, update_time
update_by, update_time, sync
</sql>
<select id="selectByExample" parameterType="com.ccsens.system.domain.po.DockEmplExample" resultMap="BaseResultMap">
select
@ -109,11 +110,11 @@
insert into dock_empl (id, empl_name, empl_code,
empl_type, dept_code, del_flag,
create_by, create_time, update_by,
update_time)
update_time, sync)
values (#{id,jdbcType=BIGINT}, #{emplName,jdbcType=VARCHAR}, #{emplCode,jdbcType=VARCHAR},
#{emplType,jdbcType=VARCHAR}, #{deptCode,jdbcType=VARCHAR}, #{delFlag,jdbcType=CHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP})
#{updateTime,jdbcType=TIMESTAMP}, #{sync,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.system.domain.po.DockEmpl">
insert into dock_empl
@ -148,6 +149,9 @@
<if test="updateTime != null">
update_time,
</if>
<if test="sync != null">
sync,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -180,6 +184,9 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="sync != null">
#{sync,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.system.domain.po.DockEmplExample" resultType="java.lang.Long">
@ -221,6 +228,9 @@
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.sync != null">
sync = #{record.sync,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -237,7 +247,8 @@
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
sync = #{record.sync,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -272,6 +283,9 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="sync != null">
sync = #{sync,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -285,7 +299,8 @@
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
sync = #{sync,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

27
ruisi_java/ruisi-system/src/main/resources/mapper/system/DockPatientBaseInfoMapper.xml

@ -28,6 +28,7 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="del_flag" jdbcType="TINYINT" property="delFlag" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="sync" jdbcType="VARCHAR" property="sync" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -91,7 +92,7 @@
id, name, id_card, phone, sex, birthday, educational_status, career, marital_status,
nation, native_place, address, dwelling_state, contact_name, contact_mobile, contact_relation,
abo_blood_type, rh_blood_type, belief, hobby, create_by, create_time, update_by,
update_time, del_flag, remark
update_time, del_flag, remark, sync
</sql>
<select id="selectByExample" parameterType="com.ccsens.system.domain.po.DockPatientBaseInfoExample" resultMap="BaseResultMap">
select
@ -132,7 +133,8 @@
contact_relation, abo_blood_type, rh_blood_type,
belief, hobby, create_by,
create_time, update_by, update_time,
del_flag, remark)
del_flag, remark, sync
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR},
#{phone,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{birthday,jdbcType=DATE},
#{educationalStatus,jdbcType=VARCHAR}, #{career,jdbcType=VARCHAR}, #{maritalStatus,jdbcType=VARCHAR},
@ -141,7 +143,8 @@
#{contactRelation,jdbcType=VARCHAR}, #{aboBloodType,jdbcType=VARCHAR}, #{rhBloodType,jdbcType=VARCHAR},
#{belief,jdbcType=VARCHAR}, #{hobby,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR})
#{delFlag,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}, #{sync,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.system.domain.po.DockPatientBaseInfo">
insert into dock_patient_base_info
@ -224,6 +227,9 @@
<if test="remark != null">
remark,
</if>
<if test="sync != null">
sync,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -304,6 +310,9 @@
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="sync != null">
#{sync,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.system.domain.po.DockPatientBaseInfoExample" resultType="java.lang.Long">
@ -393,6 +402,9 @@
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.sync != null">
sync = #{record.sync,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -425,7 +437,8 @@
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
del_flag = #{record.delFlag,jdbcType=TINYINT},
remark = #{record.remark,jdbcType=VARCHAR}
remark = #{record.remark,jdbcType=VARCHAR},
sync = #{record.sync,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -508,6 +521,9 @@
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="sync != null">
sync = #{sync,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -537,7 +553,8 @@
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR}
remark = #{remark,jdbcType=VARCHAR},
sync = #{sync,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

26
ruisi_java/ruisi-system/src/main/resources/mapper/system/DockPatientDiagnosisMapper.xml

@ -15,6 +15,7 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="del_flag" jdbcType="TINYINT" property="delFlag" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="sync" jdbcType="VARCHAR" property="sync" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -76,7 +77,8 @@
</sql>
<sql id="Base_Column_List">
id, visit_no, diagnosis_type, is_main_diagnosis, diagnosis_name, diagnosis_code,
diagnosis_date, create_by, create_time, update_by, update_time, del_flag, remark
diagnosis_date, create_by, create_time, update_by, update_time, del_flag, remark,
sync
</sql>
<select id="selectByExample" parameterType="com.ccsens.system.domain.po.DockPatientDiagnosisExample" resultMap="BaseResultMap">
select
@ -113,12 +115,12 @@
is_main_diagnosis, diagnosis_name, diagnosis_code,
diagnosis_date, create_by, create_time,
update_by, update_time, del_flag,
remark)
remark, sync)
values (#{id,jdbcType=BIGINT}, #{visitNo,jdbcType=VARCHAR}, #{diagnosisType,jdbcType=VARCHAR},
#{isMainDiagnosis,jdbcType=TINYINT}, #{diagnosisName,jdbcType=VARCHAR}, #{diagnosisCode,jdbcType=VARCHAR},
#{diagnosisDate,jdbcType=DATE}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT},
#{remark,jdbcType=VARCHAR})
#{remark,jdbcType=VARCHAR}, #{sync,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.system.domain.po.DockPatientDiagnosis">
insert into dock_patient_diagnosis
@ -162,6 +164,9 @@
<if test="remark != null">
remark,
</if>
<if test="sync != null">
sync,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -203,6 +208,9 @@
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="sync != null">
#{sync,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.system.domain.po.DockPatientDiagnosisExample" resultType="java.lang.Long">
@ -253,6 +261,9 @@
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.sync != null">
sync = #{record.sync,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -272,7 +283,8 @@
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
del_flag = #{record.delFlag,jdbcType=TINYINT},
remark = #{record.remark,jdbcType=VARCHAR}
remark = #{record.remark,jdbcType=VARCHAR},
sync = #{record.sync,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -316,6 +328,9 @@
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="sync != null">
sync = #{sync,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -332,7 +347,8 @@
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR}
remark = #{remark,jdbcType=VARCHAR},
sync = #{sync,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

29
ruisi_java/ruisi-system/src/main/resources/mapper/system/DockPatientMedicationInfoMapper.xml

@ -14,6 +14,7 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="del_flag" jdbcType="TINYINT" property="delFlag" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="sync" jdbcType="VARCHAR" property="sync" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -75,7 +76,7 @@
</sql>
<sql id="Base_Column_List">
id, visit_no, drug_name, dose, unit, frequency, create_by, create_time, update_by,
update_time, del_flag, remark
update_time, del_flag, remark, sync
</sql>
<select id="selectByExample" parameterType="com.ccsens.system.domain.po.DockPatientMedicationInfoExample" resultMap="BaseResultMap">
select
@ -111,13 +112,13 @@
insert into dock_patient_medication_info (id, visit_no, drug_name,
dose, unit, frequency,
create_by, create_time, update_by,
update_time, del_flag, remark
)
update_time, del_flag, remark,
sync)
values (#{id,jdbcType=BIGINT}, #{visitNo,jdbcType=VARCHAR}, #{drugName,jdbcType=VARCHAR},
#{dose,jdbcType=DECIMAL}, #{unit,jdbcType=VARCHAR}, #{frequency,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}
)
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR},
#{sync,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.system.domain.po.DockPatientMedicationInfo">
insert into dock_patient_medication_info
@ -158,6 +159,9 @@
<if test="remark != null">
remark,
</if>
<if test="sync != null">
sync,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -196,6 +200,9 @@
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="sync != null">
#{sync,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.system.domain.po.DockPatientMedicationInfoExample" resultType="java.lang.Long">
@ -243,6 +250,9 @@
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.sync != null">
sync = #{record.sync,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -261,7 +271,8 @@
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
del_flag = #{record.delFlag,jdbcType=TINYINT},
remark = #{record.remark,jdbcType=VARCHAR}
remark = #{record.remark,jdbcType=VARCHAR},
sync = #{record.sync,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -302,6 +313,9 @@
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="sync != null">
sync = #{sync,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -317,7 +331,8 @@
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR}
remark = #{remark,jdbcType=VARCHAR},
sync = #{sync,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

25
ruisi_java/ruisi-system/src/main/resources/mapper/system/DockPatientVisitInfoMapper.xml

@ -45,6 +45,7 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="del_flag" jdbcType="TINYINT" property="delFlag" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="sync" jdbcType="VARCHAR" property="sync" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -111,7 +112,7 @@
albumin, total_protein, vitamin_d3, hematocrit, dimer, smoking_history, smoking_year,
smoking_quit, smoking_quit_year, drink_history, drink_year, drink_quit, drink_quit_year,
has_allergy, allergy_drug, create_by, create_time, update_by, update_time, del_flag,
remark
remark, sync
</sql>
<select id="selectByExample" parameterType="com.ccsens.system.domain.po.DockPatientVisitInfoExample" resultMap="BaseResultMap">
select
@ -158,7 +159,7 @@
drink_quit, drink_quit_year, has_allergy,
allergy_drug, create_by, create_time,
update_by, update_time, del_flag,
remark)
remark, sync)
values (#{id,jdbcType=BIGINT}, #{idCard,jdbcType=VARCHAR}, #{visitType,jdbcType=VARCHAR},
#{visitNo,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{department,jdbcType=VARCHAR},
#{doctor,jdbcType=VARCHAR}, #{admissionDate,jdbcType=TIMESTAMP}, #{admissionCount,jdbcType=INTEGER},
@ -173,7 +174,7 @@
#{drinkQuit,jdbcType=TINYINT}, #{drinkQuitYear,jdbcType=INTEGER}, #{hasAllergy,jdbcType=TINYINT},
#{allergyDrug,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT},
#{remark,jdbcType=VARCHAR})
#{remark,jdbcType=VARCHAR}, #{sync,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.system.domain.po.DockPatientVisitInfo">
insert into dock_patient_visit_info
@ -307,6 +308,9 @@
<if test="remark != null">
remark,
</if>
<if test="sync != null">
sync,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -438,6 +442,9 @@
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="sync != null">
#{sync,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.system.domain.po.DockPatientVisitInfoExample" resultType="java.lang.Long">
@ -578,6 +585,9 @@
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.sync != null">
sync = #{record.sync,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -627,7 +637,8 @@
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
del_flag = #{record.delFlag,jdbcType=TINYINT},
remark = #{record.remark,jdbcType=VARCHAR}
remark = #{record.remark,jdbcType=VARCHAR},
sync = #{record.sync,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -761,6 +772,9 @@
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="sync != null">
sync = #{sync,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -807,7 +821,8 @@
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR}
remark = #{remark,jdbcType=VARCHAR},
sync = #{sync,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

2
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/scheduled/DatasourceController.java

@ -51,4 +51,6 @@ public class DatasourceController {
}
}

27
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/scheduled/SyncHospitalData.java

@ -0,0 +1,27 @@
package com.ccsens.client.controller.scheduled;
import com.ccsens.common.annotation.DataSource;
import com.ccsens.common.enums.DataSourceType;
import com.ccsens.system.service.DockService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* @author zy
* @date 2026/2/28 16:30
*/
@Component
public class SyncHospitalData {
@Resource
private DockService dockService;
@DataSource(value = DataSourceType.SLAVE)
@Scheduled(cron = "0 */2 * * * ?")
public void syncPatientData() {
dockService.synchrodata();
}
}

2
ruisi_java/ruisi-web-client/src/main/resources/application-dev.yml

@ -11,7 +11,7 @@ spring:
# password: po3OynBO[M3579p6L7)o
url: jdbc:mysql://127.0.0.1:3306/ruisi_cga?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: q7510327
password: 123456
# 从库数据源
slave:
# 从数据源开关/默认关闭

Loading…
Cancel
Save