Li Jun
2022-03-17 03523642de0c4f319d90d0aec8a756f9e80e6a7e
force-app/main/default/classes/StraightBackAddressController.cls
@@ -100,7 +100,9 @@
     * 开始方法
     */
    public PageReference init(){
        System.debug('RepairId-----'+RepairId);
        String RepairSql = makeTextRepairSql(RepairId);
        System.debug('RepairSql-----'+RepairSql);
        try{
            pc = Database.query(RepairSql);
            system.debug('pc = ' + pc);
@@ -142,6 +144,8 @@
        }catch(exception e){
            //失败提示
            ApexPages.addMessages(e);
            System.debug(e.getMessage());
            System.debug(e.getlineNumber());
        }
        insUpdData = new Address__c();
        newCon = new Contact();
@@ -350,10 +354,12 @@
            List<Address__c> dataList = Database.query(AddressSql);
            if(dataList != null && dataList.size()> 0){
                indexCou += dataList.size();
                System.debug('dataList-----'+dataList);
                for(Integer i = 0;i<dataList.size();i++){
                    String createID = dataList[i].CreatedByid;
                    createId = createId.substring(0,15);
                    //办事处的地址不可修改
                    if(dataList[i].Address_Classification__c == '办事处'){
                            tableData.add(new AddressData(dataList[i],'none','none','inline'));
                    }else{
@@ -470,7 +476,6 @@
                }
            }
            //判断联系人是否都为空
            if(insUpdData.Contacts__c == null || String.isBlank(insUpdData.Contacts__c)){
                //判断新建联系人是否为空
                if(insUpdData.Create_Contacts__c == null || String.isBlank(insUpdData.Create_Contacts__c)){