package com.docus.server.gdszy.controller;

import com.docus.core.util.Func;
import com.docus.infrastructure.web.api.CommonResult;
import com.docus.server.gdszy.service.GdSzyFileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author YongBin Wen
 * @date 2024/9/26 9:18
 */
@RestController
@RequestMapping("/gdszyy")
@Api(tags = "广东省中医文件接口")
public class GdSzyFileController {
    @Autowired
    private GdSzyFileService gdSzyFileService;

    @PostMapping("/yzyreport/merge")
    @ApiOperation("预住院报告合并，传预住院的患者主键")
    public CommonResult<String> yzyReportMerge(@RequestBody List<String> patientIds) {
        if(Func.isNotEmpty(patientIds)){
            gdSzyFileService.yzyReportMerge(patientIds);
        }
       return  CommonResult.success("合并完成！");
    }
}
