package com.fjhx.mes.controller.production;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.mes.entity.production.bo.WorkshopReportBo;
import com.fjhx.mes.entity.production.dto.ProductionTaskProgressSelectDto;
import com.fjhx.mes.entity.production.vo.ProductionTaskProgressVo;
import com.fjhx.mes.service.production.ProductionTaskProgressService;
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;


/**
 * <p>
 * 生产任务进度 前端控制器
 * </p>
 *
 * @author
 * @since 2024-01-15
 */
@RestController
@RequestMapping("/productionTaskProgress")
public class ProductionTaskProgressController {

    @Autowired
    private ProductionTaskProgressService productionTaskProgressService;

    /**
     * 库存查询
     */
    @PostMapping("/workshopReportStatistics")
    public List<ProductionTaskProgressVo> workshopReportStatistics(@RequestBody ProductionTaskProgressSelectDto dto) {
        return productionTaskProgressService.workshopReportStatistics(dto);
    }

    /**
     * 库存查询
     */
    @PostMapping("/workshopReport")
    public Page<WorkshopReportBo> workshopReport(@RequestBody ProductionTaskProgressSelectDto dto) {
        return productionTaskProgressService.workshopReport(dto);
    }


}
