Przeglądaj źródła

1. 工艺SOP逻辑适配中

wzbs 5 miesięcy temu
rodzic
commit
c950a05ae2

+ 13 - 0
app/src/main/java/com/grkj/iscs_mars/model/Constants.kt

@@ -120,6 +120,19 @@ object Constants {
         return mTicketTypeList.find { it.type == type }?.key
     }
 
+    /**
+     * 获取当前作业票类型图标
+     */
+    fun getTicketTypeRoundIcon(type: String): Int {
+        return when (type) {
+            "1" -> R.mipmap.map_pre_maintenance
+            "2" -> R.mipmap.map_change_shifts
+            "3" -> R.mipmap.map_clean
+            "4" -> R.mipmap.map_switch_product
+            else -> R.mipmap.map_repair
+        }
+    }
+
     /*************************  地图  *************************/
     const val MAP_CABINET_KEY = "sys.map.cabinet"     // 物资柜地图
     const val MAP_PERMIT_KEY = "sys.map.permit"       // 作业票地图

+ 17 - 6
app/src/main/java/com/grkj/iscs_mars/view/fragment/JobManagementFragment.kt

@@ -4,6 +4,7 @@ import android.widget.ImageView
 import com.grkj.iscs_mars.R
 import com.grkj.iscs_mars.databinding.FragmentJobManagementBinding
 import com.grkj.iscs_mars.model.bo.PageChangeBO
+import com.grkj.iscs_mars.util.AppUtils.isPortrait
 import com.grkj.iscs_mars.util.log.LogUtil
 import com.grkj.iscs_mars.view.activity.HomeActivity.Menu
 import com.grkj.iscs_mars.view.adapter.MenuAdapter
@@ -26,12 +27,22 @@ class JobManagementFragment :
 
     override fun initView() {
         mMenuList = mutableListOf(
-            Menu(getString(R.string.workshop), R.mipmap.workshop, WorkshopFragment { pageChangeBO ->
-                changePage(pageChangeBO)
-            }),
-            Menu(getString(R.string.technology_sop), R.mipmap.technology, TechnologySopFragment { pageChangeBO ->
-                changePage(pageChangeBO)
-            }),
+            Menu(
+                getString(R.string.workshop),
+                R.mipmap.workshop,
+                if (requireActivity().isPortrait()) WorkshopFragment { pageChangeBO ->
+                    changePage(pageChangeBO)
+                } else WorkshopFragmentLand { pageChangeBO ->
+                    changePage(pageChangeBO)
+                }),
+            Menu(
+                getString(R.string.technology_sop),
+                R.mipmap.technology,
+                if (requireActivity().isPortrait()) TechnologySopFragment { pageChangeBO ->
+                    changePage(pageChangeBO)
+                } else TechnologySopFragmentLand { pageChangeBO ->
+                    changePage(pageChangeBO)
+                }),
             Menu(getString(R.string.job_execution), R.mipmap.job_execution, JobExecutionFragment { pageChangeBO ->
                 changePage(pageChangeBO)
             })

+ 35 - 2
app/src/main/java/com/grkj/iscs_mars/view/fragment/TechnologySopFragment.kt

@@ -46,8 +46,7 @@ class TechnologySopFragment(val changePage: (PageChangeBO) -> Unit) :
             ) {
                 holder.getView<LinearLayout>(R.id.root).isSelected = parPos == mMachineryIdx
                 holder.setText(R.id.tv_name, data?.machineryName)
-                Glide.with(this@TechnologySopFragment).load(data?.machineryImg)
-                    .into(holder.getView(R.id.iv_pic))
+                Glide.with(this@TechnologySopFragment).load(data?.machineryImg).into(holder.getView(R.id.iv_pic))
                 holder.setOnClickListener(R.id.root) {
                     if (mMachineryIdx != parPos) {
                         mSopTypeIdx = -1
@@ -105,6 +104,39 @@ class TechnologySopFragment(val changePage: (PageChangeBO) -> Unit) :
                 }
             }
         }
+
+        // 处理竖屏显示内容
+
+        // 返回到岗位页面
+        mBinding?.tvBack?.setOnClickListener { changePage(PageChangeBO(-1)) }
+        // 处理开始工艺流程
+        mBinding?.tvStartSop?.setOnClickListener {
+            presenter?.createTicket(mMachineryIdx, mSopTypeIdx, mMachineryList) {
+                it?.let {
+                    presenter?.checkMyTodoForHandleKey()
+                    changePage(
+                        PageChangeBO(2, workstationId = mWorkStationId, ticketId = it, machineryId = mMachineryList[mMachineryIdx].machineryId)
+                    )
+                    BusinessManager.sendLoadingEventMsg(null, false)
+                }
+            }
+        }
+        // 处理工艺列表
+        mBinding?.sopList?.adapter =
+            object : CommonAdapter<MachineryPageRespVO.Record>(requireActivity(), R.layout.item_rv_sop_list, mMachineryList) {
+                override fun convert(holder: ViewHolder, t: MachineryPageRespVO.Record, position: Int) {
+                    val colorId = if (mMachineryIdx.toLong() == t.machineryId) R.color.dialog_card_login_bg else R.color.common_transparent
+                    holder.getView<LinearLayout>(R.id.root).setBackgroundResource(colorId)
+                    holder.setText(R.id.tv_positon, t.workstationName)
+                    holder.setText(R.id.tv_sop_name, t.machineryName)
+                    holder.setOnClickListener(R.id.root) {
+                        mMachineryIdx = (t.machineryId ?: 0).toInt()
+                        // 将当前选中的机器图片加载出来
+                        Glide.with(this@TechnologySopFragment).load(t.machineryImg).into(mBinding!!.ivMachinery!!)
+                        notifyDataSetChanged()
+                    }
+                }
+            }
     }
 
     override fun refreshPage(pageChangeBO: PageChangeBO) {
@@ -117,6 +149,7 @@ class TechnologySopFragment(val changePage: (PageChangeBO) -> Unit) :
                 mMachineryList.addAll(it)
             }
             mBinding?.rvTechnology?.adapter?.notifyDataSetChanged()
