LAPTOP-SNT8I5JK\Boounion
2025-09-22 9e9e63ef44ff672989d7b78bf37afb2054267671
1.完善工艺批次逻辑;
2.PortType保存到本地,不再同步到efem
已修改12个文件
173 ■■■■■ 文件已修改
SourceCode/Bond/Servo/CCjPage2.h 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CControlJobManagerDlg.cpp 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CMaster.cpp 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CMaster.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CPagePortProperty.cpp 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Configuration.cpp 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Configuration.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Model.cpp 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Model.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/ProcessJob.cpp 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/ProcessJob.h 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/x64/Debug/EqsGraph.ini 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CCjPage2.h
@@ -5,14 +5,6 @@
struct PJWarp {
    BOOL addToCj;
    void* pj;
    int port;
    BOOL checkSlot[8];
    int material[8];
};
// CPjPage1 对话框
class CCjPage2 : public CCjPageBase
SourceCode/Bond/Servo/CControlJobManagerDlg.cpp
@@ -475,7 +475,17 @@
        if (!bCheck) continue;
        SERVO::CProcessJob* pScr = (SERVO::CProcessJob*)item.pj;
        pScr->setPjWarp(item);
        pScr->setLotId("LotID1");
        pScr->setProductId("ProductId1");
        pScr->setOperationId("OperationId");
        pScr->setRecipe(SERVO::RecipeMethod::NoTuning, pScr->recipeSpec());
        SERVO::CProcessJob * pj = new SERVO::CProcessJob(pScr->id());
        pj->setPjWarp(item);
        pj->setLotId("LotID1");
        pj->setProductId("ProductId1");
        pj->setOperationId("OperationId");
        pj->setRecipe(SERVO::RecipeMethod::NoTuning, pScr->recipeSpec());
        std::vector<SERVO::CarrierSlotInfo> carriers;
