chenluhua1980
8 天以前 498b8e781603ae007f41d0056b616f95140dd273
SourceCode/Bond/Servo/Model.cpp
@@ -631,6 +631,27 @@
      (void)pMaster;
      (void)port;
      if (pEquipment == nullptr || pJobDataS == nullptr) return;
      {
         const std::string& g1 = pJobDataS->getGlass1Id();
         const std::string& g2 = pJobDataS->getGlass2Id();
         std::string glassId;
         if (!g1.empty() && !g2.empty()) {
            glassId = g1 + "+" + g2;
         }
         else if (!g1.empty()) {
            glassId = g1;
         }
         else {
            glassId = g2;
         }
         const int slotNo = pJobDataS->getTargetSlotNo();
         m_hsmsPassive.withVariableLock([&] {
            m_hsmsPassive.setVariableValue("SubEqpName", pEquipment->getName().c_str());
            m_hsmsPassive.setVariableValue("SubEqpSlot", slotNo);
            m_hsmsPassive.setVariableValue("MaterialId", glassId.c_str());
            m_hsmsPassive.requestEventReportSend("GlassReceivedJob");
         });
      }
      const int eqId = pEquipment->getID();
      const int recipeId = pJobDataS->getMasterRecipe();
      std::string recipe = RecipeManager::getInstance().getPPIDById(recipeId);
@@ -663,6 +684,30 @@
         m_hsmsPassive.requestEventReportSend("RecipeChanged");
      });
   };
   masterListener.onJobSentOut = [&](void* pMaster, SERVO::CEquipment* pEquipment, int port, SERVO::CJobDataS* pJobDataS) {
      (void)pMaster;
      (void)port;
      if (pEquipment == nullptr || pJobDataS == nullptr) return;
      const std::string& g1 = pJobDataS->getGlass1Id();
      const std::string& g2 = pJobDataS->getGlass2Id();
      std::string glassId;
      if (!g1.empty() && !g2.empty()) {
         glassId = g1 + "+" + g2;
      }
      else if (!g1.empty()) {
         glassId = g1;
      }
      else {
         glassId = g2;
      }
      const int slotNo = pJobDataS->getSourceSlotNo();
      m_hsmsPassive.withVariableLock([&] {
         m_hsmsPassive.setVariableValue("SubEqpName", pEquipment->getName().c_str());
         m_hsmsPassive.setVariableValue("SubEqpSlot", slotNo);
         m_hsmsPassive.setVariableValue("MaterialId", glassId.c_str());
         m_hsmsPassive.requestEventReportSend("GlassSentOutJob");
      });
   };
   masterListener.onLoadPortStatusChanged = [&] (void* pMaster, SERVO::CEquipment* pEquipment, short status, __int64 data) {
      LOGE("<CModel>onLoadPortStatusChanged. status = %d", status);
      static std::map<int, short> s_prevPortStatus;