package org.jeecg.modules.fbsWorkshopDispatchList.service;

import org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail;
import org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList;
import com.baomidou.mybatisplus.extension.service.IService;

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

/**
 * @Description: 车间派工单
 * @author： jeecg-boot
 * @date：   2020-10-13
 * @version： V1.0
 */
public interface IFbsWorkshopDispatchListService extends IService<FbsWorkshopDispatchList> {
    int updateState(String state,String id);
    /**
     * 查询正在执行的派工单
     * @return
     */
    List<FbsWorkshopDispatchList> selNowDispatchList();
    /**
    * @Author chenchuang
    * @Description //TODO 根据生产订单查询基本数据以及总的任务数量 总的标准工时
    * @Date 2020/10/17 11:38
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList>
    */
    List<FbsWorkshopDispatchList> getSumDispatch(List<FbsMomOrderdetail> fbsMomOrderdetailList);

    public List<FbsWorkshopDispatchList> export(List<FbsMomOrderdetail> fbsMomOrderdetailList,String month);

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

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

    /**
    * @Author chenchuang
    * @Description //TODO 月度人员出勤率
    * @Date 2020/10/19 19:49
    * @Param []
    * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
    */
    List<Map<String,Object>> getAttendance();

    /**
    * @Author chenchuang
    * @Description //TODO 根据派工id回写完工数量
    * @Date 2020/10/20 17:54
    * @Param [manHoursCompleted, fbsWorkshopDispatchListId]
    * @return boolean
    */
    boolean writeBackManHoursCompleted(String manHoursCompleted,String latestCompletedQuantity,String fbsWorkshopDispatchListId);

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

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

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

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

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

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

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

    /**
    * @Author chenchuang
    * @Description //TODO 批量新增
    * @Date 2020/11/3 11:12
    * @Param [fbsWorkshopDispatchList]
    * @return void
    */
    void workSaveBatch(FbsWorkshopDispatchList fbsWorkshopDispatchList);

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