Commit 532bf160 authored by 刘帅's avatar 刘帅

1.仓库货位限制移除

parent 798d5d45
......@@ -29,7 +29,6 @@ public class ErpWarehouseLocationBo extends BaseEntity {
/**
* 仓库货位部门ID
*/
@NotNull(message = "部门ID不能为空", groups = { AddGroup.class, EditGroup.class })
private Long deptId;
/**
......@@ -40,7 +39,6 @@ public class ErpWarehouseLocationBo extends BaseEntity {
/**
* 仓库ID
*/
@NotNull(message = "仓库ID不能为空", groups = { AddGroup.class, EditGroup.class })
private Long warehouseId;
/**
......
......@@ -85,11 +85,15 @@ public class ErpWarehouseLocationServiceImpl implements IErpWarehouseLocationSer
if (!baseMapper.selectList(queryWrapper).isEmpty()) {
throw new RuntimeException("仓库货位已存在,请调整后再试");
}
if (add.getDeptId() != null) {
SysDept sysDept = deptMapper.selectVoById(add.getDeptId());
add.setDeptName(sysDept.getDeptName());
}
if (add.getWarehouseId() != null) {
ErpWarehouseVo warehouseVo = warehouseMapper.selectVoById(add.getWarehouseId());
add.setWarehouseCode(warehouseVo.getCode());
add.setWarehouseName(warehouseVo.getName());
}
boolean flag = baseMapper.insert(add) > 0;
if (flag) {
bo.setId(add.getId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment