package cn.iocoder.yudao.module.system.controller.admin.biz;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.system.controller.admin.biz.vo.CateringChangeDetailRespVO;
import cn.iocoder.yudao.module.system.controller.admin.biz.vo.NurseChangeDetailRespVO;
import cn.iocoder.yudao.module.system.controller.admin.biz.vo.NurseChangeyEvaluationRespVO;
import cn.iocoder.yudao.module.system.service.biz.ElderlyChangeRecordService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

/**
 * @Author: jinyd
 * @CreateTime: 2024/8/28  9:30
 * @Description:
 * @Version: 4.0
 */

@Tag(name = "管理后台 - 餐饮变更记录")
@RestController
@RequestMapping("/elderly/cateringChangeRecord")
@Validated
public class CateringChangeRecordController {

    @Resource
    private ElderlyChangeRecordService changeRecordService;
    @GetMapping("/getCateringDetail")
    @Operation(summary = "获得餐饮变更记录详情")
    @Parameter(name = "id", description = "编号", required = true, example = "1024")
    @PreAuthorize("@ss.hasPermission('changes:food:detail')")
    @TenantIgnore
    public CommonResult<CateringChangeDetailRespVO> getCateringDetail(@RequestParam("id") Long id,@RequestParam("isDetail")Boolean isDetail) {
        CateringChangeDetailRespVO bedChangeRecord = changeRecordService.getCateringDetail(id,isDetail);
        return success(bedChangeRecord);
    }

}
