package org.jeecg.modules.fbsWorkshopDispatchList.mapper;

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

import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 车间派工单
 * @author： jeecg-boot
 * @date：   2020-10-13
 * @version： V1.0
 */
public interface FbsWorkshopDispatchListMapper extends BaseMapper<FbsWorkshopDispatchList> {

    int updateState(@Param("state")String state,@Param("id") String id);
    /**
     * 查询正在执行的派工单
     * @return
     */
    List<FbsWorkshopDispatchList> selNowDispatchList();
    /**
    * @Author chenchuang
    * @Description //TODO 根据生产订单查询基本数据以及总的任务数量 总的标准工时
    * @Date 2020/10/17 11:34
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList>
    */
    List<FbsWorkshopDispatchList> getSumDispatch();

    /**
    * @Author chenchuang
    * @Description //TODO 查询当月工时产品分布率
    * @Date 2020/10/19 14:01
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList>
    */
    List<FbsWorkshopDispatchList> getProductHoursMonthReport(@Param("dateString")String dateString);

    /**
    * @Author chenchuang
    * @Description //TODO 查询单月按异常分类的工时
    * @Date 2020/10/19 16:32
    * @Param []
    * @return java.util.Map<java.lang.String,java.lang.Object>
    */
    Map<String,Object> getAbnormalHoursMonthReport(@Param("dateString")String dateString);

    /**
    * @Author chenchuang
    * @Description //TODO 产线看板：当日质量异常分类
    * @Date 2020/10/27 11:33
    * @Param []
    * @return java.util.Map<java.lang.String,java.lang.Object>
    */
    Map<String,Object> getAbnormalHoursMonthReportSameDay();

    /**
    * @Author chenchuang
    * @Description //TODO 人员出勤率
    * @Date 2020/10/19 17:54
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList>
    */
    List<Map<String,Object>> getAttendance();

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

    List<FbsWorkshopDispatchList> getDispatchClose(@Param("startDate")String startDate,@Param("endDate")String endDate );

    /**
    * @Author chenchuang
    * @Description //TODO 根据年月获取派工数据
    * @Date 2020/12/3 22:27
    * @Param [month]
    * @return java.util.List<org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList>
    */
    List<FbsWorkshopDispatchList> getSumDispatchNumber(@Param("month")String month);

    /**
    * @Author chenchuang
    * @Description //TODO  标准工时与实际工时对比
    * @Date 2020/10/21 23:01
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList>
    */
    List<FbsWorkshopDispatchList> getWorkingHoursContrast();

    /**
    * @Author chenchuang
    * @Description //TODO 生产效率
    * @Date 2020/10/22 14:01
    * @Param []
    * @return java.lang.String
    */
    String getProductionEfficiency(@Param("dateString") String dateString);

    /**
    * @Author chenchuang
    * @Description //TODO 产线看板： 当日达成率
    * @Date 2020/10/22 15:27
    * @Param []
    * @return java.util.Map<java.lang.String,java.lang.Object>
    */
    Map<String,Object> getAchievementRate();


    /**
    * @Author chenchuang
    * @Description //TODO 产线看板：当日考勤
    * @Date 2020/10/26 14:38
    * @Param []
    * @return java.util.Map<java.lang.String,java.lang.Object>
    */
    Map<String,Object> getAttendanceOfTheDay();

    /**
     * @Author chenchuang
     * @Description //TODO 查询最近的派工单以及完工信息
     * @Date 2020/10/26 16:20
     * @Param []
     * @return java.util.List<org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList>
     */
    List<FbsWorkshopDispatchList> getProductList();

    /**
    * @Author chenchuang
    * @Description //TODO 制造看板： 项目进度完工百分比
    * @Date 2020/10/31 16:01
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList>
    */
    List<FbsWorkshopDispatchList> getProjectScheduleCompletion();

    /**
    * @Author chenchuang
    * @Description //TODO 产线看板：生产计划
    * @Date 2020/11/6 16:59
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList>
    */
    List<FbsWorkshopDispatchList> getListWhereStartEnd();
}
