add-添加ZPL指令打印机服务(原材料、成品条码、配对码)
parent
8f27f95f2b
commit
fd63392361
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,20 @@
|
||||
using PrintBarCode.Business;
|
||||
using PrintBarCode.Helper;
|
||||
using PrintBarCode.Model;
|
||||
using SlnMesnac.Redis;
|
||||
|
||||
namespace PrintBarCode
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@ -0,0 +1,39 @@
|
||||
using Autofac.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Serilog;
|
||||
|
||||
namespace PrintBarCode
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
var host = CreateHostBuilder(args).Build();
|
||||
host.RunAsync();
|
||||
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.UseSerilog()
|
||||
.UseServiceProviderFactory(new AutofacServiceProviderFactory())
|
||||
.ConfigureServices((hostContext, services) =>
|
||||
{
|
||||
//services.AddHostedService<ReadBusiness>();
|
||||
})
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<PrintBarCode.Startup>();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"AppConfig": {
|
||||
"logPath": "E:\\c#\\京源环保\\程序设计\\生产控制\\SlnMesnac\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows",
|
||||
"stationId": 11,
|
||||
"SqlConfig": [
|
||||
{
|
||||
"configId": "mes",
|
||||
"dbType": 0,
|
||||
// "connStr": "Data Source=175.27.215.92;Port=3306;Initial Catalog=hwjy-cloud;uid=root;pwd=haiwei@123;Charset=utf8mb4;SslMode=none"
|
||||
"connStr": "Data Source=172.16.12.100;Port=3306;Initial Catalog=hwjy-cloud;uid=root;pwd=JyhbRk@123456;Charset=utf8mb4;SslMode=none"
|
||||
},
|
||||
{
|
||||
"configId": "local",
|
||||
"dbType": 2,
|
||||
"connStr": "DataSource=E:\\c#\\京源环保\\程序设计\\生产控制\\SlnMesnac\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows\\data\\data.db"
|
||||
}
|
||||
//{
|
||||
// "configId": "mesTD",
|
||||
// "dbType": 17,
|
||||
// "connStr": "Host=175.27.215.92;Port=6030;Username=root;Password=taosdata;Database=db_hwmes"
|
||||
//},
|
||||
|
||||
//{
|
||||
// "configId": "scada",
|
||||
// "dbType": 0,
|
||||
// "connStr": "Data Source=175.27.215.92;Port=3306;Initial Catalog=jy-scada;uid=root;pwd=haiwei@123;Charset=utf8mb4;SslMode=none"
|
||||
//}
|
||||
],
|
||||
"PlcConfig": [
|
||||
{
|
||||
"configId": 1,
|
||||
"plcType": "SiemensPlc",
|
||||
"plcIp": "192.168.2.220",
|
||||
// "plcIp": "127.0.0.1",
|
||||
"plcPort": 102,
|
||||
"plcKey": "plc",
|
||||
"isFlage": true
|
||||
},
|
||||
{
|
||||
"configId": 2, //MES信号处理
|
||||
"plcType": "SiemensPlc",
|
||||
"plcIp": "127.0.0.1",
|
||||
"plcPort": 103,
|
||||
"plcKey": "mesSingal",
|
||||
"isFlage": false
|
||||
}
|
||||
],
|
||||
"RfidConfig": [
|
||||
{
|
||||
// 小包码垛位RFID
|
||||
"configId": 1,
|
||||
"equipIp": "192.168.2.27",
|
||||
"equipPort": 20108,
|
||||
"equipKey": "secondFloorPallet",
|
||||
"isFlage": true
|
||||
},
|
||||
{
|
||||
// 小包出口位RFID
|
||||
"configId": 2,
|
||||
"equipIp": "192.168.2.28",
|
||||
"equipPort": 20108,
|
||||
"equipKey": "secondFloorOut",
|
||||
"isFlage": true
|
||||
}
|
||||
],
|
||||
"redisConfig": "172.16.12.100:6379,password=JyhbRk@2024"
|
||||
// "redisConfig": "175.27.215.92:6379,password=redis@2023"
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue