From 928399eceec50e3d37ea08669a12789a9410a9d2 Mon Sep 17 00:00:00 2001
From: 沙世明 <shashiming@prec-tech.com>
Date: 星期二, 22 十一月 2022 16:51:16 +0800
Subject: [PATCH] 111

---
 force-app/main/default/classes/SummaryThreeYearsContractBatch.cls |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/force-app/main/default/classes/SummaryThreeYearsContractBatch.cls b/force-app/main/default/classes/SummaryThreeYearsContractBatch.cls
index 3370491..283e9b1 100644
--- a/force-app/main/default/classes/SummaryThreeYearsContractBatch.cls
+++ b/force-app/main/default/classes/SummaryThreeYearsContractBatch.cls
@@ -152,10 +152,29 @@
             Account_Service_Of_Target__c asItem = new Account_Service_Of_Target__c();
             asItem.Account_HP__c = mapId;
 
-            //杩囧幓1銆�2銆�3骞寸淮淇悎鍚屾暟閲�
-            asItem.Last_Years_Contract_Count__c = Last1YearCountMap.get(mapId);
-            asItem.Last_Two_Years_Contract_Count__c = Last2YearCountMap.get(mapId);
-            asItem.Last_Three_Year_Contract_Count__c = Last3YearCountMap.get(mapId);
+            //杩囧幓1銆�2銆�3骞寸淮淇悎鍚屾暟閲�(鎸夊悎鍚屾棩璁$畻)
+            // asItem.Last_Years_Contract_Count__c = Last1YearCountMap.get(mapId);
+            // asItem.Last_Two_Years_Contract_Count__c = Last2YearCountMap.get(mapId);
+            // asItem.Last_Three_Year_Contract_Count__c = Last3YearCountMap.get(mapId);
+
+            //杩囧幓绗竴骞村悎鍚屾棩鏄惁鏈夊悎鍚�
+            if(Last1YearCountMap.get(mapId)!=0 && Last1YearCountMap.get(mapId)!=null){
+                asItem.IF_Last_Years_Contract__c = '1';
+            }else{
+                asItem.IF_Last_Years_Contract__c = '0';
+            }
+            //杩囧幓绗簩骞村悎鍚屾棩鏄惁鏈夊悎鍚�
+            if(Last2YearCountMap.get(mapId)!=0 && Last2YearCountMap.get(mapId)!=null){
+                asItem.IF_Last_Two_Years_Contract__c = '1';
+            }else{
+                asItem.IF_Last_Two_Years_Contract__c = '0';
+            }
+            //杩囧幓绗笁骞村悎鍚屾棩鏄惁鏈夊悎鍚�
+            if(Last3YearCountMap.get(mapId)!=0 && Last3YearCountMap.get(mapId)!=null){
+                asItem.IF_Last_Three_Years_Contract__c = '1';
+            }else{
+                asItem.IF_Last_Three_Years_Contract__c = '0';
+            }
 
             asItem.OCSM_Period_half__c = OCSM_Period_half;
             asItem.OCSM_Period__c = OCSM_Period;

--
Gitblit v1.9.1