+            mBinding?.sopList?.adapter?.notifyDataSetChanged()
             mMachineryIdx = -1
             mSopTypeIdx = -1
             refreshSelected()

+ 144 - 0
app/src/main/java/com/grkj/iscs_mars/view/fragment/TechnologySopFragmentLand.kt

@@ -0,0 +1,144 @@
+package com.grkj.iscs_mars.view.fragment
+
+import android.widget.ImageView
+import android.widget.LinearLayout
+import androidx.recyclerview.widget.RecyclerView
+import com.bumptech.glide.Glide
+import com.grkj.iscs_mars.BusinessManager
+import com.grkj.iscs_mars.R
+import com.grkj.iscs_mars.databinding.FragmentTechnologySopBinding
+import com.grkj.iscs_mars.model.Constants.mSopTypeList
+import com.grkj.iscs_mars.model.bo.PageChangeBO
+import com.grkj.iscs_mars.model.vo.machinery.MachineryPageRespVO
+import com.grkj.iscs_mars.util.log.LogUtil
+import com.grkj.iscs_mars.view.base.BaseMvpFragment
+import com.grkj.iscs_mars.view.iview.ITechnologySopView
+import com.grkj.iscs_mars.view.presenter.TechnologySopPresenter
+import com.zhy.adapter.recyclerview.CommonAdapter
+import com.zhy.adapter.recyclerview.base.ViewHolder
+
+/**
+ * 工艺SOP页
+ *
+ * @param changePage 页面index、工作票ID
+ */
+class TechnologySopFragmentLand(val changePage: (PageChangeBO) -> Unit) :
+    BaseMvpFragment<ITechnologySopView, TechnologySopPresenter, FragmentTechnologySopBinding>() {
+
+    private val mMachineryList = mutableListOf<MachineryPageRespVO.Record>()
+    private var mMachineryIdx = -1
+    private var mSopTypeIdx = -1
+    private var mWorkStationId = -1L
+
+    override val viewBinding: FragmentTechnologySopBinding
+        get() = FragmentTechnologySopBinding.inflate(layoutInflater)
+
+    override fun initView() {
+        mBinding?.rvTechnology?.adapter = object : CommonAdapter<MachineryPageRespVO.Record>(
+            requireActivity(),
+            R.layout.item_rv_technology_sop,
+            mMachineryList
+        ) {
+            override fun convert(
+                holder: ViewHolder,
+                data: MachineryPageRespVO.Record?,
+                parPos: Int
+            ) {
+                holder.getView<LinearLayout>(R.id.root).isSelected = parPos == mMachineryIdx
+                holder.setText(R.id.tv_name, data?.machineryName)
+                Glide.with(this@TechnologySopFragmentLand).load(data?.machineryImg)
+                    .into(holder.getView(R.id.iv_pic))
+                holder.setOnClickListener(R.id.root) {
+                    if (mMachineryIdx != parPos) {
+                        mSopTypeIdx = -1
+                    }
+                    mMachineryIdx = parPos
+                    refreshSelected()
+                    notifyDataSetChanged()
+                }
+
+                val recyclerView = holder.getView<RecyclerView>(R.id.rv_type)
+                recyclerView.adapter =
+                    object : CommonAdapter<MachineryPageRespVO.Record.SysDictData>(
+                        requireActivity(),
+                        R.layout.item_rv_technology_sop_type,
+                        data?.sysDictDatas ?: mutableListOf()
+                    ) {
+                        override fun convert(
+                            holder: ViewHolder,
+                            type: MachineryPageRespVO.Record.SysDictData?,
+                            childPos: Int
+                        ) {
+                            holder.getView<LinearLayout>(R.id.root).isSelected =
+                                (childPos == mSopTypeIdx && parPos == mMachineryIdx)
+                            type?.dictLabel?.let {
+                                holder.setText(R.id.tv_name, it)
+                            }
+                            mSopTypeList.find { it.type.toString() == type?.dictValue }?.icon?.let { icon ->
+                                holder.getView<ImageView>(R.id.iv_type).setImageResource(icon)
+                            }
+                            holder.setOnClickListener(R.id.root) {
+                                mMachineryIdx = parPos
+                                mSopTypeIdx = childPos
+                                mBinding?.rvTechnology?.adapter?.notifyDataSetChanged()
+                                refreshSelected()
+                                notifyDataSetChanged()
+                            }
+                        }
+                    }
+            }
+        }
+
+        mBinding?.cbStart?.setOnClickListener {
+            presenter?.createTicket(mMachineryIdx, mSopTypeIdx, mMachineryList) {
+                it?.let {
+                    presenter?.checkMyTodoForHandleKey()
+                    changePage(
+                        PageChangeBO(
+                            2,
+                            workstationId = mWorkStationId,
+                            ticketId = it,
+                            machineryId = mMachineryList[mMachineryIdx].machineryId
+                        )
+                    )
+                    BusinessManager.sendLoadingEventMsg(null, false)
+                }
+            }
+        }
+    }
+
+    override fun refreshPage(pageChangeBO: PageChangeBO) {
+        LogUtil.i("$pageChangeBO")
+        mWorkStationId = pageChangeBO.workstationId ?: -1L
+        mBinding?.tvTitle?.text = pageChangeBO.machineryName
+        presenter?.getMachineryPage(pageChangeBO.workstationId!!) {
+            mMachineryList.clear()
+            it?.records?.let {
+                mMachineryList.addAll(it)
+            }
+            mBinding?.rvTechnology?.adapter?.notifyDataSetChanged()
+            mMachineryIdx = -1
+            mSopTypeIdx = -1
+            refreshSelected()
+        }
+    }
+
+    private fun refreshSelected() {
+        val sopName = if (mMachineryIdx == -1) {
+            ""
+        } else {
+            "-${mMachineryList[mMachineryIdx].machineryName}"
+        }
+        val sopTypeName = if (mSopTypeIdx == -1) {
+            ""
+        } else {
+            "-${mMachineryList[mMachineryIdx].sysDictDatas?.get(mSopTypeIdx)?.dictLabel}"
+        }
+        mBinding?.tvSelected?.text =
+            getString(R.string.current_sop, "${mBinding?.tvTitle?.text}$sopName$sopTypeName")
+    }
+
+    override fun initPresenter(): TechnologySopPresenter {
+        return TechnologySopPresenter()
+    }
+}

