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">