高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
force-app/main/default/classes/NewConsumApplyEquipSetDetailController.cls
@@ -23,6 +23,9 @@
    public String requiredErrorMsg{set;get;}
    public String sobjecttypeForFrontEnd{set;get;}
    public String sobjectPrefix{set;get;}
    //zhj MEBG新方案改造 2022-11-29 start
    public String staticResourceV2 {get; set;}
    //zhj MEBG新方案改造 2022-11-29 end
    public NewConsumApplyEquipSetDetailController(ApexPages.StandardController controller) {
        isNewMode = true;
        isCloneMode = false;
@@ -56,6 +59,9 @@
        fieldAPIToLabelMapStr = JSON.serialize(fieldAPIToLabelMap);
        PIHelper.PIIntegration piIntegration =PIHelper.getPIIntegrationInfo('Consum_Apply_Equipment_Set_Detail__c');
        staticResource = JSON.serialize(piIntegration);
        //zhj MEBG新方案改造 2022-11-29 start
        staticResourceV2 = JSON.serialize(PIHelper.getPIIntegrationInfo('Consum_Apply_Equipment_Set_Detail__cV2'));
        //zhj MEBG新方案改造 2022-11-29 end
        encryptedAPIList = piIntegration.PIFields;
        sobjectPrefix = piIntegration.sobjectPrefix;
    }
@@ -87,9 +93,14 @@
                if(String.isNotBlank(fieldValue)&&fieldValue.contains('T')){
                    fieldValue = fieldValue.replace('T',' ');
                    consumApplyInfo.put(fieldAPI, Datetime.valueOfGmt(fieldValue));
                //20220405 By ChenYanan Start
                }else if(String.isNotBlank(fieldValue))  {
                    fieldValue = fieldValue.replace('/', '-') + ':00';
                    consumApplyInfo.put(fieldAPI, Datetime.valueOf(fieldValue));
                //20220405 By ChenYanan End
                }else{
                    consumApplyInfo.put(fieldAPI, null);
                }
                }
            }else if(String.valueof(fielddataType)=='CURRENCY'|| String.valueof(fielddataType)=='PERCENT'||String.valueOf(fielddataType)=='Number'||String.valueOf(fielddataType)=='DOUBLE' ){
                consumApplyInfo.put(fieldAPI, (String.isBlank(fieldValue)||String.isEmpty(fieldValue))?0:Decimal.valueOf(fieldValue)); 
            } else if(String.valueof(fielddataType)=='BOOLEAN'){