调试 不合格评审
parent
69c2060af2
commit
2f201846ed
@ -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());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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,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>
|
||||
@ -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>
|
||||
@ -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>
|
||||
Loading…
Reference in New Issue