From 01f207d979d6be17c8cdec293feab48828c0ec3e Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期五, 08 四月 2022 14:22:52 +0800
Subject: [PATCH] Merge branch 'master' of http://47.92.229.245:8089/r/OlyMEBG
---
force-app/main/default/classes/NFM612Rest.cls | 42 +++++++++++++++++++++++++++++++-----------
1 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/force-app/main/default/classes/NFM612Rest.cls b/force-app/main/default/classes/NFM612Rest.cls
index 2a76d75..d0895df 100644
--- a/force-app/main/default/classes/NFM612Rest.cls
+++ b/force-app/main/default/classes/NFM612Rest.cls
@@ -54,6 +54,11 @@
public String applicantId; //鐢宠淇悊浜虹紪鍙�
public String applyDate; //鐢宠鏃堕棿
public String repairOrderNo2FSEID; //鎶ヤ慨瀛愬崟鎵�灞濬SE鐨処D
+ // 2022/4/6 zhangyuheng update start
+ public String RepairFinishDate; //淇悊鍝佸鐞嗗畬鎴愭棩
+ public String ApplicanterPhone; //澶勭悊浜虹數璇�
+ public String CancelDate; //鍙楃悊浜哄彇娑堟姤淇棩
+ // 2022/4/6 zhangyuheng update end
// 涓婄嚎鍓� 鎶ヤ慨瀛愬崟涓庝慨鐞嗕笂鐨勭浉鍏冲瓧娈甸兘鍒犻櫎
public String responseResultsFirst; //涓婇棬搴斿缁撴灉(鏆傛椂娉ㄦ帀)
@@ -131,6 +136,7 @@
List < String > managementCodeList = new List < String > (); //瀛樻斁绉戝缂栫爜
List < String > rpersonList = new List < String > (); //瀛樻斁鎶ヤ慨浜虹敤鎴风紪鐮�
List < String > canIdList = new List < String > (); //瀛樻斁鍙栨秷浜虹敤鎴风紪鍙�
+ List < String > repairNoList = new List < String > (); //瀛樻斁鎶ヤ慨瀛愬崟鍙�
for (GeData ged: itemMasterList) {
String dataComplete = verify(ged);
if (!String.isBlank(dataComplete)) {
@@ -226,12 +232,12 @@
repair.StartTimeFirst__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.startTimeFirst); //寮�濮嬫椂闂�
repair.EndTimeFirst__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.endTimeThird); //缁撴潫鏃堕棿
repair.FaultDescriptionFirst__c = ged.repairOderInfo.faultDescriptionFirst; //鏁呴殰鎻忚堪
- repair.ActualVisitTimeSecond__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.actualVisitTimeSecond); //浜屾涓婇棬鏃�
- repair.StartTimeSecond__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.startTimeSecond); //浜屾涓婇棬寮�濮嬫椂闂�
+ repair.ActualVisitTimeSecond__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.actualVisitTimeSecond); //浜屾涓婇棬鏃�--->浜屾璁″垝涓婇棬鏃�
+ repair.StartTimeSecond__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.startTimeSecond); //浜屾涓婇棬寮�濮嬫椂闂�--->浜屾涓婇棬鏃�
repair.EndTimeSecond__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.endTimeSecond); //浜屾涓婇棬缁撴潫鏃堕棿
repair.FaultDescriptionSecond__c = ged.repairOderInfo.faultDescriptionSecond; //浜屾鏁呴殰鎻忚堪
- repair.ActualVisitTimeThird__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.actualVisitTimeThird); //涓夋涓婇棬鏃�
- repair.StartTimeThird__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.startTimeThird); //涓夋涓婇棬寮�濮嬫椂闂�
+ repair.ActualVisitTimeThird__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.actualVisitTimeThird); //涓夋涓婇棬鏃�--->涓夋璁″垝涓婇棬鏃�
+ repair.StartTimeThird__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.startTimeThird); //涓夋涓婇棬寮�濮嬫椂闂�--->涓夋涓婇棬鏃�
repair.EndTimeThird__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.endTimeThird); //涓夋涓婇棬缁撴潫鏃堕棿
repair.FaultDescriptionThird__c = ged.repairOderInfo.faultDescriptionThird; //涓夋鏁呴殰鎻忚堪
repair.ApplicantType__c = ged.repairOderInfo.applicantType; //鐢宠淇悊浜虹被鍨�
@@ -245,12 +251,18 @@
repair.Ownerid = canidMap.get(ged.repairOderInfo.repairOrderNo2FSEID).Id; //鎶ヤ慨瀛愬崟鎵�灞濬SE鐨処D
repair.AssetModel__c = ged.applyRepairInfo.equipmentModel; //璁惧鍨嬪彿
repair.AirframeCodeEngineer__c = ged.applyRepairInfo.equipmentCd; //鏈鸿韩缂栫爜(宸ョ▼甯�)
- repair.ResponseResultDesc__c = ged.applyRepairInfo.responseResultDesc; //搴斿鎻忚堪
+ repair.ResponseResultDesc__c = ged.applyRepairInfo.responseResultDesc; //搴斿鎻忚堪--->闂鎻忚堪锛堝伐绋嬪笀锛�
repair.ProcessResult__c = ged.applyRepairInfo.processResult; //澶勭悊缁撴灉
-
+
+ // 2022/4/6 zhangyuheng update start
+ repair.RepairFinishDate__c = NFMUtil.parseStr2Date(ged.repairOderInfo.RepairFinishDate) ; //淇悊鍝佸鐞嗗畬鎴愭棩
+ repair.ApplicanterPhone__c = ged.repairOderInfo.ApplicanterPhone; //澶勭悊浜虹數璇�
+ repair.CancelleRepairTime__c = NFMUtil.parseStr2Date(ged.repairOderInfo.CancelDate); //鍙楃悊浜哄彇娑堟姤淇棩
+ // 2022/4/6 zhangyuheng update end
if ('闂宸茶В鍐�'.equals(ged.applyRepairInfo.processResult)) {
- repair.Status__c = '鍏抽棴';
+ // repair.Status__c = '鍏抽棴';
+ repair.Status__c = '宸插畬鎴�'; // 2022/4/6 zhangyuheng
} else {
repair.Status__c = '寰呭鐞�';
@@ -270,10 +282,16 @@
repair.AttachmentName__c = attachmentName;
repairOrderNo2Str += repairOrderNo2 + '\n';
repairList.add(repair);
+ repairNoList.add(ged.repairOderInfo.repairOrderNo2);
}
-
- if (repairList.size() > 0) {
-
+ // 2022/4/6 zhangyuheng update start
+ List<RepairSubOrder__c> repairList1 = [SELECT Id FROM RepairSubOrder__c WHERE RepairSubOrderNo__c in: repairNoList];
+ if (repairList1.size() > 0) {
+ logstr += repairOrderNo2Str + ']-宸插瓨鍦�';
+ }
+ // if (repairList.size() > 0) {==== 2022/4/6 zhangyuheng娉ㄩ噴鎺�
+ else {
+ // 2022/4/6 zhangyuheng update end
insert repairList;
repairOrderNo2Str += ' ]\n';
logstr += repairOrderNo2Str + '鏂板瀹屾垚, 鏂板鎬绘暟鏁颁负锛�' + repairList.size() + '\n';
@@ -291,7 +309,9 @@
Database.rollback(sp);
logstr += '\n' + ex.getMessage();
iflog.ErrorLog__c = ex.getMessage() + '\n' + ex.getStackTraceString() + '\n' + iflog.ErrorLog__c;
- rowData = NFMUtil.LogAutoSend(rowData, ex, null);
+ if (!Test.isRunningTest()) {
+ rowData = NFMUtil.LogAutoSend(rowData, ex, null);
+ }
}
update rowData;
iflog.Log__c = logstr;
--
Gitblit v1.9.1