| | |
| | | // NFM103Controller.callout(iflog.Id, rprIds); |
| | | String uid = UserInfo.getUserId(); |
| | | String BUid = System.Label.Batch_User_Id; |
| | | String OLYid = System.Label.OlympusSystem_ID; |
| | | System.debug('zheli'); |
| | | if (uid.substring(0,15) == BUid.substring(0,15)) { |
| | | NFM103Controller.calloutNotfuture(iflog.Id, rprIds, null); |
| | | if (uid.substring(0,15) == BUid.substring(0,15) || uid.substring(0,15) == OLYid.substring(0,15)) { |
| | | NFM103Controller.calloutNotfuture(iflog.Id, rprIds); |
| | | }else{ |
| | | NFM103Controller.callout(iflog.Id, rprIds, null); |
| | | NFM103Controller.callout(iflog.Id, rprIds); |
| | | } |
| | | // 20220902 ljh XLIU-CHSD8G update end |
| | | } |
| | |
| | | * @param repairIds 送信対象修理 |
| | | */ |
| | | @future (callout = true) |
| | | public static void callout(String iflog_Id, List<Id> repairIds, String flag) { |
| | | calloutNotfuture(iflog_Id, repairIds, flag); |
| | | public static void callout(String iflog_Id, List<Id> repairIds) { |
| | | calloutNotfuture(iflog_Id, repairIds); |
| | | } |
| | | //20220902 ljh 新增(复制)方法 XLIU-CHSD8G |
| | | public static void calloutNotfuture(String iflog_Id, List<Id> repairIds,String flag) { |
| | | public static void calloutNotfuture(String iflog_Id, List<Id> repairIds) { |
| | | |
| | | if (repairIds == null || repairIds.size() == 0) { |
| | | return; |
| | |
| | | rprId = rpr.Id; //2022-07-14 zyh add |
| | | |
| | | //再注册分析 需求 新增字段 20220811 sx start |
| | | element.Reanalysis = flag; |
| | | |
| | | if(flag != null){ |
| | | element.UpdateStatus = 'X'; |
| | | } |
| | | element.Reanalysis = null; |
| | | //再注册分析 需求 新增字段 20220811 sx end |
| | | } |
| | | |
| | |
| | | // エラーが発生した場合 |
| | | System.debug(Logginglevel.ERROR, 'NFM103_' + iflog.Name + ':' + ex.getMessage()); |
| | | System.debug(Logginglevel.ERROR, 'NFM103_' + iflog.Name + ':' + ex.getStackTraceString()); |
| | | logstr += ex.getMessage(); |
| | | iflog.ErrorLog__c += ex.getMessage() + '\n'; |
| | | iflog.ErrorLog__c += ex.getStackTraceString() + '\n'; |
| | | //NFM105触发103接口 20230303 LY start |
| | | // Callout from triggers are currently not supported. |
| | | System.debug('NFM201jiekou'+ex.getMessage()); |
| | | if (!String.valueOf(ex.getMessage()).contains('Callout from triggers')) { |
| | | |
| | | logstr += ex.getMessage(); |
| | | iflog.ErrorLog__c += ex.getMessage() + '\n'; |
| | | iflog.ErrorLog__c += ex.getStackTraceString() + '\n'; |
| | | } |
| | | System.debug('标记0--------------------1:' + rowData.retry_cnt__c); |
| | | |
| | | //NFM105触发103接口 20230303 LY end |
| | | //---Gaozw---add |
| | | if (rowData.retry_cnt__c == null) rowData.retry_cnt__c = 0; |
| | | if (rowData.retry_cnt__c < batch_retry_max_cnt) { |