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

master
hwf453 2 years ago
parent 12f0cfe16d
commit d186a29bab

@ -21,6 +21,8 @@ public class RowsBean {
private String suplistid = "";
private String istj = "";
private String modifiedby = "";
private String curnodename = "";
private String states = "";
public String getListid() {
@ -118,4 +120,20 @@ public class RowsBean {
public void setModifiedby(String 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.LinearLayout;
import android.widget.Toast;
import com.rehome.zhdcoa.Api;
import com.rehome.zhdcoa.Contans;
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.CbRbLayout;
import com.rehome.zhdcoa.weiget.InputLayout;
import java.util.ArrayList;
import java.util.List;
import okhttp3.MediaType;
import okhttp3.RequestBody;
import retrofit2.Call;
@ -58,7 +61,7 @@ public class ApplyVehicleAuditActivity extends BaseActivity implements View.OnCl
LinearLayout llAudit;
InputLayout ilDriver;
InputLayout ilNum;
InputLayout ilTEL;
InputLayout ilTEL;
InputLayout ilSm;
Button btnDx;
InputLayout ilDriverID;
@ -128,6 +131,15 @@ public class ApplyVehicleAuditActivity extends BaseActivity implements View.OnCl
btnDx.setVisibility(View.GONE);
}
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);
btnDx.setOnClickListener(new View.OnClickListener() {
@Override
@ -320,6 +332,23 @@ public class ApplyVehicleAuditActivity extends BaseActivity implements View.OnCl
ilNum.setContent(dataRowsBean.getVehicleCh());
ilSm.setContent(dataRowsBean.getVehicleSm());
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() {
@ -350,6 +379,13 @@ public class ApplyVehicleAuditActivity extends BaseActivity implements View.OnCl
initToolbar("预定车辆" + rowsBean.getAuditName(), "", this);
}
showView(vehicleBean);
if (TextUtils.isEmpty(rowsBean.getItemid())) {
//没有审核权限,不可编辑
ilDriver.setEnabled(false);
ilNum.setEnabled(false);
ilTEL.setEnabled(false);
ilSm.setEnabled(false);
}
setToolbarTitle(rowsBean.getAuditName());
rangeID = bean.getRows().get(0).getRange();
datas.addAll(rowsBean.getStepSHList());

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

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

Loading…
Cancel
Save