|
|
@@ -41,7 +41,6 @@ import com.lidroid.xutils.view.annotation.ViewInject;
|
|
|
import com.xzjmyk.pm.activity.AppConfig;
|
|
|
import com.xzjmyk.pm.activity.MyApplication;
|
|
|
import com.xzjmyk.pm.activity.R;
|
|
|
-import com.xzjmyk.pm.activity.bean.oa.OABean;
|
|
|
import com.xzjmyk.pm.activity.ui.MainActivity;
|
|
|
import com.xzjmyk.pm.activity.ui.base.BaseActivity;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.activity.DetailTaskActivity;
|
|
|
@@ -50,15 +49,19 @@ import com.xzjmyk.pm.activity.ui.erp.activity.TravelActivity;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.activity.WorkExtraActivity;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.activity.crm.VisitReportAddActivity;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.activity.form.DataFormDetailActivity;
|
|
|
-import com.xzjmyk.pm.activity.ui.erp.adapter.oa.OAListAdapter;
|
|
|
+import com.xzjmyk.pm.activity.ui.erp.adapter.oa.OAAdapter;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.fragment.CalendarFragmet;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.model.Employees;
|
|
|
+import com.xzjmyk.pm.activity.ui.erp.model.oa.OAModel;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.util.JsonValidator;
|
|
|
+import com.xzjmyk.pm.activity.ui.erp.util.ListUtils;
|
|
|
+import com.xzjmyk.pm.activity.ui.erp.util.LogUtil;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.util.OACheckUtil;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.util.StringUtils;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.util.oa.CommonInterface;
|
|
|
+import com.xzjmyk.pm.activity.ui.erp.util.oa.OAHttpUtil;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.view.EmptyLayout;
|
|
|
import com.xzjmyk.pm.activity.ui.platform.task.TaskAddB2BActivity;
|
|
|
import com.xzjmyk.pm.activity.ui.platform.task.TaskAddErpActivity;
|
|
|
@@ -83,8 +86,6 @@ import java.util.LinkedHashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
-import java.util.regex.Matcher;
|
|
|
-import java.util.regex.Pattern;
|
|
|
|
|
|
import static com.alibaba.fastjson.JSON.parseObject;
|
|
|
import static com.xzjmyk.pm.activity.view.crouton.Crouton.makeText;
|
|
|
@@ -154,10 +155,11 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
private boolean isMe = false;
|
|
|
private boolean hasOther = true;
|
|
|
private long lastTime = 0;
|
|
|
- private JSONArray meArray; //当月我的数组
|
|
|
- private JSONArray otherArray; //当月我的下属的数组
|
|
|
+ private OAHttpUtil util = new OAHttpUtil();
|
|
|
+ private List<OAModel> meModels;
|
|
|
+ private List<OAModel> otherModels;
|
|
|
|
|
|
- private OAListAdapter adapter; //当前列表的数据
|
|
|
+ private OAAdapter adapter; //当前列表的数据
|
|
|
private PagerAdapter pagerAdapter;//当前Viewpager适配器
|
|
|
private Date curDate; //当前显示的日期 包含年月日信息
|
|
|
private Set<Integer> meInt; //我的任务
|
|
|
@@ -167,6 +169,10 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
@Override
|
|
|
public void handleMessage(Message msg) {
|
|
|
try {
|
|
|
+ if (mPullToRefreshScrollView.isRefreshing()) {
|
|
|
+ ViewUtil.ToastMessage(OAActivity.this, "刷新成功", Style.holoGreenLight, 2000);
|
|
|
+ mPullToRefreshScrollView.onRefreshComplete();
|
|
|
+ }
|
|
|
if (progressDialog != null && progressDialog.isShowing())
|
|
|
progressDialog.dismiss();
|
|
|
String message = (String) msg.getData().get("result");
|
|
|
@@ -178,35 +184,16 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
emptyLayout.showEmpty();
|
|
|
return;
|
|
|
}
|
|
|
- JSONObject chche = null;
|
|
|
- meArray = new JSONArray();
|
|
|
- otherArray = new JSONArray();
|
|
|
- //处理我的
|
|
|
- if (jsonObject.containsKey("me")) {
|
|
|
- chche = jsonObject.getJSONObject("me");
|
|
|
- addJsonToArray(meArray, chche);
|
|
|
- meInt.clear();
|
|
|
- if (meArray != null && meArray.size() > 0) {
|
|
|
- meInt.addAll(getDay(meArray));
|
|
|
- }
|
|
|
- }
|
|
|
+ meModels = util.getModelByJSON(jsonObject, "me", true);
|
|
|
+ otherModels = util.getModelByJSON(jsonObject, "other", false);
|
|
|
+ meInt = util.getTaskList(meModels);
|
|
|
+ otherInt = util.getTaskList(otherModels);
|
|
|
//处理下属
|
|
|
- if (jsonObject.containsKey("other")) {
|
|
|
- chche = jsonObject.getJSONObject("other");
|
|
|
- addJsonToArray(otherArray, chche);
|
|
|
- otherInt.clear();
|
|
|
- if (otherArray != null && otherArray.size() > 0) {
|
|
|
- otherInt.addAll(getDay(otherArray));
|
|
|
- }
|
|
|
- } else {
|
|
|
+ if (!jsonObject.containsKey("other")) {
|
|
|
hasOther = false;
|
|
|
chaneTAG(true);
|
|
|
}
|
|
|
loadSuccess();
|
|
|
- if (mPullToRefreshScrollView.isRefreshing()) {
|
|
|
- ViewUtil.ToastMessage(OAActivity.this, "刷新成功", Style.holoGreenLight, 2000);
|
|
|
- mPullToRefreshScrollView.onRefreshComplete();
|
|
|
- }
|
|
|
break;
|
|
|
case 0x12://获取下属列表
|
|
|
JSONArray array = JSON.parseObject(message).getJSONArray("datas");//获取到数据
|
|
|
@@ -248,6 +235,8 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
break;
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
+ if (e != null)
|
|
|
+ LogUtil.i("msg.what=" + msg.what + " " + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -258,21 +247,6 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
private boolean isB2b;
|
|
|
private String workDailyAdd;
|
|
|
|
|
|
- private Set<Integer> getDay(JSONArray array) {
|
|
|
- JSONObject object = null;
|
|
|
- Set<Integer> integers = new HashSet<>();
|
|
|
- Calendar c = Calendar.getInstance();
|
|
|
- for (int i = 0; i < array.size(); i++) {
|
|
|
- object = array.getJSONObject(i);
|
|
|
- long time = getTimeForObject(object);
|
|
|
- if (time == 0) continue;
|
|
|
- c.setTimeInMillis(time);
|
|
|
- integers.add(c.get(Calendar.DAY_OF_MONTH));
|
|
|
- }
|
|
|
- return integers;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
@Override
|
|
|
public boolean onCreateOptionsMenu(Menu menu) {
|
|
|
getMenuInflater().inflate(R.menu.menu_add_icon, menu);
|
|
|
@@ -316,27 +290,20 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
|
if (requestCode == 0x20) {
|
|
|
loadNetData(TimeUtils.ym_format.format(curDate));
|
|
|
- } else if (requestCode == 0x11 && resultCode == 0x11) {
|
|
|
+ } else if (requestCode == 0x11 && resultCode == 0x11) {//选择下属
|
|
|
if (data == null) return;
|
|
|
Employees entity = data.getParcelableExtra("data");
|
|
|
if (entity == null) return;
|
|
|
String otherName = entity.getEm_name();
|
|
|
- if (!StringUtils.isEmpty(otherName)) {
|
|
|
- JSONArray array = new JSONArray();
|
|
|
- for (int i = 0; i < otherArray.size(); i++) {
|
|
|
- JSONObject object = otherArray.getJSONObject(i);
|
|
|
- String name = "," + getString(object, "handler") +
|
|
|
- getString(object, "recordman") +
|
|
|
- getString(object, "visitman") +
|
|
|
- getString(object, "mp_recorder") + ",";
|
|
|
- if (StringUtils.isEmpty(otherName)//没有选择下属
|
|
|
- || getIsDecorat(name, "," + otherName + ",")) {
|
|
|
- array.add(object);
|
|
|
- }
|
|
|
+ if (!StringUtils.isEmpty(otherName) && !ListUtils.isEmpty(otherModels)) {
|
|
|
+ List<OAModel> filterModels = new ArrayList<>();
|
|
|
+ for (OAModel e : otherModels) {
|
|
|
+ if (StringUtils.isInclude(e.getHandler(), otherName))
|
|
|
+ filterModels.add(e);
|
|
|
}
|
|
|
- Set<Integer> aa = getDay(array);
|
|
|
- setDateToListener(aa);
|
|
|
- setAdapterBeans(array);
|
|
|
+ Set<Integer> filterTasks = util.getTaskList(filterModels);
|
|
|
+ setDateToListener(filterTasks);
|
|
|
+ setAdapterBeans(filterModels);
|
|
|
}
|
|
|
} else if (requestCode == 0x21) {
|
|
|
loadNetData(TimeUtils.ym_format.format(curDate));
|
|
|
@@ -385,10 +352,15 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
oa_listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
@Override
|
|
|
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
|
|
- JSONArray array = adapter.getArray();
|
|
|
- JSONObject object = array.getJSONObject(i);
|
|
|
+ if (adapter == null || ListUtils.isEmpty(adapter.getModels()) || adapter.getModels().size() <= i)
|
|
|
+ return;
|
|
|
+ OAModel e = adapter.getModels().get(i);
|
|
|
+ if (e == null || StringUtils.isEmpty(e.getJson()) || !OACheckUtil.validatorJson(e.getJson()))
|
|
|
+ return;
|
|
|
+
|
|
|
+ JSONObject object = JSON.parseObject(e.getJson());
|
|
|
Intent intent = null;
|
|
|
- if (adapter.isTask(object)) {
|
|
|
+ if (e.isTask()) {
|
|
|
if (isB2b)
|
|
|
intent = new Intent(ct, TaskDetailB2BActivity.class);
|
|
|
else intent = new Intent(ct, DetailTaskActivity.class);
|
|
|
@@ -410,17 +382,7 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
intent.putExtra("tasktime", OACheckUtil.getJson2Text(object, "startdate"));//发起时间
|
|
|
}
|
|
|
startActivityForResult(intent, isMe ? 0x20 : 0x21);
|
|
|
- } else if (adapter.isVisit(object)) {
|
|
|
- intent = new Intent(activity, VisitReportAddActivity.class);
|
|
|
- intent.putExtra("type", 1);
|
|
|
- String chche = object.containsKey("status") ? object.getString("status") == null ? "" : object.getString("status") : "";
|
|
|
- boolean me = (isMe && !"已拜访".equals(chche));
|
|
|
- intent.putExtra("isMe", me);
|
|
|
- intent.putExtra("isAgen", true);
|
|
|
- OABean bean = JSON.parseObject(object.toString(), OABean.class);
|
|
|
- intent.putExtra("data", bean);
|
|
|
- startActivityForResult(intent, isMe ? 0x20 : 0x21);
|
|
|
- } else if (adapter.isVisitRecord(object)) {
|
|
|
+ } else if (e.isVisitRecord()) {
|
|
|
intent = new Intent(activity, VisitReportAddActivity.class);
|
|
|
intent.putExtra("type", 2);
|
|
|
String chche = object.containsKey("status") ? object.getString("status") == null ? "" : object.getString("status") : "";
|
|
|
@@ -429,8 +391,8 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
intent.putExtra("isAgen", true);
|
|
|
intent.putExtra("data", object.toString());
|
|
|
startActivityForResult(intent, isMe ? 0x20 : 0x21);
|
|
|
- } else if (adapter.isOutplan(object)) {
|
|
|
- if (outPlanClick(object)) {//外勤计划
|
|
|
+ } else if (e.isMission()) {
|
|
|
+ if (util.isMissionOk( e)) {//外勤计划
|
|
|
intent = new Intent(activity, VisitReportAddActivity.class);
|
|
|
intent.putExtra("type", 3);
|
|
|
intent.putExtra("isOutplan", true);
|
|
|
@@ -470,10 +432,6 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
mPullToRefreshScrollView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ScrollView>() {
|
|
|
@Override
|
|
|
public void onPullDownToRefresh(PullToRefreshBase<ScrollView> refreshView) {
|
|
|
-// meInt.clear();
|
|
|
-// otherInt.clear();
|
|
|
-// meArray = new JSONArray();
|
|
|
-// otherArray = new JSONArray();
|
|
|
if (CommonUtil.isNetWorkConnected(getApplicationContext())) {
|
|
|
loadNetData(TimeUtils.ym_format.format(curDate));
|
|
|
} else {
|
|
|
@@ -501,6 +459,8 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
emptyLayout.setShowEmptyButton(false);
|
|
|
emptyLayout.setShowErrorButton(false);
|
|
|
emptyLayout.setEmptyViewRes(R.layout.oa_empty_list);
|
|
|
+ adapter = new OAAdapter(ct,util, new ArrayList<OAModel>());
|
|
|
+ oa_listview.setAdapter(adapter);
|
|
|
listenerMap = new HashMap<>();
|
|
|
curDate = new Date(System.currentTimeMillis());
|
|
|
meInt = new HashSet<>();
|
|
|
@@ -515,8 +475,7 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
title = "行政办公";
|
|
|
}
|
|
|
getSupportActionBar().setTitle(title);
|
|
|
- adapter = new OAListAdapter(ct);
|
|
|
- oa_listview.setAdapter(adapter);
|
|
|
+
|
|
|
setDateTag(new Date());
|
|
|
if (!isB2b)
|
|
|
getDataByNet();
|
|
|
@@ -612,88 +571,43 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
ViewUtil.httpSendRequest(ct, url, param, handler, headers, 0x12, null, null, "get");
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * @param array 填充的对象
|
|
|
- * @param chche
|
|
|
- */
|
|
|
- private void addJsonToArray(JSONArray array, JSONObject chche) {
|
|
|
- if (chche.containsKey("schedule"))
|
|
|
- array.addAll(addJsonToArray(chche, "schedule"));
|
|
|
- if (chche.containsKey("task"))
|
|
|
- array.addAll(addJsonToArray(chche, "task"));
|
|
|
- if (chche.containsKey(isB2b ? "visitRecord" : "visitRecord"))
|
|
|
- array.addAll(addJsonToArray(chche, isB2b ? "visitRecord" : "visitRecord"));
|
|
|
- if (chche.containsKey(isB2b ? "outPlan" : "outplan"))
|
|
|
- array.addAll(addJsonToArray(chche, isB2b ? "outPlan" : "outplan"));
|
|
|
- }
|
|
|
-
|
|
|
- /*添加json数据到数组里面 区别crm和oa*/
|
|
|
- private JSONArray addJsonToArray(JSONObject chche, String key) {
|
|
|
- JSONArray chcheArray = new JSONArray();
|
|
|
- if (chche.containsKey(key) && chche.getJSONArray(key).size() > 0) {
|
|
|
- JSONArray a = chche.getJSONArray(key);
|
|
|
- if (isCrm) {
|
|
|
- JSONObject o = null;
|
|
|
- if (adapter == null)
|
|
|
- adapter = new OAListAdapter(ct);
|
|
|
- for (int i = 0; i < a.size(); i++) {
|
|
|
- o = a.getJSONObject(i);
|
|
|
- if (adapter.isVisit(o) || adapter.isVisitRecord(o) || adapter.isOutplan(o))
|
|
|
- chcheArray.add(o);
|
|
|
- }
|
|
|
- } else {
|
|
|
- chcheArray = a;
|
|
|
- }
|
|
|
- }
|
|
|
- return chcheArray;
|
|
|
- }
|
|
|
-
|
|
|
private void loadSuccess() {//下拉成功后添加到适配器
|
|
|
setAdapterBeans();
|
|
|
- if (isMe) {
|
|
|
- setDateToListener(meInt);
|
|
|
- } else {
|
|
|
- setDateToListener(otherInt);
|
|
|
- }
|
|
|
+ setDateToListener(isMe ? meInt : otherInt);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void setAdapterBeans() {
|
|
|
- setAdapterBeans(isMe ? meArray : otherArray);
|
|
|
+ setAdapterBeans(isMe ? meModels : otherModels);
|
|
|
}
|
|
|
|
|
|
- private void setAdapterBeans(JSONArray array) {
|
|
|
- if (array == null) return;
|
|
|
+ private void setAdapterBeans(List<OAModel> showModel) {
|
|
|
+ if (ListUtils.isEmpty(showModel)) return;
|
|
|
int ok = 0, size = 0;
|
|
|
- JSONObject object = null;
|
|
|
- JSONArray chche = new JSONArray();
|
|
|
- String time = null;
|
|
|
- for (int i = 0; i < array.size(); i++) {
|
|
|
- object = array.getJSONObject(i);
|
|
|
- time = TimeUtils.f_long_2_str(getTimeForObject(object));
|
|
|
- if (adapter.isOutplan(object) &&
|
|
|
- !StringUtils.isEmpty(adapter.getJSONString(object, "mpd_status"))
|
|
|
- && "已完成".equals(adapter.getJSONString(object, "mpd_status"))) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(time) && getIsDecorat(time, TimeUtils.s_format.format(curDate))) {//该时间为选择时间
|
|
|
- //判断是否为该下属
|
|
|
- chche.add(object);
|
|
|
+ List<OAModel> filterModels = new ArrayList<>();
|
|
|
+ for (OAModel e : showModel) {
|
|
|
+ if (util.canShow(e, curDate)) {
|
|
|
size++;
|
|
|
- if (isTaskOk(object))
|
|
|
+ filterModels.add(e);
|
|
|
+ if (util.isTaskOk(e))
|
|
|
ok++;
|
|
|
}
|
|
|
}
|
|
|
- if (chche.size() <= 0) {
|
|
|
+
|
|
|
+ if (ListUtils.isEmpty(filterModels)) {
|
|
|
emptyLayout.showEmpty();
|
|
|
}
|
|
|
CommonUtil.textSpanForStyle(all_task_num, "工作日历 " + size, size + "", getResources().getColor(R.color.orange_text));
|
|
|
CommonUtil.textSpanForStyle(ok_task_num, "已完成 " + ok, ok + "", getResources().getColor(R.color.orange_text));
|
|
|
CommonUtil.textSpanForStyle(uok_task_num, "未完成 " + (size - ok), (size - ok) + "", getResources().getColor(R.color.orange_text));
|
|
|
-
|
|
|
//当前日期小于等于选中日期
|
|
|
- adapter.setArray(chche, isMe, isToday());
|
|
|
- adapter.notifyDataSetChanged();
|
|
|
-
|
|
|
+ if (adapter == null) {
|
|
|
+ adapter = new OAAdapter(ct,util, filterModels);
|
|
|
+ oa_listview.setAdapter(adapter);
|
|
|
+ } else {
|
|
|
+ adapter.setModels(filterModels);
|
|
|
+ adapter.notifyDataSetChanged();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -710,36 +624,6 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
return TimeUtils.f_str_2_long(OACheckUtil.getJson2Text(object, "startdate", "vr_visittime", "mpd_arrivedate"));
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 用于判断该任务是否已经完成
|
|
|
- *
|
|
|
- * @param object
|
|
|
- * @return
|
|
|
- */
|
|
|
- private boolean isTaskOk(JSONObject object) {
|
|
|
- if (!object.containsKey("status") || StringUtils.isEmpty(object.getString("status"))) {
|
|
|
- if ((adapter != null && adapter.isVisitRecord(object)) ||//是拜访报告
|
|
|
- isOutOk(object)) return true;
|
|
|
- else return false;
|
|
|
- } else if ("已拜访".equals(object.getString("status")) || "已完成".equals(object.getString("status")))
|
|
|
- return true;
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- private boolean isOutOk(JSONObject object) {
|
|
|
- if (!adapter.isOutplan(object)) return false;
|
|
|
- String outdate = object.getString("mpd_outdate");
|
|
|
- String status = adapter.getJSONString(object, "mpd_status");
|
|
|
- if (StringUtils.isEmpty(status)) {
|
|
|
- if (isToday()) return false;
|
|
|
- else if (StringUtils.isEmpty(outdate)) return false;
|
|
|
- else return true;
|
|
|
- } else if ("签退".equals(status)) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- return false;
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
//弹出菜单
|
|
|
private PopupWindow popupWindow = null;
|
|
|
@@ -979,6 +863,7 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
}
|
|
|
|
|
|
public void setDateToListener(Set<Integer> in) {
|
|
|
+ LogUtil.i("in+==" + in);
|
|
|
if (listenerMap.containsKey(TimeUtils.ym_format.format(curDate)) && listenerMap.get(TimeUtils.ym_format.format(curDate)) != null)
|
|
|
listenerMap.get(TimeUtils.ym_format.format(curDate)).onChange(in);
|
|
|
}
|
|
|
@@ -1026,28 +911,8 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
setAdapterBeans();
|
|
|
}
|
|
|
|
|
|
- private boolean outPlanClick(JSONObject object) {
|
|
|
- if (isToday()) {
|
|
|
- String status = adapter.getJSONString(object, "mpd_status");
|
|
|
- if ("签退".equals(status)) return true;
|
|
|
- else return false;
|
|
|
- } else {
|
|
|
- String actdate = getTime(object, "mpd_actdate", "mp_firsttime");
|
|
|
- String outdate = getTime(object, "mpd_outdate", "mp_lasttime");
|
|
|
- if (StringUtils.isEmpty(actdate) || StringUtils.isEmpty(outdate))
|
|
|
- return false;
|
|
|
- else return true;
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- private String getTime(JSONObject o, String... keys) {
|
|
|
- if (isB2b) {
|
|
|
- long time = OACheckUtil.getJsonLong(o, keys);
|
|
|
- if (time == 0) return "";
|
|
|
- return TimeUtils.f_long_2_str(time);
|
|
|
- } else
|
|
|
- return OACheckUtil.getJson2Text(o, keys);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
private boolean isToday() {
|
|
|
boolean isToday = TimeUtils.s_long_2_str(System.currentTimeMillis()).
|
|
|
@@ -1055,12 +920,6 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
return isToday;
|
|
|
}
|
|
|
|
|
|
- /*判断*/
|
|
|
- private boolean getIsDecorat(String text, String chche) {
|
|
|
- Pattern p = Pattern.compile(chche);//遍历对象
|
|
|
- Matcher m = p.matcher(text);//遍历源
|
|
|
- return m.find();
|
|
|
- }
|
|
|
|
|
|
private Map<String, OnTaskChangeListener> listenerMap;
|
|
|
|
|
|
@@ -1095,9 +954,6 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
|
|
|
return super.dispatchTouchEvent(ev);
|
|
|
}
|
|
|
|
|
|
- private String getString(JSONObject object, String key) {
|
|
|
- return object == null ? "" : (object.containsKey(key) ? object.getString(key) : "");
|
|
|
- }
|
|
|
|
|
|
public interface OnTaskChangeListener {
|
|
|
void onChange(Set<Integer> in);
|