修改测温服务程序

dev
liulb@mesnac.com 1 year ago
parent b490218d75
commit 8245c781f2

@ -3526,7 +3526,7 @@
线号 线号
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TemperatureHistory.Gongwno"> <member name="P:Admin.Core.Model.TemperatureHistory.GongwNo">
<summary> <summary>
工位号 工位号
</summary> </summary>
@ -3551,6 +3551,11 @@
工作电压 工作电压
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TemperatureHistory.Frequency">
<summary>
供电频率
</summary>
</member>
<member name="P:Admin.Core.Model.TemperatureHistory.Point2"> <member name="P:Admin.Core.Model.TemperatureHistory.Point2">
<summary> <summary>
测试通道 测试通道
@ -3616,41 +3621,6 @@
部件测试数据 部件测试数据
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TemperatureHistory.ErrorCode_Mes">
<summary>
故障代码
</summary>
</member>
<member name="P:Admin.Core.Model.TemperatureHistory.T1Name">
<summary>
内部传感器 1 名称
</summary>
</member>
<member name="P:Admin.Core.Model.TemperatureHistory.T2Name">
<summary>
内部传感器 2 名称
</summary>
</member>
<member name="P:Admin.Core.Model.TemperatureHistory.T3Name">
<summary>
内部传感器 3 名称
</summary>
</member>
<member name="P:Admin.Core.Model.TemperatureHistory.T4Name">
<summary>
内部传感器 4 名称
</summary>
</member>
<member name="P:Admin.Core.Model.TemperatureHistory.T5Name">
<summary>
内部传感器 5 名称
</summary>
</member>
<member name="P:Admin.Core.Model.TemperatureHistory.T6Name">
<summary>
内部传感器 6 名称
</summary>
</member>
<member name="P:Admin.Core.Model.TemperatureHistory.IsOrder"> <member name="P:Admin.Core.Model.TemperatureHistory.IsOrder">
<summary> <summary>
是否测试部件”Y”测试 是否测试部件”Y”测试
@ -3701,7 +3671,7 @@
线号 线号
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.Gongwno"> <member name="P:Admin.Core.Model.TestedCode_MES.GongwNo">
<summary> <summary>
工位号 工位号
</summary> </summary>
@ -3716,7 +3686,12 @@
产品型号 产品型号
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.FactoryModel"> <member name="P:Admin.Core.Model.TestedCode_MES.factoryModel">
<summary>
基准型号
</summary>
</member>
<member name="P:Admin.Core.Model.TestedCode_MES.factoryOrder">
<summary> <summary>
基准型号 基准型号
</summary> </summary>
@ -3726,6 +3701,11 @@
工作电压 工作电压
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.Frequency">
<summary>
</summary>
</member>
<member name="P:Admin.Core.Model.TestedCode_MES.Point2"> <member name="P:Admin.Core.Model.TestedCode_MES.Point2">
<summary> <summary>
测试通道 测试通道
@ -3791,69 +3771,59 @@
部件测试数据 部件测试数据
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.ErrorCode_Mes"> <member name="P:Admin.Core.Model.TestedCode_MES.T_Name">
<summary>
故障代码
</summary>
</member>
<member name="P:Admin.Core.Model.TestedCode_MES.T1Name">
<summary> <summary>
内部传感器 1 名称 内部传感器 1 名称
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.T2Name"> <member name="P:Admin.Core.Model.TestedCode_MES.isOrder">
<summary> <summary>
内部传感器 2 名称 是否测试部件”Y”测试
</summary> </summary>
</member>
<member name="P:Admin.Core.Model.TestedCode_MES.T3Name">
<summary>
内部传感器 3 名称
</summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.T4Name"> <member name="P:Admin.Core.Model.TestedCode_MES.LowV_Time">
<summary> <summary>
内部传感器 4 名称 低压启动测试时间
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.T5Name"> <member name="P:Admin.Core.Model.TestedCode_MES.LowV_PowerMin">
<summary> <summary>
内部传感器 5 名称 低压启动标准下限
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.T6Name"> <member name="P:Admin.Core.Model.TestedCode_MES.LowV_PowerMax">
<summary> <summary>
内部传感器 6 名称 低压启动标准上限
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.IsOrder"> <member name="P:Admin.Core.Model.TestedCode_MES.LowV_PowerFact">
<summary> <summary>
是否测试部件”Y”测试 低压启动实际采集值
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.LowV_Time"> <member name="P:Admin.Core.Model.TestedCode_MES.LowVoltage">
<summary> <summary>
低压启动测试时间 低压启动测试电压
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.LowV_PowerMin"> <member name="P:Admin.Core.Model.TestedCode_MES.CodeDateTime">
<summary> <summary>
低压启动标准下限 低压启动测试电压
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.LowV_PowerMax"> <member name="P:Admin.Core.Model.TestedCode_MES.isCopyRead">
<summary> <summary>
低压启动标准上限 低压启动测试电压
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.LowV_PowerFact"> <member name="P:Admin.Core.Model.TestedCode_MES.CodeDateTime2">
<summary> <summary>
低压启动实际采集值 低压启动测试电压
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.TestedCode_MES.LowVoltage"> <member name="P:Admin.Core.Model.TestedCode_MES.IsSync">
<summary> <summary>
低压启动测试电压 是否同步 1同步 0 位同步
</summary> </summary>
</member> </member>
<member name="T:Admin.Core.Model.DeptView"> <member name="T:Admin.Core.Model.DeptView">

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Common")] [assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Common")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f242c55c6773055ed882072b4cbd144f26a025f1")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b490218d75f73a2a8262a5684a1de0678e4eb101")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Common")] [assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Common")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Common")] [assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Common")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
87a0600a7f41dbd7fb6e17317b46dab48d599fb88ba27b9ecafe90600b623f5e 6a34387ae32f06dc60426c9cf287eb1c66486231a61d0eedf7e1ffe92bb8269e

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.EventBus")] [assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.EventBus")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f242c55c6773055ed882072b4cbd144f26a025f1")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b490218d75f73a2a8262a5684a1de0678e4eb101")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.EventBus")] [assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.EventBus")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.EventBus")] [assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.EventBus")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
0b6334a8eca6220f34a70ef7e8638a5a7d7d915a08c883404c49ce9b20597be9 8ac8b1e0f3b0ac5354ed9139acb9f6d7fdfeac7088c9c4ab5289f9da57d3f6a8

