供应商字段
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user