Commit 5e008403dad7469c09dfcc54ed690a53542370c8
1 parent
88059d1089
Exists in
master
and in
1 other branch
虚拟叫号
Showing 2 changed files with 39 additions and 28 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/whfy/VirtualCallService.java
View file @
5e00840
| ... | ... | @@ -58,33 +58,44 @@ |
| 58 | 58 | System.out.println("time="+ DateUtil.getyyyy_MM_dd_hms(new Date())+";code="+code+";deptName="+deptName+";doctorAccount="+doctorAccount+";doctorName="+doctorName |
| 59 | 59 | +";ip="+ip+";mac="+mac); |
| 60 | 60 | |
| 61 | -// Connection conn = null; | |
| 62 | -// CallableStatement cs = null; | |
| 63 | -// try { | |
| 64 | -// conn = makeHisConnection(); | |
| 65 | -// //1.1 普通登录 | |
| 66 | -// //exec usp_mzhs_hsfzinterface '1','192.168.1.219','2052','儿科门诊','00','supervisor','D8-9E-F3-13-A5-86','0',@sex='男' | |
| 67 | -// cs = conn.prepareCall("{call usp_mzhs_hsfzinterface(?,?,?,?,?,?,?)}"); | |
| 68 | -// cs.setString(1, "1"); | |
| 69 | -// cs.setString(2, ip); | |
| 70 | -// cs.setString(3, code); | |
| 71 | -// cs.setString(4, deptName); | |
| 72 | -// cs.setString(5, doctorAccount); | |
| 73 | -// cs.setString(6, doctorName); | |
| 74 | -// cs.setString(7, mac); | |
| 75 | -// ResultSet rs = cs.executeQuery(); | |
| 76 | -// } | |
| 77 | -// catch (SQLException e) | |
| 78 | -// { | |
| 79 | -// ExceptionUtils.catchException(e, "callLogin exception"); | |
| 80 | -// result.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR); | |
| 81 | -// result.setErrormsg("登陆异常"); | |
| 82 | -// return result; | |
| 83 | -// } | |
| 84 | -// finally { | |
| 85 | -// ConnTools.close(conn,cs); | |
| 86 | -// } | |
| 61 | + Connection conn = null; | |
| 62 | + CallableStatement cs = null; | |
| 63 | + try { | |
| 64 | + conn = makeHisConnection(); | |
| 65 | + //1.1 普通登录 | |
| 66 | + //exec usp_mzhs_hsfzinterface '1','192.168.1.219','2052','儿科门诊','00','supervisor','D8-9E-F3-13-A5-86','0',@sex='男' | |
| 67 | + cs = conn.prepareCall("{call usp_mzhs_hsfzinterface(?,?,?,?,?,?,?)}"); | |
| 68 | + cs.setString(1, "1"); | |
| 69 | + cs.setString(2, ip); | |
| 70 | + cs.setString(3, code); | |
| 71 | + cs.setString(4, deptName); | |
| 72 | + cs.setString(5, doctorAccount); | |
| 73 | + cs.setString(6, doctorName); | |
| 74 | + cs.setString(7, mac); | |
| 75 | + ResultSet rs = cs.executeQuery(); | |
| 87 | 76 | |
| 77 | + int count = rs.getMetaData().getColumnCount(); | |
| 78 | + while (rs.next()) { | |
| 79 | + for (int i = 1; i <= count; i++) | |
| 80 | + { | |
| 81 | + String columnName = rs.getMetaData().getColumnName(i); | |
| 82 | + Object obj = rs.getObject(columnName); | |
| 83 | + System.out.println("columName=" + columnName+ ";value="+obj); | |
| 84 | + } | |
| 85 | + } | |
| 86 | + | |
| 87 | + } | |
| 88 | + catch (SQLException e) | |
| 89 | + { | |
| 90 | + ExceptionUtils.catchException(e, "callLogin exception"); | |
| 91 | + result.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR); | |
| 92 | + result.setErrormsg("登陆异常"); | |
| 93 | + return result; | |
| 94 | + } | |
| 95 | + finally { | |
| 96 | + ConnTools.close(conn,cs); | |
| 97 | + } | |
| 98 | + | |
| 88 | 99 | result.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 89 | 100 | result.setErrormsg("登陆成功"); |
| 90 | 101 | return result; |
| ... | ... | @@ -382,7 +393,7 @@ |
| 382 | 393 | } |
| 383 | 394 | |
| 384 | 395 | //获取非本地IP的MAC地址 |
| 385 | - Process p = Runtime.getRuntime().exec("nbtstat -A " + ip); | |
| 396 | + Process p = Runtime.getRuntime().exec("arp -A " + ip); | |
| 386 | 397 | InputStreamReader isr = new InputStreamReader(p.getInputStream()); |
| 387 | 398 | BufferedReader br = new BufferedReader(isr); |
| 388 | 399 | while ((line = br.readLine()) != null) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
View file @
5e00840