@@ -560,6 +570,7 @@
    for (int p = 0; p < 4; p++) {
        if (m_pjWarps[p].port == -1) continue;
        ASSERT(0 <= m_pjWarps[p].port && m_pjWarps[p].port <= 3);
        SERVO::CLoadPort* pLoadPort = pPorts[m_pjWarps[p].port];
        for (int i = 0; i < SLOT_MAX; ++i) {
            SERVO::CSlot* pSlot = pLoadPort->getSlot(i);
@@ -579,9 +590,9 @@
                pGlass->setType(static_cast<SERVO::MaterialsType>(m_pjWarps[p].material[i]));
                SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
                pJobDataS->setLotId("LotID1");
                pJobDataS->setProductId("ProductId1");
                pJobDataS->setOperationId("OPerationId");
                pJobDataS->setLotId(pj->getLotId().c_str());
                pJobDataS->setProductId(pj->getProductId().c_str());
                pJobDataS->setOperationId(pj->getOperationId().c_str());
                pJobDataS->setMaterialsType(m_pjWarps[p].material[i]);
                pJobDataS->setMasterRecipe(nRecipeID);
SourceCode/Bond/Servo/CMaster.cpp
@@ -1541,12 +1541,52 @@
                            carrier->contexts.push_back((void*)pGlass);
                            if (pGlass != nullptr) {
                                pGlass->setProcessJob(pj);
                                PJWarp& jpWarp = pj->getPjWarp();
                                int nRecipeID = RecipeManager::getInstance().getIdByPPID(pj->recipeSpec());
                                RecipeInfo stRecipeInfo = RecipeManager::getInstance().getRecipeByPPID(pj->recipeSpec());
                                std::vector<DeviceRecipe> vecRecipeInfo = stRecipeInfo.vecDeviceList;
                                pGlass->setScheduledForProcessing(jpWarp.checkSlot[slot-1]);
                                pGlass->setType(static_cast<SERVO::MaterialsType>(jpWarp.material[slot-1]));
                                SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
                                if (pJobDataS != nullptr) {
                                    SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
                                    pJobDataS->setLotId(pj->getLotId().c_str());
                                    pJobDataS->setProductId(pj->getProductId().c_str());
                                    pJobDataS->setOperationId(pj->getOperationId().c_str());
                                    pJobDataS->setMaterialsType(jpWarp.material[slot - 1]);
                                    pJobDataS->setMasterRecipe(nRecipeID);
                                    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);
                    }
                }
                                }
                            }
                        }
                    }
                }
            }
            
            if (m_listener.onLoadPortStatusChanged != nullptr) {
@@ -2271,7 +2311,15 @@
        return 0;
    }
    void CMaster::setPortType(unsigned int index, BOOL enable, int type, int mode,
    void CMaster::setPortType(unsigned int index, int type)
    {
        ASSERT(index < 4);
        int eqid[] = { EQ_ID_LOADPORT1, EQ_ID_LOADPORT2, EQ_ID_LOADPORT3, EQ_ID_LOADPORT4};
        CLoadPort* pPort = (CLoadPort*)getEquipment(eqid[index]);
        pPort->localSetPortType((SERVO::PortType)type);
    }
    void CMaster::setPortTypeEx(unsigned int index, BOOL enable, int type, int mode,
        int cassetteType, int transferMode, BOOL autoChangeEnable)
    {
        ASSERT(index < 4);
SourceCode/Bond/Servo/CMaster.h
@@ -107,8 +107,9 @@
        int abortCurrentTask();
        int restoreCurrentTask();
        int resendCurrentTask();
        void setPortType(unsigned int index, BOOL enable, int type, int mode,
        void setPortTypeEx(unsigned int index, BOOL enable, int type, int mode,
            int cassetteType, int transferMode, BOOL autoChangeEnable);
        void setPortType(unsigned int index, int type);
        void setPortCassetteType(unsigned int index, SERVO::CassetteType type);
        void setPortEnable(unsigned int index, BOOL bEnable);
        void setCompareMapsBeforeProceeding(BOOL bCompare);
SourceCode/Bond/Servo/CPagePortProperty.cpp
@@ -196,8 +196,12 @@
    CMsgDlg msgDlg("请等待", "正在操作,请等待...");
    msgDlg.SetData((DWORD_PTR)this);
    // 修改为只保存在本地配置
    ASSERT(m_pPort != nullptr);
    int index = ((CComboBox*)GetDlgItem(IDC_COMBO_PORT_TYPE))->GetCurSel();
    theApp.m_model.setPortType(m_pPort->getIndex(), SERVO::PortType(index + 1));
    /*
    m_pPort->setPortType(SERVO::PortType(index + 1), [&](int code) -> int {
        Sleep(100);
        CString strMsg;
@@ -234,6 +238,7 @@
    msgDlg.DoModal();
    g_nMsgDlgShow = 1;
    */
}
void CPagePortProperty::OnCbnSelchangeComboPortMode()
SourceCode/Bond/Servo/Configuration.cpp
@@ -136,6 +136,16 @@
    return TRUE;
}
BOOL CConfiguration::setPortType(unsigned int index, int type)
{
    if (index >= 4) return FALSE;
    if (type < 1 || 7 < type) return FALSE;
    static char* pszSection[] = { "Port1", "Port2", "Port3", "Port4" };
    WritePrivateProfileString(pszSection[index], _T("Type"), std::to_string(type).c_str(), m_strFilepath);
    return true;
}
BOOL CConfiguration::setPortCassetteType(unsigned int index, int cassetteType)
{
    if (index >= 4) return FALSE;
SourceCode/Bond/Servo/Configuration.h
@@ -24,6 +24,7 @@
    int getFilterMode();
    BOOL getPortParms(unsigned int index, BOOL& bEnable, int& type, int& mode,
        int& cassetteType, int& transferMode, BOOL& bAutoChangeEnable);
    BOOL setPortType(unsigned int index, int type);
    BOOL setPortCassetteType(unsigned int index, int cassetteType);
    BOOL setPortEnable(unsigned int index, BOOL bEnable);
    BOOL isCompareMapsBeforeProceeding();
SourceCode/Bond/Servo/Model.cpp
@@ -49,7 +49,7 @@
    for (int i = 0; i < 4; i++) {
        m_configuration.getPortParms(i, portEnable, portType, portMode,
            cassetteType, transferMode, autoChangeEnable);
        m_master.setPortType(i, portEnable, portType, portMode, cassetteType,
        m_master.setPortTypeEx(i, portEnable, portType, portMode, cassetteType,
            transferMode, autoChangeEnable);
        int seed = m_configuration.getPortCassetteSnSeed(i + 1);
@@ -57,6 +57,12 @@
    }
}
void CModel::setPortType(unsigned int index, SERVO::PortType type)
{
    m_master.setPortType(index, (int)type);
    m_configuration.setPortType(index, (int)type);
}
void CModel::setPortCassetteType(unsigned int index, SERVO::CassetteType type)
{
    m_master.setPortCassetteType(index, type);
SourceCode/Bond/Servo/Model.h
@@ -15,6 +15,7 @@
    SERVO::CMaster& getMaster();
    void setWorkDir(const char* pszWorkDir);
    void loadPortParams();
    void setPortType(unsigned int index, SERVO::PortType type);;
    void setPortCassetteType(unsigned int index, SERVO::CassetteType type);
    void setPortEnable(unsigned int index, BOOL bEnable);
    int init();
SourceCode/Bond/Servo/ProcessJob.cpp
@@ -466,4 +466,44 @@
        return nullptr;
    }
    void CProcessJob::setLotId(std::string strLotId)
    {
        m_strLotId = strLotId;
    }
    std::string& CProcessJob::getLotId()
    {
        return m_strLotId;
    }
    void CProcessJob::setProductId(std::string strProductId)
    {
        m_strProductId = strProductId;
    }
    std::string& CProcessJob::getProductId()
    {
        return m_strProductId;
    }
    void CProcessJob::setOperationId(std::string strOperationId)
    {
        m_strOperationId = strOperationId;
    }
    std::string& CProcessJob::getOperationId()
    {
        return m_strOperationId;
    }
    void CProcessJob::setPjWarp(PJWarp pjWarp)
    {
        m_pjWarp = pjWarp;
    }
    PJWarp& CProcessJob::getPjWarp()
    {
        return m_pjWarp;
    }
}
SourceCode/Bond/Servo/ProcessJob.h
@@ -8,6 +8,16 @@
#include <chrono>
#include <optional>
struct PJWarp {
    BOOL addToCj;
    void* pj;
    int port;
    BOOL checkSlot[8];
    int material[8];
};
namespace SERVO {
    /// PJ 生命周期(贴近 E40 常见状态)
    enum class PJState : uint8_t {
@@ -215,6 +225,22 @@
        // 错误列表
        std::vector<ValidationIssue> m_issues;
        // 新增
        std::string m_strLotId;
        std::string m_strProductId;
        std::string m_strOperationId;
        PJWarp m_pjWarp;
    public:
        void setLotId(std::string strLotId);
        std::string& getLotId();
        void setProductId(std::string strProductId);
        std::string& getProductId();
        void setOperationId(std::string strOperationId);
        std::string& getOperationId();
        void setPjWarp(PJWarp pjWarp);
        PJWarp& getPjWarp();
    };
}
SourceCode/Bond/x64/Debug/EqsGraph.ini
@@ -1,6 +1,6 @@
[LoadPort 1]
Left=23
Top=88
Top=87
[LoadPort 2]
Left=23
Top=437