1.1.0发布

master
hwf453 1 year ago
parent f8d3120283
commit 2f9fa55238

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

@ -257,6 +257,11 @@
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="false"
android:launchMode="singleInstance" />
<activity
android:name=".ui.activity.KksSearchGongDanActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="false"
android:launchMode="singleInstance" />
<provider
android:name="androidx.core.content.FileProvider"

@ -54,7 +54,7 @@ public class Contans {
public final static String NETWORK_CHECK_TYPE = "NETWORK_CHECK_TYPE";
public static String APPLOGINRSA = "api/login/appLdapLogin";
public static String APPLOGINRSA = "api/app/login/appLdapLogin";
public static String LOGIN = "AppLogin/GetData.aspx";
public static String LOGINNFC = "AppLogin/userLogin.ashx";
public static String CHECK_UPDATA_APK = "ApkUpdate/GetData.aspx";
@ -69,13 +69,15 @@ public class Contans {
//连接服务器测试看客户端是否能连接到服务器如果能就响应个1
public static final String check_server_connect = "api/app/login/checkServerConnect";
//获取当天点检任务执行情况
public static final String CURRENT_DAY_DJ_FINISH_TJ = "api/pointTask/getTaskRunningState";
public static final String CURRENT_DAY_DJ_FINISH_TJ = "api/app/pointTask/getTaskRunningState";
//点检综合统计信息
public static final String ZHTJ_DJ_FINISH_TJ = "api/pointTask/getPointTaskStatsComp";
public static final String ZHTJ_DJ_FINISH_TJ = "api/app/pointTask/getPointTaskStatsComp";
//历史点检记录
public static final String HISTORY_DJ_FINISH_TJ = "api/pointTask/getPointTaskHistoryState";
public static final String HISTORY_DJ_FINISH_TJ = "api/app/pointTask/getPointTaskHistoryState";
//获取KKS码信息
public static final String GET_KKS_INFO = "api/pointTask/getDeviceInfo";
public static final String GET_KKS_INFO = "api/app/pointTask/getDeviceInfo";
//KKS码查工单消缺
public static final String KKS_SEARCH_GDXQ = "api/app/pointTask/getDefectWorkOrderInfo";
public static String YHPC = "AJH/AJH_YHPCSC.ashx";//隐患排查
@ -100,13 +102,13 @@ public class Contans {
//-----------------------点检--------------------------//
//获取点检列表数据
public static String DJJHLIST = "api/pointTask/getPlanTask";
public static String DJJHDLB = "api/pointTask/getUploadTaskList";
public static String DJJHLIST = "api/app/pointTask/getPlanTask";
public static String DJJHDLB = "api/app/pointTask/getUploadTaskList";
//待办
public static final String WAIT_FOR_TO_DO_WORK = "api/pointTask/getTaskToDo";
public static final String WAIT_FOR_TO_DO_WORK = "api/app/pointTask/getTaskToDo";
//点检数据下载
public static String DJJHXCJSSC = "DJGL/DJGL_XCJS.ashx";//ms:描述 fileps:文件 poinnum jhid
public static String DJJHSC = "api/pointTask/uploadTaskList";//json字符串
public static String DJJHSC = "api/app/pointTask/uploadTaskList";//json字符串
public static String DJJHQXGD = "DJGL/DJGL_QXGD.ashx";//json字符串
public final static int DLB = 1;

@ -0,0 +1,47 @@
package com.rehome.dywoa.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import com.rehome.dywoa.base.BaseViewBindingAdapter
import com.rehome.dywoa.bean.DefectWorkOrderInfo
import com.rehome.dywoa.databinding.AdapterKksSearchGongDanBinding
class KksSearchGongDanAdapter(var context: Context,
var data: MutableList<DefectWorkOrderInfo.Row>) : BaseViewBindingAdapter<AdapterKksSearchGongDanBinding>(context) {
override fun getCount(): Int {
return data.count()
}
override fun getItem(position: Int): Any {
return data[position]
}
override fun getItemId(position: Int): Long {
return position.toLong()
}
override fun getBinding(
inflater: LayoutInflater,
parent: ViewGroup?
) = AdapterKksSearchGongDanBinding.inflate(inflater, parent, false)
override fun handleData(position: Int, binding: AdapterKksSearchGongDanBinding) {
val item: DefectWorkOrderInfo.Row = data[position]
binding.tvGongdanDesc.text = item.workOrderDesc
binding.tvKksCode.text = item.kksCode
binding.tvGongdanCode.text = item.workOrderCode
binding.tvGzqx.text = item.symptomsDesc
binding.tvQxyy.text = item.reason
binding.tvZy.text = item.speciality
binding.tvBgr.text = item.reporter
binding.tvBgsj.text = item.bgrqortDate
}
}
//

@ -0,0 +1,101 @@
package com.rehome.dywoa.bean;
import java.util.List;
public class DefectWorkOrderInfo extends BaseListBean {
private List<Row> Rows;
public List<Row> getRows() {
return Rows;
}
public void setRows(List<Row> rows) {
Rows = rows;
}
public static class Row {
private String id;
private String kksCode;
private String workOrderCode;
private String workOrderDesc;
private String symptomsDesc;
private String reason;
private String speciality;
private String reporter;
private String bgrqortDate;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getKksCode() {
return kksCode;
}
public void setKksCode(String kksCode) {
this.kksCode = kksCode;
}
public String getWorkOrderCode() {
return workOrderCode;
}
public void setWorkOrderCode(String workOrderCode) {
this.workOrderCode = workOrderCode;
}
public String getWorkOrderDesc() {
return workOrderDesc;
}
public void setWorkOrderDesc(String workOrderDesc) {
this.workOrderDesc = workOrderDesc;
}
public String getSymptomsDesc() {
return symptomsDesc;
}
public void setSymptomsDesc(String symptomsDesc) {
this.symptomsDesc = symptomsDesc;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public String getSpeciality() {
return speciality;
}
public void setSpeciality(String speciality) {
this.speciality = speciality;
}
public String getReporter() {
return reporter;
}
public void setReporter(String reporter) {
this.reporter = reporter;
}
public String getBgrqortDate() {
return bgrqortDate;
}
public void setBgrqortDate(String bgrqortDate) {
this.bgrqortDate = bgrqortDate;
}
}
}

@ -18,14 +18,18 @@ import com.rehome.dywoa.databinding.ActivityKksSearchBinding
import com.rehome.dywoa.utils.GsonUtils
import com.rehome.dywoa.utils.HttpListener
import com.rehome.dywoa.utils.NohttpUtils
import com.rehome.dywoa.weiget.DatePickDialog
import com.yolanda.nohttp.NoHttp
import com.yolanda.nohttp.RequestMethod
import com.yolanda.nohttp.rest.Response
import java.util.Calendar
class KksSearchActivity : BaseActivityOaToolbarViewBinding<ActivityKksSearchBinding>() {
private val QRCODE_SCAN_CAMERA_REQUEST_CODE = 4 //扫描二維码请求摄像头权限
private var qrCodeStrSearch: String? = null
private val permission = arrayOf(
Manifest.permission.CAMERA,
Manifest.permission.WRITE_EXTERNAL_STORAGE
@ -44,6 +48,15 @@ class KksSearchActivity : BaseActivityOaToolbarViewBinding<ActivityKksSearchBind
launcherResultQRCode = createQRCodeActivityResultLauncher()
binding.tvNodata.visibility=View.VISIBLE
binding.llTop.visibility=View.GONE
binding.llGongDan.setOnClickListener(View.OnClickListener { view: View? ->
if(qrCodeStrSearch!=null){
val intent = Intent(context, KksSearchGongDanActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
intent.putExtra("kks",qrCodeStrSearch)
startActivity(intent)
}
})
}
override fun initData() {
@ -147,7 +160,7 @@ class KksSearchActivity : BaseActivityOaToolbarViewBinding<ActivityKksSearchBind
binding.tvDeviceDesc.text = row.equipmentDesc
binding.tvDeviceFl.text = row.clasessCode
binding.tvParentCode.text = row.parentCode
qrCodeStrSearch = row.kksCode
}else {
binding.tvNodata.visibility=View.VISIBLE
binding.llTop.visibility=View.GONE

@ -0,0 +1,135 @@
package com.rehome.dywoa.ui.activity
import android.os.Bundle
import android.util.Log
import android.view.View
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.rehome.dywoa.Contans
import com.rehome.dywoa.R
import com.rehome.dywoa.adapter.HistoryDjAdapter
import com.rehome.dywoa.adapter.KksSearchGongDanAdapter
import com.rehome.dywoa.base.BaseActivityOaToolbarViewBinding
import com.rehome.dywoa.bean.DefectWorkOrderInfo
import com.rehome.dywoa.bean.HistoryDjBean
import com.rehome.dywoa.databinding.ActivityKksSearchGongDanBinding
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.weiget.OAToolbar
import com.yolanda.nohttp.NoHttp
import com.yolanda.nohttp.RequestMethod
import com.yolanda.nohttp.rest.Response
class KksSearchGongDanActivity : BaseActivityOaToolbarViewBinding<ActivityKksSearchGongDanBinding>() {
private lateinit var adapter: KksSearchGongDanAdapter
private var datas: MutableList<DefectWorkOrderInfo.Row> = mutableListOf()
private var kks:String? = null
override fun getViewBinding() = ActivityKksSearchGongDanBinding.inflate(layoutInflater)
override fun getToolbar() = binding.toolbarView.toolbar
override fun initView() {
initToolbar("工单消缺", "") {
}
adapter = KksSearchGongDanAdapter(context, datas)
binding.lv.adapter = adapter
binding.tvNodata.visibility= View.VISIBLE
binding.lv.visibility= View.GONE
kks = intent.getStringExtra("kks")
}
override fun initData() {
if(kks!=null){
//检查服务器连接状态
checkServerConnectStatus()
}else{
showToast("kks码不能为空")
}
}
//检查服务器连接状态
private fun checkServerConnectStatus() {
var param = HashMap<String,String>()
param["login"] = "dywoa";
val json = GsonUtils.GsonString(param)
val url = Contans.IP + Contans.check_server_connect
Log.i("app",url)
Log.i("app",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")
//获取数据
getListData()
}
}
}
override fun onFailed(what: Int, response: Response<String?>?) {
showLog("connect server onFailed")
showToast("无法连接到服务器,请检查网络环境")
}
})
}
fun getListData() {
var param = HashMap<String,String>()
param["txm"] = kks!!
val json = GsonUtils.GsonString(param)
val url: String = Contans.IP + Contans.KKS_SEARCH_GDXQ
val request = NoHttp.createStringRequest(url, RequestMethod.POST)
request.setDefineRequestBodyForJson(json)
NohttpUtils.getInstance().add(this, 0, request, object : HttpListener<String> {
override fun onSucceed(what: Int, response: Response<String>?) {
if (response != null) {
val result = response.get()
showLog(result)
val bean = GsonUtils.GsonToBean(result, DefectWorkOrderInfo::class.java)
if (bean != null && bean.total != 0) {
if (bean.rows != null && bean.rows.size>0) {
datas.clear()
datas.addAll(bean.rows)
adapter.notifyDataSetChanged()
binding.tvNodata.visibility= View.GONE
binding.lv.visibility=View.VISIBLE
}else {
datas.clear()
adapter.notifyDataSetChanged()
binding.tvNodata.visibility= View.VISIBLE
binding.lv.visibility=View.GONE
}
}
}
}
override fun onFailed(what: Int, response: Response<String>?) {
}
}, true, true, "正在加载数据...")
}
}

@ -10,7 +10,7 @@ public class DataPassUtils {
try {
//格式化日期的对象(转化成习惯的时间格式)
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = sdFormat.parse("2024年07月24日");
Date date = sdFormat.parse("2024年08月24日");
Calendar calendarOne = Calendar.getInstance();
calendarOne.setTime(date);
if (!Calendar.getInstance().after(calendarOne)) {
@ -25,7 +25,7 @@ public class DataPassUtils {
try {
//格式化日期的对象(转化成习惯的时间格式)
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = sdFormat.parse("2024年07月23日");
Date date = sdFormat.parse("2024年08月23日");
Calendar calendarOne = Calendar.getInstance();
calendarOne.setTime(date);
if (!Calendar.getInstance().after(calendarOne)) {
@ -41,7 +41,7 @@ public class DataPassUtils {
try {
//格式化日期的对象(转化成习惯的时间格式)
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = sdFormat.parse("2024年07月26日");
Date date = sdFormat.parse("2024年08月22日");
Calendar calendarOne = Calendar.getInstance();
calendarOne.setTime(date);
if (!Calendar.getInstance().after(calendarOne)) {

@ -1,25 +1,20 @@
package com.rehome.dywoa.utils;
import android.app.Activity;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.rehome.dywoa.App;
import com.rehome.dywoa.BuildConfig;
import com.rehome.dywoa.Contans;
import com.rehome.dywoa.R;
import com.yolanda.nohttp.NoHttp;
import com.yolanda.nohttp.download.DownloadQueue;
import com.yolanda.nohttp.rest.Request;
import com.yolanda.nohttp.rest.RequestQueue;
import java.security.KeyStore;
import java.security.SecureRandom;
import java.security.cert.CertificateFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManagerFactory;

@ -191,7 +191,6 @@
style="@style/logItemStyle">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/selector_list_item"
@ -213,6 +212,40 @@
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="15px" />
<LinearLayout
android:id="@+id/ll_gongDan"
android:layout_width="match_parent"
android:gravity="center_vertical"
style="@style/logItemStyle">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/selector_list_item"
android:gravity="center_vertical"
android:padding="20px"
android:text="工单消缺"
android:textColor="@color/black"
style="@style/logItemTextStyle" />
<TextView
android:id="@+id/tv_toGongDan"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="left|center_vertical"
android:paddingEnd="10dp"
android:drawableRight="@drawable/packup"
android:drawablePadding="20px"
android:text=""
android:background="@drawable/selector_list_item"
android:textColor="@color/black"
android:textSize="18sp"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="15px" />

@ -0,0 +1,37 @@
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#cccccc"
tools:context=".ui.activity.KksSearchGongDanActivity">
<include
android:id="@+id/toolbarView"
android:visibility="visible"
layout="@layout/layout_base" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<ListView
android:id="@+id/lv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:divider="#00000000"
android:dividerHeight="10dp"/>
<TextView
android:id="@+id/tv_nodata"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="暂无数据" />
</FrameLayout>
</LinearLayout>

@ -0,0 +1,215 @@
<?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/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="vertical"
tools:ignore="UselessParent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:ignore="UselessParent">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="工单描述:" />
<TextView
android:id="@+id/tv_gongdan_desc"
style="@style/dagerDetailRightStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="缺陷原因及处理:" />
<TextView
android:id="@+id/tv_qxyy"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="kks编码:" />
<TextView
android:id="@+id/tv_kks_code"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="漏检点数:" />
<TextView
android:id="@+id/tv_gongdan_code"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="故障现象:" />
<TextView
android:id="@+id/tv_gzqx"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="报告时间:" />
<TextView
android:id="@+id/tv_bgsj"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:textSize="12sp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="专业:" />
<TextView
android:id="@+id/tv_zy"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="报告人:" />
<TextView
android:id="@+id/tv_bgr"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>

@ -180,11 +180,13 @@
<style name="dagerDetailLeftStyle">
<item name="android:gravity">center</item>
<item name="android:textSize">13sp</item>
<item name="android:textColor">@color/black</item>
</style>
<style name="dagerDetailRightStyle">
<item name="android:layout_marginStart">5dp</item>
<item name="android:gravity">center|start</item>
<item name="android:textSize">13sp</item>
<item name="android:textColor">@color/black</item>
</style>
</resources>

Loading…
Cancel
Save