Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
A
AnchorCollect
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
Commits
bb5c5da0
Commit
bb5c5da0
authored
Oct 14, 2022
by
hywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.性能测定页面,写死,带上扫码时的重量
2.未扫到标签提示,弹出时自动关闭上一个 3.离线登录 基础信息排序错误修复 4.
parent
104a795b
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
52 additions
and
11 deletions
+52
-11
build.gradle
app/build.gradle
+2
-2
BasicsCollectFragment.java
...phlx/anchorcollect/ui/fragment/BasicsCollectFragment.java
+9
-1
PerformanceFragment.java
...m/phlx/anchorcollect/ui/fragment/PerformanceFragment.java
+1
-0
WeightManFragment.java
...com/phlx/anchorcollect/ui/fragment/WeightManFragment.java
+9
-2
PerformanceVM.java
.../com/phlx/anchorcollect/ui/fragment/vm/PerformanceVM.java
+24
-1
WeightManVM.java
...va/com/phlx/anchorcollect/ui/fragment/vm/WeightManVM.java
+3
-3
LoginVM.java
...rc/main/java/com/phlx/anchorcollect/ui/login/LoginVM.java
+1
-1
fragment_basics_collect.xml
app/src/main/res/layout/fragment_basics_collect.xml
+1
-1
remark.txt
remark.txt
+2
-0
No files found.
app/build.gradle
View file @
bb5c5da0
...
...
@@ -9,8 +9,8 @@ android {
applicationId
"com.phlx.anchorcollect"
minSdkVersion
21
targetSdkVersion
29
versionCode
4
versionName
"1.0.
3
"
versionCode
6
versionName
"1.0.
5
"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
...
...
app/src/main/java/com/phlx/anchorcollect/ui/fragment/BasicsCollectFragment.java
View file @
bb5c5da0
...
...
@@ -65,6 +65,8 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
private
ImagePicker
mImagePicker
;
private
MaterialDialog
showEpcDialog
;
private
static
class
SingletonClassInstance
{
private
static
final
BasicsCollectFragment
instance
=
new
BasicsCollectFragment
();
}
...
...
@@ -260,7 +262,13 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
@Override
public
void
onChanged
(
List
<
String
>
stringList
)
{
new
MaterialDialog
.
Builder
(
getActivity
())
if
(
showEpcDialog
!=
null
)
{
if
(
showEpcDialog
.
isShowing
())
{
//弹窗前先给上一次的取消了
showEpcDialog
.
dismiss
();
}
showEpcDialog
=
null
;
}
showEpcDialog
=
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
"请选择耳标"
)
// .positiveText("确认")
// .negativeText("取消")
...
...
app/src/main/java/com/phlx/anchorcollect/ui/fragment/PerformanceFragment.java
View file @
bb5c5da0
...
...
@@ -373,6 +373,7 @@ public class PerformanceFragment extends BaseFragment<FragmentPerformanceBinding
viewModel
.
isModify
=
true
;
viewModel
.
queryPerformance
();
}
else
{
viewModel
.
refreshWeight
();
//把扫标签时的重量带过去
//清除一下数据
viewModel
.
isModify
=
false
;
binding
.
rvCollect
.
getAdapter
().
notifyDataSetChanged
();
...
...
app/src/main/java/com/phlx/anchorcollect/ui/fragment/WeightManFragment.java
View file @
bb5c5da0
...
...
@@ -66,6 +66,8 @@ public class WeightManFragment extends BaseFragment<FragmentWeightmanBinding, We
private
ImagePicker
mImagePicker
;
private
MaterialDialog
showEpcDialog
;
private
static
class
SingletonClassInstance
{
private
static
final
WeightManFragment
instance
=
new
WeightManFragment
();
}
...
...
@@ -261,7 +263,6 @@ public class WeightManFragment extends BaseFragment<FragmentWeightmanBinding, We
viewModel
.
onShowDialogEvent
.
observe
(
getActivity
(),
new
Observer
<
String
>()
{
@Override
public
void
onChanged
(
String
s
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统提示"
).
content
(
s
).
positiveText
(
"确定"
).
onAny
(
new
MaterialDialog
.
SingleButtonCallback
()
{
@Override
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
...
...
@@ -277,7 +278,13 @@ public class WeightManFragment extends BaseFragment<FragmentWeightmanBinding, We
@Override
public
void
onChanged
(
List
<
String
>
stringList
)
{
new
MaterialDialog
.
Builder
(
getActivity
())
if
(
showEpcDialog
!=
null
)
{
if
(
showEpcDialog
.
isShowing
())
{
//弹窗前先给上一次的取消了
showEpcDialog
.
dismiss
();
}
showEpcDialog
=
null
;
}
showEpcDialog
=
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
"请选择耳标"
)
// .positiveText("确认")
// .negativeText("取消")
...
...
app/src/main/java/com/phlx/anchorcollect/ui/fragment/vm/PerformanceVM.java
View file @
bb5c5da0
...
...
@@ -96,6 +96,13 @@ public class PerformanceVM extends BaseViewModel<Repository> {
imgFile
=
new
File
(
imgUrl
);
for
(
GenTableColumn
gtc
:
Configs
.
performance
)
{
//强制赋值为扫标签时的重量
if
(
gtc
.
getJavaField
().
equals
(
"weight"
))
{
gtc
.
setShowName
(
Configs
.
tempWeight
+
""
);
gtc
.
setContent
(
Configs
.
tempWeight
+
""
);
}
CollectGridItem
cgi
=
new
CollectGridItem
(
this
,
gtc
,
Configs
.
SIGN_MEASURE
);
observableList
.
add
(
cgi
);
}
...
...
@@ -112,6 +119,18 @@ public class PerformanceVM extends BaseViewModel<Repository> {
}
public
void
refreshWeight
(){
for
(
GenTableColumn
gtc
:
Configs
.
performance
)
{
//强制赋值为扫标签时的重量
if
(
gtc
.
getJavaField
().
equals
(
"weight"
))
{
gtc
.
setShowName
(
Configs
.
tempWeight
+
""
);
gtc
.
setContent
(
Configs
.
tempWeight
+
""
);
}
}
}
private
void
initData
(
PerformanceEntity
performanceEntity
)
{
remarkParamEntity
.
setShowName
(
performanceEntity
.
getRemark
());
...
...
@@ -146,6 +165,11 @@ public class PerformanceVM extends BaseViewModel<Repository> {
e
.
printStackTrace
();
}
}
//强制赋值为扫标签时的重量
if
(
gtc
.
getJavaField
().
equals
(
"weight"
))
{
gtc
.
setShowName
(
Configs
.
tempWeight
+
""
);
gtc
.
setContent
(
Configs
.
tempWeight
+
""
);
}
}
onNotifyAllEvent
.
setValue
(
false
);
...
...
@@ -272,7 +296,6 @@ public class PerformanceVM extends BaseViewModel<Repository> {
Configs
.
resumeId
=
null
;
}
performanceEntity
.
setRemark
(
remarkParamEntity
.
getContent
());
performanceEntity
.
setWeight
(
Configs
.
tempWeight
);
performanceEntity
.
setUploadStatus
(
"0"
);
uploadData
=
new
ArrayList
<>();
...
...
app/src/main/java/com/phlx/anchorcollect/ui/fragment/vm/WeightManVM.java
View file @
bb5c5da0
...
...
@@ -99,7 +99,7 @@ public class WeightManVM extends BaseViewModel<Repository> implements OnInventor
public
ObservableField
<
String
>
tag
=
new
ObservableField
<>(
""
);
public
ObservableField
<
String
>
rfid
=
new
ObservableField
<>(
""
);
public
ObservableField
<
Double
>
weight
=
new
ObservableField
<>(
50.2
);
public
ObservableField
<
Double
>
weight
=
new
ObservableField
<>(
0.0
);
public
ObservableField
<
Double
>
lastGainWeight
=
new
ObservableField
<>(
0.0
);
//上次增重
public
ObservableField
<
Double
>
adgGainWeight
=
new
ObservableField
<>(
0.0
);
//日增重
...
...
@@ -523,10 +523,10 @@ public class WeightManVM extends BaseViewModel<Repository> implements OnInventor
}
if
(
name
.
equals
(
gtc
.
getJavaField
()))
{
try
{
Log
.
e
(
"key:"
,
name
);
//
Log.e("key:", name);
Object
fieldValueByName
=
EntityUtils
.
getFieldValueByName
(
name
,
result
.
get
(
0
));
String
value
=
fieldValueByName
==
null
?
""
:
fieldValueByName
.
toString
();
Log
.
e
(
"value:"
,
value
);
//
Log.e("value:", value);
gtc
.
setContent
(
value
);
String
showName
=
value
;
// 如果是选择的,查字典项
...
...
app/src/main/java/com/phlx/anchorcollect/ui/login/LoginVM.java
View file @
bb5c5da0
...
...
@@ -248,7 +248,7 @@ public class LoginVM extends BaseViewModel<Repository> {
DbUtil
.
getInstance
().
getQueryBuilder
(
GenTableColumn
.
class
)
.
where
(
GenTableColumnDao
.
Properties
.
TableId
.
eq
(
gt
.
getTableId
())
,
GenTableColumnDao
.
Properties
.
IsQuery
.
eq
(
"1"
))
.
order
De
sc
(
GenTableColumnDao
.
Properties
.
Sort
);
.
order
A
sc
(
GenTableColumnDao
.
Properties
.
Sort
);
Configs
.
cattleresume
=
DbUtil
.
getInstance
().
queryAll
(
GenTableColumn
.
class
,
builderDetaile0
);
break
;
case
"zxgl_performance"
:
...
...
app/src/main/res/layout/fragment_basics_collect.xml
View file @
bb5c5da0
...
...
@@ -67,7 +67,7 @@
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"可视耳标
号
"
android:text=
"可视耳标"
android:textColor=
"@color/colorPrimary"
android:textSize=
"@dimen/sp_10"
/>
...
...
remark.txt
0 → 100644
View file @
bb5c5da0
1.称重页面:时间强制默认当天
2.性能测定:写死重量从扫码页面带过来
\ No newline at end of file
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