|
|
|
@ -264,9 +264,27 @@ public class InvWarehouseController extends BaseController {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Integer userCount = warehouseUserService.countUserBySubInvCode(invWarehouseEntity.getCode());
|
|
|
|
|
if (userCount > 0) {
|
|
|
|
|
return ResultVOUtils.error(500, "修改失败,请先移除该仓库关联用户!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//更新仓库信息
|
|
|
|
|
invWarehouseEntity.setUpdateTime(new Date());
|
|
|
|
|
boolean b = invWarehouseService.updateInvSubWarehouse(invWarehouseEntity);
|
|
|
|
|
|
|
|
|
|
//如果要是一级仓库就吧全部子集都刷成一样的寄售仓库
|
|
|
|
|
if(StrUtil.isBlank(invWarehouseEntity.getParentCode())){
|
|
|
|
|
List<InvWarehouseEntity> invWarehouseEntityList=invWarehouseService.selectLowWarehouseAll(invWarehouseEntity.getCode());
|
|
|
|
|
for (InvWarehouseEntity obj : invWarehouseEntityList) {
|
|
|
|
|
obj.setAdvanceType(invWarehouseEntity.getAdvanceType());
|
|
|
|
|
obj.setUpdateTime(new Date());
|
|
|
|
|
invWarehouseService.updateInvSubWarehouse(obj);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//更新部门信息
|
|
|
|
|
DeptEntity pEntity = deptService.selectByCode(invWarehouseEntity.getParentId());
|
|
|
|
|
pEntity.setUpdateTime(new Date());
|
|
|
|
@ -610,4 +628,10 @@ public class InvWarehouseController extends BaseController {
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/warehouse/inout/getDeptById")
|
|
|
|
|
public BaseResponse getDeptById(@RequestBody List<Integer> deptIds) {
|
|
|
|
|
List<DeptEntity> list = deptService.getDeptById(deptIds);
|
|
|
|
|
return ResultVOUtils.success(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|