| | |
| | | import android.os.Environment;
|
| | | import android.provider.MediaStore;
|
| | | import android.support.v4.app.Fragment;
|
| | | import android.view.MotionEvent;
|
| | | import android.view.View;
|
| | | import android.view.ViewGroup;
|
| | | import android.view.WindowManager;
|
| | | import android.widget.EditText;
|
| | | import android.widget.FrameLayout;
|
| | | import android.widget.ImageView;
|
| | | import android.widget.TextView;
|
| | |
| | |
|
| | | import cn.com.basic.face.util.IdCard;
|
| | | import cn.com.basic.face.thread.IdCardReaderThread;
|
| | | import cn.com.basic.face.util.KeyboardUtil;
|
| | | import cn.com.basic.face.util.NativeImg;
|
| | | import cn.com.basic.face.util.OkClickedListener;
|
| | |
|
| | |
| | | public void fragment_attender_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;
|
| | | }
|
| | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
| | | offlineAttenderRegisterItem.setCreateTime(sdf.format(new Date()));
|
| | |
|
| | | String rawSurveillancePhotoPath = UUID.randomUUID().toString()+".bmp";
|
| | | String rawSurveillancePhotoPath = UUID.randomUUID().toString()+"";
|
| | | byte[] rawSurveillancePhotoBytes = new byte[]{};
|
| | |
|
| | | if (surveillanceQueryItem_selectPhoto != null) {
|
| | |
| | | FileUtil.writeToFile(rawSurveillancePhotoPath, rawSurveillancePhotoBytes);
|
| | | offlineAttenderRegisterItem.setRawSurveillancePhotoPath(rawSurveillancePhotoPath);
|
| | |
|
| | | String surveillancePhotoPath = UUID.randomUUID().toString()+".bmp";
|
| | | String surveillancePhotoPath = UUID.randomUUID().toString()+"";
|
| | | byte[] surveillancePhotoBytes = new byte[]{};
|
| | | if (fragment_attender_register_surveillance_photo_img != null) {
|
| | | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
| | |
| | | FileUtil.writeToFile(surveillancePhotoPath, surveillancePhotoBytes);
|
| | | offlineAttenderRegisterItem.setSurveillancePhoto(surveillancePhotoPath);
|
| | |
|
| | | String uploadCustomPhotoPath = UUID.randomUUID().toString()+".bmp";
|
| | | String uploadCustomPhotoPath = UUID.randomUUID().toString()+"";
|
| | | byte[] uploadCustomPhotoBytes = new byte[]{};
|
| | | if (fragment_attender_register_upload_custom_photo_img != null) {
|
| | | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
| | |
| | | FileUtil.writeToFile(uploadCustomPhotoPath, uploadCustomPhotoBytes);
|
| | | offlineAttenderRegisterItem.setUploadCustomPhoto(uploadCustomPhotoPath);
|
| | |
|
| | | String idCardPhotoPath = UUID.randomUUID().toString()+".bmp";
|
| | | String idCardPhotoPath = UUID.randomUUID().toString()+"";
|
| | | byte[] idCardPhotoBytes = new byte[]{};
|
| | | if (fragment_attender_register_id_card_photo_img != null) {
|
| | | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
| | |
| | | idCardReaderThread = new IdCardReaderThread();
|
| | | idCardReaderThread.start();
|
| | | }
|
| | | setupUI(getView());
|
| | | }
|
| | |
|
| | | public void fillFormWithIdCard(IdCard idCard) {
|
| | |
| | | }, fragment_attender_register_department.getValue());
|
| | | }
|
| | |
|
| | |
|
| | | }
|