包材入库 包材出库 PDA空载具出库bug、其它bug处理
This commit is contained in:
@@ -457,10 +457,10 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
if (wmsDistaskH.startlocation_code.Contains("DT") || wmsDistaskH.endlocation_code.Contains("DT"))
|
||||
{
|
||||
WmsElevatorUnlockInput wmsElevatorUnlockInput = new ();
|
||||
wmsElevatorUnlockInput.elevator_id = wmsDistaskH.device_id;
|
||||
await WmsElevatorUnlock(wmsElevatorUnlockInput);
|
||||
Logger.Information($"WCS取消任务{wmsDistaskH.bill_code},自动解占用电梯{wmsDistaskH.device_id}");
|
||||
//WmsElevatorUnlockInput wmsElevatorUnlockInput = new ();
|
||||
//wmsElevatorUnlockInput.elevator_id = wmsDistaskH.device_id;
|
||||
//await WmsElevatorUnlock(wmsElevatorUnlockInput);
|
||||
//Logger.Information($"WCS取消任务{wmsDistaskH.bill_code},自动解占用电梯{wmsDistaskH.device_id}");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -679,15 +679,22 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
try
|
||||
{
|
||||
Logger.Information($"【WmsElevatorUnlock】操作电梯{input.elevator_id}手动解锁");
|
||||
WmsElevatorH wmsElevatorH = await _db.Queryable<WmsElevatorH>().Where(r => r.elevator_code == input.elevator_code).FirstAsync();
|
||||
if (wmsElevatorH == null)
|
||||
{
|
||||
Logger.LogWarning($"未找到电梯{input.elevator_code}的配置");
|
||||
throw new Exception($"未找到电梯{input.elevator_code}的配置");
|
||||
}
|
||||
Logger.Information($"【WmsElevatorUnlock】操作电梯{input.elevator_code}手动解锁");
|
||||
await _db.Updateable<WmsElevatorH>().SetColumns(r => r.is_use == (int)EnumElevatorUseStatus.空闲)
|
||||
.Where(it => it.elevator_id == input.elevator_id).ExecuteCommandAsync();
|
||||
s_eleUseStatusDic[input.elevator_id] = (int)EnumElevatorUseStatus.空闲;
|
||||
.Where(it => it.elevator_id == wmsElevatorH.elevator_id).ExecuteCommandAsync();
|
||||
s_eleUseStatusDic[wmsElevatorH.elevator_id] = (int)EnumElevatorUseStatus.空闲;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error("【ElevatorConfirm】 申请进出电梯信号错误", ex);
|
||||
return await ToApiResult(HttpStatusCode.InternalServerError, "请重试!");
|
||||
Logger.Error("【WmsElevatorUnlock】 操作电梯手动解锁异常", ex.Message);
|
||||
Logger.Error("【WmsElevatorUnlock】 操作电梯手动解锁异常", ex.StackTrace);
|
||||
return await ToApiResult(HttpStatusCode.InternalServerError, "操作电梯手动解锁异常:" + ex.Message);
|
||||
throw;
|
||||
}
|
||||
return await ToApiResult(HttpStatusCode.OK, "解锁成功");
|
||||
|
||||
Reference in New Issue
Block a user