采集feign接口提供与控制层实现,后面可分模块
parent
198a9a0a82
commit
b5010290ff
@ -0,0 +1,26 @@
|
|||||||
|
package com.docus.server.collect.controller;
|
||||||
|
|
||||||
|
import com.docus.infrastructure.web.api.CommonResult;
|
||||||
|
import com.docus.server.collect.collector.LisSystemCollector;
|
||||||
|
import com.docus.server.collect.feign.api.GdSzyCollectServiceApi;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author WYBDEV
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping
|
||||||
|
public class CollectController implements GdSzyCollectServiceApi {
|
||||||
|
@Autowired
|
||||||
|
private LisSystemCollector lisSystemCollector;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommonResult<String> lisSystemCollect() {
|
||||||
|
lisSystemCollector.collect(null, null, null);
|
||||||
|
return CommonResult.success("采集完成!");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.docus.server.collect.controller.test;
|
||||||
|
|
||||||
|
import com.docus.infrastructure.web.api.CommonResult;
|
||||||
|
import com.docus.server.collect.collector.LisSystemCollector;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author WYBDEV
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "采集测试")
|
||||||
|
@RequestMapping("/collect/test/gdszy")
|
||||||
|
public class TestCollectController {
|
||||||
|
@Autowired
|
||||||
|
private LisSystemCollector lisSystemCollector;
|
||||||
|
|
||||||
|
@ApiOperation("采集测试 LIS 采集接口")
|
||||||
|
@GetMapping("/lis")
|
||||||
|
public CommonResult<String> lisSystemCollect() {
|
||||||
|
return CommonResult.success(lisSystemCollector.collectData(null, null, null));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.docus.server.collect.feign.api;
|
||||||
|
|
||||||
|
import com.docus.infrastructure.web.api.CommonResult;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广东省中医采集api接口
|
||||||
|
*
|
||||||
|
* @author WYBDEV
|
||||||
|
*/
|
||||||
|
@Api(tags = "采集控制层")
|
||||||
|
@FeignClient(value = "docus-webservice-gdszy", contextId = "collect-gdszy")
|
||||||
|
public interface GdSzyCollectServiceApi {
|
||||||
|
|
||||||
|
String PREFIX = "/collect/gdszy";
|
||||||
|
|
||||||
|
@ApiOperation("LIS 检验报告采集")
|
||||||
|
@GetMapping(PREFIX + "/lis")
|
||||||
|
CommonResult<String> lisSystemCollect();
|
||||||
|
}
|
Loading…
Reference in New Issue