添加工艺站发布站包历史表;允许用户选择测试站时选择历史发布站包

This commit is contained in:
2024-05-08 21:59:31 +08:00
parent ec4c447b01
commit e475a06eb5
254 changed files with 928 additions and 242730 deletions

View File

@@ -34,131 +34,156 @@ Namespace UTSModule.Station
Me.LblProject = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.GrpStationDesc = New System.Windows.Forms.GroupBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.RtxStationDesc = New System.Windows.Forms.RichTextBox()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.RtxProjectDesc = New System.Windows.Forms.RichTextBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.TableLayoutPanel1.SuspendLayout
CType(Me.PicStationPreview,System.ComponentModel.ISupportInitialize).BeginInit
Me.GrpStationDesc.SuspendLayout
Me.GroupBox1.SuspendLayout
Me.SuspendLayout
'
'TableLayoutPanel1
'
Me.TableLayoutPanel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
Me.TableLayoutPanel1.ColumnCount = 2
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50!))
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50!))
Me.TableLayoutPanel1.Controls.Add(Me.OK_Button, 0, 0)
Me.TableLayoutPanel1.Controls.Add(Me.Cancel_Button, 1, 0)
Me.TableLayoutPanel1.Location = New System.Drawing.Point(534, 430)
Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
Me.TableLayoutPanel1.RowCount = 1
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50!))
Me.TableLayoutPanel1.Size = New System.Drawing.Size(240, 39)
Me.TableLayoutPanel1.TabIndex = 0
'
'OK_Button
'
Me.OK_Button.Dock = System.Windows.Forms.DockStyle.Fill
Me.OK_Button.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.OK_Button.Location = New System.Drawing.Point(3, 3)
Me.OK_Button.Name = "OK_Button"
Me.OK_Button.Size = New System.Drawing.Size(114, 33)
Me.OK_Button.TabIndex = 0
Me.OK_Button.Text = "确定"
'
'Cancel_Button
'
Me.Cancel_Button.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.Cancel_Button.Dock = System.Windows.Forms.DockStyle.Fill
Me.Cancel_Button.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.Cancel_Button.Location = New System.Drawing.Point(123, 3)
Me.Cancel_Button.Name = "Cancel_Button"
Me.Cancel_Button.Size = New System.Drawing.Size(114, 33)
Me.Cancel_Button.TabIndex = 1
Me.Cancel_Button.Text = "取消"
'
'PicStationPreview
'
Me.PicStationPreview.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.PicStationPreview.Location = New System.Drawing.Point(24, 181)
Me.PicStationPreview.Name = "PicStationPreview"
Me.PicStationPreview.Size = New System.Drawing.Size(200, 200)
Me.PicStationPreview.TabIndex = 5
Me.PicStationPreview.TabStop = false
'
'CboStation
'
Me.CboStation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.CboStation.Font = New System.Drawing.Font("宋体", 12!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.CboStation.FormattingEnabled = true
Me.CboStation.IntegralHeight = false
Me.CboStation.Location = New System.Drawing.Point(24, 49)
Me.CboStation.MaxDropDownItems = 16
Me.CboStation.Name = "CboStation"
Me.CboStation.Size = New System.Drawing.Size(200, 24)
Me.CboStation.TabIndex = 9
'
'LblStation
'
Me.LblStation.AutoSize = true
Me.LblStation.Location = New System.Drawing.Point(6, 27)
Me.LblStation.Name = "LblStation"
Me.LblStation.Size = New System.Drawing.Size(41, 12)
Me.LblStation.TabIndex = 8
Me.LblStation.Text = "站位:"
'
'CboProject
'
Me.CboProject.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.CboProject.Font = New System.Drawing.Font("宋体", 12!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.CboProject.FormattingEnabled = true
Me.CboProject.IntegralHeight = false
Me.CboProject.Location = New System.Drawing.Point(24, 49)
Me.CboProject.MaxDropDownItems = 16
Me.CboProject.Name = "CboProject"
Me.CboProject.Size = New System.Drawing.Size(200, 24)
Me.CboProject.TabIndex = 7
'
'LblProject
'
Me.LblProject.AutoSize = true
Me.LblProject.Location = New System.Drawing.Point(6, 27)
Me.LblProject.Name = "LblProject"
Me.LblProject.Size = New System.Drawing.Size(41, 12)
Me.LblProject.TabIndex = 6
Me.LblProject.Text = "项目:"
'
'Label1
'
Me.Label1.AutoSize = true
Me.Label1.Location = New System.Drawing.Point(6, 166)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(41, 12)
Me.Label1.TabIndex = 10
Me.Label1.Text = "预览:"
'
'GrpStationDesc
'
Me.GrpStationDesc.Controls.Add(Me.Label3)
Me.GrpStationDesc.Controls.Add(Me.RtxStationDesc)
Me.GrpStationDesc.Controls.Add(Me.CboStation)
Me.GrpStationDesc.Controls.Add(Me.LblStation)
Me.GrpStationDesc.Location = New System.Drawing.Point(291, 15)
Me.GrpStationDesc.Name = "GrpStationDesc"
Me.GrpStationDesc.Size = New System.Drawing.Size(483, 400)
Me.GrpStationDesc.TabIndex = 11
Me.GrpStationDesc.TabStop = false
Me.GrpStationDesc.Text = "站位描述"
'
'Label3
'
Me.Label3.AutoSize = true
Me.Label3.Location = New System.Drawing.Point(6, 82)
Me.Label3.Name = "Label3"
Me.CboPacket = New System.Windows.Forms.ComboBox()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.RtxStationDesc = New System.Windows.Forms.RichTextBox()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.RtxProjectDesc = New System.Windows.Forms.RichTextBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.TableLayoutPanel1.SuspendLayout()
CType(Me.PicStationPreview, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GrpStationDesc.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'TableLayoutPanel1
'
Me.TableLayoutPanel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.TableLayoutPanel1.ColumnCount = 2
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.TableLayoutPanel1.Controls.Add(Me.OK_Button, 0, 0)
Me.TableLayoutPanel1.Controls.Add(Me.Cancel_Button, 1, 0)
Me.TableLayoutPanel1.Location = New System.Drawing.Point(533, 431)
Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
Me.TableLayoutPanel1.RowCount = 1
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.TableLayoutPanel1.Size = New System.Drawing.Size(240, 39)
Me.TableLayoutPanel1.TabIndex = 0
'
'OK_Button
'
Me.OK_Button.Dock = System.Windows.Forms.DockStyle.Fill
Me.OK_Button.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.OK_Button.Location = New System.Drawing.Point(3, 3)
Me.OK_Button.Name = "OK_Button"
Me.OK_Button.Size = New System.Drawing.Size(114, 33)
Me.OK_Button.TabIndex = 0
Me.OK_Button.Text = "确定"
'
'Cancel_Button
'
Me.Cancel_Button.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.Cancel_Button.Dock = System.Windows.Forms.DockStyle.Fill
Me.Cancel_Button.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Cancel_Button.Location = New System.Drawing.Point(123, 3)
Me.Cancel_Button.Name = "Cancel_Button"
Me.Cancel_Button.Size = New System.Drawing.Size(114, 33)
Me.Cancel_Button.TabIndex = 1
Me.Cancel_Button.Text = "取消"
'
'PicStationPreview
'
Me.PicStationPreview.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.PicStationPreview.Location = New System.Drawing.Point(24, 181)
Me.PicStationPreview.Name = "PicStationPreview"
Me.PicStationPreview.Size = New System.Drawing.Size(200, 200)
Me.PicStationPreview.TabIndex = 5
Me.PicStationPreview.TabStop = False
'
'CboStation
'
Me.CboStation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.CboStation.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.CboStation.FormattingEnabled = True
Me.CboStation.IntegralHeight = False
Me.CboStation.Location = New System.Drawing.Point(24, 49)
Me.CboStation.MaxDropDownItems = 16
Me.CboStation.Name = "CboStation"
Me.CboStation.Size = New System.Drawing.Size(200, 24)
Me.CboStation.TabIndex = 9
'
'LblStation
'
Me.LblStation.AutoSize = True
Me.LblStation.Location = New System.Drawing.Point(6, 27)
Me.LblStation.Name = "LblStation"
Me.LblStation.Size = New System.Drawing.Size(41, 12)
Me.LblStation.TabIndex = 8
Me.LblStation.Text = "站位:"
'
'CboProject
'
Me.CboProject.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.CboProject.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.CboProject.FormattingEnabled = True
Me.CboProject.IntegralHeight = False
Me.CboProject.Location = New System.Drawing.Point(24, 49)
Me.CboProject.MaxDropDownItems = 16
Me.CboProject.Name = "CboProject"
Me.CboProject.Size = New System.Drawing.Size(200, 24)
Me.CboProject.TabIndex = 7
'
'LblProject
'
Me.LblProject.AutoSize = True
Me.LblProject.Location = New System.Drawing.Point(6, 27)
Me.LblProject.Name = "LblProject"
Me.LblProject.Size = New System.Drawing.Size(41, 12)
Me.LblProject.TabIndex = 6
Me.LblProject.Text = "项目:"
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(6, 166)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(41, 12)
Me.Label1.TabIndex = 10
Me.Label1.Text = "预览:"
'
'GrpStationDesc
'
Me.GrpStationDesc.Controls.Add(Me.CboPacket)
Me.GrpStationDesc.Controls.Add(Me.Label4)
Me.GrpStationDesc.Controls.Add(Me.Label3)
Me.GrpStationDesc.Controls.Add(Me.RtxStationDesc)
Me.GrpStationDesc.Controls.Add(Me.CboStation)
Me.GrpStationDesc.Controls.Add(Me.LblStation)
Me.GrpStationDesc.Location = New System.Drawing.Point(291, 15)
Me.GrpStationDesc.Name = "GrpStationDesc"
Me.GrpStationDesc.Size = New System.Drawing.Size(483, 400)
Me.GrpStationDesc.TabIndex = 11
Me.GrpStationDesc.TabStop = False
Me.GrpStationDesc.Text = "站位描述"
'
'CboPacket
'
Me.CboPacket.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.CboPacket.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.CboPacket.FormattingEnabled = True
Me.CboPacket.IntegralHeight = False
Me.CboPacket.Location = New System.Drawing.Point(258, 49)
Me.CboPacket.MaxDropDownItems = 16
Me.CboPacket.Name = "CboPacket"
Me.CboPacket.Size = New System.Drawing.Size(200, 24)
Me.CboPacket.TabIndex = 13
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(244, 27)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(41, 12)
Me.Label4.TabIndex = 12
Me.Label4.Text = "站包:"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(6, 82)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(65, 12)
Me.Label3.TabIndex = 11
Me.Label3.Text = "站位总览:"
@@ -166,59 +191,59 @@ Namespace UTSModule.Station
'RtxStationDesc
'
Me.RtxStationDesc.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.RtxStationDesc.Font = New System.Drawing.Font("宋体", 12!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.RtxStationDesc.ForeColor = System.Drawing.Color.Gray
Me.RtxStationDesc.Location = New System.Drawing.Point(24, 97)
Me.RtxStationDesc.Name = "RtxStationDesc"
Me.RtxStationDesc.ReadOnly = true
Me.RtxStationDesc.Size = New System.Drawing.Size(434, 284)
Me.RtxStationDesc.TabIndex = 10
Me.RtxStationDesc.Text = ""
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.RtxProjectDesc)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.CboProject)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Controls.Add(Me.LblProject)
Me.GroupBox1.Controls.Add(Me.PicStationPreview)
Me.GroupBox1.Location = New System.Drawing.Point(23, 15)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(240, 400)
Me.GroupBox1.TabIndex = 12
Me.GroupBox1.TabStop = false
Me.GroupBox1.Text = "项目描述"
'
'RtxProjectDesc
'
Me.RtxProjectDesc.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.RtxProjectDesc.Font = New System.Drawing.Font("宋体", 12!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.RtxProjectDesc.Location = New System.Drawing.Point(24, 97)
Me.RtxProjectDesc.Name = "RtxProjectDesc"
Me.RtxProjectDesc.ReadOnly = true
Me.RtxProjectDesc.Size = New System.Drawing.Size(200, 57)
Me.RtxProjectDesc.TabIndex = 12
Me.RtxProjectDesc.Text = ""
'
'Label2
'
Me.Label2.AutoSize = true
Me.Label2.Location = New System.Drawing.Point(6, 82)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(41, 12)
Me.Label2.TabIndex = 8
Me.Label2.Text = "简介:"
'
'DlgLoadStation
'
Me.AcceptButton = Me.OK_Button
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 12!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.Cancel_Button
Me.ClientSize = New System.Drawing.Size(794, 470)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.GrpStationDesc)
Me.RtxStationDesc.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.RtxStationDesc.ForeColor = System.Drawing.Color.Gray
Me.RtxStationDesc.Location = New System.Drawing.Point(24, 97)
Me.RtxStationDesc.Name = "RtxStationDesc"
Me.RtxStationDesc.ReadOnly = True
Me.RtxStationDesc.Size = New System.Drawing.Size(434, 284)
Me.RtxStationDesc.TabIndex = 10
Me.RtxStationDesc.Text = ""
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.RtxProjectDesc)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.CboProject)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Controls.Add(Me.LblProject)
Me.GroupBox1.Controls.Add(Me.PicStationPreview)
Me.GroupBox1.Location = New System.Drawing.Point(23, 15)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(240, 400)
Me.GroupBox1.TabIndex = 12
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "项目描述"
'
'RtxProjectDesc
'
Me.RtxProjectDesc.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.RtxProjectDesc.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.RtxProjectDesc.Location = New System.Drawing.Point(24, 97)
Me.RtxProjectDesc.Name = "RtxProjectDesc"
Me.RtxProjectDesc.ReadOnly = True
Me.RtxProjectDesc.Size = New System.Drawing.Size(200, 57)
Me.RtxProjectDesc.TabIndex = 12
Me.RtxProjectDesc.Text = ""
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(6, 82)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(41, 12)
Me.Label2.TabIndex = 8
Me.Label2.Text = "简介:"
'
'DlgLoadStation
'
Me.AcceptButton = Me.OK_Button
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.Cancel_Button
Me.ClientSize = New System.Drawing.Size(793, 471)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.GrpStationDesc)
Me.Controls.Add(Me.TableLayoutPanel1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.MaximizeBox = false
@@ -251,5 +276,7 @@ End Sub
Friend WithEvents Label3 As Windows.Forms.Label
Friend WithEvents RtxStationDesc As Windows.Forms.RichTextBox
Friend WithEvents RtxProjectDesc As Windows.Forms.RichTextBox
Friend WithEvents CboPacket As ComboBox
Friend WithEvents Label4 As Label
End Class
End Namespace

View File

@@ -5,6 +5,7 @@ Imports UTS_Core.UTSModule.Project
Namespace UTSModule.Station
Public Class DlgLoadStation
Public Property ProcessStation() As ProcessStation
Public Property UserInfo() As Login.UserInfo
Public _projectInfo As ProjectInfo
@@ -21,7 +22,7 @@ Namespace UTSModule.Station
Dim projectList As String() = ProjectInfo.LoadProjectList(ProjectInfo.InitializeModeEnum.LocalDatabaseLoad)
If projectList.Contains(projectName) = False Then Return False
_projectInfo = New ProjectInfo(UserInfo.UserId, projectName, ProjectInfo.InitializeModeEnum.LocalDatabaseLoad)
_projectInfo = New ProjectInfo(UserInfo.UserId, UserInfo.UserName, projectName, ProjectInfo.InitializeModeEnum.LocalDatabaseLoad)
For Each projectStationInfo As ProcessStation In _projectInfo.Station
If projectStationInfo.Name = stationName Then
ProcessStation = projectStationInfo
@@ -94,6 +95,8 @@ Namespace UTSModule.Station
CboStation.Items.Add(station.Name)
Next
CboPacket.Items.Clear()
'添加所有站位描述
RtxStationDesc.SuspendLayout()
@@ -123,7 +126,7 @@ Namespace UTSModule.Station
End Sub
Private Sub CboProject_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboProject.SelectedIndexChanged
_projectInfo = New ProjectInfo(UserInfo.UserId, CboProject.Text, ProjectInfo.InitializeModeEnum.LocalDatabaseLoad)
_projectInfo = New ProjectInfo(UserInfo.UserId, UserInfo.UserName, CboProject.Text, ProjectInfo.InitializeModeEnum.LocalDatabaseLoad)
RtxProjectDesc.Text = _projectInfo.Description
@@ -136,6 +139,8 @@ Namespace UTSModule.Station
End Sub
Private lastSelectIndex As Integer = -1
Private _packetList As List(Of StationPacketVo)
Private Sub CboStation_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboStation.SelectedIndexChanged
Dim selectIndex As Integer = _snIndex(CboStation.SelectedIndex)
ProcessStation = _projectInfo.Station.Item(selectIndex)
@@ -149,7 +154,25 @@ Namespace UTSModule.Station
RtxStationDesc.Select(RtxStationDesc.GetFirstCharIndexFromLine(selectIndex), RtxStationDesc.Lines(selectIndex).Length)
RtxStationDesc.SelectionColor = Color.Blue
'获取pid和sid
Dim pid As Integer = _projectInfo.Index
Dim sid As Integer = ProcessStation.StationID
'获取对应站位所有包,倒序添加
_packetList = _projectInfo.LoadLocalDbStationPackets(pid, sid)
CboPacket.Items.Clear()
For Each packet As StationPacketVo In _packetList
CboPacket.Items.Add(packet.PacketName)
Next
If CboPacket.Items.Count > 0 Then CboPacket.SelectedIndex = 0
End Sub
Private Sub CboPacket_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboPacket.SelectedIndexChanged
ProcessStation.Packet.FileName = _packetList(CboPacket.SelectedIndex).PacketName
ProcessStation.Packet.PacketMD5 = _packetList(CboPacket.SelectedIndex).PacketMd5
End Sub
End Class
End Namespace

View File

@@ -527,13 +527,25 @@ Namespace UTSModule.Station
''' </summary>
''' <param name="revFileName"></param>
Private Sub ReleaseUpdateDatabase(revFileName As String)
Dim saved As Boolean = False
'获取站包Md5值
Dim revFilePath As String = $"{UtsPath.StationPacketPath(ParentProcessStation.ParentProject.Index, ParentProcessStation.StationID, revFileName)}"
Dim md5 As String = UTS_Core.Security.Md5.GetFileMd5(revFilePath)
ReleaseUpdatePacketLogTable(revFileName, md5) '更新发布历史
ReleaseUpdateStationTable(revFileName, md5) '更新站位表
PacketMD5 = md5
End Sub
''' <summary>
''' 发布站包时,更新站位表信息
''' </summary>
''' <param name="revFileName"></param>
''' <param name="md5"></param>
Private Sub ReleaseUpdateStationTable(revFileName As String, md5 As String)
Dim saved As Boolean = False
'更新最新包名,编辑密码与发布密码
Dim tableName As String = DbTableModel.Customer.StationListTable.TableName
@@ -556,7 +568,7 @@ Namespace UTSModule.Station
db.Close()
saved = True
Catch ex As Exception
Console.WriteLine($"Release Packet To Database Fail,{ex.Message}")
Console.WriteLine($"Release Packet To Update Station Table Fail,{ex.Message}")
saved = False
End Try
End Using
@@ -573,10 +585,67 @@ Namespace UTSModule.Station
DbConnect.DbConnector.SaveCmdStringToCacheTable(db, remoteCmd)
End If
db.Close()
End Using
End Sub
''' <summary>
''' 发布站包时,更新站包发布记录表信息
''' </summary>
''' <param name="revFileName"></param>
''' <param name="md5"></param>
Private Sub ReleaseUpdatePacketLogTable(revFileName As String, md5 As String)
Dim saved As Boolean = False
Dim tableName As String = DbTableModel.Customer.StationPacketReleaseLogTable.TableName
Dim colNames As New Dictionary(Of String, String)
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.ProjectID.ToString(), ParentProcessStation.ParentProject.Index.ToString)
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.StationID.ToString(), ParentProcessStation.StationID.ToString)
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.CreateTime.ToString(), DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"))
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.UpdateTime.ToString(), DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"))
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.PacketName.ToString(), revFileName)
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.PacketMd5.ToString(), md5)
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.Description.ToString(), CurrentImprint.ToString())
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.Remark.ToString(), "")
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.IsValid.ToString(), "1")
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.UserID.ToString(), ParentProcessStation.ParentProject.UserId.ToString())
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.UserName.ToString(), ParentProcessStation.ParentProject.UserName.ToString())
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.PublicIP.ToString(), "") 'todo:填充信息
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.ComputerName.ToString(), "")
colNames.Add(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.SID.ToString(), "")
'保存至云端
Dim remoteCmd As String
Using db As New DbExecutor(UtsDb.RemoteDbType, UtsDb.RemoteConnString)
remoteCmd = db.CmdHelper.DbInsert(UtsDb.RemotePrivateDb, tableName, colNames)
Try
db.Open()
db.ExecuteNonQuery(remoteCmd)
db.Close()
saved = True
Catch ex As Exception
Console.WriteLine($"Release Packet To Update Packet Log Table Fail,{ex.Message}")
saved = False
End Try
End Using
'保存至本地库
Using db As New DbExecutor(UtsDb.LocalDbType, UtsDb.LocalConnString) '存至本地
db.Open()
Dim localCmd As String = db.CmdHelper.Insert(tableName, colNames)
db.ExecuteNonQuery(localCmd)
'更新缓存日志表
If saved = False Then
DbConnect.DbConnector.SaveCmdStringToCacheTable(db, remoteCmd)
End If
db.Close()
End Using
PacketMD5 = md5
End Sub
''' <summary>

View File

@@ -0,0 +1,13 @@
Public Class StationPacketVo
Public Property ProjectID As Integer
Public Property StationID As Integer
Public Property PacketName As String
Public Property PacketMd5 As String
Public Property Description As String
End Class