Commit 84ed9743 authored by hywang's avatar hywang

阿拉善羊毛追溯系统

parents
Pipeline #195 failed with stages
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.phlx.wool"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled true
}
}
greendao {
schemaVersion 1 //数据库版本号
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'org.greenrobot:greendao:3.2.2'
// TinyPinyin核心包,约80KB
implementation 'com.github.promeg:tinypinyin:2.0.3'
implementation 'com.github.promeg:tinypinyin-lexicons-android-cncity:2.0.3'
//图片加载
implementation 'de.hdodenhof:circleimageview:3.1.0'
//下拉刷新,上拉加载
implementation 'com.lcodecorex:tkrefreshlayout:1.0.7'
// 基础依赖包,必须要依赖
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
//时间选择器
implementation 'com.contrarywind:Android-PickerView:4.1.9'
implementation project(':mvvmhabit')
implementation project(':appupdateX')
implementation files('libs/uhf.jar')
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
package com.phlx.wool;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.phlx.wool", appContext.getPackageName());
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.phlx.wool">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:name="App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:networkSecurityConfig="@xml/network_security_config">
<activity android:name=".ui.login.LoginActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ui.main.MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity android:name=".ui.work.mark.MarkingActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity android:name=".ui.work.harmless.HarmlessActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity android:name=".ui.work.quarantine.QuarantineActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity android:name=".ui.inventory.InventoryActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity android:name=".ui.setting.SettingActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity android:name=".ui.work.unit.UnitActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity android:name=".ui.sync.activity.ClearActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity android:name=".ui.sync.activity.UploadActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity android:name=".ui.sync.activity.DownloadActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity android:name=".ui.splash.SplashActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize"/>
</application>
</manifest>
\ No newline at end of file
package com.phlx.wool;
import com.uhf.linkage.Linkage;
import me.goldze.mvvmhabit.base.BaseApplication;
import me.goldze.mvvmhabit.crash.CaocConfig;
import me.goldze.mvvmhabit.utils.KLog;
public class App extends BaseApplication {
private Linkage link;
private static App instance;
@Override
public void onCreate() {
super.onCreate();
instance = this;
//是否开启打印日志
KLog.init(true);
//初始化全局异常崩溃
initCrash();
link = new Linkage();
link.initRFID();
}
public static App getInstance() {
return instance;
}
private void initCrash() {
CaocConfig.Builder.create()
.backgroundMode(CaocConfig.BACKGROUND_MODE_SILENT) //背景模式,开启沉浸式
.enabled(true) //是否启动全局异常捕获
.showErrorDetails(true) //是否显示错误详细信息
.showRestartButton(true) //是否显示重启按钮
.trackActivities(true) //是否跟踪Activity
.minTimeBetweenCrashesMs(2000) //崩溃的间隔时间(毫秒)
.errorDrawable(R.mipmap.ic_launcher) //错误图标
.apply();
}
public Linkage getLinkage() {
if (link == null) {
link = new Linkage();
link.initRFID();
}
return link;
}
}
package com.phlx.wool;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2020/04/27
* desc :
* version: 1.0
* </pre>
*/
public class Configs {
/**
* 下载apk地址
*/
public static String downloadApk = "/app/download?type=2";
/**
* 是否在线操作
*/
public static boolean isOnLine = false;
/**
* 是否后缀端口
*/
public static boolean isAddPort = true;
//ip port
public static final String SP_APP_IP = "sp_app_ip";
public static final String SP_APP_PORT = "sp_app_port";
//用户信息
public static final String SP_USER_NAME = "sp_user_name";
public static final String SP_NAME = "sp_name";
public static final String SP_USER_PASSWORD = "sp_user_password";
public static final String SP_USER_EMAIL = "sp_user_email";
public static final String SP_FREQUENCY_CONFIG = "sp_frequency_config";
public static final String SP_USER_PHONE = "sp_user_phone";
public static final String SP_USER_UNIT = "sp_user_unit";
//选择养殖场
public static final String SP_UNIT_NAME = "sp_unit_unit";
public static final String SP_UNIT_CODE = "sp_unit_code";
public static final String SP_UNIT_PHONE = "sp_unit_phone";
public static final String SP_UNIT_ID_CARD = "sp_unit_id_card";
//type inventory页面显示类型
public static final String WORK_TYPE_M = "work_type_mark";
public static final String WORK_TYPE_Q = "work_type_quarantine";
public static final String WORK_TYPE_H = "work_type_harmless";
//0 高频,1低频
public static String FREQUENCY_CONFIG = "0";
public static String packageName(Context context) {
PackageManager manager = context.getPackageManager();
String name = null;
try {
PackageInfo info = manager.getPackageInfo(context.getPackageName(), 0);
name = info.versionName;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
return name;
}
}
package com.phlx.wool.data;
import com.phlx.wool.data.http.ApiService;
import com.phlx.wool.data.http.HttpDataSource;
import com.phlx.wool.data.http.HttpDataSourceImpl;
import com.phlx.wool.data.local.LocalDataSource;
import com.phlx.wool.data.local.LocalDataSourceImpl;
import com.phlx.wool.net.RetrofitClient;
/**
* 注入全局的数据仓库,可以考虑使用Dagger2。(根据项目实际情况搭建,千万不要为了架构而架构)
* Created by goldze on 2019/3/26.
*/
public class Injection {
public static Repository provideRepository() {
//网络API服务
ApiService apiService = RetrofitClient.getInstance().create(ApiService.class);
//网络数据源
HttpDataSource httpDataSource = HttpDataSourceImpl.getInstance(apiService);
//本地数据源
LocalDataSource localDataSource = LocalDataSourceImpl.getInstance();
//两条分支组成一个数据仓库
return Repository.getInstance(httpDataSource, localDataSource);
}
public static void destroyRepository() {
Repository.destroyInstance();
LocalDataSourceImpl.destroyInstance();
HttpDataSourceImpl.destroyInstance();
RetrofitClient.destroyInstance();
}
}
package com.phlx.wool.data;
import androidx.annotation.NonNull;
import com.phlx.wool.data.http.HttpDataSource;
import com.phlx.wool.data.local.LocalDataSource;
import com.phlx.wool.entity.Harmless;
import com.phlx.wool.entity.Label;
import com.phlx.wool.entity.Marking;
import com.phlx.wool.entity.Quarantine;
import com.phlx.wool.entity.TreatmentMethod;
import com.phlx.wool.entity.Unit;
import com.phlx.wool.entity.User;
import com.phlx.wool.entity.Variety;
import com.phlx.wool.entity.Veterinary;
import com.phlx.wool.params.BasicParams;
import com.phlx.wool.params.CattleResponse;
import java.util.List;
import io.reactivex.Observable;
import me.goldze.mvvmhabit.base.BaseModel;
import okhttp3.RequestBody;
/**
*
*/
public class Repository extends BaseModel implements HttpDataSource, LocalDataSource {
private volatile static Repository INSTANCE = null;
private final HttpDataSource mHttpDataSource;
private final LocalDataSource mLocalDataSource;
private Repository(@NonNull HttpDataSource httpDataSource,
@NonNull LocalDataSource localDataSource) {
this.mHttpDataSource = httpDataSource;
this.mLocalDataSource = localDataSource;
}
public static Repository getInstance(HttpDataSource httpDataSource,
LocalDataSource localDataSource) {
if (INSTANCE == null) {
synchronized (Repository.class) {
if (INSTANCE == null) {
INSTANCE = new Repository(httpDataSource, localDataSource);
}
}
}
return INSTANCE;
}
public static void destroyInstance() {
INSTANCE = null;
}
@Override
public Observable<CattleResponse> versionGet() {
return mHttpDataSource.versionGet();
}
@Override
public Observable<CattleResponse> DownloadApp() {
return mHttpDataSource.DownloadApp();
}
@Override
public Observable<CattleResponse<User>> loginPost(RequestBody body) {
return mHttpDataSource.loginPost(body);
}
@Override
public Observable<CattleResponse<BasicParams>> getBasicInfo(RequestBody body) {
return mHttpDataSource.getBasicInfo(body);
}
@Override
public Observable<CattleResponse<List<Label>>> getLabelList(RequestBody body) {
return mHttpDataSource.getLabelList(body);
}
@Override
public Observable<CattleResponse<List<Unit>>> getUnitList(RequestBody body) {
return mHttpDataSource.getUnitList(body);
}
@Override
public Observable<CattleResponse<List<Veterinary>>> getVeterinaryList(RequestBody body) {
return mHttpDataSource.getVeterinaryList(body);
}
@Override
public Observable<CattleResponse<List<Marking>>> submitMarking(RequestBody body) {
return mHttpDataSource.submitMarking(body);
}
@Override
public Observable<CattleResponse<List<Quarantine>>> submitQuarantine(RequestBody body) {
return mHttpDataSource.submitQuarantine(body);
}
@Override
public Observable<CattleResponse<List<Harmless>>> submitHarmless(RequestBody body) {
return mHttpDataSource.submitHarmless(body);
}
@Override
public void saveUserName(String userName) {
mLocalDataSource.saveUserName(userName);
}
@Override
public void savePassword(String password) {
mLocalDataSource.savePassword(password);
}
@Override
public void savePhone(String phone) {
mLocalDataSource.savePhone(phone);
}
@Override
public void saveEmail(String email) {
mLocalDataSource.saveEmail(email);
}
@Override
public void saveFrequencyConfig(String frequencyConfig) {
mLocalDataSource.saveFrequencyConfig(frequencyConfig);
}
@Override
public void saveBreed(String breed) {
mLocalDataSource.saveBreed(breed);
}
@Override
public void saveToken(String token) {
mLocalDataSource.saveToken(token);
}
@Override
public String getUserName() {
return mLocalDataSource.getUserName();
}
@Override
public String getPassword() {
return mLocalDataSource.getPassword();
}
@Override
public String getPhone() {
return mLocalDataSource.getPhone();
}
@Override
public String getEmail() {
return mLocalDataSource.getEmail();
}
@Override
public String getFrequencyConfig() {
return mLocalDataSource.getFrequencyConfig();
}
@Override
public String getBreed() {
return mLocalDataSource.getBreed();
}
@Override
public String getToken() {
return mLocalDataSource.getToken();
}
@Override
public void saveVariety(List<Variety> varieties) throws Exception {
mLocalDataSource.saveVariety(varieties);
}
@Override
public void saveTreatmentMethod(List<TreatmentMethod> treatmentMethods) throws Exception {
mLocalDataSource.saveTreatmentMethod(treatmentMethods);
}
@Override
public List<Variety> getVariety() {
return mLocalDataSource.getVariety();
}
@Override
public List<TreatmentMethod> getTreatmentMethod() {
return mLocalDataSource.getTreatmentMethod();
}
}
package com.phlx.wool.data;
import android.annotation.SuppressLint;
import android.app.Application;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;
import com.phlx.wool.ui.inventory.InventoryVM;
import com.phlx.wool.ui.login.LoginVM;
import com.phlx.wool.ui.main.MainVM;
import com.phlx.wool.ui.splash.SplashVM;
import com.phlx.wool.ui.sync.vm.ClearVM;
import com.phlx.wool.ui.sync.vm.DownloadVM;
import com.phlx.wool.ui.sync.vm.UploadVM;
import com.phlx.wool.ui.work.harmless.HarmlessVM;
import com.phlx.wool.ui.work.mark.MarkingVM;
import com.phlx.wool.ui.work.quarantine.QuarantineVM;
import com.phlx.wool.ui.work.unit.UnitVM;
/**
*
*/
public class VMFactory extends ViewModelProvider.NewInstanceFactory {
@SuppressLint("StaticFieldLeak")
private static volatile VMFactory INSTANCE;
private final Application mApplication;
private Repository repository;
public static VMFactory getInstance(Application application) {
if (INSTANCE == null) {
synchronized (VMFactory.class) {
if (INSTANCE == null) {
INSTANCE = new VMFactory(application, Injection.provideRepository());
}
}
}
return INSTANCE;
}
public void refreshRepository() {
if (repository != null) {
repository = null;
Injection.destroyRepository();
repository = Injection.provideRepository();
}
}
@VisibleForTesting
public static void destroyInstance() {
INSTANCE = null;
}
private VMFactory(Application application, Repository repository) {
this.mApplication = application;
this.repository = repository;
}
@NonNull
@Override
public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
if (modelClass.isAssignableFrom(LoginVM.class)) {
return (T) new LoginVM(mApplication, repository);
} else if (modelClass.isAssignableFrom(SplashVM.class)) {
return (T) new SplashVM(mApplication, repository);
}else if (modelClass.isAssignableFrom(MainVM.class)) {
return (T) new MainVM(mApplication, repository);
} else if (modelClass.isAssignableFrom(MarkingVM.class)) {
return (T) new MarkingVM(mApplication, repository);
} else if (modelClass.isAssignableFrom(QuarantineVM.class)) {
return (T) new QuarantineVM(mApplication, repository);
} else if (modelClass.isAssignableFrom(HarmlessVM.class)) {
return (T) new HarmlessVM(mApplication, repository);
} else if (modelClass.isAssignableFrom(InventoryVM.class)) {
return (T) new InventoryVM(mApplication, repository);
}else if (modelClass.isAssignableFrom(UnitVM.class)) {
return (T) new UnitVM(mApplication, repository);
}else if (modelClass.isAssignableFrom(ClearVM.class)) {
return (T) new ClearVM(mApplication, repository);
}else if (modelClass.isAssignableFrom(UploadVM.class)) {
return (T) new UploadVM(mApplication, repository);
}else if (modelClass.isAssignableFrom(DownloadVM.class)) {
return (T) new DownloadVM(mApplication, repository);
}
throw new IllegalArgumentException("Unknown ViewModel class: " + modelClass.getName());
}
}
package com.phlx.wool.data.http;
import com.phlx.wool.entity.Harmless;
import com.phlx.wool.entity.Label;
import com.phlx.wool.entity.Marking;
import com.phlx.wool.entity.Quarantine;
import com.phlx.wool.entity.Unit;
import com.phlx.wool.entity.User;
import com.phlx.wool.entity.Veterinary;
import com.phlx.wool.params.BasicParams;
import com.phlx.wool.params.CattleResponse;
import java.util.List;
import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
/**
* Created by goldze on 2017/6/15.
*/
public interface ApiService {
/**
* 获取版本号
*/
@GET("/app/getAppVsesion?type=2")
Observable<CattleResponse> versionGet();
/**
* 下载新版本
*/
@GET("/app/download")
Observable<CattleResponse> DownloadApp();
/**
* 登录
*/
@Headers({"Content-Type: application/json", "Accept: application/json"})
@POST("/auth/login")
Observable<CattleResponse<User>> loginPost(@Body RequestBody body);
/**
* 获取基本信息
*/
@Headers({"Content-Type: application/json", "Accept: application/json"})
@POST("/app/basicsInfo/findBasicsList")
Observable<CattleResponse<BasicParams>> getBasicInfo(@Body RequestBody body);
/**
* 获取发标记录
*/
@Headers({"Content-Type: application/json", "Accept: application/json"})
@POST("/app/manageunitdrawslug/findList")
Observable<CattleResponse<List<Label>>> getLabelList(@Body RequestBody body);
/**
* 获取牧户信息
*/
@Headers({"Content-Type: application/json", "Accept: application/json"})
@POST("/app/basicsInfo/findPastureunitList")
Observable<CattleResponse<List<Unit>>> getUnitList(@Body RequestBody body);
/**
* 获取兽医管理
*/
@Headers({"Content-Type: application/json", "Accept: application/json"})
@POST("/app/basicsInfo/findVeterinaryList")
Observable<CattleResponse<List<Veterinary>>> getVeterinaryList(@Body RequestBody body);
/**
* 上传打标信息
*/
@Headers({"Content-Type: application/json", "Accept: application/json"})
@POST("/app/resumeInfo/saveList")
Observable<CattleResponse<List<Marking>>> submitMarking(@Body RequestBody body);
/**
* 上传产地检疫
*/
@Headers({"Content-Type: application/json", "Accept: application/json"})
@POST("/app/quarantinerecord/saveList")
Observable<CattleResponse<List<Quarantine>>> submitQuarantine(@Body RequestBody body);
/**
* 上传无害化处理信息
*/
@Headers({"Content-Type: application/json", "Accept: application/json"})
@POST("/app/innocuitymanagerecord/saveList")
Observable<CattleResponse<List<Harmless>>> submitHarmless(@Body RequestBody body);
}
package com.phlx.wool.data.http;
import com.phlx.wool.entity.Harmless;
import com.phlx.wool.entity.Label;
import com.phlx.wool.entity.Marking;
import com.phlx.wool.entity.Quarantine;
import com.phlx.wool.entity.Unit;
import com.phlx.wool.entity.User;
import com.phlx.wool.entity.Veterinary;
import com.phlx.wool.params.BasicParams;
import com.phlx.wool.params.CattleResponse;
import java.util.List;
import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
/**
* Created by goldze on 2019/3/26.
*/
public interface HttpDataSource {
/**
* 获取版本号
*/
Observable<CattleResponse> versionGet();
/**
* 下载新版本
*/
Observable<CattleResponse> DownloadApp();
/**
* 登录
*/
Observable<CattleResponse<User>> loginPost(@Body RequestBody body);
/**
* 获取基本信息
*/
Observable<CattleResponse<BasicParams>> getBasicInfo(@Body RequestBody body);
/**
* 获取发标记录
*/
Observable<CattleResponse<List<Label>>> getLabelList(@Body RequestBody body);
/**
* 获取牧户信息
*/
Observable<CattleResponse<List<Unit>>> getUnitList(@Body RequestBody body);
/**
* 获取兽医管理
*/
Observable<CattleResponse<List<Veterinary>>> getVeterinaryList(@Body RequestBody body);
/**
* 上传打标信息
*/
Observable<CattleResponse<List<Marking>>> submitMarking(@Body RequestBody body);
/**
* 上传产地检疫
*/
Observable<CattleResponse<List<Quarantine>>> submitQuarantine(@Body RequestBody body);
/**
* 上传无害化处理信息
*/
Observable<CattleResponse<List<Harmless>>> submitHarmless(@Body RequestBody body);
}
package com.phlx.wool.data.http;
import com.phlx.wool.entity.Harmless;
import com.phlx.wool.entity.Label;
import com.phlx.wool.entity.Marking;
import com.phlx.wool.entity.Quarantine;
import com.phlx.wool.entity.Unit;
import com.phlx.wool.entity.User;
import com.phlx.wool.entity.Veterinary;
import com.phlx.wool.params.BasicParams;
import com.phlx.wool.params.CattleResponse;
import java.util.List;
import io.reactivex.Observable;
import okhttp3.RequestBody;
/**
* Created by goldze on 2019/3/26.
*/
public class HttpDataSourceImpl implements HttpDataSource {
private ApiService apiService;
private volatile static HttpDataSourceImpl INSTANCE = null;
public static HttpDataSourceImpl getInstance(ApiService apiService) {
if (INSTANCE == null) {
synchronized (HttpDataSourceImpl.class) {
if (INSTANCE == null) {
INSTANCE = new HttpDataSourceImpl(apiService);
}
}
}
return INSTANCE;
}
public static void destroyInstance() {
INSTANCE = null;
}
private HttpDataSourceImpl(ApiService apiService) {
this.apiService = apiService;
}
@Override
public Observable<CattleResponse> versionGet() {
return apiService.versionGet();
}
@Override
public Observable<CattleResponse> DownloadApp() {
return apiService.DownloadApp();
}
@Override
public Observable<CattleResponse<User>> loginPost(RequestBody body) {
return apiService.loginPost(body);
}
@Override
public Observable<CattleResponse<BasicParams>> getBasicInfo(RequestBody body) {
return apiService.getBasicInfo(body);
}
@Override
public Observable<CattleResponse<List<Label>>> getLabelList(RequestBody body) {
return apiService.getLabelList(body);
}
@Override
public Observable<CattleResponse<List<Unit>>> getUnitList(RequestBody body) {
return apiService.getUnitList(body);
}
@Override
public Observable<CattleResponse<List<Veterinary>>> getVeterinaryList(RequestBody body) {
return apiService.getVeterinaryList(body);
}
@Override
public Observable<CattleResponse<List<Marking>>> submitMarking(RequestBody body) {
return apiService.submitMarking(body);
}
@Override
public Observable<CattleResponse<List<Quarantine>>> submitQuarantine(RequestBody body) {
return apiService.submitQuarantine(body);
}
@Override
public Observable<CattleResponse<List<Harmless>>> submitHarmless(RequestBody body) {
return apiService.submitHarmless(body);
}
}
package com.phlx.wool.data.local;
import com.phlx.wool.entity.TreatmentMethod;
import com.phlx.wool.entity.Variety;
import java.util.List;
/**
* Created by goldze on 2019/3/26.
*/
public interface LocalDataSource {
/**
* 保存用户名
*/
void saveUserName(String userName);
/**
* 保存用户密码
*/
void savePassword(String password);
/**
* 保存电话
*/
void savePhone(String phone);
/**
* 保存Email
*/
void saveEmail(String email);
/**
* 保存频率类型,0高频,1低频
*/
void saveFrequencyConfig(String frequencyConfig);
/**
* 保存用所在养殖场
*/
void saveBreed(String breed);
/**
* 保存Token
*/
void saveToken(String token);
/**
* 获取用户名
*/
String getUserName();
/**
* 获取用户密码
*/
String getPassword();
/**
* 获取用户电话
*/
String getPhone();
/**
* 获取用户邮箱
*/
String getEmail();
/**
* 获取用户频率类型
*/
String getFrequencyConfig();
/**
* 获取用户所在养殖场
*/
String getBreed();
/**
* 获取Token
*/
String getToken();
/**
* 保存品种信息
*/
void saveVariety(List<Variety> varieties) throws Exception;
/**
* 保存无害化处理模式
*/
void saveTreatmentMethod(List<TreatmentMethod> treatmentMethods) throws Exception;
/**
* 获取品种
*/
List<Variety> getVariety();
/**
* 获取无害化处理方式
*/
List<TreatmentMethod> getTreatmentMethod();
}
package com.phlx.wool.data.local;
import com.phlx.wool.Configs;
import com.phlx.wool.db.DbUtil;
import com.phlx.wool.entity.TreatmentMethod;
import com.phlx.wool.entity.Variety;
import java.util.List;
import me.goldze.mvvmhabit.utils.SPUtils;
public class LocalDataSourceImpl implements LocalDataSource {
private volatile static LocalDataSourceImpl INSTANCE = null;
public static LocalDataSourceImpl getInstance() {
if (INSTANCE == null) {
synchronized (LocalDataSourceImpl.class) {
if (INSTANCE == null) {
INSTANCE = new LocalDataSourceImpl();
}
}
}
return INSTANCE;
}
public static void destroyInstance() {
INSTANCE = null;
}
@Override
public void saveUserName(String userName) {
SPUtils.getInstance().put(Configs.SP_USER_NAME, userName);
}
@Override
public void savePassword(String password) {
SPUtils.getInstance().put(Configs.SP_USER_PASSWORD, password);
}
@Override
public void savePhone(String phone) {
SPUtils.getInstance().put(Configs.SP_USER_PHONE, phone);
}
@Override
public void saveEmail(String email) {
SPUtils.getInstance().put(Configs.SP_USER_EMAIL, email);
}
@Override
public void saveFrequencyConfig(String frequencyConfig) {
SPUtils.getInstance().put(Configs.SP_FREQUENCY_CONFIG, frequencyConfig);
}
@Override
public void saveBreed(String breed) {
SPUtils.getInstance().put(Configs.SP_USER_UNIT, breed);
}
@Override
public void saveToken(String token) {
SPUtils.getInstance().put("token", token);
}
@Override
public String getUserName() {
return SPUtils.getInstance().getString(Configs.SP_USER_NAME, "");
}
@Override
public String getPassword() {
return SPUtils.getInstance().getString(Configs.SP_USER_PASSWORD, "");
}
@Override
public String getPhone() {
return null;
}
@Override
public String getEmail() {
return null;
}
@Override
public String getFrequencyConfig() {
return null;
}
@Override
public String getBreed() {
return null;
}
@Override
public String getToken() {
return SPUtils.getInstance().getString("token", "");
}
@Override
public void saveVariety(List<Variety> varieties) throws Exception {
DbUtil.getInstance().insertOrReplaceInTx(varieties);
}
@Override
public void saveTreatmentMethod(List<TreatmentMethod> treatmentMethods) throws Exception {
DbUtil.getInstance().insertOrReplaceInTx(treatmentMethods);
}
@Override
public List<Variety> getVariety() {
return DbUtil.getInstance().queryAll(Variety.class);
}
@Override
public List<TreatmentMethod> getTreatmentMethod() {
return DbUtil.getInstance().queryAll(TreatmentMethod.class);
}
}
This diff is collapsed.
package com.phlx.wool.db.interf;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2020/05/12
* desc :
* version: 1.0
* </pre>
*/
public interface DbIDUCallBack {
void onNotification(boolean result);
}
\ No newline at end of file
package com.phlx.wool.db.interf;
import java.util.List;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2020/05/12
* desc :
* version: 1.0
* </pre>
*/
public interface DbQueryCallBack<T> {
void onSuccess(List<T> result);
void onFailed();
}
\ No newline at end of file
This diff is collapsed.
package com.phlx.wool.entity;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.databinding.BaseObservable;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Index;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2020/04/10
* desc : 发标记录表
* version: 1.0
* </pre>
*/
@Entity
public class HarmlessDetail extends BaseObservable implements Parcelable {
@Id(autoincrement = true)
@Expose(serialize = false, deserialize = false)
private Long id;
/**
* 主表ID
*/
@Index(name = "harmlessId")
private Long harmlessId;
/**
* 养殖单位ID
*/
@SerializedName("preflagunit")
private String receivingUnit;
/**
* 耳标EPC
*/
@SerializedName("slugno")
private String Epc;
/**
* 二维码
*/
@SerializedName("twodimensionno")
private String twodimensionno;
/**
* 耳标tid
*/
@Index(name = "HarmlessTid", unique = true)
@SerializedName("innercode")
private String Tid;
/**
* 合法状态 0 非法 1 合法
*/
@SerializedName("qualified")
private String isLegalStatus;
/**
* 时间戳
*/
@SerializedName("inputTime")
private long timestamp;
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(this.id);
dest.writeValue(this.harmlessId);
dest.writeString(this.receivingUnit);
dest.writeString(this.Epc);
dest.writeString(this.twodimensionno);
dest.writeString(this.Tid);
dest.writeString(this.isLegalStatus);
dest.writeLong(this.timestamp);
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public Long getHarmlessId() {
return this.harmlessId;
}
public void setHarmlessId(Long harmlessId) {
this.harmlessId = harmlessId;
}
public String getReceivingUnit() {
return this.receivingUnit;
}
public void setReceivingUnit(String receivingUnit) {
this.receivingUnit = receivingUnit;
}
public String getEpc() {
return this.Epc;
}
public void setEpc(String Epc) {
this.Epc = Epc;
}
public String getTwodimensionno() {
return this.twodimensionno;
}
public void setTwodimensionno(String twodimensionno) {
this.twodimensionno = twodimensionno;
}
public String getTid() {
return this.Tid;
}
public void setTid(String Tid) {
this.Tid = Tid;
}
public String getIsLegalStatus() {
return this.isLegalStatus;
}
public void setIsLegalStatus(String isLegalStatus) {
this.isLegalStatus = isLegalStatus;
}
public long getTimestamp() {
return this.timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public HarmlessDetail() {
}
protected HarmlessDetail(Parcel in) {
this.id = (Long) in.readValue(Long.class.getClassLoader());
this.harmlessId = (Long) in.readValue(Long.class.getClassLoader());
this.receivingUnit = in.readString();
this.Epc = in.readString();
this.twodimensionno = in.readString();
this.Tid = in.readString();
this.isLegalStatus = in.readString();
this.timestamp = in.readLong();
}
@Generated(hash = 1790410930)
public HarmlessDetail(Long id, Long harmlessId, String receivingUnit, String Epc,
String twodimensionno, String Tid, String isLegalStatus, long timestamp) {
this.id = id;
this.harmlessId = harmlessId;
this.receivingUnit = receivingUnit;
this.Epc = Epc;
this.twodimensionno = twodimensionno;
this.Tid = Tid;
this.isLegalStatus = isLegalStatus;
this.timestamp = timestamp;
}
public static final Creator<HarmlessDetail> CREATOR = new Creator<HarmlessDetail>() {
@Override
public HarmlessDetail createFromParcel(Parcel source) {
return new HarmlessDetail(source);
}
@Override
public HarmlessDetail[] newArray(int size) {
return new HarmlessDetail[size];
}
};
@Override
public String toString() {
return "HarmlessDetail{" +
"id=" + id +
", harmlessId=" + harmlessId +
", receivingUnit='" + receivingUnit + '\'' +
", Epc='" + Epc + '\'' +
", twodimensionno='" + twodimensionno + '\'' +
", Tid='" + Tid + '\'' +
", isLegalStatus='" + isLegalStatus + '\'' +
", timestamp=" + timestamp +
'}';
}
}
package com.phlx.wool.entity;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.databinding.BaseObservable;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Index;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2020/04/10
* desc : 发标记录表
* version: 1.0
* </pre>
*/
@Entity
public class Label extends BaseObservable implements Parcelable {
@Id(autoincrement = false)
@Expose(serialize = false, deserialize = true)
private Long id;
/**
* 养殖单位
*/
@SerializedName("preflagunit")
private String receivingUnit;
/**
* 耳标EPC
*/
@SerializedName("slugno")
private String Epc;
/**
* 二维码
*/
@SerializedName("twodimensionno")
private String twodimensionno;
/**
* 耳标tid
*/
@Index(name = "LabelTid", unique = true)
@SerializedName("innercode")
private String Tid;
/**
* 合法状态 0 非法 1 合法
*/
@SerializedName("errorstate")
private String isLegalStatus;
/**
* 时间戳
*/
@Index(name = "labelTime")
@SerializedName("inputTime")
private long timestamp;
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(this.id);
dest.writeString(this.receivingUnit);
dest.writeString(this.Epc);
dest.writeString(this.twodimensionno);
dest.writeString(this.Tid);
dest.writeString(this.isLegalStatus);
dest.writeLong(this.timestamp);
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String getReceivingUnit() {
return this.receivingUnit;
}
public void setReceivingUnit(String receivingUnit) {
this.receivingUnit = receivingUnit;
}
public String getEpc() {
return this.Epc;
}
public void setEpc(String Epc) {
this.Epc = Epc;
}
public String getTwodimensionno() {
return this.twodimensionno;
}
public void setTwodimensionno(String twodimensionno) {
this.twodimensionno = twodimensionno;
}
public String getTid() {
return this.Tid;
}
public void setTid(String Tid) {
this.Tid = Tid;
}
public String getIsLegalStatus() {
return this.isLegalStatus;
}
public void setIsLegalStatus(String isLegalStatus) {
this.isLegalStatus = isLegalStatus;
}
public long getTimestamp() {
return this.timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public Label() {
}
protected Label(Parcel in) {
this.id = (Long) in.readValue(Long.class.getClassLoader());
this.receivingUnit = in.readString();
this.Epc = in.readString();
this.twodimensionno = in.readString();
this.Tid = in.readString();
this.isLegalStatus = in.readString();
this.timestamp = in.readLong();
}
@Generated(hash = 643225198)
public Label(Long id, String receivingUnit, String Epc, String twodimensionno,
String Tid, String isLegalStatus, long timestamp) {
this.id = id;
this.receivingUnit = receivingUnit;
this.Epc = Epc;
this.twodimensionno = twodimensionno;
this.Tid = Tid;
this.isLegalStatus = isLegalStatus;
this.timestamp = timestamp;
}
public static final Creator<Label> CREATOR = new Creator<Label>() {
@Override
public Label createFromParcel(Parcel source) {
return new Label(source);
}
@Override
public Label[] newArray(int size) {
return new Label[size];
}
};
@Override
public String toString() {
return "Label{" +
"id=" + id +
", receivingUnit='" + receivingUnit + '\'' +
", Epc='" + Epc + '\'' +
", twodimensionno='" + twodimensionno + '\'' +
", Tid='" + Tid + '\'' +
", isLegalStatus='" + isLegalStatus + '\'' +
", timestamp=" + timestamp +
'}';
}
}
This diff is collapsed.
This diff is collapsed.
package com.phlx.wool.entity;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.databinding.BaseObservable;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Index;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2020/04/10
* desc : 发标记录表
* version: 1.0
* </pre>
*/
@Entity
public class QuarantineDetail extends BaseObservable implements Parcelable {
@Id(autoincrement = true)
@Expose(serialize = false, deserialize = false)
private Long id;
/**
* 主表ID
*/
@Index(name = "quarantineId")
private Long quarantineId;
/**
* 养殖单位ID
*/
@SerializedName("preflagunit")
private String receivingUnit;
/**
* 耳标EPC
*/
@SerializedName("slugno")
private String Epc;
/**
* 二维码号
*/
@SerializedName("twodimensionno")
private String twodimensionno;
/**
* 耳标tid
*/
@Index(name = "QuarantineTid", unique = true)
@SerializedName("innercode")
private String Tid;
/**
* 合法状态 0 非法 1 合法
*/
@SerializedName("qualified")
private String isLegalStatus;
@SerializedName("inputTime")
private long timestamp;
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(this.id);
dest.writeValue(this.quarantineId);
dest.writeString(this.receivingUnit);
dest.writeString(this.Epc);
dest.writeString(this.twodimensionno);
dest.writeString(this.Tid);
dest.writeString(this.isLegalStatus);
dest.writeLong(this.timestamp);
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public Long getQuarantineId() {
return this.quarantineId;
}
public void setQuarantineId(Long quarantineId) {
this.quarantineId = quarantineId;
}
public String getReceivingUnit() {
return this.receivingUnit;
}
public void setReceivingUnit(String receivingUnit) {
this.receivingUnit = receivingUnit;
}
public String getEpc() {
return this.Epc;
}
public void setEpc(String Epc) {
this.Epc = Epc;
}
public String getTwodimensionno() {
return this.twodimensionno;
}
public void setTwodimensionno(String twodimensionno) {
this.twodimensionno = twodimensionno;
}
public String getTid() {
return this.Tid;
}
public void setTid(String Tid) {
this.Tid = Tid;
}
public String getIsLegalStatus() {
return this.isLegalStatus;
}
public void setIsLegalStatus(String isLegalStatus) {
this.isLegalStatus = isLegalStatus;
}
public long getTimestamp() {
return this.timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public QuarantineDetail() {
}
protected QuarantineDetail(Parcel in) {
this.id = (Long) in.readValue(Long.class.getClassLoader());
this.quarantineId = (Long) in.readValue(Long.class.getClassLoader());
this.receivingUnit = in.readString();
this.Epc = in.readString();
this.twodimensionno = in.readString();
this.Tid = in.readString();
this.isLegalStatus = in.readString();
this.timestamp = in.readLong();
}
@Generated(hash = 1088178498)
public QuarantineDetail(Long id, Long quarantineId, String receivingUnit, String Epc,
String twodimensionno, String Tid, String isLegalStatus, long timestamp) {
this.id = id;
this.quarantineId = quarantineId;
this.receivingUnit = receivingUnit;
this.Epc = Epc;
this.twodimensionno = twodimensionno;
this.Tid = Tid;
this.isLegalStatus = isLegalStatus;
this.timestamp = timestamp;
}
public static final Creator<QuarantineDetail> CREATOR = new Creator<QuarantineDetail>() {
@Override
public QuarantineDetail createFromParcel(Parcel source) {
return new QuarantineDetail(source);
}
@Override
public QuarantineDetail[] newArray(int size) {
return new QuarantineDetail[size];
}
};
@Override
public String toString() {
return "QuarantineDetail{" +
"id=" + id +
", quarantineId=" + quarantineId +
", receivingUnit='" + receivingUnit + '\'' +
", Epc='" + Epc + '\'' +
", twodimensionno='" + twodimensionno + '\'' +
", Tid='" + Tid + '\'' +
", isLegalStatus='" + isLegalStatus + '\'' +
", timestamp=" + timestamp +
'}';
}
}
package com.phlx.wool.entity;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.databinding.BaseObservable;
import com.google.gson.annotations.SerializedName;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2020/04/10
* desc : 免疫方法表
* version: 1.0
* </pre>
*/
@Entity
public class TreatmentMethod extends BaseObservable implements Parcelable {
@Id(autoincrement = false)
private Long id;
/**
* 无害化处理方法代码
*/
@SerializedName("innocuitymanageid")
private String TreatmentMethodCode;
/**
* 无害化处理方法名称
*/
@SerializedName("innocuitymanagename")
private String TreatmentMethodName;
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String getTreatmentMethodCode() {
return this.TreatmentMethodCode;
}
public void setTreatmentMethodCode(String TreatmentMethodCode) {
this.TreatmentMethodCode = TreatmentMethodCode;
}
public String getTreatmentMethodName() {
return this.TreatmentMethodName;
}
public void setTreatmentMethodName(String TreatmentMethodName) {
this.TreatmentMethodName = TreatmentMethodName;
}
@Override
public String toString() {
return "TreatmentMethod{" +
"id=" + id +
", TreatmentMethodCode='" + TreatmentMethodCode + '\'' +
", TreatmentMethodName='" + TreatmentMethodName + '\'' +
'}';
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(this.id);
dest.writeString(this.TreatmentMethodCode);
dest.writeString(this.TreatmentMethodName);
}
protected TreatmentMethod(Parcel in) {
this.id = (Long) in.readValue(Long.class.getClassLoader());
this.TreatmentMethodCode = in.readString();
this.TreatmentMethodName = in.readString();
}
@Generated(hash = 462331568)
public TreatmentMethod(Long id, String TreatmentMethodCode,
String TreatmentMethodName) {
this.id = id;
this.TreatmentMethodCode = TreatmentMethodCode;
this.TreatmentMethodName = TreatmentMethodName;
}
@Generated(hash = 1094318306)
public TreatmentMethod() {
}
public static final Creator<TreatmentMethod> CREATOR =
new Creator<TreatmentMethod>() {
@Override
public TreatmentMethod createFromParcel(Parcel source) {
return new TreatmentMethod(source);
}
@Override
public TreatmentMethod[] newArray(int size) {
return new TreatmentMethod[size];
}
};
}
package com.phlx.wool.entity;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.databinding.BaseObservable;
import com.google.gson.annotations.SerializedName;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Index;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2020/04/10
* desc : 牧户表
* version: 1.0
* </pre>
*/
@Entity
public class Unit extends BaseObservable implements Parcelable {
@Id(autoincrement = false)
private Long id;
/**
* 代码
*/
@SerializedName("pastureunitid")
private String pastureUnitCode;
/**
* 负责人编码
*/
@SerializedName("managerid")
private String managerCode;
/**
* 负责人名称
*/
@SerializedName("managername")
private String managerName;
/**
* 身份证号
*/
@SerializedName("idcard")
private String idCard;
/**
* 负责人联系电话
*/
@SerializedName("managerphone")
private String managerPhone;
/**
* 时间戳
*/
@Index(name = "unitTime", unique = false)
@SerializedName("inputTime")
private long timestamp;
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String getPastureUnitCode() {
return this.pastureUnitCode;
}
public void setPastureUnitCode(String pastureUnitCode) {
this.pastureUnitCode = pastureUnitCode;
}
public String getManagerCode() {
return this.managerCode;
}
public void setManagerCode(String managerCode) {
this.managerCode = managerCode;
}
public String getManagerName() {
return this.managerName;
}
public void setManagerName(String managerName) {
this.managerName = managerName;
}
public String getIdCard() {
return this.idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard;
}
public String getManagerPhone() {
return this.managerPhone;
}
public void setManagerPhone(String managerPhone) {
this.managerPhone = managerPhone;
}
public long getTimestamp() {
return this.timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(this.id);
dest.writeString(this.pastureUnitCode);
dest.writeString(this.managerCode);
dest.writeString(this.managerName);
dest.writeString(this.idCard);
dest.writeString(this.managerPhone);
dest.writeLong(this.timestamp);
}
protected Unit(Parcel in) {
this.id = (Long) in.readValue(Long.class.getClassLoader());
this.pastureUnitCode = in.readString();
this.managerCode = in.readString();
this.managerName = in.readString();
this.idCard = in.readString();
this.managerPhone = in.readString();
this.timestamp = in.readLong();
}
@Generated(hash = 730934383)
public Unit(Long id, String pastureUnitCode, String managerCode,
String managerName, String idCard, String managerPhone,
long timestamp) {
this.id = id;
this.pastureUnitCode = pastureUnitCode;
this.managerCode = managerCode;
this.managerName = managerName;
this.idCard = idCard;
this.managerPhone = managerPhone;
this.timestamp = timestamp;
}
@Generated(hash = 1236212320)
public Unit() {
}
public static final Creator<Unit> CREATOR = new Creator<Unit>() {
@Override
public Unit createFromParcel(Parcel source) {
return new Unit(source);
}
@Override
public Unit[] newArray(int size) {
return new Unit[size];
}
};
@Override
public String toString() {
return "Unit{" +
"id=" + id +
", pastureUnitCode='" + pastureUnitCode + '\'' +
", managerCode='" + managerCode + '\'' +
", managerName='" + managerName + '\'' +
", idCard='" + idCard + '\'' +
", managerPhone='" + managerPhone + '\'' +
", timestamp=" + timestamp +
'}';
}
}
package com.phlx.wool.entity;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2020/04/13
* desc :
* version: 1.0
* </pre>
*/
public class User {
/**
* user : {"dept":{"deptId":"106","deptName":"苏尼特左旗"},"deptId":"106","email":"sy@126.com",
* "loginName":"ds01","phonenumber":"13566666666","userId":"106","userName":"苏尼特左旗01"}
* token : fabe3e2ca39843ba9643b27b0db5c548
*/
private UserBean user;
private String token;
public UserBean getUser() {
return user;
}
public void setUser(UserBean user) {
this.user = user;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public static class UserBean {
/**
* dept : {"deptId":"106","deptName":"苏尼特左旗"}
* deptId : 106
* email : sy@126.com
* loginName : ds01
* phonenumber : 13566666666
* userId : 106
* userName : 苏尼特左旗01
*/
private DeptBean dept;
private String deptId;
private String email;
private String loginName;
private String phonenumber;
private String userId;
private String userName;
private String frequencyConfig;// 0高频,1低频
public DeptBean getDept() {
return dept;
}
public void setDept(DeptBean dept) {
this.dept = dept;
}
public String getDeptId() {
return deptId;
}
public void setDeptId(String deptId) {
this.deptId = deptId;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public String getPhonenumber() {
return phonenumber;
}
public void setPhonenumber(String phonenumber) {
this.phonenumber = phonenumber;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getFrequencyConfig() {
return frequencyConfig;
}
public void setFrequencyConfig(String frequencyConfig) {
this.frequencyConfig = frequencyConfig;
}
public static class DeptBean {
/**
* deptId : 106
* deptName : 苏尼特左旗
*/
private String deptId;
private String deptName;
public String getDeptId() {
return deptId;
}
public void setDeptId(String deptId) {
this.deptId = deptId;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
}
@Override
public String toString() {
return "UserBean{" +
"dept=" + dept +
", deptId='" + deptId + '\'' +
", email='" + email + '\'' +
", loginName='" + loginName + '\'' +
", phonenumber='" + phonenumber + '\'' +
", userId='" + userId + '\'' +
", userName='" + userName + '\'' +
", frequencyConfig='" + frequencyConfig + '\'' +
'}';
}
}
@Override
public String toString() {
return "User{" +
"user=" + user +
", token='" + token + '\'' +
'}';
}
}
package com.phlx.wool.entity;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.databinding.BaseObservable;
import com.google.gson.annotations.SerializedName;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2020/04/10
* desc : 品种分类表
* version: 1.0
* </pre>
*/
@Entity
public class Variety extends BaseObservable implements Parcelable {
@Id(autoincrement = false)
private Long id;
/**
* 品种代码
*/
@SerializedName("ancestryid")
private String VarietyCode;
/**
* 品种名称
*/
@SerializedName("ancestryname")
private String VarietyName;
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String getVarietyCode() {
return this.VarietyCode;
}
public void setVarietyCode(String VarietyCode) {
this.VarietyCode = VarietyCode;
}
public String getVarietyName() {
return this.VarietyName;
}
public void setVarietyName(String VarietyName) {
this.VarietyName = VarietyName;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(this.id);
dest.writeString(this.VarietyCode);
dest.writeString(this.VarietyName);
}
protected Variety(Parcel in) {
this.id = (Long) in.readValue(Long.class.getClassLoader());
this.VarietyCode = in.readString();
this.VarietyName = in.readString();
}
@Generated(hash = 1906955683)
public Variety(Long id, String VarietyCode, String VarietyName) {
this.id = id;
this.VarietyCode = VarietyCode;
this.VarietyName = VarietyName;
}
@Generated(hash = 1163626520)
public Variety() {
}
public static final Creator<Variety> CREATOR = new Creator<Variety>() {
@Override
public Variety createFromParcel(Parcel source) {
return new Variety(source);
}
@Override
public Variety[] newArray(int size) {
return new Variety[size];
}
};
@Override
public String toString() {
return "Variety{" +
"id=" + id +
", VarietyCode='" + VarietyCode + '\'' +
", VarietyName='" + VarietyName + '\'' +
'}';
}
}
package com.phlx.wool.entity;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.databinding.BaseObservable;
import com.google.gson.annotations.SerializedName;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2020/04/10
* desc : 兽医表
* version: 1.0
* </pre>
*/
@Entity
public class Veterinary extends BaseObservable implements Parcelable {
@Id(autoincrement = false)
private Long id;
/**
* 兽医代码
*/
@SerializedName("personid")
private String veterinaryCode;
/**
* 兽医名称
*/
@SerializedName("personname")
private String veterinaryName;
/**
* 兽医电话
*/
@SerializedName("phone")
private String veterinaryPhone;
/**
* 时间戳
*/
@SerializedName("inputTime")
private long timestamp;
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String getVeterinaryCode() {
return this.veterinaryCode;
}
public void setVeterinaryCode(String veterinaryCode) {
this.veterinaryCode = veterinaryCode;
}
public String getVeterinaryName() {
return this.veterinaryName;
}
public void setVeterinaryName(String veterinaryName) {
this.veterinaryName = veterinaryName;
}
public String getVeterinaryPhone() {
return this.veterinaryPhone;
}
public void setVeterinaryPhone(String veterinaryPhone) {
this.veterinaryPhone = veterinaryPhone;
}
public long getTimestamp() {
return this.timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(this.id);
dest.writeString(this.veterinaryCode);
dest.writeString(this.veterinaryName);
dest.writeString(this.veterinaryPhone);
dest.writeLong(this.timestamp);
}
protected Veterinary(Parcel in) {
this.id = (Long) in.readValue(Long.class.getClassLoader());
this.veterinaryCode = in.readString();
this.veterinaryName = in.readString();
this.veterinaryPhone = in.readString();
this.timestamp = in.readLong();
}
@Generated(hash = 1680592785)
public Veterinary(Long id, String veterinaryCode, String veterinaryName,
String veterinaryPhone, long timestamp) {
this.id = id;
this.veterinaryCode = veterinaryCode;
this.veterinaryName = veterinaryName;
this.veterinaryPhone = veterinaryPhone;
this.timestamp = timestamp;
}
@Generated(hash = 1188226452)
public Veterinary() {
}
public static final Creator<Veterinary> CREATOR = new Creator<Veterinary>() {
@Override
public Veterinary createFromParcel(Parcel source) {
return new Veterinary(source);
}
@Override
public Veterinary[] newArray(int size) {
return new Veterinary[size];
}
};
@Override
public String toString() {
return "Veterinary{" +
"id=" + id +
", veterinaryCode='" + veterinaryCode + '\'' +
", veterinaryName='" + veterinaryName + '\'' +
", veterinaryPhone='" + veterinaryPhone + '\'' +
", timestamp=" + timestamp +
'}';
}
}
package com.phlx.wool.event;
import android.os.Parcel;
import android.os.Parcelable;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2019/06/10
* desc : RxBus数据模型类
* version: 1.0
* </pre>
*/
public class EventMsg<T> implements Parcelable {
private String action;
private T obj;
public EventMsg() {
}
public EventMsg(String action, T obj) {
this.action = action;
this.obj = obj;
}
protected EventMsg(Parcel in) {
action = in.readString();
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(action);
}
@Override
public int describeContents() {
return 0;
}
public static final Creator<EventMsg> CREATOR = new Creator<EventMsg>() {
@Override
public EventMsg createFromParcel(Parcel in) {
return new EventMsg(in);
}
@Override
public EventMsg[] newArray(int size) {
return new EventMsg[size];
}
};
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
public T getObj() {
return obj;
}
public void setObj(T obj) {
this.obj = obj;
}
@Override
public String toString() {
return "EventMsg{" +
"action='" + action + '\'' +
", obj=" + obj +
'}';
}
}
package com.phlx.wool.event;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2019/06/10
* desc :
* version: 1.0
* </pre>
*/
public class EventTag {
//盘点数据
public final static String EVENT_INVENTORY_DATA = "inventory_data_event";//正常
}
/*
* Copyright 2016 jeasonlzy(廖子尧)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.phlx.wool.net;
import java.io.IOException;
import java.io.InputStream;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.NoSuchAlgorithmException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
public class HttpsUtils {
public static class SSLParams {
public SSLSocketFactory sSLSocketFactory;
public X509TrustManager trustManager;
}
public static SSLParams getSslSocketFactory() {
return getSslSocketFactoryBase(null, null, null);
}
/**
* https单向认证
* 可以额外配置信任服务端的证书策略,否则默认是按CA证书去验证的,若不是CA可信任的证书,则无法通过验证
*/
public static SSLParams getSslSocketFactory(X509TrustManager trustManager) {
return getSslSocketFactoryBase(trustManager, null, null);
}
/**
* https单向认证
* 用含有服务端公钥的证书校验服务端证书
*/
public static SSLParams getSslSocketFactory(InputStream... certificates) {
return getSslSocketFactoryBase(null, null, null, certificates);
}
/**
* https双向认证
* bksFile 和 password -> 客户端使用bks证书校验服务端证书
* certificates -> 用含有服务端公钥的证书校验服务端证书
*/
public static SSLParams getSslSocketFactory(InputStream bksFile, String password, InputStream... certificates) {
return getSslSocketFactoryBase(null, bksFile, password, certificates);
}
/**
* https双向认证
* bksFile 和 password -> 客户端使用bks证书校验服务端证书
* X509TrustManager -> 如果需要自己校验,那么可以自己实现相关校验,如果不需要自己校验,那么传null即可
*/
public static SSLParams getSslSocketFactory(InputStream bksFile, String password, X509TrustManager trustManager) {
return getSslSocketFactoryBase(trustManager, bksFile, password);
}
private static SSLParams getSslSocketFactoryBase(X509TrustManager trustManager, InputStream bksFile, String password, InputStream... certificates) {
SSLParams sslParams = new SSLParams();
try {
KeyManager[] keyManagers = prepareKeyManager(bksFile, password);
TrustManager[] trustManagers = prepareTrustManager(certificates);
X509TrustManager manager;
if (trustManager != null) {
//优先使用用户自定义的TrustManager
manager = trustManager;
} else if (trustManagers != null) {
//然后使用默认的TrustManager
manager = chooseTrustManager(trustManagers);
} else {
//否则使用不安全的TrustManager
manager = UnSafeTrustManager;
}
// 创建TLS类型的SSLContext对象, that uses our TrustManager
SSLContext sslContext = SSLContext.getInstance("TLS");
// 用上面得到的trustManagers初始化SSLContext,这样sslContext就会信任keyStore中的证书
// 第一个参数是授权的密钥管理器,用来授权验证,比如授权自签名的证书验证。第二个是被授权的证书管理器,用来验证服务器端的证书
sslContext.init(keyManagers, new TrustManager[]{manager}, null);
// 通过sslContext获取SSLSocketFactory对象
sslParams.sSLSocketFactory = sslContext.getSocketFactory();
sslParams.trustManager = manager;
return sslParams;
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
} catch (KeyManagementException e) {
throw new AssertionError(e);
}
}
private static KeyManager[] prepareKeyManager(InputStream bksFile, String password) {
try {
if (bksFile == null || password == null) return null;
KeyStore clientKeyStore = KeyStore.getInstance("BKS");
clientKeyStore.load(bksFile, password.toCharArray());
KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
kmf.init(clientKeyStore, password.toCharArray());
return kmf.getKeyManagers();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
private static TrustManager[] prepareTrustManager(InputStream... certificates) {
if (certificates == null || certificates.length <= 0) return null;
try {
CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
// 创建一个默认类型的KeyStore,存储我们信任的证书
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
keyStore.load(null);
int index = 0;
for (InputStream certStream : certificates) {
String certificateAlias = Integer.toString(index++);
// 证书工厂根据证书文件的流生成证书 cert
Certificate cert = certificateFactory.generateCertificate(certStream);
// 将 cert 作为可信证书放入到keyStore中
keyStore.setCertificateEntry(certificateAlias, cert);
try {
if (certStream != null) certStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
//我们创建一个默认类型的TrustManagerFactory
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
//用我们之前的keyStore实例初始化TrustManagerFactory,这样tmf就会信任keyStore中的证书
tmf.init(keyStore);
//通过tmf获取TrustManager数组,TrustManager也会信任keyStore中的证书
return tmf.getTrustManagers();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
private static X509TrustManager chooseTrustManager(TrustManager[] trustManagers) {
for (TrustManager trustManager : trustManagers) {
if (trustManager instanceof X509TrustManager) {
return (X509TrustManager) trustManager;
}
}
return null;
}
/**
* 为了解决客户端不信任服务器数字证书的问题,网络上大部分的解决方案都是让客户端不对证书做任何检查,
* 这是一种有很大安全漏洞的办法
*/
public static X509TrustManager UnSafeTrustManager = new X509TrustManager() {
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
}
@Override
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
}
@Override
public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[]{};
}
};
/**
* 此类是用于主机名验证的基接口。 在握手期间,如果 URL 的主机名和服务器的标识主机名不匹配,
* 则验证机制可以回调此接口的实现程序来确定是否应该允许此连接。策略可以是基于证书的或依赖于其他验证方案。
* 当验证 URL 主机名使用的默认规则失败时使用这些回调。如果主机名是可接受的,则返回 true
*/
public static HostnameVerifier UnSafeHostnameVerifier = new HostnameVerifier() {
@Override
public boolean verify(String hostname, SSLSession session) {
return true;
}
};
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
package com.phlx.wool.params;
/**
* <pre>
* author : lei
* e-mail : 18600395998@163.com
* time : 2020/05/08
* desc :
* version: 1.0
* </pre>
*/
public class CattleResponse<T> {
private int code;
private String msg;
private T data;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
@Override
public String toString() {
return "CattleResponse{" +
"code=" + code +
", msg='" + msg + '\'' +
", data=" + data +
'}';
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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