bug、提示信息完善
This commit is contained in:
@@ -85,22 +85,34 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
Logger.Information($"【LoadConfirm】接收到WCS取货确认信号.................. {JsonConvert.SerializeObject(input)}");
|
||||
|
||||
var dis = _db.Queryable<WmsDistaskH>().Where(P => P.bill_code == input.taskCode).First();
|
||||
if (dis.area_code == "ZSCJ001")
|
||||
try
|
||||
{
|
||||
var flag = await _wareHouseService.Check(dis.startlocation_code, "LOAD");
|
||||
if (flag)
|
||||
var dis = _db.Queryable<WmsDistaskH>().Where(P => P.bill_code == input.taskCode).First();
|
||||
if (dis.area_code == "ZSCJ001")
|
||||
{
|
||||
await _wareHouseService.SsxControl(dis, "LOAD");
|
||||
Logger.Information("【LoadConfirm】 " + dis.startlocation_code + "取货确认..................成功");
|
||||
return await ToApiResult(HttpStatusCode.OK, "成功");
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Information("【LoadConfirm】 " + dis.startlocation_code + "取货确认..................失败");
|
||||
return await ToApiResult(HttpStatusCode.InternalServerError, "失败");
|
||||
var flag = await _wareHouseService.Check(dis.startlocation_code, "LOAD");
|
||||
if (flag)
|
||||
{
|
||||
await _wareHouseService.SsxControl(dis, "LOAD");
|
||||
Logger.Information("【LoadConfirm】 " + dis.startlocation_code + "取货确认..................成功");
|
||||
return await ToApiResult(HttpStatusCode.OK, "成功");
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Information("【LoadConfirm】 " + dis.startlocation_code + "取货确认..................失败");
|
||||
return await ToApiResult(HttpStatusCode.InternalServerError, "失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError(ex.Message);
|
||||
Logger.LogError(ex.StackTrace);
|
||||
return await ToApiResult(HttpStatusCode.InternalServerError, $"取货确认..................失败 原因是{ex.Message}");
|
||||
throw;
|
||||
}
|
||||
|
||||
|
||||
/*var whereExp = Expressionable.Create<WmsElevatorH, WmsElevatorD, WmsDistaskH>()
|
||||
.And((a, b, c) => c.bill_code == input.taskCode)
|
||||
.And((a, b, c) => a.enabled == 1)
|
||||
@@ -533,6 +545,24 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<Tnb.WarehouseMgr.Entities.Dto.Outputs.Result> WmsElevatorUnlock(WmsElevatorUnlockInput input)
|
||||
{
|
||||
try
|
||||
{
|
||||
Logger.Information($"【WmsElevatorUnlock】操作电梯{input.elevator_id}手动解锁");
|
||||
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.空闲;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error("【ElevatorConfirm】 申请进出电梯信号错误", ex);
|
||||
return await ToApiResult(HttpStatusCode.InternalServerError, "请重试!");
|
||||
throw;
|
||||
}
|
||||
return await ToApiResult(HttpStatusCode.OK, "解锁成功");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 申请进出电梯
|
||||
|
||||
Reference in New Issue
Block a user