From cd9c794383e5d2cfad818d7f0507408559be8a1b Mon Sep 17 00:00:00 2001
From: 李彤 <litong@prec-tech.com>
Date: 星期二, 10 五月 2022 14:14:55 +0800
Subject: [PATCH] 501

---
 force-app/main/default/classes/NFM501FutureController.cls |   31 +++++++++++++++++++++++--------
 1 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/force-app/main/default/classes/NFM501FutureController.cls b/force-app/main/default/classes/NFM501FutureController.cls
index eef5e5c..b974e7a 100644
--- a/force-app/main/default/classes/NFM501FutureController.cls
+++ b/force-app/main/default/classes/NFM501FutureController.cls
@@ -71,9 +71,10 @@
         rowData.ErrorLog__c = rowData.ErrorLog__c == null ? '' : rowData.ErrorLog__c;
         // System.debug('+++++++1+++++++'+iflog501Future);
         String QLMDataStr = NFMUtil.QLMgetRowDataStr(rowData);
+        system.debug('QLMDataStr---'+QLMDataStr);
         NFM501controller.AllData getQLMData1 = (NFM501controller.AllData)
         JSON.deserialize(QLMDataStr, NFM501controller.AllData.class);
-        
+        system.debug('getQLMData1---'+json.serialize(getQLMData1));
         if (getQLMData1 == null) {
             return;
         }
