| | |
| | | trigger NFM007 on Opportunity (before update, after update) { // after insert を考慮しない |
| | | // SWAG-CE55BX 预测优化 start |
| | | if (StaticParameter.EscapeOppandStaTrigger) { |
| | | return; |
| | | } |
| | | // SWAG-CE55BX 预测优化 end |
| | | if (StaticParameter.EscapeNFM007Trigger) { |
| | | System.debug('Escape、EscapeNFM007Trigger:::::' + StaticParameter.EscapeNFM007Trigger); |
| | | return; |
| | |
| | | |
| | | // SAPWINはボタンで動くじゃなく、手動でチェック⇒保存だから、js無理 |
| | | if (Trigger.oldMap.get(opp.Id).get('SAP_Send_OK__c') == false && opp.SAP_Send_OK__c == true) { |
| | | |
| | | //SWAG-CG88AG【委托】提出价格申请是在协议有效期内,允许WIN fy start |
| | | if(string.isNotBlank(opp.Estimation_No__c)){ |
| | | Boolean judge = OpportunityWebService.judgeIsAssistantAppliedOutTime(opp.Estimation_No__c); |
| | | if(!judge){ |
| | | opp.addError('经销商协议已过期,请重新做报价计算和合同申请'); |
| | | } |
| | | } |
| | | //SWAG-CG88AG【委托】提出价格申请是在协议有效期内,允许WIN fy end |
| | | //CHAN-BCNCRB XHL If_Have_EPT1__c |
| | | if (opp.If_Have_EPT1__c == true && opp.If_UploadT1Detailed__c == false) { |
| | | opp.addError('询价产品中包含EP-T1产品,但没上传T1清单,无法进行SAP上传(WIN),请上传T1清单'); |
| | |
| | | insert iflog; |
| | | iflog = [Select Id, Name from BatchIF_Log__c where Id = :iflog.Id]; |
| | | System.debug(Logginglevel.DEBUG, 'NFM007_' + iflog.Name + ' start'); // callout の中 end のlogを出します |
| | | NFM007Controller.callout(iflog.Id, oppIds, purposeOfAdviceMap); |
| | | |
| | | // 20220921 ljh SWAG-CG2A7S update start |
| | | // NFM007Controller.callout(iflog.Id, oppIds, purposeOfAdviceMap); |
| | | String uid = UserInfo.getUserId(); |
| | | String iUid = System.Label.interfaceUserID; |
| | | if (uid.substring(0,15) == iUid.substring(0,15)) { |
| | | NFM007Controller.calloutNotfuture(iflog.Id, oppIds, purposeOfAdviceMap); |
| | | }else{ |
| | | NFM007Controller.callout(iflog.Id, oppIds, purposeOfAdviceMap); |
| | | } |
| | | // 20220921 ljh SWAG-CG2A7S update end |
| | | |
| | | } |
| | | |
| | | if(System.Test.isRunningTest()){ |