|
|
|
@ -99,10 +99,12 @@ public class ThrInvWarehouseController {
|
|
|
|
|
}
|
|
|
|
|
//先判断该部门下存不存在此仓库
|
|
|
|
|
filterThrSubInvWarehouseRequest.setCode(invSubWarehouseEntity.getCode());
|
|
|
|
|
filterThrSubInvWarehouseRequest.setName(invSubWarehouseEntity.getName());
|
|
|
|
|
filterThrSubInvWarehouseRequest.setParentId(invSubWarehouseEntity.getParentId());
|
|
|
|
|
List<ThrInvWarehouseEntity> thrInvWarehouseEntities = thrInvWarehouseService.filterThrInvWarehouse(filterThrSubInvWarehouseRequest);
|
|
|
|
|
if(thrInvWarehouseEntities.size()==0){
|
|
|
|
|
filterThrSubInvWarehouseRequest.setName(invSubWarehouseEntity.getName());
|
|
|
|
|
filterThrSubInvWarehouseRequest.setCode(null);
|
|
|
|
|
List<ThrInvWarehouseEntity> thrInvWarehouseEntities1 = thrInvWarehouseService.filterThrInvWarehouse(filterThrSubInvWarehouseRequest);
|
|
|
|
|
if(thrInvWarehouseEntities.size()==0 && thrInvWarehouseEntities1.size()==0){
|
|
|
|
|
boolean b = thrInvWarehouseService.updateThrInvWarehouse(invSubWarehouseEntity);
|
|
|
|
|
if (!b) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
|
|
|
|