| | |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | CGlass* pGlass = (CGlass*)m_slot[i].getContext(); |
| | | if (pGlass != nullptr && compareJobData(pJobDataB, pGlass->getJobDataS())) { |
| | | // 取片成功后,回填当前路径节点的离开时间(优先匹配尚未离开的节点)。 |
| | | CPath* pPath = pGlass->getPath(); |
| | | if (pPath != nullptr) { |
| | | CPath* pScan = pPath->getHeadPath(); |
| | | CPath* pOpenNode = nullptr; |
| | | const unsigned int slotNo = (unsigned int)m_slot[i].getNo(); |
| | | const unsigned int unitNo = getSlotUnit((int)slotNo); |
| | | while (pScan != nullptr) { |
| | | if (pScan->getEqID() == m_nID |
| | | && pScan->getUnit() == unitNo |
| | | && pScan->getSlot() == slotNo |
| | | && pScan->getOutTime() == 0) { |
| | | pOpenNode = pScan; |
| | | } |
| | | pScan = pScan->getNext(); |
| | | } |
| | | if (pOpenNode != nullptr) { |
| | | pOpenNode->setOutTime(CToolUnits::getTimestamp()); |
| | | } |
| | | } |
| | | |
| | | pContext = pGlass; |
| | | if (pGlass != nullptr) pGlass->addRef(); |
| | | m_slot[i].setContext(nullptr); |