@ -14,6 +14,7 @@ namespace Admin.Core.Extensions.Middlewares
try try
{ {
Console.WriteLine("测温服务开启中...");
aucamTemperatureMeasurementService.Execute(); aucamTemperatureMeasurementService.Execute();
Console.WriteLine("测温服务已开启"); Console.WriteLine("测温服务已开启");
} }

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Extensions")] [assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Extensions")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f242c55c6773055ed882072b4cbd144f26a025f1")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b490218d75f73a2a8262a5684a1de0678e4eb101")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Extensions")] [assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Extensions")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Extensions")] [assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Extensions")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
4a7a5e632f75acc2920835c957e2ba4bacf9c19fa66b0e4b558910512e4ad1f0 d8d4317afa066d5616d7c75f9235dc29daae42da6bd2f97d2293b43963e6570c

@ -17,5 +17,11 @@ namespace Admin.Core.IRepository
/// <param name="time">结束时间</param> /// <param name="time">结束时间</param>
/// <returns></returns> /// <returns></returns>
List<TestedCode_MES> QueryTemperatureHistory(DateTime time); List<TestedCode_MES> QueryTemperatureHistory(DateTime time);
/// <summary>
/// 更新测温标识
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
int UpateTemperatureHistoryFlag(List<TestedCode_MES> list);
} }
} }

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.IRepository")] [assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.IRepository")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f242c55c6773055ed882072b4cbd144f26a025f1")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b490218d75f73a2a8262a5684a1de0678e4eb101")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.IRepository")] [assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.IRepository")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.IRepository")] [assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.IRepository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
1729bdd33c92c32780dfc41d1c8c22b6e81b413dc7bcedea2de590235227a7d0 0e57fdca1b5f4ef1b4980d51aa282744c9be6b9216bd493762e6796c1e1d166b

