|
|
|
@ -100,16 +100,7 @@ public class ThrDeptController {
|
|
|
|
|
}
|
|
|
|
|
String id = Long.toString(thrDeptEntity.getId());
|
|
|
|
|
ThrDeptEntity thrDeptEntity1 = thrDeptService.selectById(id);
|
|
|
|
|
//查询该部门下的仓库
|
|
|
|
|
filterThrSubInvWarehouseRequest.setParentId(thrDeptEntity1.getCode());
|
|
|
|
|
List<ThrInvWarehouseEntity> thrDept = thrInvWarehouseService.filterThrInvWarehouse(filterThrSubInvWarehouseRequest);
|
|
|
|
|
|
|
|
|
|
for (ThrInvWarehouseEntity thrInvWarehouseEntity : thrDept) {
|
|
|
|
|
thrInvWarehouseEntity.setParentId(thrDeptEntity.getCode());
|
|
|
|
|
thrInvWarehouseEntity.setThirdSysFk(thrDeptEntity.getThirdSysFk());
|
|
|
|
|
//修改仓库
|
|
|
|
|
thrInvWarehouseService.updateThrInvWarehouse(thrInvWarehouseEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//判断部门是否存在
|
|
|
|
|
filterThrDeptRequest.setCode(thrDeptEntity.getCode());
|
|
|
|
|
filterThrDeptRequest.setName(thrDeptEntity.getName());
|
|
|
|
@ -122,6 +113,16 @@ public class ThrDeptController {
|
|
|
|
|
if (!b) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
|
|
|
|
}
|
|
|
|
|
//查询该部门下的仓库
|
|
|
|
|
filterThrSubInvWarehouseRequest.setParentId(thrDeptEntity1.getCode());
|
|
|
|
|
List<ThrInvWarehouseEntity> thrDept = thrInvWarehouseService.filterThrInvWarehouse(filterThrSubInvWarehouseRequest);
|
|
|
|
|
|
|
|
|
|
for (ThrInvWarehouseEntity thrInvWarehouseEntity : thrDept) {
|
|
|
|
|
thrInvWarehouseEntity.setParentId(thrDeptEntity.getCode());
|
|
|
|
|
thrInvWarehouseEntity.setThirdSysFk(thrDeptEntity.getThirdSysFk());
|
|
|
|
|
//修改仓库
|
|
|
|
|
thrInvWarehouseService.updateThrInvWarehouse(thrInvWarehouseEntity);
|
|
|
|
|
}
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
} else {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.DATA_REPEAT);
|
|
|
|
|