供应商字段

This commit is contained in:
2025-11-18 18:44:31 +08:00
parent a14f8f107d
commit 4d2b18a652
6 changed files with 207 additions and 211 deletions

View File

@@ -99,6 +99,7 @@ namespace MyCode.Project.Services.Implementation
List<TradesItem> trades = new List<TradesItem>();
TradeTypeList.ForEach(ty =>
{
requestBizData.PageIndex = 0;
requestBizData.TradeType = ty;
string lggl = JsonHelper.ToJson(requestBizData);
LogHelper.Info("TradeType:==" + ty.ToString() + " " + lggl);
@@ -186,6 +187,7 @@ namespace MyCode.Project.Services.Implementation
List<ReturnChangeListResp> trades = new List<ReturnChangeListResp>();
TradeTypeList.ForEach(ty =>
{
requestBizData.PageIndex = 0;
requestBizData.ProcessStatusList = "";
string lggl = JsonHelper.ToJson(requestBizData);
LogHelper.Info(lggl);
@@ -305,7 +307,7 @@ namespace MyCode.Project.Services.Implementation
List<BusiOrderGoodsDocInResponse> trades = new List<BusiOrderGoodsDocInResponse>();
TradeTypeList.ForEach(ty =>
{
requestBizData.PageIndex = 0;
string lggl = JsonHelper.ToJson(requestBizData);
LogHelper.Info(lggl);
JackyunResponse response = Call(EnumAttribute.GetAttribute(ApiEnum.STORAGEGOODSDOCINCOUNTS).Value, "1.0", requestBizData);
@@ -397,7 +399,7 @@ namespace MyCode.Project.Services.Implementation
List<ErpStorageGoodsDocOutV2ResponseBizData> trades = new List<ErpStorageGoodsDocOutV2ResponseBizData>();
TradeTypeList.ForEach(ty =>
{
requestBizData.PageIndex = 0;
string lggl = JsonHelper.ToJson(requestBizData);
LogHelper.Info(lggl);
JackyunResponse response = Call(EnumAttribute.GetAttribute(ApiEnum.ERPSTORAGEGOODSDOCOUTV2).Value, "1.0", requestBizData);

View File

@@ -6,6 +6,7 @@ using MyCode.Project.Domain.Model;
using MyCode.Project.Domain.Repositories;
using MyCode.Project.Infrastructure.Common;
using MyCode.Project.Infrastructure.Exceptions;
using MyCode.Project.Infrastructure.Extensions;
using MyCode.Project.OutSideService;
using MyCode.Project.Services.IServices;
using System;
@@ -29,7 +30,7 @@ namespace MyCode.Project.Services.Implementation
private const string DEFAULT_UNIT = "Pcs";
private const string ROW_TYPE_STANDARD = "Standard";
private const string ROW_TYPE_SERVICE = "Service";
private const string FORM_ID = "PUR_PurchaseStockIn";
private const string FORM_ID = "STK_InStock";
private IPushKingDeeGoodsDocInRepository _pushKingDeeGoodsDocInRepository;
private IBusiOrderGoodsDocInRepository _busiOrderGoodsDocInRepository;
@@ -65,7 +66,7 @@ namespace MyCode.Project.Services.Implementation
throw new BaseException($"未找到ID为 {id} 的采购入库单记录");
}
if (goodsDocIn.Status != 0 && goodsDocIn.Status != 1)
if (goodsDocIn.Status ==2 )
{
throw new BaseException($"采购入库单 {goodsDocIn.GoodsdocNo} 已经推送过,状态为:{goodsDocIn.Status},不允许重复推送");
}
@@ -170,7 +171,7 @@ namespace MyCode.Project.Services.Implementation
BillSave billSave = new BillSave()
{
Model = model,
IsAutoSubmitAndAudit = true,
IsAutoSubmitAndAudit = false,
};
// 调用金蝶服务保存单据
@@ -199,24 +200,29 @@ namespace MyCode.Project.Services.Implementation
return new FPurchaseStockInEntryItem()
{
Fcode = detail.SkuBarcode ?? "",
FRowType = rowType,
FMaterialId = new FMaterialId()
{
FNumber = detail.SkuBarcode ?? ""
},
FUnitID = new FUnitID()
{
FNumber = detail.UnitName ?? DEFAULT_UNIT
},
FMaterialDesc = detail.GoodsName ?? "",
//FMaterialId = new FMaterialId()
//{
// FNumber = detail.SkuBarcode ?? ""
//},
//FUnitID = new FUnitID()
//{
// FNumber = detail.UnitName ?? DEFAULT_UNIT
//},
//FMaterialDesc = detail.GoodsName ?? "",
FWWPickMtlQty = 0,
FRealQty = detail.Quantity ?? 0,
FPriceUnitID = new FPriceUnitID()
{
FNumber = detail.UnitName ?? DEFAULT_UNIT
},
//FPriceUnitID = new FPriceUnitID()
//{
// FNumber = detail.UnitName ?? DEFAULT_UNIT
//},
FPrice = detail.BaceCurrencyNoTaxPrice ?? 0,
FDisPriceQty = 0,
FStockID = new FStockID()
{
FNumber = param.FPURCHASINGWAREHOUSECODE
},
FStockStatusId = new FStockStatusId()
{
FNumber = STOCK_STATUS
@@ -230,35 +236,20 @@ namespace MyCode.Project.Services.Implementation
FPriceBaseQty = detail.Quantity ?? 0,
FRemainInStockUnitId = new FRemainInStockUnitId()
{
FNumber = detail.UnitName ?? DEFAULT_UNIT
FOrgId = param.FPURCHASEORGID.SafeValue().ToString(),
},
FBILLINGCLOSE = false,
FRemainInStockQty = detail.Quantity ?? 0,
FRemainInStockBaseQty = detail.Quantity ?? 0,
FAPNotJoinQty = detail.Quantity ?? 0,
FTaxPrice = detail.BaceCurrencyWithTaxPrice ?? 0,
FEntryTaxRate = detail.TaxRate ?? (decimal?)param.FTAXRATE,
FDiscountRate = 0,
FCostPrice = detail.BaceCurrencyCostPrice ?? 0,
FAuxUnitQty = 0,
FTaxPrice = detail.BaceCurrencyWithTaxPrice ?? 0,
FOWNERID = new FOwnerId()
{
FNumber = orgId
FOrgId = orgId
},
FSRCBILLTYPEID = detail.SourceBillNo,
FSRCBillNo = detail.SourceBillNo ?? detail.BillNo ?? "",
FAllAmountExceptDisCount = allAmountExceptDisCount,
FPriceDiscount = 0,
FConsumeSumQty = 0,
FBaseConsumeSumQty = 0,
FRejectsDiscountAmount = 0,
FSalOutStockEntryId = 0,
FBeforeDisPriceQty = 0,
FPayableEntryID = 0,
FSUBREQBILLSEQ = 0,
FSUBREQENTRYID = 0,
FBatchNo = detail.BatchNo ?? "",
FSerialNo = detail.SerialNo ?? ""
};
}
@@ -274,57 +265,53 @@ namespace MyCode.Project.Services.Implementation
FNUMBER = BILL_TYPE_CODE
},
FDate = dateStr,
IsVerifyBaseDataField=true,
FStockOrgId = new FStockOrgId()
{
FNumber = orgId
FOrgId = orgId
},
FDemandOrgId = new FDemandOrgId()
{
FNumber = orgId
},
FCorrespondOrgId = new FCorrespondOrgId()
{
FNumber = orgId
FOrgId = orgId
},
FPurchaseOrgId = new FPurchaseOrgId()
{
FNumber = orgId
FOrgId = orgId
},
FSupplierId = new FSupplier()
{
FNumber = firstDetail.VendCode
},
FOwnerTypeIdHead = OWNER_TYPE,
FOwnerIdHead = new FOwnerIdHead()
{
FNumber = orgId
FOrgId = orgId
},
FCDateOffsetValue = 0,
FSplitBillType = "A",
FSalOutStockOrgId = new FSalOutStockOrgId()
{
FNumber = orgId
},
FInStockFin = new FInStockFin()
{
FSettleOrgId = new FSettleOrgId()
{
FNumber = orgId
},
FSettleCurrId = new FSettleCurrId()
{
FNumber = goodsDocIn.CurrencyCode ?? DEFAULT_CURRENCY
FNumber = DEFAULT_CURRENCY
},
FIsIncludedTax = true,
FPriceTimePoint = "1",
FLocalCurrId = new FLocalCurrId()
{
FNumber = goodsDocIn.CurrencyCode ?? DEFAULT_CURRENCY
FNumber = DEFAULT_CURRENCY
},
FExchangeTypeId = new FExchangeTypeId()
{
FNumber = EXCHANGE_TYPE
},
FExchangeRate = goodsDocIn.CurrencyRate ?? 1m,
FExchangeRate = 1m,
FISPRICEEXCLUDETAX = true,
FAllDisCount = 0m,
FHSExchangeRate = 1m
},
FInStockEntry = entryList
};