|
|
@@ -1,470 +0,0 @@
|
|
|
-//package com.xzjmyk.pm.activity.ui.erp.fragment;
|
|
|
-//
|
|
|
-//import android.app.Activity;
|
|
|
-//import android.content.Intent;
|
|
|
-//import android.os.Bundle;
|
|
|
-//import android.os.Handler;
|
|
|
-//import android.os.Message;
|
|
|
-//import android.support.v7.app.ActionBar;
|
|
|
-//import android.view.Menu;
|
|
|
-//import android.view.MenuInflater;
|
|
|
-//import android.view.MenuItem;
|
|
|
-//import android.view.View;
|
|
|
-//import android.widget.LinearLayout;
|
|
|
-//import android.widget.TextView;
|
|
|
-//
|
|
|
-//import com.baidu.mapapi.model.LatLng;
|
|
|
-//import com.baidu.mapapi.search.core.PoiInfo;
|
|
|
-//import com.lidroid.xutils.ViewUtils;
|
|
|
-//import com.lidroid.xutils.view.annotation.ViewInject;
|
|
|
-//import com.xzjmyk.pm.activity.MyApplication;
|
|
|
-//import com.xzjmyk.pm.activity.R;
|
|
|
-//import com.xzjmyk.pm.activity.bean.oa.Signin;
|
|
|
-//import com.xzjmyk.pm.activity.bean.oa.SigninBean;
|
|
|
-//import com.xzjmyk.pm.activity.db.dao.SigninDao;
|
|
|
-//import com.xzjmyk.pm.activity.ui.base.EasyFragment;
|
|
|
-//import com.xzjmyk.pm.activity.ui.erp.activity.oa.AlarmaActivity;
|
|
|
-//import com.xzjmyk.pm.activity.ui.erp.activity.oa.LocationMapActivity;
|
|
|
-//import com.xzjmyk.pm.activity.ui.erp.activity.oa.SigninActivity;
|
|
|
-//import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
|
|
|
-//import com.xzjmyk.pm.activity.ui.erp.util.CodeUtil;
|
|
|
-//import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
|
|
|
-//import com.xzjmyk.pm.activity.ui.erp.util.Constants;
|
|
|
-//import com.xzjmyk.pm.activity.ui.erp.util.FlexJsonUtil;
|
|
|
-//import com.xzjmyk.pm.activity.ui.tool.ThreadPool;
|
|
|
-//import com.xzjmyk.pm.activity.util.BaiduMapUtil;
|
|
|
-//import com.xzjmyk.pm.activity.util.TimeUtils;
|
|
|
-//import com.xzjmyk.pm.activity.util.ToastUtil;
|
|
|
-//
|
|
|
-//import org.json.JSONException;
|
|
|
-//import org.json.JSONObject;
|
|
|
-//
|
|
|
-//import java.util.Calendar;
|
|
|
-//import java.util.HashMap;
|
|
|
-//import java.util.LinkedHashMap;
|
|
|
-//import java.util.Map;
|
|
|
-//
|
|
|
-///**
|
|
|
-// * Created by gongpm on 2016/7/5.
|
|
|
-// */
|
|
|
-//public class SigninFragment extends EasyFragment {
|
|
|
-// private static final int NEW_TIME_WHAT = 0x10;
|
|
|
-// private static final int whatLoad = 0x11;
|
|
|
-// private static final int whatSignin = 0x12;
|
|
|
-// private static final int thrad = 0x13;
|
|
|
-// private static final int requcode = 0x14;
|
|
|
-// private static final int whatLog = 0x15;
|
|
|
-// private static final double X = 22.540551;
|
|
|
-// private static final double Y = 113.953345;
|
|
|
-//
|
|
|
-// @ViewInject(R.id.location_tv)
|
|
|
-// private TextView location_tv;
|
|
|
-// @ViewInject(R.id.newtime_tv)
|
|
|
-// private TextView newtime_tv;
|
|
|
-// @ViewInject(R.id.time0fwork_tv)
|
|
|
-// private TextView time0fwork_tv;
|
|
|
-// @ViewInject(R.id.signin0fwork_tv)
|
|
|
-// private TextView signin0fwork_tv;
|
|
|
-// @ViewInject(R.id.time0fuwork_tv)
|
|
|
-// private TextView time0fuwork_tv;
|
|
|
-// @ViewInject(R.id.signin0fuwork_tv)
|
|
|
-// private TextView signin0fuwork_tv;
|
|
|
-// @ViewInject(R.id.untime_signin)
|
|
|
-// private TextView untime_signin;
|
|
|
-// @ViewInject(R.id.office_addr)
|
|
|
-// private TextView office_addr;
|
|
|
-// @ViewInject(R.id.unoffice_mm)
|
|
|
-// private TextView unoffice_mm;
|
|
|
-// @ViewInject(R.id.signin_btn)
|
|
|
-// private LinearLayout signin_btn;
|
|
|
-//
|
|
|
-// private LatLng location;
|
|
|
-//
|
|
|
-// private SigninActivity ct;
|
|
|
-// private PoiInfo myPoInfo;
|
|
|
-// private String baseUrl;
|
|
|
-// private boolean isPlay = false;//是否已经签到
|
|
|
-// private Handler handler = new Handler() {
|
|
|
-// @Override
|
|
|
-// public void handleMessage(Message msg) {
|
|
|
-// ct.progressDialog.dismiss();
|
|
|
-// String message = msg.getData().getString("result");
|
|
|
-// switch (msg.what) {
|
|
|
-// case whatLog:
|
|
|
-// break;
|
|
|
-// case whatLoad:
|
|
|
-// try {
|
|
|
-// //获取到当前时间
|
|
|
-// JSONObject object = new JSONObject(message);
|
|
|
-// String u = object.isNull("ondutytime") ? "00:00" : object.getString("ondutytime");
|
|
|
-// String d = object.isNull("offdutytime") ? "00:00" : object.getString("offdutytime");
|
|
|
-// int uHH = Integer.parseInt(u.split(":")[0]);
|
|
|
-// int uMM = Integer.parseInt(u.split(":")[1]);
|
|
|
-// int dHH = Integer.parseInt(d.split(":")[0]);
|
|
|
-// int dMM = Integer.parseInt(d.split(":")[1]);
|
|
|
-// time0fwork_tv.setText((uHH < 10 ? "0" : "") + uHH + ":" + (uMM < 10 ? "0" : "") + uMM);
|
|
|
-// time0fuwork_tv.setText((dHH < 10 ? "0" : "") + dHH + ":" + (dMM < 10 ? "0" : "") + dMM);
|
|
|
-// //获取到签到时间后开线程计算距离签到时间
|
|
|
-// startThrad(time0fwork_tv.getText().toString().trim() + ":00", time0fuwork_tv.getText().toString().trim() + ":00");
|
|
|
-// } catch (JSONException e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// }
|
|
|
-// break;
|
|
|
-// case whatSignin:
|
|
|
-// long time = System.currentTimeMillis();
|
|
|
-// Calendar mCalendar = Calendar.getInstance();
|
|
|
-// mCalendar.setTimeInMillis(time);
|
|
|
-// int mHour = mCalendar.get(Calendar.HOUR_OF_DAY);
|
|
|
-// int mMin = mCalendar.get(Calendar.MINUTE);
|
|
|
-// String strTime = (mHour < 10 ? "0" : "") + mHour + ":" + (mMin < 10 ? "0" : "") + mMin;
|
|
|
-// int k = SigninDao.getInstance(ct).getDateStatus(em_code, TimeUtils.s_long_2_str(System.currentTimeMillis()));
|
|
|
-// if (k == 0) {
|
|
|
-// signin0fwork_tv.setText(strTime);
|
|
|
-// ToastUtil.showToast(ct, "上班打卡成功");
|
|
|
-// } else {
|
|
|
-// signin0fuwork_tv.setText(strTime);
|
|
|
-// ToastUtil.showToast(ct, "下班打卡成功");
|
|
|
-// }
|
|
|
-// Signin bean = new Signin();
|
|
|
-// bean.setCode(em_code);
|
|
|
-// bean.setDate(TimeUtils.s_long_2_str(System.currentTimeMillis()));
|
|
|
-// bean.setDtime(TimeUtils.f_long_2_str(System.currentTimeMillis()));
|
|
|
-// bean.setUtime(TimeUtils.f_long_2_str(System.currentTimeMillis()));
|
|
|
-// SigninDao.getInstance(ct).updata(bean);
|
|
|
-// signinAble(false);//关闭签到入口
|
|
|
-// break;
|
|
|
-// case thrad:
|
|
|
-// if (message == null) return;
|
|
|
-// untime_signin.setText(message);
|
|
|
-// break;
|
|
|
-// case NEW_TIME_WHAT:
|
|
|
-// newtime_tv.setText(TimeUtils.f_long_2_str(System.currentTimeMillis()));
|
|
|
-// break;
|
|
|
-// case Constants.HTTP_SUCCESS_INIT:
|
|
|
-// break;
|
|
|
-// case Constants.APP_SOCKETIMEOUTEXCEPTION:
|
|
|
-// break;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// };
|
|
|
-// private String em_code;
|
|
|
-// long distanceTime = 60 * 1000 * 20;//允许提前20分钟签到
|
|
|
-//
|
|
|
-// private void signinAble() {
|
|
|
-// int k = SigninDao.getInstance(ct).getDateStatus(em_code, TimeUtils.s_long_2_str(System.currentTimeMillis()));
|
|
|
-// if (k == 2) {
|
|
|
-// signinAble(false);
|
|
|
-// } else {
|
|
|
-// LatLng lalat = new LatLng(MyApplication.getInstance().getBdLocationHelper().getLatitude(),
|
|
|
-// MyApplication.getInstance().getBdLocationHelper().getLongitude());
|
|
|
-// String str = BaiduMapUtil.getInstence().getDistance(lalat, location);
|
|
|
-// unoffice_mm.setText("距离考勤地点:" + str + "米");
|
|
|
-// if (BaiduMapUtil.getInstence().getDistanceD(lalat, location) < 500) {
|
|
|
-// signinAble(true);
|
|
|
-// } else {
|
|
|
-// signinAble(false);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// private void signinAble(boolean b) {
|
|
|
-// isPlay = !b;
|
|
|
-// signin_btn.setFocusable(b);
|
|
|
-// signin_btn.setClickable(b);
|
|
|
-// if (b) {
|
|
|
-// signin_btn.setBackgroundResource(R.drawable.button_round_shape);
|
|
|
-// } else {
|
|
|
-// signin_btn.setBackgroundResource(R.drawable.button_signin);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// protected int inflateLayoutId() {
|
|
|
-// return R.layout.fragment_signin;
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// public void onAttach(Activity activity) {
|
|
|
-// super.onAttach(activity);
|
|
|
-// ct = (SigninActivity) activity;
|
|
|
-// }
|
|
|
-//
|
|
|
-// //开启线程计算时间
|
|
|
-// private void startThrad(final String uTime, final String dTime) {
|
|
|
-// ThreadPool.getThreadPool().addTask(new Runnable() {
|
|
|
-// @Override
|
|
|
-// public void run() {
|
|
|
-// long distance = -1;
|
|
|
-// if (signinNum == 0) {//没有打过卡,那当前时间和上班时间对比
|
|
|
-// distance = getDistanceTime(uTime);
|
|
|
-// } else {//打了上班卡,拿当前时间和下班时间对比
|
|
|
-// distance = getDistanceTime(dTime);
|
|
|
-// }
|
|
|
-//
|
|
|
-// long unit;
|
|
|
-// if (distance > 0) {//当前时间超过指定签到时间,要不断加
|
|
|
-// unit = 1000;
|
|
|
-// } else {//当前时间还没到签到时间,要减
|
|
|
-// unit = -1000;
|
|
|
-// }
|
|
|
-// distance = Math.abs(distance);
|
|
|
-// try {
|
|
|
-// while (distance > 0) {
|
|
|
-// distance -= unit;
|
|
|
-// sendHandle(distance);
|
|
|
-// Thread.sleep(1000);
|
|
|
-// }
|
|
|
-// } catch (InterruptedException e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// }
|
|
|
-// }
|
|
|
-// });
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 获取当天的指定时分秒和当前的时间差
|
|
|
-// *
|
|
|
-// * @param time 时分秒 "HH:mm:ss"
|
|
|
-// * @return 相差时间long(指定时间去减当前时间)
|
|
|
-// */
|
|
|
-// private long getDistanceTime(String time) {
|
|
|
-// String temp = TimeUtils.s_long_2_str(System.currentTimeMillis()) + " " + time;
|
|
|
-// return TimeUtils.f_str_2_long(temp) - System.currentTimeMillis();
|
|
|
-// }
|
|
|
-//
|
|
|
-// private void sendHandle(long distance) {
|
|
|
-// Message message = handler.obtainMessage();
|
|
|
-// message.what = thrad;
|
|
|
-// int d = (int) distance / 1000;
|
|
|
-// int h = d / 3600;
|
|
|
-// int m = (d % 3600) / 60;
|
|
|
-// int s = ((d % 3600) % 60);
|
|
|
-// String str = (h < 10 ? "0" : "") + h + ":" + (m < 10 ? "0" : "") + m + ":" + (s < 10 ? "0" : "") + s;
|
|
|
-// Bundle bundle = new Bundle();
|
|
|
-// bundle.putString("result", str);
|
|
|
-// message.setData(bundle);
|
|
|
-// handler.sendMessage(message);
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// protected void onCreateView(Bundle savedInstanceState, boolean createView) {
|
|
|
-// setHasOptionsMenu(true);
|
|
|
-// ViewUtils.inject(getmRootView());
|
|
|
-// long time = System.currentTimeMillis();
|
|
|
-// ct.getSupportActionBar().setTitle(TimeUtils.day_long_2_str(time) + " " + TimeUtils.getWeek(time));
|
|
|
-// baseUrl = CommonUtil.getSharedPreferences(ct, "erp_baseurl");
|
|
|
-// initView();
|
|
|
-// loadNetData();
|
|
|
-// loadLog();
|
|
|
-// }
|
|
|
-//
|
|
|
-// //获取网络数据
|
|
|
-// private void loadNetData() {
|
|
|
-// ct.progressDialog.show();
|
|
|
-// //获取网络数据
|
|
|
-// String url = baseUrl + "mobile/getWorkDate.action";
|
|
|
-// if (em_code == null)
|
|
|
-// em_code = CommonUtil.getSharedPreferences(ct, "erp_username");
|
|
|
-// int date = TimeUtils.int_long_2_str(System.currentTimeMillis());
|
|
|
-// String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
|
|
|
-// final Map<String, Object> param = new HashMap<>();
|
|
|
-// param.put("emcode", em_code);
|
|
|
-// param.put("date", date);
|
|
|
-// param.put("sessionId", sessionId);
|
|
|
-// LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
|
-// headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
|
|
|
-// ViewUtil.httpSendRequest(ct, url, param, handler, headers, whatLoad, null, null, "post");
|
|
|
-// }
|
|
|
-//
|
|
|
-// //获取打卡记录接口
|
|
|
-// private void loadLog() {
|
|
|
-// ct.progressDialog.show();
|
|
|
-// //获取网络数据
|
|
|
-// String url = baseUrl + "mobile/common/list.action";
|
|
|
-// int date = TimeUtils.int_long_2_str(System.currentTimeMillis());
|
|
|
-// String emcode = CommonUtil.getSharedPreferences(ct, "erp_username");
|
|
|
-// String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
|
|
|
-// final Map<String, Object> param = new HashMap<>();
|
|
|
-// param.put("emcode", emcode);
|
|
|
-// param.put("currentMaster", CommonUtil.getSharedPreferences(ct, "erp_master"));
|
|
|
-// param.put("page", 1);
|
|
|
-// param.put("pageSize", 10);
|
|
|
-// param.put("condition", "1=1");
|
|
|
-// param.put("sessionId", sessionId);
|
|
|
-// param.put("caller", "CardLog");
|
|
|
-// param.put("sessionId", sessionId);
|
|
|
-// LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
|
-// headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
|
|
|
-// ViewUtil.httpSendRequest(ct, url, param, handler, headers, whatLog, null, null, "get");
|
|
|
-// }
|
|
|
-//
|
|
|
-// //当位置信息长度超过8个字符,就会报错
|
|
|
-// public String getLocation() {
|
|
|
-// String temp = location_tv.getText().toString();
|
|
|
-// String locationStr = "";
|
|
|
-// if (temp.length() > 8) {
|
|
|
-// locationStr = temp.substring(0, 7);
|
|
|
-// }
|
|
|
-// if (temp.length() <= 0) {
|
|
|
-// locationStr = "未捕获位置名称";
|
|
|
-// }
|
|
|
-// return locationStr;
|
|
|
-// }
|
|
|
-//
|
|
|
-// //签到接口
|
|
|
-// private void doSignin(String code) {
|
|
|
-// //获取网络数据
|
|
|
-// String url = baseUrl + "mobile/saveCardLog.action";
|
|
|
-// final Map<String, Object> param = new HashMap<>();
|
|
|
-// SigninBean bean = new SigninBean();
|
|
|
-// bean.setCl_code(code);
|
|
|
-// bean.setCl_address(office_addr.getText().toString());
|
|
|
-// bean.setCl_distance(300);
|
|
|
-// bean.setCl_emcode(CommonUtil.getSharedPreferences(ct, "erp_username"));
|
|
|
-// bean.setCl_time(TimeUtils.f_long_2_str(System.currentTimeMillis()));
|
|
|
-// bean.setCl_location(getLocation());
|
|
|
-// bean.setCl_emname(MyApplication.getInstance().mLoginUser.getNickName());
|
|
|
-// bean.setCl_phone(MyApplication.getInstance().mLoginUser.getTelephone());
|
|
|
-// String formStore = FlexJsonUtil.toJson(bean);
|
|
|
-// String caller = "CardLog";
|
|
|
-// param.put("caller", caller);
|
|
|
-// param.put("formStore", formStore);
|
|
|
-// param.put("sessionId", CommonUtil.getSharedPreferences(ct, "sessionId"));
|
|
|
-// LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
|
-// headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
|
|
|
-// ViewUtil.httpSendRequest(ct, url, param, handler, headers, whatSignin, null, null, "post");
|
|
|
-// }
|
|
|
-//
|
|
|
-// private void initView() {
|
|
|
-//// ct.getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
|
|
|
-// setListener();
|
|
|
-// location_tv.setText(MyApplication.getInstance().getBdLocationHelper().getAddress());//初始化地址
|
|
|
-// em_code = CommonUtil.getSharedPreferences(ct, "erp_username");//获取当前员工编号
|
|
|
-// Signin bean = SigninDao.getInstance(ct).query(em_code, TimeUtils.s_long_2_str(System.currentTimeMillis()));
|
|
|
-// if (bean != null) {//当打卡有记录
|
|
|
-//
|
|
|
-//
|
|
|
-// }
|
|
|
-// //判断考勤距离
|
|
|
-// LatLng lalat = new LatLng(MyApplication.getInstance().getBdLocationHelper().getLatitude(),
|
|
|
-// MyApplication.getInstance().getBdLocationHelper().getLongitude());
|
|
|
-// String str = BaiduMapUtil.getInstence().getDistance(lalat, location);
|
|
|
-// unoffice_mm.setText("距离考勤地点:" + str + "米");
|
|
|
-// signinAble();
|
|
|
-// }
|
|
|
-//
|
|
|
-// private void setListener() {
|
|
|
-// ThreadPool.getThreadPool().addTask(new Runnable() {//开启线程进入时间显示
|
|
|
-// @Override
|
|
|
-// public void run() {
|
|
|
-// while (true) {
|
|
|
-// if (isPlay) break;
|
|
|
-// try {
|
|
|
-// handler.sendEmptyMessage(NEW_TIME_WHAT);
|
|
|
-// Thread.sleep(1000);
|
|
|
-// } catch (InterruptedException e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// });
|
|
|
-// signin_btn.setOnClickListener(new View.OnClickListener() {
|
|
|
-// @Override
|
|
|
-// public void onClick(View view) {
|
|
|
-// CodeUtil.getInstance().getCode(ct, "CardLog", new CodeUtil.OnCodeLinstener() {
|
|
|
-// @Override
|
|
|
-// public void callBack(String code) {
|
|
|
-// doSignin(code);
|
|
|
-// }
|
|
|
-// });
|
|
|
-//
|
|
|
-// }
|
|
|
-// });
|
|
|
-// findViewById(R.id.addr_tag).setOnClickListener(new View.OnClickListener() {
|
|
|
-// @Override
|
|
|
-// public void onClick(View view) {
|
|
|
-// startActivityForResult(new Intent(getActivity(), LocationMapActivity.class), requcode);
|
|
|
-// }
|
|
|
-// });
|
|
|
-// }
|
|
|
-//
|
|
|
-//// private void showDateDalog() {
|
|
|
-//// //显示日期选择窗口
|
|
|
-//// if (dateDialog == null)
|
|
|
-//// dateDialog = new AlertDialog.Builder(getActivity()).create();
|
|
|
-//// if (!dateDialog.isShowing())
|
|
|
-//// dateDialog.show();
|
|
|
-//// DatePicker picker = new DatePicker(ct);
|
|
|
-//// picker.setDate(CalendarUtils.getCurrentYear(), CalendarUtils.getCurrentMonth());
|
|
|
-//// picker.setMode(DPMode.SINGLE);
|
|
|
-//// picker.setOnDatePickedListener(new OnDatePickedListener() {
|
|
|
-//// @Override
|
|
|
-//// public void onDatePicked(String date) {
|
|
|
-//// ct.getSupportActionBar().setTitle(TimeUtils.day_long_2_str(TimeUtils.s_str_2_long(date)) + " " + TimeUtils.getWeek(date));
|
|
|
-//// updataUIByDate(TimeUtils.day_long_2_str(TimeUtils.s_str_2_long(date)));
|
|
|
-//// dateDialog.dismiss();
|
|
|
-//// }
|
|
|
-//// });
|
|
|
-//// ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(
|
|
|
-//// ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
|
|
-//// dateDialog.getWindow().setContentView(picker, params);
|
|
|
-//// dateDialog.getWindow().setGravity(Gravity.CENTER);
|
|
|
-//// }
|
|
|
-//
|
|
|
-// private void updataUIByDate(String date) {
|
|
|
-// //当日期改变时候更新ui
|
|
|
-// if (!date.equals(TimeUtils.day_long_2_str(System.currentTimeMillis())))
|
|
|
-// signinAble(false);//选择时间非当日,不给签到
|
|
|
-// Signin bean = SigninDao.getInstance(ct).query(em_code, TimeUtils.s_long_2_str(System.currentTimeMillis()));
|
|
|
-// if (bean == null) {
|
|
|
-// signin0fwork_tv.setText("--:--");
|
|
|
-// signin0fuwork_tv.setText("--:--");
|
|
|
-// newtime_tv.setText(TimeUtils.f_long_2_str(System.currentTimeMillis()));
|
|
|
-// return;
|
|
|
-// }
|
|
|
-// if (bean.getSigninNum() >= 1) {
|
|
|
-// signin0fwork_tv.setText(TimeUtils.long2str(TimeUtils.f_str_2_long(bean.getUtime()), "HH:mm"));
|
|
|
-// newtime_tv.setText(bean.getUtime());
|
|
|
-// }
|
|
|
-// if (bean.getSigninNum() == 2) {
|
|
|
-// signin0fuwork_tv.setText(TimeUtils.long2str(TimeUtils.f_str_2_long(bean.getDtime()), "HH:mm"));
|
|
|
-// newtime_tv.setText(bean.getDtime());
|
|
|
-// } else {
|
|
|
-// signin0fwork_tv.setText("--:--");
|
|
|
-// signin0fuwork_tv.setText("--:--");
|
|
|
-// newtime_tv.setText(TimeUtils.f_long_2_str(System.currentTimeMillis()));
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
|
|
-// inflater.inflate(R.menu.menu_oa_signin, menu);
|
|
|
-// super.onCreateOptionsMenu(menu, inflater);
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
-// if (item.getItemId() == R.id.oa_alarma) {
|
|
|
-// startActivity(new Intent(ct, AlarmaActivity.class));
|
|
|
-// }
|
|
|
-// return super.onOptionsItemSelected(item);
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
|
-// if (data != null) {
|
|
|
-// if (requestCode == requcode) {
|
|
|
-// if (resultCode == LocationMapActivity.REQUCODE) {//地图选择返回
|
|
|
-// myPoInfo = data.getParcelableExtra(LocationMapActivity.REQUESTNAME);
|
|
|
-// location_tv.setText(myPoInfo.name);
|
|
|
-// if (location == null)
|
|
|
-// location = new LatLng(X, Y);
|
|
|
-// String str = BaiduMapUtil.getInstence().getDistance(myPoInfo.location, location);
|
|
|
-// unoffice_mm.setText("距离考勤地点:" + str + "米");
|
|
|
-// signinAble();
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// super.onActivityResult(requestCode, resultCode, data);
|
|
|
-// }
|
|
|
-//}
|