1
This commit is contained in:
@@ -676,5 +676,25 @@
|
||||
/// </summary>
|
||||
public const string EQUIPMANAGERORG_ID = "26586914497557";
|
||||
|
||||
/// <summary>
|
||||
/// 注塑提报
|
||||
/// </summary>
|
||||
public const string bipwarehouseid_zs = "1001A1100000001SO7YO";
|
||||
/// <summary>
|
||||
/// 挤出提报
|
||||
/// </summary>
|
||||
public const string bipwarehouseid_jc = "1001A1100000001SO4AM";
|
||||
/// <summary>
|
||||
/// 包装提报
|
||||
/// </summary>
|
||||
public const string bipwarehouseid_bz = "1001A1100000001KZIU5";
|
||||
/// <summary>
|
||||
/// 灭菌提报
|
||||
/// </summary>
|
||||
public const string bipwarehouseid_mj = "1001A1100000001MA8KP";
|
||||
/// <summary>
|
||||
/// 成品提报
|
||||
/// </summary>
|
||||
public const string bipwarehouseid_cp = "1001A1100000001MA8ME";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||
using Tnb.WarehouseMgr.Entities.Entity;
|
||||
using Tnb.WarehouseMgr.Interfaces;
|
||||
using Tnb.ProductionMgr.Entities.Entity;
|
||||
using System.Threading;
|
||||
|
||||
namespace Tnb.WarehouseMgr
|
||||
{
|
||||
@@ -67,6 +68,7 @@ namespace Tnb.WarehouseMgr
|
||||
db = dbConn;
|
||||
|
||||
string type = "";
|
||||
SemaphoreSlim semaphoreSlim = null;
|
||||
try
|
||||
{
|
||||
await db.Ado.BeginTranAsync();
|
||||
@@ -118,19 +120,19 @@ namespace Tnb.WarehouseMgr
|
||||
string scwarehouse_id = "";
|
||||
if (type == DictConst.PrdMoTypeZS)
|
||||
{
|
||||
scwarehouse_id = "0201010402";
|
||||
scwarehouse_id = WmsWareHouseConst.bipwarehouseid_zs;
|
||||
}
|
||||
else if (type == DictConst.PrdMoTypeJC)
|
||||
{
|
||||
scwarehouse_id = "0202010202";
|
||||
scwarehouse_id = WmsWareHouseConst.bipwarehouseid_jc;
|
||||
}
|
||||
else if (type == DictConst.PrdMoTypeZZ)
|
||||
{
|
||||
scwarehouse_id = "0204010402";
|
||||
scwarehouse_id = WmsWareHouseConst.bipwarehouseid_bz;
|
||||
}
|
||||
else if (type == DictConst.PrdMoTypeBZ)
|
||||
{
|
||||
scwarehouse_id = "0204010402";
|
||||
scwarehouse_id = WmsWareHouseConst.bipwarehouseid_bz;
|
||||
}
|
||||
#endregion
|
||||
foreach (WmsPrdInstockDInput prdInstockDInput in input.prdInstockDs)
|
||||
@@ -171,16 +173,17 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
if (type == DictConst.PrdMoTypeZS)
|
||||
{
|
||||
await _s_taskExecuteSemaphore_F1ZCCInstock.WaitAsync();
|
||||
semaphoreSlim = _wareHouseService.GetSemaphore("instock", WmsWareHouseConst.WAREHOUSE_ZC_ID);
|
||||
}
|
||||
else if (type == DictConst.PrdMoTypeJC)
|
||||
{
|
||||
await _s_taskExecuteSemaphore_F2HCCInstock.WaitAsync();
|
||||
semaphoreSlim = _wareHouseService.GetSemaphore("instock", WmsWareHouseConst.WAREHOUSE_HCC_ID);
|
||||
}
|
||||
else if (type == DictConst.PrdMoTypeBZ)
|
||||
{
|
||||
|
||||
semaphoreSlim = _wareHouseService.GetSemaphore("instock", WmsWareHouseConst.WAREHOUSE_DMJC_ID);
|
||||
}
|
||||
await semaphoreSlim.WaitAsync();
|
||||
|
||||
foreach (WmsPrdInstockD wmsPrdInstockD in WmsPrdInstockDs)
|
||||
{
|
||||
@@ -315,18 +318,7 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (type == DictConst.PrdMoTypeZS)
|
||||
{
|
||||
_s_taskExecuteSemaphore_F1ZCCInstock.Release();
|
||||
}
|
||||
else if (type == DictConst.PrdMoTypeJC)
|
||||
{
|
||||
_s_taskExecuteSemaphore_F2HCCInstock.Release();
|
||||
}
|
||||
else if (type == DictConst.PrdMoTypeBZ)
|
||||
{
|
||||
|
||||
}
|
||||
semaphoreSlim.Release();
|
||||
|
||||
_wareHouseService.GenTaskExecute();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user