설비 대시 보드 상세 데이터 수정
This commit is contained in:
@@ -200491,7 +200491,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 0.9411765}
|
m_Color: {r: 1, g: 1, b: 1, a: 0.9411765}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 0
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ public class MQTT : Protocol, ISingle, IOptionable
|
|||||||
public string workqty;
|
public string workqty;
|
||||||
public string goodqty;
|
public string goodqty;
|
||||||
public string badqty;
|
public string badqty;
|
||||||
public string adrate;
|
public string badrate;
|
||||||
public string efficiency;
|
public string efficiency;
|
||||||
public string progressrate;
|
public string progressrate;
|
||||||
public string sttm;
|
public string sttm;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ namespace CHN
|
|||||||
|
|
||||||
public void DetailView(Machine machine, SimpleField data)
|
public void DetailView(Machine machine, SimpleField data)
|
||||||
{
|
{
|
||||||
machineDashboardTable[machine].DetailInfoView(data);
|
machineDashboardTable[machine].DetailInfoView(machine, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CurrentDashoboardClose()
|
public void CurrentDashoboardClose()
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ namespace CHN
|
|||||||
public UI_MachineInfoItem prf_InfoItem;
|
public UI_MachineInfoItem prf_InfoItem;
|
||||||
public HashSet<UI_MachineInfoItem> infoItems = new();
|
public HashSet<UI_MachineInfoItem> infoItems = new();
|
||||||
private FieldInfo[] fields;
|
private FieldInfo[] fields;
|
||||||
|
private FieldInfo[] typeFields;
|
||||||
private Dictionary<FieldInfo, UI_MachineInfoItem> machineInfoItem = new();
|
private Dictionary<FieldInfo, UI_MachineInfoItem> machineInfoItem = new();
|
||||||
private HashSet<string> simpleviewField = new();
|
private HashSet<string> simpleviewField = new();
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@ namespace CHN
|
|||||||
Button_Detail.onClick.AddListener(OnClickDetail);
|
Button_Detail.onClick.AddListener(OnClickDetail);
|
||||||
ChangeTabButtonState(Button_Simple);
|
ChangeTabButtonState(Button_Simple);
|
||||||
SetActive(false);
|
SetActive(false);
|
||||||
fields = typeof(CompleteInfo).GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
fields = typeof(DashBoardData).GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SimpleViewItem(string field, bool ison)
|
private void SimpleViewItem(string field, bool ison)
|
||||||
@@ -171,10 +172,14 @@ namespace CHN
|
|||||||
OnChangedLock(false);
|
OnChangedLock(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DetailInfoView(SimpleField simpleField)
|
public void DetailInfoView(Machine machine, SimpleField simpleField)
|
||||||
{
|
{
|
||||||
foreach (var field in fields)
|
foreach (var field in fields)
|
||||||
{
|
{
|
||||||
|
var notItemData = CheckData(machine, field);
|
||||||
|
if (notItemData == field.Name)
|
||||||
|
continue;
|
||||||
|
|
||||||
var item = CreateItem(field);
|
var item = CreateItem(field);
|
||||||
item.transform.SetParent(scrollView_DetailInfo.content);
|
item.transform.SetParent(scrollView_DetailInfo.content);
|
||||||
item.transform.SetAsLastSibling();
|
item.transform.SetAsLastSibling();
|
||||||
@@ -184,8 +189,28 @@ namespace CHN
|
|||||||
item.SetAcitveCheckBox(true);
|
item.SetAcitveCheckBox(true);
|
||||||
item.ToggleIsOn(ison);
|
item.ToggleIsOn(ison);
|
||||||
}
|
}
|
||||||
|
|
||||||
OnChangedLock(true);
|
OnChangedLock(true);
|
||||||
}
|
}
|
||||||
|
private string CheckData(Machine machine, FieldInfo field)
|
||||||
|
{
|
||||||
|
var data = "";
|
||||||
|
|
||||||
|
if (machine.typeOptions[1].Contains("엔겔"))
|
||||||
|
{
|
||||||
|
data = "MOLDCD";
|
||||||
|
}
|
||||||
|
else if (machine.typeOptions[1].Contains("엔겔"))
|
||||||
|
{
|
||||||
|
data = "MOLDSEQ";
|
||||||
|
}
|
||||||
|
else if (machine.typeOptions[1].Contains("엔겔"))
|
||||||
|
{
|
||||||
|
data = "MOLDCD";
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
private UI_MachineInfoItem CreateItem(FieldInfo field)
|
private UI_MachineInfoItem CreateItem(FieldInfo field)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace CHN
|
|||||||
{
|
{
|
||||||
public Action<Machine, SimpleField> onCompleteInfo;
|
public Action<Machine, SimpleField> onCompleteInfo;
|
||||||
public Action<Machine, SimpleField> onSimpleInfo;
|
public Action<Machine, SimpleField> onSimpleInfo;
|
||||||
private Dictionary<string, CompleteInfo> machineTable = new();
|
private Dictionary<string, DashBoardData> machineTable = new();
|
||||||
private Dictionary<string, SimpleField> includeFields = new();
|
private Dictionary<string, SimpleField> includeFields = new();
|
||||||
private HashSet<string> samples = new();
|
private HashSet<string> samples = new();
|
||||||
private List<SimpleField> simpleField;
|
private List<SimpleField> simpleField;
|
||||||
@@ -30,9 +30,9 @@ namespace CHN
|
|||||||
|
|
||||||
machineTable.Add(GapRemove(machine.code), new());
|
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);
|
//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);
|
samples.Add(fileds[i].Name);
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ namespace CHN
|
|||||||
var name = GapRemove(id);
|
var name = GapRemove(id);
|
||||||
if (machineTable.ContainsKey(name))
|
if (machineTable.ContainsKey(name))
|
||||||
{
|
{
|
||||||
machineTable[name] = info;
|
machineTable[name] = SetDashboardMQTTData(info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,11 +105,72 @@ namespace CHN
|
|||||||
{
|
{
|
||||||
return Regex.Replace(name, @"\s", "");
|
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 class SimpleField
|
||||||
{
|
{
|
||||||
public string machineName;
|
public string machineName;
|
||||||
public CompleteInfo machineInfo;
|
public DashBoardData machineInfo;
|
||||||
public HashSet<string> simpleField;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user