完成 不合格处置查询

master
wangh 9 months ago
parent a09430d513
commit 0480045421

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

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

Loading…
Cancel
Save