修改MES入库参数
This commit is contained in:
@@ -192,6 +192,40 @@ namespace Tnb.WarehouseMgr.Entities.Consts
|
||||
/// 载具规格-料架
|
||||
/// </summary>
|
||||
public const string CARRY_LJSTD_ID = "26037267399717";
|
||||
/// <summary>
|
||||
/// 打印状态-未打印
|
||||
/// </summary>
|
||||
public const string PRINT_STATUS_NOTPRINTED = "26191366982437";
|
||||
/// <summary>
|
||||
/// 打印状态-打印中
|
||||
/// </summary>
|
||||
public const string PRINT_STATUS_PRINTING = "26191369755173";
|
||||
/// <summary>
|
||||
/// 打印状态-打印完成
|
||||
/// </summary>
|
||||
public const string PRINT_STATUS_PRINTCOMPLETE= "26191372853541";
|
||||
/// <summary>
|
||||
/// 同步状态-无需同步
|
||||
/// </summary>
|
||||
public const string SYNC_STATUS_NONEEDSYNC = "26191359047461";
|
||||
/// <summary>
|
||||
/// 同步状态-未同步
|
||||
/// </summary>
|
||||
public const string SYNC_STATUS__NOTSYNC = "26191345740069";
|
||||
/// <summary>
|
||||
/// 同步状态-同步中
|
||||
/// </summary>
|
||||
public const string SYNC_STATUS__SYNCING = "26191348846117";
|
||||
/// <summary>
|
||||
/// 同步状态-同步完成
|
||||
/// </summary>
|
||||
public const string SYNC_STATUS__SYNCCOMPLETE = "26191351559205";
|
||||
/// <summary>
|
||||
/// 同步状态-同步失败
|
||||
/// </summary>
|
||||
public const string SYNC_STATUS__SYNCFAILED = "26191354152229";
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,21 +240,21 @@ namespace Tnb.WarehouseMgr
|
||||
List<WmsInstockD> instockds = new();
|
||||
List<WmsInstockCode> instockcodes = new();
|
||||
//入库申请主表
|
||||
if (input.data.ContainsKey("wmsInStock")) {
|
||||
instock = input.data.ContainsKey("wmsInStock").ToObject<WmsInstockH>();
|
||||
if (input.data.ContainsKey("wmsInStockH")) {
|
||||
instock = input.data.ContainsKey("wmsInStockH").ToObject<WmsInstockH>();
|
||||
}
|
||||
//入库申请物料明细表
|
||||
if (input.data.ContainsKey("instockds"))
|
||||
if (input.data.ContainsKey("wmsInStockds"))
|
||||
{
|
||||
if (input.data["instockds"] != null && input.data["instockds"].IsNotEmptyOrNull())
|
||||
if (input.data["wmsInStockds"] != null && input.data["wmsInStockds"].IsNotEmptyOrNull())
|
||||
{
|
||||
instockds = input.data["instockds"].ToObject<List<WmsInstockD>>();
|
||||
instockds = input.data["wmsInStockds"].ToObject<List<WmsInstockD>>();
|
||||
}
|
||||
}
|
||||
//入库申请条码明细表
|
||||
if (input.data.ContainsKey("instockcodes")) {
|
||||
if (input.data["instockcodes"] != null && input.data["instockcodes"].IsNotEmptyOrNull()) {
|
||||
instockcodes = input.data["instockcodes"].ToObject<List<WmsInstockCode>>();
|
||||
if (input.data.ContainsKey("wmsInStockCodes")) {
|
||||
if (input.data["wmsInStockCodes"] != null && input.data["wmsInStockCodes"].IsNotEmptyOrNull()) {
|
||||
instockcodes = input.data["wmsInStockCodes"].ToObject<List<WmsInstockCode>>();
|
||||
}
|
||||
}
|
||||
//如果数据不全,
|
||||
@@ -266,12 +266,21 @@ namespace Tnb.WarehouseMgr
|
||||
instock.id = SnowflakeIdHelper.NextId();
|
||||
instock.biz_type = WmsWareHouseConst.BIZTYPE_WMSINSTOCK_ID;
|
||||
instock.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_INSTOCK_ENCODE).GetAwaiter().GetResult();
|
||||
instock.generate_type = "1";// 自动
|
||||
instock.sync_status =WmsWareHouseConst.SYNC_STATUS__NOTSYNC;//未同步
|
||||
instock.print_status = WmsWareHouseConst.PRINT_STATUS_PRINTCOMPLETE;//已打印
|
||||
instock.status = WmsWareHouseConst.BILLSTATUS_ADD_ID;// 新增
|
||||
instock.create_time = DateTime.Now;
|
||||
await _db.Insertable(instock).ExecuteCommandAsync();
|
||||
//明细表
|
||||
foreach (var instockd in instockds)
|
||||
{
|
||||
instockd.id = SnowflakeIdHelper.NextId();
|
||||
instockd.bill_id = instock.id;
|
||||
instockd.line_status = WmsWareHouseConst.BILLSTATUS_ADD_ID;
|
||||
instockd.qty = 0;
|
||||
instock.create_time = instock.create_time;
|
||||
instock.create_id = instock.create_id;
|
||||
}
|
||||
await _db.Insertable(instockds).ExecuteCommandAsync();
|
||||
var items = instockds.Adapt<List<WmsInstockCode>>();
|
||||
@@ -290,6 +299,9 @@ namespace Tnb.WarehouseMgr
|
||||
c.bill_d_id = instockcodes.Find(x => x.material_code == materialCode && x.code_batch == codeBatch)?.id!;
|
||||
c.barcode = instockcode.barcode;
|
||||
c.codeqty = instockcode.codeqty;
|
||||
c.is_end = 0;// 未结束
|
||||
c.create_time = instock.create_time;
|
||||
c.create_id = instock.create_id;
|
||||
instockCOdes.Add(c);
|
||||
}
|
||||
}
|
||||
@@ -380,7 +392,7 @@ namespace Tnb.WarehouseMgr
|
||||
preTaskUpInput.CarryStartLocationId = points.FirstOrDefault()!.location_id!;
|
||||
preTaskUpInput.CarryStartLocationCode = points.FirstOrDefault()!.location_code!;
|
||||
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList()!;
|
||||
if (input.data.ContainsKey("wmsInStock"))
|
||||
if (input.data.ContainsKey("wmsInStockH"))
|
||||
{
|
||||
//创建预任务操作记录
|
||||
var operBillId = string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user