修改 流水号验证计划、物料、流水组合集合

master
wangh 7 months ago
parent 67062b8c10
commit 6903f00bc0

Binary file not shown.

@ -10,7 +10,7 @@
{ {
"type": "SINGLE", "type": "SINGLE",
"filters": [], "filters": [],
"versionCode": 14, "versionCode": 15,
"versionName": "1.0", "versionName": "1.0",
"outputFile": "app-release.apk" "outputFile": "app-release.apk"
} }

@ -66,7 +66,7 @@ public class X1Activity extends BaseActivity {
private ListPopupWindow lpw; private ListPopupWindow lpw;
private List<String> planList; private List<String> planList;
private String planId; private String planId;
private String zbCode = null;//整包流水号 private List<String> serialList;//整包流水号
// 提交字段 // 提交字段
private X1Submit entrySubmit; private X1Submit entrySubmit;
@ -77,6 +77,7 @@ public class X1Activity extends BaseActivity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_x1); setContentView(R.layout.activity_x1);
ButterKnife.bind(this); ButterKnife.bind(this);
serialList = new ArrayList<>();//初始化流水号
entrySubmit = new X1Submit(); entrySubmit = new X1Submit();
scanStates = true; scanStates = true;
x1RecyclerView.setLayoutManager(new LinearLayoutManager(this)); x1RecyclerView.setLayoutManager(new LinearLayoutManager(this));
@ -111,16 +112,16 @@ public class X1Activity extends BaseActivity {
double goodsWeight = Double.parseDouble(stringFormatWeight); double goodsWeight = Double.parseDouble(stringFormatWeight);
String name1 = info.substring(info.indexOf("-") + 1, info.indexOf("|"));//20230805-0001-CF-130 String name1 = info.substring(info.indexOf("-") + 1, info.indexOf("|"));//20230805-0001-CF-130
String name2 = name1.substring(name1.indexOf("-") + 1, name1.length()); 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("-")); String lxh = name2.substring(0, name2.indexOf("-"));
Log.e("TAG", "流水号:" + lxh); String plancode = x1PlanCode.getText().toString();
Log.e("TAG", "物料名称:" + name3); String zh = plancode + goodsCode + lxh;//流水号组合
if (zbCode == null) { Log.e("TAG", "流水号组合:" + zh);
checkItem(goodsCode, goodsWeight, "整包", "", name3, lxh); if (serialList.contains(zh)) {
} else { tipDialog.showMsg(false, "相同流水号物料已确认");
Toast.makeText(this, "物料已确认", Toast.LENGTH_SHORT).show(); return;
} }
checkItem(goodsCode, goodsWeight, "整包", "", name3, zh);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
Toast.makeText(this, "整包条码错误", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "整包条码错误", Toast.LENGTH_SHORT).show();
@ -252,6 +253,7 @@ public class X1Activity extends BaseActivity {
x1Tong.setText(null); x1Tong.setText(null);
x1GoodsCode.setText(null); x1GoodsCode.setText(null);
x1GoodsWeight.setText(null); x1GoodsWeight.setText(null);
} else { } else {
Toast.makeText(X1Activity.this, "请求失败,计划条码不正确", Toast.LENGTH_SHORT).show(); Toast.makeText(X1Activity.this, "请求失败,计划条码不正确", Toast.LENGTH_SHORT).show();
} }
@ -356,7 +358,7 @@ public class X1Activity extends BaseActivity {
selectItem.setState(true); selectItem.setState(true);
adapter.notifyDataSetChanged(); adapter.notifyDataSetChanged();
if (matType.equals("整包")) { if (matType.equals("整包")) {
this.zbCode = zbCode; serialList.add(zbCode);
} }
} else { } else {
tipDialog.showState(false); tipDialog.showState(false);

Loading…
Cancel
Save