|
|
|
@ -81,30 +81,39 @@ public class InvSubWarehouseController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
//走这边表示单据选择的是往来单位里面调出调入的库
|
|
|
|
|
//判断单据类型是1就是设置单据需要需要查询除自己以外的分库
|
|
|
|
|
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("corp_innor_inv");
|
|
|
|
|
if (systemParamConfigEntity.getParamValue().equals("0")) {
|
|
|
|
|
//不允许调拨
|
|
|
|
|
// 查询总库信息
|
|
|
|
|
InvSubWarehouseEntity invSubWarehouseEntity = invSubWarehouseService.filterGroupInvSubAndcode(filterInvWarehouseRequest.getCode());
|
|
|
|
|
//查询仓库信息
|
|
|
|
|
if(invSubWarehouseEntity!=null){
|
|
|
|
|
InvWarehouseEntity invWarehouseEntity = invWarehouseService.selectByCodeAll(invSubWarehouseEntity.getParentId());
|
|
|
|
|
filterInvWarehouseRequest.setSuperiorCode(invWarehouseEntity.getCode());
|
|
|
|
|
filterInvWarehouseRequest.setSuperiorPcode(invWarehouseEntity.getPcode());
|
|
|
|
|
if(filterInvWarehouseRequest.getFilter()==3 && filterInvWarehouseRequest.getFilter()!=null){
|
|
|
|
|
AuthAdmin authAdmin = customerService.getUserBean();
|
|
|
|
|
if (authAdmin.getCustomerId().equals("110"))
|
|
|
|
|
filterInvWarehouseRequest.setUserId(authAdmin.getId() + "");
|
|
|
|
|
else {
|
|
|
|
|
filterInvWarehouseRequest.setSpUse(true);
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
//走这边表示单据选择的是往来单位里面调出调入的库
|
|
|
|
|
//判断单据类型是1就是设置单据需要需要查询除自己以外的分库
|
|
|
|
|
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("corp_innor_inv");
|
|
|
|
|
if (systemParamConfigEntity.getParamValue().equals("0")) {
|
|
|
|
|
//不允许调拨
|
|
|
|
|
// 查询总库信息
|
|
|
|
|
InvSubWarehouseEntity invSubWarehouseEntity = invSubWarehouseService.filterGroupInvSubAndcode(filterInvWarehouseRequest.getCode());
|
|
|
|
|
//查询仓库信息
|
|
|
|
|
if(invSubWarehouseEntity!=null){
|
|
|
|
|
InvWarehouseEntity invWarehouseEntity = invWarehouseService.selectByCodeAll(invSubWarehouseEntity.getParentId());
|
|
|
|
|
filterInvWarehouseRequest.setSuperiorCode(invWarehouseEntity.getCode());
|
|
|
|
|
filterInvWarehouseRequest.setSuperiorPcode(invWarehouseEntity.getPcode());
|
|
|
|
|
filterInvWarehouseRequest.setCode(null);
|
|
|
|
|
}else {
|
|
|
|
|
return ResultVOUtils.error(999,"分库编号为空!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
//允许调拨
|
|
|
|
|
//查询总库信息
|
|
|
|
|
InvSubWarehouseEntity invSubWarehouseEntity = invSubWarehouseService.filterGroupInvSubAndcode(filterInvWarehouseRequest.getCode());
|
|
|
|
|
filterInvWarehouseRequest.setWarehouseCode(invSubWarehouseEntity.getParentId());
|
|
|
|
|
filterInvWarehouseRequest.setCode(null);
|
|
|
|
|
}else {
|
|
|
|
|
return ResultVOUtils.error(999,"分库编号为空!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
//允许调拨
|
|
|
|
|
//查询总库信息
|
|
|
|
|
InvSubWarehouseEntity invSubWarehouseEntity = invSubWarehouseService.filterGroupInvSubAndcode(filterInvWarehouseRequest.getCode());
|
|
|
|
|
filterInvWarehouseRequest.setWarehouseCode(invSubWarehouseEntity.getParentId());
|
|
|
|
|
filterInvWarehouseRequest.setCode(null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|