| | |
| | | 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();
|
| | |
| | | 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) {
|
| | |
| | | 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();
|
| | |
| | | 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();
|
| | |
| | | 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();
|
| | |
| | | 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) {
|
| | |
| | | idCardReaderThread = new IdCardReaderThread();
|
| | | idCardReaderThread.start();
|
| | | }
|
| | | setupUI(getView());
|
| | | }
|
| | |
|
| | | public void fillFormWithIdCard(IdCard idCard) {
|