U16线现场操作修改

This commit is contained in:
赵正易 2025-04-11 09:50:16 +08:00
parent 0ed359496e
commit 4c92b130d4
7 changed files with 25 additions and 9 deletions

View File

@ -9,7 +9,7 @@ namespace linesider_screen_bankend.Services.SQLHepler
{
var config = new ConnectionConfig()
{
ConnectionString = "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog=GXAssembly;Port=3308", // 替换为你的MySQL连接字符串
ConnectionString = "Data Source=192.168.50.163;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306", // 替换为你的MySQL连接字符串
DbType = DbType.MySql, // 数据库类型设置为MySQL
IsAutoCloseConnection = true, // 自动释放
InitKeyType = InitKeyType.Attribute // 从实体特性读取主键信息

View File

@ -4,10 +4,19 @@
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<COMReference Include="BarTender">
<COMReference Include="BarTenderPrintClient">
<WrapperTool>tlbimp</WrapperTool>
<VersionMinor>0</VersionMinor>
<VersionMajor>11</VersionMajor>
<VersionMajor>1</VersionMajor>
<Guid>20033d6a-7b24-41e5-a4d9-1c626b07876b</Guid>
<Lcid>0</Lcid>
<Isolated>false</Isolated>
<EmbedInteropTypes>true</EmbedInteropTypes>
</COMReference>
<COMReference Include="BarTender">
<WrapperTool>tlbimp</WrapperTool>
<VersionMinor>1</VersionMinor>
<VersionMajor>10</VersionMajor>
<Guid>d58562c1-e51b-11cf-8941-00a024a9083f</Guid>
<Lcid>0</Lcid>
<Isolated>false</Isolated>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="label_path" value="D:\label\gxassembly_production_label.btw"/>
</appSettings>
</configuration>

View File

@ -26,11 +26,12 @@ namespace linesider_screen_bankend.Controller
{
private readonly Action<string> _logAction;
// 准备打印数据
string templatePath = ConfigurationManager.AppSettings["label_path"];
string templatePath = null;
public OnlyPrintProductLabelController(Action<string> logAction)
{
_logAction = logAction;
templatePath = ConfigurationManager.AppSettings["label_path"];
}
[Route(HttpVerbs.Get, "/hello")]
@ -91,7 +92,7 @@ namespace linesider_screen_bankend.Controller
// 返回成功响应
await this.HttpContext.SendApiSuccessAsync(null);
await this.HttpContext.SendApiSuccessAsync("ok");
}
else
{

View File

@ -92,9 +92,9 @@ namespace linesider_screen_bankend.Views
.WithUrlPrefix(url)
.WithMode(HttpListenerMode.EmbedIO))
.WithCors(
origins: "http://localhost:7005",
headers: "content-type,authorization",
methods: "GET,POST,PUT,DELETE"
origins: "*",
headers: "*",
methods: "*"
)
.WithWebApi("/print_api", m => m
.WithController<PrintCommunicationController>(() => new PrintCommunicationController(AddLog))

View File

@ -1,7 +1,7 @@
{
"label_path": "./Resources/gxassembly_production_label.btw" //
"label_path": ".\\Resources\\gxassembly_production_label.btw" //
}