调试 不合格评审

master
wanghao 5 months ago
parent 69c2060af2
commit 2f201846ed

@ -35,6 +35,13 @@
<activity
android:name=".check.CheckActivity"
android:exported="false" />
<activity
android:name=".check.Check2Activity"
android:exported="false" />
<activity
android:name=".check.CheckSelect2Activity"
android:exported="false" />
<activity

@ -10,6 +10,7 @@ import com.example.haiwei_mom.adapter.ItemClickCall;
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.check.CheckSelect2Activity;
import com.example.haiwei_mom.check.CheckSelectActivity;
import com.example.haiwei_mom.data.MenuBeen;
import com.example.haiwei_mom.data.PdaRouters;
@ -51,11 +52,16 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall {
ActivityHomePageBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_home_page);
adapter = new HomeMenuAdapter(this, this);
binding.setAdapter(adapter);
initRequest();
initMenuMap();
}
@Override
protected void onResume() {
super.onResume(); initRequest();
}
private void initMenuMap() {
map = new HashMap<>();
@ -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);

@ -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;

@ -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<CheckSelect2Adapter.MyViewHolder> {
private List<QcUnqualifiedTask> 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<QcUnqualifiedTask> 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;
}
}
}

@ -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<CheckInstanceFiles> filesList;
private List<File> 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.<MyResult>get(url + "/qms/qcMobile/getUnqualifiedRecordList")
.params("reviewId", id)
.execute(new MyRecultCall(dialog, this) {
@SuppressLint("NotifyDataSetChanged")
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
List<QcInspectionResult> list=gson.fromJson(body.getDataJson(),new TypeToken<List<QcInspectionResult>>(){}.getType());
// checkResult.setResults(list);
// checkResult = gson.fromJson(body.getData().toString(), CheckResult.class);
// checkResult.setVisbleStatus(status);
// binding.setVm(checkResult);
// List<CheckResultDetal> 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.<MyResult>get(url + "/qms/qcMobile/handleUnqualified/"
+binding.check2Result.getSelectedItemPosition()
+"/"+checkResult.getReviewId())
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> 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());
}
});
}
}

@ -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.<MyResult>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<MyResult> 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<QcInspectionResult> list=gson.fromJson(body.getDataJson(),new TypeToken<List<QcInspectionResult>>(){}.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.<MyResult>post(url + "/qms/qcMobile/submitInspection")
.params("json", gson.toJson(checkResult))
.addFileParams("checkItemFiles",files)
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> 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());
}
});
}
}

@ -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<QcUnqualifiedTask> list;
private CheckSelect2Adapter adapter;
private Intent intent;
private ActivityCheckSelect2Binding binding;
private List<QcInspectionType> 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.<MyResult>get(url + "/qms/qcInspectionType/getQcInspectionTypeList").tag(this)
.execute(new MyRecultCall(dialog, this) {
@SuppressLint("NotifyDataSetChanged")
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
inspectionTypeList = gson.fromJson(body.getDataJson(), new TypeToken<List<QcInspectionType>>() {
}.getType());
if (inspectionTypeList == null || inspectionTypeList.isEmpty()) return;
List<String> 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.<MyResult>get(url + "/qms/qcMobile/getUnqualifiedReviewList").tag(this)
.params("inspectionType", checkRuleType)
.execute(new MyRecultCall(dialog, this) {
@SuppressLint("NotifyDataSetChanged")
@Override
public void onSuccess(Response<MyResult> 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<List<QcUnqualifiedTask>>() {
}.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);
}
}

@ -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<QcInspectionType> 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.<MyResult>get(url + "/qms/qcInspectionType/getQcInspectionTypeList").tag(this)
.execute(new MyRecultCall(dialog, this) {
@SuppressLint("NotifyDataSetChanged")
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
inspectionTypeList = gson.fromJson(body.getDataJson(), new TypeToken<List<QcInspectionType>>() {
}.getType());
if (inspectionTypeList == null || inspectionTypeList.isEmpty()) return;
List<String> 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.<MyResult>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<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getRows() == null) {
if (list != null) {
list.clear();
@SuppressLint("NotifyDataSetChanged")
@Override
public void onSuccess(Response<MyResult> 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<List<QcInspectionMain>>() {
}.getType());
adapter.setList(list);
adapter.notifyDataSetChanged();
}
myToastUitls.show( body.getCode() == 200 ? "暂无数据" :body.getMsg());
return;
}
list = gson.fromJson(gson.toJson(body.getRows()), new TypeToken<List<QcInspectionMain>>() {
}.getType());
adapter.setList(list);
adapter.notifyDataSetChanged();
}
});
});
}
@Override

