Commit a553a6412dd7aff51171c90f649707b547c5cdd2

Authored by liquanyu
1 parent a24e87723d

访视

Showing 2 changed files with 20 additions and 46 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/SyncQhdBaseInfoService.java View file @ a553a64
... ... @@ -49,56 +49,26 @@
49 49 System.out.println("查询数据完成");
50 50 break;
51 51 }
52   - int batchSize = BATCH_SIZE;
53   - int end = 0;
  52 + for(Map<String, Object> data : list)
  53 + {
  54 + String ckNo = getString(data.get("ck_no"));
  55 + String ckPrefix = getString(data.get("ck_prefix"));
54 56  
55   - //线程数
56   - int threadCount = list.size() % BATCH_SIZE == 0 ? list.size() / BATCH_SIZE : list.size() / BATCH_SIZE + 1;
  57 + String sql = "SELECT M.CK_NO,M.CK_PREGDAY,M.CK_BABBYBIRTHDAY,M.CK_PREFIX FROM MOMMY_BIRTHNOCHECK M WHERE M.CK_NO='"+ckNo+"' AND M.CK_PREFIX='"+ckPrefix+"'";
57 58  
58   - final CountDownLatch countDownLatch = new CountDownLatch(threadCount);
  59 + List<Map<String, Object>> list1 = JDBCUtil.getOracleListDataBySql(sql);
  60 + if (CollectionUtils.isNotEmpty(list1))
  61 + {
  62 + Map<String, Object> obj = list1.get(0);
  63 + Date birth = HsDataUtil.getDate(obj.get("CK_BABBYBIRTHDAY"));
  64 + String day = HsDataUtil.getString(obj.get("CK_PREGDAY"));
  65 + System.out.println(DateUtil.getyyyy_MM_dd_hms(birth));
  66 + int count = JDBCUtil.mysqlUpdate(" update cert_birthnocheck set ck_pregday=" + day + ",ck_babbybirthday='" + DateUtil.getyyyy_MM_dd_hms(birth) + "' where ck_no='" + ckNo + "' and ck_prefix='" + ckPrefix + "'");
  67 + System.out.println("update count "+count);
59 68  
60   - for (int i = 0; i < list.size(); i += batchSize) {
61   - end = (end + batchSize);
62   - if (end > list.size()) {
63   - end = list.size();
64 69 }
65   - System.out.println("start:" + i + ",end:" + end);
66   - final List<Map<String, Object>> tempList = list.subList(i, end);
67   - commonThreadPool.execute(new Runnable() {
68   - @Override
69   - public void run() {
70   - if (CollectionUtils.isNotEmpty(tempList))
71   - {
72   - for(Map<String, Object> data : tempList)
73   - {
74   - String ckNo = getString(data.get("ck_no"));
75   - String ckPrefix = getString(data.get("ck_prefix"));
76   -
77   - String sql = "SELECT M.CK_NO,M.CK_PREGDAY,M.CK_BABBYBIRTHDAY,M.CK_PREFIX FROM MOMMY_BIRTHNOCHECK M WHERE M.CK_NO='"+ckNo+"' AND M.CK_PREFIX='"+ckPrefix+"'";
78   -
79   - List<Map<String, Object>> list1 = JDBCUtil.getOracleListDataBySql(sql);
80   - if (CollectionUtils.isNotEmpty(list1))
81   - {
82   - Map<String, Object> obj = list1.get(0);
83   - Date birth = HsDataUtil.getDate(obj.get("CK_BABBYBIRTHDAY"));
84   - String day = HsDataUtil.getString(obj.get("CK_PREGDAY"));
85   - System.out.println(DateUtil.getyyyy_MM_dd_hms(birth));
86   - int count = JDBCUtil.mysqlUpdate(" update cert_birthnocheck set ck_pregday=" + day + ",ck_babbybirthday='" + DateUtil.getyyyy_MM_dd_hms(birth) + "' where ck_no='" + ckNo + "' and ck_prefix='" + ckPrefix + "'");
87   - System.out.println("update count "+count);
88   -
89   - }
90   - }
91   - }
92   - countDownLatch.countDown();
93   - }
94   - });
95 70 }
96 71 page++;
97   - try {
98   - countDownLatch.await();
99   - Thread.sleep(5000);
100   - } catch (InterruptedException e) {
101   - }
102 72 }while (true);
103 73 }
104 74  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ a553a64
... ... @@ -1959,11 +1959,15 @@
1959 1959  
1960 1960 if (matdeliverFollowRequest.getVisitStatus() != null && matdeliverFollowRequest.getVisitStatus() == 2)
1961 1961 {
  1962 + matDeliverQuery.setVisitStatus(matdeliverFollowRequest.getVisitStatus());
1962 1963 matDeliverQuery.setFsHospitalId(hospitalId);
1963 1964 }
1964   - else if(matdeliverFollowRequest.getVisitStatus() != null && matdeliverFollowRequest.getVisitStatus() == 1)
1965   - {
  1965 + else if(matdeliverFollowRequest.getVisitStatus() != null && matdeliverFollowRequest.getVisitStatus() == 1) {
1966 1966 matDeliverQuery.setVisitStatus(matdeliverFollowRequest.getVisitStatus());
  1967 + }
  1968 + else if (matdeliverFollowRequest.getVisitStatus() != null && matdeliverFollowRequest.getVisitStatus() == 3)
  1969 + {
  1970 + matDeliverQuery.setVisitStatus(2);
1967 1971 }
1968 1972 }
1969 1973 else