| | |
| | | //20210826 mzy SWAG-C5S46P start |
| | | //改为用 发货完毕日 判断 且 将 2012年创建的且询价状态是发货/完毕的数据排除 |
| | | //queryString = 'Select Id, Opportunity_No__c, Name, toLabel(StageName), Department_Name__c,Field1__c,CountNoInstall__c, Close_Forecasted_Date__c, Competitor__c, Wholesale_Price__c from Opportunity where' + nameCondition + ' Account.Hospital__c=\'' + a.Hospital__c + '\' and ( StageName IN (\'引合\',\'注残\') or ( StageName = \'出荷\' and Shipping_Finished_Day__c > '+temptoday+' and Shipping_Finished_Day__c <= '+tempLastDate+' and CALENDAR_YEAR(Created_Day__c) != 2012 )) and RecordTypeId in (\'01210000000QekK\',\'012100000006KMeAAM\') order by Name, Opportunity_No__c, Department_Name__c limit 31'; |
| | | queryString = 'Select Id, Opportunity_No__c, Name, toLabel(StageName), Department_Name__c,Field1__c,CountNoInstall__c, Close_Forecasted_Date__c, Competitor__c, Wholesale_Price__c from Opportunity where' + nameCondition + ' Account.Hospital__c=\'' + a.Hospital__c + '\' and ( StageName IN (\'引合\',\'注残\') or ( StageName = \'出荷\' and Shipping_Finished_Day__c > '+tempLastDate+' and Shipping_Finished_Day__c <= '+temptoday+' and CALENDAR_YEAR(Created_Day__c) != 2012 )) and RecordTypeId in (\'01210000000QekK\',\'012100000006KMeAAM\') order by Name, Opportunity_No__c, Department_Name__c limit 31'; |
| | | queryString = 'Select Id, Opportunity_No__c, Name, toLabel(StageName), Department_Name__c,Field1__c,Close_Forecasted_Date__c, Competitor__c, Wholesale_Price__c from Opportunity where' + nameCondition + ' Account.Hospital__c=\'' + a.Hospital__c + '\' and ( StageName IN (\'引合\',\'注残\') or ( StageName = \'出荷\' and Shipping_Finished_Day__c > '+tempLastDate+' and Shipping_Finished_Day__c <= '+temptoday+' and CALENDAR_YEAR(Created_Day__c) != 2012 )) and RecordTypeId in (\'01210000000QekK\',\'012100000006KMeAAM\') order by Name, Opportunity_No__c, Department_Name__c limit 31'; |
| | | //20210826 mzy SWAG-C5S46P end |
| | | // 20200616 CHAN-BQM8LU vivek end |
| | | } |
| | |
| | | //20210826 mzy SWAG-C5S46P start |
| | | //改为用 发货完毕日 判断 且 将 2012年创建的且询价状态是发货/完毕的数据排除 |
| | | //queryString = 'Select Id, Opportunity_No__c, Name, toLabel(StageName), Department_Name__c,Field1__c,CountNoInstall__c, Close_Forecasted_Date__c, Competitor__c, Wholesale_Price__c from Opportunity where' + nameCondition + ' Account.Hospital__c=\'' + a.Hospital__c + '\' and ( StageName IN (\'引合\',\'注残\') or ( StageName = \'出荷\' and Shipping_Finished_Day__c > '+temptoday+' and Shipping_Finished_Day__c <= '+tempLastDate+' and CALENDAR_YEAR(Created_Day__c) != 2012 )) and RecordTypeId in (\'01210000000QekK\',\'012100000006KMeAAM\') order by Name, Opportunity_No__c, Department_Name__c limit 31'; |
| | | queryString = 'Select Id, Opportunity_No__c, Name, toLabel(StageName), Department_Name__c,Field1__c,CountNoInstall__c, Close_Forecasted_Date__c, Competitor__c, Wholesale_Price__c from Opportunity where' + nameCondition + ' Account.Hospital__c=\'' + a.Hospital__c + '\' and ( StageName IN (\'引合\',\'注残\') or ( StageName = \'出荷\' and Shipping_Finished_Day__c > '+tempLastDate+' and Shipping_Finished_Day__c <= '+temptoday+' and CALENDAR_YEAR(Created_Day__c) != 2012 )) and RecordTypeId in (\'01210000000QekK\',\'012100000006KMeAAM\') order by Name, Opportunity_No__c, Department_Name__c limit 31'; |
| | | queryString = 'Select Id, Opportunity_No__c, Name, toLabel(StageName), Department_Name__c,Field1__c, Close_Forecasted_Date__c, Competitor__c, Wholesale_Price__c from Opportunity where' + nameCondition + ' Account.Hospital__c=\'' + a.Hospital__c + '\' and ( StageName IN (\'引合\',\'注残\') or ( StageName = \'出荷\' and Shipping_Finished_Day__c > '+tempLastDate+' and Shipping_Finished_Day__c <= '+temptoday+' and CALENDAR_YEAR(Created_Day__c) != 2012 )) and RecordTypeId in (\'01210000000QekK\',\'012100000006KMeAAM\') order by Name, Opportunity_No__c, Department_Name__c limit 31'; |
| | | //20210826 mzy SWAG-C5S46P end |
| | | // 20191126 SWAG-BJA6JK LHJ End |
| | | // 20200616 CHAN-BQM8LU vivek end |
| | |
| | | } |
| | | // FY23修改 WLIG-CFV4AV 重点产品维护(新)end |
| | | |
| | | // DB202303051651 产品报价金额自动计算 ssm start |
| | | // Json解析 |
| | | public static String getValueFromJSONString(String jsonstring, String key) { |
| | | if (String.isNotBlank(jsonstring)) { |
| | | Map<String, Object> mapping = (Map<String, Object>) JSON.deserializeUntyped(jsonstring); |
| | | return mapping.get(key) != null ? String.valueOf(mapping.get(key)) : mapping.get('Default') != null ? String.valueOf(mapping.get('Default')) : null; |
| | | } |
| | | return null; |
| | | } |
| | | // DB202303051651 产品报价金额自动计算 ssm end |
| | | |
| | | //20221021 lt SWAG-CHL5XA【FY23询价改善】-统计主机台数 start |
| | | public static void UpdateBiddingFlag(List<String> oppId){ |
| | | List<Tender_Opportunity_Link__c> links = [SELECT Id, Tender_information__c, Tender_information__r.IsReactionOpp__c, Opportunity__c |