diff --git a/DOAN.Admin.WebApi/appsettings.Development.json b/DOAN.Admin.WebApi/appsettings.Development.json
index c14f0d2..08518f3 100644
--- a/DOAN.Admin.WebApi/appsettings.Development.json
+++ b/DOAN.Admin.WebApi/appsettings.Development.json
@@ -2,8 +2,8 @@
"dbConfigs": [
{
// 远程测试服务器
- // "Conn": "Data Source=127.0.0.1;User ID=root;Password=123456;Initial Catalog=bzfm_mes;Port=3306",
- "Conn": "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog=bzfm_mes;Port=3308",
+ // "Conn": "Data Source=127.0.0.1;User ID=root;Password=123456;Initial Catalog=bzfm_mes;Port=3306",
+ "Conn": "Data Source=115.190.214.62;User ID=bzfm_mes;Password=rSRGTzccN2ZQtnas;Initial Catalog=bzfm_mes;Port=3308",
// "Conn": "Data Source=192.168.0.58;User ID=root;Password=123456;Initial Catalog=bzfm_mes;Port=3306",
"DbType": 0, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4
"ConfigId": "0", //多租户唯一标识
@@ -14,7 +14,7 @@
//代码生成数据库配置
"CodeGenDbConfig": {
//代码生成连接字符串,注意{dbName}为固定格式,不要填写数据库名
- "Conn": "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog={dbName};Port=3308",
+ "Conn": "Data Source=115.190.214.62;User ID=root;Password=rSRGTzccN2ZQtnas;Initial Catalog={dbName};Port=3308",
"DbType": 0,
"IsAutoCloseConnection": true,
"DbName": "bzfm_mes" //代码生成默认连接数据库,Oracle库是实例的名称
diff --git a/DOAN.Service/DOAN.Service.csproj b/DOAN.Service/DOAN.Service.csproj
index e609a5f..0bea15a 100644
--- a/DOAN.Service/DOAN.Service.csproj
+++ b/DOAN.Service/DOAN.Service.csproj
@@ -8,17 +8,6 @@
1591
-
-
- tlbimp
- 1
- 10
- d58562c1-e51b-11cf-8941-00a024a9083f
- 0
- false
- true
-
-
diff --git a/DOAN.Service/MES/Product/ProWorkorderService.cs b/DOAN.Service/MES/Product/ProWorkorderService.cs
index 383950d..34fcf9c 100644
--- a/DOAN.Service/MES/Product/ProWorkorderService.cs
+++ b/DOAN.Service/MES/Product/ProWorkorderService.cs
@@ -2,7 +2,7 @@ using System;
using System.Data.Common;
using System.Globalization;
using System.Linq;
-using BarTender;
+//using BarTender;
using DOAN.Infrastructure.Helper;
using DOAN.Model;
using DOAN.Model.MES.base_;
@@ -1505,50 +1505,51 @@ namespace DOAN.Service.MES.product
ProWorkorderExportDto param
)
{
- var dataList = await Context
- .Queryable()
- .Where(p => param.WorkorderArray.Contains(p.Workorder))
- .ToListAsync();
- if (dataList.Count == 0)
- {
- return new CustomException(500, "未找到匹配的工单数据");
- }
- Application bartenderApp = null;
- Format bartenderFormat = null;
- try
- {
- bartenderApp = new Application { Visible = false };
- bartenderFormat = bartenderApp.Formats.Open(param.Path);
- // 4. 遍历数据并打印
- foreach (var data in dataList)
- {
- bartenderFormat.SetNamedSubStringValue("workorder", data.Workorder);
- bartenderFormat.SetNamedSubStringValue("stoveCode", data.StoveCode);
- bartenderFormat.SetNamedSubStringValue("qty", data.PlanNum.ToString());
- await Task.Delay(500);
- bartenderFormat.PrintOut(false, false); // 静默打印
- }
+ return null;
+ //var dataList = await Context
+ // .Queryable()
+ // .Where(p => param.WorkorderArray.Contains(p.Workorder))
+ // .ToListAsync();
+ //if (dataList.Count == 0)
+ //{
+ // return new CustomException(500, "未找到匹配的工单数据");
+ //}
+ //Application bartenderApp = null;
+ //Format bartenderFormat = null;
+ //try
+ //{
+ // bartenderApp = new Application { Visible = false };
+ // bartenderFormat = bartenderApp.Formats.Open(param.Path);
+ // // 4. 遍历数据并打印
+ // foreach (var data in dataList)
+ // {
+ // bartenderFormat.SetNamedSubStringValue("workorder", data.Workorder);
+ // bartenderFormat.SetNamedSubStringValue("stoveCode", data.StoveCode);
+ // bartenderFormat.SetNamedSubStringValue("qty", data.PlanNum.ToString());
+ // await Task.Delay(500);
+ // bartenderFormat.PrintOut(false, false); // 静默打印
+ // }
- return new CustomException(200, "标签打印成功");
- }
- catch (Exception ex)
- {
- // 5. 错误处理(记录日志)
- Console.WriteLine($"打印标签时出错: {ex.Message}");
- return new CustomException(500, $"打印标签失败: {ex.Message}");
- }
- finally
- {
- // 6. 确保资源释放(逆序关闭)
- if (bartenderFormat != null)
- {
- bartenderFormat.Close(BtSaveOptions.btDoNotSaveChanges);
- }
- if (bartenderApp != null)
- {
- bartenderApp.Quit(BtSaveOptions.btDoNotSaveChanges);
- }
- }
+ // return new CustomException(200, "标签打印成功");
+ //}
+ //catch (Exception ex)
+ //{
+ // // 5. 错误处理(记录日志)
+ // Console.WriteLine($"打印标签时出错: {ex.Message}");
+ // return new CustomException(500, $"打印标签失败: {ex.Message}");
+ //}
+ //finally
+ //{
+ // // 6. 确保资源释放(逆序关闭)
+ // if (bartenderFormat != null)
+ // {
+ // bartenderFormat.Close(BtSaveOptions.btDoNotSaveChanges);
+ // }
+ // if (bartenderApp != null)
+ // {
+ // bartenderApp.Quit(BtSaveOptions.btDoNotSaveChanges);
+ // }
+ //}
}
}
}
diff --git a/global.json b/global.json
new file mode 100644
index 0000000..1f74105
--- /dev/null
+++ b/global.json
@@ -0,0 +1,6 @@
+{
+ "sdk": {
+ "version": "8.0.416",
+ "rollForward": "patch"
+ }
+}
\ No newline at end of file