Commit 6c54f45bbfcfe820ea4b56c56cd039ec25fbb5af

Authored by liquanyu
1 parent 3d016c7bef

update

Showing 5 changed files with 35 additions and 23 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 6c54f45
... ... @@ -2788,7 +2788,7 @@
2788 2788 }
2789 2789 }
2790 2790  
2791   - if (request.getIsShowPhone() == 1) {//隐藏姓名、地址
  2791 + if (request.getIsShowPhone() != null && request.getIsShowPhone() == 1) {//隐藏姓名、地址
2792 2792 for (BabyManageListResult result : list) {
2793 2793 result.setMommnyPhone(StringUtils.encryPhone(result.getMommnyPhone()));
2794 2794 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ 6c54f45
... ... @@ -1102,8 +1102,8 @@
1102 1102 boolean flag = false;
1103 1103 // List<String> hospital = groupsFacade.findGroupHospital(userId, false);
1104 1104 String hospitalId = autoMatchFacade.getHospitalId(userId);
1105   - Criteria criteria = Criteria.where("yn").ne("0").and("hospitalId").is(hospitalId);
1106   - Criteria pCriteria = Criteria.where("yn").ne("0").and("hospitalId").is(hospitalId);
  1105 + Criteria criteria = Criteria.where("yn").ne(0).and("hospitalId").is(hospitalId);
  1106 + Criteria pCriteria = Criteria.where("yn").ne(0).and("hospitalId").is(hospitalId);
1107 1107 if (org.apache.commons.lang.StringUtils.isNotBlank(queryNo)) {
1108 1108 pCriteria.orOperator(Criteria.where("mcertNo").regex(queryNo), Criteria.where("name").regex(queryNo),
1109 1109 Criteria.where("fphone").regex(queryNo), Criteria.where("vcCardNo").regex(queryNo), Criteria.where("mname").regex(queryNo));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java View file @ 6c54f45
... ... @@ -88,7 +88,7 @@
88 88  
89 89  
90 90 //0 不需要隐藏 1 隐藏
91   - private int isShowPhone;
  91 + private Integer isShowPhone;
92 92  
93 93  
94 94 private String vcCardNo;
95 95  
... ... @@ -112,11 +112,11 @@
112 112 private String lastCheckDoctor;
113 113 private String riskCode;
114 114  
115   - public int getIsShowPhone() {
  115 + public Integer getIsShowPhone() {
116 116 return isShowPhone;
117 117 }
118 118  
119   - public void setIsShowPhone(int isShowPhone) {
  119 + public void setIsShowPhone(Integer isShowPhone) {
120 120 this.isShowPhone = isShowPhone;
121 121 }
122 122  
platform-transfer/src/main/java/com/lyms/platform/conn/inf/BaseConnection.java View file @ 6c54f45
... ... @@ -19,14 +19,14 @@
19 19 public void close(Connection conn, Statement sta, ResultSet rst)
20 20 {
21 21 try {
22   -// if (sta != null)
23   -// {
24   -// sta.close();
25   -// }
26   -// if (rst != null)
27   -// {
28   -// rst.close();
29   -// }
  22 + if (rst != null)
  23 + {
  24 + rst.close();
  25 + }
  26 + if (sta != null)
  27 + {
  28 + sta.close();
  29 + }
30 30 if (conn != null)
31 31 {
32 32 conn.close();
platform-transfer/src/main/java/com/lyms/platform/worker/BoneTransferWorker.java View file @ 6c54f45
1 1 package com.lyms.platform.worker;
2 2  
3 3 import com.lyms.platform.comm.ApplicationProperties;
  4 +import com.lyms.platform.comm.StringUtils;
4 5 import com.lyms.platform.conn.BoneConnectionFactory;
5 6 import com.lyms.platform.conn.inf.ConnectionFactoryMethod;
6 7 import com.lyms.platform.conn.inf.IConnection;
... ... @@ -10,10 +11,7 @@
10 11 import org.springframework.beans.factory.annotation.Autowired;
11 12 import org.springframework.stereotype.Component;
12 13  
13   -import java.sql.Connection;
14   -import java.sql.ResultSet;
15   -import java.sql.SQLException;
16   -import java.sql.Statement;
  14 +import java.sql.*;
17 15 import java.util.Date;
18 16 import java.util.HashMap;
19 17 import java.util.Map;
... ... @@ -27,6 +25,22 @@
27 25 @Autowired
28 26 private ApplicationProperties properties;
29 27  
  28 +
  29 +
  30 + public Connection getConnection()
  31 + {
  32 + Connection conn = null;
  33 + try {
  34 + Class.forName("com.hxtt.sql.access.AccessDriver");
  35 + String url = "jdbc:Access:///"+properties.getDataPath();
  36 + conn = DriverManager.getConnection(url, "", "");
  37 + } catch (Exception e) {
  38 + logger.error("getConnection error."+e.toString());
  39 + }
  40 + return conn;
  41 + }
  42 +
  43 +
30 44 @Override
31 45 public void doTransfer() {
32 46 while (true)
33 47  
... ... @@ -35,11 +49,9 @@
35 49 Connection conn = null;
36 50 Statement sta = null;
37 51 ResultSet rst = null;
38   - ConnectionFactoryMethod factoryMethod = new BoneConnectionFactory();
39 52 IConnection iConnection = null;
40 53 try {
41   - iConnection = factoryMethod.createConnection(properties.getDataPath());
42   - conn = iConnection.getConnection();
  54 + conn = getConnection();
43 55 sta = conn.createStatement();
44 56 String sql = "select PatientID,ZScore,TScore,dbSos,dbBqi,dbRrf,dbEoa,YoungAdult,ageMatched,dbAge,PartDisplayName,PatientName from PatientInfo where status is null and DayTimeOfSave > "+ DateUtil.formatDate(new Date(),"yyyy-MM-dd");
45 57 rst = sta.executeQuery(sql);
... ... @@ -80,7 +92,7 @@
80 92 map.put("type",properties.getType()); //
81 93 map.put("hospitalId",properties.getHospitalId()); //
82 94  
83   - if (map.size() > 0 && PatientID != null)
  95 + if (map.size() > 0 && StringUtils.isNotEmpty(PatientID))
84 96 {
85 97 String response = send(map, properties.getUrl() + "/saveBone");
86 98 if (response.contains("0"))
... ... @@ -90,7 +102,7 @@
90 102 }
91 103 }
92 104 }
93   - Thread.sleep(10000);
  105 + Thread.sleep(30000);
94 106 } catch (Exception e) {
95 107 logger.error("getBoneRecords Exception. "+e.toString());
96 108 }