package org.jeecg.modules.fbsAbnormalWorkingHours.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.jeecg.modules.fbsAbnormalWorkingHours.entity.FbsAbnormalWorkingHours;
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-13
 * @version： V1.0
 */
public interface IFbsAbnormalWorkingHoursService extends IService<FbsAbnormalWorkingHours> {
    /**
    * @Author chenchuang
    * @Description //TODO 保存主表以及异常工时描述子表和异常类别子表
    * @Date 2020/10/14 14:51
    * @Param [fbsAbnormalWorkingHours]
    * @return boolean
    */
    boolean addAndChild(FbsAbnormalWorkingHours fbsAbnormalWorkingHours);

    /**
    * @Author chenchuang
    * @Description //TODO 修改
    * @Date 2020/10/14 15:15
    * @Param [fbsAbnormalWorkingHours]
    * @return boolean
    */
    boolean updateAndChild(FbsAbnormalWorkingHours fbsAbnormalWorkingHours);


    /**
    * @Author chenchuang
    * @Description //TODO 查询异常工时报表
    * @Date 2020/10/17 15:29
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsAbnormalWorkingHours.entity.FbsAbnormalWorkingHours>
    */
    FbsAbnormalWorkingHours getAbnormalWorkingHoursReport();

    /**
    * @Author chenchuang
    * @Description //TODO 根据时间查询派工单产品
    * @Date 2020/10/20 11:00
    * @Param [date]
    * @return java.util.List<org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList>
    */
    List<FbsWorkshopDispatchList> getDispatchListByDate(String date);

    /**
    * @Author chenchuang
    * @Description //TODO 月制成质量异常
    * @Date 2020/10/21 15:22
    * @Param []
    * @return java.util.Map<java.lang.String,java.lang.Object>
    */
    Map<String,Object> getQualityType();

    /**
    * @Author chenchuang
    * @Description //TODO 查询当月中的产品的异常数量
    * @Date 2020/10/21 17:47
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsAbnormalWorkingHours.entity.FbsAbnormalWorkingHours>
    */
    List<FbsAbnormalWorkingHours> getRejectsNumber(String dateString);

    /**
    * @Author chenchuang
    * @Description //TODO 查询当日中的产品的异常数量
    * @Date 2020/10/27 11:03
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsAbnormalWorkingHours.entity.FbsAbnormalWorkingHours>
    */
    List<FbsAbnormalWorkingHours> getRejectsNumberSameDay();

    /**
    * @Author chenchuang
    * @Description //TODO 制造看板：人员出勤率
    * @Date 2020/11/11 13:17
    * @Param []
    * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
    */
    List<Map<String,Object>> getMonthAttendance();

    /**
    * @Author chenchuang
    * @Description //TODO 报表工时的总工时统计
    * @Date 2021/1/26 15:52
    * @Param [yearMonth]
    * @return org.jeecg.modules.fbsAbnormalWorkingHours.entity.FbsAbnormalWorkingHours
    */
    FbsAbnormalWorkingHours getTotal(String yearMonth);

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

}
