容器出库
库位禁用 演示逻辑修改 task station=1的出库任务需要自动下发入库任务和AGv任务
This commit is contained in:
1 parent
a6168a75bf
commit
a3e91357ee
10 files changed
+166
-33
No files matched your search
@@ -55,6 +55,7 @@ public class ShipOutController : BaseController
|
||||
ContainerCode = location.ContainerCode,
|
||||
FromLocation = location.Code,
|
||||
ToLocation = "",
|
||||
Station = "1",
|
||||
Status = TaskStatusEnum.待下发,
|
||||
CreateBy = Wtm.LoginUserInfo?.ITCode??"WMS",
|
||||
CreateTime = DateTime.Now
|
||||
@@ -69,25 +70,34 @@ public class ShipOutController : BaseController
|
||||
FromLocation = task.FromLocation,
|
||||
ToLocation = task.ToLocation
|
||||
};
|
||||
var res = Wtm.CallAPI<ApiJsonResult<dynamic>>("WCS", "TaskAssign", HttpMethodEnum.POST, postData)
|
||||
.Result.Data;
|
||||
if (res.Success)
|
||||
try
|
||||
{
|
||||
task.Status = TaskStatusEnum.已下发;
|
||||
var res = Wtm.CallAPI<ApiJsonResult<dynamic>>("WCS", "TaskAssign", HttpMethodEnum.POST, postData)
|
||||
.Result.Data;
|
||||
if (res.Success)
|
||||
{
|
||||
task.Status = TaskStatusEnum.已下发;
|
||||
}
|
||||
else
|
||||
{
|
||||
task.ErrorMsg = res.Msg;
|
||||
}
|
||||
}
|
||||
else
|
||||
catch (Exception ex)
|
||||
{
|
||||
task.ErrorMsg = res.Msg;
|
||||
task.ErrorMsg = ex.Message;
|
||||
}
|
||||
|
||||
task.UpdateTime = DateTime.Now;
|
||||
task.UpdateBy = "WMS";
|
||||
_unitWork.Update(task);
|
||||
|
||||
|
||||
return JsonMore(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
return JsonMore(null, 500, "库内无可用容器!");
|
||||
return JsonMore(null, 500, "库内无可用空容器!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user