|
|
@@ -58,6 +58,7 @@ public class PersonSettingActivity extends BaseActivity implements View.OnClickL
|
|
|
private TextView user_department_tv;
|
|
|
private List<String> departmentModel_list;
|
|
|
private String result;
|
|
|
+ private String sm_userid;
|
|
|
|
|
|
@Override
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
@@ -152,6 +153,9 @@ public class PersonSettingActivity extends BaseActivity implements View.OnClickL
|
|
|
sm_id = model.getResult().get(position).getSm_id();
|
|
|
mBtnSave.setText(getString(R.string.common_update_button));
|
|
|
getSupportActionBar().setTitle(getString(R.string.common_update_button));
|
|
|
+
|
|
|
+ sm_userid = model.getResult().get(position).getSm_userid();
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -236,8 +240,8 @@ public class PersonSettingActivity extends BaseActivity implements View.OnClickL
|
|
|
if (!StringUtil.isEmpty(sm_id))
|
|
|
params.put("sm_id",sm_id);
|
|
|
|
|
|
- params.put("sm_stid",111);
|
|
|
- params.put("sm_userid",MyApplication.getInstance().mLoginUser.getUserId());
|
|
|
+ params.put("sm_stid",0);
|
|
|
+ params.put("sm_userid",StringUtil.isEmail(sm_userid) ? 0 : sm_userid);
|
|
|
params.put("sm_username",mUserNameTv.getText().toString());
|
|
|
params.put("sm_companyid",CommonUtil.getSharedPreferences(MyApplication.getInstance(),"erp_uu"));
|
|
|
params.put("sm_stname",mUserDepartmentEv.getText().toString());
|
|
|
@@ -246,6 +250,7 @@ public class PersonSettingActivity extends BaseActivity implements View.OnClickL
|
|
|
params.put("sm_telephone",mUserTelTv.getText().toString());
|
|
|
params.put("sm_sex",sm_sex);
|
|
|
params.put("sm_email",mUserEmailTv.getText().toString());
|
|
|
+ LogUtil.prinlnLongMsg("appPersonSet",JSONUtil.map2JSON(params));
|
|
|
|
|
|
HttpClient httpClient = new HttpClient.Builder(Constant.BASE_BOOKING_SETTING_URL).isDebug(true).build(true);
|
|
|
httpClient.Api().send(new HttpClient.Builder()
|
|
|
@@ -264,11 +269,12 @@ public class PersonSettingActivity extends BaseActivity implements View.OnClickL
|
|
|
public void onResponse(Object o) {
|
|
|
if (!JSONUtil.validate(o.toString()) || o == null) return;
|
|
|
LogUtil.prinlnLongMsg("appPersonSet", o.toString()+"");
|
|
|
- if (o.toString().contains("result") && JSON.parseObject(o.toString()).getBoolean("result")) {
|
|
|
+ if (o.toString().contains("result") && JSON.parseObject(o.toString()).getBoolean("result")){
|
|
|
Toast.makeText(ct,getString(R.string.common_save_success),Toast.LENGTH_LONG).show();
|
|
|
setResult(20);
|
|
|
finish();
|
|
|
- }
|
|
|
+ }else
|
|
|
+ ToastMessage(getString(R.string.save_failed));
|
|
|
}
|
|
|
}));
|
|
|
|