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.
74 lines
1.9 KiB
C#
74 lines
1.9 KiB
C#
2 years ago
|
using DS.Module.Core;
|
||
|
using DS.WMS.Core.BaseInfo.Dtos;
|
||
|
using DS.WMS.Core.BaseInfo.Interface;
|
||
|
using DS.WMS.Core.ContractModule.Dtos;
|
||
|
using DS.WMS.Core.ContractModule.Interface;
|
||
|
using Microsoft.AspNetCore.Mvc;
|
||
|
|
||
|
namespace DS.WMS.WebApi.Controllers;
|
||
|
/// <summary>
|
||
|
/// 合同管理
|
||
|
/// </summary>
|
||
|
public class ContractController : ApiController
|
||
|
{
|
||
|
private readonly IContractService _invokeService;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 构造函数
|
||
|
/// </summary>
|
||
|
/// <param name="invokeService"></param>
|
||
|
public ContractController(IContractService invokeService)
|
||
|
{
|
||
|
_invokeService = invokeService;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 列表
|
||
|
/// </summary>
|
||
|
/// <param name="request"></param>
|
||
|
/// <returns></returns>
|
||
|
[HttpPost]
|
||
|
[Route("GetContractList")]
|
||
|
public DataResult<List<ContractListPageModel>> GetListByPage([FromBody] PageRequest request)
|
||
|
{
|
||
|
var res = _invokeService.GetListByPage(request);
|
||
|
return res;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 获取信息
|
||
|
/// </summary>
|
||
|
/// <param name="id"></param>
|
||
|
/// <returns></returns>
|
||
|
[HttpGet]
|
||
|
[Route("GetContractInfo")]
|
||
|
public DataResult<ContractViewModel> GetContractInfo([FromQuery]string id)
|
||
|
{
|
||
|
var res = _invokeService.GetContractInfo(id);
|
||
|
return res;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 编辑
|
||
|
/// </summary>
|
||
|
/// <param name="model"></param>
|
||
|
/// <returns></returns>
|
||
|
[HttpPost]
|
||
|
[Route("EditContract")]
|
||
|
public DataResult EditContract([FromBody] ContractInput model)
|
||
|
{
|
||
|
var res = _invokeService.EditContract(model);
|
||
|
return res;
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 获取未处理合同报警数
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
[HttpGet]
|
||
|
[Route("GetContractWarningCount")]
|
||
|
public DataResult<int> GetContractWarningCount()
|
||
|
{
|
||
|
var res = _invokeService.GetContractWarningCount();
|
||
|
return res;
|
||
|
}
|
||
|
}
|