diff --git a/app/release/app-release.apk b/app/release/app-release.apk
new file mode 100644
index 0000000..327bc0b
Binary files /dev/null and b/app/release/app-release.apk differ
diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json
new file mode 100644
index 0000000..5d63416
--- /dev/null
+++ b/app/release/output-metadata.json
@@ -0,0 +1,18 @@
+{
+ "version": 2,
+ "artifactType": {
+ "type": "APK",
+ "kind": "Directory"
+ },
+ "applicationId": "com.example.pulit",
+ "variantName": "release",
+ "elements": [
+ {
+ "type": "SINGLE",
+ "filters": [],
+ "versionCode": 1,
+ "versionName": "1.0",
+ "outputFile": "app-release.apk"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 93981a9..072f98c 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -15,7 +15,8 @@
android:supportsRtl="true"
android:theme="@style/Theme.PuLiT"
android:usesCleartextTraffic="true">
-
+
+
diff --git a/app/src/main/java/com/example/pulit/MainActivity.java b/app/src/main/java/com/example/pulit/MainActivity.java
index 2479eb9..18831b9 100644
--- a/app/src/main/java/com/example/pulit/MainActivity.java
+++ b/app/src/main/java/com/example/pulit/MainActivity.java
@@ -32,7 +32,7 @@ public class MainActivity extends AppCompatActivity {
}
- @OnClick({R.id.home_xl_b, R.id.home_xl_t, R.id.home_rj_c, R.id.home_rj_t, R.id.home_setting, R.id.home_back})
+ @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_back})
public void onClick(View view) {
Intent intent = null;
switch (view.getId()) {
@@ -42,6 +42,9 @@ public class MainActivity extends AppCompatActivity {
case R.id.home_xl_t:
intent = new Intent(this, X1Activity.class);
break;
+ case R.id.home_xl_z:
+ intent = new Intent(this, X3Activity.class);
+ break;
case R.id.home_rj_c:
intent = new Intent(this, SolventActivity.class);
intent.putExtra("type", true);
diff --git a/app/src/main/java/com/example/pulit/MyApplication.java b/app/src/main/java/com/example/pulit/MyApplication.java
index 478c5df..db13522 100644
--- a/app/src/main/java/com/example/pulit/MyApplication.java
+++ b/app/src/main/java/com/example/pulit/MyApplication.java
@@ -65,7 +65,7 @@ public class MyApplication extends Application {
OkGo.getInstance().init(this).setOkHttpClient(builder.build()) //建议设置OkHttpClient,不设置将使用默认的
.setCacheMode(CacheMode.NO_CACHE) //全局统一缓存模式,默认不使用缓存,可以不传
.setCacheTime(CacheEntity.CACHE_NEVER_EXPIRE) //全局统一缓存时间,默认永不过期,可以不传
- .setRetryCount(3);
+ .setRetryCount(1);
}
diff --git a/app/src/main/java/com/example/pulit/SolventActivity.java b/app/src/main/java/com/example/pulit/SolventActivity.java
index 9d6c427..c8e811b 100644
--- a/app/src/main/java/com/example/pulit/SolventActivity.java
+++ b/app/src/main/java/com/example/pulit/SolventActivity.java
@@ -54,7 +54,7 @@ public class SolventActivity extends BaseActivity {
sanType = true;
type = getIntent().getBooleanExtra("type", true);
if (type) {
- solventTitle.setText("物料称重");
+ solventTitle.setText("液体称量");
solventFristName.setText("扫描拉缸条码");
} else {
solventTitle.setText("溶剂投料");
diff --git a/app/src/main/java/com/example/pulit/X3Activity.java b/app/src/main/java/com/example/pulit/X3Activity.java
new file mode 100644
index 0000000..ad4136f
--- /dev/null
+++ b/app/src/main/java/com/example/pulit/X3Activity.java
@@ -0,0 +1,72 @@
+package com.example.pulit;
+
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.example.pulit.util.MyOkGoCallback;
+import com.example.pulit.util.Resust;
+import com.example.pulit.util.SharedPreferencesUtils;
+import com.lzy.okgo.OkGo;
+import com.lzy.okgo.model.Response;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
+
+public class X3Activity extends BaseActivity {
+
+ @BindView(R.id.x3_code)
+ TextView x3Code;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_x3);
+ ButterKnife.bind(this);
+ }
+
+ @Override
+ public void scanInfo(String info) {
+ x3Code.setText(info);
+ Log.e("TAG", "scanInfo:" + info);
+ dialog.show();
+ OkGo.get("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/xl_material/BindBarrel")
+ .params("code",info)
+ .execute(new MyOkGoCallback() {
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ dialog.dismiss();
+ Resust body = response.body();
+ boolean b= body.isSuccess();
+ tipDialog.showMsg(b,body.getMsg());
+ }
+
+ @Override
+ public void onError(Response response) {
+ super.onError(response);
+ dialog.dismiss();
+ Toast.makeText(X3Activity.this, "网络请求失败", Toast.LENGTH_SHORT).show();
+ }
+ });
+ }
+
+ @OnClick({R.id.info_title_back, R.id.x3_scan})
+ public void onClick(View view) {
+ switch (view.getId()) {
+ case R.id.info_title_back:
+ finish();
+ break;
+ case R.id.x3_scan:
+ break;
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/pulit/dialog/TipDialog.java b/app/src/main/java/com/example/pulit/dialog/TipDialog.java
index 42447c6..e8de706 100644
--- a/app/src/main/java/com/example/pulit/dialog/TipDialog.java
+++ b/app/src/main/java/com/example/pulit/dialog/TipDialog.java
@@ -54,7 +54,7 @@ public class TipDialog extends Dialog {
}
- private void showMsg(boolean state, String msg) {
+ public void showMsg(boolean state, String msg) {
super.show();
tip1State.setImageResource(state ? R.mipmap.dialog_yes : R.mipmap.dialog_jingg);
tip1Info.setText(msg);
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 9d619e4..e392cc6 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -22,8 +22,8 @@
android:layout_width="match_parent"
android:layout_height="140dp"
- android:layout_marginTop="162dp"
android:layout_marginStart="30dp"
+ android:layout_marginTop="162dp"
android:layout_marginEnd="30dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
@@ -34,13 +34,19 @@
android:id="@+id/home_xl_b"
style="@style/TabRadioButton"
android:drawableTop="@mipmap/home_xl"
- android:text="料仓补料" />
+ android:text="小料补料" />
+ android:text="反应釜投料" />
+
+
@@ -59,7 +65,7 @@
android:id="@+id/home_rj_c"
style="@style/TabRadioButton"
android:drawableTop="@mipmap/home_rj"
- android:text="物料称重" />
+ android:text="液体称量" />
+ android:text="反应釜投料" />
+ android:text="反应釜投料完毕" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_x2.xml b/app/src/main/res/layout/activity_x2.xml
index 8a65717..be85791 100644
--- a/app/src/main/res/layout/activity_x2.xml
+++ b/app/src/main/res/layout/activity_x2.xml
@@ -17,7 +17,7 @@
style="@style/title_style"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:text="料仓补料" />
+ android:text="小料补料" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/dialog_layout.xml b/app/src/main/res/layout/dialog_layout.xml
index 6a5b9a2..e616ed9 100644
--- a/app/src/main/res/layout/dialog_layout.xml
+++ b/app/src/main/res/layout/dialog_layout.xml
@@ -1,7 +1,7 @@
@@ -19,6 +19,8 @@
android:text="是否使用"
android:layout_marginTop="5dp"
android:textSize="22sp"
+ android:paddingStart="10dp"
+ android:paddingEnd="10dp"
android:textColor="@color/black"
android:gravity="center"/>