199 lines
5.2 KiB
C#
199 lines
5.2 KiB
C#
using MyCode.Project.Domain.Model;
|
||
using MyCode.Project.Infrastructure.Common;
|
||
using MyCode.Project.Services;
|
||
using MyCode.Project.Services.Implementation;
|
||
using MyCode.Project.Services.IServices;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Web.Http;
|
||
|
||
namespace MyCode.Project.WebApi.Controllers
|
||
{
|
||
/// <summary>
|
||
/// 测试接口
|
||
/// </summary>
|
||
public class TestController : BaseAPIController
|
||
{
|
||
|
||
private IJackYunTaskService _jackYunTaskService;
|
||
private IWMSService _wMSService;
|
||
private IJackYunStockinService _jackYunStockinService;
|
||
private IOrderPushService _orderPushService;
|
||
|
||
public TestController(IJackYunTaskService jackYunTaskService, IWMSService wMSService, IJackYunStockinService jackYunStockinService)
|
||
{
|
||
_jackYunTaskService = jackYunTaskService;
|
||
_wMSService = wMSService;
|
||
_jackYunStockinService = jackYunStockinService;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 测试推送销售数据到金蝶云星空和WMS
|
||
/// </summary>
|
||
[HttpGet]
|
||
[AllowAnonymous]
|
||
public void TaskSendKingdeeSaleOrderById(string id)
|
||
{
|
||
_orderPushService.PushOrderToKingDee(id);
|
||
}
|
||
|
||
|
||
//#region 调度运行抓吉客云销售订单
|
||
|
||
///// <summary>
|
||
///// 调度运行抓吉客云销售订单
|
||
///// </summary>
|
||
//[HttpGet]
|
||
//[AllowAnonymous]
|
||
//public void TaskGetJackYunOrder(string now)
|
||
//{
|
||
// _jackYunTaskService.TaskGetJackYunOrder(now);
|
||
//}
|
||
//#endregion
|
||
|
||
|
||
#region 抓WMS订单
|
||
/// <summary>
|
||
/// 抓WMS订单
|
||
/// </summary>
|
||
[HttpGet]
|
||
[AllowAnonymous]
|
||
public List<WMStoJackyunInventoryMovementView1> GetList(DateTime now)
|
||
{
|
||
return _wMSService.GetList(now);
|
||
}
|
||
#endregion
|
||
|
||
#region 合并吉客云订单到新表
|
||
/// <summary>
|
||
/// 合并吉客云订单到新表
|
||
/// </summary>
|
||
[HttpGet]
|
||
[AllowAnonymous]
|
||
public string GetAndMergeJackYunOrder(string now)
|
||
{
|
||
return _jackYunTaskService.GetAndMergeJackYunOrder(now);
|
||
}
|
||
#endregion
|
||
|
||
|
||
//#region 订单查询
|
||
|
||
///// <summary>
|
||
///// 订单查询
|
||
///// </summary>
|
||
//[HttpGet]
|
||
//[AllowAnonymous]
|
||
//public string testTradeFullInfoGet()
|
||
//{
|
||
// return _jackYunService.testTradeFullInfoGet();
|
||
//}
|
||
//#endregion
|
||
|
||
|
||
|
||
//#region 订单查询
|
||
|
||
///// <summary>
|
||
///// 订单查询2
|
||
///// </summary>
|
||
//[HttpGet]
|
||
//[AllowAnonymous]
|
||
//public List<TradesItem> testTradeFullInfoGet(DateTime now)
|
||
//{
|
||
// return _jackYunService.testTradeFullInfoGet(now);
|
||
//}
|
||
//#endregion
|
||
|
||
//#region AESEncrypt(AES加密)
|
||
///// <summary>
|
||
///// AES加密
|
||
///// </summary>
|
||
///// <param name="text"></param>
|
||
///// <returns></returns>
|
||
//[HttpGet]
|
||
//[AllowAnonymous]
|
||
//public string AESEncrypt(string text,string secretKey)
|
||
//{
|
||
// return AESHelper.AESEncrypt(text, secretKey);
|
||
//}
|
||
//#endregion
|
||
|
||
//#region AESDecrypt(AES解密)
|
||
///// <summary>
|
||
///// AES解密
|
||
///// </summary>
|
||
///// <param name="text"></param>
|
||
///// <returns></returns>
|
||
//[AllowAnonymous]
|
||
//[HttpGet]
|
||
//public string AESDecrypt(string text,string secretKey)
|
||
//{
|
||
// if (string.IsNullOrWhiteSpace(secretKey))
|
||
// {
|
||
// return AESHelper.AESDecrypt(text, "");
|
||
// }
|
||
// return AESHelper.AESDecrypt(text, secretKey);
|
||
|
||
//}
|
||
//#endregion
|
||
|
||
#region HtmLToXls(测试html转成xls)
|
||
/// <summary>
|
||
/// 测试html转成xls
|
||
/// </summary>
|
||
[AllowAnonymous]
|
||
[HttpGet]
|
||
public void HtmLToXls()
|
||
{
|
||
ExcelHelper.HtmlToExcel(@"D:\App_File\2.html", @"D:\App_File\2.xlsx");
|
||
}
|
||
#endregion
|
||
|
||
//#region ReportExportAnsy(异步执行导出,有带websocket异步推送)
|
||
///// <summary>
|
||
///// 异步执行导出,有带websocket异步推送
|
||
///// </summary>
|
||
///// <param name="obj"></param>
|
||
//[HttpPost]
|
||
//public void ReportExportAnsy(AnsyReportExportAct act)
|
||
//{
|
||
// _reportService.ReportExportAnsy(act);
|
||
//}
|
||
//#endregion
|
||
|
||
|
||
|
||
|
||
#region GenerateHS256Key(JWTKEY)
|
||
/// <summary>
|
||
/// GenerateHS256Key
|
||
/// </summary>
|
||
/// <param name="text"></param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[AllowAnonymous]
|
||
public string GenerateHS256Key()
|
||
{
|
||
return JwtKeyGenerator.GenerateHS256Key();
|
||
}
|
||
#endregion
|
||
|
||
|
||
#region 调度运行上传申请出入库申请单
|
||
|
||
/// <summary>
|
||
/// 调度运行上传申请出入库申请单
|
||
/// </summary>
|
||
[HttpGet]
|
||
[AllowAnonymous]
|
||
public void TaskSendJackYunInOrOutStock()
|
||
{
|
||
_jackYunStockinService.TaskSendInventoryMovement(DateTime.Now);
|
||
}
|
||
#endregion
|
||
}
|
||
|
||
}
|
||
|