|
@@ -63,22 +63,29 @@ class WorkshopFragment(val changePage: (PageChangeBO) -> Unit) :
|
|
|
LogUtil.e("Map pic is null")
|
|
LogUtil.e("Map pic is null")
|
|
|
return@loadBitmapFromUrl
|
|
return@loadBitmapFromUrl
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
mBinding?.mapview?.loadMap(it)
|
|
mBinding?.mapview?.loadMap(it)
|
|
|
- presenter?.getWorkstationTicketList {
|
|
|
|
|
- if (it == null) {
|
|
|
|
|
- return@getWorkstationTicketList
|
|
|
|
|
- }
|
|
|
|
|
- jobStatisticList.forEach { itJob ->
|
|
|
|
|
- itJob.count = it.count { it.ticketType == itJob.sopType.type.toString() }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ presenter?.getMapPointPage {
|
|
|
|
|
+ mPointList.clear()
|
|
|
|
|
+ it?.records?.forEach { itPoint ->
|
|
|
|
|
+ mPointList.add(CustomPoint(PointF(itPoint.x!!.toFloat() + 100, itPoint.y!!.toFloat()), itPoint.entityName!!, itPoint.entityId!!, mutableListOf()))
|
|
|
}
|
|
}
|
|
|
- mPointList.forEach { itPoint ->
|
|
|
|
|
- itPoint.ticketList = it.filter { it.workstationId == itPoint.workstationId }.toMutableList()
|
|
|
|
|
|
|
+ presenter?.getWorkstationTicketList {
|
|
|
|
|
+ if (it == null) {
|
|
|
|
|
+ return@getWorkstationTicketList
|
|
|
|
|
+ }
|
|
|
|
|
+ jobStatisticList.forEach { itJob ->
|
|
|
|
|
+ itJob.count = it.count { it.ticketType == itJob.sopType.type.toString() }
|
|
|
|
|
+ }
|
|
|
|
|
+ mPointList.forEach { itPoint ->
|
|
|
|
|
+ itPoint.ticketList = it.filter { it.workstationId == itPoint.workstationId }.toMutableList()
|
|
|
|
|
+ }
|
|
|
|
|
+ mBinding?.rvStatistics?.adapter?.notifyDataSetChanged()
|
|
|
|
|
+ // 重新load之后,会自动复位
|
|
|
|
|
+// mBinding?.mapview?.currentRotateDegrees = 0f
|
|
|
|
|
+// mBinding?.mapview?.currentZoom = 1f
|
|
|
|
|
+ mBinding?.mapview?.refresh()
|
|
|
}
|
|
}
|
|
|
- mBinding?.rvStatistics?.adapter?.notifyDataSetChanged()
|
|
|
|
|
- mBinding?.mapview?.currentRotateDegrees = 0f
|
|
|
|
|
- mBinding?.mapview?.currentZoom = 1f
|
|
|
|
|
- mBinding?.mapview?.refresh()
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|