From 21f8c47d48d8daa44693ad000ef319e2077600fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83?= <15095123350@163.com> Date: Thu, 19 Sep 2024 12:04:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=85=E5=8A=A9=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DBService/FormingMachineService.cs | 22 +- shangjian/XGLFinishPro/LoginPage.xaml.cs | 2 +- shangjian/XGLFinishPro/ReprotPageSelect.cs | 6 + .../Views/AuxiliaryPersonnel.xaml | 20 +- .../Views/AuxiliaryPersonnel.xaml.cs | 44 ++- .../Views/LanJu_Check_Report.xaml.cs | 25 +- .../Views/LanJu_Conversion_Report.xaml | 8 +- .../Views/LanJu_Conversion_Report.xaml.cs | 64 +++- .../Views/LanJu_First_Inspection_Reprot.xaml | 19 +- .../LanJu_First_Inspection_Reprot.xaml.cs | 284 +++++++++++++----- .../XGLFinishPro/Views/LanJu_Operator.xaml | 1 + .../XGLFinishPro/Views/LanJu_Operator.xaml.cs | 2 +- shangjian/XGLFinishPro/Views/PersonView.xaml | 4 +- .../XGLFinishPro/Views/PersonView.xaml.cs | 31 +- .../XGLFinishPro/Views/PieceSalaryCalWin.xaml | 196 +++++++++--- .../Views/PieceSalaryCalWin.xaml.cs | 174 ++++++++--- .../Views/ReportPageSelect.xaml.cs | 30 +- shangjian/XGLFinishPro/XGLFinishPro.csproj | 1 + .../config/ConnectionConfig.Config | 8 +- 19 files changed, 689 insertions(+), 252 deletions(-) create mode 100644 shangjian/XGLFinishPro/ReprotPageSelect.cs diff --git a/shangjian/XGL.Data/DBService/FormingMachineService.cs b/shangjian/XGL.Data/DBService/FormingMachineService.cs index ef75136..3780852 100644 --- a/shangjian/XGL.Data/DBService/FormingMachineService.cs +++ b/shangjian/XGL.Data/DBService/FormingMachineService.cs @@ -642,8 +642,8 @@ VALUES ([id], [report_type], [report_code], [workorder_code], [product_code], [product_name], [spec], [unit], [quantity], [quantity_feedback], [quantity_qualified], [quantity_unqualified], [user_name], [nick_name], [feedback_channel], [feedback_time], [record_user], [status], - [reason], [work_time], [machine_code], [machine_name], [team_code], [shift_code], - [attr1], [attr2], [attr3], [attr4], [create_by], [create_time], + [remark], [work_time], [machine_code], [machine_name], [team_code], [shift_code], + [reason], [attr2], [attr3], [attr4], [create_by], [create_time], [update_time], [update_by], [upload_status], [upload_msg], [prod_type], [use_man], [work_center],[del_flag],[batch],[end_report],[parent_order],[IP],[version]) VALUES @@ -1451,7 +1451,7 @@ where machine_code = 'X1' and bind_status = '0' order by update_time DESC"; string sql = $@"select * from [dbo].[mes_table_self] where line_code='{lineCode}' and check_date='{checkDate}' and report_name='{reprot_name}'"; if (!string.IsNullOrEmpty(productCode)) { - sql+= $@" and product_code='{productCode}'"; + sql += $@" and product_name='{productCode}'"; } DataSet ds = Utils.netClientDBHelper.getDataSet(sql); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) @@ -1473,13 +1473,13 @@ where machine_code = 'X1' and bind_status = '0' order by update_time DESC"; update_time = dr["update_time"].ToString(), factory_code = dr["factory_code"].ToString(), del_flag = dr["del_flag"].ToString(), - report_name=dr["report_name"].ToString(), + report_name = dr["report_name"].ToString(), }; } return null; } - public List GetMesTableSelfDetial(string id,int count) + public List GetMesTableSelfDetial(string id, int count) { string sql = $@"select * from [dbo].[mes_table_self_detial] where belong_to='{id}'"; DataSet ds = Utils.netClientDBHelper.getDataSet(sql); @@ -1513,11 +1513,11 @@ where machine_code = 'X1' and bind_status = '0' order by update_time DESC"; table_line = dable_line, }); } - list=list.OrderByDescending(t => t.table_line).ToList(); + list = list.OrderByDescending(t => t.table_line).ToList(); var distinctList = list.OrderByDescending(t => t.table_line).Select(t => t.table_line).Distinct().ToList(); for (int i = 0; i < distinctList.Count; i++) { - list.Where(t=>t.table_line==distinctList[i]).ToList().ForEach(t => + list.Where(t => t.table_line == distinctList[i]).ToList().ForEach(t => { t.index = i; }); @@ -1560,7 +1560,7 @@ where machine_code = 'X1' and bind_status = '0' order by update_time DESC"; public void UpdateMesTableSelf(string id, string text, string text1) { - string sql= $@"update [dbo].[mes_table_self] set bz='{text}',create_by='{text1}' where id='{id}'"; + string sql = $@"update [dbo].[mes_table_self] set bz='{text}',create_by='{text1}' where id='{id}'"; Utils.netClientDBHelper.executeUpdate(sql); } @@ -1579,10 +1579,10 @@ where machine_code = 'X1' and bind_status = '0' order by update_time DESC"; return list; } - public int InsertMesUnitPriceReport(string user_name, string nick_name, string post, string gs, string kk, string remark, string deviceCode) + public int InsertMesUnitPriceReport(string user_name, string nick_name, string post, string gs, string kk, string remark, string deviceCode, string product_code, string product_name, string childprocess_code, string childprocess_name, string workorder_code, string workorder_code_sap, string workDate, string attr1) { - string sql = $@"insert into mes_unitprice_report (id,user_name,nick_name,create_time,line_code,post,kk,attr2,remark) - values ('{Guid.NewGuid().ToString().Substring(0,32)}','{user_name}','{nick_name}',GetDate(),'{deviceCode}','{post}',{kk},'{gs}','{remark}')"; + string sql = $@"insert into mes_unitprice_report (id,workorder_code,workorder_code_sap,product_name,product_code,childprocess_code,childprocess_name,user_name,nick_name,create_time,line_code,post,kk,attr2,remark,work_order_product_date,attr1) + values ('{Guid.NewGuid().ToString().Substring(0, 32)}','{workorder_code}','{workorder_code_sap}','{product_name}','{product_code}','{childprocess_code}','{childprocess_name}','{user_name}','{nick_name}',GetDate(),'{deviceCode}','{post}',{kk},'{gs}','{remark}','{workDate}','{attr1}')"; return Utils.netClientDBHelper.executeUpdate(sql); } } diff --git a/shangjian/XGLFinishPro/LoginPage.xaml.cs b/shangjian/XGLFinishPro/LoginPage.xaml.cs index a7a3bd8..c29a229 100644 --- a/shangjian/XGLFinishPro/LoginPage.xaml.cs +++ b/shangjian/XGLFinishPro/LoginPage.xaml.cs @@ -317,12 +317,12 @@ namespace XGLFinishPro { } - private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { this.DragMove();//窗体可移动 } + /// /// 更新按钮 /// diff --git a/shangjian/XGLFinishPro/ReprotPageSelect.cs b/shangjian/XGLFinishPro/ReprotPageSelect.cs new file mode 100644 index 0000000..aacca36 --- /dev/null +++ b/shangjian/XGLFinishPro/ReprotPageSelect.cs @@ -0,0 +1,6 @@ +namespace XGLFinishPro +{ + internal class ReprotPageSelect + { + } +} \ No newline at end of file diff --git a/shangjian/XGLFinishPro/Views/AuxiliaryPersonnel.xaml b/shangjian/XGLFinishPro/Views/AuxiliaryPersonnel.xaml index 55262c7..9e96f53 100644 --- a/shangjian/XGLFinishPro/Views/AuxiliaryPersonnel.xaml +++ b/shangjian/XGLFinishPro/Views/AuxiliaryPersonnel.xaml @@ -24,6 +24,8 @@ + + @@ -31,13 +33,17 @@ VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="25"/> - - - - - - - + + + + + + + + + + +