车辆审核流程调整 不允许提前批

master
hwf453 2 years ago
parent 12f0cfe16d
commit d186a29bab

@ -21,6 +21,8 @@ public class RowsBean {
private String suplistid = ""; private String suplistid = "";
private String istj = ""; private String istj = "";
private String modifiedby = ""; private String modifiedby = "";
private String curnodename = "";
private String states = "";
public String getListid() { public String getListid() {
@ -118,4 +120,20 @@ public class RowsBean {
public void setModifiedby(String modifiedby) { public void setModifiedby(String modifiedby) {
this.modifiedby = modifiedby; this.modifiedby = modifiedby;
} }
public String getCurnodename() {
return curnodename;
}
public void setCurnodename(String curnodename) {
this.curnodename = curnodename;
}
public String getStates() {
return states;
}
public void setStates(String states) {
this.states = states;
}
} }

@ -6,6 +6,7 @@ import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.Toast; import android.widget.Toast;
import com.rehome.zhdcoa.Api; import com.rehome.zhdcoa.Api;
import com.rehome.zhdcoa.Contans; import com.rehome.zhdcoa.Contans;
import com.rehome.zhdcoa.R; import com.rehome.zhdcoa.R;
@ -32,8 +33,10 @@ import com.rehome.zhdcoa.weiget.AuditDialog;
import com.rehome.zhdcoa.weiget.AuditFlowDialog; import com.rehome.zhdcoa.weiget.AuditFlowDialog;
import com.rehome.zhdcoa.weiget.CbRbLayout; import com.rehome.zhdcoa.weiget.CbRbLayout;
import com.rehome.zhdcoa.weiget.InputLayout; import com.rehome.zhdcoa.weiget.InputLayout;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import okhttp3.MediaType; import okhttp3.MediaType;
import okhttp3.RequestBody; import okhttp3.RequestBody;
import retrofit2.Call; import retrofit2.Call;
@ -58,7 +61,7 @@ public class ApplyVehicleAuditActivity extends BaseActivity implements View.OnCl
LinearLayout llAudit; LinearLayout llAudit;
InputLayout ilDriver; InputLayout ilDriver;
InputLayout ilNum; InputLayout ilNum;
InputLayout ilTEL; InputLayout ilTEL;
InputLayout ilSm; InputLayout ilSm;
Button btnDx; Button btnDx;
InputLayout ilDriverID; InputLayout ilDriverID;
@ -128,6 +131,15 @@ public class ApplyVehicleAuditActivity extends BaseActivity implements View.OnCl
btnDx.setVisibility(View.GONE); btnDx.setVisibility(View.GONE);
} }
cbIdea.setRb1Check(true); cbIdea.setRb1Check(true);
//默认不可指派司机,只有管理员才可以
ilDriver.setEnabled(false);
ilNum.setEnabled(false);
ilTEL.setEnabled(false);
ilSm.setEnabled(false);
// llOk.setBackgroundColor(0xeeeeeeee);
llOk.setVisibility(cbIdea.getRb1Check() ? View.VISIBLE : View.GONE); llOk.setVisibility(cbIdea.getRb1Check() ? View.VISIBLE : View.GONE);
btnDx.setOnClickListener(new View.OnClickListener() { btnDx.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -320,6 +332,23 @@ public class ApplyVehicleAuditActivity extends BaseActivity implements View.OnCl
ilNum.setContent(dataRowsBean.getVehicleCh()); ilNum.setContent(dataRowsBean.getVehicleCh());
ilSm.setContent(dataRowsBean.getVehicleSm()); ilSm.setContent(dataRowsBean.getVehicleSm());
ilTEL.setContent(dataRowsBean.getVehiclePhone()); ilTEL.setContent(dataRowsBean.getVehiclePhone());
if (bean.getRows() != null && bean.getRows().size() > 0) {
String states = bean.getRows().get(0).getStates();
String curnodename = bean.getRows().get(0).getCurnodename();
if (!TextUtils.isEmpty(curnodename) && !TextUtils.isEmpty(states)) {
if (states.equals("2") && curnodename.equals("车辆管理员审批")) {
//states=2 和 curnodename=车辆管理员审批,才可以指派车辆
ilDriver.setEnabled(true);
ilNum.setEnabled(true);
ilTEL.setEnabled(true);
ilSm.setEnabled(true);
//llOk.setBackgroundColor(0x00000000);
}else{
llOk.setBackgroundColor(0xeeeeeeee);
}
}
}
} }
public void getAuditpermission() { public void getAuditpermission() {
@ -350,6 +379,13 @@ public class ApplyVehicleAuditActivity extends BaseActivity implements View.OnCl
initToolbar("预定车辆" + rowsBean.getAuditName(), "", this); initToolbar("预定车辆" + rowsBean.getAuditName(), "", this);
} }
showView(vehicleBean); showView(vehicleBean);
if (TextUtils.isEmpty(rowsBean.getItemid())) {
//没有审核权限,不可编辑
ilDriver.setEnabled(false);
ilNum.setEnabled(false);
ilTEL.setEnabled(false);
ilSm.setEnabled(false);
}
setToolbarTitle(rowsBean.getAuditName()); setToolbarTitle(rowsBean.getAuditName());
rangeID = bean.getRows().get(0).getRange(); rangeID = bean.getRows().get(0).getRange();
datas.addAll(rowsBean.getStepSHList()); datas.addAll(rowsBean.getStepSHList());

