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
f2a7bac2
Commit
f2a7bac2
authored
Jun 21, 2023
by
hywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.绑定耳标验证高频耳标是否已绑定
parent
aeea7b36
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
BindVM.java
...rc/main/java/com/phlx/anchorcollect_p/ui/bind/BindVM.java
+23
-2
No files found.
app/src/main/java/com/phlx/anchorcollect_p/ui/bind/BindVM.java
View file @
f2a7bac2
...
...
@@ -144,8 +144,29 @@ public class BindVM extends BackBarVM<Repository> implements OnInventoryListener
return
;
}
//判断是否已经绑定过高频耳标
QueryBuilder
<
CattleResumeEntity
>
builder0
=
DbUtil
.
getInstance
().
getQueryBuilder
(
CattleResumeEntity
.
class
)
.
where
(
CattleResumeEntityDao
.
Properties
.
RegistrationNo
.
eq
(
registrationNo
.
get
()));
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
CattleResumeEntity
>()
{
@Override
public
void
onSuccess
(
List
<
CattleResumeEntity
>
result
)
{
if
(
result
!=
null
&&
result
.
size
()
>
0
)
{
ToastUtils
.
showShort
(
"该耳标已被绑定,请重新扫描!"
);
return
;
}
else
{
bindRfid
();
}
}
@Override
public
void
onFailed
()
{
ToastUtils
.
showShort
(
"查询基础数据数量失败!"
);
dismissDialog
();
}
}).
queryAsyncAll
(
CattleResumeEntity
.
class
,
builder0
);
}
private
void
bindRfid
()
{
...
...
@@ -191,7 +212,7 @@ public class BindVM extends BackBarVM<Repository> implements OnInventoryListener
if
(
msg
.
what
==
0x333
)
{
InventoryData
inventoryData
=
(
InventoryData
)
msg
.
obj
;
if
(
inventoryData
.
getDataLength
()
>
0
&&
inventoryData
.
getEpcLength
()
>
0
)
{
String
epc
=
TextUtil
.
byteToHexString
(
inventoryData
.
getEPC_Data
(),
inventoryData
.
getEpcLength
());
String
epc
=
TextUtil
.
byteToHexString
(
inventoryData
.
getEPC_Data
(),
inventoryData
.
getEpcLength
())
.
substring
(
1
)
;
String
tid
=
TextUtil
.
byteToHexString
(
inventoryData
.
getData
(),
inventoryData
.
getDataLength
());
soundPool
.
play
(
musicId
.
get
(
1
),
1
,
1
,
0
,
0
,
1
);
App
.
getInstance
().
getLinkage
().
stopInventory
();
...
...
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