| | |
| | | //页面输入检索条件 |
| | | public String searchByName{get;set;} |
| | | public String searchByAccount{get;set;} |
| | | public string searchByAWSDataIds{get;set;}// 20220221 PI改造 by Bright |
| | | public String memberType{get;set;} |
| | | public List<LineMember> lineList{get;set;} |
| | | public Integer lineNum{get;set;} |
| | | public String memberId{get;set;} |
| | | public String memberName{get;set;} |
| | | public String memberEmail{get;set;} |
| | | public String aws_data_id{get;set;}// 20220221 PI改造 by Bright |
| | | |
| | | public Boolean isError{get;set;} |
| | | public String staticResource{get; private set; }// 20220221 PI改造 by Bright |
| | | |
| | | public SearchMemberPageController() { |
| | | lineNum = Integer.valueOf(System.currentPageReference().getParameters().get('lineNum')); |
| | | staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));// 20220221 PI改造 by Bright |
| | | } |
| | | public void init(){ |
| | | lineList = new List<LineMember>(); |
| | |
| | | String soql = ''; |
| | | if(memberType == 'Contact'){ |
| | | |
| | | soql = 'select Id,Name,Email,Account.Name,AWS_Data_Id__c from Contact where Id!=null '; |
| | | soql = 'select Id,Name,Email,Account.Name from Contact where Id!=null '; |
| | | |
| | | // 20220221 PI改造 by Bright |
| | | // if(String.isNotBlank(searchByName)){ |
| | | // soql += 'and Name like \'%'+searchByName.trim()+'%\' '; |
| | | // } |
| | | if(String.isNotBlank(searchByName)){ |
| | | soql += 'and Name like \'%'+searchByName.trim()+'%\' '; |
| | | } |
| | | if(String.isNotBlank(searchByAccount)){ |
| | | soql += 'and Account.Name like \'%'+searchByAccount.trim()+'%\' '; |
| | | } |
| | | |
| | | // 20220221 PI改造 by Bright |
| | | if (!String.isBlank(searchByAWSDataIds)) { |
| | | soql += 'and AWS_Data_Id__c in ' + SoqlHelper.ToInCondition(searchByAWSDataIds.split(',')); |
| | | } |
| | | |
| | | soql += ' limit 200'; |
| | | System.debug('sql='+soql); |
| | | List<Contact> conList = Database.query(soql); |
| | | if(conList!=null&&conList.size()!=0){ |
| | | for(Contact con : conList){ |
| | |
| | | line.name = con.Name; |
| | | line.email = con.Email; |
| | | line.account = con.Account.Name; |
| | | line.aws_data_id = con.AWS_Data_Id__c; |
| | | lineList.add(line); |
| | | } |
| | | } |
| | |
| | | memberId = line.Id; |
| | | memberName = line.name; |
| | | memberEmail = line.email; |
| | | aws_data_id = line.aws_data_id; |
| | | System.debug(line.email); |
| | | i++; |
| | | } |
| | |
| | | public String name{get;set;} |
| | | public String email{get;set;} |
| | | public String account{get;set;} |
| | | public String aws_data_id{get;set;} |
| | | |
| | | } |
| | | } |