+ 47 - 49
app/src/main/java/com/grkj/iscs_mars/view/fragment/WorkshopFragment.kt

@@ -2,6 +2,7 @@ package com.grkj.iscs_mars.view.fragment
 
 import android.graphics.PointF
 import android.widget.ImageView
+import androidx.lifecycle.lifecycleScope
 import com.grkj.iscs_mars.R
 import com.grkj.iscs_mars.databinding.FragmentWorkshopBinding
 import com.grkj.iscs_mars.model.Constants
@@ -20,6 +21,8 @@ import com.grkj.iscs_mars.view.widget.CustomMarkLayer
 import com.onlylemi.mapview.library.MapViewListener
 import com.zhy.adapter.recyclerview.CommonAdapter
 import com.zhy.adapter.recyclerview.base.ViewHolder
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.launch
 
 /**
  * 车间岗位页
@@ -28,6 +31,9 @@ class WorkshopFragment(val changePage: (PageChangeBO) -> Unit) :
     BaseMvpFragment<IWorkshopView, WorkshopPresenter, FragmentWorkshopBinding>() {
 
     private lateinit var jobStatisticList: MutableList<JobStatistics>
+
+    // 当前工作任务列表
+    private val jobList: MutableList<WorkstationTicketListRespVO> = mutableListOf()
     private var markLayer: CustomMarkLayer? = null
     private val mPointList = mutableListOf<CustomPoint>()
     private var mMapPicWidth = 1
@@ -44,18 +50,27 @@ class WorkshopFragment(val changePage: (PageChangeBO) -> Unit) :
             JobStatistics(Constants.SOP_SWITCH_PRODUCT, 0)
         )
 
-        mBinding?.rvStatistics?.adapter = object : CommonAdapter<JobStatistics>(
-            requireActivity(),
-            R.layout.item_rv_job_management,
-            jobStatisticList
-        ) {
-            override fun convert(holder: ViewHolder, statistic: JobStatistics, position: Int) {
-                holder.getView<ImageView>(R.id.iv).setImageResource(statistic.sopType.icon)
-                holder.setText(
-                    R.id.tv_name,
-                    if (statistic.count == 0) statistic.sopType.title
-                    else "${statistic.sopType.title}(${statistic.count})"
-                )
+        mBinding?.rvStatistics?.adapter =
+            object : CommonAdapter<JobStatistics>(requireActivity(), R.layout.item_rv_job_management, jobStatisticList) {
+                override fun convert(holder: ViewHolder, statistic: JobStatistics, position: Int) {
+                    holder.getView<ImageView>(R.id.iv).setImageResource(statistic.sopType.icon)
+                    holder.setText(
+                        R.id.tv_name,
+                        if (statistic.count == 0) statistic.sopType.title else "${statistic.sopType.title}(${statistic.count})"
+                    )
+                }
+            }
+
+        // 初始化作业列表
+        mBinding?.jobsList?.adapter = object : CommonAdapter<WorkstationTicketListRespVO>(requireActivity(), R.layout.item_rv_jobs, jobList) {
+            override fun convert(holder: ViewHolder, t: WorkstationTicketListRespVO, position: Int) {
+                val splName = t.ticketName?.split("-") ?: emptyList()
+                // 处理岗位
+                if (splName.size == 7) holder.setText(R.id.tv_positon, "${splName[0]}-${splName[1]}")
+                // 处理显示的图标
+                holder.setImageResource(R.id.iv_type, Constants.getTicketTypeRoundIcon(t.ticketType ?: ""))
+                // 显示票据名称
+                holder.setText(R.id.tv_job_name, t.ticketName)
             }
         }
 
@@ -83,35 +98,33 @@ class WorkshopFragment(val changePage: (PageChangeBO) -> Unit) :
                         }
                     }
                     presenter?.getWorkstationTicketList {
+                        jobList.clear()
                         if (it == null) {
                             return@getWorkstationTicketList
                         }
+                        jobList.addAll(it)
+                        // 刷新数据
+                        lifecycleScope.launch(Dispatchers.Main) { mBinding?.jobsList?.adapter?.notifyDataSetChanged() }
                         jobStatisticList.forEach { itJob ->
-                            itJob.count =
-                                it.count { it.ticketType == itJob.sopType.type.toString() }
+                            itJob.count = it.count { it.ticketType == itJob.sopType.type.toString() }
                         }
                         mPointList.forEach { itPoint ->
-                            itPoint.ticketList =
-                                it.filter { it.workstationId == itPoint.workstationId }
-                                    .toMutableList()
+                            itPoint.ticketList = it.filter { it.workstationId == itPoint.workstationId }.toMutableList()
                             itPoint.ticketList.take(4).forEachIndexed { index, itTicket ->
                                 if (itPoint.ticketList.size > 3 && index == 3) {
                                     val itBitmap = BitmapUtil.loadBitmapSmall(
                                         requireContext(),
-                                        SPUtils.getAttributeValue(
-                                            requireContext(),
-                                            Constants.getTicketKey(5)
-                                        ),
+                                        SPUtils.getAttributeValue(requireContext(), Constants.getTicketKey(5)),
                                         60,
-                                        60, R.mipmap.ticket_type_placeholder
+                                        60,
+                                        R.mipmap.ticket_type_placeholder
+                                    )
+                                    itTicket.bitmap = itBitmap ?: BitmapUtil.getResizedBitmapFromMipmap(
+                                        requireContext(),
+                                        R.mipmap.ticket_type_placeholder,
+                                        60,
+                                        60
                                     )
-                                    itTicket.bitmap =
-                                        itBitmap ?: BitmapUtil.getResizedBitmapFromMipmap(
-                                            requireContext(),
-                                            R.mipmap.ticket_type_placeholder,
-                                            60,
-                                            60
-                                        )
                                 } else {
                                     if (itTicket.ticketType == null) {
                                         itTicket.bitmap = BitmapUtil.getResizedBitmapFromMipmap(
@@ -123,10 +136,7 @@ class WorkshopFragment(val changePage: (PageChangeBO) -> Unit) :
                                     } else {
                                         val itBitmap = BitmapUtil.loadBitmapSmall(
                                             requireContext(),
-                                            SPUtils.getAttributeValue(
-                                                requireContext(),
-                                                Constants.getTicketKey(itTicket.ticketType.toInt())
-                                            ),
+                                            SPUtils.getAttributeValue(requireContext(), Constants.getTicketKey(itTicket.ticketType.toInt())),
                                             60,
                                             60, R.mipmap.ticket_type_placeholder
                                         )
@@ -144,11 +154,8 @@ class WorkshopFragment(val changePage: (PageChangeBO) -> Unit) :
                         mBinding?.rvStatistics?.adapter?.notifyDataSetChanged()
 
                         Executor.repeatOnMain({
-                            val isAllBitmapLoaded =
-                                mPointList.all { it.ticketList.take(4).all { it.bitmap != null } }
-                            if (isAllBitmapLoaded) {
-                                mBinding?.mapview?.refreshWorld()
-                            }
+                            val isAllBitmapLoaded = mPointList.all { it.ticketList.take(4).all { it.bitmap != null } }
+                            if (isAllBitmapLoaded) mBinding?.mapview?.refreshWorld()
                             return@repeatOnMain !isAllBitmapLoaded
                         }, 100, true)
                     }
@@ -171,13 +178,7 @@ class WorkshopFragment(val changePage: (PageChangeBO) -> Unit) :
                     markLayer?.setMarkIsClickListener(object : CustomMarkLayer.MarkIsClickListener {
                         override fun markIsClick(index: Int, btnIndex: Int, isClickIcon: Boolean) {
                             if (btnIndex == -1) {
-                                changePage(
-                                    PageChangeBO(
-                                        1,
-                                        mPointList[index].workstationId,
-                                        machineryName = mPointList[index].name
-                                    )
-                                )
+                                changePage(PageChangeBO(1, mPointList[index].workstationId, machineryName = mPointList[index].name))
                             } else {
                                 if (isClickIcon && (mPointList[index].ticketList.size <= 3 || (mPointList[index].ticketList.size > 3 && btnIndex < 2))) {
                                     changePage(
@@ -201,10 +202,7 @@ class WorkshopFragment(val changePage: (PageChangeBO) -> Unit) :
                                             mPointList[index].name
                                         )
                                     )
-                                }.setDataAndShow(
-                                    mPointList[index].name,
-                                    mPointList[index].ticketList
-                                )
+                                }.setDataAndShow(mPointList[index].name, mPointList[index].ticketList)
                             }
                         }
                     })

+ 223 - 0
app/src/main/java/com/grkj/iscs_mars/view/fragment/WorkshopFragmentLand.kt

@@ -0,0 +1,223 @@
+package com.grkj.iscs_mars.view.fragment
+
+import android.widget.ImageView
+import com.grkj.iscs_mars.R
+import com.grkj.iscs_mars.databinding.FragmentWorkshopBinding
+import com.grkj.iscs_mars.model.Constants
+import com.grkj.iscs_mars.model.bo.PageChangeBO
+import com.grkj.iscs_mars.util.BitmapUtil
+import com.grkj.iscs_mars.util.Executor
+import com.grkj.iscs_mars.util.SPUtils
+import com.grkj.iscs_mars.util.ToastUtils
+import com.grkj.iscs_mars.util.log.LogUtil
+import com.grkj.iscs_mars.view.base.BaseMvpFragment
+import com.grkj.iscs_mars.view.dialog.TicketListDialog
+import com.grkj.iscs_mars.view.iview.IWorkshopView
+import com.grkj.iscs_mars.view.presenter.WorkshopPresenter
+import com.grkj.iscs_mars.view.widget.CustomMarkLayer
+import com.onlylemi.mapview.library.MapViewListener
+import com.zhy.adapter.recyclerview.CommonAdapter
+import com.zhy.adapter.recyclerview.base.ViewHolder
+
+/**
+ * 车间岗位页
+ */
+class WorkshopFragmentLand(val changePage: (PageChangeBO) -> Unit) :
+    BaseMvpFragment<IWorkshopView, WorkshopPresenter, FragmentWorkshopBinding>() {
+
+    private lateinit var jobStatisticList: MutableList<WorkshopFragment.JobStatistics>
+    private var markLayer: CustomMarkLayer? = null
+    private val mPointList = mutableListOf<WorkshopFragment.CustomPoint>()
+    private var mMapPicWidth = 1
+
+    override val viewBinding: FragmentWorkshopBinding
+        get() = FragmentWorkshopBinding.inflate(layoutInflater)
+
+    override fun initView() {
+        jobStatisticList = mutableListOf(
+            WorkshopFragment.JobStatistics(Constants.SOP_REPAIR, 0),
+            WorkshopFragment.JobStatistics(Constants.SOP_PRE_MAINTENANCE, 0),
+            WorkshopFragment.JobStatistics(Constants.SOP_CHANGE_SHIFTS, 0),
+            WorkshopFragment.JobStatistics(Constants.SOP_CLEAN, 0),
+            WorkshopFragment.JobStatistics(Constants.SOP_SWITCH_PRODUCT, 0)
+        )
+
+        mBinding?.rvStatistics?.adapter = object : CommonAdapter<WorkshopFragment.JobStatistics>(
+            requireActivity(),
+            R.layout.item_rv_job_management,
+            jobStatisticList
+        ) {
+            override fun convert(holder: ViewHolder, statistic: WorkshopFragment.JobStatistics, position: Int) {
+                holder.getView<ImageView>(R.id.iv).setImageResource(statistic.sopType.icon)
+                holder.setText(
+                    R.id.tv_name,
+                    if (statistic.count == 0) statistic.sopType.title
+                    else "${statistic.sopType.title}(${statistic.count})"
+                )
+            }
+        }
+
+        initMap()
+        refreshPage()
+    }
+
+    fun refreshPage() {
+        presenter?.getMapInfo {
+            LogUtil.i("开始加载地图工作区域:${it?.imageUrl}")
+            BitmapUtil.loadBitmapFromUrl(requireContext(), it?.imageUrl) {
+                if (it == null) {
+                    LogUtil.e("Map pic is null")
+                    return@loadBitmapFromUrl
+                }
+                mMapPicWidth = it.width
+                LogUtil.i("地图大小:${it.width}")
+                mBinding?.mapview?.loadMap(it)
+
+                presenter?.getMapPointPage {
+                    mPointList.clear()
+                    it?.records?.forEach { itPoint ->
+                        presenter?.mapDataHandle(itPoint)?.let {
+                            mPointList.add(it)
+                        }
+                    }
+                    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()
+                            itPoint.ticketList.take(4).forEachIndexed { index, itTicket ->
+                                if (itPoint.ticketList.size > 3 && index == 3) {
+                                    val itBitmap = BitmapUtil.loadBitmapSmall(
+                                        requireContext(),
+                                        SPUtils.getAttributeValue(
+                                            requireContext(),
+                                            Constants.getTicketKey(5)
+                                        ),
+                                        60,
+                                        60, R.mipmap.ticket_type_placeholder
+                                    )
+                                    itTicket.bitmap =
+                                        itBitmap ?: BitmapUtil.getResizedBitmapFromMipmap(
+                                            requireContext(),
+                                            R.mipmap.ticket_type_placeholder,
+                                            60,
+                                            60
+                                        )
+                                } else {
+                                    if (itTicket.ticketType == null) {
+                                        itTicket.bitmap = BitmapUtil.getResizedBitmapFromMipmap(
+                                            requireContext(),
+                                            R.mipmap.ticket_type_placeholder,
+                                            60,
+                                            60
+                                        )
+                                    } else {
+                                        val itBitmap = BitmapUtil.loadBitmapSmall(
+                                            requireContext(),
+                                            SPUtils.getAttributeValue(
+                                                requireContext(),
+                                                Constants.getTicketKey(itTicket.ticketType.toInt())
+                                            ),
+                                            60,
+                                            60, R.mipmap.ticket_type_placeholder
+                                        )
+                                        itTicket.bitmap =
+                                            itBitmap ?: BitmapUtil.getResizedBitmapFromMipmap(
+                                                requireContext(),
+                                                R.mipmap.ticket_type_placeholder,
+                                                60,
+                                                60
+                                            )
+                                    }
+                                }
+                            }
+                        }
+                        mBinding?.rvStatistics?.adapter?.notifyDataSetChanged()
+
+                        Executor.repeatOnMain({
+                            val isAllBitmapLoaded =
+                                mPointList.all { it.ticketList.take(4).all { it.bitmap != null } }
+                            if (isAllBitmapLoaded) {
+                                mBinding?.mapview?.refreshWorld()
+                            }
+                            return@repeatOnMain !isAllBitmapLoaded
+                        }, 100, true)
+                    }
+                }
+            }
+        }
+    }
+
+    private fun initMap() {
+        mBinding?.mapview?.isScaleAndRotateTogether = false
+        mBinding?.mapview?.setMapViewListener(object : MapViewListener {
+            override fun onMapLoadSuccess() {
+                mBinding?.mapview?.post {
+                    // 要加null判断,否则loadMap的时候会调用onMapLoadSuccess导致多次创建layer
+                    if (markLayer != null) {
+                        mBinding?.mapview?.currentRotateDegrees = 0f
+                        return@post
+                    }
+                    markLayer = CustomMarkLayer(mBinding?.mapview, mPointList)
+                    markLayer?.setMarkIsClickListener(object : CustomMarkLayer.MarkIsClickListener {
+                        override fun markIsClick(index: Int, btnIndex: Int, isClickIcon: Boolean) {
+                            if (btnIndex == -1) {
+                                changePage(
+                                    PageChangeBO(
+                                        1,
+                                        mPointList[index].workstationId,
+                                        machineryName = mPointList[index].name
+                                    )
+                                )
+                            } else {
+                                if (isClickIcon && (mPointList[index].ticketList.size <= 3 || (mPointList[index].ticketList.size > 3 && btnIndex < 2))) {
+                                    changePage(
+                                        PageChangeBO(
+                                            2,
+                                            mPointList[index].workstationId,
+                                            mPointList[index].ticketList[btnIndex].ticketId,
+                                            mPointList[index].ticketList[btnIndex].machineryId,
+                                            mPointList[index].name
+                                        )
+                                    )
+                                    return
+                                }
+                                TicketListDialog(requireContext()) { selectIdx ->
+                                    changePage(
+                                        PageChangeBO(
+                                            2,
+                                            mPointList[index].workstationId,
+                                            mPointList[index].ticketList[selectIdx].ticketId,
+                                            mPointList[index].ticketList[selectIdx].machineryId,
+                                            mPointList[index].name
+                                        )
+                                    )
+                                }.setDataAndShow(
+                                    mPointList[index].name,
+                                    mPointList[index].ticketList
+                                )
+                            }
+                        }
+                    })
+                    mBinding?.mapview?.addLayer(markLayer)
+                    mBinding?.mapview?.refresh()
+                }
+            }
+
+            override fun onMapLoadFail() {
+                ToastUtils.tip("onMapLoadFail")
+            }
+        })
+    }
+
+    override fun initPresenter(): WorkshopPresenter {
+        return WorkshopPresenter()
+    }
+}