@ -14,6 +14,11 @@ namespace Admin.Core.IService
/// 获取系统班组时间 /// 获取系统班组时间
/// </summary> /// </summary>
public List<TestedCode_MES> QueryTemperatureHistory(DateTime startTime); public List<TestedCode_MES> QueryTemperatureHistory(DateTime startTime);
/// <summary>
/// 跟新同步标识
/// </summary>
public int UpateTemperatureHistoryFlag(List<TestedCode_MES> list);
} }
} }

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.IService")] [assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.IService")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f242c55c6773055ed882072b4cbd144f26a025f1")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b490218d75f73a2a8262a5684a1de0678e4eb101")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.IService")] [assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.IService")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.IService")] [assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.IService")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
c83a04ebc368821387c3ab97734761bca5244ace0e4e216ff1cefcac9c4ba4da 06ee9f3773181e78eb6481eab76aa1646bfc374e59d7a45438faef77d44b2b66

@ -14,7 +14,7 @@ namespace Admin.Core.Model
/// <summary> /// <summary>
/// 主键 /// 主键
/// </summary> /// </summary>
[SugarColumn(ColumnName = "OBJ_ID", IsIdentity = true, IsPrimaryKey = true, OracleSequenceName = "SEQ_CODE_BINDING")] [SugarColumn(ColumnName = "OBJ_ID", IsIdentity = true, IsPrimaryKey = true, OracleSequenceName = "SEQ_TEMPERATUREMEASUREMENTHISTORY")]
public int ObjId { get; set; } public int ObjId { get; set; }
/// <summary> /// <summary>
@ -27,7 +27,7 @@ namespace Admin.Core.Model
/// 工位号 /// 工位号
/// </summary> /// </summary>
[SugarColumn(ColumnName = "GONGWNO")] [SugarColumn(ColumnName = "GONGWNO")]
public int Gongwno { get; set; } public int GongwNo { get; set; }
/// <summary> /// <summary>
/// 产品条码 /// 产品条码
@ -50,9 +50,13 @@ namespace Admin.Core.Model
/// <summary> /// <summary>
/// 工作电压 /// 工作电压
/// </summary> /// </summary>
[SugarColumn(ColumnName = "FACTORYMODEL")] [SugarColumn(ColumnName = "VOLTAGE")]
public int Voltage { get; set; } public int Voltage { get; set; }
/// <summary>
/// 供电频率
/// </summary>
[SugarColumn(ColumnName = "FREQUENCY")]
public int Frequency { get; set; }
/// <summary> /// <summary>
/// 测试通道 /// 测试通道
/// </summary> /// </summary>
@ -81,7 +85,7 @@ namespace Admin.Core.Model
/// 开始测试时间 /// 开始测试时间
/// </summary> /// </summary>
[SugarColumn(ColumnName = "BEGINDATETIME")] [SugarColumn(ColumnName = "BEGINDATETIME")]
public string BeginDateTime { get; set; } public DateTime BeginDateTime { get; set; }
/// <summary> /// <summary>
/// 测试结果 /// 测试结果
@ -93,7 +97,7 @@ namespace Admin.Core.Model
/// 测试结束时间 /// 测试结束时间
/// </summary> /// </summary>
[SugarColumn(ColumnName = "ENDDATETIME")] [SugarColumn(ColumnName = "ENDDATETIME")]
public string EndDateTime { get; set; } public DateTime EndDateTime { get; set; }
/// <summary> /// <summary>
/// 系统用户 /// 系统用户
@ -131,48 +135,6 @@ namespace Admin.Core.Model
[SugarColumn(ColumnName = "PART_MES")] [SugarColumn(ColumnName = "PART_MES")]
public string Part_Mes { get; set; } public string Part_Mes { get; set; }
/// <summary>
/// 故障代码
/// </summary>
[SugarColumn(ColumnName = "ERRORCODE_MES")]
public string ErrorCode_Mes { get; set; }
/// <summary>
/// 内部传感器 1 名称
/// </summary>
[SugarColumn(ColumnName = "T1NAME")]
public string T1Name { get; set; }
/// <summary>
/// 内部传感器 2 名称
/// </summary>
[SugarColumn(ColumnName = "T2NAME")]
public string T2Name { get; set; }
/// <summary>
/// 内部传感器 3 名称
/// </summary>
[SugarColumn(ColumnName = "T3NAME")]
public string T3Name { get; set; }
/// <summary>
/// 内部传感器 4 名称
/// </summary>
[SugarColumn(ColumnName = "T4NAME")]
public string T4Name { get; set; }
/// <summary>
/// 内部传感器 5 名称
/// </summary>
[SugarColumn(ColumnName = "T5NAME")]
public string T5Name { get; set; }
/// <summary>
/// 内部传感器 6 名称
/// </summary>
[SugarColumn(ColumnName = "T6NAME")]
public string T6Name { get; set; }
/// <summary> /// <summary>
/// 是否测试部件”Y”测试 /// 是否测试部件”Y”测试
/// </summary> /// </summary>
@ -208,6 +170,8 @@ namespace Admin.Core.Model
/// </summary> /// </summary>
[SugarColumn(ColumnName = "LOWVOLTAGE")] [SugarColumn(ColumnName = "LOWVOLTAGE")]
public decimal LowVoltage { get; set; } public decimal LowVoltage { get; set; }
/// <summary> /// <summary>
/// 同步时间 /// 同步时间
/// </summary> /// </summary>

