高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
force-app/main/default/classes/MaintenanceProductDataController.cls
@@ -153,6 +153,13 @@
                    mpdDetailsRecordsView[i].mpdrdd.Key_product_147P__c = mpdDetailsRecordsView[i].Prod.Key_product_147P__c;
                    mpdDetailsRecordsView[i].mpdrdd.Important_Endopartner_product__c = mpdDetailsRecordsView[i].Prod.Important_Endopartner_product__c;
                    //mpdDetailsRecordsView[i].mpdrdd.Tier1_Category__c = mpdDetailsRecordsView[i].Prod.Tier1_Category__c;
                    // FY23修改 WLIG-CFV4AV 重点产品维护(新)start
                    mpdDetailsRecordsView[i].mpdrdd.Key_product_155P__c = mpdDetailsRecordsView[i].Prod.Key_product_155P__c;
                    mpdDetailsRecordsView[i].mpdrdd.Celon_Product__c = mpdDetailsRecordsView[i].Prod.Celon_Product__c;
                    // FY23修改 WLIG-CFV4AV 重点产品维护(新)end
                    // 20221020 ljh SWAG-CJ98AJ start
                    mpdDetailsRecordsView[i].mpdrdd.suitDepartment__c = mpdDetailsRecordsView[i].Prod.suitDepartment__c;
                    // 20221020 ljh SWAG-CJ98AJ end
                }
                if(RecordTypeName.equals('GuranteeMain')){
                    Integer Entend_gurantee_period_all =  mpdDetailsRecordsView[i].Prod.Entend_gurantee_period_all__c.intValue();
@@ -350,6 +357,8 @@
            fsTempOld += 'FW';
        }
        fsTempOld += '_Old';
        System.debug('fsTemp: ' + fsTemp);
        System.debug(fsMap.get(fsTemp));
        // 20211103 ljh WLIG-BXE443 add end
        // 20211103 ljh WLIG-BXE443 update start
        // Schema.FieldSet fs = fsMap.get(RecordTypeName);
@@ -624,6 +633,18 @@
                                InsAfterDel.Dealer_special_Object_Old__c = ass.Prod.Dealer_special_Object__c;
                                InsAfterDel.Key_product_147P_Old__c = ass.Prod.Key_product_147P__c;
                                InsAfterDel.Important_Endopartner_product_Old__c = ass.Prod.Important_Endopartner_product__c;
                                // FY23修改 WLIG-CFV4AV 重点产品维护(新)start
                                InsAfterDel.Key_product_155P__c = ass.mpdrdd.Key_product_155P__c;
                                InsAfterDel.Key_product_155P_Old__c = ass.Prod.Key_product_155P__c;
                                InsAfterDel.Celon_Product__c = ass.mpdrdd.Celon_Product__c;
                                InsAfterDel.Celon_Product_Old__c = ass.Prod.Celon_Product__c;
                                // FY23修改 WLIG-CFV4AV 重点产品维护(新)end
                                // 20221020 ljh SWAG-CJ98AJ start
                                InsAfterDel.suitDepartment__c = ass.mpdrdd.suitDepartment__c;
                                InsAfterDel.suitDepartment_Old__c = ass.Prod.suitDepartment__c;
                                // 20221020 ljh SWAG-CJ98AJ end
                            }
                            when 'GuranteeMain'{
                                //InsAfterDel.RecordTypeName__c = 'GuranteeMain';
@@ -847,6 +868,14 @@
                                upMpd.Dealer_special_Object__c = ass.mpded.Dealer_special_Object__c;
                                upMpd.Key_product_147P__c = ass.mpded.Key_product_147P__c;
                                upMpd.Important_Endopartner_product__c = ass.mpded.Important_Endopartner_product__c;
                                // FY23修改 WLIG-CFV4AV 重点产品维护(新)start
                                upMpd.Key_product_155P__c = ass.mpded.Key_product_155P__c;
                                upMpd.Celon_Product__c = ass.mpded.Celon_Product__c;
                                // FY23修改 WLIG-CFV4AV 重点产品维护(新)end
                                // 20221020 ljh SWAG-CJ98AJ start
                                upMpd.suitDepartment__c = ass.mpded.suitDepartment__c;
                                // 20221020 ljh SWAG-CJ98AJ end
                            }
                            when 'GuranteeMain'{
                                upMpd.Entend_gurantee_period__c=ass.mpded.Entend_gurantee_period__c;
@@ -1184,7 +1213,9 @@
            soql += ' ,Intra_Trade_Gurantee_RMB_Date1__c,Intra_Trade_Gurantee_RMB_Date2__c, Intra_Trade_Gurantee_RMB_End_Date1__c, Intra_Trade_Gurantee_RMB_End_Date2__c ';
        }
        soql += '  FROM Product2  WHERE IsActive = true  ';
        // 带量采购 增加记录类型判断 start
        soql += ' AND RecordTypeId = \'' + System.Label.OLYProduct + '\'';
        // 带量采购 增加记录类型判断 end
        if(!String.isBlank(searchCateName)){
            soql += ' AND (Name like \'%' + String.escapeSingleQuotes(CateName.replaceAll('%', '\\%')) + '%\' or Asset_Model_No__c like \'%' + String.escapeSingleQuotes(CateName.replaceAll('%', '\\%')) + '%\')';
        }
@@ -1234,6 +1265,23 @@
        options.add(0, new SelectOption('x',''));
        return options;
    }
    // FY23修改 WLIG-CFV4AV 重点产品维护(新)start
    public List<SelectOption> getKeyProduct155POps() {
        List<SelectOption>  options = getPlickList('Maintenance_Product_Data_Details__c', 'Key_product_155P__c');
        // 显示为空白,值为'x',适用时保持原样
        options.add(0, new SelectOption('x',''));
        return options;
    }
    public List<SelectOption> getCelonProductOps() {
        List<SelectOption>  options = getPlickList('Maintenance_Product_Data_Details__c', 'Celon_Product__c');
        // 显示为空白,值为'x',适用时保持原样
        options.add(0, new SelectOption('x',''));
        return options;
    }
    // FY23修改 WLIG-CFV4AV 重点产品维护(新)end
    public List<SelectOption> getGuranteeTypeOps() {
        List<SelectOption>  options = getPlickList('Maintenance_Product_Data_Details__c', 'GuranteeType__c');
        // 显示为空白,值为'x',适用时保持原样