feat:参照 WMS 入库单规则,通宇「入仓委托单」需新增「入库仓库」字段,并设置为必填项,设置「入库仓库」校验具体

fix:修复【入库管理-收货管理】中批量设置货物参数(数量/面积/体积/尺寸)时,部分字段留空导致已有数据被重置丢失的问题。
This commit is contained in:
hjx
2026-08-05 09:49:19 +08:00
parent d268718f9b
commit b80668145a
4 changed files with 188 additions and 33 deletions
@@ -181,17 +181,9 @@ public class ReservationStockInOrderApplicationService {
* 新增入库单
*/
public Boolean insert(ReservationStockInOrderDO stockInOrderDO) {
// 如果仓库ID为空,从当前登录用户的关联仓库中获取
// 仓库为必填项,前端必须选择入库仓库
if (stockInOrderDO.getWarehouseId() == null) {
LoginUser loginUser = SecurityUtils.getLoginUser();
if (loginUser == null) {
throw new ServiceException("登录已失效,请重新登录");
}
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
if (associationWarehouseCacheDO == null || associationWarehouseCacheDO.getWarehouseId() == null) {
throw new ServiceException("当前用户未配置关联仓库,请先配置仓库");
}
stockInOrderDO.setWarehouseId(associationWarehouseCacheDO.getWarehouseId());
throw new ServiceException("请选择入库仓库");
}
//设置仓库
setWarehouseInfo(stockInOrderDO);