LAPTOP-SNT8I5JK\Boounion
2025-09-01 a0022a4e7d8da7391db2926acd69b3c712135762
SourceCode/Bond/Servo/PortConfigurationDlg.cpp
@@ -317,6 +317,7 @@
   }
    // 获取 Grid 表格中 Slot 状态(第1~8行)
    /*
    for (int i = 1; i <= SLOT_MAX; ++i) {
        SERVO::CGlass* pGlass = (SERVO::CGlass*)m_wndGrid.GetItemData(i, 0);
        if (pGlass != nullptr) {
@@ -324,6 +325,7 @@
            ASSERT(pCheck);
            pGlass->setScheduledForProcessing(pCheck->GetCheck());
            pGlass->setType(static_cast<SERVO::MaterialsType>(config.nMaterialType));
            LOGI("i: %d, nMaterialType:%d", i, config.nMaterialType);
            SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
            pJobDataS->setLotId(config.strLotID.c_str());
@@ -359,6 +361,56 @@
            }
        }
    }
    */
    // 打勾为更新类型,暂时测试使用,原打色为是否加工
    for (int i = 1; i <= SLOT_MAX; ++i) {
        SERVO::CGlass* pGlass = (SERVO::CGlass*)m_wndGrid.GetItemData(i, 0);
        if (pGlass != nullptr) {
            CGridCellCheck* pCheck = dynamic_cast<CGridCellCheck*>(m_wndGrid.GetCell(i, 1));
            ASSERT(pCheck);
            pGlass->setScheduledForProcessing(TRUE);
            if (pCheck->GetCheck()) {
                pGlass->setType(static_cast<SERVO::MaterialsType>(config.nMaterialType));
                LOGI("i: %d, nMaterialType:%d", i, config.nMaterialType);
                SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
                pJobDataS->setLotId(config.strLotID.c_str());
                pJobDataS->setProductId(config.strProductID.c_str());
                pJobDataS->setOperationId(config.strOperationID.c_str());
                pJobDataS->setMaterialsType(config.nMaterialType);
                RecipeInfo stRecipeInfo = RecipeManager::getInstance().getRecipeByPPID(config.strRecipe);
                std::vector<DeviceRecipe> vecRecipeInfo = stRecipeInfo.vecDeviceList;
                for (const auto& info : vecRecipeInfo) {
                    const std::string& name = info.strDeviceName;
                    short nRecipeID = (short)info.nRecipeID;
                    if (name == EQ_NAME_EFEM) {
                        pJobDataS->setDeviceRecipeId(0, nRecipeID);
                    }
                    else if (name == EQ_NAME_BONDER1) {
                        pJobDataS->setDeviceRecipeId(1, nRecipeID);
                    }
                    else if (name == EQ_NAME_BONDER2) {
                        pJobDataS->setDeviceRecipeId(2, nRecipeID);
                    }
                    else if (name == EQ_NAME_BAKE_COOLING) {
                        pJobDataS->setDeviceRecipeId(3, nRecipeID);
                    }
                    else if (name == EQ_NAME_VACUUMBAKE) {
                        pJobDataS->setDeviceRecipeId(4, nRecipeID);
                    }
                    else if (name == EQ_NAME_MEASUREMENT) {
                        pJobDataS->setDeviceRecipeId(5, nRecipeID);
                    }
                }
            }
        }
    }
    GetDlgItem(IDC_BUTTON_PROCESS_START)->EnableWindow(TRUE);
    GetDlgItem(IDC_BUTTON_PROCESS_CANCEL)->EnableWindow(TRUE);