+ 49 - 0
app/src/main/res/layout-land/fragment_technology_sop.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout 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"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".view.fragment.TechnologySopFragment">
+
+    <com.grkj.iscs_mars.view.widget.CommonBtn
+        android:id="@+id/cb_start"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_alignParentBottom="true"
+        app:btn_bg="@drawable/common_btn_blue_bg"
+        app:btn_icon="@mipmap/start"
+        app:btn_name="@string/start_the_job" />
+
+    <TextView
+        android:id="@+id/tv_selected"
+        style="@style/CommonBtnBlue"
+        android:layout_width="match_parent"
+        android:layout_alignParentBottom="true"
+        android:layout_toLeftOf="@id/cb_start"
+        android:gravity="left|center_vertical"
+        android:text="@string/current_sop"
+        android:layout_marginRight="@dimen/common_spacing"/>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_above="@id/tv_selected"
+        android:layout_marginBottom="@dimen/common_spacing"
+        android:background="@drawable/item_rv_technology_sop_bg_normal"
+        android:orientation="vertical"
+        android:padding="@dimen/common_spacing">
+
+        <TextView
+            android:id="@+id/tv_title"
+            style="@style/CommonTextView"
+            android:layout_marginLeft="@dimen/common_spacing" />
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/rv_technology"
+            style="@style/CommonRecyclerView"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal" />
+    </LinearLayout>
+</RelativeLayout>

