fix: 完善库存跨页选择稳定性
This commit is contained in:
@@ -9,6 +9,8 @@ import java.math.BigDecimal;
|
||||
@Data
|
||||
public class AvailableInventoryRespVO {
|
||||
|
||||
@Schema(description = "组盘记录标识")
|
||||
private Long groupId;
|
||||
@Schema(description = "箱号")
|
||||
private String vehicleCode;
|
||||
@Schema(description = "批次")
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<mapper namespace="cn.code.nl.module.wms.dal.mysql.iostorinvdtl.IostorinvDtlMapper">
|
||||
|
||||
<sql id="availableInventoryColumns">
|
||||
gp.group_id AS group_id,
|
||||
gp.vehicle_code AS vehicle_code,
|
||||
gp.pcsn AS pcsn,
|
||||
gp.material_id AS material_id,
|
||||
|
||||
@@ -52,6 +52,7 @@ class IostorinvDtlMapperTest {
|
||||
List<AvailableInventoryRespVO> expanded = service.expandAvailableInventory(expandReqVO);
|
||||
|
||||
assertEquals(2, expanded.size());
|
||||
assertEquals(List.of(1L, 2L), expanded.stream().map(AvailableInventoryRespVO::getGroupId).toList());
|
||||
assertTrue(expanded.stream().allMatch(item -> "BOX-001".equals(item.getVehicleCode())));
|
||||
assertTrue(expanded.stream().allMatch(item -> "STOR-001".equals(item.getStorId())));
|
||||
assertEquals(2, expanded.stream().map(AvailableInventoryRespVO::getPcsn).distinct().count());
|
||||
@@ -75,6 +76,7 @@ class IostorinvDtlMapperTest {
|
||||
|
||||
assertEquals(1L, page.getTotal());
|
||||
assertEquals("PCSN-002", page.getList().get(0).getPcsn());
|
||||
assertEquals(2L, page.getList().get(0).getGroupId());
|
||||
assertEquals("材料一", page.getList().get(0).getMaterialName());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user