增加获取金蝶子仓库信息
This commit is contained in:
@@ -192,7 +192,7 @@ namespace WMS.Web.Domain.Services.Public
|
||||
param.FieldKeys = "FMATERIALID,FName,FNumber,FSpecification,FForbidStatus,FUseOrgId";
|
||||
param.Limit = 10000;
|
||||
Console.Write("请输入第几行:");
|
||||
var row=Console.ReadLine();
|
||||
var row = Console.ReadLine();
|
||||
param.StartRow = (Convert.ToInt32(row) * param.Limit);
|
||||
|
||||
//查询条件:备注其中的条件值以金蝶的值为准!!!
|
||||
@@ -310,6 +310,49 @@ namespace WMS.Web.Domain.Services.Public
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据仓库编码获取仓位
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<ResultList<ErpStockDto>> BillQueryForSubStock(string code = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var token_result = await this.Init();
|
||||
if (!token_result.IsSuccess)
|
||||
return ResultList<ErpStockDto>.ReFailure(token_result);
|
||||
var query = new ErpBillQueryDto(token_result.Data);
|
||||
var param = new ErpBillQueryParamDto(FormIdParam.BD_STOCK.ToString());
|
||||
param.FieldKeys = "FStockFlexDetail_FDetailID,FFlexEntryName,FFlexEntryId,'0'";
|
||||
param.Limit = 100000;
|
||||
if (!string.IsNullOrEmpty(code))
|
||||
param.FilterString = "FNumber='" + code + "'";//FNumber='C'
|
||||
query.Data = JsonConvert.SerializeObject(param);
|
||||
var json = JsonConvert.SerializeObject(query);
|
||||
|
||||
var result_json = await _client.ExecuteBillQueryAsync(json);
|
||||
var result = JsonConvert.DeserializeObject<List<List<string>>>(result_json);
|
||||
|
||||
var list = new List<ErpStockDto>();
|
||||
foreach (var item in result)
|
||||
{
|
||||
var lis = new ErpStockDto();
|
||||
lis.Id = int.Parse(item[0]);
|
||||
lis.Name = item[1];
|
||||
lis.Code = item[2];
|
||||
lis.OrgId = Convert.ToInt32(item[3]);
|
||||
list.Add(lis);
|
||||
|
||||
}
|
||||
return ResultList<ErpStockDto>.ReSuccess(list);
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return ResultList<ErpStockDto>.ReFailure("错误", 10002);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 同步数据(保存提交审核)
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
@@ -393,7 +436,7 @@ namespace WMS.Web.Domain.Services.Public
|
||||
param.FilterString = "FCreateDate>='" + beginTime + "' and FCreateDate<='" + endTime + "' and FDocumentStatus='C' and FRemainOutQty>=0";
|
||||
//string srt = JsonConvert.SerializeObject(stocks_codes);
|
||||
//param.FilterString = param.FilterString + " and FStockID in (" + srt.Substring(1, srt.Length - 2) + ")";
|
||||
|
||||
|
||||
//根据原订单号查询
|
||||
if (sourceBillNos != null && sourceBillNos.Count() > 0)
|
||||
{
|
||||
@@ -812,6 +855,7 @@ namespace WMS.Web.Domain.Services.Public
|
||||
return ResultList<ErpDeliveryNoticeOutStockResultDto>.ReFailure(ResultCodes.Erp_BillQuery_Error);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user