|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using DS.Module.Core.Data;
|
|
|
|
|
using DS.WMS.Core.Code.Dtos;
|
|
|
|
|
using DS.WMS.Core.Code.Interface;
|
|
|
|
|
using DS.WMS.Core.Map.Dtos;
|
|
|
|
|
using DS.WMS.Core.Map.Interface;
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.MainApi.Controllers
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 运输条款映射信息 模块
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class MappingServiceController : ApiController
|
|
|
|
|
{
|
|
|
|
|
private readonly IMappingServiceService _invokeService;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 构造函数
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="invokeService"></param>
|
|
|
|
|
public MappingServiceController(IMappingServiceService invokeService)
|
|
|
|
|
{
|
|
|
|
|
_invokeService = invokeService;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("GetMappingServiceList")]
|
|
|
|
|
public DataResult<List<MappingServiceRes>> GetMappingServiceList([FromBody] PageRequest request)
|
|
|
|
|
{
|
|
|
|
|
var res = _invokeService.GetListByPage(request);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 编辑
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="req"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("EditMappingService")]
|
|
|
|
|
public DataResult EditMappingService([FromBody] MappingServiceReq req)
|
|
|
|
|
{
|
|
|
|
|
var res = _invokeService.EditMappingService(req);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 详情
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">Id</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetMappingServiceInfo")]
|
|
|
|
|
public DataResult<MappingServiceRes> GetMappingServiceInfo([FromQuery] string id)
|
|
|
|
|
{
|
|
|
|
|
var res = _invokeService.GetMappingServiceInfo(id);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="req">Id</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("DelMappingService")]
|
|
|
|
|
public DataResult DelMappingService([FromBody] IdModel req)
|
|
|
|
|
{
|
|
|
|
|
var res = _invokeService.DelMappingService(req);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///批量删除
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="req">Id</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("BatchDelMappingService")]
|
|
|
|
|
public DataResult BatchDelMappingService([FromBody] IdModel req)
|
|
|
|
|
{
|
|
|
|
|
var res = _invokeService.BatchDelMappingService(req);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|