| | |
| | | lostDataList = Database.query(lostReportSql); |
| | | if (lostDataList.size() > 0) { |
| | | lostData = lostDataList[0]; |
| | | |
| | | mcId = lostData.Maintenance_Contract__c; |
| | | } |
| | | if (lostData.Status__c == '提交' || lostData.Status__c == '审批中' || lostData.Status__c == '批准') { |
| | |
| | | ApexPages.addmessages(e); |
| | | return null; |
| | | } |
| | | return null; |
| | | } |
| | | public PageReference tochange() { |
| | | // Lost_Report__c lr = [select To_Where__c from Lost_Report__c where To_Where__c= '医院选择第三方' limit 1]; |
| | | // flag = false; |
| | | lostData.To_Where__c = '医院选择第三方'; |
| | | // try { |
| | | // ControllerUtil.lostOrder(lostData); |
| | | // flag = true; |
| | | // } catch (Exception e) { |
| | | // ApexPages.addmessages(e); |
| | | // return null; |
| | | // } |
| | | return null; |
| | | } |
| | | //提交审批方法 |
| | |
| | | } |
| | | //查询具体原因的sql |
| | | public String lostOrder(String Id) { |
| | | String lostReportSql = 'SELECT id,Status__c,Other_Reasons__c,Other__c,Third_Party_Company__c,Third_Party_Contract_Price__c,To_Where__c,Specific_Reasons__c,Maintenance_Contract__c from Lost_Report__c where Id = \'' + Id + '\''; |
| | | String lostReportSql = 'SELECT id,Status__c,MC_Code__c,Other_Reasons__c,Other__c,Third_Party_Company__c,Third_Party_Contract_Price__c,To_Where__c,Specific_Reasons__c,Maintenance_Contract__c from Lost_Report__c where Id = \'' + Id + '\''; |
| | | return lostReportSql; |
| | | } |
| | | public List<Maintenance_Contract__c> selectMC(String selectString) { |
| | | String mcsql = '%'+selectString+'%'; |
| | | String selectmc = 'SELECT id,name from Maintenance_Contract__c where name like :mcsql'; |
| | | BAOJIAList = Database.query(selectmc); |
| | | return BAOJIAList; |
| | | } |
| | | |
| | | } |