diff --git a/shangjian/.vs/BL/v17/.suo b/shangjian/.vs/BL/v17/.suo index c1eb913..f38dab6 100644 Binary files a/shangjian/.vs/BL/v17/.suo and b/shangjian/.vs/BL/v17/.suo differ diff --git a/shangjian/CentralControl/bin/Debug/CentralControl.exe b/shangjian/CentralControl/bin/Debug/CentralControl.exe index 1756a95..48c507d 100644 Binary files a/shangjian/CentralControl/bin/Debug/CentralControl.exe and b/shangjian/CentralControl/bin/Debug/CentralControl.exe differ diff --git a/shangjian/CentralControl/bin/Debug/CentralControl.pdb b/shangjian/CentralControl/bin/Debug/CentralControl.pdb index 0bd211a..40af050 100644 Binary files a/shangjian/CentralControl/bin/Debug/CentralControl.pdb and b/shangjian/CentralControl/bin/Debug/CentralControl.pdb differ diff --git a/shangjian/CentralControl/bin/Debug/XGL.Data.dll b/shangjian/CentralControl/bin/Debug/XGL.Data.dll index f3952c4..d45929b 100644 Binary files a/shangjian/CentralControl/bin/Debug/XGL.Data.dll and b/shangjian/CentralControl/bin/Debug/XGL.Data.dll differ diff --git a/shangjian/CentralControl/bin/Debug/XGL.Data.pdb b/shangjian/CentralControl/bin/Debug/XGL.Data.pdb index 927ac6e..da2ea05 100644 Binary files a/shangjian/CentralControl/bin/Debug/XGL.Data.pdb and b/shangjian/CentralControl/bin/Debug/XGL.Data.pdb differ diff --git a/shangjian/CentralControl/obj/Debug/CentralControl.csproj.AssemblyReference.cache b/shangjian/CentralControl/obj/Debug/CentralControl.csproj.AssemblyReference.cache index 7b924e5..cf64437 100644 Binary files a/shangjian/CentralControl/obj/Debug/CentralControl.csproj.AssemblyReference.cache and b/shangjian/CentralControl/obj/Debug/CentralControl.csproj.AssemblyReference.cache differ diff --git a/shangjian/CentralControl/obj/Debug/CentralControl.exe b/shangjian/CentralControl/obj/Debug/CentralControl.exe index 1756a95..48c507d 100644 Binary files a/shangjian/CentralControl/obj/Debug/CentralControl.exe and b/shangjian/CentralControl/obj/Debug/CentralControl.exe differ diff --git a/shangjian/CentralControl/obj/Debug/CentralControl.pdb b/shangjian/CentralControl/obj/Debug/CentralControl.pdb index 0bd211a..40af050 100644 Binary files a/shangjian/CentralControl/obj/Debug/CentralControl.pdb and b/shangjian/CentralControl/obj/Debug/CentralControl.pdb differ diff --git a/shangjian/XGL.Data/DBService/DBService.cs b/shangjian/XGL.Data/DBService/DBService.cs index 506b40a..242b176 100644 --- a/shangjian/XGL.Data/DBService/DBService.cs +++ b/shangjian/XGL.Data/DBService/DBService.cs @@ -657,9 +657,11 @@ select a.TrayCode,a.ProductBarNo,a.carcode,a.createtime,a.lineno,b.HadNumber //workorder.status = 'w1' and string sql = $@"select wetDetail.id,wetDetail.factory_code,wetDetail.material_code as prod_code, wetDetail.sync_flag,wetDetail.plan_time, wetDetail.workorder_id,bucket_id,bucket_code,material_code,material_name, -wetDetail.material_name as product_name,wetDetail.shift_desc,prod_line_code,workorder.status,workorder.workorder_code,route_code +wetDetail.material_name as product_name,shifts.shift_desc,prod_line_code,workorder.status,workorder.workorder_code,route_code from pro_wet_material_plan_detail wetDetail -left join pro_order_workorder workorder on workorder.workorder_id = wetDetail.workorder_id where 1=1 and +left join pro_order_workorder workorder on workorder.workorder_id = wetDetail.workorder_id +left JOIN base_shifts_t shifts on wetDetail.shift_id = shifts.shift_id +where 1=1 and workorder.end_flag = '1' and CONVERT(VARCHAR(10), wetDetail.plan_time , 120)= CONVERT(VARCHAR(10), GetDate() , 120)"; DataSet dtset = Utils.netClientDBHelper.getDataSet(sql); if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0) diff --git a/shangjian/XGL.Data/DBService/DringRoomService.cs b/shangjian/XGL.Data/DBService/DringRoomService.cs index aa714f5..dfdb4c0 100644 --- a/shangjian/XGL.Data/DBService/DringRoomService.cs +++ b/shangjian/XGL.Data/DBService/DringRoomService.cs @@ -37,11 +37,13 @@ namespace XGL.Data.DBService /// /// /// - public DataTable GetDringRoomData(string devicecode) + public DataTable GetDringRoomData(string devicecode,int inout) { + + string sql = $@"SELECT rfid_no,device_code,type,create_time,update_time,factory_no,workorder_code,material_code FROM [dbo].[mes_dryinghouse_info] where device_code = '{devicecode}' and type = '{inout}' and del_flag='0' ;"; //获取绑定中,且RFID没有出烘房(在烘房内)的数据 - string sql = $@"SELECT rfid,workorder_code,product_name,product_code,isnull(car_num,0) as car_num,isnull([begin],'1900-01-01 08:00:00') as [begin],ord.status FROM [dbo].[mes_material_transfer_result] res -LEFT JOIN pro_order_workorder ord on res.OrderCode = ord.workorder_id where equipmentCode = '{devicecode}' and rfid_status = '1' and rfid not in(select rfid from mes_material_transfer_result where taskcode = '1' and rfid_status = '1')"; + // string sql = $@"SELECT rfid,workorder_code,product_name,product_code,isnull(car_num,0) as car_num,isnull([begin],'1900-01-01 08:00:00') as [begin],ord.status FROM [dbo].[mes_material_transfer_result] res + //LEFT JOIN pro_order_workorder ord on res.OrderCode = ord.workorder_id where equipmentCode = '{devicecode}' and rfid_status = '1' and rfid not in(select rfid from mes_material_transfer_result where taskcode = '1' and rfid_status = '1')"; //where rfid !=null and equipmentCode = '{devicecode}' and rfid_status = '1' and rfid not in(select rfid from mes_material_transfer_result where taskcode = '1' and rfid_status = '1') diff --git a/shangjian/XGL.Data/bin/x86/Debug/XGL.Data.dll b/shangjian/XGL.Data/bin/x86/Debug/XGL.Data.dll index f3952c4..d45929b 100644 Binary files a/shangjian/XGL.Data/bin/x86/Debug/XGL.Data.dll and b/shangjian/XGL.Data/bin/x86/Debug/XGL.Data.dll differ diff --git a/shangjian/XGL.Data/bin/x86/Debug/XGL.Data.pdb b/shangjian/XGL.Data/bin/x86/Debug/XGL.Data.pdb index 927ac6e..da2ea05 100644 Binary files a/shangjian/XGL.Data/bin/x86/Debug/XGL.Data.pdb and b/shangjian/XGL.Data/bin/x86/Debug/XGL.Data.pdb differ diff --git a/shangjian/XGL.Data/obj/x86/Debug/XGL.Data.dll b/shangjian/XGL.Data/obj/x86/Debug/XGL.Data.dll index f3952c4..d45929b 100644 Binary files a/shangjian/XGL.Data/obj/x86/Debug/XGL.Data.dll and b/shangjian/XGL.Data/obj/x86/Debug/XGL.Data.dll differ diff --git a/shangjian/XGL.Data/obj/x86/Debug/XGL.Data.pdb b/shangjian/XGL.Data/obj/x86/Debug/XGL.Data.pdb index 927ac6e..da2ea05 100644 Binary files a/shangjian/XGL.Data/obj/x86/Debug/XGL.Data.pdb and b/shangjian/XGL.Data/obj/x86/Debug/XGL.Data.pdb differ diff --git a/shangjian/XGL/App.config b/shangjian/XGL/App.config index 20014e3..4718bc0 100644 --- a/shangjian/XGL/App.config +++ b/shangjian/XGL/App.config @@ -12,7 +12,7 @@ - + diff --git a/shangjian/XGL/Tools/ModuleUC.xaml b/shangjian/XGL/Tools/ModuleUC.xaml index ce7c70f..1847ef8 100644 --- a/shangjian/XGL/Tools/ModuleUC.xaml +++ b/shangjian/XGL/Tools/ModuleUC.xaml @@ -5,7 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:XGL.Tools" mc:Ignorable="d" - d:DesignHeight="250" d:DesignWidth="250"> + d:DesignHeight="250" d:DesignWidth="150"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -50,8 +386,8 @@ - - + + diff --git a/shangjian/XGL/Views/DryingRoomUC.xaml.cs b/shangjian/XGL/Views/DryingRoomUC.xaml.cs index 90640c2..95a14d8 100644 --- a/shangjian/XGL/Views/DryingRoomUC.xaml.cs +++ b/shangjian/XGL/Views/DryingRoomUC.xaml.cs @@ -34,14 +34,14 @@ namespace XGL.Views { InitComBoboxData(); GetDringRoomData(); - + GetOutDringRoomData(); } private void GetDringRoomData() { DringRoomListBox.ItemsSource = null; DringRoomListBox.Items.Clear(); - DataTable dt = dringRoomService.GetDringRoomData(comboDryRoomInfo.SelectedValue.ToString()); + DataTable dt = dringRoomService.GetDringRoomData(comboDryRoomInfo.SelectedValue.ToString(),1); if (dt == null) { return; @@ -53,16 +53,57 @@ namespace XGL.Views foreach (DataRow item in dt.Rows) { index = i++; - string rfid = item["rfid"].ToString(); + string rfid = item["rfid_no"].ToString(); string workorder_code = item["workorder_code"].ToString(); - string materialCode = item["product_code"].ToString(); + string materialCode = item["material_code"].ToString(); + string inTime = item["update_time"].ToString(); + + TimeSpan ts; + + ts = DateTime.Now - Convert.ToDateTime(inTime); + + int minuteDiff = Convert.ToInt32(ts.TotalMinutes); //string workorder_code = item["workorder_code"].ToString(); - ModuleUC uc = new ModuleUC(index.ToString(), rfid, workorder_code, materialCode, "10"); + ModuleUC uc = new ModuleUC(index.ToString(), rfid, workorder_code, materialCode, minuteDiff); DringRoomListBox.Items.Add(uc); } + } + + private void GetOutDringRoomData() + { + DringRoomOuterListBox.ItemsSource = null; + DringRoomOuterListBox.Items.Clear(); + DataTable dt = dringRoomService.GetDringRoomData(comboDryRoomInfo.SelectedValue.ToString(),0); + if (dt == null) + { + return; + } + + + int index = 0; + int i = 0; + foreach (DataRow item in dt.Rows) + { + index = i++; + string rfid = item["rfid_no"].ToString(); + string workorder_code = item["workorder_code"].ToString(); + string materialCode = item["material_code"].ToString(); + string inTime = item["update_time"].ToString(); + TimeSpan ts; + + ts = DateTime.Now - Convert.ToDateTime(inTime); + + int minuteDiff = Convert.ToInt32(ts.TotalMinutes); + //string workorder_code = item["workorder_code"].ToString(); + ModuleUC uc = new ModuleUC(index.ToString(), rfid, workorder_code, materialCode, minuteDiff); + + DringRoomOuterListBox.Items.Add(uc); + } + + } private void InitComBoboxData() @@ -89,6 +130,7 @@ namespace XGL.Views { string hfCode = comboDryRoomInfo.SelectedValue.ToString();//.Text; GetDringRoomData(); + GetOutDringRoomData(); } } public class EquipmentMode diff --git a/shangjian/XGL/Views/LanJu_Prepare.xaml b/shangjian/XGL/Views/LanJu_Prepare.xaml index 2024e0b..87b2273 100644 --- a/shangjian/XGL/Views/LanJu_Prepare.xaml +++ b/shangjian/XGL/Views/LanJu_Prepare.xaml @@ -85,7 +85,7 @@ @@ -130,11 +130,15 @@ + + + + + + + + + + + + + + + + + + +