调试 任务和item接口

master
wanghao 2 weeks ago
parent cb1d9d4788
commit 69c2060af2

@ -32,6 +32,11 @@
<activity
android:name=".check.CheckSelectActivity"
android:exported="false" />
<activity
android:name=".check.CheckActivity"
android:exported="false" />
<activity
android:name=".wms.semi.BindingActivity"
android:exported="false" />

@ -11,9 +11,8 @@ 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.QmsTaskItemBeen;
import com.example.haiwei_mom.data.check.QcInspectionMain;
import com.example.haiwei_mom.databinding.ItemCheckSelectBinding;
import com.example.haiwei_mom.data.check.CheckResult;
import java.util.List;
@ -22,7 +21,7 @@ import java.util.List;
* @date 2024/1/31 15:18
*/
public class CheckSelectAdapter extends RecyclerView.Adapter<CheckSelectAdapter.MyViewHolder> {
private List<QmsTaskItemBeen> list;
private List<QcInspectionMain> list;
private Context context;
private LayoutInflater inflater;
private ItemClickCall clickCall;
@ -32,7 +31,7 @@ public class CheckSelectAdapter extends RecyclerView.Adapter<CheckSelectAdapter.
inflater = LayoutInflater.from(context);
}
public void setList(List<QmsTaskItemBeen> list) {
public void setList(List<QcInspectionMain> list) {
this.list = list;
}

@ -9,6 +9,7 @@ import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.RecyclerView;
import com.example.haiwei_mom.R;
import com.example.haiwei_mom.data.check.QcInspectionResult;
import com.example.haiwei_mom.databinding.ItemCheck1Binding;
import com.example.haiwei_mom.databinding.ItemCheck2Binding;
import com.example.haiwei_mom.data.check.CheckResultDetal;
@ -20,7 +21,7 @@ import java.util.List;
* @date 2024/3/1 17:23
*/
public class CheckWorkAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private List<CheckResultDetal> list;
private List<QcInspectionResult> list;
private Context context;
private boolean enabledState;
@ -32,7 +33,7 @@ public class CheckWorkAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
this.context = context;
}
public void setList(List<CheckResultDetal> list) {
public void setList(List<QcInspectionResult> list) {
this.list = list;
}
@ -40,7 +41,7 @@ public class CheckWorkAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
var inflater = LayoutInflater.from(context);
if (viewType==1){
if (viewType==0){
ItemCheck1Binding binding = DataBindingUtil.inflate(inflater, R.layout.item_check_1, parent, false);
return new MyHolder1(binding);
} else {
@ -52,8 +53,7 @@ public class CheckWorkAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
var checkResultDetal = list.get(position);
checkResultDetal.setIndex(position+1);
QcInspectionResult checkResultDetal = list.get(position);
if (holder instanceof MyHolder1){
MyHolder1 holder1= (MyHolder1) holder;
holder1.binding.setItem(checkResultDetal);
@ -74,7 +74,7 @@ public class CheckWorkAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
@Override
public int getItemViewType(int position) {
return Integer.parseInt(list.get(position).getCheckProjectProperty());
return Integer.parseInt(list.get(position).getDetectType());
}
class MyHolder1 extends RecyclerView.ViewHolder {

@ -9,72 +9,94 @@ 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.CheckResult;
import com.example.haiwei_mom.data.check.CheckResultDetal;
import com.example.haiwei_mom.data.check.QcInspectionMain;
import com.example.haiwei_mom.data.check.QcInspectionResult;
import com.example.haiwei_mom.databinding.ActivityCheckBinding;
import com.example.haiwei_mom.dialog.ImgDialog;
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
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.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import okhttp3.RequestBody;
public class CheckActivity extends BaseActivity {
public class CheckActivity extends BaseActivity implements DisposalFileAdapter.ItemClickCall {
private CheckWorkAdapter adapter;
private ActivityCheckBinding binding;
private CheckResult checkResult;
private QcInspectionMain 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_check);
adapter = new CheckWorkAdapter(this);
adapter.setEnabledState(true);
binding.setAdapter(adapter);
var intent = getIntent();
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);
}
checkResult= (QcInspectionMain) intent.getSerializableExtra("checkResult");
binding.setVm(checkResult);
searchRequest(checkResult.getInspectionId());
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 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());
}
});
// 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();
searchRequest(serchText, null, true);
// var serchText = binding.checkSearchText.getText().toString();
// searchRequest(serchText, null, true);
}
private void searchRequest(String serchText, String id, boolean status) {
OkGo.<MyResult>get(url + "/qms/mobile/getCheckResultDetail")
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.params("materialBarcode", serchText)
.params("checkResultDetailId", id)
private void searchRequest( Long id) {
OkGo.<MyResult>get(url + "/qms/qcMobile/getResultList")
.params("inspectionId", id)
.execute(new MyRecultCall(dialog, this) {
@SuppressLint("NotifyDataSetChanged")
@Override
@ -82,29 +104,61 @@ public class CheckActivity extends BaseActivity {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
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(qmsCheckResultDetailProjectList);
List<QcInspectionResult> list=gson.fromJson(body.getDataJson(),new TypeToken<List<QcInspectionResult>>(){}.getType());
// 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();
} else {
binding.setVm(null);
adapter.setList(null);
adapter.notifyDataSetChanged();
myToastUitls.show( body.getMsg());
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();
}
}

@ -15,10 +15,8 @@ import com.example.haiwei_mom.adapter.check.CheckSelectAdapter;
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.QmsTaskItemBeen;
import com.example.haiwei_mom.data.check.QcInspectionMain;
import com.example.haiwei_mom.databinding.ActivityCheckSelectBinding;
import com.example.haiwei_mom.data.check.CheckResult;
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
@ -26,9 +24,9 @@ import com.lzy.okgo.model.Response;
import java.util.List;
public class CheckSelectActivity extends BaseActivity implements ItemClickCall {
private List<QmsTaskItemBeen> list;
private List<QcInspectionMain> list;
private CheckSelectAdapter adapter;
private Intent intent1;
private Intent intent;
private boolean activityType;
@Override
@ -40,7 +38,7 @@ public class CheckSelectActivity extends BaseActivity implements ItemClickCall {
var title = getIntent().getStringExtra("title");
binding.setTitle(title);
activityType = title.equals("物料质检列表");
intent1 = new Intent(this, activityType ? CheckSelectDetalActivity.class : CheckDisposalActivity.class);
intent = new Intent(this, CheckActivity.class);
binding.checkSelectItemSelect.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
@ -63,7 +61,7 @@ public class CheckSelectActivity extends BaseActivity implements ItemClickCall {
}
private void initTaskListRequest(String checkRuleType) {
OkGo.<MyResult>get(url + "/qms/QcInspectionMain/list").tag(this)
OkGo.<MyResult>get(url + "/qms/qcMobile/getMainList").tag(this)
// .params("checkStatus", activityType ? null : "3")
// .params("checkRuleType", checkRuleType)
@ -82,7 +80,7 @@ public class CheckSelectActivity extends BaseActivity implements ItemClickCall {
return;
}
list = gson.fromJson(gson.toJson(body.getRows()), new TypeToken<List<QmsTaskItemBeen>>() {
list = gson.fromJson(gson.toJson(body.getRows()), new TypeToken<List<QcInspectionMain>>() {
}.getType());
adapter.setList(list);
adapter.notifyDataSetChanged();
@ -93,19 +91,8 @@ public class CheckSelectActivity extends BaseActivity implements ItemClickCall {
@Override
public void onClick(int position) {
var checkResult = list.get(position);
// var checkResultId = checkResult.getCheckResultId();
// var checkMode = checkResult.getCheckModeText();
// Log.e("TAG", "onClick:" + checkMode);
// var checkSample = checkResult.getCheckSample();
// var materialBatch = checkResult.getMaterialBatch();
// intent1.putExtra("checkResultId", checkResultId);
// intent1.putExtra("checkMode", checkMode);
// intent1.putExtra("checkSample", checkSample);
// intent1.putExtra("materialBatch", materialBatch);
// intent1.putExtra("materialCode", checkResult.getMaterialCode());
// intent1.putExtra("materialName", checkResult.getMaterialName());
// intent1.putExtra("checkRuleType", checkResult.getCheckRuleType());
startActivity(intent1);
intent.putExtra("checkResult", checkResult);
startActivity(intent);
}

@ -1,79 +1,185 @@
package com.example.haiwei_mom.data.check;
public class QmsTaskItemBeen {
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* qc_inspection_main
*
* @author zch
* @String 2025-07-24
*/
public class QcInspectionMain implements Serializable {
/**
*
*/
private Long inspectionId;
/**
* inspectionId : 1948615722050088962
* planDetailId : 12
* inspectionNo : ZL202507250008
* templateId : 30001
* materialCode : 014001200
* materialType : null
* materialName : 12.00R2020PRKT216
* processName :
* stationName : 001
* inspectionQty : 1.00
* qualifiedQty : null
* unqualifiedQty : null
* result : null
* workshop : null
* inspectionType : 6
* status : 0
* inspector : null
* shift :
* team :
* inspectionStartTime : 2025-07-21 00:00:00
* inspectionEndTime : null
* productionOrder : 20250724104058PL0009
* batchNo : null
* barcode : 20250724LH001010015
* supplierName : null
* remark : null
* templateName :
* idmes
*/
private Long planDetailId;
private String inspectionId;
private String planDetailId;
/**
* /
*/
private String inspectionNo;
private String templateId;
private String materialCode;
private String materialType;
private String materialName;
private String processName;
private String stationName;
private String inspectionQty;
private String qualifiedQty;
private String unqualifiedQty;
private String result;
private String workshop;
private String inspectionType;
private String status;
private String inspector;
private String shift;
private String team;
private String inspectionStartTime;
private String inspectionEndTime;
private String productionOrder;
private String batchNo;
private String barcode;
private String supplierName;
private String remark;
private String templateName;
public String getInspectionId() {
/**
* ID
*/
private Long templateId;
/**
*
*/
private String materialCode;
/**
*
*/
private String materialType;
/**
*
*/
private String materialName;
/**
*
*/
private String processName;
/**
*
*/
private String stationName;
/**
*
*/
private BigDecimal inspectionQty;
/**
*
*/
private BigDecimal qualifiedQty;
/**
*
*/
private BigDecimal unqualifiedQty;
/**
* 0/1
*/
private String result;
/**
*
*/
private String workshop;
/**
* ID
*/
private Long inspectionType;
/**
* 0/1
*/
private String status;
/**
*
*/
private String inspector;
/**
*
*/
private String shift;
/**
*
*/
private String team;
/**
*
*/
private String inspectionStartTime;
/**
*
*/
private String inspectionEndTime;
/**
*
*/
private String productionOrder;
/**
*
*/
private String batchNo;
/**
*
*/
private String barcode;
/**
*
*/
private String supplierName;
/**
*
*/
private String remark;
/**
*
*/
private String templateName;//join
/**
*
*/
private String qcInspectionType;
/**
*
*/
private String typeName;
/**
*
*/
private List<QcInspectionResult> results;
public Long getInspectionId() {
return inspectionId;
}
public void setInspectionId(String inspectionId) {
public void setInspectionId(Long inspectionId) {
this.inspectionId = inspectionId;
}
public String getPlanDetailId() {
public Long getPlanDetailId() {
return planDetailId;
}
public void setPlanDetailId(String planDetailId) {
public void setPlanDetailId(Long planDetailId) {
this.planDetailId = planDetailId;
}
@ -85,11 +191,11 @@ public class QmsTaskItemBeen {
this.inspectionNo = inspectionNo;
}
public String getTemplateId() {
public Long getTemplateId() {
return templateId;
}
public void setTemplateId(String templateId) {
public void setTemplateId(Long templateId) {
this.templateId = templateId;
}
@ -133,27 +239,27 @@ public class QmsTaskItemBeen {
this.stationName = stationName;
}
public String getInspectionQty() {
public BigDecimal getInspectionQty() {
return inspectionQty;
}
public void setInspectionQty(String inspectionQty) {
public void setInspectionQty(BigDecimal inspectionQty) {
this.inspectionQty = inspectionQty;
}
public String getQualifiedQty() {
public BigDecimal getQualifiedQty() {
return qualifiedQty;
}
public void setQualifiedQty(String qualifiedQty) {
public void setQualifiedQty(BigDecimal qualifiedQty) {
this.qualifiedQty = qualifiedQty;
}
public String getUnqualifiedQty() {
public BigDecimal getUnqualifiedQty() {
return unqualifiedQty;
}
public void setUnqualifiedQty(String unqualifiedQty) {
public void setUnqualifiedQty(BigDecimal unqualifiedQty) {
this.unqualifiedQty = unqualifiedQty;
}
@ -173,11 +279,11 @@ public class QmsTaskItemBeen {
this.workshop = workshop;
}
public String getInspectionType() {
public Long getInspectionType() {
return inspectionType;
}
public void setInspectionType(String inspectionType) {
public void setInspectionType(Long inspectionType) {
this.inspectionType = inspectionType;
}
@ -276,4 +382,28 @@ public class QmsTaskItemBeen {
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
public String getQcInspectionType() {
return qcInspectionType;
}
public void setQcInspectionType(String qcInspectionType) {
this.qcInspectionType = qcInspectionType;
}
public String getTypeName() {
return typeName;
}
public void setTypeName(String typeName) {
this.typeName = typeName;
}
public List<QcInspectionResult> getResults() {
return results;
}
public void setResults(List<QcInspectionResult> results) {
this.results = results;
}
}

@ -0,0 +1,318 @@
package com.example.haiwei_mom.data.check;
import android.text.Editable;
import android.util.Log;
import androidx.databinding.BaseObservable;
import java.math.BigDecimal;
/**
* qc_inspection_result
*
* @author zch
* @date 2025-07-24
*/
public class QcInspectionResult extends BaseObservable {
/**
*
*/
private Long resultId;
/**
* ID
*/
private Long inspectionId;
/**
* ID
*/
private Long itemId;
/**
* 012
*/
private String detectResult;
private String detectResultName;
public String getDetectResultName() {
if (detectResult==null || detectResult.isEmpty()) return "未判定";
if (detectResult.equals("0")) return "合格";
if (detectResult.equals("1")) return "不合格";
return null;
}
public void click(String status){
Log.e("TAG", "click:" + status);
setDetectResult(status);
}
/**
*
*/
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");
}
}
/**
*
*/
private String specInspection;
/**
*
*/
private String problemDetail;
/**
*
*/
private String itemCode;
/**
*
*/
private String itemName;
/**
*
*/
private String inspectionPosition;
/**
*
*/
private String categoryName;
/**
*
*/
private Long typeId;
/**
* 0,1
*/
private String detectType;
/**
* (0,1)
*/
private String controlType;
/**
*
*/
private BigDecimal standardValue;
/**
*
*/
private double upperLimit;
/**
*
*/
private double lowerLimit;
/**
*
*/
private String specName;
/**
*
*/
private String specUpper;
/**
*
*/
private String specLower;
/**
*
*/
private String description;
public Long getResultId() {
return resultId;
}
public void setResultId(Long resultId) {
this.resultId = resultId;
}
public Long getInspectionId() {
return inspectionId;
}
public void setInspectionId(Long inspectionId) {
this.inspectionId = inspectionId;
}
public Long getItemId() {
return itemId;
}
public void setItemId(Long itemId) {
this.itemId = itemId;
}
public String getDetectResult() {
return detectResult;
}
public void setDetectResult(String detectResult) {
this.detectResult = detectResult;
notifyChange();
}
public String getDetectValue() {
return detectValue;
}
public void setDetectValue(String detectValue) {
this.detectValue = detectValue;
}
public String getSpecInspection() {
return specInspection;
}
public void setSpecInspection(String specInspection) {
this.specInspection = specInspection;
}
public String getProblemDetail() {
return problemDetail;
}
public void setProblemDetail(String problemDetail) {
this.problemDetail = problemDetail;
}
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 getDetectType() {
return detectType;
}
public void setDetectType(String detectType) {
this.detectType = detectType;
}
public String getControlType() {
return controlType;
}
public void setControlType(String controlType) {
this.controlType = controlType;
}
public BigDecimal getStandardValue() {
return standardValue;
}
public void setStandardValue(BigDecimal standardValue) {
this.standardValue = standardValue;
}
public double getUpperLimit() {
return upperLimit;
}
public void setUpperLimit(double upperLimit) {
this.upperLimit = upperLimit;
}
public double getLowerLimit() {
return lowerLimit;
}
public void setLowerLimit(double lowerLimit) {
this.lowerLimit = lowerLimit;
}
public String getSpecName() {
return specName;
}
public void setSpecName(String specName) {
this.specName = specName;
}
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;
}
}

@ -4,16 +4,25 @@
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="title"
type="String" />
<variable
name="title"
type="String" />
<variable
name="vm"
type="com.example.haiwei_mom.data.check.CheckResult" />
type="com.example.haiwei_mom.data.check.QcInspectionMain" />
<variable
name="adapter"
type="com.example.haiwei_mom.adapter.check.CheckWorkAdapter" />
<import type="android.view.View"/>
<import type="android.view.View" />
<variable
name="adapter1"
type="com.example.haiwei_mom.adapter.check.DisposalFileAdapter" />
</data>
<LinearLayout
@ -32,16 +41,17 @@
android:layout_height="45dp"
android:layout_margin="8dp"
android:background="@drawable/san_text_bg"
android:padding="4dp">
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:paddingLeft="10dp"
android:background="@color/white"
android:hint="请 输入/扫描 物料条码" />
android:hint="请 输入/扫描 物料条码"
android:paddingLeft="10dp" />
<ImageView
android:layout_width="wrap_content"
@ -52,138 +62,101 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginEnd="4dp">
android:layout_height="40dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="检验规则:" />
android:text='检测类型' />
<TextView
style="@style/text_info"
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.checkRuleName}" />
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="检验方式:" />
android:text='@{vm.typeName}' />
<TextView
style="@style/text_info"
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.checkMode==null?"":(vm.checkMode+"("+vm.checkSample+"%)")}' />
android:text='@{vm.inspectionNo}' />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp">
android:layout_height="40dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
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.barcode}" />
</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/text_info"
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/text_title"
android:layout_width="90dp"
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="物料名称:" />
<TextView
style="@style/text_info"
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="45dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="检验类型:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.checkMode}" />
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="检验状态:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.checkStatus}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="38dp"
android:layout_marginTop="10dp"
android:background="@color/white"
android:paddingLeft="5dp"
android:paddingRight="5dp">
<TextView
style="@style/item_title"
android:layout_width="35dp"
android:layout_height="match_parent"
android:text="序号" />
<TextView
style="@style/item_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="项目名称" />
<TextView
style="@style/item_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="值" />
<TextView
style="@style/item_title"
android:layout_width="50dp"
android:layout_height="match_parent"
android:text="结果" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -193,13 +166,37 @@
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" />
<ImageView
android:id="@+id/disposal_file_add"
android:layout_width="50dp"
android:layout_height="match_parent"
android:onClick="tackphoto"
android:src="@mipmap/ic_add_file" />
</LinearLayout>
<Button
style="@style/button_style"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="12dp"
android:visibility="@{vm.visbleStatus ? View.VISIBLE :View.GONE }"
android:text="提交"
android:layout_margin="5dp"
android:onClick="checkSubmit"
style="@style/button_style"/>
android:text="提交" />
</LinearLayout>
</layout>

@ -4,7 +4,7 @@
<data>
<variable
name="item"
type="com.example.haiwei_mom.data.check.CheckResultDetal" />
type="com.example.haiwei_mom.data.check.QcInspectionResult" />
<variable
name="enabledState"
type="Boolean" />
@ -20,18 +20,14 @@
android:layout_height="match_parent"
android:layout_weight="1">
<TextView
style="@style/item_title"
android:layout_width="35dp"
android:layout_height="match_parent"
android:text="@{String.valueOf(item.index)}" />
<TextView
style="@style/item_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{item.checkProjectName}" />
android:text="@{item.description}" />
<RadioGroup
android:layout_width="match_parent"
@ -42,7 +38,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:onClick='@{()-> item.click("1")}'
android:onClick='@{()-> item.click("0")}'
android:enabled="@{enabledState}"
android:text="合格"/>
<RadioButton
@ -50,7 +46,7 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:enabled="@{enabledState}"
android:onClick='@{()-> item.click("0")}'
android:onClick='@{()-> item.click("1")}'
android:text="不合格"/>
</RadioGroup>
@ -59,7 +55,7 @@
style="@style/item_title"
android:layout_width="50dp"
android:layout_height="match_parent"
android:text="@{item.checkStatusShow}" />
android:text="@{item.detectResultName}" />
</LinearLayout>
<View

@ -2,9 +2,11 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="item"
type="com.example.haiwei_mom.data.check.CheckResultDetal" />
type="com.example.haiwei_mom.data.check.QcInspectionResult" />
<variable
name="enabledState"
type="Boolean" />
@ -12,48 +14,80 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp"
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='@{item.standardValue+"("+item.lowerLimit+"~"+item.upperLimit+")"}' />
<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='@{item.standardValue+"("+item.lowerLimit+"~"+item.upperLimit+")"}' />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<TextView
style="@style/item_title"
android:layout_width="35dp"
android:layout_height="match_parent"
android:text="@{String.valueOf(item.index)}" />
<TextView
style="@style/item_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{item.checkProjectName}" />
android:text="@{item.description}" />
<EditText
style="@style/item_title"
android:background="@drawable/san_text_bg"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_weight="1"
android:inputType="numberDecimal"
android:background="@drawable/san_text_bg"
android:enabled="@{enabledState}"
android:text='@={item.checkProjectResult}' />
<!-- android:afterTextChanged="@{item.textChanged}"-->
android:inputType="numberDecimal"
android:text='@={item.detectValue}'
android:afterTextChanged="@{item.textChanged}"/>
<TextView
style="@style/item_title"
android:layout_width="50dp"
android:layout_height="match_parent"
android:text="@{item.checkStatusShow}" />
android:text="@{item.detectResultName}" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#e1e1e1"/>
android:background="#e1e1e1" />
</LinearLayout>
</layout>

@ -5,7 +5,7 @@
<variable
name="vm"
type="com.example.haiwei_mom.data.check.QmsTaskItemBeen" />
type="com.example.haiwei_mom.data.check.QcInspectionMain" />
</data>
<LinearLayout
@ -32,7 +32,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.inspectionType}' />
android:text='@{vm.typeName}' />
<TextView
style="@style/item_title_blue"
@ -45,7 +45,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="null" />
android:text="" />
</LinearLayout>
@ -128,7 +128,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='null' />
/>
<TextView
style="@style/item_title_blue"
@ -141,7 +141,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="null" />
android:text='@{vm.materialType}' />
</LinearLayout>

Loading…
Cancel
Save