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
70e21d7c
Commit
70e21d7c
authored
Jun 21, 2023
by
hywang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
f2a7bac2
ef19c7db
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
86 additions
and
8 deletions
+86
-8
BasicsCollectFragment.java
...lx/anchorcollect_p/ui/fragment/BasicsCollectFragment.java
+65
-1
BreedingRecordFragment.java
...x/anchorcollect_p/ui/fragment/BreedingRecordFragment.java
+2
-1
ImmunRecordFragment.java
...phlx/anchorcollect_p/ui/fragment/ImmunRecordFragment.java
+2
-1
MedicalRecordFragment.java
...lx/anchorcollect_p/ui/fragment/MedicalRecordFragment.java
+2
-1
PerformanceFragment.java
...phlx/anchorcollect_p/ui/fragment/PerformanceFragment.java
+2
-1
WeightManFragment.java
...m/phlx/anchorcollect_p/ui/fragment/WeightManFragment.java
+2
-1
BasicsCollectVM.java
.../phlx/anchorcollect_p/ui/fragment/vm/BasicsCollectVM.java
+11
-2
No files found.
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/BasicsCollectFragment.java
View file @
70e21d7c
...
@@ -45,6 +45,7 @@ import com.phlx.anchorcollect_p.entity.GenTableColumn;
...
@@ -45,6 +45,7 @@ import com.phlx.anchorcollect_p.entity.GenTableColumn;
import
com.phlx.anchorcollect_p.event.EventTag
;
import
com.phlx.anchorcollect_p.event.EventTag
;
import
com.phlx.anchorcollect_p.ui.fragment.vm.BasicsCollectVM
;
import
com.phlx.anchorcollect_p.ui.fragment.vm.BasicsCollectVM
;
import
com.phlx.anchorcollect_p.ui.info.CattleActivity
;
import
com.phlx.anchorcollect_p.ui.info.CattleActivity
;
import
com.phlx.anchorcollect_p.ui.main.MainActivity
;
import
com.phlx.anchorcollect_p.util.BaseImageUtils
;
import
com.phlx.anchorcollect_p.util.BaseImageUtils
;
import
com.phlx.anchorcollect_p.util.DictUtils
;
import
com.phlx.anchorcollect_p.util.DictUtils
;
import
com.phlx.anchorcollect_p.util.ImagePicker
;
import
com.phlx.anchorcollect_p.util.ImagePicker
;
...
@@ -58,6 +59,7 @@ import java.util.List;
...
@@ -58,6 +59,7 @@ import java.util.List;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.functions.Consumer
;
import
me.goldze.mvvmhabit.base.BaseFragment
;
import
me.goldze.mvvmhabit.base.BaseFragment
;
import
me.goldze.mvvmhabit.utils.StringUtils
;
import
me.goldze.mvvmhabit.utils.ToastUtils
;
import
me.goldze.mvvmhabit.utils.ToastUtils
;
...
@@ -67,6 +69,8 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -67,6 +69,8 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
private
ImagePicker
mImagePicker
;
private
ImagePicker
mImagePicker
;
public
MaterialDialog
scanRfidDialog
;
private
static
class
SingletonClassInstance
{
private
static
class
SingletonClassInstance
{
private
static
final
BasicsCollectFragment
instance
=
new
BasicsCollectFragment
();
private
static
final
BasicsCollectFragment
instance
=
new
BasicsCollectFragment
();
}
}
...
@@ -165,6 +169,15 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -165,6 +169,15 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
@Override
@Override
public
void
initViewObservable
()
{
public
void
initViewObservable
()
{
super
.
initViewObservable
();
super
.
initViewObservable
();
viewModel
.
setRfidValueEvent
.
observe
(
this
,
new
Observer
<
String
>()
{
@Override
public
void
onChanged
(
String
s
)
{
scanRfidDialog
.
setContent
(
s
);
}
});
viewModel
.
onCardClickEvent
.
observe
(
getActivity
(),
new
Observer
<
Boolean
>()
{
viewModel
.
onCardClickEvent
.
observe
(
getActivity
(),
new
Observer
<
Boolean
>()
{
@Override
@Override
public
void
onChanged
(
Boolean
aBoolean
)
{
public
void
onChanged
(
Boolean
aBoolean
)
{
...
@@ -187,6 +200,9 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -187,6 +200,9 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
case
"photo"
:
case
"photo"
:
showPhotoDialog
(
viewModel
.
currentParamEntity
);
showPhotoDialog
(
viewModel
.
currentParamEntity
);
break
;
break
;
case
"inventory"
:
showInventoryDialog
(
viewModel
.
currentParamEntity
);
break
;
}
}
}
}
...
@@ -309,7 +325,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -309,7 +325,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
.
cancelable
(
false
).
canceledOnTouchOutside
(
false
)
//
.cancelable(false).canceledOnTouchOutside(false)
.
positiveText
(
"确定"
)
.
positiveText
(
"确定"
)
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
...
@@ -354,6 +370,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -354,6 +370,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
new
MaterialDialog
.
Builder
(
getActivity
())
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
uiParamEntity
.
getColumnComment
())
.
title
(
uiParamEntity
.
getColumnComment
())
// .iconRes(R.drawable.ic_logo)
// .iconRes(R.drawable.ic_logo)
.
canceledOnTouchOutside
(
false
)
.
content
(
"请输入"
)
.
content
(
"请输入"
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .widgetColor(Color.BLUE)//输入框光标的颜色
.
inputType
(
inputType
)
//可以输入的类型
.
inputType
(
inputType
)
//可以输入的类型
...
@@ -404,6 +421,53 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -404,6 +421,53 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
});
});
}
}
//盘点
private
void
showInventoryDialog
(
GenTableColumn
uiParamEntity
)
{
scanRfidDialog
=
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
"牲畜耳标"
)
// .iconRes(R.drawable.ic_logo)
.
content
(
""
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .inputType(inputType)//可以输入的类型
// .inputRangeRes(0, columnSize, android.R.color.black)
//前2个一个是hint一个是预输入的文字
// .input("低频耳标", "", new MaterialDialog.InputCallback() {
// @Override
// public void onInput(@NonNull MaterialDialog dialog, CharSequence input) {
// Log.i("scan", "输入的是:" + input);
// }
// })
.
negativeText
(
"取消"
)
.
neutralText
(
"扫描"
)
.
positiveText
(
"确定"
)
.
autoDismiss
(
false
)
.
onPositive
(
new
MaterialDialog
.
SingleButtonCallback
()
{
@Override
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
viewModel
.
currentParamEntity
.
setShowName
(
dialog
.
getContentView
().
getText
().
toString
());
viewModel
.
currentParamEntity
.
setContent
(
dialog
.
getContentView
().
getText
().
toString
());
viewModel
.
currentParamEntity
.
notifyChange
();
dialog
.
dismiss
();
}
})
.
onNeutral
(
new
MaterialDialog
.
SingleButtonCallback
()
{
@Override
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
viewModel
.
scanFunction
=
1
;
viewModel
.
scanRfid
();
}
})
.
onNegative
(
new
MaterialDialog
.
SingleButtonCallback
()
{
@Override
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
dialog
.
dismiss
();
}
})
.
show
();
}
//时间选择
//时间选择
private
void
showSelectDateDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showSelectDateDialog
(
GenTableColumn
uiParamEntity
)
{
pvTime
.
show
(
binding
.
card99
);
pvTime
.
show
(
binding
.
card99
);
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/BreedingRecordFragment.java
View file @
70e21d7c
...
@@ -204,7 +204,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
...
@@ -204,7 +204,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
.
cancelable
(
false
).
canceledOnTouchOutside
(
false
)
//
.cancelable(false).canceledOnTouchOutside(false)
.
positiveText
(
"确定"
)
.
positiveText
(
"确定"
)
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
...
@@ -269,6 +269,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
...
@@ -269,6 +269,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
new
MaterialDialog
.
Builder
(
getActivity
())
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
uiParamEntity
.
getColumnComment
())
.
title
(
uiParamEntity
.
getColumnComment
())
// .iconRes(R.drawable.ic_logo)
// .iconRes(R.drawable.ic_logo)
.
canceledOnTouchOutside
(
false
)
.
content
(
"请输入"
)
.
content
(
"请输入"
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .widgetColor(Color.BLUE)//输入框光标的颜色
.
inputType
(
inputType
)
//可以输入的类型
.
inputType
(
inputType
)
//可以输入的类型
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/ImmunRecordFragment.java
View file @
70e21d7c
...
@@ -187,7 +187,7 @@ public class ImmunRecordFragment extends BaseFragment<FragmentImmunRecordBinding
...
@@ -187,7 +187,7 @@ public class ImmunRecordFragment extends BaseFragment<FragmentImmunRecordBinding
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
.
cancelable
(
false
).
canceledOnTouchOutside
(
false
)
//
.cancelable(false).canceledOnTouchOutside(false)
.
positiveText
(
"确定"
)
.
positiveText
(
"确定"
)
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
...
@@ -252,6 +252,7 @@ public class ImmunRecordFragment extends BaseFragment<FragmentImmunRecordBinding
...
@@ -252,6 +252,7 @@ public class ImmunRecordFragment extends BaseFragment<FragmentImmunRecordBinding
new
MaterialDialog
.
Builder
(
getActivity
())
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
uiParamEntity
.
getColumnComment
())
.
title
(
uiParamEntity
.
getColumnComment
())
// .iconRes(R.drawable.ic_logo)
// .iconRes(R.drawable.ic_logo)
.
canceledOnTouchOutside
(
false
)
.
content
(
"请输入"
)
.
content
(
"请输入"
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .widgetColor(Color.BLUE)//输入框光标的颜色
.
inputType
(
inputType
)
//可以输入的类型
.
inputType
(
inputType
)
//可以输入的类型
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/MedicalRecordFragment.java
View file @
70e21d7c
...
@@ -186,7 +186,7 @@ public class MedicalRecordFragment extends BaseFragment<FragmentMedicalRecordBin
...
@@ -186,7 +186,7 @@ public class MedicalRecordFragment extends BaseFragment<FragmentMedicalRecordBin
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
.
cancelable
(
false
).
canceledOnTouchOutside
(
false
)
//
.cancelable(false).canceledOnTouchOutside(false)
.
positiveText
(
"确定"
)
.
positiveText
(
"确定"
)
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
...
@@ -251,6 +251,7 @@ public class MedicalRecordFragment extends BaseFragment<FragmentMedicalRecordBin
...
@@ -251,6 +251,7 @@ public class MedicalRecordFragment extends BaseFragment<FragmentMedicalRecordBin
new
MaterialDialog
.
Builder
(
getActivity
())
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
uiParamEntity
.
getColumnComment
())
.
title
(
uiParamEntity
.
getColumnComment
())
// .iconRes(R.drawable.ic_logo)
// .iconRes(R.drawable.ic_logo)
.
canceledOnTouchOutside
(
false
)
.
content
(
"请输入"
)
.
content
(
"请输入"
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .widgetColor(Color.BLUE)//输入框光标的颜色
.
inputType
(
inputType
)
//可以输入的类型
.
inputType
(
inputType
)
//可以输入的类型
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/PerformanceFragment.java
View file @
70e21d7c
...
@@ -187,7 +187,7 @@ public class PerformanceFragment extends BaseFragment<FragmentPerformanceBinding
...
@@ -187,7 +187,7 @@ public class PerformanceFragment extends BaseFragment<FragmentPerformanceBinding
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
.
cancelable
(
false
).
canceledOnTouchOutside
(
false
)
//
.cancelable(false).canceledOnTouchOutside(false)
.
positiveText
(
"确定"
)
.
positiveText
(
"确定"
)
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
...
@@ -252,6 +252,7 @@ public class PerformanceFragment extends BaseFragment<FragmentPerformanceBinding
...
@@ -252,6 +252,7 @@ public class PerformanceFragment extends BaseFragment<FragmentPerformanceBinding
new
MaterialDialog
.
Builder
(
getActivity
())
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
uiParamEntity
.
getColumnComment
())
.
title
(
uiParamEntity
.
getColumnComment
())
// .iconRes(R.drawable.ic_logo)
// .iconRes(R.drawable.ic_logo)
.
canceledOnTouchOutside
(
false
)
.
content
(
"请输入"
)
.
content
(
"请输入"
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .widgetColor(Color.BLUE)//输入框光标的颜色
.
inputType
(
inputType
)
//可以输入的类型
.
inputType
(
inputType
)
//可以输入的类型
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/WeightManFragment.java
View file @
70e21d7c
...
@@ -300,7 +300,7 @@ public class WeightManFragment extends BaseFragment<FragmentWeightmanBinding, We
...
@@ -300,7 +300,7 @@ public class WeightManFragment extends BaseFragment<FragmentWeightmanBinding, We
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
.
cancelable
(
false
).
canceledOnTouchOutside
(
false
)
//
.cancelable(false).canceledOnTouchOutside(false)
.
positiveText
(
"确定"
)
.
positiveText
(
"确定"
)
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
...
@@ -366,6 +366,7 @@ public class WeightManFragment extends BaseFragment<FragmentWeightmanBinding, We
...
@@ -366,6 +366,7 @@ public class WeightManFragment extends BaseFragment<FragmentWeightmanBinding, We
new
MaterialDialog
.
Builder
(
getActivity
())
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
uiParamEntity
.
getColumnComment
())
.
title
(
uiParamEntity
.
getColumnComment
())
// .iconRes(R.drawable.ic_logo)
// .iconRes(R.drawable.ic_logo)
.
canceledOnTouchOutside
(
false
)
.
content
(
"请输入"
)
.
content
(
"请输入"
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .widgetColor(Color.BLUE)//输入框光标的颜色
.
inputType
(
inputType
)
//可以输入的类型
.
inputType
(
inputType
)
//可以输入的类型
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/vm/BasicsCollectVM.java
View file @
70e21d7c
...
@@ -91,6 +91,8 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
...
@@ -91,6 +91,8 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
public
SingleLiveEvent
<
Boolean
>
onTagClickEvent
=
new
SingleLiveEvent
<>();
public
SingleLiveEvent
<
Boolean
>
onTagClickEvent
=
new
SingleLiveEvent
<>();
public
SingleLiveEvent
<
Boolean
>
onNotifyAllEvent
=
new
SingleLiveEvent
<>();
//true是清空页面
public
SingleLiveEvent
<
Boolean
>
onNotifyAllEvent
=
new
SingleLiveEvent
<>();
//true是清空页面
public
SingleLiveEvent
<
String
>
setRfidValueEvent
=
new
SingleLiveEvent
<>();
//设置弹窗的扫到的标签epc
public
SingleLiveEvent
<
String
>
onShowDialogEvent
=
new
SingleLiveEvent
<>();
//弹窗提示
public
SingleLiveEvent
<
String
>
onShowDialogEvent
=
new
SingleLiveEvent
<>();
//弹窗提示
public
ObservableField
<
String
>
tag
=
new
ObservableField
<>(
""
);
public
ObservableField
<
String
>
tag
=
new
ObservableField
<>(
""
);
...
@@ -119,6 +121,8 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
...
@@ -119,6 +121,8 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
private
List
<
CattleResumeEntity
>
uploadData
;
private
List
<
CattleResumeEntity
>
uploadData
;
public
int
scanFunction
=
0
;
//0 是普通扫描耳标,1 是弹出窗的扫描耳标
public
BasicsCollectVM
(
@NonNull
Application
application
,
Repository
model
)
{
public
BasicsCollectVM
(
@NonNull
Application
application
,
Repository
model
)
{
super
(
application
,
model
);
super
(
application
,
model
);
...
@@ -223,7 +227,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
...
@@ -223,7 +227,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
}
}
//扫描rfid
//扫描rfid
p
rivate
void
scanRfid
()
{
p
ublic
void
scanRfid
()
{
if
(!
isScan
)
{
if
(!
isScan
)
{
rfidTag
=
""
;
rfidTag
=
""
;
...
@@ -325,6 +329,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
...
@@ -325,6 +329,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
public
BindingCommand
onWeightChangedClick
=
new
BindingCommand
(
new
BindingAction
()
{
public
BindingCommand
onWeightChangedClick
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
@Override
public
void
call
()
{
public
void
call
()
{
scanFunction
=
0
;
scanRfid
();
scanRfid
();
}
}
});
});
...
@@ -530,7 +535,11 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
...
@@ -530,7 +535,11 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
private
void
checkEpc
(
String
epc
,
String
tid
)
{
private
void
checkEpc
(
String
epc
,
String
tid
)
{
ToastUtils
.
showShort
(
"盘点到标签:"
+
epc
+
"|停止盘点"
);
ToastUtils
.
showShort
(
"盘点到标签:"
+
epc
+
"|停止盘点"
);
rfidTag
=
epc
+
tid
;
rfidTag
=
epc
+
tid
;
initDataForRfid
(
epc
);
if
(
scanFunction
==
0
)
{
initDataForRfid
(
epc
);
}
else
if
(
scanFunction
==
1
)
{
setRfidValueEvent
.
setValue
(
epc
);
}
}
}
@Override
@Override
...
...
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