From b466b3135cd7f3b08f570efda0ffb691daff5270 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 05 十二月 2025 18:15:16 +0800
Subject: [PATCH] 一期输送线代码及AGV请求等
---
项目代码/WCSServices/WIDESEAWCS_BasicInfoService/LocationInfoService.cs | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoService/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoService/LocationInfoService.cs"
index d26efaa..0434f5d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoService/LocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoService/LocationInfoService.cs"
@@ -1,4 +1,8 @@
锘縰sing HslCommunication.WebSocket;
+using Magicodes.ExporterAndImporter.Core;
+using Magicodes.ExporterAndImporter.Excel;
+using MathNet.Numerics.Statistics.Mcmc;
+using NPOI.Util.Collections;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using SqlSugar;
@@ -188,5 +192,56 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
+ public override WebResponseContent Export(PageDataOptions options)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ string savePath = AppDomain.CurrentDomain.BaseDirectory + $"ExcelExport";
+ IExporter exporter = new ExcelExporter();
+ options.Page = 1;
+ options.Rows = 30;
+ options.Order = "asc";
+ options.Sort = "id";
+
+ string where = string.Empty;
+ ISugarQueryable<Dt_LocationInfo> sugarQueryable = BaseDal.Db.Queryable<Dt_LocationInfo>();
+ if (!string.IsNullOrEmpty(options.Wheres))
+ {
+ try
+ {
+ List<SearchParameters> searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
+ if (searchParametersList?.Any() == true)
+ {
+ foreach (var param in searchParametersList)
+ {
+ switch (param.Name)
+ {
+
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ }
+ }
+
+
+
+ byte[] data = exporter.ExportAsByteArray(sugarQueryable.ToList()).Result;
+
+ string fileName = "搴撲綅淇℃伅.xlsx";
+
+ FileHelper.WriteFile(savePath, fileName, data);
+
+ content = WebResponseContent.Instance.OK(data: savePath + "\\" + fileName);
+ }
+ catch (Exception ex)
+ {
+ content = WebResponseContent.Instance.Error(ex.Message);
+ }
+ return content;
+ }
}
}
--
Gitblit v1.9.3