| | |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_DTO.Task; |
| | | using WIDESEA_ITaskInfoService; |
| | | using WIDESEA_Model.Models; |
| | | using static WIDESEA_ITaskInfoService.ITaskService; |
| | |
| | | public TaskController(ITaskService service) : base(service) |
| | | { |
| | | } |
| | | |
| | | [HttpPost, Route("GenerateInboundTask")] |
| | | public WebResponseContent GenerateInboundTask(string stationCode, int inboundType, string palletCode) |
| | | /// <summary> |
| | | /// WCS反馈任务完成 |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("TaskCompleted"), AllowAnonymous] |
| | | public async Task<WebResponseContent> TaskCompleted(int taskNum) |
| | | { |
| | | return Service.GenerateInboundTask(stationCode, inboundType, palletCode); |
| | | } |
| | | |
| | | [HttpGet, Route("TaskCompleted"), AllowAnonymous] |
| | | public WebResponseContent TaskCompleted(int taskNum) |
| | | { |
| | | return Service.TaskCompleted(taskNum); |
| | | return await Service.TaskCompleted(taskNum); |
| | | } |
| | | |
| | | [HttpPost, Route("GenerateOutboundTask"), AllowAnonymous] |
| | |
| | | { |
| | | return Service.GenerateOutboundTask(id, stockSelectViews); |
| | | } |
| | | |
| | | //[HttpPost, Route("GenerateOutboundTasks")] |
| | | //public WebResponseContent GenerateOutboundTasks([FromBody] int[] keys) |
| | | //{ |
| | | // return Service.GenerateOutboundTask(keys); |
| | | //} |
| | | [HttpPost, Route("PalletOutboundTask")] |
| | | public WebResponseContent PalletOutboundTask(string roadwayNo, string endStation) |
| | | /// <summary> |
| | | /// WCS申请入库任务 |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("InboundRequest"), AllowAnonymous] |
| | | public WebResponseContent InboundRequest(string stationCode, string roadwayNo, string palletCode) |
| | | { |
| | | return Service.PalletOutboundTask(roadwayNo, endStation); |
| | | return Service.InboundRequest(stationCode, roadwayNo, palletCode); |
| | | } |
| | | [HttpPost, Route("InboundRequest"),AllowAnonymous] |
| | | public WebResponseContent InboundRequest([FromBody] SaveModel saveModel) |
| | | /// <summary> |
| | | /// WCS申请入库任务(不分配货位) |
| | | /// </summary> |
| | | /// <param name="stationCode"></param> |
| | | /// <param name="palletCode"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("DeviceRequestInboundTaskSimple"), AllowAnonymous] |
| | | public WebResponseContent DeviceRequestInboundTaskSimple(string stationCode, string palletCode) |
| | | { |
| | | return Service.InboundRequest(saveModel); |
| | | return Service.DeviceRequestInboundTaskSimple(stationCode, palletCode); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 判断巷道内移库 |
| | | /// </summary> |
| | | /// <param name="TaskNum"></param> |
| | | /// <param name="SourceAddress"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, Route("IsRelocations"), AllowAnonymous] |
| | | public WebResponseContent IsRelocations(int TaskNum, string SourceAddress) |
| | | { |
| | | return Service.IsRelocations(TaskNum, SourceAddress); |
| | | } |
| | | |
| | | //[HttpPost, Route("GenerateInventoryInformation"), AllowAnonymous] |
| | | //public WebResponseContent GenerateInventoryInformation([FromBody] GenerateInv generate) |
| | | //{ |
| | | // return Service.GenerateInventoryInformation(generate); |
| | | //} |
| | | |
| | | [HttpPost, Route("ManualOutbound"), AllowAnonymous] |
| | | public WebResponseContent ManualOutbound([FromBody] SaveModel saveModel) |
| | | { |
| | | return Service.ManualOutbound(saveModel); |
| | | } |
| | | [HttpPost, Route("ManualOutbound2"), AllowAnonymous] |
| | | public WebResponseContent ManualOutbound2([FromBody] SaveModel saveModel) |
| | | { |
| | | return Service.ManualOutbound2(saveModel); |
| | | } |
| | | [HttpPost, Route("ManualOutbound3"), AllowAnonymous] |
| | | public WebResponseContent ManualOutbound3([FromBody] SaveModel saveModel) |
| | | { |
| | | return Service.ManualOutbound3(saveModel); |
| | | } |
| | | [HttpPost, Route("ManualOutbound4"), AllowAnonymous] |
| | | public WebResponseContent ManualOutbound4([FromBody] SaveModel saveModel) |
| | | { |
| | | return Service.ManualOutbound4(saveModel); |
| | | } |
| | | [HttpPost, Route("ManualOutboundDeleteinventory"), AllowAnonymous] |
| | | public WebResponseContent ManualOutboundDeleteinventory([FromBody] SaveModel saveModel) |
| | | { |
| | | return Service.ManualOutboundDeleteinventory(saveModel); |
| | | } |
| | | //[HttpPost, Route("Empty_outbound"), AllowAnonymous] |
| | | //public WebResponseContent Empty_outbound([FromBody] GenerateInv generate) |
| | | //{ |
| | | // return Service.Empty_outbound(generate); |
| | | //} |
| | | //[HttpPost, Route("Queryinventory"), AllowAnonymous] |
| | | //public WebResponseContent Queryinventory([FromBody] GenerateInv generate) |
| | | //{ |
| | | // return Service.Queryinventory(generate); |
| | | //} |
| | | [HttpGet, Route("PalletQueryinventory"), AllowAnonymous] |
| | | public WebResponseContent PalletQueryinventory() |
| | | { |
| | | return Service.PalletQueryinventory(); |
| | | } |
| | | //[HttpPost, Route("RelocationTaskCompleted"), AllowAnonymous] |
| | | //public WebResponseContent RelocationTaskCompleted([FromBody] GenerateInv2 generate) |
| | | //{ |
| | | // return Service.RelocationTaskCompleted(generate); |
| | | //} |
| | | |
| | | //[HttpPost, Route("Rawmaterialout"), AllowAnonymous] |
| | | //public WebResponseContent Rawmaterialout([FromBody]GenerateInv3 generate) |
| | | //{ |
| | | // return Service.Rawmaterialout(generate); |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 任务取消 |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, Route("Cancelinventory"), AllowAnonymous] |
| | | public WebResponseContent Cancelinventory(int taskNum) |
| | | { |
| | | return Service.Cancelinventory(taskNum); |
| | | } |
| | | [HttpPost, Route("InboundTaskCompleted"), AllowAnonymous] |
| | | /// <summary> |
| | | /// 入库任务完成 |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("InboundTaskCompleted"), AllowAnonymous] |
| | | public WebResponseContent InboundTaskCompleted(int taskNum) |
| | | { |
| | | return Service.InboundTaskCompleted(taskNum); |
| | | } |
| | | /// <summary> |
| | | /// 出库任务完成 |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("OutboundTaskCompleted"), AllowAnonymous] |
| | | public WebResponseContent OutboundTaskCompleted(int taskNum) |
| | | { |
| | | return Service.OutboundTaskCompleted(taskNum); |
| | | } |
| | | /// <summary> |
| | | /// WMS下发出库单据 |
| | | /// </summary> |
| | | /// <param name="orderAddDTO"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("AddOutboundOrders"), AllowAnonymous] |
| | | public WebResponseContent AddOutboundOrders([FromBody] Houseounbound orderAddDTO) |
| | | { |
| | | return Service.AddOutboundOrders(orderAddDTO); |
| | | } |
| | | /// <summary> |
| | | /// 盘点任务上传 |
| | | /// </summary> |
| | | /// <param name="houseInventoryOut"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("InventoryOut"), AllowAnonymous] |
| | | public WebResponseContent InventoryOut([FromBody] HouseCancelOut houseInventoryOut) |
| | | { |
| | | return Service.InventoryOut(houseInventoryOut); |
| | | } |
| | | /// <summary> |
| | | /// 盘点任务回传WMS |
| | | /// </summary> |
| | | /// <param name="name"></param> |
| | | /// <param name="qty"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("InventoryIn"), AllowAnonymous] |
| | | public WebResponseContent InventoryIn([FromBody] string name,int qty) |
| | | public WebResponseContent InventoryIn([FromBody] string name, int qty) |
| | | { |
| | | return Service.InventoryIn(name,qty); |
| | | return Service.InventoryIn(name, qty); |
| | | } |
| | | |
| | | |
| | | [HttpPost, Route("UpdateTaskStatus"), AllowAnonymous] |
| | | public WebResponseContent UpdateTaskStatus(int tasknum, int tasktype) |
| | | { |
| | | return Service.UpdateTaskStatus(tasknum, tasktype); |
| | | } |
| | | /// <summary> |
| | | /// 分配巷道(带任务号) |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <param name="roadwayNos"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("AssignRoadway"), AllowAnonymous] |
| | | public WebResponseContent AssignRoadway(int taskNum, [FromBody] List<string> roadwayNos, int heightType) |
| | | { |
| | | return Service.AssignRoadway(taskNum, roadwayNos, heightType); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 入库任务申请分配货位 |
| | | /// </summary> |
| | | /// <param name="taskNum">任务号</param> |
| | | /// <param name="roadwayNo">巷道号</param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("AssignInboundTaskLocation"), AllowAnonymous] |
| | | public WebResponseContent AssignInboundTaskLocation(int taskNum, string roadwayNo) |
| | | { |
| | | return Service.AssignInboundTaskLocation(taskNum, roadwayNo); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 修改任务状态 |
| | | /// </summary> |
| | | /// <param name="task"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("UpdateTaskInfo"), AllowAnonymous] |
| | | public WebResponseContent UpdateTaskInfo([FromBody] WCSTaskDTO task) |
| | | { |
| | | return Service.UpdateTaskInfo(task); |
| | | } |
| | | } |
| | | } |