添加工艺站发布站包历史表;允许用户选择测试站时选择历史发布站包
This commit is contained in:
@@ -80,7 +80,7 @@ Namespace UTSModule.Project
|
||||
Private Sub TsBtnNewProject_Click(sender As Object, e As EventArgs) Handles TsBtnNewProject.Click
|
||||
Using dlg As New DlgCreateProject
|
||||
If dlg.ShowDialog() <> DialogResult.OK Then Return
|
||||
_userProject = New ProjectInfo(_userInfo.UserId, dlg.ProjectName)
|
||||
_userProject = New ProjectInfo(_userInfo.UserId, _userInfo.UserName, dlg.ProjectName)
|
||||
LoadProjectInitForm(_userProject)
|
||||
End Using
|
||||
End Sub
|
||||
@@ -90,7 +90,7 @@ Namespace UTSModule.Project
|
||||
Using dlg As New DlgLoadProject
|
||||
If dlg.ShowDialog() <> DialogResult.OK Then Return
|
||||
Try
|
||||
_userProject = New ProjectInfo(_userInfo.UserId, dlg.ProjectName, dlg.LoadMode)
|
||||
_userProject = New ProjectInfo(_userInfo.UserId, _userInfo.UserName, dlg.ProjectName, dlg.LoadMode)
|
||||
LoadProjectInitForm(_userProject) '初始化页面
|
||||
Catch ex As Exception
|
||||
MsgBox($"Load Project Error:{ex.Message}")
|
||||
@@ -103,7 +103,7 @@ Namespace UTSModule.Project
|
||||
Using dlg As New DlgLoadProject
|
||||
If dlg.ShowDialog() <> DialogResult.OK Then Return
|
||||
Try
|
||||
_userProject = New ProjectInfo(_userInfo.UserId, dlg.ProjectName, dlg.LoadMode)
|
||||
_userProject = New ProjectInfo(_userInfo.UserId, _userInfo.UserName, dlg.ProjectName, dlg.LoadMode)
|
||||
LoadProjectInitForm(_userProject) '初始化页面
|
||||
_userProject.Index = -1
|
||||
Catch ex As Exception
|
||||
@@ -148,7 +148,8 @@ Namespace UTSModule.Project
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateProjectInfo(project As ProjectInfo)
|
||||
project.UserId = _userInfo.UserId '当前操作项目站用户名
|
||||
project.UserId = _userInfo.UserId '当前操作项目站用户索引
|
||||
project.UserName = _userInfo.UserName '当前操作项目站用户名称
|
||||
|
||||
If String.Compare(project.Name, TxtProjectName.Text) <> 0 Then
|
||||
project.Name = TxtProjectName.Text
|
||||
|
||||
@@ -37,8 +37,9 @@ Namespace UTSModule.Project
|
||||
End Enum
|
||||
|
||||
#Region "New"
|
||||
Sub New(userId As Integer, projectName As String)
|
||||
Sub New(userId As Integer, userName As String, projectName As String)
|
||||
Me.UserId = userId
|
||||
Me.UserName = userName
|
||||
Index = -1
|
||||
ProductTypeId = 0
|
||||
Name = projectName
|
||||
@@ -53,8 +54,9 @@ Namespace UTSModule.Project
|
||||
End Sub
|
||||
|
||||
|
||||
Sub New(userId As Integer, projectName As String, mode As InitializeModeEnum)
|
||||
Sub New(userId As Integer, userName As String, projectName As String, mode As InitializeModeEnum)
|
||||
Me.UserId = userId
|
||||
Me.UserName = userName
|
||||
Index = -1
|
||||
ProductTypeId = 0
|
||||
Name = projectName
|
||||
@@ -71,8 +73,10 @@ Namespace UTSModule.Project
|
||||
End Sub
|
||||
|
||||
|
||||
Sub New(userId As Integer, projectId As Integer, mode As InitializeModeEnum)
|
||||
Sub New(userId As Integer, userName As String, projectId As Integer, mode As InitializeModeEnum)
|
||||
Me.UserId = userId
|
||||
Me.UserName = userName
|
||||
|
||||
Index = projectId
|
||||
ProductTypeId = 0
|
||||
Name = String.Empty
|
||||
@@ -189,6 +193,12 @@ Namespace UTSModule.Project
|
||||
''' <returns></returns>
|
||||
Public Property UserId() As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 项目当前操作人名称
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property UserName() As String
|
||||
|
||||
|
||||
|
||||
Private _masterImg As Image
|
||||
@@ -530,6 +540,46 @@ Namespace UTSModule.Project
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function LoadStationPackets(db As DbExecutor, pid As Integer, sid As Integer) As List(Of StationPacketVo)
|
||||
Dim tableName As String = DbTableModel.Customer.StationPacketReleaseLogTable.TableName
|
||||
Dim condition As String = $"`{DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.ProjectID}` = {pid} && `{DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.StationID}` = {sid}"
|
||||
Dim dtProject As DataTable = db.ExecuteDataTable(db.CmdHelper.SearchAll(tableName, condition))
|
||||
|
||||
Dim packetList As New List(Of StationPacketVo)
|
||||
For Each row As DataRow In dtProject.Rows
|
||||
Dim packet As New StationPacketVo With {
|
||||
.ProjectID = CInt(row(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.ProjectID.ToString())),
|
||||
.StationID = CInt(row(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.StationID.ToString())),
|
||||
.PacketName = row(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.StationID.ToString()).ToString(),
|
||||
.PacketMd5 = row(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.StationID.ToString()).ToString(),
|
||||
.Description = row(DbTableModel.Customer.StationPacketReleaseLogTable.ColNames.StationID.ToString()).ToString()
|
||||
}
|
||||
|
||||
packetList.Insert(0, packet)
|
||||
Next
|
||||
|
||||
Return packetList
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 获取当前站位所有站包
|
||||
''' </summary>
|
||||
''' <param name="pid"></param>
|
||||
''' <param name="sid"></param>
|
||||
''' <returns></returns>
|
||||
Public Function LoadLocalDbStationPackets(pid As Integer, sid As Integer) As List(Of StationPacketVo)
|
||||
Dim packetList As New List(Of StationPacketVo)
|
||||
|
||||
Using db As New DbExecutor(UtsDb.LocalDbType, UtsDb.LocalConnString)
|
||||
db.Open()
|
||||
packetList.AddRange(LoadStationPackets(db, pid, sid))
|
||||
db.Close()
|
||||
End Using
|
||||
|
||||
Return packetList
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' 通过项目索引初始化项目信息
|
||||
''' </summary>
|
||||
|
||||
Reference in New Issue
Block a user