Commit 10459ada authored by hywang's avatar hywang

1.不再保存图片到数据库

parent fddbe583
......@@ -9,8 +9,8 @@ android {
applicationId "com.phlx.anchorcollect_p"
minSdkVersion 21
targetSdkVersion 29
versionCode 11
versionName "2.0.5"
versionCode 12
versionName "2.0.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
......
......@@ -51,7 +51,7 @@ public class RetrofitClient {
public static String baseUrl =
"serve.xlglmnmyzspt.org.cn"//正式
// "39.101.170.186"//阿里云测试
// "192.168.1.80"//董
// "192.168.8.135"//董
// "192.168.43.154"//张敏
;
public static String port =
......
......@@ -120,7 +120,6 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
initTimePicker();
}
@Override
......@@ -141,7 +140,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
}
}
private void initImagePicker(){
private void initImagePicker() {
if (mImagePicker == null) {
mImagePicker = new ImagePicker(getActivity());
mImagePicker.setOnImagePickerListener(new ImagePicker.OnImagePickerListener() {
......@@ -225,13 +224,13 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
.setCancelTextInfo(textInfo)
.setMaxWidth(600)
.setInputHintText("请输入可视化耳标号").setOkButton(new OnInputDialogButtonClickListener<InputDialog>() {
@Override
public boolean onClick(InputDialog baseDialog, View v, String inputStr) {
viewModel.tag.set(inputStr);
viewModel.initDataForTag(inputStr);
return false;
}
});
@Override
public boolean onClick(InputDialog baseDialog, View v, String inputStr) {
viewModel.tag.set(inputStr);
viewModel.initDataForTag(inputStr);
return false;
}
});
}
});
......@@ -408,7 +407,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
RxPermissions rxPermissions = new RxPermissions(getActivity());
rxPermissions.request(Manifest.permission.CAMERA, Manifest.permission
.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE)
.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE)
.subscribe(new Consumer<Boolean>() {
@Override
public void accept(Boolean aBoolean) throws Exception {
......
......@@ -8,6 +8,7 @@ import android.media.SoundPool;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.util.SparseIntArray;
import androidx.annotation.NonNull;
......@@ -475,10 +476,11 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
cattleResumeEntity.setUpdateTime(dateFormat.format(new Date()));
}
//保存图片
if (Configs.tempCattleResume.getPhotoPath() != null && !Configs.tempCattleResume.getPhotoPath().equals("")) {
cattleResumeEntity.setPhoto(BaseImageUtils.bitmapToString(Configs.tempCattleResume.getPhotoPath(), getApplication()));
}
//保存图片 改在上传时候读
// if (Configs.tempCattleResume.getPhotoPath() != null && !Configs.tempCattleResume.getPhotoPath().equals("")) {
// cattleResumeEntity.setPhoto(BaseImageUtils.bitmapToString(Configs.tempCattleResume.getPhotoPath(), getApplication()));
// }
cattleResumeEntity.setPhotoPath(Configs.tempCattleResume.getPhotoPath());
cattleResumeEntity.setDeptId(Long.parseLong(SPUtils.getInstance().getString(Configs.SP_DEPT_ID)));
cattleResumeEntity.setRegistrationNo(rfid.get());
cattleResumeEntity.setIndividualNo(tag.get());//修改去配置里修改
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment