Merge branch 'dev_WMS20260401' into dev

This commit is contained in:
王奎兴
2026-04-21 16:56:36 +08:00
61 changed files with 581 additions and 115 deletions
@@ -121,9 +121,13 @@ public class AssociationWarehouseImpl extends ServiceImpl<AssociationWarehouseMa
associationWarehouse.setCreateTime(new Date());
associationWarehouseList.add(associationWarehouse);
}
//标记删除
remove(new QueryWrapper<AssociationWarehouse>().lambda()
.eq(AssociationWarehouse::getWarehouseId, associationWarehouseDO.getWarehouseId()));
// 先删该仓下「非默认仓」绑定,再批量插入本次提交的用户;保留 is_default=2(如新建仓自动写入的创建人默认仓),避免前端列表不展示该条却全量保存时被误删
remove(new QueryWrapper<AssociationWarehouse>().lambda()
.eq(AssociationWarehouse::getWarehouseId, associationWarehouseDO.getWarehouseId())
.eq(AssociationWarehouse::getDelFlag, 1)
.and(w -> w.isNull(AssociationWarehouse::getIsDefault)
.or()
.ne(AssociationWarehouse::getIsDefault, 2)));
}
return saveBatch(associationWarehouseList);
}
@@ -69,6 +69,11 @@ public class AssociationWarehouseDO extends BaseVOEntity{
@ApiModelProperty(name = "关联用户id集合")
private List<Long> correlationIdList;
/**
* 为 true 时查询排除「默认仓」关联(is_default=2),例如绑定用户列表不展示新建仓时自动生成的创建人默认关联。
*/
private Boolean excludeDefaultWarehouse;
@ApiModelProperty("是否批量: 1-是 2-否 ")
@Excel(name = "是否批量: 1-是 2-否 ")
private Integer isBatch;
@@ -118,5 +118,9 @@ public class Warehouse extends BaseVOEntity{
@Excel(name = "是否作废: 1-否 2-是")
private Integer nullify;
@ApiModelProperty("是否启用: 1-否 2-是")
@Excel(name = "是否启用: 1-否 2-是")
private Integer isEnable;
}
}
@@ -40,7 +40,11 @@ public class WarehouseImpl extends ServiceImpl<WarehouseMapper, Warehouse> imple
public Boolean insert(WarehouseDO warehouseDO) {
Warehouse warehouse = new Warehouse();
BeanUtils.copyProperties(warehouseDO,warehouse);
return this.save(warehouse);
boolean saved = this.save(warehouse);
if (saved && warehouse.getWarehouseId() != null) {
warehouseDO.setWarehouseId(warehouse.getWarehouseId());
}
return saved;
}
/**
@@ -119,8 +119,10 @@ public class WarehousePO extends BaseVOEntity{
@ApiModelProperty("是否作废: 1-否 2-是")
@Excel(name = "是否作废: 1-否 2-是")
private Integer nullify;
@ApiModelProperty("是否启用: 1-否 2-是")
@Excel(name = "是否启用: 1-否 2-是")
private Integer isEnable;
@ApiModelProperty("库区集合")
private List<StorageSectionPO> storageSectionList;
}
}
@@ -122,7 +122,9 @@ public class WarehouseDO extends BaseVOEntity{
@ApiModelProperty(name = "权限菜单ID")
private Long permissionMenuId;
@ApiModelProperty("是否启用: 1-否 2-是")
@Excel(name = "是否启用: 1-否 2-是")
private Integer isEnable;
@ApiModelProperty("仓库id 集合")
private List<Long> warehouseIds;
}
}