diff --git a/Admin.Core.Api/Admin.Core.Model.xml b/Admin.Core.Api/Admin.Core.Model.xml
index acbe2cea..601500a6 100644
--- a/Admin.Core.Api/Admin.Core.Model.xml
+++ b/Admin.Core.Api/Admin.Core.Model.xml
@@ -4446,6 +4446,26 @@
工位
+
+
+ 公司
+
+
+
+
+ 产线编码
+
+
+
+
+ 工序
+
+
+
+
+ 工位
+
+
条码绑定扫描类型统计
diff --git a/Admin.Core.Model/ViewModels/ProductLineInfoView.cs b/Admin.Core.Model/ViewModels/ProductLineInfoView.cs
new file mode 100644
index 00000000..770a44af
--- /dev/null
+++ b/Admin.Core.Model/ViewModels/ProductLineInfoView.cs
@@ -0,0 +1,33 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Admin.Core.Model.ViewModels
+{
+ public class ProductLineInfoView
+ {
+ ///
+ /// 公司
+ ///
+ public string PlantCode { get; set; }
+
+ ///
+ /// 产线编码
+ ///
+ [SugarColumn(ColumnName = "PRODUCTLINE_CODE")]
+ public string ProductlineCode { get; set; }
+ ///
+ /// 工序
+ ///
+ [SugarColumn(ColumnName = "PROCESS_CODE")]
+ public string ProcessCode { get; set; }
+ ///
+ /// 工位
+ ///
+ [SugarColumn(ColumnName = "STATION_CODE")]
+ public string StationCode { get; set; }
+ }
+}
diff --git a/Admin.Core.Repository/Repository_New/SysUserInfoRepository.cs b/Admin.Core.Repository/Repository_New/SysUserInfoRepository.cs
index 54f1eafd..bf5a845c 100644
--- a/Admin.Core.Repository/Repository_New/SysUserInfoRepository.cs
+++ b/Admin.Core.Repository/Repository_New/SysUserInfoRepository.cs
@@ -37,7 +37,22 @@ namespace Admin.Core.Repository
string sql = "SELECT * FROM VIEW_CURRENT_TEAM_TIME";
return await Db.Ado.SqlQueryAsync(sql);
}
-
+
+ #endregion
+
+ #region 获取班组数据
+ ///
+ /// 获取班组数据
+ ///
+ ///
+ ///
+ public async Task> GetProductLineInfo(string productLineCode)
+ {
+ string sql =@$"SELECT BP.PLANT_CODE PLANT_CODE, BP.PARENT_ID PRODUCT_LINE_CODE, BPS.PROCESS_CODE, BP.PRODUCT_LINE_CODE STATION_CODE FROM BASE_PRODUCTLINE BP
+ LEFT JOIN BASE_PROCESS_STATION BPS ON BPS.PARENT_ID LIKE '%' || BP.PRODUCT_LINE_CODE || '%' WHERE BP.PRODUCT_LINE_CODE = '{productLineCode}'";
+ return await Db.Ado.SqlQueryAsync(sql);
+ }
+
#endregion
}
}
\ No newline at end of file
diff --git a/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs b/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs
index 1d198594..851e7ffa 100644
--- a/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs
+++ b/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs
@@ -19,12 +19,7 @@ using System.Windows.Shapes;
using System.Timers;
using Aucma.Core.BoxFoam.Models;
using Admin.Core.Model;
-using Admin.Core.Model.Model_New;
-using Admin.Core.Model.ViewModels;
using System.Threading;
-using Aucma.Core.HwPLc;
-using Castle.Core.Internal;
-using Admin.Core.Repository;
namespace Aucma.Core.BoxFoam.ViewModels
{
@@ -274,8 +269,8 @@ namespace Aucma.Core.BoxFoam.ViewModels
#endregion
#region 夹具节拍
- private ObservableCollection _beat = new ObservableCollection();
- public ObservableCollection Beat
+ private ObservableCollection _beat = new ObservableCollection();
+ public ObservableCollection Beat
{
get => _beat;
set => SetProperty(ref _beat, value);
@@ -308,7 +303,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
if (!string.IsNullOrEmpty(item.Yield.ToString())) Production.Add(item.Yield.ToString());
if (!string.IsNullOrEmpty(item.InternalTemperature.ToString())) InternalTemperature.Add(item.InternalTemperature.ToString());
if (!string.IsNullOrEmpty(item.OutsideTemperature.ToString())) OutsideTemperature.Add(item.OutsideTemperature.ToString());
- if (!string.IsNullOrEmpty(item.ProductionCycle.ToString())) Beat.Add(item.ProductionCycle);
+ if (!string.IsNullOrEmpty(item.ProductionCycle.ToString())) Beat.Add(item.ProductionCycle.ToString());
totalAmount = totalAmount + item.Yield;
}
@@ -334,16 +329,16 @@ namespace Aucma.Core.BoxFoam.ViewModels
{
string productLineCode = Appsettings.app("StationInfo", "ProductLineCode");
- DateTime now = DateTime.Now;
- CurrentTeamTime time = await _currentTeamTimeServices.FirstAsync(d => d.StartTime <= now && d.EndTime >= now);
- if (time != null)
- {
+ //DateTime now = DateTime.Now;
+ //CurrentTeamTime time = await _currentTeamTimeServices.FirstAsync(d => d.StartTime <= now && d.EndTime >= now);
+ //if (time != null)
+ //{
ExecHourDataAsync(productLineCode);
- }
- else
- {
- ShiftChangeAsync(productLineCode);
- }
+ //}
+ //else
+ //{
+ // //ShiftChangeAsync(productLineCode);
+ //}
}
catch (Exception ex)
@@ -386,6 +381,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
plan.CompleteAmount = plan.CompleteAmount + complateAmount;
if (complateAmount>0)
{
+ //保存历史记录
BoxFoamDataRealTimeHistory history = new BoxFoamDataRealTimeHistory();
history.PlantCode = bfd.PlantCode;
@@ -398,7 +394,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
history.ModeInternaltemperature = bLis[j].InternalTemperature;
history.ModeOutsidetemperature = bLis[j].InternalTemperature;
history.UpdatedTime = DateTime.Now;
-
+ //事务合并
await _boxFoamDataRealTimeHistoryServices.AddAsync(history);
await _boxFoamPlanServices.UpdateAsync(plan);
}