package org.jeecg.modules.fbsMomOrder.mapper;

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

import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.fbsMomOrder.entity.FbsMomOrder;
import org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 生产订单子表
 * @author： jeecg-boot
 * @date：   2020-10-16
 * @version： V1.0
 */
public interface FbsMomOrderdetailMapper extends BaseMapper<FbsMomOrderdetail> {
    /**
    * @Author chenchuang
    * @Description //TODO 查询生产订单总数，入库总数
    * @Date 2020/10/21 12:00
    * @Param []
    * @return org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail
    */
    Map<String,Object> getFbsMomOrderdetailSum();


    /**
    * @Author chenchuang
    * @Description //TODO 查询U8物料中的完工数量
    * @Date 2020/10/21 17:40
    * @Param [cInvName]
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getQualifiedInQty();

    /**
    * @Author chenchuang
    * @Description //TODO 制造看板：周成品入库数量
    * @Date 2020/10/21 21:42
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getQualifiedInQtyWeek();

    /**
    * @Author chenchuang
    * @Description //TODO 制造看板：月生产计划
    * @Date 2020/10/28 17:04
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getMonthList();


    /**
    * @Author chenchuang
    * @Description //TODO 未关闭的数据
    * @Date 2020/11/25 11:54
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getMonthListStatre(@Param("fbsMomOrderdetail")FbsMomOrderdetail fbsMomOrderdetail);

    List<FbsMomOrderdetail>getMonthListStatreWork(@Param("fbsMomOrderdetail")FbsMomOrderdetail fbsMomOrderdetail);

    /**
    * @Author chenchuang
    * @Description //TODO 已关闭当月数据
    * @Date 2020/12/15 14:55
    * @Param [fbsMomOrderdetail]
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getMonthListStatreReviewed(@Param("fbsMomOrderdetail")FbsMomOrderdetail fbsMomOrderdetail);


    /**
    * @Author chenchuang
    * @Description //TODO 根据月份查询
    * @Date 2020/12/3 22:45
    * @Param [month]
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getMonthListNotStatre(@Param("month")String month);

    /**
    * @Author chenchuang
    * @Description //TODO 制造看板：项目完工进度
    * @Date 2020/11/11 11:25
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getMonthListGroupDefine12();

    /**
    * @Author chenchuang
    * @Description //TODO 产线看板：日生产计划
    * @Date 2020/10/28 17:19
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getDayList();

    /**
    * @Author chenchuang
    * @Description //TODO 查询库存数量
    * @Date 2020/10/28 21:16
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getListByOrderSheetCurrentStock();

    /**
    * @Author chenchuang
    * @Description //TODO 查询订单子件数量
    * @Date 2020/10/28 21:17
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getListByOrderSheetMomMoallocate();

    /**
    * @Author chenchuang
    * @Description //TODO  仓库看板：领料申请通知
    * @Date 2020/10/28 22:14
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getApplyList();

    /**
    * @Author chenchuang
    * @Description //TODO 仓库看板：工单缺料
    * @Date 2020/11/5 21:08
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */

    List<FbsMomOrderdetail> getListByOrderSheetNotEnough();

    /**
    * @Author chenchuang
    * @Description //TODO 仓库看板：领料申请完成数量
    * @Date 2020/11/6 10:40
    * @Param []
    * @return java.lang.Integer
    */
    Integer getApplyCompleteSum();

    /**
    * @Author chenchuang
    * @Description //TODO 仓库看板：齐套数据
    * @Date 2020/11/9 19:45
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getListByOrderSheetEnough();

    /**
    * @Author chenchuang
    * @Description //TODO 获取最近90订单数据
    * @Date 2021/1/7 13:33
    * @Param []
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getLatelyDayMomOrderList();

    /**
    * @Author chenchuang
    * @Description //TODO 根据订单号获取生产订单信息
    * @Date 2021/1/14 14:18
    * @Param [moCode]
    * @return org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail
    */
    FbsMomOrderdetail getMomOrderDetailByMoCode(@Param("moCode")String moCode);

