From d58ae4f8233c2803657497ef9264850c2f210c0c Mon Sep 17 00:00:00 2001 From: zhaojian Date: Tue, 6 Aug 2024 09:59:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=B7=A5=E6=B7=BB=E5=8A=A0=E6=95=88?= =?UTF-8?q?=E7=8E=87=E5=8E=9F=E5=9B=A0,=E5=BD=B1=E5=93=8D=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DBService/FormingMachineService.cs | 4 +- .../FinishProdDBService.cs | 17 +- .../XGLFinishPro/Views/ExecReportWorkWin.xaml | 442 +++++++++--------- .../Views/ExecReportWorkWin.xaml.cs | 37 +- 4 files changed, 275 insertions(+), 225 deletions(-) diff --git a/shangjian/XGL.Data/DBService/FormingMachineService.cs b/shangjian/XGL.Data/DBService/FormingMachineService.cs index 0f06d0e..06c35cd 100644 --- a/shangjian/XGL.Data/DBService/FormingMachineService.cs +++ b/shangjian/XGL.Data/DBService/FormingMachineService.cs @@ -594,7 +594,7 @@ VALUES /// /// public List GetExecuteReportWorkSql(DataRowView selectRow, string orderQuntity, string workCount, string reportCode, string workTime, string userCount, string costCenter, string batchCode, - string isEndReport, string deviceCode, Dictionary workTimeDic, Dictionary userCountDic) + string isEndReport, string deviceCode, Dictionary workTimeDic, Dictionary userCountDic,string xiaolv,string shijian) { string getReportCodeSql = $@"SELECT equipment_code,equipment_name FROM [dbo].[base_equipment] WHERE equipment_code='{deviceCode}'"; string lineName = ""; @@ -641,7 +641,7 @@ VALUES '{selectRow["product_spc"]}', '{selectRow["unit"]}', {selectRow["batch_quantity"]}, {workCount}, 0, 0, '{LoginUser.UserCode}', '{LoginUser.UserName}', 'PC', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}', 'PREPARE', '无', '{workTime}', '{deviceCode}', '{lineName}', N'{LoginUser.TeamCode}', '{selectRow["shift_id"]}', - NULL, NULL, NULL, NULL, '{LoginUser.UserName}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', + '{xiaolv}', '{shijian}', NULL, NULL, '{LoginUser.UserName}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}', '0', NULL, 'prod', {userCount}, '{costCenter}','0','{batchCode}','{isEndReport}','{0}','{LoginUser.CurrDeviceIP}','{LoginUser.Version}');"; diff --git a/shangjian/XGL.Data/DBServiceFinishProd/FinishProdDBService.cs b/shangjian/XGL.Data/DBServiceFinishProd/FinishProdDBService.cs index 0b796d1..58681b7 100644 --- a/shangjian/XGL.Data/DBServiceFinishProd/FinishProdDBService.cs +++ b/shangjian/XGL.Data/DBServiceFinishProd/FinishProdDBService.cs @@ -363,7 +363,22 @@ where detail.parent_work_order ='{workorder}' and detail.del_flag = '0'"; } return null; } - + /// + /// 查询效率原因 + /// + /// + /// + public DataTable GetBatcxiaolvCount() + { + //string sql = $" select count(*) from mes_report_work where workorder_code = '{workorder}' AND del_flag='0'"; + string sql = $@" SELECT * FROM [dbo].[sys_dict_data] where dict_type='mes_efficiency_reasons'"; + DataSet dtset = Utils.cloudDBHelper.getDataSet(sql); + if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0) + { + return dtset.Tables[0]; + } + return null; + } public bool IsLastBatchReport(string batchNo) { //string sql = $" select count(*) from mes_report_work where workorder_code = '{workorder}' AND del_flag='0'"; diff --git a/shangjian/XGLFinishPro/Views/ExecReportWorkWin.xaml b/shangjian/XGLFinishPro/Views/ExecReportWorkWin.xaml index ccec373..800787e 100644 --- a/shangjian/XGLFinishPro/Views/ExecReportWorkWin.xaml +++ b/shangjian/XGLFinishPro/Views/ExecReportWorkWin.xaml @@ -10,176 +10,176 @@ Title="CheckUserWin" Height="750" Width="1350" WindowStartupLocation="CenterScreen" WindowStyle="None" Loaded="Window_Loaded"> - - - - - - - - - - - - - - - - + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -201,69 +201,69 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + - - - - + + - - - - + + + + - - + - + +