|
|
|
@ -5,6 +5,8 @@ using DS.Module.ExcelModule;
|
|
|
|
|
using DS.Module.ExcelModule.Model;
|
|
|
|
|
using DS.Module.PrintModule;
|
|
|
|
|
using DS.WMS.Core.Code.Interface;
|
|
|
|
|
using DS.WMS.Core.Sys.Dtos;
|
|
|
|
|
using DS.WMS.Core.Sys.Interface;
|
|
|
|
|
using LanguageExt.Common;
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
@ -17,78 +19,78 @@ namespace DS.WMS.MainApi.Controllers
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class PrintController : ApiController
|
|
|
|
|
{
|
|
|
|
|
private readonly IPrintService _invokeService;
|
|
|
|
|
private readonly ISysPrintTemplateService _invokeService;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 构造函数
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="invokeService"></param>
|
|
|
|
|
public PrintController(IPrintService invokeService)
|
|
|
|
|
public PrintController(ISysPrintTemplateService invokeService)
|
|
|
|
|
{
|
|
|
|
|
_invokeService = invokeService;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取打印模块列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetOpenPrintModuleList")]
|
|
|
|
|
[Obsolete]
|
|
|
|
|
public DataResult GetOpenPrintModuleList()
|
|
|
|
|
{
|
|
|
|
|
return _invokeService.GetOpenPrintModuleList();
|
|
|
|
|
}
|
|
|
|
|
///// <summary>
|
|
|
|
|
///// 获取打印模块列表
|
|
|
|
|
///// </summary>
|
|
|
|
|
///// <returns></returns>
|
|
|
|
|
//[HttpGet]
|
|
|
|
|
//[Route("GetOpenPrintModuleList")]
|
|
|
|
|
//[Obsolete]
|
|
|
|
|
//public DataResult GetOpenPrintModuleList()
|
|
|
|
|
//{
|
|
|
|
|
// return _invokeService.GetOpenPrintModuleList();
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取打印模板列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetOpenPrintTemplateList")]
|
|
|
|
|
[Obsolete]
|
|
|
|
|
public DataResult GetOpenPrintTemplateList([FromQuery] string id)
|
|
|
|
|
{
|
|
|
|
|
return _invokeService.GetOpenPrintTemplateList(id);
|
|
|
|
|
}
|
|
|
|
|
///// <summary>
|
|
|
|
|
///// 获取打印模板列表
|
|
|
|
|
///// </summary>
|
|
|
|
|
///// <returns></returns>
|
|
|
|
|
//[HttpGet]
|
|
|
|
|
//[Route("GetOpenPrintTemplateList")]
|
|
|
|
|
//[Obsolete]
|
|
|
|
|
//public DataResult GetOpenPrintTemplateList([FromQuery] string id)
|
|
|
|
|
//{
|
|
|
|
|
// return _invokeService.GetOpenPrintTemplateList(id);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取打印模板列表-异步
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Obsolete]
|
|
|
|
|
[Route("GetOpenPrintTemplateListAsync")]
|
|
|
|
|
public async Task<DataResult> GetOpenPrintTemplateListAsync([FromQuery] string id)
|
|
|
|
|
{
|
|
|
|
|
return await _invokeService.GetOpenPrintTemplateListAsync(id);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取Json打印信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="req"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Obsolete]
|
|
|
|
|
[Route("GetOpenJsonPrintInfo")]
|
|
|
|
|
public DataResult GetOpenJsonPrintInfo([FromBody] OpenJsonPrintReq req)
|
|
|
|
|
{
|
|
|
|
|
var res =_invokeService.GetOpenJsonPrintInfo(req);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取Json打印信息-异步
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="req"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Obsolete]
|
|
|
|
|
[Route("GetOpenJsonPrintInfoAsync")]
|
|
|
|
|
public async Task<DataResult> GetOpenJsonPrintInfoAsync([FromBody] OpenJsonPrintReq req)
|
|
|
|
|
{
|
|
|
|
|
var res = await _invokeService.GetOpenJsonPrintInfoAsync(req);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
///// <summary>
|
|
|
|
|
///// 获取打印模板列表-异步
|
|
|
|
|
///// </summary>
|
|
|
|
|
///// <returns></returns>
|
|
|
|
|
//[HttpGet]
|
|
|
|
|
//[Obsolete]
|
|
|
|
|
//[Route("GetOpenPrintTemplateListAsync")]
|
|
|
|
|
//public async Task<DataResult> GetOpenPrintTemplateListAsync([FromQuery] string id)
|
|
|
|
|
//{
|
|
|
|
|
// return await _invokeService.GetOpenPrintTemplateListAsync(id);
|
|
|
|
|
//}
|
|
|
|
|
///// <summary>
|
|
|
|
|
///// 获取Json打印信息
|
|
|
|
|
///// </summary>
|
|
|
|
|
///// <param name="req"></param>
|
|
|
|
|
///// <returns></returns>
|
|
|
|
|
//[HttpPost]
|
|
|
|
|
//[Obsolete]
|
|
|
|
|
//[Route("GetOpenJsonPrintInfo")]
|
|
|
|
|
//public DataResult GetOpenJsonPrintInfo([FromBody] OpenJsonPrintReq req)
|
|
|
|
|
//{
|
|
|
|
|
// var res =_invokeService.GetOpenJsonPrintInfo(req);
|
|
|
|
|
// return res;
|
|
|
|
|
//}
|
|
|
|
|
///// <summary>
|
|
|
|
|
///// 获取Json打印信息-异步
|
|
|
|
|
///// </summary>
|
|
|
|
|
///// <param name="req"></param>
|
|
|
|
|
///// <returns></returns>
|
|
|
|
|
//[HttpPost]
|
|
|
|
|
//[Obsolete]
|
|
|
|
|
//[Route("GetOpenJsonPrintInfoAsync")]
|
|
|
|
|
//public async Task<DataResult> GetOpenJsonPrintInfoAsync([FromBody] OpenJsonPrintReq req)
|
|
|
|
|
//{
|
|
|
|
|
// var res = await _invokeService.GetOpenJsonPrintInfoAsync(req);
|
|
|
|
|
// return res;
|
|
|
|
|
//}
|
|
|
|
|
///// <summary>
|
|
|
|
|
///// 获取Json打印信息Stream
|
|
|
|
|
///// </summary>
|
|
|
|
@ -128,7 +130,28 @@ namespace DS.WMS.MainApi.Controllers
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取打印模块列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetOpenPrintModuleList")]
|
|
|
|
|
public async Task<DataResult<List<SysPrintModuleRes>>> GetOpenPrintModuleList()
|
|
|
|
|
{
|
|
|
|
|
return await _invokeService.GetOpenPrintModuleList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取打印模板列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetOpenPrintTemplateList")]
|
|
|
|
|
public async Task<DataResult<List<SysPrintTemplateRes>>> GetOpenPrintTemplateList([FromQuery]string id)
|
|
|
|
|
{
|
|
|
|
|
return await _invokeService.GetOpenPrintTemplateList(id);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取Json本地打印信息
|
|
|
|
|
/// </summary>
|
|
|
|
|