    /**
    * @Author chenchuang
    * @Description //TODO 当月订单子件明细
    * @Date 2021/1/25 16:01
    * @Param []
    * @return org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail
    */
    List<FbsMomOrderdetail> getMomMoallocate();

    /**
    * @Author chenchuang
    * @Description //TODO 根据生产订单查询子子件明细
    * @Date 2021/1/28 10:48
    * @Param [moCode]
    * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
    */
    List<FbsMomOrderdetail> getMomMoallocateByMoCode(@Param("moCode")String moCode);


    /**
     * @Author chenchuang
     * @Description //TODO 除关闭的生产订单数据包括子健总数数量
     * @Date 2021/4/14 14:44
     * @Param []
     * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
     */
    List<FbsMomOrderdetail> getOrderDetailList();

    Integer getMoallocateListGroupCount();

    /**
     * @Author chenchuang
     * @Description //TODO 除关闭的生产订单的子件数据包括数量等和库存数量
     * @Date 2021/4/14 14:47
     * @Param []
     * @return java.util.List<org.jeecg.modules.fbsMomOrder.entity.FbsMomOrderdetail>
     */
    List<FbsMomOrderdetail> getMoallocateList();

    /**
    * @Author chenchuang
    * @Description //TODO 新增单个生产订单明细
    * @Date 2022/1/25 16:10
    * @Param [map]
    * @return void
    */
    void insertMomOrderDetailSap(@Param(value = "map") Map<String,Object> map);

    /**
    * @Author chenchuang
    * @Description //TODO 新增单个生产订单资料
    * @Date 2022/1/25 16:36
    * @Param [map]
    * @return void
    */
    void insertMomMorderSap(@Param(value = "map") Map<String,Object> map);



    /**
    * @Author chenchuang
    * @Description //TODO 批量新增生产订单明细
    * @Date 2022/2/17 22:31
    * @Param [list]
    * @return void
    */
    void insertSAPMomOrderdetail(@Param(value = "list") List<Map<String,Object>> list);

    /**
    * @Author chenchuang
    * @Description //TODO 批量删除生产订单明细
    * @Date 2022/2/17 22:49
    * @Param [list]
    * @return void
    */
    void deleteSAPMomOrderdetail(@Param(value = "list") List<FbsMomOrder> list);

    /**
    * @Author chenchuang
    * @Description //TODO 批量新增生产订单资料
    * @Date 2022/2/17 22:31
    * @Param [list]
    * @return void
    */
    void insertSAPMomMorder(@Param(value = "list") List<Map<String,Object>> list);

    /**
    * @Author chenchuang
    * @Description //TODO 批量删除生产订单资料
    * @Date 2022/2/17 22:49
    * @Param [list]
    * @return void
    */
    void deleteSAPMomMorder(@Param(value = "list") List<Map<String,Object>> list);


    /**
     * @Author chenchuang
     * @Description //TODO 批量新增子件信息
     * @Date 2022/1/25 22:30
     * @Param [list]
     * @return void
     */
    void insertMomMoallocateBatchSap(@Param(value = "list") List<Map<String,Object>> list);

    /**
    * @Author chenchuang
    * @Description //TODO 批量删除子件信息
    * @Date 2022/2/17 22:51
    * @Param [list]
    * @return void
    */
    void deleteMomMoallocateBatchSap(@Param(value = "list") List<Map<String,Object>> list);

    /**
    * @Author chenchuang
    * @Description //TODO 批量删除订单表
    * @Date 2022/2/17 23:02
    * @Param [list]
    * @return void
    */
    void deleteSAPMomOrder(@Param(value = "list") List<FbsMomOrder> list);

    /**
    * @Author chenchuang
    * @Description //TODO 根据订单号修改状态
    * @Date 2022/4/7 19:00
    * @Param [MoDId]
    * @return void
    */
    void updateOrderdetailStatus(@Param(value = "list") List<String> list);
}
