Compare commits
10
Commits
60713255b0
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da67c4d4b2 | ||
|
|
b03a1bae8c | ||
|
|
413b36a836 | ||
|
|
201a0779bf | ||
|
|
410383563b | ||
|
|
be579ea7e4 | ||
|
|
fc77fa8f68 | ||
|
|
fa2672d6d7 | ||
|
|
87278949d1 | ||
|
|
4867c14581 |
@@ -26,6 +26,8 @@ android {
|
|||||||
arg("room.schemaLocation", "$projectDir/schemas")
|
arg("room.schemaLocation", "$projectDir/schemas")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 设置输出APK文件名格式
|
||||||
|
setProperty("archivesBaseName", "煤矿数采终端v${versionName}")
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs{
|
signingConfigs{
|
||||||
@@ -105,4 +107,7 @@ dependencies {
|
|||||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1"
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1"
|
||||||
implementation 'com.google.code.gson:gson:2.10.1'
|
implementation 'com.google.code.gson:gson:2.10.1'
|
||||||
|
|
||||||
|
implementation("org.apache.poi:poi:5.2.3")
|
||||||
|
implementation("org.apache.poi:poi-ooxml:5.2.3")
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,11 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="com.zmkg.coaloperation">
|
package="com.zmkg.coaloperation">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET " />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
|
||||||
|
tools:ignore="ScopedStorage"/>
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".MyApplication"
|
android:name=".MyApplication"
|
||||||
@@ -15,6 +19,17 @@
|
|||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
android:networkSecurityConfig="@xml/network_security_config"
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
tools:replace="android:allowBackup">
|
tools:replace="android:allowBackup">
|
||||||
|
|
||||||
|
<provider
|
||||||
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
android:authorities="${applicationId}.fileprovider"
|
||||||
|
android:exported="false"
|
||||||
|
android:grantUriPermissions="true">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
android:resource="@xml/file_paths"/>
|
||||||
|
</provider>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
@@ -31,13 +46,13 @@
|
|||||||
<activity android:name=".ui.user.activity.CacheManageActivity" />
|
<activity android:name=".ui.user.activity.CacheManageActivity" />
|
||||||
<activity android:name=".ui.user.activity.AboutUsActivity" />
|
<activity android:name=".ui.user.activity.AboutUsActivity" />
|
||||||
<activity android:name=".ui.home.activity.GeologicalActivity" />
|
<activity android:name=".ui.home.activity.GeologicalActivity" />
|
||||||
|
<activity android:name=".ui.tunneling.activity.WorkingFaceStatisticsActivity" />
|
||||||
|
<activity android:name=".ui.tunneling.activity.WorkingFaceRecordActivity" />
|
||||||
<activity android:name=".ui.tunneling.activity.WorkingFaceDetailActivity" />
|
<activity android:name=".ui.tunneling.activity.WorkingFaceDetailActivity" />
|
||||||
<activity android:name=".ui.tunneling.activity.WorkingPointActivity" />
|
<activity android:name=".ui.tunneling.activity.AddWorkingFaceRecordActivity"
|
||||||
<activity android:name=".ui.tunneling.activity.WorkingFaceDetail2Activity" />
|
|
||||||
<activity android:name=".ui.tunneling.activity.AddWorkingPointActivity"
|
|
||||||
android:windowSoftInputMode="adjustPan"/>
|
android:windowSoftInputMode="adjustPan"/>
|
||||||
<activity android:name=".ui.tunneling.activity.TunnelingActivity" />
|
<activity android:name=".ui.tunneling.activity.TunnelingActivity" />
|
||||||
<activity android:name=".ui.tunneling.activity.WorkFaceActivity"
|
<activity android:name=".ui.tunneling.activity.AddWorkingFaceActivity"
|
||||||
android:windowSoftInputMode="adjustPan" />
|
android:windowSoftInputMode="adjustPan" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -7,7 +7,8 @@ import com.chad.library.adapter.base.BaseQuickAdapter
|
|||||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
import com.zmkg.coaloperation.R
|
import com.zmkg.coaloperation.R
|
||||||
import com.zmkg.coaloperation.databinding.ListItemRockBinding
|
import com.zmkg.coaloperation.databinding.ListItemRockBinding
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelRoofLithologyEntity
|
||||||
|
import com.zmkg.coaloperation.utils.formatDecimalString
|
||||||
|
|
||||||
class TunnelRoofLithologyAdapter(var list: MutableList<TunnelRoofLithologyEntity>) :
|
class TunnelRoofLithologyAdapter(var list: MutableList<TunnelRoofLithologyEntity>) :
|
||||||
BaseQuickAdapter<TunnelRoofLithologyEntity, TunnelRoofLithologyAdapter.VH>(
|
BaseQuickAdapter<TunnelRoofLithologyEntity, TunnelRoofLithologyAdapter.VH>(
|
||||||
@@ -34,13 +35,13 @@ class TunnelRoofLithologyAdapter(var list: MutableList<TunnelRoofLithologyEntity
|
|||||||
addTextChangedListener(onTextChanged = { text, start, before, count ->
|
addTextChangedListener(onTextChanged = { text, start, before, count ->
|
||||||
item.positionStart = text.toString().trim()
|
item.positionStart = text.toString().trim()
|
||||||
})
|
})
|
||||||
setText(item.positionStart)
|
setText(item.positionStart.formatDecimalString())
|
||||||
}
|
}
|
||||||
it.tvRockEndLen.run {
|
it.tvRockEndLen.run {
|
||||||
addTextChangedListener(onTextChanged = { text, start, before, count ->
|
addTextChangedListener(onTextChanged = { text, start, before, count ->
|
||||||
item.positionEnd = text.toString().trim()
|
item.positionEnd = text.toString().trim()
|
||||||
})
|
})
|
||||||
setText(item.positionEnd)
|
setText(item.positionEnd.formatDecimalString())
|
||||||
}
|
}
|
||||||
it.tvRockType.run {
|
it.tvRockType.run {
|
||||||
addTextChangedListener(onTextChanged = { text, start, before, count ->
|
addTextChangedListener(onTextChanged = { text, start, before, count ->
|
||||||
|
|||||||
+8
-5
@@ -13,9 +13,9 @@ import com.chad.library.adapter.base.BaseQuickAdapter
|
|||||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
import com.zmkg.coaloperation.R
|
import com.zmkg.coaloperation.R
|
||||||
import com.zmkg.coaloperation.databinding.ListItemTunnelWorkingFaceBinding
|
import com.zmkg.coaloperation.databinding.ListItemTunnelWorkingFaceBinding
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
import com.zmkg.coaloperation.ui.tunneling.activity.TunnelingActivity
|
import com.zmkg.coaloperation.ui.tunneling.activity.TunnelingActivity
|
||||||
import com.zmkg.coaloperation.ui.tunneling.activity.WorkingPointActivity
|
import com.zmkg.coaloperation.ui.tunneling.activity.WorkingFaceRecordActivity
|
||||||
import com.zmkg.coaloperation.utils.ScreenUtil
|
import com.zmkg.coaloperation.utils.ScreenUtil
|
||||||
import com.zmkg.coaloperation.utils.gone
|
import com.zmkg.coaloperation.utils.gone
|
||||||
import com.zmkg.coaloperation.utils.toJsonString
|
import com.zmkg.coaloperation.utils.toJsonString
|
||||||
@@ -49,6 +49,9 @@ class TunnelWorkingFaceAdapter(var list: MutableList<TunnelWorkingFaceEntity>) :
|
|||||||
binding.llFaceRecord.let {
|
binding.llFaceRecord.let {
|
||||||
if (item.isExpandRecord) it.visible() else it.gone()
|
if (item.isExpandRecord) it.visible() else it.gone()
|
||||||
}
|
}
|
||||||
|
binding.ivFlagEdit.let {
|
||||||
|
if (item.dataState == "1") it.visible() else it.gone()
|
||||||
|
}
|
||||||
binding.ivExpandRecord.setImageResource(
|
binding.ivExpandRecord.setImageResource(
|
||||||
if (item.isExpandRecord) R.drawable.ic_arrow_down_white else R.drawable.ic_arrow_right_gray
|
if (item.isExpandRecord) R.drawable.ic_arrow_down_white else R.drawable.ic_arrow_right_gray
|
||||||
)
|
)
|
||||||
@@ -81,10 +84,10 @@ class TunnelWorkingFaceAdapter(var list: MutableList<TunnelWorkingFaceEntity>) :
|
|||||||
Log.d(TAG, "convert: ${item.records!![recordPosition].toJsonString()}")
|
Log.d(TAG, "convert: ${item.records!![recordPosition].toJsonString()}")
|
||||||
context.let { ctx ->
|
context.let { ctx ->
|
||||||
if (ctx is TunnelingActivity) {
|
if (ctx is TunnelingActivity) {
|
||||||
ctx.toActivity(WorkingPointActivity::class.java, Bundle().apply {
|
ctx.toActivity(WorkingFaceRecordActivity::class.java, Bundle().apply {
|
||||||
putString(WorkingPointActivity.FACE_NAME, item.surfaceName)
|
putString(WorkingFaceRecordActivity.FACE_NAME, item.surfaceName)
|
||||||
putParcelable(
|
putParcelable(
|
||||||
WorkingPointActivity.FACE_RECORD,
|
WorkingFaceRecordActivity.FACE_RECORD,
|
||||||
item.records!![recordPosition]
|
item.records!![recordPosition]
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
+8
-2
@@ -1,15 +1,16 @@
|
|||||||
package com.zmkg.coaloperation.adapter
|
package com.zmkg.coaloperation.adapter
|
||||||
|
|
||||||
import android.graphics.Color
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
import com.zmkg.coaloperation.R
|
import com.zmkg.coaloperation.R
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceRecordEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceRecordEntity
|
||||||
import androidx.core.graphics.toColorInt
|
import androidx.core.graphics.toColorInt
|
||||||
import com.zmkg.coaloperation.databinding.ListItemTunnelWorkingFaceRecordBinding
|
import com.zmkg.coaloperation.databinding.ListItemTunnelWorkingFaceRecordBinding
|
||||||
|
import com.zmkg.coaloperation.utils.gone
|
||||||
|
import com.zmkg.coaloperation.utils.visible
|
||||||
|
|
||||||
class TunnelWorkingFaceRecordAdapter(var list: MutableList<TunnelWorkingFaceRecordEntity>) :
|
class TunnelWorkingFaceRecordAdapter(var list: MutableList<TunnelWorkingFaceRecordEntity>) :
|
||||||
BaseQuickAdapter<TunnelWorkingFaceRecordEntity, TunnelWorkingFaceRecordAdapter.VH>(
|
BaseQuickAdapter<TunnelWorkingFaceRecordEntity, TunnelWorkingFaceRecordAdapter.VH>(
|
||||||
@@ -50,6 +51,11 @@ class TunnelWorkingFaceRecordAdapter(var list: MutableList<TunnelWorkingFaceReco
|
|||||||
it.operation.text = if (item.operationType == "1") "查看" else "操作"
|
it.operation.text = if (item.operationType == "1") "查看" else "操作"
|
||||||
it.divider.visibility =
|
it.divider.visibility =
|
||||||
if (position == list.size - 1) View.GONE else View.VISIBLE
|
if (position == list.size - 1) View.GONE else View.VISIBLE
|
||||||
|
|
||||||
|
|
||||||
|
it.ivFlagEdit.let {
|
||||||
|
if (item.dataState == "1") it.visible() else it.gone()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-15
@@ -9,21 +9,21 @@ import androidx.core.view.updateLayoutParams
|
|||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
import com.zmkg.coaloperation.R
|
import com.zmkg.coaloperation.R
|
||||||
import com.zmkg.coaloperation.bean.RockItem
|
import com.zmkg.coaloperation.bean.TunnelWorkingItem
|
||||||
import com.zmkg.coaloperation.bean.WorkingFaceItem
|
|
||||||
import com.zmkg.coaloperation.databinding.ListItemRockBinding
|
import com.zmkg.coaloperation.databinding.ListItemRockBinding
|
||||||
import com.zmkg.coaloperation.databinding.ListItemWorkingFaceBinding
|
import com.zmkg.coaloperation.databinding.ListItemTunnelWorkingItemBinding
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelRoofLithologyEntity
|
||||||
import com.zmkg.coaloperation.utils.ScreenUtil
|
import com.zmkg.coaloperation.utils.ScreenUtil
|
||||||
|
import com.zmkg.coaloperation.utils.formatDecimalString
|
||||||
|
|
||||||
class WorkingItemAdapter(data: MutableList<WorkingFaceItem>) :
|
class TunnelWorkingItemAdapter(data: MutableList<TunnelWorkingItem>) :
|
||||||
BaseQuickAdapter<WorkingFaceItem, WorkingItemAdapter.VH>(
|
BaseQuickAdapter<TunnelWorkingItem, TunnelWorkingItemAdapter.VH>(
|
||||||
R.layout.list_item_working_face,
|
R.layout.list_item_tunnel_working_item,
|
||||||
data
|
data
|
||||||
) {
|
) {
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VH {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VH {
|
||||||
val binding = ListItemWorkingFaceBinding.inflate(
|
val binding = ListItemTunnelWorkingItemBinding.inflate(
|
||||||
LayoutInflater.from(parent.context),
|
LayoutInflater.from(parent.context),
|
||||||
parent,
|
parent,
|
||||||
false
|
false
|
||||||
@@ -35,12 +35,12 @@ class WorkingItemAdapter(data: MutableList<WorkingFaceItem>) :
|
|||||||
|
|
||||||
override fun convert(
|
override fun convert(
|
||||||
holder: VH,
|
holder: VH,
|
||||||
item: WorkingFaceItem
|
item: TunnelWorkingItem
|
||||||
) {
|
) {
|
||||||
if (item.pageType == 0) {
|
if (item.pageType == 0) {
|
||||||
loadFaceData(holder.binding, item)
|
loadFaceData(holder.binding, item)
|
||||||
} else if (item.pageType == 1) {
|
} else if (item.pageType == 1) {
|
||||||
loadPointData(holder.binding, item)
|
loadRecordData(holder.binding, item)
|
||||||
}
|
}
|
||||||
val position = holder.layoutPosition
|
val position = holder.layoutPosition
|
||||||
holder.binding.divider.let {
|
holder.binding.divider.let {
|
||||||
@@ -52,7 +52,7 @@ class WorkingItemAdapter(data: MutableList<WorkingFaceItem>) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun loadPointData(binding: ListItemWorkingFaceBinding, item: WorkingFaceItem) {
|
private fun loadRecordData(binding: ListItemTunnelWorkingItemBinding, item: TunnelWorkingItem) {
|
||||||
binding.run {
|
binding.run {
|
||||||
tvItemName.text = item.name
|
tvItemName.text = item.name
|
||||||
if (item.items.isNullOrEmpty()) {
|
if (item.items.isNullOrEmpty()) {
|
||||||
@@ -73,7 +73,7 @@ class WorkingItemAdapter(data: MutableList<WorkingFaceItem>) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private fun loadFaceData(binding: ListItemWorkingFaceBinding, item: WorkingFaceItem) {
|
private fun loadFaceData(binding: ListItemTunnelWorkingItemBinding, item: TunnelWorkingItem) {
|
||||||
binding.tvItemName.let {
|
binding.tvItemName.let {
|
||||||
it.updateLayoutParams { height = ScreenUtil.dp2px(50f) }
|
it.updateLayoutParams { height = ScreenUtil.dp2px(50f) }
|
||||||
it.text = item.name
|
it.text = item.name
|
||||||
@@ -96,12 +96,12 @@ class WorkingItemAdapter(data: MutableList<WorkingFaceItem>) :
|
|||||||
tvRockStartLen.let {
|
tvRockStartLen.let {
|
||||||
it.focusable = EditText.NOT_FOCUSABLE
|
it.focusable = EditText.NOT_FOCUSABLE
|
||||||
it.setOnKeyListener(null)
|
it.setOnKeyListener(null)
|
||||||
it.setText(item.positionStart)
|
it.setText(item.positionStart.formatDecimalString())
|
||||||
}
|
}
|
||||||
tvRockEndLen.let {
|
tvRockEndLen.let {
|
||||||
it.focusable = EditText.NOT_FOCUSABLE
|
it.focusable = EditText.NOT_FOCUSABLE
|
||||||
it.setOnKeyListener(null)
|
it.setOnKeyListener(null)
|
||||||
it.setText(item.positionEnd)
|
it.setText(item.positionEnd.formatDecimalString())
|
||||||
}
|
}
|
||||||
tvRockType.let {
|
tvRockType.let {
|
||||||
it.focusable = EditText.NOT_FOCUSABLE
|
it.focusable = EditText.NOT_FOCUSABLE
|
||||||
@@ -114,5 +114,5 @@ class WorkingItemAdapter(data: MutableList<WorkingFaceItem>) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inner class VH(var binding: ListItemWorkingFaceBinding) : BaseViewHolder(binding.root)
|
inner class VH(var binding: ListItemTunnelWorkingItemBinding) : BaseViewHolder(binding.root)
|
||||||
}
|
}
|
||||||
+5
-4
@@ -1,4 +1,4 @@
|
|||||||
package com.zmkg.coaloperation.ui.tunneling.adapter
|
package com.zmkg.coaloperation.adapter
|
||||||
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
@@ -6,7 +6,8 @@ import com.chad.library.adapter.base.BaseQuickAdapter
|
|||||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
import com.zmkg.coaloperation.R
|
import com.zmkg.coaloperation.R
|
||||||
import com.zmkg.coaloperation.databinding.ItemRockNatureBinding
|
import com.zmkg.coaloperation.databinding.ItemRockNatureBinding
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelRoofLithologyEntity
|
||||||
|
import com.zmkg.coaloperation.utils.formatDecimalString
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,8 +30,8 @@ class TunnelingRockNatureAdapter(list: MutableList<TunnelRoofLithologyEntity>) :
|
|||||||
|
|
||||||
override fun convert(holder: VH, item: TunnelRoofLithologyEntity) {
|
override fun convert(holder: VH, item: TunnelRoofLithologyEntity) {
|
||||||
holder.binding.let {
|
holder.binding.let {
|
||||||
it.tvRock1Start.text = item.positionStart
|
it.tvRock1Start.text = item.positionStart.formatDecimalString()
|
||||||
it.tvRock1End.text = item.positionEnd
|
it.tvRock1End.text = item.positionEnd.formatDecimalString()
|
||||||
it.tvRock1Name.text = item.lithologyType
|
it.tvRock1Name.text = item.lithologyType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.zmkg.coaloperation.ui.tunneling.bean
|
package com.zmkg.coaloperation.bean
|
||||||
|
|
||||||
data class DictBean(
|
data class DictBean(
|
||||||
var seam_list: Map<String, String>?,
|
var seam_list: Map<String, String>?,
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.zmkg.coaloperation.bean
|
||||||
|
|
||||||
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelRoofLithologyEntity
|
||||||
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceRecordEntity
|
||||||
|
|
||||||
|
data class TunnelWorkingItem(
|
||||||
|
var name: String? = "",
|
||||||
|
var value: String? = "",
|
||||||
|
var items: MutableList<TunnelRoofLithologyEntity>? = null,
|
||||||
|
var pageType:Int = 0
|
||||||
|
)
|
||||||
|
|
||||||
|
data class RockItem(
|
||||||
|
var startLen: Int = 0,
|
||||||
|
var endLen: Int = 0,
|
||||||
|
val rockType: String = ""
|
||||||
|
)
|
||||||
|
|
||||||
|
data class WorkOption(
|
||||||
|
var id:String,
|
||||||
|
var name: String
|
||||||
|
)
|
||||||
|
|
||||||
|
data class TunnelSubmitData(
|
||||||
|
var faceList: MutableList<TunnelWorkingFaceEntity>?=null,
|
||||||
|
var recordList: MutableList<TunnelWorkingFaceRecordEntity>?=null,
|
||||||
|
var lithologyList: MutableList<TunnelRoofLithologyEntity>?=null
|
||||||
|
)
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
package com.zmkg.coaloperation.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 掘进
|
||||||
|
*/
|
||||||
|
//data class TunnelingHomeBean(
|
||||||
|
// var contentList: MutableList<TunnelingHomeItemBean>?,
|
||||||
|
// val createBy: String?,
|
||||||
|
// val createTime: String?,
|
||||||
|
// val updateBy: String?,
|
||||||
|
// val updateTime: String?,
|
||||||
|
// val remark: String?,
|
||||||
|
// val surfaceId: String?,
|
||||||
|
// val totalFootage: String?,
|
||||||
|
// val seamId: String?,
|
||||||
|
// val areaId: String?,
|
||||||
|
// val seamName: String?,
|
||||||
|
// val surfaceName: String?,
|
||||||
|
// val areaName: String?,
|
||||||
|
// val surfaceAzimuth: String?,
|
||||||
|
// val surfaceHeight: String?,
|
||||||
|
// val surfaceWidth: String?,
|
||||||
|
// val tunnelNature: String?,
|
||||||
|
// val planStartDate: String?,
|
||||||
|
// val planEndDate: String?,
|
||||||
|
// val geologicalType: String?,
|
||||||
|
// val hydrogeologicalType: String?,
|
||||||
|
// val seamIgnition: String?,
|
||||||
|
// val seamGas: String?,
|
||||||
|
// val seamBumpPressure: String?,
|
||||||
|
// val surfaceSupportForm: String?
|
||||||
|
//)
|
||||||
|
//
|
||||||
|
//class TunnelingHomeItemBean {
|
||||||
|
// var createBy: String? = null
|
||||||
|
// var createTime: String? = null
|
||||||
|
// var updateBy: String? = null
|
||||||
|
// var updateTime: String? = null
|
||||||
|
// var remark: String? = null
|
||||||
|
// var recordId: String? = null
|
||||||
|
// var surfaceId: String? = null
|
||||||
|
// var workingDate: String? = null
|
||||||
|
// var teamShift: String? = null
|
||||||
|
// var teamId: String? = null
|
||||||
|
// var teamName: String? = null
|
||||||
|
// var teamLeader: String? = null
|
||||||
|
// var workingFootage: String? = null
|
||||||
|
// var seamDip: String? = null
|
||||||
|
// var seamHeight: String? = null
|
||||||
|
// var waterYield: String? = null
|
||||||
|
// var recordPerson: String? = null
|
||||||
|
// var mineWorkingLith: String? = null
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * 新增工作面 给接口的数据
|
||||||
|
// */
|
||||||
|
//data class TunnelingFaceAddBean(
|
||||||
|
//
|
||||||
|
// val surfaceName: String? = null,
|
||||||
|
// val totalFootage: String? = null,
|
||||||
|
//
|
||||||
|
// val areaId: Int? = null,
|
||||||
|
// val areaName: String? = null,
|
||||||
|
// val createBy: String? = null,
|
||||||
|
// val createTime: String? = null,
|
||||||
|
// val geologicalType: String? = null,
|
||||||
|
// val hydrogeologicalType: String? = null,
|
||||||
|
// val params: Params? = null,
|
||||||
|
// val planEndDate: String? = null,
|
||||||
|
// val planStartDate: String? = null,
|
||||||
|
// val remark: String? = null,
|
||||||
|
// val seamBumpPressure: String? = null,
|
||||||
|
// val seamGas: String? = null,
|
||||||
|
// val seamId: Int? = null,
|
||||||
|
// val seamIgnition: String? = null,
|
||||||
|
// val seamName: String? = null,
|
||||||
|
// val surfaceAzimuth: String? = null,
|
||||||
|
// val surfaceHeight: String? = null,
|
||||||
|
// val surfaceId: Int? = null,
|
||||||
|
// val surfaceSupportForm: String? = null,
|
||||||
|
// val surfaceWidth: String? = null,
|
||||||
|
// val tunnelNature: String? = null,
|
||||||
|
// val updateBy: String? = null,
|
||||||
|
// val updateTime: String? = null
|
||||||
|
//)
|
||||||
|
|
||||||
|
data class Params(
|
||||||
|
val additionalProp1: String? = null,
|
||||||
|
val additionalProp2: String? = null,
|
||||||
|
val additionalProp3: String? = null
|
||||||
|
):Serializable
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工作面详情
|
||||||
|
*/
|
||||||
|
//data class FaceWorkDetailBean(
|
||||||
|
// val accumulativeFootage: Int,
|
||||||
|
// val areaId: Int,
|
||||||
|
// val areaName: String,
|
||||||
|
// val createBy: String,
|
||||||
|
// val createTime: String,
|
||||||
|
// val geologicalType: String,
|
||||||
|
// val hydrogeologicalType: String,
|
||||||
|
// val latestRecord: LatestRecord,
|
||||||
|
// val params: Params,
|
||||||
|
// val planEndDate: String,
|
||||||
|
// val planStartDate: String,
|
||||||
|
// val remainingFootage: Int,
|
||||||
|
// val remark: String,
|
||||||
|
// val seamBumpPressure: String,
|
||||||
|
// val seamGas: String,
|
||||||
|
// val seamId: Int,
|
||||||
|
// val seamIgnition: String,
|
||||||
|
// val seamName: String,
|
||||||
|
// val surfaceAzimuth: String,
|
||||||
|
// val surfaceHeight: String,
|
||||||
|
// val surfaceId: Int,
|
||||||
|
// val surfaceName: String,
|
||||||
|
// val surfaceSupportForm: String,
|
||||||
|
// val surfaceWidth: String,
|
||||||
|
// val totalFootage: Int,
|
||||||
|
// val tunnelNature: String,
|
||||||
|
// val updateBy: String,
|
||||||
|
// val updateTime: String,
|
||||||
|
// val yesterdayFootage: String,
|
||||||
|
// val monthFootage: String
|
||||||
|
//): Serializable
|
||||||
|
|
||||||
|
//data class LatestRecord(
|
||||||
|
// val createBy: String,
|
||||||
|
// val createTime: String,
|
||||||
|
// val mineWorkingLithologyList: MutableList<MineWorkingLithology>,
|
||||||
|
// val params: Params,
|
||||||
|
// val recordId: Int,
|
||||||
|
// val recordPerson: String,
|
||||||
|
// val remark: String,
|
||||||
|
// val seamDip: Int,
|
||||||
|
// val seamHeight: Int,
|
||||||
|
// val surfaceId: Int,
|
||||||
|
// val surfaceName: String,
|
||||||
|
// val teamId: Int,
|
||||||
|
// val teamLeader: String,
|
||||||
|
// val teamName: String,
|
||||||
|
// val teamShift: Int,
|
||||||
|
// val updateBy: String,
|
||||||
|
// val updateTime: String,
|
||||||
|
// val waterYield: Int,
|
||||||
|
// val workingDate: String,
|
||||||
|
// val workingFootage: Int
|
||||||
|
//):Serializable
|
||||||
|
|
||||||
|
//
|
||||||
|
//data class MineWorkingLithology(
|
||||||
|
// val createBy: String,
|
||||||
|
// val createTime: String,
|
||||||
|
// val lithologyId: Int,
|
||||||
|
// val lithologyType: String,
|
||||||
|
// val params: Params,
|
||||||
|
// val positionEnd: Int,
|
||||||
|
// val positionStart: Int,
|
||||||
|
// val recordId: Int,
|
||||||
|
// val remark: String,
|
||||||
|
// val updateBy: String,
|
||||||
|
// val updateTime: String
|
||||||
|
//):Serializable
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package com.zmkg.coaloperation.bean
|
|
||||||
|
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
|
||||||
|
|
||||||
data class WorkingFaceItem(
|
|
||||||
var name: String? = "",
|
|
||||||
var value: String? = "",
|
|
||||||
var items: MutableList<TunnelRoofLithologyEntity>? = null,
|
|
||||||
var pageType:Int = 0
|
|
||||||
)
|
|
||||||
|
|
||||||
data class RockItem(
|
|
||||||
var startLen: Int = 0,
|
|
||||||
var endLen: Int = 0,
|
|
||||||
val rockType: String = ""
|
|
||||||
)
|
|
||||||
|
|
||||||
data class WorkOption(
|
|
||||||
var id:String,
|
|
||||||
var name: String
|
|
||||||
)
|
|
||||||
@@ -1,18 +1,10 @@
|
|||||||
package com.zmkg.coaloperation.data.api
|
package com.zmkg.coaloperation.data.api
|
||||||
|
|
||||||
import com.zmkg.coaloperation.data.bean.ApiResponse
|
import com.zmkg.coaloperation.data.bean.ApiResponse
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
import com.zmkg.coaloperation.retorfit.UrlConfig
|
import com.zmkg.coaloperation.retorfit.UrlConfig
|
||||||
import com.zmkg.coaloperation.ui.tunneling.bean.FaceWorkDetailBean
|
|
||||||
import com.zmkg.coaloperation.ui.tunneling.bean.TunnelingHomeBean
|
|
||||||
import com.zmkg.coaloperation.ui.tunneling.bean.TunnelingHomeItemBean
|
|
||||||
import com.zmkg.coaloperation.ui.home.bean.WaterLedgerBean
|
import com.zmkg.coaloperation.ui.home.bean.WaterLedgerBean
|
||||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
|
||||||
import okhttp3.RequestBody
|
|
||||||
import retrofit2.http.Body
|
|
||||||
import retrofit2.http.GET
|
import retrofit2.http.GET
|
||||||
import retrofit2.http.POST
|
|
||||||
import retrofit2.http.Path
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页
|
* 首页
|
||||||
@@ -29,26 +21,26 @@ interface HomeApi {
|
|||||||
/**
|
/**
|
||||||
* 掘进-首页-工作面列表
|
* 掘进-首页-工作面列表
|
||||||
*/
|
*/
|
||||||
@GET("/api/mine/tunnelling/surface/list")
|
// @GET("/api/mine/tunnelling/surface/list")
|
||||||
suspend fun getTunnelingHomeData(): ApiResponse<MutableList<TunnelingHomeBean>>
|
// suspend fun getTunnelingHomeData(): ApiResponse<MutableList<TunnelingHomeBean>>
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 掘进-首页-工作面记录列表
|
// * 掘进-首页-工作面记录列表
|
||||||
*/
|
// */
|
||||||
@GET("/api/mine/tunnelling/surface/record/{recordId}")
|
// @GET("/api/mine/tunnelling/surface/record/{recordId}")
|
||||||
suspend fun getTunnelingHomeItemData(@Path("recordId") recordId: String?): ApiResponse<MutableList<TunnelingHomeItemBean>>
|
// suspend fun getTunnelingHomeItemData(@Path("recordId") recordId: String?): ApiResponse<MutableList<TunnelingHomeItemBean>>
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 掘进-工作面详情
|
// * 掘进-工作面详情
|
||||||
*/
|
// */
|
||||||
@GET("/api/mine/tunnelling/surface/detail/{surfaceId}")
|
// @GET("/api/mine/tunnelling/surface/detail/{surfaceId}")
|
||||||
suspend fun getTunnelingSurfaceDetail(@Path("surfaceId") surfaceId: String?): ApiResponse<FaceWorkDetailBean>
|
// suspend fun getTunnelingSurfaceDetail(@Path("surfaceId") surfaceId: String?): ApiResponse<FaceWorkDetailBean>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 掘进-新增工作面
|
* 掘进-新增工作面
|
||||||
*/
|
*/
|
||||||
@POST("/api/mine/tunnelling/surface/add")
|
// @POST("/api/mine/tunnelling/surface/add")
|
||||||
suspend fun postTunnellingSurfaceAdd(@Body requestBody: RequestBody): ApiResponse<String>
|
// suspend fun postTunnellingSurfaceAdd(@Body requestBody: RequestBody): ApiResponse<String>
|
||||||
|
|
||||||
@GET("/api/mine/tunnelling/surface/detailList")
|
@GET("/api/mine/tunnelling/surface/detailList")
|
||||||
suspend fun getTunnelHomeList(): ApiResponse<MutableList<TunnelWorkingFaceEntity>?>
|
suspend fun getTunnelHomeList(): ApiResponse<MutableList<TunnelWorkingFaceEntity>?>
|
||||||
|
|||||||
+38
-45
@@ -3,16 +3,9 @@ package com.zmkg.coaloperation.data.repository
|
|||||||
import com.zmkg.coaloperation.base.repository.BaseRepository
|
import com.zmkg.coaloperation.base.repository.BaseRepository
|
||||||
import com.zmkg.coaloperation.data.api.HomeApi
|
import com.zmkg.coaloperation.data.api.HomeApi
|
||||||
import com.zmkg.coaloperation.data.bean.ApiResponse
|
import com.zmkg.coaloperation.data.bean.ApiResponse
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
import com.zmkg.coaloperation.retorfit.RetrofitManager
|
import com.zmkg.coaloperation.retorfit.RetrofitManager
|
||||||
import com.zmkg.coaloperation.retorfit.RetrofitManager.toRequestBody
|
|
||||||
import com.zmkg.coaloperation.superfuntion.toJson
|
|
||||||
import com.zmkg.coaloperation.ui.tunneling.bean.FaceWorkDetailBean
|
|
||||||
import com.zmkg.coaloperation.ui.tunneling.bean.TunnelingFaceAddBean
|
|
||||||
import com.zmkg.coaloperation.ui.tunneling.bean.TunnelingHomeBean
|
|
||||||
import com.zmkg.coaloperation.ui.tunneling.bean.TunnelingHomeItemBean
|
|
||||||
import com.zmkg.coaloperation.ui.home.bean.WaterLedgerBean
|
import com.zmkg.coaloperation.ui.home.bean.WaterLedgerBean
|
||||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
|
||||||
|
|
||||||
|
|
||||||
object HomeRepository : BaseRepository(){
|
object HomeRepository : BaseRepository(){
|
||||||
@@ -30,44 +23,44 @@ object HomeRepository : BaseRepository(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 掘进-首页-工作面列表
|
// * 掘进-首页-工作面列表
|
||||||
*/
|
// */
|
||||||
suspend fun getTunnelingHomeData(): ApiResponse<MutableList<TunnelingHomeBean>> {
|
// suspend fun getTunnelingHomeData(): ApiResponse<MutableList<TunnelingHomeBean>> {
|
||||||
return apiCall {
|
// return apiCall {
|
||||||
val map = mutableMapOf<String, Any?>()
|
// val map = mutableMapOf<String, Any?>()
|
||||||
service.getTunnelingHomeData()
|
// service.getTunnelingHomeData()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
|
||||||
* 掘进-首页-工作面记录列表
|
|
||||||
*/
|
|
||||||
suspend fun getTunnelingHomeItemData(surfaceId: String?): ApiResponse<MutableList<TunnelingHomeItemBean>> {
|
|
||||||
return apiCall {
|
|
||||||
val map = mutableMapOf<String, Any?>()
|
|
||||||
service.getTunnelingHomeItemData(surfaceId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 掘进-工作面详情
|
|
||||||
*/
|
|
||||||
suspend fun getTunnelingSurfaceDetail(surfaceId: String?): ApiResponse<FaceWorkDetailBean> {
|
|
||||||
return apiCall {
|
|
||||||
val map = mutableMapOf<String, Any?>()
|
|
||||||
service.getTunnelingSurfaceDetail(surfaceId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 掘进-新增工作面
|
|
||||||
*/
|
|
||||||
suspend fun postTunnellingSurfaceAdd(tunnelingFaceAddBean: TunnelingFaceAddBean): ApiResponse<String> {
|
|
||||||
return apiCall {
|
|
||||||
service.postTunnellingSurfaceAdd(tunnelingFaceAddBean.toJson().toRequestBody())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 掘进-首页-工作面记录列表
|
||||||
|
// */
|
||||||
|
// suspend fun getTunnelingHomeItemData(surfaceId: String?): ApiResponse<MutableList<TunnelingHomeItemBean>> {
|
||||||
|
// return apiCall {
|
||||||
|
// val map = mutableMapOf<String, Any?>()
|
||||||
|
// service.getTunnelingHomeItemData(surfaceId)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// /**
|
||||||
|
// * 掘进-工作面详情
|
||||||
|
// */
|
||||||
|
// suspend fun getTunnelingSurfaceDetail(surfaceId: String?): ApiResponse<FaceWorkDetailBean> {
|
||||||
|
// return apiCall {
|
||||||
|
// val map = mutableMapOf<String, Any?>()
|
||||||
|
// service.getTunnelingSurfaceDetail(surfaceId)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 掘进-新增工作面
|
||||||
|
// */
|
||||||
|
// suspend fun postTunnellingSurfaceAdd(tunnelingFaceAddBean: TunnelingFaceAddBean): ApiResponse<String> {
|
||||||
|
// return apiCall {
|
||||||
|
// service.postTunnellingSurfaceAdd(tunnelingFaceAddBean.toJson().toRequestBody())
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
suspend fun getTunnelHomeList() : ApiResponse<MutableList<TunnelWorkingFaceEntity>?> {
|
suspend fun getTunnelHomeList() : ApiResponse<MutableList<TunnelWorkingFaceEntity>?> {
|
||||||
return apiCall {
|
return apiCall {
|
||||||
service.getTunnelHomeList()
|
service.getTunnelHomeList()
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import androidx.sqlite.db.SupportSQLiteDatabase
|
|||||||
import com.zmkg.coaloperation.db.dao.TunnelRoofLithologyDao
|
import com.zmkg.coaloperation.db.dao.TunnelRoofLithologyDao
|
||||||
import com.zmkg.coaloperation.db.dao.TunnelWorkingFaceDao
|
import com.zmkg.coaloperation.db.dao.TunnelWorkingFaceDao
|
||||||
import com.zmkg.coaloperation.db.dao.TunnelWorkingFaceRecordDao
|
import com.zmkg.coaloperation.db.dao.TunnelWorkingFaceRecordDao
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelRoofLithologyEntity
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceRecordEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceRecordEntity
|
||||||
|
|
||||||
@Database(
|
@Database(
|
||||||
entities = [
|
entities = [
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import androidx.room.Insert
|
|||||||
import androidx.room.OnConflictStrategy
|
import androidx.room.OnConflictStrategy
|
||||||
import androidx.room.Query
|
import androidx.room.Query
|
||||||
import androidx.room.Update
|
import androidx.room.Update
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelRoofLithologyEntity
|
||||||
|
|
||||||
@Dao
|
@Dao
|
||||||
interface TunnelRoofLithologyDao {
|
interface TunnelRoofLithologyDao {
|
||||||
|
|||||||
+3
-3
@@ -5,7 +5,7 @@ import androidx.room.Insert
|
|||||||
import androidx.room.OnConflictStrategy
|
import androidx.room.OnConflictStrategy
|
||||||
import androidx.room.Query
|
import androidx.room.Query
|
||||||
import androidx.room.Update
|
import androidx.room.Update
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
|
|
||||||
//import kotlinx.coroutines.flow.Flow
|
//import kotlinx.coroutines.flow.Flow
|
||||||
|
|
||||||
@@ -20,10 +20,10 @@ interface TunnelWorkingFaceDao {
|
|||||||
@Update
|
@Update
|
||||||
fun update(entity: TunnelWorkingFaceEntity)
|
fun update(entity: TunnelWorkingFaceEntity)
|
||||||
|
|
||||||
@Query("SELECT * FROM tunnel_working_face ORDER BY createTime ASC")
|
@Query("SELECT * FROM tunnel_working_face ORDER BY createTime DESC")
|
||||||
fun getEntityList(): MutableList<TunnelWorkingFaceEntity>?
|
fun getEntityList(): MutableList<TunnelWorkingFaceEntity>?
|
||||||
|
|
||||||
@Query("SELECT * FROM tunnel_working_face WHERE dataState = :dataState ORDER BY createTime ASC")
|
@Query("SELECT * FROM tunnel_working_face WHERE dataState = :dataState ORDER BY createTime DESC")
|
||||||
fun getEntityListByState(dataState: String): MutableList<TunnelWorkingFaceEntity>?
|
fun getEntityListByState(dataState: String): MutableList<TunnelWorkingFaceEntity>?
|
||||||
|
|
||||||
@Query("SELECT * FROM tunnel_working_face WHERE surfaceId = :surfaceId")
|
@Query("SELECT * FROM tunnel_working_face WHERE surfaceId = :surfaceId")
|
||||||
|
|||||||
+4
-5
@@ -5,8 +5,7 @@ import androidx.room.Insert
|
|||||||
import androidx.room.OnConflictStrategy
|
import androidx.room.OnConflictStrategy
|
||||||
import androidx.room.Query
|
import androidx.room.Query
|
||||||
import androidx.room.Update
|
import androidx.room.Update
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceRecordEntity
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceRecordEntity
|
|
||||||
|
|
||||||
//import kotlinx.coroutines.flow.Flow
|
//import kotlinx.coroutines.flow.Flow
|
||||||
|
|
||||||
@@ -21,16 +20,16 @@ interface TunnelWorkingFaceRecordDao {
|
|||||||
@Update
|
@Update
|
||||||
fun update(entity: TunnelWorkingFaceRecordEntity)
|
fun update(entity: TunnelWorkingFaceRecordEntity)
|
||||||
|
|
||||||
@Query("SELECT * FROM tunnel_working_face_record WHERE surfaceId = :surfaceId ORDER BY createTime ASC")
|
@Query("SELECT * FROM tunnel_working_face_record WHERE surfaceId = :surfaceId ORDER BY createTime DESC")
|
||||||
fun getEntityList(surfaceId: Long): MutableList<TunnelWorkingFaceRecordEntity>?
|
fun getEntityList(surfaceId: Long): MutableList<TunnelWorkingFaceRecordEntity>?
|
||||||
|
|
||||||
@Query("SELECT * FROM tunnel_working_face_record WHERE dataState = :dataState ORDER BY createTime ASC")
|
@Query("SELECT * FROM tunnel_working_face_record WHERE dataState = :dataState ORDER BY createTime DESC")
|
||||||
fun getEntityListByState(dataState: String): MutableList<TunnelWorkingFaceRecordEntity>?
|
fun getEntityListByState(dataState: String): MutableList<TunnelWorkingFaceRecordEntity>?
|
||||||
|
|
||||||
@Query("SELECT * FROM tunnel_working_face_record WHERE surfaceId = :recordId")
|
@Query("SELECT * FROM tunnel_working_face_record WHERE surfaceId = :recordId")
|
||||||
fun getEntityById(recordId: Long): TunnelWorkingFaceRecordEntity
|
fun getEntityById(recordId: Long): TunnelWorkingFaceRecordEntity
|
||||||
|
|
||||||
@Query("SELECT * FROM tunnel_working_face_record WHERE surfaceId = :surfaceId AND latestRecordState = '1' ORDER BY createTime ASC LIMIT 1")
|
@Query("SELECT * FROM tunnel_working_face_record WHERE surfaceId = :surfaceId AND latestRecordState = '1' ORDER BY createTime DESC LIMIT 1")
|
||||||
fun getLastEntity(surfaceId: Long): TunnelWorkingFaceRecordEntity?
|
fun getLastEntity(surfaceId: Long): TunnelWorkingFaceRecordEntity?
|
||||||
|
|
||||||
@Query("DELETE FROM tunnel_working_face_record")
|
@Query("DELETE FROM tunnel_working_face_record")
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
package com.zmkg.coaloperation.db.entiry
|
|
||||||
|
|
||||||
class OtherEntity {
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package com.zmkg.coaloperation.db.entity
|
||||||
|
|
||||||
|
class OtherEntity {
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.zmkg.coaloperation.db.entiry.tunnel
|
package com.zmkg.coaloperation.db.entity.tunnel
|
||||||
|
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import androidx.room.Entity
|
import androidx.room.Entity
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.zmkg.coaloperation.db.entiry.tunnel
|
package com.zmkg.coaloperation.db.entity.tunnel
|
||||||
|
|
||||||
//import androidx.room.ColumnInfo
|
//import androidx.room.ColumnInfo
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
+1
-2
@@ -1,10 +1,9 @@
|
|||||||
package com.zmkg.coaloperation.db.entiry.tunnel
|
package com.zmkg.coaloperation.db.entity.tunnel
|
||||||
|
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import androidx.room.Entity
|
import androidx.room.Entity
|
||||||
import androidx.room.Ignore
|
import androidx.room.Ignore
|
||||||
import androidx.room.PrimaryKey
|
import androidx.room.PrimaryKey
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
|
||||||
import com.zmkg.coaloperation.utils.DateTimeUtil
|
import com.zmkg.coaloperation.utils.DateTimeUtil
|
||||||
import kotlinx.parcelize.Parcelize
|
import kotlinx.parcelize.Parcelize
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
package com.zmkg.coaloperation.db.repository
|
package com.zmkg.coaloperation.db.repository
|
||||||
|
|
||||||
import com.zmkg.coaloperation.db.dao.TunnelRoofLithologyDao
|
import com.zmkg.coaloperation.db.dao.TunnelRoofLithologyDao
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelRoofLithologyEntity
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
package com.zmkg.coaloperation.db.repository
|
package com.zmkg.coaloperation.db.repository
|
||||||
|
|
||||||
import com.zmkg.coaloperation.db.dao.TunnelWorkingFaceRecordDao
|
import com.zmkg.coaloperation.db.dao.TunnelWorkingFaceRecordDao
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceRecordEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceRecordEntity
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
package com.zmkg.coaloperation.db.repository
|
package com.zmkg.coaloperation.db.repository
|
||||||
|
|
||||||
import com.zmkg.coaloperation.db.dao.TunnelWorkingFaceDao
|
import com.zmkg.coaloperation.db.dao.TunnelWorkingFaceDao
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import android.app.Application
|
|||||||
import androidx.lifecycle.AndroidViewModel
|
import androidx.lifecycle.AndroidViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.zmkg.coaloperation.db.AppDatabase
|
import com.zmkg.coaloperation.db.AppDatabase
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelRoofLithologyEntity
|
||||||
import com.zmkg.coaloperation.db.repository.TunnelRoofLithologyRepository
|
import com.zmkg.coaloperation.db.repository.TunnelRoofLithologyRepository
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import android.app.Application
|
|||||||
import androidx.lifecycle.AndroidViewModel
|
import androidx.lifecycle.AndroidViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.zmkg.coaloperation.db.AppDatabase
|
import com.zmkg.coaloperation.db.AppDatabase
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceRecordEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceRecordEntity
|
||||||
import com.zmkg.coaloperation.db.repository.TunnelWorkingFaceRecordRepository
|
import com.zmkg.coaloperation.db.repository.TunnelWorkingFaceRecordRepository
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -4,11 +4,9 @@ import android.app.Application
|
|||||||
import androidx.lifecycle.AndroidViewModel
|
import androidx.lifecycle.AndroidViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.zmkg.coaloperation.db.AppDatabase
|
import com.zmkg.coaloperation.db.AppDatabase
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
import com.zmkg.coaloperation.db.repository.TunnelWorkingFaceRepository
|
import com.zmkg.coaloperation.db.repository.TunnelWorkingFaceRepository
|
||||||
import kotlinx.coroutines.Dispatchers
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
|
||||||
|
|
||||||
class TunnelWorkingFaceViewModel(application: Application) : AndroidViewModel(application) {
|
class TunnelWorkingFaceViewModel(application: Application) : AndroidViewModel(application) {
|
||||||
private val repository: TunnelWorkingFaceRepository
|
private val repository: TunnelWorkingFaceRepository
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.zmkg.coaloperation.ui.mining
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.zmkg.coaloperation.R
|
||||||
|
import com.zmkg.coaloperation.base.BaseVMBActivity
|
||||||
|
import com.zmkg.coaloperation.base.viewmodel.TestViewModel
|
||||||
|
import com.zmkg.coaloperation.databinding.ActivityMiningBinding
|
||||||
|
|
||||||
|
class MiningActivity :
|
||||||
|
BaseVMBActivity<TestViewModel, ActivityMiningBinding>(R.layout.activity_mining) {
|
||||||
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
|
TODO("Not yet implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
TODO("Not yet implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun bindEvent() {
|
||||||
|
TODO("Not yet implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun processClick(v: View?) {
|
||||||
|
TODO("Not yet implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+10
-27
@@ -4,28 +4,21 @@ import android.os.Bundle
|
|||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.lifecycle.Lifecycle
|
import androidx.core.view.isGone
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.lifecycle.lifecycleScope
|
|
||||||
import androidx.lifecycle.repeatOnLifecycle
|
|
||||||
import com.zmkg.coaloperation.R
|
import com.zmkg.coaloperation.R
|
||||||
import com.zmkg.coaloperation.base.BaseVMBActivity
|
import com.zmkg.coaloperation.base.BaseVMBActivity
|
||||||
import com.zmkg.coaloperation.databinding.ActivityWorkFaceBinding
|
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
|
||||||
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceViewModel
|
|
||||||
import com.zmkg.coaloperation.event.TunnelingWorkFaceRefreshEvent
|
|
||||||
import com.zmkg.coaloperation.ui.tunneling.viewmodel.TunnelingViewModel
|
|
||||||
import kotlinx.coroutines.delay
|
|
||||||
import kotlinx.coroutines.flow.collectLatest
|
|
||||||
import kotlinx.coroutines.launch
|
|
||||||
import org.greenrobot.eventbus.EventBus
|
|
||||||
import androidx.core.view.isGone
|
|
||||||
import com.zmkg.coaloperation.bean.WorkOption
|
import com.zmkg.coaloperation.bean.WorkOption
|
||||||
|
import com.zmkg.coaloperation.databinding.ActivityAddWorkingFaceBinding
|
||||||
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
|
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceViewModel
|
||||||
|
import com.zmkg.coaloperation.ui.tunneling.viewmodel.TunnelingViewModel
|
||||||
import com.zmkg.coaloperation.utils.DateTimeUtil
|
import com.zmkg.coaloperation.utils.DateTimeUtil
|
||||||
import com.zmkg.coaloperation.utils.DictUtils
|
import com.zmkg.coaloperation.utils.DictUtils
|
||||||
import com.zmkg.coaloperation.utils.PickerUtil
|
import com.zmkg.coaloperation.utils.PickerUtil
|
||||||
import com.zmkg.coaloperation.utils.gone
|
import com.zmkg.coaloperation.utils.gone
|
||||||
import com.zmkg.coaloperation.utils.visible
|
import com.zmkg.coaloperation.utils.visible
|
||||||
|
import org.greenrobot.eventbus.EventBus
|
||||||
import org.greenrobot.eventbus.Subscribe
|
import org.greenrobot.eventbus.Subscribe
|
||||||
import org.greenrobot.eventbus.ThreadMode
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
@@ -33,8 +26,8 @@ import java.time.LocalDateTime
|
|||||||
/**
|
/**
|
||||||
* 工作面
|
* 工作面
|
||||||
*/
|
*/
|
||||||
class WorkFaceActivity :
|
class AddWorkingFaceActivity :
|
||||||
BaseVMBActivity<TunnelingViewModel, ActivityWorkFaceBinding>(R.layout.activity_work_face) {
|
BaseVMBActivity<TunnelingViewModel, ActivityAddWorkingFaceBinding>(R.layout.activity_add_working_face) {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "WorkFaceActivity"
|
private const val TAG = "WorkFaceActivity"
|
||||||
@@ -79,7 +72,7 @@ class WorkFaceActivity :
|
|||||||
mBinding.expandLayout.visible()
|
mBinding.expandLayout.visible()
|
||||||
mBinding.imgExpand.gone()
|
mBinding.imgExpand.gone()
|
||||||
faceDetail =
|
faceDetail =
|
||||||
intent.getParcelableExtra(WorkingFaceDetail2Activity.FACE_WORK_DETAIL_DATA) as TunnelWorkingFaceEntity?
|
intent.getParcelableExtra(WorkingFaceDetailActivity.FACE_WORK_DETAIL_DATA) as TunnelWorkingFaceEntity?
|
||||||
if (faceDetail == null) {
|
if (faceDetail == null) {
|
||||||
showToast("未查询到工作面数据")
|
showToast("未查询到工作面数据")
|
||||||
return
|
return
|
||||||
@@ -108,7 +101,7 @@ class WorkFaceActivity :
|
|||||||
PickerUtil.showOptionPicker(this, "请选择所属煤层", DictUtils.seamList) { option ->
|
PickerUtil.showOptionPicker(this, "请选择所属煤层", DictUtils.seamList) { option ->
|
||||||
mBinding.tvSeamName.text = option.name
|
mBinding.tvSeamName.text = option.name
|
||||||
mBinding.tvSeamName.tag = option.id
|
mBinding.tvSeamName.tag = option.id
|
||||||
seamAreaList = DictUtils.areaMap[option.id]?:mutableListOf()
|
seamAreaList = DictUtils.areaMap[option.id] ?: mutableListOf()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mBinding.tvAreaName.setOnClickListener { v ->
|
mBinding.tvAreaName.setOnClickListener { v ->
|
||||||
@@ -170,16 +163,6 @@ class WorkFaceActivity :
|
|||||||
|
|
||||||
override fun createObserve() {
|
override fun createObserve() {
|
||||||
super.createObserve()
|
super.createObserve()
|
||||||
lifecycleScope.launch {
|
|
||||||
repeatOnLifecycle(Lifecycle.State.CREATED) {
|
|
||||||
mViewModel.tunnelingWorkFaceAdd.collectLatest {
|
|
||||||
showToast("新增成功")
|
|
||||||
EventBus.getDefault().post(TunnelingWorkFaceRefreshEvent())
|
|
||||||
delay(200)
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun processClick(v: View?) {
|
override fun processClick(v: View?) {
|
||||||
+111
-54
@@ -10,17 +10,23 @@ import com.zmkg.coaloperation.R
|
|||||||
import com.zmkg.coaloperation.adapter.TunnelRoofLithologyAdapter
|
import com.zmkg.coaloperation.adapter.TunnelRoofLithologyAdapter
|
||||||
import com.zmkg.coaloperation.base.BaseVMBActivity
|
import com.zmkg.coaloperation.base.BaseVMBActivity
|
||||||
import com.zmkg.coaloperation.base.viewmodel.TestViewModel
|
import com.zmkg.coaloperation.base.viewmodel.TestViewModel
|
||||||
import com.zmkg.coaloperation.databinding.ActivityAddWorkingPointBinding
|
import com.zmkg.coaloperation.bean.TunnelWorkingItem
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
import com.zmkg.coaloperation.databinding.ActivityAddWorkingFaceRecordBinding
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceRecordEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelRoofLithologyEntity
|
||||||
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceRecordEntity
|
||||||
import com.zmkg.coaloperation.db.viewmodel.TunnelRoofLithologyViewModel
|
import com.zmkg.coaloperation.db.viewmodel.TunnelRoofLithologyViewModel
|
||||||
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceRecordViewModel
|
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceRecordViewModel
|
||||||
|
import com.zmkg.coaloperation.superfuntion.hideLoading
|
||||||
|
import com.zmkg.coaloperation.superfuntion.showLoading
|
||||||
import com.zmkg.coaloperation.superfuntion.toJson
|
import com.zmkg.coaloperation.superfuntion.toJson
|
||||||
import com.zmkg.coaloperation.utils.DateTimeUtil
|
import com.zmkg.coaloperation.utils.DateTimeUtil
|
||||||
import com.zmkg.coaloperation.utils.DictUtils
|
import com.zmkg.coaloperation.utils.DictUtils
|
||||||
|
import com.zmkg.coaloperation.utils.ExcelExportUtils
|
||||||
|
import com.zmkg.coaloperation.utils.FileUtils
|
||||||
import com.zmkg.coaloperation.utils.KeyboardUtil
|
import com.zmkg.coaloperation.utils.KeyboardUtil
|
||||||
import com.zmkg.coaloperation.utils.PickerUtil
|
import com.zmkg.coaloperation.utils.PickerUtil
|
||||||
import com.zmkg.coaloperation.utils.clickWithDebounce
|
import com.zmkg.coaloperation.utils.clickWithDebounce
|
||||||
|
import com.zmkg.coaloperation.utils.formatDecimalString
|
||||||
import org.greenrobot.eventbus.EventBus
|
import org.greenrobot.eventbus.EventBus
|
||||||
import org.greenrobot.eventbus.Subscribe
|
import org.greenrobot.eventbus.Subscribe
|
||||||
import org.greenrobot.eventbus.ThreadMode
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
@@ -29,8 +35,8 @@ import java.time.LocalDateTime
|
|||||||
/**
|
/**
|
||||||
* 开始记录
|
* 开始记录
|
||||||
*/
|
*/
|
||||||
class AddWorkingPointActivity :
|
class AddWorkingFaceRecordActivity :
|
||||||
BaseVMBActivity<TestViewModel, ActivityAddWorkingPointBinding>(R.layout.activity_add_working_point) {
|
BaseVMBActivity<TestViewModel, ActivityAddWorkingFaceRecordBinding>(R.layout.activity_add_working_face_record) {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val TAG = "AddWorkingPointActivity"
|
const val TAG = "AddWorkingPointActivity"
|
||||||
@@ -115,13 +121,19 @@ class AddWorkingPointActivity :
|
|||||||
|
|
||||||
mBinding.btnSave.clickWithDebounce {
|
mBinding.btnSave.clickWithDebounce {
|
||||||
if (showType == 0) {
|
if (showType == 0) {
|
||||||
|
judgeInputParam {
|
||||||
saveFaceRecord()
|
saveFaceRecord()
|
||||||
|
}
|
||||||
return@clickWithDebounce
|
return@clickWithDebounce
|
||||||
}
|
}
|
||||||
|
judgeInputParam {
|
||||||
updateFaceRecord()
|
updateFaceRecord()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
mBinding.btnExport.clickWithDebounce {
|
mBinding.btnExport.clickWithDebounce {
|
||||||
showToast("开发中……")
|
judgeInputParam {
|
||||||
|
exportExcelFile()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mBinding.rvLithology.let {
|
mBinding.rvLithology.let {
|
||||||
@@ -169,46 +181,6 @@ class AddWorkingPointActivity :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun saveFaceRecord() {
|
private fun saveFaceRecord() {
|
||||||
if (mBinding.tvWorkingDate.text.isBlank()) {
|
|
||||||
showToast("请选择施工日期")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (mBinding.tvTeamShift.text.isBlank()) {
|
|
||||||
showToast("请选择施工班次")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (mBinding.tvWorkTeam.text.isBlank()) {
|
|
||||||
showToast("请选择施工队伍")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (mBinding.etTeamLeader.text.isBlank()) {
|
|
||||||
showToast("请输入带班队长")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (mBinding.etWorkingFootage.text.isBlank()) {
|
|
||||||
showToast("请输入本班进尺")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (mBinding.etSeamDip.text.isBlank()) {
|
|
||||||
showToast("请输入煤层倾角")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (mBinding.etSeamHeight.text.isBlank()) {
|
|
||||||
showToast("请输入煤层高")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (mBinding.etRecordPerson.text.isBlank()) {
|
|
||||||
showToast("请输入填写人")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
val emptyDataList = roofLithologyList.filter {
|
|
||||||
it.positionStart.isBlank() || it.positionEnd.isBlank() || it.lithologyType.isBlank()
|
|
||||||
}
|
|
||||||
if (emptyDataList.isNotEmpty()) {
|
|
||||||
showToast("顶板岩性中存在部分编录点数据为空")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
val faceRecord = TunnelWorkingFaceRecordEntity().also {
|
val faceRecord = TunnelWorkingFaceRecordEntity().also {
|
||||||
it.recordId = recordId
|
it.recordId = recordId
|
||||||
it.surfaceId = surfaceId
|
it.surfaceId = surfaceId
|
||||||
@@ -218,9 +190,9 @@ class AddWorkingPointActivity :
|
|||||||
it.teamId = mBinding.tvWorkTeam.tag.toString()
|
it.teamId = mBinding.tvWorkTeam.tag.toString()
|
||||||
|
|
||||||
it.teamLeader = mBinding.etTeamLeader.text.toString().trim()
|
it.teamLeader = mBinding.etTeamLeader.text.toString().trim()
|
||||||
it.workingFootage = mBinding.etWorkingFootage.text.toString().trim()
|
it.workingFootage = mBinding.etWorkingFootage.text.toString().trim().formatDecimalString()
|
||||||
it.seamDip = mBinding.etSeamDip.text.toString().trim()
|
it.seamDip = mBinding.etSeamDip.text.toString().trim().formatDecimalString()
|
||||||
it.seamHeight = mBinding.etSeamHeight.text.toString().trim()
|
it.seamHeight = mBinding.etSeamHeight.text.toString().trim().formatDecimalString()
|
||||||
it.recordPerson = mBinding.etRecordPerson.text.toString().trim()
|
it.recordPerson = mBinding.etRecordPerson.text.toString().trim()
|
||||||
|
|
||||||
it.createTime = DateTimeUtil.formatDateTime(LocalDateTime.now())
|
it.createTime = DateTimeUtil.formatDateTime(LocalDateTime.now())
|
||||||
@@ -230,8 +202,8 @@ class AddWorkingPointActivity :
|
|||||||
Log.d(TAG, "saveFaceRecord: ${roofLithologyList.toJson()}")
|
Log.d(TAG, "saveFaceRecord: ${roofLithologyList.toJson()}")
|
||||||
|
|
||||||
workingFaceRecordViewModel.insert(faceRecord) {
|
workingFaceRecordViewModel.insert(faceRecord) {
|
||||||
EventBus.getDefault().post(faceRecord)
|
|
||||||
roofLithologyViewModel.insertList(roofLithologyList) {
|
roofLithologyViewModel.insertList(roofLithologyList) {
|
||||||
|
EventBus.getDefault().post(faceRecord)
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -263,18 +235,18 @@ class AddWorkingPointActivity :
|
|||||||
it.teamId = mBinding.tvWorkTeam.tag.toString()
|
it.teamId = mBinding.tvWorkTeam.tag.toString()
|
||||||
|
|
||||||
it.teamLeader = mBinding.etTeamLeader.text.toString().trim()
|
it.teamLeader = mBinding.etTeamLeader.text.toString().trim()
|
||||||
it.workingFootage = mBinding.etWorkingFootage.text.toString().trim()
|
it.workingFootage = mBinding.etWorkingFootage.text.toString().trim().formatDecimalString()
|
||||||
it.seamDip = mBinding.etSeamDip.text.toString().trim()
|
it.seamDip = mBinding.etSeamDip.text.toString().trim().formatDecimalString()
|
||||||
it.seamHeight = mBinding.etSeamHeight.text.toString().trim()
|
it.seamHeight = mBinding.etSeamHeight.text.toString().trim().formatDecimalString()
|
||||||
it.recordPerson = mBinding.etRecordPerson.text.toString().trim()
|
it.recordPerson = mBinding.etRecordPerson.text.toString().trim()
|
||||||
|
|
||||||
it.createTime = DateTimeUtil.formatDateTime(LocalDateTime.now())
|
it.createTime = DateTimeUtil.formatDateTime(LocalDateTime.now())
|
||||||
it.dataState = "1"
|
it.dataState = "1"
|
||||||
}
|
}
|
||||||
workingFaceRecordViewModel.update(faceRecord) {
|
workingFaceRecordViewModel.update(faceRecord) {
|
||||||
EventBus.getDefault().post(faceRecord)
|
|
||||||
roofLithologyViewModel.deleteList(recordId) {
|
roofLithologyViewModel.deleteList(recordId) {
|
||||||
roofLithologyViewModel.insertList(roofLithologyList) {
|
roofLithologyViewModel.insertList(roofLithologyList) {
|
||||||
|
EventBus.getDefault().post(faceRecord)
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -286,4 +258,89 @@ class AddWorkingPointActivity :
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun judgeInputParam(acton:()-> Unit) {
|
||||||
|
list.clear()
|
||||||
|
list.add(TunnelWorkingItem(name = "工作面名称", value = faceName))
|
||||||
|
|
||||||
|
val workingDate = mBinding.tvWorkingDate.text.toString().trim()
|
||||||
|
if (workingDate.isBlank()) {
|
||||||
|
showToast("请选择施工日期")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.add(TunnelWorkingItem(name = "施工日期", value = workingDate))
|
||||||
|
|
||||||
|
val teamShift = mBinding.tvTeamShift.text.toString().trim()
|
||||||
|
if (teamShift.isBlank()) {
|
||||||
|
showToast("请选择施工班次")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.add(TunnelWorkingItem(name = "施工班次", value = teamShift))
|
||||||
|
|
||||||
|
val workTeam = mBinding.tvWorkTeam.text.toString().trim()
|
||||||
|
if (workTeam.isBlank()) {
|
||||||
|
showToast("请选择施工队伍")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.add(TunnelWorkingItem(name = "施工队伍", value = workTeam))
|
||||||
|
|
||||||
|
val teamLeader = mBinding.etTeamLeader.text.toString().trim()
|
||||||
|
if (teamLeader.isBlank()) {
|
||||||
|
showToast("请输入带班队长")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.add(TunnelWorkingItem(name = "带班队长", value = teamLeader))
|
||||||
|
|
||||||
|
val workingFootage = mBinding.etWorkingFootage.text.toString().trim().formatDecimalString()
|
||||||
|
if (workingFootage.isBlank()) {
|
||||||
|
showToast("请输入本班进尺")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.add(TunnelWorkingItem(name = "本班进尺", value = workingFootage))
|
||||||
|
|
||||||
|
val seamDip = mBinding.etSeamDip.text.toString().trim().formatDecimalString()
|
||||||
|
if (seamDip.isBlank()) {
|
||||||
|
showToast("请输入煤层倾角")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.add(TunnelWorkingItem(name = "煤层倾角", value = seamDip))
|
||||||
|
|
||||||
|
val seamHeight = mBinding.etSeamHeight.text.toString().trim().formatDecimalString()
|
||||||
|
if (seamHeight.isBlank()) {
|
||||||
|
showToast("请输入煤层高")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.add(TunnelWorkingItem(name = "煤层高", value = seamHeight))
|
||||||
|
|
||||||
|
val recordPerson = mBinding.etRecordPerson.text.toString().trim()
|
||||||
|
if (recordPerson.isBlank()) {
|
||||||
|
showToast("请输入填写人")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.add(TunnelWorkingItem(name = "记录人", value = recordPerson))
|
||||||
|
|
||||||
|
val emptyDataList = roofLithologyList.filter {
|
||||||
|
it.positionStart.isBlank() || it.positionEnd.isBlank() || it.lithologyType.isBlank()
|
||||||
|
}
|
||||||
|
if (emptyDataList.isNotEmpty()) {
|
||||||
|
showToast("顶板岩性中存在部分编录点数据为空")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.add(TunnelWorkingItem(name = "顶板岩性", value = "", items = roofLithologyList))
|
||||||
|
|
||||||
|
acton()
|
||||||
|
}
|
||||||
|
|
||||||
|
private val list: MutableList<TunnelWorkingItem> = mutableListOf()
|
||||||
|
private fun exportExcelFile() {
|
||||||
|
showLoading()
|
||||||
|
val fileName = "${faceName}_${mBinding.tvWorkingDate.text}_${System.currentTimeMillis()}.xlsx"
|
||||||
|
val filePath = FileUtils.getFilePath(fileName)
|
||||||
|
ExcelExportUtils.exportToExcel(list, filePath) {
|
||||||
|
window.decorView.postDelayed({
|
||||||
|
hideLoading()
|
||||||
|
showToast("Excel导出完成")
|
||||||
|
}, 1500)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+16
-13
@@ -10,8 +10,8 @@ import com.zmkg.coaloperation.adapter.TunnelWorkingFaceAdapter
|
|||||||
import com.zmkg.coaloperation.adapter.TunnelWorkingFaceRecordAdapter
|
import com.zmkg.coaloperation.adapter.TunnelWorkingFaceRecordAdapter
|
||||||
import com.zmkg.coaloperation.base.BaseVMBActivity
|
import com.zmkg.coaloperation.base.BaseVMBActivity
|
||||||
import com.zmkg.coaloperation.databinding.ActivityTunnelingBinding
|
import com.zmkg.coaloperation.databinding.ActivityTunnelingBinding
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceRecordEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceRecordEntity
|
||||||
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceRecordViewModel
|
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceRecordViewModel
|
||||||
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceViewModel
|
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceViewModel
|
||||||
import com.zmkg.coaloperation.ui.tunneling.viewmodel.TunnelingViewModel
|
import com.zmkg.coaloperation.ui.tunneling.viewmodel.TunnelingViewModel
|
||||||
@@ -43,8 +43,8 @@ class TunnelingActivity :
|
|||||||
TunnelWorkingFaceAdapter(workingFaceList).apply {
|
TunnelWorkingFaceAdapter(workingFaceList).apply {
|
||||||
setOnItemChildClickListener { _, view, position ->
|
setOnItemChildClickListener { _, view, position ->
|
||||||
if (view.id == R.id.llWorkingFace) {
|
if (view.id == R.id.llWorkingFace) {
|
||||||
toActivity(WorkingFaceDetailActivity::class.java, Bundle().apply {
|
toActivity(WorkingFaceStatisticsActivity::class.java, Bundle().apply {
|
||||||
putParcelable(WorkingFaceDetailActivity.FACE_DETAIL, workingFaceList[position])
|
putParcelable(WorkingFaceStatisticsActivity.FACE_DETAIL, workingFaceList[position])
|
||||||
})
|
})
|
||||||
return@setOnItemChildClickListener
|
return@setOnItemChildClickListener
|
||||||
}
|
}
|
||||||
@@ -59,16 +59,16 @@ class TunnelingActivity :
|
|||||||
return@setOnItemChildClickListener
|
return@setOnItemChildClickListener
|
||||||
}
|
}
|
||||||
if (view.id == R.id.start_record) {
|
if (view.id == R.id.start_record) {
|
||||||
toActivity(AddWorkingPointActivity::class.java, Bundle().apply {
|
toActivity(AddWorkingFaceRecordActivity::class.java, Bundle().apply {
|
||||||
putLong(
|
putLong(
|
||||||
AddWorkingPointActivity.FACE_ID,
|
AddWorkingFaceRecordActivity.FACE_ID,
|
||||||
workingFaceList[position].surfaceId
|
workingFaceList[position].surfaceId
|
||||||
)
|
)
|
||||||
putString(
|
putString(
|
||||||
AddWorkingPointActivity.FACE_NAME,
|
AddWorkingFaceRecordActivity.FACE_NAME,
|
||||||
workingFaceList[position].surfaceName
|
workingFaceList[position].surfaceName
|
||||||
)
|
)
|
||||||
putInt(AddWorkingPointActivity.SHOW_TYPE, 0)
|
putInt(AddWorkingFaceRecordActivity.SHOW_TYPE, 0)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,8 +105,8 @@ class TunnelingActivity :
|
|||||||
|
|
||||||
override fun bindEvent() {
|
override fun bindEvent() {
|
||||||
mBinding.toolbarLay.titleTvRight.setOnClickListener {
|
mBinding.toolbarLay.titleTvRight.setOnClickListener {
|
||||||
toActivity(WorkFaceActivity::class.java, Bundle().apply {
|
toActivity(AddWorkingFaceActivity::class.java, Bundle().apply {
|
||||||
putString(WorkFaceActivity.WORK_FACE_TYPE, WorkFaceActivity.WorkFaceType.ADD.name)
|
putString(AddWorkingFaceActivity.WORK_FACE_TYPE, AddWorkingFaceActivity.WorkFaceType.ADD.name)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,8 +143,8 @@ class TunnelingActivity :
|
|||||||
val index = workingFaceList.indexOfFirst { it.surfaceId == event.surfaceId }
|
val index = workingFaceList.indexOfFirst { it.surfaceId == event.surfaceId }
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
//新增工作面
|
//新增工作面
|
||||||
val insertIndex = workingFaceList.size
|
val insertIndex = 0
|
||||||
workingFaceList.add(event)
|
workingFaceList.add(0,event)
|
||||||
workingFaceAdapter.notifyItemInserted(insertIndex)
|
workingFaceAdapter.notifyItemInserted(insertIndex)
|
||||||
workingFaceAdapter.notifyItemRangeChanged(insertIndex, insertIndex+1)
|
workingFaceAdapter.notifyItemRangeChanged(insertIndex, insertIndex+1)
|
||||||
return
|
return
|
||||||
@@ -166,15 +166,18 @@ class TunnelingActivity :
|
|||||||
faceEntity.records?.let { records ->
|
faceEntity.records?.let { records ->
|
||||||
val index = records.indexOfFirst { it.recordId == event.recordId }
|
val index = records.indexOfFirst { it.recordId == event.recordId }
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
records.add(event)
|
records.add(0,event)
|
||||||
} else {
|
} else {
|
||||||
records[index] = event
|
records[index] = event
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val recordAdapter = getRecordAdapter(position)
|
val recordAdapter = getRecordAdapter(position)
|
||||||
recordAdapter.notifyDataSetChanged()
|
recordAdapter.notifyDataSetChanged()
|
||||||
|
|
||||||
|
workingFaceAdapter.notifyItemChanged(position)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SuspiciousIndentation")
|
||||||
private fun getRecordAdapter(position:Int):TunnelWorkingFaceRecordAdapter {
|
private fun getRecordAdapter(position:Int):TunnelWorkingFaceRecordAdapter {
|
||||||
val viewHolder =
|
val viewHolder =
|
||||||
mBinding.rvList.findViewHolderForLayoutPosition(position) as TunnelWorkingFaceAdapter.VH
|
mBinding.rvList.findViewHolderForLayoutPosition(position) as TunnelWorkingFaceAdapter.VH
|
||||||
|
|||||||
-112
@@ -1,112 +0,0 @@
|
|||||||
package com.zmkg.coaloperation.ui.tunneling.activity
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.view.View
|
|
||||||
import com.zmkg.coaloperation.R
|
|
||||||
import com.zmkg.coaloperation.base.BaseVMBActivity
|
|
||||||
import com.zmkg.coaloperation.base.viewmodel.TestViewModel
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import com.zmkg.coaloperation.adapter.WorkingItemAdapter
|
|
||||||
import com.zmkg.coaloperation.bean.WorkingFaceItem
|
|
||||||
import com.zmkg.coaloperation.databinding.ActivityWorkingFaceDetail2Binding
|
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
|
||||||
import org.greenrobot.eventbus.Subscribe
|
|
||||||
import org.greenrobot.eventbus.ThreadMode
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工作面详情2
|
|
||||||
*/
|
|
||||||
class WorkingFaceDetail2Activity :
|
|
||||||
BaseVMBActivity<TestViewModel, ActivityWorkingFaceDetail2Binding>(R.layout.activity_working_face_detail2) {
|
|
||||||
companion object {
|
|
||||||
const val FACE_WORK_DETAIL_DATA = "faceWorkDetailData"
|
|
||||||
}
|
|
||||||
|
|
||||||
private val list: MutableList<WorkingFaceItem> = mutableListOf()
|
|
||||||
|
|
||||||
// private var detail:FaceWorkDetailBean?=null
|
|
||||||
private var detail: TunnelWorkingFaceEntity? = null
|
|
||||||
private val adapter by lazy {
|
|
||||||
WorkingItemAdapter(list)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun initView(savedInstanceState: Bundle?) {
|
|
||||||
mBinding.toolbarLay.vLine.visibility = View.GONE
|
|
||||||
mBinding.toolbarLay.rightText = "修改"
|
|
||||||
|
|
||||||
mBinding.rvFaceList.let {
|
|
||||||
it.layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
|
|
||||||
it.adapter = adapter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun initData() {
|
|
||||||
detail = intent.getParcelableExtra(FACE_WORK_DETAIL_DATA)
|
|
||||||
detail?.let {
|
|
||||||
loadFaceDetail(it)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun bindEvent() {
|
|
||||||
mBinding.toolbarLay.titleTvRight.setOnClickListener {
|
|
||||||
toActivity(WorkFaceActivity::class.java, Bundle().apply {
|
|
||||||
putString(WorkFaceActivity.WORK_FACE_TYPE, WorkFaceActivity.WorkFaceType.EDIT.name)
|
|
||||||
// putSerializable(WorkFaceActivity.FACE_WORK_DETAIL_DATA, detail)
|
|
||||||
putParcelable(WorkFaceActivity.FACE_WORK_DETAIL_DATA, detail)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun processClick(v: View?) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
|
||||||
private fun loadFaceDetail(it: TunnelWorkingFaceEntity) {
|
|
||||||
mBinding.toolbarLay.title = it.surfaceName
|
|
||||||
list.clear()
|
|
||||||
list.add(WorkingFaceItem(pageType = 0, name = "工作面名称", value = it.surfaceName))
|
|
||||||
list.add(WorkingFaceItem(pageType = 0, name = "所属煤层", value = it.seamName))
|
|
||||||
list.add(WorkingFaceItem(pageType = 0, name = "所属采区域", value = it.areaName))
|
|
||||||
list.add(WorkingFaceItem(pageType = 0, name = "工作面方位角", value = it.surfaceAzimuth))
|
|
||||||
list.add(WorkingFaceItem(pageType = 0, name = "工作面巷高", value = it.surfaceHeight))
|
|
||||||
list.add(WorkingFaceItem(pageType = 0, name = "工作面巷宽", value = it.surfaceWidth))
|
|
||||||
list.add(WorkingFaceItem(pageType = 0, name = "巷道性质", value = it.tunnelNature))
|
|
||||||
list.add(
|
|
||||||
WorkingFaceItem(
|
|
||||||
pageType = 0,
|
|
||||||
name = "计划工期",
|
|
||||||
value = "${it.planStartDate} ~ ${it.planEndDate}"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
list.add(WorkingFaceItem(pageType = 0, name = "地质类型", value = it.geologicalType))
|
|
||||||
list.add(
|
|
||||||
WorkingFaceItem(
|
|
||||||
pageType = 0,
|
|
||||||
name = "水文地质类型",
|
|
||||||
value = it.hydrogeologicalType
|
|
||||||
)
|
|
||||||
)
|
|
||||||
list.add(WorkingFaceItem(pageType = 0, name = "煤层发火性", value = it.seamIgnition))
|
|
||||||
list.add(WorkingFaceItem(pageType = 0, name = "瓦斯含量", value = it.seamGas))
|
|
||||||
list.add(
|
|
||||||
WorkingFaceItem(
|
|
||||||
pageType = 0,
|
|
||||||
name = "冲击地压危险性",
|
|
||||||
value = it.seamBumpPressure
|
|
||||||
)
|
|
||||||
)
|
|
||||||
list.add(WorkingFaceItem(pageType = 0, name = "支护形式", value = it.surfaceSupportForm))
|
|
||||||
|
|
||||||
adapter.notifyDataSetChanged()
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
fun onWorkingFaceEvent(event: TunnelWorkingFaceEntity) {
|
|
||||||
detail = event
|
|
||||||
detail?.let {
|
|
||||||
loadFaceDetail(it)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+68
-164
@@ -1,208 +1,112 @@
|
|||||||
package com.zmkg.coaloperation.ui.tunneling.activity
|
package com.zmkg.coaloperation.ui.tunneling.activity
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import com.zmkg.coaloperation.R
|
import com.zmkg.coaloperation.R
|
||||||
import com.zmkg.coaloperation.base.BaseVMBActivity
|
import com.zmkg.coaloperation.base.BaseVMBActivity
|
||||||
import androidx.core.graphics.toColorInt
|
import com.zmkg.coaloperation.base.viewmodel.TestViewModel
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.zmkg.coaloperation.adapter.TunnelWorkingItemAdapter
|
||||||
|
import com.zmkg.coaloperation.bean.TunnelWorkingItem
|
||||||
import com.zmkg.coaloperation.databinding.ActivityWorkingFaceDetailBinding
|
import com.zmkg.coaloperation.databinding.ActivityWorkingFaceDetailBinding
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
|
||||||
import com.zmkg.coaloperation.db.viewmodel.TunnelRoofLithologyViewModel
|
|
||||||
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceRecordViewModel
|
|
||||||
import com.zmkg.coaloperation.ui.tunneling.adapter.TunnelingRockNatureAdapter
|
|
||||||
import com.zmkg.coaloperation.ui.tunneling.bean.FaceWorkDetailBean
|
|
||||||
import com.zmkg.coaloperation.ui.tunneling.viewmodel.TunnelingViewModel
|
|
||||||
import com.zmkg.coaloperation.utils.ScreenUtil
|
|
||||||
import org.greenrobot.eventbus.Subscribe
|
import org.greenrobot.eventbus.Subscribe
|
||||||
import org.greenrobot.eventbus.ThreadMode
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
import kotlin.apply
|
|
||||||
import kotlin.math.roundToInt
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工作面详情
|
* 工作面详情2
|
||||||
*/
|
*/
|
||||||
class WorkingFaceDetailActivity :
|
class WorkingFaceDetailActivity :
|
||||||
BaseVMBActivity<TunnelingViewModel, ActivityWorkingFaceDetailBinding>(R.layout.activity_working_face_detail) {
|
BaseVMBActivity<TestViewModel, ActivityWorkingFaceDetailBinding>(R.layout.activity_working_face_detail) {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val FACE_DETAIL = "faceDetail"
|
const val FACE_WORK_DETAIL_DATA = "faceWorkDetailData"
|
||||||
}
|
}
|
||||||
|
|
||||||
private val workingFaceRecordViewModel: TunnelWorkingFaceRecordViewModel by lazy {
|
private val list: MutableList<TunnelWorkingItem> = mutableListOf()
|
||||||
ViewModelProvider(this)[TunnelWorkingFaceRecordViewModel::class.java]
|
|
||||||
}
|
|
||||||
|
|
||||||
private val roofLithologyViewModel: TunnelRoofLithologyViewModel by lazy {
|
// private var detail:FaceWorkDetailBean?=null
|
||||||
ViewModelProvider(this)[TunnelRoofLithologyViewModel::class.java]
|
private var detail: TunnelWorkingFaceEntity? = null
|
||||||
|
private val adapter by lazy {
|
||||||
|
TunnelWorkingItemAdapter(list)
|
||||||
}
|
}
|
||||||
private val tunnelingRockNatureAdapter: TunnelingRockNatureAdapter by lazy {
|
|
||||||
TunnelingRockNatureAdapter(lithologyList)
|
|
||||||
}
|
|
||||||
|
|
||||||
private val lithologyList:MutableList<TunnelRoofLithologyEntity> = mutableListOf()
|
|
||||||
|
|
||||||
private var faceDetail: TunnelWorkingFaceEntity? = null
|
|
||||||
|
|
||||||
override fun initView(savedInstanceState: Bundle?) {
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
mBinding.toolbarLay.rightText = "查看详情"
|
|
||||||
mBinding.toolbarLay.vLine.visibility = View.GONE
|
mBinding.toolbarLay.vLine.visibility = View.GONE
|
||||||
mBinding.rvRockNature.adapter = tunnelingRockNatureAdapter
|
mBinding.toolbarLay.rightText = "修改"
|
||||||
|
|
||||||
mBinding.arcViewGreen.let {
|
mBinding.rvFaceList.let {
|
||||||
it.arcColor = "#30E0A1".toColorInt()
|
it.layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
|
||||||
it.startAngle = 0f
|
it.adapter = adapter
|
||||||
it.sweepAngle = 360f
|
|
||||||
it.strokeWidth = 12f
|
|
||||||
it.radius = ScreenUtil.dp2px(122f - 12f) / 2f
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mBinding.arcViewRed.let {
|
|
||||||
it.arcColor = "#FA2256".toColorInt()
|
|
||||||
it.startAngle = -90f
|
|
||||||
it.strokeWidth = 10f
|
|
||||||
it.sweepAngle = 0f
|
|
||||||
it.radius = ScreenUtil.dp2px(100f - 10f) / 2f
|
|
||||||
}
|
|
||||||
|
|
||||||
mBinding.arcViewBlue.let {
|
|
||||||
it.arcColor = "#246CF9".toColorInt()
|
|
||||||
it.startAngle = -90f
|
|
||||||
it.strokeWidth = 10f
|
|
||||||
it.sweepAngle = 0f
|
|
||||||
it.radius = ScreenUtil.dp2px(100f - 10f) / 2f
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun initData() {
|
override fun initData() {
|
||||||
// val surfaceId = intent.getStringExtra("surfaceId")
|
detail = intent.getParcelableExtra(FACE_WORK_DETAIL_DATA)
|
||||||
// if (TextUtils.isEmpty(surfaceId)) {
|
detail?.let {
|
||||||
// finish()
|
loadFaceDetail(it)
|
||||||
// } else {
|
|
||||||
// mViewModel.getTunnelingSurfaceDetail(surfaceId)
|
|
||||||
// }
|
|
||||||
faceDetail = intent.getParcelableExtra(FACE_DETAIL)
|
|
||||||
|
|
||||||
faceDetail?.let { detail ->
|
|
||||||
loadFaceDetail()
|
|
||||||
workingFaceRecordViewModel.getLastEntity(detail.surfaceId) { record ->
|
|
||||||
record?.let {
|
|
||||||
mBinding.tvYesterdayLen.text = "${it.workingFootage}m"
|
|
||||||
mBinding.tvWorkingFaceAngle.text = "${it.seamDip}"
|
|
||||||
// mBinding.tvMonthAccumulateLen.text = "${it.monthFootage}m"
|
|
||||||
mBinding.tvWorkingFaceWater.text = "${it.waterYield}"
|
|
||||||
|
|
||||||
roofLithologyViewModel.getEntityList(it.recordId) { list ->
|
|
||||||
list?.let {
|
|
||||||
lithologyList.addAll(it)
|
|
||||||
tunnelingRockNatureAdapter.notifyDataSetChanged()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun bindEvent() {
|
override fun bindEvent() {
|
||||||
mBinding.toolbarLay.titleTvRight.setOnClickListener {
|
mBinding.toolbarLay.titleTvRight.setOnClickListener {
|
||||||
toActivity(WorkingFaceDetail2Activity::class.java, Bundle().apply {
|
toActivity(AddWorkingFaceActivity::class.java, Bundle().apply {
|
||||||
// putSerializable(
|
putString(AddWorkingFaceActivity.WORK_FACE_TYPE, AddWorkingFaceActivity.WorkFaceType.EDIT.name)
|
||||||
// WorkingFaceDetail2Activity.FACE_WORK_DETAIL_DATA,
|
// putSerializable(WorkFaceActivity.FACE_WORK_DETAIL_DATA, detail)
|
||||||
// mViewModel.faceWorkDetailData.value as Serializable
|
putParcelable(AddWorkingFaceActivity.FACE_WORK_DETAIL_DATA, detail)
|
||||||
// )
|
|
||||||
putParcelable(WorkingFaceDetail2Activity.FACE_WORK_DETAIL_DATA, faceDetail)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun processClick(v: View?) {
|
override fun processClick(v: View?) {
|
||||||
}
|
|
||||||
|
|
||||||
override fun createObserve() {
|
|
||||||
super.createObserve()
|
|
||||||
// lifecycleScope.launch {
|
|
||||||
// repeatOnLifecycle(Lifecycle.State.CREATED) {
|
|
||||||
// mViewModel.faceWorkDetailData.collectLatest {
|
|
||||||
// if (it != null) {
|
|
||||||
// setDataView(it)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setDataView(bean: FaceWorkDetailBean?) {
|
|
||||||
bean ?: return
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun stringToDouble(numText: String?): Double {
|
|
||||||
if (numText.isNullOrEmpty() || numText.isBlank()) return 0.toDouble()
|
|
||||||
return numText.toDouble()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun loadFaceDetail() {
|
|
||||||
val bean = faceDetail!!
|
|
||||||
mBinding.apply {
|
|
||||||
toolbarLay.title = bean.surfaceName
|
|
||||||
|
|
||||||
val total = stringToDouble(bean.totalFootage)
|
|
||||||
val accumulative = stringToDouble(bean.accumulativeFootage)
|
|
||||||
val remaining = stringToDouble(bean.remainingFootage)
|
|
||||||
|
|
||||||
tvLenTotal.text = "总进尺:${total}m"
|
|
||||||
tvLenAccumulate.text = "累计进尺:${accumulative}m"
|
|
||||||
tvLenRemain.text = "剩余进尺:${remaining}m"
|
|
||||||
|
|
||||||
//累计进尺占比
|
|
||||||
var radio = 0
|
|
||||||
|
|
||||||
//累计进尺圆圈占比
|
|
||||||
var arcViewRadio: Float
|
|
||||||
|
|
||||||
if (accumulative >= total) {
|
|
||||||
radio = 100
|
|
||||||
arcViewRadio = 360F
|
|
||||||
} else if (accumulative <= 0) {
|
|
||||||
radio = 0
|
|
||||||
arcViewRadio = 0F
|
|
||||||
} else {
|
|
||||||
arcViewRadio = (accumulative * 100F / total).toFloat()
|
|
||||||
radio = arcViewRadio.roundToInt()
|
|
||||||
}
|
|
||||||
|
|
||||||
arcViewRed.let {
|
|
||||||
it.sweepAngle = arcViewRadio
|
|
||||||
}
|
|
||||||
|
|
||||||
arcViewBlue.let {
|
|
||||||
it.sweepAngle = (360F - arcViewRadio) * -1F
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
mBinding.tvCompleteRate.text = "$radio%"
|
|
||||||
|
|
||||||
// tvYesterdayLen.text = "${bean?.yesterdayFootage}m"
|
|
||||||
// tvWorkingFaceAngle.text = "${bean?.latestRecord?.seamDip.orEmptyDefaultInt()}"
|
|
||||||
// tvMonthAccumulateLen.text = "${bean?.monthFootage}m"
|
|
||||||
// tvWorkingFaceWater.text = "${bean?.latestRecord?.waterYield.orEmptyDefaultInt()}m"
|
|
||||||
|
|
||||||
// val list = bean?.latestRecord?.mineWorkingLithologyList
|
|
||||||
// if (list.isNullOrEmpty()) {
|
|
||||||
// tvYesterdayRockType.visibility = View.GONE
|
|
||||||
// } else {
|
|
||||||
// tvYesterdayRockType.visibility = View.VISIBLE
|
|
||||||
// tunnelingRockNatureAdapter.setNewInstance(list)
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
|
private fun loadFaceDetail(it: TunnelWorkingFaceEntity) {
|
||||||
|
mBinding.toolbarLay.title = it.surfaceName
|
||||||
|
list.clear()
|
||||||
|
list.add(TunnelWorkingItem(pageType = 0, name = "工作面名称", value = it.surfaceName))
|
||||||
|
list.add(TunnelWorkingItem(pageType = 0, name = "所属煤层", value = it.seamName))
|
||||||
|
list.add(TunnelWorkingItem(pageType = 0, name = "所属采区域", value = it.areaName))
|
||||||
|
list.add(TunnelWorkingItem(pageType = 0, name = "工作面方位角", value = it.surfaceAzimuth))
|
||||||
|
list.add(TunnelWorkingItem(pageType = 0, name = "工作面巷高", value = it.surfaceHeight))
|
||||||
|
list.add(TunnelWorkingItem(pageType = 0, name = "工作面巷宽", value = it.surfaceWidth))
|
||||||
|
list.add(TunnelWorkingItem(pageType = 0, name = "巷道性质", value = it.tunnelNature))
|
||||||
|
list.add(
|
||||||
|
TunnelWorkingItem(
|
||||||
|
pageType = 0,
|
||||||
|
name = "计划工期",
|
||||||
|
value = "${it.planStartDate} ~ ${it.planEndDate}"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
list.add(TunnelWorkingItem(pageType = 0, name = "地质类型", value = it.geologicalType))
|
||||||
|
list.add(
|
||||||
|
TunnelWorkingItem(
|
||||||
|
pageType = 0,
|
||||||
|
name = "水文地质类型",
|
||||||
|
value = it.hydrogeologicalType
|
||||||
|
)
|
||||||
|
)
|
||||||
|
list.add(TunnelWorkingItem(pageType = 0, name = "煤层发火性", value = it.seamIgnition))
|
||||||
|
list.add(TunnelWorkingItem(pageType = 0, name = "瓦斯含量", value = it.seamGas))
|
||||||
|
list.add(
|
||||||
|
TunnelWorkingItem(
|
||||||
|
pageType = 0,
|
||||||
|
name = "冲击地压危险性",
|
||||||
|
value = it.seamBumpPressure
|
||||||
|
)
|
||||||
|
)
|
||||||
|
list.add(TunnelWorkingItem(pageType = 0, name = "支护形式", value = it.surfaceSupportForm))
|
||||||
|
|
||||||
|
adapter.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
fun onWorkingFaceEvent(event: TunnelWorkingFaceEntity) {
|
fun onWorkingFaceEvent(event: TunnelWorkingFaceEntity) {
|
||||||
faceDetail = event
|
detail = event
|
||||||
loadFaceDetail()
|
detail?.let {
|
||||||
|
loadFaceDetail(it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+29
-28
@@ -7,16 +7,15 @@ import android.view.View
|
|||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import com.zmkg.coaloperation.R
|
import com.zmkg.coaloperation.R
|
||||||
import com.zmkg.coaloperation.adapter.WorkingItemAdapter
|
import com.zmkg.coaloperation.adapter.TunnelWorkingItemAdapter
|
||||||
import com.zmkg.coaloperation.base.BaseVMBActivity
|
import com.zmkg.coaloperation.base.BaseVMBActivity
|
||||||
import com.zmkg.coaloperation.base.viewmodel.TestViewModel
|
import com.zmkg.coaloperation.base.viewmodel.TestViewModel
|
||||||
import com.zmkg.coaloperation.bean.RockItem
|
import com.zmkg.coaloperation.bean.TunnelWorkingItem
|
||||||
import com.zmkg.coaloperation.bean.WorkingFaceItem
|
import com.zmkg.coaloperation.databinding.ActivityWorkingFaceRecordBinding
|
||||||
import com.zmkg.coaloperation.databinding.ActivityWorkingPointBinding
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceRecordEntity
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceRecordEntity
|
|
||||||
import com.zmkg.coaloperation.db.viewmodel.TunnelRoofLithologyViewModel
|
import com.zmkg.coaloperation.db.viewmodel.TunnelRoofLithologyViewModel
|
||||||
import com.zmkg.coaloperation.utils.DictUtils
|
import com.zmkg.coaloperation.utils.DictUtils
|
||||||
|
import com.zmkg.coaloperation.utils.formatDecimalString
|
||||||
import com.zmkg.coaloperation.utils.toJsonString
|
import com.zmkg.coaloperation.utils.toJsonString
|
||||||
import org.greenrobot.eventbus.Subscribe
|
import org.greenrobot.eventbus.Subscribe
|
||||||
import org.greenrobot.eventbus.ThreadMode
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
@@ -24,8 +23,8 @@ import org.greenrobot.eventbus.ThreadMode
|
|||||||
/**
|
/**
|
||||||
* 查看(棋盘井)
|
* 查看(棋盘井)
|
||||||
*/
|
*/
|
||||||
class WorkingPointActivity :
|
class WorkingFaceRecordActivity :
|
||||||
BaseVMBActivity<TestViewModel, ActivityWorkingPointBinding>(R.layout.activity_working_point) {
|
BaseVMBActivity<TestViewModel, ActivityWorkingFaceRecordBinding>(R.layout.activity_working_face_record) {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val TAG = "WorkingPointActivity"
|
const val TAG = "WorkingPointActivity"
|
||||||
@@ -35,13 +34,13 @@ class WorkingPointActivity :
|
|||||||
|
|
||||||
private var faceName: String? = null
|
private var faceName: String? = null
|
||||||
private var faceRecord: TunnelWorkingFaceRecordEntity? = null
|
private var faceRecord: TunnelWorkingFaceRecordEntity? = null
|
||||||
private val list: MutableList<WorkingFaceItem> = mutableListOf()
|
private val list: MutableList<TunnelWorkingItem> = mutableListOf()
|
||||||
|
|
||||||
private val roofLithologyViewModel: TunnelRoofLithologyViewModel by lazy {
|
private val roofLithologyViewModel: TunnelRoofLithologyViewModel by lazy {
|
||||||
ViewModelProvider(this)[TunnelRoofLithologyViewModel::class.java]
|
ViewModelProvider(this)[TunnelRoofLithologyViewModel::class.java]
|
||||||
}
|
}
|
||||||
private val adapter by lazy {
|
private val adapter by lazy {
|
||||||
WorkingItemAdapter(list)
|
TunnelWorkingItemAdapter(list)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun initView(savedInstanceState: Bundle?) {
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
@@ -49,10 +48,10 @@ class WorkingPointActivity :
|
|||||||
mBinding.toolbarLay.title = "查看详情"
|
mBinding.toolbarLay.title = "查看详情"
|
||||||
mBinding.toolbarLay.rightText = "修改"
|
mBinding.toolbarLay.rightText = "修改"
|
||||||
mBinding.toolbarLay.titleTvRight.setOnClickListener {
|
mBinding.toolbarLay.titleTvRight.setOnClickListener {
|
||||||
toActivity(AddWorkingPointActivity::class.java, Bundle().apply {
|
toActivity(AddWorkingFaceRecordActivity::class.java, Bundle().apply {
|
||||||
putInt(AddWorkingPointActivity.SHOW_TYPE, 1)
|
putInt(AddWorkingFaceRecordActivity.SHOW_TYPE, 1)
|
||||||
putString(AddWorkingPointActivity.FACE_NAME, faceName)
|
putString(AddWorkingFaceRecordActivity.FACE_NAME, faceName)
|
||||||
putParcelable(AddWorkingPointActivity.FACE_RECORD, faceRecord)
|
putParcelable(AddWorkingFaceRecordActivity.FACE_RECORD, faceRecord)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
mBinding.rvPointList.let {
|
mBinding.rvPointList.let {
|
||||||
@@ -67,38 +66,40 @@ class WorkingPointActivity :
|
|||||||
Log.d(TAG, "loadFaceRecord: ${faceRecord.toJsonString()}")
|
Log.d(TAG, "loadFaceRecord: ${faceRecord.toJsonString()}")
|
||||||
faceRecord?.let {
|
faceRecord?.let {
|
||||||
loadFaceRecord(it)
|
loadFaceRecord(it)
|
||||||
roofLithologyViewModel.getEntityList(it.recordId) { lithologyEntities ->
|
|
||||||
list[6].items = lithologyEntities
|
|
||||||
adapter.notifyItemChanged(6)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
private fun loadFaceRecord(it: TunnelWorkingFaceRecordEntity) {
|
private fun loadFaceRecord(it: TunnelWorkingFaceRecordEntity) {
|
||||||
list.clear()
|
list.clear()
|
||||||
list.add(WorkingFaceItem(pageType = 1, name = "工作面名称", value = faceName))
|
list.add(TunnelWorkingItem(pageType = 1, name = "工作面名称", value = faceName))
|
||||||
list.add(WorkingFaceItem(pageType = 1, name = "施工日期", value = it.workingDate))
|
list.add(TunnelWorkingItem(pageType = 1, name = "施工日期", value = it.workingDate))
|
||||||
list.add(
|
list.add(
|
||||||
WorkingFaceItem(
|
TunnelWorkingItem(
|
||||||
pageType = 1,
|
pageType = 1,
|
||||||
name = "施工班次",
|
name = "施工班次",
|
||||||
value = DictUtils.getTeamShift(it.teamShift)
|
value = DictUtils.getTeamShift(it.teamShift)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
list.add(WorkingFaceItem(pageType = 1, name = "施工队伍", value = it.teamName))
|
list.add(TunnelWorkingItem(pageType = 1, name = "施工队伍", value = it.teamName))
|
||||||
list.add(WorkingFaceItem(pageType = 1, name = "带班队长", value = it.teamLeader))
|
list.add(TunnelWorkingItem(pageType = 1, name = "带班队长", value = it.teamLeader))
|
||||||
list.add(WorkingFaceItem(pageType = 1, name = "本班进尺", value = it.workingFootage))
|
list.add(TunnelWorkingItem(pageType = 1, name = "本班进尺", value = "${it.workingFootage?.formatDecimalString()}m"))
|
||||||
|
|
||||||
// val rockList = mutableListOf<TunnelRoofLithologyEntity>()
|
// val rockList = mutableListOf<TunnelRoofLithologyEntity>()
|
||||||
// rockList.add(RockItem(startLen = 0, endLen = 1, rockType = "泥"))
|
// rockList.add(RockItem(startLen = 0, endLen = 1, rockType = "泥"))
|
||||||
// rockList.add(RockItem(startLen = 0, endLen = 1, rockType = "砂"))
|
// rockList.add(RockItem(startLen = 0, endLen = 1, rockType = "砂"))
|
||||||
list.add(WorkingFaceItem(pageType = 1, name = "顶板岩性", value = "", items = null))
|
list.add(TunnelWorkingItem(pageType = 1, name = "顶板岩性", value = "", items = null))
|
||||||
list.add(WorkingFaceItem(pageType = 1, name = "煤层倾角", value = it.seamDip))
|
list.add(TunnelWorkingItem(pageType = 1, name = "煤层倾角", value = "${it.seamDip?.formatDecimalString()}°"))
|
||||||
list.add(WorkingFaceItem(pageType = 1, name = "煤层高", value = it.seamHeight))
|
list.add(TunnelWorkingItem(pageType = 1, name = "煤层高", value = "${it.seamHeight?.formatDecimalString()}m"))
|
||||||
list.add(WorkingFaceItem(pageType = 1, name = "记录人", value = it.recordPerson))
|
list.add(TunnelWorkingItem(pageType = 1, name = "记录人", value = it.recordPerson))
|
||||||
|
|
||||||
adapter.notifyDataSetChanged()
|
adapter.notifyDataSetChanged()
|
||||||
|
|
||||||
|
|
||||||
|
roofLithologyViewModel.getEntityList(it.recordId) { lithologyEntities ->
|
||||||
|
list[6].items = lithologyEntities
|
||||||
|
adapter.notifyItemChanged(6)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun bindEvent() {
|
override fun bindEvent() {
|
||||||
+208
@@ -0,0 +1,208 @@
|
|||||||
|
package com.zmkg.coaloperation.ui.tunneling.activity
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.zmkg.coaloperation.R
|
||||||
|
import com.zmkg.coaloperation.base.BaseVMBActivity
|
||||||
|
import androidx.core.graphics.toColorInt
|
||||||
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelRoofLithologyEntity
|
||||||
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
|
import com.zmkg.coaloperation.db.viewmodel.TunnelRoofLithologyViewModel
|
||||||
|
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceRecordViewModel
|
||||||
|
import com.zmkg.coaloperation.adapter.TunnelingRockNatureAdapter
|
||||||
|
import com.zmkg.coaloperation.databinding.ActivityWorkingFaceStatisticsBinding
|
||||||
|
import com.zmkg.coaloperation.ui.tunneling.viewmodel.TunnelingViewModel
|
||||||
|
import com.zmkg.coaloperation.utils.ScreenUtil
|
||||||
|
import com.zmkg.coaloperation.utils.formatDecimalString
|
||||||
|
import org.greenrobot.eventbus.Subscribe
|
||||||
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
|
import kotlin.apply
|
||||||
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工作面详情
|
||||||
|
*/
|
||||||
|
class WorkingFaceStatisticsActivity :
|
||||||
|
BaseVMBActivity<TunnelingViewModel, ActivityWorkingFaceStatisticsBinding>(R.layout.activity_working_face_statistics) {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
const val FACE_DETAIL = "faceDetail"
|
||||||
|
}
|
||||||
|
|
||||||
|
private val workingFaceRecordViewModel: TunnelWorkingFaceRecordViewModel by lazy {
|
||||||
|
ViewModelProvider(this)[TunnelWorkingFaceRecordViewModel::class.java]
|
||||||
|
}
|
||||||
|
|
||||||
|
private val roofLithologyViewModel: TunnelRoofLithologyViewModel by lazy {
|
||||||
|
ViewModelProvider(this)[TunnelRoofLithologyViewModel::class.java]
|
||||||
|
}
|
||||||
|
private val tunnelingRockNatureAdapter: TunnelingRockNatureAdapter by lazy {
|
||||||
|
TunnelingRockNatureAdapter(lithologyList)
|
||||||
|
}
|
||||||
|
|
||||||
|
private val lithologyList:MutableList<TunnelRoofLithologyEntity> = mutableListOf()
|
||||||
|
|
||||||
|
private var faceDetail: TunnelWorkingFaceEntity? = null
|
||||||
|
|
||||||
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
|
mBinding.toolbarLay.rightText = "查看详情"
|
||||||
|
mBinding.toolbarLay.vLine.visibility = View.GONE
|
||||||
|
mBinding.rvRockNature.adapter = tunnelingRockNatureAdapter
|
||||||
|
|
||||||
|
mBinding.arcViewGreen.let {
|
||||||
|
it.arcColor = "#30E0A1".toColorInt()
|
||||||
|
it.startAngle = 0f
|
||||||
|
it.sweepAngle = 360f
|
||||||
|
it.strokeWidth = 12f
|
||||||
|
it.radius = ScreenUtil.dp2px(122f - 12f) / 2f
|
||||||
|
}
|
||||||
|
|
||||||
|
mBinding.arcViewRed.let {
|
||||||
|
it.arcColor = "#FA2256".toColorInt()
|
||||||
|
it.startAngle = -90f
|
||||||
|
it.strokeWidth = 10f
|
||||||
|
it.sweepAngle = 0f
|
||||||
|
it.radius = ScreenUtil.dp2px(100f - 10f) / 2f
|
||||||
|
}
|
||||||
|
|
||||||
|
mBinding.arcViewBlue.let {
|
||||||
|
it.arcColor = "#246CF9".toColorInt()
|
||||||
|
it.startAngle = -90f
|
||||||
|
it.strokeWidth = 10f
|
||||||
|
it.sweepAngle = 0f
|
||||||
|
it.radius = ScreenUtil.dp2px(100f - 10f) / 2f
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
// val surfaceId = intent.getStringExtra("surfaceId")
|
||||||
|
// if (TextUtils.isEmpty(surfaceId)) {
|
||||||
|
// finish()
|
||||||
|
// } else {
|
||||||
|
// mViewModel.getTunnelingSurfaceDetail(surfaceId)
|
||||||
|
// }
|
||||||
|
faceDetail = intent.getParcelableExtra(FACE_DETAIL)
|
||||||
|
|
||||||
|
faceDetail?.let { detail ->
|
||||||
|
loadFaceDetail()
|
||||||
|
workingFaceRecordViewModel.getLastEntity(detail.surfaceId) { record ->
|
||||||
|
record?.let {
|
||||||
|
mBinding.tvYesterdayLen.text = "${it.workingFootage?.formatDecimalString()}m"
|
||||||
|
mBinding.tvWorkingFaceAngle.text = "${it.seamDip?.formatDecimalString()}°"
|
||||||
|
// mBinding.tvMonthAccumulateLen.text = "${it.monthFootage}m"
|
||||||
|
mBinding.tvWorkingFaceWater.text = "${it.waterYield?.formatDecimalString()}"
|
||||||
|
|
||||||
|
roofLithologyViewModel.getEntityList(it.recordId) { list ->
|
||||||
|
list?.let {
|
||||||
|
lithologyList.addAll(it)
|
||||||
|
tunnelingRockNatureAdapter.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun bindEvent() {
|
||||||
|
mBinding.toolbarLay.titleTvRight.setOnClickListener {
|
||||||
|
toActivity(WorkingFaceDetailActivity::class.java, Bundle().apply {
|
||||||
|
// putSerializable(
|
||||||
|
// WorkingFaceDetail2Activity.FACE_WORK_DETAIL_DATA,
|
||||||
|
// mViewModel.faceWorkDetailData.value as Serializable
|
||||||
|
// )
|
||||||
|
putParcelable(WorkingFaceDetailActivity.FACE_WORK_DETAIL_DATA, faceDetail)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun processClick(v: View?) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun createObserve() {
|
||||||
|
super.createObserve()
|
||||||
|
// lifecycleScope.launch {
|
||||||
|
// repeatOnLifecycle(Lifecycle.State.CREATED) {
|
||||||
|
// mViewModel.faceWorkDetailData.collectLatest {
|
||||||
|
// if (it != null) {
|
||||||
|
// setDataView(it)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
// private fun setDataView(bean: FaceWorkDetailBean?) {
|
||||||
|
// bean ?: return
|
||||||
|
// }
|
||||||
|
|
||||||
|
private fun stringToDouble(numText: String?): Double {
|
||||||
|
if (numText.isNullOrEmpty() || numText.isBlank()) return 0.toDouble()
|
||||||
|
return numText.toDouble()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun loadFaceDetail() {
|
||||||
|
val bean = faceDetail!!
|
||||||
|
mBinding.apply {
|
||||||
|
toolbarLay.title = bean.surfaceName
|
||||||
|
|
||||||
|
val total = stringToDouble(bean.totalFootage)
|
||||||
|
val accumulative = stringToDouble(bean.accumulativeFootage)
|
||||||
|
val remaining = stringToDouble(bean.remainingFootage)
|
||||||
|
|
||||||
|
tvLenTotal.text = "总进尺:${bean.totalFootage?.formatDecimalString()}m"
|
||||||
|
tvLenAccumulate.text = "累计进尺:${bean.accumulativeFootage?.formatDecimalString()}m"
|
||||||
|
tvLenRemain.text = "剩余进尺:${bean.remainingFootage?.formatDecimalString()}m"
|
||||||
|
|
||||||
|
//累计进尺占比
|
||||||
|
var radio = 0
|
||||||
|
|
||||||
|
//累计进尺圆圈占比
|
||||||
|
var arcViewRadio: Float
|
||||||
|
|
||||||
|
if (accumulative >= total) {
|
||||||
|
radio = 100
|
||||||
|
arcViewRadio = 360F
|
||||||
|
} else if (accumulative <= 0) {
|
||||||
|
radio = 0
|
||||||
|
arcViewRadio = 0F
|
||||||
|
} else {
|
||||||
|
arcViewRadio = (accumulative * 100F / total).toFloat()
|
||||||
|
radio = arcViewRadio.roundToInt()
|
||||||
|
}
|
||||||
|
|
||||||
|
arcViewRed.let {
|
||||||
|
it.sweepAngle = arcViewRadio
|
||||||
|
}
|
||||||
|
|
||||||
|
arcViewBlue.let {
|
||||||
|
it.sweepAngle = (360F - arcViewRadio) * -1F
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mBinding.tvCompleteRate.text = "$radio%"
|
||||||
|
|
||||||
|
// tvYesterdayLen.text = "${bean?.yesterdayFootage}m"
|
||||||
|
// tvWorkingFaceAngle.text = "${bean?.latestRecord?.seamDip.orEmptyDefaultInt()}"
|
||||||
|
// tvMonthAccumulateLen.text = "${bean?.monthFootage}m"
|
||||||
|
// tvWorkingFaceWater.text = "${bean?.latestRecord?.waterYield.orEmptyDefaultInt()}m"
|
||||||
|
|
||||||
|
// val list = bean?.latestRecord?.mineWorkingLithologyList
|
||||||
|
// if (list.isNullOrEmpty()) {
|
||||||
|
// tvYesterdayRockType.visibility = View.GONE
|
||||||
|
// } else {
|
||||||
|
// tvYesterdayRockType.visibility = View.VISIBLE
|
||||||
|
// tunnelingRockNatureAdapter.setNewInstance(list)
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
fun onWorkingFaceEvent(event: TunnelWorkingFaceEntity) {
|
||||||
|
faceDetail = event
|
||||||
|
loadFaceDetail()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
-64
@@ -1,64 +0,0 @@
|
|||||||
//package com.zmkg.coaloperation.ui.tunneling.adapter
|
|
||||||
//
|
|
||||||
//import android.content.Intent
|
|
||||||
//import android.view.View
|
|
||||||
//import android.widget.ImageView
|
|
||||||
//import android.widget.LinearLayout
|
|
||||||
//import androidx.recyclerview.widget.RecyclerView
|
|
||||||
//import com.chad.library.adapter.base.BaseQuickAdapter
|
|
||||||
//import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
|
||||||
//import com.zmkg.coaloperation.R
|
|
||||||
//import com.zmkg.coaloperation.ui.tunneling.bean.TunnelingHomeBean
|
|
||||||
//import com.zmkg.coaloperation.ui.tunneling.activity.WorkingPointActivity
|
|
||||||
//
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * 掘进首页列表
|
|
||||||
// */
|
|
||||||
//
|
|
||||||
//class TunnelingHomeAdapter(var listener: (Int,String?)->Unit) : BaseQuickAdapter<TunnelingHomeBean, BaseViewHolder>(
|
|
||||||
// R.layout.item_geological_list
|
|
||||||
//) {
|
|
||||||
//
|
|
||||||
// override fun convert(holder: BaseViewHolder, item: TunnelingHomeBean) {
|
|
||||||
// val tunnelingHomeListAdapter: TunnelingHomeListAdapter by lazy { TunnelingHomeListAdapter().apply {
|
|
||||||
// setOnItemClickListener { adapter, view, position ->
|
|
||||||
// context.startActivity(Intent(context, WorkingPointActivity::class.java))
|
|
||||||
// }
|
|
||||||
// } }
|
|
||||||
//
|
|
||||||
// val rvList = holder.getView<RecyclerView>(R.id.rv_content)
|
|
||||||
// val expand = holder.getView<ImageView>(R.id.expand)
|
|
||||||
// val recordLayout = holder.getView<LinearLayout>(R.id.record_layout)
|
|
||||||
//
|
|
||||||
// holder.apply {
|
|
||||||
// setText(R.id.title, item.surfaceName)
|
|
||||||
// rvList.adapter = tunnelingHomeListAdapter
|
|
||||||
// tunnelingHomeListAdapter.setNewInstance(item.contentList?:mutableListOf())
|
|
||||||
// }
|
|
||||||
// expand.setOnClickListener {
|
|
||||||
// val imageView = it as ImageView
|
|
||||||
// if (imageView.tag.equals("0")) {//收起状态
|
|
||||||
// imageView.setImageResource(R.drawable.ic_arrow_down_white)
|
|
||||||
// recordLayout.visibility = View.VISIBLE
|
|
||||||
// imageView.tag = "1"
|
|
||||||
//
|
|
||||||
// if (data[holder.absoluteAdapterPosition].contentList.isNullOrEmpty()) {
|
|
||||||
//// if (context is TunnelingActivity) {
|
|
||||||
//// (context as TunnelingActivity).getRecordList(holder.layoutPosition) {
|
|
||||||
//// tunnelingHomeListAdapter.notifyDataSetChanged()
|
|
||||||
//// }
|
|
||||||
//// }
|
|
||||||
// listener.invoke(holder.absoluteAdapterPosition,data[holder.absoluteAdapterPosition].surfaceId)
|
|
||||||
// }
|
|
||||||
// } else {//展开状态
|
|
||||||
// imageView.setImageResource(R.drawable.ic_arrow_right_gray)
|
|
||||||
// recordLayout.visibility = View.GONE
|
|
||||||
// imageView.tag = "0"
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// init {
|
|
||||||
// addChildClickViewIds(R.id.start_record)
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
//package com.zmkg.coaloperation.ui.tunneling.adapter
|
|
||||||
//
|
|
||||||
//import com.chad.library.adapter.base.BaseQuickAdapter
|
|
||||||
//import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
|
||||||
//import com.zmkg.coaloperation.R
|
|
||||||
//import com.zmkg.coaloperation.ui.tunneling.bean.TunnelingHomeItemBean
|
|
||||||
//
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * 掘进首页点击出现的列表
|
|
||||||
// */
|
|
||||||
//
|
|
||||||
//class TunnelingHomeListAdapter :
|
|
||||||
// BaseQuickAdapter<TunnelingHomeItemBean, BaseViewHolder>(R.layout.item_geological_list_content) {
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// override fun convert(holder: BaseViewHolder, item: TunnelingHomeItemBean) {
|
|
||||||
// if (holder.absoluteAdapterPosition != 0) {
|
|
||||||
// holder.setGone(R.id.head, true)
|
|
||||||
// }
|
|
||||||
// holder.setText(R.id.time, item.workingDate)
|
|
||||||
// .setText(R.id.record, item.recordPerson)
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
||||||
-170
@@ -1,170 +0,0 @@
|
|||||||
package com.zmkg.coaloperation.ui.tunneling.bean
|
|
||||||
|
|
||||||
import java.io.Serializable
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 掘进
|
|
||||||
*/
|
|
||||||
data class TunnelingHomeBean(
|
|
||||||
var contentList: MutableList<TunnelingHomeItemBean>?,
|
|
||||||
val createBy: String?,
|
|
||||||
val createTime: String?,
|
|
||||||
val updateBy: String?,
|
|
||||||
val updateTime: String?,
|
|
||||||
val remark: String?,
|
|
||||||
val surfaceId: String?,
|
|
||||||
val totalFootage: String?,
|
|
||||||
val seamId: String?,
|
|
||||||
val areaId: String?,
|
|
||||||
val seamName: String?,
|
|
||||||
val surfaceName: String?,
|
|
||||||
val areaName: String?,
|
|
||||||
val surfaceAzimuth: String?,
|
|
||||||
val surfaceHeight: String?,
|
|
||||||
val surfaceWidth: String?,
|
|
||||||
val tunnelNature: String?,
|
|
||||||
val planStartDate: String?,
|
|
||||||
val planEndDate: String?,
|
|
||||||
val geologicalType: String?,
|
|
||||||
val hydrogeologicalType: String?,
|
|
||||||
val seamIgnition: String?,
|
|
||||||
val seamGas: String?,
|
|
||||||
val seamBumpPressure: String?,
|
|
||||||
val surfaceSupportForm: String?
|
|
||||||
)
|
|
||||||
|
|
||||||
class TunnelingHomeItemBean {
|
|
||||||
var createBy: String? = null
|
|
||||||
var createTime: String? = null
|
|
||||||
var updateBy: String? = null
|
|
||||||
var updateTime: String? = null
|
|
||||||
var remark: String? = null
|
|
||||||
var recordId: String? = null
|
|
||||||
var surfaceId: String? = null
|
|
||||||
var workingDate: String? = null
|
|
||||||
var teamShift: String? = null
|
|
||||||
var teamId: String? = null
|
|
||||||
var teamName: String? = null
|
|
||||||
var teamLeader: String? = null
|
|
||||||
var workingFootage: String? = null
|
|
||||||
var seamDip: String? = null
|
|
||||||
var seamHeight: String? = null
|
|
||||||
var waterYield: String? = null
|
|
||||||
var recordPerson: String? = null
|
|
||||||
var mineWorkingLith: String? = null
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增工作面 给接口的数据
|
|
||||||
*/
|
|
||||||
data class TunnelingFaceAddBean(
|
|
||||||
|
|
||||||
val surfaceName: String? = null,
|
|
||||||
val totalFootage: String? = null,
|
|
||||||
|
|
||||||
val areaId: Int? = null,
|
|
||||||
val areaName: String? = null,
|
|
||||||
val createBy: String? = null,
|
|
||||||
val createTime: String? = null,
|
|
||||||
val geologicalType: String? = null,
|
|
||||||
val hydrogeologicalType: String? = null,
|
|
||||||
val params: Params? = null,
|
|
||||||
val planEndDate: String? = null,
|
|
||||||
val planStartDate: String? = null,
|
|
||||||
val remark: String? = null,
|
|
||||||
val seamBumpPressure: String? = null,
|
|
||||||
val seamGas: String? = null,
|
|
||||||
val seamId: Int? = null,
|
|
||||||
val seamIgnition: String? = null,
|
|
||||||
val seamName: String? = null,
|
|
||||||
val surfaceAzimuth: String? = null,
|
|
||||||
val surfaceHeight: String? = null,
|
|
||||||
val surfaceId: Int? = null,
|
|
||||||
val surfaceSupportForm: String? = null,
|
|
||||||
val surfaceWidth: String? = null,
|
|
||||||
val tunnelNature: String? = null,
|
|
||||||
val updateBy: String? = null,
|
|
||||||
val updateTime: String? = null
|
|
||||||
)
|
|
||||||
|
|
||||||
data class Params(
|
|
||||||
val additionalProp1: String? = null,
|
|
||||||
val additionalProp2: String? = null,
|
|
||||||
val additionalProp3: String? = null
|
|
||||||
):Serializable
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工作面详情
|
|
||||||
*/
|
|
||||||
data class FaceWorkDetailBean(
|
|
||||||
val accumulativeFootage: Int,
|
|
||||||
val areaId: Int,
|
|
||||||
val areaName: String,
|
|
||||||
val createBy: String,
|
|
||||||
val createTime: String,
|
|
||||||
val geologicalType: String,
|
|
||||||
val hydrogeologicalType: String,
|
|
||||||
val latestRecord: LatestRecord,
|
|
||||||
val params: Params,
|
|
||||||
val planEndDate: String,
|
|
||||||
val planStartDate: String,
|
|
||||||
val remainingFootage: Int,
|
|
||||||
val remark: String,
|
|
||||||
val seamBumpPressure: String,
|
|
||||||
val seamGas: String,
|
|
||||||
val seamId: Int,
|
|
||||||
val seamIgnition: String,
|
|
||||||
val seamName: String,
|
|
||||||
val surfaceAzimuth: String,
|
|
||||||
val surfaceHeight: String,
|
|
||||||
val surfaceId: Int,
|
|
||||||
val surfaceName: String,
|
|
||||||
val surfaceSupportForm: String,
|
|
||||||
val surfaceWidth: String,
|
|
||||||
val totalFootage: Int,
|
|
||||||
val tunnelNature: String,
|
|
||||||
val updateBy: String,
|
|
||||||
val updateTime: String,
|
|
||||||
val yesterdayFootage: String,
|
|
||||||
val monthFootage: String
|
|
||||||
): Serializable
|
|
||||||
|
|
||||||
data class LatestRecord(
|
|
||||||
val createBy: String,
|
|
||||||
val createTime: String,
|
|
||||||
val mineWorkingLithologyList: MutableList<MineWorkingLithology>,
|
|
||||||
val params: Params,
|
|
||||||
val recordId: Int,
|
|
||||||
val recordPerson: String,
|
|
||||||
val remark: String,
|
|
||||||
val seamDip: Int,
|
|
||||||
val seamHeight: Int,
|
|
||||||
val surfaceId: Int,
|
|
||||||
val surfaceName: String,
|
|
||||||
val teamId: Int,
|
|
||||||
val teamLeader: String,
|
|
||||||
val teamName: String,
|
|
||||||
val teamShift: Int,
|
|
||||||
val updateBy: String,
|
|
||||||
val updateTime: String,
|
|
||||||
val waterYield: Int,
|
|
||||||
val workingDate: String,
|
|
||||||
val workingFootage: Int
|
|
||||||
):Serializable
|
|
||||||
|
|
||||||
|
|
||||||
data class MineWorkingLithology(
|
|
||||||
val createBy: String,
|
|
||||||
val createTime: String,
|
|
||||||
val lithologyId: Int,
|
|
||||||
val lithologyType: String,
|
|
||||||
val params: Params,
|
|
||||||
val positionEnd: Int,
|
|
||||||
val positionStart: Int,
|
|
||||||
val recordId: Int,
|
|
||||||
val remark: String,
|
|
||||||
val updateBy: String,
|
|
||||||
val updateTime: String
|
|
||||||
):Serializable
|
|
||||||
+43
-47
@@ -2,14 +2,10 @@ package com.zmkg.coaloperation.ui.tunneling.viewmodel
|
|||||||
|
|
||||||
import com.zmkg.coaloperation.base.viewmodel.BaseViewModel
|
import com.zmkg.coaloperation.base.viewmodel.BaseViewModel
|
||||||
import com.zmkg.coaloperation.data.repository.HomeRepository
|
import com.zmkg.coaloperation.data.repository.HomeRepository
|
||||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
import com.zmkg.coaloperation.superfuntion.handleRequest
|
import com.zmkg.coaloperation.superfuntion.handleRequest
|
||||||
import com.zmkg.coaloperation.superfuntion.launch
|
import com.zmkg.coaloperation.superfuntion.launch
|
||||||
import com.zmkg.coaloperation.ui.tunneling.bean.FaceWorkDetailBean
|
|
||||||
import com.zmkg.coaloperation.ui.tunneling.bean.TunnelingFaceAddBean
|
|
||||||
import com.zmkg.coaloperation.ui.tunneling.bean.TunnelingHomeItemBean
|
|
||||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,11 +15,11 @@ class TunnelingViewModel : BaseViewModel() {
|
|||||||
|
|
||||||
|
|
||||||
// var tunnelingHomeList = MutableSharedFlow<MutableList<TunnelingHomeBean>?>()
|
// var tunnelingHomeList = MutableSharedFlow<MutableList<TunnelingHomeBean>?>()
|
||||||
var tunnelingHomeItemList = MutableSharedFlow<MutableList<TunnelingHomeItemBean>?>()
|
// var tunnelingHomeItemList = MutableSharedFlow<MutableList<TunnelingHomeItemBean>?>()
|
||||||
var tunnelingWorkFaceAdd = MutableSharedFlow<Boolean>()//新增面
|
// var tunnelingWorkFaceAdd = MutableSharedFlow<Boolean>()//新增面
|
||||||
var faceWorkDetailData = MutableStateFlow<FaceWorkDetailBean?>(null)//面详情
|
// var faceWorkDetailData = MutableStateFlow<FaceWorkDetailBean?>(null)//面详情
|
||||||
|
//
|
||||||
var itemIndex = MutableStateFlow(0)//item的下标
|
// var itemIndex = MutableStateFlow(0)//item的下标
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
}
|
}
|
||||||
@@ -42,44 +38,44 @@ class TunnelingViewModel : BaseViewModel() {
|
|||||||
// )
|
// )
|
||||||
// }
|
// }
|
||||||
|
|
||||||
fun getTunnelingHomeItemData(index: Int,surfaceId: String?) {
|
// fun getTunnelingHomeItemData(index: Int,surfaceId: String?) {
|
||||||
launch(
|
// launch(
|
||||||
{
|
// {
|
||||||
itemIndex.emit(index)
|
// itemIndex.emit(index)
|
||||||
handleRequest(
|
// handleRequest(
|
||||||
HomeRepository.getTunnelingHomeItemData(surfaceId),
|
// HomeRepository.getTunnelingHomeItemData(surfaceId),
|
||||||
successBlock = {
|
// successBlock = {
|
||||||
tunnelingHomeItemList.emit(it.data)
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getTunnelingSurfaceDetail(surfaceId: String?) {
|
|
||||||
launch(
|
|
||||||
{
|
|
||||||
handleRequest(
|
|
||||||
HomeRepository.getTunnelingSurfaceDetail(surfaceId),
|
|
||||||
successBlock = {
|
|
||||||
// tunnelingHomeItemList.emit(it.data)
|
// tunnelingHomeItemList.emit(it.data)
|
||||||
faceWorkDetailData.emit(it.data)
|
//
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
)
|
// )
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
fun postTunnellingSurfaceAdd(tunnelingFaceAddBean: TunnelingFaceAddBean) {
|
// fun getTunnelingSurfaceDetail(surfaceId: String?) {
|
||||||
launch(
|
// launch(
|
||||||
{
|
// {
|
||||||
handleRequest(
|
// handleRequest(
|
||||||
HomeRepository.postTunnellingSurfaceAdd(tunnelingFaceAddBean),
|
// HomeRepository.getTunnelingSurfaceDetail(surfaceId),
|
||||||
successBlock = {
|
// successBlock = {
|
||||||
tunnelingWorkFaceAdd.emit(true)
|
//// tunnelingHomeItemList.emit(it.data)
|
||||||
})
|
// faceWorkDetailData.emit(it.data)
|
||||||
}
|
// })
|
||||||
)
|
// }
|
||||||
}
|
// )
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// fun postTunnellingSurfaceAdd(tunnelingFaceAddBean: TunnelingFaceAddBean) {
|
||||||
|
// launch(
|
||||||
|
// {
|
||||||
|
// handleRequest(
|
||||||
|
// HomeRepository.postTunnellingSurfaceAdd(tunnelingFaceAddBean),
|
||||||
|
// successBlock = {
|
||||||
|
// tunnelingWorkFaceAdd.emit(true)
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
|
||||||
var tunnelFaceAndRecordList = MutableSharedFlow<MutableList<TunnelWorkingFaceEntity>?>()
|
var tunnelFaceAndRecordList = MutableSharedFlow<MutableList<TunnelWorkingFaceEntity>?>()
|
||||||
|
|
||||||
|
|||||||
+62
-9
@@ -9,6 +9,7 @@ import androidx.lifecycle.lifecycleScope
|
|||||||
import androidx.lifecycle.repeatOnLifecycle
|
import androidx.lifecycle.repeatOnLifecycle
|
||||||
import com.zmkg.coaloperation.R
|
import com.zmkg.coaloperation.R
|
||||||
import com.zmkg.coaloperation.base.BaseVMBFragment
|
import com.zmkg.coaloperation.base.BaseVMBFragment
|
||||||
|
import com.zmkg.coaloperation.bean.TunnelSubmitData
|
||||||
import com.zmkg.coaloperation.databinding.FragmentUserBinding
|
import com.zmkg.coaloperation.databinding.FragmentUserBinding
|
||||||
import com.zmkg.coaloperation.db.viewmodel.TunnelRoofLithologyViewModel
|
import com.zmkg.coaloperation.db.viewmodel.TunnelRoofLithologyViewModel
|
||||||
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceRecordViewModel
|
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceRecordViewModel
|
||||||
@@ -64,12 +65,37 @@ class UserFragment :
|
|||||||
|
|
||||||
override fun initView(root: View?, savedInstanceState: Bundle?) {
|
override fun initView(root: View?, savedInstanceState: Bundle?) {
|
||||||
mBinding.apply {
|
mBinding.apply {
|
||||||
networkConfig.setOrderStateInfo("网络配置", R.mipmap.network)
|
networkConfig.setOrderStateInfo(
|
||||||
dataPull.setOrderStateInfo("数据拉取", R.drawable.ic_data_pull)
|
"网络配置",
|
||||||
cacheManage.setOrderStateInfo("缓存管理", R.mipmap.buffer)
|
R.mipmap.network,
|
||||||
checkUpdate.setOrderStateInfo("检查更新", R.mipmap.checkupdate)
|
R.drawable.bg_icon_network_config
|
||||||
systemExit.setOrderStateInfo("系统退出", R.mipmap.systemexit)
|
)
|
||||||
aboutUs.setOrderStateInfo("关于我们", R.mipmap.about_us)
|
dataPull.setOrderStateInfo(
|
||||||
|
"数据拉取",
|
||||||
|
R.drawable.ic_data_pull,
|
||||||
|
R.drawable.bg_icon_data_pull
|
||||||
|
)
|
||||||
|
dataPush.setOrderStateInfo(
|
||||||
|
"数据推送",
|
||||||
|
R.drawable.ic_data_push,
|
||||||
|
R.drawable.bg_icon_data_push
|
||||||
|
)
|
||||||
|
cacheManage.setOrderStateInfo(
|
||||||
|
"缓存管理",
|
||||||
|
R.mipmap.buffer,
|
||||||
|
R.drawable.bg_icon_cache_manage
|
||||||
|
)
|
||||||
|
checkUpdate.setOrderStateInfo(
|
||||||
|
"检查更新",
|
||||||
|
R.mipmap.checkupdate,
|
||||||
|
R.drawable.bg_icon_check_update
|
||||||
|
)
|
||||||
|
systemExit.setOrderStateInfo(
|
||||||
|
"系统退出",
|
||||||
|
R.mipmap.systemexit,
|
||||||
|
R.drawable.bg_icon_system_exit
|
||||||
|
)
|
||||||
|
aboutUs.setOrderStateInfo("关于我们", R.mipmap.about_us, R.drawable.bg_icon_about_us)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,6 +104,7 @@ class UserFragment :
|
|||||||
addClickViews(
|
addClickViews(
|
||||||
networkConfig,
|
networkConfig,
|
||||||
dataPull,
|
dataPull,
|
||||||
|
dataPush,
|
||||||
cacheManage,
|
cacheManage,
|
||||||
checkUpdate,
|
checkUpdate,
|
||||||
systemExit,
|
systemExit,
|
||||||
@@ -94,13 +121,12 @@ class UserFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
R.id.data_pull -> {
|
R.id.data_pull -> {
|
||||||
showLoading("加载中")
|
|
||||||
checkDataState { state ->
|
checkDataState { state ->
|
||||||
if (state) {
|
if (state) {
|
||||||
showToast("本地存在待提交的数据")
|
showToast("本地存在待提交的数据")
|
||||||
return@checkDataState
|
return@checkDataState
|
||||||
}
|
}
|
||||||
|
showLoading("加载中")
|
||||||
workingFaceViewModel.deleteAll {
|
workingFaceViewModel.deleteAll {
|
||||||
workingFaceRecordViewModel.deleteAll {
|
workingFaceRecordViewModel.deleteAll {
|
||||||
roofLithologyViewModel.deleteAll {
|
roofLithologyViewModel.deleteAll {
|
||||||
@@ -115,6 +141,10 @@ class UserFragment :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
R.id.data_push -> {
|
||||||
|
dataPush()
|
||||||
|
}
|
||||||
|
|
||||||
R.id.cache_manage -> {
|
R.id.cache_manage -> {
|
||||||
toActivity(CacheManageActivity::class.java)
|
toActivity(CacheManageActivity::class.java)
|
||||||
}
|
}
|
||||||
@@ -156,7 +186,7 @@ class UserFragment :
|
|||||||
list.forEach { faceEntity ->
|
list.forEach { faceEntity ->
|
||||||
faceEntity.records?.let { recordList ->
|
faceEntity.records?.let { recordList ->
|
||||||
val lastRecordId = faceEntity.latestRecord?.recordId
|
val lastRecordId = faceEntity.latestRecord?.recordId
|
||||||
val record = recordList.firstOrNull {it.recordId == lastRecordId}
|
val record = recordList.firstOrNull { it.recordId == lastRecordId }
|
||||||
record?.latestRecordState = "1"
|
record?.latestRecordState = "1"
|
||||||
|
|
||||||
//保存工作面记录数据
|
//保存工作面记录数据
|
||||||
@@ -207,4 +237,27 @@ class UserFragment :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun dataPush() {
|
||||||
|
showLoading()
|
||||||
|
val submitData = TunnelSubmitData()
|
||||||
|
workingFaceViewModel.getEntityListByState("1") { faceList ->
|
||||||
|
submitData.faceList = faceList
|
||||||
|
workingFaceRecordViewModel.getEntityListByState("1") { recordList ->
|
||||||
|
submitData.recordList = recordList
|
||||||
|
roofLithologyViewModel.getEntityListByState("1") { lithologyList ->
|
||||||
|
hideLoading()
|
||||||
|
submitData.lithologyList = lithologyList
|
||||||
|
if (submitData.faceList.isNullOrEmpty() ||
|
||||||
|
submitData.recordList.isNullOrEmpty() ||
|
||||||
|
submitData.lithologyList.isNullOrEmpty()
|
||||||
|
) {
|
||||||
|
showToast("暂无推送数据")
|
||||||
|
return@getEntityListByState
|
||||||
|
}
|
||||||
|
Log.d(TAG, "dataPush: ${submitData.toJsonString()}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import java.util.Date
|
|||||||
object DateTimeUtil {
|
object DateTimeUtil {
|
||||||
|
|
||||||
const val YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"
|
const val YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"
|
||||||
|
const val YYYY_MM_DD = "yyyy-MM-dd"
|
||||||
|
|
||||||
fun formatDateTime(dateTime: LocalDateTime, pattern: String = YYYY_MM_DD_HH_MM_SS): String {
|
fun formatDateTime(dateTime: LocalDateTime, pattern: String = YYYY_MM_DD_HH_MM_SS): String {
|
||||||
val formatter = DateTimeFormatter.ofPattern(pattern)
|
val formatter = DateTimeFormatter.ofPattern(pattern)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.zmkg.coaloperation.utils
|
|||||||
import android.util.Log
|
import android.util.Log
|
||||||
import com.google.gson.internal.LazilyParsedNumber
|
import com.google.gson.internal.LazilyParsedNumber
|
||||||
import com.zmkg.coaloperation.bean.WorkOption
|
import com.zmkg.coaloperation.bean.WorkOption
|
||||||
import com.zmkg.coaloperation.ui.tunneling.bean.DictBean
|
import com.zmkg.coaloperation.bean.DictBean
|
||||||
|
|
||||||
object DictUtils {
|
object DictUtils {
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.zmkg.coaloperation.utils
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
|
import com.zmkg.coaloperation.bean.TunnelWorkingItem
|
||||||
|
import org.apache.poi.ss.util.CellRangeAddress
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook
|
||||||
|
import java.io.FileOutputStream
|
||||||
|
|
||||||
|
object ExcelExportUtils {
|
||||||
|
fun exportToExcel(list: List<TunnelWorkingItem>, filePath: String, block:()-> Unit) {
|
||||||
|
val workbook = XSSFWorkbook() // 创建XLSX格式工作簿
|
||||||
|
val sheet = workbook.createSheet("Sheet1")
|
||||||
|
|
||||||
|
// 创建表头
|
||||||
|
val mainHeader = sheet.createRow(0)
|
||||||
|
|
||||||
|
list.forEachIndexed { index, item ->
|
||||||
|
mainHeader.createCell(index).setCellValue(item.name)
|
||||||
|
}
|
||||||
|
|
||||||
|
val subHeader = sheet.createRow(1)
|
||||||
|
for (i in 0 until list.size - 1) {
|
||||||
|
subHeader.createCell(i).setCellValue("")
|
||||||
|
}
|
||||||
|
val subTitleList = mutableListOf("起始值", "结束值", "岩性")
|
||||||
|
subTitleList.forEachIndexed { index, subTitle ->
|
||||||
|
subHeader.createCell(list.size - 1 + index).setCellValue(subTitle)
|
||||||
|
}
|
||||||
|
sheet.addMergedRegion(CellRangeAddress(0, 0, 9, 11))
|
||||||
|
for (i in 0 until list.size - 1) {
|
||||||
|
sheet.addMergedRegion(CellRangeAddress(0, 1, i, i))
|
||||||
|
}
|
||||||
|
var rowNum = 2
|
||||||
|
var row = sheet.createRow(rowNum)
|
||||||
|
for (i in 0 until list.size - 1) {
|
||||||
|
row.createCell(i).setCellValue(list[i].value)
|
||||||
|
}
|
||||||
|
|
||||||
|
list[list.size - 1].items?.let {
|
||||||
|
for (i in 0 until it.size) {
|
||||||
|
if (i > 0) {
|
||||||
|
rowNum++
|
||||||
|
row = sheet.createRow(rowNum)
|
||||||
|
}
|
||||||
|
row.createCell(0 + list.size - 1).setCellValue(it[i].positionStart)
|
||||||
|
row.createCell(1 + list.size - 1).setCellValue(it[i].positionEnd)
|
||||||
|
row.createCell(2 + list.size - 1).setCellValue(it[i].lithologyType)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 填充数据
|
||||||
|
// data.forEachIndexed { index, item ->
|
||||||
|
// val row = sheet.createRow(index + 1)
|
||||||
|
// row.createCell(0).setCellValue(item.id)
|
||||||
|
// row.createCell(1).setCellValue(item.name)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 自动调整列宽
|
||||||
|
// for (i in 0 until 9) {
|
||||||
|
// sheet.autoSizeColumn(i)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 写入文件
|
||||||
|
FileOutputStream(filePath).use { workbook.write(it) }
|
||||||
|
workbook.close()
|
||||||
|
Log.d("ExcelExportUtils", "exportToExcel: $filePath")
|
||||||
|
block()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data class DataBean(val id: Int, val name: String)
|
||||||
@@ -55,3 +55,31 @@ fun SharedPreferences.put(vararg pairs: Pair<String, Any>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化小数字符串
|
||||||
|
* 如果小数点后都是零,则去掉小数点和小数部分,否则返回原始字符串
|
||||||
|
*
|
||||||
|
* @return 格式化后的字符串
|
||||||
|
*/
|
||||||
|
fun String.formatDecimalString(): String {
|
||||||
|
// 检查字符串是否包含小数点
|
||||||
|
if (!this.contains('.')) {
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
// 尝试分割整数和小数部分
|
||||||
|
val parts = this.split('.')
|
||||||
|
if (parts.size != 2) {
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
// 检查小数部分是否全部为零
|
||||||
|
val decimalPart = parts[1]
|
||||||
|
val isAllZeros = decimalPart.all { it == '0' }
|
||||||
|
return if (isAllZeros) {
|
||||||
|
parts[0] // 返回整数部分
|
||||||
|
} else {
|
||||||
|
this // 返回原始字符串
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.zmkg.coaloperation.utils
|
||||||
|
|
||||||
|
import android.os.Environment
|
||||||
|
import java.io.File
|
||||||
|
import java.io.FileOutputStream
|
||||||
|
import java.io.IOException
|
||||||
|
|
||||||
|
object FileUtils {
|
||||||
|
|
||||||
|
fun getFilePath(fileName:String): String {
|
||||||
|
val parentPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS)
|
||||||
|
val path = File(parentPath, "煤矿数采终端")
|
||||||
|
if (!path.exists()) path.mkdirs()
|
||||||
|
val file = File(path, fileName)
|
||||||
|
if (!file.exists()) file.createNewFile()
|
||||||
|
return file.absolutePath
|
||||||
|
}
|
||||||
|
|
||||||
|
fun saveToPublicDirectory(fileName: String, content: String) {
|
||||||
|
val dir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS)
|
||||||
|
val appDir = File(dir, "dcmp")
|
||||||
|
if (!appDir.exists()) appDir.mkdirs()
|
||||||
|
|
||||||
|
val file = File(appDir, fileName)
|
||||||
|
try {
|
||||||
|
FileOutputStream(file).use { it.write(content.toByteArray()) }
|
||||||
|
} catch (e: IOException) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// private fun requestStoragePermission() {
|
||||||
|
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||||
|
// if (!Environment.isExternalStorageManager()) {
|
||||||
|
// val intent = Intent(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION)
|
||||||
|
// startActivity(intent)
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// ActivityCompat.requestPermissions(
|
||||||
|
// this,
|
||||||
|
// arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE),
|
||||||
|
// REQUEST_CODE
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,6 +8,8 @@ import android.widget.RelativeLayout
|
|||||||
import androidx.databinding.DataBindingUtil
|
import androidx.databinding.DataBindingUtil
|
||||||
import com.zmkg.coaloperation.R
|
import com.zmkg.coaloperation.R
|
||||||
import com.zmkg.coaloperation.databinding.CustomMyInfoViewBinding
|
import com.zmkg.coaloperation.databinding.CustomMyInfoViewBinding
|
||||||
|
import com.zmkg.coaloperation.utils.gone
|
||||||
|
import com.zmkg.coaloperation.utils.visible
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文本和跳转
|
* 文本和跳转
|
||||||
@@ -21,15 +23,14 @@ class CustomInfoView(context: Context?, attrs: AttributeSet?) : RelativeLayout(c
|
|||||||
R.layout.custom_my_info_view, this,true)
|
R.layout.custom_my_info_view, this,true)
|
||||||
|
|
||||||
|
|
||||||
fun setOrderStateInfo(name:String, id:Int){
|
fun setOrderStateInfo(name:String, imgResId:Int, bgResId: Int){
|
||||||
mBinding.apply {
|
mBinding.apply {
|
||||||
if (id==0) {
|
customInfoMenuIcon.run {
|
||||||
customInfoMenuIcon.visibility=View.GONE
|
if (imgResId == 0) gone() else visible()
|
||||||
}else{
|
setImageResource(imgResId)
|
||||||
customInfoMenuIcon.visibility=View.VISIBLE
|
setBackgroundResource(bgResId)
|
||||||
}
|
}
|
||||||
customInfoMenuIcon.setImageResource(id)
|
customInfoMenuName.text = name
|
||||||
customInfoMenuName.setText(name)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#FF72AFD3"
|
||||||
|
android:startColor="#FF37ECBA"
|
||||||
|
android:type="linear"
|
||||||
|
android:useLevel="true" />
|
||||||
|
<corners
|
||||||
|
android:radius="12dp" />
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:startColor="#ff95fe99"
|
||||||
|
android:endColor="#fff5feb9"
|
||||||
|
android:type="linear"
|
||||||
|
android:useLevel="true" />
|
||||||
|
<corners
|
||||||
|
android:radius="12dp" />
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#FFF89273"
|
||||||
|
android:startColor="#FFB223F6"
|
||||||
|
android:type="linear"
|
||||||
|
android:useLevel="true" />
|
||||||
|
<corners
|
||||||
|
android:radius="12dp" />
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#ff7657f8"
|
||||||
|
android:startColor="#fff538f6"
|
||||||
|
android:type="linear"
|
||||||
|
android:useLevel="true" />
|
||||||
|
<corners
|
||||||
|
android:radius="12dp" />
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#ff1657f8"
|
||||||
|
android:startColor="#fff51856"
|
||||||
|
android:type="linear"
|
||||||
|
android:useLevel="true" />
|
||||||
|
<corners
|
||||||
|
android:radius="12dp" />
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#ff73a3f8"
|
||||||
|
android:startColor="#ff0a28f4"
|
||||||
|
android:type="linear"
|
||||||
|
android:useLevel="true" />
|
||||||
|
<corners
|
||||||
|
android:radius="12dp" />
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#FF96E6A1"
|
||||||
|
android:startColor="#FFD4FC79"
|
||||||
|
android:type="linear"
|
||||||
|
android:useLevel="true" />
|
||||||
|
<corners
|
||||||
|
android:radius="12dp" />
|
||||||
|
</shape>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="oval">
|
||||||
|
<solid android:color="#FB2B85"/>
|
||||||
|
|
||||||
|
<size android:height="5dp" android:width="5dp"/>
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@@ -18,563 +18,18 @@
|
|||||||
android:id="@+id/toolbar_lay"
|
android:id="@+id/toolbar_lay"
|
||||||
layout="@layout/lay_title_right_bar" />
|
layout="@layout/lay_title_right_bar" />
|
||||||
|
|
||||||
<ScrollView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:layout_marginTop="10dp"
|
android:id="@+id/rvFaceList"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:overScrollMode="never">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingStart="20dp"
|
|
||||||
android:paddingEnd="20dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:drawablePadding="5dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="进度信息"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:drawableStartCompat="@drawable/line_green" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="152dp"
|
|
||||||
android:background="@drawable/bg_stroke_gray">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvLenTotal"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:drawablePadding="5dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:drawableStartCompat="@drawable/shape_flag_green"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/tvLenAccumulate"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_chainStyle="packed"
|
|
||||||
tools:text="进度信息" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvLenAccumulate"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="15dp"
|
|
||||||
android:layout_marginBottom="15dp"
|
|
||||||
android:drawablePadding="5dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:drawableStartCompat="@drawable/shape_flag_red"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/tvLenRemain"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvLenTotal"
|
|
||||||
tools:text="进度信息" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvLenRemain"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:drawablePadding="5dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:drawableStartCompat="@drawable/shape_flag_blue"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvLenAccumulate"
|
|
||||||
tools:text="进度信息" />
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="122dp"
|
|
||||||
android:layout_height="122dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<com.zmkg.coaloperation.view.CircleArcView
|
|
||||||
android:id="@+id/arcViewGreen"
|
|
||||||
android:layout_width="122dp"
|
|
||||||
android:layout_height="122dp"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<com.zmkg.coaloperation.view.CircleArcView
|
|
||||||
android:id="@+id/arcViewRed"
|
|
||||||
android:layout_width="100dp"
|
|
||||||
android:layout_height="100dp"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<com.zmkg.coaloperation.view.CircleArcView
|
|
||||||
android:id="@+id/arcViewBlue"
|
|
||||||
android:layout_width="80dp"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvCompleteRate"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="24sp"
|
|
||||||
tools:text="64%" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:drawablePadding="5dp"
|
tools:itemCount="20"
|
||||||
android:gravity="center_vertical"
|
android:overScrollMode="never"
|
||||||
android:text="基础信息"
|
tools:listitem="@layout/list_item_tunnel_working_item"
|
||||||
android:textColor="@color/white"
|
android:background="@drawable/bg_stroke_gray"/>
|
||||||
app:drawableStartCompat="@drawable/line_green" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/bg_stroke_gray"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:paddingStart="20dp"
|
|
||||||
android:paddingEnd="20dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:text="昨日进尺"
|
|
||||||
android:textColor="#6A6F87"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvYesterdayLen"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="16sp"
|
|
||||||
tools:text="200.4m" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.divider.MaterialDivider
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
app:dividerColor="#20222B" />
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:paddingStart="20dp"
|
|
||||||
android:paddingEnd="20dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:text="工作面倾角"
|
|
||||||
android:textColor="#6A6F87"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvWorkingFaceAngle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="16sp"
|
|
||||||
tools:text="65" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.divider.MaterialDivider
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
app:dividerColor="#20222B" />
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:paddingStart="20dp"
|
|
||||||
android:paddingEnd="20dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:text="本月累计进尺"
|
|
||||||
android:textColor="#6A6F87"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvMonthAccumulateLen"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="16sp"
|
|
||||||
tools:text="1400.4m" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.divider.MaterialDivider
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
app:dividerColor="#20222B" />
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:paddingStart="20dp"
|
|
||||||
android:paddingEnd="20dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:text="工作面涌水量"
|
|
||||||
android:textColor="#6A6F87"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvWorkingFaceWater"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="16sp"
|
|
||||||
tools:text="65" />
|
|
||||||
</FrameLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvYesterdayRockType"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:drawablePadding="5dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="昨日顶板岩性"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:drawableStartCompat="@drawable/line_green" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
||||||
android:id="@+id/rv_rock_nature"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/bg_stroke_gray"
|
|
||||||
tools:itemCount="3"
|
|
||||||
tools:listitem="@layout/item_rock_nature" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:drawablePadding="5dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="各类工程"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:drawableStartCompat="@drawable/line_green" />
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/bg_stroke_gray"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="20dp"
|
|
||||||
android:paddingEnd="20dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="距"
|
|
||||||
android:textColor="#6A6F87"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvTask1Name"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:background="@drawable/bg_solid_black"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="center"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:minWidth="60dp"
|
|
||||||
android:paddingStart="5dp"
|
|
||||||
android:paddingEnd="5dp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/dash_line" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvTask1Value"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:background="@drawable/bg_solid_black"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="center"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingStart="5dp"
|
|
||||||
android:paddingEnd="5dp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:text="m"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.divider.MaterialDivider
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
app:dividerColor="#20222B" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="20dp"
|
|
||||||
android:paddingEnd="20dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="距"
|
|
||||||
android:textColor="#6A6F87"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvTask2Name"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:background="@drawable/bg_solid_black"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="center"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:minWidth="60dp"
|
|
||||||
android:paddingStart="5dp"
|
|
||||||
android:paddingEnd="5dp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/dash_line" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvTask2Value"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:background="@drawable/bg_solid_black"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="center"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingStart="5dp"
|
|
||||||
android:paddingEnd="5dp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:text="m"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:drawablePadding="5dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="隐蔽致灾预报"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:drawableStartCompat="@drawable/line_green" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:background="@drawable/bg_stroke_gray"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="20dp"
|
|
||||||
android:paddingEnd="20dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="距"
|
|
||||||
android:textColor="#6A6F87"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvDisaster1Name"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:background="@drawable/bg_solid_black"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="center"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:minWidth="60dp"
|
|
||||||
android:paddingStart="5dp"
|
|
||||||
android:paddingEnd="5dp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/dash_line" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvDisaster1Value"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:background="@drawable/bg_solid_black"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="center"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingStart="5dp"
|
|
||||||
android:paddingEnd="5dp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:text="m"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.divider.MaterialDivider
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
app:dividerColor="#20222B" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="20dp"
|
|
||||||
android:paddingEnd="20dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="距"
|
|
||||||
android:textColor="#6A6F87"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvDisaster2Name"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:background="@drawable/bg_solid_black"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="center"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:minWidth="60dp"
|
|
||||||
android:paddingStart="5dp"
|
|
||||||
android:paddingEnd="5dp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/dash_line" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvDisaster2Value"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:background="@drawable/bg_solid_black"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="center"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingStart="5dp"
|
|
||||||
android:paddingEnd="5dp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:text="m"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</ScrollView>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
tools:ignore="HardcodedText,TooManyViews">
|
|
||||||
|
|
||||||
<data>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@color/black_bg"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<include
|
|
||||||
android:id="@+id/toolbar_lay"
|
|
||||||
layout="@layout/lay_title_right_bar" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/rvFaceList"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
tools:itemCount="20"
|
|
||||||
android:overScrollMode="never"
|
|
||||||
tools:listitem="@layout/list_item_working_face"
|
|
||||||
android:background="@drawable/bg_stroke_gray"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
||||||
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
tools:itemCount="10"
|
tools:itemCount="10"
|
||||||
android:overScrollMode="never"
|
android:overScrollMode="never"
|
||||||
tools:listitem="@layout/list_item_working_face"
|
tools:listitem="@layout/list_item_tunnel_working_item"
|
||||||
android:background="@drawable/bg_stroke_gray"/>
|
android:background="@drawable/bg_stroke_gray"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -0,0 +1,580 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:ignore="HardcodedText,TooManyViews">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/black_bg"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbar_lay"
|
||||||
|
layout="@layout/lay_title_right_bar" />
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:overScrollMode="never">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="进度信息"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:drawableStartCompat="@drawable/line_green" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="152dp"
|
||||||
|
android:background="@drawable/bg_stroke_gray">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvLenTotal"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:drawableStartCompat="@drawable/shape_flag_green"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/tvLenAccumulate"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_chainStyle="packed"
|
||||||
|
tools:text="进度信息" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvLenAccumulate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:layout_marginBottom="15dp"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:drawableStartCompat="@drawable/shape_flag_red"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/tvLenRemain"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvLenTotal"
|
||||||
|
tools:text="进度信息" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvLenRemain"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:drawableStartCompat="@drawable/shape_flag_blue"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvLenAccumulate"
|
||||||
|
tools:text="进度信息" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="122dp"
|
||||||
|
android:layout_height="122dp"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<com.zmkg.coaloperation.view.CircleArcView
|
||||||
|
android:id="@+id/arcViewGreen"
|
||||||
|
android:layout_width="122dp"
|
||||||
|
android:layout_height="122dp"
|
||||||
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
|
<com.zmkg.coaloperation.view.CircleArcView
|
||||||
|
android:id="@+id/arcViewRed"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
|
<com.zmkg.coaloperation.view.CircleArcView
|
||||||
|
android:id="@+id/arcViewBlue"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCompleteRate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="24sp"
|
||||||
|
tools:text="64%" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="基础信息"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:drawableStartCompat="@drawable/line_green" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_stroke_gray"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:text="昨日进尺"
|
||||||
|
android:textColor="#6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvYesterdayLen"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="200.4m" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:dividerColor="#20222B" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:text="工作面倾角"
|
||||||
|
android:textColor="#6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvWorkingFaceAngle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="65" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:dividerColor="#20222B" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:text="本月累计进尺"
|
||||||
|
android:textColor="#6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvMonthAccumulateLen"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="1400.4m" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:dividerColor="#20222B" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:text="工作面涌水量"
|
||||||
|
android:textColor="#6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvWorkingFaceWater"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="65" />
|
||||||
|
</FrameLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvYesterdayRockType"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="昨日顶板岩性"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:drawableStartCompat="@drawable/line_green" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
android:id="@+id/rv_rock_nature"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_stroke_gray"
|
||||||
|
tools:itemCount="3"
|
||||||
|
tools:listitem="@layout/item_rock_nature" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="各类工程"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:drawableStartCompat="@drawable/line_green" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_stroke_gray"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="距"
|
||||||
|
android:textColor="#6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTask1Name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:background="@drawable/bg_solid_black"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:minWidth="60dp"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/dash_line" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTask1Value"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:background="@drawable/bg_solid_black"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="m"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:dividerColor="#20222B" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="距"
|
||||||
|
android:textColor="#6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTask2Name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:background="@drawable/bg_solid_black"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:minWidth="60dp"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/dash_line" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTask2Value"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:background="@drawable/bg_solid_black"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="m"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="隐蔽致灾预报"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:drawableStartCompat="@drawable/line_green" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:background="@drawable/bg_stroke_gray"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="距"
|
||||||
|
android:textColor="#6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDisaster1Name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:background="@drawable/bg_solid_black"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:minWidth="60dp"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/dash_line" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDisaster1Value"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:background="@drawable/bg_solid_black"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="m"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:dividerColor="#20222B" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="距"
|
||||||
|
android:textColor="#6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDisaster2Name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:background="@drawable/bg_solid_black"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:minWidth="60dp"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/dash_line" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDisaster2Value"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:background="@drawable/bg_solid_black"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="m"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@@ -7,49 +7,44 @@
|
|||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<com.allen.library.shape.ShapeRelativeLayout
|
|
||||||
|
<com.allen.library.shape.ShapeLinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="68dp"
|
||||||
|
android:layout_marginHorizontal="30dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="#20222B"
|
||||||
app:shapeSolidColor="#20222B"
|
app:shapeSolidColor="#20222B"
|
||||||
app:shapeCornersRadius="16dp"
|
app:shapeCornersRadius="16dp"
|
||||||
android:layout_width="match_parent"
|
android:paddingHorizontal="15dp">
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="#20222B">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="44dp"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/custom_info_menu_icon"
|
android:id="@+id/custom_info_menu_icon"
|
||||||
android:layout_width="22dp"
|
android:layout_width="44dp"
|
||||||
android:layout_height="22dp"
|
android:layout_height="44dp"
|
||||||
android:layout_centerVertical="true"
|
android:scaleType="fitCenter"
|
||||||
android:layout_marginLeft="15dp"
|
android:padding="11dp"
|
||||||
android:scaleType="fitCenter"/>
|
tools:src="@mipmap/network"
|
||||||
|
tools:background="@drawable/bg_icon_network_config"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/custom_info_menu_name"
|
android:id="@+id/custom_info_menu_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_marginStart="12dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginEnd="12dp"
|
||||||
tools:text="菜单"
|
tools:text="菜单"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="16sp" />
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/custom_info_iv_right"
|
android:id="@+id/custom_info_iv_right"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:src="@mipmap/arrow_right" />
|
android:src="@mipmap/arrow_right" />
|
||||||
|
</com.allen.library.shape.ShapeLinearLayout>
|
||||||
</com.allen.library.shape.ShapeRelativeLayout>
|
|
||||||
</layout>
|
</layout>
|
||||||
@@ -59,6 +59,10 @@
|
|||||||
android:layout_below="@+id/title_sec"
|
android:layout_below="@+id/title_sec"
|
||||||
android:layout_marginHorizontal="5dp"
|
android:layout_marginHorizontal="5dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
|
tools:itemCount="6"
|
||||||
|
app:spanCount="2"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
tools:listitem="@layout/item_home_menu_left_right" />
|
tools:listitem="@layout/item_home_menu_left_right" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|||||||
@@ -33,54 +33,55 @@
|
|||||||
android:textSize="24sp" />
|
android:textSize="24sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tvUserPhone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:text="账号昵称"
|
android:text="158****5678"
|
||||||
android:textColor="#6A6F87"
|
android:textColor="#6A6F87"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<com.zmkg.coaloperation.view.CustomInfoView
|
<com.zmkg.coaloperation.view.CustomInfoView
|
||||||
android:id="@+id/network_config"
|
android:id="@+id/network_config"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="68dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="30dp"
|
|
||||||
android:layout_marginTop="15dp" />
|
android:layout_marginTop="15dp" />
|
||||||
|
|
||||||
<com.zmkg.coaloperation.view.CustomInfoView
|
<com.zmkg.coaloperation.view.CustomInfoView
|
||||||
android:id="@+id/data_pull"
|
android:id="@+id/data_pull"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="68dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="30dp"
|
android:layout_marginTop="15dp" />
|
||||||
|
|
||||||
|
<com.zmkg.coaloperation.view.CustomInfoView
|
||||||
|
android:id="@+id/data_push"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="15dp" />
|
android:layout_marginTop="15dp" />
|
||||||
|
|
||||||
<com.zmkg.coaloperation.view.CustomInfoView
|
<com.zmkg.coaloperation.view.CustomInfoView
|
||||||
android:id="@+id/cache_manage"
|
android:id="@+id/cache_manage"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="68dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="30dp"
|
|
||||||
android:layout_marginTop="15dp" />
|
android:layout_marginTop="15dp" />
|
||||||
|
|
||||||
<com.zmkg.coaloperation.view.CustomInfoView
|
<com.zmkg.coaloperation.view.CustomInfoView
|
||||||
android:id="@+id/check_update"
|
android:id="@+id/check_update"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="68dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="30dp"
|
|
||||||
android:layout_marginTop="15dp" />
|
android:layout_marginTop="15dp" />
|
||||||
|
|
||||||
<com.zmkg.coaloperation.view.CustomInfoView
|
<com.zmkg.coaloperation.view.CustomInfoView
|
||||||
android:id="@+id/system_exit"
|
android:id="@+id/system_exit"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="68dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="30dp"
|
|
||||||
android:layout_marginTop="15dp" />
|
android:layout_marginTop="15dp" />
|
||||||
|
|
||||||
<com.zmkg.coaloperation.view.CustomInfoView
|
<com.zmkg.coaloperation.view.CustomInfoView
|
||||||
android:id="@+id/about_us"
|
android:id="@+id/about_us"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="68dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="30dp"
|
|
||||||
android:layout_marginTop="15dp" />
|
android:layout_marginTop="15dp" />
|
||||||
|
|
||||||
</com.allen.library.shape.ShapeLinearLayout>
|
</com.allen.library.shape.ShapeLinearLayout>
|
||||||
@@ -92,7 +93,8 @@
|
|||||||
android:layout_height="68dp"
|
android:layout_height="68dp"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="60dp"
|
android:layout_marginTop="60dp"
|
||||||
android:background="#e3e3e3" />
|
app:srcCompat="@drawable/ic_avatar"/>
|
||||||
|
<!-- android:background="#e3e3e3"-->
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -7,34 +7,36 @@
|
|||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<com.allen.library.shape.ShapeRelativeLayout
|
<com.allen.library.shape.ShapeLinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:layout_marginHorizontal="4dp"
|
android:layout_marginHorizontal="4dp"
|
||||||
android:layout_marginVertical="5dp"
|
android:layout_marginVertical="5dp"
|
||||||
|
android:paddingHorizontal="10dp"
|
||||||
app:shapeCornersRadius="6dp"
|
app:shapeCornersRadius="6dp"
|
||||||
app:shapeStrokeColor="#10514C"
|
app:shapeStrokeColor="#10514C"
|
||||||
app:shapeStrokeWidth="0.5dp">
|
app:shapeStrokeWidth="0.5dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp"
|
||||||
|
tools:text="防灭火检查" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/img"
|
android:id="@+id/img"
|
||||||
android:layout_width="32dp"
|
android:layout_width="32dp"
|
||||||
android:layout_height="32dp"
|
android:layout_height="32dp"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginRight="13dp"
|
|
||||||
android:scaleType="fitXY" />
|
android:scaleType="fitXY" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/title"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="18sp"
|
|
||||||
tools:text="防灭火检查" />
|
|
||||||
|
|
||||||
|
</com.allen.library.shape.ShapeLinearLayout>
|
||||||
</com.allen.library.shape.ShapeRelativeLayout>
|
|
||||||
</layout>
|
</layout>
|
||||||
@@ -7,9 +7,11 @@
|
|||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<com.allen.library.shape.ShapeRelativeLayout
|
<com.allen.library.shape.ShapeLinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="80dp"
|
android:layout_height="85dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center"
|
||||||
android:layout_marginHorizontal="2dp"
|
android:layout_marginHorizontal="2dp"
|
||||||
android:layout_marginVertical="2dp"
|
android:layout_marginVertical="2dp"
|
||||||
app:shapeCornersRadius="6dp"
|
app:shapeCornersRadius="6dp"
|
||||||
@@ -20,20 +22,19 @@
|
|||||||
android:layout_width="28dp"
|
android:layout_width="28dp"
|
||||||
android:layout_height="28dp"
|
android:layout_height="28dp"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:layout_marginRight="13dp"
|
|
||||||
android:scaleType="fitXY" />
|
android:scaleType="fitXY" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/img"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:text="防灭火检查" />
|
tools:text="防灭火检查" />
|
||||||
|
|
||||||
|
|
||||||
</com.allen.library.shape.ShapeRelativeLayout>
|
</com.allen.library.shape.ShapeLinearLayout>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textCursorDrawable="@drawable/cursor_white"
|
android:textCursorDrawable="@drawable/cursor_white"
|
||||||
android:minWidth="30dp"
|
android:minWidth="30dp"
|
||||||
android:maxWidth="35dp"
|
android:maxWidth="55dp"
|
||||||
android:paddingStart="5dp"
|
android:paddingStart="5dp"
|
||||||
android:paddingEnd="5dp"
|
android:paddingEnd="5dp"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textCursorDrawable="@drawable/cursor_white"
|
android:textCursorDrawable="@drawable/cursor_white"
|
||||||
android:minWidth="30dp"
|
android:minWidth="30dp"
|
||||||
android:maxWidth="35dp"
|
android:maxWidth="55dp"
|
||||||
android:paddingStart="5dp"
|
android:paddingStart="5dp"
|
||||||
android:paddingEnd="5dp"
|
android:paddingEnd="5dp"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textCursorDrawable="@drawable/cursor_white"
|
android:textCursorDrawable="@drawable/cursor_white"
|
||||||
android:minWidth="30dp"
|
android:minWidth="30dp"
|
||||||
android:maxWidth="35dp"
|
android:maxWidth="55dp"
|
||||||
android:paddingStart="5dp"
|
android:paddingStart="5dp"
|
||||||
android:paddingEnd="5dp"
|
android:paddingEnd="5dp"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
|
|||||||
@@ -26,10 +26,22 @@
|
|||||||
app:shapeStrokeColor="#FF26FFEB"
|
app:shapeStrokeColor="#FF26FFEB"
|
||||||
app:shapeStrokeWidth="0.5dp">
|
app:shapeStrokeWidth="0.5dp">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivFlagEdit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:src="@drawable/ic_flag_edit"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<!-- android:layout_marginStart="20dp"-->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="38dp"
|
android:layout_height="38dp"
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:background="@drawable/ic_geological" />
|
android:background="@drawable/ic_geological" />
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<LinearLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@@ -68,7 +68,21 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
app:dividerColor="#282C38"
|
app:dividerColor="#282C38"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
android:visibility="visible"/>
|
android:visibility="visible"/>
|
||||||
|
|
||||||
</LinearLayout>
|
<FrameLayout
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="start">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivFlagEdit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:src="@drawable/ic_flag_edit"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<external-path name="external_files" path="."/>
|
||||||
|
</paths>
|
||||||
Reference in New Issue
Block a user