package com.cf.imes.module.manage.dal.mysql.query;



import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.manage.controller.admin.pack.vo.*;
import com.cf.imes.module.manage.controller.admin.process.vo.OrderPlateReqVO;
import com.cf.imes.module.manage.controller.admin.process.vo.PlateDetails;
import com.cf.imes.module.manage.controller.admin.process.vo.ProcessPlateReqVO;
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PackageDetailsRespVO;
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleVO;
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderPlateRespVO;
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.PlatePageVO;
import com.cf.imes.module.manage.dal.dataobject.query.OrderItemDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderItemMapper extends BaseMapperX<OrderItemDO> {


    IPage<PackageDetailsRespVO> selectByPackageId( @Param("page") IPage page, @Param("packageId")  Long packageId, @Param("organId")  Long organId);


    List<OrderModuleVO> selectCombinationName(Long orderNo);


    List<OrderPlateRespVO> selectPlateList(PlatePageVO pageReqVO);


    List<PlateDetailsRespVO> selectOrderPlateList(@Param("orderNo") Long orderNo,@Param("organId") Long organId);



    List<PlateDetailsRespVO> selectPrintPlateList(@Param("orderNo")Long orderNo,@Param("packageNo") Long packageNo, @Param("organId") Long organId);



    void deleteOrderPack(@Param("reqVO") PackReqVO reqVO);



    void deleteOtherParts(@Param("partsId") Long partsId);


    void deleteParts(@Param("reqVO") PackReqVO reqVO);


    void insertPackId(@Param("plateIdList") List<Long> plateIdList, @Param("packId") Long packId);


    void deletePackId(@Param("deletePlateIdList") List<Long> deletePlateIdList,@Param("packId") Long packId);


    void insertPartsId(@Param("packId") Long packId, @Param("addPartsIdList") List<Long> addPartsIdList);


    String selectBodyName(@Param("plateId") Long plateId);



    List<PlateDetails> selectByOrderId(@Param("reqVO") ProcessPlateReqVO reqVO, @Param("organId") Long organId );


    OrderPlateDetailsRespVO selectOrderPlateDetails(@Param("orderId") Long orderId);


    void insertParts(@Param("addPartsList") List<Long> addPartsList, @Param("packId")Long packId, @Param("orderNo") Long orderNo);

    void deletePartsList(@Param("deletePartsList")List<Long> deletePartsList,@Param("packId") Long packId,@Param("orderNo") Long orderNo);

    List<PlateDetails> selectPlateListByBodyIds( @Param("collect") List<Long> collect,@Param("orderId") Long orderId,@Param("userOrganId") Long userOrganId);

    List<PlateDetailsRespVO> selectOrdersPlateList(@Param("orderIds") List<Long> orderIds, @Param("userOrganId") Long userOrganId);
}
