Commit d45ad6c3d6721a19f63cbd65a4f40a7949b4291a
Exists in
yxb_dev
and in
2 other branches
Merge branch 'wwx' into yxb_dev
# Conflicts: # app/libs/processor.jar # app/src/main/java/com/shunzhi/parent/AppConfig.java # app/src/main/java/com/shunzhi/parent/api/ApplyReplaceCardApi.java # app/src/main/java/com/shunzhi/parent/model/apply/ApplyReplaceCardModel.java # app/src/main/java/com/shunzhi/parent/ui/fragment/apply/ApplyReplaceCardFragment.java
Showing
31 changed files
with
393 additions
and
142 deletions
Show diff stats
app/src/main/AndroidManifest.xml
@@ -208,6 +208,14 @@ | @@ -208,6 +208,14 @@ | ||
208 | android:launchMode="singleInstance" | 208 | android:launchMode="singleInstance" |
209 | android:windowSoftInputMode="adjustPan|stateAlwaysHidden"/> | 209 | android:windowSoftInputMode="adjustPan|stateAlwaysHidden"/> |
210 | 210 | ||
211 | + <activity | ||
212 | + android:name=".ui.activity.apply.ApplyReplaceCardActivity" | ||
213 | + android:launchMode="singleInstance" /> | ||
214 | + | ||
215 | + <activity | ||
216 | + android:name=".ui.activity.apply.ApplySigninActivity" | ||
217 | + android:launchMode="singleInstance" /> | ||
218 | + | ||
211 | <service | 219 | <service |
212 | android:name=".ui.service.BadgeIntentService" | 220 | android:name=".ui.service.BadgeIntentService" |
213 | android:exported="false"></service> | 221 | android:exported="false"></service> |
app/src/main/java/com/shunzhi/parent/adapter/AttendanceAdapter.java
@@ -3,10 +3,15 @@ package com.shunzhi.parent.adapter; | @@ -3,10 +3,15 @@ package com.shunzhi.parent.adapter; | ||
3 | import android.content.Context; | 3 | import android.content.Context; |
4 | import android.content.Intent; | 4 | import android.content.Intent; |
5 | import android.support.v4.app.FragmentActivity; | 5 | import android.support.v4.app.FragmentActivity; |
6 | +import android.text.TextUtils; | ||
7 | +import android.util.Log; | ||
6 | import android.view.LayoutInflater; | 8 | import android.view.LayoutInflater; |
7 | import android.view.View; | 9 | import android.view.View; |
8 | import android.view.ViewGroup; | 10 | import android.view.ViewGroup; |
11 | +import android.widget.ImageView; | ||
12 | +import android.widget.TextView; | ||
9 | 13 | ||
14 | +import com.bumptech.glide.Glide; | ||
10 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; | 15 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; |
11 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; | 16 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; |
12 | import com.shunzhi.parent.R; | 17 | import com.shunzhi.parent.R; |
@@ -21,8 +26,6 @@ import com.shunzhi.parent.ui.fragment.apply.ApplySigninFragment; | @@ -21,8 +26,6 @@ import com.shunzhi.parent.ui.fragment.apply.ApplySigninFragment; | ||
21 | */ | 26 | */ |
22 | 27 | ||
23 | public class AttendanceAdapter extends BaseRecyclerViewAdapter<AttendanceBean> { | 28 | public class AttendanceAdapter extends BaseRecyclerViewAdapter<AttendanceBean> { |
24 | - | ||
25 | - | ||
26 | private Context mContext = null; | 29 | private Context mContext = null; |
27 | 30 | ||
28 | public AttendanceAdapter(Context context) { | 31 | public AttendanceAdapter(Context context) { |
@@ -36,18 +39,33 @@ public class AttendanceAdapter extends BaseRecyclerViewAdapter<AttendanceBean> { | @@ -36,18 +39,33 @@ public class AttendanceAdapter extends BaseRecyclerViewAdapter<AttendanceBean> { | ||
36 | } | 39 | } |
37 | 40 | ||
38 | public class AttendanceViewHolder extends BaseRecyclerViewHolder<AttendanceBean> { | 41 | public class AttendanceViewHolder extends BaseRecyclerViewHolder<AttendanceBean> { |
42 | + TextView tv_parent_name,tv_attendance; | ||
43 | + ImageView iv_photo; | ||
44 | + | ||
39 | public AttendanceViewHolder(View itemView) { | 45 | public AttendanceViewHolder(View itemView) { |
40 | super(itemView); | 46 | super(itemView); |
47 | + | ||
48 | + tv_parent_name = itemView.findViewById(R.id.tv_parent_name); | ||
49 | + tv_attendance = itemView.findViewById(R.id.tv_attendance); | ||
50 | + iv_photo = itemView.findViewById(R.id.iv_photo); | ||
41 | } | 51 | } |
42 | 52 | ||
43 | @Override | 53 | @Override |
44 | public void onBindViewHolder(AttendanceBean object, int position) { | 54 | public void onBindViewHolder(AttendanceBean object, int position) { |
55 | + Log.i("AttendanceAdapter:",object.getSituation()); | ||
56 | + tv_attendance.setText(object.getSituation()); | ||
57 | + if (TextUtils.isEmpty(object.getHead_image())){ | ||
58 | + iv_photo.setImageResource(R.drawable.photo); | ||
59 | + }else { | ||
60 | + Glide.with(mContext).load(object.getHead_image()).asBitmap().centerCrop().into(iv_photo); | ||
61 | + } | ||
62 | + | ||
45 | itemView.setOnClickListener(new View.OnClickListener() { | 63 | itemView.setOnClickListener(new View.OnClickListener() { |
46 | @Override | 64 | @Override |
47 | public void onClick(View view) { | 65 | public void onClick(View view) { |
48 | - // mContext.startActivity(new Intent().setClass(mContext, ApplySigninActivity.class)); | ||
49 | } | 66 | } |
50 | }); | 67 | }); |
51 | } | 68 | } |
52 | } | 69 | } |
70 | + | ||
53 | } | 71 | } |
app/src/main/java/com/shunzhi/parent/adapter/ReportAdapter.java
@@ -13,6 +13,7 @@ import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; | @@ -13,6 +13,7 @@ import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; | ||
13 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; | 13 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; |
14 | import com.shunzhi.parent.R; | 14 | import com.shunzhi.parent.R; |
15 | import com.shunzhi.parent.bean.ReportBean; | 15 | import com.shunzhi.parent.bean.ReportBean; |
16 | +import com.shunzhi.parent.ui.activity.apply.ApplyReplaceCardActivity; | ||
16 | import com.shunzhi.parent.ui.activity.report.ReportDetialActivity; | 17 | import com.shunzhi.parent.ui.activity.report.ReportDetialActivity; |
17 | import com.shunzhi.parent.views.CustomLinearLayoutManager; | 18 | import com.shunzhi.parent.views.CustomLinearLayoutManager; |
18 | 19 |
app/src/main/java/com/shunzhi/parent/api/ApplySigninApi.java
0 → 100644
@@ -0,0 +1,16 @@ | @@ -0,0 +1,16 @@ | ||
1 | +package com.shunzhi.parent.api; | ||
2 | + | ||
3 | +import com.google.gson.JsonObject; | ||
4 | + | ||
5 | +import io.reactivex.Observable; | ||
6 | +import retrofit2.http.GET; | ||
7 | +import retrofit2.http.Query; | ||
8 | + | ||
9 | +/** | ||
10 | + * Created by Administrator on 2018/4/19 0019. | ||
11 | + */ | ||
12 | + | ||
13 | +public interface ApplySigninApi { | ||
14 | + @GET("/api/ParentService/GetAttendanceList") | ||
15 | + Observable<JsonObject> getApplySignin(@Query("studentid") int studentId, @Query("schoolid") int schoolId,@Query("starttime") String date); | ||
16 | +} |
app/src/main/java/com/shunzhi/parent/bean/apply/AttendanceBean.java
@@ -5,18 +5,130 @@ package com.shunzhi.parent.bean.apply; | @@ -5,18 +5,130 @@ package com.shunzhi.parent.bean.apply; | ||
5 | */ | 5 | */ |
6 | 6 | ||
7 | public class AttendanceBean { | 7 | public class AttendanceBean { |
8 | - String studentId; | ||
9 | - String imgUrl; | ||
10 | - String kaoQinNum; | ||
11 | - String kaoQinDate; | 8 | + String user_id; |
9 | + int school_id; | ||
10 | + int customerId; | ||
11 | + int usertype; | ||
12 | + String card_num; | ||
13 | + int card_type; | ||
14 | + int outof; | ||
15 | + String intime; | ||
16 | + String cid; | ||
17 | + int func_no; | ||
18 | + String head_image; | ||
19 | + String situation; | ||
20 | + | ||
21 | + public String getUser_id() { | ||
22 | + return user_id; | ||
23 | + } | ||
24 | + | ||
25 | + public void setUser_id(String user_id) { | ||
26 | + this.user_id = user_id; | ||
27 | + } | ||
28 | + | ||
29 | + public int getSchool_id() { | ||
30 | + return school_id; | ||
31 | + } | ||
32 | + | ||
33 | + public void setSchool_id(int school_id) { | ||
34 | + this.school_id = school_id; | ||
35 | + } | ||
36 | + | ||
37 | + public int getCustomerId() { | ||
38 | + return customerId; | ||
39 | + } | ||
40 | + | ||
41 | + public void setCustomerId(int customerId) { | ||
42 | + this.customerId = customerId; | ||
43 | + } | ||
44 | + | ||
45 | + public int getUsertype() { | ||
46 | + return usertype; | ||
47 | + } | ||
48 | + | ||
49 | + public void setUsertype(int usertype) { | ||
50 | + this.usertype = usertype; | ||
51 | + } | ||
52 | + | ||
53 | + public String getCard_num() { | ||
54 | + return card_num; | ||
55 | + } | ||
56 | + | ||
57 | + public void setCard_num(String card_num) { | ||
58 | + this.card_num = card_num; | ||
59 | + } | ||
60 | + | ||
61 | + public int getCard_type() { | ||
62 | + return card_type; | ||
63 | + } | ||
64 | + | ||
65 | + public void setCard_type(int card_type) { | ||
66 | + this.card_type = card_type; | ||
67 | + } | ||
68 | + | ||
69 | + public int getOutof() { | ||
70 | + return outof; | ||
71 | + } | ||
72 | + | ||
73 | + public void setOutof(int outof) { | ||
74 | + this.outof = outof; | ||
75 | + } | ||
76 | + | ||
77 | + public String getIntime() { | ||
78 | + return intime; | ||
79 | + } | ||
80 | + | ||
81 | + public void setIntime(String intime) { | ||
82 | + this.intime = intime; | ||
83 | + } | ||
84 | + | ||
85 | + public String getCid() { | ||
86 | + return cid; | ||
87 | + } | ||
88 | + | ||
89 | + public void setCid(String cid) { | ||
90 | + this.cid = cid; | ||
91 | + } | ||
92 | + | ||
93 | + public int getFunc_no() { | ||
94 | + return func_no; | ||
95 | + } | ||
96 | + | ||
97 | + public void setFunc_no(int func_no) { | ||
98 | + this.func_no = func_no; | ||
99 | + } | ||
100 | + | ||
101 | + public String getHead_image() { | ||
102 | + return head_image; | ||
103 | + } | ||
104 | + | ||
105 | + public void setHead_image(String head_image) { | ||
106 | + this.head_image = head_image; | ||
107 | + } | ||
108 | + | ||
109 | + public String getSituation() { | ||
110 | + return situation; | ||
111 | + } | ||
112 | + | ||
113 | + public void setSituation(String situation) { | ||
114 | + this.situation = situation; | ||
115 | + } | ||
12 | 116 | ||
13 | @Override | 117 | @Override |
14 | public String toString() { | 118 | public String toString() { |
15 | return "AttendanceBean{" + | 119 | return "AttendanceBean{" + |
16 | - "studentId='" + studentId + '\'' + | ||
17 | - ", imgUrl='" + imgUrl + '\'' + | ||
18 | - ", kaoQinNum='" + kaoQinNum + '\'' + | ||
19 | - ", kaoQinDate='" + kaoQinDate + '\'' + | 120 | + "user_id='" + user_id + '\'' + |
121 | + ", school_id=" + school_id + | ||
122 | + ", customerId=" + customerId + | ||
123 | + ", usertype=" + usertype + | ||
124 | + ", card_num='" + card_num + '\'' + | ||
125 | + ", card_type=" + card_type + | ||
126 | + ", outof=" + outof + | ||
127 | + ", intime='" + intime + '\'' + | ||
128 | + ", cid='" + cid + '\'' + | ||
129 | + ", func_no=" + func_no + | ||
130 | + ", head_image='" + head_image + '\'' + | ||
131 | + ", situation='" + situation + '\'' + | ||
20 | '}'; | 132 | '}'; |
21 | } | 133 | } |
22 | } | 134 | } |
app/src/main/java/com/shunzhi/parent/contract/apply/ApplyReplaceCardContract.java
1 | package com.shunzhi.parent.contract.apply; | 1 | package com.shunzhi.parent.contract.apply; |
2 | 2 | ||
3 | + | ||
4 | + | ||
5 | +import android.util.Log; | ||
6 | + | ||
3 | import com.google.gson.JsonObject; | 7 | import com.google.gson.JsonObject; |
4 | import com.share.mvpsdk.base.BasePresenter; | 8 | import com.share.mvpsdk.base.BasePresenter; |
5 | import com.share.mvpsdk.base.IBaseActivity; | 9 | import com.share.mvpsdk.base.IBaseActivity; |
6 | import com.share.mvpsdk.base.IBaseModel; | 10 | import com.share.mvpsdk.base.IBaseModel; |
7 | -import com.shunzhi.parent.bean.apply.ApplyReplaceCardBean; | 11 | +import com.share.mvpsdk.base.IBaseView; |
12 | +import com.share.mvpsdk.utils.ToastUtils; | ||
8 | 13 | ||
9 | -import java.util.List; | ||
10 | 14 | ||
11 | /** | 15 | /** |
12 | * Created by Administrator on 2018/4/18 0018. | 16 | * Created by Administrator on 2018/4/18 0018. |
@@ -14,15 +18,14 @@ import java.util.List; | @@ -14,15 +18,14 @@ import java.util.List; | ||
14 | 18 | ||
15 | public interface ApplyReplaceCardContract { | 19 | public interface ApplyReplaceCardContract { |
16 | 20 | ||
17 | - //IOrderDetailModel,IOrderDetailView | ||
18 | abstract class ApplyReplaceCardPreenter extends BasePresenter<IApplyReplaceCardModel,IApplyReplaceCardView>{ | 21 | abstract class ApplyReplaceCardPreenter extends BasePresenter<IApplyReplaceCardModel,IApplyReplaceCardView>{ |
19 | - public abstract void showReplaceCardDetail(int studentId,String cardId); | 22 | + public abstract void ReplaceCardDetail(int studentId,String cardId); |
20 | } | 23 | } |
21 | interface IApplyReplaceCardModel extends IBaseModel { | 24 | interface IApplyReplaceCardModel extends IBaseModel { |
22 | io.reactivex.Observable<JsonObject> getReplaceCardDetailResult(int studentId, String cardId); | 25 | io.reactivex.Observable<JsonObject> getReplaceCardDetailResult(int studentId, String cardId); |
23 | } | 26 | } |
24 | 27 | ||
25 | - interface IApplyReplaceCardView extends IBaseActivity{ | ||
26 | - void showReplaceCardDetail(List<ApplyReplaceCardBean> applyReplaceCardBean); | 28 | + interface IApplyReplaceCardView extends IBaseView{ |
29 | + void showTipsDialog(String string); | ||
27 | } | 30 | } |
28 | } | 31 | } |
app/src/main/java/com/shunzhi/parent/contract/apply/ApplySigninContract.java
@@ -7,7 +7,9 @@ import com.share.mvpsdk.base.BasePresenter; | @@ -7,7 +7,9 @@ import com.share.mvpsdk.base.BasePresenter; | ||
7 | import com.share.mvpsdk.base.IBaseFragment; | 7 | import com.share.mvpsdk.base.IBaseFragment; |
8 | import com.share.mvpsdk.base.IBaseModel; | 8 | import com.share.mvpsdk.base.IBaseModel; |
9 | import com.shunzhi.parent.bean.ToolBean; | 9 | import com.shunzhi.parent.bean.ToolBean; |
10 | +import com.shunzhi.parent.bean.apply.AttendanceBean; | ||
10 | 11 | ||
12 | +import java.util.Date; | ||
11 | import java.util.List; | 13 | import java.util.List; |
12 | 14 | ||
13 | import io.reactivex.Observable; | 15 | import io.reactivex.Observable; |
@@ -15,23 +17,22 @@ import io.reactivex.Observable; | @@ -15,23 +17,22 @@ import io.reactivex.Observable; | ||
15 | /** | 17 | /** |
16 | * Created by ToaHanDong on 2018/3/14. | 18 | * Created by ToaHanDong on 2018/3/14. |
17 | */ | 19 | */ |
18 | - | ||
19 | public interface ApplySigninContract { | 20 | public interface ApplySigninContract { |
20 | 21 | ||
21 | abstract class ApplySigninPresenter extends BasePresenter<IApplySigninModel,IApplySigninView>{ | 22 | abstract class ApplySigninPresenter extends BasePresenter<IApplySigninModel,IApplySigninView>{ |
22 | - public abstract void getTools(LinearLayout linearLayout,String areaName); | 23 | + public abstract void SigninDetail(int studentId, int schoolId, String date); |
23 | } | 24 | } |
24 | 25 | ||
25 | 26 | ||
26 | interface IApplySigninModel extends IBaseModel{ | 27 | interface IApplySigninModel extends IBaseModel{ |
27 | - Observable<JsonObject> getTools(String areaName); | 28 | + Observable<JsonObject> getSigninDetailResult(int studentId, int schoolId, String date); |
28 | } | 29 | } |
29 | 30 | ||
30 | 31 | ||
31 | interface IApplySigninView extends IBaseFragment{ | 32 | interface IApplySigninView extends IBaseFragment{ |
32 | 33 | ||
33 | - void showTools(List<ToolBean> toolBeanList); | ||
34 | - | 34 | + void showDetialList(List<AttendanceBean> list); |
35 | + void showDetialInfo(List<AttendanceBean> list); | ||
35 | } | 36 | } |
36 | 37 | ||
37 | } | 38 | } |
app/src/main/java/com/shunzhi/parent/contract/report/ReportDetialContract.java
@@ -25,7 +25,7 @@ public interface ReportDetialContract { | @@ -25,7 +25,7 @@ public interface ReportDetialContract { | ||
25 | interface IReportDetialView extends IBaseView { | 25 | interface IReportDetialView extends IBaseView { |
26 | // pointNow,pointPast,sceneName | 26 | // pointNow,pointPast,sceneName |
27 | void showDetialList(List<DeyuDetialBean> list, JsonArray pointNow, JsonArray pointPast, JsonArray sceneName); | 27 | void showDetialList(List<DeyuDetialBean> list, JsonArray pointNow, JsonArray pointPast, JsonArray sceneName); |
28 | - void showDetialInfo(float rank, String scoree, String bijiao1,String bijiao2,String bijiao3,String bijiao4,String describe); | 28 | + void showDetialInfo(float rank, String scoree, String bijiao1,String bijiao2,String bijiao3,String bijiao4,String describe); |
29 | 29 | ||
30 | } | 30 | } |
31 | } | 31 | } |
app/src/main/java/com/shunzhi/parent/model/apply/ApplySigninModel.java
@@ -2,9 +2,15 @@ package com.shunzhi.parent.model.apply; | @@ -2,9 +2,15 @@ package com.shunzhi.parent.model.apply; | ||
2 | 2 | ||
3 | import com.google.gson.JsonObject; | 3 | import com.google.gson.JsonObject; |
4 | import com.share.mvpsdk.base.BaseModel; | 4 | import com.share.mvpsdk.base.BaseModel; |
5 | +import com.share.mvpsdk.helper.RetrofitCreateHelper; | ||
6 | +import com.share.mvpsdk.helper.RxHelper; | ||
7 | +import com.shunzhi.parent.AppConfig; | ||
8 | +import com.shunzhi.parent.api.ApplySigninApi; | ||
5 | import com.shunzhi.parent.contract.apply.ApplySigninContract; | 9 | import com.shunzhi.parent.contract.apply.ApplySigninContract; |
6 | import com.shunzhi.parent.contract.ceping.CepingContract; | 10 | import com.shunzhi.parent.contract.ceping.CepingContract; |
7 | 11 | ||
12 | +import java.util.Date; | ||
13 | + | ||
8 | import io.reactivex.Observable; | 14 | import io.reactivex.Observable; |
9 | 15 | ||
10 | /** | 16 | /** |
@@ -12,12 +18,13 @@ import io.reactivex.Observable; | @@ -12,12 +18,13 @@ import io.reactivex.Observable; | ||
12 | */ | 18 | */ |
13 | 19 | ||
14 | public class ApplySigninModel extends BaseModel implements ApplySigninContract.IApplySigninModel{ | 20 | public class ApplySigninModel extends BaseModel implements ApplySigninContract.IApplySigninModel{ |
15 | - @Override | ||
16 | - public Observable<JsonObject> getTools(String areaName) { | ||
17 | - return null; | ||
18 | - } | ||
19 | 21 | ||
20 | public static ApplySigninContract.IApplySigninModel newInstance() { | 22 | public static ApplySigninContract.IApplySigninModel newInstance() { |
21 | return new ApplySigninModel(); | 23 | return new ApplySigninModel(); |
22 | } | 24 | } |
25 | + | ||
26 | + @Override | ||
27 | + public Observable<JsonObject> getSigninDetailResult(int studentId, int schoolId, String date) { | ||
28 | + return RetrofitCreateHelper.getInstance().createApi(ApplySigninApi.class, AppConfig.BASE_URL).getApplySignin(studentId,schoolId,date).compose(RxHelper.<JsonObject>rxSchedulerHelper()); | ||
29 | + } | ||
23 | } | 30 | } |
app/src/main/java/com/shunzhi/parent/presenter/apply/ApplyReplaceCardPresenter.java
1 | package com.shunzhi.parent.presenter.apply; | 1 | package com.shunzhi.parent.presenter.apply; |
2 | 2 | ||
3 | +import android.annotation.SuppressLint; | ||
4 | +import android.util.Log; | ||
5 | + | ||
3 | import com.google.gson.JsonObject; | 6 | import com.google.gson.JsonObject; |
4 | -import com.share.mvpsdk.base.BasePresenter; | ||
5 | import com.share.mvpsdk.utils.ToastUtils; | 7 | import com.share.mvpsdk.utils.ToastUtils; |
6 | import com.shunzhi.parent.contract.apply.ApplyReplaceCardContract; | 8 | import com.shunzhi.parent.contract.apply.ApplyReplaceCardContract; |
7 | import com.shunzhi.parent.model.apply.ApplyReplaceCardModel; | 9 | import com.shunzhi.parent.model.apply.ApplyReplaceCardModel; |
8 | 10 | ||
11 | +import org.json.JSONObject; | ||
12 | + | ||
9 | import io.reactivex.functions.Consumer; | 13 | import io.reactivex.functions.Consumer; |
10 | 14 | ||
11 | /** | 15 | /** |
12 | * Created by Administrator on 2018/4/18 0018. | 16 | * Created by Administrator on 2018/4/18 0018. |
13 | */ | 17 | */ |
14 | public class ApplyReplaceCardPresenter extends ApplyReplaceCardContract.ApplyReplaceCardPreenter { | 18 | public class ApplyReplaceCardPresenter extends ApplyReplaceCardContract.ApplyReplaceCardPreenter { |
19 | + | ||
20 | + | ||
15 | @Override | 21 | @Override |
16 | public ApplyReplaceCardContract.IApplyReplaceCardModel getModel() { | 22 | public ApplyReplaceCardContract.IApplyReplaceCardModel getModel() { |
17 | return ApplyReplaceCardModel.newInstance(); | 23 | return ApplyReplaceCardModel.newInstance(); |
@@ -23,13 +29,14 @@ public class ApplyReplaceCardPresenter extends ApplyReplaceCardContract.ApplyRep | @@ -23,13 +29,14 @@ public class ApplyReplaceCardPresenter extends ApplyReplaceCardContract.ApplyRep | ||
23 | } | 29 | } |
24 | 30 | ||
25 | @Override | 31 | @Override |
26 | - public void showReplaceCardDetail(int studentId, String cardId) { | ||
27 | - mRxManager.register(mIModel.getReplaceCardDetailResult(studentId,cardId).subscribe(new Consumer<JsonObject>() { | 32 | + public void ReplaceCardDetail(int studentId, String cardId) { |
33 | + mRxManager.register(mIModel.getReplaceCardDetailResult(studentId, cardId).subscribe(new Consumer<JsonObject>() { | ||
34 | + @SuppressLint("LongLogTag") | ||
28 | @Override | 35 | @Override |
29 | public void accept(JsonObject jsonObject) throws Exception { | 36 | public void accept(JsonObject jsonObject) throws Exception { |
30 | - ToastUtils.showToast(jsonObject.toString()); | ||
31 | - //接收到的json | ||
32 | - | 37 | + ToastUtils.showToast("data:" + jsonObject.toString()); |
38 | + String isShowTipsDialog = jsonObject.get("data").getAsString(); | ||
39 | + mIView.showTipsDialog(isShowTipsDialog); | ||
33 | } | 40 | } |
34 | }, new Consumer<Throwable>() { | 41 | }, new Consumer<Throwable>() { |
35 | @Override | 42 | @Override |
app/src/main/java/com/shunzhi/parent/presenter/apply/ApplySigninPresenter.java
1 | package com.shunzhi.parent.presenter.apply; | 1 | package com.shunzhi.parent.presenter.apply; |
2 | 2 | ||
3 | -import android.widget.LinearLayout; | 3 | +import android.annotation.SuppressLint; |
4 | +import android.text.TextUtils; | ||
5 | +import android.util.Log; | ||
4 | 6 | ||
7 | +import com.google.gson.Gson; | ||
8 | +import com.google.gson.JsonArray; | ||
9 | +import com.google.gson.JsonObject; | ||
10 | +import com.share.mvpsdk.utils.ToastUtils; | ||
11 | +import com.shunzhi.parent.bean.apply.AttendanceBean; | ||
5 | import com.shunzhi.parent.contract.apply.ApplySigninContract; | 12 | import com.shunzhi.parent.contract.apply.ApplySigninContract; |
6 | import com.shunzhi.parent.model.apply.ApplySigninModel; | 13 | import com.shunzhi.parent.model.apply.ApplySigninModel; |
7 | 14 | ||
15 | +import org.json.JSONArray; | ||
16 | +import org.json.JSONObject; | ||
17 | + | ||
18 | +import java.util.ArrayList; | ||
19 | +import java.util.Iterator; | ||
20 | +import java.util.List; | ||
21 | + | ||
22 | +import io.reactivex.functions.Consumer; | ||
23 | + | ||
8 | /** | 24 | /** |
9 | * Created by Administrator on 2018/4/17 0017. | 25 | * Created by Administrator on 2018/4/17 0017. |
10 | */ | 26 | */ |
@@ -21,7 +37,34 @@ public class ApplySigninPresenter extends ApplySigninContract.ApplySigninPresent | @@ -21,7 +37,34 @@ public class ApplySigninPresenter extends ApplySigninContract.ApplySigninPresent | ||
21 | } | 37 | } |
22 | 38 | ||
23 | @Override | 39 | @Override |
24 | - public void getTools(LinearLayout linearLayout, String areaName) { | 40 | + public void SigninDetail(int studentId, int schoolId, String date) { |
41 | + mRxManager.register(mIModel.getSigninDetailResult(studentId, schoolId,date).subscribe(new Consumer<JsonObject>() { | ||
42 | + @SuppressLint("LongLogTag") | ||
43 | + @Override | ||
44 | + public void accept(JsonObject jsonObject) throws Exception { | ||
45 | + //ToastUtils.showToast("data:" + jsonObject.toString()); | ||
46 | + Log.i("ApplySignin:",jsonObject.toString()); | ||
47 | + if (jsonObject.get("status").getAsString().equals("1")){ | ||
48 | + JsonArray jsonArray = jsonObject.get("data").getAsJsonArray(); | ||
49 | + List<AttendanceBean> attendanceBeanlist = new ArrayList<>(); | ||
50 | + Log.i("ApplySignin:size", String.valueOf(jsonArray.size())); | ||
51 | + for (int i = 0;i< jsonArray.size();i++){ | ||
52 | + JsonObject attendanceDetailObj = jsonArray.get(i).getAsJsonObject(); | ||
53 | + AttendanceBean attendanceBean = new Gson().fromJson(attendanceDetailObj,AttendanceBean.class); | ||
54 | + attendanceBeanlist.add(attendanceBean); | ||
55 | + } | ||
56 | + mIView.showDetialList(attendanceBeanlist); | ||
57 | + mIView.showDetialInfo(attendanceBeanlist); | ||
58 | + }else { | ||
59 | + ToastUtils.showToast(jsonObject.get("message").getAsString()); | ||
60 | + } | ||
61 | + | ||
62 | + } | ||
63 | + }, new Consumer<Throwable>() { | ||
64 | + @Override | ||
65 | + public void accept(Throwable throwable) throws Exception { | ||
25 | 66 | ||
67 | + } | ||
68 | + })); | ||
26 | } | 69 | } |
27 | } | 70 | } |
app/src/main/java/com/shunzhi/parent/ui/activity/apply/ApplyReplaceCardActivity.java
@@ -23,7 +23,6 @@ import com.shunzhi.parent.ui.fragment.apply.ApplySigninFragment; | @@ -23,7 +23,6 @@ import com.shunzhi.parent.ui.fragment.apply.ApplySigninFragment; | ||
23 | * 补卡界面 | 23 | * 补卡界面 |
24 | */ | 24 | */ |
25 | 25 | ||
26 | -//OrderDetailContract.OrderDetailPreenter,OrderDetailContract.IOrderDetailModel | ||
27 | public class ApplyReplaceCardActivity extends BaseMVPCompatActivity implements View.OnClickListener{ | 26 | public class ApplyReplaceCardActivity extends BaseMVPCompatActivity implements View.OnClickListener{ |
28 | ApplyReplaceCardFragment applyReplaceCardFragment = null; | 27 | ApplyReplaceCardFragment applyReplaceCardFragment = null; |
29 | ImageView ivBack; | 28 | ImageView ivBack; |
app/src/main/java/com/shunzhi/parent/ui/activity/apply/ApplySigninActivity.java
@@ -18,6 +18,7 @@ import com.bigkoo.pickerview.listener.OnTimeSelectListener; | @@ -18,6 +18,7 @@ import com.bigkoo.pickerview.listener.OnTimeSelectListener; | ||
18 | import com.share.mvpsdk.base.BasePresenter; | 18 | import com.share.mvpsdk.base.BasePresenter; |
19 | import com.share.mvpsdk.base.activity.BaseMVPCompatActivity; | 19 | import com.share.mvpsdk.base.activity.BaseMVPCompatActivity; |
20 | import com.shunzhi.parent.R; | 20 | import com.shunzhi.parent.R; |
21 | +import com.shunzhi.parent.presenter.apply.ApplySigninPresenter; | ||
21 | import com.shunzhi.parent.ui.fragment.apply.ApplySigninFragment; | 22 | import com.shunzhi.parent.ui.fragment.apply.ApplySigninFragment; |
22 | 23 | ||
23 | import java.util.Calendar; | 24 | import java.util.Calendar; |
@@ -74,7 +75,7 @@ public class ApplySigninActivity extends BaseMVPCompatActivity implements View.O | @@ -74,7 +75,7 @@ public class ApplySigninActivity extends BaseMVPCompatActivity implements View.O | ||
74 | @NonNull | 75 | @NonNull |
75 | @Override | 76 | @Override |
76 | public BasePresenter initPresenter() { | 77 | public BasePresenter initPresenter() { |
77 | - return null; | 78 | + return new ApplySigninPresenter(); |
78 | } | 79 | } |
79 | 80 | ||
80 | } | 81 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/apply/ApplyReplaceCardFragment.java
1 | package com.shunzhi.parent.ui.fragment.apply; | 1 | package com.shunzhi.parent.ui.fragment.apply; |
2 | 2 | ||
3 | +import android.annotation.SuppressLint; | ||
3 | import android.os.Bundle; | 4 | import android.os.Bundle; |
4 | import android.support.annotation.NonNull; | 5 | import android.support.annotation.NonNull; |
5 | import android.support.annotation.Nullable; | 6 | import android.support.annotation.Nullable; |
6 | import android.text.TextUtils; | 7 | import android.text.TextUtils; |
8 | +import android.util.Log; | ||
7 | import android.view.View; | 9 | import android.view.View; |
8 | import android.widget.Button; | 10 | import android.widget.Button; |
9 | import android.widget.EditText; | 11 | import android.widget.EditText; |
@@ -14,25 +16,25 @@ import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; | @@ -14,25 +16,25 @@ import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; | ||
14 | import com.share.mvpsdk.utils.ToastUtils; | 16 | import com.share.mvpsdk.utils.ToastUtils; |
15 | import com.shunzhi.parent.R; | 17 | import com.shunzhi.parent.R; |
16 | import com.shunzhi.parent.contract.apply.ApplyReplaceCardContract; | 18 | import com.shunzhi.parent.contract.apply.ApplyReplaceCardContract; |
19 | +import com.shunzhi.parent.presenter.apply.ApplyReplaceCardPresenter; | ||
17 | import com.shunzhi.parent.views.ReplaceCardDialog; | 20 | import com.shunzhi.parent.views.ReplaceCardDialog; |
18 | 21 | ||
19 | /** | 22 | /** |
20 | * Created by Administrator on 2018/4/10 0010. | 23 | * Created by Administrator on 2018/4/10 0010. |
21 | */ | 24 | */ |
22 | 25 | ||
23 | -public class ApplyReplaceCardFragment extends BaseMVPCompatFragment<ApplyReplaceCardContract.ApplyReplaceCardPreenter,ApplyReplaceCardContract.IApplyReplaceCardModel> | ||
24 | - implements View.OnClickListener{ | 26 | +public class ApplyReplaceCardFragment extends BaseMVPCompatFragment<ApplyReplaceCardContract.ApplyReplaceCardPreenter, ApplyReplaceCardContract.IApplyReplaceCardModel> implements View.OnClickListener, |
27 | + ApplyReplaceCardContract.IApplyReplaceCardView { | ||
25 | private Button bt_sure; | 28 | private Button bt_sure; |
26 | private Button bt_cancel; | 29 | private Button bt_cancel; |
27 | - ReplaceCardDialog replaceCardDialog=null; | 30 | + ReplaceCardDialog replaceCardDialog = null; |
28 | private EditText et_cardnum; | 31 | private EditText et_cardnum; |
29 | - private String cardnum; | ||
30 | - private String cardid; | 32 | + private String cardnum = ""; |
31 | 33 | ||
32 | @NonNull | 34 | @NonNull |
33 | @Override | 35 | @Override |
34 | public BasePresenter initPresenter() { | 36 | public BasePresenter initPresenter() { |
35 | - return null; | 37 | + return new ApplyReplaceCardPresenter(); |
36 | } | 38 | } |
37 | 39 | ||
38 | @Override | 40 | @Override |
@@ -42,36 +44,50 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment<ApplyReplace | @@ -42,36 +44,50 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment<ApplyReplace | ||
42 | 44 | ||
43 | @Override | 45 | @Override |
44 | public void initUI(View view, @Nullable Bundle savedInstanceState) { | 46 | public void initUI(View view, @Nullable Bundle savedInstanceState) { |
45 | - replaceCardDialog = new ReplaceCardDialog(getActivity()); | ||
46 | - bt_sure = view.findViewById(R.id.bt_sure); | ||
47 | - bt_cancel = view.findViewById(R.id.bt_cancle); | ||
48 | - et_cardnum = view.findViewById(R.id.et_cardnum); | 47 | + replaceCardDialog = new ReplaceCardDialog(getActivity()); |
48 | + bt_sure = view.findViewById(R.id.bt_sure); | ||
49 | + bt_cancel = view.findViewById(R.id.bt_cancle); | ||
50 | + et_cardnum = view.findViewById(R.id.et_cardnum); | ||
49 | 51 | ||
50 | - bt_sure.setOnClickListener(this); | 52 | + bt_sure.setOnClickListener(this); |
51 | 53 | ||
52 | - cardid = et_cardnum.getText().toString().trim(); | ||
53 | - if (TextUtils.isEmpty(cardid)) { | ||
54 | - ToastUtils.showToast("请输入新卡卡号!"); | ||
55 | - }else { | ||
56 | - //studentid 从成长界面获取 此处设置为“123” | ||
57 | - mPresenter.showReplaceCardDetail(123, cardid); | ||
58 | - } | ||
59 | } | 54 | } |
60 | 55 | ||
56 | + @SuppressLint("LongLogTag") | ||
61 | @Override | 57 | @Override |
62 | public void onClick(View view) { | 58 | public void onClick(View view) { |
63 | - switch (view.getId()){ | 59 | + switch (view.getId()) { |
64 | case R.id.bt_sure: | 60 | case R.id.bt_sure: |
65 | cardnum = et_cardnum.getText().toString().trim(); | 61 | cardnum = et_cardnum.getText().toString().trim(); |
66 | - if (TextUtils.isEmpty(cardnum)){ | ||
67 | - Toast.makeText(getActivity(),"卡号不能为空,请重新输入",Toast.LENGTH_SHORT).show(); | ||
68 | - } | ||
69 | - else { | ||
70 | - replaceCardDialog.setTitle("补卡提示"); | ||
71 | - replaceCardDialog.setText("您已补卡成功!"); | ||
72 | - replaceCardDialog.show(); | 62 | + ToastUtils.showToast("cardnum:" + cardnum); |
63 | + Log.i("ApplyReplaceCardFragment:data", cardnum); | ||
64 | + if (TextUtils.isEmpty(cardnum)) { | ||
65 | + ToastUtils.showToast("卡号不能为空,请重新输入!"); | ||
66 | + } else { | ||
67 | + //studentid 从成长界面获取 此处设置为“123” | ||
68 | + mPresenter.ReplaceCardDetail(12, cardnum); | ||
73 | } | 69 | } |
74 | break; | 70 | break; |
71 | + default: | ||
72 | + break; | ||
73 | + } | ||
74 | + } | ||
75 | + | ||
76 | + @Override | ||
77 | + public void showTipsDialog(String msg) { | ||
78 | + | ||
79 | + if (msg.equals("true")) { | ||
80 | + if (replaceCardDialog == null) { | ||
81 | + replaceCardDialog = new ReplaceCardDialog(getActivity()); | ||
82 | + } else { | ||
83 | + replaceCardDialog.setTitle("补卡提示"); | ||
84 | + replaceCardDialog.setText("您已补卡成功!"); | ||
85 | + replaceCardDialog.show(); | ||
86 | + } | ||
87 | + } else { | ||
88 | + ToastUtils.showToast("补卡失败!"); | ||
75 | } | 89 | } |
90 | + | ||
91 | + | ||
76 | } | 92 | } |
77 | } | 93 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/apply/ApplySigninFragment.java
@@ -7,6 +7,7 @@ import android.support.annotation.Nullable; | @@ -7,6 +7,7 @@ import android.support.annotation.Nullable; | ||
7 | import android.support.annotation.RequiresApi; | 7 | import android.support.annotation.RequiresApi; |
8 | import android.support.v7.widget.LinearLayoutManager; | 8 | import android.support.v7.widget.LinearLayoutManager; |
9 | import android.support.v7.widget.RecyclerView; | 9 | import android.support.v7.widget.RecyclerView; |
10 | +import android.text.TextUtils; | ||
10 | import android.util.Log; | 11 | import android.util.Log; |
11 | import android.view.View; | 12 | import android.view.View; |
12 | import android.widget.CheckBox; | 13 | import android.widget.CheckBox; |
@@ -27,6 +28,7 @@ import com.share.mvpsdk.utils.ToastUtils; | @@ -27,6 +28,7 @@ import com.share.mvpsdk.utils.ToastUtils; | ||
27 | import com.shunzhi.parent.AppContext; | 28 | import com.shunzhi.parent.AppContext; |
28 | import com.shunzhi.parent.R; | 29 | import com.shunzhi.parent.R; |
29 | import com.shunzhi.parent.adapter.AttendanceAdapter; | 30 | import com.shunzhi.parent.adapter.AttendanceAdapter; |
31 | +import com.shunzhi.parent.bean.ToolBean; | ||
30 | import com.shunzhi.parent.bean.apply.AttendanceBean; | 32 | import com.shunzhi.parent.bean.apply.AttendanceBean; |
31 | import com.shunzhi.parent.contract.apply.ApplySigninContract; | 33 | import com.shunzhi.parent.contract.apply.ApplySigninContract; |
32 | import com.shunzhi.parent.presenter.apply.ApplySigninPresenter; | 34 | import com.shunzhi.parent.presenter.apply.ApplySigninPresenter; |
@@ -42,7 +44,8 @@ import java.util.List; | @@ -42,7 +44,8 @@ import java.util.List; | ||
42 | * Created by Administrator on 2018/4/10 0010. | 44 | * Created by Administrator on 2018/4/10 0010. |
43 | */ | 45 | */ |
44 | 46 | ||
45 | -public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContract.ApplySigninPresenter, ApplySigninContract.IApplySigninModel> implements View.OnClickListener{ | 47 | +public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContract.ApplySigninPresenter, ApplySigninContract.IApplySigninModel> implements View.OnClickListener, |
48 | + ApplySigninContract.IApplySigninView{ | ||
46 | private RecyclerView recycle_attendance; | 49 | private RecyclerView recycle_attendance; |
47 | private AttendanceAdapter attendanceAdapter; | 50 | private AttendanceAdapter attendanceAdapter; |
48 | List<AttendanceBean> list=new ArrayList<>(); | 51 | List<AttendanceBean> list=new ArrayList<>(); |
@@ -50,6 +53,8 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | @@ -50,6 +53,8 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | ||
50 | private LinearLayout layout_tv; | 53 | private LinearLayout layout_tv; |
51 | private ImageView iv_calendar; | 54 | private ImageView iv_calendar; |
52 | private TimePickerView pvCustomLunar; | 55 | private TimePickerView pvCustomLunar; |
56 | + private String date=""; | ||
57 | + List<AttendanceBean> signinlist = new ArrayList<>(); | ||
53 | 58 | ||
54 | 59 | ||
55 | public BasePresenter initPresenter() { | 60 | public BasePresenter initPresenter() { |
@@ -70,24 +75,29 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | @@ -70,24 +75,29 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | ||
70 | tv_kaoqin_num = view.findViewById(R.id.tv_kaoqin_num); | 75 | tv_kaoqin_num = view.findViewById(R.id.tv_kaoqin_num); |
71 | iv_calendar = view.findViewById(R.id.iv_calendar); | 76 | iv_calendar = view.findViewById(R.id.iv_calendar); |
72 | 77 | ||
78 | + initLunarPicker(); | ||
73 | iv_calendar .setOnClickListener(this); | 79 | iv_calendar .setOnClickListener(this); |
74 | 80 | ||
81 | + date = "2017-07-19";//date = getNowTime(); | ||
82 | + tv_kaoqin_date.setText(getNowTime()); | ||
75 | recycle_attendance = view.findViewById(R.id.recycle_attendance); | 83 | recycle_attendance = view.findViewById(R.id.recycle_attendance); |
84 | + | ||
76 | recycle_attendance.setLayoutManager(new LinearLayoutManager(getActivity())); | 85 | recycle_attendance.setLayoutManager(new LinearLayoutManager(getActivity())); |
77 | attendanceAdapter = new AttendanceAdapter(getActivity()); | 86 | attendanceAdapter = new AttendanceAdapter(getActivity()); |
78 | - AttendanceBean attendanceBean = new AttendanceBean(); | ||
79 | - if (list.size()!=0){ | ||
80 | - layout_tv.setVisibility(View.VISIBLE); | ||
81 | - tv_tips.setVisibility(View.VISIBLE); | ||
82 | - }else { | ||
83 | - list.add(attendanceBean); | ||
84 | - list.add(attendanceBean); | ||
85 | - list.add(attendanceBean); | ||
86 | - list.add(attendanceBean); | ||
87 | - attendanceAdapter.addAll(list); | ||
88 | - recycle_attendance.setAdapter(attendanceAdapter); | ||
89 | - } | ||
90 | - initLunarPicker(); | 87 | + recycle_attendance.setAdapter(attendanceAdapter); |
88 | + | ||
89 | + mPresenter.SigninDetail(185,1,date); | ||
90 | + | ||
91 | + } | ||
92 | + | ||
93 | + /** | ||
94 | + * 获取当前时间 | ||
95 | + * @return | ||
96 | + */ | ||
97 | + public static String getNowTime(){ | ||
98 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); | ||
99 | + Date date = new Date(System.currentTimeMillis()); | ||
100 | + return simpleDateFormat.format(date); | ||
91 | } | 101 | } |
92 | 102 | ||
93 | @RequiresApi(api = Build.VERSION_CODES.N) | 103 | @RequiresApi(api = Build.VERSION_CODES.N) |
@@ -112,6 +122,7 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | @@ -112,6 +122,7 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | ||
112 | @Override | 122 | @Override |
113 | public void onTimeSelect(Date date, View v) { | 123 | public void onTimeSelect(Date date, View v) { |
114 | ToastUtils.showToast(getTime(date)); | 124 | ToastUtils.showToast(getTime(date)); |
125 | + Log.i("getTime:",getTime(date)); | ||
115 | tv_kaoqin_date.setText(getTime(date)); | 126 | tv_kaoqin_date.setText(getTime(date)); |
116 | } | 127 | } |
117 | }) | 128 | }) |
@@ -146,4 +157,23 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | @@ -146,4 +157,23 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | ||
146 | return format.format(date); | 157 | return format.format(date); |
147 | } | 158 | } |
148 | 159 | ||
160 | + @Override | ||
161 | + public void showDetialList(List<AttendanceBean> list) { | ||
162 | + | ||
163 | + if (list.size() == 0){ | ||
164 | + layout_tv.setVisibility(View.VISIBLE); | ||
165 | + }else { | ||
166 | + recycle_attendance.setVisibility(View.VISIBLE); | ||
167 | + signinlist.clear(); | ||
168 | + signinlist.addAll(list); | ||
169 | + attendanceAdapter.addAll(signinlist); | ||
170 | + attendanceAdapter.notifyDataSetChanged(); | ||
171 | + } | ||
172 | + } | ||
173 | + | ||
174 | + @Override | ||
175 | + public void showDetialInfo(List<AttendanceBean> list) { | ||
176 | + String num = String.valueOf(list.size()); | ||
177 | + tv_kaoqin_num.setText(num); | ||
178 | + } | ||
149 | } | 179 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/report/ChengZhangFragment.java
1 | package com.shunzhi.parent.ui.fragment.report; | 1 | package com.shunzhi.parent.ui.fragment.report; |
2 | 2 | ||
3 | +import android.content.Intent; | ||
3 | import android.os.Bundle; | 4 | import android.os.Bundle; |
4 | import android.os.Handler; | 5 | import android.os.Handler; |
5 | import android.os.Message; | 6 | import android.os.Message; |
@@ -19,6 +20,11 @@ import com.shunzhi.parent.adapter.ReportAdapter; | @@ -19,6 +20,11 @@ import com.shunzhi.parent.adapter.ReportAdapter; | ||
19 | import com.shunzhi.parent.bean.ReportBean; | 20 | import com.shunzhi.parent.bean.ReportBean; |
20 | import com.shunzhi.parent.contract.report.ReportContract; | 21 | import com.shunzhi.parent.contract.report.ReportContract; |
21 | import com.shunzhi.parent.presenter.report.ReportPresenter; | 22 | import com.shunzhi.parent.presenter.report.ReportPresenter; |
23 | +import com.shunzhi.parent.ui.activity.apply.ApplyReplaceCardActivity; | ||
24 | +import com.shunzhi.parent.ui.activity.apply.ApplySigninActivity; | ||
25 | +import com.shunzhi.parent.ui.activity.report.ReportDetialActivity; | ||
26 | +import com.shunzhi.parent.ui.activity.report.ReportSceneActivity; | ||
27 | +import com.shunzhi.parent.ui.fragment.apply.ApplyReplaceCardFragment; | ||
22 | 28 | ||
23 | import java.util.List; | 29 | import java.util.List; |
24 | 30 | ||
@@ -144,13 +150,12 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | @@ -144,13 +150,12 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | ||
144 | public void onClick(View view) { | 150 | public void onClick(View view) { |
145 | switch (view.getId()) { | 151 | switch (view.getId()) { |
146 | case R.id.layout_kaoqin: | 152 | case R.id.layout_kaoqin: |
147 | - | 153 | + ApplySigninActivity.getInstance(getActivity()); |
148 | break; | 154 | break; |
149 | case R.id.layout_buka: | 155 | case R.id.layout_buka: |
150 | - | 156 | + ApplyReplaceCardActivity.getInstance(getActivity()); |
151 | break; | 157 | break; |
152 | case R.id.layout_qingjia: | 158 | case R.id.layout_qingjia: |
153 | - | ||
154 | break; | 159 | break; |
155 | } | 160 | } |
156 | } | 161 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/report/ReportDetialFragment.java
@@ -145,7 +145,6 @@ public class ReportDetialFragment extends BaseMVPCompatFragment<ReportDetialCont | @@ -145,7 +145,6 @@ public class ReportDetialFragment extends BaseMVPCompatFragment<ReportDetialCont | ||
145 | } catch (Exception e) { | 145 | } catch (Exception e) { |
146 | e.printStackTrace(); | 146 | e.printStackTrace(); |
147 | } | 147 | } |
148 | - | ||
149 | } | 148 | } |
150 | 149 | ||
151 | @Override | 150 | @Override |
4.28 KB
4.37 KB
4.28 KB
4.37 KB
4.28 KB
app/src/main/res/drawable-xhdpi/photo.jpg
6.03 KB
4.37 KB
4.28 KB
4.37 KB
4.37 KB
app/src/main/res/layout/fragment_apply_replacecard.xml
@@ -25,11 +25,13 @@ | @@ -25,11 +25,13 @@ | ||
25 | 25 | ||
26 | 26 | ||
27 | <LinearLayout | 27 | <LinearLayout |
28 | + android:layout_marginTop="@dimen/margin_tiny" | ||
29 | + android:layout_marginLeft="@dimen/margin_24" | ||
30 | + android:layout_marginRight="@dimen/margin_24" | ||
28 | android:layout_width="match_parent" | 31 | android:layout_width="match_parent" |
29 | android:layout_height="170dp" | 32 | android:layout_height="170dp" |
30 | android:background="@drawable/report_white" | 33 | android:background="@drawable/report_white" |
31 | - android:orientation="vertical" | ||
32 | - android:layout_margin="@dimen/margin_medium"> | 34 | + android:orientation="vertical"> |
33 | 35 | ||
34 | <LinearLayout | 36 | <LinearLayout |
35 | android:layout_width="match_parent" | 37 | android:layout_width="match_parent" |
@@ -39,9 +41,9 @@ | @@ -39,9 +41,9 @@ | ||
39 | android:orientation="horizontal"> | 41 | android:orientation="horizontal"> |
40 | 42 | ||
41 | <TextView | 43 | <TextView |
42 | - android:layout_weight="1" | 44 | + android:layout_weight="1.2" |
43 | android:id="@+id/tv_carduser" | 45 | android:id="@+id/tv_carduser" |
44 | - android:paddingLeft="@dimen/margin_small" | 46 | + android:layout_margin="@dimen/dp_8" |
45 | android:layout_width="0dp" | 47 | android:layout_width="0dp" |
46 | android:layout_height="wrap_content" | 48 | android:layout_height="wrap_content" |
47 | android:text="补卡人:" | 49 | android:text="补卡人:" |
@@ -50,9 +52,10 @@ | @@ -50,9 +52,10 @@ | ||
50 | 52 | ||
51 | <TextView | 53 | <TextView |
52 | android:id="@+id/et_carduser" | 54 | android:id="@+id/et_carduser" |
53 | - android:layout_weight="3" | 55 | + android:layout_weight="2.8" |
54 | android:layout_width="0dp" | 56 | android:layout_width="0dp" |
55 | android:layout_height="wrap_content" | 57 | android:layout_height="wrap_content" |
58 | + android:layout_margin="@dimen/dp_8" | ||
56 | android:gravity="center" | 59 | android:gravity="center" |
57 | android:text="张三" | 60 | android:text="张三" |
58 | android:textColor="@color/hintTextColor" | 61 | android:textColor="@color/hintTextColor" |
@@ -67,19 +70,20 @@ | @@ -67,19 +70,20 @@ | ||
67 | 70 | ||
68 | <TextView | 71 | <TextView |
69 | android:id="@+id/tv_cardnum" | 72 | android:id="@+id/tv_cardnum" |
70 | - android:layout_weight="1" | 73 | + android:layout_weight="1.2" |
71 | android:layout_width="0dp" | 74 | android:layout_width="0dp" |
72 | android:layout_height="wrap_content" | 75 | android:layout_height="wrap_content" |
73 | - android:paddingLeft="@dimen/margin_small" | 76 | + android:layout_margin="@dimen/dp_8" |
74 | android:text="卡号:" | 77 | android:text="卡号:" |
75 | android:textColor="@color/hintTextColor" | 78 | android:textColor="@color/hintTextColor" |
76 | android:textSize="@dimen/textSize16" /> | 79 | android:textSize="@dimen/textSize16" /> |
77 | 80 | ||
78 | <EditText | 81 | <EditText |
79 | android:id="@+id/et_cardnum" | 82 | android:id="@+id/et_cardnum" |
80 | - android:layout_weight="3" | 83 | + android:layout_weight="2.8" |
81 | android:layout_width="0dp" | 84 | android:layout_width="0dp" |
82 | android:layout_height="wrap_content" | 85 | android:layout_height="wrap_content" |
86 | + android:layout_margin="@dimen/dp_8" | ||
83 | android:gravity="center" | 87 | android:gravity="center" |
84 | android:background="@null" | 88 | android:background="@null" |
85 | android:inputType="number" | 89 | android:inputType="number" |
@@ -100,19 +104,20 @@ | @@ -100,19 +104,20 @@ | ||
100 | android:id="@+id/tv_cardnumber" | 104 | android:id="@+id/tv_cardnumber" |
101 | android:layout_width="0dp" | 105 | android:layout_width="0dp" |
102 | android:layout_height="wrap_content" | 106 | android:layout_height="wrap_content" |
103 | - android:paddingLeft="@dimen/margin_small" | ||
104 | - android:layout_weight="1" | 107 | + android:layout_margin="@dimen/dp_8" |
108 | + android:layout_weight="1.2" | ||
105 | android:text="考勤次数:" | 109 | android:text="考勤次数:" |
106 | android:textColor="@color/hintTextColor" | 110 | android:textColor="@color/hintTextColor" |
107 | android:textSize="@dimen/textSize16" /> | 111 | android:textSize="@dimen/textSize16" /> |
108 | 112 | ||
109 | <TextView | 113 | <TextView |
110 | android:id="@+id/et_cardnumber" | 114 | android:id="@+id/et_cardnumber" |
111 | - android:layout_weight="3" | 115 | + android:layout_weight="2.8" |
112 | android:layout_width="0dp" | 116 | android:layout_width="0dp" |
117 | + android:layout_margin="@dimen/dp_8" | ||
113 | android:layout_height="wrap_content" | 118 | android:layout_height="wrap_content" |
114 | android:gravity="center" | 119 | android:gravity="center" |
115 | - android:text="5次" | 120 | + android:text="0次" |
116 | android:textColor="@color/hintTextColor" | 121 | android:textColor="@color/hintTextColor" |
117 | android:textSize="@dimen/textSize16" /> | 122 | android:textSize="@dimen/textSize16" /> |
118 | </LinearLayout> | 123 | </LinearLayout> |
@@ -132,7 +137,7 @@ | @@ -132,7 +137,7 @@ | ||
132 | android:id="@+id/bt_sure" | 137 | android:id="@+id/bt_sure" |
133 | android:layout_width="80dp" | 138 | android:layout_width="80dp" |
134 | android:layout_height="wrap_content" | 139 | android:layout_height="wrap_content" |
135 | - android:layout_marginLeft="@dimen/dp_60" | 140 | + android:layout_marginLeft="@dimen/dp_40" |
136 | android:layout_alignParentLeft="true" | 141 | android:layout_alignParentLeft="true" |
137 | android:text="确定" | 142 | android:text="确定" |
138 | android:textColor="@color/white" | 143 | android:textColor="@color/white" |
@@ -143,7 +148,7 @@ | @@ -143,7 +148,7 @@ | ||
143 | android:id="@+id/bt_cancle" | 148 | android:id="@+id/bt_cancle" |
144 | android:layout_width="80dp" | 149 | android:layout_width="80dp" |
145 | android:layout_height="wrap_content" | 150 | android:layout_height="wrap_content" |
146 | - android:layout_marginRight="@dimen/dp_60" | 151 | + android:layout_marginRight="@dimen/dp_40" |
147 | android:layout_alignParentRight="true" | 152 | android:layout_alignParentRight="true" |
148 | android:text="取消" | 153 | android:text="取消" |
149 | android:textColor="@color/white" | 154 | android:textColor="@color/white" |
app/src/main/res/layout/fragment_apply_signin.xml
@@ -28,7 +28,9 @@ | @@ -28,7 +28,9 @@ | ||
28 | <LinearLayout | 28 | <LinearLayout |
29 | android:layout_width="match_parent" | 29 | android:layout_width="match_parent" |
30 | android:layout_height="170dp" | 30 | android:layout_height="170dp" |
31 | - android:layout_margin="@dimen/margin_medium" | 31 | + android:layout_marginTop="@dimen/margin_tiny" |
32 | + android:layout_marginLeft="@dimen/margin_24" | ||
33 | + android:layout_marginRight="@dimen/margin_24" | ||
32 | android:background="@drawable/report_white" | 34 | android:background="@drawable/report_white" |
33 | android:orientation="vertical"> | 35 | android:orientation="vertical"> |
34 | 36 | ||
@@ -43,7 +45,7 @@ | @@ -43,7 +45,7 @@ | ||
43 | android:id="@+id/tv_attendancer" | 45 | android:id="@+id/tv_attendancer" |
44 | android:layout_width="0dp" | 46 | android:layout_width="0dp" |
45 | android:layout_height="wrap_content" | 47 | android:layout_height="wrap_content" |
46 | - android:layout_weight="1" | 48 | + android:layout_weight="1.2" |
47 | android:paddingLeft="@dimen/margin_small" | 49 | android:paddingLeft="@dimen/margin_small" |
48 | android:text="考核对象:" | 50 | android:text="考核对象:" |
49 | android:textColor="@color/hintTextColor" | 51 | android:textColor="@color/hintTextColor" |
@@ -53,7 +55,7 @@ | @@ -53,7 +55,7 @@ | ||
53 | android:id="@+id/tv_kaoqin_user" | 55 | android:id="@+id/tv_kaoqin_user" |
54 | android:layout_width="0dp" | 56 | android:layout_width="0dp" |
55 | android:layout_height="wrap_content" | 57 | android:layout_height="wrap_content" |
56 | - android:layout_weight="3" | 58 | + android:layout_weight="2.8" |
57 | android:gravity="center" | 59 | android:gravity="center" |
58 | android:text="张三" | 60 | android:text="张三" |
59 | android:textColor="@color/hintTextColor" | 61 | android:textColor="@color/hintTextColor" |
@@ -71,7 +73,7 @@ | @@ -71,7 +73,7 @@ | ||
71 | android:id="@+id/tv_date" | 73 | android:id="@+id/tv_date" |
72 | android:layout_width="0dp" | 74 | android:layout_width="0dp" |
73 | android:layout_height="wrap_content" | 75 | android:layout_height="wrap_content" |
74 | - android:layout_weight="1" | 76 | + android:layout_weight="1.2" |
75 | android:paddingLeft="@dimen/margin_small" | 77 | android:paddingLeft="@dimen/margin_small" |
76 | android:text="考勤日期:" | 78 | android:text="考勤日期:" |
77 | android:textColor="@color/hintTextColor" | 79 | android:textColor="@color/hintTextColor" |
@@ -79,7 +81,7 @@ | @@ -79,7 +81,7 @@ | ||
79 | <LinearLayout | 81 | <LinearLayout |
80 | android:layout_width="0dp" | 82 | android:layout_width="0dp" |
81 | android:layout_height="wrap_content" | 83 | android:layout_height="wrap_content" |
82 | - android:layout_weight="3" | 84 | + android:layout_weight="2.8" |
83 | android:gravity="center" | 85 | android:gravity="center" |
84 | android:orientation="horizontal"> | 86 | android:orientation="horizontal"> |
85 | <TextView | 87 | <TextView |
@@ -88,16 +90,15 @@ | @@ -88,16 +90,15 @@ | ||
88 | android:layout_height="wrap_content" | 90 | android:layout_height="wrap_content" |
89 | android:layout_weight="2" | 91 | android:layout_weight="2" |
90 | android:gravity="right" | 92 | android:gravity="right" |
91 | - android:text="2018-04-10" | ||
92 | android:textColor="@color/hintTextColor" | 93 | android:textColor="@color/hintTextColor" |
93 | android:textSize="@dimen/textSize16" /> | 94 | android:textSize="@dimen/textSize16" /> |
94 | <ImageView | 95 | <ImageView |
95 | android:id="@+id/iv_calendar" | 96 | android:id="@+id/iv_calendar" |
96 | android:layout_width="0dp" | 97 | android:layout_width="0dp" |
97 | - android:layout_height="wrap_content" | 98 | + android:layout_height="20dp" |
98 | android:layout_weight="1" | 99 | android:layout_weight="1" |
99 | android:gravity="left" | 100 | android:gravity="left" |
100 | - android:src="@drawable/kaoqin" /> | 101 | + android:src="@drawable/date" /> |
101 | </LinearLayout> | 102 | </LinearLayout> |
102 | </LinearLayout> | 103 | </LinearLayout> |
103 | 104 | ||
@@ -111,7 +112,7 @@ | @@ -111,7 +112,7 @@ | ||
111 | android:id="@+id/tv_number" | 112 | android:id="@+id/tv_number" |
112 | android:layout_width="0dp" | 113 | android:layout_width="0dp" |
113 | android:layout_height="wrap_content" | 114 | android:layout_height="wrap_content" |
114 | - android:layout_weight="1" | 115 | + android:layout_weight="1.2" |
115 | android:paddingLeft="@dimen/margin_small" | 116 | android:paddingLeft="@dimen/margin_small" |
116 | android:text="考勤次数:" | 117 | android:text="考勤次数:" |
117 | android:textColor="@color/hintTextColor" | 118 | android:textColor="@color/hintTextColor" |
@@ -120,19 +121,13 @@ | @@ -120,19 +121,13 @@ | ||
120 | android:id="@+id/tv_kaoqin_num" | 121 | android:id="@+id/tv_kaoqin_num" |
121 | android:layout_width="0dp" | 122 | android:layout_width="0dp" |
122 | android:layout_height="wrap_content" | 123 | android:layout_height="wrap_content" |
123 | - android:layout_weight="3" | 124 | + android:layout_weight="2.8" |
124 | android:gravity="center" | 125 | android:gravity="center" |
125 | android:text="5" | 126 | android:text="5" |
126 | android:textColor="@color/hintTextColor" | 127 | android:textColor="@color/hintTextColor" |
127 | android:textSize="@dimen/textSize16" /> | 128 | android:textSize="@dimen/textSize16" /> |
128 | </LinearLayout> | 129 | </LinearLayout> |
129 | 130 | ||
130 | - <TextView | ||
131 | - android:id="@+id/tv2" | ||
132 | - android:layout_width="fill_parent" | ||
133 | - android:layout_height="1dp" | ||
134 | - android:background="@color/line_color" /> | ||
135 | - | ||
136 | <LinearLayout | 131 | <LinearLayout |
137 | android:id="@+id/layout_tv" | 132 | android:id="@+id/layout_tv" |
138 | android:layout_width="match_parent" | 133 | android:layout_width="match_parent" |
@@ -140,7 +135,7 @@ | @@ -140,7 +135,7 @@ | ||
140 | android:layout_weight="2" | 135 | android:layout_weight="2" |
141 | android:gravity="center" | 136 | android:gravity="center" |
142 | android:orientation="horizontal" | 137 | android:orientation="horizontal" |
143 | - android:visibility="visible"> | 138 | + android:visibility="gone"> |
144 | 139 | ||
145 | <TextView | 140 | <TextView |
146 | android:id="@+id/tv_tips" | 141 | android:id="@+id/tv_tips" |
@@ -157,9 +152,8 @@ | @@ -157,9 +152,8 @@ | ||
157 | android:id="@+id/recycle_attendance" | 152 | android:id="@+id/recycle_attendance" |
158 | android:layout_width="match_parent" | 153 | android:layout_width="match_parent" |
159 | android:layout_height="wrap_content" | 154 | android:layout_height="wrap_content" |
160 | - android:layout_marginTop="@dimen/size_dp_10" | ||
161 | android:background="@color/bgColor" | 155 | android:background="@color/bgColor" |
162 | - android:visibility="gone"> | 156 | + android:visibility="visible"> |
163 | 157 | ||
164 | </android.support.v7.widget.RecyclerView> | 158 | </android.support.v7.widget.RecyclerView> |
165 | </LinearLayout> | 159 | </LinearLayout> |
166 | \ No newline at end of file | 160 | \ No newline at end of file |
app/src/main/res/layout/item_apply_signin.xml
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | android:textSize="@dimen/size_dp_18" /> | 53 | android:textSize="@dimen/size_dp_18" /> |
54 | 54 | ||
55 | <TextView | 55 | <TextView |
56 | - android:id="@+id/tv_call" | 56 | + android:id="@+id/tv_parent_name" |
57 | android:layout_width="wrap_content" | 57 | android:layout_width="wrap_content" |
58 | android:layout_height="wrap_content" | 58 | android:layout_height="wrap_content" |
59 | android:text="张三" | 59 | android:text="张三" |
@@ -68,39 +68,22 @@ | @@ -68,39 +68,22 @@ | ||
68 | android:textSize="@dimen/size_dp_18" /> | 68 | android:textSize="@dimen/size_dp_18" /> |
69 | </LinearLayout> | 69 | </LinearLayout> |
70 | 70 | ||
71 | - <LinearLayout | ||
72 | - android:layout_width="match_parent" | 71 | + <TextView |
72 | + android:id="@+id/tv_attendance" | ||
73 | + android:layout_width="wrap_content" | ||
73 | android:layout_height="0dp" | 74 | android:layout_height="0dp" |
74 | - android:layout_weight="1"> | ||
75 | - | ||
76 | - <TextView | ||
77 | - android:layout_width="wrap_content" | ||
78 | - android:layout_height="wrap_content" | ||
79 | - android:text="您的孩子已与 " | ||
80 | - android:textColor="@color/hintTextColor" | ||
81 | - android:textSize="@dimen/size_dp_16" /> | ||
82 | - <TextView | ||
83 | - android:id="@+id/tv_attendance_date" | ||
84 | - android:layout_width="wrap_content" | ||
85 | - android:layout_height="wrap_content" | ||
86 | - android:textColor="@color/hintTextColor" | ||
87 | - android:textSize="@dimen/size_dp_16" | ||
88 | - android:text="10:00:15"/> | ||
89 | - <TextView | ||
90 | - android:layout_width="wrap_content" | ||
91 | - android:layout_height="wrap_content" | ||
92 | - android:textSize="@dimen/size_dp_16" | ||
93 | - android:textColor="@color/hintTextColor" | ||
94 | - android:text=" 进校!"/> | ||
95 | - </LinearLayout> | 75 | + android:layout_weight="1" |
76 | + android:text="您的孩子已与10:00:15进校!" | ||
77 | + android:textColor="@color/hintTextColor" | ||
78 | + android:textSize="@dimen/size_dp_16" /> | ||
96 | 79 | ||
97 | <ImageView | 80 | <ImageView |
98 | android:id="@+id/iv_photo" | 81 | android:id="@+id/iv_photo" |
99 | - android:layout_weight="2" | ||
100 | - android:scaleType="fitCenter" | ||
101 | android:layout_width="wrap_content" | 82 | android:layout_width="wrap_content" |
102 | android:layout_height="0dp" | 83 | android:layout_height="0dp" |
103 | - android:background="@drawable/photo" /> | 84 | + android:layout_weight="2" |
85 | + android:background="@drawable/photo" | ||
86 | + android:scaleType="fitCenter" /> | ||
104 | </LinearLayout> | 87 | </LinearLayout> |
105 | </LinearLayout> | 88 | </LinearLayout> |
106 | 89 |
mvpsdk/src/main/res/values/dimens.xml
@@ -8,6 +8,8 @@ | @@ -8,6 +8,8 @@ | ||
8 | <dimen name="margin_tiny">4dp</dimen> | 8 | <dimen name="margin_tiny">4dp</dimen> |
9 | <dimen name="margin_small">8dp</dimen> | 9 | <dimen name="margin_small">8dp</dimen> |
10 | <dimen name="margin_medium">16dp</dimen> | 10 | <dimen name="margin_medium">16dp</dimen> |
11 | + <dimen name="margin_20">20dp</dimen> | ||
12 | + <dimen name="margin_24">24dp</dimen> | ||
11 | <dimen name="margin_large">32dp</dimen> | 13 | <dimen name="margin_large">32dp</dimen> |
12 | <dimen name="margin_huge">64dp</dimen> | 14 | <dimen name="margin_huge">64dp</dimen> |
13 | <dimen name="margin_only_txt">48dp</dimen> | 15 | <dimen name="margin_only_txt">48dp</dimen> |
@@ -31,6 +33,7 @@ | @@ -31,6 +33,7 @@ | ||
31 | <dimen name="dp_066">0.66dp</dimen> | 33 | <dimen name="dp_066">0.66dp</dimen> |
32 | <dimen name="dp_4">4dp</dimen> | 34 | <dimen name="dp_4">4dp</dimen> |
33 | <dimen name="dp_5">5dp</dimen> | 35 | <dimen name="dp_5">5dp</dimen> |
36 | + <dimen name="dp_8">8dp</dimen> | ||
34 | <dimen name="dp_10">10dp</dimen> | 37 | <dimen name="dp_10">10dp</dimen> |
35 | <dimen name="dp_14">14dp</dimen> | 38 | <dimen name="dp_14">14dp</dimen> |
36 | <dimen name="dp_22">22dp</dimen> | 39 | <dimen name="dp_22">22dp</dimen> |