chenweida %!s(int64=7) %!d(string=hai) anos
pai
achega
32e981b86b

+ 3 - 0
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/etl/save/es/ElastricSearchSave.java

@ -55,9 +55,11 @@ public class ElastricSearchSave {
                }
            }
            BulkResult br = jestClient.execute(bulk.build());
            logger.info("save flag:" + br.isSucceeded());
            logger.info("save success:" + success);
            logger.info("save error:" + error);
            jestClient.shutdownClient();
            return br.isSucceeded();
        } catch (Exception e) {
            logger.error(" save error :" + e.getMessage());
@ -92,6 +94,7 @@ public class ElastricSearchSave {
            logger.info("update flag:" + br.isSucceeded());
            logger.info("update success:" + success);
            logger.info("update error:" + error);
            jestClient.shutdownClient();
            return isSuccessed;
        } catch (Exception e) {
            logger.error(" update error :" + e.getMessage());

+ 1 - 0
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/job/business/MysqlToEsQuotaJob.java

@ -206,6 +206,7 @@ public class MysqlToEsQuotaJob implements Job {
            logger.info("delete data count:" + saveModels.size());
            logger.info("delete flag:" + br.isSucceeded());
            jestClient.shutdownClient();
        } catch (Exception e) {
            e.printStackTrace();
        }

+ 1 - 0
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/service/JobService.java

@ -343,6 +343,7 @@ public class JobService {
        }
        int day = daysBetween(startDate, endDate);
        for (int i = 0; i < day; i++) {
            Cache.cleanCache();//清空缓存
            productDataByOneDayWithId(getYesterday(i, startDate), id);
        }
    }

+ 8 - 8
patient-co/patient-co-statistics/src/main/resources/application.yml

@ -170,14 +170,14 @@ spring:
       url: jdbc:mysql://59.61.92.90:9069/wlyy?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
       username: wlyy
       password: jkzlehr@123
     primaryRead:
       url: jdbc:mysql://59.61.92.90:8079/wlyy?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
       username: wlyy
       password: jkzlehr@123
     im: #im库:
       url: jdbc:mysql://59.61.92.90:8079/im?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
       username: im
       password: im!)123
    primaryRead:
      url: jdbc:mysql://59.61.92.90:8079/wlyy?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
      username: wlyy
      password: jkzlehr@123
    im: #im库:
      url: jdbc:mysql://59.61.92.90:8079/im?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
      username: im
      password: im!)123
  redis:
    host: 10.95.22.142 # Redis server host.

+ 1 - 0
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/config/es/ElastricSearchSave.java

@ -38,6 +38,7 @@ public class ElastricSearchSave {
			BulkResult br = jestClient.execute(bulk.build());
			logger.info("save data count:" + sms.size());
			logger.info("save flag:" + br.isSucceeded());
			jestClient.shutdownClient();
			return br.isSucceeded();
		} catch (Exception e) {
			e.printStackTrace();

+ 3 - 1
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/third/jw/JwPrescriptionService.java

@ -1161,7 +1161,8 @@ public class JwPrescriptionService {
        SearchResult result = jestClient.execute(search);
        
        List<FollowupContentESDO> followupContentESDOList = new ArrayList<>();
        
        jestClient.shutdownClient();
        return followupContentESDOList;
    }
    
@ -1185,6 +1186,7 @@ public class JwPrescriptionService {
        this.esDeleteFollowUpContent(dataList);
        //保存新的随访详情记录
        elastricSearchSave.save(newdatalist,esIndex,esType);
        jestClient.shutdownClient();
    }
    
    public HashMap<String,String> operaESFollowUpContentData(List<FollowupContentESDO> esdataList){

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/es/ElastricSearchSave.java

@ -40,6 +40,7 @@ public class ElastricSearchSave {
            BulkResult br = jestClient.execute(bulk.build());
            logger.info("save data count:" + sms.size());
            logger.info("save flag:" + br.isSucceeded());
            jestClient.shutdownClient();
            return br.isSucceeded();
        } catch (Exception e) {
            e.printStackTrace();

+ 8 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java

@ -948,6 +948,9 @@ public class FollowUpService extends BaseService {
            followupMapping.setNeedUpload(1);
            followUpMappingDao.save(followupMapping);
        }
        jestClient.shutdownClient();
    }
    /**
@ -969,6 +972,8 @@ public class FollowUpService extends BaseService {
                .build();
        SearchResult result = jestClient.execute(search);
        FollowupContentESDO followupContentESDO = result.getSourceAsObject(FollowupContentESDO.class);
        jestClient.shutdownClient();
        return followupContentESDO;
    }
@ -991,6 +996,7 @@ public class FollowUpService extends BaseService {
            logger.info("delete data count:" + datalist.size());
            logger.info("delete flag:" + br.isSucceeded());
            jestClient.shutdownClient();
        } catch (Exception e) {
            e.printStackTrace();
        }
@ -1029,6 +1035,7 @@ public class FollowUpService extends BaseService {
            }
        }
        jestClient.shutdownClient();
        return resultList;
    }
@ -1057,6 +1064,7 @@ public class FollowUpService extends BaseService {
        List<FollowupContentESDO> followupContentESDOList = new ArrayList<>();
        jestClient.shutdownClient();
        return followupContentESDOList;
    }

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/EsStatisticsController.java

@ -32,7 +32,7 @@ import java.util.TreeMap;
 * Created by chenweida on 2017/10/13.
 */
@Controller
@RequestMapping(value = "/esstatistics", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/statistics", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, method = {RequestMethod.GET, RequestMethod.POST})
@Api(description = "ES统计查询")
public class EsStatisticsController extends BaseController {

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/StatisticsController.java

@ -29,7 +29,7 @@ import java.util.*;
 * Created by lyr on 2016/08/16.
 */
@Controller
@RequestMapping(value = "/statistics", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,method = {RequestMethod.GET,RequestMethod.POST})
@RequestMapping(value = "/oldstatistics", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,method = {RequestMethod.GET,RequestMethod.POST})
@Api(description = "统计")
public class StatisticsController extends BaseController {

+ 0 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/service/GcEduArticleService.java

@ -1,6 +1,5 @@
package com.yihu.wlyy.web.third.gateway.service;
import com.yihu.es.entity.ArticleTest;
import com.yihu.wlyy.config.es.ElastricSearchSave;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.patient.Patient;