Commit e6b8b1eeaaae4593133c7693d33e7ee31d2e7f09
1 parent
a310f05560
Exists in
master
and in
1 other branch
code update
Showing 2 changed files with 14 additions and 22 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/JdbcUtil.java
View file @
e6b8b1e
| ... | ... | @@ -367,19 +367,13 @@ |
| 367 | 367 | { |
| 368 | 368 | |
| 369 | 369 | int num = start; |
| 370 | - | |
| 371 | - while (true) { | |
| 372 | 370 | List<Map<String, Object>> list = getListDataBySql(" SELECT * FROM ( SELECT A.*, ROWNUM RN FROM " + |
| 373 | 371 | "(select replace(mp.P_NO,'-','') as PID,mp.*,p_birthday,p_name,floor((trunc(sysdate) - trunc(mp.P_LASTMENSTRUALPERIOD)+1) /7) as weeks from MOMMY_PATIENT mp left join Plat_Patient pp" + |
| 374 | - " on mp.p_platpatientid=pp.p_id where mp.p_hospitalid = '" + hospitalId + "' and rownum < "+total+" order by mp.p_lastmenstrualperiod desc ) A WHERE ROWNUM < "+(num+100)+" ) WHERE RN >= "+num+" "); | |
| 375 | - if (list == null || list.size() == 0) | |
| 376 | - { | |
| 377 | - break; | |
| 378 | - } | |
| 379 | - num=num+100; | |
| 372 | + " on mp.p_platpatientid=pp.p_id where mp.p_hospitalid = '" + hospitalId + "' order by mp.p_lastmenstrualperiod desc ) A WHERE ROWNUM < "+total+" ) WHERE RN >= "+num+" "); | |
| 373 | + System.out.println(list.size()+"---------------------------------"); | |
| 380 | 374 | for (Map<String, Object> map : list) { |
| 381 | 375 | try { |
| 382 | - System.out.println(num+"---------------------------------"); | |
| 376 | + | |
| 383 | 377 | Patients patients = new Patients(); |
| 384 | 378 | PersonModel person = new PersonModel(); |
| 385 | 379 | int type = 1; |
| ... | ... | @@ -720,8 +714,6 @@ |
| 720 | 714 | continue; |
| 721 | 715 | } |
| 722 | 716 | } |
| 723 | - | |
| 724 | - } | |
| 725 | 717 | } |
| 726 | 718 | |
| 727 | 719 | private static void syncChuZhen(String pid,String parentId, MongoTemplate mongoTemplate) |
| ... | ... | @@ -1645,7 +1637,7 @@ |
| 1645 | 1637 | public static void syncDataPat1(String hid,MongoTemplate mongoTemplate) |
| 1646 | 1638 | { |
| 1647 | 1639 | try { |
| 1648 | - syncPatientData(hid, mongoTemplate,1,5000); | |
| 1640 | + syncPatientData(hid, mongoTemplate,1,3000); | |
| 1649 | 1641 | } |
| 1650 | 1642 | catch (Exception e) |
| 1651 | 1643 | { |
| ... | ... | @@ -1656,7 +1648,7 @@ |
| 1656 | 1648 | public static void syncDataPat2(String hid,MongoTemplate mongoTemplate) |
| 1657 | 1649 | { |
| 1658 | 1650 | try { |
| 1659 | - syncPatientData(hid,mongoTemplate,50001,100000); | |
| 1651 | + syncPatientData(hid,mongoTemplate,30001,8000); | |
| 1660 | 1652 | } |
| 1661 | 1653 | catch (Exception e) |
| 1662 | 1654 | { |
| ... | ... | @@ -1667,7 +1659,7 @@ |
| 1667 | 1659 | public static void syncDataPat3(String hid,MongoTemplate mongoTemplate) |
| 1668 | 1660 | { |
| 1669 | 1661 | try { |
| 1670 | - syncPatientData(hid,mongoTemplate,8001,100000000); | |
| 1662 | + syncPatientData(hid,mongoTemplate,8001,100000); | |
| 1671 | 1663 | } |
| 1672 | 1664 | catch (Exception e) |
| 1673 | 1665 | { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
e6b8b1e
| ... | ... | @@ -126,14 +126,14 @@ |
| 126 | 126 | System.out.print("同步结束孕妇2>>>>>>>>>>>>>>>>>>>>>>>>>"); |
| 127 | 127 | } |
| 128 | 128 | }).start(); |
| 129 | -// new Thread(new Runnable() { | |
| 130 | -// @Override | |
| 131 | -// public void run() { | |
| 132 | -// System.out.print("同步开始孕妇3>>>>>>>>>>>>>>>>>>>>>>>>>"); | |
| 133 | -// JdbcUtil.syncDataPat3(hid, template); | |
| 134 | -// System.out.print("同步结束孕妇3>>>>>>>>>>>>>>>>>>>>>>>>>"); | |
| 135 | -// } | |
| 136 | -// }).start(); | |
| 129 | + new Thread(new Runnable() { | |
| 130 | + @Override | |
| 131 | + public void run() { | |
| 132 | + System.out.print("同步开始孕妇3>>>>>>>>>>>>>>>>>>>>>>>>>"); | |
| 133 | + JdbcUtil.syncDataPat3(hid, template); | |
| 134 | + System.out.print("同步结束孕妇3>>>>>>>>>>>>>>>>>>>>>>>>>"); | |
| 135 | + } | |
| 136 | + }).start(); | |
| 137 | 137 | return "starting..........."; |
| 138 | 138 | } |
| 139 | 139 | } |