|
@ -3,15 +3,15 @@ package com.yihu.ehr.crawler.controller;
|
|
|
import com.yihu.ehr.crawler.model.patient.Patient;
|
|
|
import com.yihu.ehr.crawler.service.CrawlerManager;
|
|
|
import com.yihu.ehr.crawler.service.CrawlerService;
|
|
|
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.Result;
|
|
|
import com.yihu.ehr.framework.util.operator.StringUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
@ -51,7 +51,7 @@ public class CrawlerController {
|
|
|
/**
|
|
|
*保存任务编排数据
|
|
|
*/
|
|
|
@RequestMapping(value = "job", method = RequestMethod.POST)
|
|
|
@RequestMapping(value = "saveDateSet", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "保存任务编排", produces = "application/json", notes = "保存任务编排")
|
|
|
public Result saveJobData(
|
|
|
@ApiParam(name = "job", value = "任务编排信息", required = true)
|
|
@ -114,15 +114,13 @@ public class CrawlerController {
|
|
|
/**
|
|
|
* 删除任务编排数据
|
|
|
*/
|
|
|
@RequestMapping(value = "delete", method = RequestMethod.POST)
|
|
|
@RequestMapping(value = "deleteDateSet", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "删除任务编排", produces = "application/json", notes = "删除任务编排")
|
|
|
public Result deleteJobData(
|
|
|
@ApiParam(name = "version", value = "版本号", required = true)
|
|
|
@RequestParam(value = "version") Integer version,
|
|
|
@ApiParam(name = "schemeId",value = "适配方案名", required = true)
|
|
|
@RequestParam(value = "schemeId") Integer schemeId) {
|
|
|
if (version != null && schemeId !=null) {
|
|
|
String message =jobArrangeManager.deleteJobData(version, schemeId);
|
|
|
@RequestParam(value = "version") String version){
|
|
|
if (version != null) {
|
|
|
String message =crawlerService.deleteJobData(version);
|
|
|
if (StringUtil.isEmpty(message)){
|
|
|
return Result.success("删除成功");
|
|
|
} else {
|
|
@ -133,5 +131,17 @@ public class CrawlerController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 分页显示任务编排数据
|
|
|
*/
|
|
|
@RequestMapping(value = "list",method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "分页显示任务编排", produces = "application/json", notes = "分页显示任务编排")
|
|
|
public DataGridResult listJobData(
|
|
|
@ApiParam(name = "rows", value = "Limit the size of result set. Must be an integer")
|
|
|
@RequestParam(value = "rows", required = false) Integer rows,
|
|
|
@ApiParam(name = "page", value = "Start position of result set. Must be an integer")
|
|
|
@RequestParam(value = "page", required = false) Integer page) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
}
|