| | |
| | | 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'); |
| | |
| | | |
| | | //保修类别 |
| | | 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; |
| | |
| | | // detail.GuaranteePeriod = null; |
| | | // detail.GuaranteeType = null; |
| | | //外贸多年保修未上线前 保修类别 传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; |
| | | //外贸多年保修未上线前 计提金额 传0 |
| | | detail.GuaranteePrice = 0; |
| | | //外贸多年保修未上线前 nodiscount 传0 |
| | |
| | | //③decide在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; |