| | |
| | | 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; //合作伙伴电话 |
| | |
| | | // 取得接口传输内容 |
| | | 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; |
| | | //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 |
| | | // 添加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; |
| | | } |
| | | |
| | |
| | | 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; |
| | | //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.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 |
| | |
| | | } |
| | | // 将代理商的合作伙伴客户设置为假 |
| | | 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; |
| | |
| | | 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; |