|
|
@@ -169,6 +169,7 @@ public class MessageFragment extends EasyFragment {
|
|
|
}
|
|
|
|
|
|
public void setListener(int num) {
|
|
|
+ Log.i("gongpengming", num + "num=");
|
|
|
if (refreshRedUIListener == null) return;
|
|
|
refreshRedUIListener.updata(num);
|
|
|
}
|
|
|
@@ -276,13 +277,10 @@ public class MessageFragment extends EasyFragment {
|
|
|
num_tv = (TextView) view.findViewById(R.id.num_tv);
|
|
|
content_tv = (TextView) view.findViewById(R.id.content_tv);
|
|
|
time_tv = (TextView) view.findViewById(R.id.time_tv);
|
|
|
-
|
|
|
b2b_num_tv = (TextView) view.findViewById(R.id.b2b_num_tv);
|
|
|
b2b_content_tv = (TextView) view.findViewById(R.id.b2b_content_tv);
|
|
|
b2b_time_tv = (TextView) view.findViewById(R.id.b2b_time_tv);
|
|
|
-
|
|
|
rl_b2b = (RelativeLayout) view.findViewById(R.id.rl_b2b_business);
|
|
|
-
|
|
|
view.findViewById(R.id.schedule_rl).setOnClickListener(listener);
|
|
|
view.findViewById(R.id.task_rl).setOnClickListener(listener);
|
|
|
view.findViewById(R.id.notice_rl).setOnClickListener(listener);
|
|
|
@@ -645,6 +643,21 @@ public class MessageFragment extends EasyFragment {
|
|
|
ViewUtil.httpSendRequest(ct, url, param, handler, headers, Constants.LOAD_SUCCESS, null, null, "get");
|
|
|
}
|
|
|
|
|
|
+ //获取任务
|
|
|
+ public void loadTaskByNet(int handlerWhat) {
|
|
|
+ String url = Constants.getAppBaseUrl(getActivity()) + "common/datalist/data.action";
|
|
|
+ Map<String, Object> mparams = new HashMap<String, Object>();
|
|
|
+ mparams.put("sessionId", CommonUtil.getSharedPreferences(mActivity, "sessionId"));
|
|
|
+ mparams.put("caller", "ResourceAssignment");
|
|
|
+ mparams.put("page", "1");
|
|
|
+ mparams.put("pageSize", "100");
|
|
|
+ mparams.put("_noc", "1");
|
|
|
+ String em_code = CommonUtil.getSharedPreferences(mActivity, "erp_username");
|
|
|
+ mparams.put("condition", "ra_resourcecode='" + em_code + "' and ra_statuscode='" + "START" + "'");
|
|
|
+ LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
|
+ headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(mActivity, "sessionId"));
|
|
|
+ ViewUtil.httpSendRequest(mActivity, url, mparams, handler, headers, handlerWhat, null, null, "get");
|
|
|
+ }
|
|
|
|
|
|
public void loadGongGaoCount(Context ct) {
|
|
|
String url = Constants.getAppBaseUrl(ct) + "common/desktop/note/notice.action";
|
|
|
@@ -710,6 +723,7 @@ public class MessageFragment extends EasyFragment {
|
|
|
b2b_num_tv.setVisibility(View.VISIBLE);
|
|
|
b2b_content_tv.setText("您有" + bMsgs.size() + "条商务消息未读");
|
|
|
rl_b2b.setVisibility(View.VISIBLE);
|
|
|
+ Log.i("gongpengming", "bMsgs.size=" + bMsgs.size());
|
|
|
setListener(bMsgs.size() + GONGGAO_count + NOTICE_count + NES_count + TASK_count + DAIBAN_count + SUBRICE_count);
|
|
|
} else {
|
|
|
rl_b2b.setVisibility(View.GONE);
|
|
|
@@ -733,6 +747,7 @@ public class MessageFragment extends EasyFragment {
|
|
|
num += 1;
|
|
|
}
|
|
|
}
|
|
|
+ Log.i("gongpengming", "num.size=" + num);
|
|
|
setListener(GONGGAO_count + NOTICE_count + NES_count + TASK_count + DAIBAN_count + num);
|
|
|
if (num > 0) {
|
|
|
num_tv.setText(num + "");
|
|
|
@@ -767,6 +782,7 @@ public class MessageFragment extends EasyFragment {
|
|
|
setNOTICE_count(GONGGAO_count + NOTICE_count + NES_count);
|
|
|
break;
|
|
|
case TASK_MSG:
|
|
|
+ Log.i("gonpengming", "TASK_MSG=" + TASK_count);
|
|
|
setListener(GONGGAO_count + NOTICE_count + NES_count + TASK_count + DAIBAN_count + SUBRICE_count);
|
|
|
if (TASK_count > 0) {
|
|
|
task_num_tv.setText(TASK_count + "");
|
|
|
@@ -808,6 +824,7 @@ public class MessageFragment extends EasyFragment {
|
|
|
|
|
|
|
|
|
private void setNOTICE_count(int count) {
|
|
|
+ Log.i("gongpengming","setNOTICE_count="+count);
|
|
|
setListener(GONGGAO_count + NOTICE_count + NES_count + TASK_count + DAIBAN_count + SUBRICE_count);
|
|
|
if (count > 0) {
|
|
|
notice_num_tv.setText(count + "");
|