From 1b8c8764c39fc546ca1b85ff1810ae51be74331c Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期四, 31 三月 2022 18:39:23 +0800
Subject: [PATCH] PIPL0331V2Deploy
---
force-app/main/default/classes/NFM503InfoFileBatch.cls | 36 ++++++------
force-app/main/default/classes/FixtureRentalPDFController.cls | 9 ++-
force-app/main/default/classes/SimpleEventRegisterController.cls | 4
force-app/main/default/classes/LeadIntentionController.cls | 12 ++--
force-app/main/default/classes/LeadIntentionControllerTest.cls | 50 +++++++++-------
force-app/main/default/classes/NFM103Controller.cls | 32 +++-------
force-app/main/default/triggers/Repair.trigger | 4
7 files changed, 73 insertions(+), 74 deletions(-)
diff --git a/force-app/main/default/classes/FixtureRentalPDFController.cls b/force-app/main/default/classes/FixtureRentalPDFController.cls
index e46da8c..c0f63b5 100644
--- a/force-app/main/default/classes/FixtureRentalPDFController.cls
+++ b/force-app/main/default/classes/FixtureRentalPDFController.cls
@@ -35,14 +35,14 @@
public string staticResourceFile { get; private set; }
public Boolean addFlag { get; private set; }//鏁忔劅鍦板潃浣跨敤鏍囪
public String qrcode { get; private set; }
+ public String barcode { get; private set; }
public FixtureRentalPDFController() {
pageNum = Integer.valueOf(ApexPages.currentPage().getParameters().get('page'));
rentalApplyIdIMG = ApexPages.currentPage().getParameters().get('raid');
//Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8');
// rentalApplyId = ApexPages.currentPage().getParameters().get('raid');//20201120 ljh
String tempStr = ApexPages.currentPage().getParameters().get('raid');
- staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Rental_Apply__c'));
- staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));
+
addFlag = false;
rentalApplyId = new List<String>();
if(tempStr != null){
@@ -56,6 +56,8 @@
// 鐢婚潰鍒濆鍖�
public void init() {
+ staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Rental_Apply__c'));
+ staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));
// 鏂拌濂ユ灄宸存柉澶囧搧绛炬敹鍗昉DF鐢婚潰鍒濆鍖�
PageCutList = new List<List<String>>();
List<Rental_Apply__c> ApplyList = new List<Rental_Apply__c>();
@@ -115,6 +117,7 @@
if(ApplyList.size()>0){
ApplyHeadShow = ApplyList[0];
qrcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.QRId__c);
+ barcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.BRId__c);
}
//澧炲姞鍊熷嚭澶囧搧SET涓�瑙圠ist锛屼负浜嗚幏鍙栧�熷嚭澶囧搧SET涓�瑙堟槑缁�
List<String> RAESSearchList = New List<String>();
@@ -353,7 +356,7 @@
mainCnt = 0;
accessoryCnt = 0;
for (Rental_Apply_Equipment_Set_Detail__c ra : RAESDLine) {
- if (ra.Is_Body__c) {
+ if (ra.Is_Body__c) {
mainCnt += 1;
} else {
accessoryCnt += 1;
diff --git a/force-app/main/default/classes/LeadIntentionController.cls b/force-app/main/default/classes/LeadIntentionController.cls
index ec71404..32c13a3 100644
--- a/force-app/main/default/classes/LeadIntentionController.cls
+++ b/force-app/main/default/classes/LeadIntentionController.cls
@@ -1,5 +1,5 @@
public without sharing class LeadIntentionController {
- public List<PCLInfo> pclInfos { get; set; }
+ public List<PCLInfo> pclInfos { get; set; }
/*****************妞滅储鐢�******************/
@@ -64,7 +64,7 @@
public String[] sortOrder { get; set; }
public String[] columus = new String[]{'Contact_Name__c', 'Hospital_Name__c', 'Department_Class__c', 'Company__c', 'Status__c'
,'Request1__c', 'Inquiry_No__c', 'Phone__c', 'Email__c', 'Cancel_Reason__c'
- ,'Opp_Name_Search__c', 'Opportunity_Division__c', 'LeadSource__c', 'Campaign__c'
+ ,'Opp_Name_Search__c', 'Opportunity_Division__c', 'LeadSource__c', 'Campaign__c'
,'Urgent__c', 'Request_Detail__c','Contact_Id__c','Hospital_ID__c','Department_ID__c','Opp_Name_Search_ID__c'
,'Campaign_ID__c','Id','Name','Family_Name__c','Last_Name__c','Reasons_options__c','Product1__c'
};
@@ -156,11 +156,11 @@
}
soqlWithoutSort = this.makeSoql(false, accSearch, ownerSearch,
text, condition, value, text2, condition2, value2, text3, condition3, value3);
- String soql = soqlWithoutSort + ' order by CreatedDate desc limit ' + Integer.valueOf(limits);
+ String soql = soqlWithoutSort + ' order by CreatedDate desc limit ' + Integer.valueOf(limits);
soqlForMoneyWithoutSort = this.makeSoql(true, accSearch, ownerSearch,
text, condition, value, text2, condition2, value2, text3, condition3, value3);
- String soqlForMoney = soqlForMoneyWithoutSort + ' order by CreatedDate desc limit ' + Integer.valueOf(System.Label.TotalLimit);
+ String soqlForMoney = soqlForMoneyWithoutSort + ' order by CreatedDate desc limit ' + Integer.valueOf(System.Label.TotalLimit);
System.debug('soqlWithoutSort:' + soqlWithoutSort);
system.debug('aaaaaaaaaa'+soql);
system.debug('bbbbbbb:'+soqlForMoney);
@@ -258,7 +258,7 @@
List<Inquiry_form__c> updateInquiryform = new List<Inquiry_form__c>();
Inquiry_form__c inquiryForm = new Inquiry_form__c();
inquiryForm.Id = inquiryformId;
- inquiryForm.Status__c = '涓嶉渶瑕�';
+ inquiryForm.Status__c = '02.涓嶉渶瑕�';
//涓嶉渶瑕佺殑鏃跺�� 鐨勭‘璁ゆ棩鏈�
system.debug('ccccccc:'+opp_ID);
inquiryForm.Confirmation_Date__c = Date.toDay();
@@ -296,7 +296,7 @@
system.debug('杈撳嚭鐨勫�间负锛�'+oi.reasonFlg);
if (oi.reasonFlg == '1') {
oi.reasonFlg = '0';
- oi.rec.Status__c = '涓嶉渶瑕�';
+ oi.rec.Status__c = '02.涓嶉渶瑕�';
oi.rec.Reasons_options__c=batchReason;
oi.rec.Cancel_Reason__c = batchReason;
oi.rec.Confirmation_Date__c = Date.toDay();
diff --git a/force-app/main/default/classes/LeadIntentionControllerTest.cls b/force-app/main/default/classes/LeadIntentionControllerTest.cls
index 640b4ef..dc82ef7 100644
--- a/force-app/main/default/classes/LeadIntentionControllerTest.cls
+++ b/force-app/main/default/classes/LeadIntentionControllerTest.cls
@@ -1,8 +1,14 @@
@isTest
private class LeadIntentionControllerTest {
+
+ @testSetup
+ static void setUp(){
+ TestDataUtility.CreatePIPolicyConfigurations( new string[]{'Inquiry_form__c'});
+ }
+
static testMethod void testMethod1() {
- //鍖婚櫌
- List<RecordType> rectHp = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'];
+ //鍖婚櫌
+ List<RecordType> rectHp = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'];
if (rectHp.size() == 0) {
return;
}
@@ -13,16 +19,16 @@
}
- Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
+ Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
- User hpOwner = new User(Test_staff__c = true, LastName = 'hp', FirstName = 'owner', Alias = 'hp', Work_Location__c = '鍖椾含', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id);
- insert hpOwner;
- User hpOwner2 = new User(Test_staff__c = true, LastName = 'hp2', FirstName = 'owner', Alias = 'hp2', Work_Location__c = '閲嶅簡', CommunityNickname = 'hpOwner2', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner2@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id);
- insert hpOwner2;
+ User hpOwner = new User(Test_staff__c = true, LastName = 'hp', FirstName = 'owner', Alias = 'hp', Work_Location__c = '鍖椾含', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id);
+ insert hpOwner;
+ User hpOwner2 = new User(Test_staff__c = true, LastName = 'hp2', FirstName = 'owner', Alias = 'hp2', Work_Location__c = '閲嶅簡', CommunityNickname = 'hpOwner2', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner2@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id);
+ insert hpOwner2;
- Account hp = new Account(RecordTypeId = rectHp[0].Id, Name = 'hp', OwnerId = hpOwner.Id);
+ Account hp = new Account(RecordTypeId = rectHp[0].Id, Name = 'hp', OwnerId = hpOwner.Id);
hp.FSE_GI_Main_Leader__c = hpOwner.Id;
hp.FSE_SP_Main_Leader__c = hpOwner2.Id;
insert hp;
@@ -62,7 +68,7 @@
inquiryform.Family_Name__c ='闈�';
inquiryform.Opportunity_Division__c = '璇环';
inquiryform.Contact_Name__c = contact2.Id;
- inquiryform.Reasons_options__c ='瀹㈡埛涓嶉渶瑕�';
+ inquiryform.Reasons_options__c ='宸茬粡鏈夎浠�';
inquiryform.Phone__c = '13844756322';
inquiryform.Product1__c = '瓒呭0';
inquiryform.Request1__c = '闇�瑕佹姤浠�';
@@ -72,26 +78,26 @@
page.setRedirect(true);
System.Test.setCurrentPage(page);
-
- // LeadIntentionController conTest = new LeadIntentionController(new ApexPages.StandardController(dpt));
- LeadIntentionController conTest = new LeadIntentionController();
- System.Test.startTest();
- conTest.inquiryformId = inquiryform.Id;
+
+ // LeadIntentionController conTest = new LeadIntentionController(new ApexPages.StandardController(dpt));
+ LeadIntentionController conTest = new LeadIntentionController();
+ System.Test.startTest();
+ conTest.inquiryformId = inquiryform.Id;
- conTest.init();
+ conTest.init();
- conTest.searchOpp();
- conTest.sortTable();
- conTest.save();
- conTest.cancel();
+ conTest.searchOpp();
+ conTest.sortTable();
+ conTest.save();
+ conTest.cancel();
// conTest.pclInfos.reasonFlg ='1';
- conTest.saveInquiryOpts();
+ conTest.saveInquiryOpts();
}
//娴嬭瘯 閫夋嫨涓�浜涚瓫閫夋潯浠�
static testMethod void testMethod2() {
- //鍖婚櫌
+ //鍖婚櫌
List<RecordType> rectHp = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'];
if (rectHp.size() == 0) {
return;
@@ -152,7 +158,7 @@
inquiryform.Family_Name__c ='闈�';
inquiryform.Opportunity_Division__c = '璇环';
inquiryform.Contact_Name__c = contact2.Id;
- inquiryform.Reasons_options__c ='瀹㈡埛涓嶅瓨鍦�';
+ inquiryform.Reasons_options__c ='宸茬粡鏈夎浠�';
inquiryform.Phone__c = '13844756322';
inquiryform.Product1__c = '瓒呭0';
inquiryform.Request1__c = '闇�瑕佹姤浠�';
diff --git a/force-app/main/default/classes/NFM103Controller.cls b/force-app/main/default/classes/NFM103Controller.cls
index 19abb6d..6bf6784 100644
--- a/force-app/main/default/classes/NFM103Controller.cls
+++ b/force-app/main/default/classes/NFM103Controller.cls
@@ -104,11 +104,11 @@
public String UpdateStatus;//鐩磋繑淇敼鏍囪瘑
//add by wangweipeng 2021/07/14 end
//add pi 鍔犲瘑 sushanhu 20220222 start
- public String DataId;//AWS瀛樺偍鍑瘉
+ //public String DataId;//AWS瀛樺偍鍑瘉
//add pi 鍔犲瘑 sushanhu 20220222 end
//20220330 lt WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� start
- public Datetime QuotationDate;
+ public String QuotationDate;
//20220330 lt WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� end
@@ -336,7 +336,7 @@
,Returns_Product_way__c //杩斿搧鏂瑰紡
,FSE_ApplyForRepair_time__c //鐢宠淇悊鏃堕棿
//add by wangweipeng 2021/07/14 start
- ,AWS_Data_Id__c //add by sushanhu AWSDateID for PIPL
+ //,AWS_Data_Id__c //add by sushanhu AWSDateID for PIPL
//20220330 lt WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� start
,Delivered_Product__r.Backorder__r.Opportunity__r.SAP_Send_OK_Date__c
//20220330 lt WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� end
@@ -394,8 +394,7 @@
element.TradeType = NFMUtil.getMapValue(transferMap, 'Trade__c', rpr.Delivered_Product__r.Backorder__r.Opportunity__r.Trade__c, iflog);
//20220330 lt WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� start
- //element.QuotationDate = NFMUtil.getMapValue(transferMap, 'SAP_Send_OK_Date__c', rpr.Delivered_Product__r.Backorder__r.Opportunity__r.SAP_Send_OK_Date__c, iflog);
- element.QuotationDate = rpr.Delivered_Product__r.Backorder__r.Opportunity__r.SAP_Send_OK_Date__c;
+ element.QuotationDate = NFMUtil.formatDateTime2StrSprit(rpr.Delivered_Product__r.Backorder__r.Opportunity__r.SAP_Send_OK_Date__c).replaceAll('/', '');
//20220330 lt WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� end
// 澶氬勾淇濅慨 LHJ Start
@@ -427,10 +426,6 @@
}*/
// 2021-01-07 mzy update 澶氬勾淇濅慨澶栬锤NFM103鎺ュ彛淇敼 start
String tradeType = rpr.Delivered_Product__r.Backorder__r.Opportunity__r.Trade__c;
-
- //20220330 lt WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� start
- //Date QuotationDate = rpr.Delivered_Product__r.Backorder__r.Opportunity__r.SAP_Send_OK_Date__c;
- //20220330 lt WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� end
String NewProductGuaranteeObject = rpr.NewProductGuaranteeObject__c == null ? '': rpr.NewProductGuaranteeObject__c;
@@ -497,7 +492,7 @@
element.UpdateStatus = rpr.Address_type__c; //鐢宠淇悊鏃堕棿
//add by wangweipeng 2021/07/14 end
//add pi 瀵嗘枃 sushanhu 20220222 start
- element.DataId =rpr.AWS_Data_Id__c;//aws瀛樺偍鍑瘉
+ //element.DataId =rpr.AWS_Data_Id__c;//aws瀛樺偍鍑瘉
//add pi 瀵嗘枃 sushanhu 20220222 end
}
@@ -598,23 +593,18 @@
// NFM103淇敼Rest end
// WLIG-BXQBH6 start
- // NFMUtil.response response =
- // NFMUtil.sendToSapStatusAndBody(rowDataStr, NFMUtil.NFM103_ENDPOINT);
+ NFMUtil.response response =
+ NFMUtil.sendToSapStatusAndBody(rowDataStr, NFMUtil.NFM103_ENDPOINT);
//update to aws 20220222 sushanhu start for PIPL
- NFMUtil.response res = NFMUtil.getAwsToken();
- String token=res.responseBody;
- if(String.isBlank(token)){
- iflog.ErrorLog__c='NFM103'+'鑾峰彇aws token 澶辫触';
-
- }
- NFMUtil.response response = NFMUtil.sendToPiAWS(rowDataStr, NFMUtil.NFM103_ENDPOINT,token);
+ // PIHelper.PIIntegration NFM103AWS =PIHelper.getPIIntegrationInfo('NFM103');
+ // NFMUtil.response response = NFMUtil.sendToPiAWS(rowDataStr, NFM103AWS.newUrl,NFM103AWS.token);
//update to aws 20220222 sushanhu end for PIPL
status = response.status;
system.debug('AWS Response status:'+status);
ResponseBody = response.responseBody;
//update to aws 20220302 sushanhu start for PIPL
- Map<String, Object> results = (Map<String, Object>)JSON.deserializeUntyped(ResponseBody);
- system.System.debug('NGM103 AWS result--'+ ResponseBody);
+ // Map<String, Object> results = (Map<String, Object>)JSON.deserializeUntyped(ResponseBody);
+ // system.System.debug('NGM103 AWS result--'+ ResponseBody);
//update to aws 20220302 sushanhu end for PIPL
NFM103Response NFM103Response = new NFM103Response();
system.debug(ResponseBody);
diff --git a/force-app/main/default/classes/NFM503InfoFileBatch.cls b/force-app/main/default/classes/NFM503InfoFileBatch.cls
index fa5c005..08a48a8 100644
--- a/force-app/main/default/classes/NFM503InfoFileBatch.cls
+++ b/force-app/main/default/classes/NFM503InfoFileBatch.cls
@@ -2,12 +2,12 @@
public String TenId;
public String bidInfoFileID;
//add staic sushanhu 20220302 start
- public static String transUrl;
- public static String transId;
- public static String token;
+ public static String transUrl;
+ public static String transId;
+ public static String token;
public static integer isSuccess=0;
public static List<String> sfRecordIds =new List<String>();
- //add staic sushanhu 20220302 end
+ //add staic sushanhu 20220302 end
Boolean IsNeedExecute = false; //2021-06-28 mzy WLIG-BYHD79 SFDC鐜batch鍚堝苟璋冩煡 鏄惁绗﹀悎鎵ц鏉′欢
//add nfm 503 aws response start sushanhu 20220301
global class File{
@@ -49,8 +49,8 @@
queryfileList.add(bidInfoFile.infoAddress__c);
try {
//update 鍚宻taic 20220302 satrt
- // String token;
- //update 鍚宻taic 20220302 end
+ // String token;
+ //update 鍚宻taic 20220302 end
Datetime oldTime;
// 浠庤浆鎹㈣〃涓幏鍙杢oken
BatchIF_Transfer__c token503 = [Select ID, NFM501_Token__c
@@ -70,14 +70,15 @@
timeslot = newTime.getTime() - oldTime.getTime();
}
// System.debug('++++1++++' + token + ' : ' + timeslot);
+ PIHelper.piIntegration pi =PIHelper.getPIIntegrationInfo('NFM503');
if (string.isblank(token) || timeslot > 1800000) {
//UP TO AWAS TOKEN 20220225 SUSHANHU START
- NFMUtil.response response = NFMUtil.getAWSToken();
- //UP TO AWAS TOKEN 20220225 SUSHANHU END
- if (String.isBlank(response.responseBody)) {
- bidInfoFile.ErrorMessage__c = '503token:' + response.status;
- }
- token = response.responseBody;
+ // NFMUtil.response response = NFMUtil.getAWSToken();
+ // //UP TO AWAS TOKEN 20220225 SUSHANHU END
+ // if (String.isBlank(response.responseBody)) {
+ // bidInfoFile.ErrorMessage__c = '503token:' + response.status;
+ // }
+ token = pi.token;
oldTime = Datetime.now();
token503.NFM501_Token__c = token;
oldTime503.NFM501_Gain_End_Time__c = oldTime;
@@ -93,7 +94,6 @@
//UP TO NEW AWS method sushanhu start 20220301
// List< Tender_information__c> updateTenderList = new List< Tender_information__c>();
List<FileAddress__c> fileList = new List<FileAddress__c>();
- PIHelper.piIntegration pi =PIHelper.getPIIntegrationInfo('NFM503');
transUrl =pi.searchUrl;
NFMUtil.response response = NFMUtil.getAWSQLMData(pi.newUrl ,JSON.serialize(queryfileList), token);
system.debug('aws result'+response.responseBody);
@@ -194,21 +194,21 @@
// add 纭浜嬪姟 sushanhu 20220302 start
if (fileList.size() > 0 ) {
- for (FileAddress__c fileAddress : fileList) {
+ for (FileAddress__c fileAddress : fileList) {
system.debug('fileAddress.Id---'+json.serialize(fileAddress));
- sfRecordIds.add(fileAddress.Id);
+ sfRecordIds.add(fileAddress.Id);
system.debug('fileAddress.Id---'+fileAddress.Id);
- }
+ }
}
system.debug('鎴愬姛鐨則oken'+token);
isSuccess =1;
// if (!confirm) {
- // //鍥炴粴
+ // //鍥炴粴
// if (sp != null) {
// Database.rollback(sp);
// }
- // }
+ // }
// add 纭浜嬪姟 sushanhu 20220302 end
if (System.Test.isRunningTest()) {
throw new ControllerUtil.myException('aaa');
diff --git a/force-app/main/default/classes/SimpleEventRegisterController.cls b/force-app/main/default/classes/SimpleEventRegisterController.cls
index 2bdec74..4c547c7 100644
--- a/force-app/main/default/classes/SimpleEventRegisterController.cls
+++ b/force-app/main/default/classes/SimpleEventRegisterController.cls
@@ -1050,9 +1050,9 @@
taskType = System.Label.OpportunityFollow; // 璇环璺熻繘浠诲姟
} else if (this.targetEvent.OPDPlan_Flag__c) {
taskType = System.Label.OPD; // OPD浠诲姟
- } else if (accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).Is_Target_Account_Energy__c == 1 || accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).Is_Target_Account__c == 1) {
+ } else if (!accToNumTarget.isEmpty() && !accToDepMap.isEmpty() && (accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).Is_Target_Account_Energy__c == 1 || accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).Is_Target_Account__c == 1)) {
taskType = System.Label.TargetAccountVisit; // 鐩爣瀹㈡埛鎷滆浠诲姟
- } else if (accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).OCM_Category__c == 'H1' || accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).OCM_Category__c == 'H0') {
+ } else if (!accToNumTarget.isEmpty() && !accToDepMap.isEmpty() && (accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).OCM_Category__c == 'H1' || accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).OCM_Category__c == 'H0')) {
taskType = System.Label.visitHLevel; // H灞傛嫓璁夸换鍔�
} else {
taskType = System.Label.DailyVisit;// 鏃ョ▼鎷滆浠诲姟
diff --git a/force-app/main/default/triggers/Repair.trigger b/force-app/main/default/triggers/Repair.trigger
index 379fc9e..cc50c6d 100644
--- a/force-app/main/default/triggers/Repair.trigger
+++ b/force-app/main/default/triggers/Repair.trigger
@@ -18,11 +18,11 @@
//wangweipeng 20210727 end
if ((Trigger.isAfter && Trigger.isInsert) || (Trigger.isAfter && Trigger.isUpdate) || (Trigger.isAfter && Trigger.isDelete)) {
- if(!(System.isFuture()||System.isBatch())){// Add By Lijun 20220303 to avoid mutiple execute
+ // if(!(System.isFuture()||System.isBatch())){// Add By Lijun 20220303 to avoid mutiple execute
NFM103Controller.NFM103Trigger(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap);
NFM603Controller.NFM603Trigger(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap);
RepairTrigger.UpdateAssert(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap);
- }
+ // }
}
// ----------------------------------------------------------------------
// 銇撱亾銈堛倞銆佷慨鐞嗐伄銈点兗銉撱偣銈炽兂銉堛儵銈儓闋呯洰銈掕嚜鍕曠殑銇洿鏂般仚銈嬨儹銈搞儍銈�
--
Gitblit v1.9.1