|
@@ -182,6 +182,15 @@ class WorkerFragment(val goBack: () -> Unit, val changePage: (PageChangeBO) -> U
|
|
|
if (!it?.rows.isNullOrEmpty()) {
|
|
if (!it?.rows.isNullOrEmpty()) {
|
|
|
mLockerList.addAll(it?.rows!!)
|
|
mLockerList.addAll(it?.rows!!)
|
|
|
}
|
|
}
|
|
|
|
|
+ // 上锁人默认选择自己
|
|
|
|
|
+ if (mSelectedList.none { it.userRole == USER_ROLE_LOCKER }) {
|
|
|
|
|
+ val user = it?.rows?.find { it.userId == SPUtils.getLoginUser(requireContext())?.userId }
|
|
|
|
|
+ user?.let {
|
|
|
|
|
+ mSelectedList.add(TicketUserReqVO(it.userId!!, it.nickName!!, "0", USER_ROLE_LOCKER))
|
|
|
|
|
+ mBinding?.layoutLocker?.root?.visibility = View.VISIBLE
|
|
|
|
|
+ mBinding?.layoutLocker?.tvName?.text = it.nickName
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
mBinding?.rvLockerList?.adapter?.notifyDataSetChanged()
|
|
mBinding?.rvLockerList?.adapter?.notifyDataSetChanged()
|
|
|
}
|
|
}
|
|
|
|
|
|