| | |
| | | Json::Value n(Json::objectValue); |
| | | n["eq_id"] = p->getEqID(); |
| | | n["unit"] = p->getUnit(); |
| | | n["slot"] = p->getUnit(); |
| | | put_ull_as_str(n, "time_in", static_cast<unsigned long long>(p->getInTime())); |
| | | put_ull_as_str(n, "time_out", static_cast<unsigned long long>(p->getOutTime())); |
| | | n["processed"] = p->isProcessEnd() ? true : false; |
| | |
| | | // 基本 |
| | | g.setID(JStr(root, "id").c_str()); |
| | | g.setType(static_cast<MaterialsType>(JInt(root, "materials", 0))); |
| | | g.getBuddyId() = JStr(root, "buddy_id"); |
| | | g.setBuddyId(JStr(root, "buddy_id")); |
| | | g.setScheduledForProcessing(JBool(root, "scheduled") ? TRUE : FALSE); |
| | | g.m_failReason = JStr(root, "fail_reason"); |
| | | g.setOriginPort(JInt(root, "origin_port", 0), JInt(root, "origin_slot", 0)); |
| | |
| | | for (const auto& n : root["path"]) { |
| | | unsigned eq = JUInt(n, "eq_id", 0); |
| | | unsigned unit = JUInt(n, "unit", 0); |
| | | g.addPath(eq, unit); |
| | | unsigned slot = JUInt(n, "slot", 0); |
| | | g.addPath(eq, unit, slot); |
| | | |
| | | CPath* tail = nullptr; |
| | | if (auto head = g.getPath()) tail = head->getTailPath(); |