|
|
@ -37,11 +37,13 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
private IRecordStaffAttendanceService _recordStaffAttendanceService;
|
|
|
|
private IRecordStaffAttendanceService _recordStaffAttendanceService;
|
|
|
|
private string StationCode;
|
|
|
|
private string StationCode;
|
|
|
|
public static bool isComplete = true;
|
|
|
|
public static bool isComplete = true;
|
|
|
|
|
|
|
|
private ProdPLanInfo pLanInfo;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 按钮文字转换事件
|
|
|
|
/// 按钮文字转换事件
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged = delegate { };
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 检索命令
|
|
|
|
/// 检索命令
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -76,6 +78,8 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
.SetBasePath(System.AppContext.BaseDirectory)
|
|
|
|
.SetBasePath(System.AppContext.BaseDirectory)
|
|
|
|
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
|
|
|
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
|
|
|
IConfigurationRoot configuration = configurationBuilder.Build();
|
|
|
|
IConfigurationRoot configuration = configurationBuilder.Build();
|
|
|
|
|
|
|
|
pLanInfo = _prodPlanInfoService.GetRecordStaffAttendancesByConditions("", "", "", "", "1").FirstOrDefault();
|
|
|
|
|
|
|
|
Refresh(pLanInfo);
|
|
|
|
// 从配置文件中获取ProductLineNameTextBlock的值
|
|
|
|
// 从配置文件中获取ProductLineNameTextBlock的值
|
|
|
|
stationTextBlock = configuration.GetSection("AppConfig")["ProductLineName"];
|
|
|
|
stationTextBlock = configuration.GetSection("AppConfig")["ProductLineName"];
|
|
|
|
StationCode = configuration.GetSection("AppConfig")["ProductLineCode"];
|
|
|
|
StationCode = configuration.GetSection("AppConfig")["ProductLineCode"];
|
|
|
@ -97,7 +101,7 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 换班弹窗
|
|
|
|
/// 报工弹窗
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
private void ProductionReport()
|
|
|
|
private void ProductionReport()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -133,7 +137,7 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
// 将当前记录存为实体,可以通过parameter获取当前记录的信息
|
|
|
|
// 将当前记录存为实体,可以通过parameter获取当前记录的信息
|
|
|
|
string orderCode = _selectedRow.OrderCode.ToString();
|
|
|
|
string orderCode = _selectedRow.OrderCode.ToString();
|
|
|
|
string planCode = _selectedRow.PlanCode.ToString();
|
|
|
|
string planCode = _selectedRow.PlanCode.ToString();
|
|
|
|
ProdPLanInfo pLanInfo = _prodPlanInfoService.GetRecordStaffAttendancesByConditions(orderCode, planCode, "", "", "0").First();
|
|
|
|
pLanInfo = _prodPlanInfoService.GetRecordStaffAttendancesByConditions(orderCode, planCode, "", "", "0").First();
|
|
|
|
RecordStaffAttendance currentRecord = _recordStaffAttendanceService.GetLastestOnRecord();
|
|
|
|
RecordStaffAttendance currentRecord = _recordStaffAttendanceService.GetLastestOnRecord();
|
|
|
|
RecordStaffAttendance nextRecord = _recordStaffAttendanceService.GetLastestOffRecord();
|
|
|
|
RecordStaffAttendance nextRecord = _recordStaffAttendanceService.GetLastestOffRecord();
|
|
|
|
// 向detail表里插入一条数据
|
|
|
|
// 向detail表里插入一条数据
|
|
|
@ -162,7 +166,9 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
//刷新明细
|
|
|
|
//刷新明细
|
|
|
|
private void Refresh(ProdPLanInfo pLanInfo)
|
|
|
|
private void Refresh(ProdPLanInfo pLanInfo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ProdPlanDetail planDetail = _prodPlanDetailService.GetPlanDetailsByPlanCode(pLanInfo.PlanCode);
|
|
|
|
if(pLanInfo != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ProdPlanDetail planDetail = _prodPlanDetailService.GetPlanDetailsByPlanCode(pLanInfo.PlanCode);
|
|
|
|
PlanCodeText = planDetail.PlanCode;
|
|
|
|
PlanCodeText = planDetail.PlanCode;
|
|
|
|
OrderCodeText = pLanInfo.OrderCode;
|
|
|
|
OrderCodeText = pLanInfo.OrderCode;
|
|
|
|
MaterialCodeText = planDetail.MaterialCode;
|
|
|
|
MaterialCodeText = planDetail.MaterialCode;
|
|
|
@ -172,6 +178,7 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
ProdPLanDetailDataGrid.Clear();
|
|
|
|
ProdPLanDetailDataGrid.Clear();
|
|
|
|
ProdPLanDetailDataGrid.Add(planDetail);
|
|
|
|
ProdPLanDetailDataGrid.Add(planDetail);
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region
|
|
|
|
#region
|
|
|
|