public with sharing class Consumable_order_AlertController { public String idl {get; set;} public boolean IS_Alert_Price_Apply {get; set;} public ID userid {get; set;} public Consumable_order_AlertController() { idl = ApexPages.currentPage().getParameters().get('id'); } public Consumable_order_AlertController(ApexPages.StandardController controller) { idl = ApexPages.currentPage().getParameters().get('id'); } public void init() { list COList = [select id, SalesManager__c,RecordTypeId, Order_type__c, Order_status__c from Consumable_order__c where id =:idl]; if(COList!=null && COList.size() > 0){ IS_Alert_Price_Apply = false; userid = UserInfo.getUserId(); if( COList[0].SalesManager__c != null && COList[0].SalesManager__c == userid && COList[0].RecordTypeId.equals('01210000000c9dt') && COList[0].Order_type__c.equals('订单') && COList[0].Order_status__c.equals('已提交')){ IS_Alert_Price_Apply = true; } //IS_Alert_Price_Apply = true; } } }