| | |
| | | public Asset ass { get; set; } |
| | | // 2021、8、26 合同报价页面的优化,无保有设备点检对象选择框变黑 fxk end |
| | | // 病院配下の納入機器の情報を格納する。 |
| | | private List<Asset> assetRecords; // TODO 系列病院の場合、この配列は固定できないです。 |
| | | private List<Asset> assetRecords; // TODO 系列病院の場合、Qこの配列は固定できないです。 |
| | | public List<AssetInfo> checkedAssets { get; set; } |
| | | private List<AssetInfo> unCheckedAssets = new List<AssetInfo>(); |
| | | |
| | |
| | | public String selRecordOption { get; set; } |
| | | public static List<SelectOption> recordNum { get; private set; } // 选择每页记录数List |
| | | |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | public List<String> TopProductModel =new List<String>(); |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | |
| | | //HWAG-B399Q8 2018/08/20 检验是否显示'请提交待审批' start |
| | | public Boolean IS_Clone_After_Decide { get; set; } |
| | |
| | | public List<String> assetSerialNumberList = new List<String>(); |
| | | // 新规 或者 copy |
| | | private Boolean newIns = false; |
| | | //URF限次合同2期 LY 20220811 start |
| | | public String checkDealerId{get;set;} |
| | | //URF限次合同2期 LY 20220811 end |
| | | |
| | | |
| | | static { |
| | |
| | | sqlTail += assetSerialNumberList[i] + '\')'; |
| | | } |
| | | } |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start OwnershipMachine_No__c |
| | | //tcm 删除第4行 Maintenance_Contract_No_F__c 替换 Management_Code__c 20211201 |
| | | String soql = 'SELECT Id, Name, Asset_situation__c, SerialNumber, Department_Name__c, Installation_Site__c, ' |
| | | String soql = 'SELECT Id, Name,OwnershipMachine_No__c, Asset_situation__c, SerialNumber, Department_Name__c, Installation_Site__c, ' |
| | | + 'Posting_Date__c,Management_Code__c,IF_Warranty__c,Reson_Can_not_Warranty__c, InstallDate,isNewDate_use__c, ' |
| | | + 'Asset_Owner__c, Accumulation_Repair_Amount__c, Maintenance_Price_Month__c, Final_Examination_Date__c, ' |
| | | + 'CurrentContract_F__c,CurrentContract_F__r.Management_Code__c,CurrentContract_F__r.Maintenance_Contract_No_F__c,CurrentContract_F__r.RecordType_DeveloperName__c,CurrentContract_F__r.Estimate_Num__c,CurrentContract_F__r.Contract_End_Date__c,' |
| | |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 start |
| | | + 'Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c, Product2.ProductURF__r.Maintenance_Price_Year_URF__c,' |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | //URF限次合同2期 LY 20220811 start |
| | | + 'Product2.ProductURF__r.Maintenance_Price_Year_URF_3__c, Product2.ProductURF__r.Maintenance_Price_Year_URF_Max_3__c, Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c,' |
| | | + 'URF_Maintenance_Contract__c,URF_Maintenance_Contract__r.Management_Code__c,URF_Maintenance_Contract__r.Contract_End_Date__c,' |
| | | //URF限次合同2期 LY 20220811 end |
| | | + 'CurrentContract_End_Date__c, Extend_Gurantee_DateTo__c,EquipmentGuaranteeFlg__c,AssetMark__c FROM Asset WHERE Product2.ProductURF__c != null AND Hospital__c = \'' + this.targetHospitalId + '\' '; |
| | | //HWAG-BDJ43R ---XHL---20190729--- |
| | | //soql += ' AND AssetMark__c != \'耗材\' AND Product2.Family != \'ET\' '; |
| | |
| | | currPage = 1; |
| | | selRecordOption = '20'; |
| | | totalRecords = 0; |
| | | //URF限次合同2期 LY 20220920 start |
| | | checkDealerId = ''; |
| | | //URF限次合同2期 LY 20220920 end |
| | | Integer i = 0; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | i ++; |
| | | } |
| | | /** |
| | | * Visaulforceから呼ばれるコンストラクタ |
| | |
| | | , LastMContract1__c, LastMContract2__c, LastMContract3__c, LastMContract4__c, LastMContract5__c |
| | | , LastMContract1_ConCount__c, LastMContract2_ConCount__c, LastMContract3_ConCount__c, LastMContract4_ConCount__c, LastMContract5_ConCount__c, |
| | | LastMContract1_NO__c, LastMContract2_NO__c, LastMContract3_NO__c, LastMContract4_NO__c, LastMContract5_NO__c |
| | | |
| | | // URF限次合同2期 LY 20220811 start |
| | | ,Is_RecognitionModel__c |
| | | ,URF_P_MaxRepairCount__c,URF_V_MaxRepairCount__c |
| | | ,URFMContract1__c,URFMContract1_startDate__c,URFMContract1_endDate__c |
| | | //,URFMContract2__c,URFMContract3__c,URFMContract4__c,URFMContract5__c |
| | | ,URF_LastMContract1_NO__c,URF_LastMContract2_NO__c,URF_LastMContract3_NO__c,URF_LastMContract4_NO__c,URF_LastMContract5_NO__c |
| | | ,URF_LastMContract1_ConCount__c,URF_LastMContract2_ConCount__c,URF_LastMContract3_ConCount__c,URF_LastMContract4_ConCount__c,URF_LastMContract5_ConCount__c |
| | | // URF限次合同2期 LY 20220811 end |
| | | FROM Maintenance_Contract_Estimate__c WHERE Id = :this.targetEstimateId]; |
| | | //HWAG-B399Q8 2018/08/20 添加一额外字段 IS_Clone_After_Decide__c end |
| | | decimal PriceSum = (this.estimate.Maintenance_Contract__r.Payment_Plan_Sum_First__c == null ? 0 : this.estimate.Maintenance_Contract__r.Payment_Plan_Sum_First__c) + |
| | |
| | | } |
| | | |
| | | public void init() { |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | TopProductModel.add('CF-LV1I'); |
| | | TopProductModel.add('CF-LV1L'); |
| | | TopProductModel.add('CV-V1'); |
| | | TopProductModel.add('GIF-LV1'); |
| | | TopProductModel.add('OER-AW'); |
| | | TopProductModel.add('OER-A'); |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | typeresult = null; |
| | | changedAfterPrint = false; |
| | | changedSubmitPrice = false; |
| | |
| | | this.printContract = false; |
| | | this.printTripartite = false; |
| | | this.printAgent = false; |
| | | |
| | | String copyid = ''; |
| | | if (isPageAction == false) { |
| | | this.targetEstimateId = ApexPages.currentPage().getParameters().get('copyid'); |
| | |
| | | // 納入機器の情報を取得 |
| | | //tcm 删除第4行 Maintenance_Contract_No_F__c 替换 Management_Code__c 20211201 start |
| | | if (!String.isBlank(this.targetHospitalId) && (this.targetHospitalId.length() == 15 || this.targetHospitalId.length() == 18)) { |
| | | assetRecords = [SELECT Id, Name, Asset_situation__c, SerialNumber, Department_Name__c, Installation_Site__c, Posting_Date__c, Management_Code__c, IF_Warranty__c, Reson_Can_not_Warranty__c, |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start OwnershipMachine_No__c |
| | | assetRecords = [SELECT Id, Name,OwnershipMachine_No__c, Asset_situation__c, SerialNumber, Department_Name__c, Installation_Site__c, Posting_Date__c, Management_Code__c, IF_Warranty__c, Reson_Can_not_Warranty__c, |
| | | InstallDate, isNewDate_use__c, Asset_Owner__c, Accumulation_Repair_Amount__c, Maintenance_Price_Month__c, Final_Examination_Date__c, CurrentContract_End_Date__c, EquipmentGuaranteeFlg__c, |
| | | CurrentContract_F__c, CurrentContract_F__r.Management_Code__c,CurrentContract_F__r.Maintenance_Contract_No_F__c, CurrentContract_F__r.RecordType_DeveloperName__c, CurrentContract_F__r.Estimate_Num__c, CurrentContract_F__r.Contract_End_Date__c, CurrentContract_F__r.Estimate_Contract_endDate__c, |
| | | 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, |
| | |
| | | , Product2.ProductURF__c, Product2.ProductURF__r.URFLimitSerial__c, Product2.ProductURF__r.UFR_MaxRepairCount__c, Product2.ProductURF__r.UFR_Maintenance_Price_Month__c |
| | | // 限次合同信息 add by gzw end |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 start |
| | | , Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c, Product2.ProductURF__r.Maintenance_Price_Year_URF__c |
| | | , Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c |
| | | , Product2.ProductURF__r.Maintenance_Price_Year_URF__c |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | //URF限次合同2期 LY 20220811 start |
| | | , Product2.ProductURF__r.Maintenance_Price_Year_URF_3__c |
| | | , Product2.ProductURF__r.Maintenance_Price_Year_URF_Max_3__c |
| | | , Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c |
| | | , URF_Maintenance_Contract__c |
| | | , URF_Maintenance_Contract__r.Management_Code__c |
| | | , URF_Maintenance_Contract__r.Contract_End_Date__c |
| | | //URF限次合同2期 LY 20220811 end |
| | | FROM Asset WHERE Hospital__c = :this.targetHospitalId AND ( AssetMark__c != '耗材' OR Product2.Family != 'ET' ) ORDER BY ID, IF_Warranty__c asc]; |
| | | //JZHG-BSDUT4 ---20200825---update By rentongxiao---Start |
| | | // assetRecords = [SELECT Id, Name, Asset_situation__c, SerialNumber, Department_Name__c, Installation_Site__c, Posting_Date__c,Management_Code__c,IF_Warranty__c,Reson_Can_not_Warranty__c, |
| | |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 start |
| | | , Asset__r.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c, Asset__r.Product2.ProductURF__r.Maintenance_Price_Year_URF__c |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | //URF限次合同2期 LY 20220811 start |
| | | , Asset__r.Product2.ProductURF__r.Maintenance_Price_Year_URF_3__c |
| | | , Asset__r.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max_3__c |
| | | , Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c |
| | | , Asset__r.URF_Maintenance_Contract__c |
| | | , Asset__r.URF_Maintenance_Contract__r.Management_Code__c |
| | | , Asset__r.URF_Maintenance_Contract__r.Contract_End_Date__c |
| | | //URF限次合同2期 LY 20220811 end |
| | | from Maintenance_Contract_Asset__c |
| | | where Maintenance_Contract__c = :this.targetMaintenanceContractId AND Asset__r.Product2.ProductURF__c != null |
| | | ]; |
| | |
| | | // add点检改善:新增一个点检对象复选框字段,默认为true 2021.6.8 fxk End |
| | | // 20210315 gzw 追加限次产品信息 start |
| | | // Decimal listPrice = mca.Asset__r.Maintenance_Price_Month__c; |
| | | Decimal listPrice = mca.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | //URF限次合同2期 LY 20220811 start |
| | | //Decimal listPrice = mca.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | Decimal listPrice = mca.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c; |
| | | //URF限次合同2期 LY 20220811 end |
| | | // 20210315 gzw 追加限次产品信息 end |
| | | Decimal asset_Consumption_rate = null; |
| | | // 取上一期合同消费率 |
| | |
| | | // add点检改善:新增一个点检对象复选框字段,默认为true 2021.6.8 fxk End |
| | | // 20210315 gzw 追加限次产品信息 start |
| | | // listPrice = mca.Asset__r.Maintenance_Price_Month__c * isNewPriceAdj; |
| | | listPrice = mca.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c * isNewPriceAdj; |
| | | // listPrice = mca.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c * isNewPriceAdj; |
| | | listPrice = mca.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c * isNewPriceAdj; |
| | | |
| | | |
| | | // 20210315 gzw 追加限次产品信息 end |
| | | |
| | | } |
| | |
| | | Asset__r.InstallDate, |
| | | Asset__r.isNewDate_use__c, |
| | | Asset__r.EquipmentGuaranteeFlg__c, |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | Asset__r.OwnershipMachine_No__c, |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | Asset_Consumption_rate__c, |
| | | Asset__r.CurrentContract_F__c, |
| | | Asset__r.CurrentContract_F__r.First_Estimate_Date__c, |
| | |
| | | Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF_Max__c, |
| | | Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF__c, |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | //URF限次合同2期 LY 20220811 start |
| | | Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF_3__c, |
| | | Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF_Max_3__c, |
| | | Product_Manual__r.ProductURF__r.UFR_Maintenance_Price_Month_3__c, |
| | | //URF限次合同2期 LY 20220811 end |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | Product_Manual__r.Asset_Model_No__c, |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | Asset__r.Product2.ProductURF__c, |
| | | Asset__r.Product2.ProductURF__r.URFLimitSerial__c, |
| | | Asset__r.Product2.ProductURF__r.UFR_MaxRepairCount__c, |
| | |
| | | Asset__r.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c, |
| | | Asset__r.Product2.ProductURF__r.Maintenance_Price_Year_URF__c, |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | //URF限次合同2期 LY 20220811 start |
| | | Asset__r.Product2.ProductURF__r.Maintenance_Price_Year_URF_3__c, |
| | | Asset__r.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max_3__c, |
| | | Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c, |
| | | Asset__r.URF_Maintenance_Contract__c, |
| | | Asset__r.URF_Maintenance_Contract__r.Management_Code__c, |
| | | Asset__r.URF_Maintenance_Contract__r.Contract_End_Date__c, |
| | | //URF限次合同2期 LY 20220811 end |
| | | URF_Series__c, |
| | | Series_RepairCount__c, |
| | | Series_MaxRepairCount__c, |
| | |
| | | if (systemToday.addMonths(isNewAddMonth) < mcae.Asset__r.isNewDate_use__c) { |
| | | mcae.IsNew__c = true; |
| | | if (String.isNotBlank(mcae.Asset__r.Product2.ProductURF__c)) { |
| | | mcae.Estimate_List_Price__c = mcae.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c * isNewPriceAdj; |
| | | //mcae.Estimate_List_Price__c = mcae.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c * isNewPriceAdj; |
| | | // mcae.Estimate_List_Price__c = mcae.Asset__r.Maintenance_Price_Month__c * isNewPriceAdj; |
| | | //URF限次合同2期 LY 20220811 start |
| | | // if (Integer.valueOf(this.estimate.URF_V_MaxRepairCount__c)==2){ |
| | | // mcae.Estimate_List_Price__c = mcae.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c * isNewPriceAdj; |
| | | // }else{ |
| | | mcae.Estimate_List_Price__c = mcae.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c * isNewPriceAdj; |
| | | // } |
| | | |
| | | |
| | | //URF限次合同2期 LY 20220811 end |
| | | } |
| | | } else { |
| | | mcae.IsNew__c = false; |
| | | if (String.isNotBlank(mcae.Asset__r.Product2.ProductURF__c)) { |
| | | mcae.Estimate_List_Price__c = mcae.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | //mcae.Estimate_List_Price__c = mcae.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | // mcae.Estimate_List_Price__c = mcae.Asset__r.Maintenance_Price_Month__c; |
| | | //URF限次合同2期 LY 20220811 start |
| | | // if (Integer.valueOf(this.estimate.URF_V_MaxRepairCount__c)==2){ |
| | | // mcae.Estimate_List_Price__c = mcae.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | // }else{ |
| | | mcae.Estimate_List_Price__c = mcae.Asset__r.Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c; |
| | | // } |
| | | |
| | | //URF限次合同2期 LY 20220811 end |
| | | } |
| | | |
| | | } |
| | | } else if (mcae.Product_Manual__c <> null) { |
| | | mcae.IsNew__c = true; |
| | | if (String.isNotBlank(mcae.Product_Manual__r.ProductURF__c)) { |
| | | mcae.Estimate_List_Price__c = mcae.Product_Manual__r.ProductURF__r.UFR_Maintenance_Price_Month__c * isNewPriceAdj; |
| | | //URF限次合同2期 LY 20220811 start |
| | | //mcae.Estimate_List_Price__c = mcae.Product_Manual__r.ProductURF__r.UFR_Maintenance_Price_Month__c * isNewPriceAdj; |
| | | // if (Integer.valueOf(this.estimate.URF_V_MaxRepairCount__c)==2){ |
| | | // mcae.Estimate_List_Price__c = mcae.Product_Manual__r.ProductURF__r.UFR_Maintenance_Price_Month__c * isNewPriceAdj; |
| | | // }else{ |
| | | mcae.Estimate_List_Price__c = mcae.Product_Manual__r.ProductURF__r.UFR_Maintenance_Price_Month_3__c * isNewPriceAdj; |
| | | // } |
| | | |
| | | //URF限次合同2期 LY 20220811 end |
| | | } |
| | | } |
| | | } |
| | |
| | | for (Asset ast : this.assetRecords) { |
| | | Boolean isNew = false; |
| | | // Decimal listPrice = ast.Maintenance_Price_Month__c; |
| | | Decimal listPrice = ast.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | //Decimal listPrice = ast.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | //URF限次合同2期 LY 20220811 start |
| | | // Decimal listPrice =0; |
| | | // if (Integer.valueOf(this.estimate.URF_V_MaxRepairCount__c)==2){ |
| | | // listPrice = ast.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | // }else{ |
| | | Decimal listPrice = ast.Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c; |
| | | // } |
| | | |
| | | //URF限次合同2期 LY 20220811 end |
| | | if (selectedAssetIds.containsKey(ast.Id)) { |
| | | Maintenance_Contract_Asset_Estimate__c selectedLocal = selectedMcaes.get(selectedAssetIds.get(ast.Id)); |
| | | isNew = selectedLocal.isNew__c; |
| | |
| | | assetRecords.clear(); |
| | | // 根据合同开始日重新计算维修合同价格 |
| | | //contractStartDateChange(); |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | List<AssetInfo> topAsset =new List<AssetInfo>(); |
| | | List<AssetInfo> otherAsset =new List<AssetInfo>(); |
| | | |
| | | for(AssetInfo ched : checkedAssets){ |
| | | system.debug('置顶检测2' + ched.ProductModelNoc); |
| | | system.debug('置顶检测3' + ched.AssetModelNoc); |
| | | system.debug('置顶检测5' + ched.rec.OwnershipMachine_No__c); |
| | | // system.debug('置顶检测8' + ched.rec.MDM_Model_No__c); |
| | | // system.debug('置顶检测9' + ched.rec.MDM_Model_No__c); |
| | | if(TopProductModel.contains(ched.ProductModelNoc)||TopProductModel.contains(ched.AssetModelNoc)||TopProductModel.contains(ched.rec.OwnershipMachine_No__c)){ |
| | | ched.CheckRows = true; |
| | | ched.mcae.Check_Object__c = false; |
| | | topAsset.add(ched); |
| | | }else{ |
| | | otherAsset.add(ched); |
| | | } |
| | | } |
| | | topAsset.addAll(otherAsset); |
| | | List<AssetInfo> NumberSort =new List<AssetInfo>(); |
| | | Integer i=0; |
| | | for (AssetInfo ched2 : topAsset) { |
| | | ched2.lineNo=i; |
| | | i++; |
| | | NumberSort.add(ched2); |
| | | } |
| | | checkedAssets=NumberSort; |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | } |
| | | |
| | | // |
| | |
| | | } |
| | | } |
| | | notInId += '\')'; |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start OwnershipMachine_No__c |
| | | //tcm 删除第4行 Maintenance_Contract_No_F__c 替换 Management_Code__c 20211201 start |
| | | String sqlStr = 'SELECT Id, Name, Asset_situation__c, SerialNumber, Department_Name__c, Installation_Site__c, ' |
| | | String sqlStr = 'SELECT Id, Name,OwnershipMachine_No__c, Asset_situation__c, SerialNumber, Department_Name__c, Installation_Site__c, ' |
| | | + 'Posting_Date__c,Management_Code__c,IF_Warranty__c,Reson_Can_not_Warranty__c, InstallDate,isNewDate_use__c, ' |
| | | + 'Asset_Owner__c, Accumulation_Repair_Amount__c, Maintenance_Price_Month__c, Final_Examination_Date__c, ' |
| | | + 'CurrentContract_End_Date__c, Extend_Gurantee_DateTo__c,EquipmentGuaranteeFlg__c, ' |
| | |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 start |
| | | + 'Product2.ProductURF__r.Maintenance_Price_Year_URF__c, Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c,' |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | //URF限次合同2期 LY 20220811 start |
| | | + 'Product2.ProductURF__r.Maintenance_Price_Year_URF_3__c, Product2.ProductURF__r.Maintenance_Price_Year_URF_Max_3__c, Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c,' |
| | | + 'URF_Maintenance_Contract__c,URF_Maintenance_Contract__r.Management_Code__c,URF_Maintenance_Contract__r.Contract_End_Date__c,' |
| | | //URF限次合同2期 LY 20220811 end |
| | | + 'CurrentContract_F__r.Contract_Range__c,AssetMark__c FROM Asset WHERE Product2.ProductURF__c != null AND Hospital__c = \'' + this.targetHospitalId + '\' ' |
| | | + 'AND Id NOT IN ' + notInId; |
| | | //HWAG-B4R3SS START 20181026 |
| | |
| | | List<Asset> temAsset = new List<Asset> (); |
| | | //HWAG-BDJ43R ---XHL---20190729--- |
| | | String sqlStr = ''; |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start OwnershipMachine_No__c |
| | | //tcm 删除第4行 Maintenance_Contract_No_F__c 替换 Management_Code__c 20211201 start |
| | | sqlStr = 'SELECT Id, Name, Asset_situation__c, SerialNumber, Department_Name__c, Installation_Site__c,'; |
| | | sqlStr = 'SELECT Id, Name,OwnershipMachine_No__c, Asset_situation__c, SerialNumber, Department_Name__c, Installation_Site__c,'; |
| | | sqlStr += 'Posting_Date__c,Management_Code__c,IF_Warranty__c,Reson_Can_not_Warranty__c,InstallDate,isNewDate_use__c,'; |
| | | sqlStr += 'Asset_Owner__c, Accumulation_Repair_Amount__c, Maintenance_Price_Month__c, Final_Examination_Date__c,'; |
| | | sqlStr += 'CurrentContract_End_Date__c,Extend_Gurantee_DateTo__c,EquipmentGuaranteeFlg__c,'; |
| | |
| | | sqlStr += 'CurrentContract_F__r.First_Estimate_Date__c,CurrentContract_F__r.Estimate_Contract_endDate__c,'; |
| | | sqlStr += 'CurrentContract_F__r.Contract_Consumption_rate__c,CurrentContract_F__r.First_contract_usage_Rate__c,'; |
| | | sqlStr += 'Product2.ProductURF__c,Product2.ProductURF__r.URFLimitSerial__c,Product2.ProductURF__r.UFR_MaxRepairCount__c,Product2.ProductURF__r.UFR_Maintenance_Price_Month__c,'; |
| | | //URF限次合同2期 LY 20220811 start |
| | | sqlStr += 'Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c,'; |
| | | sqlStr += 'URF_Maintenance_Contract__c,URF_Maintenance_Contract__r.Management_Code__c,URF_Maintenance_Contract__r.Contract_End_Date__c,'; |
| | | //URF限次合同2期 LY 20220811 end |
| | | sqlStr += ' CurrentContract_F__r.Contract_Range__c,AssetMark__c FROM Asset WHERE Product2.ProductURF__c != null AND Hospital__c = \'' + this.targetHospitalId + '\''; |
| | | //JZHG-BSDUT4 ---20200825---update By rentongxiao---Start |
| | | // sqlStr += ' AND ( AssetMark__c != \'耗材\' OR Product2.Family != \'ET\' ) '; |
| | |
| | | ai.mcae.Estimate_List_Price__c = null; |
| | | // add by fxk 2021/9/9 控制点检对象是否可选 Star |
| | | ai.CheckRows = true; |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | ai.mcae.Check_Object__c = true; |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | // add by fxk 2021/9/9 控制点检对象是否可选 End |
| | | System.debug('1540--'); |
| | | } else { |
| | | List<Product2> prd = [select Id, Maintenance_Price_Month__c, EquipmentGuaranteeFlg__c, Name, |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start Asset_Model_No__c |
| | | List<Product2> prd = [select Id,Asset_Model_No__c, Maintenance_Price_Month__c, EquipmentGuaranteeFlg__c, Name, |
| | | ProductURF__c, ProductURF__r.URFLimitSerial__c, ProductURF__r.UFR_MaxRepairCount__c, ProductURF__r.UFR_Maintenance_Price_Month__c |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 start |
| | | , ProductURF__r.Maintenance_Price_Year_URF__c, ProductURF__r.Maintenance_Price_Year_URF_Max__c |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | //URF限次合同2期 LY 20220811 start |
| | | , ProductURF__r.Maintenance_Price_Year_URF_3__c |
| | | , ProductURF__r.Maintenance_Price_Year_URF_Max_3__c |
| | | , ProductURF__r.UFR_Maintenance_Price_Month_3__c |
| | | //URF限次合同2期 LY 20220811 end |
| | | from Product2 where Id = :ai.mcae.Product_Manual__c]; |
| | | ai.mcae.EquipmentGuaranteeFlgTxt__c = prd[0].EquipmentGuaranteeFlg__c; |
| | | ai.etGFlg = prd[0].EquipmentGuaranteeFlg__c; |
| | |
| | | ai.mcae.Product_Manual__c.addError(prd[0].Name + ' 不是限次产品,请重新选择!'); |
| | | return; |
| | | } |
| | | ai.mcae.Estimate_List_Price__c = prd[0].ProductURF__r.UFR_Maintenance_Price_Month__c * isNewPriceAdj; |
| | | //URF限次合同2期 LY 20220811 start |
| | | //ai.mcae.Estimate_List_Price__c = prd[0].ProductURF__r.UFR_Maintenance_Price_Month__c * isNewPriceAdj; |
| | | // if (Integer.valueOf(this.estimate.URF_V_MaxRepairCount__c)==2){ |
| | | // ai.mcae.Estimate_List_Price__c = prd[0].ProductURF__r.UFR_Maintenance_Price_Month__c * isNewPriceAdj; |
| | | // }else{ |
| | | ai.mcae.Estimate_List_Price__c = prd[0].ProductURF__r.UFR_Maintenance_Price_Month_3__c * isNewPriceAdj; |
| | | // } |
| | | |
| | | //URF限次合同2期 LY 20220811 end |
| | | //ai.mcae.Maintenance_Price_YearTXT__c = ai.mcae.Estimate_List_Price__c * 12; |
| | | ai.orgPrice = prd[0].ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | ai.uFRPrice = prd[0].ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | ai.uFRSerial = prd[0].ProductURF__r.URFLimitSerial__c; |
| | | ai.uFRRepairCount = prd[0].ProductURF__r.UFR_MaxRepairCount__c; |
| | | //ai.uFRRepairCount = prd[0].ProductURF__r.UFR_MaxRepairCount__c; |
| | | //URF限次合同2期 LY 20220811 start |
| | | ai.uFRRepairCount = 0; |
| | | //URF限次合同2期 LY 20220811 start |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | ai.MDMModelNoc = prd[0].Asset_Model_No__c; |
| | | if(TopProductModel.contains(ai.MDMModelNoc)){ |
| | | ai.CheckRows = true; |
| | | ai.mcae.Check_Object__c = false; |
| | | }else { |
| | | if(String.isNotBlank(prd[0].ProductURF__c)){ |
| | | ai.mcae.Check_Object__c = false; |
| | | }else{ |
| | | ai.mcae.Check_Object__c = true; |
| | | } |
| | | ai.CheckRows = false; |
| | | |
| | | } |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | // 限次信息 gzw 20210316 end |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 start |
| | | ai.uFRMaxPrice = prd[0].ProductURF__r.Maintenance_Price_Year_URF_Max__c; |
| | | ai.uFRMinPrice = prd[0].ProductURF__r.Maintenance_Price_Year_URF__c; |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | //URF限次合同2期 LY 20220811 start |
| | | ai.uFRMaxPrice3 = prd[0].ProductURF__r.Maintenance_Price_Year_URF_Max_3__c; |
| | | ai.uFRMinPrice3 = prd[0].ProductURF__r.Maintenance_Price_Year_URF_3__c; |
| | | //URF限次合同2期 LY 20220811 end |
| | | } |
| | | } |
| | | } |
| | |
| | | List<AssetInfo> tmpChecked = new List<AssetInfo>(); |
| | | List<AssetInfo> tmpNewRows = new List<AssetInfo>(); |
| | | List<AssetInfo> tmpUnChecked = new List<AssetInfo>(); |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | List<AssetInfo> tmpnewChecked = new List<AssetInfo>(); |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | // 限次合同不需要上下限 20210315 gzw start |
| | | // List<Data> datatemp = new List<Data>(); |
| | | // datatemp = getChartData(); |
| | |
| | | boolean isCheck = true; |
| | | // add点检改善:新增一个点检对象复选框字段,默认为true 2021.6.8 fxk End |
| | | // Decimal listPrice = ass.rec.Maintenance_Price_Month__c; |
| | | Decimal listPrice = ass.rec.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | //URF限次合同2期 LY 20220811 start |
| | | //Decimal listPrice = ass.rec.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | // Decimal listPrice =0; |
| | | // if (Integer.valueOf(this.estimate.URF_V_MaxRepairCount__c)==2){ |
| | | // listPrice = ass.rec.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | // }else{ |
| | | Decimal listPrice = ass.rec.Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c; |
| | | // } |
| | | |
| | | //URF限次合同2期 LY 20220811 end |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220510 start |
| | | Decimal MaxPrice = ass.rec.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c; |
| | | Decimal MinPrice = ass.rec.Product2.ProductURF__r.Maintenance_Price_Year_URF__c; |
| | | // Decimal MaxPrice = ass.rec.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c; |
| | | // Decimal MinPrice = ass.rec.Product2.ProductURF__r.Maintenance_Price_Year_URF__c; |
| | | Decimal MaxPrice = ass.rec.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max_3__c; |
| | | Decimal MinPrice = ass.rec.Product2.ProductURF__r.Maintenance_Price_Year_URF_3__c; |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220510 end |
| | | if (ass.rec_checkBox_c) { |
| | | //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO , 'unCheckedAssets ' )); |
| | |
| | | |
| | | |
| | | |
| | | tmpChecked.add(ass); |
| | | // tmpChecked.add(ass); |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | tmpnewChecked.add(ass); |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | totalRecords--; |
| | | } else { |
| | | ass.mcae = null; |
| | |
| | | } |
| | | |
| | | this.checkedAssets = new List<AssetInfo>(); |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | for (AssetInfo ass : tmpnewChecked) { |
| | | if(String.isNotBlank(ass.rec.Product2.ProductURF__c)){ |
| | | ass.mcae.Check_Object__c = false; |
| | | } |
| | | tmpChecked.add(ass); |
| | | } |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | for (AssetInfo ass : tmpChecked) { |
| | | ass.lineNo = this.checkedAssets.size(); |
| | | this.checkedAssets.add(ass); |
| | |
| | | //listCut(unCheckedAssets); |
| | | // 根据合同开始日重新计算维修合同价格 |
| | | //contractStartDateChange(); |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | List<AssetInfo> topAsset =new List<AssetInfo>(); |
| | | List<AssetInfo> otherAsset =new List<AssetInfo>(); |
| | | system.debug('aaa'+this.checkedAssets); |
| | | for(AssetInfo ched : this.checkedAssets){ |
| | | system.debug('ched.AssetModelNoc======'+ched.AssetModelNoc); |
| | | system.debug('ched.ProductModelNoc======'+ched.ProductModelNoc); |
| | | system.debug('ched.rec.OwnershipMachine_No__c======'+ched.rec.OwnershipMachine_No__c); |
| | | if(TopProductModel.contains(ched.ProductModelNoc)||TopProductModel.contains(ched.AssetModelNoc)||TopProductModel.contains(ched.rec.OwnershipMachine_No__c)){ |
| | | ched.CheckRows = true; |
| | | ched.mcae.Check_Object__c = false; |
| | | topAsset.add(ched); |
| | | }else{ |
| | | otherAsset.add(ched); |
| | | } |
| | | } |
| | | topAsset.addAll(otherAsset); |
| | | List<AssetInfo> NumberSort =new List<AssetInfo>(); |
| | | Integer i=0; |
| | | for (AssetInfo ched2 : topAsset) { |
| | | ched2.lineNo=i; |
| | | i++; |
| | | NumberSort.add(ched2); |
| | | } |
| | | this.checkedAssets=NumberSort; |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | return null; |
| | | } |
| | | |
| | |
| | | this.estimate.Request_quotation_Amount__c.addError('申请报价金额必需大于0'); |
| | | return false; |
| | | } |
| | | // 验证 限次合同的话不能申请低于标准价格最低价的金额 |
| | | //URF限次合同2期 LY 20220811 start |
| | | if (estimate.Request_quotation_Amount__c < estimate.GuidePrice_Down__c) { |
| | | this.estimate.Request_quotation_Amount__c.addError('不能申请低于标准价格最低价的金额'); |
| | | return false; |
| | | } |
| | | //URF限次合同2期 LY 20220811 end |
| | | // fxk 改报错位置 2021、9、9 Star |
| | | if (estimate.Request_quotation_Amount__c > estimate.GuidePrice_Up__c || estimate.Request_quotation_Amount__c < estimate.GuidePrice_Down__c) { |
| | | if (!(this.estimate.mainTalksTime__c > 0)) { |
| | |
| | | } |
| | | // 2021-09-10 tcm 排序逻辑调整 end |
| | | |
| | | // URF限次合同2期 LY 20220908 排序逻辑调整 start |
| | | List<lastMContract> urfMContractRes; |
| | | if (isDecide) { |
| | | system.debug('执行了tcm isDecide'); |
| | | urfMContractRes = getURFMContract(this.checkedAssets,this.estimate.Contract_Start_Date__c); |
| | | } else{ |
| | | system.debug('执行了tcm NODecide'); |
| | | urfMContractRes = getURFMContract(this.checkedAssets,this.estimate.Contract_Esti_Start_Date__c); |
| | | } |
| | | // URF限次合同2期 LY 20220908 排序逻辑调整 end |
| | | |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 start |
| | | Integer Contract_year = 0; |
| | |
| | | |
| | | // 追加上期合同信息 end |
| | | |
| | | //URF限次合同2期 LY 20220908 start |
| | | //追加限次合同信息 |
| | | this.estimate.URFMContract1__c = urfMContractRes[0].contractId; |
| | | this.estimate.URF_LastMContract1_NO__c = urfMContractRes[0].contractNo; |
| | | this.estimate.URF_LastMContract1_ConCount__c = urfMContractRes[0].count; |
| | | |
| | | //this.estimate.URFMContract2__c = urfMContractRes[1].contractId; |
| | | this.estimate.URF_LastMContract2_NO__c = urfMContractRes[1].contractNo; |
| | | this.estimate.URF_LastMContract2_ConCount__c = urfMContractRes[1].count; |
| | | |
| | | //this.estimate.URFMContract3__c = urfMContractRes[2].contractId; |
| | | this.estimate.URF_LastMContract3_NO__c = urfMContractRes[2].contractNo; |
| | | this.estimate.URF_LastMContract3_ConCount__c = urfMContractRes[2].count; |
| | | |
| | | //this.estimate.URFMContract4__c = urfMContractRes[3].contractId; |
| | | this.estimate.URF_LastMContract4_NO__c = urfMContractRes[3].contractNo; |
| | | this.estimate.URF_LastMContract4_ConCount__c = urfMContractRes[3].count; |
| | | |
| | | //this.estimate.URFMContract5__c = urfMContractRes[4].contractId; |
| | | this.estimate.URF_LastMContract5_NO__c = urfMContractRes[4].contractNo; |
| | | this.estimate.URF_LastMContract5_ConCount__c = urfMContractRes[4].count; |
| | | //URF限次合同2期 LY 20220908 end |
| | | |
| | | // 同期処理 |
| | | // ①维修合同に既存の保有设备を削除 |
| | |
| | | // if (true) { |
| | | // return false; |
| | | // } |
| | | //URF限次合同2期 LY 20220920 start |
| | | //提交之后decide之前,经销商变更的话,先款信息以变更后的经销商先款信息执行 thh 20220418 start |
| | | if(String.isNotBlank(this.estimate.Dealer__c)){ |
| | | checkDealerId = this.estimate.Dealer__c; |
| | | onChDealerUpdate(); |
| | | }else{ |
| | | this.estimate.Is_RecognitionModel__c = false; |
| | | } |
| | | //提交之后decide之前,经销商变更的话,先款信息以变更后的经销商先款信息执行 thh 20220418 end |
| | | //URF限次合同2期 LY 20220920 end |
| | | if (String.isBlank(this.targetEstimateId)) { |
| | | newIns = true; |
| | | this.estimate.Process_Status__c = '草案中'; |
| | |
| | | } |
| | | } |
| | | if (!isDecide) { |
| | | //URF限次合同2期 LY 20220811 start |
| | | // if (input.uFRSerial=='URF-V' && Integer.valueOf(estimate.URF_V_MaxRepairCount__c)!=0){ |
| | | // input.uFRRepairCount = Integer.valueOf(estimate.URF_V_MaxRepairCount__c); |
| | | // }else if (input.uFRSerial=='URF-P' && Integer.valueOf(estimate.URF_P_MaxRepairCount__c)!=0) { |
| | | // input.uFRRepairCount = Integer.valueOf(estimate.URF_P_MaxRepairCount__c); |
| | | // }else{ |
| | | // input.uFRRepairCount= 0; |
| | | // } |
| | | if (input.uFRSerial=='URF-V') { |
| | | input.uFRRepairCount = Integer.valueOf(estimate.URF_V_MaxRepairCount__c); |
| | | } |
| | | if (input.uFRSerial=='URF-P') { |
| | | input.uFRRepairCount = Integer.valueOf(estimate.URF_P_MaxRepairCount__c); |
| | | } |
| | | //URF限次合同2期 LY 20220811 end |
| | | // 限次信息保存 |
| | | input.mcae.URF_Series__c = input.uFRSerial; |
| | | input.mcae.Series_RepairCount__c = 0; |
| | |
| | | this.contract.Contract_Esti_End_Date__c = this.estimate.Contract_Esti_End_Date__c; |
| | | this.contract.Estimate_Target__c = this.estimate.Estimate_Target__c; |
| | | this.contract.Dealer__c = this.estimate.Dealer__c; |
| | | //URF限次合同2期 LY 20220920 start |
| | | this.contract.old_Is_RecognitionModel__c = this.estimate.Is_RecognitionModel__c; |
| | | //URF限次合同2期 LY 20220920 end |
| | | this.contract.NotUse_Oxygenated_Water__c = this.estimate.NotUse_Oxygenated_Water__c; |
| | | this.contract.Estimate_Trial_Money__c = this.estimate.Estimate_Trial_Money__c; |
| | | this.contract.Contract_Amount__c = this.estimate.Maintenance_Price__c; |
| | | // 点检总次数自动赋值 gzw fix 20211122 start |
| | | this.contract.Service_contract_target_number__c = this.estimate.Service_contract_target_number__c; |
| | | // 点检总次数自动赋值 gzw fix 20211122 end |
| | | this.contract.Contract_department_manual__c = this.estimate.Department__c; |
| | | |
| | | |
| | | // 追加上期合同信息 start |
| | | this.contract.LastMContract1__c = this.estimate.LastMContract1__c; |
| | |
| | | this.contract.LastMContract5_NO__c = this.estimate.LastMContract5_NO__c; |
| | | this.contract.LastMContract5_ConCount__c = this.estimate.LastMContract5_ConCount__c; |
| | | // 追加上期合同信息 end |
| | | |
| | | //URF限次合同2期 LY 20220908 start |
| | | //追加上期限次合同信息 start |
| | | this.contract.URF_LastMContract1__c = this.estimate.URFMContract1__c; |
| | | this.contract.URF_LastMContract1_startDate__c = this.estimate.URFMContract1_startDate__c; |
| | | this.contract.URF_LastMContract1_endDate__c = this.estimate.URFMContract1_endDate__c; |
| | | this.contract.URF_LastMContract1_NO__c = this.estimate.URF_LastMContract1_NO__c; |
| | | this.contract.URF_LastMContract1_ConCount__c = this.estimate.URF_LastMContract1_ConCount__c; |
| | | |
| | | //this.contract.URF_LastMContract2__c = this.estimate.URFMContract2__c; |
| | | this.contract.URF_LastMContract2_NO__c = this.estimate.URF_LastMContract2_NO__c; |
| | | this.contract.URF_LastMContract2_ConCount__c = this.estimate.URF_LastMContract2_ConCount__c; |
| | | |
| | | //this.contract.URF_LastMContract3__c = this.estimate.URFMContract3__c; |
| | | this.contract.URF_LastMContract3_NO__c = this.estimate.URF_LastMContract3_NO__c; |
| | | this.contract.URF_LastMContract3_ConCount__c = this.estimate.URF_LastMContract3_ConCount__c; |
| | | |
| | | //this.contract.URF_LastMContract4__c = this.estimate.URFMContract4__c; |
| | | this.contract.URF_LastMContract4_NO__c = this.estimate.URF_LastMContract4_NO__c; |
| | | this.contract.URF_LastMContract4_ConCount__c = this.estimate.URF_LastMContract4_ConCount__c; |
| | | |
| | | //this.contract.URF_LastMContract5__c = this.estimate.URFMContract5__c; |
| | | this.contract.URF_LastMContract5_NO__c = this.estimate.URF_LastMContract5_NO__c; |
| | | this.contract.URF_LastMContract5_ConCount__c = this.estimate.URF_LastMContract5_ConCount__c; |
| | | // 追加上期限次合同信息 end |
| | | //URF限次合同2期 LY 20220908 end |
| | | |
| | | system.debug('测算isDecide的结果_1::::::::' + isDecide); |
| | | if (isDecide == true) { |
| | |
| | | return null; |
| | | } |
| | | //add by rentx 2020-11-13 LJPH-BV93RZ end |
| | | |
| | | //URF限次合同2期 LY 20220811 start |
| | | if (!String.isNotBlank(estimate.URF_V_MaxRepairCount__c)) { |
| | | this.estimate.URF_V_MaxRepairCount__c.addError('请选择URF-V最大大修次数!'); |
| | | return null; |
| | | } |
| | | if (!String.isNotBlank(estimate.URF_P_MaxRepairCount__c)) { |
| | | this.estimate.URF_V_MaxRepairCount__c.addError('请选择URF-V最大大修次数!'); |
| | | return null; |
| | | } |
| | | //URF限次合同2期 LY 20220811 end |
| | | if (syncEstimate(false, false)) { |
| | | PageReference ret = null; |
| | | if (this.targetMaintenanceContractId != null) { |
| | |
| | | } |
| | | return ret; |
| | | } |
| | | //URF限次合同2期 LY 20220920 start |
| | | //获取当前选中的经销商是否为先款标识 |
| | | public PageReference onChDealerUpdate(){ |
| | | //checkDealerId 此变量可能会存 经销商id或经销商中文名 |
| | | if(String.isNotBlank(checkDealerId)){ |
| | | try { |
| | | List<Account> accListC = [select id,name,FirstParagraphEnd__c from Account where id = :checkDealerId OR name = :checkDealerId]; |
| | | if(accListC != null && accListC.size() == 1){ |
| | | if(accListC[0].FirstParagraphEnd__c){ |
| | | this.estimate.Is_RecognitionModel__c = true; |
| | | }else{ |
| | | this.estimate.Is_RecognitionModel__c = false; |
| | | } |
| | | }else{ |
| | | this.estimate.Is_RecognitionModel__c = false; |
| | | } |
| | | } catch (Exception e) { |
| | | //return 'McaeList Update Failed : '+e; |
| | | } |
| | | }else{ |
| | | this.estimate.Is_RecognitionModel__c = false; |
| | | } |
| | | System.debug('----------------23--'+this.estimate.Is_RecognitionModel__c); |
| | | return null; |
| | | } |
| | | //URF限次合同2期 LY 20220920 end |
| | | |
| | | // 2021-02-07 gzw add LJPH-BWY5QB start |
| | | private void setEndUserType(String id) { |
| | |
| | | public Boolean isManual { get; set; } |
| | | public Decimal orgPrice {get; private set;} |
| | | public Decimal orgPrice12 {get; private set;} |
| | | |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | public String ProductModelNoc; |
| | | public String AssetModelNoc; |
| | | public String MDMModelNoc; |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | |
| | | //add by rentx 2020-11-12 LJPH-BV93RZ start |
| | | public String proName; |
| | | public String proSerialNumber; |
| | |
| | | public Decimal uFRMaxPrice {get; set;} |
| | | public Decimal uFRMinPrice {get; set;} |
| | | // XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | //URF限次合同2期 LY 20220811 start |
| | | public Decimal uFRMaxPrice3 {get; set;} |
| | | public Decimal uFRMinPrice3 {get; set;} |
| | | //URF限次合同2期 LY 20220811 end |
| | | |
| | | public Id getRecId() { |
| | | Id rtn = null; |
| | |
| | | // XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 start |
| | | this.uFRMaxPrice = mcae.Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF_Max__c; |
| | | this.uFRMinPrice = mcae.Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF__c; |
| | | //URF限次合同2期 LY 20220811 start |
| | | this.uFRMaxPrice3 = mcae.Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF_Max_3__c; |
| | | this.uFRMinPrice3 = mcae.Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF_3__c; |
| | | //URF限次合同2期 LY 20220811 end |
| | | // XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | } |
| | | // 選択された用(非Manual) |
| | |
| | | this.proName = '机身编码为:' + record.SerialNumber; |
| | | this.proSerialNumber = record.SerialNumber; |
| | | this.proSerialName = record.Name; |
| | | |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | this.ProductModelNoc = mcae.Product_Manual__r.Asset_Model_No__c; |
| | | this.AssetModelNoc = mcae.Asset__r.OwnershipMachine_No__c; |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | |
| | | //add by rentx 2020-11-12 LJPH-BV93RZ end |
| | | this.uFRPrice = record.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | //URF限次合同2期 LY 20220811 start |
| | | //this.uFRPrice = record.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | this.uFRPrice = record.Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c; |
| | | //URF限次合同2期 LY 20220811 end |
| | | this.uFRSerial = record.Product2.ProductURF__r.URFLimitSerial__c; |
| | | this.uFRRepairCount = record.Product2.ProductURF__r.UFR_MaxRepairCount__c; |
| | | //this.uFRRepairCount = record.Product2.ProductURF__r.UFR_MaxRepairCount__c; |
| | | //URF限次合同2期 LY 20220811 start |
| | | this.uFRRepairCount = 0; |
| | | // if (this.uFRSerial=='URF-V'){ |
| | | // this.uFRRepairCount=2; |
| | | // }else{ |
| | | // this.uFRRepairCount=3; |
| | | // } |
| | | //URF限次合同2期 LY 20220811 start |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 start |
| | | this.uFRMaxPrice = record.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c; |
| | | this.uFRMinPrice = record.Product2.ProductURF__r.Maintenance_Price_Year_URF__c; |
| | | //URF限次合同2期 LY 20220811 start |
| | | this.uFRMaxPrice3 = record.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max_3__c; |
| | | this.uFRMinPrice3 = record.Product2.ProductURF__r.Maintenance_Price_Year_URF_3__c; |
| | | //URF限次合同2期 LY 20220811 end |
| | | // XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | } |
| | | // 選択された用、未納品用(Manual) |
| | |
| | | this.orgPrice12 = this.orgPrice * 12; |
| | | this.proName = mcae.Product_Manual__r.Name; |
| | | this.etGFlg = mcae.Product_Manual__r.EquipmentGuaranteeFlg__c; |
| | | this.uFRPrice = mcae.Product_Manual__r.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | //this.uFRPrice = mcae.Product_Manual__r.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | this.uFRSerial = mcae.Product_Manual__r.ProductURF__r.URFLimitSerial__c; |
| | | this.uFRRepairCount = mcae.Product_Manual__r.ProductURF__r.UFR_MaxRepairCount__c; |
| | | //this.uFRRepairCount = mcae.Product_Manual__r.ProductURF__r.UFR_MaxRepairCount__c; |
| | | //URF限次合同2期 LY 20220811 start |
| | | this.uFRRepairCount =0; |
| | | this.uFRPrice = mcae.Product_Manual__r.ProductURF__r.UFR_Maintenance_Price_Month_3__c; |
| | | //URF限次合同2期 LY 20220811 end |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | this.ProductModelNoc = mcae.Product_Manual__r.Asset_Model_No__c; |
| | | this.AssetModelNoc = mcae.Asset__r.OwnershipMachine_No__c; |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | // XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 start |
| | | this.uFRMaxPrice = mcae.Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF_Max__c; |
| | | this.uFRMinPrice = mcae.Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF__c; |
| | | // XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | //URF限次合同2期 LY 20220811 start |
| | | this.uFRMaxPrice3 = mcae.Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF_Max_3__c; |
| | | this.uFRMinPrice3 = mcae.Product_Manual__r.ProductURF__r.Maintenance_Price_Year_URF_3__c; |
| | | //URF限次合同2期 LY 20220811 end |
| | | } |
| | | // 選択されなかった用 |
| | | public AssetInfo(Integer lineNo, Asset record) { |
| | |
| | | this.etGFlg = record.EquipmentGuaranteeFlg__c; |
| | | this.proSerialName = record.Name; |
| | | this.proSerialNumber = record.SerialNumber; |
| | | this.uFRPrice = record.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | //this.uFRPrice = record.Product2.ProductURF__r.UFR_Maintenance_Price_Month__c; |
| | | this.uFRSerial = record.Product2.ProductURF__r.URFLimitSerial__c; |
| | | this.uFRRepairCount = record.Product2.ProductURF__r.UFR_MaxRepairCount__c; |
| | | //this.uFRRepairCount = record.Product2.ProductURF__r.UFR_MaxRepairCount__c; |
| | | //URF限次合同2期 LY 20220811 start |
| | | this.uFRRepairCount =0; |
| | | this.uFRPrice = record.Product2.ProductURF__r.UFR_Maintenance_Price_Month_3__c; |
| | | //URF限次合同2期 LY 20220811 start |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 start |
| | | this.uFRMaxPrice = record.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max__c; |
| | | this.uFRMinPrice = record.Product2.ProductURF__r.Maintenance_Price_Year_URF__c; |
| | | // XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 end |
| | | //URF限次合同2期 LY 20220811 start |
| | | this.uFRMaxPrice3 = record.Product2.ProductURF__r.Maintenance_Price_Year_URF_Max_3__c; |
| | | this.uFRMinPrice3 = record.Product2.ProductURF__r.Maintenance_Price_Year_URF_3__c; |
| | | //URF限次合同2期 LY 20220811 end |
| | | } |
| | | } |
| | | |
| | |
| | | //List<lastMContract> listResult = new List<lastMContract>(); |
| | | return listResult; |
| | | } |
| | | //URF限次合同2期 LY 20220908 start |
| | | //对限次合同进行排序 |
| | | public static List<lastMContract> getURFMContract(List<AssetInfo> checkedAssets, Date startDate) { |
| | | Map<String, lastMContract> urfMContractMap = new Map<String, lastMContract>(); |
| | | Map<String, lastMContract> lastMContractMap1 = new Map<String, lastMContract>(); |
| | | for (AssetInfo ai : checkedAssets) { |
| | | lastMContract urfMC = new lastMContract(ai.rec.URF_Maintenance_Contract__c, ai.rec.URF_Maintenance_Contract__r.Management_Code__c, ai.rec.URF_Maintenance_Contract__r.Contract_End_Date__c, 1); |
| | | if (String.isNotBlank(ai.rec.URF_Maintenance_Contract__c)) { |
| | | if (urfMContractMap.containsKey(ai.rec.URF_Maintenance_Contract__c)) { |
| | | urfMContractMap.get(ai.rec.URF_Maintenance_Contract__c).count++; |
| | | } else { |
| | | urfMContractMap.put(ai.rec.URF_Maintenance_Contract__c, urfMC); |
| | | } |
| | | } |
| | | } |
| | | List<lastMContract> listResulttemp = new List<lastMContract>(); |
| | | List<lastMContract> listResult = new List<lastMContract>(); |
| | | |
| | | for ( lastMContract ll : urfMContractMap.values()) { |
| | | listResulttemp.add(ll); |
| | | } |
| | | listResulttemp.sort(); |
| | | if (listResulttemp.size() >= 5){ |
| | | for (Integer i = 0; i < listResulttemp.size(); i++) { |
| | | |
| | | if (listResulttemp.size() >= i + 1) { |
| | | listResult.add(listResulttemp[i]); |
| | | } |
| | | } |
| | | }else { |
| | | for (Integer i = 0; i < listResulttemp.size(); i++) { |
| | | if (listResulttemp.size() >= i + 1) { |
| | | listResult.add(listResulttemp[i]); |
| | | } |
| | | } |
| | | for (Integer i = listResulttemp.size(); i < 5; i++) { |
| | | listResult.add(new lastMContract(null, null, null, null)); |
| | | } |
| | | } |
| | | |
| | | return listResult; |
| | | } |
| | | //URF限次合同2期 LY 20220908 end |
| | | |
| | | |
| | | // public static List<Data> getChartData() { |
| | |
| | | Map<String, Decimal> limitSerial = new Map<String, Decimal>(); |
| | | |
| | | for (AssetInfo input : this.checkedAssets) { |
| | | //URF限次合同2期 LY 20220811 start |
| | | if (String.isNotBlank(input.uFRSerial) && input.uFRSerial=='URF-V'){ |
| | | input.uFRRepairCount = Integer.valueOf(estimate.URF_V_MaxRepairCount__c); |
| | | }else if (String.isNotBlank(input.uFRSerial) && input.uFRSerial=='URF-P'){ |
| | | input.uFRRepairCount = Integer.valueOf(estimate.URF_P_MaxRepairCount__c); |
| | | }else{ |
| | | input.uFRRepairCount = 0; |
| | | } |
| | | //URF限次合同2期 LY 20220811 end |
| | | |
| | | //XLIU-CE7AVC【委托】URF限次修理合同的最高价格修改 thh 20220509 start |
| | | if (String.isNotBlank(input.uFRSerial) && limitSerial.containsKey(input.uFRSerial)) { |
| | | limitSerial.put(input.uFRSerial, limitSerial.get(input.uFRSerial) + input.uFRRepairCount * Contract_year); |