2025-07-16 14:46:48 +08:00
|
|
|
|
using MyCode.Project.Domain.Model;
|
|
|
|
|
|
using MyCode.Project.Infrastructure.Common;
|
2025-07-07 09:35:11 +08:00
|
|
|
|
using MyCode.Project.Services;
|
2025-07-16 17:26:20 +08:00
|
|
|
|
using MyCode.Project.Services.Implementation;
|
2025-07-18 16:42:14 +08:00
|
|
|
|
using MyCode.Project.Services.IServices;
|
2025-07-07 20:02:36 +08:00
|
|
|
|
using System;
|
2025-07-16 14:46:48 +08:00
|
|
|
|
using System.Collections.Generic;
|
2025-07-04 09:50:02 +08:00
|
|
|
|
using System.Web.Http;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MyCode.Project.WebApi.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 测试接口
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class TestController : BaseAPIController
|
2025-07-07 09:35:11 +08:00
|
|
|
|
{
|
2025-07-18 10:14:31 +08:00
|
|
|
|
|
2025-07-08 20:10:02 +08:00
|
|
|
|
private IJackYunTaskService _jackYunTaskService;
|
2025-07-12 16:58:00 +08:00
|
|
|
|
private IWMSService _wMSService;
|
2025-07-16 17:26:20 +08:00
|
|
|
|
private IJackYunStockinService _jackYunStockinService;
|
2025-07-18 10:14:31 +08:00
|
|
|
|
private IOrderPushService _orderPushService;
|
2025-07-12 16:58:00 +08:00
|
|
|
|
|
2025-07-21 11:31:28 +08:00
|
|
|
|
public TestController(IJackYunTaskService jackYunTaskService, IWMSService wMSService
|
|
|
|
|
|
, IJackYunStockinService jackYunStockinService, IOrderPushService orderPushService)
|
2025-07-04 09:50:02 +08:00
|
|
|
|
{
|
2025-07-08 20:10:02 +08:00
|
|
|
|
_jackYunTaskService = jackYunTaskService;
|
2025-07-12 16:58:00 +08:00
|
|
|
|
_wMSService = wMSService;
|
2025-07-16 17:26:20 +08:00
|
|
|
|
_jackYunStockinService = jackYunStockinService;
|
2025-07-21 11:31:28 +08:00
|
|
|
|
_orderPushService = orderPushService;
|
2025-07-04 09:50:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-07-18 10:14:31 +08:00
|
|
|
|
/// <summary>
|
2025-07-18 18:06:27 +08:00
|
|
|
|
/// 测试推送销售数据到金蝶云星空和WMS
|
2025-07-18 10:14:31 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
2025-07-18 18:06:27 +08:00
|
|
|
|
public void TaskSendKingdeeSaleOrderById(string id)
|
2025-07-18 10:14:31 +08:00
|
|
|
|
{
|
2025-07-18 18:06:27 +08:00
|
|
|
|
_orderPushService.PushOrderToKingDee(id);
|
2025-07-18 10:14:31 +08:00
|
|
|
|
}
|
2025-07-18 18:06:27 +08:00
|
|
|
|
|
2025-07-18 10:14:31 +08:00
|
|
|
|
|
2025-07-21 15:07:31 +08:00
|
|
|
|
#region 调度运行抓吉客云销售订单
|
2025-07-08 20:10:02 +08:00
|
|
|
|
|
2025-07-21 15:07:31 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 调度运行抓吉客云销售订单
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public void TaskGetJackYunOrder(string now)
|
|
|
|
|
|
{
|
|
|
|
|
|
_jackYunTaskService.TaskGetJackYunOrder(now);
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2025-07-07 09:35:11 +08:00
|
|
|
|
|
2025-07-12 16:58:00 +08:00
|
|
|
|
|
|
|
|
|
|
#region 抓WMS订单
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 抓WMS订单
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
2025-07-18 10:14:31 +08:00
|
|
|
|
public List<WMStoJackyunInventoryMovementView1> GetList(DateTime now)
|
2025-07-12 16:58:00 +08:00
|
|
|
|
{
|
2025-07-18 10:14:31 +08:00
|
|
|
|
return _wMSService.GetList(now);
|
2025-07-12 16:58:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2025-07-14 20:39:36 +08:00
|
|
|
|
#region 合并吉客云订单到新表
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 合并吉客云订单到新表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public string GetAndMergeJackYunOrder(string now)
|
|
|
|
|
|
{
|
2025-07-18 10:14:31 +08:00
|
|
|
|
return _jackYunTaskService.GetAndMergeJackYunOrder(now);
|
2025-07-14 20:39:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2025-07-12 16:58:00 +08:00
|
|
|
|
|
2025-07-07 20:02:36 +08:00
|
|
|
|
//#region 订单查询
|
|
|
|
|
|
|
|
|
|
|
|
///// <summary>
|
|
|
|
|
|
///// 订单查询
|
|
|
|
|
|
///// </summary>
|
|
|
|
|
|
//[HttpGet]
|
|
|
|
|
|
//[AllowAnonymous]
|
|
|
|
|
|
//public string testTradeFullInfoGet()
|
|
|
|
|
|
//{
|
|
|
|
|
|
// return _jackYunService.testTradeFullInfoGet();
|
|
|
|
|
|
//}
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-08 20:10:02 +08:00
|
|
|
|
//#region 订单查询
|
2025-07-07 09:35:11 +08:00
|
|
|
|
|
2025-07-08 20:10:02 +08:00
|
|
|
|
///// <summary>
|
|
|
|
|
|
///// 订单查询2
|
|
|
|
|
|
///// </summary>
|
|
|
|
|
|
//[HttpGet]
|
|
|
|
|
|
//[AllowAnonymous]
|
|
|
|
|
|
//public List<TradesItem> testTradeFullInfoGet(DateTime now)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// return _jackYunService.testTradeFullInfoGet(now);
|
|
|
|
|
|
//}
|
|
|
|
|
|
//#endregion
|
2025-07-04 09:50:02 +08:00
|
|
|
|
|
|
|
|
|
|
//#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
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-16 17:26:20 +08:00
|
|
|
|
#region 调度运行上传申请出入库申请单
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 调度运行上传申请出入库申请单
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
2025-07-21 17:25:29 +08:00
|
|
|
|
public void TaskSendJackYunInOrOutStock(string sheet)
|
2025-07-16 17:26:20 +08:00
|
|
|
|
{
|
2025-07-21 17:25:29 +08:00
|
|
|
|
_jackYunStockinService.TaskSendInventoryMovement( sheet);
|
2025-07-16 17:26:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2025-07-04 09:50:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|