完成 不合格处置查询

master
wangh 9 months ago
parent a09430d513
commit 0480045421

@ -67,35 +67,44 @@ public class CheckDisposalActivity extends BaseActivity implements DisposalFileA
}
private void initRequest() {
OkGo.<MyResult>get(url + "/qms/mobile/getCheckResult4Handle").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")).params("checkResultId", 2).params("materialBatch", "123").params("checkMode", 1).params("checkSample", "10").params("materialCode", "111").params("materialName", "物料测试").execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
CheckDisposalBeen been = gson.fromJson(body.getData().toString(), CheckDisposalBeen.class);
binding.setVm(been);
infoList = been.getQmsQualityInstanceActivities();
infoAdapter.setList(infoList);
infoAdapter.notifyDataSetChanged();
filesList = been.getQmsCheckInstanceFiles();
if (filesList == null || filesList.isEmpty()) {
binding.disposalFileAdd.setVisibility(View.VISIBLE);
filesList = new ArrayList<>();
files = new ArrayList<>();
fileAdapter.setList(filesList);
} else {
binding.disposalFileAdd.setVisibility(View.GONE);
// files = new ArrayList<>();
fileAdapter.setList(filesList);
fileAdapter.notifyDataSetChanged();
var intent = getIntent();
OkGo.<MyResult>get(url + "/qms/mobile/getCheckResult4Handle").tag(this)
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.params("checkResultId", intent.getIntExtra("checkResultId",0))
.params("materialBatch", intent.getStringExtra("materialBatch"))
.params("checkMode", intent.getStringExtra("checkMode"))
.params("checkSample", intent.getStringExtra("checkSample"))
.params("materialCode", intent.getStringExtra("materialCode"))
.params("materialName", intent.getStringExtra("materialName"))
.params("checkRuleType", intent.getStringExtra("checkRuleType"))
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
CheckDisposalBeen been = gson.fromJson(body.getData().toString(), CheckDisposalBeen.class);
binding.setVm(been);
infoList = been.getQmsQualityInstanceActivities();
infoAdapter.setList(infoList);
infoAdapter.notifyDataSetChanged();
filesList = been.getQmsCheckInstanceFiles();
if (filesList == null || filesList.isEmpty()) {
binding.disposalFileAdd.setVisibility(View.VISIBLE);
filesList = new ArrayList<>();
files = new ArrayList<>();
fileAdapter.setList(filesList);
} else {
binding.disposalFileAdd.setVisibility(View.GONE);
fileAdapter.setList(filesList);
fileAdapter.notifyDataSetChanged();
}
}
Toast.makeText(context, body.getMsg(), Toast.LENGTH_SHORT).show();
}
}
Toast.makeText(context, body.getMsg(), Toast.LENGTH_SHORT).show();
}
});
});
}
// 图片的点击
@ -189,7 +198,7 @@ public class CheckDisposalActivity extends BaseActivity implements DisposalFileA
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
// finish();
finish();
}
Toast.makeText(context, body.getMsg(), Toast.LENGTH_SHORT).show();
}

@ -95,6 +95,7 @@ public class CheckSelectActivity extends BaseActivity implements ItemClickCall {
intent1.putExtra("materialBatch", materialBatch);
intent1.putExtra("materialCode",checkResult.getMaterialCode());
intent1.putExtra("materialName",checkResult.getMaterialName());
intent1.putExtra("checkRuleType",checkResult.getCheckRuleType());
startActivity(intent1);
}

@ -34,19 +34,7 @@ public class CheckDisposalBeen {
* @return
*/
public String getCheckRuleType() {
if (checkRuleType==null){
return null;
}
switch (checkRuleType) {
case "1":
return "来料检验";
case "2":
return "半成品检验";
case "3":
return "成品检验";
case "4":
return "工序检验";
}
return checkRuleType;
}

Loading…
Cancel
Save