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

1.仓库货位限制移除

parent 798d5d45
...@@ -29,7 +29,6 @@ public class ErpWarehouseLocationBo extends BaseEntity { ...@@ -29,7 +29,6 @@ public class ErpWarehouseLocationBo extends BaseEntity {
/** /**
* 仓库货位部门ID * 仓库货位部门ID
*/ */
@NotNull(message = "部门ID不能为空", groups = { AddGroup.class, EditGroup.class })
private Long deptId; private Long deptId;
/** /**
...@@ -40,7 +39,6 @@ public class ErpWarehouseLocationBo extends BaseEntity { ...@@ -40,7 +39,6 @@ public class ErpWarehouseLocationBo extends BaseEntity {
/** /**
* 仓库ID * 仓库ID
*/ */
@NotNull(message = "仓库ID不能为空", groups = { AddGroup.class, EditGroup.class })
private Long warehouseId; private Long warehouseId;
/** /**
......
...@@ -85,11 +85,15 @@ public class ErpWarehouseLocationServiceImpl implements IErpWarehouseLocationSer ...@@ -85,11 +85,15 @@ public class ErpWarehouseLocationServiceImpl implements IErpWarehouseLocationSer
if (!baseMapper.selectList(queryWrapper).isEmpty()) { if (!baseMapper.selectList(queryWrapper).isEmpty()) {
throw new RuntimeException("仓库货位已存在,请调整后再试"); throw new RuntimeException("仓库货位已存在,请调整后再试");
} }
SysDept sysDept = deptMapper.selectVoById(add.getDeptId()); if (add.getDeptId() != null) {
add.setDeptName(sysDept.getDeptName()); SysDept sysDept = deptMapper.selectVoById(add.getDeptId());
ErpWarehouseVo warehouseVo = warehouseMapper.selectVoById(add.getWarehouseId()); add.setDeptName(sysDept.getDeptName());
add.setWarehouseCode(warehouseVo.getCode()); }
add.setWarehouseName(warehouseVo.getName()); if (add.getWarehouseId() != null) {
ErpWarehouseVo warehouseVo = warehouseMapper.selectVoById(add.getWarehouseId());
add.setWarehouseCode(warehouseVo.getCode());
add.setWarehouseName(warehouseVo.getName());
}
boolean flag = baseMapper.insert(add) > 0; boolean flag = baseMapper.insert(add) > 0;
if (flag) { if (flag) {
bo.setId(add.getId()); 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