Commit 83d0f4791396e489ae1ade46a898bf223b145718

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 1 changed file

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/JdbcUtil.java View file @ 83d0f47
... ... @@ -46,7 +46,7 @@
46 46  
47 47 private static BlockingQueue<SimplePatient> bq = new LinkedBlockingQueue();
48 48  
49   - private static ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10, 15, 1, TimeUnit.HOURS, new LinkedBlockingQueue<Runnable>());
  49 + private static ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(15, 20, 1, TimeUnit.HOURS, new LinkedBlockingQueue<Runnable>());
50 50  
51 51 private static class Chanle extends Thread {
52 52 private MongoTemplate mongoTemplate;
... ... @@ -140,7 +140,7 @@
140 140 List<Map<String, Object>> usersList = getMysqlListDataBySql("select id,name from users where org_id = 216 ");
141 141 for (Map<String, Object> map : usersList) {
142 142 System.out.println(map);
143   - users.put(getString(map.get("NAME")), getString(map.get("ID")));
  143 + users.put(getString(map.get("name")), getString(map.get("id")));
144 144 }
145 145 System.out.println("users------" + users.size());
146 146  
... ... @@ -742,6 +742,7 @@
742 742  
743 743 private static void syncChuZhen(String pid, String parentId, MongoTemplate mongoTemplate) {
744 744 // List<Map<String,Object>> list = getListDataBySql(" SELECT * FROM MOMMY_FIRSTEXAMINE f where replace(f.FE_TRIAGEORDERNO,'-','') = '" + parentId + "'");
  745 + long startTimes = System.currentTimeMillis();
745 746 List<Map<String, Object>> list = getListDataBySql(" SELECT F.*,\n" +
746 747 " '[\"'||REPLACE(TT.HIGH_RISK_ID,',','\",\"')||'\"]' AS RISKFACTOR,\n" +
747 748 " TT.HIGH_RISK_VALUE AS RISKSCORE\n" +
748 749  
... ... @@ -767,12 +768,14 @@
767 768 " GROUP BY T.ME_EXAMINID \n" +
768 769 " )TT ON F.FE_ID=TT.ME_EXAMINID\n" +
769 770 "where replace(f.FE_TRIAGEORDERNO,'-','') = '" + parentId + "'\n");
  771 + long endTimes = System.currentTimeMillis();
  772 + System.out.println("fuzhenTimes===========" + (endTimes-startTimes));
770 773 for (Map<String, Object> map : list) {
771 774 AntExChuModel chuModel = new AntExChuModel();
772 775  
773 776 chuModel.setParentId(parentId);
774 777 chuModel.setPid(pid);
775   - chuModel.setId(getString(map.get("FE_ID")));
  778 + chuModel.setId(getString(map.get("FE_ID")).replace("-",""));
776 779  
777 780 chuModel.setDueDate(getDate(map.get("FE_EXPECTEDDATECONFINEMENT")));
778 781 chuModel.setLastMenses(getDate(map.get("FE_LASTMENSTRUALPERIOD")));
779 782  
... ... @@ -805,8 +808,11 @@
805 808 String doctorId = getString(map.get("FE_DOCTOR"));
806 809 if (doctorId != null && !"".equals(doctorId)) {
807 810 //String dname = getString(getOralceSingleObjBySql("select e.e_name from mommy_employee e where e.e_id = '" + doctorId + "'"));
  811 +
808 812 String dname = getEmpNameById(doctorId);
809 813 String id = getUserIdByName(dname);
  814 +
  815 + System.out.println("chu="+doctorId +"*****"+ dname+"iiiiiiii"+id);
810 816 // String id = getString(getMysqlSingleObjBySql("select id from users where name = '" + dname + "'"));
811 817 chuModel.setProdDoctor(id);//产检医生
812 818 }
813 819  
814 820  
... ... @@ -988,14 +994,15 @@
988 994 " GROUP BY T.ME_EXAMINID \n" +
989 995 " )TT ON A.ER_ID=TT.ME_EXAMINID where replace(p_no,'-','') = '" + parentId + "' ORDER BY B.P_NO,A.ER_CHECKDATE ASC ) A WHERE ROWNUM <= 10 ) WHERE RN >= 0 ";
990 996  
991   -
  997 + long startTimes = System.currentTimeMillis();
992 998 List<Map<String, Object>> list = getListDataBySql(sql);
993   -
  999 + long endTimes = System.currentTimeMillis();
  1000 + System.out.println("chzhenTimes==========="+(endTimes-startTimes));
994 1001 for (Map<String, Object> map : list) {
995 1002 AntenatalExaminationModel antxModel = new AntenatalExaminationModel();
996 1003 antxModel.setPid(pid);
997 1004 antxModel.setParentId(parentId);
998   - antxModel.setId(getString(map.get("ID")));
  1005 + antxModel.setId(getString(map.get("ID")).replace("-",""));
999 1006  
1000 1007 antxModel.setCurrentDueDate(getString(map.get("CURRENTDUEDATE")));
1001 1008 antxModel.setWeight(getDouble(map.get("WEIGHT")));
... ... @@ -1028,6 +1035,8 @@
1028 1035 String checkDoctorName = getString(map.get("CHECKDOCTOR"));
1029 1036 if (checkDoctorName != null && !"".equals(checkDoctorName)) {
1030 1037 String id = getUserIdByName(checkDoctorName);
  1038 +
  1039 + System.out.println("fu=doctorName"+checkDoctorName +"***id="+ id);
1031 1040 // String id = getString(getMysqlSingleObjBySql("select id from users where name = '" + checkDoctorName + "'"));
1032 1041 antxModel.setCheckDoctor(id);
1033 1042 }