|
@ -4,7 +4,6 @@ import com.yihu.ehr.crawler.model.patient.Patient;
|
|
import com.yihu.ehr.crawler.service.CrawlerManager;
|
|
import com.yihu.ehr.crawler.service.CrawlerManager;
|
|
import com.yihu.ehr.crawler.service.CrawlerService;
|
|
import com.yihu.ehr.crawler.service.CrawlerService;
|
|
import com.yihu.ehr.framework.model.ActionResult;
|
|
import com.yihu.ehr.framework.model.ActionResult;
|
|
import com.yihu.ehr.framework.model.DataGridResult;
|
|
|
|
import com.yihu.ehr.framework.model.DetailModelResult;
|
|
import com.yihu.ehr.framework.model.DetailModelResult;
|
|
import com.yihu.ehr.framework.model.Result;
|
|
import com.yihu.ehr.framework.model.Result;
|
|
import com.yihu.ehr.framework.util.operator.StringUtil;
|
|
import com.yihu.ehr.framework.util.operator.StringUtil;
|
|
@ -33,7 +32,7 @@ public class CrawlerController {
|
|
@ApiOperation(value = "采集病人健康档案", produces = "application/json", notes = "采集病人健康档案")
|
|
@ApiOperation(value = "采集病人健康档案", produces = "application/json", notes = "采集病人健康档案")
|
|
public Result crawler(
|
|
public Result crawler(
|
|
@ApiParam(name = "patient", value = "病人索引信息", required = true)
|
|
@ApiParam(name = "patient", value = "病人索引信息", required = true)
|
|
@RequestParam(value = "patient", required = true) String patientInfo) {
|
|
|
|
|
|
@RequestParam(value = "patient") String patientInfo) {
|
|
|
|
|
|
Patient patient = CrawlerManager.getInstance().parsePatient(patientInfo);
|
|
Patient patient = CrawlerManager.getInstance().parsePatient(patientInfo);
|
|
if (patient != null) {
|
|
if (patient != null) {
|
|
@ -55,7 +54,7 @@ public class CrawlerController {
|
|
@ApiOperation(value = "保存任务编排", produces = "application/json", notes = "保存任务编排")
|
|
@ApiOperation(value = "保存任务编排", produces = "application/json", notes = "保存任务编排")
|
|
public Result saveJobData(
|
|
public Result saveJobData(
|
|
@ApiParam(name = "job", value = "任务编排信息", required = true)
|
|
@ApiParam(name = "job", value = "任务编排信息", required = true)
|
|
@RequestParam(value = "job", required = true) String jobInfo) {
|
|
|
|
|
|
@RequestParam(value = "job") String jobInfo) {
|
|
try {
|
|
try {
|
|
crawlerService.saveJobData(jobInfo);
|
|
crawlerService.saveJobData(jobInfo);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@ -136,12 +135,13 @@ public class CrawlerController {
|
|
*/
|
|
*/
|
|
@RequestMapping(value = "list",method = RequestMethod.POST)
|
|
@RequestMapping(value = "list",method = RequestMethod.POST)
|
|
@ApiOperation(value = "分页显示任务编排", produces = "application/json", notes = "分页显示任务编排")
|
|
@ApiOperation(value = "分页显示任务编排", produces = "application/json", notes = "分页显示任务编排")
|
|
public DataGridResult listJobData(
|
|
|
|
|
|
public DetailModelResult listJobData(
|
|
@ApiParam(name = "rows", value = "Limit the size of result set. Must be an integer")
|
|
@ApiParam(name = "rows", value = "Limit the size of result set. Must be an integer")
|
|
@RequestParam(value = "rows", required = false) Integer rows,
|
|
@RequestParam(value = "rows", required = false) Integer rows,
|
|
@ApiParam(name = "page", value = "Start position of result set. Must be an integer")
|
|
@ApiParam(name = "page", value = "Start position of result set. Must be an integer")
|
|
@RequestParam(value = "page", required = false) Integer page) {
|
|
|
|
return null;
|
|
|
|
|
|
@RequestParam(value = "page", required = false) Integer page) throws Exception {
|
|
|
|
|
|
|
|
return crawlerService.getDataSetResult(rows, page);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|