From f26297c82c7ea74fa34043fc6ddb032bcf37997e Mon Sep 17 00:00:00 2001 From: 付煜 <fuyu3103346691@163.com> Date: 星期四, 31 三月 2022 18:04:55 +0800 Subject: [PATCH] 007接口 --- force-app/main/default/classes/NFM007Controller.cls | 77 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 72 insertions(+), 5 deletions(-) diff --git a/force-app/main/default/classes/NFM007Controller.cls b/force-app/main/default/classes/NFM007Controller.cls index 73ee433..c95d661 100644 --- a/force-app/main/default/classes/NFM007Controller.cls +++ b/force-app/main/default/classes/NFM007Controller.cls @@ -370,7 +370,21 @@ detail.PROCODE = '8888'; } system.debug(' detail.PROCODE=='+detail.PROCODE); - detail.GuaranteeType = promotionSalesProductsList.get(i).latestWarrantyType__c; // 淇濅慨绫诲埆 + //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; // 淇濅慨绫诲埆 if (!oldDate) { if (promotionSalesProductsList.get(i).latestProvistonPeriod__c != null) { detail.ProvistonPeriod = String.valueOf(promotionSalesProductsList.get(i).latestProvistonPeriod__c).leftPad(2,'0'); @@ -472,9 +486,36 @@ //淇濅慨绫诲埆 if(oppLiList.get(i).latestWarrantyType__c != null){ - detail.GuaranteeType = oppLiList.get(i).latestWarrantyType__c; // 淇濅慨绫诲埆 + //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; // 淇濅慨绫诲埆 }else{ - detail.GuaranteeType = 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.GuaranteePrice = oppLiList.get(i).latestGuranteePrice__c; @@ -492,7 +533,20 @@ // detail.GuaranteePeriod = null; // detail.GuaranteeType = null; //澶栬锤澶氬勾淇濅慨鏈笂绾垮墠 淇濅慨绫诲埆 浼爊ull - detail.GuaranteeType = 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; //澶栬锤澶氬勾淇濅慨鏈笂绾垮墠 璁℃彁閲戦 浼�0 detail.GuaranteePrice = 0; //澶栬锤澶氬勾淇濅慨鏈笂绾垮墠 nodiscount 浼�0 @@ -506,7 +560,20 @@ //鈶ecide鍦�20191001 涔嬪墠 鑰佹暟鎹� else if(oldDate){ detail.GuaranteePeriod = null; - detail.GuaranteeType = 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.ProvistonPeriod = null; detail.GuaranteePrice = null; detail.ServicePrice = null; -- Gitblit v1.9.1