From 7a4e110c2c3c6b14ae7c17ee96fa97cde04b4de0 Mon Sep 17 00:00:00 2001 From: sunxia <sunxia@prec-tech.com> Date: 星期四, 09 三月 2023 12:09:02 +0800 Subject: [PATCH] EquipmentSetShippmentReceived5changebyRentalApplyFault --- force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls | 39 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 37 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls b/force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls index cb40d1f..7165644 100644 --- a/force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls +++ b/force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls @@ -123,8 +123,9 @@ select AssetName__c, SerialNumber_F__c, Repair_Status_F__c, OnStock_By_Cancel__c, Inspection_Comment__c,Inspection_result_after_Final__c, Inspection_result_after_NG_Final__c, Check_lost_Item_F__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, Fixture_QRCode_F__c, Rental_Apply_Equipment_Set__r.Name, Pre_inspection_time__c, StockDown__c, StockDown_time__c, Id, Name, Asset__c, Asset__r.Name, Asset__r.SerialNumber, Asset__r.Product_Serial_No__c, Asset__r.Remark__c, Asset__r.ImageAsset__c, Asset__r.ImageSerial__c, Asset__r.ImageAssetUploadedTime__c, Asset__r.ImageSerialUploadedTime__c, Loaner_CDS_Info__c, Inspection_result__c, Check_lost_Item__c, Pre_disinfection__c, Water_leacage_check__c, Inspection_result_after__c, Arrival_in_wh__c, - Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c, - Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c + Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c, Rental_Apply__r.Name, Rental_Apply__r.Hospital__c, Rental_Apply__r.Hospital__r.Name, + Rental_Apply__r.Person_In_Charge__c, Rental_Apply__r.Person_In_Charge__r.Name, Rental_Apply__r.demo_purpose2__c, Rental_Apply__r.WorkPlace__c, Rental_Apply__r.OCM_dept_category__c, Fixture_Model_No__c, + Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c, Is_Body__c from Rental_Apply_Equipment_Set_Detail__c where Rental_Apply_Equipment_Set__c in :esIds and ((Shipment_request_time2__c <> null and Cancel_Select__c = False ) or Repair_Status_F__c = '淇悊瀹屾瘯') @@ -232,6 +233,17 @@ // 鍥炲簱銇疭et鍗樹綅銇с�佹槑绱颁竴銇や竴銇ゃ伄quickCheck瑕併倝銇亜 public boolean quickCheck { get; set; } public boolean editable { get; set; } + // 澶囧搧鍊熷嚭鐢宠鏁呴殰鎶ュ憡 鎸夐挳鏄剧ず閫昏緫 + public boolean showFaultRepor { get; set;} + public String faultReportFlag { get; set;} + public String personInChargeId { get; set;} + public String personInChargeName { get; set;} + public String demoPurpose2 { get; set;} + public String raName { get; set;} + public String hospitalId { get; set;} + public String hospitalName { get; set;} + public String workPlace { get; set;} + public String deptCategory { get; set;} public EsdInfo(Rental_apply_equipment_Set_Detail__c rec) { this.rec = rec; @@ -249,6 +261,29 @@ if (rec.Asset__r.ImageSerialUploadedTime__c != null) { imageSerialUploadedTime = rec.Asset__r.ImageSerialUploadedTime__c.format('yyyy/MM/dd HH:mm'); } + + //褰撴槑缁� 璁惧涓轰富浣� 涓� NG鏃� 鏄剧ず鎸夐挳 + if (rec.Is_Body__c == true && rec.Inspection_result_after__c == 'NG'){ + showFaultRepor = true; + } + + List<Rental_Apply_Fault__c> rafList = [SELECT Id ,status__c ,Rental_Apply_Equipment_Set_Detail__c from Rental_Apply_Fault__c where Rental_Apply_Equipment_Set_Detail__c = :rec.Id Order By CreatedDate DESC LIMIT 1]; + + + if( rafList != null && rafList.size() > 0 ){ + this.faultReportFlag = rafList[0].Id; + }else { + this.faultReportFlag = '涓嶅瓨鍦ㄦ晠闅滄姤鍛婂崟'; + } + + personInChargeId = rec.Rental_Apply__r.Person_In_Charge__c; + personInChargeName = rec.Rental_Apply__r.Person_In_Charge__r.Name; + demoPurpose2 = rec.Rental_Apply__r.demo_purpose2__c; + raName = rec.Rental_Apply__r.Name; + hospitalId = rec.Rental_Apply__r.Hospital__c; + hospitalName = rec.Rental_Apply__r.Hospital__r.Name; + workPlace = rec.Rental_Apply__r.WorkPlace__c; + deptCategory = rec.Rental_Apply__r.OCM_dept_category__c; } } } \ No newline at end of file -- Gitblit v1.9.1