From d8dc84a3d56df839895f1c417a4d9cbee763d262 Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 03 三月 2023 14:50:59 +0800
Subject: [PATCH] gzw 测试环境代码更新
---
force-app/main/default/classes/NFM105Rest.cls | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/classes/NFM105Rest.cls b/force-app/main/default/classes/NFM105Rest.cls
index 80e7a37..4d41916 100644
--- a/force-app/main/default/classes/NFM105Rest.cls
+++ b/force-app/main/default/classes/NFM105Rest.cls
@@ -165,6 +165,7 @@
,Maintenance_Contract__c
,SerialNumber__c
,Agreed_Date__c
+ ,Limit_Price__c //涓婇檺鍚堝悓 LY 20230209
from Repair__c
where SAPRepairNo__c in :sapRepairNoList
OR Name in :sfdcRepairNoList]
@@ -592,7 +593,26 @@
update astUpdateMap.values();
}
-
+ //涓婇檺鍚堝悓 LY 20230131 start 缁翠慨鍚堝悓涓婄殑鍚堝悓鏈熼棿淇悊閲戦姹囨��
+ List<ID> updateMC = new List<ID>();
+ if (rprList.size() > 0 ) {
+ for (Repair__c rc : rprList) {
+ if (rc.Limit_Price__c) {
+ //B95-鎶ヤ环鍚屾剰纭銆丅99-鎶ヤ环鍚屾剰纭鍙栨秷銆丄95-鍙栨秷淇悊鍙楃悊銆丄96-鍙栨秷淇悊銆丄99-淇悊鍗曞叧闂� 鏇存柊鍚堝悓鏈熼棿淇悊閲戦
+ if (rc.RepairOrderStatusCode__c =='B95' || rc.RepairOrderStatusCode__c =='B99' || rc.RepairOrderStatusCode__c =='A99' || rc.RepairOrderStatusCode__c =='A95' || rc.RepairOrderStatusCode__c =='A96'){
+ Maintenance_Contract__c mc = new Maintenance_Contract__c();
+ if (!updateMC.contains(rc.Maintenance_Contract__c)) {
+ mc.Id = rc.Maintenance_Contract__c;
+ }
+ updateMC.add(mc.Id);
+ }
+ }
+ }
+ if (updateMC.size()>0) {
+ Database.executeBatch(new RollupToMaintenanceContractBatch(updateMC), 1);
+ }
+ }
+ //涓婇檺鍚堝悓 LY 20230131 end
//add by rentx 2021-3-4 start
/*
@@ -737,7 +757,9 @@
List<Maintenance_Contract_Asset_Estimate__c> updateList = new List<Maintenance_Contract_Asset_Estimate__c>();
//鏌ヨ褰撳墠淇悊瀵瑰簲鐨勭淮淇悎鍚屾槸鍚︿负闄愭鍚堝悓 && 澶т慨
for (Repair__c rep : rprList) {
- if (rep.Maintenance_Contract__c != null && rep.Maintenance_Contract__r.URF_Contract__c == true && (rep.Repair_Rank__c == 'A' || rep.Repair_Rank__c == 'B' || rep.Repair_Rank__c == 'C') && rep.Agreed_Date__c != null) {
+ //URF闄愭鍚堝悓2鏈� LY 20220929 start 杩藉姞淇悊鍗曞垹闄ゅ拰鍙栨秷鐨勭姸鎬佹潯浠�
+ if (rep.Maintenance_Contract__c != null && rep.Maintenance_Contract__r.URF_Contract__c == true && (rep.Repair_Rank__c == 'A' || rep.Repair_Rank__c == 'B' || rep.Repair_Rank__c == 'C') && rep.Agreed_Date__c != null && rep.Status1__c !='0.鍙栨秷' && rep.Status1__c !='0.鍒犻櫎') {
+ //URF闄愭鍚堝悓2鏈� LY 20220929 end
contractIds.add(rep.Maintenance_Contract__c);
}
}
--
Gitblit v1.9.1