沙世明
2022-04-08 eeb7c0a2d6f037d515bb822d739036b69c4dc73a
force-app/main/default/classes/LeadIntentionController.cls
@@ -137,12 +137,16 @@
        isActiveFormula = '有效';
        staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Inquiry_form__c')); 
    }
    public PageReference init() {
        system.debug('test:12345');
        onlyOpp = false;
        String uidParam = System.currentPageReference().getParameters().get('uid');
        // String uidParam = System.currentPageReference().getParameters().get('uid');
        //首页产品咨询单数量修改 thh 20220406 start
        String uidParam = UserInfo.getUserId();
        //首页产品咨询单数量修改 thh 20220406 end
        if (uidParam != null){
            User u = [select Id, FirstName, LastName from User where Id = :uidParam];
            ownerSearch = u.LastName + ' ' + u.FirstName;
@@ -162,7 +166,7 @@
                                    text, condition, value, text2, condition2, value2, text3, condition3, value3);
        String soqlForMoney = soqlForMoneyWithoutSort + ' order by  CreatedDate   desc limit ' + Integer.valueOf(System.Label.TotalLimit);
        System.debug('soqlWithoutSort:' + soqlWithoutSort);
        system.debug('aaaaaaaaaa'+soql);
        system.debug('aaaaaaaaaa:'+soql);
        system.debug('bbbbbbb:'+soqlForMoney);
        List<Inquiry_form__c> queryList = Database.query(soql);
        List<Inquiry_form__c> queryListForMoney = Database.query(soqlForMoney);
@@ -170,6 +174,7 @@
        system.debug('ooooooooo:'+queryListForMoney);
        system.debug('ppppppppp的size():'+queryList.size());
        system.debug('ooooooooo的size():'+queryListForMoney.size());
        this.makeOppRecordsForView(queryList, queryListForMoney);
        
        this.sortKey = '0';
@@ -180,6 +185,7 @@
        
        System.debug('最后取得:'+pclInfos.size());
        pclCount = pclInfos.size();
        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '取得最近的 ' + pclCount + ' 条数据'));
        List<String> a = new List<String>();
@@ -233,11 +239,9 @@
        
        String soql = soqlWithoutSort
                + ' order by ' + this.columus[Integer.valueOf(this.sortKey)] + ' ' + (this.sortOrderAsc == true ? 'asc nulls first' : 'desc nulls last') + ' limit ' + Integer.valueOf(limits);
system.debug('sort:::::'+ soql);
        List<Inquiry_form__c> queryList = Database.query(soql);
        String soqlForMoney = soqlForMoneyWithoutSort 
                + ' order by ' + this.columus[Integer.valueOf(this.sortKey)] + ' ' + (this.sortOrderAsc == true ? 'asc nulls first' : 'desc nulls last')+ ' limit ' + Integer.valueOf(System.Label.TotalLimit) ;
system.debug('sort:::::'+ soqlForMoney);
        List<Inquiry_form__c> queryListForMoney = Database.query(soqlForMoney);
        
        
@@ -390,13 +394,14 @@
                soql += ' and Hospital_Name__r.Name like \'%' + v + '%\'';
            }
        }
        //首页产品咨询单数量修改 thh 20220406 start
        if (!String.isBlank(ownerStr)) {
            String[] vals = ownerStr.split(' ');
            for (String v : vals) {
                soql += ' and Name like \'%' + v + '%\'';
            }
            // String[] vals = ownerStr.split(' ');
            // for (String v : vals) {
                soql += ' and owner.Name like \'%' + ownerStr + '%\'';
            // }
        }
        //首页产品咨询单数量修改 thh 20220406 end
        soql += this.makeTextSql(txt, con, val);
        soql += this.makeTextSql(txt2, con2, val2);
        soql += this.makeTextSql(txt3, con3, val3);