@ -98,6 +98,8 @@ public class GzpActivity extends BaseActivity {
public void onSuccess(Call<GzpListBean> call, Response<GzpListBean> response) { public void onSuccess(Call<GzpListBean> call, Response<GzpListBean> response) {
GzpListBean bean = response.body(); GzpListBean bean = response.body();
String json = GsonUtils.GsonString(bean);
showLog(json);
if (bean != null) { if (bean != null) {
if (bean.getTotal().equals("0")) { if (bean.getTotal().equals("0")) {

@ -51,9 +51,9 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
SPUtils.put(this, Contans.XZ_WIFI_IP, Contans.BASE_URL_INTRANET) //行政IP内网 SPUtils.put(this, Contans.XZ_WIFI_IP, Contans.BASE_URL_INTRANET) //行政IP内网
} }
val saveUserAndPassword = SPUtils.get( val saveUserAndPassword = SPUtils.get(
context, context,
Contans.SP.SAVE_USER_AND_PASSWORD, Contans.SP.SAVE_USER_AND_PASSWORD,
java.lang.Boolean.TRUE java.lang.Boolean.TRUE
) as Boolean ) as Boolean
binding.swRememberPwd.isChecked = saveUserAndPassword binding.swRememberPwd.isChecked = saveUserAndPassword
@ -73,18 +73,18 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
Contans.IP = Contans.IP_INTRANET //运行IP内网 Contans.IP = Contans.IP_INTRANET //运行IP内网
Contans.BASE_URL = Contans.BASE_URL_INTRANET //行政IP内网 Contans.BASE_URL = Contans.BASE_URL_INTRANET //行政IP内网
Contans.BASE_URL_COMPANY_SERVER = Contans.BASE_URL_COMPANY_SERVER =
Contans.BASE_URL_COMPANY_SERVER_INTRANET //智慧安防平台登录 电厂内网 Contans.BASE_URL_COMPANY_SERVER_INTRANET //智慧安防平台登录 电厂内网
Contans.BASE_URL_AI_3D_SERVER = Contans.BASE_URL_AI_3D_SERVER =
Contans.BASE_URL_AI_3D_SERVER_INTRANET //AI三维可视化安防平台登录 电厂外网 Contans.BASE_URL_AI_3D_SERVER_INTRANET //AI三维可视化安防平台登录 电厂外网
} }
if (networkCheckType == "外网") { if (networkCheckType == "外网") {
binding.rg.check(R.id.rb2) binding.rg.check(R.id.rb2)
Contans.IP = Contans.IP_EXTRANET //运行IP外网 Contans.IP = Contans.IP_EXTRANET //运行IP外网
Contans.BASE_URL = Contans.BASE_URL_EXTRANET //行政IP外网 Contans.BASE_URL = Contans.BASE_URL_EXTRANET //行政IP外网
Contans.BASE_URL_COMPANY_SERVER = Contans.BASE_URL_COMPANY_SERVER =
Contans.BASE_URL_COMPANY_SERVER_EXTRANET //智慧安防平台登录 电厂外网 Contans.BASE_URL_COMPANY_SERVER_EXTRANET //智慧安防平台登录 电厂外网
Contans.BASE_URL_AI_3D_SERVER = Contans.BASE_URL_AI_3D_SERVER =
Contans.BASE_URL_AI_3D_SERVER_EXTRANET //AI三维可视化安防平台登录 电厂外网 Contans.BASE_URL_AI_3D_SERVER_EXTRANET //AI三维可视化安防平台登录 电厂外网
} }
} else { } else {
binding.rg.check(R.id.rb2) binding.rg.check(R.id.rb2)
@ -92,9 +92,9 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
Contans.IP = Contans.IP_EXTRANET //运行IP外网 Contans.IP = Contans.IP_EXTRANET //运行IP外网
Contans.BASE_URL = Contans.BASE_URL_EXTRANET //行政IP外网 Contans.BASE_URL = Contans.BASE_URL_EXTRANET //行政IP外网
Contans.BASE_URL_COMPANY_SERVER = Contans.BASE_URL_COMPANY_SERVER =
Contans.BASE_URL_COMPANY_SERVER_EXTRANET //智慧安防平台登录 电厂外网 Contans.BASE_URL_COMPANY_SERVER_EXTRANET //智慧安防平台登录 电厂外网
Contans.BASE_URL_AI_3D_SERVER = Contans.BASE_URL_AI_3D_SERVER =
Contans.BASE_URL_AI_3D_SERVER_EXTRANET //AI三维可视化安防平台登录 电厂外网 Contans.BASE_URL_AI_3D_SERVER_EXTRANET //AI三维可视化安防平台登录 电厂外网
} }
binding.rg.setOnCheckedChangeListener(RadioGroup.OnCheckedChangeListener { _, checkedId -> binding.rg.setOnCheckedChangeListener(RadioGroup.OnCheckedChangeListener { _, checkedId ->
@ -104,9 +104,9 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
Contans.IP = Contans.IP_INTRANET //运行IP内网 Contans.IP = Contans.IP_INTRANET //运行IP内网
Contans.BASE_URL = Contans.BASE_URL_INTRANET //行政IP内网 Contans.BASE_URL = Contans.BASE_URL_INTRANET //行政IP内网
Contans.BASE_URL_COMPANY_SERVER = Contans.BASE_URL_COMPANY_SERVER =
Contans.BASE_URL_COMPANY_SERVER_INTRANET //智慧安防平台登录 电厂内网 Contans.BASE_URL_COMPANY_SERVER_INTRANET //智慧安防平台登录 电厂内网
Contans.BASE_URL_AI_3D_SERVER = Contans.BASE_URL_AI_3D_SERVER =
Contans.BASE_URL_AI_3D_SERVER_INTRANET //AI三维可视化安防平台登录 电厂外网 Contans.BASE_URL_AI_3D_SERVER_INTRANET //AI三维可视化安防平台登录 电厂外网
} }
R.id.rb2 -> { R.id.rb2 -> {
@ -114,9 +114,9 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
Contans.IP = Contans.IP_EXTRANET //运行IP外网 Contans.IP = Contans.IP_EXTRANET //运行IP外网
Contans.BASE_URL = Contans.BASE_URL_EXTRANET //行政IP外网 Contans.BASE_URL = Contans.BASE_URL_EXTRANET //行政IP外网
Contans.BASE_URL_COMPANY_SERVER = Contans.BASE_URL_COMPANY_SERVER =
Contans.BASE_URL_COMPANY_SERVER_EXTRANET //智慧安防平台登录 电厂外网 Contans.BASE_URL_COMPANY_SERVER_EXTRANET //智慧安防平台登录 电厂外网
Contans.BASE_URL_AI_3D_SERVER = Contans.BASE_URL_AI_3D_SERVER =
Contans.BASE_URL_AI_3D_SERVER_EXTRANET //AI三维可视化安防平台登录 电厂外网 Contans.BASE_URL_AI_3D_SERVER_EXTRANET //AI三维可视化安防平台登录 电厂外网
} }
} }
}) })
@ -127,12 +127,12 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
override fun initData() { override fun initData() {
binding.tvVersionCode.text = getString(R.string.version_code) + getVersionName() binding.tvVersionCode.text = getString(R.string.version_code) + getVersionName()
AndPermission.with(this).runtime().permission( AndPermission.with(this).runtime().permission(
Permission.READ_PHONE_STATE, Permission.READ_PHONE_STATE,
Permission.READ_EXTERNAL_STORAGE, Permission.READ_EXTERNAL_STORAGE,
Permission.WRITE_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE,
Permission.CAMERA Permission.CAMERA
).onGranted { }.onDenied { } ).onGranted { }.onDenied { }
.start() .start()
val UserIDTemp = SPUtils.get(context, Contans.SP.USER_NAME, "") as String val UserIDTemp = SPUtils.get(context, Contans.SP.USER_NAME, "") as String
val UserPwdTemp = SPUtils.get(context, Contans.SP.PASS_WORD, "") as String val UserPwdTemp = SPUtils.get(context, Contans.SP.PASS_WORD, "") as String
@ -150,8 +150,8 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
if (BuildConfig.LOG_ERROR) { if (BuildConfig.LOG_ERROR) {
// 管理员 // 管理员
binding.etUsername.setText("ZHPS_Admin") binding.etUsername.setText("ZHPS_Admin")
binding.etPassword.setText("Rehome.zhps@2020") binding.etPassword.setText("Rehome.zhps@2020")
// //
// binding.etUsername.setText("310665") // binding.etUsername.setText("310665")
// binding.etPassword.setText("ABcd.123") // binding.etPassword.setText("ABcd.123")
@ -162,15 +162,19 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
// binding.etPassword.setText("Abc*00467309") // binding.etPassword.setText("Abc*00467309")
// //
// //马 // //马
binding.etUsername.setText("310482") // binding.etUsername.setText("310482")
binding.etPassword.setText("Maying0509?") // binding.etPassword.setText("Maying0509?")
// //
// //程宇翔 // //程宇翔
binding.etUsername.setText("310673") // binding.etUsername.setText("310673")
binding.etPassword.setText("Abcd@1234") // binding.etPassword.setText("Abcd@1234")
//李耿 //李耿
// binding.etUsername.setText("310261") binding.etUsername.setText("310261")
// binding.etPassword.setText("!Lig770731") binding.etPassword.setText("#LIgeng770731")
//古舒敏
// binding.etUsername.setText("310585")
// binding.etPassword.setText("Lama520+_*")
//陈嘉 //陈嘉
// binding.etUsername.setText("310408") // binding.etUsername.setText("310408")
// binding.etPassword.setText("zhpCJ1981+") // binding.etPassword.setText("zhpCJ1981+")
@ -192,8 +196,8 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
binding.textWjmm.setOnClickListener(View.OnClickListener { binding.textWjmm.setOnClickListener(View.OnClickListener {
val intent = Intent( val intent = Intent(
this, this,
WjmmGetVerificationCodeActivity::class.java WjmmGetVerificationCodeActivity::class.java
) )
startActivity(intent) startActivity(intent)
}) })
@ -223,14 +227,14 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
} }
private fun PackageManager.getPackageInfoCompat( private fun PackageManager.getPackageInfoCompat(
packageName: String, packageName: String,
flags: Int = 0 flags: Int = 0
): PackageInfo = ): PackageInfo =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
getPackageInfo(packageName, PackageManager.PackageInfoFlags.of(flags.toLong())) getPackageInfo(packageName, PackageManager.PackageInfoFlags.of(flags.toLong()))
} else { } else {
@Suppress("DEPRECATION") getPackageInfo(packageName, flags) @Suppress("DEPRECATION") getPackageInfo(packageName, flags)
} }
private fun appLogin() { private fun appLogin() {
val json: String = getPhoneInfo() val json: String = getPhoneInfo()
@ -249,51 +253,51 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
if (userInfo.statusMsg == "success") { //登录成功 if (userInfo.statusMsg == "success") { //登录成功
MiPushClient.setAlias(context, binding.etUsername.text.toString(), null) MiPushClient.setAlias(context, binding.etUsername.text.toString(), null)
SPUtils.put( SPUtils.put(
context, context,
Contans.SP.OLD_PWD, Contans.SP.OLD_PWD,
RSAUtils.encryptBASE64StrLocal(binding.etPassword.text.toString()) RSAUtils.encryptBASE64StrLocal(binding.etPassword.text.toString())
) )
if (binding.swRememberPwd.isChecked) { if (binding.swRememberPwd.isChecked) {
SPUtils.put( SPUtils.put(
context, context,
Contans.SP.USER_NAME, Contans.SP.USER_NAME,
RSAUtils.encryptBASE64StrLocal(binding.etUsername.text.toString()) RSAUtils.encryptBASE64StrLocal(binding.etUsername.text.toString())
) )
SPUtils.put( SPUtils.put(
context, context,
Contans.SP.PASS_WORD, Contans.SP.PASS_WORD,
RSAUtils.encryptBASE64StrLocal(binding.etPassword.text.toString()) RSAUtils.encryptBASE64StrLocal(binding.etPassword.text.toString())
) )
val strEncryptMqtt = RSAUtils.encryptBASE64StrMqtt(getPhoneInfoMqtt()); val strEncryptMqtt = RSAUtils.encryptBASE64StrMqtt(getPhoneInfoMqtt());
SPUtils.put(context, Contans.SP.PHONE_INFO, strEncryptMqtt) SPUtils.put(context, Contans.SP.PHONE_INFO, strEncryptMqtt)
SPUtils.put( SPUtils.put(
context, context,
Contans.SP.AF_PASS_WORD, Contans.SP.AF_PASS_WORD,
RSAUtils.encryptBASE64StrLocal(binding.etPassword.text.toString()) RSAUtils.encryptBASE64StrLocal(binding.etPassword.text.toString())
) )
} else { } else {
SPUtils.put(context, Contans.SP.USER_NAME, "") SPUtils.put(context, Contans.SP.USER_NAME, "")
SPUtils.put(context, Contans.SP.PASS_WORD, "") SPUtils.put(context, Contans.SP.PASS_WORD, "")
} }
SPUtils.put( SPUtils.put(
context, context,
Contans.BZBH, Contans.BZBH,
if (userInfo.bzbh == null) "" else userInfo.bzbh if (userInfo.bzbh == null) "" else userInfo.bzbh
) )
SPUtils.put( SPUtils.put(
context, context,
Contans.BZMC, Contans.BZMC,
if (userInfo.bzmc == null) "" else userInfo.bzmc if (userInfo.bzmc == null) "" else userInfo.bzmc
) )
SPUtils.put( SPUtils.put(
context, context,
Contans.SCBZBH, Contans.SCBZBH,
if (userInfo.scbzbh == null) "" else userInfo.scbzbh if (userInfo.scbzbh == null) "" else userInfo.scbzbh
) )
SPUtils.put( SPUtils.put(
context, context,
Contans.ISSCBM, Contans.ISSCBM,
if (userInfo.isScBm == null) "" else userInfo.isScBm if (userInfo.isScBm == null) "" else userInfo.isScBm
) )
// if (userInfo.isScBm == null) { // if (userInfo.isScBm == null) {
// Log.i("app", "userInfo.isScBm is null") // Log.i("app", "userInfo.isScBm is null")
@ -306,9 +310,9 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
// } // }
Contans.PERMISSIONSRESULT = userInfo.permissionsResult Contans.PERMISSIONSRESULT = userInfo.permissionsResult
SPUtils.put( SPUtils.put(
context, context,
Contans.PERMISSIONSRESULT, Contans.PERMISSIONSRESULT,
if (userInfo.permissionsResult == null) "" else userInfo.permissionsResult if (userInfo.permissionsResult == null) "" else userInfo.permissionsResult
) )
App.getInstance().userInfo = userInfo App.getInstance().userInfo = userInfo
val intent = Intent(context, MainActivity::class.java) val intent = Intent(context, MainActivity::class.java)
@ -319,7 +323,7 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
} else { } else {
Log.i("login", userInfo.statusMsg) Log.i("login", userInfo.statusMsg)
toastviewbymyself.makeText(context, userInfo.statusMsg, Toast.LENGTH_LONG) toastviewbymyself.makeText(context, userInfo.statusMsg, Toast.LENGTH_LONG)
.show() .show()
} }
} else { } else {
showToast("服务器请求失败") showToast("服务器请求失败")

@ -11,6 +11,7 @@ import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.google.gson.Gson;
import com.rehome.zhdcoa.R; import com.rehome.zhdcoa.R;
import com.rehome.zhdcoa.adapter.ContactAdapter; import com.rehome.zhdcoa.adapter.ContactAdapter;
import com.rehome.zhdcoa.base.BaseCallBack; import com.rehome.zhdcoa.base.BaseCallBack;
@ -117,6 +118,7 @@ public class ContactFragment extends BaseFragment {
public void onSuccess(Call<ContactListBean> call, Response<ContactListBean> response) { public void onSuccess(Call<ContactListBean> call, Response<ContactListBean> response) {
ContactListBean bean = response.body(); ContactListBean bean = response.body();
showLog(new Gson().toJson(bean));
if (bean != null) { if (bean != null) {
datas.clear(); datas.clear();
initDatas.clear(); initDatas.clear();

Loading…
Cancel
Save