| | |
| | | + 'CurrentContract_F_asset__c,CurrentContract_F_asset__r.Estimate_Cost_Month_formula__c,CurrentContract_F_asset__r.endDateGurantee_Text__c,CurrentContract_F__r.Gurantee_Estimate_startDate__c, ' |
| | | + 'CurrentContract_F__r.First_Estimate_Date__c,CurrentContract_F__r.Estimate_Contract_endDate__c,' |
| | | + 'Product2.ProductURF__c,CurrentContract_F__r.Contract_Consumption_rate__c,CurrentContract_F__r.First_contract_usage_Rate__c,CurrentContract_F__r.Contract_Range__c,' |
| | | //WLIG-CDFBV3 开通续签报价为true的可以开放续签报价 thh 20220414 start |
| | | + 'CurrentContract_F__r.Open_RenewalQuotation__c,' |
| | | //WLIG-CDFBV3 开通续签报价为true的可以开放续签报价 thh 20220414 end' |
| | | + 'CurrentContract_End_Date__c, Extend_Gurantee_DateTo__c,EquipmentGuaranteeFlg__c,AssetMark__c,NoPartRiskDate_F__c,NoPartRiskDate__c,SignableFlag__c FROM Asset WHERE Hospital__c = \'' + this.targetHospitalId + '\' '; |
| | | //HWAG-BDJ43R ---XHL---20190729--- |
| | | //soql += ' AND AssetMark__c != \'耗材\' AND Product2.Family != \'ET\' '; |
| | |
| | | + 'CurrentContract_F_asset__c,CurrentContract_F_asset__r.Estimate_Cost_Month_formula__c,CurrentContract_F_asset__r.endDateGurantee_Text__c,CurrentContract_F__r.Gurantee_Estimate_startDate__c, ' |
| | | + 'CurrentContract_F__r.First_Estimate_Date__c,CurrentContract_F__r.Estimate_Contract_endDate__c,' |
| | | + 'CurrentContract_F__r.Contract_Consumption_rate__c,CurrentContract_F__r.First_contract_usage_Rate__c,' |
| | | //WLIG-CDFBV3 开通续签报价为true的可以开放续签报价 thh 20220414 start |
| | | + 'CurrentContract_F__r.Open_RenewalQuotation__c,' |
| | | //WLIG-CDFBV3 开通续签报价为true的可以开放续签报价 thh 20220414 end |
| | | + 'Product2.ProductURF__c,CurrentContract_F__r.Contract_Range__c,AssetMark__c,NoPartRiskDate__c,NoPartRiskDate_F__c,Product2.PartSupplyFinishDate__c,SignableFlag__c FROM Asset WHERE Hospital__c = \'' + this.targetHospitalId + '\' ' |
| | | + 'AND Id NOT IN ' + notInId; |
| | | //HWAG-B4R3SS START 20181026 |
| | |
| | | sqlStr += 'CurrentContract_F_asset__c,CurrentContract_F_asset__r.Estimate_Cost_Month_formula__c,CurrentContract_F_asset__r.endDateGurantee_Text__c,CurrentContract_F__r.Gurantee_Estimate_startDate__c,'; |
| | | sqlStr += 'CurrentContract_F__r.First_Estimate_Date__c,CurrentContract_F__r.Estimate_Contract_endDate__c,'; |
| | | sqlStr += 'Product2.ProductURF__c,CurrentContract_F__r.Contract_Consumption_rate__c,CurrentContract_F__r.First_contract_usage_Rate__c,'; |
| | | //WLIG-CDFBV3 开通续签报价为true的可以开放续签报价 thh 20220414 start |
| | | sqlStr += 'CurrentContract_F__r.Open_RenewalQuotation__c,'; |
| | | //WLIG-CDFBV3 开通续签报价为true的可以开放续签报价 thh 20220414 end' |
| | | sqlStr += ' CurrentContract_F__r.Contract_Range__c,AssetMark__c,NoPartRiskDate__c,NoPartRiskDate_F__c,Product2.PartSupplyFinishDate__c,SignableFlag__c FROM Asset WHERE Hospital__c = \'' + this.targetHospitalId + '\''; |
| | | //JZHG-BSDUT4 ---20200825---update By rentongxiao---Start |
| | | // sqlStr += ' AND ( AssetMark__c != \'耗材\' OR Product2.Family != \'ET\' ) '; |
| | |
| | | t = this.estimate.Contract_Start_Date__c.addMonths(Integer.valueOf(this.estimate.Contract_Range__c)); |
| | | t = t.addDays(-1); |
| | | this.estimate.Contract_End_Date__c = t; |
| | | //以提交报价的时点,锁定经销商的先款状态,decide时不再更新经销商的性质 thh 20220407 start |
| | | //提交之后decide之前,经销商变更的话,先款信息以变更后的经销商先款信息执行 thh 20220418 start |
| | | //add wangweipeng 2021/12/26 start |
| | | // if(String.isNotBlank(this.estimate.Dealer__c)){ |
| | | // checkDealerId = this.estimate.Dealer__c; |
| | | // onChDealerUpdate(); |
| | | // }else{ |
| | | // this.estimate.Is_RecognitionModel__c = false; |
| | | // } |
| | | if(String.isNotBlank(this.estimate.Dealer__c)){ |
| | | checkDealerId = this.estimate.Dealer__c; |
| | | onChDealerUpdate(); |
| | | }else{ |
| | | this.estimate.Is_RecognitionModel__c = false; |
| | | } |
| | | //add wangweipeng 2021/12/26 end |
| | | //以提交报价的时点,锁定经销商的先款状态,decide时不再更新经销商的性质 thh 20220407 end |
| | | //提交之后decide之前,经销商变更的话,先款信息以变更后的经销商先款信息执行 thh 20220418 end |
| | | System.debug('---------345----'+this.estimate.Dealer__c+'-------'+this.estimate.Dealer__r.FirstParagraphEnd__c); |
| | | // 位置调整 在1951 line |
| | | // Date createdDate = this.estimate.CreatedDate == null ? System.today() : this.estimate.CreatedDate.date(); |