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.

115 lines
3.6 KiB
C#

using DS.Module.Core;
using DS.Module.DjyServiceStatus;
using DS.Module.ExcelModule;
using DS.Module.ExcelModule.Model;
using DS.Module.PrintModule;
using DS.WMS.Core.Code.Interface;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.OpApi.Controllers
{
/// <summary>
/// 大简云服务项目服务 模块
/// </summary>
public class DjyServiceStatusController : ApiController
{
private readonly IDjyServiceStatusService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public DjyServiceStatusController(IDjyServiceStatusService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 保存服务项目
/// </summary>
/// <param name="req"></param>
/// <returns>返回回执</returns>
[HttpPost]
[Route("SaveServiceProject")]
public async Task<DjyResult> SaveServiceProject([FromBody] EmbedServiceProjectDto req)
{
return await _invokeService.SaveServiceProject(req);
}
/// <summary>
/// 取消服务项目
/// </summary>
/// <param name="req"></param>
/// <returns>返回回执</returns>
[HttpPost]
[Route("CancelServiceProject")]
public async Task<DjyResult> CancelServiceProject([FromBody] EmbedServiceProjectDto req)
{
return await _invokeService.CancelServiceProject(req);
}
/// <summary>
/// 获取服务项目列表
/// </summary>
/// <param name="req"></param>
/// <returns>返回回执</returns>
[HttpPost]
[Route("GetServiceProjectList")]
public async Task<DjyResult> GetServiceProjectList([FromBody] EmbedQueryServiceProjectWithStatus req)
{
return await _invokeService.GetServiceProjectList(req);
}
/// <summary>
/// 获取服务项目下的状态列表
/// </summary>
/// <param name="req"></param>
/// <returns>返回回执</returns>
[HttpPost]
[Route("GetServiceStatusList")]
public async Task<DjyResult> GetServiceStatusList([FromBody] EmbedQueryServiceProjectWithStatus req)
{
return await _invokeService.GetServiceStatusList(req);
}
/// <summary>
/// 保存服务状态
/// </summary>
/// <param name="req"></param>
/// <returns>返回回执</returns>
[HttpPost]
[Route("SaveServiceStatus")]
public async Task<DjyResult> SaveServiceStatus([FromBody] EmbedServiceProjectStatusDto req)
{
return await _invokeService.SaveServiceStatus(req);
}
/// <summary>
/// 取消服务状态
/// </summary>
/// <param name="req"></param>
/// <returns>返回回执</returns>
[HttpPost]
[Route("CancelServiceStatus")]
public async Task<DjyResult> CancelServiceStatus([FromBody] EmbedServiceProjectStatusDto req)
{
return await _invokeService.CancelServiceStatus(req);
}
/// <summary>
/// 获取可用的服务项目字典列表
/// </summary>
/// <param name="isAvoidCache">是否重新加载缓存</param>
/// <returns></returns>
[HttpGet]
[Route("GetEnableProjectDictTreeList")]
public async Task<DjyResult> GetEnableProjectDictTreeList([FromQuery] bool isAvoidCache = false)
{
return await _invokeService.GetEnableProjectDictTreeList(isAvoidCache);
}
}
}