mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Реализована передача репортов вместе с задачами
This commit is contained in:
@@ -693,17 +693,41 @@ void RecognizeSystem::xmlParserQueryToDB(PacketType packetType, QByteArray array
|
||||
task.status = taskNode.toElement().attribute("status");
|
||||
|
||||
for(int j = 0; j < taskNode.childNodes().count(); j++)
|
||||
{//Неисправности
|
||||
QDomNode malfunctionNode = taskNode.childNodes().at(j);
|
||||
if(malfunctionNode.nodeName() == "malfunction")
|
||||
{
|
||||
{
|
||||
QDomNode malfOrReportNode = taskNode.childNodes().at(j);
|
||||
if(malfOrReportNode.nodeName() == "malfunction")
|
||||
{//Неисправность
|
||||
Malfunction malfunction;
|
||||
malfunction.num = malfunctionNode.toElement().attribute("num");
|
||||
malfunction.dmCode = malfunctionNode.toElement().attribute("dmCode");
|
||||
malfunction.description = malfunctionNode.toElement().attribute("description");
|
||||
malfunction.num = malfOrReportNode.toElement().attribute("num");
|
||||
malfunction.dmCode = malfOrReportNode.toElement().attribute("dmCode");
|
||||
malfunction.description = malfOrReportNode.toElement().attribute("description");
|
||||
|
||||
task.malfunctionList.append(malfunction);
|
||||
}
|
||||
else
|
||||
if(malfOrReportNode.nodeName() == "report")
|
||||
{//Отчет
|
||||
FIMReport report;
|
||||
report.id = malfOrReportNode.toElement().attribute("report_id").toInt();
|
||||
|
||||
for(int k = 0; k < malfOrReportNode.childNodes().count(); k++)
|
||||
{
|
||||
QDomNode reportItemNode = malfOrReportNode.childNodes().at(k);
|
||||
if(reportItemNode.nodeName() == "reportItem")
|
||||
{
|
||||
FIMReportItem reportItem;
|
||||
reportItem.id = reportItemNode.toElement().attribute("item_id").toInt();
|
||||
reportItem.text = reportItemNode.toElement().attribute("text");
|
||||
reportItem.procedure.title = reportItemNode.toElement().attribute("title");
|
||||
reportItem.procedure.dmCode = reportItemNode.toElement().attribute("dmCode");
|
||||
reportItem.procedure.result = reportItemNode.toElement().attribute("result");
|
||||
|
||||
report.itemList.append(reportItem);
|
||||
}
|
||||
}
|
||||
|
||||
task.report = report;
|
||||
}
|
||||
}
|
||||
|
||||
listTasks.append(task);
|
||||
|
||||
Reference in New Issue
Block a user