初始化到新仓库
This commit is contained in:
Binary file not shown.
@@ -413,101 +413,109 @@ Public Class FrmUpdateConfig
|
||||
UpdateInstallTip(20, $"Start Get Uts Host")
|
||||
'获取webService目标地址
|
||||
|
||||
Dim remoteIP As IPEndPoint = Nothing
|
||||
Try
|
||||
If remoteIP Is Nothing Then
|
||||
'Dim remoteIP As IPEndPoint = Nothing
|
||||
'Try
|
||||
' If remoteIP Is Nothing Then
|
||||
' remoteIP = New IPEndPoint(Dns.GetHostAddresses("www.uts-data.com")(0), 5980)
|
||||
' End If
|
||||
'Catch ex As Exception
|
||||
' UpdateInstallTip(20, $"Send Heartbeat Packet Fail:{ex.Message}")
|
||||
' Return False
|
||||
'End Try
|
||||
|
||||
remoteIP = New IPEndPoint(Dns.GetHostAddresses("www.uts-data.com")(0), 5980)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
UpdateInstallTip(20, $"Send Heartbeat Packet Fail:{ex.Message}")
|
||||
Return False
|
||||
End Try
|
||||
'UpdateInstallTip(20, $"remoteIP:{remoteIP.Address }")
|
||||
|
||||
'发送获取主机地址命令
|
||||
Try
|
||||
Dim packet() As Byte = _webPacker.FillPacket(CByte(UtsWebPacket.Commands.Heartbeat), BitConverter.GetBytes(0))
|
||||
_udpClient.Send(packet, packet.Length, remoteIP)
|
||||
Catch ex As Exception
|
||||
UpdateInstallTip(20, $"Send Heartbeat Packet Fail:{ex.Message}")
|
||||
Return False
|
||||
End Try
|
||||
''发送获取主机地址命令
|
||||
'Try
|
||||
' Dim packet() As Byte = _webPacker.FillPacket(CByte(UtsWebPacket.Commands.Heartbeat), BitConverter.GetBytes(0))
|
||||
' _udpClient.Send(packet, packet.Length, remoteIP)
|
||||
'Catch ex As Exception
|
||||
' UpdateInstallTip(20, $"Send Heartbeat Packet Fail:{ex.Message}")
|
||||
' Return False
|
||||
'End Try
|
||||
'UpdateInstallTip(20, $"send")
|
||||
|
||||
'等待回复
|
||||
Dim timeout As Integer = 5 * 1000
|
||||
Dim lastTime As Date = Now
|
||||
Dim length As Integer
|
||||
Dim recvBuf() As Byte = Nothing
|
||||
Dim recviceIp As New IPEndPoint(IPAddress.Any, 0)
|
||||
While (Now - lastTime).TotalMilliseconds < timeout
|
||||
length = _udpClient.Available
|
||||
If length > 0 Then
|
||||
recvBuf = _udpClient.Receive(recviceIp)
|
||||
Exit While
|
||||
End If
|
||||
''等待回复
|
||||
'Dim timeout As Integer = 5 * 1000
|
||||
'Dim lastTime As Date = Now
|
||||
'Dim length As Integer
|
||||
'Dim recvBuf() As Byte = Nothing
|
||||
'Dim recviceIp As New IPEndPoint(IPAddress.Any, 0)
|
||||
'While (Now - lastTime).TotalMilliseconds < timeout
|
||||
' length = _udpClient.Available
|
||||
' If length > 0 Then
|
||||
' recvBuf = _udpClient.Receive(recviceIp)
|
||||
' Exit While
|
||||
' End If
|
||||
|
||||
Threading.Thread.Sleep(1000)
|
||||
End While
|
||||
' Threading.Thread.Sleep(1000)
|
||||
'End While
|
||||
|
||||
If recvBuf Is Nothing Then
|
||||
UpdateInstallTip(20, $"Get Host Fail!")
|
||||
Return False
|
||||
End If
|
||||
'If recvBuf Is Nothing Then
|
||||
' UpdateInstallTip(20, $"Get Host Fail!")
|
||||
' Return False
|
||||
'End If
|
||||
'UpdateInstallTip(20, $"Rcvd")
|
||||
|
||||
''校验
|
||||
'Try
|
||||
' _webPacker.CheckPacket(recvBuf)
|
||||
'Catch ex As Exception
|
||||
' UpdateInstallTip(20, $"Check Packet Error:{ex.Message}")
|
||||
' Return False
|
||||
'End Try
|
||||
'UpdateInstallTip(20, $"Verfied")
|
||||
|
||||
'校验
|
||||
Try
|
||||
_webPacker.CheckPacket(recvBuf)
|
||||
Catch ex As Exception
|
||||
UpdateInstallTip(20, $"Check Packet Error:{ex.Message}")
|
||||
Return False
|
||||
End Try
|
||||
''处理回复
|
||||
'Dim cmdByte As Byte = recvBuf(UtsWebPacket.PacketBits.Command)
|
||||
|
||||
'处理回复
|
||||
Dim cmdByte As Byte = recvBuf(UtsWebPacket.PacketBits.Command)
|
||||
''不是回复心跳包
|
||||
'If cmdByte <> 1 Then Return False
|
||||
|
||||
'不是回复心跳包
|
||||
If cmdByte <> 1 Then Return False
|
||||
'Dim type As Integer
|
||||
'Dim ftpHost As String = ""
|
||||
'Dim dbHost As String = ""
|
||||
'For i As Integer = UtsWebPacket.PacketBits.Param + 4 To recvBuf.Count - 1
|
||||
' type = recvBuf(i)
|
||||
' length = recvBuf(i + 1)
|
||||
|
||||
Dim type As Integer
|
||||
Dim ftpHost As String = ""
|
||||
Dim dbHost As String = ""
|
||||
For i As Integer = UtsWebPacket.PacketBits.Param + 4 To recvBuf.Count - 1
|
||||
type = recvBuf(i)
|
||||
length = recvBuf(i + 1)
|
||||
' If length = 0 Then
|
||||
' UpdateInstallTip(20, $"Invalid data length!")
|
||||
' Return False
|
||||
' End If
|
||||
|
||||
If length = 0 Then
|
||||
UpdateInstallTip(20, $"Invalid data length!")
|
||||
Return False
|
||||
End If
|
||||
' Select Case type
|
||||
' Case 1 'ftp服务器地址
|
||||
' ftpHost = Encoding.UTF8.GetString(recvBuf, i + 2, length)
|
||||
' Case 2 'db服务器地址
|
||||
' dbHost = Encoding.UTF8.GetString(recvBuf, i + 2, length)
|
||||
' End Select
|
||||
' i += length + 1
|
||||
'Next
|
||||
|
||||
Select Case type
|
||||
Case 1 'ftp服务器地址
|
||||
ftpHost = Encoding.UTF8.GetString(recvBuf, i + 2, length)
|
||||
Case 2 'db服务器地址
|
||||
dbHost = Encoding.UTF8.GetString(recvBuf, i + 2, length)
|
||||
End Select
|
||||
i += length + 1
|
||||
Next
|
||||
'If String.IsNullOrEmpty(ftpHost) Then
|
||||
' UpdateInstallTip(20, $"Get FtpHost Fail,Host is null.")
|
||||
' Return False
|
||||
'Else
|
||||
' If String.Compare(UtsRegistry.FtpHost, ftpHost) <> 0 Then
|
||||
' UtsRegistry.FtpHost = ftpHost '写入注册表
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If String.IsNullOrEmpty(ftpHost) Then
|
||||
UpdateInstallTip(20, $"Get FtpHost Fail,Host is null.")
|
||||
Return False
|
||||
Else
|
||||
If String.Compare(UtsRegistry.FtpHost, ftpHost) <> 0 Then
|
||||
UtsRegistry.FtpHost = ftpHost '写入注册表
|
||||
End If
|
||||
End If
|
||||
'If String.IsNullOrEmpty(dbHost) Then
|
||||
' UpdateInstallTip(20, $"Get DbHost Fail,Host is null.")
|
||||
' Return False
|
||||
'Else
|
||||
' If String.Compare(UtsRegistry.DbHost, dbHost) <> 0 Then
|
||||
' UtsRegistry.DbHost = dbHost '写入注册表
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If String.IsNullOrEmpty(dbHost) Then
|
||||
UpdateInstallTip(20, $"Get DbHost Fail,Host is null.")
|
||||
Return False
|
||||
Else
|
||||
If String.Compare(UtsRegistry.DbHost, dbHost) <> 0 Then
|
||||
'//'Momo 2025-09-09 目前先写死服务器地址,后续版本再改为动态获取
|
||||
Dim ftpHost As String = "ftp.uts-data.com"
|
||||
Dim dbHost As String = "db.uts-data.com"
|
||||
UtsRegistry.DbHost = dbHost '写入注册表
|
||||
End If
|
||||
End If
|
||||
|
||||
UtsRegistry.FtpHost = ftpHost '写入注册表
|
||||
UpdateInstallTip(20, $"Get Uts Host Success!")
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -447,3 +447,4 @@ C:\Project\AUTS_Studio\obj\Debug\AUTS_Stu.1BA4C2FE.Up2Date
|
||||
C:\Project\AUTS_Studio\obj\Debug\AUTS_Studio.exe
|
||||
C:\Project\AUTS_Studio\obj\Debug\AUTS_Studio.xml
|
||||
C:\Project\AUTS_Studio\obj\Debug\AUTS_Studio.pdb
|
||||
G:\Git\AUTS\AUTS_Studio\obj\Debug\AUTS_Studio.exe.config
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -175,6 +175,10 @@
|
||||
<WCFMetadata Include="Connected Services\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AUTS_Win\AUTS_Win.vbproj">
|
||||
<Project>{31df2b00-ad65-48be-a18e-4f2cbde1188d}</Project>
|
||||
<Name>AUTS_Win</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\UTS_Core\UTS_Core.vbproj">
|
||||
<Project>{33c6456c-f00d-41ac-a6fb-db0601495c6a}</Project>
|
||||
<Name>UTS_Core</Name>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1706,6 +1706,16 @@ UTS_Core
|
||||
<param name="station">当前站位信息</param>
|
||||
<param name="result">当前测试结果</param>
|
||||
</member>
|
||||
<member name="M:UTS_Core.UTSModule.DbConnect.DbConnector.UpdateSnListTableToLocal(UTS_Core.Database.DbExecutor,System.String,System.Collections.Generic.List{System.String},System.Collections.Generic.List{System.String},System.Boolean)">
|
||||
<summary>
|
||||
更新SNList表指定字段名称的值
|
||||
</summary>
|
||||
<param name="db"></param>
|
||||
<param name="dbName"></param>
|
||||
<param name="filedNames"></param>
|
||||
<param name="filedValues"></param>
|
||||
<param name="saveCache"></param>
|
||||
</member>
|
||||
<member name="M:UTS_Core.UTSModule.DbConnect.DbConnector.UpdateLocalSnList(System.String,System.String,System.String,System.String,System.String)">
|
||||
<summary>
|
||||
更新本地SN总表的测试记录(用于处理组播写入Sn总表操作)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
5f5ba153640a4dff2f48567a68d3399ad14c6243da5c9356d1d73b1771bec3b4
|
||||
384cd63a033c7cce4d2758ed67c54e656ca20202fe3133d7e336e161ff5fae44
|
||||
|
||||
@@ -262,3 +262,62 @@ C:\Project\SQLliteReading\bin\Debug\System.Threading.Tasks.Extensions.xml
|
||||
C:\Project\SQLliteReading\bin\Debug\K4os.Compression.LZ4.xml
|
||||
C:\Project\SQLliteReading\bin\Debug\K4os.Hash.xxHash.xml
|
||||
C:\Project\SQLliteReading\obj\Debug\SQLliteR.4BCD7BEC.Up2Date
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\x64\SQLite.Interop.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\x86\SQLite.Interop.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\AUTS_ProductEntry.exe.config
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\AUTS_ProductEntry.exe
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\AUTS_ProductEntry.pdb
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\AUTS_ProductEntry.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\FlexCell.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\Newtonsoft.Json.Bson.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\Newtonsoft.Json.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\UTS_Core.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\SharpCompress.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\FluentFTP.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\TeeChart.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\MySql.Data.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\System.Memory.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\System.Buffers.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\ZstdSharp.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\Google.Protobuf.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\Zstandard.Net.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\K4os.Compression.LZ4.Streams.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\BouncyCastle.Crypto.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\Ubiety.Dns.Core.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\System.Numerics.Vectors.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\System.Runtime.CompilerServices.Unsafe.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\System.Threading.Tasks.Extensions.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\K4os.Compression.LZ4.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\K4os.Hash.xxHash.dll
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\UTS_Core.pdb
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\UTS_Core.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\UTS_Core.dll.config
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\Newtonsoft.Json.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\Newtonsoft.Json.Bson.pdb
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\Newtonsoft.Json.Bson.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\SharpCompress.pdb
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\FluentFTP.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\MySql.Data.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\System.Memory.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\System.Buffers.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\Google.Protobuf.pdb
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\Google.Protobuf.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\K4os.Compression.LZ4.Streams.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\System.Numerics.Vectors.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\System.Runtime.CompilerServices.Unsafe.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\System.Threading.Tasks.Extensions.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\K4os.Compression.LZ4.xml
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\K4os.Hash.xxHash.xml
|
||||
G:\Git\AUTS\SQLliteReading\obj\Debug\SQLliteReading.vbproj.AssemblyReference.cache
|
||||
G:\Git\AUTS\SQLliteReading\obj\Debug\AUTS_ProductEntry.exe.config
|
||||
G:\Git\AUTS\SQLliteReading\obj\Debug\AUTS_ProductEntry.FrmMain.resources
|
||||
G:\Git\AUTS\SQLliteReading\obj\Debug\AUTS_ProductEntry.Resources.resources
|
||||
G:\Git\AUTS\SQLliteReading\obj\Debug\SQLliteReading.vbproj.GenerateResource.cache
|
||||
G:\Git\AUTS\SQLliteReading\obj\Debug\SQLliteReading.vbproj.CoreCompileInputs.cache
|
||||
G:\Git\AUTS\SQLliteReading\obj\Debug\SQLliteR.4BCD7BEC.Up2Date
|
||||
G:\Git\AUTS\SQLliteReading\obj\Debug\AUTS_ProductEntry.exe
|
||||
G:\Git\AUTS\SQLliteReading\obj\Debug\AUTS_ProductEntry.xml
|
||||
G:\Git\AUTS\SQLliteReading\obj\Debug\AUTS_ProductEntry.pdb
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\AUTS_Win.exe
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\AUTS_Win.pdb
|
||||
G:\Git\AUTS\SQLliteReading\bin\Debug\AUTS_Win.exe.config
|
||||
|
||||
Binary file not shown.
@@ -173,6 +173,12 @@ Namespace UTSModule.Project
|
||||
project.InfoChanged = True
|
||||
End If
|
||||
|
||||
'Momo 2025-07-17 新增对项目有效期的修改检测
|
||||
MsgBox(DtpValidDate.Value)
|
||||
If String.Compare(project.EolDate.ToString, DtpValidDate.Value.ToString) <> 0 Then
|
||||
project.EolDate = DtpValidDate.Value
|
||||
project.InfoChanged = True
|
||||
End If
|
||||
|
||||
If project.Price <> NudPrice.Value Then
|
||||
project.Price = NudPrice.Value
|
||||
|
||||
@@ -859,8 +859,7 @@ Namespace UTSModule.Project
|
||||
Private Function ProjectExists(db As DbExecutor, dbName As String, project As ProjectInfo) As Boolean
|
||||
Dim tableName As String = DbTableModel.Customer.ProjectTable.TableName
|
||||
Dim colNames As String = $"Count(*)"
|
||||
Dim condition As String = $"`{DbTableModel.Customer.ProjectTable.ColNames.ProjectName}` = '{project.Name}' or
|
||||
`{DbTableModel.Customer.ProjectTable.ColNames.ID}` = '{project.Index}' "
|
||||
Dim condition As String = $"`{DbTableModel.Customer.ProjectTable.ColNames.ProjectName}` = '{project.Name}' or `{DbTableModel.Customer.ProjectTable.ColNames.ID}` = '{project.Index}' "
|
||||
Return CInt(db.ExecuteScalar(db.CmdHelper.DbSearch(dbName, colNames, tableName, condition))) > 0
|
||||
End Function
|
||||
|
||||
@@ -1045,9 +1044,7 @@ Namespace UTSModule.Project
|
||||
Private Function StationExists(db As DbExecutor, dbName As String, processStation As ProcessStation) As Boolean
|
||||
Dim tableName As String = DbTableModel.Customer.StationListTable.TableName
|
||||
Dim colName As String = "Count(*)"
|
||||
Dim condition As String = $"`{DbTableModel.Customer.StationListTable.ColNames.ProjectID}` = {processStation.ParentProject.Index}
|
||||
and (`{DbTableModel.Customer.StationListTable.ColNames.StationName}` = '{processStation.Name}'
|
||||
or `{DbTableModel.Customer.StationListTable.ColNames.ID}` = '{processStation.StationID}')"
|
||||
Dim condition As String = $"`{DbTableModel.Customer.StationListTable.ColNames.ProjectID}` = {processStation.ParentProject.Index} and (`{DbTableModel.Customer.StationListTable.ColNames.StationName}` = '{processStation.Name}' or `{DbTableModel.Customer.StationListTable.ColNames.ID}` = '{processStation.StationID}')"
|
||||
Return CInt(db.ExecuteScalar(db.CmdHelper.DbSearch(dbName, colName, tableName, condition))) > 0
|
||||
End Function
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user