+ 30 - 0
app/src/main/res/layout-land/fragment_workshop.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout 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"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".view.fragment.WorkshopFragment">
+
+    <androidx.recyclerview.widget.RecyclerView
+        android:id="@+id/rv_statistics"
+        style="@style/CommonRecyclerView"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:orientation="horizontal" />
+
+    <com.google.android.material.card.MaterialCardView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_above="@id/rv_statistics"
+        android:layout_marginVertical="10dp"
+        app:cardCornerRadius="@dimen/common_radius"
+        app:strokeWidth="0dp">
+
+        <com.onlylemi.mapview.library.MapView
+            android:id="@+id/mapview"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_above="@id/rv_statistics" />
+    </com.google.android.material.card.MaterialCardView>
+</RelativeLayout>

+ 33 - 0
app/src/main/res/layout-land/item_rv_job_management.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/root"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_marginHorizontal="10dp"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <ImageView
+            android:id="@+id/iv"
+            android:layout_width="15dp"
+            android:layout_height="15dp" />
+
+        <TextView
+            android:id="@+id/tv_name"
+            style="@style/CommonTextView"
+            android:layout_marginLeft="5dp" />
+    </LinearLayout>
+
+    <View
+        android:id="@+id/v_indicator"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/divider_line_width"
+        android:layout_marginTop="@dimen/divider_line_margin"
+        android:background="@color/main_color"
+        android:visibility="gone" />
+</LinearLayout>

