From 9dff42b945c4f19d61e5d57bf297e2cf406e72ea Mon Sep 17 00:00:00 2001
From: CaesarBao <445720029@qq.com>
Date: Fri, 27 Dec 2024 10:19:18 +0800
Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E6=89=AB=E7=A0=81=E5=88=A4?=
=?UTF-8?q?=E6=96=AD=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8=E7=BB=91=E5=AE=9A?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=202.=E6=96=B0=E5=A2=9E=E5=A3=B3=E4=BD=93?=
=?UTF-8?q?=E5=9E=8B=E5=8F=B7=E5=88=87=E6=8D=A2=E6=A0=A1=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ConsoleApp/ConsoleApp.csproj | 2 +-
ConsoleApp/Program.cs | 4 +-
ConsoleApp/appsettings.json | 4 +-
SlnMesnac.Business/MaterialBindBusiness.cs | 67 +
SlnMesnac.Business/base/BaseBusiness.cs | 39 +-
SlnMesnac.Common/ControlOffLineScanHelper.cs | 115 ++
SlnMesnac.Common/SlnMesnac.Common.csproj | 7 +-
SlnMesnac.Config/AppConfig.cs | 14 +-
SlnMesnac.Config/AppsettingsConfig.cs | 57 +
SlnMesnac.Config/SlnMesnac.Config.csproj | 5 +
SlnMesnac.Extensions/PlcFactorySetup.cs | 2 +-
SlnMesnac.Model/domain/StationQualityInfo.cs | 19 +
.../domain/T_RP_ProductChangeInfo.cs | 83 +
.../domain/T_RP_StationPara_130.cs | 323 ++++
.../domain/T_RP_StationPara_160_1.cs | 363 +++++
SlnMesnac.Model/domain/T_SY_TraceState.cs | 227 +++
SlnMesnac.Model/domain/TaskInfo.cs | 35 +
SlnMesnac.Model/domain/data3_Table.cs | 147 ++
SlnMesnac.Model/domain/data4_Table.cs | 179 ++
SlnMesnac.Model/domain/sys_dict_data.cs | 131 ++
SlnMesnac.Quartz/Job/GetTaskInfo_Job.cs | 223 ++-
.../service/IData3_TableService.cs | 16 +
.../service/IData4_TableService.cs | 16 +
.../service/IStationQualityInfoService.cs | 16 +
.../service/ISys_dict_dataService.cs | 14 +
.../service/IT_RP_ProductChangeInfoService.cs | 13 +
.../service/IT_RP_StationPara_130Service.cs | 17 +
.../service/IT_RP_StationPara_160_1Service.cs | 17 +
.../service/IT_SY_TraceStateService.cs | 19 +
.../service/Impl/Data3_TableServiceImpl.cs | 53 +
.../service/Impl/Data4_TableServiceImpl.cs | 54 +
.../Impl/StationQualityInfoServiceImpl.cs | 50 +
.../service/Impl/Sys_dict_dataServiceImpl.cs | 30 +
.../Impl/T_RP_ProductChangeInfoServiceImpl.cs | 21 +
.../Impl/T_RP_StationPara_110_2ServiceImpl.cs | 2 +-
.../Impl/T_RP_StationPara_130ServiceImpl.cs | 67 +
.../Impl/T_RP_StationPara_160_1ServiceImpl.cs | 65 +
.../Impl/T_SY_TraceStateServiceImpl.cs | 92 ++
SlnMesnac.Serilog/SerilogExtensions.cs | 9 +-
SlnMesnac.TouchSocket/AirPorthttpClient.cs | 11 -
SlnMesnac.WPF/AssemblyInfo.cs | 8 +
.../ConfigToDynamicGridViewConverter .cs | 41 +
SlnMesnac.WPF/MainWindow.xaml | 22 +-
SlnMesnac.WPF/Page/IndexPage/ChangeType.xaml | 155 ++
.../Page/IndexPage/ChangeType.xaml.cs | 35 +
.../Page/IndexPage/MaterialBind.xaml | 198 +++
.../Page/IndexPage/MaterialBind.xaml.cs | 70 +
SlnMesnac.WPF/SlnMesnac.WPF.csproj | 3 +-
SlnMesnac.WPF/Startup.cs | 14 +-
.../IndexPage/ChangeTypeViewModel.cs | 100 ++
.../ViewModel/IndexPage/FlightItem.cs | 45 -
.../IndexPage/IndexContentViewModel.cs | 1443 ++++++++++++++---
SlnMesnac.WPF/ViewModel/IndexPage/TaskItem.cs | 39 -
.../ViewModel/MainWindowViewModel.cs | 37 +-
SlnMesnac.WPF/appsettings.json | 43 +-
SlnMesnac.sln | 2 +-
SlnMesnac/Properties/launchSettings.json | 2 +-
57 files changed, 4443 insertions(+), 442 deletions(-)
create mode 100644 SlnMesnac.Business/MaterialBindBusiness.cs
create mode 100644 SlnMesnac.Common/ControlOffLineScanHelper.cs
create mode 100644 SlnMesnac.Config/AppsettingsConfig.cs
create mode 100644 SlnMesnac.Model/domain/StationQualityInfo.cs
create mode 100644 SlnMesnac.Model/domain/T_RP_ProductChangeInfo.cs
create mode 100644 SlnMesnac.Model/domain/T_RP_StationPara_130.cs
create mode 100644 SlnMesnac.Model/domain/T_RP_StationPara_160_1.cs
create mode 100644 SlnMesnac.Model/domain/T_SY_TraceState.cs
create mode 100644 SlnMesnac.Model/domain/TaskInfo.cs
create mode 100644 SlnMesnac.Model/domain/data3_Table.cs
create mode 100644 SlnMesnac.Model/domain/data4_Table.cs
create mode 100644 SlnMesnac.Model/domain/sys_dict_data.cs
create mode 100644 SlnMesnac.Repository/service/IData3_TableService.cs
create mode 100644 SlnMesnac.Repository/service/IData4_TableService.cs
create mode 100644 SlnMesnac.Repository/service/IStationQualityInfoService.cs
create mode 100644 SlnMesnac.Repository/service/ISys_dict_dataService.cs
create mode 100644 SlnMesnac.Repository/service/IT_RP_ProductChangeInfoService.cs
create mode 100644 SlnMesnac.Repository/service/IT_RP_StationPara_130Service.cs
create mode 100644 SlnMesnac.Repository/service/IT_RP_StationPara_160_1Service.cs
create mode 100644 SlnMesnac.Repository/service/IT_SY_TraceStateService.cs
create mode 100644 SlnMesnac.Repository/service/Impl/Data3_TableServiceImpl.cs
create mode 100644 SlnMesnac.Repository/service/Impl/Data4_TableServiceImpl.cs
create mode 100644 SlnMesnac.Repository/service/Impl/StationQualityInfoServiceImpl.cs
create mode 100644 SlnMesnac.Repository/service/Impl/Sys_dict_dataServiceImpl.cs
create mode 100644 SlnMesnac.Repository/service/Impl/T_RP_ProductChangeInfoServiceImpl.cs
create mode 100644 SlnMesnac.Repository/service/Impl/T_RP_StationPara_130ServiceImpl.cs
create mode 100644 SlnMesnac.Repository/service/Impl/T_RP_StationPara_160_1ServiceImpl.cs
create mode 100644 SlnMesnac.Repository/service/Impl/T_SY_TraceStateServiceImpl.cs
create mode 100644 SlnMesnac.WPF/Converter/Generate/ConfigToDynamicGridViewConverter .cs
create mode 100644 SlnMesnac.WPF/Page/IndexPage/ChangeType.xaml
create mode 100644 SlnMesnac.WPF/Page/IndexPage/ChangeType.xaml.cs
create mode 100644 SlnMesnac.WPF/Page/IndexPage/MaterialBind.xaml
create mode 100644 SlnMesnac.WPF/Page/IndexPage/MaterialBind.xaml.cs
create mode 100644 SlnMesnac.WPF/ViewModel/IndexPage/ChangeTypeViewModel.cs
delete mode 100644 SlnMesnac.WPF/ViewModel/IndexPage/FlightItem.cs
delete mode 100644 SlnMesnac.WPF/ViewModel/IndexPage/TaskItem.cs
diff --git a/ConsoleApp/ConsoleApp.csproj b/ConsoleApp/ConsoleApp.csproj
index 2b31e1a..4da1d6b 100644
--- a/ConsoleApp/ConsoleApp.csproj
+++ b/ConsoleApp/ConsoleApp.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net6.0-windows
enable
enable
diff --git a/ConsoleApp/Program.cs b/ConsoleApp/Program.cs
index 2c0ef33..ed0b95f 100644
--- a/ConsoleApp/Program.cs
+++ b/ConsoleApp/Program.cs
@@ -18,7 +18,9 @@ namespace ConsoleApp
var host = CreateHostBuilder(args).Build();//生成宿主。
host.StartAsync();
-
+ var appConfig = host.Services.GetService();
+ var logPath = $"{appConfig.logPath}/Logs/{DateTime.UtcNow:yyyy-MM-dd}/";
+ Log.Information($"系统初始化完成,日志存放路径:{appConfig.logPath}");
Console.ReadLine();
}
diff --git a/ConsoleApp/appsettings.json b/ConsoleApp/appsettings.json
index eea0c89..c35a9e3 100644
--- a/ConsoleApp/appsettings.json
+++ b/ConsoleApp/appsettings.json
@@ -8,7 +8,7 @@
},
"AllowedHosts": "*",
"AppConfig": {
- "logPath": "F:\\Mesnac\\2023部门项目\\奥特佳-滁州3期\\源码\\HightWay_Middle_Ware\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows\\log",
+ "logPath": "F:\\Mesnac\\2023部门项目\\奥特佳-滁州3期\\源码\\HightWay_Middle_Ware\\ConsoleApp\\bin\\Debug\\net6.0\\log",
"SqlConfig": [
{
"configId": "mes",
@@ -23,7 +23,7 @@
{
"configId": "Local",
"dbType": 2,
- "connStr": "Data Source=F:\\Mesnac\\2023部门项目\\奥特佳-滁州3期\\源码\\HightWay_Middle_Ware\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows\\data\\FData.db3"
+ "connStr": "Data Source=F:\\Mesnac\\2023部门项目\\奥特佳-滁州3期\\源码\\HightWay_Middle_Ware\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows\\data\\LSHData.db3"
}
],
"PlcConfig": [
diff --git a/SlnMesnac.Business/MaterialBindBusiness.cs b/SlnMesnac.Business/MaterialBindBusiness.cs
new file mode 100644
index 0000000..5b1fa78
--- /dev/null
+++ b/SlnMesnac.Business/MaterialBindBusiness.cs
@@ -0,0 +1,67 @@
+using ATC_MaterialBind.Entity;
+using Microsoft.IdentityModel.Logging;
+using SlnMesnac.Business.@base;
+using SlnMesnac.Plc;
+using SlnMesnac.Repository.service;
+using SlnMesnac.Repository.service.@base;
+using SlnMesnac.Repository.service.Impl;
+using SlnMesnac.Rfid;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Business.@base
+{
+ public class MaterialBindBusiness : BaseBusiness
+ {
+ private IStationQualityInfoService _stationQualityInfoService;
+ public Action _PlcConnectState;
+ public MaterialBindBusiness(List plcFactories,IStationQualityInfoService stationQualityInfoService) : base(plcFactories)
+ {
+ _stationQualityInfoService = stationQualityInfoService;
+ }
+ public bool OK_FXSignal(String PlcAddress)
+ {
+ try
+ {
+ var plc = base.GetPlcByKey("plc");
+ var flag = plc.writeInt16ByAddress(PlcAddress, 1);
+ return flag;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+
+
+ }
+ public bool NG_BJSignal(String PlcAddress)
+ {
+ try
+ {
+ var plc = base.GetPlcByKey("plc");
+ var flag = plc.writeInt16ByAddress(PlcAddress, 2);
+ return flag;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+
+
+ }
+ public bool PLCState()
+ {
+ var plc = base.GetPlcByKey("plc");
+ _PlcConnectState?.Invoke(plc.IsConnected);
+ return plc.IsConnected;
+
+ }
+
+
+ }
+}
+
\ No newline at end of file
diff --git a/SlnMesnac.Business/base/BaseBusiness.cs b/SlnMesnac.Business/base/BaseBusiness.cs
index 644ff4d..4e3cfe8 100644
--- a/SlnMesnac.Business/base/BaseBusiness.cs
+++ b/SlnMesnac.Business/base/BaseBusiness.cs
@@ -29,16 +29,13 @@ using System.Text;
#endregion << 版 本 注 释 >>
namespace SlnMesnac.Business.@base
{
- internal class BaseBusiness
+ public class BaseBusiness
{
private readonly List _plcFactories;
- private readonly List _rfidFactories;
-
- public BaseBusiness(List plcFactories, List rfidFactories)
+ public BaseBusiness(List plcFactories)
{
_plcFactories = plcFactories;
- _rfidFactories = rfidFactories;
}
///
@@ -70,37 +67,5 @@ namespace SlnMesnac.Business.@base
throw new InvalidOperationException($"根据Key获取PLC连接信息异常:{ex.Message}");
}
}
-
-
- ///
- /// 根据Key获取Rfid连接信息
- ///
- ///
- ///
- ///
- ///
- public RfidAbsractFactory GetRfidByKey(string key)
- {
- if (_rfidFactories == null)
- {
- throw new ArgumentNullException($"根据Key获取RFID连接信息异常:PLC 连接信息为空");
- }
-
- if (string.IsNullOrEmpty(key))
- {
- throw new ArgumentNullException("根据Key获取RFID连接信息异常:设备Key参数为空");
- }
-
- try
- {
- var info = _rfidFactories.Where(x => x.ConfigKey == key).FirstOrDefault();
-
- return info;
- }
- catch (Exception ex)
- {
- throw new InvalidOperationException($"根据Key获取RFID连接信息异常:{ex.Message}");
- }
- }
}
}
diff --git a/SlnMesnac.Common/ControlOffLineScanHelper.cs b/SlnMesnac.Common/ControlOffLineScanHelper.cs
new file mode 100644
index 0000000..9628b55
--- /dev/null
+++ b/SlnMesnac.Common/ControlOffLineScanHelper.cs
@@ -0,0 +1,115 @@
+using Microsoft.Extensions.DependencyInjection;
+using SlnMesnac.Config;
+using System;
+using System.Collections.Generic;
+using System.IO.Ports;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Common
+{
+ public sealed class ControlOffLineScanHelper
+ {
+
+ #region 单例实现
+ private static readonly ControlOffLineScanHelper lazy = new ControlOffLineScanHelper();
+ public static ControlOffLineScanHelper Instance
+ {
+ get
+ {
+ return lazy;
+ }
+ }
+ #endregion
+
+ #region 变量定义
+ private static SerialPort serialPort = new SerialPort();
+
+ #endregion
+
+ ///
+ /// 扫码委托
+ ///
+ ///
+ ///
+ public delegate void RefreshMaterialCodeStr(string code);
+ public static event RefreshMaterialCodeStr RefreshMaterialCodeStrEvent;
+
+ public Action RecAutoDataAction;
+
+
+ //初始化串口并启动接收数据
+ public void InstanceSerialPort(string ComPort)
+ {
+ try
+ {
+ //端口名 注:因为使用的是USB转RS232 所以去设备管理器中查看一下虚拟com口的名字
+ serialPort.PortName = ComPort;// portName;
+ //波特率 霍尼威尔扫码枪115200,普通9600
+ serialPort.BaudRate = 115200;
+ //奇偶校验
+ serialPort.Parity = Parity.None;
+ //停止位
+ serialPort.StopBits = StopBits.One;
+ //数据位
+ serialPort.DataBits = 0x8;
+ //忽略null字节
+ serialPort.DiscardNull = true;
+
+ //接收事件
+ serialPort.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(serialPort1_DataReceived);
+
+ //开启串口
+ serialPort.Open();
+
+
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.Message.ToString());
+ }
+ }
+
+
+
+ ///
+ /// 接收数据
+ ///
+ ///
+ ///
+ private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
+ {
+ //string result = "";
+ //result = serialPort.ReadExisting().Trim();
+ //RecAutoDataAction?.Invoke(result);
+ //Console.WriteLine(result);
+ string g_s_Data = "";
+ try
+ {
+ #region
+ Thread.Sleep(100);
+ do
+ {
+ g_s_Data = serialPort.ReadExisting().Trim();
+ }
+ while (serialPort.BytesToRead > 0);
+
+ if (g_s_Data.Length > 0)
+ {
+ //区分箱体码
+ RecAutoDataAction?.Invoke(g_s_Data);
+
+ //逻辑操作,g_s_Data为条码数据
+ }
+ GC.Collect();
+ #endregion
+ }
+ catch (Exception ex)
+ {
+
+ }
+ }
+ }
+}
diff --git a/SlnMesnac.Common/SlnMesnac.Common.csproj b/SlnMesnac.Common/SlnMesnac.Common.csproj
index 35a02b5..72c6b2d 100644
--- a/SlnMesnac.Common/SlnMesnac.Common.csproj
+++ b/SlnMesnac.Common/SlnMesnac.Common.csproj
@@ -1,4 +1,4 @@
-
+
netstandard2.1
@@ -9,6 +9,11 @@
+
+
+
+
+
diff --git a/SlnMesnac.Config/AppConfig.cs b/SlnMesnac.Config/AppConfig.cs
index ffeba99..4a8ff4b 100644
--- a/SlnMesnac.Config/AppConfig.cs
+++ b/SlnMesnac.Config/AppConfig.cs
@@ -64,20 +64,14 @@ namespace SlnMesnac.Config
public string redisConfig { get; set; }
///
- /// AMR
+ /// COM端口号
///
-
- public string AMRIP { get; set; }
+ public string ComPort { get; set; }
///
- /// AGV地址配置
+ /// 工位编号
///
- public string AGVIpConfig { get; set; }
-
- ///
- /// 机械臂地址配置
- ///
- public string TCPVisionConfig { get; set; }
+ public string StationCode { get; set; }
public AppConfig Value => this;
}
diff --git a/SlnMesnac.Config/AppsettingsConfig.cs b/SlnMesnac.Config/AppsettingsConfig.cs
new file mode 100644
index 0000000..cf41cfd
--- /dev/null
+++ b/SlnMesnac.Config/AppsettingsConfig.cs
@@ -0,0 +1,57 @@
+
+using Microsoft.Extensions.Configuration;
+using Newtonsoft.Json.Linq;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+namespace SlnMesnac.Config
+{
+ public class AppsettingsConfig
+ {
+ private IConfiguration _configuration;
+
+ public AppsettingsConfig()
+ {
+ // 创建ConfigurationBuilder对象
+ var builder = new ConfigurationBuilder();
+
+ // 设置appsettings.json文件的路径
+ builder.SetBasePath(System.IO.Directory.GetCurrentDirectory()) // 如果appsettings.json不在当前目录下,需要修改路径
+ .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
+
+ // 构建IConfiguration对象
+ _configuration = builder.Build();
+ }
+ public string ReadAppSettings(string session)
+ {
+ // 读取配置信息
+ //_configuration.GetSection("AppConfig:OKCount").Value.ToString();
+ return _configuration.GetSection(session).Value.ToString();
+ }
+ public bool WriteAppSettings(string session,string key, string value)
+ {
+ string contentPath = System.IO.Directory.GetCurrentDirectory() + @"\"; ; //项目根目录
+ var filePath = contentPath + "appsettings.json";
+ JObject jsonObject;
+ using (StreamReader file = new StreamReader(filePath))
+ using (JsonTextReader reader = new JsonTextReader(file))
+ {
+ jsonObject = (JObject)JToken.ReadFrom(reader);
+ jsonObject[session][key] = value;
+ }
+
+ using (var writer = new StreamWriter(filePath))
+ using (JsonTextWriter jsonwriter = new JsonTextWriter(writer))
+ {
+ jsonObject.WriteTo(jsonwriter);
+ }
+
+ return true;
+ }
+
+
+ }
+}
diff --git a/SlnMesnac.Config/SlnMesnac.Config.csproj b/SlnMesnac.Config/SlnMesnac.Config.csproj
index 5ed17ce..edcf5c6 100644
--- a/SlnMesnac.Config/SlnMesnac.Config.csproj
+++ b/SlnMesnac.Config/SlnMesnac.Config.csproj
@@ -6,7 +6,12 @@
+
+
+
+
+
diff --git a/SlnMesnac.Extensions/PlcFactorySetup.cs b/SlnMesnac.Extensions/PlcFactorySetup.cs
index 3298593..a27911b 100644
--- a/SlnMesnac.Extensions/PlcFactorySetup.cs
+++ b/SlnMesnac.Extensions/PlcFactorySetup.cs
@@ -57,7 +57,7 @@ namespace SlnMesnac.Extensions
}
else
{
- Log.Information("HslCommunication激活成功");
+ //Log.Information("HslCommunication激活成功");
}
if (appConfig.plcConfig != null)
diff --git a/SlnMesnac.Model/domain/StationQualityInfo.cs b/SlnMesnac.Model/domain/StationQualityInfo.cs
new file mode 100644
index 0000000..3930d32
--- /dev/null
+++ b/SlnMesnac.Model/domain/StationQualityInfo.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+namespace ATC_MaterialBind.Entity
+{
+ public class StationQualityInfo
+ {
+ public string StationName { get; set; }
+
+ public string TableName { get; set; }
+
+ public string State { get; set; }
+
+ public string Value { get; set;}
+
+ public string inserttime { get; set; }
+ }
+}
diff --git a/SlnMesnac.Model/domain/T_RP_ProductChangeInfo.cs b/SlnMesnac.Model/domain/T_RP_ProductChangeInfo.cs
new file mode 100644
index 0000000..5b305c6
--- /dev/null
+++ b/SlnMesnac.Model/domain/T_RP_ProductChangeInfo.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace SlnMesnac.Repository
+{
+ ///
+ ///
+ ///
+ [SugarTable("T_RP_ProductChangeInfo")]
+ public partial class T_RP_ProductChangeInfo
+ {
+ public T_RP_ProductChangeInfo(){
+
+
+ }
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
+ public int id {get;set;}
+
+ ///
+ /// Desc:机种型号
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="ProductId")]
+ public int? productid {get;set;}
+
+ ///
+ /// Desc:生产负责人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="PersonInCharge")]
+ public string personincharge {get;set;}
+
+ ///
+ /// Desc:结束时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="EndTime")]
+ public DateTime? endtime {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:1
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Operator")]
+ public int? operater {get;set;}
+
+ ///
+ /// Desc:插入时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="InsertTime")]
+ public DateTime? inserttime {get;set;}
+
+ ///
+ /// Desc:开始时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="BeginTime")]
+ public DateTime? begintime {get;set;}
+
+ ///
+ /// Desc:产线名称
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LineName")]
+ public string linename {get;set;}
+
+ }
+}
diff --git a/SlnMesnac.Model/domain/T_RP_StationPara_130.cs b/SlnMesnac.Model/domain/T_RP_StationPara_130.cs
new file mode 100644
index 0000000..0e79db9
--- /dev/null
+++ b/SlnMesnac.Model/domain/T_RP_StationPara_130.cs
@@ -0,0 +1,323 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace SlnMesnac.Repository
+{
+ ///
+ ///
+ ///
+ [SugarTable("T_RP_StationPara_130"), TenantAttribute("mes")]
+ public partial class T_RP_StationPara_130
+ {
+ public T_RP_StationPara_130(){
+
+
+ }
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="ID")]
+ public int id {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Barcode")]
+ public string barcode {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="SemiBarcode")]
+ public string semibarcode {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="ScanBarcode")]
+ public string scanbarcode {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="RFIDNO")]
+ public string rfidno {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="ShiftNo")]
+ public string shiftno {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="StationID")]
+ public string stationid {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="MachineID")]
+ public string machineid {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="MaskID")]
+ public string maskid {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:DateTime.Now
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="InsertTime")]
+ public DateTime? inserttime {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:0
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="UploadFlag")]
+ public string uploadflag {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:1
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="FinalFlag")]
+ public string finalflag {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="State")]
+ public string state {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para1")]
+ public string para1 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para1_Min")]
+ public string para1Min {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para1_Max")]
+ public string para1Max {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para1_State")]
+ public string para1State {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para1_Reserve")]
+ public string para1Reserve {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para2")]
+ public string para2 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para2_Min")]
+ public string para2Min {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para2_Max")]
+ public string para2Max {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para2_State")]
+ public string para2State {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para2_Reserve")]
+ public string para2Reserve {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para3")]
+ public string para3 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para3_Min")]
+ public string para3Min {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para3_Max")]
+ public string para3Max {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para3_State")]
+ public string para3State {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para3_Reserve")]
+ public string para3Reserve {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para4")]
+ public string para4 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para4_Min")]
+ public string para4Min {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para4_Max")]
+ public string para4Max {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para4_State")]
+ public string para4State {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para4_Reserve")]
+ public string para4Reserve {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para5")]
+ public string para5 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para5_Min")]
+ public string para5Min {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para5_Max")]
+ public string para5Max {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para5_State")]
+ public string para5State {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para5_Reserve")]
+ public string para5Reserve {get;set;}
+
+ }
+}
diff --git a/SlnMesnac.Model/domain/T_RP_StationPara_160_1.cs b/SlnMesnac.Model/domain/T_RP_StationPara_160_1.cs
new file mode 100644
index 0000000..564d552
--- /dev/null
+++ b/SlnMesnac.Model/domain/T_RP_StationPara_160_1.cs
@@ -0,0 +1,363 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace SlnMesnac.Repository
+{
+ ///
+ ///
+ ///
+ [SugarTable("T_RP_StationPara_160_1"), TenantAttribute("mes")]
+ public partial class T_RP_StationPara_160_1
+ {
+ public T_RP_StationPara_160_1(){
+
+
+ }
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="ID")]
+ public int id {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Barcode")]
+ public string barcode {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="SemiBarcode")]
+ public string semibarcode {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="ScanBarcode")]
+ public string scanbarcode {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="RFIDNO")]
+ public string rfidno {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="ShiftNo")]
+ public string shiftno {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="StationID")]
+ public string stationid {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="MachineID")]
+ public string machineid {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="MaskID")]
+ public string maskid {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:DateTime.Now
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="InsertTime")]
+ public DateTime? inserttime {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:0
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="UploadFlag")]
+ public string uploadflag {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:1
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="FinalFlag")]
+ public string finalflag {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="State")]
+ public string state {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para1")]
+ public string para1 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para1_Min")]
+ public string para1Min {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para1_Max")]
+ public string para1Max {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para1_State")]
+ public string para1State {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para1_Reserve")]
+ public string para1Reserve {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para2")]
+ public string para2 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para2_Min")]
+ public string para2Min {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para2_Max")]
+ public string para2Max {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para2_State")]
+ public string para2State {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para2_Reserve")]
+ public string para2Reserve {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para3")]
+ public string para3 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para3_Min")]
+ public string para3Min {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para3_Max")]
+ public string para3Max {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para3_State")]
+ public string para3State {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para3_Reserve")]
+ public string para3Reserve {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para4")]
+ public string para4 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para4_Min")]
+ public string para4Min {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para4_Max")]
+ public string para4Max {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para4_State")]
+ public string para4State {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para4_Reserve")]
+ public string para4Reserve {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para5")]
+ public string para5 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para5_Min")]
+ public string para5Min {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para5_Max")]
+ public string para5Max {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para5_State")]
+ public string para5State {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para5_Reserve")]
+ public string para5Reserve {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para6")]
+ public string para6 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para6_Min")]
+ public string para6Min {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para6_Max")]
+ public string para6Max {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para6_State")]
+ public string para6State {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Para6_Reserve")]
+ public string para6Reserve {get;set;}
+
+ }
+}
diff --git a/SlnMesnac.Model/domain/T_SY_TraceState.cs b/SlnMesnac.Model/domain/T_SY_TraceState.cs
new file mode 100644
index 0000000..f6bf9c8
--- /dev/null
+++ b/SlnMesnac.Model/domain/T_SY_TraceState.cs
@@ -0,0 +1,227 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace SlnMesnac.Repository
+{
+ ///
+ ///
+ ///
+ [SugarTable("T_SY_TraceState"), TenantAttribute("mes")]
+ public partial class T_SY_TraceState
+ {
+ public T_SY_TraceState(){
+
+
+ }
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey=true,ColumnName="Barcode")]
+ public string barcode {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="ProductID")]
+ public string productid {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:DateTime.Now
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="BeginTime")]
+ public DateTime? begintime {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="EndTime", IsOnlyIgnoreUpdate = true)]
+ public DateTime? endtime {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="ShiftID", IsOnlyIgnoreUpdate = true)]
+ public string shiftid {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "GroupID", IsOnlyIgnoreUpdate = true)]
+ public string groupid {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="ShiftNo", IsOnlyIgnoreUpdate = true)]
+ public string shiftno {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="SemiBarcode_A")]
+ public string semibarcodeA {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="SemiBarcode_B")]
+ public string semibarcodeB {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="SemiBarcode_C")]
+ public string semibarcodeC {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="ProductBarcode")]
+ public string productbarcode {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="SemiBarcode2")]
+ public string semibarcode2 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "shellbarcode", IsOnlyIgnoreUpdate = true)]
+ public string shellbarcode {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "NameplateInfo", IsOnlyIgnoreUpdate = true)]
+ public string nameplateinfo {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="MarkRecord", IsOnlyIgnoreUpdate = true)]
+ public string markrecord {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "Attr1", IsOnlyIgnoreUpdate = true)]
+ public string attr1 {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "Attr2", IsOnlyIgnoreUpdate = true)]
+ public string attr2 {get;set;}
+
+ ///
+ /// Desc:默认0,1拆解,2返修3报废
+ /// Default:0
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "ISDis", InsertSql ="0", IsOnlyIgnoreUpdate = true)]
+ public string isdis {get;set;}
+
+ ///
+ /// Desc:拆解和报废和返修操作人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="DisChecker", IsOnlyIgnoreUpdate = true)]
+ public string dischecker {get;set;}
+
+ ///
+ /// Desc:拆解或报废或返修的时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "DisTime", IsOnlyIgnoreUpdate = true)]
+ public DateTime? distime {get;set;}
+
+ ///
+ /// Desc:1合格2不合格
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="State")]
+ public string state {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="CurrentStationID")]
+ public string currentstationid {get;set;}
+
+ ///
+ /// Desc:不合格的工位
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="NGStationID")]
+ public string ngstationid {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "RestartStation", IsOnlyIgnoreUpdate = true)]
+ public string restartstation {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:0
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="FinishFlag", IsOnlyIgnoreUpdate = true)]
+ public string finishflag {get;set;}
+
+ ///
+ /// Desc:记录D9工位不合格原因
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="D9Remark", IsOnlyIgnoreUpdate = true)]
+ public string d9remark {get;set;}
+
+ }
+}
diff --git a/SlnMesnac.Model/domain/TaskInfo.cs b/SlnMesnac.Model/domain/TaskInfo.cs
new file mode 100644
index 0000000..e6111cf
--- /dev/null
+++ b/SlnMesnac.Model/domain/TaskInfo.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace SlnMesnac.Model.domain
+{
+ public class TaskInfo
+ {
+ public string TaskNo { get; set; }
+ public string KBarCode { get; set; }
+ public string RecordTime { get; set; }
+ public string QBarCode { get; set; }
+ }
+ public class TaskInfo1 : TaskInfo
+ {
+ public string Station1 { get; set; }
+ public string Station2 { get; set; }
+ public string Station3 { get; set; }
+ public string Station4 { get; set; }
+ public string Station5 { get; set; }
+ public string Station6 { get; set; }
+ }
+ public class TaskInfo2 : TaskInfo
+ {
+ public string Station1 { get; set; }
+ public string Station2 { get; set; }
+ public string Station3 { get; set; }
+ public string Station4 { get; set; }
+ }
+
+ public class TaskInfo3 : TaskInfo
+ {
+ public string Station1 { get; set; }
+ }
+}
diff --git a/SlnMesnac.Model/domain/data3_Table.cs b/SlnMesnac.Model/domain/data3_Table.cs
new file mode 100644
index 0000000..22ce7dc
--- /dev/null
+++ b/SlnMesnac.Model/domain/data3_Table.cs
@@ -0,0 +1,147 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace SlnMesnac.Repository
+{
+ ///
+ ///
+ ///
+ [SugarTable("data1_Table"), TenantAttribute("Local")]
+ public partial class data3_Table
+ {
+ public data3_Table(){
+
+
+ }
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="ID")]
+ public int? id {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Time")]
+ public DateTime time {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Productname")]
+ public string productname {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="QRcode")]
+ public string qrcode {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="TotalJudge")]
+ public string totaljudge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="H1Value")]
+ public string h1value {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="H2Value")]
+ public string h2value {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="H3Value")]
+ public string h3value {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="H4Value")]
+ public string h4value {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="H1Judge")]
+ public string h1judge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="H2Judge")]
+ public string h2judge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="H3Judge")]
+ public string h3judge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="H4Judge")]
+ public string h4judge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="HRangeValue")]
+ public string hrangevalue {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="HRangeJudge")]
+ public string hrangejudge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Flag")]
+ public string flag {get;set;}
+
+ }
+}
diff --git a/SlnMesnac.Model/domain/data4_Table.cs b/SlnMesnac.Model/domain/data4_Table.cs
new file mode 100644
index 0000000..1131e9b
--- /dev/null
+++ b/SlnMesnac.Model/domain/data4_Table.cs
@@ -0,0 +1,179 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace SlnMesnac.Repository
+{
+ ///
+ ///
+ ///
+ [SugarTable("data1_Table"), TenantAttribute("Local")]
+ public partial class data4_Table
+ {
+ public data4_Table(){
+
+
+ }
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="ID")]
+ public int? id {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Time")]
+ public DateTime time {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Productname")]
+ public string productname {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="QRcode")]
+ public string qrcode {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="TotalJudge")]
+ public string totaljudge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LSH1Value")]
+ public string lsh1value {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LSH2Value")]
+ public string lsh2value {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LSH3Value")]
+ public string lsh3value {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LSH4Value")]
+ public string lsh4value {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LSH5Value")]
+ public string lsh5value {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LSH6Value")]
+ public string lsh6value {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LSH1Judge")]
+ public string lsh1judge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LSH2Judge")]
+ public string lsh2judge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LSH3Judge")]
+ public string lsh3judge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LSH4Judge")]
+ public string lsh4judge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LSH5Judge")]
+ public string lsh5judge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="LSH6Judge")]
+ public string lsh6judge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="HRangeValue")]
+ public string hrangevalue {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="HRangeJudge")]
+ public string hrangejudge {get;set;}
+
+ ///
+ /// Desc:
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="Flag")]
+ public string flag {get;set;}
+
+ }
+}
diff --git a/SlnMesnac.Model/domain/sys_dict_data.cs b/SlnMesnac.Model/domain/sys_dict_data.cs
new file mode 100644
index 0000000..69c841a
--- /dev/null
+++ b/SlnMesnac.Model/domain/sys_dict_data.cs
@@ -0,0 +1,131 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace SlnMesnac.Repository
+{
+ ///
+ ///字典数据表
+ ///
+ [SugarTable("sys_dict_data")]
+ public partial class sys_dict_data
+ {
+ public sys_dict_data(){
+
+
+ }
+ ///
+ /// Desc:字典编码
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsIdentity=true,ColumnName="dict_code")]
+ public int dictCode {get;set;}
+
+ ///
+ /// Desc:字典排序
+ /// Default:0
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="dict_sort")]
+ public int? dictSort {get;set;}
+
+ ///
+ /// Desc:字典标签
+ /// Default:N''
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="dict_label")]
+ public string dictLabel {get;set;}
+
+ ///
+ /// Desc:字典键值
+ /// Default:N''
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="dict_value")]
+ public string dictValue {get;set;}
+
+ ///
+ /// Desc:字典类型
+ /// Default:N''
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="dict_type")]
+ public string dictType {get;set;}
+
+ ///
+ /// Desc:样式属性(其他样式扩展)
+ /// Default:NULL
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="css_class")]
+ public string cssClass {get;set;}
+
+ ///
+ /// Desc:表格回显样式
+ /// Default:NULL
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="list_class")]
+ public string listClass {get;set;}
+
+ ///
+ /// Desc:是否默认(Y是 N否)
+ /// Default:N'N'
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="is_default")]
+ public string isDefault {get;set;}
+
+ ///
+ /// Desc:状态(0正常 1停用)
+ /// Default:N'0'
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="status")]
+ public string status {get;set;}
+
+ ///
+ /// Desc:创建者
+ /// Default:N''
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="create_by")]
+ public string createBy {get;set;}
+
+ ///
+ /// Desc:创建时间
+ /// Default:NULL
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="create_time")]
+ public DateTime? createTime {get;set;}
+
+ ///
+ /// Desc:更新者
+ /// Default:N''
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="update_by")]
+ public string updateBy {get;set;}
+
+ ///
+ /// Desc:更新时间
+ /// Default:NULL
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="update_time")]
+ public DateTime? updateTime {get;set;}
+
+ ///
+ /// Desc:备注
+ /// Default:NULL
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="remark")]
+ public string remark {get;set;}
+
+ }
+}
diff --git a/SlnMesnac.Quartz/Job/GetTaskInfo_Job.cs b/SlnMesnac.Quartz/Job/GetTaskInfo_Job.cs
index d142e9a..35b1469 100644
--- a/SlnMesnac.Quartz/Job/GetTaskInfo_Job.cs
+++ b/SlnMesnac.Quartz/Job/GetTaskInfo_Job.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Data;
+using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Quartz;
@@ -17,10 +18,14 @@ namespace SlnMesnac.Quartz.Job
private readonly ILogger _logger;
private Idata1_TableService _data1TableService;
private Idata2_TableService _data2TableService;
+ private Idata3_TableService _data3TableService;
+ private Idata4_TableService _data4TableService;
private IT_RP_StationPara_110_1Service _tr_stationPara_110_1Service;
private IT_RP_StationPara_110_2Service _tr_stationPara_110_2Service;
+ private IT_RP_StationPara_130Service _tr_stationPara_130Service;
+ private IT_RP_StationPara_160_1Service _tr_stationPara_160_1Service;
private readonly AppConfig _appConfig;
- public GetTaskInfo_Job(AppConfig appConfig, ILogger logger, Idata1_TableService service,Idata2_TableService idata2_TableService, IT_RP_StationPara_110_1Service tr_stationPara_110_1Service, IT_RP_StationPara_110_2Service tr_stationPara_110_2Service)
+ public GetTaskInfo_Job(AppConfig appConfig, ILogger logger, Idata1_TableService service,Idata2_TableService idata2_TableService, IT_RP_StationPara_110_1Service tr_stationPara_110_1Service, IT_RP_StationPara_110_2Service tr_stationPara_110_2Service, Idata3_TableService data3TableService,Idata4_TableService idata4_TableService,IT_RP_StationPara_130Service rP_StationPara_130Service,IT_RP_StationPara_160_1Service tr_stationPara_160_1Service)
{
_appConfig = appConfig;
_logger = logger;
@@ -28,30 +33,34 @@ namespace SlnMesnac.Quartz.Job
_tr_stationPara_110_1Service = tr_stationPara_110_1Service;
_data2TableService = idata2_TableService;
_tr_stationPara_110_2Service = tr_stationPara_110_2Service;
+ _data3TableService = data3TableService;
+ _tr_stationPara_130Service = rP_StationPara_130Service;
+ _data4TableService = idata4_TableService;
+ _tr_stationPara_160_1Service = tr_stationPara_160_1Service;
}
public Task Execute(IJobExecutionContext context)
{
- _logger.LogError($"任务执行:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
- var flag = _appConfig.sqlConfig.Find(x => x.configId == "Local");
- if (flag.connStr.Contains("EData"))
- {
- LoadTaskInfo();
- }
- else if (flag.connStr.Contains("FData"))
+ _logger.LogInformation($"任务执行:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
+ var flag = _appConfig.sqlConfig.Find(x => x.configId == "Local").connStr.Split("\\").Last();
+ if (flag == "EData.db3")
{
LoadEDataInfo();
}
- else if (flag.connStr.Contains("HData"))
+ else if (flag == "FData.db3")
{
-
+ LoadFDataInfo();
}
- else if (flag.connStr.Contains("LSHData"))
+ else if (flag == "HData.db3")
{
-
+ LoadHDataInfo();
+ }
+ else if (flag == "LSHData.db3")
+ {
+ LoadLSHDataInfo();
}
return Task.CompletedTask;
}
- private async void LoadTaskInfo()
+ private async void LoadEDataInfo()
{
try
{
@@ -75,6 +84,8 @@ namespace SlnMesnac.Quartz.Job
para6 = data1Table.e2value,
para7 = data1Table.e3value,
para8 = data1Table.e4value,
+ uploadflag = "0",
+ finalflag = "1",
inserttime = DateTime.Parse(data1Table.time)
};
bool insertflag = false;
@@ -94,7 +105,7 @@ namespace SlnMesnac.Quartz.Job
var iflag = _data1TableService.UpdateAsync(data1Table).Result;
if (iflag)
{
- Console.WriteLine(StringChange.ModeToJson(data1Table));
+ _logger.LogInformation(StringChange.ModeToJson(data1Table));
}
}
@@ -109,7 +120,7 @@ namespace SlnMesnac.Quartz.Job
}
}
- private async void LoadEDataInfo()
+ private async void LoadFDataInfo()
{
try
{
@@ -118,43 +129,46 @@ namespace SlnMesnac.Quartz.Job
List _data1Tables = _data2TableService.Getdata2TableListAsync(start,end).Result;
if (_data1Tables != null && _data1Tables.Count > 0)
{
- for (global::System.Int32 i = 0; i < _data1Tables.Count; i++)
+ foreach (var data1Table in _data1Tables)
{
T_RP_StationPara_110_2 t_RP_StationPara_110_2 = new T_RP_StationPara_110_2()
{
- scanbarcode = _data1Tables[i].qrcode,
- state = _data1Tables[i].totaljudge == "OK" ? "1" : "2",
- para1 = _data1Tables[i].f1value,
- para1State = _data1Tables[i].f1judge == "OK" ? "1" : "2",
- para2 = _data1Tables[i].f2value,
- para2State = _data1Tables[i].f2judge == "OK" ? "1" : "2",
- para3 = _data1Tables[i].f3value,
- para3State = _data1Tables[i].f3judge == "OK" ? "1" : "2",
- para4 = _data1Tables[i].f4value,
- para4State = _data1Tables[i].f4judge == "OK" ? "1" : "2",
- para5 = _data1Tables[i].frangevalue,
- para5State = _data1Tables[i].frange == "OK" ? "1" : "2",
- inserttime = _data1Tables[i].time
+ scanbarcode = data1Table.qrcode,
+ state = data1Table.totaljudge == "OK" ? "1" : "2",
+ para1 = data1Table.f1value,
+ para1State = data1Table.f1judge == "OK" ? "1" : "2",
+ para2 = data1Table.f2value,
+ para2State = data1Table.f2judge == "OK" ? "1" : "2",
+ para3 = data1Table.f3value,
+ para3State = data1Table.f3judge == "OK" ? "1" : "2",
+ para4 = data1Table.f4value,
+ para4State = data1Table.f4judge == "OK" ? "1" : "2",
+ para5 = data1Table.frangevalue,
+ para5State = data1Table.frange == "OK" ? "1" : "2",
+ inserttime = data1Table.time,
+ uploadflag = "0",
+ finalflag = "1",
};
//查询是否同条码多次测量
-
- bool insertflag = await _tr_stationPara_110_2Service.AddTaskAsync(t_RP_StationPara_110_2);
-
+ bool insertflag = false;
+ var GetFlag = await _tr_stationPara_110_2Service.GetResultAsync(data1Table.qrcode);
+ if (GetFlag != null)
+ {
+ t_RP_StationPara_110_2.id = GetFlag.id;
+ insertflag = _tr_stationPara_110_2Service.Update(t_RP_StationPara_110_2);
+ }
+ else
+ {
+ insertflag = _tr_stationPara_110_2Service.Insert(t_RP_StationPara_110_2);
+ }
if (insertflag)
{
- _data1Tables[i].flag = "F";
- var iflag = _data2TableService.UpdateAsync(_data1Tables[i]).Result;
+ data1Table.flag = "F";
+ var iflag = _data2TableService.UpdateAsync(data1Table).Result;
if (iflag)
{
- Console.WriteLine("》》》更新前数量:" + _data1Tables.Count);
- //_data1Tables.Remove(_data1Tables[i]);
- if (_data1Tables.Count > 0)
- {
- Console.WriteLine("》》》更新后数量:" + _data1Tables.Count);
- }
- Console.WriteLine(StringChange.ModeToJson(_data1Tables[i]));
- _logger.LogDebug(StringChange.ModeToJson(_data1Tables[i]));
+ _logger.LogInformation(StringChange.ModeToJson(data1Table));
}
}
}
@@ -166,5 +180,130 @@ namespace SlnMesnac.Quartz.Job
}
}
+ private async void LoadHDataInfo()
+ {
+ try
+ {
+ DateTime start = Convert.ToDateTime(DateTime.Now.ToString("D").ToString());
+ DateTime end = Convert.ToDateTime(DateTime.Now.AddDays(1).ToString("D").ToString()).AddSeconds(-1);
+ List _data1Tables = _data3TableService.GetTableListAsync(start,end).Result;
+ if (_data1Tables != null && _data1Tables.Count > 0)
+ {
+ foreach (var data1Table in _data1Tables)
+ {
+ T_RP_StationPara_130 T_RP_StationPara_110_1 = new T_RP_StationPara_130()
+ {
+ scanbarcode = data1Table.qrcode,
+ state = data1Table.totaljudge == "OK" ? "1" : "2",
+ para1 = data1Table.h1value,
+ para1State = data1Table.h1judge == "OK" ? "1" : "2",
+ para2 = data1Table.h2value,
+ para2State = data1Table.h2judge == "OK" ? "1" : "2",
+ para3 = data1Table.h3value,
+ para3State = data1Table.h3judge == "OK" ? "1" : "2",
+ para4 = data1Table.h4value,
+ para4State = data1Table.h4judge == "OK" ? "1" : "2",
+ para5 = data1Table.hrangevalue,
+ para5State = data1Table.hrangejudge == "OK" ? "1" : "2",
+ inserttime = data1Table.time,
+ uploadflag = "0",
+ finalflag = "1",
+ };
+ bool insertflag = false;
+ var GetFlag = await _tr_stationPara_130Service.GetResultAsync(data1Table.qrcode);
+ if (GetFlag != null)
+ {
+ T_RP_StationPara_110_1.id = GetFlag.id;
+ insertflag = _tr_stationPara_130Service.Update(T_RP_StationPara_110_1);
+ }
+ else
+ {
+ insertflag = _tr_stationPara_130Service.Insert(T_RP_StationPara_110_1);
+ }
+ if (insertflag)
+ {
+ data1Table.flag = "F";
+ var iflag = _data3TableService.UpdateAsync(data1Table).Result;
+ if (iflag)
+ {
+ _logger.LogInformation(StringChange.ModeToJson(data1Table));
+ }
+ }
+
+
+ }
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError($"异常:{ex.Message}");
+ }
+
+ }
+ private async void LoadLSHDataInfo()
+ {
+ try
+ {
+ DateTime start = Convert.ToDateTime(DateTime.Now.ToString("D").ToString());
+ DateTime end = Convert.ToDateTime(DateTime.Now.AddDays(1).ToString("D").ToString()).AddSeconds(-1);
+ List _data1Tables = _data4TableService.GetTableListAsync(start, end).Result;
+ if (_data1Tables != null && _data1Tables.Count > 0)
+ {
+ foreach (var data1Table in _data1Tables)
+ {
+ T_RP_StationPara_160_1 T_RP_StationPara_110_1 = new T_RP_StationPara_160_1()
+ {
+ scanbarcode = data1Table.qrcode,
+ state = data1Table.totaljudge == "OK" ? "1" : "2",
+ para1 = data1Table.lsh1value,
+ para1State = data1Table.lsh1judge == "OK" ? "1" : "2",
+ para2 = data1Table.lsh2value,
+ para2State = data1Table.lsh2judge == "OK" ? "1" : "2",
+ para3 = data1Table.lsh3value,
+ para3State = data1Table.lsh3judge == "OK" ? "1" : "2",
+ para4 = data1Table.lsh4value,
+ para4State = data1Table.lsh4judge == "OK" ? "1" : "2",
+ para5 = data1Table.lsh5value,
+ para5State = data1Table.lsh5judge == "OK" ? "1" : "2",
+ para6 = data1Table.hrangevalue,
+ para6State = data1Table.hrangejudge == "OK" ? "1" : "2",
+ inserttime = data1Table.time,
+ uploadflag = "0",
+ finalflag = "1",
+ };
+ bool insertflag = false;
+ var GetFlag = await _tr_stationPara_160_1Service.GetResultAsync(data1Table.qrcode);
+ if (GetFlag != null)
+ {
+ T_RP_StationPara_110_1.id = GetFlag.id;
+ insertflag = _tr_stationPara_160_1Service.Update(T_RP_StationPara_110_1);
+ }
+ else
+ {
+ insertflag = _tr_stationPara_160_1Service.Insert(T_RP_StationPara_110_1);
+ }
+ if (insertflag)
+ {
+ data1Table.flag = "F";
+ var iflag = _data4TableService.UpdateAsync(data1Table).Result;
+ if (iflag)
+ {
+ _logger.LogInformation(StringChange.ModeToJson(data1Table));
+ }
+ }
+
+
+ }
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError($"异常:{ex.Message}");
+ }
+
+ }
+
}
}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/IData3_TableService.cs b/SlnMesnac.Repository/service/IData3_TableService.cs
new file mode 100644
index 0000000..5a1bbbd
--- /dev/null
+++ b/SlnMesnac.Repository/service/IData3_TableService.cs
@@ -0,0 +1,16 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface Idata3_TableService: IBaseService
+ {
+ Task> GetTableListAsync(DateTime start, DateTime end);
+
+ Task UpdateAsync(data3_Table record);
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/IData4_TableService.cs b/SlnMesnac.Repository/service/IData4_TableService.cs
new file mode 100644
index 0000000..ff5c3a2
--- /dev/null
+++ b/SlnMesnac.Repository/service/IData4_TableService.cs
@@ -0,0 +1,16 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface Idata4_TableService: IBaseService
+ {
+ Task> GetTableListAsync(DateTime start, DateTime end);
+
+ Task UpdateAsync(data4_Table record);
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/IStationQualityInfoService.cs b/SlnMesnac.Repository/service/IStationQualityInfoService.cs
new file mode 100644
index 0000000..849b101
--- /dev/null
+++ b/SlnMesnac.Repository/service/IStationQualityInfoService.cs
@@ -0,0 +1,16 @@
+using ATC_MaterialBind.Entity;
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface IStationQualityInfoService : IBaseService
+ {
+ Task> GetProductQuality(string P_Bar_Code, string P_StationCode);
+ string GetNewMainBarcode();
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/ISys_dict_dataService.cs b/SlnMesnac.Repository/service/ISys_dict_dataService.cs
new file mode 100644
index 0000000..3e28f29
--- /dev/null
+++ b/SlnMesnac.Repository/service/ISys_dict_dataService.cs
@@ -0,0 +1,14 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface Isys_dict_dataService: IBaseService
+ {
+ Task> GetProductType();
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/IT_RP_ProductChangeInfoService.cs b/SlnMesnac.Repository/service/IT_RP_ProductChangeInfoService.cs
new file mode 100644
index 0000000..b97f674
--- /dev/null
+++ b/SlnMesnac.Repository/service/IT_RP_ProductChangeInfoService.cs
@@ -0,0 +1,13 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface IT_RP_ProductChangeInfoService: IBaseService
+ {
+ T_RP_ProductChangeInfo GetProductType();
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/IT_RP_StationPara_130Service.cs b/SlnMesnac.Repository/service/IT_RP_StationPara_130Service.cs
new file mode 100644
index 0000000..f74af8a
--- /dev/null
+++ b/SlnMesnac.Repository/service/IT_RP_StationPara_130Service.cs
@@ -0,0 +1,17 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface IT_RP_StationPara_130Service: IBaseService
+ {
+ Task AddTaskAsync(List record);
+ Task GetResultAsync(string jpcode );
+ Task UpdateResultAsync(T_RP_StationPara_130 T_RP_StationPara_130);
+
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/IT_RP_StationPara_160_1Service.cs b/SlnMesnac.Repository/service/IT_RP_StationPara_160_1Service.cs
new file mode 100644
index 0000000..4412d4d
--- /dev/null
+++ b/SlnMesnac.Repository/service/IT_RP_StationPara_160_1Service.cs
@@ -0,0 +1,17 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface IT_RP_StationPara_160_1Service: IBaseService
+ {
+ Task AddTaskAsync(List record);
+ Task GetResultAsync(string jpcode);
+ Task UpdateResultAsync(T_RP_StationPara_160_1 T_RP_StationPara_130);
+
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/IT_SY_TraceStateService.cs b/SlnMesnac.Repository/service/IT_SY_TraceStateService.cs
new file mode 100644
index 0000000..adbd042
--- /dev/null
+++ b/SlnMesnac.Repository/service/IT_SY_TraceStateService.cs
@@ -0,0 +1,19 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface IT_SY_TraceStateService: IBaseService
+ {
+ T_SY_TraceState GetByProductCode(string ProductCode);
+ Task InsertAsync(T_SY_TraceState record);
+
+ Task UpdateAsync(T_SY_TraceState record);
+
+ T_SY_TraceState GetRelationShipByProductCodeAndIsdis(string ProductCode, string MaterialType, string StationCode);
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/Data3_TableServiceImpl.cs b/SlnMesnac.Repository/service/Impl/Data3_TableServiceImpl.cs
new file mode 100644
index 0000000..77ced29
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/Data3_TableServiceImpl.cs
@@ -0,0 +1,53 @@
+using Microsoft.Extensions.Logging;
+using SlnMesnac.Common;
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service.Impl
+{
+ public class data3_TableServiceImpl : BaseServiceImpl, Idata3_TableService
+ {
+ private Repository _repository;
+ private ILogger _logger;
+ public data3_TableServiceImpl(Repository repository, ILogger logger) :base(repository)
+ {
+ _repository = repository;
+ _logger = logger;
+ }
+ public async Task> GetTableListAsync(DateTime start,DateTime end)
+ {
+ List list = null;
+ try
+ {
+ Expression> exp = x => true;
+ exp = exp.And(x =>
+ (x.flag != "F" && x.time >= start && x.time < end)
+ );
+ list = _repository.GetList(exp);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError($"ݻȡ:{ex.Message}");
+ }
+ return list;
+ }
+ public async Task UpdateAsync(data3_Table record)
+ {
+ try
+ {
+ bool result = await _rep.UpdateAsync(record);
+ return result;
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError($"ݻȡ:{ex.Message}");
+ return false;
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/Data4_TableServiceImpl.cs b/SlnMesnac.Repository/service/Impl/Data4_TableServiceImpl.cs
new file mode 100644
index 0000000..dcb9c6b
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/Data4_TableServiceImpl.cs
@@ -0,0 +1,54 @@
+using Microsoft.Extensions.Logging;
+using SlnMesnac.Common;
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service.Impl
+{
+ public class data4_TableServiceImpl : BaseServiceImpl, Idata4_TableService
+ {
+ private Repository _repository;
+ private ILogger _logger;
+ public data4_TableServiceImpl(Repository repository, ILogger logger) :base(repository)
+ {
+ _repository = repository;
+ _logger = logger;
+ }
+
+ public async Task> GetTableListAsync(DateTime start ,DateTime end)
+ {
+ List list = null;
+ try
+ {
+ Expression> exp = x => true;
+ exp = exp.And(x =>
+ (x.flag != "F" && x.time >= start && x.time < end)
+ );
+ list = _repository.GetList(exp);
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError($"ݻȡ:{ex.Message}");
+ }
+ return list;
+ }
+ public async Task UpdateAsync(data4_Table record)
+ {
+ try
+ {
+ bool result = await _rep.UpdateAsync(record);
+ return result;
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError($"ݻȡ:{ex.Message}");
+ return false;
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/StationQualityInfoServiceImpl.cs b/SlnMesnac.Repository/service/Impl/StationQualityInfoServiceImpl.cs
new file mode 100644
index 0000000..6b6c4a1
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/StationQualityInfoServiceImpl.cs
@@ -0,0 +1,50 @@
+using ATC_MaterialBind.Entity;
+using Microsoft.Extensions.Logging;
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service.Impl
+{
+ public class StationQualityInfoServiceImpl : BaseServiceImpl, IStationQualityInfoService
+ {
+ private Repository _repository;
+ public StationQualityInfoServiceImpl(Repository repository ):base(repository)
+ {
+ _repository = repository;
+ }
+
+ public async Task> GetProductQuality(string P_Bar_Code, string P_StationCode)
+ {
+ List stationQualityList = null;
+ try
+ {
+ var parameter1 = new SugarParameter("@BarCode", P_Bar_Code);
+ var parameter2 = new SugarParameter("@StationCode", P_StationCode);//Ϊoutput
+ stationQualityList = _repository.Context.Ado.UseStoredProcedure().SqlQuery("pro_AllProductionQualityInfo", parameter1, parameter2);
+ return stationQualityList;
+ }
+ catch (Exception ex)
+ {
+ return stationQualityList;
+ }
+ }
+ public string GetNewMainBarcode()
+ {
+ try
+ {
+ var parameter1 = new SugarParameter("@Head", "M");
+ var dt = _rep.Context.Ado.UseStoredProcedure().GetString("SP_Pro_GetNewMainBarcode", parameter1);
+ return dt;
+ }
+ catch (Exception ex)
+ {
+
+ throw;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/Sys_dict_dataServiceImpl.cs b/SlnMesnac.Repository/service/Impl/Sys_dict_dataServiceImpl.cs
new file mode 100644
index 0000000..98e3b52
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/Sys_dict_dataServiceImpl.cs
@@ -0,0 +1,30 @@
+using ATC_MaterialBind.Entity;
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service.Impl
+{
+ public class sys_dict_dataServiceImpl : BaseServiceImpl, Isys_dict_dataService
+ {
+ public sys_dict_dataServiceImpl(Repository repository):base(repository)
+ {
+ }
+ public async Task> GetProductType()
+ {
+ List ProductTypeList = null;
+ try
+ {
+ ProductTypeList = _rep.GetList(x=>x.dictType == "productType");
+ return ProductTypeList;
+ }
+ catch (Exception ex)
+ {
+ return ProductTypeList;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/T_RP_ProductChangeInfoServiceImpl.cs b/SlnMesnac.Repository/service/Impl/T_RP_ProductChangeInfoServiceImpl.cs
new file mode 100644
index 0000000..9737fc1
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/T_RP_ProductChangeInfoServiceImpl.cs
@@ -0,0 +1,21 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+
+namespace SlnMesnac.Repository.service.Impl
+{
+ public class T_RP_ProductChangeInfoServiceImpl : BaseServiceImpl, IT_RP_ProductChangeInfoService
+ {
+ public T_RP_ProductChangeInfoServiceImpl(Repository repository):base(repository)
+ {
+
+ }
+ public T_RP_ProductChangeInfo GetProductType()
+ {
+ T_RP_ProductChangeInfo t_RP_Product = null;
+ t_RP_Product = _rep.GetFirst(x => x.id == 1);
+ return t_RP_Product;
+ }
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/T_RP_StationPara_110_2ServiceImpl.cs b/SlnMesnac.Repository/service/Impl/T_RP_StationPara_110_2ServiceImpl.cs
index f1a0b8a..974d7dd 100644
--- a/SlnMesnac.Repository/service/Impl/T_RP_StationPara_110_2ServiceImpl.cs
+++ b/SlnMesnac.Repository/service/Impl/T_RP_StationPara_110_2ServiceImpl.cs
@@ -40,7 +40,7 @@ namespace SlnMesnac.Repository.service.Impl
exp = exp.And(x =>
(x.scanbarcode == record)
);
- var result = await _repository.GetSingleAsync(exp);
+ var result = await _repository.GetFirstAsync(exp);
return result;
}
catch (Exception ex)
diff --git a/SlnMesnac.Repository/service/Impl/T_RP_StationPara_130ServiceImpl.cs b/SlnMesnac.Repository/service/Impl/T_RP_StationPara_130ServiceImpl.cs
new file mode 100644
index 0000000..cfd6195
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/T_RP_StationPara_130ServiceImpl.cs
@@ -0,0 +1,67 @@
+using Microsoft.Extensions.Logging;
+using SlnMesnac.Common;
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service.Impl
+{
+
+ public class T_RP_StationPara_130ServiceImpl : BaseServiceImpl, IT_RP_StationPara_130Service
+ {
+ private Repository _repository;
+ private ILogger _logger;
+ public T_RP_StationPara_130ServiceImpl(Repository repository, ILogger logger) :base(repository)
+ {
+ _repository = repository;
+ _logger = logger;
+ }
+
+
+ public async Task AddTaskAsync(List record)
+ {
+ try
+ {
+ bool result = await _repository.InsertRangeAsync(record);
+ return result;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+
+ }
+ public async Task GetResultAsync(string jpcode)
+ {
+ try
+ {
+ Expression> exp = x => true;
+ exp = exp.And(x =>
+ (x.scanbarcode == jpcode)
+ );
+ var result = await _repository.GetFirstAsync(exp);
+ return result;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
+ }
+
+ public async Task UpdateResultAsync(T_RP_StationPara_130 t_RP_StationPara_110_1)
+ {
+ try
+ {
+ bool result = await _repository.UpdateAsync(t_RP_StationPara_110_1);
+ return result;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/T_RP_StationPara_160_1ServiceImpl.cs b/SlnMesnac.Repository/service/Impl/T_RP_StationPara_160_1ServiceImpl.cs
new file mode 100644
index 0000000..b8eb874
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/T_RP_StationPara_160_1ServiceImpl.cs
@@ -0,0 +1,65 @@
+using Microsoft.Extensions.Logging;
+using SlnMesnac.Common;
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service.Impl
+{
+ public class T_RP_StationPara_160_1ServiceImpl : BaseServiceImpl, IT_RP_StationPara_160_1Service
+ {
+ private Repository _repository;
+ private ILogger _logger;
+ public T_RP_StationPara_160_1ServiceImpl(Repository repository, ILogger logger) :base(repository)
+ {
+ _repository = repository;
+ _logger = logger;
+ }
+
+ public async Task AddTaskAsync(List record)
+ {
+ try
+ {
+ bool result = await _repository.InsertRangeAsync(record);
+ return result;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+
+ }
+ public async Task GetResultAsync(string jpcode)
+ {
+ try
+ {
+ Expression> exp = x => true;
+ exp = exp.And(x =>
+ (x.scanbarcode == jpcode)
+ );
+ var result = await _repository.GetFirstAsync(exp);
+ return result;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
+ }
+
+ public async Task UpdateResultAsync(T_RP_StationPara_160_1 t_RP_StationPara_110_1)
+ {
+ try
+ {
+ bool result = await _repository.UpdateAsync(t_RP_StationPara_110_1);
+ return result;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/T_SY_TraceStateServiceImpl.cs b/SlnMesnac.Repository/service/Impl/T_SY_TraceStateServiceImpl.cs
new file mode 100644
index 0000000..9983e4f
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/T_SY_TraceStateServiceImpl.cs
@@ -0,0 +1,92 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.Repository.service.Impl
+{
+ public class T_SY_TraceStateServiceImpl : BaseServiceImpl, IT_SY_TraceStateService
+ {
+ public T_SY_TraceStateServiceImpl(Repository repository):base(repository)
+ {
+ }
+ ///
+ /// ѯʵ
+ ///
+ ///
+ ///
+ public T_SY_TraceState GetByProductCode(string ProductCode)
+ {
+ T_SY_TraceState traceState = null;
+ traceState = _rep.GetFirst(x => x.productbarcode == ProductCode);
+ return traceState;
+ }
+ public T_SY_TraceState GetRelationShipByProductCodeAndIsdis(string ProductCode,string MaterialType,string StationCode)
+ {
+ T_SY_TraceState traceState = null;
+ //
+ if (MaterialType == "0")
+ {
+ traceState = _rep.GetFirst(x => x.semibarcode2 == ProductCode && x.isdis == "0");
+ }
+ //
+ else if (MaterialType == "1")
+ {
+ if (StationCode == "80_3")
+ {
+ traceState = _rep.GetFirst(x => x.productbarcode == ProductCode && x.semibarcodeA != null && x.isdis == "0");
+ }
+ else if (StationCode == "120_2")
+ {
+ traceState = _rep.GetFirst(x => x.productbarcode == ProductCode && x.semibarcodeB != null && x.isdis == "0");
+ }
+ else if (StationCode == "150")
+ {
+ traceState = _rep.GetFirst(x => x.productbarcode == ProductCode && x.semibarcodeC != null && x.isdis == "0");
+ }
+ else
+ {
+ traceState = _rep.GetFirst(x => x.productbarcode == ProductCode && x.semibarcode2 != null && x.isdis == "0");
+ }
+ }
+ //ǰ
+ else if (MaterialType == "2")
+ {
+ traceState = _rep.GetFirst(x => x.semibarcodeA == ProductCode && x.isdis == "0");
+ }
+ //
+ else if (MaterialType == "3")
+ {
+ traceState = _rep.GetFirst(x => x.semibarcodeB == ProductCode && x.isdis == "0");
+ }
+ //
+ else if (MaterialType == "4")
+ {
+ traceState = _rep.GetFirst(x => x.semibarcodeC == ProductCode && x.isdis == "0");
+ }
+ return traceState;
+ }
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task UpdateAsync(T_SY_TraceState record)
+ {
+ bool result = await _rep.UpdateAsync(record);
+ return result;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task InsertAsync(T_SY_TraceState record)
+ {
+ bool result = await _rep.InsertAsync(record);
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Serilog/SerilogExtensions.cs b/SlnMesnac.Serilog/SerilogExtensions.cs
index 0cf3dd9..5e8dc03 100644
--- a/SlnMesnac.Serilog/SerilogExtensions.cs
+++ b/SlnMesnac.Serilog/SerilogExtensions.cs
@@ -42,14 +42,13 @@ namespace SlnMesnac.Serilog
#region 通过配置文件读取日志存放位置
var appConfig = app.ApplicationServices.GetService();
- var logPath = $"{appConfig.logPath}/Logs/{DateTime.UtcNow:yyyy-MM-dd}/";
+ var logPath = $"{appConfig.logPath}/Logs/";
#endregion
Log.Logger = new LoggerConfiguration().MinimumLevel.Information().WriteTo.Console()
- .WriteTo.File(Path.Combine(logPath, "Debug.log"), LogEventLevel.Debug)
- .WriteTo.File(Path.Combine(logPath, "Info.log"), LogEventLevel.Information)
- .WriteTo.File(Path.Combine(logPath, "Error.log"), LogEventLevel.Error)
- .WriteTo.File(Path.Combine(logPath, "data.log"), LogEventLevel.Warning)
+ .WriteTo.File(Path.Combine(logPath, "Info.log"), LogEventLevel.Information,rollingInterval:RollingInterval.Day)
+ .WriteTo.File(Path.Combine(logPath, "Error.log"), LogEventLevel.Error, rollingInterval: RollingInterval.Day)
+ .WriteTo.File(Path.Combine(logPath, "data.log"), LogEventLevel.Warning, rollingInterval: RollingInterval.Day)
//.WriteTo.File(Path.Combine(logPath, "data.log"), LogEventLevel.Debug)
//.WriteTo.File(Path.Combine(logPath, "Debug.log"), LogEventLevel.Debug, fileSizeLimitBytes: 5 * 1024)
diff --git a/SlnMesnac.TouchSocket/AirPorthttpClient.cs b/SlnMesnac.TouchSocket/AirPorthttpClient.cs
index fb8513d..1ca9a79 100644
--- a/SlnMesnac.TouchSocket/AirPorthttpClient.cs
+++ b/SlnMesnac.TouchSocket/AirPorthttpClient.cs
@@ -51,17 +51,6 @@ namespace SlnMesnac.TouchSocket
}
}
- public void init()
- {
- try
- {
- AirportAGVClient = CreateWebApiClient(_appConfig.AGVIpConfig);
- }
- catch (Exception ex)
- {
- _logger.LogError("ERROR: " + ex.Message);
- }
- }
///
/// 获取到的JToken类型转换为实体类
diff --git a/SlnMesnac.WPF/AssemblyInfo.cs b/SlnMesnac.WPF/AssemblyInfo.cs
index 8b5504e..abb6b57 100644
--- a/SlnMesnac.WPF/AssemblyInfo.cs
+++ b/SlnMesnac.WPF/AssemblyInfo.cs
@@ -1,5 +1,7 @@
+using System.Reflection;
using System.Windows;
+
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
@@ -8,3 +10,9 @@ using System.Windows;
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
+
+//V1.0.1.0
+/*
+ * 1.ɨжǷڰϢ
+ * 2.ͺлУ
+ */
\ No newline at end of file
diff --git a/SlnMesnac.WPF/Converter/Generate/ConfigToDynamicGridViewConverter .cs b/SlnMesnac.WPF/Converter/Generate/ConfigToDynamicGridViewConverter .cs
new file mode 100644
index 0000000..0420b2e
--- /dev/null
+++ b/SlnMesnac.WPF/Converter/Generate/ConfigToDynamicGridViewConverter .cs
@@ -0,0 +1,41 @@
+
+using SlnMesnac.WPF.ViewModel.IndexPage;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Media.Imaging;
+
+namespace SlnMesnac.WPF.Converter.Generate
+{
+ public class ConfigToDynamicGridViewConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ var config = value as ColumnConfig;
+ if (config != null)
+ {
+ var grdiView = new GridView();
+ foreach (var column in config.Columns)
+ {
+ var binding = new Binding(column.DataField);
+
+ grdiView.Columns.Add(new GridViewColumn { Header = column.Header, DisplayMemberBinding = binding });
+ }
+ return grdiView;
+ }
+ return Binding.DoNothing;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+ }
+
+}
diff --git a/SlnMesnac.WPF/MainWindow.xaml b/SlnMesnac.WPF/MainWindow.xaml
index a17cf92..9c09c0b 100644
--- a/SlnMesnac.WPF/MainWindow.xaml
+++ b/SlnMesnac.WPF/MainWindow.xaml
@@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SlnMesnac.WPF"
mc:Ignorable="d"
- Title="MainWindow" WindowStartupLocation="CenterScreen" Height="1080" Width="1920" Topmost="False" Loaded="Window_Loaded" Closing="Window_Closing">
+ Title="MainWindow" WindowStartupLocation="CenterScreen" WindowState="Maximized" Height="1080" Width="1920" Topmost="False" Loaded="Window_Loaded" Closing="Window_Closing">
@@ -30,7 +30,7 @@
-
+
@@ -62,10 +62,12 @@
-
+
+
+
@@ -159,7 +161,7 @@
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SlnMesnac.WPF/Page/IndexPage/ChangeType.xaml.cs b/SlnMesnac.WPF/Page/IndexPage/ChangeType.xaml.cs
new file mode 100644
index 0000000..d4b17e3
--- /dev/null
+++ b/SlnMesnac.WPF/Page/IndexPage/ChangeType.xaml.cs
@@ -0,0 +1,35 @@
+using ATC_MaterialBind.Entity;
+using SlnMesnac.Repository;
+using SlnMesnac.WPF.ViewModel.IndexPage;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace SlnMesnac.WPF.Page.IndexPage
+{
+ ///
+ /// ChangeType.xaml 的交互逻辑
+ ///
+ public partial class ChangeType : UserControl
+ {
+ ChangeTypeViewModel ChangeTypeView;
+ public ChangeType()
+ {
+ InitializeComponent();
+ ChangeTypeView = new ChangeTypeViewModel();
+ this.DataContext = ChangeTypeView;
+ }
+
+ }
+}
diff --git a/SlnMesnac.WPF/Page/IndexPage/MaterialBind.xaml b/SlnMesnac.WPF/Page/IndexPage/MaterialBind.xaml
new file mode 100644
index 0000000..caa98ee
--- /dev/null
+++ b/SlnMesnac.WPF/Page/IndexPage/MaterialBind.xaml
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SlnMesnac.WPF/Page/IndexPage/MaterialBind.xaml.cs b/SlnMesnac.WPF/Page/IndexPage/MaterialBind.xaml.cs
new file mode 100644
index 0000000..5c656ae
--- /dev/null
+++ b/SlnMesnac.WPF/Page/IndexPage/MaterialBind.xaml.cs
@@ -0,0 +1,70 @@
+using ATC_MaterialBind.Entity;
+using SlnMesnac.Plc;
+using SlnMesnac.WPF.ViewModel.IndexPage;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Automation.Peers;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace SlnMesnac.WPF.Page.IndexPage
+{
+ ///
+ /// MaterialBind.xaml 的交互逻辑
+ ///
+ public partial class MaterialBind : UserControl
+ {
+ IndexContentViewModel indexContentViewModel;
+ public MaterialBind()
+ {
+ InitializeComponent();
+ indexContentViewModel = new IndexContentViewModel();
+ indexContentViewModel._Action += RefreshStationQuallity;
+ this.DataContext = indexContentViewModel;
+ //load();
+ }
+
+ private void RefreshStationQuallity(List stationQualityInfos)
+ {
+ Application.Current.Dispatcher.Invoke(new Action(() =>
+ {
+ stackpanel1.Children.Clear();
+ if (stationQualityInfos != null && stationQualityInfos.Count > 0)
+ {
+ List buttons = new List();
+ foreach (var item in stationQualityInfos)
+ {
+ buttons.Add(new Button { FontSize = 20, Background = item.State == "1" ? Brushes.Lime : Brushes.Red, Height = 50, Content = item.StationName });
+ }
+
+ foreach (UIElement button in buttons)
+ {
+ stackpanel1.Children.Add(button);
+ }
+ }
+ else {
+ stackpanel1.Children.Remove(this);
+ }
+
+ }));
+
+ }
+
+ //在载入行的时候在行表头添加编号
+ private void dgv_LoadingRow(object sender, DataGridRowEventArgs e)
+ {
+ e.Row.Header = (e.Row.GetIndex() + 1).ToString();
+ }
+
+ }
+}
diff --git a/SlnMesnac.WPF/SlnMesnac.WPF.csproj b/SlnMesnac.WPF/SlnMesnac.WPF.csproj
index 6099f9b..787584e 100644
--- a/SlnMesnac.WPF/SlnMesnac.WPF.csproj
+++ b/SlnMesnac.WPF/SlnMesnac.WPF.csproj
@@ -1,11 +1,12 @@
- Exe
+ WinExe
net6.0-windows
enable
true
true
+ 1.0.1.0
diff --git a/SlnMesnac.WPF/Startup.cs b/SlnMesnac.WPF/Startup.cs
index 0fd5515..838ecb9 100644
--- a/SlnMesnac.WPF/Startup.cs
+++ b/SlnMesnac.WPF/Startup.cs
@@ -43,7 +43,7 @@ namespace SlnMesnac.WPF
services.AddSqlSugarSetup();
//注册PLC工厂
- //services.AddPlcFactorySetup();
+ services.AddPlcFactorySetup();
//注册httpClient
//services.AddHostedService();
@@ -55,7 +55,7 @@ namespace SlnMesnac.WPF
//services.AddRfidFactorySetup();
//注册任务调度
- services.AddQuartzSetUp();
+ //services.AddQuartzSetUp();
}
@@ -83,16 +83,16 @@ namespace SlnMesnac.WPF
//启用Serilog中间件
app.UseSerilogExtensions();
- app.UseTouchSocketExtensions();
+ //app.UseTouchSocketExtensions();
app.UseRouting();
app.UseAuthorization();
- app.UseEndpoints(endpoints =>
- {
- endpoints.MapControllers();
- });
+ //app.UseEndpoints(endpoints =>
+ //{
+ // endpoints.MapControllers();
+ //});
}
}
diff --git a/SlnMesnac.WPF/ViewModel/IndexPage/ChangeTypeViewModel.cs b/SlnMesnac.WPF/ViewModel/IndexPage/ChangeTypeViewModel.cs
new file mode 100644
index 0000000..872bb68
--- /dev/null
+++ b/SlnMesnac.WPF/ViewModel/IndexPage/ChangeTypeViewModel.cs
@@ -0,0 +1,100 @@
+using ATC_MaterialBind.Entity;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+using SlnMesnac.Config;
+using SlnMesnac.Repository;
+using SlnMesnac.Repository.service;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.WPF.ViewModel.IndexPage
+{
+ public partial class ChangeTypeViewModel : ObservableObject
+ {
+ private ILogger _logger;
+ private Isys_dict_dataService _dataService;
+ private AppsettingsConfig _appSettings = new AppsettingsConfig();
+ public ChangeTypeViewModel()
+ {
+ UpdateCommand = new RelayCommand