package thyyxxk.webserver.controller.executeItem;

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 thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.executeItem.ExecuteItemData;
import thyyxxk.webserver.entity.executeItem.ExecuteItemParam;
import thyyxxk.webserver.service.executeItem.ExecuteItemService;
import thyyxxk.webserver.utils.ResultVoUtil;

import java.util.List;

/**
 * @Description: 执行项目
 * @Author:lihong
 * @Date: 2023/11/21
 */
@RestController
@RequestMapping("/executeItem")
public class ExecuteItemController {
    @Autowired
    private ExecuteItemService service;

    @PostMapping("/queryExecuteItem")
    public ResultVo<List<ExecuteItemData>> queryExecuteItem(@RequestBody ExecuteItemParam param){
        return ResultVoUtil.success(service.queryExecuteItem(param));
    }

    @PostMapping("/queryExecuteItemDetail")
    public ResultVo<List<ExecuteItemData>> queryExecuteItemDetail(@RequestBody ExecuteItemParam param){
        return ResultVoUtil.success(service.queryExecuteItemDetail(param));
    }


    @PostMapping("/updateExecuteItemPrintFlag")
    public ResultVo<String> updateExecuteItemPrintFlag(@RequestBody List<ExecuteItemData> param){
        return service.updateExecuteItemPrintFlag(param);
    }



}
