|
|
|
@ -99,6 +99,9 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
|
|
|
|
|
public static Action ClearOrderCodeAction;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static Action<string> RefreshAction;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 按钮文字转换事件
|
|
|
|
|
/// </summary>
|
|
|
|
@ -317,9 +320,9 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
.SetBasePath(System.AppContext.BaseDirectory)
|
|
|
|
|
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
|
|
|
|
IConfigurationRoot configuration = configurationBuilder.Build();
|
|
|
|
|
pLanInfo = _prodPlanInfoService.GetPlanInfoByConditions("", "", "", "", "1").FirstOrDefault();
|
|
|
|
|
Refresh(pLanInfo);
|
|
|
|
|
havePlanOnDuty();
|
|
|
|
|
//pLanInfo = _prodPlanInfoService.GetPlanInfoByConditions("", "", "", "", "1").FirstOrDefault();
|
|
|
|
|
//Refresh(pLanInfo);
|
|
|
|
|
//havePlanOnDuty(ProcessCode);
|
|
|
|
|
// 从配置文件中获取ProductLineNameTextBlock的值
|
|
|
|
|
//stationTextBlock = configuration.GetSection("AppConfig")["ProductLineName"];
|
|
|
|
|
//StationCodes = configuration.GetSection("AppConfig")["StationCode"];
|
|
|
|
@ -338,6 +341,7 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
Clear();
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
RefreshAction += RefreshDetail;
|
|
|
|
|
DeviceCode = configuration.GetSection("AppConfig")["DeviceCode"];
|
|
|
|
|
ProcessCode = configuration.GetSection("AppConfig")["ProcessCode"];
|
|
|
|
|
|
|
|
|
@ -357,6 +361,19 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
MainWindowViewModel.TransferOrderCodeEvent += HandleOrderCode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 根据工位刷新明细
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void RefreshDetail(string stationCode)
|
|
|
|
|
{
|
|
|
|
|
if (stationCode == null) { return; }
|
|
|
|
|
pLanInfo = _prodPlanInfoService.GetPlanInfoByConditions("", "", "", stationCode, "1").FirstOrDefault();
|
|
|
|
|
if (pLanInfo == null) { return; }
|
|
|
|
|
Refresh(pLanInfo);
|
|
|
|
|
havePlanOnDuty(stationCode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 撤回
|
|
|
|
|
/// </summary>
|
|
|
|
@ -391,9 +408,9 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 是否有计划正在执行
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void havePlanOnDuty()
|
|
|
|
|
private void havePlanOnDuty(string stationCode)
|
|
|
|
|
{
|
|
|
|
|
haveInfo = _prodPlanInfoService.GetPlanInfoByConditions("", "", "", "", "1").FirstOrDefault();
|
|
|
|
|
haveInfo = _prodPlanInfoService.GetPlanInfoByConditions("", "", "", stationCode, "1").FirstOrDefault();
|
|
|
|
|
if (haveInfo != null)
|
|
|
|
|
{
|
|
|
|
|
isComplete = false;
|
|
|
|
@ -487,7 +504,14 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void Search()
|
|
|
|
|
{
|
|
|
|
|
var staffList = _recordStaffRealTimeService.Query().ToList();
|
|
|
|
|
if(RfidHandleBusniess.stationCode == "")
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("请先选择工位!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var staffList = _recordStaffRealTimeService.Query()
|
|
|
|
|
.Where(x => x.StationCode == RfidHandleBusniess.stationCode)
|
|
|
|
|
.ToList();
|
|
|
|
|
if (staffList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
//在这里执行其他操作,可以通过InputText获取用户输入的信息
|
|
|
|
@ -626,7 +650,11 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("请先完成当前工单!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("请点击上班打卡!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//刷新明细
|
|
|
|
|