@ -18,7 +18,7 @@ namespace Admin.Core.Model
/// <summary> /// <summary>
/// 主键 /// 主键
/// </summary> /// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)] [SugarColumn(IsPrimaryKey = true)]
public int ID { get; set; } public int ID { get; set; }
/// <summary> /// <summary>
/// 线号 /// 线号
@ -28,7 +28,7 @@ namespace Admin.Core.Model
/// <summary> /// <summary>
/// 工位号 /// 工位号
/// </summary> /// </summary>
public int Gongwno { get; set; } public int GongwNo { get; set; }
/// <summary> /// <summary>
/// 产品条码 /// 产品条码
@ -43,13 +43,19 @@ namespace Admin.Core.Model
/// <summary> /// <summary>
/// 基准型号 /// 基准型号
/// </summary> /// </summary>
public string FactoryModel { get; set; } public string factoryModel { get; set; }
/// <summary>
/// 基准型号
/// </summary>
public string factoryOrder { get; set; }
/// <summary> /// <summary>
/// 工作电压 /// 工作电压
/// </summary> /// </summary>
public int Voltage { get; set; } public int Voltage { get; set; }
/// <summary>
///
/// </summary>
public int Frequency { get; set; }
/// <summary> /// <summary>
/// 测试通道 /// 测试通道
/// </summary> /// </summary>
@ -99,61 +105,32 @@ namespace Admin.Core.Model
/// 第几次测试 /// 第几次测试
/// </summary> /// </summary>
public int TestNo { get; set; } public int TestNo { get; set; }
public int DataLengthT { get; set; }
/// <summary> /// <summary>
/// 温度数据 /// 温度数据
/// </summary> /// </summary>
public string Temp_Mes { get; set; } public string Temp_Mes { get; set; }
public int DataLengthP { get; set; }
/// <summary> /// <summary>
/// 功率数据 /// 功率数据
/// </summary> /// </summary>
public string Power_Mes { get; set; } public string Power_Mes { get; set; }
/// <summary> /// <summary>
/// 部件测试数据 /// 部件测试数据
/// </summary> /// </summary>
public string Part_Mes { get; set; } public string Part_Mes { get; set; }
public int OrderCount { get; set; }
/// <summary>
/// 故障代码
/// </summary>
public string ErrorCode_Mes { get; set; }
/// <summary> /// <summary>
/// 内部传感器 1 名称 /// 内部传感器 1 名称
/// </summary> /// </summary>
public string T1Name { get; set; } public string T_Name { get; set; }
/// <summary>
/// 内部传感器 2 名称
/// </summary>
public string T2Name { get; set; }
/// <summary> /// <summary>
/// 内部传感器 3 名称 ///是否测试部件”Y”测试
/// </summary> /// </summary>
public string T3Name { get; set; } public string isOrder { get; set; }
/// <summary>
/// 内部传感器 4 名称
/// </summary>
public string T4Name { get; set; }
/// <summary>
/// 内部传感器 5 名称
/// </summary>
public string T5Name { get; set; }
/// <summary>
/// 内部传感器 6 名称
/// </summary>
public string T6Name { get; set; }
/// <summary>
/// 是否测试部件”Y”测试
/// </summary>
public string IsOrder { get; set; }
/// <summary> /// <summary>
/// 低压启动测试时间 /// 低压启动测试时间
@ -179,5 +156,26 @@ namespace Admin.Core.Model
/// 低压启动测试电压 /// 低压启动测试电压
/// </summary> /// </summary>
public decimal LowVoltage { get; set; } public decimal LowVoltage { get; set; }
public int isMESRead { get; set; }
/// <summary>
/// 低压启动测试电压
/// </summary>
public DateTime CodeDateTime { get; set; }
/// <summary>
/// 低压启动测试电压
/// </summary>
public int isCopyRead { get; set; }
/// <summary>
/// 低压启动测试电压
/// </summary>
public DateTime CodeDateTime2 { get; set; }
public string GE_CpNo { get; set; }
public string GE_CpModel { get; set; }
/// <summary>
/// 是否同步 1同步 0 位同步
/// </summary>
public int IsSync { get; set; }
} }
} }

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Model")] [assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Model")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f242c55c6773055ed882072b4cbd144f26a025f1")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b490218d75f73a2a8262a5684a1de0678e4eb101")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Model")] [assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Model")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Model")] [assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Model")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
1aeaf67c9b05c0229d5cde75302719d662a4718be25a06f06faf717d4b7ecb6e 0b32a3ac1b417e198b98cfbf21983432fc89ad6f4b2052a55fd777fe7fd45492

