From 0787d2b3c5d4b12af4218a32323250aa9891246a Mon Sep 17 00:00:00 2001
From: 张宇恒 <bxyun0@163.com>
Date: 星期五, 08 四月 2022 18:03:19 +0800
Subject: [PATCH] 小程序相关603、612、ChoiceAssetController
---
force-app/main/default/classes/NFM603Controller.cls | 34 ++++++++++++++++
force-app/main/default/classes/NFM612Rest.cls | 1
force-app/main/default/classes/ChoiceAssetController.cls | 27 +++++++++++--
3 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/force-app/main/default/classes/ChoiceAssetController.cls b/force-app/main/default/classes/ChoiceAssetController.cls
index fb4bd8b..495e38a 100644
--- a/force-app/main/default/classes/ChoiceAssetController.cls
+++ b/force-app/main/default/classes/ChoiceAssetController.cls
@@ -76,8 +76,9 @@
Order_No__c,Account.Name,Status,Department_Class__c,Hospital__r.Owner.Name,
Hospital__r.Owner.Phone,Installation_Site__c,CurrentContract__c,
Product2.Asset_Model_No__c,Hospital__r.Name,Department_Class__r.Name ,
- Department_Class__r.Id,Ji_Zhong_Guan_Li_Ku_Cun__c
+ Department_Class__r.Id,Ji_Zhong_Guan_Li_Ku_Cun__c,Account.RecordTypeId
,Account.Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c
+ ,Account.Parent.FSE_SP_Main_Leader__r.Work_Location__c
FROM Asset where Id != null AND Repairing_Count__c >= 0 AND SerialNumber like :serialNumber LIMIT 100
];
@@ -239,8 +240,8 @@
url += joint_4 + RepairApplicantHospital_Id + joint_1 + repairSubOrder.Hospital__r.Name;//鎶ヤ慨浜哄尰闄�
url += joint_4 + RepairApplicantDepartment_Id + joint_1 + repairSubOrder.Department__r.Name;//鎶ヤ慨浜虹瀹�
- if (repairSubOrder.ProblemDescription__c != null) {
- url += joint_4 + Repair_Detail_Id + joint_1 + repairSubOrder.ProblemDescription__c;
+ if (repairSubOrder.ResponseResultDesc__c != null) { //2022/04/07 zhangyuheng ProblemDescription__c>ResponseResultDesc__c
+ url += joint_4 + Repair_Detail_Id + joint_1 + repairSubOrder.ResponseResultDesc__c;
}
url += joint_4 + guzhang + joint_1 + NFMUtil.formatDateTime2StrSprit(repairSubOrder.FaultTime__c);
//add wangweipeng 2022/02/11 start
@@ -257,8 +258,26 @@
url += joint_4 + shouliri + joint_1 + NFMUtil.formatDateTime2StrSprit(repairSubOrder.ReceiverTime__c);
//add wangweipeng 2022/01/26 start
- url += joint_4 + SalesOfficeCode_selection_Id+ joint_1 + ast.Account.Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c;//淇悊鍝佽繑閫佸湴
+ // url += joint_4 + SalesOfficeCode_selection_Id+ joint_1 + ast.Account.Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c;//淇悊鍝佽繑閫佸湴 //2022/4/7 zhangyuheng 娉ㄩ噴
//add wangweipeng 2022/01/26 end
+ //add zhangyuheng 2022/04/07 start
+ if (String.isNotBlank(ast.Account.RecordTypeId)) {
+ if (ast.Account.RecordTypeId == '01210000000QemQAAS') { //鎴樼暐绉戝
+ if (String.isNotBlank(ast.Account.Parent.FSE_SP_Main_Leader__r.Work_Location__c)) {
+ url += joint_4 + SalesOfficeCode_selection_Id+ joint_1 + ast.Account.Parent.FSE_SP_Main_Leader__r.Work_Location__c;//淇悊鍝佽繑閫佸湴
+ }else {
+ // continue;
+ }
+ }
+ if (ast.Account.RecordTypeId == '01210000000QfmRAAS') { //绉戝
+ if (String.isNotBlank(ast.Account.Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c)) {
+ url += joint_4 + SalesOfficeCode_selection_Id+ joint_1 + ast.Account.Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c;//淇悊鍝佽繑閫佸湴
+ }else {
+ // continue;
+ }
+ }
+ }
+ //add zhangyuheng 2022/04/07 end
url += joint_3 + Incharge_Staff_Id + joint_1 + repairSubOrder.Owner.Name;
url += joint_3 + Incharge_Staff_Id + joint_2 + repairSubOrder.OwnerId;
diff --git a/force-app/main/default/classes/NFM603Controller.cls b/force-app/main/default/classes/NFM603Controller.cls
index bebff41..693757a 100644
--- a/force-app/main/default/classes/NFM603Controller.cls
+++ b/force-app/main/default/classes/NFM603Controller.cls
@@ -559,7 +559,7 @@
public static Set < Id > NFM603_Ids = new Set < Id > ();
// public static Map<Id,Id> rprIdMap = new Map<Id,Id>();
-
+
public static void NFM603Trigger(List < Repair__c > newList, Map < Id, Repair__c > newMap, List < Repair__c > oldList, Map < Id, Repair__c > oldMap) {
List < String > rprIds = new List < String > ();
Map < Id, Id > rprIdMap = new Map < Id, Id > ();
@@ -591,6 +591,38 @@
rprIdMap.put(rpr.Id, rpr.Id);
}
}
+
+ // 2022/4/6 zhangyuheng update start
+ //OTS璁㈠崟鍙锋湁鍊硷紝鍙戦�丄WS
+ if ((oldrpr.OTSRepairOrder__c == null && String.isNotBlank(rpr.OTSRepairOrder__c)) || rpr.OTSRepairOrder__c != oldrpr.OTSRepairOrder__c) {
+ if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
+ NFM603Controller.NFM603_Ids.add(rpr.Id);
+ rprIdMap.put(rpr.Id, rpr.Id);
+ }
+ }
+ // 2022/4/6 zhangyuheng update end
+ // 2022/4/7 zhangyuheng update start
+ //閫佷慨鐗╂祦鍗曞彿鏈夊�硷紝鍙戦�丄WS
+ if ((oldrpr.DeliveryLogisticsNo__c == null && String.isNotBlank(rpr.DeliveryLogisticsNo__c)) || rpr.DeliveryLogisticsNo__c != oldrpr.DeliveryLogisticsNo__c) {
+ if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
+ NFM603Controller.NFM603_Ids.add(rpr.Id);
+ rprIdMap.put(rpr.Id, rpr.Id);
+ }
+ }
+ //鎶ヤ环閲戦鍙戠敓鏀瑰彉涓斿垵娆℃姤浠锋棩鏈夊�硷紝鍙戦�丄WS
+ if (((rpr.Discount_Price_formula__c != oldrpr.Discount_Price_formula__c) || rpr.Discount_Price_formula__c != null) && rpr.Repair_Firstestimated_Date_formula__c != null) {
+ if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
+ NFM603Controller.NFM603_Ids.add(rpr.Id);
+ rprIdMap.put(rpr.Id, rpr.Id);
+ }
+ }
+ if ((rpr.Returns_Product_waySAP__c != oldrpr.Returns_Product_waySAP__c) && rpr.Repair_Shipped_DateTime__c != null) {
+ if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
+ NFM603Controller.NFM603_Ids.add(rpr.Id);
+ rprIdMap.put(rpr.Id, rpr.Id);
+ }
+ }
+ // 2022/4/7 zhangyuheng update end
// 娴嬭瘯鐜娴嬭瘯鐢紝涓婄嚎鍓嶈娉ㄦ帀
if (rpr.Repair_Firstestimated_Date__c != oldrpr.Repair_Firstestimated_Date__c) {
if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
diff --git a/force-app/main/default/classes/NFM612Rest.cls b/force-app/main/default/classes/NFM612Rest.cls
index d0895df..66bbc67 100644
--- a/force-app/main/default/classes/NFM612Rest.cls
+++ b/force-app/main/default/classes/NFM612Rest.cls
@@ -258,6 +258,7 @@
repair.RepairFinishDate__c = NFMUtil.parseStr2Date(ged.repairOderInfo.RepairFinishDate) ; //淇悊鍝佸鐞嗗畬鎴愭棩
repair.ApplicanterPhone__c = ged.repairOderInfo.ApplicanterPhone; //澶勭悊浜虹數璇�
repair.CancelleRepairTime__c = NFMUtil.parseStr2Date(ged.repairOderInfo.CancelDate); //鍙楃悊浜哄彇娑堟姤淇棩
+ repair.RepairCancelReason__c = ged.repairOderInfo.cancelReportReason; //淇悊鍙栨秷鍘熷洜
// 2022/4/6 zhangyuheng update end
if ('闂宸茶В鍐�'.equals(ged.applyRepairInfo.processResult)) {
--
Gitblit v1.9.1