@ -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;
}
}

@ -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");
// }
// }
/**
*

@ -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;
}
}

@ -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;
}
}

@ -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;
/**
* 012退34
*/
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 +
'}';
}
}

@ -0,0 +1,214 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="title"
type="String" />
<variable
name="vm"
type="com.example.haiwei_mom.data.check.QcUnqualifiedTask" />
<variable
name="adapter"
type="com.example.haiwei_mom.adapter.check.CheckWorkAdapter" />
<import type="android.view.View" />
<variable
name="adapter1"
type="com.example.haiwei_mom.adapter.check.DisposalFileAdapter" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".check.CheckActivity">
<include
layout="@layout/toolbar"
app:title='@{title??"物料检验"}' />
<LinearLayout
android:id="@+id/check_search_linear"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_margin="8dp"
android:background="@drawable/san_text_bg"
android:padding="4dp"
android:visibility="gone">
<EditText
android:id="@+id/check_search_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white"
android:hint="请 输入/扫描 物料条码"
android:paddingLeft="10dp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:onClick="checkSearch"
android:src="@mipmap/ic_search" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text='检测类型' />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.typeName}' />
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text='派工单号' />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.inspectionNo}' />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="工序名称:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.processName}" />
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="批次号:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.batchNo}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="物料编号:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.materialCode}" />
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="物料名称:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.materialName}" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:adapter="@{adapter}"
android:background="@color/white"
android:padding="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="5dp"
android:background="@color/white"
android:orientation="horizontal">
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:adapter="@{adapter1}"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:paddingRight="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="处理结果:"
style="@style/text_title"/>
<Spinner
android:id="@+id/check2_result"
style="@style/spinner_style"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:entries="@array/task_type"/>
<Button
style="@style/button_style"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:onClick="check2Submit"
android:text="提交" />
</LinearLayout>
</LinearLayout>
</layout>

@ -12,6 +12,9 @@
<variable
name="adapter"
type="com.example.haiwei_mom.adapter.check.CheckSelectAdapter" />
<variable
name="list"
type="java.util.List" />
</data>
<LinearLayout
@ -32,7 +35,7 @@
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:entries="@array/checktype"
android:entries="@{list}"
android:background="@drawable/spinner_bg" />
<androidx.recyclerview.widget.RecyclerView

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="title"
type="String" />
<variable
name="adapter"
type="com.example.haiwei_mom.adapter.check.CheckSelect2Adapter" />
<variable
name="list"
type="java.util.List" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".check.CheckSelectActivity"
android:orientation="vertical">
<include
layout="@layout/toolbar"
app:title='@{title??"物料检验列表"}' />
<Spinner
android:id="@+id/checkSelectItemSelect"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:entries="@{list}"
android:background="@drawable/spinner_bg" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adapter="@{adapter}"
android:padding="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
</layout>

@ -76,7 +76,7 @@
android:enabled="@{enabledState}"
android:inputType="numberDecimal"
android:text='@={item.detectValue}'
android:afterTextChanged="@{item.textChanged}"/>
/>
<TextView
style="@style/item_title"
android:layout_width="50dp"

@ -0,0 +1,213 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="vm"
type="com.example.haiwei_mom.data.check.QcUnqualifiedTask" />
</data>
<LinearLayout
android:id="@+id/check_select_click"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:background="@drawable/san_text_bg"
android:orientation="vertical"
android:padding="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text='不合格单号' />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.unqualifiedReviewNo}' />
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="质检单号:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.inspectionNo}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text='检测类型' />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.typeName}' />
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="生产日期:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.productionDate}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text='派工单号' />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.inspectionNo}' />
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="工序名称:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.processName}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="物料编号:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.materialCode}" />
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="物料名称:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.materialName}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="物料规格:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
/>
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="物料类型:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='' />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="批次号:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.batchNo }' />
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="条码号:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="" />
</LinearLayout>
</LinearLayout>
</layout>

@ -16,4 +16,13 @@
<item>工序检验</item>
<item>所有</item>
</string-array>
<string-array name="task_type">
<item>流转</item>
<item>报废</item>
<item>让步接收</item>
<item>返工</item>
<item>退货</item>
</string-array>
</resources>
Loading…
Cancel
Save