| | |
| | | User useracc = [SELECT accountid, OSHFLG__c FROM user WHERE id = :UserInfo.getUserId()]; |
| | | OSHFLG = Useracc.OSHFLG__c; //lt 20230517 安徽两票制 add; |
| | | String accountId = Useracc.accountid; |
| | | List<Account> attList = [ |
| | | SELECT |
| | | id, |
| | | Name, |
| | | State_Master__c, |
| | | State_Master__r.Name, |
| | | Sales_Section__c, |
| | | Contract_Decide_Start_Date__c, |
| | | Contract_Decide_End_Date__c |
| | | List<Account> attList = [SELECT id,Name,State_Master__c,State_Master__r.Name,Sales_Section__c, |
| | | Contract_Decide_Start_Date__c,Contract_Decide_End_Date__c |
| | | FROM Account |
| | | WHERE |
| | | ParentId = :accountId |
| | | AND Contact_Type__c LIKE :ctype |
| | | WHERE ParentId = :accountId |
| | | AND Contact_Type__c like :ctype |
| | | AND Contract_Decide_Start_Date__c <= :Date.Today() |
| | | AND Contract_Decide_End_Date__c >= :Date.Today() |
| | | AND Secondary_contract__c = FALSE |
| | | AND Secondary_contract__c = false |
| | | AND OSH_Dealer__c = :OSHFLG //lt 20230517 安徽两票制 add |
| | | ]; |
| | | results.attList = attList; |
| | |
| | | } |
| | | |
| | | private static String makeSoql(String CateName, Date timetest, String accountId, String ctype) { |
| | | |
| | | String soql = 'SELECT id,Name,State_Master__c,State_Master__r.Name,Sales_Section__c,'; |
| | | soql += ' Contract_Decide_Start_Date__c,Contract_Decide_End_Date__c,OSH_Dealer__c FROM Account'; |
| | | soql += ' where ParentId = \'' + accountId + '\''; |