添加wcs任务下发测试
修改入库功能 重新生成material页面
This commit is contained in:
1 parent
541fb5df6e
commit
2b01cc7584
20 files changed
+518
-60
No files matched your search
@@ -0,0 +1,53 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using HHWMS.Web.Models;
|
||||
using System.Threading.Tasks;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Mvc;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
|
||||
namespace HHWMS.Web.Controllers
|
||||
{
|
||||
[Area("WCS")]
|
||||
[ActionDescription("WCS任务测试")]
|
||||
public class WCSTaskController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// WCS任务下发页面
|
||||
/// </summary>
|
||||
public IActionResult Index()
|
||||
{
|
||||
return PartialView("Index");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交WCS任务
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> SubmitTask([FromBody] WCSTaskModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 调用WCS任务下发接口
|
||||
var result = Wtm.CallAPI<WCSTaskResponse>("WCS", "TaskAssign", HttpMethodEnum.POST, model).Result.Data;
|
||||
|
||||
if (result != null && result.Success)
|
||||
{
|
||||
return Json(new { Success = true, Msg = result.Msg ?? "接收任务成功", Data = (object)null });
|
||||
}
|
||||
else
|
||||
{
|
||||
return Json(new { Success = false, Msg = result?.Msg ?? "任务下发失败", Data = (object)null });
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
return Json(new { Success = false, Msg = $"任务下发失败:{ex.Message}", Data = (object)null });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user