package org.jeecg.modules.appInterface.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.jeecg.modules.appInterface.entity.FbsWorkingStatistics;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList;

import java.util.List;
import java.util.Map;

/**
 * @Description: 工时统计接口
 * @author： jeecg-boot
 * @date：   2020-10-15
 * @version： V1.0
 */
public interface IFbsWorkingStatisticsService extends IService<FbsWorkingStatistics> {
    /**
    * @Author chenchuang
    * @Description //TODO 制造看板： 月工时分布情况
    * @Date 2020/10/28 13:09
    * @Param []
    * @return java.util.List<org.jeecg.modules.appInterface.entity.FbsWorkingStatistics>
    */
    Map<String,Object> getByMaterial(String dateString);

    /**
    * @Author chenchuang
    * @Description //TODO 根据订单号和产品编码分组查询工时
    * @Date 2020/11/7 12:51
    * @Param []
    * @return java.util.List<org.jeecg.modules.appInterface.entity.FbsWorkingStatistics>
    */
    List<FbsWorkingStatistics> getWorkingHours();

    List<FbsWorkshopDispatchList> getWorkingHoursGroupProjectName();

    /**
    * @Author chenchuang
    * @Description //TODO 修改扫码上下岗时间
    * @Date 2021/1/20 11:37
    * @Param []
    * @return void
    */
    void updateTime(FbsWorkingStatistics fbsWorkingStatistics);

    void startOperation(FbsWorkingStatistics fbsWorkingStatistics,FbsWorkshopDispatchList fbsWorkshopDispatchList);

    /**
    * @Author chenchuang
    * @Description //TODO 取消报工
    * @Date 2022/2/9 15:43
    * @Param [fbsWorkingStatistics]
    * @return java.lang.Boolean
    */
    Boolean cancelWorkReport(FbsWorkingStatistics fbsWorkingStatistics);


    /**
    * @Author chenchuang
    * @Description //TODO
    * @Date 2022/2/11 16:34
    * @Param [list, reportId]
    * @return
    */
    void updateIsCancelAndReportIdByIds(List<String> list,String reportId);

    IPage<FbsWorkingStatistics> findByPage(IPage<FbsWorkingStatistics> page, QueryWrapper<FbsWorkingStatistics> queryWrapper);

    IPage<FbsWorkingStatistics> getEfficiencyReport(IPage<FbsWorkingStatistics> page, QueryWrapper<FbsWorkingStatistics> queryWrapper);

}
