| | |
| | | |
| | | //新增权限整理2021-05-10 |
| | | if (new_profileId.subString(0, 15) == System.label.Market_Department || new_profileId.subString(0, 15) == System.label.Market_Department1 || new_profileId.subString(0, 15) == System.label.Service_Owner || new_profileId.subString(0, 15) == System.label.Service_OwnerMinister |
| | | || UserInfo.getUserType() == 'PowerPartner' || new_profileId.subString(0, 15) == System.label.IEPrototypeManager || newAcc.RecordTypeId == '0120T0000003Cxt') { |
| | | || UserInfo.getUserType() == 'PowerPartner' || new_profileId.subString(0, 15) == System.label.IEPrototypeManager) { |
| | | //新增权限整理2021-05-10 |
| | | newAcc.IsNew__c = true; |
| | | } else { |
| | |
| | | //IE与LS分野的增加与修改 |
| | | newAcc.Sub_UseA__c = newAcc.Sub_Use1__c; |
| | | newAcc.Sub_UseD__c = newAcc.Sub_Use__c; |
| | | newAcc.IndustryBD__c = newAcc.IndustryB__c; |
| | | //newAcc.IndustryBD__c = newAcc.IndustryB__c; |
| | | |
| | | //IE与LS分野的增加与修改 |
| | | newAcc.UseD__c = newAcc.Use__c; |
| | |
| | | |
| | | } |
| | | //gwy 2021-06-04 LS 新增必填项OEM客户的标识 |
| | | if(newAcc.UserType__c == 'OEM客户' && newAcc.ProductSegment__c == 'BS'){ |
| | | /*if(newAcc.UserType__c == 'OEM客户' && newAcc.ProductSegment__c == 'BS'){ |
| | | newAcc.Whether_OEM__c = true; |
| | | } |
| | | }*/ |
| | | //王鹏伟添加 服务部创建客户、联系人 |
| | | //00528000000YWC6 孙 学洋 00528000000YWC6 |
| | | //00528000000YWE7 吴 晓东 00528000000YWE7 |
| | |
| | | // } else if (newAcc.Sub_Use__c == '炼钢厂') { |
| | | // newAcc.IndustryC__c = 'Metal Manufacturing'; |
| | | // newAcc.MarketVerticals__c = 'Manufacturing'; |
| | | // newAcc.Use__c = ' Tube/Rod/Bar/Sheet Metal'; |
| | | // newAcc.Use__c = ' Tube/Rod/Bar/Sheet Metal'; |
| | | // } else if (newAcc.Sub_Use__c == 'PMI-石化行业') { |
| | | // newAcc.IndustryC__c = 'Chemical/Petrochemical/Plastics'; |
| | | // newAcc.MarketVerticals__c = 'Maintenance'; |
| | |
| | | newAcc.AssetNDT4D__c != oldAcc.AssetNDT4D__c || |
| | | newAcc.IndustryCD__c != oldAcc.IndustryCD__c || |
| | | //gwy BS |
| | | newAcc.IndustryBD__c != oldAcc.IndustryBD__c || |
| | | //newAcc.IndustryBD__c != oldAcc.IndustryBD__c || |
| | | newAcc.AssetRVI4D__c != oldAcc.AssetRVI4D__c || |
| | | newAcc.AssetRVI3D__c != oldAcc.AssetRVI3D__c || |
| | | //newAcc.KeyAccountD__c != oldAcc.KeyAccountD__c || |
| | |
| | | //王鹏伟 添加&&((oldCon.ProductSegmentIE__c == true || oldCon.ProductSegmentRVI__c == true) && oldCon.isServiceCreate__c == true) |
| | | //服务部修改联系人信息 LS、NDT、ANI无需审批跳过审批状态变草案 |
| | | //新增权限整理2021-05-10 |
| | | //gwy 2021-08-20 除了市场部的人,都可以变草案 |
| | | //List<String> markNot = new String [] {'00528000000YVIc','0050K00000B3aNb','0050K00000B3aN7','00528000001uK0Z','00528000000YVHy','00528000000YVID'}; |
| | | if ((oldAcc.MarkisorNo__c == false |
| | | //新增权限整理2021-05-10 |
| | | || UserInfo.getUserType() == 'PowerPartner') |
| | | if ((new_profileId.subString(0, 15) == System.label.Service_Owner |
| | | //新增权限整理2021-05-10 |
| | | || UserInfo.getUserType() == 'PowerPartner' || now_userId == '00528000000YWC6' || now_userId == '00528000000YWE7') |
| | | && !((oldAcc.ProductSegment__c == 'BS' || oldAcc.ProductSegment__c == 'NDT' || oldAcc.ProductSegment__c == 'ANI') && oldAcc.serviceCreate__c == true)) { |
| | | newAcc.stautesD__c = 'Draft'; |
| | | } |
| | |
| | | newAcc.AssetNDT4D__c = newAcc.AssetNDT4__c; |
| | | } |
| | | //gwy BS |
| | | if (newAcc.IndustryB__c != oldAcc.IndustryB__c) { |
| | | /*if (newAcc.IndustryB__c != oldAcc.IndustryB__c) { |
| | | newAcc.IndustryBD__c = newAcc.IndustryB__c; |
| | | } |
| | | }*/ |
| | | if (newAcc.IndustryC__c != oldAcc.IndustryC__c) { |
| | | newAcc.IndustryCD__c = newAcc.IndustryC__c; |
| | | } |
| | |
| | | newAcc.DepartmentNameD__c = newAcc.DepartmentName__c; |
| | | } |
| | | //gwy 2021-06-08 客户取消邮编必填项 |
| | | /* if (newAcc.PostCodeD__c == null) { |
| | | /*if (newAcc.PostCodeD__c == null) { |
| | | newAcc.PostCodeD__c = '000000'; |
| | | }*/ |
| | | //王鹏伟新加 服务部创建客户联系人 |
| | |
| | | newAcc.AssetRVI2D__c = newAcc.AssetRVI2__c; |
| | | newAcc.AssetNDT4D__c = newAcc.AssetNDT4__c; |
| | | //gwy 2021-06-15 更改 |
| | | newAcc.IndustryBD__c = newAcc.IndustryB__c; |
| | | newAcc.IndustryCD__c = newAcc.IndustryC__c; |
| | | //newAcc.IndustryBD__c = newAcc.IndustryB__c; |
| | | //newAcc.IndustryCD__c = newAcc.IndustryC__c; |
| | | //newAcc.IndustryCD__c = newAcc.IndustryB__c; |
| | | //newAcc.IndustryBD__c = newAcc.IndustryB__c; |
| | | newAcc.AssetRVI4D__c = newAcc.AssetRVI4__c; |
| | |
| | | } |
| | | } |
| | | //gwy 2021-06-04 LS 新增必填项OEM客户的标识 |
| | | if(newAcc.UserType__c == 'OEM客户' && newAcc.ProductSegment__c == 'BS'){ |
| | | /*if(newAcc.UserType__c == 'OEM客户' && newAcc.ProductSegment__c == 'BS'){ |
| | | newAcc.Whether_OEM__c = true; |
| | | }else{ |
| | | newAcc.Whether_OEM__c = false; |
| | | } |
| | | }*/ |
| | | } |
| | | } |
| | | |
| | |
| | | for (Account newAcc : newList) { |
| | | |
| | | accIdList.add(newAcc.Id); |
| | | String dealerId = userMap.get(newAcc.OwnerId); |
| | | // String dealerId = userMap.get(newAcc.OwnerId); |
| | | // 手动导入客户 XHL 20210818 |
| | | String dealerId = String.isNotBlank(newAcc.ImportDealerId__c)? newAcc.ImportDealerId__c:userMap.get(newAcc.OwnerId); |
| | | |
| | | String groupId = StaticParameter.dealerGroupMap.get(dealerId == null ? '' : dealerId.substring(0, 15)); |
| | | Boolean flag = StaticParameter.specialDealerList.contains(dealerId == null ? '' : dealerId.substring(0, 15)); |
| | | if (flag) { |
| | |
| | | |
| | | List<AccountTeamMember> insertList = new list<AccountTeamMember>(); |
| | | for (Account newAcc : newList) { |
| | | String dealerId = userMap.get(newAcc.OwnerId); |
| | | // String dealerId = userMap.get(newAcc.OwnerId); |
| | | // 手动导入客户 XHL 20210818 |
| | | String dealerId = String.isNotBlank(newAcc.ImportDealerId__c)? newAcc.ImportDealerId__c:userMap.get(newAcc.OwnerId); |
| | | String groupId = StaticParameter.dealerGroupMap.get(dealerId == null ? '' : dealerId.substring(0, 15)); |
| | | // 市场战略部新建保存时将创建者插入客户小组 |
| | | if (newAcc.IsStrCreated__c == true) { |