| | |
| | | /* |
| | | 用于给lwc的js初始化数据和对记录进行dml操作,此controller属于报告书 |
| | | */ |
| | | public with sharing class ReportController { |
| | | //给VOC完毕相应的js提供初始化数据 |
| | | @AuraEnabled |
| | | public static InitData initForVOCFinishButton (String recordId) { |
| | | InitData res = new initData(); |
| | |
| | | } |
| | | return res; |
| | | } |
| | | //给VOC判定相应的js提供初始化数据 |
| | | @AuraEnabled |
| | | public static InitData initForVOCCheckButton (String recordId) { |
| | | InitData res = new initData(); |
| | |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | //给VOC提出相应的js提供初始化数据 |
| | | @AuraEnabled |
| | | public static Initdata initForVOCSubmitButton(String recordId){ |
| | | InitData res = new InitData(); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | //给VOC回答相应的js提供初始化数据 |
| | | @AuraEnabled |
| | | public static Initdata initForVOCAnswerButton(String recordId){ |
| | | InitData res = new InitData(); |
| | |
| | | return res; |
| | | } |
| | | |
| | | |
| | | //给取消相应的js提供初始化数据 |
| | | @AuraEnabled |
| | | public static InitData initForCancelButton(String recordId){ |
| | | InitData res = new InitData(); |
| | |
| | | return res; |
| | | } |
| | | |
| | | |
| | | //给OCSM不要报告相应的js提供初始化数据 |
| | | @AuraEnabled |
| | | public static InitData initForOCSMNoToReportButton(String recordId){ |
| | | InitData res = new InitData(); |
| | |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | |
| | | //给SIStoOPD相应的js提供初始化数据 |
| | | @AuraEnabled |
| | | public static InitData initForSIStoOPDButton(String recordId){ |
| | | InitData res = new InitData(); |
| | |
| | | return res; |
| | | } |
| | | |
| | | |
| | | //给OCSM要报告相应的js提供初始化数据 |
| | | @AuraEnabled |
| | | public static InitData initForOCSMToReportButton(String recordId){ |
| | | InitData res = new InitData(); |
| | |
| | | return res; |
| | | } |
| | | |
| | | |
| | | //给提交(对手活动报告)相应的js提供初始化数据 |
| | | @AuraEnabled |
| | | public static InitData initForSubmitCompetitorReportButton(String recordId){ |
| | | InitData res = null; |
| | |
| | | return res; |
| | | } |
| | | |
| | | |
| | | //给提交相应的js提供初始化数据 |
| | | @AuraEnabled |
| | | public static void updateForSubmitButton(String reocrdId){ |
| | | try { |
| | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static void updateForOPDtoSISButton(String recordId){ |
| | | public static void updateForOPDtoSISButton(String recordId,String recordTypeId){ |
| | | try { |
| | | Report__c rac = new Report__c(); |
| | | rac.Id = recordId; |
| | | rac.RecordTypeId = '01210000000RLTi'; |
| | | rac.RecordTypeId = recordTypeId; |
| | | update rac; |
| | | } catch (Exception e) { |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | } |
| | | |
| | | |
| | | //取消提交操作更新相应数据 |
| | | @AuraEnabled |
| | | public static void updateForCancelSubmitReportButton(String recordId){ |
| | | try { |
| | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static void updateForCompleteButton(String recordId){ |
| | | public static void updateForCompleteButton(String recordId,String recordTypeId){ |
| | | Report__c rac = new Report__c(); |
| | | try { |
| | | rac.Id = recordId; |
| | | rac.Status__c = '完毕'; |
| | | rac.RecordTypeId = '01210000000Qeky'; |
| | | rac.RecordTypeId = recordTypeId; |
| | | update rac; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | //OCSM要报告操作更新相应数据 |
| | | @AuraEnabled |
| | | public static void updateForOCSMToReportButton(String recordId){ |
| | | try { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | //SIStoOPD操作更新相应数据 |
| | | @AuraEnabled |
| | | public static void updateForSIStoOPDButton(String recordId){ |
| | | public static String updateForSIStoOPDButton(String recordId,String recordTypeId){ |
| | | Report__c rac = new Report__c(); |
| | | try { |
| | | rac.Id = recordId; |
| | | rac.RecordTypeId = '01210000000Qekj'; |
| | | rac.RecordTypeId = recordTypeId; |
| | | update rac; |
| | | return null; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | return e.getMessage(); |
| | | } |
| | | } |
| | | |
| | | //DispatchOCSMQARA操作更新相应数据 |
| | | @AuraEnabled |
| | | public static void updateForDispatchOCSMQARAButton(String recordId){ |
| | | try { |
| | |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | } |
| | | |
| | | //OCSM不要报告操作更新相应数据 |
| | | @AuraEnabled |
| | | public static void updateForOCSMNoToReportButton(String recordId){ |
| | | try { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | //取消操作更新相应数据 |
| | | @AuraEnabled |
| | | public static void updateForCancelButton(String recordId){ |
| | | try { |
| | |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | } |
| | | |
| | | //VOC回答更新相应数据 |
| | | @AuraEnabled |
| | | public static String updateForVOCAnswerButton(String recordId){ |
| | | try { |
| | |
| | | } catch (Exception e) { |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | String exc = '' + e.getMessage(); |
| | | |
| | | return exc; |
| | | Integer left = exc.indexOf(':') + 1; |
| | | Integer right = exc.lastIndexOf(':'); |
| | | String str = exc.substring(left,right); |
| | | left = str.indexOf(',') + 1; |
| | | String newStr = str.substring(left); |
| | | return newStr; |
| | | } |
| | | } |
| | | |
| | |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | } |
| | | |
| | | //VOC回答更新相应数据 |
| | | @AuraEnabled |
| | | public static void updateForVOCSubmitButton(String recordId ,String createdById){ |
| | | try { |