zdm vor 6 Jahren
Ursprung
Commit
3fd688e2ca

+ 8 - 0
src/main/java/com/yihu/ehr/resource/client/RsResourceStatisticsClient.java

@ -58,4 +58,12 @@ public interface RsResourceStatisticsClient {
    @RequestMapping(value = ServiceApi.TJ.GetArchiveManCount, method = RequestMethod.GET)
    @ApiOperation(value = "健康档案的建档人数数量")
    Envelop getArchiveManCount();
    @ApiOperation("根据条件到solr中获取记录数")
    @RequestMapping(value = "/report/searchSolrByParam", method = RequestMethod.POST)
    Envelop searchSolrByParam(
            @RequestParam(value = "core") String core,
            @RequestParam(value = "eventType") String eventType,
            @RequestParam(value = "time", required = false) String time,
            @RequestParam(value = "month", defaultValue = "0", required = false) Integer month);
}

+ 14 - 0
src/main/java/com/yihu/ehr/resource/controller/RsResourceStatisticsController.java

@ -118,4 +118,18 @@ public class RsResourceStatisticsController extends ExtendController {
        Envelop envelop = rsResourceStatisticsClient.getArchiveManCount();
        return envelop;
    }
    @ApiOperation("根据条件到solr中获取记录数")
    @RequestMapping(value = "/report/searchSolrByParam", method = RequestMethod.POST)
    public Envelop searchSolrByParam(
            @ApiParam(name = "core", value = "solr core名称")
            @RequestParam(value = "core") String core,
            @ApiParam(name = "eventType", value = "solr的查询条件")
            @RequestParam(value = "eventType") String eventType,
            @ApiParam(name = "time", value = "过滤时间")
            @RequestParam(value = "time", required = false) String time,
            @ApiParam(name = "month", value = "获取几个月数据", defaultValue = "0")
            @RequestParam(value = "month", defaultValue = "0", required = false) Integer month) {
        return rsResourceStatisticsClient.searchSolrByParam(core, eventType, time, month);
    }
}