xuxiuxi
2017-08-01 21e08324c323d0c5d1e7cedc36323c554857a239
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/VisitorRegisterFragment.java
@@ -141,7 +141,7 @@
    public void fragment_visitor_register_save_click(View v) {
        RequestParams params = new RequestParams();
        if (surveillanceQueryItem_selectPhoto != null) {
        if (surveillanceQueryItem_selectPhoto == null) {
            Toast.makeText(MainActivity.getInstance(), "请选择照片", Toast.LENGTH_SHORT).show();
            return;
        }
@@ -241,7 +241,7 @@
            offlineVisitorRegisterItem.setBirthday(fragment_visitor_register_birthday.getValue());
            offlineVisitorRegisterItem.setRemark(fragment_visitor_register_remark.getValue());
            String rawSurveillancePhotoPath = UUID.randomUUID().toString()+".bmp";
            String rawSurveillancePhotoPath = UUID.randomUUID().toString()+"";
            byte[] rawSurveillancePhotoBytes = new byte[]{};
            if (surveillanceQueryItem_selectPhoto != null) {
@@ -259,7 +259,7 @@
            FileUtil.writeToFile(rawSurveillancePhotoPath, rawSurveillancePhotoBytes);
            offlineVisitorRegisterItem.setRawSurveillancePhotoPath(rawSurveillancePhotoPath);
            String surveillancePhotoPath = UUID.randomUUID().toString()+".bmp";
            String surveillancePhotoPath = UUID.randomUUID().toString()+"";
            byte[] surveillancePhotoBytes = new byte[]{};
            if (fragment_visitor_register_surveillance_photo_img != null) {
                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
@@ -269,7 +269,7 @@
            FileUtil.writeToFile(surveillancePhotoPath, surveillancePhotoBytes);
            offlineVisitorRegisterItem.setSurveillancePhoto(surveillancePhotoPath);
            String uploadCustomPhotoPath = UUID.randomUUID().toString()+".bmp";
            String uploadCustomPhotoPath = UUID.randomUUID().toString()+"";
            byte[] uploadCustomPhotoBytes = new byte[]{};
            if (fragment_visitor_register_upload_custom_photo_img != null) {
                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
@@ -279,7 +279,7 @@
            FileUtil.writeToFile(uploadCustomPhotoPath, uploadCustomPhotoBytes);
            offlineVisitorRegisterItem.setUploadCustomPhoto(uploadCustomPhotoPath);
            String idCardPhotoPath = UUID.randomUUID().toString()+".bmp";
            String idCardPhotoPath = UUID.randomUUID().toString()+"";
            byte[] idCardPhotoBytes = new byte[]{};
            if (fragment_visitor_register_id_card_photo_img != null) {
                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
@@ -289,7 +289,7 @@
            FileUtil.writeToFile(idCardPhotoPath, idCardPhotoBytes);
            offlineVisitorRegisterItem.setIdCardPhoto(idCardPhotoPath);
        }
        RegisterMng.getInstance().add(params, idCardHeadPath, offlineVisitorRegisterItem);
        RegisterMng.getInstance().addVisitor(params, idCardHeadPath, offlineVisitorRegisterItem);
    }
    public void set_fragment_visitor_register_surveillance_photo(SurveillanceQueryItem item) {
@@ -559,6 +559,7 @@
            idCardReaderThread = new IdCardReaderThread();
            idCardReaderThread.start();
        }
        setupUI(getView());
    }
    public void fillFormWithIdCard(IdCard idCard) {