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