diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..091e45a --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +PuLiT \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 1117d69..62205b0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,7 +10,7 @@ android { applicationId "com.example.pulit" minSdkVersion 26 targetSdkVersion 30 - versionCode 13 + versionCode 14 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/release/14.apk b/app/release/14.apk new file mode 100644 index 0000000..99828b8 Binary files /dev/null and b/app/release/14.apk differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index e208b83..ee870e3 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -10,7 +10,7 @@ { "type": "SINGLE", "filters": [], - "versionCode": 13, + "versionCode": 14, "versionName": "1.0", "outputFile": "app-release.apk" } diff --git a/app/src/main/java/com/example/pulit/MainActivity.java b/app/src/main/java/com/example/pulit/MainActivity.java index 76802a0..84ea4b0 100644 --- a/app/src/main/java/com/example/pulit/MainActivity.java +++ b/app/src/main/java/com/example/pulit/MainActivity.java @@ -33,7 +33,7 @@ public class MainActivity extends AppCompatActivity { @OnClick({R.id.home_xl_b, R.id.home_xl_t, R.id.home_xl_z, R.id.home_rj_c, R.id.home_rj_t, - R.id.home_setting,R.id.home_lt, R.id.home_back, R.id.home_plan}) + R.id.home_setting, R.id.home_lt, R.id.home_back, R.id.home_plan}) public void onClick(View view) { Intent intent = null; switch (view.getId()) { @@ -63,7 +63,7 @@ public class MainActivity extends AppCompatActivity { intent = new Intent(this, LtActivity.class); break; - case R.id.home_back: + case R.id.home_back: finish(); break; } diff --git a/app/src/main/java/com/example/pulit/ZBActivity.java b/app/src/main/java/com/example/pulit/ZBActivity.java index eeae72f..8c3d741 100644 --- a/app/src/main/java/com/example/pulit/ZBActivity.java +++ b/app/src/main/java/com/example/pulit/ZBActivity.java @@ -16,6 +16,9 @@ import com.lzy.okgo.OkGo; import com.lzy.okgo.callback.StringCallback; import com.lzy.okgo.model.Response; +import java.util.ArrayList; +import java.util.List; + import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; @@ -35,6 +38,7 @@ public class ZBActivity extends BaseActivity { private boolean exist; private String dbCode = null; private String findGoodesCode = null; + List stringList; @Override protected void onCreate(Bundle savedInstanceState) { @@ -42,6 +46,7 @@ public class ZBActivity extends BaseActivity { setContentView(R.layout.activity_zb); ButterKnife.bind(this); sanType = 0; + stringList=new ArrayList<>(); } @@ -117,6 +122,7 @@ public class ZBActivity extends BaseActivity { planView.setWeighbridge(dbaname); planView.setCylinderBarCode("00000000"); planView.setRate("0"); + planView.setBarCodeList(stringList); RequestBody requestBody = RequestBody.create(MediaType.parse("application/json;"), JSONObject.toJSONString(planView)); OkGo.post("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/Solvent/ExecPlcState") @@ -132,6 +138,7 @@ public class ZBActivity extends BaseActivity { zbGoodsCode.setText(null); planView = null; zbGoodsName.setText(null); + stringList.clear(); } } @@ -164,6 +171,8 @@ public class ZBActivity extends BaseActivity { tipDialog.showMsg(false, "物料不匹配"); return; } + stringList.add(zbGoodsCode.getText().toString().trim()); + //品名 int index = scanInfo.indexOf("-", scanInfo.indexOf("-", scanInfo.indexOf("-") + 1) + 1) + 1; int endIndex = scanInfo.indexOf("|"); diff --git a/app/src/main/res/mipmap-xhdpi/home_lt.png b/app/src/main/res/mipmap-xhdpi/home_lt.png new file mode 100644 index 0000000..6a7c342 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/home_lt.png differ diff --git a/app/src/main/res/mipmap-xhdpi/home_plan.png b/app/src/main/res/mipmap-xhdpi/home_plan.png new file mode 100644 index 0000000..ec95ef2 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/home_plan.png differ diff --git a/app/src/main/res/mipmap-xhdpi/home_zb.png b/app/src/main/res/mipmap-xhdpi/home_zb.png new file mode 100644 index 0000000..a24d419 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/home_zb.png differ diff --git a/app/src/main/res/mipmap-xhdpi/xl.png b/app/src/main/res/mipmap-xhdpi/xl.png new file mode 100644 index 0000000..8f11637 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/xl.png differ