|
@ -175,9 +175,9 @@ public class ServiceStatisticsService extends BaseService {
|
|
}*/
|
|
}*/
|
|
|
|
|
|
//数据转移至Es
|
|
//数据转移至Es
|
|
String sqlHistory="select count(*) AS h from " + esType + " where patients.code='" + patient + "' and adminTeamCode = '"+teamCode+"'";
|
|
|
|
String sqlYear = "select count(*) AS y from "+esType+" where patients.code='" + patient + "' and adminTeamCode = '"+teamCode+"' and czrq >= "+changeDate(yearBegin)+" and czrq <= "+changeDate(yearEnd);
|
|
|
|
String sqlMonth = "select count(*) AS m from "+esType+" where patients.code='" + patient + "' and adminTeamCode = '"+teamCode+"' and czrq >= "+changeDate(monthBegin);
|
|
|
|
|
|
String sqlHistory="select count(*) AS h from " + esType + " where patientCode='" + patient + "' and adminTeamCode = '"+teamCode+"'";
|
|
|
|
String sqlYear = "select count(*) AS y from "+esType+" where patientCode='" + patient + "' and adminTeamCode = '"+teamCode+"' and czrq >= "+changeDate(yearBegin)+" and czrq <= "+changeDate(yearEnd);
|
|
|
|
String sqlMonth = "select count(*) AS m from "+esType+" where patientCode='" + patient + "' and adminTeamCode = '"+teamCode+"' and czrq >= "+changeDate(monthBegin);
|
|
|
|
|
|
result.put("history", elasticsearchUtil.excuteForLong(sqlHistory,esType,esIndex));
|
|
result.put("history", elasticsearchUtil.excuteForLong(sqlHistory,esType,esIndex));
|
|
result.put("year", elasticsearchUtil.excuteForLong(sqlYear,esType,esIndex));
|
|
result.put("year", elasticsearchUtil.excuteForLong(sqlYear,esType,esIndex));
|