add - 添加WMS出库记录

master
Wen JY 10 months ago
parent 627c0ef1cd
commit 0a8bff449d

@ -0,0 +1,87 @@
using System.Runtime.Serialization;
using SqlSugar;
namespace SlnMesnac.Model.domain
{
/// <summary>
/// WMS 出库记录反馈
/// </summary>
[SugarTable("I_TASKOUT_FEEDBACK_TO_MES"), TenantAttribute("wms")]
public class WmsTaskOut
{
[SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, IsIdentity = true)]
public int OBJ_ID { get; set; }
/// <summary>
/// 单号
/// </summary>
[SugarColumn(ColumnName = "ORDER_NO")]
public string OrderNo { get; set; }
/// <summary>
/// 订单行号
/// </summary>
[SugarColumn(ColumnName = "ORDER_LINE_NO")]
public string OrderLineNo { get; set; }
/// <summary>
/// 单据类型
/// </summary>
[SugarColumn(ColumnName = "ORDER_TYPE_NO")]
public string OrderTypeNo { get; set; }
/// <summary>
/// 库位号
/// </summary>
[SugarColumn(ColumnName = "BIN_NO")]
public string BinNo { get; set; }
/// <summary>
/// 任务号
/// </summary>
[SugarColumn(ColumnName = "TASK_NO")]
public string TaskNo { get; set; }
/// <summary>
/// 起始位置
/// </summary>
[SugarColumn(ColumnName = "SLOC_NO")]
public string SlocNo { get; set; }
/// <summary>
/// 目的位置
/// </summary>
[SugarColumn(ColumnName = "ELOC_NO")]
public string ElocNo { get; set; }
/// <summary>
/// 任务数量
/// </summary>
[SugarColumn(ColumnName = "PRODUCT_QTY")]
public decimal ProductQty { get; set; }
/// <summary>
/// 批次号
/// </summary>
[SugarColumn(ColumnName = "BATCH_NO")]
public string BatchNo { get; set; }
/// <summary>
/// 物料编码
/// </summary>
[SugarColumn(ColumnName = "MATER_NO")]
public string MaterNo { get; set; }
/// <summary>
/// 托盘号
/// </summary>
[SugarColumn(ColumnName = "PALLET_NO")]
public string PalletNo { get; set; }
/// <summary>
/// 标签唯一码
/// </summary>
[SugarColumn(ColumnName = "SERIAL_NUM")]
public string SerialNum { get; set; }
}
}

@ -57,7 +57,8 @@ namespace SlnMesnac.Repository
services.AddSingleton(typeof(Repository<>));
services.AddSingleton<IBaseUserService, BaseUserServiceImpl>();
services.AddSingleton<IBaseMaterialService, BaseMaterialServiceImpl>();
services.AddScoped<IMcsBinToMaterService, McsBinToMaterServiceImpl>();
services.AddSingleton<IMcsBinToMaterService, McsBinToMaterServiceImpl>();
services.AddSingleton<IWmsTaskOutService, WmsTaskOutServiceImpl>();
}
}
}

@ -0,0 +1,24 @@
using System.Collections.Generic;
using SlnMesnac.Model.domain;
namespace SlnMesnac.Repository.service
{
/// <summary>
/// WMS出库记录反馈
/// </summary>
public interface IWmsTaskOutService
{
/// <summary>
/// 获取WMS出库记录
/// </summary>
/// <returns></returns>
List<WmsTaskOut> GetWmsTaskOutList();
/// <summary>
/// 通过标签唯一编码获取出库记录,获取物料信息
/// </summary>
/// <param name="SerialNum"></param>
/// <returns></returns>
WmsTaskOut GetWmsTaskOutBySerialNum(string SerialNum);
}
}

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using SlnMesnac.Model.domain;
namespace SlnMesnac.Repository.service.Impl
{
public class WmsTaskOutServiceImpl:IWmsTaskOutService
{
private readonly Repository<WmsTaskOut> _rep;
/// <summary>
/// 获取WMS出库记录
/// </summary>
/// <returns></returns>
/// <exception cref="ArgumentException"></exception>
public List<WmsTaskOut> GetWmsTaskOutList()
{
try
{
return _rep.GetList();;
}
catch (Exception e)
{
throw new ArgumentException($"获取料仓物料对应信息异常:{e.Message}");
}
}
/// <summary>
/// 通过标签唯一编码获取出库记录,获取物料信息
/// </summary>
/// <param name="SerialNum"></param>
/// <returns></returns>
/// <exception cref="ArgumentException"></exception>
public WmsTaskOut GetWmsTaskOutBySerialNum(string SerialNum)
{
try
{
return _rep.GetFirst(x=>x.SerialNum == SerialNum);
}
catch (Exception e)
{
throw new ArgumentException($"获取料仓物料对应信息异常:{e.Message}");
}
}
}
}

@ -18,7 +18,7 @@
{
"configId": "wms",
"dbType": 1,
"connStr": "server=58.63.214.27,23313;uid=dkmes;pwd=Duken123;database=mesnac_MCS_ShareDB"
"connStr": "server=58.63.214.27,23314;uid=dk_mes;pwd=dk_mes;database=gzdk_interaction_mes"
},
{
"configId": "mes",

Loading…
Cancel
Save