@@ -159,9 +160,13 @@
             Set < String > TarDetailSet = new Set < String > ();
             
             for (NFM501Controller.ListItem LI: getQLMData1.data.list1) {
+                system.debug('LI----'+json.serialize(LI));
                 // 闋呯洰杌㈤�併伄銈汇儍銉�
                 Tender_information__c te1 = new Tender_information__c();
                 //add aws dataid sushanhu 20220223 start
+                if(String.isEmpty(LI.DataId)){
+                    continue;
+                }
                 te1.AWS_Data_Id__c = LI.DataId;
                 //add aws dataid sushanhu 20220223 end
                 if (String.isBlank(LI.projectId)) {
@@ -213,14 +218,19 @@
                 //杞崲琛紙瀹炵幇閫夐」鍒楄〃鐨勪笅鎷夐�夐」锛�
                 te1.BiddingType__c = NFMUtil.getMapValue(transferMap, 'BiddingType__c', LI.biddingType, iflog501Future);
                 te1.InfoQianlimaUrl__c = String.isBlank(LI.infoQianlimaUrl) ? te1.InfoQianlimaUrl__c : LI.infoQianlimaUrl;
+                System.debug('======111111111111========');
                 //鎷兼帴瀛楃涓�
                 if (LI.ZhaoRelationWay != null && LI.ZhaoRelationWay.size() > 0) {
+                    System.debug('======LI.ZhaoRelationWay========'+LI.ZhaoRelationWay);
                     te1.ZhaoRelationWay__c = String.join(LI.ZhaoRelationWay, '锛�');
                      //add 瀵嗘枃 sushanhu 20220223 start
+                     System.debug('======LI.ZhaoRelationWayEncrypted========'+LI.ZhaoRelationWayEncrypted);
                      te1.ZhaoRelationWay_Encrypted__c =String.join(LI.ZhaoRelationWayEncrypted,'锛�');
+                     System.debug('======2222222222222========');
                      //add 瀵嗘枃 sushanhu 20220223 end
                 }
                 //杞崲琛紙閫夐」鍒楄〃鐨勪笅鎷夐�夐」锛�
+                System.debug('======3333333333333333========');
                 te1.IsElectronic__c = NFMUtil.getMapValue(transferMap, 'IsElectronic__c', LI.isElectronic, iflog501Future);
                 te1.XmNumber__c = String.isBlank(LI.xmNumber) ? te1.XmNumber__c : LI.xmNumber;
                 if ( String.isnotBlank(LI.tenderEndTime) ) {
@@ -252,7 +262,7 @@
                 //杞崲琛紙閫夐」鍒楄〃鐨勪笅鎷夐�夐」锛�
                 //鎺ュ彛浼犳潵鍏朵粬鍏憡
                 if (String.isBlank(te1.Id)) { //鍒ゆ柇鎷涙爣椤圭洰鏄惁瀛樺湪
-                    if ('5'.equals(LI.infoType)) {
+                    if ('5'.equals(LI.infoType) || '2'.equals(LI.infoType)) {  //20220510 lt SWAG-CE6C45
                         //鎷涙姇鏍囬」鐩悕绉�
                         te1.InfoTitle__c = LI.infoTitle == null ? te1.InfoTitle__c : LI.infoTitle;
                         //椤圭洰闃舵
@@ -301,19 +311,19 @@
                 }
                 // 棰勫憡璁板綍鏃�	鍙栫涓�娆¤幏鍙栧埌棰勫憡鐨勫綋鍓嶆椂闂�
                 // 濡傛灉鏈夊�硷紝涓嶆槸绗竴娆★紝濡傛灉娌″��
-                if ('1'.equals(LI.infoType) && te1.noticeDate__c == null) {
+                if (('1'.equals(LI.infoType) || '2'.equals(LI.infoType)) && te1.noticeDate__c == null) {  //20220510 lt SWAG-CE6C45
                     te1.noticeDate__c = Date.today();
                     System.debug('noticeDate__c:' + te1.noticeDate__c);
                 }
                 System.debug('LI.infoType:' + LI.infoType);
                 System.debug('te1.ResultDate__c:' + te1.ResultDate__c);
                 // 缁撴灉璁板綍鏃�	鍙栫涓�娆¤幏鍙栧埌缁撴灉鐨勫綋鍓嶆椂闂�
-                if ('3'.equals(LI.infoType) && te1.ResultDate__c == null) {
+                if (('3'.equals(LI.infoType) || '2'.equals(LI.infoType)) && te1.ResultDate__c == null) {  //20220510 lt SWAG-CE6C45
                     te1.ResultDate__c = Date.today();
                     System.debug('ResultDate__c:' + te1.ResultDate__c);
                 }
                 // 鍏憡璁板綍鏃�	鍙栫涓�娆¤幏鍙栧埌鍏憡鐨勫綋鍓嶆椂闂�
-                if ('0'.equals(LI.infoType) && te1.publicDate__c == null) {
+                if (('0'.equals(LI.infoType) || '2'.equals(LI.infoType)) && te1.publicDate__c == null) {  //20220510 lt SWAG-CE6C45
                     te1.publicDate__c = Date.today();
                     System.debug('publicDate__c:' + te1.publicDate__c);
                 }
@@ -518,7 +528,7 @@
                      //add 瀵嗘枃 sushanhu 20220223 end
                 }
                     
-
+                System.debug('te1-----'+json.serialize(te1));
                 //绮剧悽绉戞妧   zxk   2021-11-11  SWAG-C637NF   start
                 // 濡傛灉绗竴娆¢」鐩樁娈靛氨浼犳潵鍙樻洿鐘舵�佺殑璇濓紝閭d箞灏变笉鐢熸垚鎷涙姇鏍囬」鐩紙鐢变簬鍙樻洿闃舵椤圭洰鍚嶇О浼犳潵涓虹┖锛屼负浜嗕笉璁╅」鐩悕鑷姩璧嬪�间负Id锛�
                 if (String.isNotBlank(te1.InfoType__c) && String.isNotBlank(LI.projectId)) {
@@ -546,6 +556,7 @@
             if (DetlList.size() > 0) {
                 delete DetlList;
             }
+            system.debug('updateTenderMap---'+json.serialize(updateTenderMap));
             if (updateTenderMap.values().size() > 0) {
                 upsert updateTenderMap.values();
             }
@@ -554,6 +565,7 @@
             Map < string, Tender_information__c > TenderMap = new map < string, Tender_information__c > ();
             
             for (Tender_information__c TMap: updateTenderMap.values()) {
+                system.debug('TMap---'+JSON.serialize(TMap));
                 TenderMap.put(TMap.ProjectId__c, TMap);
                 PIHelper.IdList il= new PIHelper.IdList();
                 // add for pipl  sushanhu 20220310 start
@@ -589,6 +601,7 @@
                 insert insertbidInfoFileList;
             }
             if (!Manual_execution501future) {
+                //娴嬭瘯 Open the comment by Li Jun 20220404
                 System.enqueueJob(new NFM502Controller(rowData.id));
             }
             // logstr += '\nend';
@@ -598,13 +611,15 @@
                 throw new ControllerUtil.myException('aaa');
             }
             //纭浜嬪姟 add for pi sushanhu 20220310 start
-            PIHelper.confirmTrans('NFM501',1,null,txId,NFM501AWS.token,NFM501AWS.transactionURL,idList);
+            // PIHelper.confirmTrans('NFM501',1,null,txId,NFM501AWS.token,NFM501AWS.transactionURL,idList);
+            PIHelper.insertConfirmTrans('NFM501',1,null,txId,1,NFM501AWS.transactionURL,idList);
             //纭浜嬪姟 add for pi sushanhu 20220310 end
         } catch (Exception ex) {
             // 濡傛灉鏁版嵁鑾峰彇杩囩▼涓紝鏈夐敊璇紙鍚屼竴娓告爣锛屽鏋滄姤閿欙紝鏄粬閲嶆柊鑾峰彇涓�閬嶏紝濡傛灉涓夋閮芥病鑳借幏鍙栧埌锛屽氨鍙戦�侀偖浠舵姤閿欎俊鎭紝鐒跺悗鎵嬪姩杩涜鑾峰彇锛�
             Database.rollback(sp);
             //纭浜嬪姟 add for pi sushanhu 20220310 start
-            PIHelper.confirmTrans('NFM501',0,null,txId,NFM501AWS.token,NFM501AWS.transactionURL,idList);
+            // PIHelper.confirmTrans('NFM501',0,null,txId,NFM501AWS.token,NFM501AWS.transactionURL,idList);
+            PIHelper.insertConfirmTrans('NFM501',0,null,txId,1,NFM501AWS.transactionURL,idList);
             //纭浜嬪姟 add for pi sushanhu 20220310 end
             System.debug(Logginglevel.ERROR, 'QLMData_' + rowData.MessageGroupNumber__c + ':' + ex.getMessage());
             System.debug(Logginglevel.ERROR, 'QLMData_' + rowData.MessageGroupNumber__c + ':' + ex.getStackTraceString());

--
Gitblit v1.9.1