[성현모] JsonConvertTool 추가, 서머리 수량 버그수정

This commit is contained in:
SHM
2024-10-25 13:40:03 +09:00
parent 3c8bece6b6
commit b76569d02f
52 changed files with 1148 additions and 547 deletions

View File

@ -353,7 +353,7 @@ namespace SystemX.Net.XAdaptor.PC
return bResult;
}
public bool QueryTestList(uint nStationID, string strProdNo_C,
private bool QueryTestList(uint nStationID, string strProdNo_C,
string strTestType,
string strTestCode,
string strTestListVersion,
@ -685,8 +685,14 @@ QUERY_TESTLIST:
//
eFileSendRecvResult sendrecvResult = eFileSendRecvResult.None;
string strSetBackupFilePos = strFilePos;
string strSetBackupFileName = Path.GetFileName(strFilePos);
byte[] ucSetBackupFileData = null;
//TestListCntID
string strGetCurrentTestListID = (mgrPRODTestList as TProdTestListInfo).GetTestListCntID();
//(mgrPRODTestList as TProdTestListInfo).GetTestListCntID();
string strGetCurrentTestListID = CurrentTestList().GetTestListCntID();
string strSetBackupInfo = targetStationName + ";" +
targetTestListNo + ";" +
@ -698,11 +704,6 @@ QUERY_TESTLIST:
targetProdCode + ";" +
strGetCurrentTestListID;
string strSetBackupFilePos = strFilePos;
string strSetBackupFileName = Path.GetFileName(strFilePos);
byte[] ucSetBackupFileData = null;
//File Access Check
Stopwatch stWaitSendTime = new Stopwatch();
stWaitSendTime.Start();
@ -809,6 +810,20 @@ QUERY_TESTLIST:
}
}
//TestListCntID
//(mgrPRODTestList as TProdTestListInfo).GetTestListCntID();
strGetCurrentTestListID = CurrentTestList().GetTestListCntID();
strSetBackupInfo = targetStationName + ";" +
targetTestListNo + ";" +
targetProcNo_P + ";" +
targetProcNo_C + ";" +
targetTestType + ";" +
targetTestCode + ";" +
targetVersion + ";" +
targetProdCode + ";" +
strGetCurrentTestListID;
thisConnInfo.OnStreamTime();
if (sendrecvResult == eFileSendRecvResult.None)
@ -1102,7 +1117,7 @@ QUERY_TESTLIST:
return sendrecvResult;
}
public eFileSendRecvResult SendCustomFile(string strFilePos, bool bResultWait = false, ushort usPalletIndex = 0)
private eFileSendRecvResult SendCustomFile(string strFilePos, bool bResultWait = false, ushort usPalletIndex = 0)
{
if (thisConnInfo.ConnectStreamState == false)
return eFileSendRecvResult.StreamSocketNoConnect;

View File

@ -250,6 +250,12 @@ namespace SystemX.Net.XAdaptor.PC
case BASE_PROTOCOL.PROTOCOL_CODE.FILE_TRANSFER:
{
byte[] ucFileData = objData as byte[];
/*
string strGetTestListCntID = getHeader.objVarParam1[0].Data;
QueryTestListProcess(ucFileData, strGetTestListCntID);
*/
}
break;
case BASE_PROTOCOL.PROTOCOL_CODE.TRANSFER_RESULT:
@ -317,9 +323,15 @@ namespace SystemX.Net.XAdaptor.PC
if (getHeader.usPalletIndex == ushort.MaxValue)
{
string strGetTestListCntID = getHeader.objVarParam1[0].Data;
string strGetCallType = getHeader.objVarParam2[0].Data;
QueryTestListProcess(ucGetDatas, strGetTestListCntID);
if(strGetCallType.Contains("DOWNLOAD_TL"))
QueryTestListProcess(ucGetDatas, strGetTestListCntID);
else if (strGetCallType.Contains("CHECK_TL"))
QueryTestListCheckProcess(ucGetDatas);
else
QueryTestListProcess(ucGetDatas, strGetTestListCntID);
//
//Task<int> tkProcTestlist = new Task<int>(new Func<int>(() => QueryTestListProcess(ucGetDatas).Result));
//tkProcTestlist.Start();

View File

@ -26,6 +26,30 @@ namespace SystemX.Net.XAdaptor.PC
{
public partial class XAdaptorPC
{
private bool QueryTestListCheckProcess(byte[] ucGetDatas)
{
bool bSetResult = false;
try
{
DataSet QueryTestList = null;
QueryTestList = XDataArchive.DecompressByteToDataset(ucGetDatas);
(mgrPRODTestList as TProdTestListInfo).SetTestListDataSetCopy(QueryTestList);
}
catch
{
bSetResult = false;
}
finally
{
;//
}
return bSetResult;
}
private bool QueryTestListProcess(byte[] ucGetDatas, string strGetTestListCntID)
{
bool bSetResult = false;
@ -35,8 +59,8 @@ namespace SystemX.Net.XAdaptor.PC
DataSet QueryTestList = null;
QueryTestList = XDataArchive.DecompressByteToDataset(ucGetDatas);
(mgrPRODTestList as TProdTestListInfo).SetTestListDataSet(QueryTestList);
(mgrPRODTestList as TProdTestListInfo).SetTestListCntID(strGetTestListCntID);
(mgrPRODTestList as TProdTestListInfo).SetTestListDataSetCopy(QueryTestList);
(mgrPRODTestList as TProdTestListInfo).SetTestListDataSet();
if (XCommons.isHasRow(mgrPRODTestList.getTestListDataSet()))
{
@ -50,6 +74,9 @@ namespace SystemX.Net.XAdaptor.PC
int iCol2 = mgrPRODTestList.getTestListDataSet().Tables[0].Columns.IndexOf("FileName");
}
if(string.IsNullOrEmpty(strGetTestListCntID) == false)
(mgrPRODTestList as TProdTestListInfo).SetTestListCntID(strGetTestListCntID);
bSetResult = true;
}
@ -184,7 +211,7 @@ namespace SystemX.Net.XAdaptor.PC
if (bUseRandDistribution)
{
Random r = new Random((int)(DateTime.Now.Ticks));
Random r = new Random(Guid.NewGuid().GetHashCode());
nPortNumber = GetDistributionPort(r, nPortNumber);
}
@ -246,7 +273,7 @@ namespace SystemX.Net.XAdaptor.PC
if (bUseRandDistribution)
{
Random r = new Random((int)(DateTime.Now.Ticks));
Random r = new Random(Guid.NewGuid().GetHashCode());
nPortNumber = GetDistributionPort(r, nPortNumber);
}