설비 대시 보드 상세 데이터 수정
This commit is contained in:
@@ -12,7 +12,7 @@ namespace CHN
|
||||
{
|
||||
public Action<Machine, SimpleField> onCompleteInfo;
|
||||
public Action<Machine, SimpleField> onSimpleInfo;
|
||||
private Dictionary<string, CompleteInfo> machineTable = new();
|
||||
private Dictionary<string, DashBoardData> machineTable = new();
|
||||
private Dictionary<string, SimpleField> includeFields = new();
|
||||
private HashSet<string> samples = new();
|
||||
private List<SimpleField> simpleField;
|
||||
@@ -30,9 +30,9 @@ namespace CHN
|
||||
|
||||
machineTable.Add(GapRemove(machine.code), new());
|
||||
}
|
||||
var fileds = typeof(CompleteInfo).GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
var fileds = typeof(DashBoardData).GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
//simpleField= JsonConvert.DeserializeObject<List<SimpleField>>(simplePath);
|
||||
for (int i = 0; i < 6; i++)
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
samples.Add(fileds[i].Name);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ namespace CHN
|
||||
var name = GapRemove(id);
|
||||
if (machineTable.ContainsKey(name))
|
||||
{
|
||||
machineTable[name] = info;
|
||||
machineTable[name] = SetDashboardMQTTData(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,11 +105,72 @@ namespace CHN
|
||||
{
|
||||
return Regex.Replace(name, @"\s", "");
|
||||
}
|
||||
private DashBoardData SetDashboardMQTTData(CompleteInfo completeInfos)
|
||||
{
|
||||
var dashboardData = new DashBoardData();
|
||||
|
||||
dashboardData.wordno = completeInfos.wordno;
|
||||
dashboardData.workdt = completeInfos.workdt;
|
||||
dashboardData.daynight = completeInfos.daynight;
|
||||
dashboardData.workcd = completeInfos.workcd;
|
||||
dashboardData.worknm = completeInfos.worknm;
|
||||
dashboardData.workseq = completeInfos.workseq;
|
||||
dashboardData.statusnm = completeInfos.statusnm;
|
||||
dashboardData.itemcd = completeInfos.itemcd;
|
||||
dashboardData.itemdesc = completeInfos.itemdesc;
|
||||
dashboardData.pjtcd = completeInfos.pjtcd;
|
||||
dashboardData.matcd = completeInfos.matcd;
|
||||
dashboardData.cycletime = completeInfos.cycletime;
|
||||
dashboardData.cavity = completeInfos.cavity;
|
||||
dashboardData.planqty = completeInfos.planqty;
|
||||
dashboardData.goalqty = completeInfos.goalqty;
|
||||
dashboardData.workqty = completeInfos.workqty;
|
||||
dashboardData.goodqty = completeInfos.goodqty;
|
||||
dashboardData.badqty = completeInfos.badqty;
|
||||
dashboardData.badrate = completeInfos.badrate;
|
||||
dashboardData.efficiency = completeInfos.efficiency;
|
||||
dashboardData.progressrate = completeInfos.progressrate;
|
||||
dashboardData.sttm = completeInfos.sttm;
|
||||
dashboardData.totm = completeInfos.totm;
|
||||
|
||||
return dashboardData;
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
public class SimpleField
|
||||
{
|
||||
public string machineName;
|
||||
public CompleteInfo machineInfo;
|
||||
public DashBoardData machineInfo;
|
||||
public HashSet<string> simpleField;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DashBoardData
|
||||
{
|
||||
public string wordno;
|
||||
public string workdt;
|
||||
public string daynight;
|
||||
public string workcd;
|
||||
public string worknm;
|
||||
public string workseq;
|
||||
public string statusnm;
|
||||
public string itemcd;
|
||||
public string itemdesc;
|
||||
public string pjtcd;
|
||||
public string matcd;
|
||||
public string cycletime;
|
||||
public string cavity;
|
||||
public string planqty;
|
||||
public string goalqty;
|
||||
public string workqty;
|
||||
public string goodqty;
|
||||
public string badqty;
|
||||
public string badrate;
|
||||
public string efficiency;
|
||||
public string progressrate;
|
||||
public string sttm;
|
||||
public string totm;
|
||||
public string MOLDSEQ;
|
||||
public string MOLDCD;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user