chenweida 7 anni fa
parent
commit
4826a1da18

+ 3 - 10
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java

@ -65,6 +65,8 @@ public class StatisticsESService {
    SimpleDateFormat dateFormat2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXX");
    SimpleDateFormat dateFormat3 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    DecimalFormat decimalFormat = new DecimalFormat("0.00");
    @Autowired
    private StringRedisTemplate redisTemplate;
    /**
     * 获取上次统计时间
@ -75,16 +77,7 @@ public class StatisticsESService {
        String date = DateUtil.dateToStrLong(new Date());
        try {
//            date = redisTemplate.opsForValue().get("quota:date");
//            JestClient jestClient = elasticFactory.getJestClient();
//
//            Bulk.Builder bulk = new Bulk.Builder().defaultIndex("health_edu_article_patient_test").defaultType("health_edu_article_patient_test");
//            PrescriptionDispensaryCode ap = new PrescriptionDispensaryCode();
//            ap.setCode("aaaa");
//            ap.setType(2);
//            Index index = new Index.Builder(ap).build();
//            bulk.addAction(index);
//            BulkResult br = jestClient.execute(bulk.build());
            date = redisTemplate.opsForValue().get("quota:date");
        } catch (Exception e) {
            e.printStackTrace();
        }