|
@ -7,11 +7,13 @@ import com.yihu.ehr.framework.model.ActionResult;
|
|
|
import com.yihu.ehr.framework.model.DetailModelResult;
|
|
|
import com.yihu.ehr.framework.model.Result;
|
|
|
import com.yihu.ehr.framework.util.operator.StringUtil;
|
|
|
import com.yihu.ehr.standard.service.adapter.AdapterSchemeService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import org.springframework.ui.Model;
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
@ -20,14 +22,51 @@ import javax.annotation.Resource;
|
|
|
* <p>
|
|
|
* Created by Airhead on 2015/12/16.
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/crawler")
|
|
|
@Controller("crawlerController")
|
|
|
@Api(protocols = "http", value = "CrawlerController", description = "档案采集接口", tags = {"采集"})
|
|
|
public class CrawlerController {
|
|
|
|
|
|
@Resource
|
|
|
CrawlerService crawlerService;
|
|
|
|
|
|
@Resource(name = AdapterSchemeService.BEAN_ID)
|
|
|
private AdapterSchemeService adapterSchemeService;
|
|
|
|
|
|
/*
|
|
|
任务编排
|
|
|
*/
|
|
|
@RequestMapping("jobLayout")
|
|
|
public String jobLayout(Model model) {
|
|
|
model.addAttribute("contentPage", "/crawler/jobLayout");
|
|
|
return "partView";
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
任务编排数据映射
|
|
|
*/
|
|
|
@RequestMapping("jobDataMapping")
|
|
|
public String jobDataMapping(Model model, String jobId) {
|
|
|
try {
|
|
|
|
|
|
model.addAttribute("contentPage", "/crawler/dataMapping");
|
|
|
return "pageView";
|
|
|
} catch (Exception ex) {
|
|
|
model.addAttribute("contentPage", "/crawler/dataMapping");
|
|
|
return "pageView";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping("datasetDetail")
|
|
|
public String datasetDetail(Model model,Integer schemeId,String schemeNm,String version,String checkedRowsIndex) {
|
|
|
model.addAttribute("contentPage", "/crawler/datasetDetail");
|
|
|
model.addAttribute("schemeId",schemeId);
|
|
|
model.addAttribute("version",version);
|
|
|
model.addAttribute("schemeNm",schemeNm);
|
|
|
model.addAttribute("checkedRowsIndex",checkedRowsIndex);
|
|
|
return "pageView";
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "patient", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "采集病人健康档案", produces = "application/json", notes = "采集病人健康档案")
|
|
|
public Result crawler(
|
|
@ -52,6 +91,7 @@ public class CrawlerController {
|
|
|
*/
|
|
|
@RequestMapping(value = "saveDateSet", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "保存任务编排", produces = "application/json", notes = "保存任务编排")
|
|
|
@ResponseBody
|
|
|
public Result saveJobData(
|
|
|
@ApiParam(name = "job", value = "任务编排信息", required = true)
|
|
|
@RequestParam(value = "job") String jobInfo) {
|
|
@ -127,6 +167,7 @@ public class CrawlerController {
|
|
|
*/
|
|
|
@RequestMapping(value = "deleteDateSet", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "删除任务编排", produces = "application/json", notes = "删除任务编排")
|
|
|
@ResponseBody
|
|
|
public Result deleteJobData(
|
|
|
@ApiParam(name = "version", value = "版本号", required = true)
|
|
|
@RequestParam(value = "version") String version){
|
|
@ -147,6 +188,7 @@ public class CrawlerController {
|
|
|
*/
|
|
|
@RequestMapping(value = "list",method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "分页显示任务编排", produces = "application/json", notes = "分页显示任务编排")
|
|
|
@ResponseBody
|
|
|
public DetailModelResult listJobData(
|
|
|
@ApiParam(name = "rows", value = "Limit the size of result set. Must be an integer")
|
|
|
@RequestParam(value = "rows", required = false) Integer rows,
|
|
@ -156,4 +198,12 @@ public class CrawlerController {
|
|
|
return crawlerService.getDataSetResult(rows, page);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "getSchemeList",method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "获取适配方案-方案版本下拉框", produces = "application/json", notes = "获取适配方案-方案版本下拉框")
|
|
|
@ResponseBody
|
|
|
public DetailModelResult getSchemeList(){
|
|
|
DetailModelResult result=adapterSchemeService.getAdapterSchemeResultModelList();
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
}
|