1.1.6版本发布

master
admin 1 year ago
parent f240e20c6f
commit 840d68a351

@ -10,8 +10,8 @@ android {
applicationId "com.rehome.dywoa"
minSdk 24
targetSdk 34
versionCode 16
versionName "1.1.5"
versionCode 17
versionName "1.1.6"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
//authorities

@ -152,6 +152,10 @@
android:name=".ui.activity.sbxj.SxgzActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.sbxj.XjCheckAndUploadActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.sbxj.XjZhTjActivity"
android:exported="false"

@ -3,25 +3,25 @@ package com.rehome.dywoa;
public class Contans {
// public static String IP = "http://192.168.2.115:8601/";
// public static String IP_INTRANET = "http://192.168.2.115:8601/";
// public static String IP_EXTRANET = "http://192.168.2.115:8601/";
// public static String SIS_TOKEN_IP = "https://sis.dywzhny.com.cn/";
// public static String BI_TOKEN_IP = "https://bi.dywzhny.com.cn/";
public static String IP = "http://192.168.2.115:8601/";
public static String IP_INTRANET = "http://192.168.2.115:8601/";
public static String IP_EXTRANET = "http://192.168.2.115:8601/";
public static String SIS_TOKEN_IP = "https://sis.dywzhny.com.cn/";
public static String BI_TOKEN_IP = "https://bi.dywzhny.com.cn/";
//APP登录接口厂内服务器IP
public static String IP = "https://app.dywzhny.com.cn/";
//app内网
public static String IP_INTRANET = "https://app.dywzhny.com.cn/";
//app外网
public static String IP_EXTRANET = "https://app.dywzhny.com.cn/";
//SIS系统厂内IP
public static String SIS_TOKEN_IP = "https://sis.dywzhny.com.cn/";
//BI
public static String BI_TOKEN_IP = "https://bi.dywzhny.com.cn/";
// public static String IP = "https://app.dywzhny.com.cn/";
// //app内网
// public static String IP_INTRANET = "https://app.dywzhny.com.cn/";
// //app外网
// public static String IP_EXTRANET = "https://app.dywzhny.com.cn/";
// //SIS系统厂内IP
// public static String SIS_TOKEN_IP = "https://sis.dywzhny.com.cn/";
// //BI
// public static String BI_TOKEN_IP = "https://bi.dywzhny.com.cn/";

@ -52,6 +52,9 @@ public class UserInfoBean {
//二级部门
private String secondDeparmentId;
private String secondDeparment;
private String thirdDeparmentId;
private String thirdDeparment;
//三级部门
public String getIsScBm() {
return isScBm;
@ -207,8 +210,21 @@ public class UserInfoBean {
public void setSecondDeparment(String secondDeparment) {
this.secondDeparment = secondDeparment;
}
}
public String getThirdDeparmentId() {
return thirdDeparmentId;
}
public void setThirdDeparmentId(String thirdDeparmentId) {
this.thirdDeparmentId = thirdDeparmentId;
}
public String getThirdDeparment() {
return thirdDeparment;
}
public void setThirdDeparment(String thirdDeparment) {
this.thirdDeparment = thirdDeparment;
}
}
}

@ -43,7 +43,7 @@ class KksSearchActivity : BaseActivityOaToolbarViewBinding<ActivityKksSearchBind
override fun getToolbar() = binding.toolbarView.toolbar
override fun initView() {
initToolbar("kks码查询", "扫码") {
initToolbar("kks码查询(感应NFC或扫码)", "扫码") {
goScan()
}
launcherResultQRCode = createQRCodeActivityResultLauncher()
@ -61,11 +61,24 @@ class KksSearchActivity : BaseActivityOaToolbarViewBinding<ActivityKksSearchBind
}
override fun initData() {
val handler = Handler()
handler.postDelayed(Runnable {
goScan()
},100)
// val handler = Handler()
// handler.postDelayed(Runnable {
// goScan()
// },100)
initNFC()
}
override fun handleNfc(result: String) {
if(TextUtils.isEmpty(result)){
showToast("读取NFC数据失败");
}else{
getListData("nfc",result)
}
}
/**
* 申请权限回调
*
@ -131,7 +144,7 @@ class KksSearchActivity : BaseActivityOaToolbarViewBinding<ActivityKksSearchBind
if(!TextUtils.isEmpty(qrCodeStr)){
if(qrCodeStr.startsWith("KK:",false)){
val qrCodeStrSub = qrCodeStr.replace("KK:","").trim()
getListData(qrCodeStrSub)
getListData("txm",qrCodeStrSub)
}else{
showToast("KKS码无法识别")
binding.tvNodata.visibility=View.VISIBLE
@ -143,10 +156,18 @@ class KksSearchActivity : BaseActivityOaToolbarViewBinding<ActivityKksSearchBind
}
}
fun getListData(qrCodeStr: String) {
private fun getListData(type:String, qrCodeStr: String) {
var param = HashMap<String,String>()
param["txm"] = qrCodeStr
param["type"] = type
if("nfc" == type){
param["nfc"] = qrCodeStr
}
if("txm" == type){
param["txm"] = qrCodeStr
}
val json = GsonUtils.GsonString(param)
showLog(json)

@ -40,6 +40,7 @@ import com.rehome.dywoa.ui.activity.vpn.PrimaryAuthActivity
import com.rehome.dywoa.utils.DataPassUtils
import com.rehome.dywoa.utils.GsonUtils
import com.rehome.dywoa.utils.HttpListener
import com.rehome.dywoa.utils.NoProgresshttpUtils
import com.rehome.dywoa.utils.NohttpUtils
import com.rehome.dywoa.utils.RSAUtils
import com.rehome.dywoa.utils.SPUtils
@ -198,13 +199,16 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
if (isApkInDebug(context)) {
//测试
binding.etUsername.setText("371522")
binding.etPassword.setText("A000000a.")
// binding.etUsername.setText("371522")
// binding.etPassword.setText("A000000a.")
//ceshi1
// binding.etUsername.setText("ceshi1")
// binding.etPassword.setText("A000000a.")
binding.etUsername.setText("CY00005")
binding.etPassword.setText("A000000a.")
// binding.etUsername.setText("CY00011")
// binding.etPassword.setText("A000000a")
@ -268,13 +272,19 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
//checkVpnLogin()
// appLogin() //登录
})
checkUpdateApk()
}
override fun onRestart() {
super.onRestart()
showLog("onRestart")
checkUpdateApk()
}
override fun onResume() {
super.onResume()
showLog("onResume")
checkConnectServerToUpdate();
}
private fun startAutoTicket() {
@ -288,10 +298,12 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
* 免密场景 启动L3VPN隧道需要等待onTunnelStarted返回启动隧道成功才能开始访问资源
*/
SFUemSDK.getInstance().sfTunnel.startTunnel()
checkConnectServerToUpdate();
//检测服务器是否能连接到
checkConnectServer()
}else{
if(checkVpnCanLogin()){
checkConnectServerToUpdate();
checkConnectServer()
}else{
goToVpnLogin()
@ -381,6 +393,7 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
Contans.SP.PASS_WORD_VPN,
RSAUtils.encryptBASE64StrLocal(pwdVpn)
)
checkConnectServerToUpdate();
if(checkInput()){
checkConnectServer();
}
@ -552,6 +565,41 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
return false
}
private fun checkConnectServerToUpdate() {
var param = HashMap<String,String>()
param["login"] = "dywoa";
val json = GsonUtils.GsonString(param)
val url = Contans.IP + Contans.check_server_connect
//val url = "http://192.168.2.150:8601/" + Contans.check_server_connect
showLog(url)
showLog(json)
val request = NoHttp.createStringRequest(
url,
RequestMethod.POST
)
request.setDefineRequestBodyForJson(json)
NoProgresshttpUtils.getInstance().add(this, 0, request, object : HttpListener<String?> {
override fun onSucceed(what: Int, response: Response<String?>?) {
val result = response?.get()
if (result != null) {
showLog("-----onSucceed----")
showLog(result)
if(result == "1"){
showLog("connect server success")
checkUpdateApk() //检查软件自动更新
}
}
}
override fun onFailed(what: Int, response: Response<String?>?) {
showLog("connect server onFailed")
//离线登录
offLineLogin()
showToast("无法连接到服务器,请检查网络环境")
}
})
}
private fun appLogin() {
@ -669,24 +717,24 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
// userInfo.manid="371520"
// userInfo.usernames="王子俊"
if(DataPassUtils.checkCanLogin()){
showLog("之前")
App.getInstance().userInfo = userInfo
val intent = Intent(context, HomeActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
startActivity(intent)
finish()
}else{
showLog("之后")
showToast("登录失败")
}
// App.getInstance().userInfo = userInfo
// val intent = Intent(context, HomeActivity::class.java)
// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
// startActivity(intent)
// finish()
// if(DataPassUtils.checkCanLogin()){
// showLog("之前")
// App.getInstance().userInfo = userInfo
// val intent = Intent(context, HomeActivity::class.java)
// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
// startActivity(intent)
// finish()
// }else{
// showLog("之后")
// showToast("登录失败")
// }
App.getInstance().userInfo = userInfo
val intent = Intent(context, HomeActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
startActivity(intent)
finish()
}
} else {
showLog(userInfo.statusMsg)

@ -13,6 +13,7 @@ import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.AdapterView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
@ -64,6 +65,11 @@ public class SxgzActivity extends BaseActivity {
TextView tv_uploaded;
TextView tv_checkedAndNoUpload;
LinearLayout ll_no_checked;
LinearLayout ll_checked;
LinearLayout ll_uploaded;
LinearLayout ll_checkedAndNoUpload;
private CommonAdapter<XSJJHXZDataBean> adapter;
private List<XSJJHXZDataBean> xsjjhxzDataBeanList = new ArrayList<>();
@ -110,6 +116,11 @@ public class SxgzActivity extends BaseActivity {
tv_uploaded = findViewById(R.id.tv_uploaded);
tv_checkedAndNoUpload = findViewById(R.id.tv_checkedAndNoUpload);
ll_no_checked = findViewById(R.id.ll_no_checked);
ll_checked = findViewById(R.id.ll_checked);
ll_uploaded = findViewById(R.id.ll_uploaded);
ll_checkedAndNoUpload = findViewById(R.id.ll_checkedAndNoUpload);
lv.setEmptyView(tvNodata);
headView = View.inflate(this, R.layout.xsgz_item, null);
headView.findViewById(R.id.head).setVisibility(View.VISIBLE);
@ -131,6 +142,45 @@ public class SxgzActivity extends BaseActivity {
filter.addAction(Contans.REFRESHDJSTATISTICS);
LocalBroadcastManager.getInstance(this).registerReceiver(myReceiver, filter);
ll_uploaded.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(SxgzActivity.this, XjCheckAndUploadActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("type","已检已上传");
startActivity(intent);
}
});
ll_checkedAndNoUpload.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(SxgzActivity.this, XjCheckAndUploadActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("type","已检未上传");
startActivity(intent);
}
});
ll_checked.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(SxgzActivity.this, XjCheckAndUploadActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("type","已检点数");
startActivity(intent);
}
});
ll_no_checked.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(SxgzActivity.this, XjCheckAndUploadActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("type","未检点数");
startActivity(intent);
}
});
}
public void initData() {
@ -263,7 +313,7 @@ public class SxgzActivity extends BaseActivity {
showLog("-------未检点数------");
showLog(GsonUtils.GsonString(noCheckList));
}
//检点数
//检点数
List<XSJJHDataBean> checkedList = DataSupport.where("checked = ? and username = ?", "1",username).find(XSJJHDataBean.class);
if(checkedList!=null&&checkedList.size()>0){
tv_checked.setText(String.valueOf(checkedList.size()));

@ -0,0 +1,167 @@
package com.rehome.dywoa.ui.activity.sbxj;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import com.rehome.dywoa.App;
import com.rehome.dywoa.Contans;
import com.rehome.dywoa.DBModel.XSJJHDataBean;
import com.rehome.dywoa.DBModel.XSJJHXZDataBean;
import com.rehome.dywoa.R;
import com.rehome.dywoa.adapter.DlbAdapter;
import com.rehome.dywoa.base.BaseActivity;
import com.rehome.dywoa.bean.DlbInfo;
import com.rehome.dywoa.bean.SetxjSbModel;
import com.rehome.dywoa.utils.GsonUtils;
import org.litepal.crud.DataSupport;
import java.util.ArrayList;
import java.util.List;
import static org.litepal.crud.DataSupport.where;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
public class XjCheckAndUploadActivity extends BaseActivity {
public static int Req = 101;
ListView lv;
private boolean isEdit = true;
private int item;
//private ArrayList<XSJJHXZDataBean> xsjjhxzDataBeanArrayList = new ArrayList<>();//工作列表
private ArrayList<XSJJHDataBean> xsjjhDataBeanArrayList = new ArrayList<>();
private List<DlbInfo> infos = new ArrayList<>();
private View headView;
private DlbAdapter adapter;
private int itemposition;
private String LX, LXResult;
private String username;
private String type;
@Override
public int getContentViewID() {
return R.layout.activity_xj_check_and_upload;
}
@Override
public void initView() {
username = App.getInstance().getUserInfo().getManid();
type = getIntent().getStringExtra("type");
String title = "";
if ("已检已上传".equals(type)) {
title = "已检已上传";
}
if ("已检未上传".equals(type)) {
title = "已检未上传";
}
if ("已检点数".equals(type)) {
title = "已检点数";
}
if ("未检点数".equals(type)) {
title = "未检点数";
}
lv = findViewById(R.id.lv);
initToolbar(title, "", new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
headView = View.inflate(context, R.layout.dlb_item, null);
headView.findViewById(R.id.head).setVisibility(View.VISIBLE);
}
@Override
public void initData() {
searchdata();
setListAdapter();
}
private void searchdata() {
if ("已检已上传".equals(type)) {
//已检已上传点数
List<XSJJHDataBean> uploadEdList = DataSupport.where("checked = ? and uploaded = ? and username = ?", "1","1",username).find(XSJJHDataBean.class);
if(uploadEdList!=null&&uploadEdList.size()>0){
showLog("-------已检已上传点数------");
showLog(GsonUtils.GsonString(uploadEdList));
}
xsjjhDataBeanArrayList.clear();
//获取当前点击的工作栏对应的点检记录列表
xsjjhDataBeanArrayList.addAll(uploadEdList);
}
if ("已检未上传".equals(type)) {
//已检未上传点数
List<XSJJHDataBean> checkedAndNoUploadList = DataSupport.where("checked = ? and uploaded = ? and username = ?", "1","0",username).find(XSJJHDataBean.class);
if(checkedAndNoUploadList!=null&&checkedAndNoUploadList.size()>0){
showLog("-------已检未上传点数------");
showLog(GsonUtils.GsonString(checkedAndNoUploadList));
}
xsjjhDataBeanArrayList.clear();
//获取当前点击的工作栏对应的点检记录列表
xsjjhDataBeanArrayList.addAll(checkedAndNoUploadList);
}
if ("已检点数".equals(type)) {
//已检点数
List<XSJJHDataBean> checkedList = DataSupport.where("checked = ? and username = ?", "1",username).find(XSJJHDataBean.class);
if(checkedList!=null&&checkedList.size()>0){
showLog("-------未检点数------");
showLog(GsonUtils.GsonString(checkedList));
}
xsjjhDataBeanArrayList.clear();
//获取当前点击的工作栏对应的点检记录列表
xsjjhDataBeanArrayList.addAll(checkedList);
}
if ("未检点数".equals(type)) {
//未检点数
List<XSJJHDataBean> noCheckList = DataSupport.where("checked = ? and username = ?", "0",username).find(XSJJHDataBean.class);
if(noCheckList!=null&&noCheckList.size()>0){
showLog("-------未检点数------");
showLog(GsonUtils.GsonString(noCheckList));
}
xsjjhDataBeanArrayList.clear();
//获取当前点击的工作栏对应的点检记录列表
xsjjhDataBeanArrayList.addAll(noCheckList);
}
}
private void setListAdapter() {
for (XSJJHDataBean rw : xsjjhDataBeanArrayList) {
DlbInfo info = new DlbInfo();
info.setSbid(rw.getSbid());
info.setCjjg(rw.getCJJG());
//info.setDian(rw.getSb() + "--" + rw.getBJMC());
//info.setDian(rw.getJhmc() + "--" + rw.getQymc() + "--" + rw.getSb());
info.setDian(rw.getSb());
info.setStatu(rw.isChecked());
infos.add(info);
}
adapter = new DlbAdapter(context, infos);
lv.addHeaderView(headView, null, false);
lv.setAdapter(adapter);
}
}

@ -10,7 +10,7 @@ public class DataPassUtils {
try {
//格式化日期的对象(转化成习惯的时间格式)
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = sdFormat.parse("2024年10月20日");
Date date = sdFormat.parse("2025年01月20日");
Calendar calendarOne = Calendar.getInstance();
calendarOne.setTime(date);
if (!Calendar.getInstance().after(calendarOne)) {
@ -27,7 +27,7 @@ public class DataPassUtils {
try {
//格式化日期的对象(转化成习惯的时间格式)
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = sdFormat.parse("2024年10月20日");
Date date = sdFormat.parse("2025年01月20日");
Calendar calendarOne = Calendar.getInstance();
calendarOne.setTime(date);
if (!Calendar.getInstance().after(calendarOne)) {
@ -43,7 +43,7 @@ public class DataPassUtils {
try {
//格式化日期的对象(转化成习惯的时间格式)
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = sdFormat.parse("2024年10月20日");
Date date = sdFormat.parse("2025年01月20日");
Calendar calendarOne = Calendar.getInstance();
calendarOne.setTime(date);
if (!Calendar.getInstance().after(calendarOne)) {
@ -58,7 +58,7 @@ public class DataPassUtils {
try {
//格式化日期的对象(转化成习惯的时间格式)
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = sdFormat.parse("2024年10月20日");
Date date = sdFormat.parse("2025年01月20日");
Calendar calendarOne = Calendar.getInstance();
calendarOne.setTime(date);
if (!Calendar.getInstance().after(calendarOne)) {

@ -160,6 +160,7 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="60dp"
android:visibility="invisible"
android:gravity="center"
android:text="承包商找回密码"
android:textColor="@color/blue"

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_yul"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ui.activity.sbxj.XjCheckAndUploadActivity">
<include layout="@layout/layout_base"/>
<ListView
android:id="@+id/lv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15px"
android:divider="#00000000"
android:dividerHeight="0px" />
</LinearLayout>

@ -79,6 +79,7 @@
android:text="0"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_no_checked"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="8"
@ -108,6 +109,7 @@
android:background="#dddddd"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_checked"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="8"
@ -130,7 +132,7 @@
android:text="0"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_nocheck"
android:id="@+id/ll_uploaded"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="8"
@ -153,6 +155,7 @@
android:text="0"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_checkedAndNoUpload"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="8"

Loading…
Cancel
Save