diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index cacf36a..90c3175 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -35,6 +35,13 @@
+
+
+
();
@@ -86,6 +92,7 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall {
map.put("设备保养", MaintainActivity.class);
map.put("设备润滑", LubricationActivity.class);
map.put("质检任务列表", CheckSelectActivity.class);
+ map.put("不合格品评审任务", CheckSelect2Activity.class);
}
@@ -132,17 +139,17 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall {
var cls = map.get(menuName);
if (cls == null) return;
var intent = new Intent(this, cls);
- intent.putExtra("title",menuName);
- if (menuName.equals("机台投料")){
- intent.putExtra("from","1");
- }else if (menuName.equals("工装验证")){
- intent.putExtra("from","2");
- }else if (menuName.equals("载具绑定")){
- intent.putExtra("from","4");
- }else if (menuName.equals("硫化换模")){
- intent.putExtra("from","5");
- }else if (menuName.equals("半成品退库")){
- intent.putExtra("from","2");
+ intent.putExtra("title", menuName);
+ if (menuName.equals("机台投料")) {
+ intent.putExtra("from", "1");
+ } else if (menuName.equals("工装验证")) {
+ intent.putExtra("from", "2");
+ } else if (menuName.equals("载具绑定")) {
+ intent.putExtra("from", "4");
+ } else if (menuName.equals("硫化换模")) {
+ intent.putExtra("from", "5");
+ } else if (menuName.equals("半成品退库")) {
+ intent.putExtra("from", "2");
}
startActivity(intent);
diff --git a/app/src/main/java/com/example/haiwei_mom/MainActivity.java b/app/src/main/java/com/example/haiwei_mom/MainActivity.java
index 60d6035..ffca99d 100644
--- a/app/src/main/java/com/example/haiwei_mom/MainActivity.java
+++ b/app/src/main/java/com/example/haiwei_mom/MainActivity.java
@@ -14,6 +14,7 @@ import com.example.haiwei_mom.base.BaseActivity;
import com.example.haiwei_mom.base.MyApplication;
import com.example.haiwei_mom.base.MyRecultCall;
import com.example.haiwei_mom.base.MyResult;
+import com.example.haiwei_mom.check.CheckSelect2Activity;
import com.example.haiwei_mom.data.LoginTenantVo;
import com.example.haiwei_mom.data.LoginVm;
import com.example.haiwei_mom.databinding.ActivityMainBinding;
diff --git a/app/src/main/java/com/example/haiwei_mom/adapter/check/CheckSelect2Adapter.java b/app/src/main/java/com/example/haiwei_mom/adapter/check/CheckSelect2Adapter.java
new file mode 100644
index 0000000..d1e2963
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/adapter/check/CheckSelect2Adapter.java
@@ -0,0 +1,70 @@
+package com.example.haiwei_mom.adapter.check;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.ViewGroup;
+
+import androidx.annotation.NonNull;
+import androidx.databinding.DataBindingUtil;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.example.haiwei_mom.BR;
+import com.example.haiwei_mom.R;
+import com.example.haiwei_mom.adapter.ItemClickCall;
+import com.example.haiwei_mom.data.check.QcInspectionMain;
+import com.example.haiwei_mom.data.check.QcUnqualifiedTask;
+import com.example.haiwei_mom.databinding.ItemCheckSelect2Binding;
+import com.example.haiwei_mom.databinding.ItemCheckSelectBinding;
+
+import java.util.List;
+
+/**
+ * @author wanghao
+ * @date 2024/1/31 15:18
+ */
+public class CheckSelect2Adapter extends RecyclerView.Adapter {
+ private List list;
+ private Context context;
+ private LayoutInflater inflater;
+ private ItemClickCall clickCall;
+ public CheckSelect2Adapter(Context context, ItemClickCall clickCall) {
+ this.context = context;
+ this.clickCall = clickCall;
+ inflater = LayoutInflater.from(context);
+ }
+
+ public void setList(List list) {
+ this.list = list;
+ }
+
+ @NonNull
+ @Override
+ public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ ItemCheckSelect2Binding binding = DataBindingUtil.inflate(inflater, R.layout.item_check_select2, parent, false);
+ return new MyViewHolder(binding);
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
+ QcUnqualifiedTask outstock = list.get(position);
+ var binding = holder.binding;
+ binding.setVariable(BR.vm,outstock);
+ binding.checkSelectClick.setOnClickListener(v -> clickCall.onClick(position));
+ }
+
+ @Override
+ public int getItemCount() {
+ return list==null?0:list.size();
+ }
+
+ static class MyViewHolder extends RecyclerView.ViewHolder {
+ private ItemCheckSelect2Binding binding;
+
+ public MyViewHolder(ItemCheckSelect2Binding binding) {
+ super(binding.getRoot());
+ this.binding = binding;
+ }
+
+
+ }
+}
diff --git a/app/src/main/java/com/example/haiwei_mom/check/Check2Activity.java b/app/src/main/java/com/example/haiwei_mom/check/Check2Activity.java
new file mode 100644
index 0000000..b0347e1
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/check/Check2Activity.java
@@ -0,0 +1,166 @@
+package com.example.haiwei_mom.check;
+
+import android.annotation.SuppressLint;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.widget.Toast;
+
+import androidx.databinding.DataBindingUtil;
+
+import com.example.haiwei_mom.R;
+import com.example.haiwei_mom.adapter.check.CheckWorkAdapter;
+import com.example.haiwei_mom.adapter.check.DisposalFileAdapter;
+import com.example.haiwei_mom.base.BaseActivity;
+import com.example.haiwei_mom.base.MyRecultCall;
+import com.example.haiwei_mom.base.MyResult;
+import com.example.haiwei_mom.data.check.CheckInstanceFiles;
+import com.example.haiwei_mom.data.check.QcInspectionMain;
+import com.example.haiwei_mom.data.check.QcInspectionResult;
+import com.example.haiwei_mom.data.check.QcUnqualifiedTask;
+import com.example.haiwei_mom.databinding.ActivityCheck2Binding;
+import com.example.haiwei_mom.databinding.ActivityCheckBinding;
+import com.example.haiwei_mom.dialog.ImgDialog;
+import com.google.gson.reflect.TypeToken;
+import com.lzy.okgo.OkGo;
+import com.lzy.okgo.model.Response;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+public class Check2Activity extends BaseActivity implements DisposalFileAdapter.ItemClickCall {
+ private CheckWorkAdapter adapter;
+ private ActivityCheck2Binding binding;
+ private QcUnqualifiedTask checkResult;
+ private DisposalFileAdapter adapter1;
+ private List filesList;
+ private List files;
+ private ImgDialog imgDialog;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ binding = DataBindingUtil.setContentView(this, R.layout.activity_check2);
+ adapter = new CheckWorkAdapter(this);
+ adapter.setEnabledState(true);
+ binding.setAdapter(adapter);
+ var intent = getIntent();
+ checkResult= (QcUnqualifiedTask) intent.getSerializableExtra("checkResult");
+ binding.setVm(checkResult);
+ searchRequest(checkResult.getReviewId());
+
+ adapter1 = new DisposalFileAdapter(this, this);
+ filesList = new ArrayList<>();
+ files = new ArrayList<>();
+ adapter1.setList(filesList);
+ binding.setAdapter1(adapter1);
+ imgDialog = new ImgDialog(this);
+
+ // var id = intent.getStringExtra("id");
+ // if (id != null) {
+ // var visble = intent.getBooleanExtra("visble", true);
+ // binding.checkSearchLinear.setVisibility(View.GONE);
+ // Log.e("TAG", "传值:" + visble);
+ // searchRequest(null, id, visble);
+ // }
+ }
+
+
+ public void checkSearch(View view) {
+ // var serchText = binding.checkSearchText.getText().toString();
+ // searchRequest(serchText, null, true);
+ }
+
+ private void searchRequest( String id) {
+ OkGo.get(url + "/qms/qcMobile/getUnqualifiedRecordList")
+ .params("reviewId", id)
+ .execute(new MyRecultCall(dialog, this) {
+ @SuppressLint("NotifyDataSetChanged")
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+ if (body.getCode() == 200) {
+ List list=gson.fromJson(body.getDataJson(),new TypeToken>(){}.getType());
+
+ // checkResult.setResults(list);
+ // checkResult = gson.fromJson(body.getData().toString(), CheckResult.class);
+ // checkResult.setVisbleStatus(status);
+ // binding.setVm(checkResult);
+ // List qmsCheckResultDetailProjectList;
+ //
+ // qmsCheckResultDetailProjectList = checkResult.getQmsCheckResultDetailProjectList();
+ // if (qmsCheckResultDetailProjectList == null || qmsCheckResultDetailProjectList.isEmpty()) {
+ // qmsCheckResultDetailProjectList = new ArrayList<>();
+ // var qmsCheckRuleProjectList = checkResult.getQmsCheckRuleProjectList();
+ // qmsCheckResultDetailProjectList.addAll(qmsCheckRuleProjectList);
+ // checkResult.setQmsCheckResultDetailProjectList(qmsCheckResultDetailProjectList);
+ // }
+ // adapter.setEnabledState(status);
+ adapter.setList(list);
+ adapter.notifyDataSetChanged();
+ return;
+ }
+ // binding.setVm(null);
+ // adapter.setList(null);
+ // adapter.notifyDataSetChanged();
+ myToastUitls.show( body.getMsg());
+
+
+ }
+ });
+ }
+ public void tackphoto(View view) {
+ try {
+ teke_photo();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+
+ }
+ @SuppressLint("NotifyDataSetChanged")
+ @Override
+ public void tekePhotoResult(String fileUrl, File file) {
+ super.tekePhotoResult(fileUrl, file);
+ CheckInstanceFiles checkInstanceFiles = new CheckInstanceFiles();
+ checkInstanceFiles.setFaultFile(fileUrl);
+ checkInstanceFiles.setState(true);
+ filesList.add(checkInstanceFiles);
+ adapter1.notifyDataSetChanged();
+ files.add(file);
+ }
+ @Override
+ public void onClick(int position, boolean type) {
+ if (type) {
+ imgDialog.setRawReturn(filesList.get(position).getFaultFile());
+ return;
+ }
+ filesList.remove(position);
+ files.remove(position);
+ adapter1.notifyDataSetChanged();
+ }
+
+ // 提交
+ public void check2Submit(View view) {
+
+ OkGo.get(url + "/qms/qcMobile/handleUnqualified/"
+ +binding.check2Result.getSelectedItemPosition()
+ +"/"+checkResult.getReviewId())
+ .execute(new MyRecultCall(dialog, this) {
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+ if (body.getCode() == 200) {
+ finish();
+ Toast.makeText(Check2Activity.this, "提交成功", Toast.LENGTH_SHORT).show();
+ return;
+ }
+
+ myToastUitls.show( body.getMsg());
+ }
+ });
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/haiwei_mom/check/CheckActivity.java b/app/src/main/java/com/example/haiwei_mom/check/CheckActivity.java
index 898be4d..1b11d67 100644
--- a/app/src/main/java/com/example/haiwei_mom/check/CheckActivity.java
+++ b/app/src/main/java/com/example/haiwei_mom/check/CheckActivity.java
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
+import android.widget.Toast;
import androidx.databinding.DataBindingUtil;
@@ -69,25 +70,7 @@ public class CheckActivity extends BaseActivity implements DisposalFileAdapter.I
// searchRequest(null, id, visble);
// }
}
- // 提交
- public void checkSubmit(View view) {
- // checkResult.setMaterialBarcode(binding.checkSearchText.getText().toString());
- // OkGo.post(url + "/qms/mobile/saveCheckResultDetail")
- // .headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
- // .upRequestBody(RequestBody.create(JSON, gson.toJson(checkResult)))
- // .execute(new MyRecultCall(dialog, this) {
- // @Override
- // public void onSuccess(Response response) {
- // super.onSuccess(response);
- // var body = response.body();
- // if (body.getCode() == 200) {
- // finish();
- // }
- //
- // myToastUitls.show( body.getMsg());
- // }
- // });
- }
+
public void checkSearch(View view) {
// var serchText = binding.checkSearchText.getText().toString();
@@ -105,6 +88,8 @@ public class CheckActivity extends BaseActivity implements DisposalFileAdapter.I
var body = response.body();
if (body.getCode() == 200) {
List list=gson.fromJson(body.getDataJson(),new TypeToken>(){}.getType());
+
+ checkResult.setResults(list);
// checkResult = gson.fromJson(body.getData().toString(), CheckResult.class);
// checkResult.setVisbleStatus(status);
// binding.setVm(checkResult);
@@ -161,4 +146,26 @@ public class CheckActivity extends BaseActivity implements DisposalFileAdapter.I
files.remove(position);
adapter1.notifyDataSetChanged();
}
+
+ // 提交
+ public void checkSubmit(View view) {
+ // checkResult.setMaterialBarcode(binding.checkSearchText.getText().toString());
+ OkGo.post(url + "/qms/qcMobile/submitInspection")
+ .params("json", gson.toJson(checkResult))
+ .addFileParams("checkItemFiles",files)
+ .execute(new MyRecultCall(dialog, this) {
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+ if (body.getCode() == 200) {
+ finish();
+ Toast.makeText(CheckActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
+ return;
+ }
+
+ myToastUitls.show( body.getMsg());
+ }
+ });
+ }
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/haiwei_mom/check/CheckSelect2Activity.java b/app/src/main/java/com/example/haiwei_mom/check/CheckSelect2Activity.java
new file mode 100644
index 0000000..c4c2d42
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/check/CheckSelect2Activity.java
@@ -0,0 +1,136 @@
+package com.example.haiwei_mom.check;
+
+import android.annotation.SuppressLint;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.widget.AdapterView;
+
+import androidx.databinding.DataBindingUtil;
+
+import com.example.haiwei_mom.R;
+import com.example.haiwei_mom.adapter.ItemClickCall;
+import com.example.haiwei_mom.adapter.check.CheckSelect2Adapter;
+import com.example.haiwei_mom.base.BaseActivity;
+import com.example.haiwei_mom.base.MyRecultCall;
+import com.example.haiwei_mom.base.MyResult;
+import com.example.haiwei_mom.data.check.QcInspectionType;
+import com.example.haiwei_mom.data.check.QcUnqualifiedTask;
+import com.example.haiwei_mom.databinding.ActivityCheckSelect2Binding;
+import com.google.gson.reflect.TypeToken;
+import com.lzy.okgo.OkGo;
+import com.lzy.okgo.model.Response;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CheckSelect2Activity extends BaseActivity implements ItemClickCall {
+ private List list;
+
+ private CheckSelect2Adapter adapter;
+ private Intent intent;
+
+ private ActivityCheckSelect2Binding binding;
+ private List inspectionTypeList;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ binding = DataBindingUtil.setContentView(this, R.layout.activity_check_select2);
+ adapter = new CheckSelect2Adapter(this, this);
+ binding.setAdapter(adapter);
+ var title = getIntent().getStringExtra("title");
+ binding.setTitle(title);
+
+ intent = new Intent(this, Check2Activity.class);
+ binding.checkSelectItemSelect.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+ @Override
+ public void onItemSelected(AdapterView> parent, View view, int position, long id) {
+ Log.e("TAG", "onItemSelected:" + position);
+ String typeId = null;
+
+ if (position != 0) {
+ typeId = String.valueOf(inspectionTypeList.get(position - 1).getTypeId());
+
+ }
+ initTaskListRequest(typeId);
+
+
+ }
+
+ @Override
+ public void onNothingSelected(AdapterView> parent) {
+
+ }
+ });
+ initTaskTypeListRequest();
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ // initTaskListRequest(null);
+ }
+
+ private void initTaskTypeListRequest() {
+ OkGo.get(url + "/qms/qcInspectionType/getQcInspectionTypeList").tag(this)
+ .execute(new MyRecultCall(dialog, this) {
+ @SuppressLint("NotifyDataSetChanged")
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+
+ inspectionTypeList = gson.fromJson(body.getDataJson(), new TypeToken>() {
+ }.getType());
+
+ if (inspectionTypeList == null || inspectionTypeList.isEmpty()) return;
+ List typeList = new ArrayList<>(inspectionTypeList.size() + 1);
+ typeList.add(0, "全部");
+ for (QcInspectionType type : inspectionTypeList) {
+ typeList.add(type.getTypeName());
+ Log.e("TAG", "onSuccess:" + type.getTypeName());
+ }
+ binding.setList(typeList);
+ }
+ });
+ }
+
+ private void initTaskListRequest(String checkRuleType) {
+ OkGo.get(url + "/qms/qcMobile/getUnqualifiedReviewList").tag(this)
+ .params("inspectionType", checkRuleType)
+ .execute(new MyRecultCall(dialog, this) {
+ @SuppressLint("NotifyDataSetChanged")
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+ if (body.getRows() == null) {
+ if (list != null) {
+ list.clear();
+ adapter.notifyDataSetChanged();
+ }
+ myToastUitls.show(body.getCode() == 200 ? "暂无数据" : body.getMsg());
+
+ return;
+ }
+ list = gson.fromJson(gson.toJson(body.getRows()), new TypeToken>() {
+ }.getType());
+ Log.e("TAG", "onSuccess:" + list.toString());
+ adapter.setList(list);
+ adapter.notifyDataSetChanged();
+ }
+ });
+ }
+
+ @Override
+ public void onClick(int position) {
+ QcUnqualifiedTask checkResult = list.get(position);
+ intent.putExtra("checkResult", checkResult);
+ startActivity(intent);
+ }
+
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/haiwei_mom/check/CheckSelectActivity.java b/app/src/main/java/com/example/haiwei_mom/check/CheckSelectActivity.java
index b74b8ab..e398163 100644
--- a/app/src/main/java/com/example/haiwei_mom/check/CheckSelectActivity.java
+++ b/app/src/main/java/com/example/haiwei_mom/check/CheckSelectActivity.java
@@ -16,11 +16,13 @@ import com.example.haiwei_mom.base.BaseActivity;
import com.example.haiwei_mom.base.MyRecultCall;
import com.example.haiwei_mom.base.MyResult;
import com.example.haiwei_mom.data.check.QcInspectionMain;
+import com.example.haiwei_mom.data.check.QcInspectionType;
import com.example.haiwei_mom.databinding.ActivityCheckSelectBinding;
import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
+import java.util.ArrayList;
import java.util.List;
public class CheckSelectActivity extends BaseActivity implements ItemClickCall {
@@ -28,11 +30,14 @@ public class CheckSelectActivity extends BaseActivity implements ItemClickCall {
private CheckSelectAdapter adapter;
private Intent intent;
private boolean activityType;
+ private ActivityCheckSelectBinding binding;
+ private List inspectionTypeList;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- ActivityCheckSelectBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_check_select);
+
+ binding = DataBindingUtil.setContentView(this, R.layout.activity_check_select);
adapter = new CheckSelectAdapter(this, this);
binding.setAdapter(adapter);
var title = getIntent().getStringExtra("title");
@@ -43,8 +48,15 @@ public class CheckSelectActivity extends BaseActivity implements ItemClickCall {
@Override
public void onItemSelected(AdapterView> parent, View view, int position, long id) {
Log.e("TAG", "onItemSelected:" + position);
- if (position==0) return;
- // initRequest(position==5?null:position+"");
+ String typeId = null;
+
+ if (position != 0) {
+ typeId = String.valueOf(inspectionTypeList.get(position - 1).getTypeId());
+
+ }
+ initTaskListRequest(typeId);
+
+
}
@Override
@@ -52,40 +64,63 @@ public class CheckSelectActivity extends BaseActivity implements ItemClickCall {
}
});
+ initTaskTypeListRequest();
}
@Override
protected void onResume() {
super.onResume();
- initTaskListRequest(null);
+ // initTaskListRequest(null);
+ }
+
+ private void initTaskTypeListRequest() {
+ OkGo.get(url + "/qms/qcInspectionType/getQcInspectionTypeList").tag(this)
+ .execute(new MyRecultCall(dialog, this) {
+ @SuppressLint("NotifyDataSetChanged")
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+
+ inspectionTypeList = gson.fromJson(body.getDataJson(), new TypeToken>() {
+ }.getType());
+
+ if (inspectionTypeList == null || inspectionTypeList.isEmpty()) return;
+ List typeList = new ArrayList<>(inspectionTypeList.size() + 1);
+ typeList.add(0, "全部");
+ for (QcInspectionType type : inspectionTypeList) {
+ typeList.add(type.getTypeName());
+ Log.e("TAG", "onSuccess:" + type.getTypeName());
+ }
+ binding.setList(typeList);
+ }
+ });
}
private void initTaskListRequest(String checkRuleType) {
OkGo.get(url + "/qms/qcMobile/getMainList").tag(this)
-
- // .params("checkStatus", activityType ? null : "3")
- // .params("checkRuleType", checkRuleType)
+ .params("inspectionType", checkRuleType)
.execute(new MyRecultCall(dialog, this) {
- @SuppressLint("NotifyDataSetChanged")
- @Override
- public void onSuccess(Response response) {
- super.onSuccess(response);
- var body = response.body();
- if (body.getRows() == null) {
- if (list != null) {
- list.clear();
+ @SuppressLint("NotifyDataSetChanged")
+ @Override
+ public void onSuccess(Response response) {
+ super.onSuccess(response);
+ var body = response.body();
+ if (body.getRows() == null) {
+ if (list != null) {
+ list.clear();
+ adapter.notifyDataSetChanged();
+ }
+ myToastUitls.show(body.getCode() == 200 ? "暂无数据" : body.getMsg());
+
+ return;
+ }
+ list = gson.fromJson(gson.toJson(body.getRows()), new TypeToken>() {
+ }.getType());
+ adapter.setList(list);
adapter.notifyDataSetChanged();
}
- myToastUitls.show( body.getCode() == 200 ? "暂无数据" :body.getMsg());
-
- return;
- }
- list = gson.fromJson(gson.toJson(body.getRows()), new TypeToken>() {
- }.getType());
- adapter.setList(list);
- adapter.notifyDataSetChanged();
- }
- });
+ });
}
@Override
diff --git a/app/src/main/java/com/example/haiwei_mom/check/QcUnqualifiedRecordVo.java b/app/src/main/java/com/example/haiwei_mom/check/QcUnqualifiedRecordVo.java
new file mode 100644
index 0000000..f3c8e79
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/check/QcUnqualifiedRecordVo.java
@@ -0,0 +1,256 @@
+package com.example.haiwei_mom.check;
+
+import java.math.BigDecimal;
+
+
+
+
+/**
+ * 不合格品评审记录视图对象 qc_unqualified_record
+ *
+ *
+ *
+ */
+
+public class QcUnqualifiedRecordVo {
+
+
+ /**
+ * 记录主键
+ */
+
+ private Long recordId;
+
+ /**
+ * 关联评审主表ID
+ */
+
+ private Long reviewId;
+
+ /**
+ * 检测项编码
+ */
+
+ private String itemCode;
+
+ /**
+ * 检测名称
+ */
+
+ private String itemName;
+
+ /**
+ * 检测位置
+ */
+
+ private String inspectionPosition;
+
+ /**
+ * 检测项目类别
+ */
+
+ private String categoryName;
+
+ /**
+ * 关联检测类型表
+ */
+
+ private Long typeId;
+
+ /**
+ * 检测方法
+ */
+ private String inspectionMethod;
+
+ /**
+ * 检测方式
+ */
+
+
+ private String detectType;
+
+ /**
+ * 检测结果
+ */
+
+
+ private String detectResult;
+
+ /**
+ * 检测值
+ */
+
+ private BigDecimal detectValue;
+
+ /**
+ * 控制上限
+ */
+
+ private BigDecimal upperLimit;
+
+ /**
+ * 控制下限
+ */
+
+ private BigDecimal lowerLimit;
+
+ /**
+ * 规格检测值
+ */
+
+ private String specInspectionValue;
+
+ /**
+ * 规格上限
+ */
+
+ private String specUpper;
+
+ /**
+ * 规格下限
+ */
+
+ private String specLower;
+
+ /**
+ * 检查项说明
+ */
+
+ private String description;
+
+ public Long getRecordId() {
+ return recordId;
+ }
+
+ public void setRecordId(Long recordId) {
+ this.recordId = recordId;
+ }
+
+ public Long getReviewId() {
+ return reviewId;
+ }
+
+ public void setReviewId(Long reviewId) {
+ this.reviewId = reviewId;
+ }
+
+ public String getItemCode() {
+ return itemCode;
+ }
+
+ public void setItemCode(String itemCode) {
+ this.itemCode = itemCode;
+ }
+
+ public String getItemName() {
+ return itemName;
+ }
+
+ public void setItemName(String itemName) {
+ this.itemName = itemName;
+ }
+
+ public String getInspectionPosition() {
+ return inspectionPosition;
+ }
+
+ public void setInspectionPosition(String inspectionPosition) {
+ this.inspectionPosition = inspectionPosition;
+ }
+
+ public String getCategoryName() {
+ return categoryName;
+ }
+
+ public void setCategoryName(String categoryName) {
+ this.categoryName = categoryName;
+ }
+
+ public Long getTypeId() {
+ return typeId;
+ }
+
+ public void setTypeId(Long typeId) {
+ this.typeId = typeId;
+ }
+
+ public String getInspectionMethod() {
+ return inspectionMethod;
+ }
+
+ public void setInspectionMethod(String inspectionMethod) {
+ this.inspectionMethod = inspectionMethod;
+ }
+
+ public String getDetectType() {
+ return detectType;
+ }
+
+ public void setDetectType(String detectType) {
+ this.detectType = detectType;
+ }
+
+ public String getDetectResult() {
+ return detectResult;
+ }
+
+ public void setDetectResult(String detectResult) {
+ this.detectResult = detectResult;
+ }
+
+ public BigDecimal getDetectValue() {
+ return detectValue;
+ }
+
+ public void setDetectValue(BigDecimal detectValue) {
+ this.detectValue = detectValue;
+ }
+
+ public BigDecimal getUpperLimit() {
+ return upperLimit;
+ }
+
+ public void setUpperLimit(BigDecimal upperLimit) {
+ this.upperLimit = upperLimit;
+ }
+
+ public BigDecimal getLowerLimit() {
+ return lowerLimit;
+ }
+
+ public void setLowerLimit(BigDecimal lowerLimit) {
+ this.lowerLimit = lowerLimit;
+ }
+
+ public String getSpecInspectionValue() {
+ return specInspectionValue;
+ }
+
+ public void setSpecInspectionValue(String specInspectionValue) {
+ this.specInspectionValue = specInspectionValue;
+ }
+
+ public String getSpecUpper() {
+ return specUpper;
+ }
+
+ public void setSpecUpper(String specUpper) {
+ this.specUpper = specUpper;
+ }
+
+ public String getSpecLower() {
+ return specLower;
+ }
+
+ public void setSpecLower(String specLower) {
+ this.specLower = specLower;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/app/src/main/java/com/example/haiwei_mom/data/check/QcInspectionResult.java b/app/src/main/java/com/example/haiwei_mom/data/check/QcInspectionResult.java
index 8d9eb86..fe24d36 100644
--- a/app/src/main/java/com/example/haiwei_mom/data/check/QcInspectionResult.java
+++ b/app/src/main/java/com/example/haiwei_mom/data/check/QcInspectionResult.java
@@ -57,15 +57,15 @@ public class QcInspectionResult extends BaseObservable {
*/
private String detectValue;
- public void textChanged(Editable s){
- double result=Double.parseDouble(s.toString());
- detectValue=result+"";
- if (result>=upperLimit && result<= lowerLimit){
- setDetectResult("0");
- }else {
- setDetectResult("1");
- }
- }
+ // public void textChanged(Editable s){
+ // double result=Double.parseDouble(s.toString());
+ // detectValue=result+"";
+ // if (result>=upperLimit && result<= lowerLimit){
+ // setDetectResult("0");
+ // }else {
+ // setDetectResult("1");
+ // }
+ // }
/**
* 规格质检值
diff --git a/app/src/main/java/com/example/haiwei_mom/data/check/QcInspectionType.java b/app/src/main/java/com/example/haiwei_mom/data/check/QcInspectionType.java
new file mode 100644
index 0000000..6009231
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/data/check/QcInspectionType.java
@@ -0,0 +1,66 @@
+package com.example.haiwei_mom.data.check;
+
+/**
+ * 检测类型业务对象 qc_inspection_type
+ *
+ * @author zch
+ * @date 2025-07-14
+ */
+
+public class QcInspectionType {
+
+ /**
+ * 检测类型主键
+ */
+ private Long typeId;
+
+ /**
+ * 检测类型编码
+ */
+ private String typeCode;
+
+ /**
+ * 检测类型名称
+ */
+ private String typeName;
+
+ /**
+ * 检测类型(字典:首检 专检 自检 互检 原材料检 抽检 成品检)
+ */
+ private String qcInspectionType;
+
+
+ public Long getTypeId() {
+ return typeId;
+ }
+
+ public void setTypeId(Long typeId) {
+ this.typeId = typeId;
+ }
+
+ public String getTypeCode() {
+ return typeCode;
+ }
+
+ public void setTypeCode(String typeCode) {
+ this.typeCode = typeCode;
+ }
+
+ public String getTypeName() {
+ return typeName;
+ }
+
+ public void setTypeName(String typeName) {
+ this.typeName = typeName;
+ }
+
+ public String getQcInspectionType() {
+ return qcInspectionType;
+ }
+
+ public void setQcInspectionType(String qcInspectionType) {
+ this.qcInspectionType = qcInspectionType;
+ }
+
+
+}
diff --git a/app/src/main/java/com/example/haiwei_mom/data/check/QcUnqualifiedRecordBo.java b/app/src/main/java/com/example/haiwei_mom/data/check/QcUnqualifiedRecordBo.java
new file mode 100644
index 0000000..aa20268
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/data/check/QcUnqualifiedRecordBo.java
@@ -0,0 +1,235 @@
+package com.example.haiwei_mom.data.check;
+
+
+import java.math.BigDecimal;
+
+/**
+ * 不合格品评审记录业务对象 qc_unqualified_record
+ *
+ * @author zch
+ * @date 2025-07-25
+ */
+
+public class QcUnqualifiedRecordBo {
+
+ /**
+ * 记录主键
+ */
+ private Long recordId;
+
+ /**
+ * 关联评审主表ID
+ */
+ private Long reviewId;
+
+ /**
+ * 检测项编码
+ */
+ private String itemCode;
+
+ /**
+ * 检测名称
+ */
+ private String itemName;
+
+ /**
+ * 检测位置
+ */
+ private String inspectionPosition;
+
+ /**
+ * 检测项目类别
+ */
+ private String categoryName;
+
+ /**
+ * 关联检测类型表
+ */
+ private Long typeId;
+
+ /**
+ * 检测方法
+ */
+ private String inspectionMethod;
+
+ /**
+ * 检测方式
+ */
+ private String detectType;
+
+ /**
+ * 检测结果
+ */
+ private String detectResult;
+
+ /**
+ * 检测值
+ */
+ private BigDecimal detectValue;
+
+ /**
+ * 控制上限
+ */
+ private BigDecimal upperLimit;
+
+ /**
+ * 控制下限
+ */
+ private BigDecimal lowerLimit;
+
+ /**
+ * 规格检测值
+ */
+ private String specInspectionValue;
+
+ /**
+ * 规格上限
+ */
+ private String specUpper;
+
+ /**
+ * 规格下限
+ */
+ private String specLower;
+
+ /**
+ * 检查项说明
+ */
+ private String description;
+
+ public Long getRecordId() {
+ return recordId;
+ }
+
+ public void setRecordId(Long recordId) {
+ this.recordId = recordId;
+ }
+
+ public Long getReviewId() {
+ return reviewId;
+ }
+
+ public void setReviewId(Long reviewId) {
+ this.reviewId = reviewId;
+ }
+
+ public String getItemCode() {
+ return itemCode;
+ }
+
+ public void setItemCode(String itemCode) {
+ this.itemCode = itemCode;
+ }
+
+ public String getItemName() {
+ return itemName;
+ }
+
+ public void setItemName(String itemName) {
+ this.itemName = itemName;
+ }
+
+ public String getInspectionPosition() {
+ return inspectionPosition;
+ }
+
+ public void setInspectionPosition(String inspectionPosition) {
+ this.inspectionPosition = inspectionPosition;
+ }
+
+ public String getCategoryName() {
+ return categoryName;
+ }
+
+ public void setCategoryName(String categoryName) {
+ this.categoryName = categoryName;
+ }
+
+ public Long getTypeId() {
+ return typeId;
+ }
+
+ public void setTypeId(Long typeId) {
+ this.typeId = typeId;
+ }
+
+ public String getInspectionMethod() {
+ return inspectionMethod;
+ }
+
+ public void setInspectionMethod(String inspectionMethod) {
+ this.inspectionMethod = inspectionMethod;
+ }
+
+ public String getDetectType() {
+ return detectType;
+ }
+
+ public void setDetectType(String detectType) {
+ this.detectType = detectType;
+ }
+
+ public String getDetectResult() {
+ return detectResult;
+ }
+
+ public void setDetectResult(String detectResult) {
+ this.detectResult = detectResult;
+ }
+
+ public BigDecimal getDetectValue() {
+ return detectValue;
+ }
+
+ public void setDetectValue(BigDecimal detectValue) {
+ this.detectValue = detectValue;
+ }
+
+ public BigDecimal getUpperLimit() {
+ return upperLimit;
+ }
+
+ public void setUpperLimit(BigDecimal upperLimit) {
+ this.upperLimit = upperLimit;
+ }
+
+ public BigDecimal getLowerLimit() {
+ return lowerLimit;
+ }
+
+ public void setLowerLimit(BigDecimal lowerLimit) {
+ this.lowerLimit = lowerLimit;
+ }
+
+ public String getSpecInspectionValue() {
+ return specInspectionValue;
+ }
+
+ public void setSpecInspectionValue(String specInspectionValue) {
+ this.specInspectionValue = specInspectionValue;
+ }
+
+ public String getSpecUpper() {
+ return specUpper;
+ }
+
+ public void setSpecUpper(String specUpper) {
+ this.specUpper = specUpper;
+ }
+
+ public String getSpecLower() {
+ return specLower;
+ }
+
+ public void setSpecLower(String specLower) {
+ this.specLower = specLower;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/app/src/main/java/com/example/haiwei_mom/data/check/QcUnqualifiedTask.java b/app/src/main/java/com/example/haiwei_mom/data/check/QcUnqualifiedTask.java
new file mode 100644
index 0000000..a4b6f4f
--- /dev/null
+++ b/app/src/main/java/com/example/haiwei_mom/data/check/QcUnqualifiedTask.java
@@ -0,0 +1,326 @@
+package com.example.haiwei_mom.data.check;
+
+import android.util.Log;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * 不合格品待评审业务对象 qc_unqualified_review
+ *
+ * @author zch
+ * @String 2025-07-25
+ */
+
+public class QcUnqualifiedTask implements Serializable {
+
+ /**
+ * 评审主键
+ */
+ private String reviewId;
+
+ /**
+ * 不合格检测单号
+ */
+ private String unqualifiedReviewNo;
+
+ /**
+ * 评审结果(0报废、1返工、2退货、3流转、4让步接收)
+ */
+ private String reviewResult;
+
+ /**
+ * 质检单号
+ */
+ private String inspectionNo;
+
+ /**
+ * 检测类型ID
+ */
+ private Long inspectionType;
+
+ /**
+ * 生产日期
+ */
+ private String productionDate;
+
+ /**
+ * 派工单号(或者计划号/工单号)
+ */
+ private String workOrderNo;
+
+ /**
+ * 工序名称
+ */
+ private String processName;
+
+ /**
+ * 物料名称
+ */
+ private String materialName;
+
+ /**
+ * 物料编码
+ */
+ private String materialCode;
+
+ /**
+ * 物料规格
+ */
+ private String materialSpec;
+
+ /**
+ * 供应商名称
+ */
+ private String supplierName;
+
+ /**
+ * 供应商编码
+ */
+ private String supplierCode;
+
+ /**
+ * 质检数量
+ */
+ private BigDecimal inspectionQty;
+
+ /**
+ * 批次号
+ */
+ private String batchNo;
+
+ /**
+ * 质检人
+ */
+ private String inspector;
+
+ /**
+ * 质检人ID
+ */
+ private Long inspectorId;
+
+ /**
+ * 评审人
+ */
+ private String reviewer;
+
+ /**
+ * 评审人ID
+ */
+ private String reviewerId;
+
+ /**
+ * 评审开始时间
+ */
+ private String reviewStartTime;
+
+ /**
+ * 评审结束时间
+ */
+ private String reviewEndTime;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ /**
+ * 检测类型名称
+ */
+ private String typeName;
+
+ public String getReviewId() {
+ Log.e("TAG", "getReviewId:" + reviewId);
+ return reviewId;
+ }
+
+ public void setReviewId(String reviewId) {
+ this.reviewId = reviewId;
+ }
+
+ public String getUnqualifiedReviewNo() {
+ return unqualifiedReviewNo;
+ }
+
+ public void setUnqualifiedReviewNo(String unqualifiedReviewNo) {
+ this.unqualifiedReviewNo = unqualifiedReviewNo;
+ }
+
+ public String getReviewResult() {
+ return reviewResult;
+ }
+
+ public void setReviewResult(String reviewResult) {
+ this.reviewResult = reviewResult;
+ }
+
+ public String getInspectionNo() {
+ return inspectionNo;
+ }
+
+ public void setInspectionNo(String inspectionNo) {
+ this.inspectionNo = inspectionNo;
+ }
+
+ public Long getInspectionType() {
+ return inspectionType;
+ }
+
+ public void setInspectionType(Long inspectionType) {
+ this.inspectionType = inspectionType;
+ }
+
+ public String getProductionDate() {
+ return productionDate;
+ }
+
+ public void setProductionDate(String productionDate) {
+ this.productionDate = productionDate;
+ }
+
+ public String getWorkOrderNo() {
+ return workOrderNo;
+ }
+
+ public void setWorkOrderNo(String workOrderNo) {
+ this.workOrderNo = workOrderNo;
+ }
+
+ public String getProcessName() {
+ return processName;
+ }
+
+ public void setProcessName(String processName) {
+ this.processName = processName;
+ }
+
+ public String getMaterialName() {
+ return materialName;
+ }
+
+ public void setMaterialName(String materialName) {
+ this.materialName = materialName;
+ }
+
+ public String getMaterialCode() {
+ return materialCode;
+ }
+
+ public void setMaterialCode(String materialCode) {
+ this.materialCode = materialCode;
+ }
+
+ public String getMaterialSpec() {
+ return materialSpec;
+ }
+
+ public void setMaterialSpec(String materialSpec) {
+ this.materialSpec = materialSpec;
+ }
+
+ public String getSupplierName() {
+ return supplierName;
+ }
+
+ public void setSupplierName(String supplierName) {
+ this.supplierName = supplierName;
+ }
+
+ public String getSupplierCode() {
+ return supplierCode;
+ }
+
+ public void setSupplierCode(String supplierCode) {
+ this.supplierCode = supplierCode;
+ }
+
+ public BigDecimal getInspectionQty() {
+ return inspectionQty;
+ }
+
+ public void setInspectionQty(BigDecimal inspectionQty) {
+ this.inspectionQty = inspectionQty;
+ }
+
+ public String getBatchNo() {
+ return batchNo;
+ }
+
+ public void setBatchNo(String batchNo) {
+ this.batchNo = batchNo;
+ }
+
+ public String getInspector() {
+ return inspector;
+ }
+
+ public void setInspector(String inspector) {
+ this.inspector = inspector;
+ }
+
+ public Long getInspectorId() {
+ return inspectorId;
+ }
+
+ public void setInspectorId(Long inspectorId) {
+ this.inspectorId = inspectorId;
+ }
+
+ public String getReviewer() {
+ return reviewer;
+ }
+
+ public void setReviewer(String reviewer) {
+ this.reviewer = reviewer;
+ }
+
+ public String getReviewerId() {
+ return reviewerId;
+ }
+
+ public void setReviewerId(String reviewerId) {
+ this.reviewerId = reviewerId;
+ }
+
+ public String getReviewStartTime() {
+ return reviewStartTime;
+ }
+
+ public void setReviewStartTime(String reviewStartTime) {
+ this.reviewStartTime = reviewStartTime;
+ }
+
+ public String getReviewEndTime() {
+ return reviewEndTime;
+ }
+
+ public void setReviewEndTime(String reviewEndTime) {
+ this.reviewEndTime = reviewEndTime;
+ }
+
+ public String getRemark() {
+ return remark;
+ }
+
+ public void setRemark(String remark) {
+ this.remark = remark;
+ }
+
+ public String getTypeName() {
+ return typeName;
+ }
+
+ public void setTypeName(String typeName) {
+ this.typeName = typeName;
+ }
+
+ @Override
+ public String toString() {
+ return "QcUnqualifiedTask{" +
+ "reviewId='" + reviewId + '\'' +
+ ", reviewResult='" + reviewResult + '\'' +
+ ", inspectionNo='" + inspectionNo + '\'' +
+ ", inspectionType=" + inspectionType +
+ '}';
+ }
+}
diff --git a/app/src/main/res/layout/activity_check2.xml b/app/src/main/res/layout/activity_check2.xml
new file mode 100644
index 0000000..c18aae0
--- /dev/null
+++ b/app/src/main/res/layout/activity_check2.xml
@@ -0,0 +1,214 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_check_select.xml b/app/src/main/res/layout/activity_check_select.xml
index 7401199..7f2059e 100644
--- a/app/src/main/res/layout/activity_check_select.xml
+++ b/app/src/main/res/layout/activity_check_select.xml
@@ -12,6 +12,9 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_check_2.xml b/app/src/main/res/layout/item_check_2.xml
index 747a220..16470e5 100644
--- a/app/src/main/res/layout/item_check_2.xml
+++ b/app/src/main/res/layout/item_check_2.xml
@@ -76,7 +76,7 @@
android:enabled="@{enabledState}"
android:inputType="numberDecimal"
android:text='@={item.detectValue}'
- android:afterTextChanged="@{item.textChanged}"/>
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/array.xml b/app/src/main/res/values/array.xml
index de062b3..5d492f8 100644
--- a/app/src/main/res/values/array.xml
+++ b/app/src/main/res/values/array.xml
@@ -16,4 +16,13 @@
- 工序检验
- 所有
+
+
+
+ - 流转
+ - 报废
+ - 让步接收
+ - 返工
+ - 退货
+
\ No newline at end of file