You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.5 KiB
C#

using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
4 months ago
using DS.WMS.Core.Info.Dtos;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace DS.WMS.OpApi.Controllers;
/// <summary>
/// 业务订单联系人-服务
/// </summary>
public class BusinessOrderContactController : ApiController
{
private readonly IBusinessOrderContactService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public BusinessOrderContactController(IBusinessOrderContactService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetBusinessOrderContactList")]
public DataResult<List<BusinessOrderContactRes>> GetBusinessOrderContactList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditBusinessOrderContact")]
public DataResult EditBusinessOrderContact([FromBody] BusinessOrderContactReq model)
{
var res = _invokeService.EditBusinessOrderContact(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetBusinessOrderContactInfo")]
public DataResult<BusinessOrderContactRes> GetBusinessOrderContactInfo([FromQuery] string id)
{
var res = _invokeService.GetBusinessOrderContactInfo(id);
return res;
}
/// <summary>
/// 批量删除
/// </summary>
/// <param name="req">主表Ids</param>
/// <returns></returns>
[HttpPost]
[Route("BatchDelBusinessOrderContact")]
public DataResult BatchDelBusinessOrderContact([FromBody] IdModel req)
{
var res = _invokeService.BatchDelBusinessOrderContact(req);
return res;
}
4 months ago
/// <summary>
/// 根据客户Id获取联系人
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetOrderContactListByClientId")]
public DataResult<List<ClientContactRes>> GetOrderContactListByClientId([FromQuery] string id)
{
var res = _invokeService.GetOrderContactListByClientId(id);
return res;
}
}