19626
2023-05-31 5ce27d69c427ca16f37ff16d53758d0e877a88f9
force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -617,6 +617,7 @@
         }
         // lostReportId = report.lostReport.id;
         system.debug('save---end:');
         messageMap.put('LostReport',JSON.serialize(report));
      }catch (Exception ex) {
         Database.rollback(sp);
         // 这里需要写一些报错信息
@@ -773,6 +774,8 @@
      @AuraEnabled
      public Boolean bool;
      @AuraEnabled
      public String productName;
      @AuraEnabled
      public List<Map<String, String>> productOptions = new List<Map<String, String>>();
      public PCLLostProducts() {
         this.lineNo2 = 0;
@@ -815,20 +818,17 @@
         }
      }
   }
   // add tcm 20211118 end
   @AuraEnabled
   public static List<Product2> searchProduct(){
   public static string searchProduct(String lostProduct){
      Product2 prd = null;
      try {
         List<Product2> products = [
            select
            Id,name
            from Product2
            where Brand_Name__c = 'STORZ' limit 10
         ];
         return products;
         prd = [select Id,ProductClass__c, ProductCategory__c from Product2 where Id =:lostProduct];
      } catch (Exception e) {
         throw new AuraHandledException(e.getMessage());
      }
      return JSON.serialize(prd);
   }
   // add tcm 20211118 end
}