涂煌豪
2022-04-07 ffee9cf95ba62dc86680ddfe4bbfc7fcb51ef1bf
force-app/main/default/classes/SelectAssetEstimateVMController.cls
@@ -1,3 +1,4 @@
/*gzw 优化Maximum view state size limit 追加 Transient */
global class SelectAssetEstimateVMController {
    //test
    private String targetHospitalId = null;                                    // 今後系列病院用
@@ -25,7 +26,7 @@
    public Asset ass { get; set; }
    // 2021、8、26 合同报价页面的优化,无保有设备点检对象选择框变黑 fxk end
    // 病院配下の納入機器の情報を格納する。
    private List<Asset> assetRecords;                                               // TODO 系列病院の場合、この配列は固定できないです。
    private Transient List<Asset> assetRecords;                                               // TODO 系列病院の場合、この配列は固定できないです。
    public List<AssetInfo> checkedAssets { get; set; }
    private List<AssetInfo> unCheckedAssets = new List<AssetInfo>();
    
@@ -236,7 +237,7 @@
            }
        }
        //2021-11-30 fy add LJPH-C8W8FV 置顶 start OwnershipMachine_No__c Product2.ProductURF__c
        //tcm 添加 Management_Code__c  20211201 start
        //tcm 添加 Management_Code__c  20211201 start
        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, '
@@ -730,7 +731,7 @@
        // 納入機器の情報を取得
        if (!String.isBlank(this.targetHospitalId) && (this.targetHospitalId.length() == 15 || this.targetHospitalId.length() == 18)) {
            //2021-11-30 fy add LJPH-C8W8FV 置顶 start OwnershipMachine_No__c Product2.ProductURF__c
                  //tcm 添加 Management_Code__c  20211201 start
            //tcm 添加 Management_Code__c  20211201 start
            assetRecords = [SELECT Id, Name,OwnershipMachine_No__c,Product2.ProductURF__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.Maintenance_Contract_No_F__c,CurrentContract_F__r.Management_Code__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,
@@ -1081,12 +1082,12 @@
            }
            notInId += '\')';
            //2021-11-30 fy add LJPH-C8W8FV 置顶 start OwnershipMachine_No__c Product2.ProductURF__c
                //tcm 添加 Management_Code__c  20211201 start
            //tcm 添加 Management_Code__c  20211201 start
            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, '
                            + 'CurrentContract_F__c,CurrentContract_F__r.Maintenance_Contract_No_F__c,CurrentContract_F__r.Management_Code__c,CurrentContract_F__r.RecordType_DeveloperName__c,CurrentContract_F__r.Estimate_Num__c,CurrentContract_F__r.Contract_End_Date__c,'
                            + 'CurrentContract_F__c,CurrentContract_F__r.Maintenance_Contract_No_F__c,CurrentContract_F__r.Management_Code__c,CurrentContract_F__r.RecordType_DeveloperName__c, CurrentContract_F__r.Estimate_Num__c,CurrentContract_F__r.Contract_End_Date__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, '
                            + '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,'
@@ -2542,14 +2543,16 @@
            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
            //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
            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();
@@ -3179,16 +3182,16 @@
    public Asset rec { get; set; }
    public Maintenance_Contract_Asset_Estimate__c mcae { get; set; }
    public Boolean isManual { get; set; }
    public Decimal orgPrice {get; private set;}
    public Decimal orgPrice12 {get; private set;}
    public Transient Decimal orgPrice {get; private set;}
    public Transient Decimal orgPrice12 {get; private set;}
    // add by fxk 2021/9/9 控制点检对象是否可选 Star
    public Boolean CheckRows {get; private set;}
    // add by fxk 2021/9/9 控制点检对象是否可选 End
    
    //add by rentx 2020-11-12 LJPH-BV93RZ start
    public String proName;
    public String proSerialNumber;
    public String proSerialName;
    public Transient String proName;
    public Transient String proSerialNumber;
    public Transient String proSerialName;
    //add by rentx 2020-11-12 LJPH-BV93RZ end
    //add by mzy 2020-11-12 LJPH-BX9CVX start
    //public Date NoPartRiskDate;
@@ -3543,4 +3546,4 @@
    // return returnValue;
    // 2021-09-10 tcm 排序逻辑调整 end
    }
    }
}