+ 2 - 2
app/src/main/res/layout/activity_home.xml

@@ -13,8 +13,8 @@
         android:layout_width="match_parent"
         android:layout_height="0dp"
         app:layout_constraintBottom_toTopOf="@+id/rl_page"
-        android:paddingLeft="10dp"
-        android:paddingRight="10dp"
+        android:paddingLeft="20dp"
+        android:paddingRight="20dp"
         app:layout_constraintHeight_percent="0.05">
 
         <ImageView

+ 1 - 1
app/src/main/res/layout/common_dialog_loading_progress.xml

@@ -25,7 +25,7 @@
         style="@style/AVLoadingIndicatorView.Large"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:scaleX="1.6"
+        android:scaleX="1.5"
         android:scaleY="1.5"
         app:indicatorColor="@android:color/white"
         app:indicatorName="PacmanIndicator" />

+ 212 - 4
app/src/main/res/layout/fragment_technology_sop.xml

@@ -1,17 +1,222 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout 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"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:gravity="center_horizontal"
+    android:orientation="vertical"
+    android:paddingHorizontal="20dp"
     tools:context=".view.fragment.TechnologySopFragment">
 
+    <!--  选择工艺流程  -->
+    <com.google.android.material.card.MaterialCardView
+        android:id="@+id/sop_header"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="10dp"
+        app:cardBackgroundColor="#11000000"
+        app:strokeColor="#23FFFFFF"
+        app:strokeWidth="2dp">
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:paddingHorizontal="20dp"
+            android:paddingVertical="15dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:text="选择工艺SOP"
+                android:textColor="@color/white"
+                android:textSize="18sp" />
+
+        </RelativeLayout>
+
+    </com.google.android.material.card.MaterialCardView>
+
+    <!--  SOP选择  -->
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="start"
+        android:layout_marginLeft="5dp"
+        android:layout_marginBottom="5dp"
+        android:text="请选择工艺/设备"
+        android:textColor="@color/white"
+        android:textSize="15sp" />
+
+    <com.google.android.material.card.MaterialCardView
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_marginBottom="10dp"
+        android:layout_weight="1"
+        app:cardBackgroundColor="#11000000"
+        app:strokeColor="#23FFFFFF"
+        app:strokeWidth="2dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/tv_positon"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:text="岗位"
+                    android:textColor="@color/white"
+                    android:textSize="16sp" />
+
+                <View
+                    android:layout_width="2dp"
+                    android:layout_height="match_parent"
+                    android:background="#23FFFFFF" />
+
+                <TextView
+                    android:id="@+id/tv_job_name"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="3"
+                    android:gravity="center"
+                    android:text="⼯艺/设备名称"
+                    android:textColor="@color/white"
+                    android:textSize="16sp" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="#23FFFFFF" />
+
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/sop_list"
+                style="@style/CommonRecyclerView"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent" />
+
+        </LinearLayout>
+    </com.google.android.material.card.MaterialCardView>
+
+    <!--  SOP信息  -->
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="start"
+        android:layout_marginLeft="5dp"
+        android:layout_marginBottom="5dp"
+        android:text="请选择SOP"
+        android:textColor="@color/white"
+        android:textSize="15sp" />
+
+    <com.google.android.material.card.MaterialCardView
+        android:id="@+id/sop_info"
+        android:layout_width="match_parent"
+        android:layout_height="300dp"
+        app:cardBackgroundColor="#11000000"
+        app:strokeColor="#23FFFFFF"
+        app:strokeWidth="2dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="horizontal">
+
+            <ImageView
+                android:id="@+id/iv_machinery"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="2"
+                android:padding="20dp" />
+
+            <View
+                android:layout_width="2dp"
+                android:layout_height="match_parent"
+                android:background="#23FFFFFF" />
+
+
+            <androidx.recyclerview.widget.RecyclerView
+                style="@style/CommonRecyclerView"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_weight="1" />
+
+
+        </LinearLayout>
+
+    </com.google.android.material.card.MaterialCardView>
+
+    <!--  底部功能按键  -->
+    <LinearLayout
+        android:id="@+id/ll_fun"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/sop_info"
+        android:layout_alignParentBottom="true"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="10dp"
+        android:layout_marginBottom="10dp"
+        android:orientation="horizontal">
+
+        <LinearLayout
+            android:id="@+id/tv_start_sop"
+            android:layout_width="wrap_content"
+            android:layout_height="45dp"
+            android:background="@drawable/common_btn_bg"
+            android:gravity="center"
+            android:orientation="horizontal"
+            android:paddingHorizontal="10dp">
+
+            <ImageView
+                android:layout_width="28dp"
+                android:layout_height="28dp"
+                android:src="@mipmap/start"
+                android:tint="@color/white" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="10dp"
+                android:text="@string/start_the_job"
+                android:textColor="@color/white"
+                android:textSize="18sp" />
+
+        </LinearLayout>
+
+        <TextView
+            android:id="@+id/tv_back"
+            android:layout_width="wrap_content"
+            android:layout_height="45dp"
+            android:layout_marginLeft="10dp"
+            android:background="@drawable/common_btn_bg"
+            android:gravity="center"
+            android:minWidth="130dp"
+            android:text="@string/back"
+            android:textColor="@color/white"
+            android:textSize="18sp" />
+
+    </LinearLayout>
+
     <com.grkj.iscs_mars.view.widget.CommonBtn
         android:id="@+id/cb_start"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_alignParentRight="true"
         android:layout_alignParentBottom="true"
