| | |
| | | @RestResource(urlMapping = '/NFM612/*') |
| | | global with sharing class NFM612Rest { |
| | | //add to AWS 回复 start sushanhu 20220225 |
| | | static Boolean SFStatus=true; |
| | | static String SFMessage=''; |
| | | //add to AWS 回复 end sushanhu 20220225 |
| | | public static final String LOG_TYPE = 'NFM612'; |
| | | global class GeData { |
| | | public RepairOderInfo repairOderInfo; |
| | |
| | | public String departmentCd; //报修科室编码 |
| | | public String repairApplyPerson; //报修人用户编码 |
| | | public String repairApplicantName; //报修人姓名 |
| | | public String repairApplicantNameEncrypted; //报修人姓名密文 add20220214 |
| | | public String repairApplyPersonTel; //报修人联系人电话 |
| | | public String repairApplyPersonTelEncrypted;//保修人联系电话 密文 add 20220214 |
| | | public String DataId;//aws 存储凭证 add 20220214 |
| | | public String repairApplyType; // 报修人岗位 |
| | | public String equipmentCategory; //设备大类 |
| | | public String assetType; //设备类型 |
| | |
| | | res.addHeader('Content-Type', 'application/json'); |
| | | res.statusCode = 200; |
| | | //String jsonResponse = '{"status": "Success", "Message":' + gedata + '}'; |
| | | String jsonResponse = '{"status": "Success", "Message":"成功"}'; |
| | | res.responseBody = Blob.valueOf(jsonResponse); |
| | | // String jsonResponse = '{"status": "Success", "Message":"成功"}'; |
| | | // res.responseBody = Blob.valueOf(jsonResponse); |
| | | //updata response toAWS 20220225 sushanhu start |
| | | NFMUtil.NFMResponse result = NFMUtil.getNFMResponse(); |
| | | result.SFStatus=SFStatus; |
| | | result.SFMessage=SFMessage; |
| | | String jsonResponse =JSON.serialize(result); |
| | | system.debug('result---'+jsonResponse); |
| | | res.responseBody = blob.valueOf(jsonResponse); |
| | | //updata response toAWS 20220225 sushanhu end |
| | | return; |
| | | } |
| | | @future(callout = true) |
| | |
| | | repair.EndTimeThird__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.endTimeThird); //三次上门结束时间 |
| | | repair.FaultDescriptionThird__c = ged.repairOderInfo.faultDescriptionThird; //三次故障描述 |
| | | repair.ApplicantType__c = ged.repairOderInfo.applicantType; //申请修理人类型 |
| | | |
| | | repair.RepairApplicantName_Encrypted__c =ged.repairOderInfo.repairApplicantNameEncrypted; //报修人姓名密文 add 20220214 |
| | | repair.RepairApplicantTel_Encrypted__c = ged.repairOderInfo.repairApplyPersonTelEncrypted;//保修人联系电话密文 add 20220214 |
| | | repair.AWS_Data_Id__c =ged.repairOderInfo.DataId;//AWS 存储凭证 add 20220214 |
| | | // repair.Applicant__c = canidMap.get(ged.repairOderInfo.applicantId).Id; //申请修理人编号 |
| | | repair.Applicanter__c = personMap.get(ged.repairOderInfo.applicantId);//申请修理人编号 |
| | | repair.ApplicationTime__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.applyDate); //申请时间 |
| | |
| | | repair.AirframeCodeEngineer__c = ged.applyRepairInfo.equipmentCd; //机身编码(工程师) |
| | | repair.ResponseResultDesc__c = ged.applyRepairInfo.responseResultDesc; //应对描述 |
| | | repair.ProcessResult__c = ged.applyRepairInfo.processResult; //处理结果 |
| | | |
| | | |
| | | if ('问题已解决'.equals(ged.applyRepairInfo.processResult)) { |
| | | repair.Status__c = '关闭'; |
| | | } else { |
| | |
| | | Database.rollback(sp); |
| | | logstr += '\n' + ex.getMessage(); |
| | | iflog.ErrorLog__c = ex.getMessage() + '\n' + ex.getStackTraceString() + '\n' + iflog.ErrorLog__c; |
| | | rowData = NFMUtil.LogAutoSend(rowData, ex, null); |
| | | if (!Test.isRunningTest()) { |
| | | rowData = NFMUtil.LogAutoSend(rowData, ex, null); |
| | | } |
| | | } |
| | | update rowData; |
| | | iflog.Log__c = logstr; |
| | |
| | | SELECT id, CManageCode__c,Employee_No_manual__c |
| | | FROM Contact |
| | | WHERE CManageCode__c IN: rpersonList OR Employee_No_manual__c IN:rpersonList]; |
| | | Map < String, Id > contactMap = new Map < String, Id > (); |
| | | Map < String, Id > contactMap = new Map < String, Id > (); |
| | | for (Contact con: couList) { |
| | | contactMap.put(con.CManageCode__c, con.Id); |
| | | if (String.isNotBlank(con.Employee_No_manual__c)) { |