|
|
@@ -31,7 +31,7 @@ import com.xzjmyk.pm.activity.MyApplication;
|
|
|
import com.xzjmyk.pm.activity.R;
|
|
|
import com.xzjmyk.pm.activity.adapter.PlatComAfAdapter;
|
|
|
import com.xzjmyk.pm.activity.bean.oa.PlatComAfBean;
|
|
|
-import com.xzjmyk.pm.activity.bean.oa.SelectBean;
|
|
|
+import com.xzjmyk.pm.activity.bean.oa.SelectEmUser;
|
|
|
import com.xzjmyk.pm.activity.ui.base.BaseActivity;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
|
|
|
@@ -78,7 +78,8 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
@ViewInject(R.id.work_daily_detail_plan_ll)
|
|
|
private LinearLayout plan_ll;
|
|
|
@ViewInject(R.id.work_daily_detail_experience_ll)
|
|
|
- private LinearLayout experience_ll; ;
|
|
|
+ private LinearLayout experience_ll;
|
|
|
+ ;
|
|
|
@ViewInject(R.id.work_daily_detail_approval_flow_lv)
|
|
|
private MyListView approval_flowlv;
|
|
|
@ViewInject(R.id.work_daily_unsubmit_iv)
|
|
|
@@ -151,24 +152,24 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
Intent intent = getIntent();
|
|
|
fromwhere = intent.getStringExtra("fromwhere");
|
|
|
// fromwhere = "examine_and_approve";
|
|
|
- if (!StringUtils.isEmpty(fromwhere) && "examine_and_approve".equals(fromwhere)){
|
|
|
- deal_id = intent.getIntExtra("deal_id",-1); // TODO 用来操作:同意,不同意,变更
|
|
|
- detail_id = intent.getIntExtra("detail_id",-1); //
|
|
|
- deal_type = intent.getIntExtra("deal_type",-1);
|
|
|
+ if (!StringUtils.isEmpty(fromwhere) && "examine_and_approve".equals(fromwhere)) {
|
|
|
+ deal_id = intent.getIntExtra("deal_id", -1); // TODO 用来操作:同意,不同意,变更
|
|
|
+ detail_id = intent.getIntExtra("detail_id", -1); //
|
|
|
+ deal_type = intent.getIntExtra("deal_type", -1);
|
|
|
resanddel_ll.setVisibility(View.GONE);
|
|
|
a_and_disa_ll.setVisibility(View.VISIBLE);
|
|
|
Log.i("deal_id,detail_id", deal_id + "," + detail_id);
|
|
|
|
|
|
- if (deal_type == 1){ //待审批界面进去传值
|
|
|
+ if (deal_type == 1) { //待审批界面进去传值
|
|
|
a_and_disa_ll.setVisibility(View.VISIBLE);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
a_and_disa_ll.setVisibility(View.GONE);
|
|
|
}
|
|
|
|
|
|
- if(detail_id!= -1){
|
|
|
- if (MyApplication.getInstance().isNetworkActive()){
|
|
|
+ if (detail_id != -1) {
|
|
|
+ if (MyApplication.getInstance().isNetworkActive()) {
|
|
|
loadeapData(detail_id);// 用来获取单据详情数据
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
ToastMessage(getResources().getString(R.string.networks_out));
|
|
|
hide_above_af.setVisibility(View.GONE);
|
|
|
a_and_disa_ll.setVisibility(View.GONE);
|
|
|
@@ -176,13 +177,13 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
progressDialog.dismiss();
|
|
|
}
|
|
|
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
approval_flowlv.setVisibility(View.GONE);
|
|
|
hide_above_af.setVisibility(View.GONE);
|
|
|
progressDialog.dismiss();
|
|
|
csv_hide.setVisibility(View.GONE);
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
csv_hide.setVisibility(View.VISIBLE);
|
|
|
mkeyValue = intent.getIntExtra("ID", -1);
|
|
|
a_and_disa_ll.setVisibility(View.GONE);
|
|
|
@@ -193,11 +194,11 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
|
|
|
private void loadeapData(int mkeyValue) {
|
|
|
String url = ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().common_doc_detaily_url;
|
|
|
- Map<String,Object> param = new HashMap<>();
|
|
|
- param.put("id",mkeyValue);
|
|
|
- param.put("whichpage",4);
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ param.put("id", mkeyValue);
|
|
|
+ param.put("whichpage", 4);
|
|
|
param.put("enuu", CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "companyEnUu"));
|
|
|
- param.put("emcode",CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "b2b_uu"));
|
|
|
+ param.put("emcode", CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "b2b_uu"));
|
|
|
LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
|
headers.put("Cookie", "JSESSIONID=" + ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().getCookie());
|
|
|
ViewUtil.httpSendRequest(getApplicationContext(), url, param, handler, headers, COMMON_DOC_DETAILY, null, null, "get");
|
|
|
@@ -209,7 +210,7 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
final Intent intent = getIntent();
|
|
|
date = intent.getStringExtra("Date");
|
|
|
summary = intent.getStringExtra("Content");
|
|
|
- if (!TextUtils.isEmpty(intent.getStringExtra("WD_Status"))){
|
|
|
+ if (!TextUtils.isEmpty(intent.getStringExtra("WD_Status"))) {
|
|
|
wd_status = intent.getStringExtra("WD_Status");
|
|
|
}
|
|
|
if (!TextUtils.isEmpty(intent.getStringExtra("Plan"))) {
|
|
|
@@ -227,12 +228,12 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
wdd_plan.setText(plan);
|
|
|
wdd_experience.setText(experience);
|
|
|
|
|
|
- Log.i("platwd_status",wd_status);
|
|
|
- if("已审核".equals(wd_status) || "已审批".equals(wd_status)){
|
|
|
+ Log.i("platwd_status", wd_status);
|
|
|
+ if ("已审核".equals(wd_status) || "已审批".equals(wd_status)) {
|
|
|
wdd_status.setTextColor(mContext.getResources().getColor(R.color.approval));
|
|
|
wdd_status.setText("已审批");
|
|
|
resanddel_ll.setVisibility(View.GONE);
|
|
|
- }else if (wd_status.equals("已提交")){
|
|
|
+ } else if (wd_status.equals("已提交")) {
|
|
|
wdd_status.setTextColor(mContext.getResources().getColor(R.color.no_approval));
|
|
|
wdd_status.setText("待审批");
|
|
|
resanddel_ll.setVisibility(View.VISIBLE);
|
|
|
@@ -246,16 +247,16 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
// }
|
|
|
|
|
|
// 当获取到正确的单据caller和单据id时 请求获取审批流数据
|
|
|
- if(!TextUtils.isEmpty(mCaller)&&mkeyValue!= -1){
|
|
|
- progressDialog.dismiss();
|
|
|
+ if (!TextUtils.isEmpty(mCaller) && mkeyValue != -1) {
|
|
|
+ progressDialog.dismiss();
|
|
|
//TODO 请求获取审批流数据
|
|
|
- if (MyApplication.getInstance().isNetworkActive()){
|
|
|
- loadPlatAppFlow(mCaller,mkeyValue);
|
|
|
- }else {
|
|
|
+ if (MyApplication.getInstance().isNetworkActive()) {
|
|
|
+ loadPlatAppFlow(mCaller, mkeyValue);
|
|
|
+ } else {
|
|
|
ToastMessage(getResources().getString(R.string.networks_out));
|
|
|
}
|
|
|
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
approval_flowlv.setVisibility(View.GONE);
|
|
|
hide_above_af.setVisibility(View.GONE);
|
|
|
}
|
|
|
@@ -264,8 +265,8 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
|
|
|
private void loadPlatAppFlow(String mCaller, int mkeyValue) {
|
|
|
String url = ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().common_app_flow_nodes_url;
|
|
|
- Map<String,Object> param = new HashMap<>();
|
|
|
- param.put("id",mkeyValue);
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ param.put("id", mkeyValue);
|
|
|
param.put("caller", "工作日报");
|
|
|
param.put("enuu", CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "companyEnUu"));
|
|
|
param.put("emcode", CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "b2b_uu"));
|
|
|
@@ -274,7 +275,9 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
ViewUtil.httpSendRequest(getApplicationContext(), url, param, handler, headers, PLAT_APP_FLOW_NODES, null, null, "get");
|
|
|
|
|
|
}
|
|
|
-private int agree_type = 0;
|
|
|
+
|
|
|
+ private int agree_type = 0;
|
|
|
+
|
|
|
private void clickEvent() {
|
|
|
resubmit_ll.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
@@ -339,7 +342,9 @@ private int agree_type = 0;
|
|
|
});
|
|
|
|
|
|
}
|
|
|
+
|
|
|
private PopupWindow popupWindow = null;
|
|
|
+
|
|
|
private void doDealDescribe(final int agree_type, final int deal_id) {
|
|
|
View contentView = LayoutInflater.from(ct).inflate(
|
|
|
R.layout.common_edit_window, null);
|
|
|
@@ -357,7 +362,7 @@ private int agree_type = 0;
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
String describe = "";
|
|
|
- doAgreeorDisAgree(agree_type, deal_id,describe);
|
|
|
+ doAgreeorDisAgree(agree_type, deal_id, describe);
|
|
|
popupWindow.dismiss();
|
|
|
}
|
|
|
});
|
|
|
@@ -384,6 +389,7 @@ private int agree_type = 0;
|
|
|
popupWindow.showAtLocation(contentView, Gravity.CENTER, 0, 0);
|
|
|
setbg(0.4f);
|
|
|
}
|
|
|
+
|
|
|
private void setbg(float alpha) {
|
|
|
setBackgroundAlpha(this, alpha);
|
|
|
if (popupWindow == null) return;
|
|
|
@@ -394,6 +400,7 @@ private int agree_type = 0;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 设置页面的透明度
|
|
|
* 兼容华为手机(在个别华为手机上 设置透明度会不成功)
|
|
|
@@ -410,57 +417,70 @@ private int agree_type = 0;
|
|
|
}
|
|
|
activity.getWindow().setAttributes(lp);
|
|
|
}
|
|
|
+
|
|
|
private void doSelectDealMan() {
|
|
|
- HashMap param = new HashMap<>();
|
|
|
- param.put("enuu", ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().getEnuu());
|
|
|
- Bundle bundle = new Bundle();
|
|
|
- bundle.putSerializable("param", param);
|
|
|
- Intent intent = new Intent(ct, SelectActivity.class);
|
|
|
- intent.putExtra("type", 1);
|
|
|
- intent.putExtra("isSingle",true);
|
|
|
- intent.putExtra("reid", R.style.OAThemeMeet);
|
|
|
- intent.putExtras(bundle);
|
|
|
- intent.putExtra("key", "data");
|
|
|
- intent.putExtra("method", "get");
|
|
|
- intent.putExtra("showKey", "emname");
|
|
|
- intent.putExtra("action", ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().getUsersInfo);//
|
|
|
+// HashMap param = new HashMap<>();
|
|
|
+// param.put("enuu", ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().getEnuu());
|
|
|
+// Bundle bundle = new Bundle();
|
|
|
+// bundle.putSerializable("param", param);
|
|
|
+// Intent intent = new Intent(ct, SelectActivity.class);
|
|
|
+// intent.putExtra("type", 1);
|
|
|
+// intent.putExtra("isSingle",true);
|
|
|
+// intent.putExtra("reid", R.style.OAThemeMeet);
|
|
|
+// intent.putExtras(bundle);
|
|
|
+// intent.putExtra("key", "data");
|
|
|
+// intent.putExtra("method", "get");
|
|
|
+// intent.putExtra("showKey", "emname");
|
|
|
+// intent.putExtra("action", ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().getUsersInfo);//
|
|
|
+// startActivityForResult(intent, 0x01);
|
|
|
+
|
|
|
+ Intent intent = new Intent(ct, SelectCollisionActivity.class);
|
|
|
+ intent.putExtra("title", "选择执行人");
|
|
|
+ intent.putExtra("single", true);
|
|
|
startActivityForResult(intent, 0x01);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
|
if (data == null) {
|
|
|
- if (resultCode == 0x333 ){
|
|
|
+ if (resultCode == 0x333) {
|
|
|
loadPlatAppFlow(mCaller, detail_id);
|
|
|
myAdapter.notifyDataSetChanged();
|
|
|
a_and_disa_ll.setVisibility(View.GONE);
|
|
|
ToastMessage("变更成功,刷新审批节点");
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
return;
|
|
|
}
|
|
|
- }else if(requestCode == 0x01 && resultCode == 0x20){
|
|
|
- SelectBean d=data.getParcelableExtra("data");
|
|
|
- if (d != null){
|
|
|
- String single_man_name = d.getName();
|
|
|
- int single_man_emcode = JSON.parseObject(d.getJson()).getInteger("emcode");
|
|
|
+ } else if (requestCode == 0x01 && resultCode == 0x20) {
|
|
|
+ SelectEmUser d = data.getParcelableExtra("data");
|
|
|
+ if (d != null) {
|
|
|
+ String single_man_name = d.getEmName();
|
|
|
+ int single_man_emcode = -1;
|
|
|
+ String emcode = d.getEmCode();
|
|
|
+ try {
|
|
|
+ single_man_emcode = Integer.valueOf(emcode);
|
|
|
+ } catch (ClassCastException e) {
|
|
|
+
|
|
|
+ }
|
|
|
startActivityForResult(new Intent(getApplicationContext(), ChangeDealManActivity.class)
|
|
|
- .putExtra("deal_id", deal_id)
|
|
|
- .putExtra("single_man_emcode", single_man_emcode)
|
|
|
- .putExtra("single_man_name", single_man_name)
|
|
|
- ,0x325);
|
|
|
+ .putExtra("deal_id", deal_id)
|
|
|
+ .putExtra("single_man_emcode", single_man_emcode)
|
|
|
+ .putExtra("single_man_name", single_man_name)
|
|
|
+ , 0x325);
|
|
|
}
|
|
|
}
|
|
|
super.onActivityResult(requestCode, resultCode, data);
|
|
|
}
|
|
|
- private void doAgreeorDisAgree(int agree_type, int deal_id,String describe) {
|
|
|
+
|
|
|
+ private void doAgreeorDisAgree(int agree_type, int deal_id, String describe) {
|
|
|
String url = ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().common_doc_examine_and_approve_url;
|
|
|
- Map<String,Object> param = new HashMap<>();
|
|
|
- param.put("id",deal_id);
|
|
|
- param.put("description",describe);
|
|
|
- param.put("dealtype",agree_type);
|
|
|
- param.put("whichpage",4);
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ param.put("id", deal_id);
|
|
|
+ param.put("description", describe);
|
|
|
+ param.put("dealtype", agree_type);
|
|
|
+ param.put("whichpage", 4);
|
|
|
param.put("enuu", CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "companyEnUu"));
|
|
|
- param.put("emcode",CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "b2b_uu"));
|
|
|
+ param.put("emcode", CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "b2b_uu"));
|
|
|
LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
|
headers.put("Cookie", "JSESSIONID=" + ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().getCookie());
|
|
|
ViewUtil.httpSendRequest(getApplicationContext(), url, param, handler, headers, AGREE_OR_DISAGREE, null, null, "post");
|
|
|
@@ -471,25 +491,26 @@ private int agree_type = 0;
|
|
|
progressDialog.show();
|
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
|
String url = ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().common_delete_approval_flow_url;//这个接口仅仅是反提交操作
|
|
|
- Map<String,Object> param = new HashMap<>();
|
|
|
- param.put("id",mkeyValue);
|
|
|
- param.put("whichpage",4);
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ param.put("id", mkeyValue);
|
|
|
+ param.put("whichpage", 4);
|
|
|
param.put("enuu", CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "companyEnUu"));
|
|
|
param.put("emcode", CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "b2b_uu"));
|
|
|
LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
|
headers.put("Cookie", "JSESSIONID=" + ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().getCookie());
|
|
|
- if (retype.equals("reforsub")){ //反提交之重新提交请求
|
|
|
+ if (retype.equals("reforsub")) { //反提交之重新提交请求
|
|
|
ViewUtil.httpSendRequest(this, url, param, handler, headers, RESUBMIT_OF_DELETEAPPFL, null, null, "post");
|
|
|
- }else if (retype.equals("refordelete")){ //反提交之删除请求
|
|
|
+ } else if (retype.equals("refordelete")) { //反提交之删除请求
|
|
|
ViewUtil.httpSendRequest(this, url, param, handler, headers, DELETE_OF_DELETEAPPFL, null, null, "post");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
private void doPlatDeleteByid(int mkeyValue) {
|
|
|
//删除
|
|
|
String url = ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().delete_work_daily;
|
|
|
- Map<String,Object> param = new HashMap<>();
|
|
|
- param.put("id",mkeyValue);
|
|
|
- param.put("whichpage",4);
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ param.put("id", mkeyValue);
|
|
|
+ param.put("whichpage", 4);
|
|
|
param.put("enuu", CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "companyEnUu"));
|
|
|
param.put("emcode", CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "b2b_uu"));
|
|
|
LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
|
@@ -497,24 +518,24 @@ private int agree_type = 0;
|
|
|
ViewUtil.httpSendRequest(getApplicationContext(), url, param, handler, headers, PLAT_DELETE_DAILY, null, null, "post");
|
|
|
|
|
|
}
|
|
|
-
|
|
|
- private Handler handler = new Handler(){
|
|
|
+
|
|
|
+ private Handler handler = new Handler() {
|
|
|
@Override
|
|
|
public void handleMessage(Message msg) {
|
|
|
super.handleMessage(msg);
|
|
|
- switch (msg.what){
|
|
|
+ switch (msg.what) {
|
|
|
case PLAT_APP_FLOW_NODES:
|
|
|
- if (msg.getData() != null){
|
|
|
+ if (msg.getData() != null) {
|
|
|
String app_flow_result = msg.getData().getString("result");
|
|
|
- LogUtil.prinlnLongMsg("app_flow_result",app_flow_result);
|
|
|
+ LogUtil.prinlnLongMsg("app_flow_result", app_flow_result);
|
|
|
doPlatComAfShow(app_flow_result);
|
|
|
progressDialog.dismiss();
|
|
|
}
|
|
|
break;
|
|
|
case RESUBMIT_OF_DELETEAPPFL:
|
|
|
- if (msg.getData() != null){
|
|
|
+ if (msg.getData() != null) {
|
|
|
String r_for_s_result = msg.getData().getString("result");
|
|
|
- LogUtil.prinlnLongMsg("r_for_s_result",r_for_s_result);
|
|
|
+ LogUtil.prinlnLongMsg("r_for_s_result", r_for_s_result);
|
|
|
ToastMessage("反提交成功");
|
|
|
startActivity(new Intent(activity, WorkDailyAddActivity.class)
|
|
|
.putExtra("caller", mCaller)
|
|
|
@@ -528,19 +549,20 @@ private int agree_type = 0;
|
|
|
}
|
|
|
break;
|
|
|
case DELETE_OF_DELETEAPPFL:
|
|
|
- if (msg.getData() != null){
|
|
|
+ if (msg.getData() != null) {
|
|
|
String r_for_d_result = msg.getData().getString("result");
|
|
|
- LogUtil.prinlnLongMsg("r_for_d_result",r_for_d_result); ToastMessage("反提交成功");
|
|
|
+ LogUtil.prinlnLongMsg("r_for_d_result", r_for_d_result);
|
|
|
+ ToastMessage("反提交成功");
|
|
|
doPlatDeleteByid(mkeyValue);
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
- case COMMON_DOC_DETAILY: // 审批人进去详情界面进行审批
|
|
|
- if (msg.getData() != null){
|
|
|
+ case COMMON_DOC_DETAILY: // 审批人进去详情界面进行审批
|
|
|
+ if (msg.getData() != null) {
|
|
|
String com_doc_details = msg.getData().getString("result");
|
|
|
LogUtil.prinlnLongMsg("com_doc_details", com_doc_details);
|
|
|
- JSONObject dataObject = JSON.parseObject(com_doc_details).getJSONObject("data");
|
|
|
- if (dataObject != null){
|
|
|
+ JSONObject dataObject = JSON.parseObject(com_doc_details).getJSONObject("data");
|
|
|
+ if (dataObject != null) {
|
|
|
try {
|
|
|
mkeyValue = dataObject.getIntValue("wd_id");
|
|
|
long plat_date = dataObject.getLongValue("wd_date");
|
|
|
@@ -550,36 +572,36 @@ private int agree_type = 0;
|
|
|
experience = dataObject.getString("wd_experience");
|
|
|
wd_status = dataObject.getString("wd_status");
|
|
|
dodetailsShow(date, summary, plan, experience, wd_status);
|
|
|
- }catch (Exception e){
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
ToastMessage("单据详情已被删除");
|
|
|
ly_head_display.setVisibility(View.GONE);
|
|
|
a_and_disa_ll.setVisibility(View.GONE);
|
|
|
csv_hide.setVisibility(View.GONE);
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
ly_head_display.setVisibility(View.GONE);
|
|
|
a_and_disa_ll.setVisibility(View.GONE);
|
|
|
ToastMessage("单据详情已被删除");
|
|
|
csv_hide.setVisibility(View.GONE);
|
|
|
}
|
|
|
- Log.d("DailyData",summary + "," + plan + "," + experience + "," + date + "," + wd_status);
|
|
|
+ Log.d("DailyData", summary + "," + plan + "," + experience + "," + date + "," + wd_status);
|
|
|
loadPlatAppFlow(mCaller, mkeyValue);
|
|
|
break;
|
|
|
case PLAT_DELETE_DAILY:
|
|
|
- if (msg.getData() != null){
|
|
|
+ if (msg.getData() != null) {
|
|
|
String delete_result = msg.getData().getString("result");
|
|
|
- if (JSON.parseObject(delete_result).containsKey("success") && JSON.parseObject(delete_result).getBoolean("success")){
|
|
|
+ if (JSON.parseObject(delete_result).containsKey("success") && JSON.parseObject(delete_result).getBoolean("success")) {
|
|
|
Toast.makeText(mContext, "删除成功", Toast.LENGTH_LONG);
|
|
|
- if (!TextUtils.isEmpty(fromwhere) && "submitdaily".equals(fromwhere)){
|
|
|
- startActivity(new Intent(activity,PlatDailyShowActivity.class));
|
|
|
+ if (!TextUtils.isEmpty(fromwhere) && "submitdaily".equals(fromwhere)) {
|
|
|
+ startActivity(new Intent(activity, PlatDailyShowActivity.class));
|
|
|
finish();
|
|
|
- }else if (!TextUtils.isEmpty(fromwhere) && "dailylist".equals(fromwhere)){
|
|
|
+ } else if (!TextUtils.isEmpty(fromwhere) && "dailylist".equals(fromwhere)) {
|
|
|
Intent intent = new Intent();
|
|
|
- intent.putExtra("delete_succeed","delete_succeed");
|
|
|
- intent.putExtra("deleted_id",mkeyValue);
|
|
|
+ intent.putExtra("delete_succeed", "delete_succeed");
|
|
|
+ intent.putExtra("deleted_id", mkeyValue);
|
|
|
setResult(DELETE_SUCCEED, intent);
|
|
|
progressDialog.dismiss();
|
|
|
finish();
|
|
|
@@ -591,17 +613,17 @@ private int agree_type = 0;
|
|
|
break;
|
|
|
|
|
|
case AGREE_OR_DISAGREE:
|
|
|
- if (msg.getData() != null){
|
|
|
+ if (msg.getData() != null) {
|
|
|
String agree_or_disagree_result = msg.getData().getString("result");
|
|
|
LogUtil.prinlnLongMsg("agree_or_disagree_result", agree_or_disagree_result);
|
|
|
- Toast.makeText(getApplicationContext(),"操作成功",Toast.LENGTH_LONG).show();
|
|
|
+ Toast.makeText(getApplicationContext(), "操作成功", Toast.LENGTH_LONG).show();
|
|
|
setResult(0x41701);
|
|
|
finish();
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
case CHANGE_DEAL_MAN:
|
|
|
- if (msg.getData() != null){
|
|
|
+ if (msg.getData() != null) {
|
|
|
String change_deal_man_result = msg.getData().getString("result");
|
|
|
LogUtil.prinlnLongMsg("change_deal_man_result", change_deal_man_result);
|
|
|
}
|
|
|
@@ -621,15 +643,15 @@ private int agree_type = 0;
|
|
|
private void dodetailsShow(String date, String summary, String plan, String experience, String wd_status) {
|
|
|
csv_hide.setVisibility(View.VISIBLE);
|
|
|
resanddel_ll.setVisibility(View.GONE);
|
|
|
- if (!StringUtils.isEmpty(plan)){
|
|
|
+ if (!StringUtils.isEmpty(plan)) {
|
|
|
wdd_plan.setText(plan);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
plan_ll.setVisibility(View.GONE);
|
|
|
}
|
|
|
|
|
|
- if (!StringUtils.isEmpty(experience)){
|
|
|
+ if (!StringUtils.isEmpty(experience)) {
|
|
|
wdd_experience.setText(experience);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
experience_ll.setVisibility(View.GONE);
|
|
|
}
|
|
|
wdd_status.setText(wd_status);
|
|
|
@@ -639,36 +661,36 @@ private int agree_type = 0;
|
|
|
|
|
|
private void doPlatComAfShow(String app_flow_result) {
|
|
|
JSONObject resultJsonObject = JSON.parseObject(app_flow_result);
|
|
|
- if (resultJsonObject == null){
|
|
|
+ if (resultJsonObject == null) {
|
|
|
approval_flowlv.setVisibility(View.GONE);
|
|
|
hide_above_af.setVisibility(View.GONE);
|
|
|
- }else {
|
|
|
- mPlatComAfBean = JSON.parseObject(resultJsonObject.toString(),PlatComAfBean.class);
|
|
|
+ } else {
|
|
|
+ mPlatComAfBean = JSON.parseObject(resultJsonObject.toString(), PlatComAfBean.class);
|
|
|
//TODO 获取数据审批人姓名,头像,审批状态
|
|
|
- if (!ListUtils.isEmpty(mPlatComAfBean.getData()) || !ListUtils.isEmpty(mPlatComAfBean.getNodes())){
|
|
|
+ if (!ListUtils.isEmpty(mPlatComAfBean.getData()) || !ListUtils.isEmpty(mPlatComAfBean.getNodes())) {
|
|
|
int datas_size = mPlatComAfBean.getData().size();
|
|
|
int nodes_size = mPlatComAfBean.getNodes().size();
|
|
|
- if (nodes_size == 0 && datas_size > 0){
|
|
|
+ if (nodes_size == 0 && datas_size > 0) {
|
|
|
for (int i = 0; i < datas_size; i++) {
|
|
|
- if (!StringUtils.isEmpty(mPlatComAfBean.getData().get(i).getJp_nodename())){
|
|
|
+ if (!StringUtils.isEmpty(mPlatComAfBean.getData().get(i).getJp_nodename())) {
|
|
|
afpeople_names.add(mPlatComAfBean.getData().get(i).getJp_nodename());
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
afpeople_names.add("");
|
|
|
}
|
|
|
}
|
|
|
- }else if (nodes_size > 0 && nodes_size <= datas_size){
|
|
|
+ } else if (nodes_size > 0 && nodes_size <= datas_size) {
|
|
|
for (int i = 0; i < nodes_size; i++) {
|
|
|
- if (!StringUtils.isEmpty(mPlatComAfBean.getNodes().get(i).getJn_dealManName())){
|
|
|
+ if (!StringUtils.isEmpty(mPlatComAfBean.getNodes().get(i).getJn_dealManName())) {
|
|
|
afpeople_names.add(mPlatComAfBean.getNodes().get(i).getJn_dealManName());
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
afpeople_names.add("");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
for (int i = nodes_size; i < datas_size; i++) {
|
|
|
- if (!StringUtils.isEmpty(mPlatComAfBean.getData().get(i).getJp_nodename())){
|
|
|
+ if (!StringUtils.isEmpty(mPlatComAfBean.getData().get(i).getJp_nodename())) {
|
|
|
afpeople_names.add(mPlatComAfBean.getData().get(i).getJp_nodename());
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
afpeople_names.add("");
|
|
|
}
|
|
|
}
|
|
|
@@ -691,24 +713,24 @@ private int agree_type = 0;
|
|
|
@Override
|
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
if (item.getItemId() == android.R.id.home) {
|
|
|
- if (!TextUtils.isEmpty(fromwhere) && fromwhere.equals("submitdaily"))
|
|
|
- {startActivity(new Intent(activity, PlatDailyShowActivity.class)
|
|
|
+ if (!TextUtils.isEmpty(fromwhere) && fromwhere.equals("submitdaily")) {
|
|
|
+ startActivity(new Intent(activity, PlatDailyShowActivity.class)
|
|
|
.putExtra("fromwhere", "dodaily"));
|
|
|
finish();
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
finish();
|
|
|
}
|
|
|
- }return true;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onBackPressed() {
|
|
|
- if (!TextUtils.isEmpty(fromwhere) && fromwhere.equals("submitdaily"))
|
|
|
- {
|
|
|
+ if (!TextUtils.isEmpty(fromwhere) && fromwhere.equals("submitdaily")) {
|
|
|
startActivity(new Intent(activity, PlatDailyShowActivity.class)
|
|
|
.putExtra("fromwhere", "dodaily"));
|
|
|
finish();
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
super.onBackPressed();
|
|
|
finish();
|
|
|
}
|