From 08a21f49f2eaf9cfc19ceb67b196cc36ba689305 Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期五, 13 五月 2022 20:52:25 +0800 Subject: [PATCH] FIxSWOPageIssue --- force-app/main/default/classes/SBG203Rest.cls | 83 +++++++++++++++++++++++++++++++++++++---- 1 files changed, 74 insertions(+), 9 deletions(-) diff --git a/force-app/main/default/classes/SBG203Rest.cls b/force-app/main/default/classes/SBG203Rest.cls index 2d69b2c..439066d 100644 --- a/force-app/main/default/classes/SBG203Rest.cls +++ b/force-app/main/default/classes/SBG203Rest.cls @@ -1,5 +1,10 @@ @RestResource(urlMapping = '/SBG203/*') global with sharing class SBG203Rest { + //add Response to aws 20220311 add sushanhu for pipl + + static Boolean SFStatus=true; + static String SFMessage=''; + //add Response to aws 20220311 add sushanhu for pipl global class GeDatas { public NFMUtil.Monitoring Monitoring; @@ -28,6 +33,7 @@ public String BPCodeforeign; //鍏嶇◣ public String BPType; //鍚堜綔浼欎即绫诲瀷 public String RegisterAddress; //浣忔墍(绛夊悓娉ㄥ唽鍦板潃) + public String RegisterAddressEncrypted;// add by sushanhu 瀛樺偍register瀵嗘枃 public String RegionName; //鐪佸埆 public String City; //甯� public String Phone; //鍚堜綔浼欎即鐢佃瘽 @@ -125,6 +131,19 @@ public String ContactMobilePhone; //鏀惰揣浜烘墜鏈� public String CITY1; //鏀惰揣浜哄煄甯� public String ContactEnglishName; //鑻辨枃鍚嶇О + // add for pi sushanhu 20220309 start + public String ContactNameEncrypted; //鏀惰揣浜哄悕绉板瘑鏂� + public String ContactPhoneEncrypted; //鏀惰揣浜虹數璇濆瘑鏂� + public String PostalCodeEncrypted; //閭紪瀵嗘枃 + public String ContactAddressEncrypted; //鏀惰揣鍦板潃瀵嗘枃 + public String ContactMobilePhoneEncrypted; //鏀惰揣浜烘墜鏈哄瘑鏂� + public String ContactEnglishNameEncrypted; //鑻辨枃鍚嶇О瀵嗘枃 + //delete by sushanhu 鍜屽鎴锋矡閫� 鍚庢湡 涓嶈祴鍊艰繖涓瓧娈� satrt 20220411 + // public String EnglishAddress; //鑻辨枃鍦板潃 + // public String EnglishAddressEncrypted;// 鑻辨枃鍦板潃瀵嗘枃 + //delete by sushanhu 鍜屽鎴锋矡閫� 鍚庢湡 涓嶈祴鍊艰繖涓瓧娈� end 20220411 + public String DataId; //aws瀛樺偍鍑嵁 + // add for pi sushanhu 20220309 end } // 閿�鍞汉灞傜骇 @@ -186,7 +205,6 @@ // 鍙栧緱鎺ュ彛浼犺緭鍐呭 String strData = RestContext.request.requestBody.toString(); GeDatas ges = (GeDatas) JSON.deserializeStrict(strData, GeDatas.class); - if (ges == null) { return; } @@ -204,8 +222,23 @@ RestResponse res = RestContext.response; res.addHeader('Content-Type', 'application/json'); res.statusCode = 200; - String jsonResponse = '{"status": "0", "Message":""}'; - res.responseBody = blob.valueOf(jsonResponse); + // 娣诲姞aws涓婄嚎寮�鍏� by sushanhu 20220422 + Boolean piOn =AWSServiceTool.getAWSServiceStatus(); + // test + // piOn =false; + if (piOn) { + //update response to aws 20220311 sushanhu for pipl start + // result.SFStatus=SFStatus; + // result.SFMessage=SFMessage; + // String jsonResponse =JSON.serialize(result); + // system.debug('result---'+jsonResponse); + String jsonResponse = '{"staticResponse":{"status":"0","Message":""},"SFStatus":true,"SFMessage":""}' ; + res.responseBody = blob.valueOf(jsonResponse); + //update response to aws 20220311 sushanhu for pipl end + }else { + String jsonResponse = '{"status": "0", "Message":""}'; + res.responseBody = blob.valueOf(jsonResponse); + } return; } @@ -1087,16 +1120,41 @@ con.PostcodeD__c = consigneeInfo.PostalCode; con.Address1__c = gda.BPType == '22' ? gda.RegisterAddress : consigneeInfo.ContactAddress; con.Address1D__c = gda.BPType == '22' ? gda.RegisterAddress : consigneeInfo.ContactAddress; - con.EnglishAddress__c = gda.BPType == '22' ? gda.STR_SUPPL1 : ''; + //update to aws pi start 20220309 sushanhu + // con.EnglishAddress__c = gda.BPType == '22' ? gda.STR_SUPPL1 : ''; + //鍒ゆ柇鍦╝ws鎵ц + con.Address1_Encrypted__c = gda.BPType == '22' ? gda.RegisterAddressEncrypted : consigneeInfo.ContactAddressEncrypted; + con.Address1D_Encrypted__c = gda.BPType == '22' ? gda.RegisterAddressEncrypted : consigneeInfo.ContactAddressEncrypted; + con.Postcode_Encrypted__c = consigneeInfo.PostalCodeEncrypted; + con.PostcodeD_Encrypted__c = consigneeInfo.PostalCodeEncrypted; + //delete by sushanhu 鍜屽鎴锋矡閫� 鍚庢湡 涓嶈祴鍊艰繖涓瓧娈� satrt 20220411 + // con.EnglishAddress__c = gda.BPType == '22' ? consigneeInfo.EnglishAddress : ''; + // con.EnglishAddress_Encrypted__c=gda.BPType == '22' ?consigneeInfo.EnglishAddressEncrypted : ''; + //delete by sushanhu 鍜屽鎴锋矡閫� 鍚庢湡 涓嶈祴鍊艰繖涓瓧娈� end 20220411 + //update to aws pi start 20220309 sushanhu end if (String.isNotBlank(consigneeInfo.ContactEnglishName) && gda.BPType == '22') { - con.LastName = consigneeInfo.ContactName + '(' + consigneeInfo.ContactEnglishName + ')'; + //update for pipl 鍜屽鎴锋矡閫� 瀵嗘枃鏄剧ず浣嶆暟涓嶅彉 20220411 start + // con.LastName = consigneeInfo.ContactName + '(' + consigneeInfo.ContactEnglishName + ')'; + con.LastName = consigneeInfo.ContactName ; + //update for pipl 鍜屽鎴锋矡閫� 瀵嗘枃鏄剧ず浣嶆暟涓嶅彉 20220411 end + con.FirstName = null; + con.FirstName_Encrypted__c =null; ////add for pipl susahnhu 20220311 con.ContactEnglishName__c = consigneeInfo.ContactEnglishName; + con.ContactEnglishName_Encrypted__c= consigneeInfo.ContactEnglishNameEncrypted;//add for pipl susahnhu 20220311 } else { con.LastName = consigneeInfo.ContactName; con.FirstName = null; + con.FirstName_Encrypted__c =null; ////add for pipl susahnhu 20220311 } - + //add for pipl susahnhu 20220311 start + con.LastName_Encrypted__c = consigneeInfo.ContactNameEncrypted; + con.AWS_Data_Id__c = consigneeInfo.DataId;// AWS 瀛樺偍鍑嵁 add for pipl susahnhu 20220311 + con.MobilePhone_Encrypted__c = consigneeInfo.ContactPhoneEncrypted; + con.MobilePhoneD_Encrypted__c = consigneeInfo.ContactPhoneEncrypted; + con.Phone_Encrypted__c = consigneeInfo.ContactPhoneEncrypted; + con.PhoneD_Encrypted__c = consigneeInfo.ContactPhoneEncrypted; + //add for pipl susahnhu 20220311 end con.ContactStatus__c = 'Active'; con.ContactStatusD__c = 'Active'; con.StatusD__c = 'Pass'; @@ -1387,7 +1445,10 @@ } // 灏嗕唬鐞嗗晢鐨勫悎浣滀紮浼村鎴疯缃负鍋� accountInfo.Dealer_Type__c = NFMUtil.getMapValue(transferMap, 'Dealer_Type__c', gda.AgentType, iflog); - accountInfo.EnglishAddress__c = gda.RegisterAddress; + //accountInfo.EnglishAddress__c = gda.RegisterAddress; + //update to oher1 add by sushanhu 20220422 start + accountInfo.EnglishAddress__c = gda.other1; + //update to oher1 add by sushanhu 20220422 end } else if (gda.BPType == '22') { accountInfo.RecordTypeId = '01228000000TF3Q'; //澶栬锤鍏徃 accountInfo.Name = gda.CompanyName; @@ -1479,8 +1540,12 @@ accountInfo.EnglishNameD__c = gda.CompanyEnglishName; accountInfo.City__c = gda.City; accountInfo.CityD__c = gda.City; - accountInfo.Address1__c = gda.RegisterAddress; - accountInfo.Address1D__c = gda.RegisterAddress; + //update to oher1 add by sushanhu 20220422 start + // accountInfo.Address1__c = gda.RegisterAddress; + // accountInfo.Address1D__c = gda.RegisterAddress; + accountInfo.Address1__c = gda.other1; + accountInfo.Address1D__c = gda.other1; + //update to oher1 add by sushanhu 20220422 end accountInfo.Phone = gda.Phone; accountInfo.PhoneD__c = gda.Phone; accountInfo.Fax = gda.Fax; -- Gitblit v1.9.1