@ -30,5 +30,11 @@ namespace Admin.Core.Repository
return list; return list;
} }
#endregion #endregion
public int UpateTemperatureHistoryFlag(List<TestedCode_MES> mes)
{
var r = Db.CopyNew().Updateable(mes).UpdateColumns(it => new { it.IsSync}).ExecuteCommand(); ;
return r;
}
} }
} }

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Repository")] [assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Repository")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f242c55c6773055ed882072b4cbd144f26a025f1")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b490218d75f73a2a8262a5684a1de0678e4eb101")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Repository")] [assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Repository")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Repository")] [assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Repository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
b421458c05255ab19c6ba5623d1ed22be575b82ed8d7983727203ddffdd5b0aa 536df73917913680572e6943cf0cb9f4ad18351f86d4530d44b0fa1225fcf43e

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Serilog.Es")] [assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Serilog.Es")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f242c55c6773055ed882072b4cbd144f26a025f1")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b490218d75f73a2a8262a5684a1de0678e4eb101")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Serilog.Es")] [assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Serilog.Es")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Serilog.Es")] [assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Serilog.Es")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
9d1ed847a59d4aaa1c69df7da8b87e219b4aa9e3db77ec0e15f4efb6543c845c 2e003da1fc6fd37e4b509ed9ae0ede1ea4d3e369e544041cc0ec5829eaefeac0

@ -29,5 +29,10 @@ namespace Admin.Core.Service
{ {
return _testedCodeMESRepository.QueryTemperatureHistory(time); return _testedCodeMESRepository.QueryTemperatureHistory(time);
} }
public int UpateTemperatureHistoryFlag(List<TestedCode_MES> list)
{
return _testedCodeMESRepository.UpateTemperatureHistoryFlag(list);
}
} }
} }

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Service")] [assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Service")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f242c55c6773055ed882072b4cbd144f26a025f1")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b490218d75f73a2a8262a5684a1de0678e4eb101")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Service")] [assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Service")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Service")] [assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Service")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
f06bf3f95de6133293581e9c4d429b8fc9930722c7d92c532fcb3f4c84aab97d 23b81d138451fdc405c3dfb335c7bc2230c9afb39f46730fc8d13c3cf41154aa

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Tasks")] [assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Tasks")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f242c55c6773055ed882072b4cbd144f26a025f1")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b490218d75f73a2a8262a5684a1de0678e4eb101")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Tasks")] [assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Tasks")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Tasks")] [assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Tasks")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
f7fa8a41ec3905813b997136243c860aeed960ff6eeb235d5d9115eb72d57db0 196a05b2280e8f2075535eb1f5f0be07342cf9d2f66ca232de2798647cdca00f

