付煜
2022-03-31 f26297c82c7ea74fa34043fc6ddb032bcf37997e
007接口
1个文件已修改
77 ■■■■■ 已修改文件
force-app/main/default/classes/NFM007Controller.cls 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
                            //外贸多年保修未上线前 保修类别 传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
@@ -506,7 +560,20 @@
                        //③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;