From 962519811b7c4be07f30d09e791798b0ea79d3ae Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期三, 08 三月 2023 09:54:02 +0800
Subject: [PATCH] 同步代码
---
force-app/main/default/classes/StraightBackAddressController.cls | 66 ++++++++++++++++++++++++++-------
1 files changed, 52 insertions(+), 14 deletions(-)
diff --git a/force-app/main/default/classes/StraightBackAddressController.cls b/force-app/main/default/classes/StraightBackAddressController.cls
index f243b9d..7bbd4ef 100644
--- a/force-app/main/default/classes/StraightBackAddressController.cls
+++ b/force-app/main/default/classes/StraightBackAddressController.cls
@@ -145,6 +145,12 @@
}
}else if('杩旈�佸姙浜嬪'.equals(pc.Returns_Product_way__c)){
optionAddressClassification.Address_Classification__c = '鍔炰簨澶�';
+ //
+ }else if ('澶囧搧涓績'.equals(pc.Returns_Product_way__c)) {
+ optionAddressClassification.Address_Classification__c = '澶囧搧';
+ //
+
+
}else{
//鑾峰彇褰撳墠淇悊鐨勮繑閫佺粡閿�鍟�
if(!String.isBlank(pc.Dealer__c) && '杩旈�佺粡閿�鍟�'.equals(pc.Returns_Product_way__c)){
@@ -349,18 +355,19 @@
tableData.add(new AddressData(accoutList[0],'none','inline','none','鍖婚櫌'));
}
}
- //鍔炰簨澶�
- /*if('鍔炰簨澶�'.equals(typeText)){
- String AccountOfficeSql = makeTextAccOfficeSql();
- //鑾峰彇鍦板潃淇℃伅
- List<Account> accDataList = Database.query(AccountOfficeSql);
- if(accDataList != null && accDataList.size() > 0){
- for(Integer i = 0;i<accDataList.size();i++){
- indexCou++;
- tableData.add(new AddressData(accDataList[i],'none','鍔炰簨澶�'));
- }
- }
- }*/
+ // //澶囧搧锛�
+ // if(('澶囧搧'.equals(typeText))){
+ // //HP_ID__c 鍖婚櫌id
+
+ // typeSearchId = pc.HP_ID__c;
+ // String AccountSql = makeTextAccountSql(pc.HP_ID__c);
+ // //鑾峰彇鍦板潃淇℃伅
+ // List<Account> accoutList = Database.query(AccountSql);
+ // if(accoutList != null && accoutList.size() > 0){
+ // indexCou++;
+ // tableData.add(new AddressData(accoutList[0],'none','inline','none','澶囧搧'));
+ // }
+ // }
//缁忛攢鍟嗭細
//1锛氬鏋滄煡鍒板鏉$粡閿�鍟嗭紝骞朵笖鍦ㄥ湴鍧�涓煡鍒版湁鏁版嵁锛屽彧鏄剧ず鍦板潃鏁版嵁锛屽鏋滃湴鍧�鏁版嵁娌℃煡涓嶅埌锛屽氨涓嶆樉绀猴紝
//2锛氬鏋滄煡鍒版湁涓�鏉$粡閿�鍟嗭紝閭d箞绗竴琛屽氨鏄缁忛攢鍟嗘暟鎹紝浠庣浜岃寮�濮嬩负鍦板潃鏁版嵁
@@ -391,7 +398,9 @@
if(dataList[i].Address_Classification__c == '鍔炰簨澶�'){
tableData.add(new AddressData(dataList[i],'none','none','inline'));
- }else{
+ }else if (dataList[i].Address_Classification__c == '澶囧搧'){
+ tableData.add(new AddressData(dataList[i],'none','none','inline'));
+ } else{
//鍙兘鏀硅嚜宸卞垱寤虹殑鍦板潃鏁版嵁锛岀郴缁熺鐞嗗憳銆丟PI_绯荤粺绠$悊鍛楴ew 娌¢檺鍒�
if(loginPerson == createId ||loginPerson == '00e10000000dzzG' ||loginPerson == '00e10000000Y3o5'){
tableData.add(new AddressData(dataList[i],'inline','inline','inline'));
@@ -601,11 +610,34 @@
//鏌ヨ淇悊琛ㄦ暟鎹�
private String makeTextRepairSql(String uuid){
- String RepairSql = 'SELECT ID,NAME,HP_ID__c,HP_Name__c,Delivered_Product__c,FSE_ApplyForRepair_time__c,SAP_Transfer_time__c,Dealer__c,Dealer__r.Name,Returns_Product_way__c,Address_Type_Index__c,AWS_Data_Id__c FROM Repair__c where id = \''+RepairId+'\'';
+ String RepairSql = 'SELECT ID,NAME,HP_ID__c,HP_Name__c,Delivered_Product__c,FSE_ApplyForRepair_time__c,SAP_Transfer_time__c,Dealer__c,Dealer__r.Name,Returns_Product_way__c,Address_Type_Index__c,AWS_Data_Id__c,Incharge_Staff__r.UserRole.name,Incharge_Staff__r.Branch__c,Incharge_Staff__r.Profile.name FROM Repair__c where id = \''+RepairId+'\'';
return RepairSql;
}
//鏌ヨ鍦板潃琛ㄦ暟鎹�
private String makeTextAddressSql(String typeSearchId) {
+ // DB202212270703 澶囧搧淇悊鐩磋繑鍦板潃椤圭洰瀵煎叆 start
+ String beipCenter = '';
+ if (pc.Returns_Product_way__c == '澶囧搧涓績') {
+ if (pc.Incharge_Staff__r.Profile.name.startsWith('2B2')) {
+ if (pc.Incharge_Staff__r.Branch__c == '鍖椾含') {
+ beipCenter = '鍖椾含澶囧搧涓績';
+ }else if (pc.Incharge_Staff__r.Branch__c == '涓婃捣') {
+ beipCenter = '鍗庝笢澶囧搧涓績';
+ }else if (pc.Incharge_Staff__r.Branch__c == '骞垮窞') {
+ beipCenter = '骞垮窞澶囧搧涓績';
+ }
+ }else if (pc.Incharge_Staff__r.UserRole.name == 'CTEC鏁欒偛鏈儴') {
+ if (pc.Incharge_Staff__r.Branch__c == '鍖椾含') {
+ beipCenter = '鍖椾含C-TEC';
+ }else if (pc.Incharge_Staff__r.Branch__c == '涓婃捣') {
+ beipCenter = '涓婃捣C-TEC';
+ }else if (pc.Incharge_Staff__r.Branch__c == '骞垮窞') {
+ beipCenter = '骞垮窞C-TEC';
+ }
+
+ }
+ }
+ // DB202212270703 澶囧搧淇悊鐩磋繑鍦板潃椤圭洰瀵煎叆 end
// WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 start
// String AddressSql = 'SELECT AWS_Data_Id__c,ID,Address_Classification__c,Customer__c,Customer__r.Name,Customer__r.Type,Customer__r.RecordTypeId,Contacts__c,Contacts__r.Name,Contacts__r.AWS_Data_Id__c,ContactName__c,Telephone__c,ContactName_Encrypted__c' //zhj 鏂版柟妗堟敼閫� 鍘婚櫎Encrypted__c 2022-12-05
// +',Province__c,Province__r.Name,City__c,City__r.name,Detailed_Address__c,Create_Contacts__c,ZipCode__c,CreatedByid,Detailed_Address_Encrypted__c,Telephone_Encrypted__c,ZipCode_Encrypted__c,Contacts__r.LastName_Encrypted__c'
@@ -627,6 +659,12 @@
if('鍔炰簨澶�'.equals(typeText)){
AddressSql += ' and Address_Classification__c LIKE \'%' + typeText.trim() + '%\'' ;
}
+ if('澶囧搧'.equals(typeText)){
+ AddressSql += ' and Address_Classification__c LIKE \'%' + typeText.trim() + '%\'' ;
+ // if (String.isNotBlank(beipCenter)) {
+ // AddressSql += ' and Beipin_Center__c = \'' + String.escapeSingleQuotes(beipCenter) +'\'' ;
+ // }
+ }
if('缁忛攢鍟�'.equals(typeText)){
if(String.isBlank(typeSearchId)){
AddressSql += ' and Address_Classification__c LIKE \'%' + typeText.trim() + '%\'' ;
--
Gitblit v1.9.1