优化报工

master
zhaoaomin 2 years ago
parent b82d78f7a0
commit 3a067640b4

Binary file not shown.

@ -491,7 +491,7 @@ namespace XGL.Views
}
else
{
newRfid = "B" + (Convert.ToInt32(dtNewRFID.Rows[0]["rfid"].ToString().TrimStart('B')) + 1).ToString();
newRfid = "B" + (Convert.ToInt64(dtNewRFID.Rows[0]["rfid"].ToString().TrimStart('B')) + 1).ToString();
}
}

@ -23,7 +23,7 @@ namespace XGLFinishPro.Views
FormingMachineService formingMachineService = new FormingMachineService();
FinishProdDBService userDbWareHouse = new FinishProdDBService();
public static LanJu_Operator lanJu_Operator;
Frame frame = new Frame() { Content = new Views.LanJu_InOut()};
Frame frame = new Frame() { Content = new Views.LanJu_InOut() };
string deviceCode = Utils.GetAppSetting("DeviceCode");
Timer timerDeciveState = new Timer();
string _workOrderCode = "";
@ -36,10 +36,10 @@ namespace XGLFinishPro.Views
{
InitializeComponent();
WindowChange(WindowID.frame);
}
public void WindowChange(WindowID windowID)
{
@ -48,7 +48,7 @@ namespace XGLFinishPro.Views
List<string> sfcList = null;
private void InOut_Click(object sender, RoutedEventArgs e)
private void InOut_Click(object sender, RoutedEventArgs e)
{
LanJu_InOut lanJu_InOut = new LanJu_InOut(_workOrderCode, deviceCode);
// 在主界面中的某个位置订阅事件
@ -85,19 +85,19 @@ namespace XGLFinishPro.Views
private void Paused_Click(object sender, RoutedEventArgs e)
{
LanJu_Paused lanJu_Paused = new LanJu_Paused();
Window1.Content= new Frame
Window1.Content = new Frame
{
Content = lanJu_Paused
};
}
private void UCOperator_Loaded(object sender, RoutedEventArgs e)
{
timerDeciveState.Interval = Utils.GetAppSetting("GetDeviceStateInterval") == "" ? 15000 : Convert.ToInt32(Utils.GetAppSetting("GetDeviceStateInterval"));
timerDeciveState.Elapsed += TimerDeciveState_Elapsed;
timerDeciveState.Start();
GetWorkOrderInfo();
GetWorkOrderInfo();
}
string isbaiye;
string plantime;
@ -176,10 +176,10 @@ namespace XGLFinishPro.Views
//modelWareHouse = new List<WorkOrder>();
DataTable dt = userDbWareHouse.GetWetPlanInfo(deviceCode,currShiftDate.ToString());//formingMachineService.GetFormingMachineInfo(deviceCode, currShiftDate.ToString());
DataTable dt = userDbWareHouse.GetWetPlanInfo(deviceCode, currShiftDate.ToString());//formingMachineService.GetFormingMachineInfo(deviceCode, currShiftDate.ToString());
if (dt == null) return;
if (orderList != null)
{
//使用Dispatcher来在UI线程上更新UI
@ -192,7 +192,7 @@ namespace XGLFinishPro.Views
}
),
System.Windows.Threading.DispatcherPriority.Render);
}
}
}
catch (Exception ex)
{
@ -274,10 +274,10 @@ namespace XGLFinishPro.Views
//modelWareHouse = new List<WorkOrder>();
DataTable dt = userDbWareHouse.GetWetPlanInfo(deviceCode,currShiftDate.ToString());
DataTable dt = userDbWareHouse.GetWetPlanInfo(deviceCode, currShiftDate.ToString());
if (dt == null) return;
this.dgWorkOrderInfo.ItemsSource = null;
this.dgWorkOrderInfo.ItemsSource = dt.DefaultView;
}
@ -285,8 +285,8 @@ namespace XGLFinishPro.Views
{
LogHelper.instance.log.Error("操作界面:获取成品工单准备信息时发生异常:" + ex.Message);
}
}
}
private void dgWorkOrderInfo_LoadingRow(object sender, DataGridRowEventArgs e)
{
@ -314,7 +314,7 @@ namespace XGLFinishPro.Views
PauseOrderWin pauseOrderWin = new PauseOrderWin();
if (pauseOrderWin.ShowDialog() == true)
{
formingMachineService.UpdateWorkOrder(workordercode, "w4", pauseOrderWin.remark, pauseOrderWin.type, deviceCode);
GetWorkOrderInfo();
@ -322,7 +322,7 @@ namespace XGLFinishPro.Views
//MessageBoxResult result = MessageBox.Show("你确定要暂停该工单吗?", "温馨提示", MessageBoxButton.YesNo, MessageBoxImage.Information);
//if (result == MessageBoxResult.No)
// return;
}
private void btnRecover_Click(object sender, RoutedEventArgs e)
@ -346,7 +346,7 @@ namespace XGLFinishPro.Views
// return;
PauseOrderWin pauseOrderWin = new PauseOrderWin();
if (pauseOrderWin.ShowDialog() == true)
{
{
formingMachineService.UpdateWorkOrder(workordercode, "w2", pauseOrderWin.remark, pauseOrderWin.type, deviceCode);
GetWorkOrderInfo();
}
@ -424,21 +424,14 @@ namespace XGLFinishPro.Views
DataTable dtNewReportCode = formingMachineService.GetReportCode();
if (dtNewReportCode == null || dtNewReportCode.Rows.Count == 0)
{
newReportCode = DateTime.Now.ToString("yyyyMMdd") + "0001";
}
else
{
if (string.IsNullOrEmpty(dtNewReportCode.Rows[0]["report_code"].ToString()))
{
newReportCode = DateTime.Now.ToString("yyyyMMdd") + "0001";
}
else
{
newReportCode = (Convert.ToInt64(dtNewReportCode.Rows[0]["report_code"].ToString()) + 1).ToString();
}
newReportCode = (Convert.ToInt64(dtNewReportCode.Rows[0]["report_code"].ToString()) + 1).ToString();
}
ExecReportWorkWin execReport = new ExecReportWorkWin(selectedRow["workorder_code"].ToString(), selectedRow["quantity_split"].ToString());
if (execReport.ShowDialog() == true)
{
string workTime = execReport._workTime;
@ -479,8 +472,8 @@ namespace XGLFinishPro.Views
{
}
}
private void btnCheckLog_Click(object sender, RoutedEventArgs e)

Loading…
Cancel
Save