@ -14,7 +14,7 @@
<ItemGroup> <ItemGroup>
<Content Include="appsettings.json"> <Content Include="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile> <ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content> </Content>

@ -1,10 +1,6 @@
using Admin.Core.Common; using Admin.Core.Common;
using Admin.Core.Extensions; using Admin.Core.Extensions;
using Admin.Core.Extensions.Middlewares; using Admin.Core.Extensions.Middlewares;
using Admin.Core.IService.ISys;
using Admin.Core.Tasks;
using Aucma.Core.RunPlc;
using Aucma.Core.Tasks;
using Aucma.Core.TemperatureTask; using Aucma.Core.TemperatureTask;
using Autofac; using Autofac;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;

@ -89,17 +89,33 @@
"DBType": 1, "DBType": 1,
"Enabled": true, "Enabled": true,
"HitRate": 40, "HitRate": 40,
"Connection": "Data Source=localhost;Initial Catalog=TOPLINE_T10_E_P2_32_AUCMA_HeNan_D_261;User ID=sa;Password=sa;", "Connection": "Data Source=10.10.92.149;Initial Catalog=TOPLINE_T10_E_P2_32_AUCMA_HeNan_D_261;User ID=mes;Password=Aucma@2024;",
"ProviderName": "System.Data.SqlClient" "ProviderName": "System.Data.SqlClient"
} }
//{ ],
// "ConnId": "Hsdb", "QuartzNetJob": [
// "DBType": 1, {
// "Enabled": true, "ID": 1,
// "HitRate": 10, "Name": "TestTask",
// "Connection": "Data Source=localhost;Initial Catalog=Hsdb;User ID=sa;Password=sa;", "JobGroup": "DEFAULT",
// "ProviderName": "System.Data.SqlClient" "Cron": "*/5 * * * * ?",
//} "AssemblyName": "Admin.Core.Tasks",
"ClassName": "Job_Admin_Quartz",
"Remark": "执行任务调度系统",
"RunTimes": 3881,
"BeginTime": "2023-04-23 11:08:50.000",
"EndTime": "2324-08-06 16:45:30.000",
"TriggerType": 1,
"IntervalSecond": 1,
"CycleRunTimes": 1,
"IsStart": true,
"JobParams": null,
"DelFlag": false,
"CreateBy": "admin",
"CreateTime": "2023-04-23 11:09:22.0000000",
"UpdateBy": "admin",
"UpdateTime": "2023-08-07 16:45:45.0530000"
}
], ],
"Startup": { "Startup": {
"Cors": { "Cors": {
@ -128,9 +144,106 @@
"Enabled": false //Nacos "Enabled": false //Nacos
} }
}, },
"Redis": {
//"ConnectionString": "127.0.0.1:6379"
"ConnectionString": "127.0.0.1:6379"
},
"RabbitMQ": {
"Enabled": true,
"Connection": "http://localhost:15672/",
"UserName": "robin",
"Password": "123456",
"RetryCount": 3
},
"EventBus": {
"Enabled": true,
"SubscriptionClientName": "Admin.Core"
},
"Middleware": { "Middleware": {
"AucamTask": { "QuartzNetJob": {
"Enabled": false
},
"ScannerGun": {
"Enabled": true
},
"Scanner": {
"Enabled": true "Enabled": true
},
"AucamTask": {
"Enabled": false
} }
},
"PLCServer": [
{
"Id": 1,
"EquipName": "MCPlc1",
"IP": "10.10.93.151",
"Port": 5002
},
{
"Id": 1,
"EquipName": "MCPlc2",
"IP": "10.10.93.152",
"Port": 5002
},
{
"Id": 1,
"EquipName": "MCPlc3",
"IP": "10.10.93.153",
"Port": 5002
},
{
"Id": 1,
"EquipName": "MCPlc4",
"IP": "10.10.93.154",
"Port": 5002
}
],
"IpRateLimiting": {
"EnableEndpointRateLimiting": false, //False: globally executed, true: executed for each
"StackBlockedRequests": false, //False: Number of rejections should be recorded on another counter
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"IpWhitelist": [], //
"EndpointWhitelist": [ "get:/api/xxx", "*:/api/yyy" ],
"ClientWhitelist": [ "dev-client-1", "dev-client-2" ],
"QuotaExceededResponse": {
"Content": "{{\"status\":429,\"msg\":\"访问过于频繁,请稍后重试\",\"success\":false}}",
"ContentType": "application/json",
"StatusCode": 429
},
"HttpStatusCode": 429, //
"GeneralRules": [ //api,*
{
"Endpoint": "*:/api/Admin*",
"Period": "1m",
"Limit": 20
},
{
"Endpoint": "*/api/*",
"Period": "1s",
"Limit": 3
},
{
"Endpoint": "*/api/*",
"Period": "1m",
"Limit": 30
},
{
"Endpoint": "*/api/*",
"Period": "12h",
"Limit": 500
}
]
},
"LogFiedOutPutConfigs": {
"tcpAddressHost": "", // elktcp
"tcpAddressPort": 0, // elktcp
"ConfigsInfo": [ // elk
{
"FiedName": "applicationName",
"FiedValue": "Admin.Core.Api"
}
]
} }
} }

