From d9f18a2636f84f0cf5b6d06ddc174784ce52d827 Mon Sep 17 00:00:00 2001 From: zhaojian Date: Mon, 13 Jan 2025 14:54:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=B3=E9=97=AD=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DBService/FormingMachineService.cs | 13 +- .../Model/FoamingMac/FoamingMacModel.cs | 2 + shangjian/XGL/Views/LanJu_Operator.xaml | 35 ++++- shangjian/XGL/Views/LanJu_Operator.xaml.cs | 141 +++++++++++++++++- 4 files changed, 187 insertions(+), 4 deletions(-) diff --git a/shangjian/XGL.Data/DBService/FormingMachineService.cs b/shangjian/XGL.Data/DBService/FormingMachineService.cs index 8c2a0db..03381e8 100644 --- a/shangjian/XGL.Data/DBService/FormingMachineService.cs +++ b/shangjian/XGL.Data/DBService/FormingMachineService.cs @@ -64,6 +64,8 @@ namespace XGL.Data.DBService ord.route_code, ord.attr1, ord.shift_id, + ord.start_work_time, + ord.end_work_time, shift.Shift_Desc,'0' as totalCount FROM pro_order_workorder ord WITH (NOLOCK) @@ -1189,7 +1191,16 @@ where machine_code = 'X1' and bind_status = '0' order by update_time DESC"; } return reportList; } - + public int uporderstarttime(string id) + { + string sql = $@"update [dbo].[pro_order_workorder] set start_work_time='{DateTime.Now}' where workorder_id='{id}'"; + return Utils.netClientDBHelper.executeUpdate(sql); + } + public int uporderendtime(string id) + { + string sql = $@"update [dbo].[pro_order_workorder] set end_work_time='{DateTime.Now}' where workorder_id='{id}'"; + return Utils.netClientDBHelper.executeUpdate(sql); + } public int EditReport(report report) { string sql = $@"update [dbo].[mes_report] set team='{report.team}',OpenLineCheckBox='{report.OpenLineCheckBox}',ReplaceLineCheckBox='{report.ReplaceLineCheckBox}',unqualified='{report.unqualified}',clear='{report.clear}',residue='{report.residue}',lineClear='{report.lineClear}',UserKnow='{report.UserKnow}',qualified='{report.qualified}',equipStatus='{report.equipStatus}',StampCorrect='{report.StampCorrect}',isClear='{report.isClear}',positionCorrect='{report.positionCorrect}',isLineClear='{report.isLineClear}' where Id='{report.Id}'"; diff --git a/shangjian/XGL.Model/Model/FoamingMac/FoamingMacModel.cs b/shangjian/XGL.Model/Model/FoamingMac/FoamingMacModel.cs index cfe9873..7598aed 100644 --- a/shangjian/XGL.Model/Model/FoamingMac/FoamingMacModel.cs +++ b/shangjian/XGL.Model/Model/FoamingMac/FoamingMacModel.cs @@ -34,5 +34,7 @@ namespace XGL.Models.Model.FoamingMac public string totalCount { get; set; } public string isbai { get; set;} public string shift_id { get; set; } + public DateTime start_work_time { get; set; } + public DateTime end_work_time { get; set; } } } diff --git a/shangjian/XGL/Views/LanJu_Operator.xaml b/shangjian/XGL/Views/LanJu_Operator.xaml index 2e4cb88..1dd8279 100644 --- a/shangjian/XGL/Views/LanJu_Operator.xaml +++ b/shangjian/XGL/Views/LanJu_Operator.xaml @@ -443,6 +443,37 @@ Background="#F2F3F5" Click="jilu_Click" Content="记录"> + + + + + + @@ -474,7 +505,7 @@ Background="#F2F3F5" CellStyle="{StaticResource CustomCellStyle}" HorizontalAlignment="Left" VerticalAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" - AutoGenerateColumns="False" CanUserAddRows="False" SelectionChanged="dgWorkOrderInfo_SelectionChanged"> + AutoGenerateColumns="False" CanUserAddRows="False" SelectionChanged="dgWorkOrderInfo_SelectionChanged">