2025-10-28 12:20:20 +08:00
|
|
|
|
package com.klp.mapper;
|
|
|
|
|
|
|
2025-10-29 16:55:26 +08:00
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
2025-10-28 12:20:20 +08:00
|
|
|
|
import com.klp.domain.WmsMaterialCoil;
|
2026-01-29 16:22:36 +08:00
|
|
|
|
import com.klp.domain.vo.WmsMaterialCoilDeliveryExportVo;
|
2025-10-28 12:20:20 +08:00
|
|
|
|
import com.klp.domain.vo.WmsMaterialCoilVo;
|
|
|
|
|
|
import com.klp.common.core.mapper.BaseMapperPlus;
|
2025-10-29 14:40:09 +08:00
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
2026-03-07 14:37:12 +08:00
|
|
|
|
import com.klp.domain.vo.dashboard.CoilTrimRawVo;
|
2026-03-09 10:46:22 +08:00
|
|
|
|
import com.klp.domain.vo.dashboard.CategoryWidthRawVo;
|
2025-10-29 14:13:06 +08:00
|
|
|
|
import java.util.List;
|
|
|
|
|
|
import java.util.Map;
|
2025-10-28 12:20:20 +08:00
|
|
|
|
|
|
|
|
|
|
public interface WmsMaterialCoilMapper extends BaseMapperPlus<WmsMaterialCoilMapper, WmsMaterialCoil, WmsMaterialCoilVo> {
|
|
|
|
|
|
|
2025-10-29 14:13:06 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 查询各个库区中不同类型的钢卷分布情况
|
2025-10-29 14:40:09 +08:00
|
|
|
|
* 按库区分组,统计每种物品类型和物品ID的钢卷数量和重量
|
2025-10-29 14:13:06 +08:00
|
|
|
|
*
|
2025-10-29 14:40:09 +08:00
|
|
|
|
* @param itemType 物品类型(可选)
|
|
|
|
|
|
* @param itemId 物品ID(可选)
|
2025-10-29 14:13:06 +08:00
|
|
|
|
* @return 分布情况列表
|
|
|
|
|
|
*/
|
2025-10-29 14:40:09 +08:00
|
|
|
|
List<Map<String, Object>> getDistributionByWarehouse(@Param("itemType") String itemType, @Param("itemId") Long itemId);
|
2025-10-29 14:13:06 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询不同类型的钢卷在不同库区的分布情况
|
2025-10-29 14:40:09 +08:00
|
|
|
|
* 按物品类型和物品ID分组,统计每个库区的钢卷数量和重量
|
2025-10-29 14:13:06 +08:00
|
|
|
|
*
|
2025-10-29 14:40:09 +08:00
|
|
|
|
* @param itemType 物品类型(可选)
|
|
|
|
|
|
* @param itemId 物品ID(可选)
|
2025-10-29 14:13:06 +08:00
|
|
|
|
* @return 分布情况列表
|
|
|
|
|
|
*/
|
2025-10-29 14:40:09 +08:00
|
|
|
|
List<Map<String, Object>> getDistributionByItemType(@Param("itemType") String itemType, @Param("itemId") Long itemId);
|
2025-10-29 16:55:26 +08:00
|
|
|
|
|
|
|
|
|
|
Page<WmsMaterialCoilVo> selectVoPagePlus(Page<Object> build,@Param("ew") QueryWrapper<WmsMaterialCoil> lqw);
|
2025-10-30 14:59:46 +08:00
|
|
|
|
|
2026-03-12 17:05:22 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* orderBy=true 时使用:包含库位排序辅助字段(aw_sort_key/aw_layer_key/aw_id_key)以及父库位 join
|
|
|
|
|
|
*/
|
|
|
|
|
|
Page<WmsMaterialCoilVo> selectVoPagePlusOrderBy(Page<Object> build, @Param("ew") QueryWrapper<WmsMaterialCoil> lqw);
|
|
|
|
|
|
|
2025-10-30 14:59:46 +08:00
|
|
|
|
List<WmsMaterialCoilVo> selectVoListWithDynamicJoin(@Param("ew")QueryWrapper<WmsMaterialCoil> lqw);
|
2025-11-03 17:06:17 +08:00
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> getDistributionByActualWarehouse(@Param("itemType") String itemType, @Param("itemId") Long itemId);
|
2025-11-17 17:57:57 +08:00
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> getDistributionByActualItemType(@Param("itemType")String itemType,@Param("itemId") Long itemId);
|
2025-11-27 13:08:09 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询钢卷导出数据(包含所有关联字段)
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param lqw 查询条件
|
|
|
|
|
|
* @return 导出数据列表
|
|
|
|
|
|
*/
|
|
|
|
|
|
List<com.klp.domain.vo.WmsMaterialCoilExportVo> selectExportList(@Param("ew")QueryWrapper<WmsMaterialCoil> lqw);
|
2026-01-11 17:42:15 +08:00
|
|
|
|
|
2026-01-28 11:50:17 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 查询重复入场卷号的钢卷信息
|
|
|
|
|
|
*
|
|
|
|
|
|
* @return 重复入场卷号的钢卷列表
|
|
|
|
|
|
*/
|
|
|
|
|
|
List<WmsMaterialCoilVo> selectDuplicateEnterCoilNoList();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询重复当前卷号的钢卷信息
|
|
|
|
|
|
*
|
|
|
|
|
|
* @return 重复当前卷号的钢卷列表
|
|
|
|
|
|
*/
|
|
|
|
|
|
List<WmsMaterialCoilVo> selectDuplicateCurrentCoilNoList();
|
|
|
|
|
|
|
2026-01-11 17:42:15 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 更新钢卷发货撤回:将发货时间置空,状态改为指定值
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param coilId 钢卷ID
|
|
|
|
|
|
* @param status 目标状态
|
|
|
|
|
|
* @return 影响行数
|
|
|
|
|
|
*/
|
|
|
|
|
|
int updateForWithdrawExport(@Param("coilId") Long coilId, @Param("status") Integer status);
|
|
|
|
|
|
|
2026-01-29 16:22:36 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 发货报表导出:按钢卷ID列表联查(钢卷 + 发货单明细 + 发货单主表 + 发货计划)
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param coilIds 钢卷ID集合
|
|
|
|
|
|
* @return 发货报表导出数据
|
|
|
|
|
|
*/
|
2026-03-07 14:37:12 +08:00
|
|
|
|
List<WmsMaterialCoilDeliveryExportVo> selectDeliveryExportListByCoilIds(@Param("coilIds") java.util.Collection<Long> coilIds);
|
|
|
|
|
|
|
|
|
|
|
|
List<CoilTrimRawVo> selectCoilTrimStatistics();
|
2026-03-09 10:46:22 +08:00
|
|
|
|
|
|
|
|
|
|
List<CategoryWidthRawVo> selectCategoryWidthStatistics();
|
2026-04-08 14:18:59 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询itemId和itemType不匹配的钢卷
|
|
|
|
|
|
* @return 不匹配的钢卷列表
|
|
|
|
|
|
*/
|
|
|
|
|
|
List<WmsMaterialCoil> selectMismatchedItemCoils();
|
2026-04-16 13:54:12 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 统计筛选条件下的全量汇总数据(高性能:只查sum/count)
|
|
|
|
|
|
* @param qw 查询条件(只使用WHERE和JOIN部分)
|
|
|
|
|
|
* @return 统计结果(Map包含totalGrossWeight, totalNetWeight)
|
|
|
|
|
|
*/
|
|
|
|
|
|
Map<String, Object> selectStatistics(@Param("ew") QueryWrapper<WmsMaterialCoil> qw);
|
2025-10-28 12:20:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|