增加MES-WMS接口
This commit is contained in:
@@ -27,6 +27,17 @@ namespace Tnb.WarehouseMgr.Entities.Consts
|
|||||||
/// 预任务生成EnCode
|
/// 预任务生成EnCode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string WMS_PRETASK_H_ENCODE = "PreTaskGen";
|
public const string WMS_PRETASK_H_ENCODE = "PreTaskGen";
|
||||||
|
/// 齐套出库生成Encode
|
||||||
|
/// </summary>
|
||||||
|
public const string WMS_KITTINGOUTSTK_ENCODE = "WmsKittingOutStk";
|
||||||
|
/// <summary>
|
||||||
|
/// 空载具出库生成Encode
|
||||||
|
/// </summary>
|
||||||
|
public const string WMS_EMPTYOUTSTK_ENCODE = "EptyCarryOutStk";
|
||||||
|
/// <summary>
|
||||||
|
/// 空载具入库生成Encode
|
||||||
|
/// </summary>
|
||||||
|
public const string WMS_EMPTYINSTK_ENCODE = "EptyCarryInbound";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 载具移入生成Encode
|
/// 载具移入生成Encode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES载具查询接口输入
|
||||||
|
/// </summary>
|
||||||
|
public class MESCarryQueryInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 组织ID
|
||||||
|
/// </summary>
|
||||||
|
public string org_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 载具编号
|
||||||
|
/// </summary>
|
||||||
|
public string carry_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 齐套搭配方案名称
|
||||||
|
/// </summary>
|
||||||
|
public string collocation_scheme_name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES载具查询返回接口输入
|
||||||
|
/// </summary>
|
||||||
|
public class MESCarryQueryResultInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 组织ID
|
||||||
|
/// </summary>
|
||||||
|
public string org_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 载具编号
|
||||||
|
/// </summary>
|
||||||
|
public string carry_code { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
namespace Tnb.WarehouseMgr
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES载具签收接口输入
|
||||||
|
/// </summary>
|
||||||
|
public class MESCarrySignInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 组织ID
|
||||||
|
/// </summary>
|
||||||
|
public string? org_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 载具Id
|
||||||
|
/// </summary>
|
||||||
|
public string? carry_id { get; set;}
|
||||||
|
/// <summary>
|
||||||
|
/// 创建热Id
|
||||||
|
/// </summary>
|
||||||
|
public string? create_id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
||||||
|
{
|
||||||
|
public class MESCollocationSchemeQueryInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 齐套出库主表
|
||||||
|
/// </summary>
|
||||||
|
//public WmsCollocationSchemeH wmsCollocationSchemeH { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 产品ID
|
||||||
|
/// </summary>
|
||||||
|
public string material_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组织ID
|
||||||
|
/// </summary>
|
||||||
|
public string org_id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES入库输入
|
||||||
|
/// </summary>
|
||||||
public class MESCreateInstockInput
|
public class MESCreateInstockInput
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES出库输入
|
||||||
|
/// </summary>
|
||||||
public class MESCreateOutstockInput
|
public class MESCreateOutstockInput
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES空载具入库输入
|
||||||
|
/// </summary>
|
||||||
|
public class MESEmptyCarryInStockInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 组织ID
|
||||||
|
/// </summary>
|
||||||
|
public string? org_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 库位编号
|
||||||
|
/// </summary>
|
||||||
|
public string? location_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 载具编号
|
||||||
|
/// </summary>
|
||||||
|
public string? carry_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 创建用户
|
||||||
|
/// </summary>
|
||||||
|
public string? create_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 入库仓库
|
||||||
|
/// </summary>
|
||||||
|
public string? warehouse_id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES空载具出库输入
|
||||||
|
/// </summary>
|
||||||
|
public class MESEmptyCarryOutStkInput
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组织ID
|
||||||
|
/// </summary>
|
||||||
|
public string org_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 库位编号
|
||||||
|
/// </summary>
|
||||||
|
public string location_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建用户
|
||||||
|
/// </summary>
|
||||||
|
public string? create_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 入库仓库
|
||||||
|
/// </summary>
|
||||||
|
public string? warehouse_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载具规格编号
|
||||||
|
/// </summary>
|
||||||
|
public string? carrystd_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数量
|
||||||
|
/// </summary>
|
||||||
|
public int? qty { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES齐套出库输入类
|
||||||
|
/// </summary>
|
||||||
|
public class MESKittingOutStkInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 所属组织ID
|
||||||
|
/// </summary>
|
||||||
|
public string? org_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 出库单创建日期
|
||||||
|
/// </summary>
|
||||||
|
public DateTime bill_date { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 业务类型
|
||||||
|
/// </summary>
|
||||||
|
public string biz_type { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发料仓库ID
|
||||||
|
/// </summary>
|
||||||
|
public string warehouse_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 库位ID
|
||||||
|
/// </summary>
|
||||||
|
public string? location_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 库位编号
|
||||||
|
/// </summary>
|
||||||
|
public string? location_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载具ID
|
||||||
|
/// </summary>
|
||||||
|
public string? carry_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载具编号
|
||||||
|
/// </summary>
|
||||||
|
public string? carry_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 产品ID
|
||||||
|
/// </summary>
|
||||||
|
public string? material_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 产品编号
|
||||||
|
/// </summary>
|
||||||
|
public string? material_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 齐套搭配方案ID
|
||||||
|
/// </summary>
|
||||||
|
public string? collocation_scheme_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 齐套搭配方案编号
|
||||||
|
/// </summary>
|
||||||
|
public string collocation_scheme_code { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 来源单据ID
|
||||||
|
/// </summary>
|
||||||
|
public string? source_id { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 顺序号
|
||||||
|
/// </summary>
|
||||||
|
public int seq { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建用户ID
|
||||||
|
/// </summary>
|
||||||
|
public string? create_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MES齐套出库明细表输入
|
||||||
|
/// </summary>
|
||||||
|
public List<MESKittingOutStkDInput>? wmsKittingoutDs { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MES齐套出库明细表输入类
|
||||||
|
/// </summary>
|
||||||
|
public class MESKittingOutStkDInput
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 单位ID
|
||||||
|
/// </summary>
|
||||||
|
public string unit_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 单位编号
|
||||||
|
/// </summary>
|
||||||
|
public string? unit_code { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 产品ID
|
||||||
|
/// </summary>
|
||||||
|
public string? material_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 产品编号
|
||||||
|
/// </summary>
|
||||||
|
public string? material_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 批次
|
||||||
|
/// </summary>
|
||||||
|
public string? code_batch { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数量(件数)
|
||||||
|
/// </summary>
|
||||||
|
public decimal? pr_qty { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 箱数
|
||||||
|
/// </summary>
|
||||||
|
public int? box { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,6 +22,8 @@ namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
|||||||
|
|
||||||
public string new_carry_code { get; set; }
|
public string new_carry_code { get; set; }
|
||||||
|
|
||||||
|
public string org_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 任务执行条码表
|
/// 任务执行条码表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -0,0 +1,146 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Dto.Outputs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 载具查询输出类
|
||||||
|
/// </summary>
|
||||||
|
public class CarryQueryOutput
|
||||||
|
{
|
||||||
|
public string id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所属组织ID
|
||||||
|
/// </summary>?
|
||||||
|
public string? org_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载具编号
|
||||||
|
/// </summary>
|
||||||
|
public string carry_code { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载具名称
|
||||||
|
/// </summary>
|
||||||
|
public string carry_name { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载具分类ID
|
||||||
|
/// </summary>
|
||||||
|
public string carrystd_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载具库位ID
|
||||||
|
/// </summary>
|
||||||
|
public string? location_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载具库位编号
|
||||||
|
/// </summary>
|
||||||
|
public string? location_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 来源单据ID
|
||||||
|
/// </summary>
|
||||||
|
public string? source_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打包号
|
||||||
|
/// </summary>
|
||||||
|
public string? bale_num { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 齐套搭配方案ID
|
||||||
|
/// </summary>
|
||||||
|
public string? collocation_scheme_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 齐套搭配方案编号
|
||||||
|
/// </summary>
|
||||||
|
public string? collocation_scheme_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 载具条码明细输出
|
||||||
|
/// </summary>
|
||||||
|
public List<CarryCodeQueryOutput>? wmsCarryCodes { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 载具查询明细输出类
|
||||||
|
/// </summary>
|
||||||
|
public class CarryCodeQueryOutput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 主键ID
|
||||||
|
/// </summary>
|
||||||
|
public string id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 所属组织ID
|
||||||
|
/// </summary>
|
||||||
|
public string? org_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 上级载具ID
|
||||||
|
/// </summary>
|
||||||
|
public string carry_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 物品ID
|
||||||
|
/// </summary>
|
||||||
|
public string material_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 物品代码
|
||||||
|
/// </summary>
|
||||||
|
public string material_code { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 条码编号
|
||||||
|
/// </summary>
|
||||||
|
public string barcode { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 批次
|
||||||
|
/// </summary>
|
||||||
|
public string? code_batch { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 条码数量
|
||||||
|
/// </summary>
|
||||||
|
public decimal codeqty { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否出库
|
||||||
|
/// </summary>
|
||||||
|
public int is_out { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 库位ID
|
||||||
|
/// </summary>
|
||||||
|
public string location_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 库位编号
|
||||||
|
/// </summary>
|
||||||
|
public string location_code { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 单位ID
|
||||||
|
/// </summary>
|
||||||
|
public string unit_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 单位代码
|
||||||
|
/// </summary>
|
||||||
|
public string unit_code { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 仓库ID
|
||||||
|
/// </summary>
|
||||||
|
public string? warehouse_id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Dto.Outputs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 搭配方案输出类
|
||||||
|
/// </summary>
|
||||||
|
public class CollocationSchemeOutput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 主键
|
||||||
|
/// </summary>
|
||||||
|
public string id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 所属组织ID
|
||||||
|
/// </summary>
|
||||||
|
public string org_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 搭配方案编号
|
||||||
|
/// </summary>
|
||||||
|
public string bill_code { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 搭配方案名称
|
||||||
|
/// </summary>
|
||||||
|
public string bill_name { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 顺序号
|
||||||
|
/// </summary>
|
||||||
|
public int seq { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 产品ID
|
||||||
|
/// </summary>
|
||||||
|
public string material_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 产品代码
|
||||||
|
/// </summary>
|
||||||
|
public string material_code { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 配送次数
|
||||||
|
/// </summary>
|
||||||
|
public int count { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最低库存
|
||||||
|
/// </summary>
|
||||||
|
public int minimum { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 库位ID
|
||||||
|
/// </summary>
|
||||||
|
public string? location_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 齐套明细输出
|
||||||
|
/// </summary>
|
||||||
|
public List<CollocationSchemeDOutput>? CollocationSchemeDs { get; set; }
|
||||||
|
|
||||||
|
public List<WmsCollocationSchemeD> list{ get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CollocationSchemeDOutput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 主键ID
|
||||||
|
/// </summary>
|
||||||
|
public string? id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 所属组织ID
|
||||||
|
/// </summary>
|
||||||
|
public string? org_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 搭配方案ID
|
||||||
|
/// </summary>
|
||||||
|
public string bill_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 物料ID
|
||||||
|
/// </summary>
|
||||||
|
public string material_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 物料代码
|
||||||
|
/// </summary>
|
||||||
|
public string material_code { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载具规格ID
|
||||||
|
/// </summary>
|
||||||
|
public string carrystd_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数量(件数)
|
||||||
|
/// </summary>
|
||||||
|
public decimal qty { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 箱数
|
||||||
|
/// </summary>
|
||||||
|
public int box { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
using Mapster;
|
using Mapster;
|
||||||
using Tnb.WarehouseMgr.Entities;
|
using Tnb.WarehouseMgr.Entities;
|
||||||
using Tnb.WarehouseMgr.Entities.Dto;
|
using Tnb.WarehouseMgr.Entities.Dto;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr.Entities.Mapper
|
namespace Tnb.WarehouseMgr.Entities.Mapper
|
||||||
{
|
{
|
||||||
@@ -11,6 +12,10 @@ namespace Tnb.WarehouseMgr.Entities.Mapper
|
|||||||
config.ForType<WmsPretaskH, WmsDistaskH>()
|
config.ForType<WmsPretaskH, WmsDistaskH>()
|
||||||
.Map(dest => dest.pretask_id, src => src.id)
|
.Map(dest => dest.pretask_id, src => src.id)
|
||||||
.Map(dest => dest.pretask_code, src => src.bill_code);
|
.Map(dest => dest.pretask_code, src => src.bill_code);
|
||||||
|
|
||||||
|
config.ForType<MESCarrySignInput, SignForDeliveryInput>()
|
||||||
|
.Map(dest => dest.carryId, src => src.carry_id)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,58 @@
|
|||||||
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
|
using System;
|
||||||
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Tnb.BasicData.Entities;
using Tnb.WarehouseMgr.Entities;
using Tnb.WarehouseMgr.Entities.Dto;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Linq.Expressions;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Tnb.BasicData.Entities;
|
||||||
|
using Tnb.WarehouseMgr.Entities;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto;
|
||||||
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr.Interfaces
{
|
namespace Tnb.WarehouseMgr.Interfaces
|
||||||
/// <summary>
/// 库房业务(出入库)接口
/// </summary>
public interface IWareHouseService
{
/// <summary>
/// 入库策略
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<List<BasLocation>> InStockStrategy([FromQuery] InStockStrategyQuery input);
/// <summary>
/// 出库策略
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
//Task<List<WmsCarryH>> OutStockStrategy([FromQuery] OutStockStrategyQuery input);
/// <summary>
/// 路径算法
/// </summary>
/// <param name="pStartId"></param>
/// <param name="pEndId"></param>
/// <returns></returns>
Task<List<WmsPointH>> PathAlgorithms(string pStartId, string pEndId);
/// <summary>
/// 生成预任务
/// </summary>
/// <param name="preTasks"></param>
/// <returns></returns>
Task<bool> GenPreTask(List<WmsPretaskH> preTasks,List<WmsPretaskCode> preTaskCodes);
/// <summary>
/// 生成预任务成功后操作
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task GenInStockTaskHandleAfter(GenPreTaskUpInput input,Expression<Func<WmsCarryH,WmsCarryH>> setCarryColumnsExp,Expression<Func<BasLocation,BasLocation>> setLocaionColumbExp);
/// <summary>
/// 任务完成
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 库房业务(出入库)接口
|
||||||
|
/// </summary>
|
||||||
|
public interface IWareHouseService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 入库策略
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<BasLocation>> InStockStrategy([FromQuery] InStockStrategyQuery input);
|
||||||
|
/// <summary>
|
||||||
|
/// 出库策略
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
//Task<List<WmsCarryH>> OutStockStrategy([FromQuery] OutStockStrategyQuery input);
|
||||||
|
/// <summary>
|
||||||
|
/// 路径算法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pStartId"></param>
|
||||||
|
/// <param name="pEndId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<WmsPointH>> PathAlgorithms(string pStartId, string pEndId);
|
||||||
|
/// <summary>
|
||||||
|
/// 生成预任务
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="preTasks"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<bool> GenPreTask(List<WmsPretaskH> preTasks,List<WmsPretaskCode> preTaskCodes);
|
||||||
|
/// <summary>
|
||||||
|
/// 生成预任务成功后操作
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task GenInStockTaskHandleAfter(GenPreTaskUpInput input,Expression<Func<WmsCarryH,WmsCarryH>> setCarryColumnsExp,Expression<Func<BasLocation,BasLocation>> setLocaionColumbExp);
|
||||||
|
/// <summary>
|
||||||
|
/// 任务完成
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
Task TaskComplate(TaskCompleUpInput input);
|
Task TaskComplate(TaskCompleUpInput input);
|
||||||
}
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// WMS载具查询接口
|
||||||
|
/// </summary>
|
||||||
|
public interface IWmsCarryQueryService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES载具查询接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<dynamic> MESCarryQuery(MESCarryQueryInput input);
|
||||||
|
/// <summary>
|
||||||
|
/// MES载具查询返回接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<dynamic> MESCarryQueryResult(MESCarryQueryResultInput input);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr.Interfaces
|
namespace Tnb.WarehouseMgr.Interfaces
|
||||||
{
|
{
|
||||||
@@ -11,5 +12,11 @@ namespace Tnb.WarehouseMgr.Interfaces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IWmsCollocationSchemeSevice
|
public interface IWmsCollocationSchemeSevice
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES齐套搭配方案接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<dynamic> MESCollocationSchemeQuery(MESCollocationSchemeQueryInput input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// WMS空载具入库接口
|
||||||
|
/// </summary>
|
||||||
|
public interface IWmsEmptyInstockService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES空载具入库接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<dynamic> MesEmptyCarryInStock(MESEmptyCarryInStockInput input);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// WMS空载具出库接口
|
||||||
|
/// </summary>
|
||||||
|
public interface IWmsEmptyOutstockService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES空载具出库接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<dynamic> MESEmptyCarryOutStk(MESEmptyCarryOutStkInput input);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// WMS签收接口
|
||||||
|
/// </summary>
|
||||||
|
public interface IWmsSignForDeliveryService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES载具签收接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Task MESCarrySign(MESCarrySignInput input);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr.Interfaces
|
namespace Tnb.WarehouseMgr.Interfaces
|
||||||
{
|
{
|
||||||
@@ -11,5 +12,11 @@ namespace Tnb.WarehouseMgr.Interfaces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IWmskittingOutService
|
public interface IWmskittingOutService
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES齐套出库接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<dynamic> MESKittingOutStk(List<MESKittingOutStkInput> input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,6 +78,20 @@ namespace Tnb.WarehouseMgr
|
|||||||
result.data = data;
|
result.data = data;
|
||||||
return Task.FromResult(result);
|
return Task.FromResult(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Api响应结果
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[NonAction]
|
||||||
|
protected Task<DataResult> ToApiResult( object data)
|
||||||
|
{
|
||||||
|
DataResult result = new();
|
||||||
|
result.data = data;
|
||||||
|
return Task.FromResult(result);
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Api响应结果
|
/// Api响应结果
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
78
WarehouseMgr/Tnb.WarehouseMgr/WmsCarryQueryService.cs
Normal file
78
WarehouseMgr/Tnb.WarehouseMgr/WmsCarryQueryService.cs
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Dynamic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Aop.Api.Domain;
|
||||||
|
using Mapster;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using SqlSugar;
|
||||||
|
using Tnb.WarehouseMgr.Entities;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Outputs;
|
||||||
|
using Tnb.WarehouseMgr.Interfaces;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr
|
||||||
|
{
|
||||||
|
public class WmsCarryQueryService : BaseWareHouseService, IWmsCarryQueryService
|
||||||
|
{
|
||||||
|
private readonly ISqlSugarClient _db;
|
||||||
|
public WmsCarryQueryService(ISqlSugarRepository<WmsCarryH> repository)
|
||||||
|
{
|
||||||
|
_db = repository.AsSugarClient();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载具查询接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<dynamic> MESCarryQuery(MESCarryQueryInput input)
|
||||||
|
{
|
||||||
|
var results = new List<CarryQueryOutput>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var carrys = await _db.Queryable<WmsCarryH>()
|
||||||
|
.InnerJoin<WmsCollocationSchemeH>((a, b) => a.collocation_scheme_id == b.id)
|
||||||
|
.Where((a, b) => a.carry_code.Contains(input.carry_code) || b.bill_name.Contains(input.collocation_scheme_name))
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
|
results = carrys.Adapt<List<CarryQueryOutput>>();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await _db.Ado.RollbackTranAsync();
|
||||||
|
return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
|
||||||
|
}
|
||||||
|
return ToApiResult(results);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 载具查询返回接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<dynamic> MESCarryQueryResult(MESCarryQueryResultInput input)
|
||||||
|
{
|
||||||
|
var result = new CarryQueryOutput();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.carry_code == input.carry_code);
|
||||||
|
var carryCodes = await _db.Queryable<WmsCarryCode>().Where(it => it.carry_id == carry.id).ToListAsync();
|
||||||
|
result = carry.Adapt<CarryQueryOutput>();
|
||||||
|
result.wmsCarryCodes = carryCodes.Adapt<List<CarryCodeQueryOutput>>();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await _db.Ado.RollbackTranAsync();
|
||||||
|
return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
|
||||||
|
}
|
||||||
|
return ToApiResult(JNPF.Common.Enums.HttpStatusCode.OK, result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Aop.Api.Domain;
|
||||||
using Aspose.Cells.Drawing;
|
using Aspose.Cells.Drawing;
|
||||||
using JNPF.Common.Dtos.VisualDev;
|
using JNPF.Common.Dtos.VisualDev;
|
||||||
using JNPF.Common.Extension;
|
using JNPF.Common.Extension;
|
||||||
@@ -12,9 +13,12 @@ using JNPF.FriendlyException;
|
|||||||
using JNPF.VisualDev;
|
using JNPF.VisualDev;
|
||||||
using JNPF.VisualDev.Entitys;
|
using JNPF.VisualDev.Entitys;
|
||||||
using JNPF.VisualDev.Interfaces;
|
using JNPF.VisualDev.Interfaces;
|
||||||
|
using Mapster;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using Tnb.WarehouseMgr.Entities;
|
using Tnb.WarehouseMgr.Entities;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Outputs;
|
||||||
using Tnb.WarehouseMgr.Interfaces;
|
using Tnb.WarehouseMgr.Interfaces;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr
|
namespace Tnb.WarehouseMgr
|
||||||
@@ -78,5 +82,32 @@ namespace Tnb.WarehouseMgr
|
|||||||
}
|
}
|
||||||
return await Task.FromResult(true);
|
return await Task.FromResult(true);
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// MES齐套搭配方案查询接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<dynamic> MESCollocationSchemeQuery(MESCollocationSchemeQueryInput input)
|
||||||
|
{
|
||||||
|
var results = new List<CollocationSchemeOutput>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
results = await _db.Queryable<WmsCollocationSchemeH>()
|
||||||
|
.LeftJoin<WmsCollocationSchemeD>((a, b) => b.bill_id == a.id)
|
||||||
|
.Where(a => a.material_id == input.material_id)
|
||||||
|
.Select((a, b) => new CollocationSchemeOutput
|
||||||
|
{
|
||||||
|
list = SqlFunc.Subqueryable<WmsCollocationSchemeD>().Where(b => b.bill_id == a.id).ToList(),
|
||||||
|
}, true)
|
||||||
|
.Mapper(it=> it.CollocationSchemeDs = it.list.Adapt<List<CollocationSchemeDOutput>>())
|
||||||
|
.ToListAsync();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
|
||||||
|
}
|
||||||
|
return await ToApiResult(results);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using JNPF.Common.Contracts;
|
||||||
using JNPF.Common.Core.Manager;
|
using JNPF.Common.Core.Manager;
|
||||||
using JNPF.Common.Dtos.VisualDev;
|
using JNPF.Common.Dtos.VisualDev;
|
||||||
using JNPF.Common.Enums;
|
using JNPF.Common.Enums;
|
||||||
@@ -22,6 +23,7 @@ using Tnb.WarehouseMgr.Entities;
|
|||||||
using Tnb.WarehouseMgr.Entities.Attributes;
|
using Tnb.WarehouseMgr.Entities.Attributes;
|
||||||
using Tnb.WarehouseMgr.Entities.Consts;
|
using Tnb.WarehouseMgr.Entities.Consts;
|
||||||
using Tnb.WarehouseMgr.Entities.Dto;
|
using Tnb.WarehouseMgr.Entities.Dto;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
using Tnb.WarehouseMgr.Interfaces;
|
using Tnb.WarehouseMgr.Interfaces;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr
|
namespace Tnb.WarehouseMgr
|
||||||
@@ -33,7 +35,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
[OverideVisualDev(ModuleConsts.MODULE_WMSEMPTYINSTOCK_ID)]
|
[OverideVisualDev(ModuleConsts.MODULE_WMSEMPTYINSTOCK_ID)]
|
||||||
[ServiceModule(BizTypeId)]
|
[ServiceModule(BizTypeId)]
|
||||||
|
|
||||||
public class WmsEmptyInstockService : BaseWareHouseService
|
public class WmsEmptyInstockService : BaseWareHouseService, IWmsEmptyInstockService
|
||||||
{
|
{
|
||||||
private const string BizTypeId = "26121986416677";
|
private const string BizTypeId = "26121986416677";
|
||||||
private readonly ISqlSugarClient _db;
|
private readonly ISqlSugarClient _db;
|
||||||
@@ -116,7 +118,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
preTask.create_time = DateTime.Now;
|
preTask.create_time = DateTime.Now;
|
||||||
return preTask;
|
return preTask;
|
||||||
}).ToList();
|
}).ToList();
|
||||||
var isOk = await _wareHouseService.GenPreTask(preTasks,null!);
|
var isOk = await _wareHouseService.GenPreTask(preTasks, null!);
|
||||||
if (isOk)
|
if (isOk)
|
||||||
{
|
{
|
||||||
var preTaskUpInput = new GenPreTaskUpInput();
|
var preTaskUpInput = new GenPreTaskUpInput();
|
||||||
@@ -161,7 +163,55 @@ namespace Tnb.WarehouseMgr
|
|||||||
}
|
}
|
||||||
return Task.FromResult(true);
|
return Task.FromResult(true);
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// MES空载具入库
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<dynamic> MesEmptyCarryInStock(MESEmptyCarryInStockInput input)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.carry_code == input.carry_code);
|
||||||
|
var location = await _db.Queryable<BasLocation>().SingleAsync(it => it.location_code == input.location_code);
|
||||||
|
var emptyInstock = await _db.Queryable<WmsEmptyInstock>().FirstAsync(it => it.carry_code == input.carry_code && it.status == WmsWareHouseConst.BILLSTATUS_ADD_ID);
|
||||||
|
if (emptyInstock != null)
|
||||||
|
{
|
||||||
|
return ToApiResult(HttpStatusCode.InternalServerError, $"空载具{emptyInstock.carry_code},预任务已生成");
|
||||||
|
}
|
||||||
|
if (carry != null && location != null)
|
||||||
|
{
|
||||||
|
var cols = new List<string>();
|
||||||
|
var dic = new Dictionary<string, object>();
|
||||||
|
dic[nameof(WmsEmptyInstock.id)] = SnowflakeIdHelper.NextId();
|
||||||
|
dic[nameof(WmsEmptyInstock.org_id)] = input.org_id;
|
||||||
|
dic[nameof(WmsEmptyInstock.location_id)] = location.id;
|
||||||
|
dic[nameof(WmsEmptyInstock.bill_code)] = await _billRullService.GetBillNumber(WmsWareHouseConst.WMS_EMPTYINSTK_ENCODE);
|
||||||
|
dic[nameof(WmsEmptyInstock.status)] = WmsWareHouseConst.BILLSTATUS_ADD_ID;
|
||||||
|
dic[nameof(WmsEmptyInstock.carry_id)] = carry.id;
|
||||||
|
dic[nameof(WmsEmptyInstock.carry_code)] = input.carry_code;
|
||||||
|
dic[nameof(WmsEmptyInstock.biz_type)] = WmsWareHouseConst.BIZTYPE_WMSEMPTYINSTOCK_ID;
|
||||||
|
dic[nameof(WmsEmptyInstock.create_id)] = input.create_id;
|
||||||
|
dic[nameof(WmsEmptyInstock.create_time)] = DateTime.Now;
|
||||||
|
dic[nameof(WmsEmptyInstock.warehouse_id)] = input.warehouse_id;
|
||||||
|
|
||||||
|
VisualDevModelDataCrInput visualDevModelDataCrInput = new ()
|
||||||
|
{
|
||||||
|
data = dic
|
||||||
|
};
|
||||||
|
await WmsEmptyIn(visualDevModelDataCrInput);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await _db.Ado.RollbackTranAsync();
|
||||||
|
return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
|
||||||
|
}
|
||||||
|
return ToApiResult();
|
||||||
|
|
||||||
|
}
|
||||||
public async override Task ModifyAsync(WareHouseUpInput input)
|
public async override Task ModifyAsync(WareHouseUpInput input)
|
||||||
{
|
{
|
||||||
if (input == null) throw new ArgumentNullException(nameof(input));
|
if (input == null) throw new ArgumentNullException(nameof(input));
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Aop.Api.Domain;
|
||||||
using JNPF.Common.Core.Manager;
|
using JNPF.Common.Core.Manager;
|
||||||
using JNPF.Common.Dtos.VisualDev;
|
using JNPF.Common.Dtos.VisualDev;
|
||||||
using JNPF.Common.Enums;
|
using JNPF.Common.Enums;
|
||||||
@@ -21,6 +22,7 @@ using Tnb.WarehouseMgr.Entities;
|
|||||||
using Tnb.WarehouseMgr.Entities.Attributes;
|
using Tnb.WarehouseMgr.Entities.Attributes;
|
||||||
using Tnb.WarehouseMgr.Entities.Consts;
|
using Tnb.WarehouseMgr.Entities.Consts;
|
||||||
using Tnb.WarehouseMgr.Entities.Dto;
|
using Tnb.WarehouseMgr.Entities.Dto;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
using Tnb.WarehouseMgr.Entities.Enums;
|
using Tnb.WarehouseMgr.Entities.Enums;
|
||||||
using Tnb.WarehouseMgr.Interfaces;
|
using Tnb.WarehouseMgr.Interfaces;
|
||||||
|
|
||||||
@@ -33,7 +35,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
[OverideVisualDev(ModuleConsts.MODULE_WMSEMPTYOUTSTK_ID)]
|
[OverideVisualDev(ModuleConsts.MODULE_WMSEMPTYOUTSTK_ID)]
|
||||||
[ServiceModule(BizTypeId)]
|
[ServiceModule(BizTypeId)]
|
||||||
|
|
||||||
public class WmsEmptyOutstockService : BaseWareHouseService
|
public class WmsEmptyOutstockService : BaseWareHouseService, IWmsEmptyOutstockService
|
||||||
{
|
{
|
||||||
private const string BizTypeId = "26122265173285";
|
private const string BizTypeId = "26122265173285";
|
||||||
private readonly ISqlSugarClient _db;
|
private readonly ISqlSugarClient _db;
|
||||||
@@ -59,6 +61,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
OverideFuncs.CreateAsync = PDAWmsEmptyOut;
|
OverideFuncs.CreateAsync = PDAWmsEmptyOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private async Task<dynamic> PDAWmsEmptyOut(VisualDevModelDataCrInput input)
|
private async Task<dynamic> PDAWmsEmptyOut(VisualDevModelDataCrInput input)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -209,5 +213,42 @@ namespace Tnb.WarehouseMgr
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MES空载具出库接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<dynamic> MESEmptyCarryOutStk(MESEmptyCarryOutStkInput input)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var location = await _db.Queryable<BasLocation>().SingleAsync(it => it.location_code == input.location_code);
|
||||||
|
var dic = new Dictionary<string, object>();
|
||||||
|
dic[nameof(WmsEmptyOutstockH.id)] = SnowflakeIdHelper.NextId();
|
||||||
|
dic[nameof(WmsEmptyOutstockH.org_id)] = input.org_id;
|
||||||
|
dic[nameof(WmsEmptyOutstockH.location_id)] = location.id;
|
||||||
|
dic[nameof(WmsEmptyOutstockH.carrystd_id)] = input.carrystd_id;
|
||||||
|
dic[nameof(WmsEmptyOutstockH.bill_code)] = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_EMPTYOUTSTK_ENCODE).GetAwaiter().GetResult();
|
||||||
|
dic[nameof(WmsEmptyOutstockH.status)] = WmsWareHouseConst.BILLSTATUS_ADD_ID;
|
||||||
|
dic[nameof(WmsEmptyOutstockH.qty)] = input.qty;
|
||||||
|
dic[nameof(WmsEmptyOutstockH.biz_type)] = WmsWareHouseConst.BIZTYPE_WMSEPTYOUTSTK_ID;
|
||||||
|
dic[nameof(WmsEmptyOutstockH.create_id)] = input.create_id;
|
||||||
|
dic[nameof(WmsEmptyOutstockH.create_time)] = DateTime.Now;
|
||||||
|
|
||||||
|
VisualDevModelDataCrInput visualDevModelDataCrInput = new VisualDevModelDataCrInput
|
||||||
|
{
|
||||||
|
data = dic,
|
||||||
|
};
|
||||||
|
await PDAWmsEmptyOut(visualDevModelDataCrInput);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await _db.Ado.RollbackTranAsync();
|
||||||
|
return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
|
||||||
|
}
|
||||||
|
return ToApiResult();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using JNPF.Common.Enums;
|
|||||||
using JNPF.Common.Extension;
|
using JNPF.Common.Extension;
|
||||||
using JNPF.FriendlyException;
|
using JNPF.FriendlyException;
|
||||||
using JNPF.Systems.Interfaces.System;
|
using JNPF.Systems.Interfaces.System;
|
||||||
|
using Mapster;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.CodeAnalysis.Operations;
|
using Microsoft.CodeAnalysis.Operations;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
@@ -25,7 +26,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 出库签收
|
/// 出库签收
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class WmsSignForDeliveryService : BaseWareHouseService
|
public class WmsSignForDeliveryService : BaseWareHouseService, IWmsSignForDeliveryService
|
||||||
{
|
{
|
||||||
private readonly ISqlSugarClient _db;
|
private readonly ISqlSugarClient _db;
|
||||||
private readonly IWmsCarryService _wareCarryService;
|
private readonly IWmsCarryService _wareCarryService;
|
||||||
@@ -112,6 +113,17 @@ namespace Tnb.WarehouseMgr
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// MES调用载具签收接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task MESCarrySign(MESCarrySignInput input)
|
||||||
|
{
|
||||||
|
var signInput = input.Adapt<SignForDeliveryInput>();
|
||||||
|
await SignForDelivery(signInput);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,12 +5,14 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Aop.Api.Domain;
|
using Aop.Api.Domain;
|
||||||
using JNPF.Common.Core.Manager;
|
using JNPF.Common.Core.Manager;
|
||||||
|
using JNPF.Common.Dtos.VisualDev;
|
||||||
using JNPF.Common.Enums;
|
using JNPF.Common.Enums;
|
||||||
using JNPF.Common.Extension;
|
using JNPF.Common.Extension;
|
||||||
using JNPF.Common.Security;
|
using JNPF.Common.Security;
|
||||||
using JNPF.FriendlyException;
|
using JNPF.FriendlyException;
|
||||||
using JNPF.Systems.Interfaces.System;
|
using JNPF.Systems.Interfaces.System;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using Tnb.BasicData.Entities;
|
using Tnb.BasicData.Entities;
|
||||||
@@ -18,6 +20,8 @@ using Tnb.WarehouseMgr.Entities;
|
|||||||
using Tnb.WarehouseMgr.Entities.Attributes;
|
using Tnb.WarehouseMgr.Entities.Attributes;
|
||||||
using Tnb.WarehouseMgr.Entities.Consts;
|
using Tnb.WarehouseMgr.Entities.Consts;
|
||||||
using Tnb.WarehouseMgr.Entities.Dto;
|
using Tnb.WarehouseMgr.Entities.Dto;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Outputs;
|
||||||
using Tnb.WarehouseMgr.Entities.Enums;
|
using Tnb.WarehouseMgr.Entities.Enums;
|
||||||
using Tnb.WarehouseMgr.Interfaces;
|
using Tnb.WarehouseMgr.Interfaces;
|
||||||
|
|
||||||
@@ -278,6 +282,53 @@ namespace Tnb.WarehouseMgr
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// MES齐套出库接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<dynamic> MESKittingOutStk(List<MESKittingOutStkInput> input)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await _db.Ado.BeginTranAsync();
|
||||||
|
List<WmsKittingoutD> kittingOutDs = new();
|
||||||
|
var kittingOuts = input.Adapt<List<WmsKittingoutH>>();
|
||||||
|
|
||||||
|
for (int i = 0; i < kittingOuts.Count; i++)
|
||||||
|
{
|
||||||
|
var x= kittingOuts[i];
|
||||||
|
x.id = SnowflakeIdHelper.NextId();
|
||||||
|
x.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_KITTINGOUTSTK_ENCODE).GetAwaiter().GetResult();
|
||||||
|
x.bill_date = DateTime.Now;
|
||||||
|
x.bill_type = WmsWareHouseConst.BIZTYPE_WMSKITTINGOUTSTK_ID;
|
||||||
|
x.status = WmsWareHouseConst.BILLSTATUS_ADD_ID;
|
||||||
|
x.biz_type = WmsWareHouseConst.BIZTYPE_WMSKITTINGOUTSTK_ID;
|
||||||
|
var d = input[i]?.wmsKittingoutDs?.Adapt<List<WmsKittingoutD>>();
|
||||||
|
d?.ForEach(it =>
|
||||||
|
{
|
||||||
|
it.id = SnowflakeIdHelper.NextId();
|
||||||
|
it.bill_id = x.id;
|
||||||
|
it.qty = 0;
|
||||||
|
it.real_box = 0;
|
||||||
|
it.warehouse_id = x.warehouse_id;
|
||||||
|
});
|
||||||
|
kittingOutDs.AddRange(d!);
|
||||||
|
}
|
||||||
|
await _db.Insertable(kittingOuts).ExecuteCommandAsync();
|
||||||
|
await _db.Insertable(kittingOutDs).ExecuteCommandAsync();
|
||||||
|
await _db.Ado.CommitTranAsync();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await _db.Ado.RollbackTranAsync();
|
||||||
|
return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
|
||||||
|
}
|
||||||
|
await KittingOutByAdd();
|
||||||
|
return ToApiResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user