diff --git a/app/release/14.apk b/app/release/14.apk deleted file mode 100644 index 99828b8..0000000 Binary files a/app/release/14.apk and /dev/null differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index ee870e3..e1d1253 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -10,7 +10,7 @@ { "type": "SINGLE", "filters": [], - "versionCode": 14, + "versionCode": 15, "versionName": "1.0", "outputFile": "app-release.apk" } diff --git a/app/src/main/java/com/example/pulit/X1Activity.java b/app/src/main/java/com/example/pulit/X1Activity.java index a7e33fd..9a7b2ff 100644 --- a/app/src/main/java/com/example/pulit/X1Activity.java +++ b/app/src/main/java/com/example/pulit/X1Activity.java @@ -66,7 +66,7 @@ public class X1Activity extends BaseActivity { private ListPopupWindow lpw; private List planList; private String planId; - private String zbCode = null;//整包流水号 + private List serialList;//整包流水号 // 提交字段 private X1Submit entrySubmit; @@ -77,6 +77,7 @@ public class X1Activity extends BaseActivity { super.onCreate(savedInstanceState); setContentView(R.layout.activity_x1); ButterKnife.bind(this); + serialList = new ArrayList<>();//初始化流水号 entrySubmit = new X1Submit(); scanStates = true; x1RecyclerView.setLayoutManager(new LinearLayoutManager(this)); @@ -111,16 +112,16 @@ public class X1Activity extends BaseActivity { double goodsWeight = Double.parseDouble(stringFormatWeight); String name1 = info.substring(info.indexOf("-") + 1, info.indexOf("|"));//20230805-0001-CF-130 String name2 = name1.substring(name1.indexOf("-") + 1, name1.length()); - String name3 = name2.substring(name2.indexOf("-") + 1, name2.length()); + String name3 = name2.substring(name2.indexOf("-") + 1, name2.length());//物料名称 String lxh = name2.substring(0, name2.indexOf("-")); - Log.e("TAG", "流水号:" + lxh); - Log.e("TAG", "物料名称:" + name3); - if (zbCode == null) { - checkItem(goodsCode, goodsWeight, "整包", "", name3, lxh); - } else { - Toast.makeText(this, "物料已确认", Toast.LENGTH_SHORT).show(); + String plancode = x1PlanCode.getText().toString(); + String zh = plancode + goodsCode + lxh;//流水号组合 + Log.e("TAG", "流水号组合:" + zh); + if (serialList.contains(zh)) { + tipDialog.showMsg(false, "相同流水号物料已确认"); + return; } - + checkItem(goodsCode, goodsWeight, "整包", "", name3, zh); } catch (Exception e) { e.printStackTrace(); Toast.makeText(this, "整包条码错误", Toast.LENGTH_SHORT).show(); @@ -252,6 +253,7 @@ public class X1Activity extends BaseActivity { x1Tong.setText(null); x1GoodsCode.setText(null); x1GoodsWeight.setText(null); + } else { Toast.makeText(X1Activity.this, "请求失败,计划条码不正确", Toast.LENGTH_SHORT).show(); } @@ -356,7 +358,7 @@ public class X1Activity extends BaseActivity { selectItem.setState(true); adapter.notifyDataSetChanged(); if (matType.equals("整包")) { - this.zbCode = zbCode; + serialList.add(zbCode); } } else { tipDialog.showState(false);