作者 朱振飞

Merge branch 'retain' into 0414

... ... @@ -83,9 +83,6 @@ public class Jxt_ListAdapter extends BaseMultiItemQuickAdapter<JxtAllListEntity.
TextView gray_tv = helper.itemView.findViewById(R.id.gray_tv);
gray_tv.setText(item.getView_num()+ "人");
type_jl_tv.setText("接龙");
// if (item.getTitle()!=null){
// title_tv.setText(item.getTitle()+"");
// }
class_tv.setText(item.getClass_name());
if (item.getTeacher_name() != null) {
teacher_tv.setText(item.getTeacher_name());
... ... @@ -115,8 +112,6 @@ public class Jxt_ListAdapter extends BaseMultiItemQuickAdapter<JxtAllListEntity.
class_dc_tv.setText(item.getClass_name());
teacher_dc_tv.setText(item.getTeacher_name());
date_dc_tv.setText(item.getDate());
// yellow_tv.setText(item.getView_num()+"");
// gray_tv.setText("/"+item.getTotal_num());
if (item.getIs_online() == 1) {
state_dc_tv.setText("已提交");
} else if (item.getIs_online() == 0) {
... ... @@ -125,29 +120,6 @@ public class Jxt_ListAdapter extends BaseMultiItemQuickAdapter<JxtAllListEntity.
}
private void initHuoDong(BaseViewHolder helper, JxtAllListEntity.DataBeanX.DataBean item) {
// TextView leixing_text = helper.itemView.findViewById(R.id.leixing_text);
// TextView title = helper.itemView.findViewById(R.id.title);
// TextView content_tv = helper.itemView.findViewById(R.id.content_tv);
// TextView class_tv = helper.itemView.findViewById(R.id.class_tv);
// TextView teacher_tv = helper.itemView.findViewById(R.id.teacher_tv);
// TextView date_tv = helper.itemView.findViewById(R.id.date_tv);
// TextView state_tv = helper.itemView.findViewById(R.id.state_tv);
// TextView yellow_tv = helper.itemView.findViewById(R.id.yellow_tv);
// TextView gray_tv = helper.itemView.findViewById(R.id.gray_tv);
// leixing_text.setText("活动");
// title.setText(item.getTitle());
// content_tv.setText(item.getContent());
// class_tv.setText(item.getClass_name());
// teacher_tv.setText(item.getTeacher_name());
// date_tv.setText(item.getDate());
// yellow_tv.setText(item.getView_num()+"");
// gray_tv.setText("/"+item.getTotal_num());
// if (item.getIs_online()==1){
// state_tv.setText("已提交");
// }else if (item.getIs_online()==0){
// state_tv.setText("已查看");
// }
// helper.addOnClickListener(R.id.ck_lin);
TextView leixing_text = helper.itemView.findViewById(R.id.leixing_text);
TextView state_text = helper.itemView.findViewById(R.id.state_text);
TextView title = helper.itemView.findViewById(R.id.title);
... ... @@ -282,18 +254,28 @@ public class Jxt_ListAdapter extends BaseMultiItemQuickAdapter<JxtAllListEntity.
class_tv.setText(item.getClass_name());
teacher_tv.setText(item.getTeacher_name());
date_tv.setText(item.getDate());
yellow_tv.setText(item.getView_num() + "");
gray_tv.setText("/" + item.getTotal_num());
yellow_tv.setText(item.getView_num()+"");
gray_tv.setText("/"+item.getTotal_num());
state_text.setVisibility(View.GONE);
if (item.getUncomment_num().equals("")) {
if (item.getIs_author() == 1) {//1-自己发的 0-别人发的
massage_num.setVisibility(View.GONE);
} else {//不是我发的
if (item.getIs_read() == 1) {//已读
massage_num.setVisibility(View.GONE);
} else {
massage_num.setVisibility(View.VISIBLE);
massage_num.setText("1");
}
}
if (Config.IDENTITY == 0 && item.getIs_author() == 1) {//1-自己发的 0-别人发的
ck_lin.setVisibility(View.VISIBLE);
helper.addOnClickListener(R.id.ck_lin);
} else {
massage_num.setText(item.getUncomment_num() + "");
ck_lin.setVisibility(View.GONE);
}
helper.addOnClickListener(R.id.ck_lin);
if (item.getIs_online() == 0) {
if (item.getIs_online() ==0){
state_tv.setText("已查看");
} else {
}else {
state_tv.setText("已提交");
}
}
... ...
... ... @@ -41,7 +41,7 @@ public class Jxt_Zy_Adapter extends BaseQuickAdapter<JxtZyListEntity.DataBeanX.D
yellow_tv.setText(item.getView_num()+"");
gray_tv.setText("/"+item.getTotal_num());
state_text.setVisibility(View.GONE);
if (item.getUncomment_num().equals("")) {
if (item.getUncomment_num()==0) {
massage_num.setVisibility(View.GONE);
} else {
massage_num.setText(item.getUncomment_num() + "");
... ...
... ... @@ -162,7 +162,7 @@ public class HdLBBean {
private String parent_ids;
private String content;
private int student_id;
private int leave_type;
private String leave_type;
private String start_date;
private String end_date;
private int day;
... ... @@ -172,7 +172,7 @@ public class HdLBBean {
private String type_text;
private int total_num;
private int view_num;
private String uncomment_num;
private int uncomment_num;
private String class_name;
private String teacher_name;
private int is_author=0;//1-自己发的 0-别人发的 默认要为0 因为家长活动接口 没返回此字段
... ... @@ -299,11 +299,11 @@ public class HdLBBean {
this.student_id = student_id;
}
public int getLeave_type() {
public String getLeave_type() {
return leave_type;
}
public void setLeave_type(int leave_type) {
public void setLeave_type(String leave_type) {
this.leave_type = leave_type;
}
... ... @@ -379,11 +379,11 @@ public class HdLBBean {
this.view_num = view_num;
}
public String getUncomment_num() {
public int getUncomment_num() {
return uncomment_num;
}
public void setUncomment_num(String uncomment_num) {
public void setUncomment_num(int uncomment_num) {
this.uncomment_num = uncomment_num;
}
... ...
package com.yinhebairong.clasmanage.bean;
import java.util.List;
public class JxtQjBean {
/**
* code : 1
* msg : 列表数据
* time : 1586919554
* data : {"total":1,"per_page":10,"current_page":1,"last_page":1,"data":[{"type":7,"id":15,"create_time":1586850677,"title":"","teacher_id":"","class_id":"0","date":"04-14","deadline":0,"teacher_ids":"650202198106031608,53232419810902193X","parent_ids":"5390","content":"Ooooo","student_id":5390,"leave_type":"事假","start_date":"2020-04-14 00:00:00","end_date":"2020-04-15 00:00:00","day":1,"parent_id":"5d81e6637e63f82d2b711a10778","status":1,"is_online":0,"label":"请假","read_time":0,"type_text":"请假","total_num":0,"view_num":0,"uncomment_num":0,"class_name":"","teacher_name":null,"parent_name":"李翼飞","student_name":"李赫铭"}]}
*/
private int code;
private String msg;
private String time;
private DataBeanX data;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public DataBeanX getData() {
return data;
}
public void setData(DataBeanX data) {
this.data = data;
}
public static class DataBeanX {
/**
* total : 1
* per_page : 10
* current_page : 1
* last_page : 1
* data : [{"type":7,"id":15,"create_time":1586850677,"title":"","teacher_id":"","class_id":"0","date":"04-14","deadline":0,"teacher_ids":"650202198106031608,53232419810902193X","parent_ids":"5390","content":"Ooooo","student_id":5390,"leave_type":"事假","start_date":"2020-04-14 00:00:00","end_date":"2020-04-15 00:00:00","day":1,"parent_id":"5d81e6637e63f82d2b711a10778","status":1,"is_online":0,"label":"请假","read_time":0,"type_text":"请假","total_num":0,"view_num":0,"uncomment_num":0,"class_name":"","teacher_name":null,"parent_name":"李翼飞","student_name":"李赫铭"}]
*/
private int total;
private int per_page;
private int current_page;
private int last_page;
private List<DataBean> data;
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public int getPer_page() {
return per_page;
}
public void setPer_page(int per_page) {
this.per_page = per_page;
}
public int getCurrent_page() {
return current_page;
}
public void setCurrent_page(int current_page) {
this.current_page = current_page;
}
public int getLast_page() {
return last_page;
}
public void setLast_page(int last_page) {
this.last_page = last_page;
}
public List<DataBean> getData() {
return data;
}
public void setData(List<DataBean> data) {
this.data = data;
}
public static class DataBean {
/**
* type : 7
* id : 15
* create_time : 1586850677
* title :
* teacher_id :
* class_id : 0
* date : 04-14
* deadline : 0
* teacher_ids : 650202198106031608,53232419810902193X
* parent_ids : 5390
* content : Ooooo
* student_id : 5390
* leave_type : 事假
* start_date : 2020-04-14 00:00:00
* end_date : 2020-04-15 00:00:00
* day : 1
* parent_id : 5d81e6637e63f82d2b711a10778
* status : 1
* is_online : 0
* label : 请假
* read_time : 0
* type_text : 请假
* total_num : 0
* view_num : 0
* uncomment_num : 0
* class_name :
* teacher_name : null
* parent_name : 李翼飞
* student_name : 李赫铭
*/
private int type;
private int id;
private int create_time;
private String title;
private String teacher_id;
private String class_id;
private String date;
private int deadline;
private String teacher_ids;
private String parent_ids;
private String content;
private int student_id;
private String leave_type;
private String start_date;
private String end_date;
private int day;
private String parent_id;
private int status;
private int is_online;
private String label;
private int read_time;
private String type_text;
private int total_num;
private int view_num;
private int uncomment_num;
private String class_name;
private String teacher_name;
private String parent_name;
private String student_name;
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getCreate_time() {
return create_time;
}
public void setCreate_time(int create_time) {
this.create_time = create_time;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getTeacher_id() {
return teacher_id;
}
public void setTeacher_id(String teacher_id) {
this.teacher_id = teacher_id;
}
public String getClass_id() {
return class_id;
}
public void setClass_id(String class_id) {
this.class_id = class_id;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public int getDeadline() {
return deadline;
}
public void setDeadline(int deadline) {
this.deadline = deadline;
}
public String getTeacher_ids() {
return teacher_ids;
}
public void setTeacher_ids(String teacher_ids) {
this.teacher_ids = teacher_ids;
}
public String getParent_ids() {
return parent_ids;
}
public void setParent_ids(String parent_ids) {
this.parent_ids = parent_ids;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public int getStudent_id() {
return student_id;
}
public void setStudent_id(int student_id) {
this.student_id = student_id;
}
public String getLeave_type() {
return leave_type;
}
public void setLeave_type(String leave_type) {
this.leave_type = leave_type;
}
public String getStart_date() {
return start_date;
}
public void setStart_date(String start_date) {
this.start_date = start_date;
}
public String getEnd_date() {
return end_date;
}
public void setEnd_date(String end_date) {
this.end_date = end_date;
}
public int getDay() {
return day;
}
public void setDay(int day) {
this.day = day;
}
public String getParent_id() {
return parent_id;
}
public void setParent_id(String parent_id) {
this.parent_id = parent_id;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public int getIs_online() {
return is_online;
}
public void setIs_online(int is_online) {
this.is_online = is_online;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public int getRead_time() {
return read_time;
}
public void setRead_time(int read_time) {
this.read_time = read_time;
}
public String getType_text() {
return type_text;
}
public void setType_text(String type_text) {
this.type_text = type_text;
}
public int getTotal_num() {
return total_num;
}
public void setTotal_num(int total_num) {
this.total_num = total_num;
}
public int getView_num() {
return view_num;
}
public void setView_num(int view_num) {
this.view_num = view_num;
}
public int getUncomment_num() {
return uncomment_num;
}
public void setUncomment_num(int uncomment_num) {
this.uncomment_num = uncomment_num;
}
public String getClass_name() {
return class_name;
}
public void setClass_name(String class_name) {
this.class_name = class_name;
}
public String getTeacher_name() {
return teacher_name;
}
public void setTeacher_name(String teacher_name) {
this.teacher_name = teacher_name;
}
public String getParent_name() {
return parent_name;
}
public void setParent_name(String parent_name) {
this.parent_name = parent_name;
}
public String getStudent_name() {
return student_name;
}
public void setStudent_name(String student_name) {
this.student_name = student_name;
}
}
}
}
... ...
... ... @@ -146,7 +146,7 @@ public class DcwjEntity {
private String parent_ids;
private String content;
private int student_id;
private int leave_type;
private String leave_type;
private String start_date;
private String end_date;
private int day;
... ... @@ -256,11 +256,11 @@ public class DcwjEntity {
this.student_id = student_id;
}
public int getLeave_type() {
public String getLeave_type() {
return leave_type;
}
public void setLeave_type(int leave_type) {
public void setLeave_type(String leave_type) {
this.leave_type = leave_type;
}
... ...
... ... @@ -143,27 +143,53 @@ public class JxtAllListEntity {
private String teacher_ids;
private String parent_ids;
private String content;
private int student_id;
private int leave_type;
private String student_id;
private String leave_type;
private String start_date;
private String end_date;
private int day;
private String parent_id;
private int status;
private int is_online;
private String label;
private String type_text;
private int total_num;
private int view_num;
private String uncomment_num;
private int uncomment_num;
private String class_name;
private String teacher_name;
private String status_text;
private int detail_id;
private int is_author;
private int detail_id;
private int status;
private String label;
private int read_time;
private String type_text;
private String status_text;
private int is_read;
private int itemType;
private String parent_name;
private String student_name;
public String getParent_name() {
return parent_name;
}
public void setParent_name(String parent_name) {
this.parent_name = parent_name;
}
public String getStudent_name() {
return student_name;
}
public void setStudent_name(String student_name) {
this.student_name = student_name;
}
public int getRead_time() {
return read_time;
}
public void setRead_time(int read_time) {
this.read_time = read_time;
}
public int getIs_read() {
return is_read;
... ... @@ -307,19 +333,19 @@ public class JxtAllListEntity {
this.content = content;
}
public int getStudent_id() {
public String getStudent_id() {
return student_id;
}
public void setStudent_id(int student_id) {
public void setStudent_id(String student_id) {
this.student_id = student_id;
}
public int getLeave_type() {
public String getLeave_type() {
return leave_type;
}
public void setLeave_type(int leave_type) {
public void setLeave_type(String leave_type) {
this.leave_type = leave_type;
}
... ... @@ -395,11 +421,11 @@ public class JxtAllListEntity {
this.view_num = view_num;
}
public String getUncomment_num() {
public int getUncomment_num() {
return uncomment_num;
}
public void setUncomment_num(String uncomment_num) {
public void setUncomment_num(int uncomment_num) {
this.uncomment_num = uncomment_num;
}
... ...
... ... @@ -144,7 +144,7 @@ public class JxtJlEntity {
private String parent_ids;
private String content;
private int student_id;
private int leave_type;
private String leave_type;
private String start_date;
private String end_date;
private int day;
... ... @@ -154,7 +154,7 @@ public class JxtJlEntity {
private String type_text;
private String total_num;
private String view_num;
private String uncomment_num;
private int uncomment_num;
private String class_name;
private String teacher_name;
... ... @@ -254,11 +254,11 @@ public class JxtJlEntity {
this.student_id = student_id;
}
public int getLeave_type() {
public String getLeave_type() {
return leave_type;
}
public void setLeave_type(int leave_type) {
public void setLeave_type(String leave_type) {
this.leave_type = leave_type;
}
... ... @@ -334,11 +334,11 @@ public class JxtJlEntity {
this.view_num = view_num;
}
public String getUncomment_num() {
public int getUncomment_num() {
return uncomment_num;
}
public void setUncomment_num(String uncomment_num) {
public void setUncomment_num(int uncomment_num) {
this.uncomment_num = uncomment_num;
}
... ...
... ... @@ -144,7 +144,7 @@ public class JxtZyListEntity {
private String parent_ids;
private String content;
private int student_id;
private int leave_type;
private String leave_type;
private String start_date;
private String end_date;
private int day;
... ... @@ -152,7 +152,7 @@ public class JxtZyListEntity {
private int is_online;
private int total_num;
private int view_num;
private String uncomment_num;
private int uncomment_num;
private String class_name;
private String teacher_name;
private int is_author;
... ... @@ -291,11 +291,11 @@ public class JxtZyListEntity {
this.student_id = student_id;
}
public int getLeave_type() {
public String getLeave_type() {
return leave_type;
}
public void setLeave_type(int leave_type) {
public void setLeave_type(String leave_type) {
this.leave_type = leave_type;
}
... ... @@ -355,11 +355,11 @@ public class JxtZyListEntity {
this.view_num = view_num;
}
public String getUncomment_num() {
public int getUncomment_num() {
return uncomment_num;
}
public void setUncomment_num(String uncomment_num) {
public void setUncomment_num(int uncomment_num) {
this.uncomment_num = uncomment_num;
}
... ...
... ... @@ -144,7 +144,7 @@ public class JxttpEntity {
private String parent_ids;
private String content;
private int student_id;
private int leave_type;
private String leave_type;
private String start_date;
private String end_date;
private int day;
... ... @@ -254,11 +254,11 @@ public class JxttpEntity {
this.student_id = student_id;
}
public int getLeave_type() {
public String getLeave_type() {
return leave_type;
}
public void setLeave_type(int leave_type) {
public void setLeave_type(String leave_type) {
this.leave_type = leave_type;
}
... ...
... ... @@ -156,7 +156,7 @@ public class JxttzEntity {
private String parent_ids;
private String content;
private int student_id;
private int leave_type;
private String leave_type;
private String start_date;
private String end_date;
private int day;
... ... @@ -287,11 +287,11 @@ public class JxttzEntity {
this.student_id = student_id;
}
public int getLeave_type() {
public String getLeave_type() {
return leave_type;
}
public void setLeave_type(int leave_type) {
public void setLeave_type(String leave_type) {
this.leave_type = leave_type;
}
... ...
... ... @@ -157,7 +157,7 @@ public class TzlistJzEntity {
private String type_text;
private int total_num;
private int view_num;
private String uncomment_num;
private int uncomment_num;
private String class_name;
private String teacher_name;
private String status_text;
... ... @@ -348,11 +348,11 @@ public class TzlistJzEntity {
this.view_num = view_num;
}
public String getUncomment_num() {
public int getUncomment_num() {
return uncomment_num;
}
public void setUncomment_num(String uncomment_num) {
public void setUncomment_num(int uncomment_num) {
this.uncomment_num = uncomment_num;
}
... ...
... ... @@ -35,6 +35,7 @@ import com.yinhebairong.clasmanage.utils.CalendarStringtUtil;
import com.yinhebairong.clasmanage.utils.SharedPreferenceUtil;
import com.yinhebairong.clasmanage.view.pickerwheelview.builder.TimePickerBuilder;
import com.yinhebairong.clasmanage.view.pickerwheelview.listener.OnTimeSelectListener;
import com.yinhebairong.clasmanage.view.pickerwheelview.utils.MyDataFormatUtil;
import com.yinhebairong.clasmanage.view.pickerwheelview.view.TimePickerView;
import java.text.SimpleDateFormat;
... ... @@ -66,6 +67,8 @@ public class All_Fragment extends BaseFragment {
TextView tv_time;
@BindView(R.id.my_sw)
SwipeRefreshLayout my_sw;
@BindView(R.id.tv_week)
TextView tv_week;
private TimePickerView mTimePicker3;//三级时间 年月日
private int PageNum;
private boolean isLoneMore = false;
... ... @@ -80,11 +83,12 @@ public class All_Fragment extends BaseFragment {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA);
String dateString = simpleDateFormat.format(calendar.getTime());
tv_time.setText(dateString);
tv_week.setText(MyDataFormatUtil.dateToWeek(dateString));
mTimePicker3 = new TimePickerBuilder(getActivity(), new OnTimeSelectListener() {
@Override
public void onTimeSelect(String date, View v) {
tv_time.setText(date);
tv_week.setText(MyDataFormatUtil.dateToWeek(date));
Calendar calendar = Calendar.getInstance();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA);
String dateString = simpleDateFormat.format(calendar.getTime());
... ... @@ -368,43 +372,7 @@ public class All_Fragment extends BaseFragment {
@Override
public void onError(Throwable e) {
String json = (String) SharedPreferenceUtil.get(getActivity(), "UserBody", "");
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), "{\"params\":" + json + "}");
LoginStore.createApi(ApiService.class)
.loginInfo(body)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<LoginEntity>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(LoginEntity entity) {
if (entity.getCode() == 1000) {
M.toast(getActivity(), "登录成功");
Config.Token = entity.getData().getToken();
Config.ClassId = entity.getData().getUser().getClassId();
SharedPreferenceUtil.put(getActivity(), M.Token, entity.getData().getToken() + "");
SharedPreferenceUtil.put(getActivity(), M.ClassId, entity.getData().getUser().getClassId() + "");
SharedPreferenceUtil.put(getActivity(), M.UserBody, json + "");
}else {
M.toast(getActivity(), "登录失败");
}
}
@Override
public void onError(Throwable e) {
Log.e("onError", e.getMessage().trim());
}
@Override
public void onComplete() {
}
});
Toast.makeText(getActivity(), "走了Erro", Toast.LENGTH_SHORT).show();
}
@Override
... ...
... ... @@ -48,7 +48,7 @@
android:background="@null"
android:hint="请输入账号"
android:maxLines="1"
android:text="13769183554"
android:text="13888372529"
android:textColor="@color/color_bdc4ce"
android:textSize="@dimen/sp_16" />
... ...
... ... @@ -21,7 +21,7 @@
android:layout_width="@dimen/dp_23"
android:layout_height="@dimen/dp_23"
android:layout_marginLeft="@dimen/dp_15"
android:src="@mipmap/icon_daiban" />
android:src="@mipmap/icon_calendar" />
<TextView
android:id="@+id/tv_time"
... ... @@ -32,6 +32,15 @@
android:textColor="@color/color_3d444d"
android:textSize="@dimen/sp_15"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_week"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_8"
android:text=""
android:textColor="@color/color_3d444d"
android:textSize="@dimen/sp_15"
android:textStyle="bold" />
<View
android:layout_width="@dimen/dp_0"
... ...