This commit is contained in:
余宇波 2025-11-15 19:49:29 +08:00
parent 5e087459df
commit b79a7a637e
4 changed files with 84 additions and 46 deletions

View File

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

View File

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

View File

@ -35,7 +35,11 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
}
public class FRetcustId
{
{
/// <summary>
/// ¿Í»§ID
/// </summary>
public string FCustId { get; set; }
public string FNumber { get; set; }
}
@ -56,25 +60,39 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
public class FReceiveCustId
{
/// <summary>
/// ¿Í»§ID
/// </summary>
public string FCustId { get; set; }
public string FNumber { get; set; }
}
public class FSettleCustId
{
/// <summary>
/// ¿Í»§ID
/// </summary>
public string FCustId { get; set; }
public string FNumber { get; set; }
}
public class FPayCustId
{
public string FCustId { get; set; }
public string FNumber { get; set; }
}
public class FSalesReturnEntryItem
{
/// <summary>
/// ÌõÂë
/// </summary>
public string Fcode { get; set; }
public string FRowType { get; set; }
public FMaterialId FMaterialId { get; set; }
public FUnitID FUnitID { get; set; }
public decimal? FInventoryQty { get; set; }
//public decimal? FInventoryQty { get; set; }
public decimal? FRealQty { get; set; }
public decimal? FPrice { 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 string FOwnerTypeId { get; set; }
public FOwnerId FOwnerId { get; set; }
public FStockstatusId FStockstatusId { get; set; }
public FStockID FStockID { get; set; }
public string FDeliveryDate { get; set; }
public decimal? FDiscountRate { 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? FPriceBaseQty { get; set; }
public bool? FIsOverLegalOrg { get; set; }
public int? FSOEntryId { get; set; }
//public int? FSOEntryId { get; set; }
public decimal? FARNOTJOINQTY { get; set; }
public bool? FIsReturnCheck { 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 class FStockstatusId
{
public string FNumber { get; set; }
}
}

View File

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