From bfca7a84bec815da594f1d12558535ed06d2490b Mon Sep 17 00:00:00 2001
From: 沙世明 <shashiming@prec-tech.com>
Date: 星期二, 13 九月 2022 09:57:32 +0800
Subject: [PATCH] 本地提交备份

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

diff --git a/force-app/main/default/classes/NFM203Rest.cls b/force-app/main/default/classes/NFM203Rest.cls
index bbb2c9b..a687456 100644
--- a/force-app/main/default/classes/NFM203Rest.cls
+++ b/force-app/main/default/classes/NFM203Rest.cls
@@ -226,7 +226,7 @@
                                   Internal_value__c
                                   from BatchIF_Transfer__c
                                   where Dropped_Flag__c = false
-                                          and Table__c = 'Account'];
+                                          and (Table__c = 'Account' OR Table__c = 'NFM203Rest')];
         for (BatchIF_Transfer__c t : transferList) {
             transferMap.put(t.Column__c + t.External_value__c, t.Internal_value__c);
         }
@@ -425,7 +425,8 @@
                                              Name,
                                              LicenseAndAccount__c
                                              from License_Information__c
-                                             where LicenseAndAccount__c  In: deleteExistLicenseInformationList ];
+                                             where LicenseAndAccount__c  In: deleteExistLicenseInformationList 
+                                             and LicenseType__c != '鍗遍櫓鍖栧鍝佺粡钀ヨ鍙瘉'];  //20220804 SWAG-CGH9NB lt add
 
                 if (deleteLicenseInfoList.size() > 0) {
                     delete deleteLicenseInfoList;
@@ -653,8 +654,10 @@
                                 if (String.isNotBlank(contractInfos.ContractOwner) && contractOwnerMap.size() > 0) {
                                     contractInfoAcc.Business_Assistant__c = contractOwnerMap[0].Id;
                                 }
-
-                                contractInfoAcc.Contract_Fiscal_Period__c = contractInfos.TermContractNo.split('-')[0];
+                                // GZW 220621 OCSM鏈熶紭鍖� start
+                                // contractInfoAcc.Contract_Fiscal_Period__c = contractInfos.TermContractNo.split('-')[0];
+                                contractInfoAcc.Contract_Fiscal_Period__c = NFMUtil.getMapValue(transferMap, 'Contract_Fiscal_Period__c', string.valueof(contractInfos.TermContractNo.split('-')[0]), iflog);
+                                // GZW 220621 OCSM鏈熶紭鍖� end
                                 contractInfoAcc.Agency_Application_Situation__c = '鎵胯獚娓堛伩';
                                 contractInfoAcc.Name = contractInfos.TermContractNo + ':' + gda.CompanyName;
                                 contractInfoAcc.SpecialDealerName__c = gda.CompanyName;
@@ -958,9 +961,18 @@
                             // 杞崲琛ㄩ噷 鍔犱簡09
                             // 璇佺収绫诲瀷娣诲姞浜� 鍗遍櫓鍖栧鍝佺粡钀ヨ鍙瘉
                             // 瀹㈡埛鏂板濡備笅瀛楁
-                            accountInfo.DGLicenseNo__c = geDataDetailsMap.get(gdds.LicenseType).BusLicenseNo;
-                            accountInfo.DGLicenseFrom__c = NFMUtil.parseStr2Date(gdds.ValidFrom);
-                            accountInfo.DGLicenseTo__c =  NFMUtil.parseStr2Date(gdds.ValidTo);
+
+                            //20220804 SWAG-CGH9NB lt start
+                            if(accountInfo.Whether_CDS_dealer__c == false){
+                                accountInfo.DGLicenseNo__c = geDataDetailsMap.get(gdds.LicenseType).BusLicenseNo;
+                                accountInfo.DGLicenseFrom__c = NFMUtil.parseStr2Date(gdds.ValidFrom);
+                                accountInfo.DGLicenseTo__c =  NFMUtil.parseStr2Date(gdds.ValidTo);
+                            }
+                            // accountInfo.DGLicenseNo__c = geDataDetailsMap.get(gdds.LicenseType).BusLicenseNo;
+                            // accountInfo.DGLicenseFrom__c = NFMUtil.parseStr2Date(gdds.ValidFrom);
+                            // accountInfo.DGLicenseTo__c =  NFMUtil.parseStr2Date(gdds.ValidTo);
+                            //20220804 SWAG-CGH9NB lt end
+
                             // String businessTypeStr = gdds.BusinessType;
                             // if (String.isNotBlank(businessTypeStr) && businessTypeStr.contains('瀛樺偍閿�鍞�')) {
                             //     accountInfo.DGLicenseInvAllow__c = true;   
@@ -1309,7 +1321,10 @@
                         String mapkey = accountCode + contact.FullName__c;
                         if (insertAddressMap.containsKey(mapkey)) {
                             Address__c addressData = insertAddressMap.get(mapkey);
-                            addressData.Contacts__c = contact.Id;//鑱旂郴浜�
+                            // addressData.Contacts__c = contact.Id;//鑱旂郴浜�
+                            // WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220516 start
+                            addressData.ContactName__c = contact.Name;
+                            // WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220516 end
                             //addressData.Name = accountName + '_'+ contact.Name;//鏀惰揣鍦板潃鍚嶇О
                             insertAddressList.add(addressData);
                         }

--
Gitblit v1.9.1