19626
2023-09-09 e14d6d0619330cad423f06493e3aa2371faa2a8f
force-app/main/default/classes/Add_Report.cls
@@ -64,10 +64,11 @@
      List<Account> aList = selectAccount(aId);
      if(reportId != null && reportId != ''){
         List<Report__c> rList = [select id, Daily_Report__c, RecordTypeId, Event_Id__c, Hospital_Department__c, Department_Class_Ref__c, Hospital_Reference__c, Date__c, Practitioner1__c, Practitioner2__c, Practitioner3__c, Practitioner4__c, Practitioner5__c, Opportunity1__c, Opportunity2__c, Opportunity3__c, Opportunity4__c, Opportunity5__c from Report__c where id =:reportId];
         if(rList.size() > 0){
            return rList.get(0).id;
         }
      //康康p课题需要修改字段类型 后续跟进(Opportunity5__c变为文本类型字段)
    //   List<Report__c> rList = [select id, Daily_Report__c, RecordTypeId, Event_Id__c, Hospital_Department__c, Department_Class_Ref__c, Hospital_Reference__c, Date__c, Practitioner1__c, Practitioner2__c, Practitioner3__c, Practitioner4__c, Practitioner5__c, Opportunity1__c, Opportunity2__c, Opportunity3__c, Opportunity4__c, Opportunity5__c from Report__c where id =:reportId];
    //   if(rList.size() > 0){
    //     return rList.get(0).id;
    //   }
      }
      Report__c r = new Report__c();
@@ -132,12 +133,13 @@
         if(opp3 != null && opp3 != ''){
            r.Opportunity3__c = opp3;
         }
    //康康p课题需要修改字段类型 后续跟进
         if(opp4 != null && opp4 != ''){
            r.Opportunity4__c = opp4;
         }
         if(opp5 != null && opp5 != ''){
            r.Opportunity5__c = opp5;
         }
    //   if(opp5 != null && opp5 != ''){
    //     r.Opportunity5__c = opp5;
    //   }
         r.Opportunity_Situation__c = '引合発生';
      }
      else{