...
|
...
|
@@ -23,6 +23,7 @@ import com.yinhebairong.clasmanage.entity.ChildrenListEntity; |
|
|
import com.yinhebairong.clasmanage.entity.LoginEntity;
|
|
|
import com.yinhebairong.clasmanage.m.M;
|
|
|
import com.yinhebairong.clasmanage.ui.MainActivity;
|
|
|
import com.yinhebairong.clasmanage.ui.login.LoginActivity;
|
|
|
import com.yinhebairong.clasmanage.utils.SharedPreferenceUtil;
|
|
|
import com.yinhebairong.clasmanage.widget.CircleImageView;
|
|
|
|
...
|
...
|
@@ -115,9 +116,13 @@ public class Select_StudentActivity extends BaseActivity { |
|
|
// SharedPreferenceUtil.put(Select_StudentActivity.this,M.StudentId,loginEntity.getData().getUser().getStudentInfoList().get(position).getId());
|
|
|
// SharedPreferenceUtil.put(Select_StudentActivity.this,M.ClassId,loginEntity.getData().getUser().getStudentInfoList().get(position).getClassId());
|
|
|
// SharedPreferenceUtil.put(Select_StudentActivity.this,M.StudentName,loginEntity.getData().getUser().getStudentInfoList().get(position).getStudentName());
|
|
|
|
|
|
SharedPreferenceUtil.put(Select_StudentActivity.this, M.SCORE_LEVEL, baseStudentSelectAdapter.getData().get(position).getScore_level());
|
|
|
SharedPreferenceUtil.put(Select_StudentActivity.this, M.SCORE_LEVEL_COLOR, baseStudentSelectAdapter.getData().get(position).getScore_level_color());
|
|
|
|
|
|
Intent intent = new Intent(Select_StudentActivity.this, StudentHeadImgActivity.class);
|
|
|
intent.putExtra("student_id",baseStudentSelectAdapter.getData().get(position).getId());
|
|
|
intent.putExtra("student_img",baseStudentSelectAdapter.getData().get(position).getPhoto());
|
|
|
intent.putExtra("student_id", baseStudentSelectAdapter.getData().get(position).getId());
|
|
|
intent.putExtra("student_img", baseStudentSelectAdapter.getData().get(position).getPhoto());
|
|
|
startActivity(intent);
|
|
|
finish();
|
|
|
}
|
...
|
...
|
@@ -126,17 +131,17 @@ public class Select_StudentActivity extends BaseActivity { |
|
|
@Override
|
|
|
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
|
|
Config.id = baseStudentSelectAdapter.getData().get(position).getId();
|
|
|
Config.Student_name=baseStudentSelectAdapter.getData().get(position).getName();
|
|
|
Config.StudentPhoto=baseStudentSelectAdapter.getData().get(position).getPhoto();
|
|
|
for(LoginEntity.DataBean.UserBean.StudentInfoListBean bean:loginEntity.getData().getUser().getStudentInfoList()){
|
|
|
if(bean.getId()==Config.id){
|
|
|
Config.ClassId=bean.getClassId();
|
|
|
Config.Student_name = baseStudentSelectAdapter.getData().get(position).getName();
|
|
|
Config.StudentPhoto = baseStudentSelectAdapter.getData().get(position).getPhoto();
|
|
|
for (LoginEntity.DataBean.UserBean.StudentInfoListBean bean : loginEntity.getData().getUser().getStudentInfoList()) {
|
|
|
if (bean.getId() == Config.id) {
|
|
|
Config.ClassId = bean.getClassId();
|
|
|
}
|
|
|
}
|
|
|
SharedPreferenceUtil.put(Select_StudentActivity.this,M.STUDENTPHOTO,baseStudentSelectAdapter.getData().get(position).getPhoto());
|
|
|
SharedPreferenceUtil.put(Select_StudentActivity.this,M.StudentId,loginEntity.getData().getUser().getStudentInfoList().get(position).getId());
|
|
|
SharedPreferenceUtil.put(Select_StudentActivity.this,M.ClassId,loginEntity.getData().getUser().getStudentInfoList().get(position).getClassId());
|
|
|
SharedPreferenceUtil.put(Select_StudentActivity.this,M.StudentName,loginEntity.getData().getUser().getStudentInfoList().get(position).getStudentName());
|
|
|
SharedPreferenceUtil.put(Select_StudentActivity.this, M.STUDENTPHOTO, baseStudentSelectAdapter.getData().get(position).getPhoto());
|
|
|
SharedPreferenceUtil.put(Select_StudentActivity.this, M.StudentId, loginEntity.getData().getUser().getStudentInfoList().get(position).getId());
|
|
|
SharedPreferenceUtil.put(Select_StudentActivity.this, M.ClassId, loginEntity.getData().getUser().getStudentInfoList().get(position).getClassId());
|
|
|
SharedPreferenceUtil.put(Select_StudentActivity.this, M.StudentName, loginEntity.getData().getUser().getStudentInfoList().get(position).getStudentName());
|
|
|
Intent intent = new Intent(Select_StudentActivity.this, MainActivity.class);
|
|
|
startActivity(intent);
|
|
|
setResult(RESULT_OK);
|
...
|
...
|
@@ -155,6 +160,7 @@ public class Select_StudentActivity extends BaseActivity { |
|
|
class BaseStudentSelectAdapter extends BaseQuickAdapter<ChildrenListEntity.DataBean, BaseViewHolder> {
|
|
|
|
|
|
private Context mContext;
|
|
|
|
|
|
public BaseStudentSelectAdapter(int layoutResId, @Nullable List<ChildrenListEntity.DataBean> data, Context context) {
|
|
|
super(layoutResId, data);
|
|
|
this.mContext = context;
|
...
|
...
|
|