xuxiuxi
2017-07-23 4b5518e231d939d024e6069f074eb38d7fd20f24
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/VisitorRegisterFragment.java
@@ -168,7 +168,7 @@
            return;
        }
        OfflineVisitorRegisterItem offlineVisitorRegisterItem = new OfflineVisitorRegisterItem();
        Register offlineVisitorRegisterItem = new Register();
        if (BaseApplication.getInstance().networkAvailable()) {
            params.addBodyParameter(Register.FieldNames.username, name);
            params.addBodyParameter(Register.FieldNames.mobilePhone, phone);
@@ -257,7 +257,7 @@
                surveillancePhotoBytes = byteArrayOutputStream.toByteArray();
            }
            FileUtil.writeToFile(surveillancePhotoPath, surveillancePhotoBytes);
            offlineVisitorRegisterItem.setSurveillancePhotoPath(surveillancePhotoPath);
            offlineVisitorRegisterItem.setSurveillancePhoto(surveillancePhotoPath);
            String uploadCustomPhotoPath = UUID.randomUUID().toString()+".bmp";
            byte[] uploadCustomPhotoBytes = new byte[]{};
@@ -267,7 +267,7 @@
                uploadCustomPhotoBytes = byteArrayOutputStream.toByteArray();
            }
            FileUtil.writeToFile(uploadCustomPhotoPath, uploadCustomPhotoBytes);
            offlineVisitorRegisterItem.setUploadCustomPhotoPath(uploadCustomPhotoPath);
            offlineVisitorRegisterItem.setUploadCustomPhoto(uploadCustomPhotoPath);
            String idCardPhotoPath = UUID.randomUUID().toString()+".bmp";
            byte[] idCardPhotoBytes = new byte[]{};
@@ -277,7 +277,7 @@
                idCardPhotoBytes = byteArrayOutputStream.toByteArray();
            }
            FileUtil.writeToFile(idCardPhotoPath, idCardPhotoBytes);
            offlineVisitorRegisterItem.setIdCardPhotoPath(idCardPhotoPath);
            offlineVisitorRegisterItem.setIdCardPhoto(idCardPhotoPath);
        }
        RegisterMng.getInstance().add(params, idCardHeadPath, offlineVisitorRegisterItem);
    }
@@ -435,11 +435,13 @@
    //@OnClick(R.id.fragment_visitor_register_country)
    public void fragment_visitor_register_country_click(View view) {
        new CountryDialog(fragment_visitor_register_linear_layout, new OkClickedListener() {
            public void onSelected(String value) {
                fragment_visitor_register_country.setValue(value);
            }
        },fragment_visitor_register_country.getValue());
        if (CountryDialog.hasCountries()) {
            new CountryDialog(fragment_visitor_register_linear_layout, new OkClickedListener() {
                public void onSelected(String value) {
                    fragment_visitor_register_country.setValue(value);
                }
            }, fragment_visitor_register_country.getValue());
        }
    }
    //@OnClick(R.id.fragment_visitor_register_gender)