供应商字段
This commit is contained in:
parent
a14f8f107d
commit
4d2b18a652
@ -9,6 +9,9 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
|
||||
public class PurchaseStockInModel
|
||||
{
|
||||
public int? FID { get; set; }
|
||||
|
||||
public bool IsVerifyBaseDataField { get; set; }
|
||||
|
||||
public FBillTypeID FBillTypeID { get; set; }
|
||||
public string FBillNo { get; set; }
|
||||
public string FDate { get; set; }
|
||||
@ -16,6 +19,11 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
|
||||
public FDemandOrgId FDemandOrgId { get; set; }
|
||||
public FCorrespondOrgId FCorrespondOrgId { get; set; }
|
||||
public FPurchaseOrgId FPurchaseOrgId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ¹©Ó¦ÉÌ
|
||||
/// </summary>
|
||||
public FSupplier FSupplierId { get; set; }
|
||||
public string FOwnerTypeIdHead { get; set; }
|
||||
public FOwnerIdHead FOwnerIdHead { get; set; }
|
||||
public int? FCDateOffsetValue { get; set; }
|
||||
@ -25,14 +33,23 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
|
||||
public List<FPurchaseStockInEntryItem> FInStockEntry { get; set; }
|
||||
}
|
||||
|
||||
public class FSupplier
|
||||
{
|
||||
public string FNumber { get; set; }
|
||||
public string FOrgId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class FDemandOrgId
|
||||
{
|
||||
public string FNumber { get; set; }
|
||||
public string FOrgId { get; set; }
|
||||
}
|
||||
|
||||
public class FPurchaseOrgId
|
||||
{
|
||||
public string FNumber { get; set; }
|
||||
public string FOrgId { get; set; }
|
||||
}
|
||||
|
||||
public class FOwnerIdHead
|
||||
@ -73,6 +90,12 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
|
||||
|
||||
public class FPurchaseStockInEntryItem
|
||||
{
|
||||
public FStockID FStockID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ÌõÂë
|
||||
/// </summary>
|
||||
public string Fcode { get; set; }
|
||||
public string FRowType { get; set; }
|
||||
public FMaterialId FMaterialId { get; set; }
|
||||
public FUnitID FUnitID { get; set; }
|
||||
@ -129,6 +152,7 @@ namespace MyCode.Project.Domain.Message.Request.KingDee.SaveModel
|
||||
|
||||
public class FRemainInStockUnitId
|
||||
{
|
||||
public string FOrgId { get; set; }
|
||||
public string FNumber { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ namespace MyCode.Project.OutSideService.Implementation
|
||||
staClient = GetK3CloudClient();
|
||||
var datastr = JsonHelper.ToJson(billSave, false, false, true);
|
||||
LogHelper.Info("调度Id:" + id + ",金蝶云接口请求:" + datastr);
|
||||
var resultString = staClient.Save(formId, datastr);
|
||||
var resultString = staClient.Draft(formId, datastr);
|
||||
LogHelper.Info("调度Id:" + id + "金蝶云接口响应:" + resultString);
|
||||
var result = JsonHelper.ToObject<K3ApiResult>(resultString);
|
||||
if (!result.Result.ResponseStatus.IsSuccess)
|
||||
|
||||
@ -66,25 +66,12 @@ namespace MyCode.Project.Repositories
|
||||
/// <returns></returns>
|
||||
public List<BusiOrderGoodsDocInSummary> GetPushGoodsDocInOrder()
|
||||
{
|
||||
string sql = $@"
|
||||
SELECT
|
||||
string sql = $@"SELECT
|
||||
-- 分组字段
|
||||
CONVERT(date, InOutDate2) AS InOutDate2,
|
||||
WarehouseCode AS WarehouseCode,
|
||||
WarehouseName AS WarehouseName,
|
||||
GoodsNo AS GoodsNo,
|
||||
GoodsName AS GoodsName,
|
||||
SkuName AS SkuName,
|
||||
UnitName AS UnitName,
|
||||
SkuBarcode AS SkuBarcode,
|
||||
[CurrencyCode]
|
||||
,[CurrencyCodeName]
|
||||
,[CurrencyRate]
|
||||
,[CreateUserName]
|
||||
,[CompanyName],VendCustomerName,VendCode ,[ApplyCompanyName],
|
||||
[TaxRate]
|
||||
,[TransNoTaxPrice]
|
||||
,[TransHasTaxPrice],
|
||||
[GoodsdocNo] AS [GoodsdocNo] ,[ApplyCompanyName],[VendCustomerName],
|
||||
-- 合计数据
|
||||
SUM(Quantity) AS Quantity ,-- 总数量,
|
||||
SUM(BaceCurrencyCostAmount) AS BaceCurrencyCostAmount,--总入库金额,
|
||||
@ -94,7 +81,6 @@ SELECT
|
||||
SUM(TransNoTaxAmount) AS TransNoTaxAmount,--总原币无税金额,
|
||||
SUM(TransHasTaxAmount) AS TransHasTaxAmount,--总原币含税金额,
|
||||
SUM(TransTaxAmount) AS TransTaxAmount,--总原币税额,
|
||||
|
||||
-- 计数统计
|
||||
COUNT(DISTINCT GoodsdocNo) AS 入库单数,
|
||||
COUNT(*) AS 明细行数
|
||||
@ -105,20 +91,12 @@ GROUP BY
|
||||
CONVERT(DATE, InOutDate2),
|
||||
WarehouseCode,
|
||||
WarehouseName,
|
||||
GoodsNo,
|
||||
GoodsName,
|
||||
SkuName,
|
||||
UnitName,SkuBarcode ,[CurrencyCode]
|
||||
,[CurrencyCodeName]
|
||||
,[CurrencyRate]
|
||||
,[CreateUserName]
|
||||
,[CompanyName],CompanyName,VendCustomerName,VendCode ,[ApplyCompanyName], [TaxRate]
|
||||
,[TransNoTaxPrice]
|
||||
,[TransHasTaxPrice]
|
||||
[GoodsdocNo] ,[ApplyCompanyName],[VendCustomerName]
|
||||
|
||||
ORDER BY
|
||||
CONVERT(date, InOutDate2) DESC,
|
||||
WarehouseCode,
|
||||
GoodsNo;";
|
||||
[GoodsdocNo]; ";
|
||||
var list = this.SelectList<BusiOrderGoodsDocInSummary>(sql);
|
||||
return list;
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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,
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
@ -22,9 +22,10 @@
|
||||
</system.webServer>
|
||||
<connectionStrings>
|
||||
<!-- 数据库测试-->
|
||||
<add name="WMSConn" connectionString="Data Source=58.252.252.77,30003; Initial Catalog=yuntong; User ID=yuntong;Password=123; Connect Timeout=120; MultipleActiveResultSets=True;App=JiKeYun2" providerName="System.Data.SqlClient" />
|
||||
|
||||
<add name="YunTongConn" connectionString="Data Source=58.252.252.77,30003; Initial Catalog=yuntong; User ID=yuntong;Password=123; Connect Timeout=120; MultipleActiveResultSets=True;App=JiKeYun1" providerName="System.Data.SqlClient" />
|
||||
<add name="WMSConn"
|
||||
connectionString="Data Source=127.0.0.1; Initial Catalog=yuntong; User ID=sa;Password=1; Connect Timeout=120; MultipleActiveResultSets=True;App=JiKeYun2"
|
||||
providerName="System.Data.SqlClient"/>
|
||||
<add name="YunTongConn" connectionString="Data Source=127.0.0.1; Initial Catalog=yuntong; User ID=sa;Password=1; Connect Timeout=120; MultipleActiveResultSets=True;App=JiKeYun1" providerName="System.Data.SqlClient" />
|
||||
|
||||
<!--测试MYSQL内网-->
|
||||
<!--<add name="MasterConn" connectionString="" providerName="MySql.Data.MySqlClient" />-->
|
||||
@ -49,7 +50,7 @@
|
||||
<!-- 组织编码,启用多组织时配置对应的组织编码才有效 -->
|
||||
<!--<add key="X-KDApi-OrgNum" value="*****"/>-->
|
||||
<!-- 服务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出错问题-->
|
||||
<add key="aspnet:UseHostHeaderForRequestUrl" value="true" />
|
||||
<!--当前环境,1:生产环境 0:开发环境-->
|
||||
@ -250,8 +251,12 @@
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs"
|
||||
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
|
||||
warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
|
||||
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
|
||||
warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/>
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user