采购退料单

This commit is contained in:
2025-11-21 18:09:44 +08:00
parent 34c32c7e46
commit 95b488f630
12 changed files with 117 additions and 46 deletions

View File

@@ -16,6 +16,10 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
/// </summary> /// </summary>
public int? FID { get; set; } public int? FID { get; set; }
/// <summary>
/// 单据编号
/// </summary>
public string FBillNo { get; set; }
/// <summary> /// <summary>
/// 单据类型 /// 单据类型
/// </summary> /// </summary>
@@ -127,6 +131,8 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
/// </summary> /// </summary>
public class FRequireOrgId public class FRequireOrgId
{ {
public string FOrgId { get; set; }
/// <summary> /// <summary>
/// 编码 /// 编码
/// </summary> /// </summary>
@@ -233,6 +239,13 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
/// </summary> /// </summary>
public class FPURMRBENTRY public class FPURMRBENTRY
{ {
/// <summary>
/// 条码
/// </summary>
public string Fcode { get; set; }
/// <summary> /// <summary>
/// 产品类型 /// 产品类型
/// </summary> /// </summary>
@@ -248,6 +261,17 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
/// </summary> /// </summary>
public string FMaterialDesc { get; set; } public string FMaterialDesc { get; set; }
/// <summary>
/// 仓库
/// </summary>
public FStockID FStockID { get; set; }
/// <summary>
/// 库存状态
/// </summary>
public FStockStatusId FStockStatusId { get; set; }
/// <summary> /// <summary>
/// 库存单位 /// 库存单位
/// </summary> /// </summary>
@@ -426,6 +450,11 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
/// </summary> /// </summary>
public class FCARRYUNITID public class FCARRYUNITID
{ {
/// <summary>
/// 组织内码
/// </summary>
public string FOrgId { get; set; }
/// <summary> /// <summary>
/// 编码 /// 编码
/// </summary> /// </summary>

View File

@@ -21,14 +21,15 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
/// <20><><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD> /// <20><><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>
/// </summary> /// </summary>
public string FBillNo { get; set; } public string FBillNo { get; set; }
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֯
/// </summary>
public FStockOrgId FStockOrgId { get; set; }
/// <summary> /// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> /// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary> /// </summary>
public string FDate { get; set; } public string FDate { get; set; }
/// <summary> /// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֯
/// </summary>
public FStockOrgId FStockOrgId { get; set; }
/// <summary> /// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֯ /// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֯
/// </summary> /// </summary>
@@ -142,6 +143,12 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public class FSalOutStockOrgId public class FSalOutStockOrgId
{ {
/// <summary>
/// <20><>֯<EFBFBD><D6AF><EFBFBD><EFBFBD>
/// </summary>
public string FOrgId { get; set; }
/// <summary> /// <summary>
/// <20><><EFBFBD><EFBFBD> /// <20><><EFBFBD><EFBFBD>
/// </summary> /// </summary>

View File

@@ -53,6 +53,13 @@ namespace MyCode.Project.Domain.Message.Response.JackYun
/// </summary> /// </summary>
public string VendCustomerName { get; set; } public string VendCustomerName { get; set; }
/// <summary>
/// Desc:往来单位编号
/// Default:
/// Nullable:True
/// </summary>
public string VendCustomerCode { get; set; }
/// <summary> /// <summary>
/// 币种编号 /// 币种编号
/// </summary> /// </summary>

View File

@@ -269,7 +269,7 @@ namespace MyCode.Project.Domain.Model
public decimal? BaceCurrencyWithTaxAmount {get;set;} public decimal? BaceCurrencyWithTaxAmount {get;set;}
/// <summary> /// <summary>
/// Desc:baceCurrencyTaxAmount /// Desc:本币税额(货品行数据)
/// Default: /// Default:
/// Nullable:True /// Nullable:True
/// </summary> /// </summary>

View File

@@ -310,5 +310,13 @@ namespace MyCode.Project.Domain.Model
/// </summary> /// </summary>
public int? Status {get;set;} public int? Status {get;set;}
/// <summary>
/// Desc:
/// Default:
/// Nullable:False
/// </summary>
[SugarColumn(IsIdentity=true)]
public int SortId {get;set;}
} }
} }

View File

@@ -548,5 +548,12 @@ namespace MyCode.Project.Domain.Model
/// </summary> /// </summary>
public int? Status {get;set;} public int? Status {get;set;}
/// <summary>
/// Desc:往来单位编号
/// Default:
/// Nullable:True
/// </summary>
public string VendCustomerCode {get;set;}
} }
} }

