From e09e9f8a34cbc99a33dfa9ef1792b0025575c3a8 Mon Sep 17 00:00:00 2001 From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674> Date: 星期二, 01 八月 2017 11:41:19 +0800 Subject: [PATCH] --- VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/VisitorRegisterFragment.java | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/VisitorRegisterFragment.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/VisitorRegisterFragment.java index db6a6a4..ff80b6e 100644 --- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/VisitorRegisterFragment.java +++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/VisitorRegisterFragment.java @@ -141,6 +141,11 @@ public void fragment_visitor_register_save_click(View v) { RequestParams params = new RequestParams(); + if (surveillanceQueryItem_selectPhoto == null) { + Toast.makeText(MainActivity.getInstance(), "璇烽�夋嫨鐓х墖", Toast.LENGTH_SHORT).show(); + return; + } + String name = fragment_visitor_register_name.getValue(); if (name.trim().length() <= 0) { Toast.makeText(MainActivity.getInstance(), "濮撳悕涓嶈兘涓虹┖", Toast.LENGTH_SHORT).show(); @@ -236,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) { @@ -254,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(); @@ -264,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(); @@ -274,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(); @@ -284,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) { @@ -554,6 +559,7 @@ idCardReaderThread = new IdCardReaderThread(); idCardReaderThread.start(); } + setupUI(getView()); } public void fillFormWithIdCard(IdCard idCard) { -- Gitblit v1.8.0