| | |
| | | @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; |
| | |
| | | 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 |
| | | } |
| | | |
| | | // 销售人层级 |
| | |
| | | // 取得接口传输内容 |
| | | String strData = RestContext.request.requestBody.toString(); |
| | | GeDatas ges = (GeDatas) JSON.deserializeStrict(strData, GeDatas.class); |
| | | |
| | | NFMUtil.NFMResponse result = NFMUtil.getNFMResponse(); //add for pipl sushanhu 20220311 |
| | | if (ges == null) { |
| | | return; |
| | | } |
| | |
| | | RestResponse res = RestContext.response; |
| | | res.addHeader('Content-Type', 'application/json'); |
| | | res.statusCode = 200; |
| | | String jsonResponse = '{"status": "0", "Message":""}'; |
| | | //update response to aws 20220311 sushanhu for pipl start |
| | | // String jsonResponse = '{"status": "0", "Message":""}'; |
| | | // res.responseBody = blob.valueOf(jsonResponse); |
| | | //updata response toAWS |
| | | |
| | | result.SFStatus=SFStatus; |
| | | result.SFMessage=SFMessage; |
| | | String jsonResponse =JSON.serialize(result); |
| | | system.debug('result---'+jsonResponse); |
| | | res.responseBody = blob.valueOf(jsonResponse); |
| | | //update response to aws 20220311 sushanhu for pipl end |
| | | return; |
| | | } |
| | | |
| | |
| | | con.PhoneD__c = consigneeInfo.ContactPhone; |
| | | con.Postcode__c = consigneeInfo.PostalCode; |
| | | 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.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 : ''; |
| | | //判断在aws执行 |
| | | con.Address1__c= consigneeInfo.ContactAddress; |
| | | con.Address1D__c= consigneeInfo.ContactAddress; |
| | | con.Address1_Encrypted__c = consigneeInfo.ContactAddressEncrypted; |
| | | con.Address1D_Encrypted__c = 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'; |