New file |
| | |
| | | using HH.WCS.Mobox3.FJJT.dispatch; |
| | | using HH.WCS.Mobox3.FJJT.process; |
| | | using HH.WCS.Mobox3.FJJT.wms; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Diagnostics; |
| | | using System.Web.Http; |
| | | using static HH.WCS.Mobox3.FJJT.api.ApiHelper; |
| | | using static HH.WCS.Mobox3.FJJT.api.ApiModel; |
| | | using static HH.WCS.Mobox3.FJJT.api.OtherModel; |
| | | |
| | | namespace HH.WCS.Mobox3.FJJT.api { |
| | | /// <summary> |
| | | /// mobox3调用,脚本中调用 |
| | | /// </summary> |
| | | public class MoboxController : System.Web.Http.ApiController { |
| | | |
| | | /// <summary> |
| | | /// 1.人工入库 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public ResponseResult manualStorage(ManualStorageModel model) |
| | | { |
| | | LogHelper.Info("人工入库 Request:" + JsonConvert.SerializeObject(model), "Mobox"); |
| | | ResponseResult result = new ResponseResult(); |
| | | result = ApiHelper.manualStorage(model); |
| | | LogHelper.Info("人工入库 response:" + JsonConvert.SerializeObject(model), "Mobox"); |
| | | return result; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 2.人工出库 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public ResponseResult manualDelivery(ManualDeliveryModel model) |
| | | { |
| | | LogHelper.Info("人工出库 Request:" + JsonConvert.SerializeObject(model), "Mobox"); |
| | | ResponseResult result = new ResponseResult(); |
| | | result = ApiHelper.manualDelivery(model); |
| | | LogHelper.Info("人工出库 response:" + JsonConvert.SerializeObject(model), "Mobox"); |
| | | return result; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 3.取消任务 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public ResponseResult CancelTask(CancelTaskModel model) |
| | | { |
| | | LogHelper.Info("取消任务-CancelTask 入参:" + JsonConvert.SerializeObject(model), "Mobox"); |
| | | var result = ApiHelper.cancelTask(model.taskNo); |
| | | LogHelper.Info("取消任务-CancelTask 出参:" + JsonConvert.SerializeObject(result), "Mobox"); |
| | | return result; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 4.PDA 余料/空工装返回 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public ResponseResult returnMaterialAndPallet(LocModel model) |
| | | { |
| | | LogHelper.Info("余料/空工装返回-returnMaterialAndPallet 入参:" + JsonConvert.SerializeObject(model), "Mobox"); |
| | | ResponseResult responseResult = new ResponseResult(); |
| | | ApiHelper.returnMaterialOrEmptyTray(model.locCode ,model.jtNo); |
| | | LogHelper.Info("余料/空工装返回-returnMaterialAndPallet 出参:" + JsonConvert.SerializeObject(responseResult), "Mobox"); |
| | | return responseResult; |
| | | } |
| | | |
| | | |
| | | |
| | | public class CancelTaskModel { |
| | | public string taskNo { get; set; } |
| | | } |
| | | } |
| | | } |