| | |
| | | |
| | | return JSON.serialize(arrays); |
| | | } |
| | | |
| | | // 查询招标项目 |
| | | @AuraEnabled |
| | | public static String searchTender(String content){ |
| | | String soql = 'Select Id, Name, TenderManageCode__c, Logical_delete__c, Retain_Tender__c From Tender_information__c where Logical_delete__c = false '; |
| | | if (String.isNotBlank(content) && String.isNotBlank(content.replaceAll(' ', ''))) { |
| | | content = '%'+content+'%'; |
| | | soql += ' and TenderManageCode__c like :content '; |
| | | } |
| | | system.debug('System.Label.BiddingProjectRecordTypeID+++'+System.Label.BiddingProjectRecordTypeID); |
| | | String RecordTypeIdvalue=System.Label.BiddingProjectRecordTypeID; |
| | | soql += 'and RecordTypeId =\''+RecordTypeIdvalue+'\' Order by CreatedDate desc limit 5'; |
| | | String jsonData = JSON.serialize(Database.query(soql)); |
| | | return jsonData; |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static String saveData(String Tenderinformationc) { |
| | | system.debug('Tenderinformationc++'+Tenderinformationc); |
| | | Tender_information__c TenInfo=(Tender_information__c)JSON.deserialize(Tenderinformationc,Tender_information__c.class); |
| | | List<Tender_information__c> updateTenInfoList = new List<Tender_information__c>(); |
| | | // 更新保留招投标 |
| | |
| | | TenInfo.Retain_Tender__c = BTen.Id; |
| | | // 【委托】招标项目-逻辑删除的项目需要自动取消与询价的关系 fy 2022.3.7 start |
| | | TenInfo.Name = '逻辑删除:'+TenInfo.Name; |
| | | // 20221018 ljh SWAG-CKB9NR add start |
| | | if(TenInfo.Name.length() > 80){ |
| | | TenInfo.Name = TenInfo.Name.substring(0,80); |
| | | } |
| | | // 20221018 ljh SWAG-CKB9NR add end |
| | | // 【委托】招标项目-逻辑删除的项目需要自动取消与询价的关系 fy 2022.3.7 end |
| | | String BTenInfo = BTen.InfoId__c; |
| | | BTen.InfoId__c = TenInfo.InfoId__c;//保留招投标的信息Id赋给删除招投标的信息Id |