|
|
@@ -231,12 +231,9 @@ public class ClockFragment extends BaseFragment<ClockFragmentPresenter> implemen
|
|
|
cvAuthentication.setVisibility(View.GONE);
|
|
|
rlTodayMoney.setVisibility(View.GONE);
|
|
|
tvRelocation.setVisibility(View.GONE);
|
|
|
+
|
|
|
+ tvName.setText(AppCacheManager.getInstance().getMemberModel() != null && !TextUtils.isEmpty(AppCacheManager.getInstance().getMemberModel().getRealName()) ? AppCacheManager.getInstance().getMemberModel().getRealName() : "开心用户");
|
|
|
ImageLoaderUtil.getInstance().loadCircleImage(AppCacheManager.getInstance().getLoginModel().getHeadImgUrl(), R.mipmap.ic_default_header, ivHeader);
|
|
|
- if (!TextUtils.isEmpty(AppCacheManager.getInstance().getLoginModel().getNickName())) {
|
|
|
- tvName.setText(AppCacheManager.getInstance().getLoginModel().getNickName());
|
|
|
- } else {
|
|
|
- tvName.setText("开心用户");
|
|
|
- }
|
|
|
|
|
|
tvWorkHour.setText(infoBean.getSumDuration());
|
|
|
tvWeekRepay.setText(infoBean.getSumMoney());
|
|
|
@@ -264,6 +261,7 @@ public class ClockFragment extends BaseFragment<ClockFragmentPresenter> implemen
|
|
|
tvAuthentication.setText(R.string.me_wait_authentication);
|
|
|
endLocation();
|
|
|
} else {//认证成功
|
|
|
+ startLocation();
|
|
|
tvAuthentication.setText(R.string.me_yes_authentication);
|
|
|
if (infoBean.getClockType() == AppConstant.CLOCK_TYPE_START) {//上班打卡
|
|
|
if ("未完成".equals(infoBean.getStartPunch())) {//如果是未完成代表可以打上班卡
|
|
|
@@ -271,27 +269,23 @@ public class ClockFragment extends BaseFragment<ClockFragmentPresenter> implemen
|
|
|
vClock.setBackgroundResource(R.mipmap.ic_clock_btn_1);
|
|
|
tvClockRangeState.setText(R.string.have_in_clock_range);
|
|
|
vClockRangeState.setBackgroundResource(R.mipmap.ic_clock_tips_range_in);
|
|
|
- startLocation();
|
|
|
} else {//如果存在上班卡,表示已打上班卡,下班时间未到不可打下班卡
|
|
|
vClock.setEnabled(false);
|
|
|
vClock.setBackgroundResource(R.mipmap.ic_clock_btn_2_2);
|
|
|
tvClockRangeState.setText("上班" + infoBean.getDailyAvailableMinHour() + "小时候才能进行上班打卡");
|
|
|
vClockRangeState.setBackgroundResource(R.mipmap.ic_clock_tips_remind);
|
|
|
- endLocation();
|
|
|
}
|
|
|
} else if (infoBean.getClockType() == AppConstant.CLOCK_TYPE_END) {//下班打卡
|
|
|
vClock.setEnabled(true);
|
|
|
vClock.setBackgroundResource(R.mipmap.ic_clock_btn_2_1);
|
|
|
tvClockRangeState.setText(R.string.have_in_clock_range);
|
|
|
vClockRangeState.setBackgroundResource(R.mipmap.ic_clock_tips_range_in);
|
|
|
- startLocation();
|
|
|
} else if (infoBean.getClockType() == AppConstant.CLOCK_TYPE_MORE_THAN) {//超出范围
|
|
|
vClock.setEnabled(false);
|
|
|
vClock.setBackgroundResource(R.mipmap.ic_clock_btn_4);
|
|
|
tvClockRangeState.setText(R.string.please_in_company);
|
|
|
vClockRangeState.setBackgroundResource(R.mipmap.ic_clock_tips_remind);
|
|
|
tvRelocation.setVisibility(View.VISIBLE);
|
|
|
- endLocation();
|
|
|
} else if (infoBean.getClockType() == AppConstant.CLOCK_TYPE_FINISH) {//完成
|
|
|
vClock.setEnabled(false);
|
|
|
vClock.setBackgroundResource(R.mipmap.ic_clock_btn_3);
|
|
|
@@ -301,7 +295,6 @@ public class ClockFragment extends BaseFragment<ClockFragmentPresenter> implemen
|
|
|
tvTodayMoney.setText(infoBean.getTodayMoney());
|
|
|
rlTodayMoney.setVisibility(View.VISIBLE);
|
|
|
}
|
|
|
- endLocation();
|
|
|
}
|
|
|
}
|
|
|
}
|