Inclusion Criteria:  Age ≥18 years old； Subjects must give informed consent to the study before the study entry and voluntarily sign a written informed consent form; Breast cancer subjects diagnosed by pathology; ER positive and HER2 over-expression; Advanced/metastatic breast cancer that has previously received treatment failure with trastuzumab (or trastuzumab biosimilar) regimen; Measurable and/or nonmeasurable disease; (Eastern Cooperative Oncology Group)ECOG Performance Status of 0-1; The estimated survival time is more than 3 months; Postmenopausal women; Adequate bone marrow, liver, kidney, and coagulation Bone Marrow Function; All previous treatment-related toxicities must be Common Terminology Criteria of Adverse Events (CTCAE ,version 5.0) ≤ Grade 2 at the time of randomization, except for hair loss, pigmentation, and long-term toxicity caused by radiotherapy (which cannot be recovered by the investigator's judgment)； Women patients of childbearing age (including their partners) have no pregnancy plan and voluntarily take effective contraceptive measures from the signing of the informed consent form to 3 months after the last medication.  Exclusion Criteria:  Patients with visceral crisis; Patients with the presence of spinal cord compression or brain, meningeal metastases; Patients who have been treated with a small molecule HER2 tyrosine kinase inhibitor (HER2-TKI) (medication course ≤2 weeks is excluded) Have received radiotherapy within 4 weeks prior to study； Have received chemotherapy for advanced breast cancer> 1 lines ; Patients with parenteral nutrition; malabsorption syndrome; or any condition possibly affecting drug absorption or inability to tolerate oral medications; Use of any drug that inhibits or induces hepatic metabolism of Hemay022 within 2 weeks prior to study and entire study duration; Patients who are known to have a history of allergies to Hemay022, lapatinib、AI (letrozole, exemestane) capecitabine or similar drugs; Left ventricular ejection fraction (LVEF) <50％; Positive blood for human immunodeficiency virus (HIV antibody); Positive hepatitis B surface antigen and HBV-DNA>upper limit of normal; Active hepatitis C virus (HCV) infection Patients with active infection requiring intravenous anti-infective treatment Arrhythmias requiring treatment ; Confirmed QTc prolongation (≥500ms) ; People with a history of interstitial lung disease that needs treatment, a history of radiation pneumonitis, or clinically active interstitial lung disease Have received other clinical trial drugs within 4 weeks before the study Major surgery or injury less than 4 weeks before the study The study period must be accompanied by other antitumor therapy，such as chemotherapy, targeted therapy, hormone therapy, immunotherapy, radiotherapy (except symptomatic local radiotherapy) Any other malignant cancer within 5 years with the exception of adequately treated cervical cancer in situ or basal and squamous cutaneous cell carcinomas Any condition that would make the subject inappropriate for this study by the investigator's judgment