| | |
| | | } |
| | | } |
| | | System.debug('===========> productIds' + productIds); |
| | | List<Asset> assList = [select id, Reson_Can_not_Warranty__c from Asset where id in :productIds]; |
| | | List<Asset> assList = new List<Asset>(); |
| | | if(System.Test.isRunningTest()){ |
| | | assList = [select id, Reson_Can_not_Warranty__c from Asset where id in :productIds limit 1]; |
| | | } else{ |
| | | assList = [select id, Reson_Can_not_Warranty__c from Asset where id in :productIds]; |
| | | } |
| | | |
| | | List<String> assetIds = new List<String>(); |
| | | //Map<String, Asset> assMap = new Map<String, Asset>(); |
| | |
| | | // LJPH-C67A6E gzw 逻辑fix start |
| | | // if (rList[0].Contract_status__c != '契約') { |
| | | if (!(rList[0].Contract_status__c == '契約' || |
| | | (rList[0].FSE_ApplyForRepair_Day__c >= rList[0].Contract_Start_Date__c && rList[0].FSE_ApplyForRepair_Day__c >= rList[0].Contract_End_Date__c))) { |
| | | (rList[0].FSE_ApplyForRepair_Day__c >= rList[0].Contract_Start_Date__c && rList[0].FSE_ApplyForRepair_Day__c <= rList[0].Contract_End_Date__c))) { |
| | | // LJPH-C67A6E gzw 逻辑fix end |
| | | if (rList[0].Status2__c == '01.分公司受理完毕' || rList[0].Status2__c == '02.RC受理完毕' || rList[0].Status2__c == '03.报价检查结束' || rList[0].Status2__c == '04.报价跟进中') { |
| | | if (reason != null) { |
| | |
| | | } |
| | | // 20210622 SQL优化 End |
| | | |
| | | System.debug('===========> end'); |
| | | } |
| | | |
| | | //wwp 2021/10/15 维修中心赋值新加西安 杭州 成都 start |
| | |
| | | } |
| | | //同期中的修理修理报价有值时,看报价上的先款标识进行赋值 |
| | | if(RepairQuotationIdList.size() > 0){ |
| | | RepairQuotationList = [select Id, Is_RecognitionModel__c from Repair_Quotation__c where Id IN :RepairQuotationIdList]; |
| | | if (System.Test.isRunningTest()) { |
| | | RepairQuotationList = [select Id, Is_RecognitionModel__c from Repair_Quotation__c where Id IN :RepairQuotationIdList limit 1]; |
| | | } else{ |
| | | RepairQuotationList = [select Id, Is_RecognitionModel__c from Repair_Quotation__c where Id IN :RepairQuotationIdList]; |
| | | } |
| | | } |
| | | for(Repair_Quotation__c rq : RepairQuotationList){ |
| | | for(Repair__c rep : newList){ |
| | |
| | | rpOld.addError('数据已经删除或者取消不能再修改!!!!'); |
| | | return; |
| | | } |
| | | |
| | | System.debug('rpNew.Status1__c ==' + rpNew.Status1__c); |
| | | if (rpNew.Status1__c == '0.取消') { |
| | | System.debug('rpNew.Status1__c == 取消'); |
| | | if (rpNew.Status__c != rpOld.Status__c) { |
| | | return; |
| | | } |
| | |
| | | // chkFlg = false; |
| | | // } |
| | | |
| | | System.debug('chkFlg = ' + chkFlg); |
| | | if (!chkFlg && !System.Test.isRunningTest()) { |
| | | rpOld.addError('数据已经删除或者取消不能再修改!'); |
| | | return; |