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
Expand all
Show 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 {
...
@@ -9,8 +9,8 @@ android {
applicationId
"com.phlx.anchorcollect_p"
applicationId
"com.phlx.anchorcollect_p"
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
29
targetSdkVersion
29
versionCode
1
4
versionCode
1
6
versionName
"2.0.
8
"
versionName
"2.0.
11
"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
...
@@ -45,6 +45,8 @@ android {
...
@@ -45,6 +45,8 @@ android {
abortOnError
false
abortOnError
false
}
}
ndkVersion
'22.1.7171670'
}
}
greendao
{
greendao
{
...
...
app/src/main/java/com/phlx/anchorcollect_p/net/RetrofitClient.java
View file @
472245d0
...
@@ -49,7 +49,8 @@ public class RetrofitClient {
...
@@ -49,7 +49,8 @@ public class RetrofitClient {
private
static
final
int
CACHE_TIMEOUT
=
10
*
1024
*
1024
;
private
static
final
int
CACHE_TIMEOUT
=
10
*
1024
*
1024
;
//服务端根路径
//服务端根路径
public
static
String
baseUrl
=
public
static
String
baseUrl
=
"serve.xlglmnmyzspt.org.cn"
//正式
// "serve.xlglmnmyzspt.org.cn"//正式old
"serve.xlglzy.org.cn"
//正式
// "39.101.170.186"//阿里云测试
// "39.101.170.186"//阿里云测试
// "192.168.8.135"//董
// "192.168.8.135"//董
// "192.168.43.154"//张敏
// "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
...
@@ -129,9 +129,9 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
if
(!
hidden
)
{
if
(!
hidden
)
{
viewModel
.
addInventoryListener
();
viewModel
.
addInventoryListener
();
initImagePicker
();
initImagePicker
();
Configs
.
currentEvent
=
EventTag
.
EVENT_WEIGHT_DATA_BASICS
;
if
(!
Configs
.
currentEvent
.
equals
(
EventTag
.
EVENT_WEIGHT_DATA_BASICS
))
//防止拍照刷新页面
if
(!
Configs
.
currentEvent
.
equals
(
EventTag
.
EVENT_WEIGHT_DATA_BASICS
))
//防止拍照刷新页面
viewModel
.
initDataForUnid
(
Configs
.
tempUnid
);
viewModel
.
initDataForUnid
(
Configs
.
tempUnid
);
Configs
.
currentEvent
=
EventTag
.
EVENT_WEIGHT_DATA_BASICS
;
}
else
{
}
else
{
viewModel
.
removeInventoryListener
();
viewModel
.
removeInventoryListener
();
// Configs.currentEvent = "";
// 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
...
@@ -153,6 +153,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
File
externalFileRootDir
=
getApplication
().
getExternalFilesDir
(
"/collect/picture/"
);
File
externalFileRootDir
=
getApplication
().
getExternalFilesDir
(
"/collect/picture/"
);
// externalFileRootDir.mkdirs();
// externalFileRootDir.mkdirs();
// Environment.getExternalStorageDirectory().getAbsolutePath()
String
savePath
=
externalFileRootDir
.
getAbsolutePath
();
//不分开就少个斜杠
String
savePath
=
externalFileRootDir
.
getAbsolutePath
();
//不分开就少个斜杠
markeImgUrl
=
savePath
+
"/anchorCiq"
+
Configs
.
tempCattleResume
.
getUnid
()
+
".jpg"
;
markeImgUrl
=
savePath
+
"/anchorCiq"
+
Configs
.
tempCattleResume
.
getUnid
()
+
".jpg"
;
markFile
=
new
File
(
markeImgUrl
);
markFile
=
new
File
(
markeImgUrl
);
...
@@ -413,7 +414,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
...
@@ -413,7 +414,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
tag
.
set
(
Configs
.
tempTag
);
tag
.
set
(
Configs
.
tempTag
);
rfid
.
set
(
Configs
.
tempRfid
);
rfid
.
set
(
Configs
.
tempRfid
);
remarkParamEntity
.
setShowName
(
result
.
get
(
0
).
getRemark
());
remarkParamEntity
.
setShowName
(
result
.
get
(
0
).
getRemark
());
Configs
.
tempCattleResume
.
setPhotoPath
(
markeImgUrl
);
//
Configs.tempCattleResume.setPhotoPath(markeImgUrl);
String
[]
filedName
=
EntityUtils
.
getFiledName
(
result
.
get
(
0
));
String
[]
filedName
=
EntityUtils
.
getFiledName
(
result
.
get
(
0
));
for
(
String
name
:
filedName
)
{
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> {
...
@@ -221,7 +221,7 @@ public class LoginVM extends BaseViewModel<Repository> {
ToastUtils
.
showShort
(
"账号错误"
);
ToastUtils
.
showShort
(
"账号错误"
);
return
;
return
;
}
}
if
(!
model
.
get
UserName
().
equals
(
userName
.
get
()))
{
if
(!
model
.
get
Password
().
equals
(
password
.
get
()))
{
ToastUtils
.
showShort
(
"密码错误"
);
ToastUtils
.
showShort
(
"密码错误"
);
return
;
return
;
}
}
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/setting/SyncVM.java
View file @
472245d0
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/fragment_basics_collect.xml
View file @
472245d0
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/tools"
xmlns:app=
"http://schemas.android.com/tools"
xmlns:binding=
"http://schemas.android.com/apk/res-auto"
xmlns:binding=
"http://schemas.android.com/apk/res-auto"
>
app:ignore=
"NamespaceTypo"
>
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -35,6 +34,7 @@
...
@@ -35,6 +34,7 @@
<TextView
<TextView
android:id=
"@+id/tv_rfid_text"
android:id=
"@+id/tv_rfid_text"
onClickCommand=
"@{viewModel.onWeightChangedClick}"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/dp_45"
android:layout_height=
"@dimen/dp_45"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginRight=
"@dimen/dp_10"
...
@@ -45,9 +45,7 @@
...
@@ -45,9 +45,7 @@
android:textColor=
"@color/black"
android:textColor=
"@color/black"
binding:layout_constraintLeft_toLeftOf=
"parent"
binding:layout_constraintLeft_toLeftOf=
"parent"
binding:layout_constraintRight_toLeftOf=
"@+id/iv_sync"
binding:layout_constraintRight_toLeftOf=
"@+id/iv_sync"
binding:layout_constraintTop_toTopOf=
"parent"
binding:layout_constraintTop_toTopOf=
"parent"
/>
onClickCommand=
"@{viewModel.onWeightChangedClick}"
/>
<androidx.appcompat.widget.LinearLayoutCompat
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/ll_tag"
android:id=
"@+id/ll_tag"
...
@@ -69,7 +67,7 @@
...
@@ -69,7 +67,7 @@
android:text=
"可视耳标"
android:text=
"可视耳标"
android:textColor=
"@color/colorPrimary"
android:textColor=
"@color/colorPrimary"
android:textSize=
"@dimen/sp_16"
android:textSize=
"@dimen/sp_16"
binding:onClickCommand=
"@{viewModel.onTagInputClick}"
/>
binding:onClickCommand=
"@{viewModel.onTagInputClick}"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -81,19 +79,19 @@
...
@@ -81,19 +79,19 @@
android:textSize=
"@dimen/sp_18"
android:textSize=
"@dimen/sp_18"
binding:onClickCommand=
"@{viewModel.onTagInputClick}"
/>
binding:onClickCommand=
"@{viewModel.onTagInputClick}"
/>
<!-- <androidx.appcompat.widget.AppCompatTextView-->
<!-- <androidx.appcompat.widget.AppCompatTextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="换绑标签"-->
<!-- android:text="换绑标签"-->
<!-- android:layout_marginLeft="10dp"-->
<!-- android:layout_marginLeft="10dp"-->
<!-- android:layout_marginRight="10dp"-->
<!-- android:layout_marginRight="10dp"-->
<!-- android:layout_marginTop="10dp"-->
<!-- android:layout_marginTop="10dp"-->
<!-- android:paddingBottom="5dp"-->
<!-- android:paddingBottom="5dp"-->
<!-- android:paddingTop="5dp"-->
<!-- android:paddingTop="5dp"-->
<!-- android:textColor="@color/white"-->
<!-- android:textColor="@color/white"-->
<!-- android:background="@drawable/bg_button_orange_gradient"-->
<!-- android:background="@drawable/bg_button_orange_gradient"-->
<!-- android:gravity="center"-->
<!-- android:gravity="center"-->
<!-- binding:onClickCommand="@{viewModel.onLabelChangeClick}"/>-->
<!-- binding:onClickCommand="@{viewModel.onLabelChangeClick}"/>-->
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
<androidx.appcompat.widget.LinearLayoutCompat
...
@@ -150,8 +148,8 @@
...
@@ -150,8 +148,8 @@
android:id=
"@+id/card_99"
android:id=
"@+id/card_99"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"37dp"
android:layout_height=
"37dp"
android:layout_weight=
"1"
android:layout_marginLeft=
"5dp"
android:layout_marginLeft=
"5dp"
android:layout_weight=
"1"
android:background=
"@drawable/bg_radius_white_5"
android:background=
"@drawable/bg_radius_white_5"
android:onClick=
"@{() ->viewModel.click(99)}"
android:onClick=
"@{() ->viewModel.click(99)}"
android:orientation=
"vertical"
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