Commit 6edf5ac2dcc6014a792df1cd5e32e1764bae5374
Exists in
yxb_dev
and in
1 other branch
no message
Showing
12 changed files
with
84 additions
and
68 deletions
 
Show diff stats
app/libs/processor.jar
No preview for this file type
app/src/main/AndroidManifest.xml
| ... | ... | @@ -119,13 +119,13 @@ | 
| 119 | 119 | |
| 120 | 120 | |
| 121 | 121 | <provider | 
| 122 | - android:authorities="com.shunzhi.parent.fileprovider" | |
| 123 | 122 | android:name="android.support.v4.content.FileProvider" | 
| 124 | - android:grantUriPermissions="true" | |
| 125 | - android:exported="false"> | |
| 123 | + android:authorities="com.shunzhi.parent.fileprovider" | |
| 124 | + android:exported="false" | |
| 125 | + android:grantUriPermissions="true"> | |
| 126 | 126 | <meta-data | 
| 127 | 127 | android:name="android.support.FILE_PROVIDER_PATHS" | 
| 128 | - android:resource="@xml/filepaths"/> | |
| 128 | + android:resource="@xml/filepaths" /> | |
| 129 | 129 | </provider> | 
| 130 | 130 | |
| 131 | 131 | <activity | 
| ... | ... | @@ -206,17 +206,16 @@ | 
| 206 | 206 | <activity | 
| 207 | 207 | android:name=".ui.activity.ActivationActivity" | 
| 208 | 208 | android:launchMode="singleInstance" | 
| 209 | - android:windowSoftInputMode="adjustPan|stateAlwaysHidden"/> | |
| 209 | + android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> | |
| 210 | 210 | <activity | 
| 211 | 211 | android:name=".ui.activity.BankActivity" | 
| 212 | 212 | android:launchMode="singleInstance" | 
| 213 | - android:windowSoftInputMode="adjustPan|stateAlwaysHidden"/> | |
| 213 | + android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> | |
| 214 | 214 | |
| 215 | 215 | <activity | 
| 216 | 216 | android:name=".ui.activity.apply.ApplyReplaceCardActivity" | 
| 217 | 217 | android:launchMode="singleInstance" | 
| 218 | - android:windowSoftInputMode="adjustPan|stateAlwaysHidden" | |
| 219 | - /> | |
| 218 | + android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> | |
| 220 | 219 | |
| 221 | 220 | <activity | 
| 222 | 221 | android:name=".ui.activity.apply.ApplySigninActivity" | ... | ... | 
app/src/main/java/com/shunzhi/parent/AppConfig.java
| ... | ... | @@ -39,16 +39,16 @@ public class AppConfig { | 
| 39 | 39 | public static String APP_IS_START = "app_is_start"; | 
| 40 | 40 | |
| 41 | 41 | //测试 | 
| 42 | - public static String BASE_URL="http://60.190.202.57:1000/"; | |
| 43 | - public static String BASE_URL_ORDER="http://60.190.202.57:8101/"; | |
| 44 | - public static String BASE_URL_FILE="http://60.190.202.57:8196"; | |
| 42 | +// public static String BASE_URL="http://60.190.202.57:1000/"; | |
| 43 | +// public static String BASE_URL_ORDER="http://60.190.202.57:8101/"; | |
| 44 | +// public static String BASE_URL_FILE="http://60.190.202.57:8196"; | |
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | //正式 | 
| 48 | -// public static String BASE_URL="http://campus.myjxt.com/"; | |
| 49 | -// public static String BASE_URL_ORDER="http://parent.myjxt.com/"; | |
| 50 | -// public static String BASE_URL_FILE="http://manage.myjxt.com"; | |
| 51 | -// public static final String url_version = BASE_URL + "api/Common/AppVersion?appType=3"; | |
| 48 | + public static String BASE_URL="http://campus.myjxt.com/"; | |
| 49 | + public static String BASE_URL_ORDER="http://parent.myjxt.com/"; | |
| 50 | + public static String BASE_URL_FILE="http://manage.myjxt.com"; | |
| 51 | + public static final String url_version = BASE_URL + "api/Common/AppVersion?appType=3"; | |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | //默认日志保存的路径 | ... | ... | 
app/src/main/java/com/shunzhi/parent/adapter/AttendanceAdapter.java
| ... | ... | @@ -26,10 +26,12 @@ import com.shunzhi.parent.ui.fragment.apply.ApplySigninFragment; | 
| 26 | 26 | */ | 
| 27 | 27 | |
| 28 | 28 | public class AttendanceAdapter extends BaseRecyclerViewAdapter<AttendanceBean> { | 
| 29 | + private final String mStudentName; | |
| 29 | 30 | private Context mContext = null; | 
| 30 | 31 | |
| 31 | - public AttendanceAdapter(Context context) { | |
| 32 | + public AttendanceAdapter(Context context,String studentName) { | |
| 32 | 33 | mContext = context; | 
| 34 | + mStudentName = studentName; | |
| 33 | 35 | } | 
| 34 | 36 | |
| 35 | 37 | @Override | 
| ... | ... | @@ -39,13 +41,13 @@ public class AttendanceAdapter extends BaseRecyclerViewAdapter<AttendanceBean> { | 
| 39 | 41 | } | 
| 40 | 42 | |
| 41 | 43 | public class AttendanceViewHolder extends BaseRecyclerViewHolder<AttendanceBean> { | 
| 42 | - TextView tv_parent_name,tv_attendance; | |
| 44 | + TextView tv_student_name,tv_attendance; | |
| 43 | 45 | ImageView iv_photo; | 
| 44 | 46 | |
| 45 | 47 | public AttendanceViewHolder(View itemView) { | 
| 46 | 48 | super(itemView); | 
| 47 | 49 | |
| 48 | - tv_parent_name = itemView.findViewById(R.id.tv_parent_name); | |
| 50 | + tv_student_name = itemView.findViewById(R.id.tv_student_name); | |
| 49 | 51 | tv_attendance = itemView.findViewById(R.id.tv_attendance); | 
| 50 | 52 | iv_photo = itemView.findViewById(R.id.iv_photo); | 
| 51 | 53 | } | 
| ... | ... | @@ -54,6 +56,7 @@ public class AttendanceAdapter extends BaseRecyclerViewAdapter<AttendanceBean> { | 
| 54 | 56 | public void onBindViewHolder(AttendanceBean object, int position) { | 
| 55 | 57 | Log.i("AttendanceAdapter:",object.getSituation()); | 
| 56 | 58 | tv_attendance.setText(object.getSituation()); | 
| 59 | + tv_student_name.setText(mStudentName); | |
| 57 | 60 | if (TextUtils.isEmpty(object.getHead_image())){ | 
| 58 | 61 | iv_photo.setImageResource(R.drawable.photo); | 
| 59 | 62 | }else { | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/activity/BankActivity.java
app/src/main/java/com/shunzhi/parent/ui/fragment/apply/ApplyReplaceCardFragment.java
| ... | ... | @@ -9,6 +9,7 @@ import android.util.Log; | 
| 9 | 9 | import android.view.View; | 
| 10 | 10 | import android.widget.Button; | 
| 11 | 11 | import android.widget.EditText; | 
| 12 | +import android.widget.TextView; | |
| 12 | 13 | import android.widget.Toast; | 
| 13 | 14 | |
| 14 | 15 | import com.google.gson.Gson; | 
| ... | ... | @@ -33,6 +34,7 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment<ApplyReplace | 
| 33 | 34 | private EditText et_cardnum; | 
| 34 | 35 | private String cardnum = ""; | 
| 35 | 36 | private ChildBean currChildBean = new ChildBean(); | 
| 37 | + private TextView et_carduser; | |
| 36 | 38 | |
| 37 | 39 | @NonNull | 
| 38 | 40 | @Override | 
| ... | ... | @@ -51,12 +53,14 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment<ApplyReplace | 
| 51 | 53 | bt_sure = view.findViewById(R.id.bt_sure); | 
| 52 | 54 | bt_cancel = view.findViewById(R.id.bt_cancle); | 
| 53 | 55 | et_cardnum = view.findViewById(R.id.et_cardnum); | 
| 56 | + et_carduser =view.findViewById(R.id.et_carduser); | |
| 54 | 57 | bt_sure.setOnClickListener(this); | 
| 55 | 58 | Gson g = new Gson(); | 
| 56 | 59 | String jsonStr = getArguments().getString("childJson"); | 
| 57 | 60 | if (!TextUtils.isEmpty(jsonStr)) { | 
| 58 | 61 | currChildBean = g.fromJson(jsonStr, ChildBean.class); | 
| 59 | 62 | et_cardnum.setText(currChildBean.getCardNumber()); | 
| 63 | + et_carduser.setText(currChildBean.getStudentName()); | |
| 60 | 64 | } | 
| 61 | 65 | |
| 62 | 66 | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/apply/ApplySigninFragment.java
| ... | ... | @@ -49,6 +49,7 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | 
| 49 | 49 | private String currdate = ""; | 
| 50 | 50 | List<AttendanceBean> signinlist = new ArrayList<>(); | 
| 51 | 51 | private ChildBean currChildBean = new ChildBean(); | 
| 52 | + private TextView tv_student_name; | |
| 52 | 53 | |
| 53 | 54 | |
| 54 | 55 | public BasePresenter initPresenter() { | 
| ... | ... | @@ -68,27 +69,28 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | 
| 68 | 69 | tv_kaoqin_date = view.findViewById(R.id.tv_kaoqin_date); | 
| 69 | 70 | tv_kaoqin_num = view.findViewById(R.id.tv_kaoqin_num); | 
| 70 | 71 | iv_calendar = view.findViewById(R.id.iv_calendar); | 
| 72 | + tv_student_name = view.findViewById(R.id.tv_student_name); | |
| 73 | + recycle_attendance = view.findViewById(R.id.recycle_attendance); | |
| 74 | + currdate = getNowTime(); | |
| 75 | + tv_kaoqin_date.setText(getNowTime()); | |
| 76 | + initLunarPicker(); | |
| 77 | + iv_calendar.setOnClickListener(this); | |
| 71 | 78 | Gson g = new Gson(); | 
| 72 | 79 | String jsonStr = getArguments().getString("childStr"); | 
| 73 | - if (!TextUtils.isEmpty(jsonStr)) | |
| 80 | + if (!TextUtils.isEmpty(jsonStr)) { | |
| 74 | 81 | currChildBean = g.fromJson(jsonStr, ChildBean.class); | 
| 75 | - initLunarPicker(); | |
| 76 | - iv_calendar.setOnClickListener(this); | |
| 77 | - tv_kaoqin_user.setText(currChildBean.getStudentName()); | |
| 78 | - tv_tips.setText(currChildBean.getStudentName() + "今日无刷卡记录"); | |
| 79 | - currdate = getNowTime(); | |
| 80 | - tv_kaoqin_date.setText(getNowTime()); | |
| 81 | - recycle_attendance = view.findViewById(R.id.recycle_attendance); | |
| 82 | - | |
| 83 | - recycle_attendance.setLayoutManager(new LinearLayoutManager(getActivity())); | |
| 84 | - attendanceAdapter = new AttendanceAdapter(getActivity()); | |
| 85 | - recycle_attendance.setAdapter(attendanceAdapter); | |
| 82 | + tv_kaoqin_user.setText(currChildBean.getStudentName()); | |
| 83 | + tv_student_name.setText(currChildBean.getStudentName()); | |
| 84 | + recycle_attendance.setLayoutManager(new LinearLayoutManager(getActivity())); | |
| 85 | + attendanceAdapter = new AttendanceAdapter(getActivity(),currChildBean.getStudentName()); | |
| 86 | + recycle_attendance.setAdapter(attendanceAdapter); | |
| 87 | + } | |
| 86 | 88 | getData(); | 
| 87 | - | |
| 88 | 89 | } | 
| 89 | 90 | |
| 90 | 91 | private void getData() { | 
| 91 | 92 | mPresenter.SigninDetail(currChildBean.getStudentId(), currChildBean.getSchoolId(), currdate); | 
| 93 | +// mPresenter.SigninDetail(185, 1, currdate);//测试接口 | |
| 92 | 94 | } | 
| 93 | 95 | |
| 94 | 96 | /** | 
| ... | ... | @@ -109,15 +111,17 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | 
| 109 | 111 | case R.id.iv_calendar: | 
| 110 | 112 | pvCustomLunar.show(); | 
| 111 | 113 | break; | 
| 114 | + default: | |
| 115 | + break; | |
| 112 | 116 | } | 
| 113 | 117 | } | 
| 114 | 118 | |
| 115 | 119 | private void initLunarPicker() { | 
| 116 | 120 | Calendar selectedDate = Calendar.getInstance();//系统当前时间 | 
| 117 | 121 | Calendar startDate = Calendar.getInstance(); | 
| 118 | - startDate.set(1900, 1, 1); | |
| 122 | + startDate.set(1900, 0, 1); | |
| 119 | 123 | Calendar endDate = Calendar.getInstance(); | 
| 120 | - endDate.set(2099, 12, 31); | |
| 124 | + endDate.set(2099, 11, 31); | |
| 121 | 125 | //AppContext.getInstance().startLocation(); | 
| 122 | 126 | //时间选择器 | 
| 123 | 127 | pvCustomLunar = new TimePickerBuilder(getActivity(), new OnTimeSelectListener() { | 
| ... | ... | @@ -137,7 +141,7 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | 
| 137 | 141 | Log.i("pvTime", date.toString()); | 
| 138 | 142 | } | 
| 139 | 143 | }).build(); | 
| 140 | -// .setDate(selectedDate) | |
| 144 | +// }).setDate(selectedDate) | |
| 141 | 145 | // .setRangDate(startDate, endDate) | 
| 142 | 146 | // .setLayoutRes(R.layout.pickerview_custom_lunar, new CustomListener() { | 
| 143 | 147 | // @Override | 
| ... | ... | @@ -171,11 +175,12 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | 
| 171 | 175 | |
| 172 | 176 | @Override | 
| 173 | 177 | public void showDetialList(List<AttendanceBean> list) { | 
| 174 | - | |
| 178 | + Log.i("showDetialList", String.valueOf(list.size())); | |
| 175 | 179 | if (list.size() == 0) { | 
| 176 | 180 | layout_tv.setVisibility(View.VISIBLE); | 
| 177 | 181 | recycle_attendance.setVisibility(View.GONE); | 
| 178 | 182 | } else { | 
| 183 | + layout_tv.setVisibility(View.GONE); | |
| 179 | 184 | recycle_attendance.setVisibility(View.VISIBLE); | 
| 180 | 185 | layout_tv.setVisibility(View.GONE); | 
| 181 | 186 | signinlist.clear(); | 
| ... | ... | @@ -188,6 +193,6 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra | 
| 188 | 193 | @Override | 
| 189 | 194 | public void showDetialInfo(List<AttendanceBean> list) { | 
| 190 | 195 | String num = String.valueOf(list.size()); | 
| 191 | - tv_kaoqin_num.setText(num); | |
| 196 | + tv_kaoqin_num.setText(num+"次"); | |
| 192 | 197 | } | 
| 193 | 198 | } | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/report/ChengZhangFragment.java
| ... | ... | @@ -102,7 +102,7 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | 
| 102 | 102 | show(); | 
| 103 | 103 | } | 
| 104 | 104 | |
| 105 | - private void show(){ | |
| 105 | + private void show() { | |
| 106 | 106 | Gson g = new Gson(); | 
| 107 | 107 | if (type.equals(TYPE_CHENGZHANG)) { | 
| 108 | 108 | layout_chengzhang.setVisibility(View.VISIBLE); | 
| ... | ... | @@ -119,11 +119,6 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | 
| 119 | 119 | } | 
| 120 | 120 | } | 
| 121 | 121 | |
| 122 | - @Override | |
| 123 | - public void onResume() { | |
| 124 | - super.onResume(); | |
| 125 | - } | |
| 126 | - | |
| 127 | 122 | private void initCalendarView() { | 
| 128 | 123 | |
| 129 | 124 | showDate(); | 
| ... | ... | @@ -220,6 +215,7 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | 
| 220 | 215 | if (TextUtils.isEmpty(childBean.getCardNumber())) { | 
| 221 | 216 | |
| 222 | 217 | BankActivity.newInstance(getActivity(), "如果使用该应用,请前往激活孩子校园卡"); | 
| 218 | + return; | |
| 223 | 219 | |
| 224 | 220 | } | 
| 225 | 221 | |
| ... | ... | @@ -257,7 +253,7 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | 
| 257 | 253 | } | 
| 258 | 254 | |
| 259 | 255 | public void setChildJson(String jsonStr) { | 
| 260 | - this.jsonStr=jsonStr; | |
| 256 | + this.jsonStr = jsonStr; | |
| 261 | 257 | show(); | 
| 262 | 258 | } | 
| 263 | 259 | } | ... | ... | 
app/src/main/res/layout/activity_bank.xml
| ... | ... | @@ -10,9 +10,12 @@ | 
| 10 | 10 | <include layout="@layout/top" /> | 
| 11 | 11 | |
| 12 | 12 | <TextView | 
| 13 | + android:layout_marginTop="@dimen/size_dp_20" | |
| 13 | 14 | android:id="@+id/tv_info" | 
| 14 | 15 | android:layout_width="match_parent" | 
| 15 | 16 | android:layout_height="wrap_content" | 
| 17 | + android:textSize="@dimen/sp_18" | |
| 18 | + android:gravity="center_horizontal" | |
| 16 | 19 | android:text="" /> | 
| 17 | 20 | |
| 18 | 21 | ... | ... | 
app/src/main/res/layout/fragment_apply_signin.xml
| ... | ... | @@ -62,7 +62,6 @@ | 
| 62 | 62 | android:textSize="@dimen/textSize16" /> | 
| 63 | 63 | </LinearLayout> | 
| 64 | 64 | |
| 65 | - | |
| 66 | 65 | <LinearLayout | 
| 67 | 66 | android:layout_width="match_parent" | 
| 68 | 67 | android:layout_height="0dp" | 
| ... | ... | @@ -123,29 +122,37 @@ | 
| 123 | 122 | android:layout_height="wrap_content" | 
| 124 | 123 | android:layout_weight="2.8" | 
| 125 | 124 | android:gravity="center" | 
| 126 | - android:text="5" | |
| 125 | + android:text="0次" | |
| 127 | 126 | android:textColor="@color/hintTextColor" | 
| 128 | 127 | android:textSize="@dimen/textSize16" /> | 
| 129 | 128 | </LinearLayout> | 
| 129 | + </LinearLayout> | |
| 130 | 130 | |
| 131 | - <LinearLayout | |
| 132 | - android:id="@+id/layout_tv" | |
| 133 | - android:layout_width="match_parent" | |
| 134 | - android:layout_height="0dp" | |
| 135 | - android:layout_weight="2" | |
| 136 | - android:gravity="center" | |
| 137 | - android:orientation="horizontal" | |
| 138 | - android:visibility="gone"> | |
| 131 | + <LinearLayout | |
| 132 | + android:id="@+id/layout_tv" | |
| 133 | + android:layout_width="match_parent" | |
| 134 | + android:layout_height="0dp" | |
| 135 | + android:layout_weight="1" | |
| 136 | + android:gravity="center" | |
| 137 | + android:orientation="horizontal" | |
| 138 | + android:visibility="visible"> | |
| 139 | + | |
| 140 | + <TextView | |
| 141 | + android:id="@+id/tv_student_name" | |
| 142 | + android:layout_width="wrap_content" | |
| 143 | + android:layout_height="wrap_content" | |
| 144 | + android:text="张三" | |
| 145 | + android:textColor="@color/textRed" | |
| 146 | + android:textSize="@dimen/textSize20" /> | |
| 139 | 147 | |
| 140 | - <TextView | |
| 141 | - android:id="@+id/tv_tips" | |
| 142 | - android:layout_width="wrap_content" | |
| 143 | - android:layout_height="wrap_content" | |
| 144 | - android:text="张三今日无刷卡记录!" | |
| 145 | - android:textColor="@color/textRed" | |
| 146 | - android:textSize="@dimen/textSize20" /> | |
| 147 | - </LinearLayout> | |
| 148 | 148 | |
| 149 | + <TextView | |
| 150 | + android:id="@+id/tv_tips" | |
| 151 | + android:layout_width="wrap_content" | |
| 152 | + android:layout_height="wrap_content" | |
| 153 | + android:text="今日无刷卡记录!" | |
| 154 | + android:textColor="@color/textRed" | |
| 155 | + android:textSize="@dimen/textSize20" /> | |
| 149 | 156 | </LinearLayout> | 
| 150 | 157 | |
| 151 | 158 | <android.support.v7.widget.RecyclerView | 
| ... | ... | @@ -153,7 +160,7 @@ | 
| 153 | 160 | android:layout_width="match_parent" | 
| 154 | 161 | android:layout_height="wrap_content" | 
| 155 | 162 | android:background="@color/bgColor" | 
| 156 | - android:visibility="visible"> | |
| 163 | + android:visibility="gone"> | |
| 157 | 164 | |
| 158 | 165 | </android.support.v7.widget.RecyclerView> | 
| 159 | 166 | </LinearLayout> | 
| 160 | 167 | \ No newline at end of file | ... | ... | 
app/src/main/res/layout/fragment_cheng_zhang.xml
| ... | ... | @@ -5,13 +5,13 @@ | 
| 5 | 5 | android:background="@color/white" | 
| 6 | 6 | tools:context="com.shunzhi.parent.ui.fragment.report.ChengZhangFragment"> | 
| 7 | 7 | |
| 8 | - <include layout="@layout/layout_chengzhang"/> | |
| 8 | + <include layout="@layout/layout_chengzhang" /> | |
| 9 | 9 | |
| 10 | 10 | <LinearLayout | 
| 11 | - android:layout_margin="@dimen/size_dp_10" | |
| 12 | 11 | android:id="@+id/layout_report" | 
| 13 | 12 | android:layout_width="match_parent" | 
| 14 | 13 | android:layout_height="match_parent" | 
| 14 | + android:layout_margin="@dimen/size_dp_10" | |
| 15 | 15 | android:orientation="vertical"> | 
| 16 | 16 | |
| 17 | 17 | <!--<include layout="@layout/layout_week" /> android:layout_below="@+id/linearlayout"--> | 
| ... | ... | @@ -48,8 +48,7 @@ | 
| 48 | 48 | android:id="@+id/recycle_report" | 
| 49 | 49 | android:layout_width="match_parent" | 
| 50 | 50 | android:layout_height="match_parent" | 
| 51 | - android:background="@color/bgColor" | |
| 52 | - > | |
| 51 | + android:background="@color/bgColor"> | |
| 53 | 52 | |
| 54 | 53 | </android.support.v7.widget.RecyclerView> | 
| 55 | 54 | ... | ... | 
app/src/main/res/layout/item_apply_signin.xml