现场问题处理
This commit is contained in:
@@ -2475,18 +2475,19 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
{
|
||||
if (s_taskFloor4DMC2CPKService.CurrentCount == 0)
|
||||
return;
|
||||
var Floor4DMC2CPK = await db_Floor4DMC2CPK.Queryable<BasFactoryConfig>().Where(p => p.key == "Floor4DMC2CPK").FirstAsync();
|
||||
// 0则不进行移转
|
||||
if (Floor4DMC2CPK != null && Floor4DMC2CPK.value == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
await s_taskFloor4DMC2CPKService.WaitAsync();
|
||||
Stopwatch stopwatch = new Stopwatch();
|
||||
stopwatch.Start();
|
||||
|
||||
try
|
||||
{
|
||||
var Floor4DMC2CPK = await db_Floor4DMC2CPK.Queryable<BasFactoryConfig>().Where(p => p.key == "Floor4DMC2CPK").FirstAsync();
|
||||
// 0则不进行移转
|
||||
if (Floor4DMC2CPK != null && Floor4DMC2CPK.value == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
await s_taskFloor4DMC2CPKService.WaitAsync();
|
||||
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} 开始执行四楼灭菌仓到成品库");
|
||||
LoggerTimer.LogInformation($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} 开始执行四楼灭菌仓到成品库");
|
||||
|
||||
|
||||
@@ -77,5 +77,13 @@ namespace Tnb.WarehouseMgr.Entities.Dto.ErpInputs
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop { get; set; }
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop_gys { get; set; }
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop_xph { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,5 +86,13 @@ namespace Tnb.WarehouseMgr.Entities.Dto.ErpInputs
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop { get; set; }
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop_gys { get; set; }
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop_xph { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,5 +111,13 @@ namespace Tnb.WarehouseMgr.Entities.Dto.ErpInputs
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop { get; set; }
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop_gys { get; set; }
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop_xph { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,5 +82,15 @@ namespace Tnb.WarehouseMgr.Entities.Dto.ErpInputs
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop_gys { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop_xph { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1353,6 +1353,8 @@ namespace Tnb.WarehouseMgr
|
||||
wmsSaleD.material_specification = material.material_specification;
|
||||
}
|
||||
wmsSaleD.auxprop = detail.auxprop;
|
||||
wmsSaleD.auxprop_gys = detail.auxprop_gys;
|
||||
wmsSaleD.auxprop_xph = detail.auxprop_xph;
|
||||
wmsSaleDs.Add(wmsSaleD);
|
||||
}
|
||||
|
||||
@@ -1557,6 +1559,8 @@ namespace Tnb.WarehouseMgr
|
||||
msRawmatTransferinstockD.matspecification = material.material_specification;
|
||||
}
|
||||
msRawmatTransferinstockD.auxprop = detail.auxprop;
|
||||
msRawmatTransferinstockD.auxprop_gys = detail.auxprop_gys;
|
||||
msRawmatTransferinstockD.auxprop_xph = detail.auxprop_xph;
|
||||
wmsRawmatTransferinstockDs.Add(msRawmatTransferinstockD);
|
||||
}
|
||||
|
||||
@@ -1628,6 +1632,8 @@ namespace Tnb.WarehouseMgr
|
||||
wmsTransferInstockD.material_desc = material.material_specification;
|
||||
}
|
||||
wmsTransferInstockD.auxprop = detail.auxprop;
|
||||
wmsTransferInstockD.auxprop_gys = detail.auxprop_gys;
|
||||
wmsTransferInstockD.auxprop_xph = detail.auxprop_xph;
|
||||
|
||||
wmsTransferInstockDs.Add(wmsTransferInstockD);
|
||||
}
|
||||
@@ -2226,6 +2232,8 @@ namespace Tnb.WarehouseMgr
|
||||
wmsRawmatOutstockD.material_specification = material.material_specification;
|
||||
}
|
||||
wmsRawmatOutstockD.auxprop = detail.auxprop;
|
||||
wmsRawmatOutstockD.auxprop_gys = detail.auxprop_gys;
|
||||
wmsRawmatOutstockD.auxprop_xph = detail.auxprop_xph;
|
||||
wmsRawmatOutstockDs.Add(wmsRawmatOutstockD);
|
||||
}
|
||||
|
||||
@@ -2354,6 +2362,9 @@ namespace Tnb.WarehouseMgr
|
||||
wmsRawmatOutstockD.material_specification = material.material_specification;
|
||||
}
|
||||
|
||||
wmsRawmatOutstockD.auxprop = detail.auxprop;
|
||||
wmsRawmatOutstockD.auxprop_gys = detail.auxprop_gys;
|
||||
wmsRawmatOutstockD.auxprop_xph = detail.auxprop_xph;
|
||||
wmsRawmatOutstockDs.Add(wmsRawmatOutstockD);
|
||||
}
|
||||
|
||||
@@ -2514,6 +2525,8 @@ namespace Tnb.WarehouseMgr
|
||||
throw new AppFriendlyException($@"表体明细中单位{detail.unit_code}在wms系统中未找到!", 500);
|
||||
}
|
||||
wmsInventorycheckD.auxprop = detail.auxprop;
|
||||
wmsInventorycheckD.auxprop_gys = detail.auxprop_gys;
|
||||
wmsInventorycheckD.auxprop_xph = detail.auxprop_xph;
|
||||
wmsInventorycheckDs.Add(wmsInventorycheckD);
|
||||
}
|
||||
|
||||
|
||||
@@ -581,6 +581,7 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
throw new AppFriendlyException("没有可用策略", 500);
|
||||
}
|
||||
|
||||
List<WmsCarryH> items = await cyDb.Queryable<WmsCarryH>().LeftJoin<WmsCarryCode>((a, b) => a.id == b.carry_id)
|
||||
.LeftJoin<BasLocation>((a, b, c) => a.location_id == c.id)
|
||||
.Where(whereExpr)
|
||||
@@ -3532,10 +3533,10 @@ namespace Tnb.WarehouseMgr
|
||||
string elevatorSno = wmsElevatorH.elevator_code.Replace("Elevator", "");
|
||||
|
||||
points.Add(wmsPointHs.Where(r => r.id == pStartId).First());
|
||||
points.Add(wmsPointHs.Where(r => r.point_code == $"DT-C-01-0{elevatorSno}").First());
|
||||
points.Add(wmsPointHs.Where(r => r.point_code == $"DT-01-0{elevatorSno}").First());
|
||||
points.Add(wmsPointHs.Where(r => r.point_code == $"DT-1-{elevatorSno}").First());
|
||||
points.Add(wmsPointHs.Where(r => r.point_code == $"DT-3-{elevatorSno}").First());
|
||||
points.Add(wmsPointHs.Where(r => r.point_code == $"DT-R-03-0{elevatorSno}").First());
|
||||
points.Add(wmsPointHs.Where(r => r.point_code == $"DT-03-0{elevatorSno}").First());
|
||||
points.Add(wmsPointHs.Where(r => r.id == pEndId).First());
|
||||
}
|
||||
// 2-4
|
||||
@@ -3578,16 +3579,16 @@ namespace Tnb.WarehouseMgr
|
||||
points.Add(wmsPointHs.Where(r => r.id == pEndId).First());
|
||||
}
|
||||
// 4-3
|
||||
if (startlocation.wh_id == WmsWareHouseConst.WAREHOUSE_MJC_ID && endlocation.wh_id == WmsWareHouseConst.WAREHOUSE_CP_ID)
|
||||
else if (startlocation.wh_id == WmsWareHouseConst.WAREHOUSE_MJC_ID && endlocation.wh_id == WmsWareHouseConst.WAREHOUSE_CP_ID)
|
||||
{
|
||||
WmsElevatorH wmsElevatorH = await _db.Queryable<WmsElevatorH>().Where(it => it.elevator_group == "2" && it.enabled == 1).OrderBy(r => r.task_nums).FirstAsync();
|
||||
string elevatorSno = wmsElevatorH.elevator_code.Replace("Elevator", "");
|
||||
|
||||
points.Add(wmsPointHs.Where(r => r.id == pStartId).First());
|
||||
points.Add(wmsPointHs.Where(r => r.point_code == $"DT-C-04-0{elevatorSno}").First());
|
||||
points.Add(wmsPointHs.Where(r => r.point_code == $"DT-04-0{elevatorSno}").First());
|
||||
points.Add(wmsPointHs.Where(r => r.point_code == $"DT-4-{elevatorSno}").First());
|
||||
points.Add(wmsPointHs.Where(r => r.point_code == $"DT-3-{elevatorSno}").First());
|
||||
points.Add(wmsPointHs.Where(r => r.point_code == $"DT-R-03-0{elevatorSno}").First());
|
||||
points.Add(wmsPointHs.Where(r => r.point_code == $"DT-03-0{elevatorSno}").First());
|
||||
points.Add(wmsPointHs.Where(r => r.id == pEndId).First());
|
||||
}
|
||||
else
|
||||
|
||||
@@ -319,7 +319,10 @@ namespace Tnb.WarehouseMgr
|
||||
_ = await _db.Updateable<BasLocation>().SetColumns(it => new BasLocation { is_lock = 1 }).Where(it => ids.Contains(it.id)).ExecuteCommandAsync();
|
||||
|
||||
BasMaterial basMaterial = await _db.Queryable<BasMaterial>().FirstAsync(it => it.id == input.material_id);
|
||||
|
||||
if (basMaterial == null)
|
||||
{
|
||||
throw new Exception($"找不到物料id为{input.material_id}的物料");
|
||||
}
|
||||
BindCarryCodeInput bindCarryCodeInput = new BindCarryCodeInput();
|
||||
|
||||
bindCarryCodeInput.carry_id = wmsCarryH.id;
|
||||
@@ -361,6 +364,8 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogWarning($"外协入库出现异常 {ex.Message}");
|
||||
Logger.LogWarning($"外协入库出现异常 {ex.StackTrace}");
|
||||
await _db.Ado.RollbackTranAsync();
|
||||
return await ToApiResult(HttpStatusCode.InternalServerError, ex.Message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user