View File

@@ -246,7 +246,7 @@ namespace MyCode.Project.Domain.Model
public string FPURCHASINGWAREHOUSECODE {get;set;} public string FPURCHASINGWAREHOUSECODE {get;set;}
/// <summary> /// <summary>
/// Desc:采购组织ID /// Desc:采购组织
/// Default: /// Default:
/// Nullable:True /// Nullable:True
/// </summary> /// </summary>
@@ -254,7 +254,7 @@ namespace MyCode.Project.Domain.Model
public int? FPURCHASEORGID {get;set;} public int? FPURCHASEORGID {get;set;}
/// <summary> /// <summary>
/// Desc:采购日期 /// Desc:开始抓采购入库单开始时间
/// Default: /// Default:
/// Nullable:True /// Nullable:True
/// </summary> /// </summary>

View File

@@ -389,7 +389,7 @@ namespace MyCode.Project.Services.Implementation
requestBizData.PageSize = 200; requestBizData.PageSize = 200;
requestBizData.PageIndex = 0; requestBizData.PageIndex = 0;
requestBizData.SelelctFields = "recId,goodsdocNo,billNo,inOutDate,gmtCreate,inouttype,inouttypeName,vendCustomerName,currencyCode,currencyRate,userName,warehouseCode,warehouseName,comment,memo,logisticName,logisticNo,companyId,companyName,logisticType,logisticCode,inOutReason,sourceBillNo,channelId,channelCode,channelName,redStatus,field1,field2,field3,field4,field5,financeBillStatus,vendCustomerId,applyDepartId,applyDepartName,outBillNo,logisticList,gmtModified,departCode,applyCompanyName,applyCompanyCode,applyCompanyId,applyUserId,applyUserName,companyCode,goodsDocDetailList,sendCompanyName,send,sendTel,sendPhone,sendEmail,sendCountryName,sendProvinceName,sendCityName,sendTownName,sendStreetName,sendAddress,receiveCompanyName,receive,receiveTel,receivePhone,receiveEmail,receiveCountryName,receiveProvinceName,receiveCityName,receiveTownName,receiveStreetName,receiveAddress" + requestBizData.SelelctFields = "vendCustomerCode,recId,goodsdocNo,billNo,inOutDate,gmtCreate,inouttype,inouttypeName,vendCustomerName,currencyCode,currencyRate,userName,warehouseCode,warehouseName,comment,memo,logisticName,logisticNo,companyId,companyName,logisticType,logisticCode,inOutReason,sourceBillNo,channelId,channelCode,channelName,redStatus,field1,field2,field3,field4,field5,financeBillStatus,vendCustomerId,applyDepartId,applyDepartName,outBillNo,logisticList,gmtModified,departCode,applyCompanyName,applyCompanyCode,applyCompanyId,applyUserId,applyUserName,companyCode,goodsDocDetailList,sendCompanyName,send,sendTel,sendPhone,sendEmail,sendCountryName,sendProvinceName,sendCityName,sendTownName,sendStreetName,sendAddress,receiveCompanyName,receive,receiveTel,receivePhone,receiveEmail,receiveCountryName,receiveProvinceName,receiveCityName,receiveTownName,receiveStreetName,receiveAddress" +
",goodsDocDetailList.recId,goodsDocDetailList.goodsId,goodsDocDetailList.goodsNo,goodsDocDetailList.goodsName,goodsDocDetailList.skuId,goodsDocDetailList.skuName,goodsDocDetailList.skuBarcode,goodsDocDetailList.unitName,goodsDocDetailList.cuPrice,goodsDocDetailList.cuValue,goodsDocDetailList.caseNumber,goodsDocDetailList.rowRemark,goodsDocDetailList.assistUnit,goodsDocDetailList.estCost,goodsDocDetailList.estTax,goodsDocDetailList.estPrice,goodsDocDetailList.estPriceNoTax,goodsDocDetailList.estCostNoTax,goodsDocDetailList.taxRate,goodsDocDetailList.batchNo,goodsDocDetailList.serialNo,goodsDocDetailList.productionDate,goodsDocDetailList.expirationDate,goodsDocDetailList.shelfLife,goodsDocDetailList.shelfLiftUnit,goodsDocDetailList.sourceDetailId,goodsDocDetailList.transNoTaxPrice,goodsDocDetailList.transNoTaxAmount,goodsDocDetailList.transHasTaxPrice,goodsDocDetailList.transHasTaxAmount" + ",goodsDocDetailList.recId,goodsDocDetailList.goodsId,goodsDocDetailList.goodsNo,goodsDocDetailList.goodsName,goodsDocDetailList.skuId,goodsDocDetailList.skuName,goodsDocDetailList.skuBarcode,goodsDocDetailList.unitName,goodsDocDetailList.cuPrice,goodsDocDetailList.cuValue,goodsDocDetailList.caseNumber,goodsDocDetailList.rowRemark,goodsDocDetailList.assistUnit,goodsDocDetailList.estCost,goodsDocDetailList.estTax,goodsDocDetailList.estPrice,goodsDocDetailList.estPriceNoTax,goodsDocDetailList.estCostNoTax,goodsDocDetailList.taxRate,goodsDocDetailList.batchNo,goodsDocDetailList.serialNo,goodsDocDetailList.productionDate,goodsDocDetailList.expirationDate,goodsDocDetailList.shelfLife,goodsDocDetailList.shelfLiftUnit,goodsDocDetailList.sourceDetailId,goodsDocDetailList.transNoTaxPrice,goodsDocDetailList.transNoTaxAmount,goodsDocDetailList.transHasTaxPrice,goodsDocDetailList.transHasTaxAmount" +
",goodsDocDetailList.transTaxAmount,goodsDocDetailList.detailField1,goodsDocDetailList.detailField2,goodsDocDetailList.detailField3,goodsDocDetailList.detailField4,goodsDocDetailList.detailField5,goodsDocDetailList.isCertified,goodsDocDetailList.registrationNumber,goodsDocDetailList.approvalDate,goodsDocDetailList.productionDepart,goodsDocDetailList.batchNumber,goodsDocDetailList.quantity,goodsDocDetailList.cateId,goodsDocDetailList.cateName,goodsDocDetailList.volume,goodsDocDetailList.skuWeight"; ",goodsDocDetailList.transTaxAmount,goodsDocDetailList.detailField1,goodsDocDetailList.detailField2,goodsDocDetailList.detailField3,goodsDocDetailList.detailField4,goodsDocDetailList.detailField5,goodsDocDetailList.isCertified,goodsDocDetailList.registrationNumber,goodsDocDetailList.approvalDate,goodsDocDetailList.productionDepart,goodsDocDetailList.batchNumber,goodsDocDetailList.quantity,goodsDocDetailList.cateId,goodsDocDetailList.cateName,goodsDocDetailList.volume,goodsDocDetailList.skuWeight";
@@ -443,10 +443,10 @@ namespace MyCode.Project.Services.Implementation
var warehouseCodes = shopConfigs.Select(t => t.FPURCHASINGWAREHOUSECODE).Distinct().ToList(); var warehouseCodes = shopConfigs.Select(t => t.FPURCHASINGWAREHOUSECODE).Distinct().ToList();
var guolv = shopConfigs.Select(t => new { t.FPURCHASINGWAREHOUSECODE, t.FPURCHASEDATE }).ToList(); var guolv = shopConfigs.Select(t => new { t.FPURCHASINGWAREHOUSECODE, t.FPURCHASEDATE }).ToList();
trades = trades.Where(t => warehouseCodes.Contains(t.WarehouseCode)).ToList(); trades = trades.Where(t => warehouseCodes.Contains(t.WarehouseCode)).ToList();
foreach (var item in guolv) //foreach (var item in guolv)
{ //{
trades.RemoveAll(t => item.FPURCHASINGWAREHOUSECODE == t.WarehouseCode && item.FPURCHASEDATE > t.InOutDate); // trades.RemoveAll(t => item.FPURCHASINGWAREHOUSECODE == t.WarehouseCode && item.FPURCHASEDATE > t.InOutDate);
} //}
return trades; return trades;

