This commit is contained in:
2025-11-17 10:15:22 +08:00
8 changed files with 364 additions and 75 deletions

View File

@@ -37,6 +37,7 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public class FOwnerIdHead public class FOwnerIdHead
{ {
public string FOrgId { get; set; }
public string FNumber { get; set; } public string FNumber { get; set; }
} }
@@ -61,6 +62,7 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public class FSettleOrgId public class FSettleOrgId
{ {
public string FOrgId { get; set; }
public string FNumber { get; set; } public string FNumber { get; set; }
} }

View File

@@ -554,6 +554,8 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public class FStockOrgId public class FStockOrgId
{ {
public string FOrgId { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@@ -590,6 +592,8 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
/// ///
/// </summary> /// </summary>
public string FNumber { get; set; } public string FNumber { get; set; }
public string FOrgId { get; set; }
} }
public class FSOStockId public class FSOStockId

View File

@@ -1,4 +1,6 @@
using Newtonsoft.Json;
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
@@ -45,6 +47,7 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public class FSettleOrgID public class FSettleOrgID
{ {
public string FOrgId { get; set; }
public string FNumber { get; set; } public string FNumber { get; set; }
} }
@@ -58,7 +61,7 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public string FNumber { get; set; } public string FNumber { get; set; }
} }
public class FSalesOutboundEntryItem public class FSalesOutboundEntryItemOld
{ {
public string FRowType { get; set; } public string FRowType { get; set; }
public FMaterialID FMaterialID { get; set; } public FMaterialID FMaterialID { get; set; }
@@ -104,6 +107,231 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public bool? FVmiBusinessStatus { get; set; } public bool? FVmiBusinessStatus { get; set; }
} }
/// <summary>
/// <20><><EFBFBD>۳<EFBFBD><DBB3><EFBFBD><E2B5A5>ϸ<EFBFBD><CFB8>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>۳<EFBFBD><DBB3><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD><CFB8>Ϣ
/// </summary>
public class FSalesOutboundEntryItem
{
/// <summary>
/// <20><><EFBFBD><EFBFBD>
/// </summary>
public string Fcode { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string FRowType { get; set; }
/// <summary>
/// <20><><EFBFBD>ϱ<EFBFBD>ʶ
/// </summary>
public FMaterialID FMaterialID { get; set; }
/// <summary>
/// <20><>λ<EFBFBD><CEBB>ʶ
/// </summary>
public FUnitID FUnitID { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public decimal? FInventoryQty { get; set; }
/// <summary>
/// ʵ<>ʳ<EFBFBD><CAB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public decimal? FRealQty { get; set; }
/// <summary>
/// <20>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public decimal? FDisPriceQty { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD>
/// </summary>
public decimal? FPrice { get; set; }
/// <summary>
/// <20><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>
/// </summary>
public decimal? FTaxPrice { get; set; }
/// <summary>
/// <20>Ƿ<EFBFBD><C7B7><EFBFBD>Ʒ
/// </summary>
public bool? FIsFree { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͱ<EFBFBD>ʶ
/// </summary>
public string FOwnerTypeID { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ
/// </summary>
public FOwnerID FOwnerID { get; set; }
/// <summary>
/// <20><>˰<EFBFBD><CBB0>
/// </summary>
public decimal? FEntryTaxRate { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
/// </summary>
public decimal? FAuxUnitQty { get; set; }
/// <summary>
/// <20>ⲿ<EFBFBD><E2B2BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
/// </summary>
public decimal? FExtAuxUnitQty { get; set; }
public FStockID FStockID { get; set; }
/// <summary>
/// Դ<><D4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string FSrcType { get; set; }
/// <summary>
/// Դ<><D4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string FSrcBillNo { get; set; }
/// <summary>
/// <20>ۿ<EFBFBD><DBBF><EFBFBD>
/// </summary>
public decimal? FDiscountRate { get; set; }
/// <summary>
/// <20>۸<EFBFBD><DBB8>ۿ<EFBFBD>
/// </summary>
public decimal? FPriceDiscount { get; set; }
/// <summary>
/// ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public decimal? FActQty { get; set; }
/// <summary>
/// <20><><EFBFBD>۵<EFBFBD>λ<EFBFBD><CEBB>ʶ
/// </summary>
public FSalUnitID FSalUnitID { get; set; }
/// <summary>
/// <20><><EFBFBD>۵<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
/// </summary>
public decimal? FSALUNITQTY { get; set; }
/// <summary>
/// <20><><EFBFBD>ۻ<EFBFBD><DBBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public decimal? FSALBASEQTY { get; set; }
/// <summary>
/// <20>۸<EFBFBD><DBB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public decimal? FPRICEBASEQTY { get; set; }
/// <summary>
/// <20>Ƿ񳬷<C7B7><F1B3ACB7><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public bool? FOUTCONTROL { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public decimal? FRepairQty { get; set; }
/// <summary>
/// <20>Ƿ<EFBFBD><C7B7><EFBFBD><E7B7A8><EFBFBD><EFBFBD>֯
/// </summary>
public bool? FIsOverLegalOrg { get; set; }
/// <summary>
/// δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public decimal? FARNOTJOINQTY { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼ID
/// </summary>
public int? FQmEntryID { get; set; }
/// <summary>
/// ת<><D7AA><EFBFBD><EFBFBD>¼ID
/// </summary>
public int? FConvertEntryID { get; set; }
/// <summary>
/// <20><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD><EFBFBD><EFBFBD>¼ID
/// </summary>
public int? FSOEntryId { get; set; }
/// <summary>
/// <20>ۿ<EFBFBD>ǰ<EFBFBD>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public decimal? FBeforeDisPriceQty { get; set; }
/// <summary>
/// ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public decimal? FSignQty { get; set; }
/// <summary>
/// <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><E9BDBB>
/// </summary>
public bool? FCheckDelivery { get; set; }
/// <summary>
/// <20>ۿ<EFBFBD>ǰ<EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
/// </summary>
public decimal? FAllAmountExceptDisCount { get; set; }
/// <summary>
/// <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>֯<EFBFBD><D6AF><EFBFBD><EFBFBD>
/// </summary>
public bool? FSettleBySon { get; set; }
/// <summary>
/// BOM<4F><4D>¼ID
/// </summary>
public int? FBOMEntryId { get; set; }
/// <summary>
/// <20>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>
/// </summary>
public decimal? F_dmi_Amount { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD>ʶ
/// </summary>
public FMaterialID_Sal FMaterialID_Sal { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼ID
/// </summary>
public int? FInStockEntryId { get; set; }
/// <summary>
/// <20>տ<EFBFBD><D5BF><EFBFBD>¼ID
/// </summary>
public int? FReceiveEntryId { get; set; }
/// <summary>
/// <20>Ƿ<EFBFBD><C7B7><EFBFBD><E6BBBB><EFBFBD><EFBFBD>
/// </summary>
public bool? FIsReplaceOut { get; set; }
/// <summary>
/// VMIҵ<49><D2B5>״̬
/// </summary>
public bool? FVmiBusinessStatus { get; set; }
}
public class FMaterialID public class FMaterialID
{ {
public string FNumber { get; set; } public string FNumber { get; set; }
@@ -111,6 +339,7 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public class FOwnerID public class FOwnerID
{ {
public string FOrgId { get; set; }
public string FNumber { get; set; } public string FNumber { get; set; }
} }
@@ -127,6 +356,11 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public class FCustomerID public class FCustomerID
{ {
public string FNumber { get; set; } public string FNumber { get; set; }
/// <summary>
/// <20>ͻ<EFBFBD>ID
/// </summary>
public string FCustId { get; set; }
} }
public class FSaleDeptID public class FSaleDeptID
@@ -153,5 +387,12 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
{ {
public string FNumber { get; set; } public string FNumber { get; set; }
} }
public class FStockID
{
public string FstockId { get; set; }
public string FNumber { get; set; }
}
} }

View File

@@ -36,6 +36,10 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public class FRetcustId public class FRetcustId
{ {
/// <summary>
/// <20>ͻ<EFBFBD>ID
/// </summary>
public string FCustId { get; set; }
public string FNumber { get; set; } public string FNumber { get; set; }
} }
@@ -56,25 +60,39 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public class FReceiveCustId public class FReceiveCustId
{ {
/// <summary>
/// <20>ͻ<EFBFBD>ID
/// </summary>
public string FCustId { get; set; }
public string FNumber { get; set; } public string FNumber { get; set; }
} }
public class FSettleCustId public class FSettleCustId
{ {
/// <summary>
/// <20>ͻ<EFBFBD>ID
/// </summary>
public string FCustId { get; set; }
public string FNumber { get; set; } public string FNumber { get; set; }
} }
public class FPayCustId public class FPayCustId
{ {
public string FCustId { get; set; }
public string FNumber { get; set; } public string FNumber { get; set; }
} }
public class FSalesReturnEntryItem public class FSalesReturnEntryItem
{ {
/// <summary>
/// <20><><EFBFBD><EFBFBD>
/// </summary>
public string Fcode { get; set; }
public string FRowType { get; set; } public string FRowType { get; set; }
public FMaterialId FMaterialId { get; set; } public FMaterialId FMaterialId { get; set; }
public FUnitID FUnitID { get; set; } public FUnitID FUnitID { get; set; }
public decimal? FInventoryQty { get; set; } //public decimal? FInventoryQty { get; set; }
public decimal? FRealQty { get; set; } public decimal? FRealQty { get; set; }
public decimal? FPrice { get; set; } public decimal? FPrice { get; set; }
public decimal? FTaxPrice { get; set; } public decimal? FTaxPrice { get; set; }
@@ -83,6 +101,9 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public FReturnType FReturnType { get; set; } public FReturnType FReturnType { get; set; }
public string FOwnerTypeId { get; set; } public string FOwnerTypeId { get; set; }
public FOwnerId FOwnerId { get; set; } public FOwnerId FOwnerId { get; set; }
public FStockstatusId FStockstatusId { get; set; }
public FStockID FStockID { get; set; }
public string FDeliveryDate { get; set; } public string FDeliveryDate { get; set; }
public decimal? FDiscountRate { get; set; } public decimal? FDiscountRate { get; set; }
public decimal? FPriceDiscount { get; set; } public decimal? FPriceDiscount { get; set; }
@@ -96,7 +117,7 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public decimal? FSalBaseQty { get; set; } public decimal? FSalBaseQty { get; set; }
public decimal? FPriceBaseQty { get; set; } public decimal? FPriceBaseQty { get; set; }
public bool? FIsOverLegalOrg { get; set; } public bool? FIsOverLegalOrg { get; set; }
public int? FSOEntryId { get; set; } //public int? FSOEntryId { get; set; }
public decimal? FARNOTJOINQTY { get; set; } public decimal? FARNOTJOINQTY { get; set; }
public bool? FIsReturnCheck { get; set; } public bool? FIsReturnCheck { get; set; }
public bool? FSettleBySon { get; set; } public bool? FSettleBySon { get; set; }
@@ -111,5 +132,10 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
{ {
public string FNumber { get; set; } public string FNumber { get; set; }
} }
public class FStockstatusId
{
public string FNumber { get; set; }
}
} }

View File

@@ -185,7 +185,7 @@ namespace MyCode.Project.Services.Implementation
} }
pushKingDeeOrders.ForEach(t => pushKingDeeOrders.ForEach(t =>
{ {
_workProcessService.Add<IOrderPushService>(this.MerchantId, "PushOrderToKingDee", "推送订单到云星空或者WMS", t.Id, 1); //_workProcessService.Add<IOrderPushService>(this.MerchantId, "PushOrderToKingDee", "推送订单到云星空或者WMS", t.Id, 1);
Thread.Sleep(300); Thread.Sleep(300);
}); });

View File

@@ -25,7 +25,7 @@ namespace MyCode.Project.Services.Implementation
private const string EXCHANGE_TYPE = "HLTX01_SYS"; private const string EXCHANGE_TYPE = "HLTX01_SYS";
private const string DEFAULT_ORG = "100"; private const string DEFAULT_ORG = "100";
private const string DEFAULT_CURRENCY = "PRE001"; private const string DEFAULT_CURRENCY = "PRE001";
private const string DEFAULT_UNIT = "Pcs"; private const string DEFAULT_UNIT = "";
private const string ROW_TYPE_STANDARD = "Standard"; private const string ROW_TYPE_STANDARD = "Standard";
private const string ROW_TYPE_SERVICE = "Service"; private const string ROW_TYPE_SERVICE = "Service";
private const string FORM_ID = "SAL_OUTSTOCK"; private const string FORM_ID = "SAL_OUTSTOCK";
@@ -65,7 +65,7 @@ namespace MyCode.Project.Services.Implementation
throw new BaseException($"未找到ID为 {id} 的销售出库单记录"); throw new BaseException($"未找到ID为 {id} 的销售出库单记录");
} }
if (orderHead.Status != 0) if (orderHead.Status == 2)
{ {
throw new BaseException($"销售出库单 {orderHead.Sheet} 已经推送过,状态为:{orderHead.Status},不允许重复推送"); throw new BaseException($"销售出库单 {orderHead.Sheet} 已经推送过,状态为:{orderHead.Status},不允许重复推送");
} }
@@ -130,9 +130,10 @@ namespace MyCode.Project.Services.Implementation
// 获取销售组织ID // 获取销售组织ID
string orgId = param.FSALEORGID?.ToString() ?? DEFAULT_ORG; string orgId = param.FSALEORGID?.ToString() ?? DEFAULT_ORG;
// 获取仓库编码
string warehouseCode = orderHead.WarehouseCode ?? param.FWAREHOUSECODE ?? "";
// 获取仓库编码
//string warehouseCode = orderHead.WarehouseCode ?? param.FWAREHOUSECODE ?? "";
string warehouseCode = param.FWAREHOUSECODE ;
// 数据校验 // 数据校验
if (string.IsNullOrEmpty(warehouseCode)) if (string.IsNullOrEmpty(warehouseCode))
{ {
@@ -154,7 +155,7 @@ namespace MyCode.Project.Services.Implementation
BillSave billSave = new BillSave() BillSave billSave = new BillSave()
{ {
Model = model, Model = model,
IsAutoSubmitAndAudit = true, IsAutoSubmitAndAudit = false,
}; };
// 调用金蝶服务保存单据 // 调用金蝶服务保存单据
@@ -184,15 +185,16 @@ namespace MyCode.Project.Services.Implementation
return new FSalesOutboundEntryItem() return new FSalesOutboundEntryItem()
{ {
Fcode= item.Barcode ?? "",
FRowType = rowType, FRowType = rowType,
FMaterialID = new FMaterialID() //FMaterialID = new FMaterialID()
{ //{
FNumber = item.Barcode ?? "" // FNumber = item.Barcode ?? ""
}, //},
FUnitID = new FUnitID() //FUnitID = new FUnitID()
{ //{
FNumber = item.Unit ?? DEFAULT_UNIT // FNumber = item.Unit ?? DEFAULT_UNIT
}, //},
FInventoryQty = 0, FInventoryQty = 0,
FRealQty = realQty, FRealQty = realQty,
FDisPriceQty = 0, FDisPriceQty = 0,
@@ -202,7 +204,11 @@ namespace MyCode.Project.Services.Implementation
FOwnerTypeID = OWNER_TYPE, FOwnerTypeID = OWNER_TYPE,
FOwnerID = new FOwnerID() FOwnerID = new FOwnerID()
{ {
FNumber = orgId FOrgId = orgId
},
FStockID=new FStockID()
{
FNumber = param.FWAREHOUSECODE
}, },
FEntryTaxRate = param.FTAXRATE, FEntryTaxRate = param.FTAXRATE,
FAuxUnitQty = 0, FAuxUnitQty = 0,
@@ -264,16 +270,16 @@ namespace MyCode.Project.Services.Implementation
FDate = dateStr, FDate = dateStr,
FSaleOrgId = new FSaleOrgId() FSaleOrgId = new FSaleOrgId()
{ {
FNumber = orgId FOrgId = orgId
}, },
FCustomerID = new FCustomerID() FCustomerID = new FCustomerID()
{ {
FNumber = customerId FCustId = customerId
},
FSaleDeptID = new FSaleDeptID()
{
FNumber = "02"
}, },
//FSaleDeptID = new FSaleDeptID()
//{
// FNumber = "02"
//},
FReceiverID = new FReceiverID() FReceiverID = new FReceiverID()
{ {
FNumber = customerId FNumber = customerId
@@ -284,7 +290,7 @@ namespace MyCode.Project.Services.Implementation
}, },
FStockOrgId = new FStockOrgId() FStockOrgId = new FStockOrgId()
{ {
FNumber = orgId FOrgId = orgId
}, },
FSettleID = new FSettleID() FSettleID = new FSettleID()
{ {
@@ -295,13 +301,14 @@ namespace MyCode.Project.Services.Implementation
FNumber = customerId FNumber = customerId
}, },
FOwnerTypeIdHead = OWNER_TYPE, FOwnerTypeIdHead = OWNER_TYPE,
FOwnerIdHead = new FOwnerIdHead() FOwnerIdHead = new FOwnerIdHead()
{ {
FNumber = orgId FOrgId = orgId
}, },
FCDateOffsetValue = 0, FCDateOffsetValue = 0,
FIsTotalServiceOrCost = false, FIsTotalServiceOrCost = false,
F_dmi_Combo = "标准出库", //F_dmi_Combo = "标准出库",
SubHeadEntity = new FSubHeadEntity() SubHeadEntity = new FSubHeadEntity()
{ {
FSettleCurrID = new FSettleCurrID() FSettleCurrID = new FSettleCurrID()
@@ -310,7 +317,7 @@ namespace MyCode.Project.Services.Implementation
}, },
FSettleOrgID = new FSettleOrgID() FSettleOrgID = new FSettleOrgID()
{ {
FNumber = orgId FOrgId = orgId
}, },
FIsIncludedTax = false, FIsIncludedTax = false,
FLocalCurrID = new FLocalCurrID() FLocalCurrID = new FLocalCurrID()

View File

@@ -131,7 +131,7 @@ namespace MyCode.Project.Services.Implementation
BillSave billSave = new BillSave() BillSave billSave = new BillSave()
{ {
Model = model, Model = model,
IsAutoSubmitAndAudit = true, IsAutoSubmitAndAudit = false,
}; };
var responseStatus = _kingDeeService.Save(FORM_ID, billSave); var responseStatus = _kingDeeService.Save(FORM_ID, billSave);
@@ -148,7 +148,7 @@ namespace MyCode.Project.Services.Implementation
decimal realQty = Math.Abs(item.SellCount); decimal realQty = Math.Abs(item.SellCount);
decimal taxRate = param.FTAXRATE; decimal taxRate = param.FTAXRATE;
decimal taxPrice = item.SellCount != 0 ? Math.Round(Math.Abs(item.DivideSellTotal) / item.SellCount, 10) : 0; decimal taxPrice = item.SellCount != 0 ? Math.Round(Math.Abs(item.DivideSellTotal/ item.SellCount), 10) : 0;
decimal price = taxRate > 0 && taxPrice > 0 ? Math.Round(taxPrice / (1 + taxRate / 100), 10) : taxPrice; decimal price = taxRate > 0 && taxPrice > 0 ? Math.Round(taxPrice / (1 + taxRate / 100), 10) : taxPrice;
@@ -157,21 +157,22 @@ namespace MyCode.Project.Services.Implementation
return new FSalesReturnEntryItem() return new FSalesReturnEntryItem()
{ {
FRowType = rowType, Fcode = item.Barcode ?? "",
FMaterialId = new FMaterialId() //FRowType = rowType,
{ //FMaterialId = new FMaterialId()
FNumber = item.Barcode ?? "" //{
}, // FNumber = item.Barcode ?? ""
FUnitID = new FUnitID() //},
{ //FUnitID = new FUnitID()
FNumber = item.Unit ?? DEFAULT_UNIT //{
}, // FNumber = item.Unit ?? DEFAULT_UNIT
FInventoryQty = 0, //},
//FInventoryQty = 0,
FRealQty = realQty, FRealQty = realQty,
FPrice = price, FPrice = price,
FTaxPrice = taxPrice, FTaxPrice = taxPrice,
FIsFree = false, //FIsFree = false,
FEntryTaxRate = param.FTAXRATE, //FEntryTaxRate = param.FTAXRATE,
FReturnType = new FReturnType() FReturnType = new FReturnType()
{ {
FNumber = RETURN_TYPE_CODE FNumber = RETURN_TYPE_CODE
@@ -179,26 +180,34 @@ namespace MyCode.Project.Services.Implementation
FOwnerTypeId = OWNER_TYPE, FOwnerTypeId = OWNER_TYPE,
FOwnerId = new FOwnerId() FOwnerId = new FOwnerId()
{ {
FNumber = orgId FOrgId = orgId
},
FStockID = new FStockID()
{
FNumber = param.FWAREHOUSECODE
},
FStockstatusId=new FStockstatusId(){
FNumber= "KCZT01_SYS"
}, },
FDeliveryDate = deliveryDate, FDeliveryDate = deliveryDate,
FDiscountRate = 0, //FDiscountRate = 0,
FPriceDiscount = 0, //FPriceDiscount = 0,
FAuxUnitQty = 0, //FAuxUnitQty = 0,
FExtAuxUnitQty = 0, //FExtAuxUnitQty = 0,
FSrcBillTypeID = "", //FSrcBillTypeID = "",
FSrcBillNo = "", //FSrcBillNo = "",
FISCONSUMESUM = "0", //FISCONSUMESUM = "0",
FSalUnitID = new FSalUnitID() FSalUnitID = new FSalUnitID()
{ {
FNumber = item.Unit ?? DEFAULT_UNIT FNumber = item.Unit ?? DEFAULT_UNIT
}, },
FSalUnitQty = realQty, FSalUnitQty = realQty, //
FSalBaseQty = realQty, FSalBaseQty = realQty,//
FPriceBaseQty = realQty, FPriceBaseQty = realQty,//
FIsOverLegalOrg = false, FIsOverLegalOrg = false,
FSOEntryId = 0, //FSOEntryId = 0,
FARNOTJOINQTY = realQty, FARNOTJOINQTY = realQty, //
FIsReturnCheck = false, FIsReturnCheck = false,
FSettleBySon = false, FSettleBySon = false,
FBOMEntryId = 0, FBOMEntryId = 0,
@@ -231,39 +240,39 @@ namespace MyCode.Project.Services.Implementation
FDate = dateStr, FDate = dateStr,
FSaleOrgId = new FSaleOrgId() FSaleOrgId = new FSaleOrgId()
{ {
FNumber = orgId FOrgId = orgId
}, },
FRetcustId = new FRetcustId() FRetcustId = new FRetcustId()
{ {
FNumber = customerId FCustId = customerId
},
FSaledeptid = new FSaledeptid()
{
FNumber = "02"
},
FTransferBizType = new FTransferBizType()
{
FNumber = TRANSFER_BIZ_TYPE
}, },
//FSaledeptid = new FSaledeptid()
//{
// FNumber = "02"
//},
//FTransferBizType = new FTransferBizType()
//{
// FNumber = TRANSFER_BIZ_TYPE
//},
FSalesManId = new FSalesManId() FSalesManId = new FSalesManId()
{ {
FNumber = salesManId FNumber = salesManId
}, },
FStockOrgId = new FStockOrgId() FStockOrgId = new FStockOrgId()
{ {
FNumber = orgId FOrgId = orgId
}, },
FReceiveCustId = new FReceiveCustId() FReceiveCustId = new FReceiveCustId()
{ {
FNumber = customerId FCustId = customerId
}, },
FSettleCustId = new FSettleCustId() FSettleCustId = new FSettleCustId()
{ {
FNumber = customerId FCustId = customerId
}, },
FPayCustId = new FPayCustId() FPayCustId = new FPayCustId()
{ {
FNumber = customerId FCustId = customerId
}, },
FOwnerTypeIdHead = OWNER_TYPE, FOwnerTypeIdHead = OWNER_TYPE,
FCDateOffsetValue = 0, FCDateOffsetValue = 0,
@@ -277,7 +286,7 @@ namespace MyCode.Project.Services.Implementation
}, },
FSettleOrgId = new FSettleOrgId() FSettleOrgId = new FSettleOrgId()
{ {
FNumber = orgId FOrgId = orgId
}, },
FLocalCurrId = new FLocalCurrId() FLocalCurrId = new FLocalCurrId()
{ {

View File

@@ -49,7 +49,7 @@
<!-- 组织编码,启用多组织时配置对应的组织编码才有效 --> <!-- 组织编码,启用多组织时配置对应的组织编码才有效 -->
<!--<add key="X-KDApi-OrgNum" value="*****"/>--> <!--<add key="X-KDApi-OrgNum" value="*****"/>-->
<!-- 服务Url地址(私有云和公有云都须配置金蝶云星空产品地址K3Cloud/结尾)--> <!-- 服务Url地址(私有云和公有云都须配置金蝶云星空产品地址K3Cloud/结尾)-->
<add key="X-KDApi-ServerUrl" value="http://127.0.0.1/k3Cloud/" /> <add key="X-KDApi-ServerUrl" value="https://k3.yygsbb.com/k3Cloud/" />
<!--解决swagger出错问题--> <!--解决swagger出错问题-->
<add key="aspnet:UseHostHeaderForRequestUrl" value="true" /> <add key="aspnet:UseHostHeaderForRequestUrl" value="true" />
<!--当前环境,1:生产环境 0开发环境--> <!--当前环境,1:生产环境 0开发环境-->