|
@@ -23,6 +23,7 @@ import com.yinhebairong.clasmanage.entity.ChildrenListEntity; |
|
@@ -23,6 +23,7 @@ import com.yinhebairong.clasmanage.entity.ChildrenListEntity; |
23
|
import com.yinhebairong.clasmanage.entity.LoginEntity;
|
23
|
import com.yinhebairong.clasmanage.entity.LoginEntity;
|
24
|
import com.yinhebairong.clasmanage.m.M;
|
24
|
import com.yinhebairong.clasmanage.m.M;
|
25
|
import com.yinhebairong.clasmanage.ui.MainActivity;
|
25
|
import com.yinhebairong.clasmanage.ui.MainActivity;
|
|
|
26
|
+import com.yinhebairong.clasmanage.ui.login.LoginActivity;
|
26
|
import com.yinhebairong.clasmanage.utils.SharedPreferenceUtil;
|
27
|
import com.yinhebairong.clasmanage.utils.SharedPreferenceUtil;
|
27
|
import com.yinhebairong.clasmanage.widget.CircleImageView;
|
28
|
import com.yinhebairong.clasmanage.widget.CircleImageView;
|
28
|
|
29
|
|
|
@@ -115,9 +116,13 @@ public class Select_StudentActivity extends BaseActivity { |
|
@@ -115,9 +116,13 @@ public class Select_StudentActivity extends BaseActivity { |
115
|
// SharedPreferenceUtil.put(Select_StudentActivity.this,M.StudentId,loginEntity.getData().getUser().getStudentInfoList().get(position).getId());
|
116
|
// SharedPreferenceUtil.put(Select_StudentActivity.this,M.StudentId,loginEntity.getData().getUser().getStudentInfoList().get(position).getId());
|
116
|
// SharedPreferenceUtil.put(Select_StudentActivity.this,M.ClassId,loginEntity.getData().getUser().getStudentInfoList().get(position).getClassId());
|
117
|
// SharedPreferenceUtil.put(Select_StudentActivity.this,M.ClassId,loginEntity.getData().getUser().getStudentInfoList().get(position).getClassId());
|
117
|
// SharedPreferenceUtil.put(Select_StudentActivity.this,M.StudentName,loginEntity.getData().getUser().getStudentInfoList().get(position).getStudentName());
|
118
|
// SharedPreferenceUtil.put(Select_StudentActivity.this,M.StudentName,loginEntity.getData().getUser().getStudentInfoList().get(position).getStudentName());
|
|
|
119
|
+
|
|
|
120
|
+ SharedPreferenceUtil.put(Select_StudentActivity.this, M.SCORE_LEVEL, baseStudentSelectAdapter.getData().get(position).getScore_level());
|
|
|
121
|
+ SharedPreferenceUtil.put(Select_StudentActivity.this, M.SCORE_LEVEL_COLOR, baseStudentSelectAdapter.getData().get(position).getScore_level_color());
|
|
|
122
|
+
|
118
|
Intent intent = new Intent(Select_StudentActivity.this, StudentHeadImgActivity.class);
|
123
|
Intent intent = new Intent(Select_StudentActivity.this, StudentHeadImgActivity.class);
|
119
|
- intent.putExtra("student_id",baseStudentSelectAdapter.getData().get(position).getId());
|
|
|
120
|
- intent.putExtra("student_img",baseStudentSelectAdapter.getData().get(position).getPhoto());
|
124
|
+ intent.putExtra("student_id", baseStudentSelectAdapter.getData().get(position).getId());
|
|
|
125
|
+ intent.putExtra("student_img", baseStudentSelectAdapter.getData().get(position).getPhoto());
|
121
|
startActivity(intent);
|
126
|
startActivity(intent);
|
122
|
finish();
|
127
|
finish();
|
123
|
}
|
128
|
}
|
|
@@ -126,17 +131,17 @@ public class Select_StudentActivity extends BaseActivity { |
|
@@ -126,17 +131,17 @@ public class Select_StudentActivity extends BaseActivity { |
126
|
@Override
|
131
|
@Override
|
127
|
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
132
|
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
128
|
Config.id = baseStudentSelectAdapter.getData().get(position).getId();
|
133
|
Config.id = baseStudentSelectAdapter.getData().get(position).getId();
|
129
|
- Config.Student_name=baseStudentSelectAdapter.getData().get(position).getName();
|
|
|
130
|
- Config.StudentPhoto=baseStudentSelectAdapter.getData().get(position).getPhoto();
|
|
|
131
|
- for(LoginEntity.DataBean.UserBean.StudentInfoListBean bean:loginEntity.getData().getUser().getStudentInfoList()){
|
|
|
132
|
- if(bean.getId()==Config.id){
|
|
|
133
|
- Config.ClassId=bean.getClassId();
|
134
|
+ Config.Student_name = baseStudentSelectAdapter.getData().get(position).getName();
|
|
|
135
|
+ Config.StudentPhoto = baseStudentSelectAdapter.getData().get(position).getPhoto();
|
|
|
136
|
+ for (LoginEntity.DataBean.UserBean.StudentInfoListBean bean : loginEntity.getData().getUser().getStudentInfoList()) {
|
|
|
137
|
+ if (bean.getId() == Config.id) {
|
|
|
138
|
+ Config.ClassId = bean.getClassId();
|
134
|
}
|
139
|
}
|
135
|
}
|
140
|
}
|
136
|
- SharedPreferenceUtil.put(Select_StudentActivity.this,M.STUDENTPHOTO,baseStudentSelectAdapter.getData().get(position).getPhoto());
|
|
|
137
|
- SharedPreferenceUtil.put(Select_StudentActivity.this,M.StudentId,loginEntity.getData().getUser().getStudentInfoList().get(position).getId());
|
|
|
138
|
- SharedPreferenceUtil.put(Select_StudentActivity.this,M.ClassId,loginEntity.getData().getUser().getStudentInfoList().get(position).getClassId());
|
|
|
139
|
- SharedPreferenceUtil.put(Select_StudentActivity.this,M.StudentName,loginEntity.getData().getUser().getStudentInfoList().get(position).getStudentName());
|
141
|
+ SharedPreferenceUtil.put(Select_StudentActivity.this, M.STUDENTPHOTO, baseStudentSelectAdapter.getData().get(position).getPhoto());
|
|
|
142
|
+ SharedPreferenceUtil.put(Select_StudentActivity.this, M.StudentId, loginEntity.getData().getUser().getStudentInfoList().get(position).getId());
|
|
|
143
|
+ SharedPreferenceUtil.put(Select_StudentActivity.this, M.ClassId, loginEntity.getData().getUser().getStudentInfoList().get(position).getClassId());
|
|
|
144
|
+ SharedPreferenceUtil.put(Select_StudentActivity.this, M.StudentName, loginEntity.getData().getUser().getStudentInfoList().get(position).getStudentName());
|
140
|
Intent intent = new Intent(Select_StudentActivity.this, MainActivity.class);
|
145
|
Intent intent = new Intent(Select_StudentActivity.this, MainActivity.class);
|
141
|
startActivity(intent);
|
146
|
startActivity(intent);
|
142
|
setResult(RESULT_OK);
|
147
|
setResult(RESULT_OK);
|
|
@@ -155,6 +160,7 @@ public class Select_StudentActivity extends BaseActivity { |
|
@@ -155,6 +160,7 @@ public class Select_StudentActivity extends BaseActivity { |
155
|
class BaseStudentSelectAdapter extends BaseQuickAdapter<ChildrenListEntity.DataBean, BaseViewHolder> {
|
160
|
class BaseStudentSelectAdapter extends BaseQuickAdapter<ChildrenListEntity.DataBean, BaseViewHolder> {
|
156
|
|
161
|
|
157
|
private Context mContext;
|
162
|
private Context mContext;
|
|
|
163
|
+
|
158
|
public BaseStudentSelectAdapter(int layoutResId, @Nullable List<ChildrenListEntity.DataBean> data, Context context) {
|
164
|
public BaseStudentSelectAdapter(int layoutResId, @Nullable List<ChildrenListEntity.DataBean> data, Context context) {
|
159
|
super(layoutResId, data);
|
165
|
super(layoutResId, data);
|
160
|
this.mContext = context;
|
166
|
this.mContext = context;
|