设备列表扫码获取数据完成

master
hwf453 1 year ago
parent 46e54cda3d
commit 3fec452e95

@ -361,6 +361,12 @@
android:launchMode="singleInstance" android:launchMode="singleInstance"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustPan" /> android:windowSoftInputMode="stateHidden|adjustPan" />
<activity
android:name=".activity.zhgd.DeviceThreeLevelActivity"
android:exported="false"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustPan" />
<service <service
android:name=".bleUtil.BluetoothLeService" android:name=".bleUtil.BluetoothLeService"

@ -177,8 +177,8 @@ public class LoginActivity extends BaseActivity {
} }
if (BuildConfig.LOG_ERROR) { if (BuildConfig.LOG_ERROR) {
etUse.setText("123456"); // etUse.setText("123456");
etPwd.setText("123456"); // etPwd.setText("123456");
// etUse.setText("161619"); // etUse.setText("161619");
// etPwd.setText("161619"); // etPwd.setText("161619");

@ -24,6 +24,7 @@ import com.bjzc.bhzhgd.DBModel.XSJJHDataBean
import com.bjzc.bhzhgd.DBModel.XSJJHXZDataBean import com.bjzc.bhzhgd.DBModel.XSJJHXZDataBean
import com.bjzc.bhzhgd.R import com.bjzc.bhzhgd.R
import com.bjzc.bhzhgd.adapter.CommonAdapter import com.bjzc.bhzhgd.adapter.CommonAdapter
import com.bjzc.bhzhgd.adapter.DeviceTwoLevelAdapter
import com.bjzc.bhzhgd.base.MipcaActivityCapture import com.bjzc.bhzhgd.base.MipcaActivityCapture
import com.bjzc.bhzhgd.bean.XsRequestInfo import com.bjzc.bhzhgd.bean.XsRequestInfo
import com.bjzc.bhzhgd.contans.Contans import com.bjzc.bhzhgd.contans.Contans
@ -49,37 +50,33 @@ import com.bjzc.bhzhgd.utils.NoProgresshttpUtils
class DeviceListActivity : BaseActivityOaToolbarViewBinding<ActivityDeviceListBinding>() { class DeviceListActivity : BaseActivityOaToolbarViewBinding<ActivityDeviceListBinding>() {
private lateinit var headView: View //private lateinit var headView: View
private lateinit var tv_djrw: TextView //private lateinit var tv_djrw: TextView
private val CAMERA_REQUEST_CODE = 3 //请求码 private val CAMERA_REQUEST_CODE = 3 //请求码
var nfcValue: String? = null var nfcValue: String? = null
private lateinit var type: String private lateinit var type: String
private lateinit var username: String private lateinit var username: String
private lateinit var launcherResult: ActivityResultLauncher<Intent?> private lateinit var launcherResult: ActivityResultLauncher<Intent?>
private val xsjjhxzDataBeanList: MutableList<XSJJHXZDataBean> = mutableListOf() private lateinit var adapter: DeviceTwoLevelAdapter
private val checkedList: MutableList<XSJJHXZDataBean> = mutableListOf() private var datas: MutableList<DeviceZhgdBean.DeviceBean> = mutableListOf()
private val noCheckeList: MutableList<XSJJHXZDataBean> = mutableListOf()
private val checkedListBA: MutableList<XSJJHXZDataBean> = mutableListOf()
private val noCheckeListBA: MutableList<XSJJHXZDataBean> = mutableListOf()
private val qybh: MutableList<String> = mutableListOf()
private val xsjjhDataBeanArrayList: ArrayList<XSJJHDataBean> = ArrayList()//点检记录列表
// DeviceTwoLevelAdapter // DeviceTwoLevelAdapter
// DeviceThreeLevelAdapter // DeviceThreeLevelAdapter
//adapter_device_two_level //adapter_device_two_level
//adapter_device_three_level //adapter_device_three_level
private lateinit var adapter: CommonAdapter<XSJJHXZDataBean>
override fun getViewBinding() = ActivityDeviceListBinding.inflate(layoutInflater) override fun getViewBinding() = ActivityDeviceListBinding.inflate(layoutInflater)
override fun getToolbar() = binding.toolbarView.toolbar override fun getToolbar() = binding.toolbarView.toolbar
override fun initView() { override fun initView() {
initToolbar("巡检工作(请使用NFC)", "扫码", {finish() }, { initToolbar("二级电箱", "扫码", {finish() }, {
//动态权限申请 //动态权限申请
//动态权限申请 //动态权限申请
if (ContextCompat.checkSelfPermission( if (ContextCompat.checkSelfPermission(
@ -98,6 +95,8 @@ class DeviceListActivity : BaseActivityOaToolbarViewBinding<ActivityDeviceListBi
} }
}) })
binding.toolbarView.toolbar.ivLeft.visibility=View.GONE
launcherResult = launcherResult =
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
if (it.resultCode == RESULT_OK) { if (it.resultCode == RESULT_OK) {
@ -109,40 +108,34 @@ class DeviceListActivity : BaseActivityOaToolbarViewBinding<ActivityDeviceListBi
} }
} }
val intent = intent
type = "BA"
//intent.getStringExtra("type")!!
username = SPUtils.get(context, Contans.USERID, "") as String username = SPUtils.get(context, Contans.USERID, "") as String
binding.lv.emptyView = binding.tvNodata binding.lv.emptyView = binding.tvNodata
headView = View.inflate(this, R.layout.xsgz_item, null)
headView.findViewById<View>(R.id.head).visibility = View.VISIBLE
tv_djrw = headView.findViewById(R.id.tv_djrw)
if (type == "BA") {
tv_djrw.text = "已检/未检"
}
//NFC初始化
initNFC()
adapter = DeviceTwoLevelAdapter(context, datas)
binding.lv.adapter = adapter
binding.tvNodata.visibility= View.VISIBLE
binding.lv.visibility=View.GONE
binding.lv.onItemClickListener =
AdapterView.OnItemClickListener { _, _, position, _ ->
val item = datas[position]
val data = item.data
if(data!=null&&data.size>0){
val intent = Intent(context, DeviceThreeLevelActivity::class.java)
//intent.putExtra("data", GsonUtils.GsonString(data))
intent.putParcelableArrayListExtra("data", ArrayList(data))
startActivity(intent)
}
}
} }
override fun initData() { override fun initData() {
getDataInSqlite()
setListData()
}
private fun reloadData() {
getDataInSqlite()
adapter.notifyDataSetChanged()
} }
override fun handleNfc(result: String) {
super.handleNfc(result)
//Log.i("app", "handleNfc")
handleNfcCheck(result)
//handleNfcCheck("048E3FF2257380")
//handleNfcCheck("04B934F2257380")
}
override fun onRequestPermissionsResult( override fun onRequestPermissionsResult(
requestCode: Int, requestCode: Int,
@ -166,91 +159,6 @@ class DeviceListActivity : BaseActivityOaToolbarViewBinding<ActivityDeviceListBi
launcherResult.launch(intent) launcherResult.launch(intent)
} }
//加载数据库中已经下载的计划
private fun getDataInSqlite() {
xsjjhxzDataBeanList.clear()
checkedListBA.clear()
noCheckeListBA.clear()
checkedList.clear()
noCheckeList.clear()
val planTemp = DataSupport.where("mk = ? and username = ?", type, username).find(
XSJJHXZDataBean::class.java
)
val planTemp1: MutableList<XSJJHXZDataBean> = this.removeDuplicate(planTemp)
xsjjhxzDataBeanList.addAll(planTemp1)
var totalDian:Int = 0
var checkedCountAll = 0
Log.i("app", xsjjhxzDataBeanList.size.toString())
for (i in xsjjhxzDataBeanList.indices) {
val item = xsjjhxzDataBeanList[i]
if (type == "BA") {
if (item.isBAChecked) {
checkedListBA.add(item)
} else {
noCheckeListBA.add(item)
}
}else if (type == "XF") {
var checkedCount = 0
val xsjjhdatabean = DataSupport.where(
"qybh = ? and mk = ? and username = ?",
item.qybh,
type,
username
).find(
XSJJHDataBean::class.java
)
for (j in xsjjhdatabean.indices) {
totalDian++;
if (xsjjhdatabean[j].isChecked) {
checkedCount++
checkedCountAll++
checkedList.add(item)
}
}
} else {
var checkedCount = 0
val xsjjhdatabean = DataSupport.where(
"qybh = ? and mk = ? and username = ?",
item.qybh,
type,
username
).find(
XSJJHDataBean::class.java
)
for (j in xsjjhdatabean.indices) {
if (xsjjhdatabean[j].isChecked) {
checkedCount++
}
}
val a = checkedCount
val b = xsjjhdatabean.size
if (a == b) {
checkedList.add(item)
} else {
noCheckeList.add(item)
}
}
}
binding.totalPoint.text = xsjjhxzDataBeanList.size.toString()
if (type == "BA") {
binding.totalNoCheck.text = noCheckeListBA.size.toString()
binding.totalChecked.text = checkedListBA.size.toString()
}else if (type == "XF") {
binding.totalPoint.text = totalDian.toString()
if(checkedList.size==totalDian){
binding.totalNoCheck.text = "0"
}else{
binding.totalNoCheck.text = (totalDian-checkedList.size).toString()
}
binding.totalChecked.text = checkedList.size.toString()
} else {
binding.totalNoCheck.text = noCheckeList.size.toString()
binding.totalChecked.text = checkedList.size.toString()
}
}
private fun removeDuplicate(list: MutableList<XSJJHXZDataBean>): MutableList<XSJJHXZDataBean> { private fun removeDuplicate(list: MutableList<XSJJHXZDataBean>): MutableList<XSJJHXZDataBean> {
for (i in 0 until list.size - 1) { for (i in 0 until list.size - 1) {
for (j in list.size - 1 downTo i + 1) { for (j in list.size - 1 downTo i + 1) {
@ -262,79 +170,6 @@ class DeviceListActivity : BaseActivityOaToolbarViewBinding<ActivityDeviceListBi
return list return list
} }
private fun setListData() {
adapter = object :
CommonAdapter<XSJJHXZDataBean>(context, R.layout.xsgz_item, xsjjhxzDataBeanList) {
protected override fun convert(
viewHolder: ViewHolder,
item: XSJJHXZDataBean,
position: Int
) {
if (type == "BA") {
viewHolder.setText(R.id.tv_xh, (position + 1).toString())
viewHolder.setText(R.id.tv_qymc, item.qymc)
if (item.isBAChecked) {
if (TextUtils.isEmpty(item.fxnr)) {
viewHolder.setText(R.id.tv_djrw, "已检")
} else {
viewHolder.setText(R.id.tv_djrw, "已检(现场记事)")
}
viewHolder.setTextColor(
R.id.tv_djrw,
Color.parseColor("#00CD00")
) //已经检查完成绿色
} else {
viewHolder.setText(R.id.tv_djrw, "未检")
viewHolder.setTextColor(
R.id.tv_djrw,
Color.parseColor("#FF0000")
) //未检查完成红色
}
} else {
var checkedCount = 0
val xsjjhdatabean = DataSupport.where(
"qybh = ? and mk = ? and username = ?",
item.qybh,
type,
username
).find(
XSJJHDataBean::class.java
)
for (i in xsjjhdatabean.indices) {
if (xsjjhdatabean[i].isChecked) {
checkedCount++
}
}
viewHolder.setText(R.id.tv_xh, (position + 1).toString())
viewHolder.setText(R.id.tv_qymc, item.qymc)
viewHolder.setText(
R.id.tv_djrw,
checkedCount.toString() + "/" + xsjjhdatabean.size
)
val a = checkedCount
val b = xsjjhdatabean.size
if (a == b) {
viewHolder.setTextColor(
R.id.tv_djrw,
Color.parseColor("#00CD00")
) //已经检查完成绿色
} else {
viewHolder.setTextColor(
R.id.tv_djrw,
Color.parseColor("#FF0000")
) //未检查完成红色
}
}
}
}
binding.lv.addHeaderView(headView, null, false)
binding.lv.adapter = adapter
binding.lv.onItemClickListener =
AdapterView.OnItemClickListener { adapterView: AdapterView<*>?, view: View?, postion: Int, l: Long ->
showToast("click")
}
}
//处理NFC的数据 //处理NFC的数据
private fun handleNfcCheck(result: String) { private fun handleNfcCheck(result: String) {
Log.i("app", "handleNfcCheck") Log.i("app", "handleNfcCheck")
@ -365,9 +200,21 @@ class DeviceListActivity : BaseActivityOaToolbarViewBinding<ActivityDeviceListBi
result, result,
DeviceZhgdBean::class.java DeviceZhgdBean::class.java
) )
if (bean.code == "1") { if (bean.state == 1) {
//showToast("获取数据成功")
showToast("获取数据成功") if (bean.data != null && bean.data.size>0) {
datas.clear()
datas.addAll(bean.data)
adapter.notifyDataSetChanged()
binding.tvNodata.visibility= View.GONE
binding.lv.visibility=View.VISIBLE
}else {
showToast("获取数据失败")
datas.clear()
adapter.notifyDataSetChanged()
binding.tvNodata.visibility= View.VISIBLE
binding.lv.visibility=View.GONE
}
} }
} }
@ -388,12 +235,9 @@ class DeviceListActivity : BaseActivityOaToolbarViewBinding<ActivityDeviceListBi
override fun onRestart() { override fun onRestart() {
super.onRestart() super.onRestart()
getDataInSqlite()
adapter.notifyDataSetChanged()
} }
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
nfcValue = null
} }
} }

@ -0,0 +1,67 @@
package com.bjzc.bhzhgd.activity.zhgd
import android.Manifest
import android.content.pm.PackageManager
import android.os.Bundle
import android.text.TextUtils
import android.view.View
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.bjzc.bhzhgd.R
import com.bjzc.bhzhgd.adapter.DeviceThreeLevelAdapter
import com.bjzc.bhzhgd.adapter.DeviceTwoLevelAdapter
import com.bjzc.bhzhgd.bean.DeviceZhgdBean
import com.bjzc.bhzhgd.databinding.ActivityDeviceListBinding
import com.bjzc.bhzhgd.databinding.ActivityDeviceThreeLevelBinding
import com.bjzc.bhzhgd.utils.GsonUtils
import com.bjzc.bhzhgd.utils.OAToolbar
import com.rehome.scbaxj.base.BaseActivityOaToolbarViewBinding
class DeviceThreeLevelActivity :
BaseActivityOaToolbarViewBinding<ActivityDeviceThreeLevelBinding>() {
private var datas: MutableList<DeviceZhgdBean.DataBean> = mutableListOf()
private lateinit var adapter: DeviceThreeLevelAdapter
override fun getViewBinding() = ActivityDeviceThreeLevelBinding.inflate(layoutInflater)
override fun getToolbar() = binding.toolbarView.toolbar
override fun initView() {
initToolbar("三级电箱", "", {finish() }, {
})
val dataList = intent.getParcelableArrayListExtra<DeviceZhgdBean.DataBean>("data")
if (dataList != null && dataList.size > 0) {
showLog("data is not null")
datas.clear()
datas.addAll(dataList)
} else {
showLog("data is null")
}
binding.lv.emptyView = binding.tvNodata
adapter = DeviceThreeLevelAdapter(context, datas)
binding.lv.adapter = adapter
if (datas != null && datas.size > 0) {
binding.tvNodata.visibility = View.GONE
binding.lv.visibility = View.VISIBLE
} else {
binding.tvNodata.visibility = View.VISIBLE
binding.lv.visibility = View.GONE
}
}
override fun initData() {
}
}

@ -5,10 +5,11 @@ import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import com.bjzc.bhzhgd.base.BaseAdapterViewBinding import com.bjzc.bhzhgd.base.BaseAdapterViewBinding
import com.bjzc.bhzhgd.bean.DeviceZhgdBean import com.bjzc.bhzhgd.bean.DeviceZhgdBean
import com.bjzc.bhzhgd.databinding.AdapterDeviceThreeLevelBinding
import com.bjzc.bhzhgd.databinding.AdapterDeviceTwoLevelBinding import com.bjzc.bhzhgd.databinding.AdapterDeviceTwoLevelBinding
class DeviceThreeLevelAdapter(var context: Context, class DeviceThreeLevelAdapter(var context: Context,
var data: MutableList<DeviceZhgdBean.DeviceBean>) : BaseAdapterViewBinding<AdapterDeviceTwoLevelBinding>(context) { var data: MutableList<DeviceZhgdBean.DataBean>) : BaseAdapterViewBinding<AdapterDeviceThreeLevelBinding>(context) {
override fun getCount(): Int { override fun getCount(): Int {
return data.count() return data.count()
} }
@ -24,16 +25,23 @@ class DeviceThreeLevelAdapter(var context: Context,
override fun getBinding( override fun getBinding(
inflater: LayoutInflater, inflater: LayoutInflater,
parent: ViewGroup? parent: ViewGroup?
) = AdapterDeviceTwoLevelBinding.inflate(inflater, parent, false) ) = AdapterDeviceThreeLevelBinding.inflate(inflater, parent, false)
override fun handleData(position: Int, binding: AdapterDeviceTwoLevelBinding) { override fun handleData(position: Int, binding: AdapterDeviceThreeLevelBinding) {
val item: DeviceZhgdBean.DeviceBean = data[position] val item: DeviceZhgdBean.DataBean = data[position]
// binding.tvJhmc.text = item.jhmc binding.tvGsmc.text = item.gsmc
// binding.tvWjds.text = item.wjds binding.tvMc.text = item.mc
// binding.tvYjds.text = item.yjds binding.tvSl.text = item.sl
// binding.tvRate.text = item.rate binding.tvRl.text = item.rl
// binding.tvZy.text = item.zymc binding.tvXs.text = item.xs
// binding.tvLog.text = item.rzqk binding.tvGl.text = item.gl
binding.tvDy.text = item.dy
binding.tvKzl.text = item.kzl
binding.tvZrl.text = item.zrl
binding.tvBz.text = item.bz
binding.tvZrr.text = item.zrr
binding.tvYdsbdxbh.text = item.ydsbdxbh
binding.tvSjhm.text = item.sjhm
} }

@ -1,4 +1,44 @@
package com.bjzc.bhzhgd.adapter package com.bjzc.bhzhgd.adapter
class DeviceTwoLevelAdapter { import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import com.bjzc.bhzhgd.base.BaseAdapterViewBinding
import com.bjzc.bhzhgd.bean.DeviceZhgdBean
import com.bjzc.bhzhgd.databinding.AdapterDeviceTwoLevelBinding
class DeviceTwoLevelAdapter(var context: Context,
var data: MutableList<DeviceZhgdBean.DeviceBean>) : BaseAdapterViewBinding<AdapterDeviceTwoLevelBinding>(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?
) = AdapterDeviceTwoLevelBinding.inflate(inflater, parent, false)
override fun handleData(position: Int, binding: AdapterDeviceTwoLevelBinding) {
val item: DeviceZhgdBean.DeviceBean = data[position]
binding.tvJs.text = item.js
binding.tvDxbh.text = item.dxbh
binding.tvMc.text = item.mc
binding.tvGl.text = item.gl
binding.tvGlJ.text = item.gL_J
binding.tvBz.text = item.bz
binding.tvNfc.text = item.nfc
binding.tvWzms.text = item.wzms
binding.tvZrrXm.text = item.zrR_XM
binding.tvZrrSjhm.text = item.zrR_SJHM
}
} }

@ -19,6 +19,7 @@ public class DeviceZhgdBean implements Parcelable {
*/ */
private String code; private String code;
private int state;
private String msg; private String msg;
private List<DeviceBean> data; private List<DeviceBean> data;
@ -30,6 +31,14 @@ public class DeviceZhgdBean implements Parcelable {
this.code = code; this.code = code;
} }
public int getState() {
return state;
}
public void setState(int state) {
this.state = state;
}
public String getMsg() { public String getMsg() {
return msg; return msg;
} }
@ -246,6 +255,7 @@ public class DeviceZhgdBean implements Parcelable {
dest.writeString(this.TJR); dest.writeString(this.TJR);
dest.writeString(this.XGR); dest.writeString(this.XGR);
dest.writeString(this.DXBH); dest.writeString(this.DXBH);
dest.writeList(this.data);
} }
public DeviceBean() { public DeviceBean() {
@ -270,6 +280,8 @@ public class DeviceZhgdBean implements Parcelable {
this.TJR = in.readString(); this.TJR = in.readString();
this.XGR = in.readString(); this.XGR = in.readString();
this.DXBH = in.readString(); this.DXBH = in.readString();
this.data = new ArrayList<DataBean>();
in.readList(this.data, DataBean.class.getClassLoader());
} }
public static final Creator<DeviceBean> CREATOR = new Creator<DeviceBean>() { public static final Creator<DeviceBean> CREATOR = new Creator<DeviceBean>() {
@ -554,6 +566,7 @@ public class DeviceZhgdBean implements Parcelable {
@Override @Override
public void writeToParcel(Parcel dest, int flags) { public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.code); dest.writeString(this.code);
dest.writeInt(this.state);
dest.writeString(this.msg); dest.writeString(this.msg);
dest.writeList(this.data); dest.writeList(this.data);
} }
@ -563,6 +576,7 @@ public class DeviceZhgdBean implements Parcelable {
protected DeviceZhgdBean(Parcel in) { protected DeviceZhgdBean(Parcel in) {
this.code = in.readString(); this.code = in.readString();
this.state = in.readInt();
this.msg = in.readString(); this.msg = in.readString();
this.data = new ArrayList<DeviceBean>(); this.data = new ArrayList<DeviceBean>();
in.readList(this.data, DeviceBean.class.getClassLoader()); in.readList(this.data, DeviceBean.class.getClassLoader());

@ -31,6 +31,10 @@ public class OAToolbar extends Toolbar {
private TextView tvRight; private TextView tvRight;
private ImageButton ivLeft; private ImageButton ivLeft;
public ImageButton getIvLeft(){
return this.ivLeft;
}
public OAToolbar(Context context) { public OAToolbar(Context context) {
super(context, null); super(context, null);
} }

@ -21,7 +21,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_margin="@dimen/px_10" android:layout_margin="@dimen/px_10"
android:divider="#00000000" android:divider="#00000000"
android:dividerHeight="0px"/> android:dividerHeight="10dp"/>
<TextView <TextView
android:id="@+id/tv_nodata" android:id="@+id/tv_nodata"

@ -0,0 +1,35 @@
<?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"
tools:context=".activity.zhgd.DeviceThreeLevelActivity">
<include
android:id="@+id/toolbarView"
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="@dimen/px_10"
android:divider="#00000000"
android:dividerHeight="10dp"/>
<TextView
android:id="@+id/tv_nodata"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="@color/viewfinder_mask"
android:gravity="center"
android:text="暂无保存数据"/>
</FrameLayout>
</LinearLayout>

@ -1,6 +1,359 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <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_width="match_parent"
android:layout_height="match_parent"> android:layout_height="wrap_content"
android:background="#cccccc"
android:orientation="horizontal">
</androidx.constraintlayout.widget.ConstraintLayout> <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"
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_gsmc"
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_mc"
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_sl"
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="设备容量(kw):" />
<TextView
android:id="@+id/tv_rl"
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_xs"
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_gl"
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_dy"
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_kzl"
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_zrl"
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_bz"
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_zrr"
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_ydsbdxbh"
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_sjhm"
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:visibility="invisible"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" />
<TextView
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>

@ -4,6 +4,7 @@
android:id="@+id/ll" android:id="@+id/ll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="#cccccc"
android:orientation="horizontal"> android:orientation="horizontal">
<LinearLayout <LinearLayout
@ -22,21 +23,50 @@
<LinearLayout <LinearLayout
style="@style/dagerListMarginTopStyle" style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle" <LinearLayout
android:layout_width="wrap_content" style="@style/dagerListMarginTopStyle"
android:layout_height="match_parent" android:layout_width="0dp"
android:text="计划名称:" /> android:layout_height="wrap_content"
android:layout_weight="1"
<TextView android:orientation="horizontal">
android:id="@+id/tv_jhmc"
style="@style/dagerDetailRightStyle" <TextView
android:layout_width="wrap_content" style="@style/dagerDetailLeftStyle"
android:layout_height="wrap_content" /> android:layout_width="wrap_content"
</LinearLayout> android:layout_height="wrap_content"
android:text="级数:" />
<TextView
android:id="@+id/tv_js"
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_dxbh"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout <LinearLayout
style="@style/dagerListMarginTopStyle" style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -54,10 +84,10 @@
style="@style/dagerDetailLeftStyle" style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="总点数:" /> android:text="电箱名称:" />
<TextView <TextView
android:id="@+id/tv_zds" android:id="@+id/tv_mc"
style="@style/dagerDetailRightStyle" style="@style/dagerDetailRightStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -74,15 +104,22 @@
style="@style/dagerDetailLeftStyle" style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="未检点数:" /> android:text="额定功率:" />
<TextView <TextView
android:id="@+id/tv_wjds" android:id="@+id/tv_gl"
style="@style/dagerDetailRightStyle" style="@style/dagerDetailRightStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1" />
</LinearLayout> </LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout <LinearLayout
style="@style/dagerListMarginTopStyle" style="@style/dagerListMarginTopStyle"
android:layout_width="0dp" android:layout_width="0dp"
@ -94,10 +131,30 @@
style="@style/dagerDetailLeftStyle" style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="已检点数:" /> android:text="接入功率:" />
<TextView <TextView
android:id="@+id/tv_yjds" android:id="@+id/tv_gl_j"
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_bz"
style="@style/dagerDetailRightStyle" style="@style/dagerDetailRightStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -110,6 +167,27 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> 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="NFC编码:" />
<TextView
android:id="@+id/tv_nfc"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout <LinearLayout
style="@style/dagerListMarginTopStyle" style="@style/dagerListMarginTopStyle"
android:layout_width="0dp" android:layout_width="0dp"
@ -121,15 +199,23 @@
style="@style/dagerDetailLeftStyle" style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="完成率:" /> android:text="位置描述:" />
<TextView <TextView
android:id="@+id/tv_rate" android:id="@+id/tv_wzms"
style="@style/dagerDetailRightStyle" style="@style/dagerDetailRightStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1" />
</LinearLayout> </LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout <LinearLayout
style="@style/dagerListMarginTopStyle" style="@style/dagerListMarginTopStyle"
android:layout_width="0dp" android:layout_width="0dp"
@ -141,10 +227,10 @@
style="@style/dagerDetailLeftStyle" style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="专业名称:" /> android:text="责任人姓名:" />
<TextView <TextView
android:id="@+id/tv_zy" android:id="@+id/tv_zrr_xm"
style="@style/dagerDetailRightStyle" style="@style/dagerDetailRightStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -161,17 +247,16 @@
style="@style/dagerDetailLeftStyle" style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="日志情况:" /> android:text="手机号码:" />
<TextView <TextView
android:id="@+id/tv_log" android:id="@+id/tv_zrr_sjhm"
style="@style/dagerDetailRightStyle" style="@style/dagerDetailRightStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

@ -20,7 +20,7 @@
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:gravity="center" android:gravity="center"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="16sp" android:textSize="24sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
@ -33,7 +33,7 @@
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
android:text="确定" android:text="确定"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" android:textSize="20sp"
android:visibility="gone" /> android:visibility="gone" />
</RelativeLayout> </RelativeLayout>
Loading…
Cancel
Save