正在查看: 爱心e站 v1.0.0 应用的 MonthPlanActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 爱心e站 v1.0.0 应用的 MonthPlanActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.newheyd.JZKFcanjiren.Activity;
import android.os.Bundle;
import android.widget.TextView;
import com.igexin.assist.sdk.AssistPushConsts;
import com.newheyd.JZKFcanjiren.BaseActivity;
import com.newheyd.JZKFcanjiren.Bean.RehabilitationTrainOrEffectEvaluationBean;
import com.newheyd.JZKFcanjiren.Bean.UserInfo;
import com.newheyd.JZKFcanjiren.MyApplication;
import com.newheyd.JZKFcanjiren.R;
import com.newheyd.JZKFcanjiren.Utils.DataUtil;
import com.newheyd.JZKFcanjiren.Utils.StastisticUtil;
import com.newheyd.JZKFcanjiren.Utils.ToastUtils;
import com.newheyd.JZKFcanjiren.Utils.locationUtil.LocationAddrUtil;
import com.newheyd.JZKFcanjiren.View.TitleView;
import com.newheyd.JZKFcanjiren.config.NewHYConfig;
import com.newheyd.JZKFcanjiren.model.BaseResult;
import com.newheyd.JZKFcanjiren.model.DataParser;
import com.newheyd.JZKFcanjiren.net.CommonDataListTask;
import com.newheyd.JZKFcanjiren.net.NewHYTask;
import com.newheyd.JZKFcanjiren.net.RequestServiceList;
import java.util.HashMap;
public class MonthPlanActivity extends BaseActivity {
private String id;
private TitleView mTitleview;
private TextView mTvClass;
private TextView mTvDate;
private TextView mTvIdcard;
private TextView mTvLongGoal;
private TextView mTvName;
private TextView mTvScope;
private TextView mTvShortGoal;
private TextView mTvTeacher;
private RehabilitationTrainOrEffectEvaluationBean rehabilitationTrainOrEffectEvaluationBean;
private UserInfo userInfo = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_month_plan);
super.onCreate(savedInstanceState);
this.userInfo = MyApplication.getInstance().getUserInfo();
getMonthPlan();
goStatistics();
}
public void goStatistics() {
HashMap<String, String> map = LocationAddrUtil.getInstance().getLocationParam(this.mContext);
StastisticUtil.getInstance().onEvent(this.mContext, "MonthPlanActivity", map);
}
public void getMonthPlan() {
HashMap<String, String> params = new HashMap<>();
params.put(AssistPushConsts.MSG_TYPE_TOKEN, this.userInfo == null ? "" : this.userInfo.getToken());
params.put("id", this.id);
NewHYTask task = new CommonDataListTask(RequestServiceList.SERVICE_VIEWMONTHPLAN, params, RehabilitationTrainOrEffectEvaluationBean.class);
executeRequest(task);
}
@Override
public void onResponseBefore(NewHYTask task) {
switch (task.getService()) {
case SERVICE_VIEWMONTHPLAN:
showProgress(NewHYConfig.LOADING_HINT, false);
break;
}
}
@Override
public void onResponseAfter(NewHYTask task) {
switch (task.getService()) {
case SERVICE_VIEWMONTHPLAN:
cancleProgress();
break;
}
}
@Override
public void onResponseSuccessful(NewHYTask task, BaseResult object) {
switch (task.getService()) {
case SERVICE_VIEWMONTHPLAN:
DataParser<RehabilitationTrainOrEffectEvaluationBean> mResult = (DataParser) object;
if (mResult.getObjects().size() != 0) {
this.rehabilitationTrainOrEffectEvaluationBean = mResult.getObjects().get(0);
freshData();
break;
}
break;
}
}
public void freshData() {
this.mTvName.setText(this.rehabilitationTrainOrEffectEvaluationBean.getName());
this.mTvIdcard.setText(this.rehabilitationTrainOrEffectEvaluationBean.getCitizenId());
this.mTvTeacher.setText(this.rehabilitationTrainOrEffectEvaluationBean.getServiceName());
this.mTvClass.setText(this.rehabilitationTrainOrEffectEvaluationBean.getServiceClass());
this.mTvScope.setText(this.rehabilitationTrainOrEffectEvaluationBean.getScope());
this.mTvDate.setText(DataUtil.formatDateOther(this.rehabilitationTrainOrEffectEvaluationBean.getMonthDate()));
this.mTvLongGoal.setText(this.rehabilitationTrainOrEffectEvaluationBean.getLongGoal());
this.mTvShortGoal.setText(this.rehabilitationTrainOrEffectEvaluationBean.getShortGoal());
}
@Override
public void onResponseError(NewHYTask task, BaseResult object) {
switch (task.getService()) {
case SERVICE_VIEWMONTHPLAN:
ToastUtils.showShortToast(this.mContext, object.getMsg());
break;
}
}
@Override
public void onServerError(NewHYTask task, int failedType) {
switch (task.getService()) {
case SERVICE_VIEWMONTHPLAN:
onResultShow(failedType);
break;
}
}
@Override
public void getExtraParam() {
this.id = getIntent().getStringExtra("id");
}
@Override
public void initViews() {
this.mTitleview = (TitleView) findViewById(R.id.titleview);
this.mTvName = (TextView) findViewById(R.id.tv_name);
this.mTvIdcard = (TextView) findViewById(R.id.tv_idcard);
this.mTvTeacher = (TextView) findViewById(R.id.tv_teacher);
this.mTvClass = (TextView) findViewById(R.id.tv_class);
this.mTvScope = (TextView) findViewById(R.id.tv_scope);
this.mTvDate = (TextView) findViewById(R.id.tv_date);
this.mTvLongGoal = (TextView) findViewById(R.id.tv_long_goal);
this.mTvShortGoal = (TextView) findViewById(R.id.tv_short_goal);
}
@Override
public void setListener() {
this.mTitleview.setOnTitleClik(new TitleView.BackListenner() {
@Override
public void BackSet() {
MonthPlanActivity.this.finish();
}
}, null);
this.mTitleview.setTextName("康复服务月计划查看");
}
}