|
@@ -8,6 +8,8 @@ import android.util.Log;
|
|
|
import android.view.View;
|
|
import android.view.View;
|
|
|
import android.widget.TextView;
|
|
import android.widget.TextView;
|
|
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.lidroid.xutils.ViewUtils;
|
|
import com.lidroid.xutils.ViewUtils;
|
|
|
import com.lidroid.xutils.view.annotation.ViewInject;
|
|
import com.lidroid.xutils.view.annotation.ViewInject;
|
|
|
import com.xzjmyk.pm.activity.R;
|
|
import com.xzjmyk.pm.activity.R;
|
|
@@ -16,13 +18,10 @@ import com.xzjmyk.pm.activity.bean.oa.MeetingDocBean;
|
|
|
import com.xzjmyk.pm.activity.ui.base.BaseActivity;
|
|
import com.xzjmyk.pm.activity.ui.base.BaseActivity;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
|
|
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.CommonUtil;
|
|
|
-import com.xzjmyk.pm.activity.ui.erp.view.CustomerListView;
|
|
|
|
|
|
|
+import com.xzjmyk.pm.activity.util.BaiduMapUtil;
|
|
|
import com.xzjmyk.pm.activity.util.TimeUtils;
|
|
import com.xzjmyk.pm.activity.util.TimeUtils;
|
|
|
import com.xzjmyk.pm.activity.util.ToastUtil;
|
|
import com.xzjmyk.pm.activity.util.ToastUtil;
|
|
|
|
|
|
|
|
-import org.json.JSONException;
|
|
|
|
|
-import org.json.JSONObject;
|
|
|
|
|
-
|
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
import java.util.LinkedHashMap;
|
|
import java.util.LinkedHashMap;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -44,12 +43,11 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
|
|
|
private TextView oa_meeting_start_date;
|
|
private TextView oa_meeting_start_date;
|
|
|
@ViewInject(R.id.status_tv)
|
|
@ViewInject(R.id.status_tv)
|
|
|
private TextView status_tv;
|
|
private TextView status_tv;
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- private CustomerListView meet_listview;
|
|
|
|
|
- private final int whatLoad = 0x11;
|
|
|
|
|
- private final int whatEndMeet = 0x12;
|
|
|
|
|
- private final int doMeet = 0x13;
|
|
|
|
|
|
|
+ @ViewInject(R.id.location_tv)
|
|
|
|
|
+ private TextView location_tv;
|
|
|
|
|
+ @ViewInject(R.id.num_tv)
|
|
|
|
|
+ private TextView num_tv;
|
|
|
|
|
+ private final int whatLoad = 0x11, SIGNNIN = 0x12, ENDMEET = 0x13;
|
|
|
private int ma_id;
|
|
private int ma_id;
|
|
|
private String ma_code;
|
|
private String ma_code;
|
|
|
private JSONObject object;
|
|
private JSONObject object;
|
|
@@ -61,13 +59,8 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
|
|
|
Log.i("gongpengming", message);
|
|
Log.i("gongpengming", message);
|
|
|
switch (msg.what) {
|
|
switch (msg.what) {
|
|
|
case whatLoad:
|
|
case whatLoad:
|
|
|
- try {
|
|
|
|
|
- JSONObject json = new JSONObject(message);
|
|
|
|
|
- object = json.getJSONObject("panelData");
|
|
|
|
|
- updataUI();
|
|
|
|
|
- } catch (JSONException e) {
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ object = JSON.parseObject(message).getJSONObject("panelData");
|
|
|
|
|
+ updataUI();
|
|
|
break;
|
|
break;
|
|
|
case ENDMEET:
|
|
case ENDMEET:
|
|
|
ToastUtil.showToast(ct, "会议结束成功");
|
|
ToastUtil.showToast(ct, "会议结束成功");
|
|
@@ -78,6 +71,12 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
|
|
|
ToastUtil.showToast(ct, "会议签到成功");
|
|
ToastUtil.showToast(ct, "会议签到成功");
|
|
|
Log.i("gongpengming", "what==doMeet");
|
|
Log.i("gongpengming", "what==doMeet");
|
|
|
break;
|
|
break;
|
|
|
|
|
+ case 0x14:
|
|
|
|
|
+ JSONObject numlist = JSON.parseObject(message).getJSONObject("participants");
|
|
|
|
|
+ int confirmed = numlist.getJSONArray("confirmed").size();
|
|
|
|
|
+ int unconfirmed = numlist.getJSONArray("unconfirmed").size();
|
|
|
|
|
+ num_tv.setText("当前签到人数:" + confirmed + "/" + (confirmed + unconfirmed));
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -93,54 +92,65 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
|
|
|
ma_id = entity.getMa_id();
|
|
ma_id = entity.getMa_id();
|
|
|
ma_code = entity.getMa_code();
|
|
ma_code = entity.getMa_code();
|
|
|
}
|
|
}
|
|
|
- loadNetData();
|
|
|
|
|
|
|
+ loadNetData(whatLoad);
|
|
|
|
|
+ loadNetData(0x14);
|
|
|
initView();
|
|
initView();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void initView() {
|
|
private void initView() {
|
|
|
- meet_listview = (CustomerListView) findViewById(R.id.meet_listview);
|
|
|
|
|
|
|
+ BaiduMapUtil.getInstence().getPoiInfo(ct, new BaiduMapUtil.OnLocationListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void result(Map<String, Object> map) {
|
|
|
|
|
+ progressDialog.dismiss();
|
|
|
|
|
+ if (map == null || map.isEmpty()) return;
|
|
|
|
|
+ if (map.get("poi") == null) return;
|
|
|
|
|
+ location_tv.setText(map.get("poi") + "");
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
findViewById(R.id.meet_save).setOnClickListener(this);
|
|
findViewById(R.id.meet_save).setOnClickListener(this);
|
|
|
- findViewById(R.id.click_find).setOnClickListener(this);
|
|
|
|
|
|
|
+ findViewById(R.id.num_tag).setOnClickListener(this);
|
|
|
findViewById(R.id.end_meet_tv).setOnClickListener(this);
|
|
findViewById(R.id.end_meet_tv).setOnClickListener(this);
|
|
|
findViewById(R.id.click_btn).setOnClickListener(this);
|
|
findViewById(R.id.click_btn).setOnClickListener(this);
|
|
|
|
|
+ findViewById(R.id.location_tag).setOnClickListener(this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
String baseUrl;
|
|
String baseUrl;
|
|
|
|
|
|
|
|
private void updataUI() {
|
|
private void updataUI() {
|
|
|
if (object == null) return;
|
|
if (object == null) return;
|
|
|
- try {
|
|
|
|
|
- name_tv.setText(object.getString("ma_theme"));
|
|
|
|
|
- addr_tv.setText(object.getString("mr_site"));
|
|
|
|
|
- user_tv.setText(object.getString("ma_recorder"));
|
|
|
|
|
- long startLongTime = TimeUtils.f_str_2_long(entity.getMa_starttime());
|
|
|
|
|
- oa_meeting_start.setText(TimeUtils.long2str(startLongTime, "MM月dd"));
|
|
|
|
|
- oa_meeting_start_date.setText(TimeUtils.long2str(startLongTime, "HH:mm"));
|
|
|
|
|
- String str;
|
|
|
|
|
- long endLongTime = TimeUtils.f_str_2_long(entity.getMa_endtime());
|
|
|
|
|
- oa_meeting_end.setText(TimeUtils.long2str(startLongTime, "MM月dd"));
|
|
|
|
|
- oa_meeting_end_date.setText(TimeUtils.long2str(startLongTime, "HH:mm"));
|
|
|
|
|
- if (System.currentTimeMillis() < startLongTime) {
|
|
|
|
|
- str = "会议未开始";
|
|
|
|
|
- } else if (System.currentTimeMillis() < endLongTime) {
|
|
|
|
|
- str = "会议进行中";
|
|
|
|
|
- } else {
|
|
|
|
|
- str = "会议已结束";
|
|
|
|
|
- }
|
|
|
|
|
- status_tv.setText(str);
|
|
|
|
|
- } catch (JSONException e) {
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
|
|
+ name_tv.setText(object.getString("ma_theme"));
|
|
|
|
|
+ addr_tv.setText(object.getString("mr_site"));
|
|
|
|
|
+ user_tv.setText(object.getString("ma_recorder"));
|
|
|
|
|
+ long startLongTime = TimeUtils.f_str_2_long(entity.getMa_starttime());
|
|
|
|
|
+ oa_meeting_start.setText(TimeUtils.long2str(startLongTime, "MM月dd"));
|
|
|
|
|
+ oa_meeting_start_date.setText(TimeUtils.long2str(startLongTime, "HH:mm"));
|
|
|
|
|
+ String str;
|
|
|
|
|
+ long endLongTime = TimeUtils.f_str_2_long(entity.getMa_endtime());
|
|
|
|
|
+ oa_meeting_end.setText(TimeUtils.long2str(startLongTime, "MM月dd"));
|
|
|
|
|
+ oa_meeting_end_date.setText(TimeUtils.long2str(startLongTime, "HH:mm"));
|
|
|
|
|
+ if (System.currentTimeMillis() < startLongTime) {
|
|
|
|
|
+ str = "会议未开始";
|
|
|
|
|
+ } else if (System.currentTimeMillis() < endLongTime) {
|
|
|
|
|
+ str = "会议进行中";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ str = "会议已结束";
|
|
|
}
|
|
}
|
|
|
|
|
+ status_tv.setText(str);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //获取网络数据
|
|
|
|
|
- private void loadNetData() {
|
|
|
|
|
|
|
+ //下拉页面数据
|
|
|
|
|
+ private void loadNetData(int type) {
|
|
|
progressDialog.show();
|
|
progressDialog.show();
|
|
|
//获取网络数据
|
|
//获取网络数据
|
|
|
if (baseUrl == null) {
|
|
if (baseUrl == null) {
|
|
|
baseUrl = CommonUtil.getSharedPreferences(this, "erp_baseurl");
|
|
baseUrl = CommonUtil.getSharedPreferences(this, "erp_baseurl");
|
|
|
}
|
|
}
|
|
|
- String url = baseUrl + "mobile/common/getPanel.action";
|
|
|
|
|
|
|
+ String url = null;
|
|
|
|
|
+ if (type == whatLoad) {
|
|
|
|
|
+ url = baseUrl + "mobile/crm/getMeetingDetailParticipants.action";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ url = baseUrl + "mobile/common/getPanel.action";
|
|
|
|
|
+ }
|
|
|
String em_code = CommonUtil.getSharedPreferences(ct, "erp_username");
|
|
String em_code = CommonUtil.getSharedPreferences(ct, "erp_username");
|
|
|
String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
|
|
String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
|
|
|
final Map<String, Object> param = new HashMap<>();
|
|
final Map<String, Object> param = new HashMap<>();
|
|
@@ -149,19 +159,19 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
|
|
|
param.put("emcode", em_code);
|
|
param.put("emcode", em_code);
|
|
|
param.put("formCondition", "ma_id=" + ma_id);
|
|
param.put("formCondition", "ma_id=" + ma_id);
|
|
|
param.put("gridCondition", "ma_id=" + ma_id);
|
|
param.put("gridCondition", "ma_id=" + ma_id);
|
|
|
|
|
+ if (type != whatLoad)
|
|
|
|
|
+ param.put("ma_code", ma_code);
|
|
|
param.put("sessionId", sessionId);
|
|
param.put("sessionId", sessionId);
|
|
|
Log.i("gongpengming", url + "?emcode=" + em_code + "sessionId=" + sessionId);
|
|
Log.i("gongpengming", url + "?emcode=" + em_code + "sessionId=" + sessionId);
|
|
|
LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
|
headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
|
|
headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
|
|
|
- ViewUtil.httpSendRequest(ct, url, param, handler, headers, whatLoad, null, null, "post");
|
|
|
|
|
|
|
+ ViewUtil.httpSendRequest(ct, url, param, handler, headers, type, null, null, "post");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private final int SIGNNIN = 0x1, ENDMEET = 0x2;
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 提交接口(结束会议、会议签到、为与会成员加 日程)
|
|
* 提交接口(结束会议、会议签到、为与会成员加 日程)
|
|
|
*
|
|
*
|
|
|
- * @param type 接口类型
|
|
|
|
|
|
|
+ * @param type 接口类型 签到 SIGNNIN、结束会议:ENDMEET
|
|
|
*/
|
|
*/
|
|
|
private void doNetSubmit(int type) {
|
|
private void doNetSubmit(int type) {
|
|
|
progressDialog.show();
|
|
progressDialog.show();
|
|
@@ -177,7 +187,6 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
|
|
|
case ENDMEET:
|
|
case ENDMEET:
|
|
|
urlSub = "mobile/crm/updateMeeting.action";//结束会议
|
|
urlSub = "mobile/crm/updateMeeting.action";//结束会议
|
|
|
break;
|
|
break;
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
String url = baseUrl + urlSub;
|
|
String url = baseUrl + urlSub;
|
|
|
String em_code = CommonUtil.getSharedPreferences(ct, "erp_username");
|
|
String em_code = CommonUtil.getSharedPreferences(ct, "erp_username");
|
|
@@ -189,7 +198,6 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
|
|
|
param.put("caller", caller);
|
|
param.put("caller", caller);
|
|
|
param.put("ma_id", ma_id);
|
|
param.put("ma_id", ma_id);
|
|
|
param.put("sessionId", sessionId);
|
|
param.put("sessionId", sessionId);
|
|
|
- Log.i("gongpengming", url + "?emcode=" + em_code + "sessionId=" + sessionId);
|
|
|
|
|
LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
|
headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
|
|
headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
|
|
|
ViewUtil.httpSendRequest(ct, url, param, handler, headers, type, null, null, "post");
|
|
ViewUtil.httpSendRequest(ct, url, param, handler, headers, type, null, null, "post");
|
|
@@ -199,7 +207,7 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
|
|
|
@Override
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
public void onClick(View view) {
|
|
|
switch (view.getId()) {
|
|
switch (view.getId()) {
|
|
|
- case R.id.click_find:
|
|
|
|
|
|
|
+ case R.id.num_tag:
|
|
|
Intent intent = new Intent(MeetDetailsActivity.this, OARegisterActivity.class);
|
|
Intent intent = new Intent(MeetDetailsActivity.this, OARegisterActivity.class);
|
|
|
intent.putExtra("code", ma_code);
|
|
intent.putExtra("code", ma_code);
|
|
|
intent.putExtra("id", ma_code);
|
|
intent.putExtra("id", ma_code);
|
|
@@ -210,7 +218,7 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
|
|
|
Intent data = new Intent(ct, SaveMeetActivity.class);
|
|
Intent data = new Intent(ct, SaveMeetActivity.class);
|
|
|
bean.setMd_recorder(user_tv.getText().toString());
|
|
bean.setMd_recorder(user_tv.getText().toString());
|
|
|
bean.setMd_recorderdate("");
|
|
bean.setMd_recorderdate("");
|
|
|
- bean.setMd_status("再录入");
|
|
|
|
|
|
|
+ bean.setMd_status("在录入");
|
|
|
bean.setMd_title(name_tv.getText().toString());
|
|
bean.setMd_title(name_tv.getText().toString());
|
|
|
bean.setMd_mtname("");
|
|
bean.setMd_mtname("");
|
|
|
bean.setMd_meetingname("");
|
|
bean.setMd_meetingname("");
|
|
@@ -233,6 +241,18 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
|
|
|
case R.id.click_btn:
|
|
case R.id.click_btn:
|
|
|
doNetSubmit(SIGNNIN);
|
|
doNetSubmit(SIGNNIN);
|
|
|
break;
|
|
break;
|
|
|
|
|
+ case R.id.location_tag://点击重新定位
|
|
|
|
|
+ progressDialog.show();
|
|
|
|
|
+ BaiduMapUtil.getInstence().getPoiInfo(ct, new BaiduMapUtil.OnLocationListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void result(Map<String, Object> map) {
|
|
|
|
|
+ progressDialog.dismiss();
|
|
|
|
|
+ if (map == null || map.isEmpty()) return;
|
|
|
|
|
+ if (map.get("poi") == null) return;
|
|
|
|
|
+ location_tv.setText(map.get("poi") + "");
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|