|
|
|
|
@ -37,6 +37,7 @@ import com.lzy.okgo.request.base.Request;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
|
|
|
|
import okhttp3.RequestBody;
|
|
|
|
|
|
|
|
|
|
@ -121,13 +122,18 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
|
|
|
|
|
checkViewModel.setName(result.getMsg());
|
|
|
|
|
topDefects = gson.fromJson(gson.toJson(result.getData()), new TypeToken<List<DefectBeen>>() {
|
|
|
|
|
}.getType());
|
|
|
|
|
if (topDefects == null || topDefects.isEmpty()) {
|
|
|
|
|
if (topDefects == null || topDefects.isEmpty() ) {
|
|
|
|
|
Toast.makeText(CheckActivity.this, "本工位无需检查返修情况", Toast.LENGTH_SHORT).show();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
checkViewModel.setButtonVisbleState(true);
|
|
|
|
|
tipDialog.setList(topDefects);
|
|
|
|
|
tipDialog.show();
|
|
|
|
|
Optional<Boolean> checkState = topDefects.stream().findFirst().map(item -> !item.getQualityDefectName().equals("完成"));
|
|
|
|
|
|
|
|
|
|
if (checkState.get()){
|
|
|
|
|
tipDialog.show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*// 直接添加提交数据中submitList.addAll(defectBeens);
|
|
|
|
|
checkAdapter.notifyDataSetChanged();*/
|
|
|
|
|
@ -151,8 +157,9 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void checkSubmint1(View view) {
|
|
|
|
|
sanInfo("B24031483025025351528");
|
|
|
|
|
} // 提交
|
|
|
|
|
sanInfo(binding.checkTeskCode.getText().toString());
|
|
|
|
|
}
|
|
|
|
|
// 提交
|
|
|
|
|
public void checkSubmint(View view) {
|
|
|
|
|
if (checkViewModel.getName() == null || checkViewModel.getName().isEmpty()) return;
|
|
|
|
|
checkViewModel.setList(submitList);
|
|
|
|
|
|