package com.docus.server.message.controller;
import com.docus.server.message.busservice.ZxjhBusinessService;
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.*;

/**
 * @author WYBDEV
 */
@Api("中西结合医院")
@RestController
@Slf4j
@RequestMapping("/hospital/zxjh")
public class ZxjhHospitalController {

    @Autowired
    private ZxjhBusinessService zxjhBusinessService;

    @GetMapping("/wsRecordDown/do")
    @ApiOperation("中西结合同步下载文件数据")
    public String wsRecordDown() {
        log.info("中西结合同步下载文件数据开始");
        zxjhBusinessService.wsRecordDown();
        log.info("中西结合同步下载文件数据结束");
        return "操作成功";
    }
    @GetMapping("/tScanAssortSave/do")
    @ApiOperation("中西结合同步下载文件数据单个")
    public String tScanAssortSave(@RequestParam(value = "pid",required = true) String pid) {
        log.info("中西结合同步下载文件数据开始");
        zxjhBusinessService.tScanAssortSave(pid);
        log.info("中西结合同步下载文件数据结束");
        return "操作成功";
    }
    @GetMapping("/down/do")
    @ApiOperation("中西结合同步下载测试")
    public String down(@RequestParam("source") String source,@RequestParam("down") String down) throws Exception {
        log.info("source"+source);
        zxjhBusinessService.downFile(source,down);
        return "操作成功";
    }
}
