From 1312ba82d4c880bdb5357d28e0d4af5b285f610f Mon Sep 17 00:00:00 2001 From: 高章伟 <gaozhangwei@prec-tech.com> Date: 星期四, 10 三月 2022 15:54:39 +0800 Subject: [PATCH] 最近一月修改内容 --- force-app/main/default/classes/CreateNewMaintenanceTaskBatch.cls | 33 +++++++++++++++++++++++---------- 1 files changed, 23 insertions(+), 10 deletions(-) diff --git a/force-app/main/default/classes/CreateNewMaintenanceTaskBatch.cls b/force-app/main/default/classes/CreateNewMaintenanceTaskBatch.cls index 4a05e2f..15108e2 100644 --- a/force-app/main/default/classes/CreateNewMaintenanceTaskBatch.cls +++ b/force-app/main/default/classes/CreateNewMaintenanceTaskBatch.cls @@ -122,27 +122,40 @@ if(NeedCreateNMC.size()>0){ //閬嶅巻闇�瑕佸垱寤烘姤鍛婁功鐨勫悎鍚� for(Maintenance_Contract__c tempNMC : NeedCreateNMC){ - //瀹氫箟鍙橀噺,鍒ゆ柇鏄惁闇�瑕侀『寤� + // //瀹氫箟鍙橀噺,鍒ゆ柇鏄惁闇�瑕侀『寤� Boolean isDelay = false; - //绗竴鐗�:褰撳悎鍚岀敓鏁堟棩鏅氫簬銆愬悎鍚屽紑濮嬫棩+3涓湀銆戯紝绗竴娆″彂鏀捐鍒掗『寤朵负4/1~6/30 (涓嬩竴瀛e害)銆� - //绗簩鐗�:鍚堝悓鐩栫珷瀹屾瘯鏃ユ櫄浜庛�愬悎鍚屽紑濮嬫棩+3涓湀銆戯紝涓嶇敓鎴愮涓�涓尯闂�(鍗� 椤哄欢涓轰笅涓�瀛e害)銆� - //绗笁鐗�:鐩栫珷瀹屾瘯鏃ユ櫄浜庡悎鍚屽紑濮嬫棩1涓湀浠ヤ笂锛岃嚜鍔ㄤ粠绗簩瀛e害寮�濮� - if(tempNMC.Contract_print_completed__c > tempNMC.Contract_Start_Date__c.addMonths(1)){ - isDelay = true; - } + // //绗竴鐗�:褰撳悎鍚岀敓鏁堟棩鏅氫簬銆愬悎鍚屽紑濮嬫棩+3涓湀銆戯紝绗竴娆″彂鏀捐鍒掗『寤朵负4/1~6/30 (涓嬩竴瀛e害)銆� + // //绗簩鐗�:鍚堝悓鐩栫珷瀹屾瘯鏃ユ櫄浜庛�愬悎鍚屽紑濮嬫棩+3涓湀銆戯紝涓嶇敓鎴愮涓�涓尯闂�(鍗� 椤哄欢涓轰笅涓�瀛e害)銆� + // //绗笁鐗�:鐩栫珷瀹屾瘯鏃ユ櫄浜庡悎鍚屽紑濮嬫棩1涓湀浠ヤ笂锛岃嚜鍔ㄤ粠绗簩瀛e害寮�濮� + if(tempNMC.Contract_print_completed__c > tempNMC.Contract_Start_Date__c.addMonths(1)){ + isDelay = true; + } //鑾峰彇褰撳墠閬嶅巻鐨勫悎鍚岀殑瀛e害鏁� 骞堕亶鍘� 鐢熸垚鎶ュ憡涔� for(Integer qnum = 1;qnum <= QuarterNumMap.get(tempNMC.Id);qnum++){ - //濡傛灉 褰撳悎鍚岀敓鏁堟棩鏅氫簬銆愬悎鍚屽紑濮嬫棩+3涓湀銆�, 椤哄欢涓虹浜屽搴� + // //濡傛灉 褰撳悎鍚岀敓鏁堟棩鏅氫簬銆愬悎鍚屽紑濮嬫棩+3涓湀銆�, 椤哄欢涓虹浜屽搴� if(isDelay){ - isDelay = false; - continue; + isDelay = false; + continue; } + + //2022-03-01 mzy SLA鎶ュ憡涔︿笂绾垮悗闂 start + //鍚堝悓鏃� + Date ContractConclusionDate = tempNMC.Contract_Conclusion_Date__c; + //2022-03-01 mzy SLA鎶ュ憡涔︿笂绾垮悗闂 end //璁$畻寮�濮嬫棩鏈� Date DistributionStartDate= tempNMC.Contract_Start_Date__c.addMonths((qnum-1) * 3); //璁$畻缁撴潫鏃ユ湡 Date DistributionEndDate = tempNMC.Contract_Start_Date__c.addMonths((qnum) * 3).addDays(-1); + + //2022-03-01 mzy SLA鎶ュ憡涔︿笂绾垮悗闂 start + //鍚堝悓鏃ュ埌婊′竴涓搴︾殑鏈熼棿澶т簬2涓湀鍒欓渶瑕佺敓鎴愬彂鏀捐鍒�,灏忎簬2涓湀鍒欎笉闇�瑕佺敓鎴愯鍒� + //涓轰簡闃叉鍑虹幇 55485 鐨勯偅绉嶆儏鍐�(鍚堝悓鏃ユ墍鍦ㄥ尯闂翠箣鍓嶇殑瀛e害涓嶅啀鐢熸垚) + if ((ContractConclusionDate.addMonths(2)>DistributionEndDate) || (ContractConclusionDate > DistributionEndDate)) { + continue; + } + //2022-03-01 mzy SLA鎶ュ憡涔︿笂绾垮悗闂 end //寮�濮嬬敓鎴愭湇鍔″悎鍚屾姤鍛婁功 NewMaintenanceReport_Task__c tempNMCT = new NewMaintenanceReport_Task__c(); -- Gitblit v1.9.1