From 7db779f2a7cfb723463a81c0572f2b37475ee0e8 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期四, 31 三月 2022 18:43:14 +0800
Subject: [PATCH] PIPL0331V2Deploy
---
force-app/main/default/classes/SimpleEventRegisterController.cls | 4
force-app/main/default/pages/AccountTargetTab.page | 14 ----
force-app/main/default/classes/NFM007Controller.cls | 77 +------------------------
force-app/main/default/classes/NFM103Controller.cls | 32 +++++++---
4 files changed, 30 insertions(+), 97 deletions(-)
diff --git a/force-app/main/default/classes/NFM007Controller.cls b/force-app/main/default/classes/NFM007Controller.cls
index c95d661..73ee433 100644
--- a/force-app/main/default/classes/NFM007Controller.cls
+++ b/force-app/main/default/classes/NFM007Controller.cls
@@ -370,21 +370,7 @@
detail.PROCODE = '8888';
}
system.debug(' detail.PROCODE=='+detail.PROCODE);
- //WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� fy start
- if(opp.Trade__c == '澶栬部'){
- detail.GuaranteeType = promotionSalesProductsList.get(i).latestWarrantyType__c+',';// 淇濅慨绫诲埆
- }else{
- Date nowDate = Date.today();
- // Date baojidate = Date.valueOf('2022-4-1');
- Date baojidate = Date.newInstance(2022,4,1);
- if(baojidate<=nowDate){
- detail.GuaranteeType = promotionSalesProductsList.get(i).latestWarrantyType__c+',new';
- }else{
- detail.GuaranteeType = promotionSalesProductsList.get(i).latestWarrantyType__c+',';
- }
- }
- //WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� fy end
- // detail.GuaranteeType = promotionSalesProductsList.get(i).latestWarrantyType__c; // 淇濅慨绫诲埆
+ detail.GuaranteeType = promotionSalesProductsList.get(i).latestWarrantyType__c; // 淇濅慨绫诲埆
if (!oldDate) {
if (promotionSalesProductsList.get(i).latestProvistonPeriod__c != null) {
detail.ProvistonPeriod = String.valueOf(promotionSalesProductsList.get(i).latestProvistonPeriod__c).leftPad(2,'0');
@@ -486,36 +472,9 @@
//淇濅慨绫诲埆
if(oppLiList.get(i).latestWarrantyType__c != null){
- //WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� fy start
- if(opp.Trade__c == '澶栬部'){
- detail.GuaranteeType = oppLiList.get(i).latestWarrantyType__c+',';// 淇濅慨绫诲埆
- }else{
- Date nowDate = Date.today();
- // Date baojidate = Date.valueOf('2022-4-1');
- Date baojidate = Date.newInstance(2022,4,1);
- if(baojidate<=nowDate){
- detail.GuaranteeType = oppLiList.get(i).latestWarrantyType__c+',new';
- }else{
- detail.GuaranteeType = oppLiList.get(i).latestWarrantyType__c+',';
- }
- }
- //WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� fy end
- // detail.GuaranteeType = oppLiList.get(i).latestWarrantyType__c; // 淇濅慨绫诲埆
+ detail.GuaranteeType = oppLiList.get(i).latestWarrantyType__c; // 淇濅慨绫诲埆
}else{
- //WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� fy start
- if(opp.Trade__c == '澶栬部'){
- detail.GuaranteeType = ',';
- }else{
- Date nowDate = Date.today();
- Date baojidate = Date.newInstance(2022,4,1);
- if(baojidate<=nowDate){
- detail.GuaranteeType = ',new';
- }else{
- detail.GuaranteeType = ',';
- }
- }
- //WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� fy end
- // detail.GuaranteeType = null;
+ detail.GuaranteeType = null;
}
//璁℃彁閲戦
detail.GuaranteePrice = oppLiList.get(i).latestGuranteePrice__c;
@@ -533,20 +492,7 @@
// detail.GuaranteePeriod = null;
// detail.GuaranteeType = null;
//澶栬锤澶氬勾淇濅慨鏈笂绾垮墠 淇濅慨绫诲埆 浼爊ull
- //WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� fy start
- if(opp.Trade__c == '澶栬部'){
- detail.GuaranteeType = ',';
- }else{
- Date nowDate = Date.today();
- Date baojidate = Date.newInstance(2022,4,1);
- if(baojidate<=nowDate){
- detail.GuaranteeType = ',new';
- }else{
- detail.GuaranteeType = ',';
- }
- }
- //WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� fy end
- // detail.GuaranteeType = null;
+ detail.GuaranteeType = null;
//澶栬锤澶氬勾淇濅慨鏈笂绾垮墠 璁℃彁閲戦 浼�0
detail.GuaranteePrice = 0;
//澶栬锤澶氬勾淇濅慨鏈笂绾垮墠 nodiscount 浼�0
@@ -560,20 +506,7 @@
//鈶ecide鍦�20191001 涔嬪墠 鑰佹暟鎹�
else if(oldDate){
detail.GuaranteePeriod = null;
- //WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� fy start
- if(opp.Trade__c == '澶栬部'){
- detail.GuaranteeType = ',';
- }else{
- Date nowDate = Date.today();
- Date baojidate = Date.newInstance(2022,4,1);
- if(baojidate<=nowDate){
- detail.GuaranteeType = ',new';
- }else{
- detail.GuaranteeType = ',';
- }
- }
- //WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� fy end
- // detail.GuaranteeType = null;
+ detail.GuaranteeType = null;
detail.ProvistonPeriod = null;
detail.GuaranteePrice = null;
detail.ServicePrice = null;
diff --git a/force-app/main/default/classes/NFM103Controller.cls b/force-app/main/default/classes/NFM103Controller.cls
index 6bf6784..19abb6d 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 String QuotationDate;
+ public Datetime 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,7 +394,8 @@
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.formatDateTime2StrSprit(rpr.Delivered_Product__r.Backorder__r.Opportunity__r.SAP_Send_OK_Date__c).replaceAll('/', '');
+ //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;
//20220330 lt WLIG-CCT9UG 銆愬鎵樸�戝叧浜庡競鍦哄骞翠繚璁℃彁閲戣皟鏁� end
// 澶氬勾淇濅慨 LHJ Start
@@ -426,6 +427,10 @@
}*/
// 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;
@@ -492,7 +497,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
}
@@ -593,18 +598,23 @@
// 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
- // PIHelper.PIIntegration NFM103AWS =PIHelper.getPIIntegrationInfo('NFM103');
- // NFMUtil.response response = NFMUtil.sendToPiAWS(rowDataStr, NFM103AWS.newUrl,NFM103AWS.token);
+ 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);
//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/SimpleEventRegisterController.cls b/force-app/main/default/classes/SimpleEventRegisterController.cls
index 4c547c7..2bdec74 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.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)) {
+ } 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) {
taskType = System.Label.TargetAccountVisit; // 鐩爣瀹㈡埛鎷滆浠诲姟
- } 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')) {
+ } 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') {
taskType = System.Label.visitHLevel; // H灞傛嫓璁夸换鍔�
} else {
taskType = System.Label.DailyVisit;// 鏃ョ▼鎷滆浠诲姟
diff --git a/force-app/main/default/pages/AccountTargetTab.page b/force-app/main/default/pages/AccountTargetTab.page
index 68564d2..4ef0235 100644
--- a/force-app/main/default/pages/AccountTargetTab.page
+++ b/force-app/main/default/pages/AccountTargetTab.page
@@ -151,14 +151,9 @@
</td>
</tr>
<tr>
- <!-- 20220331 lt 浠婂勾娉ㄦ畫瀛楁淇敼 3.6.浣嶇疆浜掓崲 -->
- <!-- <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.BO_Forecast_ThousandY__c.label}</td>
+ <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.BO_Forecast_ThousandY__c.label}</td>
<td style="text-align: center;">
<apex:outputField value="{!history.rec.BO_Forecast_ThousandY__c}" style="width:90%; text-align: right;" />
- </td> -->
- <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.Opportunity_ThousandY__c.label}</td>
- <td style="text-align: center;">
- <apex:outputField value="{!history.rec.Opportunity_ThousandY__c}" style="width:90%; text-align: right;" />
</td>
<td>{!$ObjectType.Account_Number_of_target__c.fields.RivalHostsProportion_first__c.label}</td>
<td style="text-align: center;">
@@ -190,14 +185,9 @@
<td ></td> -->
</tr>
<tr>
- <!-- 20220331 lt 浠婂勾娉ㄦ畫瀛楁淇敼 3.6.浣嶇疆浜掓崲 -->
- <!-- <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.Opportunity_ThousandY__c.label}</td>
+ <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.Opportunity_ThousandY__c.label}</td>
<td style="text-align: center;">
<apex:outputField value="{!history.rec.Opportunity_ThousandY__c}" style="width:90%; text-align: right;" />
- </td> -->
- <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.BO_Forecast_ThousandY__c.label}</td>
- <td style="text-align: center;">
- <apex:outputField value="{!history.rec.BO_Forecast_ThousandY__c}" style="width:90%; text-align: right;" />
</td>
<td>{!$ObjectType.Account_Number_of_target__c.fields.AllHostsNumber__c.label}</td>
<td style="text-align: center;">
--
Gitblit v1.9.1