优化报工

master
zhaoaomin 2 years ago
parent b82d78f7a0
commit 3a067640b4

Binary file not shown.

@ -491,7 +491,7 @@ namespace XGL.Views
} }
else 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(); FormingMachineService formingMachineService = new FormingMachineService();
FinishProdDBService userDbWareHouse = new FinishProdDBService(); FinishProdDBService userDbWareHouse = new FinishProdDBService();
public static LanJu_Operator lanJu_Operator; 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"); string deviceCode = Utils.GetAppSetting("DeviceCode");
Timer timerDeciveState = new Timer(); Timer timerDeciveState = new Timer();
string _workOrderCode = ""; string _workOrderCode = "";
@ -48,7 +48,7 @@ namespace XGLFinishPro.Views
List<string> sfcList = null; 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); LanJu_InOut lanJu_InOut = new LanJu_InOut(_workOrderCode, deviceCode);
// 在主界面中的某个位置订阅事件 // 在主界面中的某个位置订阅事件
@ -85,7 +85,7 @@ namespace XGLFinishPro.Views
private void Paused_Click(object sender, RoutedEventArgs e) private void Paused_Click(object sender, RoutedEventArgs e)
{ {
LanJu_Paused lanJu_Paused = new LanJu_Paused(); LanJu_Paused lanJu_Paused = new LanJu_Paused();
Window1.Content= new Frame Window1.Content = new Frame
{ {
Content = lanJu_Paused Content = lanJu_Paused
}; };
@ -177,7 +177,7 @@ namespace XGLFinishPro.Views
//modelWareHouse = new List<WorkOrder>(); //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 (dt == null) return;
if (orderList != null) if (orderList != null)
@ -275,7 +275,7 @@ namespace XGLFinishPro.Views
//modelWareHouse = new List<WorkOrder>(); //modelWareHouse = new List<WorkOrder>();
DataTable dt = userDbWareHouse.GetWetPlanInfo(deviceCode,currShiftDate.ToString()); DataTable dt = userDbWareHouse.GetWetPlanInfo(deviceCode, currShiftDate.ToString());
if (dt == null) return; if (dt == null) return;
this.dgWorkOrderInfo.ItemsSource = null; this.dgWorkOrderInfo.ItemsSource = null;
@ -424,21 +424,14 @@ namespace XGLFinishPro.Views
DataTable dtNewReportCode = formingMachineService.GetReportCode(); DataTable dtNewReportCode = formingMachineService.GetReportCode();
if (dtNewReportCode == null || dtNewReportCode.Rows.Count == 0) if (dtNewReportCode == null || dtNewReportCode.Rows.Count == 0)
{ {
newReportCode = DateTime.Now.ToString("yyyyMMdd") + "0001"; newReportCode = (Convert.ToInt64(dtNewReportCode.Rows[0]["report_code"].ToString()) + 1).ToString();
}
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();
}
} }
ExecReportWorkWin execReport = new ExecReportWorkWin(selectedRow["workorder_code"].ToString(), selectedRow["quantity_split"].ToString()); ExecReportWorkWin execReport = new ExecReportWorkWin(selectedRow["workorder_code"].ToString(), selectedRow["quantity_split"].ToString());
if (execReport.ShowDialog() == true) if (execReport.ShowDialog() == true)
{ {
string workTime = execReport._workTime; string workTime = execReport._workTime;

Loading…
Cancel
Save