You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
3.6 KiB

1 year ago
​
​
​
​
​
​
​
​
1 year ago
​
​
1 year ago
​
​
​
1 year ago
​
​
​
2 months ago
​
​
​
​
​
1 year ago
​
​
​
​
1 year ago
​
​
​
1 year ago
1 year ago
​
​
​
1 year ago
​
1 year ago
​
​
1 year ago
​
​
​
​
​
2 months ago
2 months ago
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
​
​
1 year ago
  1. package com.gaotao.modules.handlingunit.dao;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import com.gaotao.modules.handlingunit.entity.HandlingUnit;
  4. import com.gaotao.modules.handlingunit.entity.dto.HandlingUnitDto;
  5. import org.apache.ibatis.annotations.Mapper;
  6. import org.apache.ibatis.annotations.Param;
  7. import java.util.List;
  8. import java.util.Set;
  9. @Mapper
  10. public interface HandlingUnitMapper extends BaseMapper<HandlingUnit> {
  11. /**
  12. * 查询处理单元列表(包含关联信息)
  13. */
  14. List<HandlingUnitDto> selectHandlingUnitList(@Param("dto") HandlingUnitDto dto);
  15. /**
  16. * 查询处理单元详情(包含明细和子单元)
  17. */
  18. HandlingUnitDto selectHandlingUnitDetail(@Param("site") String site, @Param("unitId") String unitId);
  19. /**
  20. * WITH (NOLOCK) 不申请共享锁,避免被库存更新的排他锁堵住;
  21. * 允许短暂脏读,只给对外查询接口返回,不能作为扣减或状态流转依据
  22. */
  23. HandlingUnit selectByUnitIdNoLock( @Param("unitId") String unitId);
  24. /**
  25. * 查询子处理单元
  26. */
  27. List<HandlingUnitDto> selectChildUnits(@Param("site") String site, @Param("parentUnitId") String parentUnitId);
  28. /**
  29. * 查询可装箱的单元
  30. */
  31. List<HandlingUnitDto> selectAvailableUnitsForPacking(@Param("site") String site,
  32. @Param("locationId") String locationId,
  33. @Param("warehouseId") String warehouseId);
  34. /**
  35. * 查询可合并的单元
  36. */
  37. List<HandlingUnitDto> selectAvailableUnitsForMerge(@Param("site") String site,
  38. @Param("partNo") String partNo,
  39. @Param("batchNo") String batchNo,
  40. @Param("locationId") String locationId);
  41. /**
  42. * 更新打印信息
  43. */
  44. void updatePrintInfo(@Param("site") String site, @Param("unitId") String unitId,
  45. @Param("printerName") String printerName, @Param("printCount") Integer printCount);
  46. /**
  47. * 更新HandlingUnit打印信息(打印次数+1,更新最后打印时间和打印人)
  48. */
  49. void updateHandlingUnitPrintInfo(@Param("site") String site, @Param("unitId") String unitId,
  50. @Param("printerName") String printerName, @Param("printedBy") String printedBy);
  51. /**
  52. * @Description 取消WMS预定 - rqrq
  53. * @param site 工厂编码
  54. * @param unitId 标签编码
  55. * @author rqrq
  56. * @date 2025/11/01
  57. */
  58. void cancelReserve(@Param("site") String site, @Param("unitId") String unitId);
  59. List<HandlingUnit> selectByUnitIds(@Param("unitIds") Set<String> unitIds,@Param("site") String site);
  60. int updateExpiredDate(@Param("handlingUnits") List<HandlingUnit> handlingUnits);
  61. /**
  62. * 跨site移库:按来源site+标签号改写目的site、目的库位和仓库。
  63. * 不用 MP 只按 unitId 更新,避免联合主键场景改错行。
  64. */
  65. int updateSiteAndLocationForCrossSiteMove(@Param("fromSite") String fromSite,
  66. @Param("destSite") String destSite,
  67. @Param("targetLocationId") String targetLocationId,
  68. @Param("warehouseId") String warehouseId,
  69. @Param("modifiedBy") String modifiedBy,
  70. @Param("unitIds") List<String> unitIds);
  71. }