diff --git a/SlnMesnac.Model/domain/ProdPlanErpInfo.cs b/SlnMesnac.Model/domain/ProdPlanErpInfo.cs
index e171ad7..94cf2db 100644
--- a/SlnMesnac.Model/domain/ProdPlanErpInfo.cs
+++ b/SlnMesnac.Model/domain/ProdPlanErpInfo.cs
@@ -12,5 +12,7 @@ namespace SlnMesnac.Model.domain
public string SeqNo { get; set; } // seqNo
[SugarColumn(ColumnName = "workingHours")]
public string WorkingHours { get; set; } // workingHours
+ [SugarColumn(ColumnName = "classes")]
+ public string classes { get; set; } // classes
}
}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/ProdPlanInfoServiceImpl.cs b/SlnMesnac.Repository/service/Impl/ProdPlanInfoServiceImpl.cs
index 939b887..141a762 100644
--- a/SlnMesnac.Repository/service/Impl/ProdPlanInfoServiceImpl.cs
+++ b/SlnMesnac.Repository/service/Impl/ProdPlanInfoServiceImpl.cs
@@ -25,8 +25,11 @@ namespace SlnMesnac.Repository.service.Impl
///
///
///
+ ///
+ ///
+ ///
///
- public List GetRecordStaffAttendancesByConditions(string? orderCode, string? planCode, string? materialCode, string? stationCode, string? planStatus)
+ public List GetRecordStaffAttendancesByConditions(string? orderCode, string? planCode, string? materialCode, string? stationCode, string? planStatus, string? classes)
{
var query = _rep.Context.Queryable()
.LeftJoin((ppi, ppei) => ppi.PlanCode == ppei.SeqNo)
@@ -35,6 +38,7 @@ namespace SlnMesnac.Repository.service.Impl
.WhereIF(!string.IsNullOrEmpty(materialCode), (ppi, ppei) => ppi.MaterialCode == materialCode)
.WhereIF(!string.IsNullOrEmpty(stationCode), (ppi, ppei) => ppi.StationCode == stationCode)
.WhereIF(!string.IsNullOrEmpty(planStatus), (ppi, ppei) => ppi.PlanStatus == planStatus || ppi.PlanStatus == "4")
+ .WhereIF(!string.IsNullOrEmpty(classes), (ppi, ppei) => ppei.classes == classes)
.Select((ppi, ppei) => new ProdPLanInfo
{
ObjId = ppi.ObjId,
diff --git a/SlnMesnac.Repository/service/ProdPlanInfoService.cs b/SlnMesnac.Repository/service/ProdPlanInfoService.cs
index fe7030f..a068393 100644
--- a/SlnMesnac.Repository/service/ProdPlanInfoService.cs
+++ b/SlnMesnac.Repository/service/ProdPlanInfoService.cs
@@ -18,7 +18,7 @@ namespace SlnMesnac.Repository.service
/// 根据订单编号、工单编号、物料名称获取工单信息
///
///
- List GetRecordStaffAttendancesByConditions(string orderCode,string planCode,string materialCode, string stationCode, string planStatus);
+ List GetRecordStaffAttendancesByConditions(string orderCode,string planCode,string materialCode, string stationCode, string planStatus, string classes);
///
/// 根据订单编号、工单编号、物料名称获取工单信息
diff --git a/SlnMesnac.WPF/UserControls/ExecutePage.xaml b/SlnMesnac.WPF/UserControls/ExecutePage.xaml
index 09572f2..0264770 100644
--- a/SlnMesnac.WPF/UserControls/ExecutePage.xaml
+++ b/SlnMesnac.WPF/UserControls/ExecutePage.xaml
@@ -130,6 +130,12 @@
+
+
+
+
+
+
diff --git a/SlnMesnac.WPF/ViewModel/ExecuteViewModel.cs b/SlnMesnac.WPF/ViewModel/ExecuteViewModel.cs
index 6c2331a..5d4ce7d 100644
--- a/SlnMesnac.WPF/ViewModel/ExecuteViewModel.cs
+++ b/SlnMesnac.WPF/ViewModel/ExecuteViewModel.cs
@@ -146,12 +146,12 @@ namespace SlnMesnac.WPF.ViewModel
set { materialCodeTextBox = value; OnPropertyChanged("MaterialCodeTextBox"); }
}
- //private string materialNameTextBox;
- //public string MaterialNameTextBox
- //{
- // get { return materialNameTextBox; }
- // set { materialNameTextBox = value; OnPropertyChanged("MaterialNameTextBox"); }
- //}
+ private string materialNameTextBox;
+ public string MaterialNameTextBox
+ {
+ get { return materialNameTextBox; }
+ set { materialNameTextBox = value; OnPropertyChanged("MaterialNameTextBox"); }
+ }
///
/// 工位
@@ -163,6 +163,26 @@ namespace SlnMesnac.WPF.ViewModel
set { stationTextBlock = value; OnPropertyChanged("StationTextBox"); }
}
+ ///
+ /// 班次列表
+ ///
+ private List shiftList;
+ public List ShiftList
+ {
+ get { return shiftList; }
+ set { shiftList = value; OnPropertyChanged("ShiftList"); }
+ }
+
+ ///
+ /// 选中的班次
+ ///
+ private string selectedShift;
+ public string SelectedShift
+ {
+ get { return selectedShift; }
+ set { selectedShift = value; OnPropertyChanged("SelectedShift"); }
+ }
+
///
/// PlanDataGrid
///
@@ -320,6 +340,11 @@ namespace SlnMesnac.WPF.ViewModel
;
DeviceCode = configuration.GetSection("AppConfig")["DeviceCode"];
ProcessCode = configuration.GetSection("AppConfig")["ProcessCode"];
+
+ // 初始化班次列表
+ ShiftList = new List { "白班", "小夜", "大夜" };
+ SelectedShift = "白班"; // 默认选择白班
+
HandoverCommand = new RelayCommand(Handover);
ProductionReportCommand = new RelayCommand(ProductionReport);
TechnologicalInformationCommand = new RelayCommand(TechnologicalInformation);
@@ -468,7 +493,7 @@ namespace SlnMesnac.WPF.ViewModel
//在这里执行其他操作,可以通过InputText获取用户输入的信息
//Console.WriteLine("用户输入的信息:" + OrderCodeTextBox + PlanCodeTextBox + MaterialCodeTextBox);
//ProductLineNameTextBlock = ConfigurationManager.AppSettings["ProductLineNameTextBlock"];
- List list = _prodPlanInfoService.GetRecordStaffAttendancesByConditions(OrderCodeTextBox, PlanCodeTextBox, MaterialCodeTextBox, RfidHandleBusniess.stationCode, "0");
+ List list = _prodPlanInfoService.GetRecordStaffAttendancesByConditions(OrderCodeTextBox, PlanCodeTextBox, MaterialCodeTextBox, RfidHandleBusniess.stationCode, "0", SelectedShift);
System.Windows.Application.Current.Dispatcher.Invoke((Action)(async () =>
{
ProdPLanInfoDataGrid.Clear();
@@ -556,7 +581,7 @@ namespace SlnMesnac.WPF.ViewModel
// 将当前记录存为实体,可以通过parameter获取当前记录的信息
string orderCode = _selectedRow.OrderCode.ToString();
string planCode = _selectedRow.PlanCode.ToString();
- pLanInfo = _prodPlanInfoService.GetRecordStaffAttendancesByConditions(orderCode, planCode, "", "", "0").First();
+ pLanInfo = _prodPlanInfoService.GetRecordStaffAttendancesByConditions(orderCode, planCode, "", "", "0", SelectedShift).First();
//RecordStaffAttendance currentRecord = _recordStaffAttendanceService.GetLastestOnRecord();
//BaseStaffInfo staffInfo = _baseStaffService.GetMonitorByTeamCode(currentRecord.TeamCode);
RecordStaffAttendance nextRecord = _recordStaffAttendanceService.GetLastestOffRecord();
diff --git a/SlnMesnac.WPF/ViewModel/HandOverViewModel.cs b/SlnMesnac.WPF/ViewModel/HandOverViewModel.cs
index 6547332..a73c0b2 100644
--- a/SlnMesnac.WPF/ViewModel/HandOverViewModel.cs
+++ b/SlnMesnac.WPF/ViewModel/HandOverViewModel.cs
@@ -40,7 +40,7 @@ namespace SlnMesnac.WPF.ViewModel
_prodPlanDetailService = App.ServiceProvider.GetService();
_prodPlanInfoService = App.ServiceProvider.GetService();
_recordStaffAttendanceService = App.ServiceProvider.GetService();
- planInfo = _prodPlanInfoService.GetRecordStaffAttendancesByConditions("", "", "", "", "1").FirstOrDefault();
+ planInfo = _prodPlanInfoService.GetRecordStaffAttendancesByConditions("", "", "", "", "1", null).FirstOrDefault();
HandoverCommand = new RelayCommand(Handover);
Init();
_baseStaffService = App.ServiceProvider.GetService();