using DS.Module.Core;
using DS.WMS.Core.TaskPlat.Dtos;
using DS.WMS.Core.TaskPlat.Entity;
using DS.WMS.Core.TaskPlat.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.TaskApi.Controllers;
///
/// 任务台分配设置维护接口
///
public class TaskAllocationController : ApiController
{
private readonly ITaskAllocationService taskAllocationService;
public TaskAllocationController(ITaskAllocationService taskAllocationService)
{
this.taskAllocationService = taskAllocationService;
}
///
/// 获取任务分配列表
///
/// 船公司Id(可选)
[HttpGet("GetList")]
public async Task> GetList(long? carrierId)
{
var result = await taskAllocationService.GetList(carrierId);
return result;
}
///
/// 获取任务分配列表中已存在的船公司列表(用于查询)
///
[HttpGet("GetContainsCarrierList")]
public async Task>> GetContainsCarrierList()
{
var result = await taskAllocationService.GetContainsCarrierList();
return result;
}
///
/// 保存任务分配设置
///
[HttpPost("Save")]
public async Task Save([FromBody] TaskAllocationtSetSaveDto saveDto)
{
var result = await taskAllocationService.Save(saveDto);
return result;
}
}