+        android:visibility="gone"
         app:btn_bg="@drawable/common_btn_blue_bg"
         app:btn_icon="@mipmap/start"
         app:btn_name="@string/start_the_job" />
@@ -21,10 +226,11 @@
         style="@style/CommonBtnBlue"
         android:layout_width="match_parent"
         android:layout_alignParentBottom="true"
+        android:layout_marginRight="@dimen/common_spacing"
         android:layout_toLeftOf="@id/cb_start"
         android:gravity="left|center_vertical"
         android:text="@string/current_sop"
-        android:layout_marginRight="@dimen/common_spacing"/>
+        android:visibility="gone" />
 
     <LinearLayout
         android:layout_width="match_parent"
@@ -33,7 +239,8 @@
         android:layout_marginBottom="@dimen/common_spacing"
         android:background="@drawable/item_rv_technology_sop_bg_normal"
         android:orientation="vertical"
-        android:padding="@dimen/common_spacing">
+        android:padding="@dimen/common_spacing"
+        android:visibility="gone">
 
         <TextView
             android:id="@+id/tv_title"
@@ -46,4 +253,5 @@
             android:layout_height="wrap_content"
             android:orientation="horizontal" />
     </LinearLayout>
-</RelativeLayout>
+
+</LinearLayout>

+ 133 - 10
app/src/main/res/layout/fragment_workshop.xml

@@ -4,27 +4,150 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:paddingHorizontal="20dp"
+    android:paddingTop="10dp"
     tools:context=".view.fragment.WorkshopFragment">
 
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/rv_statistics"
-        style="@style/CommonRecyclerView"
+    <com.google.android.material.card.MaterialCardView
+        android:id="@+id/job_header"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
-        android:orientation="horizontal" />
+        android:layout_marginBottom="10dp"
+        app:cardBackgroundColor="#11000000"
+        app:strokeColor="#23FFFFFF"
+        app:strokeWidth="2dp">
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:paddingHorizontal="20dp"
+            android:paddingVertical="15dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:text="@string/ticket_processing"
+                android:textColor="@color/white"
+                android:textSize="18sp" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:layout_centerVertical="true"
+                android:background="@drawable/common_btn_bg"
+                android:paddingHorizontal="20dp"
+                android:paddingVertical="5dp"
+                android:text="创建"
+                android:textColor="@color/white"
+                android:textSize="16sp" />
+
+        </RelativeLayout>
+
+    </com.google.android.material.card.MaterialCardView>
 
     <com.google.android.material.card.MaterialCardView
