浏览代码

挂号代码提交

esb 9 年之前
父节点
当前提交
54ae4e4e20

+ 29 - 12
Hos-Resource-WS/src/main/java/com.yihu.ehr/ws/ExcuteService.java

@ -10,6 +10,8 @@ import org.springframework.util.ResourceUtils;
import org.springframework.util.StringUtils;
import java.io.*;
import java.util.List;
import java.util.Map;
/**
@ -55,6 +57,7 @@ public class ExcuteService {
            }
            jdbcTemplate = new JdbcTemplate();
            jdbcTemplate.setDataSource(dasicDataSource);
            System.out.println(jdbcTemplate.queryForMap("select 1 from dual"));
        }
    }
@ -126,6 +129,7 @@ public class ExcuteService {
        } catch (Exception e) {
            wsReturnModel.setTransactionCode("-30000");
            wsReturnModel.setRespMessage(e.getMessage());
            e.printStackTrace();
            return WSReturnModel.toXml(wsReturnModel);
        }
    }
@ -134,7 +138,7 @@ public class ExcuteService {
     * 检查报告单/检验报告单明细
     *
     * @param reportId
     * @param reportType
     * @param reportType //报告单类型
     * @return
     */
    public String GetReportInfo(
@ -161,34 +165,47 @@ public class ExcuteService {
        } catch (Exception e) {
            wsReturnModel.setTransactionCode("-30000");
            wsReturnModel.setRespMessage(e.getMessage());
            e.printStackTrace();
            return WSReturnModel.toXml(wsReturnModel);
        }
    }
    /**
     * 人口学信息查询
     * @param TransactionCode
     * @param CardType
     * @param CardNo
     * @param Mobile
     * @param PatientId
     * @return
     */
    public String QueryUserInfo(String TransactionCode, String CardType, String CardNo, String Mobile, String PatientId) {
        WSReturnModel wsReturnModel = new WSReturnModel();
        wsReturnModel.setTransactionCode(TransactionCode);
        try {
            initJDBC();
            StringBuffer sb = new StringBuffer("select * from HDSD01_01 where 1=1 ");
            if (!StringUtil.isEmpty(CardType)) {
                sb.append(" and HDSD00_05_026 < '" + CardType + "'");
            }
            if (!StringUtil.isEmpty(CardNo)) {
                sb.append(" and HDSD00_01_001 > '" + CardNo + "'");
            }
            if (!StringUtil.isEmpty(Mobile)) {
                sb.append(" and HDSD00_01_001 > '" + Mobile + "'");
            //挂号信息
            StringBuffer sb = new StringBuffer("select * from HDSC01_02 where 1=1 ");
            if (!StringUtil.isEmpty(PatientId)) {
                sb.append(" and PATIENT_ID = '" + PatientId + "'");
            }
            List<Map<String, Object>> GHMap= jdbcTemplate.queryForList(sb.toString());
            //人口学信息
            sb = new StringBuffer("select * from HDSA00_01 where 1=1 ");
            if (!StringUtil.isEmpty(PatientId)) {
                sb.append(" and HDSD00_01_001 > '" + PatientId + "'");
                sb.append(" and PATIENT_ID = '" + PatientId + "'");
            }
           wsReturnModel.setData(jdbcTemplate.queryForList(sb.toString()));
            List<Map<String, Object>> RKXMap= jdbcTemplate.queryForList(sb.toString());
            GHMap.addAll(RKXMap);
            System.out.println(GHMap);
            wsReturnModel.setData(GHMap);
            return WSReturnModel.toXml(wsReturnModel);
        } catch (Exception e) {
            wsReturnModel.setTransactionCode("-30000");
            wsReturnModel.setRespMessage(e.getMessage());
            e.printStackTrace();
            return WSReturnModel.toXml(wsReturnModel);
        }
    }

二进制
Hos-Resource-WS/src/main/resources/db/localDB.db


+ 1 - 1
Hos-Resource-WS/src/main/resources/spring/spring-cxf.xml

@ -12,5 +12,5 @@
    <jaxws:endpoint id="/ServiceGateWay"
                    implementor="com.yihu.wsgw.webservice.ServiceGateWay"
                    address="/ServiceGateWay"  publishedEndpointUrl="http://27.154.56.142:8082/service/ServiceGateWay" /><!---->
                    address="/ServiceGateWay"   /><!--publishedEndpointUrl="http://27.154.56.142:8082/service/ServiceGateWay"-->
</beans> 

+ 1 - 1
Hos-Resource-WS/src/main/webapp/WEB-INF/web.xml

@ -87,6 +87,6 @@
    <!-- =======================CXF配置 end================== -->
    <!-- 默认页面 -->
    <welcome-file-list>
        <welcome-file>/indexPage</welcome-file>
        <welcome-file>/loginPage</welcome-file>
    </welcome-file-list>
</web-app>