This commit is contained in:
王奎兴
2026-07-01 18:19:03 +08:00
parent 9511a38946
commit 193db96e63
13 changed files with 395 additions and 192 deletions
@@ -68,6 +68,17 @@ public class StorageSectionDomainService {
storageSectionDO.getStorageCode(), storageSectionDO.getStorageName(), null);
//设置仓库
setWarehouseInfo(storageSectionDO);
String storageCode = storageSectionDO.getStorageCode();
String storageName = storageSectionDO.getStorageName();
Long warehouseId = storageSectionDO.getWarehouseId();
List<StorageSection> list = storageSectionService.list(new QueryWrapper<StorageSection>().lambda()
.eq(StorageSection::getStorageCode, storageCode)
.eq(StorageSection::getStorageName, storageName)
.eq(StorageSection::getWarehouseId, warehouseId)
.eq(StorageSection::getDelFlag, 1));
if (list != null && list.size() > 0) {
throw new ServiceException("库区编码或名称已存在");
}
return storageSectionService.insert(storageSectionDO);
}
@@ -86,6 +97,17 @@ public class StorageSectionDomainService {
storageSectionDO.getStorageSectionId());
//设置仓库
setWarehouseInfo(storageSectionDO);
String storageCode = storageSectionDO.getStorageCode();
String storageName = storageSectionDO.getStorageName();
Long warehouseId = storageSectionDO.getWarehouseId();
List<StorageSection> list = storageSectionService.list(new QueryWrapper<StorageSection>().lambda()
.eq(StorageSection::getStorageCode, storageCode)
.eq(StorageSection::getStorageName, storageName)
.eq(StorageSection::getWarehouseId, warehouseId)
.eq(StorageSection::getDelFlag, 1));
if (list != null && list.size() > 0) {
throw new ServiceException("库区编码或名称已存在");
}
return storageSectionService.update(storageSectionDO);
}
@@ -168,4 +190,4 @@ public class StorageSectionDomainService {
}
}
}