@ -387,7 +387,6 @@ namespace Aucma.Core.PrintTo.ViewModels
} }
//打印完成 //打印完成
SetCompletetd(); SetCompletetd();
Thread.Sleep (1000);
} }
catch (Exception ex) catch (Exception ex)
{ {

@ -3,6 +3,7 @@ using Admin.Core.Model;
using log4net; using log4net;
using Serilog; using Serilog;
using StackExchange.Profiling.Internal; using StackExchange.Profiling.Internal;
using System.Timers;
/// <summary> /// <summary>
/// 测温数据采集 /// 测温数据采集
@ -17,7 +18,7 @@ namespace Aucma.Core.TemperatureTask
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(AucamTemperatureMeasurementService)); private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(AucamTemperatureMeasurementService));
private readonly ITestedCodeMESServices _codeMESServices; private readonly ITestedCodeMESServices _codeMESServices;
private readonly ITemperatureHistoryServices _temperatureHistoryServices; private readonly ITemperatureHistoryServices _temperatureHistoryServices;
System.Timers.Timer timer1 = new System.Timers.Timer(5000);
bool flag = true; bool flag = true;
public AucamTemperatureMeasurementService(ITemperatureHistoryServices temperatureHistoryServices, public AucamTemperatureMeasurementService(ITemperatureHistoryServices temperatureHistoryServices,
ITestedCodeMESServices codeMESServices) ITestedCodeMESServices codeMESServices)
@ -28,11 +29,10 @@ namespace Aucma.Core.TemperatureTask
public void Execute() public void Execute()
{ {
while (true) timer1.Elapsed += new System.Timers.ElapsedEventHandler(Run); //到达时间的时候执行事件;
{ timer1.AutoReset = true;//设置是执行一次false还是一直执行(true)
Run(); timer1.Enabled = true;//需要调用 timer.Start()或者timer.Enabled = true来启动它
Thread.Sleep(5000); timer1.Start();//timer.Start()的内部原理还是设置timer.Enabled = true;
}
} }
#region 采集任务处理 #region 采集任务处理
@ -40,87 +40,69 @@ namespace Aucma.Core.TemperatureTask
/// 采集任务处理 /// 采集任务处理
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public async void Run() private void Run(object? sender, ElapsedEventArgs e)
{ {
try try
{ {
Console.WriteLine($"【{DateTime.Now}】开始读取测温数据");
if (flag) if (flag)
{ {
try try
{ {
flag = false; flag = false;
DateTime dt;
Console.WriteLine($"【{DateTime.Now}】开始读取测温数据"); var historyList = _codeMESServices.QueryAsync(d=>d.IsSync==0).Result;
string sql = "select top 1 * from TemperatureHistory order by SyncDate desc"; Console.WriteLine(historyList.ToJson());
var allList= await _temperatureHistoryServices.QuerySqlAsync(sql,null);
if (allList == null || allList.Count == 0)
{
dt = DateTime.Now.AddMinutes(-5);
}
else
{
TemperatureHistory maxHistory = allList.First();
if (maxHistory.SyncDate.ToString()==null)
{
dt = Convert.ToDateTime(maxHistory.EndDateTime);
}
else
{
dt = Convert.ToDateTime(maxHistory.SyncDate);
}
}
var historyList = _codeMESServices.QueryTemperatureHistory(dt);
var query = (from a in historyList var query = (from a in historyList
select new TemperatureHistory select new TemperatureHistory
{ {
Line_No = a.Line_No, Line_No = a.Line_No,
Gongwno = a.Gongwno, GongwNo = a.GongwNo,
CpNo = a.CpNo, CpNo = a.CpNo,
CpModel = a.CpModel, CpModel = a.CpModel,
FactoryModel = a.FactoryModel, FactoryModel = a.factoryModel,
Voltage = a.Voltage, Voltage = a.Voltage,
Frequency = a.Frequency,
Point2 = a.Point2, Point2 = a.Point2,
TestTime = a.TestTime, TestTime = a.TestTime,
TestedTime = a.TestedTime, TestedTime = a.TestedTime,
Etemp = a.Etemp, Etemp = a.Etemp,
BeginDateTime = a.BeginDateTime, BeginDateTime =Convert.ToDateTime(a.BeginDateTime),
CpResult = a.CpResult, CpResult = a.CpResult,
EndDateTime = a.EndDateTime, EndDateTime = Convert.ToDateTime(a.EndDateTime),
UserName = a.UserName, UserName = a.UserName,
Remark = a.Remark, Remark = a.Remark,
TestNo = a.TestNo, TestNo = a.TestNo,
Temp_Mes = a.Temp_Mes, Temp_Mes = a.Temp_Mes,
Power_Mes = a.Power_Mes, Power_Mes = a.Power_Mes,
Part_Mes = a.Part_Mes, Part_Mes = a.Part_Mes,
ErrorCode_Mes = a.ErrorCode_Mes,
T1Name = a.T1Name,
T2Name = a.T2Name,
T3Name = a.T3Name,
T4Name = a.T4Name,
T5Name = a.T5Name,
T6Name = a.T6Name,
IsOrder = a.IsOrder,
LowV_Time = a.LowV_Time, LowV_Time = a.LowV_Time,
LowV_PowerMin = a.LowV_PowerMin, LowV_PowerMin = a.LowV_PowerMin,
LowV_PowerMax = a.LowV_PowerMax, LowV_PowerMax = a.LowV_PowerMax,
LowV_PowerFact = a.LowV_PowerFact, LowV_PowerFact = a.LowV_PowerFact,
LowVoltage = a.LowVoltage, LowVoltage = a.LowVoltage,
SyncDate = dt SyncDate =DateTime.Now
}).ToList(); }).ToList();
if (query == null|| query.Count==0) return; if (query == null || query.Count == 0) return;
logHelper.Error($"读取数据个数:{historyList.Count()}");
Console.WriteLine($"【{DateTime.Now}】读取数据个数:{historyList.Count()}"); Console.WriteLine($"【{DateTime.Now}】读取数据个数:{historyList.Count()}");
var result = await _temperatureHistoryServices.AddAsync(query); var result = _temperatureHistoryServices.AddAsync(query).Result;
if (result > 0) if (result > 0)
{ {
Console.WriteLine($"【{DateTime.Now}】保存测温数据成功!保存数量:{query.Count}"); historyList.ForEach(d => d.IsSync = 1);
int r = _codeMESServices.UpateTemperatureHistoryFlag(historyList);
if (r > 0)
{
Console.WriteLine($"【{DateTime.Now}】保存测温数据成功!保存数量:{query.Count}");
}
} }
Thread.Sleep(50000); Console.WriteLine($"【{DateTime.Now}】测温数据同步成功!数量:{query.Count}");
} }
catch (Exception ex) catch (Exception ex)
{ {

Loading…
Cancel
Save