19626
2023-10-31 fd9df05c48c09b4d7f39a3b401882bda226dedea
force-app/main/default/classes/OpportunityService.cls
@@ -10,7 +10,7 @@
  // IdStr 招投标的ID
  //hospital 医院的ID
  @AuraEnabled
  public  static string GetNormalProductDataSearch(String noStr,String accountId,String IdStr,String hospital,String[] hospitalArr, String departments) {
  public  static string GetNormalProductDataSearch(String noStr,String accountId,String IdStr,String inputText,String hospital,String[] hospitalArr, String departments) {
    String sql = 'select ';
    // sql += CommonUtils.GetSqlToPorps(Opportunity.SObjectType);
@@ -25,9 +25,13 @@
      sql += ' and Opportunity_No__c = :noStr';
    }
    if(hospitalArr!= null && hospitalArr.size() > 0)
    // if(hospitalArr!= null && hospitalArr.size() > 0)
    // {
    //   sql += ' and Hospital__c in :hospitalArr';
    // }
    if(inputText!= null && inputText!= '')
    {
      sql += ' and Hospital__c in :hospitalArr';
      sql += ' and HP_Name__c LIKE  \'%' + inputText + '%\' ';
    }
    if(hospital != null && hospital != '' && hospital != ' ')
    {
@@ -137,6 +141,7 @@
    //DB202305552102  you 202305230 除了目标的都看
    //DB202309608863  chenjingwu 2023/10/11 招标项目待关联询价中排除变更用户询价
    sql += ' and If_Account_Change__c = false';
    sql += ' and ((SFDCLast_Process_Date__c = null and stageName not in (\'出荷\',\'完了\',\'削除\',\'敗戦\')) or SFDCLast_Process_Date__c >= LAST_N_DAYS:730)';
    //DB202309608863  chenjingwu 2023/10/11 招标项目待关联询价中排除变更用户询价
    sql += ' order by stageName limit 200';
    System.debug('sql2:'+sql);