From 50b39c4b52bf5fd61ec46ada365c51e05a16d2ae Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期四, 04 五月 2023 09:11:54 +0800
Subject: [PATCH] Backup0504

---
 force-app/main/default/classes/ConInvoiceViewController.cls |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/classes/ConInvoiceViewController.cls b/force-app/main/default/classes/ConInvoiceViewController.cls
index 3764b91..0e3ac41 100644
--- a/force-app/main/default/classes/ConInvoiceViewController.cls
+++ b/force-app/main/default/classes/ConInvoiceViewController.cls
@@ -473,6 +473,7 @@
     // 淇濆瓨闄勪欢
     public PageReference saveAttachment() {
         Consumable_accessories_invoice__c attachmentdetails = new Consumable_accessories_invoice__c();
+        System.debug('AttachmentRecoeds = ' + AttachmentRecoeds);
         for (InvoiceOrderInfo ass : AttachmentRecoeds) {
             if (!String.isBlank(ass.mailSelectOptsin)) {
                 attachmentdetails.Id = ass.invoiceOrderId;
@@ -484,10 +485,12 @@
                 upsert attachmentdetails;
             }
         }
+        System.debug('attachmentdetails = ' + attachmentdetails);
         return UnabletoEdit();
     }
     // 淇濆瓨鎸夐挳
     public PageReference save() {
+        System.debug('enter ConInvoiceViewController.save success');
         List<String> chukudanID = new List<String>();
         if (coc.Name == '' || coc.Name == null) {
             coc.Name.addError('璇峰綍鍏ュ彂绁ㄥ彿銆�');
@@ -736,6 +739,7 @@
                     delete invoiceLinkdetList;
                 }*/
             } else if (String.isNotBlank(reopen) && reopen.equals('isreopen') && String.isNotBlank(invoiceId)) {
+                System.debug('杩涘叆reopen');
                 //CHAN-BSS5SQ    update by rentongxiao 2020-09-04   start
                 //濡傛灉鏄� 浣滃簾閲嶅紑
                 //1. 璁剧疆鏂板彂绁ㄤ俊鎭�
@@ -759,6 +763,7 @@
                     invoiceHead.Order_ForDealer__c = SecondDealer;
                 }
                 invoiceHead.Order_ForDealerText__c = coc.Order_ForDealerText__c;
+                System.debug('invoiceHead = ' + invoiceHead);
                 insert invoiceHead;
 
                 List<String> updateChukudanId = new List<String>();
@@ -773,6 +778,7 @@
                     colc.Invoice_Code_link__c = invoiceHead.Id;
                     updateChukudanId.add(colc.Outboundorder_Code_link__c);
                 }
+                System.debug('tLinkList = ' + tLinkList);
                 update tLinkList;
                 //鏇存柊鍙戠エ鏄庣粏淇℃伅
                 //鑾峰彇鍑哄簱鍗�,璁剧疆鍏宠仈鍏崇郴
@@ -797,6 +803,7 @@
                     cocTemp.Consumable_order__c = invoiceHead.Id;
                     tempCocMap.put(cocTemp.Invoicedet1_OD_link__c + cocTemp.Asset_Model_No__c, cocTemp);
                 }
+                System.debug('tempCountList = ' + tempCountList);
                 update tempCountList;
                 List<Consumable_Orderdetails__c> updateFromList = [
                     SELECT
@@ -836,8 +843,10 @@
 
                 Consumable_order__c tempcoc = new Consumable_order__c();
                 tempcoc.Id = invoiceId;
+                System.debug('tempcoc = ' + tempcoc);
                 delete tempcoc;
                 invoiceId = invoiceHead.Id;
+                System.debug('updateFromList = ' + updateFromList);
                 update updateFromList;
                 //--------------------------------------------------------------------------
                 for (InvoiceOrderInfo ass : invoiceOrderRecoeds) {
@@ -875,6 +884,7 @@
                             invoiceLinkList.add(invoiceLink);
                         }
                     }
+                    System.debug('invoiceLinkList = ' + invoiceLinkList);
                     upsert invoiceLinkList;
                 }
                 //鍒犻櫎鍑哄簱鍗曢摼鎺ヨ〃
@@ -892,6 +902,7 @@
                             invoiceLinkdetList.add(colctemp);
                         }
                     }
+                    System.debug('invoiceLinkdetList = ' + invoiceLinkdetList);
                     delete invoiceLinkdetList;
                 }
                 //鏂板缓鍙戠エ鏄庣粏1
@@ -1268,6 +1279,7 @@
             FROM Consumable_Orderdetails__c
             WHERE Consumable_order__c = :value AND Invoicedet1_OD_link__c = :deleteMap.keySet()
         ];
+        System.debug('detInvoicedet1List = ' + detInvoicedet1List);
         delete detInvoicedet1List;
     }
     //CHAN-BSS5SQ    update by rentongxiao 2020-09-08  end
@@ -1360,6 +1372,7 @@
         Savepoint sp = Database.setSavepoint();
         if (invoiceorderList1.size() > 0) {
             try {
+                System.debug('invoiceorderList1 = ' + invoiceorderList1);
                 insert invoiceorderList1;
             } catch (Exception ex) {
                 Database.rollback(sp);

--
Gitblit v1.9.1