Browse Source

Merge branch 'dev' of chenweida/patient-co-management into dev

chenweida 7 years ago
parent
commit
d3bf085eb7

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

@ -11,6 +11,8 @@ import io.searchbox.core.*;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
@ -41,10 +43,13 @@ public class ExtractDataService {
    @Autowired
    private JdbcTemplate jdbcTemplate;
    private Logger logger= LoggerFactory.getLogger(ExtractDataService.class);
    public void extractOneDate(String date) {
        String sql = "select * from wlyy_quota_result w where w.level1_type=1  and w.quato_code !=18 and w.quato_code !=19 and quota_date='" + date + "' ";
        List<WlyyQuotaResult> quotaResults = jdbcTemplate.query(sql, new BeanPropertyRowMapper(WlyyQuotaResult.class));
        save2es(quotaResults, date, null);
        logger.info("date:"+date+" all quota      success");
    }
@ -52,6 +57,7 @@ public class ExtractDataService {
        String sql = "select * from wlyy_quota_result w where w.level1_type=1  and w.quato_code !=18 and w.quato_code !=19 and quota_date='" + date + "' and quato_code='" + quotaId + "'";
        List<WlyyQuotaResult> quotaResults = jdbcTemplate.query(sql, new BeanPropertyRowMapper(WlyyQuotaResult.class));
        save2es(quotaResults, date, quotaId);
        logger.info("date:"+date+",quotaId:"+quotaId+"      success");
    }
    public void extractDate2Date(String start, String end) throws Exception {

+ 1 - 1
patient-co/patient-co-statistics-es/src/main/resources/application-prod.yml

@ -16,7 +16,7 @@ spring:
      password: im!)123
  redis:
    host: 192.168.120.14 # Redis server host.
    host: 27.155.101.77 # Redis server host.
    port: 6380 # Redis server port.
    password: jkzl_ehr