|  | @ -2,17 +2,19 @@ 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.JobArrangeManager;
 | 
	
		
			
				|  |  | 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 net.sf.json.JSONObject;
 | 
	
		
			
				|  |  | 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 javax.annotation.Resource;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | /**
 | 
	
		
			
				|  |  |  * 目前版本只需要采集,上传和注册病人档案就可了。
 | 
	
	
		
			
				|  | @ -24,6 +26,9 @@ import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  | @Api(protocols = "http", value = "CrawlerController", description = "档案采集接口", tags = {"采集"})
 | 
	
		
			
				|  |  | public class CrawlerController {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Resource
 | 
	
		
			
				|  |  |     JobArrangeManager jobArrangeManager;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @RequestMapping(value = "patient", method = RequestMethod.POST)
 | 
	
		
			
				|  |  |     @ApiOperation(value = "采集病人健康档案", produces = "application/json", notes = "采集病人健康档案")
 | 
	
		
			
				|  |  |     public Result crawler(
 | 
	
	
		
			
				|  | @ -42,4 +47,21 @@ public class CrawlerController {
 | 
	
		
			
				|  |  |             return Result.error("参数转换病人实体失败");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      *保存任务编排数据
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @RequestMapping(value = "job", method = RequestMethod.POST)
 | 
	
		
			
				|  |  |     @ApiOperation(value = "保存任务编排", produces = "application/json", notes = "保存任务编排")
 | 
	
		
			
				|  |  |     public Result saveJobData(
 | 
	
		
			
				|  |  |             @ApiParam(name = "job", value = "任务编排信息", required = true)
 | 
	
		
			
				|  |  |             @RequestParam(value = "job", required = true) String jobInfo) {
 | 
	
		
			
				|  |  |         try {
 | 
	
		
			
				|  |  |             jobArrangeManager.saveJobData(jobInfo);
 | 
	
		
			
				|  |  |         } catch (Exception e) {
 | 
	
		
			
				|  |  |             e.printStackTrace();
 | 
	
		
			
				|  |  |             return Result.error("保存失败");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         return Result.success("保存成功");
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | }
 |