diff --git a/app/build.gradle b/app/build.gradle index 75b07df..60a2d0b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { applicationId "com.example.beijing_daxing" minSdk 24 targetSdk 33 - versionCode 2 - versionName "1.2" + versionCode 4 + versionName "1.4" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" ndk { diff --git a/app/src/main/java/com/example/beijing_daxing/CheckActivity.java b/app/src/main/java/com/example/beijing_daxing/CheckActivity.java index ef73bcf..85d0633 100644 --- a/app/src/main/java/com/example/beijing_daxing/CheckActivity.java +++ b/app/src/main/java/com/example/beijing_daxing/CheckActivity.java @@ -159,7 +159,7 @@ public class CheckActivity extends BaseActivity implements AdapterClickCall, InP // var type = list.stream().anyMatch(t -> t.getState().equals("未检")); // if (type) { // 数量必须相同 - if (list.size()>list1.size()) { + if (list.size()>list1.size()&&files.size()==0) { Toast.makeText(this, "未检完全部轮挡,不允许提交", Toast.LENGTH_SHORT).show(); return; } @@ -167,6 +167,7 @@ public class CheckActivity extends BaseActivity implements AdapterClickCall, InP .params("json", gson.toJson(list1)) .params("inspectionId", inspectionId) .params("user", SharedPreferencesUtils.getstring("user", "")) + .params("locationCode",code) .addFileParams("files", files).execute(new MyRecultCall(dialog, this) { @Override public void onSuccess(Response response) { diff --git a/app/src/main/java/com/example/beijing_daxing/CheckListActivity.java b/app/src/main/java/com/example/beijing_daxing/CheckListActivity.java index 1537302..86b0b22 100644 --- a/app/src/main/java/com/example/beijing_daxing/CheckListActivity.java +++ b/app/src/main/java/com/example/beijing_daxing/CheckListActivity.java @@ -66,44 +66,40 @@ public class CheckListActivity extends BaseActivity implements CheckListAdapter. } private void initRequest(String state) { - OkGo.post(url + "/inspection/selectTask") - .params("state", state) - .execute(new MyRecultCall(dialog, this) { - @SuppressLint("NotifyDataSetChanged") - @Override - public void onSuccess(Response response) { - super.onSuccess(response); - MyResult body = response.body(); - if (body.getCode() == 0) { - createState.set(false); - list = gson.fromJson(body.getData().toString(), new TypeToken>() { - }.getType()); - adapter.setList(list); - adapter.notifyDataSetChanged(); - } else { - createState.set(true); - } - - } - }); + OkGo.post(url + "/inspection/selectTask").params("state", state).execute(new MyRecultCall(dialog, this) { + @SuppressLint("NotifyDataSetChanged") + @Override + public void onSuccess(Response response) { + super.onSuccess(response); + MyResult body = response.body(); + if (body.getCode() == 0) { + createState.set(false); + list = gson.fromJson(body.getData().toString(), new TypeToken>() { + }.getType()); + adapter.setList(list); + adapter.notifyDataSetChanged(); + } else { + createState.set(true); + } + + } + }); } public void check_start(View view) { - OkGo.post(url + "/xj/createTask") - .params("user", SharedPreferencesUtils.getstring("user", "")) - .execute(new MyRecultCall(dialog, this) { - @Override - public void onSuccess(Response response) { - super.onSuccess(response); - var body = response.body(); - if (body.getCode() == 0) { - // initRequest(); - return; - } - Toast.makeText(CheckListActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show(); - } - }); + OkGo.post(url + "/xj/createTask").params("user", SharedPreferencesUtils.getstring("user", "")).execute(new MyRecultCall(dialog, this) { + @Override + public void onSuccess(Response response) { + super.onSuccess(response); + var body = response.body(); + if (body.getCode() == 0) { + // initRequest(); + return; + } + Toast.makeText(CheckListActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show(); + } + }); } @Override @@ -116,10 +112,12 @@ public class CheckListActivity extends BaseActivity implements CheckListAdapter. intent.putExtra("backIndex", index); startActivityForResult(intent, 1); } -private int skipIndex; + + private int skipIndex; + @Override public void clickItemSkip(int index) { - skipIndex=index; + skipIndex = index; inputDialog.show(); } @@ -140,22 +138,19 @@ private int skipIndex; @Override public void inPutDialogReculi(String name) { CheckTaskInfo checkTaskInfo = list.get(skipIndex); - OkGo.post(url + "/inspection/skipTask") - .params("remark", name) - .params("tableId", checkTaskInfo.getId()) - .execute(new MyRecultCall(dialog, this) { - @SuppressLint("NotifyDataSetChanged") - @Override - public void onSuccess(Response response) { - super.onSuccess(response); - MyResult body = response.body(); - if (body.getCode() == 0) { - checkTaskInfo.setTaskState("跳过"); - adapter.notifyDataSetChanged(); - } - - } - }); + OkGo.post(url + "/inspection/skipTask").params("remark", name).params("tableId", checkTaskInfo.getId()).execute(new MyRecultCall(dialog, this) { + @SuppressLint("NotifyDataSetChanged") + @Override + public void onSuccess(Response response) { + super.onSuccess(response); + MyResult body = response.body(); + if (body.getCode() == 0) { + checkTaskInfo.setTaskState("跳过"); + adapter.notifyDataSetChanged(); + } + + } + }); inputDialog.dismiss(); } } \ No newline at end of file diff --git a/app/src/main/java/com/example/beijing_daxing/base/BaseActivity.java b/app/src/main/java/com/example/beijing_daxing/base/BaseActivity.java index c970b9a..f0bb8fb 100644 --- a/app/src/main/java/com/example/beijing_daxing/base/BaseActivity.java +++ b/app/src/main/java/com/example/beijing_daxing/base/BaseActivity.java @@ -207,7 +207,7 @@ public class BaseActivity extends AppCompatActivity { Paint paint = new Paint(); paint.setColor(Color.RED); paint.setStrokeWidth(30); - paint.setTextSize(150); + paint.setTextSize(85); paint.setAntiAlias(true); // 获取当前日期 LocalDate today = LocalDate.now(ZoneId.systemDefault());