+        android:id="@+id/map_root"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_above="@id/rv_statistics"
-        android:layout_marginVertical="10dp"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/job_header"
+        android:layout_marginBottom="10dp"
         app:cardCornerRadius="@dimen/common_radius"
         app:strokeWidth="0dp">
 
         <com.onlylemi.mapview.library.MapView
             android:id="@+id/mapview"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_above="@id/rv_statistics" />
+            android:layout_height="300dp" />
+
+    </com.google.android.material.card.MaterialCardView>
+
+
+    <com.google.android.material.card.MaterialCardView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_above="@id/rv_statistics"
+        android:layout_below="@id/map_root"
+        android:layout_marginBottom="10dp"
+        app:cardBackgroundColor="#11000000"
+        app:strokeColor="#23FFFFFF"
+        app:strokeWidth="2dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/tv_positon"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:text="岗位"
+                    android:textColor="@color/white"
+                    android:textSize="16sp" />
+
+                <View
+                    android:layout_width="2dp"
+                    android:layout_height="match_parent"
+                    android:background="#23FFFFFF" />
+
+                <TextView
+                    android:id="@+id/tv_type"
+                    android:layout_width="80dp"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:text="类型"
+                    android:textColor="@color/white"
+                    android:textSize="16sp" />
+
+                <View
+                    android:layout_width="2dp"
+                    android:layout_height="match_parent"
+                    android:background="#23FFFFFF" />
+
+                <TextView
+                    android:id="@+id/tv_job_name"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="3"
+                    android:gravity="center"
+                    android:text="作业名称"
+                    android:textColor="@color/white"
+                    android:textSize="16sp" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:background="#23FFFFFF"
+                android:layout_height="1dp" />
+
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/jobs_list"
+                style="@style/CommonRecyclerView"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent" />
+
+        </LinearLayout>
     </com.google.android.material.card.MaterialCardView>
+
+
+    <androidx.recyclerview.widget.RecyclerView
+        android:id="@+id/rv_statistics"
+        style="@style/CommonRecyclerView"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_marginStart="-20dp"
+        android:orientation="horizontal" />
+
 </RelativeLayout>

+ 9 - 6
app/src/main/res/layout/item_rv_job_management.xml

@@ -3,7 +3,8 @@
     android:id="@+id/root"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
-    android:layout_marginHorizontal="10dp"
+    android:layout_marginHorizontal="20dp"
+    android:paddingVertical="10dp"
     android:orientation="vertical">
 
     <LinearLayout
@@ -14,20 +15,22 @@
 
         <ImageView
             android:id="@+id/iv"
-            android:layout_width="15dp"
-            android:layout_height="15dp" />
+            android:layout_width="30dp"
+            android:layout_height="30dp" />
 
         <TextView
             android:id="@+id/tv_name"
             style="@style/CommonTextView"
-            android:layout_marginLeft="5dp" />
+            android:layout_marginStart="10dp"
+            android:textSize="18sp" />
+
     </LinearLayout>
 
     <View
         android:id="@+id/v_indicator"
         android:layout_width="match_parent"
-        android:layout_height="@dimen/divider_line_width"
-        android:layout_marginTop="@dimen/divider_line_margin"
+        android:layout_height="5dp"
+        android:layout_marginTop="5dp"
         android:background="@color/main_color"
         android:visibility="gone" />
 </LinearLayout>

+ 60 - 0
app/src/main/res/layout/item_rv_jobs.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="60dp"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <TextView
+            android:id="@+id/tv_positon"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:gravity="center"
+            android:textColor="@color/white"
+            android:textSize="16sp"
+            tools:text="岗位" />
+
+        <View
+            android:id="@+id/line_position"
+            android:layout_width="2dp"
+            android:layout_height="match_parent"
+            android:background="#23FFFFFF" />
+
+        <ImageView
+            android:id="@+id/iv_type"
+            android:padding="10dp"
+            android:layout_width="80dp"
+            android:layout_height="60dp" />
+
+        <View
+            android:layout_width="2dp"
+            android:layout_height="match_parent"
+            android:background="#23FFFFFF" />
+
+        <TextView
+            android:id="@+id/tv_job_name"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="3"
+            android:ellipsize="end"
+            android:gravity="center"
+            android:maxLines="1"
+            android:textColor="@color/white"
+            android:textSize="16sp"
+            tools:text="工艺名称" />
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="2dp"
+        android:background="#23FFFFFF" />
+
+</LinearLayout>

+ 49 - 0
app/src/main/res/layout/item_rv_sop_list.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="60dp"
+    android:id="@+id/root"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <TextView
+            android:id="@+id/tv_positon"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:gravity="center"
+            android:textColor="@color/white"
+            android:textSize="16sp"
+            tools:text="岗位" />
+
+        <View
+            android:layout_width="2dp"
+            android:layout_height="match_parent"
+            android:background="#23FFFFFF" />
+
+        <TextView
+            android:id="@+id/tv_sop_name"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="3"
+            android:ellipsize="end"
+            android:gravity="center"
+            android:maxLines="1"
+            android:textColor="@color/white"
+            android:textSize="16sp"
+            tools:text="工艺名称" />
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="2dp"
+        android:background="#23FFFFFF" />
+
+</LinearLayout>