Commit 338924db8bc9b3b3173dd830e88d243c28a6d82f

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 36 changed files

platform-dal/src/main/java/com/lyms/platform/pojo/AssayConfig.java View file @ 338924d
... ... @@ -2,6 +2,9 @@
2 2  
3 3 import com.lyms.platform.common.result.BaseModel;
4 4  
  5 +/**
  6 + * 化验项
  7 + */
5 8 public class AssayConfig extends BaseModel {
6 9 /**
7 10 * 添加字段注释
platform-dal/src/main/java/com/lyms/platform/pojo/BasicConfig.java View file @ 338924d
... ... @@ -5,6 +5,9 @@
5 5  
6 6 import com.lyms.platform.common.result.BaseModel;
7 7  
  8 +/**
  9 + * 基础项配置
  10 + */
8 11 @Document(collection="lyms_basicconfig")
9 12 public class BasicConfig extends BaseModel {
10 13  
platform-dal/src/main/java/com/lyms/platform/pojo/CommunityConfig.java View file @ 338924d
... ... @@ -6,6 +6,7 @@
6 6  
7 7 /**
8 8 * Created by Zhang.Rui on 2016/3/18.
  9 + *
9 10 */
10 11 public class CommunityConfig {
11 12 private String id;
platform-data-api/pom.xml View file @ 338924d
... ... @@ -42,6 +42,11 @@
42 42 <artifactId>platform-biz-service</artifactId>
43 43 <version>${project.version}</version>
44 44 </dependency>
  45 + <dependency>
  46 + <groupId>com.lyms.core</groupId>
  47 + <artifactId>platform-mommyData</artifactId>
  48 + <version>${project.version}</version>
  49 + </dependency>
45 50 </dependencies>
46 51 <build>
47 52 <resources>
platform-data-api/src/main/java/com/lyms/platform/data/service/DataImportTaskService.java View file @ 338924d
  1 +package com.lyms.platform.data.service;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * Created by Administrator on 2016/4/30 0030.
  7 + */
  8 +public interface DataImportTaskService {
  9 +
  10 + /**
  11 + * 增量同步机构、部门、用户(职工(角色)、plat_user)
  12 + */
  13 + public void updateUsers();
  14 +
  15 + /**
  16 + * 全量同步机构、部门、用户(职工(角色)、plat_user)
  17 + */
  18 + public void fullUpdateUsers();
  19 +
  20 + /**
  21 + * 按医院同步机构、部门、用户(职工(角色)、plat_user)
  22 + */
  23 + public void updateUsersByHospital(String hospitalForeignId, Integer hospitalId, Date startTime);
  24 +
  25 + /**
  26 + * 全量同步基础配置
  27 + */
  28 + public void updateBasicConfig();
  29 +
  30 + /**
  31 + * 增量同步检验项
  32 + */
  33 + public void updateAssay();
  34 +
  35 + /**
  36 + * 全量同步检验项
  37 + */
  38 + public void fullUpdateAssay();
  39 +
  40 + /**
  41 + * 按医院同步检验项
  42 + */
  43 + public void updateAssayByHospital(String hospitalForeignId, Integer hospitalId, Date startTime);
  44 +
  45 + /**
  46 + * 增量同步检产妇
  47 + */
  48 + public void updatePatients();
  49 +
  50 + /**
  51 + * 全量同步产妇
  52 + */
  53 + public void fullUpdatePatients();
  54 +
  55 + /**
  56 + * 按医院同步产妇
  57 + */
  58 + public void updatePatientsByHospital(String hospitalForeignId, Integer hospitalId, Date startTime);
  59 +
  60 + /**
  61 + * 增量同步新生儿
  62 + */
  63 + public void updateNewBorns();
  64 +
  65 + /**
  66 + * 全量同步新生儿
  67 + */
  68 + public void fullUpdateNewBorns();
  69 +
  70 + /**
  71 + * 按医院同步新生儿
  72 + */
  73 + public void updateNewBornsByHospital(String hospitalForeignId, Integer hospitalId, Date startTime);
  74 +
  75 +}
platform-data-api/src/main/resources/spring/applicationContext.xml View file @ 338924d
... ... @@ -67,6 +67,53 @@
67 67 </bean>
68 68 <!-- 配置要扫描的包 -->
69 69 <context:component-scan base-package="com.lyms.platform.data" />
  70 +
  71 + <!-- DataSource configuration 妈咪baby主数据库 -->
  72 + <bean id="mmbbDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
  73 + <property name="driverClass" value="${earlydata.driver}" />
  74 + <property name="jdbcUrl" value="${earlydata.jdbcurl}" />
  75 + <property name="user" value="${earlydata.username}" />
  76 + <property name="password" value="${earlydata.password}" />
  77 + <property name="maxPoolSize" value="${earlydata.maxpoolsize}" />
  78 + <property name="initialPoolSize" value="${earlydata.initialpoolsize}" />
  79 + <property name="maxIdleTime" value="7200"></property>
  80 + <property name="acquireRetryDelay" value="1000"></property>
  81 + <property name="breakAfterAcquireFailure" value="false"></property>
  82 + <property name="acquireRetryAttempts" value="3" />
  83 + <property name="minPoolSize" value="${earlydata.minpoolsize}" />
  84 + </bean>
  85 +
  86 + <bean id="mmbbJdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"
  87 + p:dataSource-ref="mmbbDataSource" />
  88 +
  89 + <bean id="mmbbSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
  90 + <property name="dataSource" ref="mmbbDataSource" />
  91 + <property name="mapperLocations">
  92 + <list>
  93 + <value>classpath*:earlyOrm/*.xml</value>
  94 + </list>
  95 + </property>
  96 + </bean>
  97 +
  98 + <!-- manage transaction -->
  99 + <bean id="mmbbTransactionManager"
  100 + class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
  101 + <property name="dataSource" ref="mmbbDataSource" />
  102 + </bean>
  103 +
  104 + <tx:annotation-driven transaction-manager="mmbbTransactionManager"/>
  105 +
  106 + <!-- Mabatis Data Layer -->
  107 + <bean id="mmbbSqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate">
  108 + <constructor-arg index="0" ref="mmbbSqlSessionFactory" />
  109 + </bean>
  110 +
  111 + <!-- all class in the back-package are auto loaded as a mapper -->
  112 + <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
  113 + <property name="sqlSessionFactoryBeanName" value="mmbbSqlSessionFactory"></property>
  114 + <property name="basePackage" value="com.lymsh.mommybaby.earlydata.dao" />
  115 + </bean>
  116 +
70 117 <import resource="applicationContext-cxf.xml" />
71 118 </beans>
platform-mommyData/pom.xml View file @ 338924d
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4 + <parent>
  5 + <groupId>com.lyms.core</groupId>
  6 + <artifactId>regional-platform</artifactId>
  7 + <version>1.0.1</version>
  8 + </parent>
  9 + <modelVersion>4.0.0</modelVersion>
  10 + <packaging>jar</packaging>
  11 + <artifactId>platform-mommyData</artifactId>
  12 +
  13 + <dependencies>
  14 + <dependency>
  15 + <groupId>com.lyms.core</groupId>
  16 + <artifactId>platform-common</artifactId>
  17 + <version>1.0.1</version>
  18 + </dependency>
  19 + <dependency>
  20 + <groupId>com.oracle</groupId>
  21 + <artifactId>ojdbc14</artifactId>
  22 + <version>11.2.0.1.0</version>
  23 + </dependency>
  24 + </dependencies>
  25 + <build>
  26 + <plugins>
  27 + <plugin>
  28 + <groupId>org.apache.maven.plugins</groupId>
  29 + <artifactId>maven-compiler-plugin</artifactId>
  30 + <configuration>
  31 + <source>1.7</source>
  32 + <target>1.7</target>
  33 + </configuration>
  34 + </plugin>
  35 + </plugins>
  36 + <finalName>platform-mommyData</finalName>
  37 + </build>
  38 +</project>
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/dao/MommyMapper.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.dao;
  2 +
  3 +import com.lymsh.mommybaby.earlydata.model.*;
  4 +import org.apache.ibatis.annotations.Param;
  5 +
  6 +import java.util.List;
  7 +
  8 +/**
  9 + * Created by riecard on 15/10/26.
  10 + */
  11 +public interface MommyMapper {
  12 +
  13 + public List<MommyExamineInfo> selectMommyExamineInfo(OracleCommonQuery query);
  14 +
  15 + public List<MommyEmployee> selectMommyEmployee(OracleCommonQuery query);
  16 +
  17 + public List<MommyPatient> selectMommyPatient(OracleCommonQuery query);
  18 +
  19 + public List<MommyPatientinfo> selectMommyPatientinfo(OracleCommonQuery query);
  20 +
  21 + public List<MommyChildexaminerecord> selectMommyChildexaminerecord(OracleCommonQuery query);
  22 +
  23 + public List<MommyExamine> selectMommyExamine(OracleCommonQuery query);
  24 +
  25 + public List<String> selectExamineDiagnosis(String triageOrderNo);
  26 +
  27 + public List<PlatDataContent> selectGuideTheWomen(@Param("week") Integer week);
  28 +
  29 + public List<PlatDataContent> selectDcIdName(OracleCommonQuery query);
  30 +
  31 + public List<DiagnosisView> selectDiagnosisView(String triageOrderNo);
  32 +
  33 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/dao/PlatMapper.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.dao;
  2 +
  3 +import com.lymsh.mommybaby.earlydata.model.*;
  4 +import org.apache.ibatis.annotations.Param;
  5 +
  6 +import java.util.Date;
  7 +import java.util.List;
  8 +import java.util.Map;
  9 +
  10 +/**
  11 + * Created by riecard on 15/10/26.
  12 + */
  13 +public interface PlatMapper {
  14 +
  15 + public List<PlatDataType> selectPlatDataType(OracleCommonQuery query);
  16 +
  17 + public List<PlatDataContent> selectPlatDataContent(OracleCommonQuery query);
  18 +
  19 + public List<PlatHospital> selectPlatHospital(OracleCommonQuery query);
  20 +
  21 + public List<PlatUsers> selectPlatUsers(OracleCommonQuery query);
  22 +
  23 + public List<PlatPatient> selectPlatPatient(OracleCommonQuery query);
  24 +
  25 + public List<Map> selectTable(OracleCommonQuery query);
  26 +
  27 + public List<Map> selectAllByHospitalId(@Param("hospitalId") String hospitalId, @Param("startTime") Date startTime);
  28 +
  29 + public List<ViewPatient> selectViewPatient(String patientId);
  30 +
  31 + public List<ViewPatient> selectOtherRiskDetails(String examineId);
  32 +
  33 + public List<ViewPatient> selectRiskDetails(String examineId);
  34 +
  35 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/DiagnosisView.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +/**
  4 + * Created by Administrator on 2015/12/22 0022.
  5 + */
  6 +public class DiagnosisView {
  7 +
  8 + private String storyId;
  9 + private String dhName;
  10 + private String historyInfo;
  11 + private String historyTypeId;
  12 +
  13 + public String getStoryId() {
  14 + return storyId;
  15 + }
  16 +
  17 + public void setStoryId(String storyId) {
  18 + this.storyId = storyId;
  19 + }
  20 +
  21 + public String getDhName() {
  22 + return dhName;
  23 + }
  24 +
  25 + public void setDhName(String dhName) {
  26 + this.dhName = dhName;
  27 + }
  28 +
  29 + public String getHistoryInfo() {
  30 + return historyInfo;
  31 + }
  32 +
  33 + public void setHistoryInfo(String historyInfo) {
  34 + this.historyInfo = historyInfo;
  35 + }
  36 +
  37 + public String getHistoryTypeId() {
  38 + return historyTypeId;
  39 + }
  40 +
  41 + public void setHistoryTypeId(String historyTypeId) {
  42 + this.historyTypeId = historyTypeId;
  43 + }
  44 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/MommyChildexaminerecord.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * Created by riecard on 15/10/29.
  7 + */
  8 +public class MommyChildexaminerecord {
  9 +
  10 + private String cerId;
  11 + private String cerPatientid;
  12 + private Date cerExaminedate;
  13 + private String cerExaminehospital;
  14 + private String cerOperator;
  15 + private String cerRemarks;
  16 +
  17 + public String getCerRemarks() {
  18 + return cerRemarks;
  19 + }
  20 +
  21 + public void setCerRemarks(String cerRemarks) {
  22 + this.cerRemarks = cerRemarks;
  23 + }
  24 +
  25 + public String getCerOperator() {
  26 + return cerOperator;
  27 + }
  28 +
  29 + public void setCerOperator(String cerOperator) {
  30 + this.cerOperator = cerOperator;
  31 + }
  32 +
  33 + public String getCerId() {
  34 + return cerId;
  35 + }
  36 +
  37 + public void setCerId(String cerId) {
  38 + this.cerId = cerId;
  39 + }
  40 +
  41 + public String getCerPatientid() {
  42 + return cerPatientid;
  43 + }
  44 +
  45 + public void setCerPatientid(String cerPatientid) {
  46 + this.cerPatientid = cerPatientid;
  47 + }
  48 +
  49 + public Date getCerExaminedate() {
  50 + return cerExaminedate;
  51 + }
  52 +
  53 + public void setCerExaminedate(Date cerExaminedate) {
  54 + this.cerExaminedate = cerExaminedate;
  55 + }
  56 +
  57 + public String getCerExaminehospital() {
  58 + return cerExaminehospital;
  59 + }
  60 +
  61 + public void setCerExaminehospital(String cerExaminehospital) {
  62 + this.cerExaminehospital = cerExaminehospital;
  63 + }
  64 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/MommyEmployee.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +/**
  4 + * Created by riecard on 15/10/27.
  5 + */
  6 +public class MommyEmployee {
  7 +
  8 + private String eId;
  9 + private String eName;
  10 + private Integer eSex;
  11 + private String eHospitalid;
  12 + private String eJobtitleid;
  13 + private String eDeptid;
  14 +
  15 + public String geteId() {
  16 + return eId;
  17 + }
  18 +
  19 + public void seteId(String eId) {
  20 + this.eId = eId;
  21 + }
  22 +
  23 + public String geteName() {
  24 + return eName;
  25 + }
  26 +
  27 + public void seteName(String eName) {
  28 + this.eName = eName;
  29 + }
  30 +
  31 + public Integer geteSex() {
  32 + return eSex;
  33 + }
  34 +
  35 + public void seteSex(Integer eSex) {
  36 + this.eSex = eSex;
  37 + }
  38 +
  39 + public String geteHospitalid() {
  40 + return eHospitalid;
  41 + }
  42 +
  43 + public void seteHospitalid(String eHospitalid) {
  44 + this.eHospitalid = eHospitalid;
  45 + }
  46 +
  47 + public String geteJobtitleid() {
  48 + return eJobtitleid;
  49 + }
  50 +
  51 + public void seteJobtitleid(String eJobtitleid) {
  52 + this.eJobtitleid = eJobtitleid;
  53 + }
  54 +
  55 + public String geteDeptid() {
  56 + return eDeptid;
  57 + }
  58 +
  59 + public void seteDeptid(String eDeptid) {
  60 + this.eDeptid = eDeptid;
  61 + }
  62 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/MommyExamine.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +/**
  4 + * Created by riecard on 15/10/29.
  5 + */
  6 +public class MommyExamine {
  7 +
  8 + private String eId;
  9 + private String eChildexamineid;
  10 + private String eExamineid;
  11 + private String eResult;
  12 + private String eUnit;
  13 + private String eEvaluation;
  14 + private String itemName;
  15 +
  16 + public String getItemName() {
  17 + return itemName;
  18 + }
  19 +
  20 + public void setItemName(String itemName) {
  21 + this.itemName = itemName;
  22 + }
  23 +
  24 + public String geteId() {
  25 + return eId;
  26 + }
  27 +
  28 + public void seteId(String eId) {
  29 + this.eId = eId;
  30 + }
  31 +
  32 + public String geteChildexamineid() {
  33 + return eChildexamineid;
  34 + }
  35 +
  36 + public void seteChildexamineid(String eChildexamineid) {
  37 + this.eChildexamineid = eChildexamineid;
  38 + }
  39 +
  40 + public String geteExamineid() {
  41 + return eExamineid;
  42 + }
  43 +
  44 + public void seteExamineid(String eExamineid) {
  45 + this.eExamineid = eExamineid;
  46 + }
  47 +
  48 + public String geteResult() {
  49 + return eResult;
  50 + }
  51 +
  52 + public void seteResult(String eResult) {
  53 + this.eResult = eResult;
  54 + }
  55 +
  56 + public String geteUnit() {
  57 + return eUnit;
  58 + }
  59 +
  60 + public void seteUnit(String eUnit) {
  61 + this.eUnit = eUnit;
  62 + }
  63 +
  64 + public String geteEvaluation() {
  65 + return eEvaluation;
  66 + }
  67 +
  68 + public void seteEvaluation(String eEvaluation) {
  69 + this.eEvaluation = eEvaluation;
  70 + }
  71 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/MommyExamineInfo.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +/**
  4 + * Created by riecard on 15/10/26.
  5 + */
  6 +public class MommyExamineInfo {
  7 +
  8 + private String eiId;
  9 + private String eiName;
  10 + private String eiValuemodeid;
  11 + private String eiValueunitid;
  12 + private String eiDatatypeid;
  13 +
  14 + public String getEiId() {
  15 + return eiId;
  16 + }
  17 +
  18 + public void setEiId(String eiId) {
  19 + this.eiId = eiId;
  20 + }
  21 +
  22 + public String getEiName() {
  23 + return eiName;
  24 + }
  25 +
  26 + public void setEiName(String eiName) {
  27 + this.eiName = eiName;
  28 + }
  29 +
  30 + public String getEiValuemodeid() {
  31 + return eiValuemodeid;
  32 + }
  33 +
  34 + public void setEiValuemodeid(String eiValuemodeid) {
  35 + this.eiValuemodeid = eiValuemodeid;
  36 + }
  37 +
  38 + public String getEiValueunitid() {
  39 + return eiValueunitid;
  40 + }
  41 +
  42 + public void setEiValueunitid(String eiValueunitid) {
  43 + this.eiValueunitid = eiValueunitid;
  44 + }
  45 +
  46 + public String getEiDatatypeid() {
  47 + return eiDatatypeid;
  48 + }
  49 +
  50 + public void setEiDatatypeid(String eiDatatypeid) {
  51 + this.eiDatatypeid = eiDatatypeid;
  52 + }
  53 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/MommyMultiMap.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +import java.util.Map;
  4 +
  5 +/**
  6 + * Created by riecard on 15/11/10.
  7 + */
  8 +public class MommyMultiMap {
  9 +
  10 + private Map realMap;
  11 + private Map<String, String> fullMap;
  12 + private Map<String, String> filterMap;
  13 +
  14 + public Map getRealMap() {
  15 + return realMap;
  16 + }
  17 +
  18 + public void setRealMap(Map realMap) {
  19 + this.realMap = realMap;
  20 + }
  21 +
  22 + public Map<String, String> getFullMap() {
  23 + return fullMap;
  24 + }
  25 +
  26 + public void setFullMap(Map<String, String> fullMap) {
  27 + this.fullMap = fullMap;
  28 + }
  29 +
  30 + public Map<String, String> getFilterMap() {
  31 + return filterMap;
  32 + }
  33 +
  34 + public void setFilterMap(Map<String, String> filterMap) {
  35 + this.filterMap = filterMap;
  36 + }
  37 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/MommyPatient.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * Created by riecard on 15/10/28.
  7 + */
  8 +public class MommyPatient {
  9 +
  10 + private String pNo;
  11 + private String pOperuser;
  12 + private String pPatientid;
  13 + private Integer pType; // 0:正常;1:高危
  14 + private Date pLastmenstrualperiod;
  15 + private Integer serviceType;
  16 + private Integer vip;
  17 +
  18 + public Integer getServiceType() {
  19 + return serviceType;
  20 + }
  21 +
  22 + public void setServiceType(Integer serviceType) {
  23 + this.serviceType = serviceType;
  24 + }
  25 +
  26 + public Integer getVip() {
  27 + return vip;
  28 + }
  29 +
  30 + public void setVip(Integer vip) {
  31 + this.vip = vip;
  32 + }
  33 +
  34 + public Integer getIsValid() {
  35 + return isValid;
  36 + }
  37 +
  38 + public void setIsValid(Integer isValid) {
  39 + this.isValid = isValid;
  40 + }
  41 +
  42 + private Integer isValid;
  43 +
  44 +
  45 + public Date getpLastmenstrualperiod() {
  46 + return pLastmenstrualperiod;
  47 + }
  48 +
  49 + public void setpLastmenstrualperiod(Date pLastmenstrualperiod) {
  50 + this.pLastmenstrualperiod = pLastmenstrualperiod;
  51 + }
  52 +
  53 + public String getpNo() {
  54 + return pNo;
  55 + }
  56 +
  57 + public void setpNo(String pNo) {
  58 + this.pNo = pNo;
  59 + }
  60 +
  61 + public String getpOperuser() {
  62 + return pOperuser;
  63 + }
  64 +
  65 + public void setpOperuser(String pOperuser) {
  66 + this.pOperuser = pOperuser;
  67 + }
  68 +
  69 + public String getpPatientid() {
  70 + return pPatientid;
  71 + }
  72 +
  73 + public void setpPatientid(String pPatientid) {
  74 + this.pPatientid = pPatientid;
  75 + }
  76 +
  77 + public Integer getpType() {
  78 + return pType;
  79 + }
  80 +
  81 + public void setpType(Integer pType) {
  82 + this.pType = pType;
  83 + }
  84 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/MommyPatientinfo.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * Created by riecard on 15/10/28.
  7 + */
  8 +public class MommyPatientinfo {
  9 +
  10 + private String piId;
  11 + private String piName;
  12 + private Integer piSex;
  13 + private Date piBirthday;
  14 + private String piMotherphone;
  15 + private String piOperuser;
  16 + private String piPatientid;
  17 + private Integer piKidstype;
  18 + private Integer isDeleted;
  19 +
  20 + private Integer serviceType;
  21 + private Integer vip;
  22 +
  23 + public Integer getServiceType() {
  24 + return serviceType;
  25 + }
  26 +
  27 + public void setServiceType(Integer serviceType) {
  28 + this.serviceType = serviceType;
  29 + }
  30 +
  31 + public Integer getVip() {
  32 + return vip;
  33 + }
  34 +
  35 + public void setVip(Integer vip) {
  36 + this.vip = vip;
  37 + }
  38 +
  39 + public Integer getIsDeleted() {
  40 + return isDeleted;
  41 + }
  42 +
  43 + public void setIsDeleted(Integer isDeleted) {
  44 + this.isDeleted = isDeleted;
  45 + }
  46 +
  47 + public Integer getPiKidstype() {
  48 + return piKidstype;
  49 + }
  50 +
  51 + public void setPiKidstype(Integer piKidstype) {
  52 + this.piKidstype = piKidstype;
  53 + }
  54 +
  55 + public String getPiId() {
  56 + return piId;
  57 + }
  58 +
  59 + public void setPiId(String piId) {
  60 + this.piId = piId;
  61 + }
  62 +
  63 + public String getPiName() {
  64 + return piName;
  65 + }
  66 +
  67 + public void setPiName(String piName) {
  68 + this.piName = piName;
  69 + }
  70 +
  71 + public Integer getPiSex() {
  72 + return piSex;
  73 + }
  74 +
  75 + public void setPiSex(Integer piSex) {
  76 + this.piSex = piSex;
  77 + }
  78 +
  79 + public Date getPiBirthday() {
  80 + return piBirthday;
  81 + }
  82 +
  83 + public void setPiBirthday(Date piBirthday) {
  84 + this.piBirthday = piBirthday;
  85 + }
  86 +
  87 + public String getPiMotherphone() {
  88 + return piMotherphone;
  89 + }
  90 +
  91 + public void setPiMotherphone(String piMotherphone) {
  92 + this.piMotherphone = piMotherphone;
  93 + }
  94 +
  95 + public String getPiOperuser() {
  96 + return piOperuser;
  97 + }
  98 +
  99 + public void setPiOperuser(String piOperuser) {
  100 + this.piOperuser = piOperuser;
  101 + }
  102 +
  103 + public String getPiPatientid() {
  104 + return piPatientid;
  105 + }
  106 +
  107 + public void setPiPatientid(String piPatientid) {
  108 + this.piPatientid = piPatientid;
  109 + }
  110 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/OracleCommonQuery.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * Created by riecard on 15/10/26.
  7 + */
  8 +public class OracleCommonQuery {
  9 +
  10 + public OracleCommonQuery(Date startTime, Integer startRow, Integer endRow) {
  11 + this.startTime = startTime;
  12 + this.startRow = startRow;
  13 + this.endRow = endRow;
  14 + }
  15 +
  16 + private Date startTime;
  17 + private Integer startRow;
  18 + private Integer endRow;
  19 + private String ext1;
  20 + private String timeColumnName;
  21 + private String tableName;
  22 + private String hospitalForeignId;
  23 + private String condition;
  24 +
  25 + public String getCondition() {
  26 + return condition;
  27 + }
  28 +
  29 + public void setCondition(String condition) {
  30 + this.condition = condition;
  31 + }
  32 +
  33 + public String getHospitalForeignId() {
  34 + return hospitalForeignId;
  35 + }
  36 +
  37 + public void setHospitalForeignId(String hospitalForeignId) {
  38 + this.hospitalForeignId = hospitalForeignId;
  39 + }
  40 +
  41 + public String getTimeColumnName() {
  42 + return timeColumnName;
  43 + }
  44 +
  45 + public void setTimeColumnName(String timeColumnName) {
  46 + this.timeColumnName = timeColumnName;
  47 + }
  48 +
  49 + public String getTableName() {
  50 + return tableName;
  51 + }
  52 +
  53 + public void setTableName(String tableName) {
  54 + this.tableName = tableName;
  55 + }
  56 +
  57 + public String getExt1() {
  58 + return ext1;
  59 + }
  60 +
  61 + public void setExt1(String ext1) {
  62 + this.ext1 = ext1;
  63 + }
  64 +
  65 + public void nextPage(Integer pageSize) {
  66 + startRow += pageSize;
  67 + endRow += pageSize;
  68 + }
  69 +
  70 + public Date getStartTime() {
  71 + return startTime;
  72 + }
  73 +
  74 + public void setStartTime(Date startTime) {
  75 + this.startTime = startTime;
  76 + }
  77 +
  78 + public Integer getStartRow() {
  79 + return startRow;
  80 + }
  81 +
  82 + public void setStartRow(Integer startRow) {
  83 + this.startRow = startRow;
  84 + }
  85 +
  86 + public Integer getEndRow() {
  87 + return endRow;
  88 + }
  89 +
  90 + public void setEndRow(Integer endRow) {
  91 + this.endRow = endRow;
  92 + }
  93 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/PlatDataContent.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +/**
  4 + * Created by riecard on 15/10/26.
  5 + */
  6 +public class PlatDataContent {
  7 +
  8 + private String dcId;
  9 + private String dcName;
  10 + private String dcNo;
  11 + private String dcParentid;
  12 + private String dcDatatypeid;
  13 + private Integer week;
  14 +
  15 + public Integer getWeek() {
  16 + return week;
  17 + }
  18 +
  19 + public void setWeek(Integer week) {
  20 + this.week = week;
  21 + }
  22 +
  23 + public String getDcNo() {
  24 + return dcNo;
  25 + }
  26 +
  27 + public void setDcNo(String dcNo) {
  28 + this.dcNo = dcNo;
  29 + }
  30 +
  31 + public String getDcId() {
  32 + return dcId;
  33 + }
  34 +
  35 + public void setDcId(String dcId) {
  36 + this.dcId = dcId;
  37 + }
  38 +
  39 + public String getDcName() {
  40 + return dcName;
  41 + }
  42 +
  43 + public void setDcName(String dcName) {
  44 + this.dcName = dcName;
  45 + }
  46 +
  47 + public String getDcParentid() {
  48 + return dcParentid;
  49 + }
  50 +
  51 + public void setDcParentid(String dcParentid) {
  52 + this.dcParentid = dcParentid;
  53 + }
  54 +
  55 + public String getDcDatatypeid() {
  56 + return dcDatatypeid;
  57 + }
  58 +
  59 + public void setDcDatatypeid(String dcDatatypeid) {
  60 + this.dcDatatypeid = dcDatatypeid;
  61 + }
  62 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/PlatDataType.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +/**
  4 + * Created by riecard on 15/10/26.
  5 + */
  6 +public class PlatDataType {
  7 +
  8 + private String dtId;
  9 + private String dtName;
  10 +
  11 + public String getDtId() {
  12 + return dtId;
  13 + }
  14 +
  15 + public void setDtId(String dtId) {
  16 + this.dtId = dtId;
  17 + }
  18 +
  19 + public String getDtName() {
  20 + return dtName;
  21 + }
  22 +
  23 + public void setDtName(String dtName) {
  24 + this.dtName = dtName;
  25 + }
  26 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/PlatHospital.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +/**
  4 + * Created by riecard on 15/10/27.
  5 + */
  6 +public class PlatHospital {
  7 +
  8 + private String hId;
  9 + private String hName;
  10 +
  11 + public String gethId() {
  12 + return hId;
  13 + }
  14 +
  15 + public void sethId(String hId) {
  16 + this.hId = hId;
  17 + }
  18 +
  19 + public String gethName() {
  20 + return hName;
  21 + }
  22 +
  23 + public void sethName(String hName) {
  24 + this.hName = hName;
  25 + }
  26 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/PlatPatient.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * Created by riecard on 15/10/28.
  7 + */
  8 +public class PlatPatient {
  9 +
  10 + private String pId;
  11 + private String pName;
  12 + private Integer pSex;
  13 + private Date pBirthday;
  14 + private String pMobilephone;
  15 + private Integer pIsvalid;
  16 +
  17 + public Integer getpIsvalid() {
  18 + return pIsvalid;
  19 + }
  20 +
  21 + public void setpIsvalid(Integer pIsvalid) {
  22 + this.pIsvalid = pIsvalid;
  23 + }
  24 +
  25 + public String getpId() {
  26 + return pId;
  27 + }
  28 +
  29 + public void setpId(String pId) {
  30 + this.pId = pId;
  31 + }
  32 +
  33 + public String getpName() {
  34 + return pName;
  35 + }
  36 +
  37 + public void setpName(String pName) {
  38 + this.pName = pName;
  39 + }
  40 +
  41 + public Integer getpSex() {
  42 + return pSex;
  43 + }
  44 +
  45 + public void setpSex(Integer pSex) {
  46 + this.pSex = pSex;
  47 + }
  48 +
  49 + public Date getpBirthday() {
  50 + return pBirthday;
  51 + }
  52 +
  53 + public void setpBirthday(Date pBirthday) {
  54 + this.pBirthday = pBirthday;
  55 + }
  56 +
  57 + public String getpMobilephone() {
  58 + return pMobilephone;
  59 + }
  60 +
  61 + public void setpMobilephone(String pMobilephone) {
  62 + this.pMobilephone = pMobilephone;
  63 + }
  64 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/PlatUsers.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +/**
  4 + * Created by riecard on 15/10/27.
  5 + */
  6 +public class PlatUsers {
  7 +
  8 + private String uId;
  9 + private String uUsername;
  10 + private String uUserpwd;
  11 + private String uEmployeeid;
  12 + private String uLoginnum;
  13 + private Integer uIsvalid;
  14 +
  15 + public Integer getuIsvalid() {
  16 + return uIsvalid;
  17 + }
  18 +
  19 + public void setuIsvalid(Integer uIsvalid) {
  20 + this.uIsvalid = uIsvalid;
  21 + }
  22 +
  23 + public String getuId() {
  24 + return uId;
  25 + }
  26 +
  27 + public void setuId(String uId) {
  28 + this.uId = uId;
  29 + }
  30 +
  31 + public String getuUsername() {
  32 + return uUsername;
  33 + }
  34 +
  35 + public void setuUsername(String uUsername) {
  36 + this.uUsername = uUsername;
  37 + }
  38 +
  39 + public String getuUserpwd() {
  40 + return uUserpwd;
  41 + }
  42 +
  43 + public void setuUserpwd(String uUserpwd) {
  44 + this.uUserpwd = uUserpwd;
  45 + }
  46 +
  47 + public String getuEmployeeid() {
  48 + return uEmployeeid;
  49 + }
  50 +
  51 + public void setuEmployeeid(String uEmployeeid) {
  52 + this.uEmployeeid = uEmployeeid;
  53 + }
  54 +
  55 + public String getuLoginnum() {
  56 + return uLoginnum;
  57 + }
  58 +
  59 + public void setuLoginnum(String uLoginnum) {
  60 + this.uLoginnum = uLoginnum;
  61 + }
  62 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/RiskColorEnum.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +/**
  4 + * Created by riecard on 15/11/13.
  5 + * 橙,黄,红,紫,绿
  6 + * Yellow,Orange,Red,Purple,Green
  7 + */
  8 +public enum RiskColorEnum {
  9 +
  10 + Orange(1,"Orange"),
  11 + Yellow(2,"Yellow"),
  12 + Red(4,"Red"),
  13 + Purple(8,"Purple"),
  14 + Green(16,"Green")
  15 + ;
  16 +
  17 + private RiskColorEnum(Integer id, String title) {
  18 + this.id = id;
  19 + this.title = title;
  20 + }
  21 +
  22 + public static String getTitle(Integer id) {
  23 + for (RiskColorEnum e: RiskColorEnum.values()) {
  24 + if (e.getId() == id) {
  25 + return e.getTitle();
  26 + }
  27 + }
  28 + return "";
  29 + }
  30 +
  31 + public static Integer getLevel(Integer total) {
  32 + if (total == null) {
  33 + return 0;
  34 + } else if (total == 0) {
  35 + return 0;
  36 + } else if ((total&8)==8) {
  37 + return 8;
  38 + } else if ((total&4)==4) {
  39 + return 4;
  40 + } else if ((total&1)==1) {
  41 + return 1;
  42 + } else if ((total&2)==2) {
  43 + return 2;
  44 + } else {
  45 + return 0;
  46 + }
  47 + }
  48 +
  49 + public static Integer getId(String title) {
  50 + for (RiskColorEnum e: RiskColorEnum.values()) {
  51 + if (e.getTitle().equals(title)) {
  52 + return e.getId();
  53 + }
  54 + }
  55 + return 0;
  56 + }
  57 +
  58 + public static RiskColorEnum getEnum(Integer id) {
  59 + for (RiskColorEnum e: RiskColorEnum.values()) {
  60 + if (e.getId() == id) {
  61 + return e;
  62 + }
  63 + }
  64 + return null;
  65 + }
  66 + private Integer id;
  67 + private String title;
  68 +
  69 + public Integer getId() {
  70 + return id;
  71 + }
  72 +
  73 + public void setId(Integer id) {
  74 + this.id = id;
  75 + }
  76 +
  77 + public String getTitle() {
  78 + return title;
  79 + }
  80 +
  81 + public void setTitle(String title) {
  82 + this.title = title;
  83 + }
  84 +
  85 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/model/ViewPatient.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.model;
  2 +
  3 +/**
  4 + * Created by riecard on 15/11/13.
  5 + */
  6 +public class ViewPatient {
  7 +
  8 + private String dcName;
  9 + private String meColorname;
  10 + private Integer crisis = 0;
  11 + private Integer fenshu;
  12 + private String ageMonth;
  13 +
  14 + public String getAgeMonth() {
  15 + return ageMonth;
  16 + }
  17 +
  18 + public void setAgeMonth(String ageMonth) {
  19 + this.ageMonth = ageMonth;
  20 + }
  21 +
  22 + public Integer getFenshu() {
  23 + return fenshu;
  24 + }
  25 +
  26 + public void setFenshu(Integer fenshu) {
  27 + this.fenshu = fenshu;
  28 + }
  29 +
  30 + public Integer getCrisis() {
  31 + return crisis;
  32 + }
  33 +
  34 + public void setCrisis(Integer crisis) {
  35 + this.crisis = crisis;
  36 + }
  37 +
  38 + public String getDcName() {
  39 + return dcName;
  40 + }
  41 +
  42 + public void setDcName(String dcName) {
  43 + this.dcName = dcName;
  44 + }
  45 +
  46 + public String getMeColorname() {
  47 + return meColorname;
  48 + }
  49 +
  50 + public void setMeColorname(String meColorname) {
  51 + this.meColorname = meColorname;
  52 + }
  53 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/service/MommyService.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.service;
  2 +
  3 +import com.lymsh.mommybaby.earlydata.model.*;
  4 +
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
  8 +/**
  9 + * Created by riecard on 15/10/26.
  10 + */
  11 +public interface MommyService {
  12 +
  13 + public List<MommyExamineInfo> selectMommyExamineInfo(OracleCommonQuery query);
  14 +
  15 + public List<MommyEmployee> selectMommyEmployee(OracleCommonQuery query);
  16 +
  17 + public List<MommyPatient> selectMommyPatient(OracleCommonQuery query);
  18 +
  19 + public List<MommyPatientinfo> selectMommyPatientinfo(OracleCommonQuery query);
  20 +
  21 + public List<MommyChildexaminerecord> selectMommyChildexaminerecord(OracleCommonQuery query);
  22 +
  23 + public List<MommyExamine> selectMommyExamine(OracleCommonQuery query);
  24 +
  25 + public List<String> selectExamineDiagnosis(String triageOrderNo);
  26 +
  27 + public List<String> selectGuideTheWomen(Integer week);
  28 +
  29 + public List<PlatDataContent> selectGuideTheWomenData(Integer week);
  30 +
  31 + public List<PlatDataContent> selectDcIdName(String tableName);
  32 +
  33 + public Map<String, String> selectDcIdNameMap(String tableName);
  34 +
  35 + public List<DiagnosisView> selectDiagnosisView(String triageOrderNo);
  36 +
  37 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/service/PlatService.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.service;
  2 +
  3 +import com.lymsh.mommybaby.earlydata.model.*;
  4 +
  5 +import java.util.Date;
  6 +import java.util.List;
  7 +import java.util.Map;
  8 +
  9 +/**
  10 + * Created by riecard on 15/10/26.
  11 + */
  12 +public interface PlatService {
  13 +
  14 + public List<PlatDataType> selectPlatDataType(OracleCommonQuery query);
  15 +
  16 + public List<PlatDataContent> selectPlatDataContent(OracleCommonQuery query);
  17 +
  18 + public List<PlatHospital> selectPlatHospital(OracleCommonQuery query);
  19 +
  20 + public List<PlatUsers> selectPlatUsers(OracleCommonQuery query);
  21 +
  22 + public List<PlatPatient> selectPlatPatient(OracleCommonQuery query);
  23 +
  24 + public List<MommyMultiMap> selectTable(OracleCommonQuery query);
  25 +
  26 + public List<ViewPatient> selectViewPatient(String patientId);
  27 +
  28 + public List<ViewPatient> selectOtherRiskDetails(String examineId);
  29 +
  30 + public List<ViewPatient> selectRiskDetails(String examineId);
  31 +
  32 + public List<Map> selectAllByHospitalId(String hospitalId, Date startTime);
  33 +
  34 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/service/impl/MommyServiceImpl.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.service.impl;
  2 +
  3 +import com.lymsh.mommybaby.earlydata.dao.MommyMapper;
  4 +import com.lymsh.mommybaby.earlydata.model.*;
  5 +import com.lymsh.mommybaby.earlydata.service.MommyService;
  6 +import org.apache.commons.lang.StringUtils;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.stereotype.Service;
  9 +
  10 +import java.util.ArrayList;
  11 +import java.util.HashMap;
  12 +import java.util.List;
  13 +import java.util.Map;
  14 +
  15 +/**
  16 + * Created by riecard on 15/10/26.
  17 + */
  18 +@Service
  19 +public class MommyServiceImpl implements MommyService {
  20 +
  21 + @Autowired
  22 + private MommyMapper mommyMapper;
  23 +
  24 + @Override
  25 + public List<MommyExamineInfo> selectMommyExamineInfo(OracleCommonQuery query) {
  26 + return mommyMapper.selectMommyExamineInfo(query);
  27 + }
  28 +
  29 + @Override
  30 + public List<MommyEmployee> selectMommyEmployee(OracleCommonQuery query) {
  31 + return mommyMapper.selectMommyEmployee(query);
  32 + }
  33 +
  34 + @Override
  35 + public List<MommyPatient> selectMommyPatient(OracleCommonQuery query) {
  36 + return mommyMapper.selectMommyPatient(query);
  37 + }
  38 +
  39 + @Override
  40 + public List<MommyPatientinfo> selectMommyPatientinfo(OracleCommonQuery query) {
  41 + return mommyMapper.selectMommyPatientinfo(query);
  42 + }
  43 +
  44 + @Override
  45 + public List<MommyChildexaminerecord> selectMommyChildexaminerecord(OracleCommonQuery query) {
  46 + return mommyMapper.selectMommyChildexaminerecord(query);
  47 + }
  48 +
  49 + @Override
  50 + public List<MommyExamine> selectMommyExamine(OracleCommonQuery query) {
  51 + return mommyMapper.selectMommyExamine(query);
  52 + }
  53 +
  54 + @Override
  55 + public List<String> selectExamineDiagnosis(String triageOrderNo) {
  56 + return mommyMapper.selectExamineDiagnosis(triageOrderNo);
  57 + }
  58 +
  59 + @Override
  60 + public List<String> selectGuideTheWomen(Integer week) {
  61 + List<String> list = new ArrayList<>();
  62 + List<PlatDataContent> clist = mommyMapper.selectGuideTheWomen(week);
  63 + for (PlatDataContent c:clist) {
  64 + if (StringUtils.isNotBlank(c.getDcId()) && StringUtils.isNotBlank(c.getDcName())) {
  65 + list.add(c.getDcId()+":"+c.getDcName());
  66 + }
  67 + }
  68 + return list;
  69 + }
  70 +
  71 + @Override
  72 + public List<PlatDataContent> selectGuideTheWomenData(Integer week) {
  73 + return mommyMapper.selectGuideTheWomen(week);
  74 + }
  75 +
  76 + @Override
  77 + public List<PlatDataContent> selectDcIdName(String tableName) {
  78 + OracleCommonQuery query = new OracleCommonQuery(null, null, null);
  79 + query.setTableName(tableName);
  80 + return mommyMapper.selectDcIdName(query);
  81 + }
  82 +
  83 + @Override
  84 + public Map<String, String> selectDcIdNameMap(String tableName) {
  85 + List<PlatDataContent> list = selectDcIdName(tableName);
  86 + Map<String, String> map = new HashMap<>();
  87 + for (PlatDataContent dc:list) {
  88 + if (StringUtils.isNotBlank(dc.getDcId()) && StringUtils.isNotBlank(dc.getDcName())) {
  89 + map.put(dc.getDcId(), dc.getDcName());
  90 + }
  91 + }
  92 + return map;
  93 + }
  94 +
  95 + @Override
  96 + public List<DiagnosisView> selectDiagnosisView(String triageOrderNo) {
  97 + return mommyMapper.selectDiagnosisView(triageOrderNo);
  98 + }
  99 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/service/impl/PlatServiceImpl.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.service.impl;
  2 +
  3 +import com.lymsh.mommybaby.earlydata.dao.PlatMapper;
  4 +import com.lymsh.mommybaby.earlydata.model.*;
  5 +import com.lymsh.mommybaby.earlydata.service.PlatService;
  6 +import com.lymsh.mommybaby.earlydata.util.PropertiesUtil;
  7 +import org.apache.commons.lang.StringUtils;
  8 +import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.stereotype.Service;
  10 +
  11 +import java.util.*;
  12 +
  13 +/**
  14 + * Created by riecard on 15/10/26.
  15 + */
  16 +@Service
  17 +public class PlatServiceImpl implements PlatService {
  18 +
  19 + @Autowired
  20 + private PlatMapper platMapper;
  21 +
  22 + @Override
  23 + public List<PlatHospital> selectPlatHospital(OracleCommonQuery query) {
  24 + return platMapper.selectPlatHospital(query);
  25 + }
  26 +
  27 + @Override
  28 + public List<PlatUsers> selectPlatUsers(OracleCommonQuery query) {
  29 + return platMapper.selectPlatUsers(query);
  30 + }
  31 +
  32 + @Override
  33 + public List<PlatDataType> selectPlatDataType(OracleCommonQuery query) {
  34 + return platMapper.selectPlatDataType(query);
  35 + }
  36 +
  37 + @Override
  38 + public List<PlatDataContent> selectPlatDataContent(OracleCommonQuery query) {
  39 + return platMapper.selectPlatDataContent(query);
  40 + }
  41 +
  42 + @Override
  43 + public List<PlatPatient> selectPlatPatient(OracleCommonQuery query) {
  44 + return platMapper.selectPlatPatient(query);
  45 + }
  46 +
  47 + @Override
  48 + public List<MommyMultiMap> selectTable(OracleCommonQuery query) {
  49 + Map<String, String> properties = PropertiesUtil.init().get(query.getTableName());
  50 + List<Map> list = platMapper.selectTable(query);
  51 + List<MommyMultiMap> result = new ArrayList<MommyMultiMap>();
  52 + for (Map m:list) {
  53 + MommyMultiMap mmm = new MommyMultiMap();
  54 + mmm.setRealMap(m);
  55 + Map<String, String> fullMap = new HashMap<String, String>();
  56 + Map<String, String> filterMap = new HashMap<String, String>();
  57 + for (Object key:m.keySet()) {
  58 + String value = m.get(key).toString();
  59 + fullMap.put(key.toString().toLowerCase(), value);
  60 + String newKey = properties.get(key.toString().toLowerCase());
  61 + if (StringUtils.isNotBlank(newKey)) {
  62 + if (newKey.indexOf(":") > 0) {
  63 + String[] aa = newKey.split(":");
  64 + newKey = aa[0];
  65 + value = value + " " + aa[1];
  66 + }
  67 + filterMap.put(newKey,value);
  68 + }
  69 + }
  70 + mmm.setFullMap(fullMap);
  71 + mmm.setFilterMap(filterMap);
  72 + result.add(mmm);
  73 + }
  74 + return result;
  75 + }
  76 +
  77 + @Override
  78 + public List<ViewPatient> selectViewPatient(String patientId) {
  79 + return platMapper.selectViewPatient(patientId);
  80 + }
  81 +
  82 + @Override
  83 + public List<ViewPatient> selectOtherRiskDetails(String examineId) {
  84 + if (StringUtils.isBlank(examineId)) {
  85 + return new ArrayList<>();
  86 + } else {
  87 + return platMapper.selectOtherRiskDetails(examineId);
  88 + }
  89 + }
  90 +
  91 + @Override
  92 + public List<ViewPatient> selectRiskDetails(String examineId) {
  93 + if (StringUtils.isBlank(examineId)) {
  94 + return new ArrayList<>();
  95 + } else {
  96 + return platMapper.selectRiskDetails(examineId);
  97 + }
  98 + }
  99 +
  100 + @Override
  101 + public List<Map> selectAllByHospitalId(String hospitalId, Date startTime) {
  102 + return platMapper.selectAllByHospitalId(hospitalId, startTime);
  103 + }
  104 +}
platform-mommyData/src/main/java/com/lymsh/mommybaby/earlydata/util/PropertiesUtil.java View file @ 338924d
  1 +package com.lymsh.mommybaby.earlydata.util;
  2 +
  3 +import java.util.HashMap;
  4 +import java.util.Map;
  5 +import java.util.ResourceBundle;
  6 +
  7 +/**
  8 + * Created by riecard on 15/11/10.
  9 + */
  10 +public class PropertiesUtil {
  11 +
  12 + private static PropertiesUtil util;
  13 +
  14 + private PropertiesUtil() {
  15 +
  16 + }
  17 +
  18 + private Map<String, Map<String,String>> total = new HashMap<String, Map<String,String>>();
  19 +
  20 + public static PropertiesUtil init() {
  21 + if (util == null) {
  22 + util = new PropertiesUtil();
  23 + }
  24 + return util;
  25 + }
  26 +
  27 + public Map<String,String> get(String fileName) {
  28 + Map<String,String> map = total.get(fileName);
  29 + if (map == null) {
  30 + map = new HashMap<String,String>();
  31 + try {
  32 + ResourceBundle rb = ResourceBundle.getBundle(fileName);
  33 + for (String key:rb.keySet()) {
  34 + map.put(key.toLowerCase(),new String(rb.getString(key).getBytes("iso8859-1"),"utf-8"));
  35 + }
  36 + total.put(fileName, map);
  37 + } catch (Exception e) {
  38 + e.printStackTrace();
  39 + }
  40 + }
  41 + return map;
  42 + }
  43 +
  44 +}
platform-mommyData/src/main/resources/earlyOrm/Mommy.xml View file @ 338924d
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3 +<mapper namespace="com.lymsh.mommybaby.earlydata.dao.MommyMapper">
  4 +
  5 + <resultMap id="MommyExamineInfoResultMap" type="com.lymsh.mommybaby.earlydata.model.MommyExamineInfo">
  6 + <result column="EI_ID" property="eiId" jdbcType="VARCHAR"/>
  7 + <result column="EI_NAME" property="eiName" jdbcType="VARCHAR"/>
  8 + <result column="EI_VALUEMODEID" property="eiValuemodeid" jdbcType="VARCHAR"/>
  9 + <result column="EI_VALUEUNITID" property="eiValueunitid" jdbcType="VARCHAR"/>
  10 + <result column="EI_DATATYPEID" property="eiDatatypeid" jdbcType="VARCHAR"/>
  11 + </resultMap>
  12 +
  13 + <sql id="MommyExamineInfoColumns">
  14 + EI_ID,EI_NAME,EI_VALUEMODEID,EI_VALUEUNITID,EI_DATATYPEID
  15 + </sql>
  16 +
  17 + <select id="selectMommyExamineInfo" resultMap="MommyExamineInfoResultMap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  18 + select
  19 + <include refid="MommyExamineInfoColumns"/>
  20 + from (select<include refid="MommyExamineInfoColumns"/>,rownum r
  21 + from (
  22 + select
  23 + <include refid="MommyExamineInfoColumns"/>
  24 + from MOMMY_EXAMINEINFO t
  25 + where EI_OPERTIME >= #{startTime}
  26 + ) h where
  27 + <![CDATA[ rownum <= #{endRow} ]]>
  28 + )
  29 + where
  30 + <![CDATA[ r >= #{startRow} ]]>
  31 + </select>
  32 +
  33 +
  34 +
  35 +
  36 + <resultMap id="MommyEmployeeResultMap" type="com.lymsh.mommybaby.earlydata.model.MommyEmployee">
  37 + <result column="E_ID" property="eId" jdbcType="VARCHAR"/>
  38 + <result column="E_NAME" property="eName" jdbcType="VARCHAR"/>
  39 + <result column="E_SEX" property="eSex" jdbcType="INTEGER"/>
  40 + <result column="E_HOSPITALID" property="eHospitalid" jdbcType="VARCHAR"/>
  41 + <result column="E_JOBTITLEID" property="eJobtitleid" jdbcType="VARCHAR"/>
  42 + <result column="E_DEPTID" property="eDeptid" jdbcType="VARCHAR"/>
  43 + </resultMap>
  44 +
  45 + <sql id="MommyEmployeeColumns">
  46 + E_ID,E_NAME,E_SEX,E_HOSPITALID,E_JOBTITLEID,E_DEPTID
  47 + </sql>
  48 +
  49 + <select id="selectMommyEmployee" resultMap="MommyEmployeeResultMap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  50 + select
  51 + <include refid="MommyEmployeeColumns"/>
  52 + from (select<include refid="MommyEmployeeColumns"/>,rownum r
  53 + from (
  54 + select
  55 + <include refid="MommyEmployeeColumns"/>
  56 + from MOMMY_EMPLOYEE t
  57 + where E_OPERTIME >= #{startTime}
  58 + ) h where
  59 + <![CDATA[ rownum <= #{endRow} ]]>
  60 + )
  61 + where
  62 + <![CDATA[ r >= #{startRow} ]]>
  63 + </select>
  64 +
  65 +
  66 +
  67 +
  68 + <resultMap id="MommyPatientResultMap" type="com.lymsh.mommybaby.earlydata.model.MommyPatient">
  69 + <result column="P_NO" property="pNo" jdbcType="VARCHAR"/>
  70 + <result column="P_OPERUSER" property="pOperuser" jdbcType="VARCHAR"/>
  71 + <result column="P_TYPE" property="pType" jdbcType="INTEGER"/>
  72 + <result column="P_ISVALID" property="isValid" jdbcType="INTEGER"/>
  73 + <result column="P_PLATPATIENTID" property="pPatientid" jdbcType="VARCHAR"/>
  74 + <result column="P_LASTMENSTRUALPERIOD" property="pLastmenstrualperiod" jdbcType="TIMESTAMP"/>
  75 + <result column="P_SERVICETYPE" property="serviceType" jdbcType="INTEGER"/>
  76 + <result column="P_ISVIP" property="vip" jdbcType="INTEGER"/>
  77 + </resultMap>
  78 +
  79 + <sql id="MommyPatientColumns">
  80 + P_NO,P_OPERUSER,P_TYPE,P_PLATPATIENTID,P_LASTMENSTRUALPERIOD,P_ISVALID,P_SERVICETYPE,P_ISVIP
  81 + </sql>
  82 +
  83 + <select id="selectMommyPatient" resultMap="MommyPatientResultMap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  84 + select
  85 + <include refid="MommyPatientColumns"/>
  86 + from (select<include refid="MommyPatientColumns"/>,rownum r
  87 + from (
  88 + select
  89 + <include refid="MommyPatientColumns"/>
  90 + from MOMMY_PATIENT t
  91 + where P_OPERTIME >= #{startTime} <if test="hospitalForeignId != null and hospitalForeignId != ''"> and p_hospitalid = #{hospitalForeignId} </if>
  92 + ) h where
  93 + <![CDATA[ rownum <= #{endRow} ]]>
  94 + )
  95 + where
  96 + <![CDATA[ r >= #{startRow} ]]>
  97 + </select>
  98 +
  99 +
  100 +
  101 +
  102 + <resultMap id="MommyPatientinfoResultMap" type="com.lymsh.mommybaby.earlydata.model.MommyPatientinfo">
  103 + <result column="PI_ID" property="piId" jdbcType="VARCHAR"/>
  104 + <result column="PI_NAME" property="piName" jdbcType="VARCHAR"/>
  105 + <result column="PI_SEX" property="piSex" jdbcType="INTEGER"/>
  106 + <result column="PI_ISDELETE" property="isDeleted" jdbcType="INTEGER"/>
  107 + <result column="PI_KIDSTYPE" property="piKidstype" jdbcType="INTEGER"/>
  108 + <result column="PI_BIRTHDAY" property="piBirthday" jdbcType="TIMESTAMP"/>
  109 + <result column="PI_MOTHERPHONE" property="piMotherphone" jdbcType="VARCHAR"/>
  110 + <result column="PI_OPERUSER" property="piOperuser" jdbcType="VARCHAR"/>
  111 + <result column="PI_PLATPATIENTID" property="piPatientid" jdbcType="VARCHAR"/>
  112 + <result column="PI_SERVICETYPE" property="serviceType" jdbcType="INTEGER"/>
  113 + <result column="PI_ISVIP" property="vip" jdbcType="INTEGER"/>
  114 + </resultMap>
  115 +
  116 + <sql id="MommyPatientinfoColumns">
  117 + PI_ID,PI_NAME,PI_SEX,PI_KIDSTYPE,PI_BIRTHDAY,PI_MOTHERPHONE,PI_OPERUSER,PI_PLATPATIENTID,PI_ISDELETE,PI_SERVICETYPE,PI_ISVIP
  118 + </sql>
  119 +
  120 + <select id="selectMommyPatientinfo" resultMap="MommyPatientinfoResultMap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  121 + select
  122 + <include refid="MommyPatientinfoColumns"/>
  123 + from (select<include refid="MommyPatientinfoColumns"/>,rownum r
  124 + from (
  125 + select
  126 + <include refid="MommyPatientinfoColumns"/>
  127 + from MOMMY_PATIENTINFO t
  128 + where PI_OPERTIME >= #{startTime} <if test="hospitalForeignId != null and hospitalForeignId != ''"> and pi_bookbuildinghospitalid = #{hospitalForeignId} </if>
  129 + ) h where
  130 + <![CDATA[ rownum <= #{endRow} ]]>
  131 + )
  132 + where
  133 + <![CDATA[ r >= #{startRow} ]]>
  134 + </select>
  135 +
  136 +
  137 +
  138 +
  139 + <resultMap id="MommyChildexaminerecordResultMap" type="com.lymsh.mommybaby.earlydata.model.MommyChildexaminerecord">
  140 + <result column="CER_ID" property="cerId" jdbcType="VARCHAR"/>
  141 + <result column="CER_PATIENTID" property="cerPatientid" jdbcType="VARCHAR"/>
  142 + <result column="CER_EXAMINDATE" property="cerExaminedate" jdbcType="TIMESTAMP"/>
  143 + <result column="CER_EXAMINHOSPITAL" property="cerExaminehospital" jdbcType="VARCHAR"/>
  144 + <result column="CER_MODIFIEDOPERATOR" property="cerOperator" jdbcType="VARCHAR"/>
  145 + <result column="CER_REMARKS" property="cerRemarks" jdbcType="VARCHAR"/>
  146 + </resultMap>
  147 +
  148 + <sql id="MommyChildexaminerecordColumns">
  149 + CER_ID,CER_PATIENTID,CER_EXAMINDATE,CER_EXAMINHOSPITAL,CER_MODIFIEDOPERATOR,CER_REMARKS
  150 + </sql>
  151 +
  152 + <select id="selectMommyChildexaminerecord" resultMap="MommyChildexaminerecordResultMap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  153 + select
  154 + <include refid="MommyChildexaminerecordColumns"/>
  155 + from (select<include refid="MommyChildexaminerecordColumns"/>,rownum r
  156 + from (
  157 + select
  158 + <include refid="MommyChildexaminerecordColumns"/>
  159 + from MOMMY_CHILDEXAMINRECORD t
  160 + where CER_MODIFIEDTIME >= #{startTime} <if test="condition != null and condition != ''"> and ${condition} </if>
  161 + ) h where
  162 + <![CDATA[ rownum <= #{endRow} ]]>
  163 + )
  164 + where
  165 + <![CDATA[ r >= #{startRow} ]]>
  166 + </select>
  167 +
  168 +
  169 +
  170 +
  171 + <resultMap id="MommyExamineResultMap" type="com.lymsh.mommybaby.earlydata.model.MommyExamine">
  172 + <result column="E_ID" property="eId" jdbcType="VARCHAR"/>
  173 + <result column="E_CHILDEXAMINID" property="eChildexamineid" jdbcType="VARCHAR"/>
  174 + <result column="E_EXAMINEID" property="eExamineid" jdbcType="VARCHAR"/>
  175 + <result column="E_RESULT" property="eResult" jdbcType="VARCHAR"/>
  176 + <result column="E_UNIT" property="eUnit" jdbcType="VARCHAR"/>
  177 + <result column="E_EVALUATION" property="eEvaluation" jdbcType="VARCHAR"/>
  178 + </resultMap>
  179 +
  180 + <sql id="MommyExamineColumns">
  181 + E_ID,E_CHILDEXAMINID,E_EXAMINEID,E_RESULT,E_UNIT,E_EVALUATION
  182 + </sql>
  183 +
  184 + <select id="selectMommyExamine" resultMap="MommyExamineResultMap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  185 + select
  186 + <include refid="MommyExamineColumns"/>
  187 + from (select<include refid="MommyExamineColumns"/>,rownum r
  188 + from (
  189 + select
  190 + <include refid="MommyExamineColumns"/>
  191 + from MOMMY_EXAMINE t
  192 + where E_CHILDEXAMINID = #{ext1}
  193 + ) h where
  194 + <![CDATA[ rownum <= #{endRow} ]]>
  195 + )
  196 + where
  197 + <![CDATA[ r >= #{startRow} ]]>
  198 + </select>
  199 +
  200 + <select id="selectExamineDiagnosis" resultType="java.lang.String" parameterType="java.lang.String">
  201 + select ED_DIAGNOSISCONTENT FROM Mommy_ExamineDiagnosis WHERE ED_TRIAGEORDERNO = #{triageOrderNo} and ED_ISVALID = 1
  202 + </select>
  203 +
  204 + <resultMap id="GuideTheWomenResultMap" type="com.lymsh.mommybaby.earlydata.model.PlatDataContent">
  205 + <result column="DC_NAME" property="dcId" jdbcType="VARCHAR"/>
  206 + <result column="ER_CONTENT" property="dcName" jdbcType="VARCHAR"/>
  207 + <result column="ES_PREGNANCYWEEK" property="week" jdbcType="INTEGER"/>
  208 + </resultMap>
  209 +
  210 + <select id="selectGuideTheWomen" resultMap="GuideTheWomenResultMap" parameterType="java.lang.Integer">
  211 + select ES_PREGNANCYWEEK,DC_NAME,ER_CONTENT FROM V_GUIDETHEWOMEN
  212 + <if test="week != null">
  213 + WHERE ES_PREGNANCYWEEK = #{week}
  214 + </if>
  215 + </select>
  216 +
  217 + <resultMap id="DcIdNameResultMap" type="com.lymsh.mommybaby.earlydata.model.PlatDataContent">
  218 + <result column="DC_ID" property="dcId" jdbcType="VARCHAR"/>
  219 + <result column="DC_NAME" property="dcName" jdbcType="VARCHAR"/>
  220 + </resultMap>
  221 +
  222 + <select id="selectDcIdName" resultMap="DcIdNameResultMap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  223 + select DC_ID,DC_NAME FROM ${tableName}
  224 + </select>
  225 +
  226 + <resultMap id="DiagnosisViewResultMap" type="com.lymsh.mommybaby.earlydata.model.DiagnosisView">
  227 + <result column="dh_pasthistoryid" property="storyId" jdbcType="VARCHAR"/>
  228 + <result column="dh_name" property="dhName" jdbcType="VARCHAR"/>
  229 + <result column="dh_historyinfo" property="historyInfo" jdbcType="VARCHAR"/>
  230 + <result column="dh_historytypeid" property="historyTypeId" jdbcType="VARCHAR"/>
  231 + </resultMap>
  232 +
  233 + <select id="selectDiagnosisView" resultMap="DiagnosisViewResultMap" parameterType="java.lang.String">
  234 + select dh_pasthistoryid,decode(dh_name,'',(select dc_name from plat_datacontent where dc_id=dh_pasthistoryid),dh_name) as dh_name
  235 +,dh_historyinfo,dh_historytypeid from mommy_diseasehistory where dh_historytypeid in('77','d0b47bdc-c516-4f86-95fa-176a33ca73bf') and DH_TRIAGEORDERNO=#{triageOrderNo}
  236 + </select>
  237 +
  238 +
  239 +
  240 +
  241 +
  242 +</mapper>
platform-mommyData/src/main/resources/earlyOrm/Plat.xml View file @ 338924d
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3 +<mapper namespace="com.lymsh.mommybaby.earlydata.dao.PlatMapper">
  4 +
  5 + <resultMap id="PlatDataTypeResultMap" type="com.lymsh.mommybaby.earlydata.model.PlatDataType">
  6 + <result column="DT_ID" property="dtId" jdbcType="VARCHAR"/>
  7 + <result column="DT_NAME" property="dtName" jdbcType="VARCHAR"/>
  8 + </resultMap>
  9 +
  10 + <sql id="PlatDataTypeColumns">
  11 + DT_ID,DT_NAME
  12 + </sql>
  13 +
  14 + <select id="selectPlatDataType" resultMap="PlatDataTypeResultMap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  15 + select
  16 + <include refid="PlatDataTypeColumns"/>
  17 + from (select<include refid="PlatDataTypeColumns"/>,rownum r
  18 + from (
  19 + select
  20 + <include refid="PlatDataTypeColumns"/>
  21 + from PLAT_DATATYPE t
  22 + where DT_OPERTIME >= #{startTime}
  23 + ) h where
  24 + <![CDATA[ rownum <= #{endRow} ]]>
  25 + )
  26 + where
  27 + <![CDATA[ r >= #{startRow} ]]>
  28 + </select>
  29 +
  30 +
  31 +
  32 +
  33 + <resultMap id="PlatDataContentResultMap" type="com.lymsh.mommybaby.earlydata.model.PlatDataContent">
  34 + <result column="DC_ID" property="dcId" jdbcType="VARCHAR"/>
  35 + <result column="DC_NAME" property="dcName" jdbcType="VARCHAR"/>
  36 + <result column="DC_NO" property="dcNo" jdbcType="VARCHAR"/>
  37 + <result column="DC_PARENTID" property="dcParentid" jdbcType="VARCHAR"/>
  38 + <result column="DC_DATATYPEID" property="dcDatatypeid" jdbcType="VARCHAR"/>
  39 + </resultMap>
  40 +
  41 + <sql id="PlatDataContentColumns">
  42 + DC_ID,DC_NAME,DC_PARENTID,DC_DATATYPEID,DC_NO
  43 + </sql>
  44 +
  45 + <select id="selectPlatDataContent" resultMap="PlatDataContentResultMap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  46 + select
  47 + <include refid="PlatDataContentColumns"/>
  48 + from (select<include refid="PlatDataContentColumns"/>,rownum r
  49 + from (
  50 + select
  51 + <include refid="PlatDataContentColumns"/>
  52 + from PLAT_DATACONTENT t
  53 + where DC_OPERTIME >= #{startTime} and DC_DATATYPEID != 'b7ea005c-dfac-4c2a-bdae-25239b3f44fd'
  54 + ) h where
  55 + <![CDATA[ rownum <= #{endRow} ]]>
  56 + )
  57 + where
  58 + <![CDATA[ r >= #{startRow} ]]>
  59 + </select>
  60 +
  61 +
  62 +
  63 + <resultMap id="PlatHospitalResultMap" type="com.lymsh.mommybaby.earlydata.model.PlatHospital">
  64 + <result column="H_ID" property="hId" jdbcType="VARCHAR"/>
  65 + <result column="H_NAME" property="hName" jdbcType="VARCHAR"/>
  66 + </resultMap>
  67 +
  68 + <sql id="PlatHospitalColumns">
  69 + H_ID,H_NAME
  70 + </sql>
  71 +
  72 + <select id="selectPlatHospital" resultMap="PlatHospitalResultMap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  73 + select
  74 + <include refid="PlatHospitalColumns"/>
  75 + from (select<include refid="PlatHospitalColumns"/>,rownum r
  76 + from (
  77 + select
  78 + <include refid="PlatHospitalColumns"/>
  79 + from PLAT_HOSPITAL t
  80 + ) h where
  81 + <![CDATA[ rownum <= #{endRow} ]]>
  82 + )
  83 + where
  84 + <![CDATA[ r >= #{startRow} ]]>
  85 + </select>
  86 +
  87 +
  88 +
  89 + <resultMap id="PlatUsersResultMap" type="com.lymsh.mommybaby.earlydata.model.PlatUsers">
  90 + <result column="U_ID" property="uId" jdbcType="VARCHAR"/>
  91 + <result column="U_USERNAME" property="uUsername" jdbcType="VARCHAR"/>
  92 + <result column="U_USERPWD" property="uUserpwd" jdbcType="VARCHAR"/>
  93 + <result column="U_EMPLOYEEID" property="uEmployeeid" jdbcType="VARCHAR"/>
  94 + <result column="U_LOGINNUM" property="uLoginnum" jdbcType="VARCHAR"/>
  95 + <result column="U_ISVALID" property="uIsvalid" jdbcType="INTEGER"/>
  96 + </resultMap>
  97 +
  98 + <sql id="PlatUsersColumns">
  99 + U_ID,U_USERNAME,U_USERPWD,U_EMPLOYEEID,U_LOGINNUM,U_ISVALID
  100 + </sql>
  101 +
  102 + <select id="selectPlatUsers" resultMap="PlatUsersResultMap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  103 + select
  104 + <include refid="PlatUsersColumns"/>
  105 + from (select<include refid="PlatUsersColumns"/>,rownum r
  106 + from (
  107 + select
  108 + <include refid="PlatUsersColumns"/>
  109 + from PLAT_USERS t
  110 + where U_OPERTIME >= #{startTime}
  111 + ) h where
  112 + <![CDATA[ rownum <= #{endRow} ]]>
  113 + )
  114 + where
  115 + <![CDATA[ r >= #{startRow} ]]>
  116 + </select>
  117 +
  118 +
  119 +
  120 + <resultMap id="PlatPatientResultMap" type="com.lymsh.mommybaby.earlydata.model.PlatPatient">
  121 + <result column="P_ID" property="pId" jdbcType="VARCHAR"/>
  122 + <result column="P_NAME" property="pName" jdbcType="VARCHAR"/>
  123 + <result column="P_SEX" property="pSex" jdbcType="INTEGER"/>
  124 + <result column="P_ISVALID" property="pIsvalid" jdbcType="INTEGER"/>
  125 + <result column="P_BIRTHDAY" property="pBirthday" jdbcType="TIMESTAMP"/>
  126 + <result column="P_MOBILEPHONE" property="pMobilephone" jdbcType="VARCHAR"/>
  127 + </resultMap>
  128 +
  129 + <sql id="PlatPatientColumns">
  130 + P_ID,P_NAME,P_SEX,P_BIRTHDAY,P_MOBILEPHONE,P_ISVALID
  131 + </sql>
  132 +
  133 + <select id="selectPlatPatient" resultMap="PlatPatientResultMap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  134 + select
  135 + <include refid="PlatPatientColumns"/>
  136 + from (select<include refid="PlatPatientColumns"/>,rownum r
  137 + from (
  138 + select
  139 + <include refid="PlatPatientColumns"/>
  140 + from PLAT_PATIENT t
  141 + where P_OPERTIME >= #{startTime}
  142 + ) h where
  143 + <![CDATA[ rownum <= #{endRow} ]]>
  144 + )
  145 + where
  146 + <![CDATA[ r >= #{startRow} ]]>
  147 + </select>
  148 +
  149 + <select id="selectTable" resultType="hashmap" parameterType="com.lymsh.mommybaby.earlydata.model.OracleCommonQuery">
  150 + select
  151 + *
  152 + from (select h.* ,rownum r
  153 + from (
  154 + select
  155 + t.*
  156 + from ${tableName} t
  157 + where ${timeColumnName} >= #{startTime} <if test="condition != null and condition != ''"> and ${condition} </if>
  158 + ) h where
  159 + <![CDATA[ rownum <= #{endRow} ]]>
  160 + )
  161 + where
  162 + <![CDATA[ r >= #{startRow} ]]>
  163 + </select>
  164 +
  165 + <select id="selectAllByHospitalId" resultType="hashmap" parameterType="map">
  166 + select
  167 + pp.P_ID,pp.P_NAME,pp.P_SEX,pp.P_BIRTHDAY,pp.P_MOBILEPHONE,pp.P_ISVALID, mp.P_NO,mp.P_OPERUSER,mp.P_TYPE,mp.P_PLATPATIENTID,mp.P_LASTMENSTRUALPERIOD,mp.P_ISVALID,mp.P_SERVICETYPE,mp.P_ISVIP,mp.P_FILINGOPER,
  168 + vp.DC_NAME as V_DC_NAME,vp.ME_COLORNAME as V_ME_COLORNAME,vp.FENSHU as V_FENSHU,vp.PI_AGEMONTH,first.*,result.*,pd.dc_name,pd.dc_no,me.me_colorname
  169 +
  170 + from plat_patient pp left join mommy_patient mp on pp.p_id = mp.p_platpatientid left join V_GETALLPATIENT vp on pp.p_id = vp.P_PLATPATIENTID
  171 + left join MOMMY_FIRSTEXAMINE first on first.fe_triageorderno = mp.P_NO left join MOMMY_EXAMINERESULT result on result.er_triageorderno = mp.P_NO left join MOMMY_EXAMINWARNING me on (me.me_examinid = first.fe_id or me.me_examinid = result.er_id)
  172 + left join PLAT_DATACONTENT pd on me.ME_WORNINGID = pd.DC_Id
  173 + where mp.p_hospitalid = #{hospitalId}
  174 + <if test="startTime != null">
  175 + and (mp.p_opertime >= #{startTime} or first.fe_opertime >= #{startTime} or result.er_opertime >= #{startTime} )
  176 + </if>
  177 + order by pp.p_id,first.fe_id,result.er_id
  178 + </select>
  179 +
  180 +
  181 + <resultMap id="ViewPatientResultMap" type="com.lymsh.mommybaby.earlydata.model.ViewPatient">
  182 + <result column="DC_NAME" property="dcName" jdbcType="VARCHAR"/>
  183 + <result column="ME_COLORNAME" property="meColorname" jdbcType="VARCHAR"/>
  184 + <result column="PI_AGEMONTH" property="ageMonth" jdbcType="VARCHAR"/>
  185 + <result column="FENSHU" property="fenshu" jdbcType="INTEGER"/>
  186 + </resultMap>
  187 +
  188 +
  189 + <select id="selectViewPatient" resultMap="ViewPatientResultMap" parameterType="java.lang.String">
  190 + select DC_NAME,ME_COLORNAME,FENSHU,PI_AGEMONTH FROM V_GETALLPATIENT WHERE P_PLATPATIENTID = #{patientId}
  191 + </select>
  192 +
  193 + <resultMap id="RiskDetailsResultMap" type="com.lymsh.mommybaby.earlydata.model.ViewPatient">
  194 + <result column="DC_NAME" property="dcName" jdbcType="VARCHAR"/>
  195 + <result column="ME_COLORNAME" property="meColorname" jdbcType="VARCHAR"/>
  196 + <result column="FENSHU" property="fenshu" jdbcType="INTEGER"/>
  197 + </resultMap>
  198 +
  199 + <select id="selectRiskDetails" resultMap="RiskDetailsResultMap" parameterType="java.lang.String">
  200 + SELECT pd.dc_name as DC_NAME,pd.dc_no as FENSHU,me.me_colorname as ME_COLORNAME FROM MOMMY_EXAMINWARNING ME
  201 + LEFT JOIN PLAT_DATACONTENT PD
  202 + ON ME.ME_WORNINGID = PD.DC_ID where me.me_examinid = #{examineId}
  203 + </select>
  204 +
  205 + <select id="selectOtherRiskDetails" resultMap="RiskDetailsResultMap" parameterType="java.lang.String">
  206 + select id as ME_COLORNAME,mo_content as DC_NAME,mo_values as FENSHU from MOMMY_OTHERWORNING where id = #{examineId}
  207 + </select>
  208 +
  209 +
  210 +
  211 +</mapper>
platform-resource/resources/config-dev.properties View file @ 338924d
... ... @@ -15,4 +15,13 @@
15 15 mysql.db.password=platform123
16 16 mysql.driver=com.mysql.jdbc.Driver
17 17 mysql.jdbcurl=jdbc:mysql://192.168.5.250:3306/platform?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8
  18 +
  19 +earlydata.driver=oracle.jdbc.driver.OracleDriver
  20 +earlydata.jdbcurl=jdbc:oracle:thin:@119.90.57.27:1521:orcl
  21 +earlydata.username=LYMS_21
  22 +earlydata.password=LYMS_21
  23 +
  24 +earlydata.maxpoolsize=5
  25 +earlydata.initialpoolsize=2
  26 +earlydata.minpoolsize=2
platform-resource/resources/config-product.properties View file @ 338924d
... ... @@ -11,4 +11,13 @@
11 11 mysql.maxpoolsize=5
12 12 mysql.initialpoolsize=2
13 13 mysql.minpoolsize=2
  14 +
  15 +earlydata.driver=oracle.jdbc.driver.OracleDriver
  16 +earlydata.jdbcurl=jdbc:oracle:thin:@119.90.57.27:1521:orcl
  17 +earlydata.username=LYMS_21
  18 +earlydata.password=LYMS_21
  19 +
  20 +earlydata.maxpoolsize=5
  21 +earlydata.initialpoolsize=2
  22 +earlydata.minpoolsize=2
platform-resource/resources/config-test.properties View file @ 338924d
... ... @@ -23,4 +23,13 @@
23 23 mysql.initialpoolsize=2
24 24 mysql.minpoolsize=2
25 25 redis.servers=localhost:6379
  26 +
  27 +earlydata.driver=oracle.jdbc.driver.OracleDriver
  28 +earlydata.jdbcurl=jdbc:oracle:thin:@119.90.57.27:1521:orcl
  29 +earlydata.username=LYMS_21
  30 +earlydata.password=LYMS_21
  31 +
  32 +earlydata.maxpoolsize=5
  33 +earlydata.initialpoolsize=2
  34 +earlydata.minpoolsize=2
... ... @@ -18,6 +18,7 @@
18 18 <module>platform-dal</module>
19 19 <module>platform-biz-service</module>
20 20 <module>platform-biz-patient-service</module>
  21 + <module>platform-mommyData</module>
21 22 <!--外部接口 -->
22 23 <module>platform-data-api</module>
23 24 <module>platform-operate-api</module>