View File

@@ -6,6 +6,7 @@ using MyCode.Project.Domain.Model;
using MyCode.Project.Domain.Repositories; using MyCode.Project.Domain.Repositories;
using MyCode.Project.Infrastructure.Common; using MyCode.Project.Infrastructure.Common;
using MyCode.Project.Infrastructure.Exceptions; using MyCode.Project.Infrastructure.Exceptions;
using MyCode.Project.Infrastructure.Extensions;
using MyCode.Project.OutSideService; using MyCode.Project.OutSideService;
using MyCode.Project.Services.IServices; using MyCode.Project.Services.IServices;
using System; using System;
@@ -68,7 +69,7 @@ namespace MyCode.Project.Services.Implementation
throw new BaseException($"未找到ID为 {id} 的采购退料单记录"); throw new BaseException($"未找到ID为 {id} 的采购退料单记录");
} }
if (outHead.Status != 0 && outHead.Status != 1) if (outHead.Status ==2 )
{ {
throw new BaseException($"采购退料单 {outHead.GoodsdocNo} 已经推送过,状态为:{outHead.Status},不允许重复推送"); throw new BaseException($"采购退料单 {outHead.GoodsdocNo} 已经推送过,状态为:{outHead.Status},不允许重复推送");
} }
@@ -161,7 +162,7 @@ namespace MyCode.Project.Services.Implementation
BillSave billSave = new BillSave() BillSave billSave = new BillSave()
{ {
Model = model, Model = model,
IsAutoSubmitAndAudit = true, IsAutoSubmitAndAudit = false,
}; };
// 调用金蝶服务保存单据 // 调用金蝶服务保存单据
@@ -198,22 +199,31 @@ namespace MyCode.Project.Services.Implementation
return new FPURMRBENTRY() return new FPURMRBENTRY()
{ {
Fcode = detail.SkuBarcode ?? "",
FRowType = rowType, FRowType = rowType,
FMATERIALID = new FMATERIALID() //FMATERIALID = new FMATERIALID()
{ //{
FNumber = detail.SkuBarcode ?? "" // FNumber = detail.SkuBarcode ?? ""
}, //},
FMaterialDesc = detail.GoodsName ?? "", //FMaterialDesc = detail.GoodsName ?? "",
FUnitID = new FUnitID() //FUnitID = new FUnitID()
{ //{
FNumber = detail.UnitName ?? DEFAULT_UNIT // FNumber = detail.UnitName ?? DEFAULT_UNIT
}, //},
FRMREALQTY = realQty, FRMREALQTY = realQty,
FREPLENISHQTY = 0, FREPLENISHQTY = 0,
FKEAPAMTQTY = 0, FKEAPAMTQTY = 0,
FPRICEUNITID = new FPRICEUNITID() //FPRICEUNITID = new FPRICEUNITID()
//{
// FNumber = detail.UnitName ?? DEFAULT_UNIT
//},
FStockID = new FStockID()
{ {
FNumber = detail.UnitName ?? DEFAULT_UNIT FNumber = param.FPURCHASINGWAREHOUSECODE
},
FStockStatusId = new FStockStatusId()
{
FNumber = "KCZT01_SYS"
}, },
FPrice = price, FPrice = price,
FExtAuxUnitQty = 0, FExtAuxUnitQty = 0,
@@ -223,18 +233,18 @@ namespace MyCode.Project.Services.Implementation
FPriceBaseQty = realQty, FPriceBaseQty = realQty,
FCARRYUNITID = new FCARRYUNITID() FCARRYUNITID = new FCARRYUNITID()
{ {
FNumber = detail.UnitName ?? DEFAULT_UNIT FOrgId = param.FPURCHASEORGID.SafeValue().ToString(),
}, },
FCarryQty = 0, FCarryQty = realQty,
FCarryBaseQty = 0, FCarryBaseQty = realQty,
FPOORDERENTRYID = 0,
FBILLINGCLOSE = false, FBILLINGCLOSE = false,
FRMMUSTQTY = realQty, FRMMUSTQTY = realQty,
FAUXUNITQTY = 0, FAUXUNITQTY = 0,
FOWNERTYPEID = OWNER_TYPE, FOWNERTYPEID = OWNER_TYPE,
FOWNERID = new FOwnerId() FOWNERID = new FOwnerId()
{ {
FNumber = orgId FOrgId = orgId
}, },
FENTRYTAXRATE = taxRate, FENTRYTAXRATE = taxRate,
FDISCOUNTRATE = 0, FDISCOUNTRATE = 0,
@@ -266,13 +276,14 @@ namespace MyCode.Project.Services.Implementation
string dateStr = outDate?.ToString("yyyy-MM-dd HH:mm:ss") ?? DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); string dateStr = outDate?.ToString("yyyy-MM-dd HH:mm:ss") ?? DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
// 获取供应商编码 // 获取供应商编码
string supplierCode = outHead.VendCustomerId ?? ""; string supplierCode = outHead.VendCustomerCode ?? "";
// 构建收货地址(从收件人地址字段组合) // 构建收货地址(从收件人地址字段组合)
string acceptAddress = BuildAcceptAddress(outHead); string acceptAddress = BuildAcceptAddress(outHead);
return new PurchaseReturnModel() return new PurchaseReturnModel()
{ {
FBillNo = outHead.GoodsdocNo,
FID = 0, FID = 0,
FBillTypeID = new FBillTypeID() FBillTypeID = new FBillTypeID()
{ {
@@ -283,21 +294,22 @@ namespace MyCode.Project.Services.Implementation
FMRMODE = MR_MODE, FMRMODE = MR_MODE,
FStockOrgId = new FStockOrgId() FStockOrgId = new FStockOrgId()
{ {
FNumber = orgId FOrgId = orgId
}, },
FIsConvert = false, FIsConvert = false,
FRequireOrgId = new FRequireOrgId() FRequireOrgId = new FRequireOrgId()
{ {
FNumber = orgId FOrgId = orgId
}, },
FPurchaseOrgId = new FPurchaseOrgId() FPurchaseOrgId = new FPurchaseOrgId()
{ {
FNumber = orgId FOrgId = orgId
}, },
FSupplierID = !string.IsNullOrEmpty(supplierCode) ? new FSupplierID() FSupplierID = new FSupplierID()
{ {
FNumber = supplierCode FNumber = supplierCode
} : null, },
FACCEPTORID = !string.IsNullOrEmpty(supplierCode) ? new FACCEPTORID() FACCEPTORID = !string.IsNullOrEmpty(supplierCode) ? new FACCEPTORID()
{ {
FNumber = supplierCode FNumber = supplierCode
@@ -314,36 +326,36 @@ namespace MyCode.Project.Services.Implementation
FOwnerTypeIdHead = OWNER_TYPE, FOwnerTypeIdHead = OWNER_TYPE,
FOwnerIdHead = new FOwnerIdHead() FOwnerIdHead = new FOwnerIdHead()
{ {
FNumber = orgId FOrgId = orgId
}, },
FCDateOffsetValue = 0,
FAcceptorContactID = null, // 如果需要联系人,可以从其他字段获取 FAcceptorContactID = null, // 如果需要联系人,可以从其他字段获取
FSalOutStockOrgId = new FSalOutStockOrgId() FSalOutStockOrgId = new FSalOutStockOrgId()
{ {
FNumber = orgId FOrgId = orgId
}, },
FACCTYPE = ACCT_TYPE, FACCTYPE = ACCT_TYPE,
FPURMRBFIN = new FPURMRBFIN() FPURMRBFIN = new FPURMRBFIN()
{ {
FSettleOrgId = new FSettleOrgId() FSettleOrgId = new FSettleOrgId()
{ {
FNumber = orgId FOrgId = orgId
}, },
FSettleCurrId = new FSettleCurrId() FSettleCurrId = new FSettleCurrId()
{ {
FNumber = outHead.CurrencyCode ?? DEFAULT_CURRENCY FNumber = DEFAULT_CURRENCY
}, },
FIsIncludedTax = true, FIsIncludedTax = true,
FPRICETIMEPOINT = "1", FPRICETIMEPOINT = "1",
FLOCALCURRID = new FLocalCurrId() FLOCALCURRID = new FLocalCurrId()
{ {
FNumber = outHead.CurrencyCode ?? DEFAULT_CURRENCY FNumber = DEFAULT_CURRENCY
}, },
FEXCHANGETYPEID = new FExchangeTypeId() FEXCHANGETYPEID = new FExchangeTypeId()
{ {
FNumber = EXCHANGE_TYPE FNumber = EXCHANGE_TYPE
}, },
FEXCHANGERATE = outHead.CurrencyRate ?? 1m, FEXCHANGERATE = 1m,
FISPRICEEXCLUDETAX = true, FISPRICEEXCLUDETAX = true,
FHSExchangeRate = 1m FHSExchangeRate = 1m
}, },

View File

@@ -259,6 +259,7 @@ namespace MyCode.Project.Services.Implementation
return new PurchaseStockInModel() return new PurchaseStockInModel()
{ {
FBillNo= goodsDocIn.GoodsdocNo,
FID = 0, FID = 0,
FBillTypeID = new FBillTypeID() FBillTypeID = new FBillTypeID()
{ {

View File

@@ -44,7 +44,7 @@ namespace MyCode.Project.Services.Implementation
DateTime now = DateTime.Now.Date; DateTime now = DateTime.Now.Date;
_workProcessService.Add<IJackYunTaskService>(this.MerchantId, "TaskGetJackYunOrder", "调度运行抓吉客云销售订单", now.ToString("yyyy-MM-dd"), 1); _workProcessService.Add<IJackYunTaskService>(this.MerchantId, "TaskGetJackYunOrder", "调度运行抓吉客云销售订单", now.ToString("yyyy-MM-dd"), 1);
_workProcessService.Add<IJackYunTaskService>(this.MerchantId, "TaskGetReturnChangeList", "调度运行抓吉客云退货订单", now.ToString("yyyy-MM-dd"), 1); _workProcessService.Add<IJackYunTaskService>(this.MerchantId, "TaskGetReturnChangeList", "调度运行抓吉客云退货订单", now.ToString("yyyy-MM-dd"), 1);
//_workProcessService.Add<IJackYunTaskService>(this.MerchantId, "GetPurchaseInboundData", "调度运行吉客云采购入库", now.ToString("yyyy-MM-dd"), 1); _workProcessService.Add<IJackYunTaskService>(this.MerchantId, "GetPurchaseInboundData", "调度运行吉客云采购入库", now.ToString("yyyy-MM-dd"), 1);
//_workProcessService.Add<IJackYunTaskService>(this.MerchantId, "GetStorageGoodsDocOutV2", "获取吉客云采购退货出库单", now.ToString("yyyy-MM-dd"), 1); //_workProcessService.Add<IJackYunTaskService>(this.MerchantId, "GetStorageGoodsDocOutV2", "获取吉客云采购退货出库单", now.ToString("yyyy-MM-dd"), 1);
} }
#endregion #endregion

View File

@@ -309,10 +309,10 @@ namespace MyCode.Project.WebApi.Controllers
} }
#endregion #endregion
#region #region 退
/// <summary> /// <summary>
/// 调度运行吉客云采购出库 /// 获取吉客云采购退料
/// </summary> /// </summary>
[HttpGet] [HttpGet]
[AllowAnonymous] [AllowAnonymous]