Merge branch 'master' of https://codeup.aliyun.com/62ce7bca487c500c27f70a79/OPS/WMS-Api
This commit is contained in:
Binary file not shown.
29
src/WMS.Web.Core/Dto/Erp/Stock/ErpStockDto.cs
Normal file
29
src/WMS.Web.Core/Dto/Erp/Stock/ErpStockDto.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.Erp
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 仓库信息
|
||||||
|
/// </summary>
|
||||||
|
public class ErpStockDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// id
|
||||||
|
/// </summary>
|
||||||
|
public int Id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 编码
|
||||||
|
/// </summary>
|
||||||
|
public string Code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 名字
|
||||||
|
/// </summary>
|
||||||
|
public string Name { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 业务组织(使用组织)编码
|
||||||
|
/// </summary>
|
||||||
|
public string OrgCode { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,26 +10,29 @@ namespace WMS.Web.Core.Dto.Erp.TakeStock
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class ErpTakeStockSaveDto
|
public class ErpTakeStockSaveDto
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public ErpTakeStockSaveDto() { }
|
||||||
/*
|
/*
|
||||||
* 单据编号:FBillNo
|
* 单据编号:FBillNo
|
||||||
日期:FDate (必填项)
|
日期:FDate (必填项)
|
||||||
|
|
||||||
库存组织:FStockOrgId (必填项)
|
库存组织:FStockOrgId (必填项)
|
||||||
单据类型:FBillTypeID (必填项)
|
单据类型:FBillTypeID (必填项)
|
||||||
货主类型:FOwnerTypeIdHead (必填项)
|
货主类型:FOwnerTypeIdHead (必填项) BD_OwnerOrg
|
||||||
|
|
||||||
物料编码:FMaterialId (必填项)
|
物料编码:FMaterialId (必填项)
|
||||||
单位:FUnitID (必填项)
|
单位:FUnitID (必填项)
|
||||||
仓库:FStockId (必填项)
|
仓库:FStockId (必填项)
|
||||||
库存状态:FStockStatusId (必填项)
|
库存状态:FStockStatusId (必填项)
|
||||||
货主类型:FOwnerTypeId (必填项)
|
货主类型:FOwnerTypeId (必填项) BD_OwnerOrg
|
||||||
货主:FOwnerid (必填项)
|
货主:FOwnerid (必填项)
|
||||||
保管者类型:FKeeperTypeId (必填项)
|
保管者类型:FKeeperTypeId (必填项) BD_KeeperOrg
|
||||||
保管者:FKeeperId (必填项)
|
保管者:FKeeperId (必填项)
|
||||||
子仓库:FStockLocId
|
子仓库:FStockLocId
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单据类型(标准盘亏单; 标准盘盈单)
|
/// 单据类型(标准盘亏单; 标准盘盈单 PY01_SYS) 盘亏 PK01_SYS
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FBillTypeID")]
|
[JsonProperty("FBillTypeID")]
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
@@ -39,10 +42,10 @@ namespace WMS.Web.Core.Dto.Erp.TakeStock
|
|||||||
[JsonProperty("FStockOrgId")]
|
[JsonProperty("FStockOrgId")]
|
||||||
public string StockOrgId { get; set; }
|
public string StockOrgId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 货主类型: 默认为业务组织
|
/// 货主类型: 默认为业务组织 BD_OwnerOrg
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FBillTypeID")]
|
[JsonProperty("FBillTypeID")]
|
||||||
public string FOwnerTypeIdHead { get; set; }
|
public string FOwnerTypeIdHead { get; set; } = "BD_OwnerOrg";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单据编号
|
/// 单据编号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -62,50 +65,50 @@ namespace WMS.Web.Core.Dto.Erp.TakeStock
|
|||||||
public class ErpTakeStockDetailsSaveDto
|
public class ErpTakeStockDetailsSaveDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 库存状态
|
/// 库存状态 KCZT001
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FStockStatusId")]
|
[JsonProperty("FStockStatusId")]
|
||||||
public int FStockStatusId { get; set; }
|
public string FStockStatusId { get; set; } = "KCZT001";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 货主类型: 默认为业务组织
|
/// 货主类型: 默认为业务组织 BD_OwnerOrg
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FOwnerTypeId")]
|
[JsonProperty("FOwnerTypeId")]
|
||||||
public int FOwnerTypeId { get; set; }
|
public string FOwnerTypeId { get; set; } = "BD_OwnerOrg";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 取仓库对应的货主信息
|
/// 取仓库对应的货主信息 货主: 等于库存组织
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FOwnerid")]
|
[JsonProperty("FOwnerid")]
|
||||||
public int FOwnerid { get; set; }
|
public string FOwnerid { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保管者类型
|
/// 保管者类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FKeeperTypeId")]
|
[JsonProperty("FKeeperTypeId")]
|
||||||
public int FKeeperTypeId { get; set; }
|
public string FKeeperTypeId { get; set; } = "BD_KeeperOrg";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保管者
|
/// 保管者 仓库”库存组织”
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FKeeperId")]
|
[JsonProperty("FKeeperId")]
|
||||||
public int FKeeperId { get; set; }
|
public string FKeeperId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料ID
|
/// 物料ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FMaterialId")]
|
[JsonProperty("FMaterialId")]
|
||||||
public int MaterialId { get; set; }
|
public string MaterialId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单位ID
|
/// 单位ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FUnitID")]
|
[JsonProperty("FUnitID")]
|
||||||
public int UnitId { get; set; }
|
public string UnitId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库ID
|
/// 仓库ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FStockId")]
|
[JsonProperty("FStockId")]
|
||||||
public int StockId { get; set; }
|
public string StockId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓位ID
|
/// 仓位ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FStockLocId")]
|
[JsonProperty("FStockLocId")]
|
||||||
public int SubStockId { get; set; }
|
public string SubStockId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 盘点前数量(wms系统数量)
|
/// 盘点前数量(wms系统数量)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using WMS.Web.Core.Dto.Erp;
|
||||||
using WMS.Web.Core.Dto.Erp.Org;
|
using WMS.Web.Core.Dto.Erp.Org;
|
||||||
using WMS.Web.Core.Dto.Erp.Purchase;
|
using WMS.Web.Core.Dto.Erp.Purchase;
|
||||||
using WMS.Web.Core.Internal.Results;
|
using WMS.Web.Core.Internal.Results;
|
||||||
@@ -21,5 +22,11 @@ namespace WMS.Web.Domain.IService.Public
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<ResultList<ErpOrgDto>> BillQueryForOrg();
|
Task<ResultList<ErpOrgDto>> BillQueryForOrg();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取仓库信息
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<ResultList<ErpStockDto>> BillQueryForStock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,5 +179,45 @@ namespace WMS.Web.Domain.Services.Public
|
|||||||
return ResultList<ErpOrgDto>.ReFailure("错误", 10002);
|
return ResultList<ErpOrgDto>.ReFailure("错误", 10002);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 获取使用组织
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<ResultList<ErpStockDto>> BillQueryForStock()
|
||||||
|
{
|
||||||
|
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 = "FStockId,FName,FNumber,FUseOrgId";
|
||||||
|
param.FilterString = "";//FOrgID=100008
|
||||||
|
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.OrgCode = item[3];
|
||||||
|
list.Add(lis);
|
||||||
|
|
||||||
|
}
|
||||||
|
return ResultList<ErpStockDto>.ReSuccess(list);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return ResultList<ErpStockDto>.ReFailure("错误", 10002);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,5 +41,9 @@ namespace WMS.Web.Domain.Values.Erp
|
|||||||
/// 供应商
|
/// 供应商
|
||||||
/// </summary>
|
/// </summary>
|
||||||
BD_Supplier=8,
|
BD_Supplier=8,
|
||||||
|
/// <summary>
|
||||||
|
/// 仓库
|
||||||
|
/// </summary>
|
||||||
|
BD_STOCK=9
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user