|
|
|
@ -49,6 +49,7 @@ public class StoreCheckActivity extends BaseActivity {
|
|
|
|
|
checkAdapter = new StoreCheckAdapter(this);
|
|
|
|
|
binding.setAdapter(checkAdapter);
|
|
|
|
|
initRequest();
|
|
|
|
|
setPower(33);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<String> tagList;
|
|
|
|
@ -56,12 +57,14 @@ public class StoreCheckActivity extends BaseActivity {
|
|
|
|
|
@Override
|
|
|
|
|
protected void sanRfid(List<Reader.TAGINFO> epcs) {
|
|
|
|
|
if (tagList == null) return;
|
|
|
|
|
Log.e("TAG", "sanRfid:");
|
|
|
|
|
epcs.forEach(t -> {
|
|
|
|
|
var epc = Tools.Bytes2HexString(t.EpcId, t.EpcId.length);
|
|
|
|
|
if (tagList.contains(epc)) {
|
|
|
|
|
tagList.add(epc);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
tagList.add(epc);
|
|
|
|
|
Log.e("TAG", "sanRfid:" + epc);
|
|
|
|
|
var stock = new Stock();
|
|
|
|
|
stock.setEpcCode(epc);
|
|
|
|
|
var index = list.indexOf(stock);
|
|
|
|
@ -96,7 +99,7 @@ public class StoreCheckActivity extends BaseActivity {
|
|
|
|
|
if (b) {
|
|
|
|
|
handler.removeCallbacks(runnable);
|
|
|
|
|
} else {
|
|
|
|
|
handler.postDelayed(runnable, 0);
|
|
|
|
|
handler.postDelayed(runnable, 100);
|
|
|
|
|
}
|
|
|
|
|
checkState.set(!b);
|
|
|
|
|
}
|
|
|
|
@ -133,10 +136,10 @@ public class StoreCheckActivity extends BaseActivity {
|
|
|
|
|
private Runnable runnable = new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
Log.e("TAG", "发送广播,读取RFID");
|
|
|
|
|
// Log.e("TAG", "发送广播,读取RFID");
|
|
|
|
|
// sendBroadcast(broadcastIntent);
|
|
|
|
|
sanEpc();
|
|
|
|
|
handler.postDelayed(runnable, 1000);
|
|
|
|
|
handler.postDelayed(runnable, 0);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|