Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
A
AnchorCollect_p
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hywang
AnchorCollect_p
Commits
472245d0
Commit
472245d0
authored
Apr 07, 2024
by
hywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修复图片异常无法上传基础数据bug;
2.修复同步数据bug。
parent
f9235109
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
53 deletions
+90
-53
build.gradle
app/build.gradle
+4
-2
RetrofitClient.java
...ain/java/com/phlx/anchorcollect_p/net/RetrofitClient.java
+2
-1
BasicsCollectFragment.java
...lx/anchorcollect_p/ui/fragment/BasicsCollectFragment.java
+1
-1
BasicsCollectVM.java
.../phlx/anchorcollect_p/ui/fragment/vm/BasicsCollectVM.java
+2
-1
LoginVM.java
.../main/java/com/phlx/anchorcollect_p/ui/login/LoginVM.java
+1
-1
SyncVM.java
...main/java/com/phlx/anchorcollect_p/ui/setting/SyncVM.java
+62
-27
fragment_basics_collect.xml
app/src/main/res/layout/fragment_basics_collect.xml
+18
-20
No files found.
app/build.gradle
View file @
472245d0
...
...
@@ -9,8 +9,8 @@ android {
applicationId
"com.phlx.anchorcollect_p"
minSdkVersion
21
targetSdkVersion
29
versionCode
1
4
versionName
"2.0.
8
"
versionCode
1
6
versionName
"2.0.
11
"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
...
...
@@ -45,6 +45,8 @@ android {
abortOnError
false
}
ndkVersion
'22.1.7171670'
}
greendao
{
...
...
app/src/main/java/com/phlx/anchorcollect_p/net/RetrofitClient.java
View file @
472245d0
...
...
@@ -49,7 +49,8 @@ public class RetrofitClient {
private
static
final
int
CACHE_TIMEOUT
=
10
*
1024
*
1024
;
//服务端根路径
public
static
String
baseUrl
=
"serve.xlglmnmyzspt.org.cn"
//正式
// "serve.xlglmnmyzspt.org.cn"//正式old
"serve.xlglzy.org.cn"
//正式
// "39.101.170.186"//阿里云测试
// "192.168.8.135"//董
// "192.168.43.154"//张敏
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/BasicsCollectFragment.java
View file @
472245d0
...
...
@@ -129,9 +129,9 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
if
(!
hidden
)
{
viewModel
.
addInventoryListener
();
initImagePicker
();
Configs
.
currentEvent
=
EventTag
.
EVENT_WEIGHT_DATA_BASICS
;
if
(!
Configs
.
currentEvent
.
equals
(
EventTag
.
EVENT_WEIGHT_DATA_BASICS
))
//防止拍照刷新页面
viewModel
.
initDataForUnid
(
Configs
.
tempUnid
);
Configs
.
currentEvent
=
EventTag
.
EVENT_WEIGHT_DATA_BASICS
;
}
else
{
viewModel
.
removeInventoryListener
();
// Configs.currentEvent = "";
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/vm/BasicsCollectVM.java
View file @
472245d0
...
...
@@ -153,6 +153,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
File
externalFileRootDir
=
getApplication
().
getExternalFilesDir
(
"/collect/picture/"
);
// externalFileRootDir.mkdirs();
// Environment.getExternalStorageDirectory().getAbsolutePath()
String
savePath
=
externalFileRootDir
.
getAbsolutePath
();
//不分开就少个斜杠
markeImgUrl
=
savePath
+
"/anchorCiq"
+
Configs
.
tempCattleResume
.
getUnid
()
+
".jpg"
;
markFile
=
new
File
(
markeImgUrl
);
...
...
@@ -413,7 +414,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
tag
.
set
(
Configs
.
tempTag
);
rfid
.
set
(
Configs
.
tempRfid
);
remarkParamEntity
.
setShowName
(
result
.
get
(
0
).
getRemark
());
Configs
.
tempCattleResume
.
setPhotoPath
(
markeImgUrl
);
//
Configs.tempCattleResume.setPhotoPath(markeImgUrl);
String
[]
filedName
=
EntityUtils
.
getFiledName
(
result
.
get
(
0
));
for
(
String
name
:
filedName
)
{
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/login/LoginVM.java
View file @
472245d0
...
...
@@ -221,7 +221,7 @@ public class LoginVM extends BaseViewModel<Repository> {
ToastUtils
.
showShort
(
"账号错误"
);
return
;
}
if
(!
model
.
get
UserName
().
equals
(
userName
.
get
()))
{
if
(!
model
.
get
Password
().
equals
(
password
.
get
()))
{
ToastUtils
.
showShort
(
"密码错误"
);
return
;
}
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/setting/SyncVM.java
View file @
472245d0
...
...
@@ -217,7 +217,8 @@ public class SyncVM extends BaseViewModel<Repository> {
if
(
response
.
getCode
()
==
0
)
{
//存下最后更新的时间
SPUtils
.
getInstance
().
put
(
Configs
.
SP_CATTLE_RESUME_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
SPUtils
.
getInstance
().
put
(
Configs
.
SP_CATTLE_RESUME_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
cattleresumeDate
.
set
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_CATTLE_RESUME_UPDATE_DATE
));
if
(
response
.
getData
()
!=
null
&&
response
.
getData
().
size
()
>
0
)
{
...
...
@@ -227,7 +228,8 @@ public class SyncVM extends BaseViewModel<Repository> {
// File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() +
// "/collect/picture/");
// String savePath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/collect/picture/";
// String savePath = Environment.getExternalStorageDirectory().getAbsolutePath() +
// "/collect/picture/";
// getExternalFilesDir() 用于获取SDCard/Android/data/你的应用的包名/files/ 目录
File
externalFileRootDir
=
getApplication
().
getExternalFilesDir
(
"/collect/picture/"
);
// externalFileRootDir.mkdirs();
...
...
@@ -348,13 +350,24 @@ public class SyncVM extends BaseViewModel<Repository> {
//保存图片
for
(
CattleResumeEntity
cre
:
cattleResumeEntities
)
{
Log
.
e
(
"uploadBaseArchives"
,
"cre.getPhotoPath()"
+
cre
.
getPhotoPath
());
Log
.
e
(
"uploadBaseArchives"
,
"cre.getPhotoPath()"
+
cre
.
getPhotoPath
());
if
(
cre
.
getPhotoPath
()
!=
null
&&
!
cre
.
getPhotoPath
().
equals
(
""
))
{
cre
.
setPhoto
(
BaseImageUtils
.
bitmapToString
(
cre
.
getPhotoPath
(),
getApplication
()));
try
{
cre
.
setPhoto
(
BaseImageUtils
.
bitmapToString
(
cre
.
getPhotoPath
(),
getApplication
()));
}
catch
(
Exception
e
)
{
try
{
cre
.
setPhoto
(
BaseImageUtils
.
bitmapToString
(
Environment
.
getExternalStorageDirectory
().
getAbsolutePath
()
+
"/collect/picture/"
+
"/anchorCiq"
+
cre
.
getUnid
()
+
".jpg"
,
getApplication
()));
}
catch
(
Exception
exception
){
}
}
}
}
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
cattleResumeEntities
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
cattleResumeEntities
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
uploadCattleList
(
body
)
...
...
@@ -438,7 +451,8 @@ public class SyncVM extends BaseViewModel<Repository> {
if
(
response
.
getCode
()
==
0
)
{
//存下最后更新的时间
SPUtils
.
getInstance
().
put
(
Configs
.
SP_PERFORMANCE_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
SPUtils
.
getInstance
().
put
(
Configs
.
SP_PERFORMANCE_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
performanceDate
.
set
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_PERFORMANCE_UPDATE_DATE
));
if
(
response
.
getData
()
!=
null
&&
response
.
getData
().
size
()
>
0
)
{
...
...
@@ -556,7 +570,8 @@ public class SyncVM extends BaseViewModel<Repository> {
*/
private
void
uploadSignMeasure
(
List
<
PerformanceEntity
>
performanceEntities
)
{
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
performanceEntities
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
performanceEntities
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
uploadPerformanceList
(
body
)
...
...
@@ -639,7 +654,8 @@ public class SyncVM extends BaseViewModel<Repository> {
if
(
response
.
getCode
()
==
0
)
{
//存下最后更新的时间
SPUtils
.
getInstance
().
put
(
Configs
.
SP_BREEDING_RECORD_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
SPUtils
.
getInstance
().
put
(
Configs
.
SP_BREEDING_RECORD_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
cattlematingMasterDate
.
set
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_BREEDING_RECORD_UPDATE_DATE
));
if
(
response
.
getData
()
!=
null
&&
response
.
getData
().
size
()
>
0
)
{
...
...
@@ -755,7 +771,8 @@ public class SyncVM extends BaseViewModel<Repository> {
*/
private
void
uploadBreedingRecord
(
List
<
BreedingRecordEntity
>
breedingRecordEntities
)
{
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
breedingRecordEntities
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
breedingRecordEntities
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
uploadBreedingRecordList
(
body
)
...
...
@@ -836,7 +853,8 @@ public class SyncVM extends BaseViewModel<Repository> {
if
(
response
.
getCode
()
==
0
)
{
//存下最后更新的时间
SPUtils
.
getInstance
().
put
(
Configs
.
SP_BREEDING_RECORD_DETAIL_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
SPUtils
.
getInstance
().
put
(
Configs
.
SP_BREEDING_RECORD_DETAIL_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
cattlematingDetaillDate
.
set
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_BREEDING_RECORD_DETAIL_UPDATE_DATE
));
if
(
response
.
getData
()
!=
null
&&
response
.
getData
().
size
()
>
0
)
{
...
...
@@ -952,7 +970,8 @@ public class SyncVM extends BaseViewModel<Repository> {
*/
private
void
uploadBreedingRecordDetail
(
List
<
BreedingRecordDetailEntity
>
breedingRecordDetailEntities
)
{
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
breedingRecordDetailEntities
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
breedingRecordDetailEntities
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
uploadBreedingRecordDetailList
(
body
)
...
...
@@ -1034,7 +1053,8 @@ public class SyncVM extends BaseViewModel<Repository> {
if
(
response
.
getCode
()
==
0
)
{
//存下最后更新的时间
SPUtils
.
getInstance
().
put
(
Configs
.
SP_WEIGHT_MAN_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
SPUtils
.
getInstance
().
put
(
Configs
.
SP_WEIGHT_MAN_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
weightManDate
.
set
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_WEIGHT_MAN_UPDATE_DATE
));
if
(
response
.
getData
()
!=
null
&&
response
.
getData
().
size
()
>
0
)
{
...
...
@@ -1150,7 +1170,8 @@ public class SyncVM extends BaseViewModel<Repository> {
*/
private
void
uploadWeightMan
(
List
<
WeightManEntity
>
weightManEntities
)
{
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
weightManEntities
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
weightManEntities
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
uploadWeightManList
(
body
)
...
...
@@ -1232,7 +1253,8 @@ public class SyncVM extends BaseViewModel<Repository> {
if
(
response
.
getCode
()
==
0
)
{
//存下最后更新的时间
SPUtils
.
getInstance
().
put
(
Configs
.
SP_MEDICAL_RECORD_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
SPUtils
.
getInstance
().
put
(
Configs
.
SP_MEDICAL_RECORD_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
medicalrecordsDate
.
set
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_MEDICAL_RECORD_UPDATE_DATE
));
if
(
response
.
getData
()
!=
null
&&
response
.
getData
().
size
()
>
0
)
{
...
...
@@ -1348,7 +1370,8 @@ public class SyncVM extends BaseViewModel<Repository> {
*/
private
void
uploadMedicalRecord
(
List
<
MedicalRecordEntity
>
medicalRecordEntities
)
{
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
medicalRecordEntities
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
medicalRecordEntities
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
uploadMedicalRecordList
(
body
)
...
...
@@ -1431,7 +1454,8 @@ public class SyncVM extends BaseViewModel<Repository> {
if
(
response
.
getCode
()
==
0
)
{
//存下最后更新的时间
SPUtils
.
getInstance
().
put
(
Configs
.
SP_IMMUNE_BATCH_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
SPUtils
.
getInstance
().
put
(
Configs
.
SP_IMMUNE_BATCH_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
immunebatchDate
.
set
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_IMMUNE_BATCH_UPDATE_DATE
));
if
(
response
.
getData
()
!=
null
&&
response
.
getData
().
size
()
>
0
)
{
...
...
@@ -1549,7 +1573,8 @@ public class SyncVM extends BaseViewModel<Repository> {
*/
private
void
uploadImmuneBatch
(
List
<
ImmuneBatchEntity
>
immuneBatchEntities
)
{
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
immuneBatchEntities
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
immuneBatchEntities
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
uploadImmuneBatchList
(
body
)
...
...
@@ -1632,7 +1657,8 @@ public class SyncVM extends BaseViewModel<Repository> {
if
(
response
.
getCode
()
==
0
)
{
//存下最后更新的时间
SPUtils
.
getInstance
().
put
(
Configs
.
SP_IMMUNE_BATCH_DETAIL_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
SPUtils
.
getInstance
().
put
(
Configs
.
SP_IMMUNE_BATCH_DETAIL_UPDATE_DATE
,
dateFormat
.
format
(
new
Date
()));
immunebatchDetailDate
.
set
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_IMMUNE_BATCH_DETAIL_UPDATE_DATE
));
if
(
response
.
getData
()
!=
null
&&
response
.
getData
().
size
()
>
0
)
{
...
...
@@ -1748,7 +1774,8 @@ public class SyncVM extends BaseViewModel<Repository> {
*/
private
void
uploadImmuneBatchDetail
(
List
<
ImmuneBatchDetailEntity
>
immuneBatchEntities
)
{
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
immuneBatchEntities
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
immuneBatchEntities
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
uploadImmuneBatchDetailList
(
body
)
...
...
@@ -2165,7 +2192,8 @@ public class SyncVM extends BaseViewModel<Repository> {
errorEntity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
errorEntity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
addSubscribe
(
model
.
uploadErrorData
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
...
...
@@ -2235,7 +2263,8 @@ public class SyncVM extends BaseViewModel<Repository> {
errorEntity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
errorEntity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
addSubscribe
(
model
.
uploadErrorData
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
...
...
@@ -2306,7 +2335,8 @@ public class SyncVM extends BaseViewModel<Repository> {
errorEntity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
errorEntity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
addSubscribe
(
model
.
uploadErrorData
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
...
...
@@ -2376,7 +2406,8 @@ public class SyncVM extends BaseViewModel<Repository> {
errorEntity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
errorEntity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
addSubscribe
(
model
.
uploadErrorData
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
...
...
@@ -2448,7 +2479,8 @@ public class SyncVM extends BaseViewModel<Repository> {
errorEntity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
errorEntity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
addSubscribe
(
model
.
uploadErrorData
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
...
...
@@ -2521,7 +2553,8 @@ public class SyncVM extends BaseViewModel<Repository> {
errorEntity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
errorEntity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
addSubscribe
(
model
.
uploadErrorData
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
...
...
@@ -2593,7 +2626,8 @@ public class SyncVM extends BaseViewModel<Repository> {
errorEntity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
errorEntity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
addSubscribe
(
model
.
uploadErrorData
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
...
...
@@ -2665,7 +2699,8 @@ public class SyncVM extends BaseViewModel<Repository> {
errorEntity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
errorEntity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
errorEntity
));
addSubscribe
(
model
.
uploadErrorData
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
...
...
app/src/main/res/layout/fragment_basics_collect.xml
View file @
472245d0
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/tools"
xmlns:binding=
"http://schemas.android.com/apk/res-auto"
app:ignore=
"NamespaceTypo"
>
xmlns:binding=
"http://schemas.android.com/apk/res-auto"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
...
...
@@ -35,6 +34,7 @@
<TextView
android:id=
"@+id/tv_rfid_text"
onClickCommand=
"@{viewModel.onWeightChangedClick}"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/dp_45"
android:layout_marginRight=
"@dimen/dp_10"
...
...
@@ -45,9 +45,7 @@
android:textColor=
"@color/black"
binding:layout_constraintLeft_toLeftOf=
"parent"
binding:layout_constraintRight_toLeftOf=
"@+id/iv_sync"
binding:layout_constraintTop_toTopOf=
"parent"
onClickCommand=
"@{viewModel.onWeightChangedClick}"
/>
binding:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/ll_tag"
...
...
@@ -69,7 +67,7 @@
android:text=
"可视耳标"
android:textColor=
"@color/colorPrimary"
android:textSize=
"@dimen/sp_16"
binding:onClickCommand=
"@{viewModel.onTagInputClick}"
/>
binding:onClickCommand=
"@{viewModel.onTagInputClick}"
/>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
...
...
@@ -81,19 +79,19 @@
android:textSize=
"@dimen/sp_18"
binding:onClickCommand=
"@{viewModel.onTagInputClick}"
/>
<!-- <androidx.appcompat.widget.AppCompatTextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="换绑标签"-->
<!-- android:layout_marginLeft="10dp"-->
<!-- android:layout_marginRight="10dp"-->
<!-- android:layout_marginTop="10dp"-->
<!-- android:paddingBottom="5dp"-->
<!-- android:paddingTop="5dp"-->
<!-- android:textColor="@color/white"-->
<!-- android:background="@drawable/bg_button_orange_gradient"-->
<!-- android:gravity="center"-->
<!-- binding:onClickCommand="@{viewModel.onLabelChangeClick}"/>-->
<!-- <androidx.appcompat.widget.AppCompatTextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="换绑标签"-->
<!-- android:layout_marginLeft="10dp"-->
<!-- android:layout_marginRight="10dp"-->
<!-- android:layout_marginTop="10dp"-->
<!-- android:paddingBottom="5dp"-->
<!-- android:paddingTop="5dp"-->
<!-- android:textColor="@color/white"-->
<!-- android:background="@drawable/bg_button_orange_gradient"-->
<!-- android:gravity="center"-->
<!-- binding:onClickCommand="@{viewModel.onLabelChangeClick}"/>-->
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
...
...
@@ -150,8 +148,8 @@
android:id=
"@+id/card_99"
android:layout_width=
"wrap_content"
android:layout_height=
"37dp"
android:layout_weight=
"1"
android:layout_marginLeft=
"5dp"
android:layout_weight=
"1"
android:background=
"@drawable/bg_radius_white_5"
android:onClick=
"@{() ->viewModel.click(99)}"
android:orientation=
"vertical"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment