Commit 75ba64d6d066f30fd1864107b2d813a166083fb7
Exists in
master
and in
8 other branches
Merge remote-tracking branch 'origin/master'
Showing 3 changed files
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/JdbcUtil.java
View file @
75ba64d
| ... | ... | @@ -763,7 +763,7 @@ | 
| 763 | 763 | " INNER JOIN PLAT_DATACONTENT K ON J.ME_WORNINGID = K.DC_ID AND K.DC_ISVALID=1 AND K.DC_DATATYPEID='fb43fd5a-b153-4cb9-9180-c46f5612ba43' AND K.DC_NAME<>'其他'\n" + | 
| 764 | 764 | " --高危等级\n" + | 
| 765 | 765 | " INNER JOIN PLAT_DATACONTENT L ON K.DC_PARENTID=L.DC_ID AND L.DC_ISVALID=1\n" + | 
| 766 | - " INNER JOIN LYMS_BASICCONFIG LL ON K.DC_NAME=LL.NAME\n" + | |
| 766 | + " INNER JOIN LYMS_BASICCONFIG LL ON K.DC_NAME=LL.NAME AND LL.PARENTID IN ('49a36aea-c5b6-4162-87d2-9eb3c6ec00c2','eb146c03-b19f-4e28-b85f-fda574b2283b','315107bd-91fe-42a1-9237-752f3c046a40','e637b361-99cf-41eb-84f2-f0dab596e928','224b2329-cb82-4da3-a071-8527f8283aab') \n" + | |
| 767 | 767 | " -- UNION ALL \n" + | 
| 768 | 768 | " --其他高危评分\n" + | 
| 769 | 769 | " --SELECT M.ID,M.MO_CONTENT,M.MO_COLORNAME,M.MO_VALUES FROM MOMMY_OTHERWORNING M\n" + | 
| ... | ... | @@ -1000,7 +1000,7 @@ | 
| 1000 | 1000 | long startTimes = System.currentTimeMillis(); | 
| 1001 | 1001 | List<Map<String, Object>> list = getListDataBySql(sql); | 
| 1002 | 1002 | long endTimes = System.currentTimeMillis(); | 
| 1003 | - System.out.println("chzhenTimes==========="+(endTimes-startTimes)); | |
| 1003 | + System.out.println("fuzhenTimes==========="+(endTimes-startTimes)); | |
| 1004 | 1004 | for (Map<String, Object> map : list) { | 
| 1005 | 1005 | AntenatalExaminationModel antxModel = new AntenatalExaminationModel(); | 
| 1006 | 1006 | antxModel.setPid(pid); | 
platform-data-api/src/main/java/com/lyms/platform/data/util/AmsMessageService.java
View file @
75ba64d
platform-job-index/src/main/java/com/lyms/platform/job/index/service/SyncDataService.java
View file @
75ba64d
| ... | ... | @@ -53,8 +53,9 @@ | 
| 53 | 53 | try { | 
| 54 | 54 | simplePatient = patientsQueue.poll(1, TimeUnit.MINUTES); | 
| 55 | 55 | if (null != simplePatient) { | 
| 56 | - threadPoolExecutor.execute(new SyncAntEx(simplePatient.getPid(), simplePatient.getId(), mongoTemplate)); | |
| 57 | - threadPoolExecutor.execute(new SyncAntExChu(simplePatient.getPid(), simplePatient.getId(), mongoTemplate)); | |
| 56 | +// threadPoolExecutor.execute(new SyncAntEx(simplePatient.getPid(), simplePatient.getId(), mongoTemplate)); | |
| 57 | +// threadPoolExecutor.execute(new SyncAntExChu(simplePatient.getPid(), simplePatient.getId(), mongoTemplate)); | |
| 58 | + threadPoolExecutor.execute(new SyncPatCheck(simplePatient.getPid(), simplePatient.getId(), mongoTemplate)); | |
| 58 | 59 | } | 
| 59 | 60 | } catch (Exception e) { | 
| 60 | 61 | ExceptionUtils.catchException(e, "Chanle thread error." + simplePatient); | 
| ... | ... | @@ -63,6 +64,32 @@ | 
| 63 | 64 | } | 
| 64 | 65 | } | 
| 65 | 66 | |
| 67 | + | |
| 68 | + private class SyncPatCheck extends Thread { | |
| 69 | + private String pid; | |
| 70 | + private String id; | |
| 71 | + private MongoTemplate mongoTemplate; | |
| 72 | + | |
| 73 | + public SyncPatCheck(String pid, String id, MongoTemplate mongoTemplate) { | |
| 74 | + this.pid = pid; | |
| 75 | + this.id = id; | |
| 76 | + this.mongoTemplate = mongoTemplate; | |
| 77 | + } | |
| 78 | + | |
| 79 | + @Override | |
| 80 | + public void run() { | |
| 81 | + try { | |
| 82 | + syncChuZhen(pid, id, mongoTemplate); | |
| 83 | + syncFuzhen(pid, id, mongoTemplate); | |
| 84 | + } catch (Exception e) { | |
| 85 | + ExceptionUtils.catchException(e, "SyncAntExChu thread error.id:" + id+",pid:"+pid); | |
| 86 | + } | |
| 87 | + } | |
| 88 | + | |
| 89 | + | |
| 90 | + } | |
| 91 | + | |
| 92 | + | |
| 66 | 93 | private class SyncAntExChu extends Thread { | 
| 67 | 94 | private String pid; | 
| 68 | 95 | private String id; | 
| ... | ... | @@ -146,6 +173,7 @@ | 
| 146 | 173 | private void syncBaby(Map<String, Object> map) | 
| 147 | 174 | { | 
| 148 | 175 | PersonModel personModel = new PersonModel(); | 
| 176 | + personModel.setId(DataUtil.getString(map.get("ID"))); | |
| 149 | 177 | personModel.setPhone(DataUtil.getString(map.get("PI_MOTHERPHONE"))); | 
| 150 | 178 | personModel.setName(DataUtil.getString(map.get("PI_NAME"))); | 
| 151 | 179 | personModel.setCardNo(DataUtil.getString(map.get("PI_MOTHERPHONE"))); | 
| ... | ... | @@ -420,7 +448,7 @@ | 
| 420 | 448 | patients.setDueDate(DateUtil.addDay(DataUtil.getDate(map.get("P_LASTMENSTRUALPERIOD")), 42 * 7)); | 
| 421 | 449 | person.setCreated(new Date()); | 
| 422 | 450 | |
| 423 | - | |
| 451 | + person.setId(String.valueOf(map.get("PID"))); | |
| 424 | 452 | person.setType(type); | 
| 425 | 453 | person.setYn(YnEnums.YES.getId()); | 
| 426 | 454 | person.setBirth(DataUtil.getDate(map.get("P_BIRTHDAY"))); | 
| ... | ... | @@ -742,8 +770,8 @@ | 
| 742 | 770 | " --高危内容\n" + | 
| 743 | 771 | " INNER JOIN PLAT_DATACONTENT K ON J.ME_WORNINGID = K.DC_ID AND K.DC_ISVALID=1 AND K.DC_DATATYPEID='fb43fd5a-b153-4cb9-9180-c46f5612ba43' AND K.DC_NAME<>'其他'\n" + | 
| 744 | 772 | " --高危等级\n" + | 
| 745 | - " INNER JOIN PLAT_DATACONTENT L ON K.DC_PARENTID=L.DC_ID AND L.DC_ISVALID=1\n" + | |
| 746 | - " INNER JOIN LYMS_BASICCONFIG LL ON K.DC_NAME=LL.NAME\n" + | |
| 773 | + " INNER JOIN PLAT_DATACONTENT L ON K.DC_PARENTID=L.DC_ID AND L.DC_ISVALID=1 \n" + | |
| 774 | + " INNER JOIN LYMS_BASICCONFIG LL ON K.DC_NAME=LL.NAME AND LL.PARENTID IN ('49a36aea-c5b6-4162-87d2-9eb3c6ec00c2','eb146c03-b19f-4e28-b85f-fda574b2283b','315107bd-91fe-42a1-9237-752f3c046a40','e637b361-99cf-41eb-84f2-f0dab596e928','224b2329-cb82-4da3-a071-8527f8283aab') \n" + | |
| 747 | 775 | " -- UNION ALL \n" + | 
| 748 | 776 | " --其他高危评分\n" + | 
| 749 | 777 | " --SELECT M.ID,M.MO_CONTENT,M.MO_COLORNAME,M.MO_VALUES FROM MOMMY_OTHERWORNING M\n" + |