| | |
| | | if (accountIdList != null && accountIdList.size() > 0) { |
| | | // 保有设备不为零件停产 |
| | | query ='select Id,Hospital__c,CurrentContract_F__r.IF_Target_Renew__c,CurrentContract__c,CurrentContract__r.Contract_End_Date__c,CurrentContract__r.Contract_Start_Date__c,Product2.ServiceCategory__c,CurrentContract__r.Status__c,Product2.Category3__c,Product2.Category4__c' |
| | | + ' from Asset where IF_Parts_production__c != \'1\' and Hospital__c in :accountIdList and Product2.ServiceCategory__c != null' |
| | | + ' from Asset where IF_StopParts_production__c != \'1\' and Hospital__c in :accountIdList and Product2.ServiceCategory__c != null' |
| | | // 测试不开启 |
| | | +' and CurrentContract_F__r.IF_Target_Renew__c = \'1\'' |
| | | + ' and ((CurrentContract__r.Contract_End_Date__c>= :start_date1 and CurrentContract__r.Contract_End_Date__c<= :end_date1) ' |
| | |
| | | }else{ |
| | | // 保有设备不为零件停产 |
| | | query ='select Id,Hospital__c,CurrentContract_F__r.IF_Target_Renew__c,CurrentContract__c,CurrentContract__r.Contract_End_Date__c,CurrentContract__r.Contract_Start_Date__c,Product2.ServiceCategory__c,CurrentContract__r.Status__c,Product2.Category3__c,Product2.Category4__c' |
| | | + ' from Asset where IF_Parts_production__c != \'1\' and Product2.ServiceCategory__c != null ' |
| | | + ' from Asset where IF_StopParts_production__c != \'1\' and Product2.ServiceCategory__c != null ' |
| | | // 测试不开启 |
| | | +' and CurrentContract_F__r.IF_Target_Renew__c = \'1\'' |
| | | + ' and ((CurrentContract__r.Contract_End_Date__c>= :start_date1 and CurrentContract__r.Contract_End_Date__c<= :end_date1) ' |
| | |
| | | } |
| | | if (AssetsTarget!=null) { |
| | | try { |
| | | Oly_TriggerHandler.bypass('AssetTrigger'); |
| | | update AssetsTarget; |
| | | } |
| | | catch (Exception e) { |