diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt index 2acc9aa..f05e944 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt @@ -1,12 +1,28 @@ package com.casic.xz.meterage.fragment.outfield import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.pengxh.kt.lite.base.KotlinBaseFragment +import kotlinx.android.synthetic.main.fragment_od_base_info.* -class BasicInformationFragment : KotlinBaseFragment() { +class BasicInformationFragment(private val data: OutfieldDetectionDetailModel.DataModel) : + KotlinBaseFragment() { override fun initData() { - + odCodeView.text = data.siteExecutiveNo + odNameView.text = data.siteExecutiveName + directorNameView.text = data.directorName + applyTimeView.text = data.applyTime.formatToYearMonthDay() + taskSourceNameView.text = data.taskSourceName + linkageOrderCodeView.text = data.orderId + preCostView.text = "¥ ${data.preCost}" + preStartTimeView.text = data.preStartTime.formatToYearMonthDay() + preEndTimeView.text = data.preEndTime.formatToYearMonthDay() + executiveAddressView.text = data.executiveAddress + hazardSourceView.text = data.hazardSourceAndPreventionMethod + executiveItemView.text = data.executiveItem + remarkView.text = data.remark } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt index 2acc9aa..f05e944 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt @@ -1,12 +1,28 @@ package com.casic.xz.meterage.fragment.outfield import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.pengxh.kt.lite.base.KotlinBaseFragment +import kotlinx.android.synthetic.main.fragment_od_base_info.* -class BasicInformationFragment : KotlinBaseFragment() { +class BasicInformationFragment(private val data: OutfieldDetectionDetailModel.DataModel) : + KotlinBaseFragment() { override fun initData() { - + odCodeView.text = data.siteExecutiveNo + odNameView.text = data.siteExecutiveName + directorNameView.text = data.directorName + applyTimeView.text = data.applyTime.formatToYearMonthDay() + taskSourceNameView.text = data.taskSourceName + linkageOrderCodeView.text = data.orderId + preCostView.text = "¥ ${data.preCost}" + preStartTimeView.text = data.preStartTime.formatToYearMonthDay() + preEndTimeView.text = data.preEndTime.formatToYearMonthDay() + executiveAddressView.text = data.executiveAddress + hazardSourceView.text = data.hazardSourceAndPreventionMethod + executiveItemView.text = data.executiveItem + remarkView.text = data.remark } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt index 823eed6..4bc3c79 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt @@ -1,12 +1,52 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_device.* -class TaskDeviceFragment : KotlinBaseFragment() { +class TaskDeviceFragment(private val devices: List) : + KotlinBaseFragment() { override fun initData() { + val supportAdapter = object : + NormalRecyclerAdapter( + R.layout.item_device_support_rv_l, devices + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.EquipmentInfoListModel + ) { + if (item.validDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + viewHolder.setText(R.id.nameTagView, item.equipmentName.last().toString()) + .setText(R.id.deviceNameView, item.equipmentName) + .setText(R.id.modelView, item.modelNo) + .setText(R.id.deviceCodeView, "设备编号:${item.equipmentNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.validDate.formatToYearMonthDay()}" + ) + } + } + supportRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + supportRecyclerView.adapter = supportAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt index 2acc9aa..f05e944 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt @@ -1,12 +1,28 @@ package com.casic.xz.meterage.fragment.outfield import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.pengxh.kt.lite.base.KotlinBaseFragment +import kotlinx.android.synthetic.main.fragment_od_base_info.* -class BasicInformationFragment : KotlinBaseFragment() { +class BasicInformationFragment(private val data: OutfieldDetectionDetailModel.DataModel) : + KotlinBaseFragment() { override fun initData() { - + odCodeView.text = data.siteExecutiveNo + odNameView.text = data.siteExecutiveName + directorNameView.text = data.directorName + applyTimeView.text = data.applyTime.formatToYearMonthDay() + taskSourceNameView.text = data.taskSourceName + linkageOrderCodeView.text = data.orderId + preCostView.text = "¥ ${data.preCost}" + preStartTimeView.text = data.preStartTime.formatToYearMonthDay() + preEndTimeView.text = data.preEndTime.formatToYearMonthDay() + executiveAddressView.text = data.executiveAddress + hazardSourceView.text = data.hazardSourceAndPreventionMethod + executiveItemView.text = data.executiveItem + remarkView.text = data.remark } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt index 823eed6..4bc3c79 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt @@ -1,12 +1,52 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_device.* -class TaskDeviceFragment : KotlinBaseFragment() { +class TaskDeviceFragment(private val devices: List) : + KotlinBaseFragment() { override fun initData() { + val supportAdapter = object : + NormalRecyclerAdapter( + R.layout.item_device_support_rv_l, devices + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.EquipmentInfoListModel + ) { + if (item.validDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + viewHolder.setText(R.id.nameTagView, item.equipmentName.last().toString()) + .setText(R.id.deviceNameView, item.equipmentName) + .setText(R.id.modelView, item.modelNo) + .setText(R.id.deviceCodeView, "设备编号:${item.equipmentNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.validDate.formatToYearMonthDay()}" + ) + } + } + supportRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + supportRecyclerView.adapter = supportAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt index ac68b19..8154212 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt @@ -1,12 +1,58 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_executor.* -class TaskExecutorFragment : KotlinBaseFragment() { +class TaskExecutorFragment(private val executors: List) : + KotlinBaseFragment() { override fun initData() { + val staffAdapter = object : + NormalRecyclerAdapter( + R.layout.item_staff_rv_l, executors + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.MeterStaffListModel + ) { + val useDept = if (item.deptName.isNullOrBlank()) { + "未知" + } else { + item.deptName + } + if (item.certificateDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + + viewHolder.setText(R.id.nameTagView, item.name.last().toString()) + .setText(R.id.userNameView, item.name) + .setText(R.id.useDeptView, useDept) + .setText(R.id.certificateView, "证书编号:${item.verifierCertificateNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.certificateDate.formatToYearMonthDay()}" + ) + } + } + staffRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + staffRecyclerView.adapter = staffAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt index 2acc9aa..f05e944 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt @@ -1,12 +1,28 @@ package com.casic.xz.meterage.fragment.outfield import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.pengxh.kt.lite.base.KotlinBaseFragment +import kotlinx.android.synthetic.main.fragment_od_base_info.* -class BasicInformationFragment : KotlinBaseFragment() { +class BasicInformationFragment(private val data: OutfieldDetectionDetailModel.DataModel) : + KotlinBaseFragment() { override fun initData() { - + odCodeView.text = data.siteExecutiveNo + odNameView.text = data.siteExecutiveName + directorNameView.text = data.directorName + applyTimeView.text = data.applyTime.formatToYearMonthDay() + taskSourceNameView.text = data.taskSourceName + linkageOrderCodeView.text = data.orderId + preCostView.text = "¥ ${data.preCost}" + preStartTimeView.text = data.preStartTime.formatToYearMonthDay() + preEndTimeView.text = data.preEndTime.formatToYearMonthDay() + executiveAddressView.text = data.executiveAddress + hazardSourceView.text = data.hazardSourceAndPreventionMethod + executiveItemView.text = data.executiveItem + remarkView.text = data.remark } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt index 823eed6..4bc3c79 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt @@ -1,12 +1,52 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_device.* -class TaskDeviceFragment : KotlinBaseFragment() { +class TaskDeviceFragment(private val devices: List) : + KotlinBaseFragment() { override fun initData() { + val supportAdapter = object : + NormalRecyclerAdapter( + R.layout.item_device_support_rv_l, devices + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.EquipmentInfoListModel + ) { + if (item.validDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + viewHolder.setText(R.id.nameTagView, item.equipmentName.last().toString()) + .setText(R.id.deviceNameView, item.equipmentName) + .setText(R.id.modelView, item.modelNo) + .setText(R.id.deviceCodeView, "设备编号:${item.equipmentNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.validDate.formatToYearMonthDay()}" + ) + } + } + supportRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + supportRecyclerView.adapter = supportAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt index ac68b19..8154212 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt @@ -1,12 +1,58 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_executor.* -class TaskExecutorFragment : KotlinBaseFragment() { +class TaskExecutorFragment(private val executors: List) : + KotlinBaseFragment() { override fun initData() { + val staffAdapter = object : + NormalRecyclerAdapter( + R.layout.item_staff_rv_l, executors + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.MeterStaffListModel + ) { + val useDept = if (item.deptName.isNullOrBlank()) { + "未知" + } else { + item.deptName + } + if (item.certificateDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + + viewHolder.setText(R.id.nameTagView, item.name.last().toString()) + .setText(R.id.userNameView, item.name) + .setText(R.id.useDeptView, useDept) + .setText(R.id.certificateView, "证书编号:${item.verifierCertificateNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.certificateDate.formatToYearMonthDay()}" + ) + } + } + staffRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + staffRecyclerView.adapter = staffAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java new file mode 100644 index 0000000..f6530ca --- /dev/null +++ b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java @@ -0,0 +1,1177 @@ +package com.casic.xz.meterage.model; + +import java.util.List; + +public class OutfieldDetectionDetailModel { + + private int code; + private DataModel data; + private String message; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataModel getData() { + return data; + } + + public void setData(DataModel data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public static class DataModel { + private String applyTime; + private String approvalStatus; + private String createTime; + private String createUser; + private String customerId; + private String directorId; + private String directorName; + private List equipmentInfoList; + private String executiveAddress; + private String executiveEnvironment; + private String executiveItem; + private String hazardSourceAndPreventionMethod; + private String id; + private String isDel; + private List meterStaffList; + private String orderId; + private String preCost; + private String preEndTime; + private String preStartTime; + private String processId; + private String remark; + private String siteExecutiveName; + private String siteExecutiveNo; + private String taskSource; + private String taskSourceName; + private String updateTime; + + public String getApplyTime() { + return applyTime; + } + + public void setApplyTime(String applyTime) { + this.applyTime = applyTime; + } + + public String getApprovalStatus() { + return approvalStatus; + } + + public void setApprovalStatus(String approvalStatus) { + this.approvalStatus = approvalStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getDirectorId() { + return directorId; + } + + public void setDirectorId(String directorId) { + this.directorId = directorId; + } + + public String getDirectorName() { + return directorName; + } + + public void setDirectorName(String directorName) { + this.directorName = directorName; + } + + public List getEquipmentInfoList() { + return equipmentInfoList; + } + + public void setEquipmentInfoList(List equipmentInfoList) { + this.equipmentInfoList = equipmentInfoList; + } + + public String getExecutiveAddress() { + return executiveAddress; + } + + public void setExecutiveAddress(String executiveAddress) { + this.executiveAddress = executiveAddress; + } + + public String getExecutiveEnvironment() { + return executiveEnvironment; + } + + public void setExecutiveEnvironment(String executiveEnvironment) { + this.executiveEnvironment = executiveEnvironment; + } + + public String getExecutiveItem() { + return executiveItem; + } + + public void setExecutiveItem(String executiveItem) { + this.executiveItem = executiveItem; + } + + public String getHazardSourceAndPreventionMethod() { + return hazardSourceAndPreventionMethod; + } + + public void setHazardSourceAndPreventionMethod(String hazardSourceAndPreventionMethod) { + this.hazardSourceAndPreventionMethod = hazardSourceAndPreventionMethod; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public List getMeterStaffList() { + return meterStaffList; + } + + public void setMeterStaffList(List meterStaffList) { + this.meterStaffList = meterStaffList; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public String getPreCost() { + return preCost; + } + + public void setPreCost(String preCost) { + this.preCost = preCost; + } + + public String getPreEndTime() { + return preEndTime; + } + + public void setPreEndTime(String preEndTime) { + this.preEndTime = preEndTime; + } + + public String getPreStartTime() { + return preStartTime; + } + + public void setPreStartTime(String preStartTime) { + this.preStartTime = preStartTime; + } + + public String getProcessId() { + return processId; + } + + public void setProcessId(String processId) { + this.processId = processId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSiteExecutiveName() { + return siteExecutiveName; + } + + public void setSiteExecutiveName(String siteExecutiveName) { + this.siteExecutiveName = siteExecutiveName; + } + + public String getSiteExecutiveNo() { + return siteExecutiveNo; + } + + public void setSiteExecutiveNo(String siteExecutiveNo) { + this.siteExecutiveNo = siteExecutiveNo; + } + + public String getTaskSource() { + return taskSource; + } + + public void setTaskSource(String taskSource) { + this.taskSource = taskSource; + } + + public String getTaskSourceName() { + return taskSourceName; + } + + public void setTaskSourceName(String taskSourceName) { + this.taskSourceName = taskSourceName; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public static class EquipmentInfoListModel { + private String abc; + private String abcName; + private String applyRelationId; + private String assetNo; + private String assetSource; + private String assetType; + private String assetTypeName; + private String attribute; + private String capitalSource; + private String capitalSourceName; + private String cardEstablishmentDate; + private String compulsoryVerification; + private String createTime; + private String createUser; + private String depreciationMethod; + private String depreciationMethodName; + private String depreciationPeriod; + private String enableDate; + private String equipmentCategory; + private String equipmentCategoryName; + private String equipmentName; + private String equipmentNo; + private String equipmentSpecifications; + private String equipmentType; + private String equipmentTypeName; + private String fileList; + private String id; + private String installIncidentalExpenses; + private String installPlace; + private String intactState; + private String isCalibrationTestEquipment; + private String isDel; + private String isFixedAssets; + private String isMeasureAccount; + private String isStandardSupportEquipment; + private String labelBind; + private String majorCategory; + private String majorCategoryName; + private String managerLevel; + private String managerLevelName; + private String managerState; + private String managerStateName; + private String manufacturer; + private String manufacturerCountry; + private String manufacturingDate; + private String manufacturingNo; + private String mesureCycle; + private String mesureDate; + private String mesureDept; + private String mesureRange; + private String mesureResult; + private String mesureResultName; + private String mesureType; + private String mesureTypeName; + private String modelNo; + private String originValue; + private String overallDimension; + private String presentOriginValue; + private String purpose; + private String remark; + private String singlePrice; + private String supportStandardEquipmentName; + private String supportStandardEquipmentNo; + private String technicalLevel; + private String uncertainty; + private String updateTime; + private String useDept; + private String useDeptName; + private String usePerson; + private String usePersonName; + private String validDate; + private String version; + private String weight; + + public String getAbc() { + return abc; + } + + public void setAbc(String abc) { + this.abc = abc; + } + + public String getAbcName() { + return abcName; + } + + public void setAbcName(String abcName) { + this.abcName = abcName; + } + + public String getApplyRelationId() { + return applyRelationId; + } + + public void setApplyRelationId(String applyRelationId) { + this.applyRelationId = applyRelationId; + } + + public String getAssetNo() { + return assetNo; + } + + public void setAssetNo(String assetNo) { + this.assetNo = assetNo; + } + + public String getAssetSource() { + return assetSource; + } + + public void setAssetSource(String assetSource) { + this.assetSource = assetSource; + } + + public String getAssetType() { + return assetType; + } + + public void setAssetType(String assetType) { + this.assetType = assetType; + } + + public String getAssetTypeName() { + return assetTypeName; + } + + public void setAssetTypeName(String assetTypeName) { + this.assetTypeName = assetTypeName; + } + + public String getAttribute() { + return attribute; + } + + public void setAttribute(String attribute) { + this.attribute = attribute; + } + + public String getCapitalSource() { + return capitalSource; + } + + public void setCapitalSource(String capitalSource) { + this.capitalSource = capitalSource; + } + + public String getCapitalSourceName() { + return capitalSourceName; + } + + public void setCapitalSourceName(String capitalSourceName) { + this.capitalSourceName = capitalSourceName; + } + + public String getCardEstablishmentDate() { + return cardEstablishmentDate; + } + + public void setCardEstablishmentDate(String cardEstablishmentDate) { + this.cardEstablishmentDate = cardEstablishmentDate; + } + + public String getCompulsoryVerification() { + return compulsoryVerification; + } + + public void setCompulsoryVerification(String compulsoryVerification) { + this.compulsoryVerification = compulsoryVerification; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getDepreciationMethod() { + return depreciationMethod; + } + + public void setDepreciationMethod(String depreciationMethod) { + this.depreciationMethod = depreciationMethod; + } + + public String getDepreciationMethodName() { + return depreciationMethodName; + } + + public void setDepreciationMethodName(String depreciationMethodName) { + this.depreciationMethodName = depreciationMethodName; + } + + public String getDepreciationPeriod() { + return depreciationPeriod; + } + + public void setDepreciationPeriod(String depreciationPeriod) { + this.depreciationPeriod = depreciationPeriod; + } + + public String getEnableDate() { + return enableDate; + } + + public void setEnableDate(String enableDate) { + this.enableDate = enableDate; + } + + public String getEquipmentCategory() { + return equipmentCategory; + } + + public void setEquipmentCategory(String equipmentCategory) { + this.equipmentCategory = equipmentCategory; + } + + public String getEquipmentCategoryName() { + return equipmentCategoryName; + } + + public void setEquipmentCategoryName(String equipmentCategoryName) { + this.equipmentCategoryName = equipmentCategoryName; + } + + public String getEquipmentName() { + return equipmentName; + } + + public void setEquipmentName(String equipmentName) { + this.equipmentName = equipmentName; + } + + public String getEquipmentNo() { + return equipmentNo; + } + + public void setEquipmentNo(String equipmentNo) { + this.equipmentNo = equipmentNo; + } + + public String getEquipmentSpecifications() { + return equipmentSpecifications; + } + + public void setEquipmentSpecifications(String equipmentSpecifications) { + this.equipmentSpecifications = equipmentSpecifications; + } + + public String getEquipmentType() { + return equipmentType; + } + + public void setEquipmentType(String equipmentType) { + this.equipmentType = equipmentType; + } + + public String getEquipmentTypeName() { + return equipmentTypeName; + } + + public void setEquipmentTypeName(String equipmentTypeName) { + this.equipmentTypeName = equipmentTypeName; + } + + public String getFileList() { + return fileList; + } + + public void setFileList(String fileList) { + this.fileList = fileList; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getInstallIncidentalExpenses() { + return installIncidentalExpenses; + } + + public void setInstallIncidentalExpenses(String installIncidentalExpenses) { + this.installIncidentalExpenses = installIncidentalExpenses; + } + + public String getInstallPlace() { + return installPlace; + } + + public void setInstallPlace(String installPlace) { + this.installPlace = installPlace; + } + + public String getIntactState() { + return intactState; + } + + public void setIntactState(String intactState) { + this.intactState = intactState; + } + + public String getIsCalibrationTestEquipment() { + return isCalibrationTestEquipment; + } + + public void setIsCalibrationTestEquipment(String isCalibrationTestEquipment) { + this.isCalibrationTestEquipment = isCalibrationTestEquipment; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getIsFixedAssets() { + return isFixedAssets; + } + + public void setIsFixedAssets(String isFixedAssets) { + this.isFixedAssets = isFixedAssets; + } + + public String getIsMeasureAccount() { + return isMeasureAccount; + } + + public void setIsMeasureAccount(String isMeasureAccount) { + this.isMeasureAccount = isMeasureAccount; + } + + public String getIsStandardSupportEquipment() { + return isStandardSupportEquipment; + } + + public void setIsStandardSupportEquipment(String isStandardSupportEquipment) { + this.isStandardSupportEquipment = isStandardSupportEquipment; + } + + public String getLabelBind() { + return labelBind; + } + + public void setLabelBind(String labelBind) { + this.labelBind = labelBind; + } + + public String getMajorCategory() { + return majorCategory; + } + + public void setMajorCategory(String majorCategory) { + this.majorCategory = majorCategory; + } + + public String getMajorCategoryName() { + return majorCategoryName; + } + + public void setMajorCategoryName(String majorCategoryName) { + this.majorCategoryName = majorCategoryName; + } + + public String getManagerLevel() { + return managerLevel; + } + + public void setManagerLevel(String managerLevel) { + this.managerLevel = managerLevel; + } + + public String getManagerLevelName() { + return managerLevelName; + } + + public void setManagerLevelName(String managerLevelName) { + this.managerLevelName = managerLevelName; + } + + public String getManagerState() { + return managerState; + } + + public void setManagerState(String managerState) { + this.managerState = managerState; + } + + public String getManagerStateName() { + return managerStateName; + } + + public void setManagerStateName(String managerStateName) { + this.managerStateName = managerStateName; + } + + public String getManufacturer() { + return manufacturer; + } + + public void setManufacturer(String manufacturer) { + this.manufacturer = manufacturer; + } + + public String getManufacturerCountry() { + return manufacturerCountry; + } + + public void setManufacturerCountry(String manufacturerCountry) { + this.manufacturerCountry = manufacturerCountry; + } + + public String getManufacturingDate() { + return manufacturingDate; + } + + public void setManufacturingDate(String manufacturingDate) { + this.manufacturingDate = manufacturingDate; + } + + public String getManufacturingNo() { + return manufacturingNo; + } + + public void setManufacturingNo(String manufacturingNo) { + this.manufacturingNo = manufacturingNo; + } + + public String getMesureCycle() { + return mesureCycle; + } + + public void setMesureCycle(String mesureCycle) { + this.mesureCycle = mesureCycle; + } + + public String getMesureDate() { + return mesureDate; + } + + public void setMesureDate(String mesureDate) { + this.mesureDate = mesureDate; + } + + public String getMesureDept() { + return mesureDept; + } + + public void setMesureDept(String mesureDept) { + this.mesureDept = mesureDept; + } + + public String getMesureRange() { + return mesureRange; + } + + public void setMesureRange(String mesureRange) { + this.mesureRange = mesureRange; + } + + public String getMesureResult() { + return mesureResult; + } + + public void setMesureResult(String mesureResult) { + this.mesureResult = mesureResult; + } + + public String getMesureResultName() { + return mesureResultName; + } + + public void setMesureResultName(String mesureResultName) { + this.mesureResultName = mesureResultName; + } + + public String getMesureType() { + return mesureType; + } + + public void setMesureType(String mesureType) { + this.mesureType = mesureType; + } + + public String getMesureTypeName() { + return mesureTypeName; + } + + public void setMesureTypeName(String mesureTypeName) { + this.mesureTypeName = mesureTypeName; + } + + public String getModelNo() { + return modelNo; + } + + public void setModelNo(String modelNo) { + this.modelNo = modelNo; + } + + public String getOriginValue() { + return originValue; + } + + public void setOriginValue(String originValue) { + this.originValue = originValue; + } + + public String getOverallDimension() { + return overallDimension; + } + + public void setOverallDimension(String overallDimension) { + this.overallDimension = overallDimension; + } + + public String getPresentOriginValue() { + return presentOriginValue; + } + + public void setPresentOriginValue(String presentOriginValue) { + this.presentOriginValue = presentOriginValue; + } + + public String getPurpose() { + return purpose; + } + + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSinglePrice() { + return singlePrice; + } + + public void setSinglePrice(String singlePrice) { + this.singlePrice = singlePrice; + } + + public String getSupportStandardEquipmentName() { + return supportStandardEquipmentName; + } + + public void setSupportStandardEquipmentName(String supportStandardEquipmentName) { + this.supportStandardEquipmentName = supportStandardEquipmentName; + } + + public String getSupportStandardEquipmentNo() { + return supportStandardEquipmentNo; + } + + public void setSupportStandardEquipmentNo(String supportStandardEquipmentNo) { + this.supportStandardEquipmentNo = supportStandardEquipmentNo; + } + + public String getTechnicalLevel() { + return technicalLevel; + } + + public void setTechnicalLevel(String technicalLevel) { + this.technicalLevel = technicalLevel; + } + + public String getUncertainty() { + return uncertainty; + } + + public void setUncertainty(String uncertainty) { + this.uncertainty = uncertainty; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUseDept() { + return useDept; + } + + public void setUseDept(String useDept) { + this.useDept = useDept; + } + + public String getUseDeptName() { + return useDeptName; + } + + public void setUseDeptName(String useDeptName) { + this.useDeptName = useDeptName; + } + + public String getUsePerson() { + return usePerson; + } + + public void setUsePerson(String usePerson) { + this.usePerson = usePerson; + } + + public String getUsePersonName() { + return usePersonName; + } + + public void setUsePersonName(String usePersonName) { + this.usePersonName = usePersonName; + } + + public String getValidDate() { + return validDate; + } + + public void setValidDate(String validDate) { + this.validDate = validDate; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getWeight() { + return weight; + } + + public void setWeight(String weight) { + this.weight = weight; + } + } + + public static class MeterStaffListModel { + private String account; + private String administrationJob; + private String birthday; + private String certificateCompany; + private String certificateDate; + private String certificateList; + private String createTime; + private String deptId; + private String deptName; + private String education; + private String id; + private String idCard; + private String isDel; + private String mainExaminer; + private String major; + private String minioFileName; + private String name; + private String remark; + private String sex; + private String specialOperator; + private String staffNo; + private String technologyExam; + private String technologyJob; + private String updateTime; + private String userId; + private String verifierCertificateNo; + private String workDate; + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getAdministrationJob() { + return administrationJob; + } + + public void setAdministrationJob(String administrationJob) { + this.administrationJob = administrationJob; + } + + public String getBirthday() { + return birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getCertificateCompany() { + return certificateCompany; + } + + public void setCertificateCompany(String certificateCompany) { + this.certificateCompany = certificateCompany; + } + + public String getCertificateDate() { + return certificateDate; + } + + public void setCertificateDate(String certificateDate) { + this.certificateDate = certificateDate; + } + + public String getCertificateList() { + return certificateList; + } + + public void setCertificateList(String certificateList) { + this.certificateList = certificateList; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getDeptId() { + return deptId; + } + + public void setDeptId(String deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getEducation() { + return education; + } + + public void setEducation(String education) { + this.education = education; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getMainExaminer() { + return mainExaminer; + } + + public void setMainExaminer(String mainExaminer) { + this.mainExaminer = mainExaminer; + } + + public String getMajor() { + return major; + } + + public void setMajor(String major) { + this.major = major; + } + + public String getMinioFileName() { + return minioFileName; + } + + public void setMinioFileName(String minioFileName) { + this.minioFileName = minioFileName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getSpecialOperator() { + return specialOperator; + } + + public void setSpecialOperator(String specialOperator) { + this.specialOperator = specialOperator; + } + + public String getStaffNo() { + return staffNo; + } + + public void setStaffNo(String staffNo) { + this.staffNo = staffNo; + } + + public String getTechnologyExam() { + return technologyExam; + } + + public void setTechnologyExam(String technologyExam) { + this.technologyExam = technologyExam; + } + + public String getTechnologyJob() { + return technologyJob; + } + + public void setTechnologyJob(String technologyJob) { + this.technologyJob = technologyJob; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getVerifierCertificateNo() { + return verifierCertificateNo; + } + + public void setVerifierCertificateNo(String verifierCertificateNo) { + this.verifierCertificateNo = verifierCertificateNo; + } + + public String getWorkDate() { + return workDate; + } + + public void setWorkDate(String workDate) { + this.workDate = workDate; + } + } + } +} diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt index 2acc9aa..f05e944 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt @@ -1,12 +1,28 @@ package com.casic.xz.meterage.fragment.outfield import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.pengxh.kt.lite.base.KotlinBaseFragment +import kotlinx.android.synthetic.main.fragment_od_base_info.* -class BasicInformationFragment : KotlinBaseFragment() { +class BasicInformationFragment(private val data: OutfieldDetectionDetailModel.DataModel) : + KotlinBaseFragment() { override fun initData() { - + odCodeView.text = data.siteExecutiveNo + odNameView.text = data.siteExecutiveName + directorNameView.text = data.directorName + applyTimeView.text = data.applyTime.formatToYearMonthDay() + taskSourceNameView.text = data.taskSourceName + linkageOrderCodeView.text = data.orderId + preCostView.text = "¥ ${data.preCost}" + preStartTimeView.text = data.preStartTime.formatToYearMonthDay() + preEndTimeView.text = data.preEndTime.formatToYearMonthDay() + executiveAddressView.text = data.executiveAddress + hazardSourceView.text = data.hazardSourceAndPreventionMethod + executiveItemView.text = data.executiveItem + remarkView.text = data.remark } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt index 823eed6..4bc3c79 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt @@ -1,12 +1,52 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_device.* -class TaskDeviceFragment : KotlinBaseFragment() { +class TaskDeviceFragment(private val devices: List) : + KotlinBaseFragment() { override fun initData() { + val supportAdapter = object : + NormalRecyclerAdapter( + R.layout.item_device_support_rv_l, devices + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.EquipmentInfoListModel + ) { + if (item.validDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + viewHolder.setText(R.id.nameTagView, item.equipmentName.last().toString()) + .setText(R.id.deviceNameView, item.equipmentName) + .setText(R.id.modelView, item.modelNo) + .setText(R.id.deviceCodeView, "设备编号:${item.equipmentNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.validDate.formatToYearMonthDay()}" + ) + } + } + supportRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + supportRecyclerView.adapter = supportAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt index ac68b19..8154212 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt @@ -1,12 +1,58 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_executor.* -class TaskExecutorFragment : KotlinBaseFragment() { +class TaskExecutorFragment(private val executors: List) : + KotlinBaseFragment() { override fun initData() { + val staffAdapter = object : + NormalRecyclerAdapter( + R.layout.item_staff_rv_l, executors + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.MeterStaffListModel + ) { + val useDept = if (item.deptName.isNullOrBlank()) { + "未知" + } else { + item.deptName + } + if (item.certificateDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + + viewHolder.setText(R.id.nameTagView, item.name.last().toString()) + .setText(R.id.userNameView, item.name) + .setText(R.id.useDeptView, useDept) + .setText(R.id.certificateView, "证书编号:${item.verifierCertificateNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.certificateDate.formatToYearMonthDay()}" + ) + } + } + staffRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + staffRecyclerView.adapter = staffAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java new file mode 100644 index 0000000..f6530ca --- /dev/null +++ b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java @@ -0,0 +1,1177 @@ +package com.casic.xz.meterage.model; + +import java.util.List; + +public class OutfieldDetectionDetailModel { + + private int code; + private DataModel data; + private String message; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataModel getData() { + return data; + } + + public void setData(DataModel data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public static class DataModel { + private String applyTime; + private String approvalStatus; + private String createTime; + private String createUser; + private String customerId; + private String directorId; + private String directorName; + private List equipmentInfoList; + private String executiveAddress; + private String executiveEnvironment; + private String executiveItem; + private String hazardSourceAndPreventionMethod; + private String id; + private String isDel; + private List meterStaffList; + private String orderId; + private String preCost; + private String preEndTime; + private String preStartTime; + private String processId; + private String remark; + private String siteExecutiveName; + private String siteExecutiveNo; + private String taskSource; + private String taskSourceName; + private String updateTime; + + public String getApplyTime() { + return applyTime; + } + + public void setApplyTime(String applyTime) { + this.applyTime = applyTime; + } + + public String getApprovalStatus() { + return approvalStatus; + } + + public void setApprovalStatus(String approvalStatus) { + this.approvalStatus = approvalStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getDirectorId() { + return directorId; + } + + public void setDirectorId(String directorId) { + this.directorId = directorId; + } + + public String getDirectorName() { + return directorName; + } + + public void setDirectorName(String directorName) { + this.directorName = directorName; + } + + public List getEquipmentInfoList() { + return equipmentInfoList; + } + + public void setEquipmentInfoList(List equipmentInfoList) { + this.equipmentInfoList = equipmentInfoList; + } + + public String getExecutiveAddress() { + return executiveAddress; + } + + public void setExecutiveAddress(String executiveAddress) { + this.executiveAddress = executiveAddress; + } + + public String getExecutiveEnvironment() { + return executiveEnvironment; + } + + public void setExecutiveEnvironment(String executiveEnvironment) { + this.executiveEnvironment = executiveEnvironment; + } + + public String getExecutiveItem() { + return executiveItem; + } + + public void setExecutiveItem(String executiveItem) { + this.executiveItem = executiveItem; + } + + public String getHazardSourceAndPreventionMethod() { + return hazardSourceAndPreventionMethod; + } + + public void setHazardSourceAndPreventionMethod(String hazardSourceAndPreventionMethod) { + this.hazardSourceAndPreventionMethod = hazardSourceAndPreventionMethod; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public List getMeterStaffList() { + return meterStaffList; + } + + public void setMeterStaffList(List meterStaffList) { + this.meterStaffList = meterStaffList; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public String getPreCost() { + return preCost; + } + + public void setPreCost(String preCost) { + this.preCost = preCost; + } + + public String getPreEndTime() { + return preEndTime; + } + + public void setPreEndTime(String preEndTime) { + this.preEndTime = preEndTime; + } + + public String getPreStartTime() { + return preStartTime; + } + + public void setPreStartTime(String preStartTime) { + this.preStartTime = preStartTime; + } + + public String getProcessId() { + return processId; + } + + public void setProcessId(String processId) { + this.processId = processId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSiteExecutiveName() { + return siteExecutiveName; + } + + public void setSiteExecutiveName(String siteExecutiveName) { + this.siteExecutiveName = siteExecutiveName; + } + + public String getSiteExecutiveNo() { + return siteExecutiveNo; + } + + public void setSiteExecutiveNo(String siteExecutiveNo) { + this.siteExecutiveNo = siteExecutiveNo; + } + + public String getTaskSource() { + return taskSource; + } + + public void setTaskSource(String taskSource) { + this.taskSource = taskSource; + } + + public String getTaskSourceName() { + return taskSourceName; + } + + public void setTaskSourceName(String taskSourceName) { + this.taskSourceName = taskSourceName; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public static class EquipmentInfoListModel { + private String abc; + private String abcName; + private String applyRelationId; + private String assetNo; + private String assetSource; + private String assetType; + private String assetTypeName; + private String attribute; + private String capitalSource; + private String capitalSourceName; + private String cardEstablishmentDate; + private String compulsoryVerification; + private String createTime; + private String createUser; + private String depreciationMethod; + private String depreciationMethodName; + private String depreciationPeriod; + private String enableDate; + private String equipmentCategory; + private String equipmentCategoryName; + private String equipmentName; + private String equipmentNo; + private String equipmentSpecifications; + private String equipmentType; + private String equipmentTypeName; + private String fileList; + private String id; + private String installIncidentalExpenses; + private String installPlace; + private String intactState; + private String isCalibrationTestEquipment; + private String isDel; + private String isFixedAssets; + private String isMeasureAccount; + private String isStandardSupportEquipment; + private String labelBind; + private String majorCategory; + private String majorCategoryName; + private String managerLevel; + private String managerLevelName; + private String managerState; + private String managerStateName; + private String manufacturer; + private String manufacturerCountry; + private String manufacturingDate; + private String manufacturingNo; + private String mesureCycle; + private String mesureDate; + private String mesureDept; + private String mesureRange; + private String mesureResult; + private String mesureResultName; + private String mesureType; + private String mesureTypeName; + private String modelNo; + private String originValue; + private String overallDimension; + private String presentOriginValue; + private String purpose; + private String remark; + private String singlePrice; + private String supportStandardEquipmentName; + private String supportStandardEquipmentNo; + private String technicalLevel; + private String uncertainty; + private String updateTime; + private String useDept; + private String useDeptName; + private String usePerson; + private String usePersonName; + private String validDate; + private String version; + private String weight; + + public String getAbc() { + return abc; + } + + public void setAbc(String abc) { + this.abc = abc; + } + + public String getAbcName() { + return abcName; + } + + public void setAbcName(String abcName) { + this.abcName = abcName; + } + + public String getApplyRelationId() { + return applyRelationId; + } + + public void setApplyRelationId(String applyRelationId) { + this.applyRelationId = applyRelationId; + } + + public String getAssetNo() { + return assetNo; + } + + public void setAssetNo(String assetNo) { + this.assetNo = assetNo; + } + + public String getAssetSource() { + return assetSource; + } + + public void setAssetSource(String assetSource) { + this.assetSource = assetSource; + } + + public String getAssetType() { + return assetType; + } + + public void setAssetType(String assetType) { + this.assetType = assetType; + } + + public String getAssetTypeName() { + return assetTypeName; + } + + public void setAssetTypeName(String assetTypeName) { + this.assetTypeName = assetTypeName; + } + + public String getAttribute() { + return attribute; + } + + public void setAttribute(String attribute) { + this.attribute = attribute; + } + + public String getCapitalSource() { + return capitalSource; + } + + public void setCapitalSource(String capitalSource) { + this.capitalSource = capitalSource; + } + + public String getCapitalSourceName() { + return capitalSourceName; + } + + public void setCapitalSourceName(String capitalSourceName) { + this.capitalSourceName = capitalSourceName; + } + + public String getCardEstablishmentDate() { + return cardEstablishmentDate; + } + + public void setCardEstablishmentDate(String cardEstablishmentDate) { + this.cardEstablishmentDate = cardEstablishmentDate; + } + + public String getCompulsoryVerification() { + return compulsoryVerification; + } + + public void setCompulsoryVerification(String compulsoryVerification) { + this.compulsoryVerification = compulsoryVerification; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getDepreciationMethod() { + return depreciationMethod; + } + + public void setDepreciationMethod(String depreciationMethod) { + this.depreciationMethod = depreciationMethod; + } + + public String getDepreciationMethodName() { + return depreciationMethodName; + } + + public void setDepreciationMethodName(String depreciationMethodName) { + this.depreciationMethodName = depreciationMethodName; + } + + public String getDepreciationPeriod() { + return depreciationPeriod; + } + + public void setDepreciationPeriod(String depreciationPeriod) { + this.depreciationPeriod = depreciationPeriod; + } + + public String getEnableDate() { + return enableDate; + } + + public void setEnableDate(String enableDate) { + this.enableDate = enableDate; + } + + public String getEquipmentCategory() { + return equipmentCategory; + } + + public void setEquipmentCategory(String equipmentCategory) { + this.equipmentCategory = equipmentCategory; + } + + public String getEquipmentCategoryName() { + return equipmentCategoryName; + } + + public void setEquipmentCategoryName(String equipmentCategoryName) { + this.equipmentCategoryName = equipmentCategoryName; + } + + public String getEquipmentName() { + return equipmentName; + } + + public void setEquipmentName(String equipmentName) { + this.equipmentName = equipmentName; + } + + public String getEquipmentNo() { + return equipmentNo; + } + + public void setEquipmentNo(String equipmentNo) { + this.equipmentNo = equipmentNo; + } + + public String getEquipmentSpecifications() { + return equipmentSpecifications; + } + + public void setEquipmentSpecifications(String equipmentSpecifications) { + this.equipmentSpecifications = equipmentSpecifications; + } + + public String getEquipmentType() { + return equipmentType; + } + + public void setEquipmentType(String equipmentType) { + this.equipmentType = equipmentType; + } + + public String getEquipmentTypeName() { + return equipmentTypeName; + } + + public void setEquipmentTypeName(String equipmentTypeName) { + this.equipmentTypeName = equipmentTypeName; + } + + public String getFileList() { + return fileList; + } + + public void setFileList(String fileList) { + this.fileList = fileList; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getInstallIncidentalExpenses() { + return installIncidentalExpenses; + } + + public void setInstallIncidentalExpenses(String installIncidentalExpenses) { + this.installIncidentalExpenses = installIncidentalExpenses; + } + + public String getInstallPlace() { + return installPlace; + } + + public void setInstallPlace(String installPlace) { + this.installPlace = installPlace; + } + + public String getIntactState() { + return intactState; + } + + public void setIntactState(String intactState) { + this.intactState = intactState; + } + + public String getIsCalibrationTestEquipment() { + return isCalibrationTestEquipment; + } + + public void setIsCalibrationTestEquipment(String isCalibrationTestEquipment) { + this.isCalibrationTestEquipment = isCalibrationTestEquipment; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getIsFixedAssets() { + return isFixedAssets; + } + + public void setIsFixedAssets(String isFixedAssets) { + this.isFixedAssets = isFixedAssets; + } + + public String getIsMeasureAccount() { + return isMeasureAccount; + } + + public void setIsMeasureAccount(String isMeasureAccount) { + this.isMeasureAccount = isMeasureAccount; + } + + public String getIsStandardSupportEquipment() { + return isStandardSupportEquipment; + } + + public void setIsStandardSupportEquipment(String isStandardSupportEquipment) { + this.isStandardSupportEquipment = isStandardSupportEquipment; + } + + public String getLabelBind() { + return labelBind; + } + + public void setLabelBind(String labelBind) { + this.labelBind = labelBind; + } + + public String getMajorCategory() { + return majorCategory; + } + + public void setMajorCategory(String majorCategory) { + this.majorCategory = majorCategory; + } + + public String getMajorCategoryName() { + return majorCategoryName; + } + + public void setMajorCategoryName(String majorCategoryName) { + this.majorCategoryName = majorCategoryName; + } + + public String getManagerLevel() { + return managerLevel; + } + + public void setManagerLevel(String managerLevel) { + this.managerLevel = managerLevel; + } + + public String getManagerLevelName() { + return managerLevelName; + } + + public void setManagerLevelName(String managerLevelName) { + this.managerLevelName = managerLevelName; + } + + public String getManagerState() { + return managerState; + } + + public void setManagerState(String managerState) { + this.managerState = managerState; + } + + public String getManagerStateName() { + return managerStateName; + } + + public void setManagerStateName(String managerStateName) { + this.managerStateName = managerStateName; + } + + public String getManufacturer() { + return manufacturer; + } + + public void setManufacturer(String manufacturer) { + this.manufacturer = manufacturer; + } + + public String getManufacturerCountry() { + return manufacturerCountry; + } + + public void setManufacturerCountry(String manufacturerCountry) { + this.manufacturerCountry = manufacturerCountry; + } + + public String getManufacturingDate() { + return manufacturingDate; + } + + public void setManufacturingDate(String manufacturingDate) { + this.manufacturingDate = manufacturingDate; + } + + public String getManufacturingNo() { + return manufacturingNo; + } + + public void setManufacturingNo(String manufacturingNo) { + this.manufacturingNo = manufacturingNo; + } + + public String getMesureCycle() { + return mesureCycle; + } + + public void setMesureCycle(String mesureCycle) { + this.mesureCycle = mesureCycle; + } + + public String getMesureDate() { + return mesureDate; + } + + public void setMesureDate(String mesureDate) { + this.mesureDate = mesureDate; + } + + public String getMesureDept() { + return mesureDept; + } + + public void setMesureDept(String mesureDept) { + this.mesureDept = mesureDept; + } + + public String getMesureRange() { + return mesureRange; + } + + public void setMesureRange(String mesureRange) { + this.mesureRange = mesureRange; + } + + public String getMesureResult() { + return mesureResult; + } + + public void setMesureResult(String mesureResult) { + this.mesureResult = mesureResult; + } + + public String getMesureResultName() { + return mesureResultName; + } + + public void setMesureResultName(String mesureResultName) { + this.mesureResultName = mesureResultName; + } + + public String getMesureType() { + return mesureType; + } + + public void setMesureType(String mesureType) { + this.mesureType = mesureType; + } + + public String getMesureTypeName() { + return mesureTypeName; + } + + public void setMesureTypeName(String mesureTypeName) { + this.mesureTypeName = mesureTypeName; + } + + public String getModelNo() { + return modelNo; + } + + public void setModelNo(String modelNo) { + this.modelNo = modelNo; + } + + public String getOriginValue() { + return originValue; + } + + public void setOriginValue(String originValue) { + this.originValue = originValue; + } + + public String getOverallDimension() { + return overallDimension; + } + + public void setOverallDimension(String overallDimension) { + this.overallDimension = overallDimension; + } + + public String getPresentOriginValue() { + return presentOriginValue; + } + + public void setPresentOriginValue(String presentOriginValue) { + this.presentOriginValue = presentOriginValue; + } + + public String getPurpose() { + return purpose; + } + + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSinglePrice() { + return singlePrice; + } + + public void setSinglePrice(String singlePrice) { + this.singlePrice = singlePrice; + } + + public String getSupportStandardEquipmentName() { + return supportStandardEquipmentName; + } + + public void setSupportStandardEquipmentName(String supportStandardEquipmentName) { + this.supportStandardEquipmentName = supportStandardEquipmentName; + } + + public String getSupportStandardEquipmentNo() { + return supportStandardEquipmentNo; + } + + public void setSupportStandardEquipmentNo(String supportStandardEquipmentNo) { + this.supportStandardEquipmentNo = supportStandardEquipmentNo; + } + + public String getTechnicalLevel() { + return technicalLevel; + } + + public void setTechnicalLevel(String technicalLevel) { + this.technicalLevel = technicalLevel; + } + + public String getUncertainty() { + return uncertainty; + } + + public void setUncertainty(String uncertainty) { + this.uncertainty = uncertainty; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUseDept() { + return useDept; + } + + public void setUseDept(String useDept) { + this.useDept = useDept; + } + + public String getUseDeptName() { + return useDeptName; + } + + public void setUseDeptName(String useDeptName) { + this.useDeptName = useDeptName; + } + + public String getUsePerson() { + return usePerson; + } + + public void setUsePerson(String usePerson) { + this.usePerson = usePerson; + } + + public String getUsePersonName() { + return usePersonName; + } + + public void setUsePersonName(String usePersonName) { + this.usePersonName = usePersonName; + } + + public String getValidDate() { + return validDate; + } + + public void setValidDate(String validDate) { + this.validDate = validDate; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getWeight() { + return weight; + } + + public void setWeight(String weight) { + this.weight = weight; + } + } + + public static class MeterStaffListModel { + private String account; + private String administrationJob; + private String birthday; + private String certificateCompany; + private String certificateDate; + private String certificateList; + private String createTime; + private String deptId; + private String deptName; + private String education; + private String id; + private String idCard; + private String isDel; + private String mainExaminer; + private String major; + private String minioFileName; + private String name; + private String remark; + private String sex; + private String specialOperator; + private String staffNo; + private String technologyExam; + private String technologyJob; + private String updateTime; + private String userId; + private String verifierCertificateNo; + private String workDate; + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getAdministrationJob() { + return administrationJob; + } + + public void setAdministrationJob(String administrationJob) { + this.administrationJob = administrationJob; + } + + public String getBirthday() { + return birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getCertificateCompany() { + return certificateCompany; + } + + public void setCertificateCompany(String certificateCompany) { + this.certificateCompany = certificateCompany; + } + + public String getCertificateDate() { + return certificateDate; + } + + public void setCertificateDate(String certificateDate) { + this.certificateDate = certificateDate; + } + + public String getCertificateList() { + return certificateList; + } + + public void setCertificateList(String certificateList) { + this.certificateList = certificateList; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getDeptId() { + return deptId; + } + + public void setDeptId(String deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getEducation() { + return education; + } + + public void setEducation(String education) { + this.education = education; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getMainExaminer() { + return mainExaminer; + } + + public void setMainExaminer(String mainExaminer) { + this.mainExaminer = mainExaminer; + } + + public String getMajor() { + return major; + } + + public void setMajor(String major) { + this.major = major; + } + + public String getMinioFileName() { + return minioFileName; + } + + public void setMinioFileName(String minioFileName) { + this.minioFileName = minioFileName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getSpecialOperator() { + return specialOperator; + } + + public void setSpecialOperator(String specialOperator) { + this.specialOperator = specialOperator; + } + + public String getStaffNo() { + return staffNo; + } + + public void setStaffNo(String staffNo) { + this.staffNo = staffNo; + } + + public String getTechnologyExam() { + return technologyExam; + } + + public void setTechnologyExam(String technologyExam) { + this.technologyExam = technologyExam; + } + + public String getTechnologyJob() { + return technologyJob; + } + + public void setTechnologyJob(String technologyJob) { + this.technologyJob = technologyJob; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getVerifierCertificateNo() { + return verifierCertificateNo; + } + + public void setVerifierCertificateNo(String verifierCertificateNo) { + this.verifierCertificateNo = verifierCertificateNo; + } + + public String getWorkDate() { + return workDate; + } + + public void setWorkDate(String workDate) { + this.workDate = workDate; + } + } + } +} diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt index 5bb091f..3b9791a 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt @@ -477,4 +477,13 @@ @QueryMap limit: Map, @QueryMap offset: Map ): String + + /** + * 获取现场检测详情 + */ + @POST("/business/siteExecutive/detail") + suspend fun getOutfieldDetectionDetail( + @Header("token") token: String, + @Body requestBody: RequestBody + ): String } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt index 2acc9aa..f05e944 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt @@ -1,12 +1,28 @@ package com.casic.xz.meterage.fragment.outfield import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.pengxh.kt.lite.base.KotlinBaseFragment +import kotlinx.android.synthetic.main.fragment_od_base_info.* -class BasicInformationFragment : KotlinBaseFragment() { +class BasicInformationFragment(private val data: OutfieldDetectionDetailModel.DataModel) : + KotlinBaseFragment() { override fun initData() { - + odCodeView.text = data.siteExecutiveNo + odNameView.text = data.siteExecutiveName + directorNameView.text = data.directorName + applyTimeView.text = data.applyTime.formatToYearMonthDay() + taskSourceNameView.text = data.taskSourceName + linkageOrderCodeView.text = data.orderId + preCostView.text = "¥ ${data.preCost}" + preStartTimeView.text = data.preStartTime.formatToYearMonthDay() + preEndTimeView.text = data.preEndTime.formatToYearMonthDay() + executiveAddressView.text = data.executiveAddress + hazardSourceView.text = data.hazardSourceAndPreventionMethod + executiveItemView.text = data.executiveItem + remarkView.text = data.remark } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt index 823eed6..4bc3c79 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt @@ -1,12 +1,52 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_device.* -class TaskDeviceFragment : KotlinBaseFragment() { +class TaskDeviceFragment(private val devices: List) : + KotlinBaseFragment() { override fun initData() { + val supportAdapter = object : + NormalRecyclerAdapter( + R.layout.item_device_support_rv_l, devices + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.EquipmentInfoListModel + ) { + if (item.validDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + viewHolder.setText(R.id.nameTagView, item.equipmentName.last().toString()) + .setText(R.id.deviceNameView, item.equipmentName) + .setText(R.id.modelView, item.modelNo) + .setText(R.id.deviceCodeView, "设备编号:${item.equipmentNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.validDate.formatToYearMonthDay()}" + ) + } + } + supportRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + supportRecyclerView.adapter = supportAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt index ac68b19..8154212 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt @@ -1,12 +1,58 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_executor.* -class TaskExecutorFragment : KotlinBaseFragment() { +class TaskExecutorFragment(private val executors: List) : + KotlinBaseFragment() { override fun initData() { + val staffAdapter = object : + NormalRecyclerAdapter( + R.layout.item_staff_rv_l, executors + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.MeterStaffListModel + ) { + val useDept = if (item.deptName.isNullOrBlank()) { + "未知" + } else { + item.deptName + } + if (item.certificateDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + + viewHolder.setText(R.id.nameTagView, item.name.last().toString()) + .setText(R.id.userNameView, item.name) + .setText(R.id.useDeptView, useDept) + .setText(R.id.certificateView, "证书编号:${item.verifierCertificateNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.certificateDate.formatToYearMonthDay()}" + ) + } + } + staffRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + staffRecyclerView.adapter = staffAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java new file mode 100644 index 0000000..f6530ca --- /dev/null +++ b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java @@ -0,0 +1,1177 @@ +package com.casic.xz.meterage.model; + +import java.util.List; + +public class OutfieldDetectionDetailModel { + + private int code; + private DataModel data; + private String message; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataModel getData() { + return data; + } + + public void setData(DataModel data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public static class DataModel { + private String applyTime; + private String approvalStatus; + private String createTime; + private String createUser; + private String customerId; + private String directorId; + private String directorName; + private List equipmentInfoList; + private String executiveAddress; + private String executiveEnvironment; + private String executiveItem; + private String hazardSourceAndPreventionMethod; + private String id; + private String isDel; + private List meterStaffList; + private String orderId; + private String preCost; + private String preEndTime; + private String preStartTime; + private String processId; + private String remark; + private String siteExecutiveName; + private String siteExecutiveNo; + private String taskSource; + private String taskSourceName; + private String updateTime; + + public String getApplyTime() { + return applyTime; + } + + public void setApplyTime(String applyTime) { + this.applyTime = applyTime; + } + + public String getApprovalStatus() { + return approvalStatus; + } + + public void setApprovalStatus(String approvalStatus) { + this.approvalStatus = approvalStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getDirectorId() { + return directorId; + } + + public void setDirectorId(String directorId) { + this.directorId = directorId; + } + + public String getDirectorName() { + return directorName; + } + + public void setDirectorName(String directorName) { + this.directorName = directorName; + } + + public List getEquipmentInfoList() { + return equipmentInfoList; + } + + public void setEquipmentInfoList(List equipmentInfoList) { + this.equipmentInfoList = equipmentInfoList; + } + + public String getExecutiveAddress() { + return executiveAddress; + } + + public void setExecutiveAddress(String executiveAddress) { + this.executiveAddress = executiveAddress; + } + + public String getExecutiveEnvironment() { + return executiveEnvironment; + } + + public void setExecutiveEnvironment(String executiveEnvironment) { + this.executiveEnvironment = executiveEnvironment; + } + + public String getExecutiveItem() { + return executiveItem; + } + + public void setExecutiveItem(String executiveItem) { + this.executiveItem = executiveItem; + } + + public String getHazardSourceAndPreventionMethod() { + return hazardSourceAndPreventionMethod; + } + + public void setHazardSourceAndPreventionMethod(String hazardSourceAndPreventionMethod) { + this.hazardSourceAndPreventionMethod = hazardSourceAndPreventionMethod; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public List getMeterStaffList() { + return meterStaffList; + } + + public void setMeterStaffList(List meterStaffList) { + this.meterStaffList = meterStaffList; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public String getPreCost() { + return preCost; + } + + public void setPreCost(String preCost) { + this.preCost = preCost; + } + + public String getPreEndTime() { + return preEndTime; + } + + public void setPreEndTime(String preEndTime) { + this.preEndTime = preEndTime; + } + + public String getPreStartTime() { + return preStartTime; + } + + public void setPreStartTime(String preStartTime) { + this.preStartTime = preStartTime; + } + + public String getProcessId() { + return processId; + } + + public void setProcessId(String processId) { + this.processId = processId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSiteExecutiveName() { + return siteExecutiveName; + } + + public void setSiteExecutiveName(String siteExecutiveName) { + this.siteExecutiveName = siteExecutiveName; + } + + public String getSiteExecutiveNo() { + return siteExecutiveNo; + } + + public void setSiteExecutiveNo(String siteExecutiveNo) { + this.siteExecutiveNo = siteExecutiveNo; + } + + public String getTaskSource() { + return taskSource; + } + + public void setTaskSource(String taskSource) { + this.taskSource = taskSource; + } + + public String getTaskSourceName() { + return taskSourceName; + } + + public void setTaskSourceName(String taskSourceName) { + this.taskSourceName = taskSourceName; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public static class EquipmentInfoListModel { + private String abc; + private String abcName; + private String applyRelationId; + private String assetNo; + private String assetSource; + private String assetType; + private String assetTypeName; + private String attribute; + private String capitalSource; + private String capitalSourceName; + private String cardEstablishmentDate; + private String compulsoryVerification; + private String createTime; + private String createUser; + private String depreciationMethod; + private String depreciationMethodName; + private String depreciationPeriod; + private String enableDate; + private String equipmentCategory; + private String equipmentCategoryName; + private String equipmentName; + private String equipmentNo; + private String equipmentSpecifications; + private String equipmentType; + private String equipmentTypeName; + private String fileList; + private String id; + private String installIncidentalExpenses; + private String installPlace; + private String intactState; + private String isCalibrationTestEquipment; + private String isDel; + private String isFixedAssets; + private String isMeasureAccount; + private String isStandardSupportEquipment; + private String labelBind; + private String majorCategory; + private String majorCategoryName; + private String managerLevel; + private String managerLevelName; + private String managerState; + private String managerStateName; + private String manufacturer; + private String manufacturerCountry; + private String manufacturingDate; + private String manufacturingNo; + private String mesureCycle; + private String mesureDate; + private String mesureDept; + private String mesureRange; + private String mesureResult; + private String mesureResultName; + private String mesureType; + private String mesureTypeName; + private String modelNo; + private String originValue; + private String overallDimension; + private String presentOriginValue; + private String purpose; + private String remark; + private String singlePrice; + private String supportStandardEquipmentName; + private String supportStandardEquipmentNo; + private String technicalLevel; + private String uncertainty; + private String updateTime; + private String useDept; + private String useDeptName; + private String usePerson; + private String usePersonName; + private String validDate; + private String version; + private String weight; + + public String getAbc() { + return abc; + } + + public void setAbc(String abc) { + this.abc = abc; + } + + public String getAbcName() { + return abcName; + } + + public void setAbcName(String abcName) { + this.abcName = abcName; + } + + public String getApplyRelationId() { + return applyRelationId; + } + + public void setApplyRelationId(String applyRelationId) { + this.applyRelationId = applyRelationId; + } + + public String getAssetNo() { + return assetNo; + } + + public void setAssetNo(String assetNo) { + this.assetNo = assetNo; + } + + public String getAssetSource() { + return assetSource; + } + + public void setAssetSource(String assetSource) { + this.assetSource = assetSource; + } + + public String getAssetType() { + return assetType; + } + + public void setAssetType(String assetType) { + this.assetType = assetType; + } + + public String getAssetTypeName() { + return assetTypeName; + } + + public void setAssetTypeName(String assetTypeName) { + this.assetTypeName = assetTypeName; + } + + public String getAttribute() { + return attribute; + } + + public void setAttribute(String attribute) { + this.attribute = attribute; + } + + public String getCapitalSource() { + return capitalSource; + } + + public void setCapitalSource(String capitalSource) { + this.capitalSource = capitalSource; + } + + public String getCapitalSourceName() { + return capitalSourceName; + } + + public void setCapitalSourceName(String capitalSourceName) { + this.capitalSourceName = capitalSourceName; + } + + public String getCardEstablishmentDate() { + return cardEstablishmentDate; + } + + public void setCardEstablishmentDate(String cardEstablishmentDate) { + this.cardEstablishmentDate = cardEstablishmentDate; + } + + public String getCompulsoryVerification() { + return compulsoryVerification; + } + + public void setCompulsoryVerification(String compulsoryVerification) { + this.compulsoryVerification = compulsoryVerification; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getDepreciationMethod() { + return depreciationMethod; + } + + public void setDepreciationMethod(String depreciationMethod) { + this.depreciationMethod = depreciationMethod; + } + + public String getDepreciationMethodName() { + return depreciationMethodName; + } + + public void setDepreciationMethodName(String depreciationMethodName) { + this.depreciationMethodName = depreciationMethodName; + } + + public String getDepreciationPeriod() { + return depreciationPeriod; + } + + public void setDepreciationPeriod(String depreciationPeriod) { + this.depreciationPeriod = depreciationPeriod; + } + + public String getEnableDate() { + return enableDate; + } + + public void setEnableDate(String enableDate) { + this.enableDate = enableDate; + } + + public String getEquipmentCategory() { + return equipmentCategory; + } + + public void setEquipmentCategory(String equipmentCategory) { + this.equipmentCategory = equipmentCategory; + } + + public String getEquipmentCategoryName() { + return equipmentCategoryName; + } + + public void setEquipmentCategoryName(String equipmentCategoryName) { + this.equipmentCategoryName = equipmentCategoryName; + } + + public String getEquipmentName() { + return equipmentName; + } + + public void setEquipmentName(String equipmentName) { + this.equipmentName = equipmentName; + } + + public String getEquipmentNo() { + return equipmentNo; + } + + public void setEquipmentNo(String equipmentNo) { + this.equipmentNo = equipmentNo; + } + + public String getEquipmentSpecifications() { + return equipmentSpecifications; + } + + public void setEquipmentSpecifications(String equipmentSpecifications) { + this.equipmentSpecifications = equipmentSpecifications; + } + + public String getEquipmentType() { + return equipmentType; + } + + public void setEquipmentType(String equipmentType) { + this.equipmentType = equipmentType; + } + + public String getEquipmentTypeName() { + return equipmentTypeName; + } + + public void setEquipmentTypeName(String equipmentTypeName) { + this.equipmentTypeName = equipmentTypeName; + } + + public String getFileList() { + return fileList; + } + + public void setFileList(String fileList) { + this.fileList = fileList; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getInstallIncidentalExpenses() { + return installIncidentalExpenses; + } + + public void setInstallIncidentalExpenses(String installIncidentalExpenses) { + this.installIncidentalExpenses = installIncidentalExpenses; + } + + public String getInstallPlace() { + return installPlace; + } + + public void setInstallPlace(String installPlace) { + this.installPlace = installPlace; + } + + public String getIntactState() { + return intactState; + } + + public void setIntactState(String intactState) { + this.intactState = intactState; + } + + public String getIsCalibrationTestEquipment() { + return isCalibrationTestEquipment; + } + + public void setIsCalibrationTestEquipment(String isCalibrationTestEquipment) { + this.isCalibrationTestEquipment = isCalibrationTestEquipment; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getIsFixedAssets() { + return isFixedAssets; + } + + public void setIsFixedAssets(String isFixedAssets) { + this.isFixedAssets = isFixedAssets; + } + + public String getIsMeasureAccount() { + return isMeasureAccount; + } + + public void setIsMeasureAccount(String isMeasureAccount) { + this.isMeasureAccount = isMeasureAccount; + } + + public String getIsStandardSupportEquipment() { + return isStandardSupportEquipment; + } + + public void setIsStandardSupportEquipment(String isStandardSupportEquipment) { + this.isStandardSupportEquipment = isStandardSupportEquipment; + } + + public String getLabelBind() { + return labelBind; + } + + public void setLabelBind(String labelBind) { + this.labelBind = labelBind; + } + + public String getMajorCategory() { + return majorCategory; + } + + public void setMajorCategory(String majorCategory) { + this.majorCategory = majorCategory; + } + + public String getMajorCategoryName() { + return majorCategoryName; + } + + public void setMajorCategoryName(String majorCategoryName) { + this.majorCategoryName = majorCategoryName; + } + + public String getManagerLevel() { + return managerLevel; + } + + public void setManagerLevel(String managerLevel) { + this.managerLevel = managerLevel; + } + + public String getManagerLevelName() { + return managerLevelName; + } + + public void setManagerLevelName(String managerLevelName) { + this.managerLevelName = managerLevelName; + } + + public String getManagerState() { + return managerState; + } + + public void setManagerState(String managerState) { + this.managerState = managerState; + } + + public String getManagerStateName() { + return managerStateName; + } + + public void setManagerStateName(String managerStateName) { + this.managerStateName = managerStateName; + } + + public String getManufacturer() { + return manufacturer; + } + + public void setManufacturer(String manufacturer) { + this.manufacturer = manufacturer; + } + + public String getManufacturerCountry() { + return manufacturerCountry; + } + + public void setManufacturerCountry(String manufacturerCountry) { + this.manufacturerCountry = manufacturerCountry; + } + + public String getManufacturingDate() { + return manufacturingDate; + } + + public void setManufacturingDate(String manufacturingDate) { + this.manufacturingDate = manufacturingDate; + } + + public String getManufacturingNo() { + return manufacturingNo; + } + + public void setManufacturingNo(String manufacturingNo) { + this.manufacturingNo = manufacturingNo; + } + + public String getMesureCycle() { + return mesureCycle; + } + + public void setMesureCycle(String mesureCycle) { + this.mesureCycle = mesureCycle; + } + + public String getMesureDate() { + return mesureDate; + } + + public void setMesureDate(String mesureDate) { + this.mesureDate = mesureDate; + } + + public String getMesureDept() { + return mesureDept; + } + + public void setMesureDept(String mesureDept) { + this.mesureDept = mesureDept; + } + + public String getMesureRange() { + return mesureRange; + } + + public void setMesureRange(String mesureRange) { + this.mesureRange = mesureRange; + } + + public String getMesureResult() { + return mesureResult; + } + + public void setMesureResult(String mesureResult) { + this.mesureResult = mesureResult; + } + + public String getMesureResultName() { + return mesureResultName; + } + + public void setMesureResultName(String mesureResultName) { + this.mesureResultName = mesureResultName; + } + + public String getMesureType() { + return mesureType; + } + + public void setMesureType(String mesureType) { + this.mesureType = mesureType; + } + + public String getMesureTypeName() { + return mesureTypeName; + } + + public void setMesureTypeName(String mesureTypeName) { + this.mesureTypeName = mesureTypeName; + } + + public String getModelNo() { + return modelNo; + } + + public void setModelNo(String modelNo) { + this.modelNo = modelNo; + } + + public String getOriginValue() { + return originValue; + } + + public void setOriginValue(String originValue) { + this.originValue = originValue; + } + + public String getOverallDimension() { + return overallDimension; + } + + public void setOverallDimension(String overallDimension) { + this.overallDimension = overallDimension; + } + + public String getPresentOriginValue() { + return presentOriginValue; + } + + public void setPresentOriginValue(String presentOriginValue) { + this.presentOriginValue = presentOriginValue; + } + + public String getPurpose() { + return purpose; + } + + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSinglePrice() { + return singlePrice; + } + + public void setSinglePrice(String singlePrice) { + this.singlePrice = singlePrice; + } + + public String getSupportStandardEquipmentName() { + return supportStandardEquipmentName; + } + + public void setSupportStandardEquipmentName(String supportStandardEquipmentName) { + this.supportStandardEquipmentName = supportStandardEquipmentName; + } + + public String getSupportStandardEquipmentNo() { + return supportStandardEquipmentNo; + } + + public void setSupportStandardEquipmentNo(String supportStandardEquipmentNo) { + this.supportStandardEquipmentNo = supportStandardEquipmentNo; + } + + public String getTechnicalLevel() { + return technicalLevel; + } + + public void setTechnicalLevel(String technicalLevel) { + this.technicalLevel = technicalLevel; + } + + public String getUncertainty() { + return uncertainty; + } + + public void setUncertainty(String uncertainty) { + this.uncertainty = uncertainty; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUseDept() { + return useDept; + } + + public void setUseDept(String useDept) { + this.useDept = useDept; + } + + public String getUseDeptName() { + return useDeptName; + } + + public void setUseDeptName(String useDeptName) { + this.useDeptName = useDeptName; + } + + public String getUsePerson() { + return usePerson; + } + + public void setUsePerson(String usePerson) { + this.usePerson = usePerson; + } + + public String getUsePersonName() { + return usePersonName; + } + + public void setUsePersonName(String usePersonName) { + this.usePersonName = usePersonName; + } + + public String getValidDate() { + return validDate; + } + + public void setValidDate(String validDate) { + this.validDate = validDate; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getWeight() { + return weight; + } + + public void setWeight(String weight) { + this.weight = weight; + } + } + + public static class MeterStaffListModel { + private String account; + private String administrationJob; + private String birthday; + private String certificateCompany; + private String certificateDate; + private String certificateList; + private String createTime; + private String deptId; + private String deptName; + private String education; + private String id; + private String idCard; + private String isDel; + private String mainExaminer; + private String major; + private String minioFileName; + private String name; + private String remark; + private String sex; + private String specialOperator; + private String staffNo; + private String technologyExam; + private String technologyJob; + private String updateTime; + private String userId; + private String verifierCertificateNo; + private String workDate; + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getAdministrationJob() { + return administrationJob; + } + + public void setAdministrationJob(String administrationJob) { + this.administrationJob = administrationJob; + } + + public String getBirthday() { + return birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getCertificateCompany() { + return certificateCompany; + } + + public void setCertificateCompany(String certificateCompany) { + this.certificateCompany = certificateCompany; + } + + public String getCertificateDate() { + return certificateDate; + } + + public void setCertificateDate(String certificateDate) { + this.certificateDate = certificateDate; + } + + public String getCertificateList() { + return certificateList; + } + + public void setCertificateList(String certificateList) { + this.certificateList = certificateList; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getDeptId() { + return deptId; + } + + public void setDeptId(String deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getEducation() { + return education; + } + + public void setEducation(String education) { + this.education = education; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getMainExaminer() { + return mainExaminer; + } + + public void setMainExaminer(String mainExaminer) { + this.mainExaminer = mainExaminer; + } + + public String getMajor() { + return major; + } + + public void setMajor(String major) { + this.major = major; + } + + public String getMinioFileName() { + return minioFileName; + } + + public void setMinioFileName(String minioFileName) { + this.minioFileName = minioFileName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getSpecialOperator() { + return specialOperator; + } + + public void setSpecialOperator(String specialOperator) { + this.specialOperator = specialOperator; + } + + public String getStaffNo() { + return staffNo; + } + + public void setStaffNo(String staffNo) { + this.staffNo = staffNo; + } + + public String getTechnologyExam() { + return technologyExam; + } + + public void setTechnologyExam(String technologyExam) { + this.technologyExam = technologyExam; + } + + public String getTechnologyJob() { + return technologyJob; + } + + public void setTechnologyJob(String technologyJob) { + this.technologyJob = technologyJob; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getVerifierCertificateNo() { + return verifierCertificateNo; + } + + public void setVerifierCertificateNo(String verifierCertificateNo) { + this.verifierCertificateNo = verifierCertificateNo; + } + + public String getWorkDate() { + return workDate; + } + + public void setWorkDate(String workDate) { + this.workDate = workDate; + } + } + } +} diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt index 5bb091f..3b9791a 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt @@ -477,4 +477,13 @@ @QueryMap limit: Map, @QueryMap offset: Map ): String + + /** + * 获取现场检测详情 + */ + @POST("/business/siteExecutive/detail") + suspend fun getOutfieldDetectionDetail( + @Header("token") token: String, + @Body requestBody: RequestBody + ): String } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt index add9920..996d452 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt @@ -1094,4 +1094,16 @@ AuthenticationHelper.token!!, requestBody, limitMap, offsetMap ) } + + /** + * 获取现场检测详情 + */ + suspend fun getOutfieldDetectionDetail(id: String): String { + val param = JsonObject() + param.addProperty("id", id) + val requestBody = param.toString().toRequestBody( + "application/json;charset=UTF-8".toMediaType() + ) + return api.getOutfieldDetectionDetail(AuthenticationHelper.token!!, requestBody) + } } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt index 2acc9aa..f05e944 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt @@ -1,12 +1,28 @@ package com.casic.xz.meterage.fragment.outfield import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.pengxh.kt.lite.base.KotlinBaseFragment +import kotlinx.android.synthetic.main.fragment_od_base_info.* -class BasicInformationFragment : KotlinBaseFragment() { +class BasicInformationFragment(private val data: OutfieldDetectionDetailModel.DataModel) : + KotlinBaseFragment() { override fun initData() { - + odCodeView.text = data.siteExecutiveNo + odNameView.text = data.siteExecutiveName + directorNameView.text = data.directorName + applyTimeView.text = data.applyTime.formatToYearMonthDay() + taskSourceNameView.text = data.taskSourceName + linkageOrderCodeView.text = data.orderId + preCostView.text = "¥ ${data.preCost}" + preStartTimeView.text = data.preStartTime.formatToYearMonthDay() + preEndTimeView.text = data.preEndTime.formatToYearMonthDay() + executiveAddressView.text = data.executiveAddress + hazardSourceView.text = data.hazardSourceAndPreventionMethod + executiveItemView.text = data.executiveItem + remarkView.text = data.remark } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt index 823eed6..4bc3c79 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt @@ -1,12 +1,52 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_device.* -class TaskDeviceFragment : KotlinBaseFragment() { +class TaskDeviceFragment(private val devices: List) : + KotlinBaseFragment() { override fun initData() { + val supportAdapter = object : + NormalRecyclerAdapter( + R.layout.item_device_support_rv_l, devices + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.EquipmentInfoListModel + ) { + if (item.validDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + viewHolder.setText(R.id.nameTagView, item.equipmentName.last().toString()) + .setText(R.id.deviceNameView, item.equipmentName) + .setText(R.id.modelView, item.modelNo) + .setText(R.id.deviceCodeView, "设备编号:${item.equipmentNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.validDate.formatToYearMonthDay()}" + ) + } + } + supportRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + supportRecyclerView.adapter = supportAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt index ac68b19..8154212 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt @@ -1,12 +1,58 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_executor.* -class TaskExecutorFragment : KotlinBaseFragment() { +class TaskExecutorFragment(private val executors: List) : + KotlinBaseFragment() { override fun initData() { + val staffAdapter = object : + NormalRecyclerAdapter( + R.layout.item_staff_rv_l, executors + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.MeterStaffListModel + ) { + val useDept = if (item.deptName.isNullOrBlank()) { + "未知" + } else { + item.deptName + } + if (item.certificateDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + + viewHolder.setText(R.id.nameTagView, item.name.last().toString()) + .setText(R.id.userNameView, item.name) + .setText(R.id.useDeptView, useDept) + .setText(R.id.certificateView, "证书编号:${item.verifierCertificateNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.certificateDate.formatToYearMonthDay()}" + ) + } + } + staffRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + staffRecyclerView.adapter = staffAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java new file mode 100644 index 0000000..f6530ca --- /dev/null +++ b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java @@ -0,0 +1,1177 @@ +package com.casic.xz.meterage.model; + +import java.util.List; + +public class OutfieldDetectionDetailModel { + + private int code; + private DataModel data; + private String message; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataModel getData() { + return data; + } + + public void setData(DataModel data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public static class DataModel { + private String applyTime; + private String approvalStatus; + private String createTime; + private String createUser; + private String customerId; + private String directorId; + private String directorName; + private List equipmentInfoList; + private String executiveAddress; + private String executiveEnvironment; + private String executiveItem; + private String hazardSourceAndPreventionMethod; + private String id; + private String isDel; + private List meterStaffList; + private String orderId; + private String preCost; + private String preEndTime; + private String preStartTime; + private String processId; + private String remark; + private String siteExecutiveName; + private String siteExecutiveNo; + private String taskSource; + private String taskSourceName; + private String updateTime; + + public String getApplyTime() { + return applyTime; + } + + public void setApplyTime(String applyTime) { + this.applyTime = applyTime; + } + + public String getApprovalStatus() { + return approvalStatus; + } + + public void setApprovalStatus(String approvalStatus) { + this.approvalStatus = approvalStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getDirectorId() { + return directorId; + } + + public void setDirectorId(String directorId) { + this.directorId = directorId; + } + + public String getDirectorName() { + return directorName; + } + + public void setDirectorName(String directorName) { + this.directorName = directorName; + } + + public List getEquipmentInfoList() { + return equipmentInfoList; + } + + public void setEquipmentInfoList(List equipmentInfoList) { + this.equipmentInfoList = equipmentInfoList; + } + + public String getExecutiveAddress() { + return executiveAddress; + } + + public void setExecutiveAddress(String executiveAddress) { + this.executiveAddress = executiveAddress; + } + + public String getExecutiveEnvironment() { + return executiveEnvironment; + } + + public void setExecutiveEnvironment(String executiveEnvironment) { + this.executiveEnvironment = executiveEnvironment; + } + + public String getExecutiveItem() { + return executiveItem; + } + + public void setExecutiveItem(String executiveItem) { + this.executiveItem = executiveItem; + } + + public String getHazardSourceAndPreventionMethod() { + return hazardSourceAndPreventionMethod; + } + + public void setHazardSourceAndPreventionMethod(String hazardSourceAndPreventionMethod) { + this.hazardSourceAndPreventionMethod = hazardSourceAndPreventionMethod; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public List getMeterStaffList() { + return meterStaffList; + } + + public void setMeterStaffList(List meterStaffList) { + this.meterStaffList = meterStaffList; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public String getPreCost() { + return preCost; + } + + public void setPreCost(String preCost) { + this.preCost = preCost; + } + + public String getPreEndTime() { + return preEndTime; + } + + public void setPreEndTime(String preEndTime) { + this.preEndTime = preEndTime; + } + + public String getPreStartTime() { + return preStartTime; + } + + public void setPreStartTime(String preStartTime) { + this.preStartTime = preStartTime; + } + + public String getProcessId() { + return processId; + } + + public void setProcessId(String processId) { + this.processId = processId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSiteExecutiveName() { + return siteExecutiveName; + } + + public void setSiteExecutiveName(String siteExecutiveName) { + this.siteExecutiveName = siteExecutiveName; + } + + public String getSiteExecutiveNo() { + return siteExecutiveNo; + } + + public void setSiteExecutiveNo(String siteExecutiveNo) { + this.siteExecutiveNo = siteExecutiveNo; + } + + public String getTaskSource() { + return taskSource; + } + + public void setTaskSource(String taskSource) { + this.taskSource = taskSource; + } + + public String getTaskSourceName() { + return taskSourceName; + } + + public void setTaskSourceName(String taskSourceName) { + this.taskSourceName = taskSourceName; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public static class EquipmentInfoListModel { + private String abc; + private String abcName; + private String applyRelationId; + private String assetNo; + private String assetSource; + private String assetType; + private String assetTypeName; + private String attribute; + private String capitalSource; + private String capitalSourceName; + private String cardEstablishmentDate; + private String compulsoryVerification; + private String createTime; + private String createUser; + private String depreciationMethod; + private String depreciationMethodName; + private String depreciationPeriod; + private String enableDate; + private String equipmentCategory; + private String equipmentCategoryName; + private String equipmentName; + private String equipmentNo; + private String equipmentSpecifications; + private String equipmentType; + private String equipmentTypeName; + private String fileList; + private String id; + private String installIncidentalExpenses; + private String installPlace; + private String intactState; + private String isCalibrationTestEquipment; + private String isDel; + private String isFixedAssets; + private String isMeasureAccount; + private String isStandardSupportEquipment; + private String labelBind; + private String majorCategory; + private String majorCategoryName; + private String managerLevel; + private String managerLevelName; + private String managerState; + private String managerStateName; + private String manufacturer; + private String manufacturerCountry; + private String manufacturingDate; + private String manufacturingNo; + private String mesureCycle; + private String mesureDate; + private String mesureDept; + private String mesureRange; + private String mesureResult; + private String mesureResultName; + private String mesureType; + private String mesureTypeName; + private String modelNo; + private String originValue; + private String overallDimension; + private String presentOriginValue; + private String purpose; + private String remark; + private String singlePrice; + private String supportStandardEquipmentName; + private String supportStandardEquipmentNo; + private String technicalLevel; + private String uncertainty; + private String updateTime; + private String useDept; + private String useDeptName; + private String usePerson; + private String usePersonName; + private String validDate; + private String version; + private String weight; + + public String getAbc() { + return abc; + } + + public void setAbc(String abc) { + this.abc = abc; + } + + public String getAbcName() { + return abcName; + } + + public void setAbcName(String abcName) { + this.abcName = abcName; + } + + public String getApplyRelationId() { + return applyRelationId; + } + + public void setApplyRelationId(String applyRelationId) { + this.applyRelationId = applyRelationId; + } + + public String getAssetNo() { + return assetNo; + } + + public void setAssetNo(String assetNo) { + this.assetNo = assetNo; + } + + public String getAssetSource() { + return assetSource; + } + + public void setAssetSource(String assetSource) { + this.assetSource = assetSource; + } + + public String getAssetType() { + return assetType; + } + + public void setAssetType(String assetType) { + this.assetType = assetType; + } + + public String getAssetTypeName() { + return assetTypeName; + } + + public void setAssetTypeName(String assetTypeName) { + this.assetTypeName = assetTypeName; + } + + public String getAttribute() { + return attribute; + } + + public void setAttribute(String attribute) { + this.attribute = attribute; + } + + public String getCapitalSource() { + return capitalSource; + } + + public void setCapitalSource(String capitalSource) { + this.capitalSource = capitalSource; + } + + public String getCapitalSourceName() { + return capitalSourceName; + } + + public void setCapitalSourceName(String capitalSourceName) { + this.capitalSourceName = capitalSourceName; + } + + public String getCardEstablishmentDate() { + return cardEstablishmentDate; + } + + public void setCardEstablishmentDate(String cardEstablishmentDate) { + this.cardEstablishmentDate = cardEstablishmentDate; + } + + public String getCompulsoryVerification() { + return compulsoryVerification; + } + + public void setCompulsoryVerification(String compulsoryVerification) { + this.compulsoryVerification = compulsoryVerification; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getDepreciationMethod() { + return depreciationMethod; + } + + public void setDepreciationMethod(String depreciationMethod) { + this.depreciationMethod = depreciationMethod; + } + + public String getDepreciationMethodName() { + return depreciationMethodName; + } + + public void setDepreciationMethodName(String depreciationMethodName) { + this.depreciationMethodName = depreciationMethodName; + } + + public String getDepreciationPeriod() { + return depreciationPeriod; + } + + public void setDepreciationPeriod(String depreciationPeriod) { + this.depreciationPeriod = depreciationPeriod; + } + + public String getEnableDate() { + return enableDate; + } + + public void setEnableDate(String enableDate) { + this.enableDate = enableDate; + } + + public String getEquipmentCategory() { + return equipmentCategory; + } + + public void setEquipmentCategory(String equipmentCategory) { + this.equipmentCategory = equipmentCategory; + } + + public String getEquipmentCategoryName() { + return equipmentCategoryName; + } + + public void setEquipmentCategoryName(String equipmentCategoryName) { + this.equipmentCategoryName = equipmentCategoryName; + } + + public String getEquipmentName() { + return equipmentName; + } + + public void setEquipmentName(String equipmentName) { + this.equipmentName = equipmentName; + } + + public String getEquipmentNo() { + return equipmentNo; + } + + public void setEquipmentNo(String equipmentNo) { + this.equipmentNo = equipmentNo; + } + + public String getEquipmentSpecifications() { + return equipmentSpecifications; + } + + public void setEquipmentSpecifications(String equipmentSpecifications) { + this.equipmentSpecifications = equipmentSpecifications; + } + + public String getEquipmentType() { + return equipmentType; + } + + public void setEquipmentType(String equipmentType) { + this.equipmentType = equipmentType; + } + + public String getEquipmentTypeName() { + return equipmentTypeName; + } + + public void setEquipmentTypeName(String equipmentTypeName) { + this.equipmentTypeName = equipmentTypeName; + } + + public String getFileList() { + return fileList; + } + + public void setFileList(String fileList) { + this.fileList = fileList; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getInstallIncidentalExpenses() { + return installIncidentalExpenses; + } + + public void setInstallIncidentalExpenses(String installIncidentalExpenses) { + this.installIncidentalExpenses = installIncidentalExpenses; + } + + public String getInstallPlace() { + return installPlace; + } + + public void setInstallPlace(String installPlace) { + this.installPlace = installPlace; + } + + public String getIntactState() { + return intactState; + } + + public void setIntactState(String intactState) { + this.intactState = intactState; + } + + public String getIsCalibrationTestEquipment() { + return isCalibrationTestEquipment; + } + + public void setIsCalibrationTestEquipment(String isCalibrationTestEquipment) { + this.isCalibrationTestEquipment = isCalibrationTestEquipment; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getIsFixedAssets() { + return isFixedAssets; + } + + public void setIsFixedAssets(String isFixedAssets) { + this.isFixedAssets = isFixedAssets; + } + + public String getIsMeasureAccount() { + return isMeasureAccount; + } + + public void setIsMeasureAccount(String isMeasureAccount) { + this.isMeasureAccount = isMeasureAccount; + } + + public String getIsStandardSupportEquipment() { + return isStandardSupportEquipment; + } + + public void setIsStandardSupportEquipment(String isStandardSupportEquipment) { + this.isStandardSupportEquipment = isStandardSupportEquipment; + } + + public String getLabelBind() { + return labelBind; + } + + public void setLabelBind(String labelBind) { + this.labelBind = labelBind; + } + + public String getMajorCategory() { + return majorCategory; + } + + public void setMajorCategory(String majorCategory) { + this.majorCategory = majorCategory; + } + + public String getMajorCategoryName() { + return majorCategoryName; + } + + public void setMajorCategoryName(String majorCategoryName) { + this.majorCategoryName = majorCategoryName; + } + + public String getManagerLevel() { + return managerLevel; + } + + public void setManagerLevel(String managerLevel) { + this.managerLevel = managerLevel; + } + + public String getManagerLevelName() { + return managerLevelName; + } + + public void setManagerLevelName(String managerLevelName) { + this.managerLevelName = managerLevelName; + } + + public String getManagerState() { + return managerState; + } + + public void setManagerState(String managerState) { + this.managerState = managerState; + } + + public String getManagerStateName() { + return managerStateName; + } + + public void setManagerStateName(String managerStateName) { + this.managerStateName = managerStateName; + } + + public String getManufacturer() { + return manufacturer; + } + + public void setManufacturer(String manufacturer) { + this.manufacturer = manufacturer; + } + + public String getManufacturerCountry() { + return manufacturerCountry; + } + + public void setManufacturerCountry(String manufacturerCountry) { + this.manufacturerCountry = manufacturerCountry; + } + + public String getManufacturingDate() { + return manufacturingDate; + } + + public void setManufacturingDate(String manufacturingDate) { + this.manufacturingDate = manufacturingDate; + } + + public String getManufacturingNo() { + return manufacturingNo; + } + + public void setManufacturingNo(String manufacturingNo) { + this.manufacturingNo = manufacturingNo; + } + + public String getMesureCycle() { + return mesureCycle; + } + + public void setMesureCycle(String mesureCycle) { + this.mesureCycle = mesureCycle; + } + + public String getMesureDate() { + return mesureDate; + } + + public void setMesureDate(String mesureDate) { + this.mesureDate = mesureDate; + } + + public String getMesureDept() { + return mesureDept; + } + + public void setMesureDept(String mesureDept) { + this.mesureDept = mesureDept; + } + + public String getMesureRange() { + return mesureRange; + } + + public void setMesureRange(String mesureRange) { + this.mesureRange = mesureRange; + } + + public String getMesureResult() { + return mesureResult; + } + + public void setMesureResult(String mesureResult) { + this.mesureResult = mesureResult; + } + + public String getMesureResultName() { + return mesureResultName; + } + + public void setMesureResultName(String mesureResultName) { + this.mesureResultName = mesureResultName; + } + + public String getMesureType() { + return mesureType; + } + + public void setMesureType(String mesureType) { + this.mesureType = mesureType; + } + + public String getMesureTypeName() { + return mesureTypeName; + } + + public void setMesureTypeName(String mesureTypeName) { + this.mesureTypeName = mesureTypeName; + } + + public String getModelNo() { + return modelNo; + } + + public void setModelNo(String modelNo) { + this.modelNo = modelNo; + } + + public String getOriginValue() { + return originValue; + } + + public void setOriginValue(String originValue) { + this.originValue = originValue; + } + + public String getOverallDimension() { + return overallDimension; + } + + public void setOverallDimension(String overallDimension) { + this.overallDimension = overallDimension; + } + + public String getPresentOriginValue() { + return presentOriginValue; + } + + public void setPresentOriginValue(String presentOriginValue) { + this.presentOriginValue = presentOriginValue; + } + + public String getPurpose() { + return purpose; + } + + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSinglePrice() { + return singlePrice; + } + + public void setSinglePrice(String singlePrice) { + this.singlePrice = singlePrice; + } + + public String getSupportStandardEquipmentName() { + return supportStandardEquipmentName; + } + + public void setSupportStandardEquipmentName(String supportStandardEquipmentName) { + this.supportStandardEquipmentName = supportStandardEquipmentName; + } + + public String getSupportStandardEquipmentNo() { + return supportStandardEquipmentNo; + } + + public void setSupportStandardEquipmentNo(String supportStandardEquipmentNo) { + this.supportStandardEquipmentNo = supportStandardEquipmentNo; + } + + public String getTechnicalLevel() { + return technicalLevel; + } + + public void setTechnicalLevel(String technicalLevel) { + this.technicalLevel = technicalLevel; + } + + public String getUncertainty() { + return uncertainty; + } + + public void setUncertainty(String uncertainty) { + this.uncertainty = uncertainty; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUseDept() { + return useDept; + } + + public void setUseDept(String useDept) { + this.useDept = useDept; + } + + public String getUseDeptName() { + return useDeptName; + } + + public void setUseDeptName(String useDeptName) { + this.useDeptName = useDeptName; + } + + public String getUsePerson() { + return usePerson; + } + + public void setUsePerson(String usePerson) { + this.usePerson = usePerson; + } + + public String getUsePersonName() { + return usePersonName; + } + + public void setUsePersonName(String usePersonName) { + this.usePersonName = usePersonName; + } + + public String getValidDate() { + return validDate; + } + + public void setValidDate(String validDate) { + this.validDate = validDate; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getWeight() { + return weight; + } + + public void setWeight(String weight) { + this.weight = weight; + } + } + + public static class MeterStaffListModel { + private String account; + private String administrationJob; + private String birthday; + private String certificateCompany; + private String certificateDate; + private String certificateList; + private String createTime; + private String deptId; + private String deptName; + private String education; + private String id; + private String idCard; + private String isDel; + private String mainExaminer; + private String major; + private String minioFileName; + private String name; + private String remark; + private String sex; + private String specialOperator; + private String staffNo; + private String technologyExam; + private String technologyJob; + private String updateTime; + private String userId; + private String verifierCertificateNo; + private String workDate; + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getAdministrationJob() { + return administrationJob; + } + + public void setAdministrationJob(String administrationJob) { + this.administrationJob = administrationJob; + } + + public String getBirthday() { + return birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getCertificateCompany() { + return certificateCompany; + } + + public void setCertificateCompany(String certificateCompany) { + this.certificateCompany = certificateCompany; + } + + public String getCertificateDate() { + return certificateDate; + } + + public void setCertificateDate(String certificateDate) { + this.certificateDate = certificateDate; + } + + public String getCertificateList() { + return certificateList; + } + + public void setCertificateList(String certificateList) { + this.certificateList = certificateList; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getDeptId() { + return deptId; + } + + public void setDeptId(String deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getEducation() { + return education; + } + + public void setEducation(String education) { + this.education = education; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getMainExaminer() { + return mainExaminer; + } + + public void setMainExaminer(String mainExaminer) { + this.mainExaminer = mainExaminer; + } + + public String getMajor() { + return major; + } + + public void setMajor(String major) { + this.major = major; + } + + public String getMinioFileName() { + return minioFileName; + } + + public void setMinioFileName(String minioFileName) { + this.minioFileName = minioFileName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getSpecialOperator() { + return specialOperator; + } + + public void setSpecialOperator(String specialOperator) { + this.specialOperator = specialOperator; + } + + public String getStaffNo() { + return staffNo; + } + + public void setStaffNo(String staffNo) { + this.staffNo = staffNo; + } + + public String getTechnologyExam() { + return technologyExam; + } + + public void setTechnologyExam(String technologyExam) { + this.technologyExam = technologyExam; + } + + public String getTechnologyJob() { + return technologyJob; + } + + public void setTechnologyJob(String technologyJob) { + this.technologyJob = technologyJob; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getVerifierCertificateNo() { + return verifierCertificateNo; + } + + public void setVerifierCertificateNo(String verifierCertificateNo) { + this.verifierCertificateNo = verifierCertificateNo; + } + + public String getWorkDate() { + return workDate; + } + + public void setWorkDate(String workDate) { + this.workDate = workDate; + } + } + } +} diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt index 5bb091f..3b9791a 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt @@ -477,4 +477,13 @@ @QueryMap limit: Map, @QueryMap offset: Map ): String + + /** + * 获取现场检测详情 + */ + @POST("/business/siteExecutive/detail") + suspend fun getOutfieldDetectionDetail( + @Header("token") token: String, + @Body requestBody: RequestBody + ): String } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt index add9920..996d452 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt @@ -1094,4 +1094,16 @@ AuthenticationHelper.token!!, requestBody, limitMap, offsetMap ) } + + /** + * 获取现场检测详情 + */ + suspend fun getOutfieldDetectionDetail(id: String): String { + val param = JsonObject() + param.addProperty("id", id) + val requestBody = param.toString().toRequestBody( + "application/json;charset=UTF-8".toMediaType() + ) + return api.getOutfieldDetectionDetail(AuthenticationHelper.token!!, requestBody) + } } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt index 549b79a..3ba54dc 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt @@ -45,17 +45,23 @@ } outfieldDetectionViewModel = ViewModelProvider(this)[OutfieldDetectionViewModel::class.java] + outfieldDetectionViewModel.getOutfieldDetectionDetail(args[0]) + outfieldDetectionViewModel.outfieldDetectionDetail.observe(this) { + if (it.code == 200) { + val data = it.data!! - fragmentPages.add(BasicInformationFragment()) - fragmentPages.add(TaskExecutorFragment()) - fragmentPages.add(TaskDeviceFragment()) - fragmentPages.add(ApprovalLogFragment()) + fragmentPages.add(BasicInformationFragment(data)) + fragmentPages.add(TaskExecutorFragment(data.meterStaffList)) + fragmentPages.add(TaskDeviceFragment(data.equipmentInfoList)) + fragmentPages.add(ApprovalLogFragment()) - approvalViewPager.adapter = SubViewPagerAdapter( - supportFragmentManager, fragmentPages, pageTitles - ) - //绑定 - topTabLayout.setupWithViewPager(approvalViewPager) + approvalViewPager.adapter = SubViewPagerAdapter( + supportFragmentManager, fragmentPages, pageTitles + ) + //绑定 + topTabLayout.setupWithViewPager(approvalViewPager) + } + } } override fun observeRequestState() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt index 2acc9aa..f05e944 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt @@ -1,12 +1,28 @@ package com.casic.xz.meterage.fragment.outfield import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.pengxh.kt.lite.base.KotlinBaseFragment +import kotlinx.android.synthetic.main.fragment_od_base_info.* -class BasicInformationFragment : KotlinBaseFragment() { +class BasicInformationFragment(private val data: OutfieldDetectionDetailModel.DataModel) : + KotlinBaseFragment() { override fun initData() { - + odCodeView.text = data.siteExecutiveNo + odNameView.text = data.siteExecutiveName + directorNameView.text = data.directorName + applyTimeView.text = data.applyTime.formatToYearMonthDay() + taskSourceNameView.text = data.taskSourceName + linkageOrderCodeView.text = data.orderId + preCostView.text = "¥ ${data.preCost}" + preStartTimeView.text = data.preStartTime.formatToYearMonthDay() + preEndTimeView.text = data.preEndTime.formatToYearMonthDay() + executiveAddressView.text = data.executiveAddress + hazardSourceView.text = data.hazardSourceAndPreventionMethod + executiveItemView.text = data.executiveItem + remarkView.text = data.remark } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt index 823eed6..4bc3c79 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt @@ -1,12 +1,52 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_device.* -class TaskDeviceFragment : KotlinBaseFragment() { +class TaskDeviceFragment(private val devices: List) : + KotlinBaseFragment() { override fun initData() { + val supportAdapter = object : + NormalRecyclerAdapter( + R.layout.item_device_support_rv_l, devices + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.EquipmentInfoListModel + ) { + if (item.validDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + viewHolder.setText(R.id.nameTagView, item.equipmentName.last().toString()) + .setText(R.id.deviceNameView, item.equipmentName) + .setText(R.id.modelView, item.modelNo) + .setText(R.id.deviceCodeView, "设备编号:${item.equipmentNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.validDate.formatToYearMonthDay()}" + ) + } + } + supportRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + supportRecyclerView.adapter = supportAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt index ac68b19..8154212 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt @@ -1,12 +1,58 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_executor.* -class TaskExecutorFragment : KotlinBaseFragment() { +class TaskExecutorFragment(private val executors: List) : + KotlinBaseFragment() { override fun initData() { + val staffAdapter = object : + NormalRecyclerAdapter( + R.layout.item_staff_rv_l, executors + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.MeterStaffListModel + ) { + val useDept = if (item.deptName.isNullOrBlank()) { + "未知" + } else { + item.deptName + } + if (item.certificateDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + + viewHolder.setText(R.id.nameTagView, item.name.last().toString()) + .setText(R.id.userNameView, item.name) + .setText(R.id.useDeptView, useDept) + .setText(R.id.certificateView, "证书编号:${item.verifierCertificateNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.certificateDate.formatToYearMonthDay()}" + ) + } + } + staffRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + staffRecyclerView.adapter = staffAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java new file mode 100644 index 0000000..f6530ca --- /dev/null +++ b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java @@ -0,0 +1,1177 @@ +package com.casic.xz.meterage.model; + +import java.util.List; + +public class OutfieldDetectionDetailModel { + + private int code; + private DataModel data; + private String message; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataModel getData() { + return data; + } + + public void setData(DataModel data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public static class DataModel { + private String applyTime; + private String approvalStatus; + private String createTime; + private String createUser; + private String customerId; + private String directorId; + private String directorName; + private List equipmentInfoList; + private String executiveAddress; + private String executiveEnvironment; + private String executiveItem; + private String hazardSourceAndPreventionMethod; + private String id; + private String isDel; + private List meterStaffList; + private String orderId; + private String preCost; + private String preEndTime; + private String preStartTime; + private String processId; + private String remark; + private String siteExecutiveName; + private String siteExecutiveNo; + private String taskSource; + private String taskSourceName; + private String updateTime; + + public String getApplyTime() { + return applyTime; + } + + public void setApplyTime(String applyTime) { + this.applyTime = applyTime; + } + + public String getApprovalStatus() { + return approvalStatus; + } + + public void setApprovalStatus(String approvalStatus) { + this.approvalStatus = approvalStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getDirectorId() { + return directorId; + } + + public void setDirectorId(String directorId) { + this.directorId = directorId; + } + + public String getDirectorName() { + return directorName; + } + + public void setDirectorName(String directorName) { + this.directorName = directorName; + } + + public List getEquipmentInfoList() { + return equipmentInfoList; + } + + public void setEquipmentInfoList(List equipmentInfoList) { + this.equipmentInfoList = equipmentInfoList; + } + + public String getExecutiveAddress() { + return executiveAddress; + } + + public void setExecutiveAddress(String executiveAddress) { + this.executiveAddress = executiveAddress; + } + + public String getExecutiveEnvironment() { + return executiveEnvironment; + } + + public void setExecutiveEnvironment(String executiveEnvironment) { + this.executiveEnvironment = executiveEnvironment; + } + + public String getExecutiveItem() { + return executiveItem; + } + + public void setExecutiveItem(String executiveItem) { + this.executiveItem = executiveItem; + } + + public String getHazardSourceAndPreventionMethod() { + return hazardSourceAndPreventionMethod; + } + + public void setHazardSourceAndPreventionMethod(String hazardSourceAndPreventionMethod) { + this.hazardSourceAndPreventionMethod = hazardSourceAndPreventionMethod; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public List getMeterStaffList() { + return meterStaffList; + } + + public void setMeterStaffList(List meterStaffList) { + this.meterStaffList = meterStaffList; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public String getPreCost() { + return preCost; + } + + public void setPreCost(String preCost) { + this.preCost = preCost; + } + + public String getPreEndTime() { + return preEndTime; + } + + public void setPreEndTime(String preEndTime) { + this.preEndTime = preEndTime; + } + + public String getPreStartTime() { + return preStartTime; + } + + public void setPreStartTime(String preStartTime) { + this.preStartTime = preStartTime; + } + + public String getProcessId() { + return processId; + } + + public void setProcessId(String processId) { + this.processId = processId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSiteExecutiveName() { + return siteExecutiveName; + } + + public void setSiteExecutiveName(String siteExecutiveName) { + this.siteExecutiveName = siteExecutiveName; + } + + public String getSiteExecutiveNo() { + return siteExecutiveNo; + } + + public void setSiteExecutiveNo(String siteExecutiveNo) { + this.siteExecutiveNo = siteExecutiveNo; + } + + public String getTaskSource() { + return taskSource; + } + + public void setTaskSource(String taskSource) { + this.taskSource = taskSource; + } + + public String getTaskSourceName() { + return taskSourceName; + } + + public void setTaskSourceName(String taskSourceName) { + this.taskSourceName = taskSourceName; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public static class EquipmentInfoListModel { + private String abc; + private String abcName; + private String applyRelationId; + private String assetNo; + private String assetSource; + private String assetType; + private String assetTypeName; + private String attribute; + private String capitalSource; + private String capitalSourceName; + private String cardEstablishmentDate; + private String compulsoryVerification; + private String createTime; + private String createUser; + private String depreciationMethod; + private String depreciationMethodName; + private String depreciationPeriod; + private String enableDate; + private String equipmentCategory; + private String equipmentCategoryName; + private String equipmentName; + private String equipmentNo; + private String equipmentSpecifications; + private String equipmentType; + private String equipmentTypeName; + private String fileList; + private String id; + private String installIncidentalExpenses; + private String installPlace; + private String intactState; + private String isCalibrationTestEquipment; + private String isDel; + private String isFixedAssets; + private String isMeasureAccount; + private String isStandardSupportEquipment; + private String labelBind; + private String majorCategory; + private String majorCategoryName; + private String managerLevel; + private String managerLevelName; + private String managerState; + private String managerStateName; + private String manufacturer; + private String manufacturerCountry; + private String manufacturingDate; + private String manufacturingNo; + private String mesureCycle; + private String mesureDate; + private String mesureDept; + private String mesureRange; + private String mesureResult; + private String mesureResultName; + private String mesureType; + private String mesureTypeName; + private String modelNo; + private String originValue; + private String overallDimension; + private String presentOriginValue; + private String purpose; + private String remark; + private String singlePrice; + private String supportStandardEquipmentName; + private String supportStandardEquipmentNo; + private String technicalLevel; + private String uncertainty; + private String updateTime; + private String useDept; + private String useDeptName; + private String usePerson; + private String usePersonName; + private String validDate; + private String version; + private String weight; + + public String getAbc() { + return abc; + } + + public void setAbc(String abc) { + this.abc = abc; + } + + public String getAbcName() { + return abcName; + } + + public void setAbcName(String abcName) { + this.abcName = abcName; + } + + public String getApplyRelationId() { + return applyRelationId; + } + + public void setApplyRelationId(String applyRelationId) { + this.applyRelationId = applyRelationId; + } + + public String getAssetNo() { + return assetNo; + } + + public void setAssetNo(String assetNo) { + this.assetNo = assetNo; + } + + public String getAssetSource() { + return assetSource; + } + + public void setAssetSource(String assetSource) { + this.assetSource = assetSource; + } + + public String getAssetType() { + return assetType; + } + + public void setAssetType(String assetType) { + this.assetType = assetType; + } + + public String getAssetTypeName() { + return assetTypeName; + } + + public void setAssetTypeName(String assetTypeName) { + this.assetTypeName = assetTypeName; + } + + public String getAttribute() { + return attribute; + } + + public void setAttribute(String attribute) { + this.attribute = attribute; + } + + public String getCapitalSource() { + return capitalSource; + } + + public void setCapitalSource(String capitalSource) { + this.capitalSource = capitalSource; + } + + public String getCapitalSourceName() { + return capitalSourceName; + } + + public void setCapitalSourceName(String capitalSourceName) { + this.capitalSourceName = capitalSourceName; + } + + public String getCardEstablishmentDate() { + return cardEstablishmentDate; + } + + public void setCardEstablishmentDate(String cardEstablishmentDate) { + this.cardEstablishmentDate = cardEstablishmentDate; + } + + public String getCompulsoryVerification() { + return compulsoryVerification; + } + + public void setCompulsoryVerification(String compulsoryVerification) { + this.compulsoryVerification = compulsoryVerification; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getDepreciationMethod() { + return depreciationMethod; + } + + public void setDepreciationMethod(String depreciationMethod) { + this.depreciationMethod = depreciationMethod; + } + + public String getDepreciationMethodName() { + return depreciationMethodName; + } + + public void setDepreciationMethodName(String depreciationMethodName) { + this.depreciationMethodName = depreciationMethodName; + } + + public String getDepreciationPeriod() { + return depreciationPeriod; + } + + public void setDepreciationPeriod(String depreciationPeriod) { + this.depreciationPeriod = depreciationPeriod; + } + + public String getEnableDate() { + return enableDate; + } + + public void setEnableDate(String enableDate) { + this.enableDate = enableDate; + } + + public String getEquipmentCategory() { + return equipmentCategory; + } + + public void setEquipmentCategory(String equipmentCategory) { + this.equipmentCategory = equipmentCategory; + } + + public String getEquipmentCategoryName() { + return equipmentCategoryName; + } + + public void setEquipmentCategoryName(String equipmentCategoryName) { + this.equipmentCategoryName = equipmentCategoryName; + } + + public String getEquipmentName() { + return equipmentName; + } + + public void setEquipmentName(String equipmentName) { + this.equipmentName = equipmentName; + } + + public String getEquipmentNo() { + return equipmentNo; + } + + public void setEquipmentNo(String equipmentNo) { + this.equipmentNo = equipmentNo; + } + + public String getEquipmentSpecifications() { + return equipmentSpecifications; + } + + public void setEquipmentSpecifications(String equipmentSpecifications) { + this.equipmentSpecifications = equipmentSpecifications; + } + + public String getEquipmentType() { + return equipmentType; + } + + public void setEquipmentType(String equipmentType) { + this.equipmentType = equipmentType; + } + + public String getEquipmentTypeName() { + return equipmentTypeName; + } + + public void setEquipmentTypeName(String equipmentTypeName) { + this.equipmentTypeName = equipmentTypeName; + } + + public String getFileList() { + return fileList; + } + + public void setFileList(String fileList) { + this.fileList = fileList; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getInstallIncidentalExpenses() { + return installIncidentalExpenses; + } + + public void setInstallIncidentalExpenses(String installIncidentalExpenses) { + this.installIncidentalExpenses = installIncidentalExpenses; + } + + public String getInstallPlace() { + return installPlace; + } + + public void setInstallPlace(String installPlace) { + this.installPlace = installPlace; + } + + public String getIntactState() { + return intactState; + } + + public void setIntactState(String intactState) { + this.intactState = intactState; + } + + public String getIsCalibrationTestEquipment() { + return isCalibrationTestEquipment; + } + + public void setIsCalibrationTestEquipment(String isCalibrationTestEquipment) { + this.isCalibrationTestEquipment = isCalibrationTestEquipment; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getIsFixedAssets() { + return isFixedAssets; + } + + public void setIsFixedAssets(String isFixedAssets) { + this.isFixedAssets = isFixedAssets; + } + + public String getIsMeasureAccount() { + return isMeasureAccount; + } + + public void setIsMeasureAccount(String isMeasureAccount) { + this.isMeasureAccount = isMeasureAccount; + } + + public String getIsStandardSupportEquipment() { + return isStandardSupportEquipment; + } + + public void setIsStandardSupportEquipment(String isStandardSupportEquipment) { + this.isStandardSupportEquipment = isStandardSupportEquipment; + } + + public String getLabelBind() { + return labelBind; + } + + public void setLabelBind(String labelBind) { + this.labelBind = labelBind; + } + + public String getMajorCategory() { + return majorCategory; + } + + public void setMajorCategory(String majorCategory) { + this.majorCategory = majorCategory; + } + + public String getMajorCategoryName() { + return majorCategoryName; + } + + public void setMajorCategoryName(String majorCategoryName) { + this.majorCategoryName = majorCategoryName; + } + + public String getManagerLevel() { + return managerLevel; + } + + public void setManagerLevel(String managerLevel) { + this.managerLevel = managerLevel; + } + + public String getManagerLevelName() { + return managerLevelName; + } + + public void setManagerLevelName(String managerLevelName) { + this.managerLevelName = managerLevelName; + } + + public String getManagerState() { + return managerState; + } + + public void setManagerState(String managerState) { + this.managerState = managerState; + } + + public String getManagerStateName() { + return managerStateName; + } + + public void setManagerStateName(String managerStateName) { + this.managerStateName = managerStateName; + } + + public String getManufacturer() { + return manufacturer; + } + + public void setManufacturer(String manufacturer) { + this.manufacturer = manufacturer; + } + + public String getManufacturerCountry() { + return manufacturerCountry; + } + + public void setManufacturerCountry(String manufacturerCountry) { + this.manufacturerCountry = manufacturerCountry; + } + + public String getManufacturingDate() { + return manufacturingDate; + } + + public void setManufacturingDate(String manufacturingDate) { + this.manufacturingDate = manufacturingDate; + } + + public String getManufacturingNo() { + return manufacturingNo; + } + + public void setManufacturingNo(String manufacturingNo) { + this.manufacturingNo = manufacturingNo; + } + + public String getMesureCycle() { + return mesureCycle; + } + + public void setMesureCycle(String mesureCycle) { + this.mesureCycle = mesureCycle; + } + + public String getMesureDate() { + return mesureDate; + } + + public void setMesureDate(String mesureDate) { + this.mesureDate = mesureDate; + } + + public String getMesureDept() { + return mesureDept; + } + + public void setMesureDept(String mesureDept) { + this.mesureDept = mesureDept; + } + + public String getMesureRange() { + return mesureRange; + } + + public void setMesureRange(String mesureRange) { + this.mesureRange = mesureRange; + } + + public String getMesureResult() { + return mesureResult; + } + + public void setMesureResult(String mesureResult) { + this.mesureResult = mesureResult; + } + + public String getMesureResultName() { + return mesureResultName; + } + + public void setMesureResultName(String mesureResultName) { + this.mesureResultName = mesureResultName; + } + + public String getMesureType() { + return mesureType; + } + + public void setMesureType(String mesureType) { + this.mesureType = mesureType; + } + + public String getMesureTypeName() { + return mesureTypeName; + } + + public void setMesureTypeName(String mesureTypeName) { + this.mesureTypeName = mesureTypeName; + } + + public String getModelNo() { + return modelNo; + } + + public void setModelNo(String modelNo) { + this.modelNo = modelNo; + } + + public String getOriginValue() { + return originValue; + } + + public void setOriginValue(String originValue) { + this.originValue = originValue; + } + + public String getOverallDimension() { + return overallDimension; + } + + public void setOverallDimension(String overallDimension) { + this.overallDimension = overallDimension; + } + + public String getPresentOriginValue() { + return presentOriginValue; + } + + public void setPresentOriginValue(String presentOriginValue) { + this.presentOriginValue = presentOriginValue; + } + + public String getPurpose() { + return purpose; + } + + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSinglePrice() { + return singlePrice; + } + + public void setSinglePrice(String singlePrice) { + this.singlePrice = singlePrice; + } + + public String getSupportStandardEquipmentName() { + return supportStandardEquipmentName; + } + + public void setSupportStandardEquipmentName(String supportStandardEquipmentName) { + this.supportStandardEquipmentName = supportStandardEquipmentName; + } + + public String getSupportStandardEquipmentNo() { + return supportStandardEquipmentNo; + } + + public void setSupportStandardEquipmentNo(String supportStandardEquipmentNo) { + this.supportStandardEquipmentNo = supportStandardEquipmentNo; + } + + public String getTechnicalLevel() { + return technicalLevel; + } + + public void setTechnicalLevel(String technicalLevel) { + this.technicalLevel = technicalLevel; + } + + public String getUncertainty() { + return uncertainty; + } + + public void setUncertainty(String uncertainty) { + this.uncertainty = uncertainty; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUseDept() { + return useDept; + } + + public void setUseDept(String useDept) { + this.useDept = useDept; + } + + public String getUseDeptName() { + return useDeptName; + } + + public void setUseDeptName(String useDeptName) { + this.useDeptName = useDeptName; + } + + public String getUsePerson() { + return usePerson; + } + + public void setUsePerson(String usePerson) { + this.usePerson = usePerson; + } + + public String getUsePersonName() { + return usePersonName; + } + + public void setUsePersonName(String usePersonName) { + this.usePersonName = usePersonName; + } + + public String getValidDate() { + return validDate; + } + + public void setValidDate(String validDate) { + this.validDate = validDate; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getWeight() { + return weight; + } + + public void setWeight(String weight) { + this.weight = weight; + } + } + + public static class MeterStaffListModel { + private String account; + private String administrationJob; + private String birthday; + private String certificateCompany; + private String certificateDate; + private String certificateList; + private String createTime; + private String deptId; + private String deptName; + private String education; + private String id; + private String idCard; + private String isDel; + private String mainExaminer; + private String major; + private String minioFileName; + private String name; + private String remark; + private String sex; + private String specialOperator; + private String staffNo; + private String technologyExam; + private String technologyJob; + private String updateTime; + private String userId; + private String verifierCertificateNo; + private String workDate; + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getAdministrationJob() { + return administrationJob; + } + + public void setAdministrationJob(String administrationJob) { + this.administrationJob = administrationJob; + } + + public String getBirthday() { + return birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getCertificateCompany() { + return certificateCompany; + } + + public void setCertificateCompany(String certificateCompany) { + this.certificateCompany = certificateCompany; + } + + public String getCertificateDate() { + return certificateDate; + } + + public void setCertificateDate(String certificateDate) { + this.certificateDate = certificateDate; + } + + public String getCertificateList() { + return certificateList; + } + + public void setCertificateList(String certificateList) { + this.certificateList = certificateList; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getDeptId() { + return deptId; + } + + public void setDeptId(String deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getEducation() { + return education; + } + + public void setEducation(String education) { + this.education = education; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getMainExaminer() { + return mainExaminer; + } + + public void setMainExaminer(String mainExaminer) { + this.mainExaminer = mainExaminer; + } + + public String getMajor() { + return major; + } + + public void setMajor(String major) { + this.major = major; + } + + public String getMinioFileName() { + return minioFileName; + } + + public void setMinioFileName(String minioFileName) { + this.minioFileName = minioFileName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getSpecialOperator() { + return specialOperator; + } + + public void setSpecialOperator(String specialOperator) { + this.specialOperator = specialOperator; + } + + public String getStaffNo() { + return staffNo; + } + + public void setStaffNo(String staffNo) { + this.staffNo = staffNo; + } + + public String getTechnologyExam() { + return technologyExam; + } + + public void setTechnologyExam(String technologyExam) { + this.technologyExam = technologyExam; + } + + public String getTechnologyJob() { + return technologyJob; + } + + public void setTechnologyJob(String technologyJob) { + this.technologyJob = technologyJob; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getVerifierCertificateNo() { + return verifierCertificateNo; + } + + public void setVerifierCertificateNo(String verifierCertificateNo) { + this.verifierCertificateNo = verifierCertificateNo; + } + + public String getWorkDate() { + return workDate; + } + + public void setWorkDate(String workDate) { + this.workDate = workDate; + } + } + } +} diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt index 5bb091f..3b9791a 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt @@ -477,4 +477,13 @@ @QueryMap limit: Map, @QueryMap offset: Map ): String + + /** + * 获取现场检测详情 + */ + @POST("/business/siteExecutive/detail") + suspend fun getOutfieldDetectionDetail( + @Header("token") token: String, + @Body requestBody: RequestBody + ): String } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt index add9920..996d452 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt @@ -1094,4 +1094,16 @@ AuthenticationHelper.token!!, requestBody, limitMap, offsetMap ) } + + /** + * 获取现场检测详情 + */ + suspend fun getOutfieldDetectionDetail(id: String): String { + val param = JsonObject() + param.addProperty("id", id) + val requestBody = param.toString().toRequestBody( + "application/json;charset=UTF-8".toMediaType() + ) + return api.getOutfieldDetectionDetail(AuthenticationHelper.token!!, requestBody) + } } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt index 549b79a..3ba54dc 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt @@ -45,17 +45,23 @@ } outfieldDetectionViewModel = ViewModelProvider(this)[OutfieldDetectionViewModel::class.java] + outfieldDetectionViewModel.getOutfieldDetectionDetail(args[0]) + outfieldDetectionViewModel.outfieldDetectionDetail.observe(this) { + if (it.code == 200) { + val data = it.data!! - fragmentPages.add(BasicInformationFragment()) - fragmentPages.add(TaskExecutorFragment()) - fragmentPages.add(TaskDeviceFragment()) - fragmentPages.add(ApprovalLogFragment()) + fragmentPages.add(BasicInformationFragment(data)) + fragmentPages.add(TaskExecutorFragment(data.meterStaffList)) + fragmentPages.add(TaskDeviceFragment(data.equipmentInfoList)) + fragmentPages.add(ApprovalLogFragment()) - approvalViewPager.adapter = SubViewPagerAdapter( - supportFragmentManager, fragmentPages, pageTitles - ) - //绑定 - topTabLayout.setupWithViewPager(approvalViewPager) + approvalViewPager.adapter = SubViewPagerAdapter( + supportFragmentManager, fragmentPages, pageTitles + ) + //绑定 + topTabLayout.setupWithViewPager(approvalViewPager) + } + } } override fun observeRequestState() { diff --git a/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt b/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt index fbded6a..2a3ac27 100644 --- a/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt +++ b/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt @@ -4,6 +4,7 @@ import com.casic.xz.meterage.base.BaseApplication import com.casic.xz.meterage.extensions.separateResponseCode import com.casic.xz.meterage.extensions.toErrorMessage +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.casic.xz.meterage.model.OutfieldDetectionListModel import com.casic.xz.meterage.utils.retrofit.RetrofitServiceManager import com.google.gson.Gson @@ -20,6 +21,7 @@ private val gson by lazy { Gson() } val outfieldDetectionList = MutableLiveData() + val outfieldDetectionDetail = MutableLiveData() fun getOutfieldDetectionList( approvalStatus: String, @@ -47,4 +49,23 @@ it.cause.toString().show(BaseApplication.get()) it.printStackTrace() }) + + fun getOutfieldDetectionDetail(id: String) = launch({ + loadState.value = LoadState.Loading + val response = RetrofitServiceManager.getOutfieldDetectionDetail(id) + val responseCode = response.separateResponseCode() + if (responseCode == 200) { + loadState.value = LoadState.Success + outfieldDetectionDetail.value = gson.fromJson( + response, object : TypeToken() {}.type + ) + } else { + loadState.value = LoadState.Fail + response.toErrorMessage().show(BaseApplication.get()) + } + }, { + loadState.value = LoadState.Fail + it.cause.toString().show(BaseApplication.get()) + it.printStackTrace() + }) } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt index 2acc9aa..f05e944 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt @@ -1,12 +1,28 @@ package com.casic.xz.meterage.fragment.outfield import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.pengxh.kt.lite.base.KotlinBaseFragment +import kotlinx.android.synthetic.main.fragment_od_base_info.* -class BasicInformationFragment : KotlinBaseFragment() { +class BasicInformationFragment(private val data: OutfieldDetectionDetailModel.DataModel) : + KotlinBaseFragment() { override fun initData() { - + odCodeView.text = data.siteExecutiveNo + odNameView.text = data.siteExecutiveName + directorNameView.text = data.directorName + applyTimeView.text = data.applyTime.formatToYearMonthDay() + taskSourceNameView.text = data.taskSourceName + linkageOrderCodeView.text = data.orderId + preCostView.text = "¥ ${data.preCost}" + preStartTimeView.text = data.preStartTime.formatToYearMonthDay() + preEndTimeView.text = data.preEndTime.formatToYearMonthDay() + executiveAddressView.text = data.executiveAddress + hazardSourceView.text = data.hazardSourceAndPreventionMethod + executiveItemView.text = data.executiveItem + remarkView.text = data.remark } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt index 823eed6..4bc3c79 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt @@ -1,12 +1,52 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_device.* -class TaskDeviceFragment : KotlinBaseFragment() { +class TaskDeviceFragment(private val devices: List) : + KotlinBaseFragment() { override fun initData() { + val supportAdapter = object : + NormalRecyclerAdapter( + R.layout.item_device_support_rv_l, devices + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.EquipmentInfoListModel + ) { + if (item.validDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + viewHolder.setText(R.id.nameTagView, item.equipmentName.last().toString()) + .setText(R.id.deviceNameView, item.equipmentName) + .setText(R.id.modelView, item.modelNo) + .setText(R.id.deviceCodeView, "设备编号:${item.equipmentNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.validDate.formatToYearMonthDay()}" + ) + } + } + supportRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + supportRecyclerView.adapter = supportAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt index ac68b19..8154212 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt @@ -1,12 +1,58 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_executor.* -class TaskExecutorFragment : KotlinBaseFragment() { +class TaskExecutorFragment(private val executors: List) : + KotlinBaseFragment() { override fun initData() { + val staffAdapter = object : + NormalRecyclerAdapter( + R.layout.item_staff_rv_l, executors + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.MeterStaffListModel + ) { + val useDept = if (item.deptName.isNullOrBlank()) { + "未知" + } else { + item.deptName + } + if (item.certificateDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + + viewHolder.setText(R.id.nameTagView, item.name.last().toString()) + .setText(R.id.userNameView, item.name) + .setText(R.id.useDeptView, useDept) + .setText(R.id.certificateView, "证书编号:${item.verifierCertificateNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.certificateDate.formatToYearMonthDay()}" + ) + } + } + staffRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + staffRecyclerView.adapter = staffAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java new file mode 100644 index 0000000..f6530ca --- /dev/null +++ b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java @@ -0,0 +1,1177 @@ +package com.casic.xz.meterage.model; + +import java.util.List; + +public class OutfieldDetectionDetailModel { + + private int code; + private DataModel data; + private String message; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataModel getData() { + return data; + } + + public void setData(DataModel data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public static class DataModel { + private String applyTime; + private String approvalStatus; + private String createTime; + private String createUser; + private String customerId; + private String directorId; + private String directorName; + private List equipmentInfoList; + private String executiveAddress; + private String executiveEnvironment; + private String executiveItem; + private String hazardSourceAndPreventionMethod; + private String id; + private String isDel; + private List meterStaffList; + private String orderId; + private String preCost; + private String preEndTime; + private String preStartTime; + private String processId; + private String remark; + private String siteExecutiveName; + private String siteExecutiveNo; + private String taskSource; + private String taskSourceName; + private String updateTime; + + public String getApplyTime() { + return applyTime; + } + + public void setApplyTime(String applyTime) { + this.applyTime = applyTime; + } + + public String getApprovalStatus() { + return approvalStatus; + } + + public void setApprovalStatus(String approvalStatus) { + this.approvalStatus = approvalStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getDirectorId() { + return directorId; + } + + public void setDirectorId(String directorId) { + this.directorId = directorId; + } + + public String getDirectorName() { + return directorName; + } + + public void setDirectorName(String directorName) { + this.directorName = directorName; + } + + public List getEquipmentInfoList() { + return equipmentInfoList; + } + + public void setEquipmentInfoList(List equipmentInfoList) { + this.equipmentInfoList = equipmentInfoList; + } + + public String getExecutiveAddress() { + return executiveAddress; + } + + public void setExecutiveAddress(String executiveAddress) { + this.executiveAddress = executiveAddress; + } + + public String getExecutiveEnvironment() { + return executiveEnvironment; + } + + public void setExecutiveEnvironment(String executiveEnvironment) { + this.executiveEnvironment = executiveEnvironment; + } + + public String getExecutiveItem() { + return executiveItem; + } + + public void setExecutiveItem(String executiveItem) { + this.executiveItem = executiveItem; + } + + public String getHazardSourceAndPreventionMethod() { + return hazardSourceAndPreventionMethod; + } + + public void setHazardSourceAndPreventionMethod(String hazardSourceAndPreventionMethod) { + this.hazardSourceAndPreventionMethod = hazardSourceAndPreventionMethod; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public List getMeterStaffList() { + return meterStaffList; + } + + public void setMeterStaffList(List meterStaffList) { + this.meterStaffList = meterStaffList; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public String getPreCost() { + return preCost; + } + + public void setPreCost(String preCost) { + this.preCost = preCost; + } + + public String getPreEndTime() { + return preEndTime; + } + + public void setPreEndTime(String preEndTime) { + this.preEndTime = preEndTime; + } + + public String getPreStartTime() { + return preStartTime; + } + + public void setPreStartTime(String preStartTime) { + this.preStartTime = preStartTime; + } + + public String getProcessId() { + return processId; + } + + public void setProcessId(String processId) { + this.processId = processId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSiteExecutiveName() { + return siteExecutiveName; + } + + public void setSiteExecutiveName(String siteExecutiveName) { + this.siteExecutiveName = siteExecutiveName; + } + + public String getSiteExecutiveNo() { + return siteExecutiveNo; + } + + public void setSiteExecutiveNo(String siteExecutiveNo) { + this.siteExecutiveNo = siteExecutiveNo; + } + + public String getTaskSource() { + return taskSource; + } + + public void setTaskSource(String taskSource) { + this.taskSource = taskSource; + } + + public String getTaskSourceName() { + return taskSourceName; + } + + public void setTaskSourceName(String taskSourceName) { + this.taskSourceName = taskSourceName; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public static class EquipmentInfoListModel { + private String abc; + private String abcName; + private String applyRelationId; + private String assetNo; + private String assetSource; + private String assetType; + private String assetTypeName; + private String attribute; + private String capitalSource; + private String capitalSourceName; + private String cardEstablishmentDate; + private String compulsoryVerification; + private String createTime; + private String createUser; + private String depreciationMethod; + private String depreciationMethodName; + private String depreciationPeriod; + private String enableDate; + private String equipmentCategory; + private String equipmentCategoryName; + private String equipmentName; + private String equipmentNo; + private String equipmentSpecifications; + private String equipmentType; + private String equipmentTypeName; + private String fileList; + private String id; + private String installIncidentalExpenses; + private String installPlace; + private String intactState; + private String isCalibrationTestEquipment; + private String isDel; + private String isFixedAssets; + private String isMeasureAccount; + private String isStandardSupportEquipment; + private String labelBind; + private String majorCategory; + private String majorCategoryName; + private String managerLevel; + private String managerLevelName; + private String managerState; + private String managerStateName; + private String manufacturer; + private String manufacturerCountry; + private String manufacturingDate; + private String manufacturingNo; + private String mesureCycle; + private String mesureDate; + private String mesureDept; + private String mesureRange; + private String mesureResult; + private String mesureResultName; + private String mesureType; + private String mesureTypeName; + private String modelNo; + private String originValue; + private String overallDimension; + private String presentOriginValue; + private String purpose; + private String remark; + private String singlePrice; + private String supportStandardEquipmentName; + private String supportStandardEquipmentNo; + private String technicalLevel; + private String uncertainty; + private String updateTime; + private String useDept; + private String useDeptName; + private String usePerson; + private String usePersonName; + private String validDate; + private String version; + private String weight; + + public String getAbc() { + return abc; + } + + public void setAbc(String abc) { + this.abc = abc; + } + + public String getAbcName() { + return abcName; + } + + public void setAbcName(String abcName) { + this.abcName = abcName; + } + + public String getApplyRelationId() { + return applyRelationId; + } + + public void setApplyRelationId(String applyRelationId) { + this.applyRelationId = applyRelationId; + } + + public String getAssetNo() { + return assetNo; + } + + public void setAssetNo(String assetNo) { + this.assetNo = assetNo; + } + + public String getAssetSource() { + return assetSource; + } + + public void setAssetSource(String assetSource) { + this.assetSource = assetSource; + } + + public String getAssetType() { + return assetType; + } + + public void setAssetType(String assetType) { + this.assetType = assetType; + } + + public String getAssetTypeName() { + return assetTypeName; + } + + public void setAssetTypeName(String assetTypeName) { + this.assetTypeName = assetTypeName; + } + + public String getAttribute() { + return attribute; + } + + public void setAttribute(String attribute) { + this.attribute = attribute; + } + + public String getCapitalSource() { + return capitalSource; + } + + public void setCapitalSource(String capitalSource) { + this.capitalSource = capitalSource; + } + + public String getCapitalSourceName() { + return capitalSourceName; + } + + public void setCapitalSourceName(String capitalSourceName) { + this.capitalSourceName = capitalSourceName; + } + + public String getCardEstablishmentDate() { + return cardEstablishmentDate; + } + + public void setCardEstablishmentDate(String cardEstablishmentDate) { + this.cardEstablishmentDate = cardEstablishmentDate; + } + + public String getCompulsoryVerification() { + return compulsoryVerification; + } + + public void setCompulsoryVerification(String compulsoryVerification) { + this.compulsoryVerification = compulsoryVerification; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getDepreciationMethod() { + return depreciationMethod; + } + + public void setDepreciationMethod(String depreciationMethod) { + this.depreciationMethod = depreciationMethod; + } + + public String getDepreciationMethodName() { + return depreciationMethodName; + } + + public void setDepreciationMethodName(String depreciationMethodName) { + this.depreciationMethodName = depreciationMethodName; + } + + public String getDepreciationPeriod() { + return depreciationPeriod; + } + + public void setDepreciationPeriod(String depreciationPeriod) { + this.depreciationPeriod = depreciationPeriod; + } + + public String getEnableDate() { + return enableDate; + } + + public void setEnableDate(String enableDate) { + this.enableDate = enableDate; + } + + public String getEquipmentCategory() { + return equipmentCategory; + } + + public void setEquipmentCategory(String equipmentCategory) { + this.equipmentCategory = equipmentCategory; + } + + public String getEquipmentCategoryName() { + return equipmentCategoryName; + } + + public void setEquipmentCategoryName(String equipmentCategoryName) { + this.equipmentCategoryName = equipmentCategoryName; + } + + public String getEquipmentName() { + return equipmentName; + } + + public void setEquipmentName(String equipmentName) { + this.equipmentName = equipmentName; + } + + public String getEquipmentNo() { + return equipmentNo; + } + + public void setEquipmentNo(String equipmentNo) { + this.equipmentNo = equipmentNo; + } + + public String getEquipmentSpecifications() { + return equipmentSpecifications; + } + + public void setEquipmentSpecifications(String equipmentSpecifications) { + this.equipmentSpecifications = equipmentSpecifications; + } + + public String getEquipmentType() { + return equipmentType; + } + + public void setEquipmentType(String equipmentType) { + this.equipmentType = equipmentType; + } + + public String getEquipmentTypeName() { + return equipmentTypeName; + } + + public void setEquipmentTypeName(String equipmentTypeName) { + this.equipmentTypeName = equipmentTypeName; + } + + public String getFileList() { + return fileList; + } + + public void setFileList(String fileList) { + this.fileList = fileList; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getInstallIncidentalExpenses() { + return installIncidentalExpenses; + } + + public void setInstallIncidentalExpenses(String installIncidentalExpenses) { + this.installIncidentalExpenses = installIncidentalExpenses; + } + + public String getInstallPlace() { + return installPlace; + } + + public void setInstallPlace(String installPlace) { + this.installPlace = installPlace; + } + + public String getIntactState() { + return intactState; + } + + public void setIntactState(String intactState) { + this.intactState = intactState; + } + + public String getIsCalibrationTestEquipment() { + return isCalibrationTestEquipment; + } + + public void setIsCalibrationTestEquipment(String isCalibrationTestEquipment) { + this.isCalibrationTestEquipment = isCalibrationTestEquipment; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getIsFixedAssets() { + return isFixedAssets; + } + + public void setIsFixedAssets(String isFixedAssets) { + this.isFixedAssets = isFixedAssets; + } + + public String getIsMeasureAccount() { + return isMeasureAccount; + } + + public void setIsMeasureAccount(String isMeasureAccount) { + this.isMeasureAccount = isMeasureAccount; + } + + public String getIsStandardSupportEquipment() { + return isStandardSupportEquipment; + } + + public void setIsStandardSupportEquipment(String isStandardSupportEquipment) { + this.isStandardSupportEquipment = isStandardSupportEquipment; + } + + public String getLabelBind() { + return labelBind; + } + + public void setLabelBind(String labelBind) { + this.labelBind = labelBind; + } + + public String getMajorCategory() { + return majorCategory; + } + + public void setMajorCategory(String majorCategory) { + this.majorCategory = majorCategory; + } + + public String getMajorCategoryName() { + return majorCategoryName; + } + + public void setMajorCategoryName(String majorCategoryName) { + this.majorCategoryName = majorCategoryName; + } + + public String getManagerLevel() { + return managerLevel; + } + + public void setManagerLevel(String managerLevel) { + this.managerLevel = managerLevel; + } + + public String getManagerLevelName() { + return managerLevelName; + } + + public void setManagerLevelName(String managerLevelName) { + this.managerLevelName = managerLevelName; + } + + public String getManagerState() { + return managerState; + } + + public void setManagerState(String managerState) { + this.managerState = managerState; + } + + public String getManagerStateName() { + return managerStateName; + } + + public void setManagerStateName(String managerStateName) { + this.managerStateName = managerStateName; + } + + public String getManufacturer() { + return manufacturer; + } + + public void setManufacturer(String manufacturer) { + this.manufacturer = manufacturer; + } + + public String getManufacturerCountry() { + return manufacturerCountry; + } + + public void setManufacturerCountry(String manufacturerCountry) { + this.manufacturerCountry = manufacturerCountry; + } + + public String getManufacturingDate() { + return manufacturingDate; + } + + public void setManufacturingDate(String manufacturingDate) { + this.manufacturingDate = manufacturingDate; + } + + public String getManufacturingNo() { + return manufacturingNo; + } + + public void setManufacturingNo(String manufacturingNo) { + this.manufacturingNo = manufacturingNo; + } + + public String getMesureCycle() { + return mesureCycle; + } + + public void setMesureCycle(String mesureCycle) { + this.mesureCycle = mesureCycle; + } + + public String getMesureDate() { + return mesureDate; + } + + public void setMesureDate(String mesureDate) { + this.mesureDate = mesureDate; + } + + public String getMesureDept() { + return mesureDept; + } + + public void setMesureDept(String mesureDept) { + this.mesureDept = mesureDept; + } + + public String getMesureRange() { + return mesureRange; + } + + public void setMesureRange(String mesureRange) { + this.mesureRange = mesureRange; + } + + public String getMesureResult() { + return mesureResult; + } + + public void setMesureResult(String mesureResult) { + this.mesureResult = mesureResult; + } + + public String getMesureResultName() { + return mesureResultName; + } + + public void setMesureResultName(String mesureResultName) { + this.mesureResultName = mesureResultName; + } + + public String getMesureType() { + return mesureType; + } + + public void setMesureType(String mesureType) { + this.mesureType = mesureType; + } + + public String getMesureTypeName() { + return mesureTypeName; + } + + public void setMesureTypeName(String mesureTypeName) { + this.mesureTypeName = mesureTypeName; + } + + public String getModelNo() { + return modelNo; + } + + public void setModelNo(String modelNo) { + this.modelNo = modelNo; + } + + public String getOriginValue() { + return originValue; + } + + public void setOriginValue(String originValue) { + this.originValue = originValue; + } + + public String getOverallDimension() { + return overallDimension; + } + + public void setOverallDimension(String overallDimension) { + this.overallDimension = overallDimension; + } + + public String getPresentOriginValue() { + return presentOriginValue; + } + + public void setPresentOriginValue(String presentOriginValue) { + this.presentOriginValue = presentOriginValue; + } + + public String getPurpose() { + return purpose; + } + + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSinglePrice() { + return singlePrice; + } + + public void setSinglePrice(String singlePrice) { + this.singlePrice = singlePrice; + } + + public String getSupportStandardEquipmentName() { + return supportStandardEquipmentName; + } + + public void setSupportStandardEquipmentName(String supportStandardEquipmentName) { + this.supportStandardEquipmentName = supportStandardEquipmentName; + } + + public String getSupportStandardEquipmentNo() { + return supportStandardEquipmentNo; + } + + public void setSupportStandardEquipmentNo(String supportStandardEquipmentNo) { + this.supportStandardEquipmentNo = supportStandardEquipmentNo; + } + + public String getTechnicalLevel() { + return technicalLevel; + } + + public void setTechnicalLevel(String technicalLevel) { + this.technicalLevel = technicalLevel; + } + + public String getUncertainty() { + return uncertainty; + } + + public void setUncertainty(String uncertainty) { + this.uncertainty = uncertainty; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUseDept() { + return useDept; + } + + public void setUseDept(String useDept) { + this.useDept = useDept; + } + + public String getUseDeptName() { + return useDeptName; + } + + public void setUseDeptName(String useDeptName) { + this.useDeptName = useDeptName; + } + + public String getUsePerson() { + return usePerson; + } + + public void setUsePerson(String usePerson) { + this.usePerson = usePerson; + } + + public String getUsePersonName() { + return usePersonName; + } + + public void setUsePersonName(String usePersonName) { + this.usePersonName = usePersonName; + } + + public String getValidDate() { + return validDate; + } + + public void setValidDate(String validDate) { + this.validDate = validDate; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getWeight() { + return weight; + } + + public void setWeight(String weight) { + this.weight = weight; + } + } + + public static class MeterStaffListModel { + private String account; + private String administrationJob; + private String birthday; + private String certificateCompany; + private String certificateDate; + private String certificateList; + private String createTime; + private String deptId; + private String deptName; + private String education; + private String id; + private String idCard; + private String isDel; + private String mainExaminer; + private String major; + private String minioFileName; + private String name; + private String remark; + private String sex; + private String specialOperator; + private String staffNo; + private String technologyExam; + private String technologyJob; + private String updateTime; + private String userId; + private String verifierCertificateNo; + private String workDate; + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getAdministrationJob() { + return administrationJob; + } + + public void setAdministrationJob(String administrationJob) { + this.administrationJob = administrationJob; + } + + public String getBirthday() { + return birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getCertificateCompany() { + return certificateCompany; + } + + public void setCertificateCompany(String certificateCompany) { + this.certificateCompany = certificateCompany; + } + + public String getCertificateDate() { + return certificateDate; + } + + public void setCertificateDate(String certificateDate) { + this.certificateDate = certificateDate; + } + + public String getCertificateList() { + return certificateList; + } + + public void setCertificateList(String certificateList) { + this.certificateList = certificateList; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getDeptId() { + return deptId; + } + + public void setDeptId(String deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getEducation() { + return education; + } + + public void setEducation(String education) { + this.education = education; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getMainExaminer() { + return mainExaminer; + } + + public void setMainExaminer(String mainExaminer) { + this.mainExaminer = mainExaminer; + } + + public String getMajor() { + return major; + } + + public void setMajor(String major) { + this.major = major; + } + + public String getMinioFileName() { + return minioFileName; + } + + public void setMinioFileName(String minioFileName) { + this.minioFileName = minioFileName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getSpecialOperator() { + return specialOperator; + } + + public void setSpecialOperator(String specialOperator) { + this.specialOperator = specialOperator; + } + + public String getStaffNo() { + return staffNo; + } + + public void setStaffNo(String staffNo) { + this.staffNo = staffNo; + } + + public String getTechnologyExam() { + return technologyExam; + } + + public void setTechnologyExam(String technologyExam) { + this.technologyExam = technologyExam; + } + + public String getTechnologyJob() { + return technologyJob; + } + + public void setTechnologyJob(String technologyJob) { + this.technologyJob = technologyJob; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getVerifierCertificateNo() { + return verifierCertificateNo; + } + + public void setVerifierCertificateNo(String verifierCertificateNo) { + this.verifierCertificateNo = verifierCertificateNo; + } + + public String getWorkDate() { + return workDate; + } + + public void setWorkDate(String workDate) { + this.workDate = workDate; + } + } + } +} diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt index 5bb091f..3b9791a 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt @@ -477,4 +477,13 @@ @QueryMap limit: Map, @QueryMap offset: Map ): String + + /** + * 获取现场检测详情 + */ + @POST("/business/siteExecutive/detail") + suspend fun getOutfieldDetectionDetail( + @Header("token") token: String, + @Body requestBody: RequestBody + ): String } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt index add9920..996d452 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt @@ -1094,4 +1094,16 @@ AuthenticationHelper.token!!, requestBody, limitMap, offsetMap ) } + + /** + * 获取现场检测详情 + */ + suspend fun getOutfieldDetectionDetail(id: String): String { + val param = JsonObject() + param.addProperty("id", id) + val requestBody = param.toString().toRequestBody( + "application/json;charset=UTF-8".toMediaType() + ) + return api.getOutfieldDetectionDetail(AuthenticationHelper.token!!, requestBody) + } } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt index 549b79a..3ba54dc 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt @@ -45,17 +45,23 @@ } outfieldDetectionViewModel = ViewModelProvider(this)[OutfieldDetectionViewModel::class.java] + outfieldDetectionViewModel.getOutfieldDetectionDetail(args[0]) + outfieldDetectionViewModel.outfieldDetectionDetail.observe(this) { + if (it.code == 200) { + val data = it.data!! - fragmentPages.add(BasicInformationFragment()) - fragmentPages.add(TaskExecutorFragment()) - fragmentPages.add(TaskDeviceFragment()) - fragmentPages.add(ApprovalLogFragment()) + fragmentPages.add(BasicInformationFragment(data)) + fragmentPages.add(TaskExecutorFragment(data.meterStaffList)) + fragmentPages.add(TaskDeviceFragment(data.equipmentInfoList)) + fragmentPages.add(ApprovalLogFragment()) - approvalViewPager.adapter = SubViewPagerAdapter( - supportFragmentManager, fragmentPages, pageTitles - ) - //绑定 - topTabLayout.setupWithViewPager(approvalViewPager) + approvalViewPager.adapter = SubViewPagerAdapter( + supportFragmentManager, fragmentPages, pageTitles + ) + //绑定 + topTabLayout.setupWithViewPager(approvalViewPager) + } + } } override fun observeRequestState() { diff --git a/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt b/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt index fbded6a..2a3ac27 100644 --- a/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt +++ b/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt @@ -4,6 +4,7 @@ import com.casic.xz.meterage.base.BaseApplication import com.casic.xz.meterage.extensions.separateResponseCode import com.casic.xz.meterage.extensions.toErrorMessage +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.casic.xz.meterage.model.OutfieldDetectionListModel import com.casic.xz.meterage.utils.retrofit.RetrofitServiceManager import com.google.gson.Gson @@ -20,6 +21,7 @@ private val gson by lazy { Gson() } val outfieldDetectionList = MutableLiveData() + val outfieldDetectionDetail = MutableLiveData() fun getOutfieldDetectionList( approvalStatus: String, @@ -47,4 +49,23 @@ it.cause.toString().show(BaseApplication.get()) it.printStackTrace() }) + + fun getOutfieldDetectionDetail(id: String) = launch({ + loadState.value = LoadState.Loading + val response = RetrofitServiceManager.getOutfieldDetectionDetail(id) + val responseCode = response.separateResponseCode() + if (responseCode == 200) { + loadState.value = LoadState.Success + outfieldDetectionDetail.value = gson.fromJson( + response, object : TypeToken() {}.type + ) + } else { + loadState.value = LoadState.Fail + response.toErrorMessage().show(BaseApplication.get()) + } + }, { + loadState.value = LoadState.Fail + it.cause.toString().show(BaseApplication.get()) + it.printStackTrace() + }) } \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_od_base_info.xml b/app/src/main/res/layout/fragment_od_base_info.xml index 77d9ef6..4e1b724 100644 --- a/app/src/main/res/layout/fragment_od_base_info.xml +++ b/app/src/main/res/layout/fragment_od_base_info.xml @@ -1,6 +1,198 @@ - + android:layout_height="match_parent" + android:background="@color/white"> - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt index 2acc9aa..f05e944 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt @@ -1,12 +1,28 @@ package com.casic.xz.meterage.fragment.outfield import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.pengxh.kt.lite.base.KotlinBaseFragment +import kotlinx.android.synthetic.main.fragment_od_base_info.* -class BasicInformationFragment : KotlinBaseFragment() { +class BasicInformationFragment(private val data: OutfieldDetectionDetailModel.DataModel) : + KotlinBaseFragment() { override fun initData() { - + odCodeView.text = data.siteExecutiveNo + odNameView.text = data.siteExecutiveName + directorNameView.text = data.directorName + applyTimeView.text = data.applyTime.formatToYearMonthDay() + taskSourceNameView.text = data.taskSourceName + linkageOrderCodeView.text = data.orderId + preCostView.text = "¥ ${data.preCost}" + preStartTimeView.text = data.preStartTime.formatToYearMonthDay() + preEndTimeView.text = data.preEndTime.formatToYearMonthDay() + executiveAddressView.text = data.executiveAddress + hazardSourceView.text = data.hazardSourceAndPreventionMethod + executiveItemView.text = data.executiveItem + remarkView.text = data.remark } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt index 823eed6..4bc3c79 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt @@ -1,12 +1,52 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_device.* -class TaskDeviceFragment : KotlinBaseFragment() { +class TaskDeviceFragment(private val devices: List) : + KotlinBaseFragment() { override fun initData() { + val supportAdapter = object : + NormalRecyclerAdapter( + R.layout.item_device_support_rv_l, devices + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.EquipmentInfoListModel + ) { + if (item.validDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + viewHolder.setText(R.id.nameTagView, item.equipmentName.last().toString()) + .setText(R.id.deviceNameView, item.equipmentName) + .setText(R.id.modelView, item.modelNo) + .setText(R.id.deviceCodeView, "设备编号:${item.equipmentNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.validDate.formatToYearMonthDay()}" + ) + } + } + supportRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + supportRecyclerView.adapter = supportAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt index ac68b19..8154212 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt @@ -1,12 +1,58 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_executor.* -class TaskExecutorFragment : KotlinBaseFragment() { +class TaskExecutorFragment(private val executors: List) : + KotlinBaseFragment() { override fun initData() { + val staffAdapter = object : + NormalRecyclerAdapter( + R.layout.item_staff_rv_l, executors + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.MeterStaffListModel + ) { + val useDept = if (item.deptName.isNullOrBlank()) { + "未知" + } else { + item.deptName + } + if (item.certificateDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + + viewHolder.setText(R.id.nameTagView, item.name.last().toString()) + .setText(R.id.userNameView, item.name) + .setText(R.id.useDeptView, useDept) + .setText(R.id.certificateView, "证书编号:${item.verifierCertificateNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.certificateDate.formatToYearMonthDay()}" + ) + } + } + staffRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + staffRecyclerView.adapter = staffAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java new file mode 100644 index 0000000..f6530ca --- /dev/null +++ b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java @@ -0,0 +1,1177 @@ +package com.casic.xz.meterage.model; + +import java.util.List; + +public class OutfieldDetectionDetailModel { + + private int code; + private DataModel data; + private String message; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataModel getData() { + return data; + } + + public void setData(DataModel data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public static class DataModel { + private String applyTime; + private String approvalStatus; + private String createTime; + private String createUser; + private String customerId; + private String directorId; + private String directorName; + private List equipmentInfoList; + private String executiveAddress; + private String executiveEnvironment; + private String executiveItem; + private String hazardSourceAndPreventionMethod; + private String id; + private String isDel; + private List meterStaffList; + private String orderId; + private String preCost; + private String preEndTime; + private String preStartTime; + private String processId; + private String remark; + private String siteExecutiveName; + private String siteExecutiveNo; + private String taskSource; + private String taskSourceName; + private String updateTime; + + public String getApplyTime() { + return applyTime; + } + + public void setApplyTime(String applyTime) { + this.applyTime = applyTime; + } + + public String getApprovalStatus() { + return approvalStatus; + } + + public void setApprovalStatus(String approvalStatus) { + this.approvalStatus = approvalStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getDirectorId() { + return directorId; + } + + public void setDirectorId(String directorId) { + this.directorId = directorId; + } + + public String getDirectorName() { + return directorName; + } + + public void setDirectorName(String directorName) { + this.directorName = directorName; + } + + public List getEquipmentInfoList() { + return equipmentInfoList; + } + + public void setEquipmentInfoList(List equipmentInfoList) { + this.equipmentInfoList = equipmentInfoList; + } + + public String getExecutiveAddress() { + return executiveAddress; + } + + public void setExecutiveAddress(String executiveAddress) { + this.executiveAddress = executiveAddress; + } + + public String getExecutiveEnvironment() { + return executiveEnvironment; + } + + public void setExecutiveEnvironment(String executiveEnvironment) { + this.executiveEnvironment = executiveEnvironment; + } + + public String getExecutiveItem() { + return executiveItem; + } + + public void setExecutiveItem(String executiveItem) { + this.executiveItem = executiveItem; + } + + public String getHazardSourceAndPreventionMethod() { + return hazardSourceAndPreventionMethod; + } + + public void setHazardSourceAndPreventionMethod(String hazardSourceAndPreventionMethod) { + this.hazardSourceAndPreventionMethod = hazardSourceAndPreventionMethod; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public List getMeterStaffList() { + return meterStaffList; + } + + public void setMeterStaffList(List meterStaffList) { + this.meterStaffList = meterStaffList; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public String getPreCost() { + return preCost; + } + + public void setPreCost(String preCost) { + this.preCost = preCost; + } + + public String getPreEndTime() { + return preEndTime; + } + + public void setPreEndTime(String preEndTime) { + this.preEndTime = preEndTime; + } + + public String getPreStartTime() { + return preStartTime; + } + + public void setPreStartTime(String preStartTime) { + this.preStartTime = preStartTime; + } + + public String getProcessId() { + return processId; + } + + public void setProcessId(String processId) { + this.processId = processId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSiteExecutiveName() { + return siteExecutiveName; + } + + public void setSiteExecutiveName(String siteExecutiveName) { + this.siteExecutiveName = siteExecutiveName; + } + + public String getSiteExecutiveNo() { + return siteExecutiveNo; + } + + public void setSiteExecutiveNo(String siteExecutiveNo) { + this.siteExecutiveNo = siteExecutiveNo; + } + + public String getTaskSource() { + return taskSource; + } + + public void setTaskSource(String taskSource) { + this.taskSource = taskSource; + } + + public String getTaskSourceName() { + return taskSourceName; + } + + public void setTaskSourceName(String taskSourceName) { + this.taskSourceName = taskSourceName; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public static class EquipmentInfoListModel { + private String abc; + private String abcName; + private String applyRelationId; + private String assetNo; + private String assetSource; + private String assetType; + private String assetTypeName; + private String attribute; + private String capitalSource; + private String capitalSourceName; + private String cardEstablishmentDate; + private String compulsoryVerification; + private String createTime; + private String createUser; + private String depreciationMethod; + private String depreciationMethodName; + private String depreciationPeriod; + private String enableDate; + private String equipmentCategory; + private String equipmentCategoryName; + private String equipmentName; + private String equipmentNo; + private String equipmentSpecifications; + private String equipmentType; + private String equipmentTypeName; + private String fileList; + private String id; + private String installIncidentalExpenses; + private String installPlace; + private String intactState; + private String isCalibrationTestEquipment; + private String isDel; + private String isFixedAssets; + private String isMeasureAccount; + private String isStandardSupportEquipment; + private String labelBind; + private String majorCategory; + private String majorCategoryName; + private String managerLevel; + private String managerLevelName; + private String managerState; + private String managerStateName; + private String manufacturer; + private String manufacturerCountry; + private String manufacturingDate; + private String manufacturingNo; + private String mesureCycle; + private String mesureDate; + private String mesureDept; + private String mesureRange; + private String mesureResult; + private String mesureResultName; + private String mesureType; + private String mesureTypeName; + private String modelNo; + private String originValue; + private String overallDimension; + private String presentOriginValue; + private String purpose; + private String remark; + private String singlePrice; + private String supportStandardEquipmentName; + private String supportStandardEquipmentNo; + private String technicalLevel; + private String uncertainty; + private String updateTime; + private String useDept; + private String useDeptName; + private String usePerson; + private String usePersonName; + private String validDate; + private String version; + private String weight; + + public String getAbc() { + return abc; + } + + public void setAbc(String abc) { + this.abc = abc; + } + + public String getAbcName() { + return abcName; + } + + public void setAbcName(String abcName) { + this.abcName = abcName; + } + + public String getApplyRelationId() { + return applyRelationId; + } + + public void setApplyRelationId(String applyRelationId) { + this.applyRelationId = applyRelationId; + } + + public String getAssetNo() { + return assetNo; + } + + public void setAssetNo(String assetNo) { + this.assetNo = assetNo; + } + + public String getAssetSource() { + return assetSource; + } + + public void setAssetSource(String assetSource) { + this.assetSource = assetSource; + } + + public String getAssetType() { + return assetType; + } + + public void setAssetType(String assetType) { + this.assetType = assetType; + } + + public String getAssetTypeName() { + return assetTypeName; + } + + public void setAssetTypeName(String assetTypeName) { + this.assetTypeName = assetTypeName; + } + + public String getAttribute() { + return attribute; + } + + public void setAttribute(String attribute) { + this.attribute = attribute; + } + + public String getCapitalSource() { + return capitalSource; + } + + public void setCapitalSource(String capitalSource) { + this.capitalSource = capitalSource; + } + + public String getCapitalSourceName() { + return capitalSourceName; + } + + public void setCapitalSourceName(String capitalSourceName) { + this.capitalSourceName = capitalSourceName; + } + + public String getCardEstablishmentDate() { + return cardEstablishmentDate; + } + + public void setCardEstablishmentDate(String cardEstablishmentDate) { + this.cardEstablishmentDate = cardEstablishmentDate; + } + + public String getCompulsoryVerification() { + return compulsoryVerification; + } + + public void setCompulsoryVerification(String compulsoryVerification) { + this.compulsoryVerification = compulsoryVerification; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getDepreciationMethod() { + return depreciationMethod; + } + + public void setDepreciationMethod(String depreciationMethod) { + this.depreciationMethod = depreciationMethod; + } + + public String getDepreciationMethodName() { + return depreciationMethodName; + } + + public void setDepreciationMethodName(String depreciationMethodName) { + this.depreciationMethodName = depreciationMethodName; + } + + public String getDepreciationPeriod() { + return depreciationPeriod; + } + + public void setDepreciationPeriod(String depreciationPeriod) { + this.depreciationPeriod = depreciationPeriod; + } + + public String getEnableDate() { + return enableDate; + } + + public void setEnableDate(String enableDate) { + this.enableDate = enableDate; + } + + public String getEquipmentCategory() { + return equipmentCategory; + } + + public void setEquipmentCategory(String equipmentCategory) { + this.equipmentCategory = equipmentCategory; + } + + public String getEquipmentCategoryName() { + return equipmentCategoryName; + } + + public void setEquipmentCategoryName(String equipmentCategoryName) { + this.equipmentCategoryName = equipmentCategoryName; + } + + public String getEquipmentName() { + return equipmentName; + } + + public void setEquipmentName(String equipmentName) { + this.equipmentName = equipmentName; + } + + public String getEquipmentNo() { + return equipmentNo; + } + + public void setEquipmentNo(String equipmentNo) { + this.equipmentNo = equipmentNo; + } + + public String getEquipmentSpecifications() { + return equipmentSpecifications; + } + + public void setEquipmentSpecifications(String equipmentSpecifications) { + this.equipmentSpecifications = equipmentSpecifications; + } + + public String getEquipmentType() { + return equipmentType; + } + + public void setEquipmentType(String equipmentType) { + this.equipmentType = equipmentType; + } + + public String getEquipmentTypeName() { + return equipmentTypeName; + } + + public void setEquipmentTypeName(String equipmentTypeName) { + this.equipmentTypeName = equipmentTypeName; + } + + public String getFileList() { + return fileList; + } + + public void setFileList(String fileList) { + this.fileList = fileList; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getInstallIncidentalExpenses() { + return installIncidentalExpenses; + } + + public void setInstallIncidentalExpenses(String installIncidentalExpenses) { + this.installIncidentalExpenses = installIncidentalExpenses; + } + + public String getInstallPlace() { + return installPlace; + } + + public void setInstallPlace(String installPlace) { + this.installPlace = installPlace; + } + + public String getIntactState() { + return intactState; + } + + public void setIntactState(String intactState) { + this.intactState = intactState; + } + + public String getIsCalibrationTestEquipment() { + return isCalibrationTestEquipment; + } + + public void setIsCalibrationTestEquipment(String isCalibrationTestEquipment) { + this.isCalibrationTestEquipment = isCalibrationTestEquipment; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getIsFixedAssets() { + return isFixedAssets; + } + + public void setIsFixedAssets(String isFixedAssets) { + this.isFixedAssets = isFixedAssets; + } + + public String getIsMeasureAccount() { + return isMeasureAccount; + } + + public void setIsMeasureAccount(String isMeasureAccount) { + this.isMeasureAccount = isMeasureAccount; + } + + public String getIsStandardSupportEquipment() { + return isStandardSupportEquipment; + } + + public void setIsStandardSupportEquipment(String isStandardSupportEquipment) { + this.isStandardSupportEquipment = isStandardSupportEquipment; + } + + public String getLabelBind() { + return labelBind; + } + + public void setLabelBind(String labelBind) { + this.labelBind = labelBind; + } + + public String getMajorCategory() { + return majorCategory; + } + + public void setMajorCategory(String majorCategory) { + this.majorCategory = majorCategory; + } + + public String getMajorCategoryName() { + return majorCategoryName; + } + + public void setMajorCategoryName(String majorCategoryName) { + this.majorCategoryName = majorCategoryName; + } + + public String getManagerLevel() { + return managerLevel; + } + + public void setManagerLevel(String managerLevel) { + this.managerLevel = managerLevel; + } + + public String getManagerLevelName() { + return managerLevelName; + } + + public void setManagerLevelName(String managerLevelName) { + this.managerLevelName = managerLevelName; + } + + public String getManagerState() { + return managerState; + } + + public void setManagerState(String managerState) { + this.managerState = managerState; + } + + public String getManagerStateName() { + return managerStateName; + } + + public void setManagerStateName(String managerStateName) { + this.managerStateName = managerStateName; + } + + public String getManufacturer() { + return manufacturer; + } + + public void setManufacturer(String manufacturer) { + this.manufacturer = manufacturer; + } + + public String getManufacturerCountry() { + return manufacturerCountry; + } + + public void setManufacturerCountry(String manufacturerCountry) { + this.manufacturerCountry = manufacturerCountry; + } + + public String getManufacturingDate() { + return manufacturingDate; + } + + public void setManufacturingDate(String manufacturingDate) { + this.manufacturingDate = manufacturingDate; + } + + public String getManufacturingNo() { + return manufacturingNo; + } + + public void setManufacturingNo(String manufacturingNo) { + this.manufacturingNo = manufacturingNo; + } + + public String getMesureCycle() { + return mesureCycle; + } + + public void setMesureCycle(String mesureCycle) { + this.mesureCycle = mesureCycle; + } + + public String getMesureDate() { + return mesureDate; + } + + public void setMesureDate(String mesureDate) { + this.mesureDate = mesureDate; + } + + public String getMesureDept() { + return mesureDept; + } + + public void setMesureDept(String mesureDept) { + this.mesureDept = mesureDept; + } + + public String getMesureRange() { + return mesureRange; + } + + public void setMesureRange(String mesureRange) { + this.mesureRange = mesureRange; + } + + public String getMesureResult() { + return mesureResult; + } + + public void setMesureResult(String mesureResult) { + this.mesureResult = mesureResult; + } + + public String getMesureResultName() { + return mesureResultName; + } + + public void setMesureResultName(String mesureResultName) { + this.mesureResultName = mesureResultName; + } + + public String getMesureType() { + return mesureType; + } + + public void setMesureType(String mesureType) { + this.mesureType = mesureType; + } + + public String getMesureTypeName() { + return mesureTypeName; + } + + public void setMesureTypeName(String mesureTypeName) { + this.mesureTypeName = mesureTypeName; + } + + public String getModelNo() { + return modelNo; + } + + public void setModelNo(String modelNo) { + this.modelNo = modelNo; + } + + public String getOriginValue() { + return originValue; + } + + public void setOriginValue(String originValue) { + this.originValue = originValue; + } + + public String getOverallDimension() { + return overallDimension; + } + + public void setOverallDimension(String overallDimension) { + this.overallDimension = overallDimension; + } + + public String getPresentOriginValue() { + return presentOriginValue; + } + + public void setPresentOriginValue(String presentOriginValue) { + this.presentOriginValue = presentOriginValue; + } + + public String getPurpose() { + return purpose; + } + + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSinglePrice() { + return singlePrice; + } + + public void setSinglePrice(String singlePrice) { + this.singlePrice = singlePrice; + } + + public String getSupportStandardEquipmentName() { + return supportStandardEquipmentName; + } + + public void setSupportStandardEquipmentName(String supportStandardEquipmentName) { + this.supportStandardEquipmentName = supportStandardEquipmentName; + } + + public String getSupportStandardEquipmentNo() { + return supportStandardEquipmentNo; + } + + public void setSupportStandardEquipmentNo(String supportStandardEquipmentNo) { + this.supportStandardEquipmentNo = supportStandardEquipmentNo; + } + + public String getTechnicalLevel() { + return technicalLevel; + } + + public void setTechnicalLevel(String technicalLevel) { + this.technicalLevel = technicalLevel; + } + + public String getUncertainty() { + return uncertainty; + } + + public void setUncertainty(String uncertainty) { + this.uncertainty = uncertainty; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUseDept() { + return useDept; + } + + public void setUseDept(String useDept) { + this.useDept = useDept; + } + + public String getUseDeptName() { + return useDeptName; + } + + public void setUseDeptName(String useDeptName) { + this.useDeptName = useDeptName; + } + + public String getUsePerson() { + return usePerson; + } + + public void setUsePerson(String usePerson) { + this.usePerson = usePerson; + } + + public String getUsePersonName() { + return usePersonName; + } + + public void setUsePersonName(String usePersonName) { + this.usePersonName = usePersonName; + } + + public String getValidDate() { + return validDate; + } + + public void setValidDate(String validDate) { + this.validDate = validDate; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getWeight() { + return weight; + } + + public void setWeight(String weight) { + this.weight = weight; + } + } + + public static class MeterStaffListModel { + private String account; + private String administrationJob; + private String birthday; + private String certificateCompany; + private String certificateDate; + private String certificateList; + private String createTime; + private String deptId; + private String deptName; + private String education; + private String id; + private String idCard; + private String isDel; + private String mainExaminer; + private String major; + private String minioFileName; + private String name; + private String remark; + private String sex; + private String specialOperator; + private String staffNo; + private String technologyExam; + private String technologyJob; + private String updateTime; + private String userId; + private String verifierCertificateNo; + private String workDate; + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getAdministrationJob() { + return administrationJob; + } + + public void setAdministrationJob(String administrationJob) { + this.administrationJob = administrationJob; + } + + public String getBirthday() { + return birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getCertificateCompany() { + return certificateCompany; + } + + public void setCertificateCompany(String certificateCompany) { + this.certificateCompany = certificateCompany; + } + + public String getCertificateDate() { + return certificateDate; + } + + public void setCertificateDate(String certificateDate) { + this.certificateDate = certificateDate; + } + + public String getCertificateList() { + return certificateList; + } + + public void setCertificateList(String certificateList) { + this.certificateList = certificateList; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getDeptId() { + return deptId; + } + + public void setDeptId(String deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getEducation() { + return education; + } + + public void setEducation(String education) { + this.education = education; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getMainExaminer() { + return mainExaminer; + } + + public void setMainExaminer(String mainExaminer) { + this.mainExaminer = mainExaminer; + } + + public String getMajor() { + return major; + } + + public void setMajor(String major) { + this.major = major; + } + + public String getMinioFileName() { + return minioFileName; + } + + public void setMinioFileName(String minioFileName) { + this.minioFileName = minioFileName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getSpecialOperator() { + return specialOperator; + } + + public void setSpecialOperator(String specialOperator) { + this.specialOperator = specialOperator; + } + + public String getStaffNo() { + return staffNo; + } + + public void setStaffNo(String staffNo) { + this.staffNo = staffNo; + } + + public String getTechnologyExam() { + return technologyExam; + } + + public void setTechnologyExam(String technologyExam) { + this.technologyExam = technologyExam; + } + + public String getTechnologyJob() { + return technologyJob; + } + + public void setTechnologyJob(String technologyJob) { + this.technologyJob = technologyJob; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getVerifierCertificateNo() { + return verifierCertificateNo; + } + + public void setVerifierCertificateNo(String verifierCertificateNo) { + this.verifierCertificateNo = verifierCertificateNo; + } + + public String getWorkDate() { + return workDate; + } + + public void setWorkDate(String workDate) { + this.workDate = workDate; + } + } + } +} diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt index 5bb091f..3b9791a 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt @@ -477,4 +477,13 @@ @QueryMap limit: Map, @QueryMap offset: Map ): String + + /** + * 获取现场检测详情 + */ + @POST("/business/siteExecutive/detail") + suspend fun getOutfieldDetectionDetail( + @Header("token") token: String, + @Body requestBody: RequestBody + ): String } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt index add9920..996d452 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt @@ -1094,4 +1094,16 @@ AuthenticationHelper.token!!, requestBody, limitMap, offsetMap ) } + + /** + * 获取现场检测详情 + */ + suspend fun getOutfieldDetectionDetail(id: String): String { + val param = JsonObject() + param.addProperty("id", id) + val requestBody = param.toString().toRequestBody( + "application/json;charset=UTF-8".toMediaType() + ) + return api.getOutfieldDetectionDetail(AuthenticationHelper.token!!, requestBody) + } } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt index 549b79a..3ba54dc 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt @@ -45,17 +45,23 @@ } outfieldDetectionViewModel = ViewModelProvider(this)[OutfieldDetectionViewModel::class.java] + outfieldDetectionViewModel.getOutfieldDetectionDetail(args[0]) + outfieldDetectionViewModel.outfieldDetectionDetail.observe(this) { + if (it.code == 200) { + val data = it.data!! - fragmentPages.add(BasicInformationFragment()) - fragmentPages.add(TaskExecutorFragment()) - fragmentPages.add(TaskDeviceFragment()) - fragmentPages.add(ApprovalLogFragment()) + fragmentPages.add(BasicInformationFragment(data)) + fragmentPages.add(TaskExecutorFragment(data.meterStaffList)) + fragmentPages.add(TaskDeviceFragment(data.equipmentInfoList)) + fragmentPages.add(ApprovalLogFragment()) - approvalViewPager.adapter = SubViewPagerAdapter( - supportFragmentManager, fragmentPages, pageTitles - ) - //绑定 - topTabLayout.setupWithViewPager(approvalViewPager) + approvalViewPager.adapter = SubViewPagerAdapter( + supportFragmentManager, fragmentPages, pageTitles + ) + //绑定 + topTabLayout.setupWithViewPager(approvalViewPager) + } + } } override fun observeRequestState() { diff --git a/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt b/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt index fbded6a..2a3ac27 100644 --- a/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt +++ b/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt @@ -4,6 +4,7 @@ import com.casic.xz.meterage.base.BaseApplication import com.casic.xz.meterage.extensions.separateResponseCode import com.casic.xz.meterage.extensions.toErrorMessage +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.casic.xz.meterage.model.OutfieldDetectionListModel import com.casic.xz.meterage.utils.retrofit.RetrofitServiceManager import com.google.gson.Gson @@ -20,6 +21,7 @@ private val gson by lazy { Gson() } val outfieldDetectionList = MutableLiveData() + val outfieldDetectionDetail = MutableLiveData() fun getOutfieldDetectionList( approvalStatus: String, @@ -47,4 +49,23 @@ it.cause.toString().show(BaseApplication.get()) it.printStackTrace() }) + + fun getOutfieldDetectionDetail(id: String) = launch({ + loadState.value = LoadState.Loading + val response = RetrofitServiceManager.getOutfieldDetectionDetail(id) + val responseCode = response.separateResponseCode() + if (responseCode == 200) { + loadState.value = LoadState.Success + outfieldDetectionDetail.value = gson.fromJson( + response, object : TypeToken() {}.type + ) + } else { + loadState.value = LoadState.Fail + response.toErrorMessage().show(BaseApplication.get()) + } + }, { + loadState.value = LoadState.Fail + it.cause.toString().show(BaseApplication.get()) + it.printStackTrace() + }) } \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_od_base_info.xml b/app/src/main/res/layout/fragment_od_base_info.xml index 77d9ef6..4e1b724 100644 --- a/app/src/main/res/layout/fragment_od_base_info.xml +++ b/app/src/main/res/layout/fragment_od_base_info.xml @@ -1,6 +1,198 @@ - + android:layout_height="match_parent" + android:background="@color/white"> - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_od_task_device.xml b/app/src/main/res/layout/fragment_od_task_device.xml index 77d9ef6..6ca5407 100644 --- a/app/src/main/res/layout/fragment_od_task_device.xml +++ b/app/src/main/res/layout/fragment_od_task_device.xml @@ -1,6 +1,13 @@ - + android:layout_height="match_parent" + android:background="@color/white"> - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt index 2acc9aa..f05e944 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/BasicInformationFragment.kt @@ -1,12 +1,28 @@ package com.casic.xz.meterage.fragment.outfield import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.pengxh.kt.lite.base.KotlinBaseFragment +import kotlinx.android.synthetic.main.fragment_od_base_info.* -class BasicInformationFragment : KotlinBaseFragment() { +class BasicInformationFragment(private val data: OutfieldDetectionDetailModel.DataModel) : + KotlinBaseFragment() { override fun initData() { - + odCodeView.text = data.siteExecutiveNo + odNameView.text = data.siteExecutiveName + directorNameView.text = data.directorName + applyTimeView.text = data.applyTime.formatToYearMonthDay() + taskSourceNameView.text = data.taskSourceName + linkageOrderCodeView.text = data.orderId + preCostView.text = "¥ ${data.preCost}" + preStartTimeView.text = data.preStartTime.formatToYearMonthDay() + preEndTimeView.text = data.preEndTime.formatToYearMonthDay() + executiveAddressView.text = data.executiveAddress + hazardSourceView.text = data.hazardSourceAndPreventionMethod + executiveItemView.text = data.executiveItem + remarkView.text = data.remark } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt index 823eed6..4bc3c79 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskDeviceFragment.kt @@ -1,12 +1,52 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_device.* -class TaskDeviceFragment : KotlinBaseFragment() { +class TaskDeviceFragment(private val devices: List) : + KotlinBaseFragment() { override fun initData() { + val supportAdapter = object : + NormalRecyclerAdapter( + R.layout.item_device_support_rv_l, devices + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.EquipmentInfoListModel + ) { + if (item.validDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + viewHolder.setText(R.id.nameTagView, item.equipmentName.last().toString()) + .setText(R.id.deviceNameView, item.equipmentName) + .setText(R.id.modelView, item.modelNo) + .setText(R.id.deviceCodeView, "设备编号:${item.equipmentNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.validDate.formatToYearMonthDay()}" + ) + } + } + supportRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + supportRecyclerView.adapter = supportAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt index ac68b19..8154212 100644 --- a/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt +++ b/app/src/main/java/com/casic/xz/meterage/fragment/outfield/TaskExecutorFragment.kt @@ -1,12 +1,58 @@ package com.casic.xz.meterage.fragment.outfield +import androidx.recyclerview.widget.DividerItemDecoration import com.casic.xz.meterage.R +import com.casic.xz.meterage.extensions.formatToYearMonthDay +import com.casic.xz.meterage.extensions.isEarlierThenCurrent +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel +import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter +import com.pengxh.kt.lite.adapter.ViewHolder import com.pengxh.kt.lite.base.KotlinBaseFragment +import com.pengxh.kt.lite.extensions.convertColor +import kotlinx.android.synthetic.main.fragment_od_task_executor.* -class TaskExecutorFragment : KotlinBaseFragment() { +class TaskExecutorFragment(private val executors: List) : + KotlinBaseFragment() { override fun initData() { + val staffAdapter = object : + NormalRecyclerAdapter( + R.layout.item_staff_rv_l, executors + ) { + override fun convertView( + viewHolder: ViewHolder, position: Int, + item: OutfieldDetectionDetailModel.DataModel.MeterStaffListModel + ) { + val useDept = if (item.deptName.isNullOrBlank()) { + "未知" + } else { + item.deptName + } + if (item.certificateDate.isEarlierThenCurrent()) { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.red.convertColor(requireContext()) + ) + } else { + viewHolder.setTextColor( + R.id.expirationDateView, R.color.gray.convertColor(requireContext()) + ) + } + + viewHolder.setText(R.id.nameTagView, item.name.last().toString()) + .setText(R.id.userNameView, item.name) + .setText(R.id.useDeptView, useDept) + .setText(R.id.certificateView, "证书编号:${item.verifierCertificateNo}") + .setText( + R.id.expirationDateView, + "有效期至:${item.certificateDate.formatToYearMonthDay()}" + ) + } + } + staffRecyclerView.addItemDecoration( + DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + ) + staffRecyclerView.adapter = staffAdapter } override fun initEvent() { diff --git a/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java new file mode 100644 index 0000000..f6530ca --- /dev/null +++ b/app/src/main/java/com/casic/xz/meterage/model/OutfieldDetectionDetailModel.java @@ -0,0 +1,1177 @@ +package com.casic.xz.meterage.model; + +import java.util.List; + +public class OutfieldDetectionDetailModel { + + private int code; + private DataModel data; + private String message; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataModel getData() { + return data; + } + + public void setData(DataModel data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public static class DataModel { + private String applyTime; + private String approvalStatus; + private String createTime; + private String createUser; + private String customerId; + private String directorId; + private String directorName; + private List equipmentInfoList; + private String executiveAddress; + private String executiveEnvironment; + private String executiveItem; + private String hazardSourceAndPreventionMethod; + private String id; + private String isDel; + private List meterStaffList; + private String orderId; + private String preCost; + private String preEndTime; + private String preStartTime; + private String processId; + private String remark; + private String siteExecutiveName; + private String siteExecutiveNo; + private String taskSource; + private String taskSourceName; + private String updateTime; + + public String getApplyTime() { + return applyTime; + } + + public void setApplyTime(String applyTime) { + this.applyTime = applyTime; + } + + public String getApprovalStatus() { + return approvalStatus; + } + + public void setApprovalStatus(String approvalStatus) { + this.approvalStatus = approvalStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getDirectorId() { + return directorId; + } + + public void setDirectorId(String directorId) { + this.directorId = directorId; + } + + public String getDirectorName() { + return directorName; + } + + public void setDirectorName(String directorName) { + this.directorName = directorName; + } + + public List getEquipmentInfoList() { + return equipmentInfoList; + } + + public void setEquipmentInfoList(List equipmentInfoList) { + this.equipmentInfoList = equipmentInfoList; + } + + public String getExecutiveAddress() { + return executiveAddress; + } + + public void setExecutiveAddress(String executiveAddress) { + this.executiveAddress = executiveAddress; + } + + public String getExecutiveEnvironment() { + return executiveEnvironment; + } + + public void setExecutiveEnvironment(String executiveEnvironment) { + this.executiveEnvironment = executiveEnvironment; + } + + public String getExecutiveItem() { + return executiveItem; + } + + public void setExecutiveItem(String executiveItem) { + this.executiveItem = executiveItem; + } + + public String getHazardSourceAndPreventionMethod() { + return hazardSourceAndPreventionMethod; + } + + public void setHazardSourceAndPreventionMethod(String hazardSourceAndPreventionMethod) { + this.hazardSourceAndPreventionMethod = hazardSourceAndPreventionMethod; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public List getMeterStaffList() { + return meterStaffList; + } + + public void setMeterStaffList(List meterStaffList) { + this.meterStaffList = meterStaffList; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public String getPreCost() { + return preCost; + } + + public void setPreCost(String preCost) { + this.preCost = preCost; + } + + public String getPreEndTime() { + return preEndTime; + } + + public void setPreEndTime(String preEndTime) { + this.preEndTime = preEndTime; + } + + public String getPreStartTime() { + return preStartTime; + } + + public void setPreStartTime(String preStartTime) { + this.preStartTime = preStartTime; + } + + public String getProcessId() { + return processId; + } + + public void setProcessId(String processId) { + this.processId = processId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSiteExecutiveName() { + return siteExecutiveName; + } + + public void setSiteExecutiveName(String siteExecutiveName) { + this.siteExecutiveName = siteExecutiveName; + } + + public String getSiteExecutiveNo() { + return siteExecutiveNo; + } + + public void setSiteExecutiveNo(String siteExecutiveNo) { + this.siteExecutiveNo = siteExecutiveNo; + } + + public String getTaskSource() { + return taskSource; + } + + public void setTaskSource(String taskSource) { + this.taskSource = taskSource; + } + + public String getTaskSourceName() { + return taskSourceName; + } + + public void setTaskSourceName(String taskSourceName) { + this.taskSourceName = taskSourceName; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public static class EquipmentInfoListModel { + private String abc; + private String abcName; + private String applyRelationId; + private String assetNo; + private String assetSource; + private String assetType; + private String assetTypeName; + private String attribute; + private String capitalSource; + private String capitalSourceName; + private String cardEstablishmentDate; + private String compulsoryVerification; + private String createTime; + private String createUser; + private String depreciationMethod; + private String depreciationMethodName; + private String depreciationPeriod; + private String enableDate; + private String equipmentCategory; + private String equipmentCategoryName; + private String equipmentName; + private String equipmentNo; + private String equipmentSpecifications; + private String equipmentType; + private String equipmentTypeName; + private String fileList; + private String id; + private String installIncidentalExpenses; + private String installPlace; + private String intactState; + private String isCalibrationTestEquipment; + private String isDel; + private String isFixedAssets; + private String isMeasureAccount; + private String isStandardSupportEquipment; + private String labelBind; + private String majorCategory; + private String majorCategoryName; + private String managerLevel; + private String managerLevelName; + private String managerState; + private String managerStateName; + private String manufacturer; + private String manufacturerCountry; + private String manufacturingDate; + private String manufacturingNo; + private String mesureCycle; + private String mesureDate; + private String mesureDept; + private String mesureRange; + private String mesureResult; + private String mesureResultName; + private String mesureType; + private String mesureTypeName; + private String modelNo; + private String originValue; + private String overallDimension; + private String presentOriginValue; + private String purpose; + private String remark; + private String singlePrice; + private String supportStandardEquipmentName; + private String supportStandardEquipmentNo; + private String technicalLevel; + private String uncertainty; + private String updateTime; + private String useDept; + private String useDeptName; + private String usePerson; + private String usePersonName; + private String validDate; + private String version; + private String weight; + + public String getAbc() { + return abc; + } + + public void setAbc(String abc) { + this.abc = abc; + } + + public String getAbcName() { + return abcName; + } + + public void setAbcName(String abcName) { + this.abcName = abcName; + } + + public String getApplyRelationId() { + return applyRelationId; + } + + public void setApplyRelationId(String applyRelationId) { + this.applyRelationId = applyRelationId; + } + + public String getAssetNo() { + return assetNo; + } + + public void setAssetNo(String assetNo) { + this.assetNo = assetNo; + } + + public String getAssetSource() { + return assetSource; + } + + public void setAssetSource(String assetSource) { + this.assetSource = assetSource; + } + + public String getAssetType() { + return assetType; + } + + public void setAssetType(String assetType) { + this.assetType = assetType; + } + + public String getAssetTypeName() { + return assetTypeName; + } + + public void setAssetTypeName(String assetTypeName) { + this.assetTypeName = assetTypeName; + } + + public String getAttribute() { + return attribute; + } + + public void setAttribute(String attribute) { + this.attribute = attribute; + } + + public String getCapitalSource() { + return capitalSource; + } + + public void setCapitalSource(String capitalSource) { + this.capitalSource = capitalSource; + } + + public String getCapitalSourceName() { + return capitalSourceName; + } + + public void setCapitalSourceName(String capitalSourceName) { + this.capitalSourceName = capitalSourceName; + } + + public String getCardEstablishmentDate() { + return cardEstablishmentDate; + } + + public void setCardEstablishmentDate(String cardEstablishmentDate) { + this.cardEstablishmentDate = cardEstablishmentDate; + } + + public String getCompulsoryVerification() { + return compulsoryVerification; + } + + public void setCompulsoryVerification(String compulsoryVerification) { + this.compulsoryVerification = compulsoryVerification; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public String getDepreciationMethod() { + return depreciationMethod; + } + + public void setDepreciationMethod(String depreciationMethod) { + this.depreciationMethod = depreciationMethod; + } + + public String getDepreciationMethodName() { + return depreciationMethodName; + } + + public void setDepreciationMethodName(String depreciationMethodName) { + this.depreciationMethodName = depreciationMethodName; + } + + public String getDepreciationPeriod() { + return depreciationPeriod; + } + + public void setDepreciationPeriod(String depreciationPeriod) { + this.depreciationPeriod = depreciationPeriod; + } + + public String getEnableDate() { + return enableDate; + } + + public void setEnableDate(String enableDate) { + this.enableDate = enableDate; + } + + public String getEquipmentCategory() { + return equipmentCategory; + } + + public void setEquipmentCategory(String equipmentCategory) { + this.equipmentCategory = equipmentCategory; + } + + public String getEquipmentCategoryName() { + return equipmentCategoryName; + } + + public void setEquipmentCategoryName(String equipmentCategoryName) { + this.equipmentCategoryName = equipmentCategoryName; + } + + public String getEquipmentName() { + return equipmentName; + } + + public void setEquipmentName(String equipmentName) { + this.equipmentName = equipmentName; + } + + public String getEquipmentNo() { + return equipmentNo; + } + + public void setEquipmentNo(String equipmentNo) { + this.equipmentNo = equipmentNo; + } + + public String getEquipmentSpecifications() { + return equipmentSpecifications; + } + + public void setEquipmentSpecifications(String equipmentSpecifications) { + this.equipmentSpecifications = equipmentSpecifications; + } + + public String getEquipmentType() { + return equipmentType; + } + + public void setEquipmentType(String equipmentType) { + this.equipmentType = equipmentType; + } + + public String getEquipmentTypeName() { + return equipmentTypeName; + } + + public void setEquipmentTypeName(String equipmentTypeName) { + this.equipmentTypeName = equipmentTypeName; + } + + public String getFileList() { + return fileList; + } + + public void setFileList(String fileList) { + this.fileList = fileList; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getInstallIncidentalExpenses() { + return installIncidentalExpenses; + } + + public void setInstallIncidentalExpenses(String installIncidentalExpenses) { + this.installIncidentalExpenses = installIncidentalExpenses; + } + + public String getInstallPlace() { + return installPlace; + } + + public void setInstallPlace(String installPlace) { + this.installPlace = installPlace; + } + + public String getIntactState() { + return intactState; + } + + public void setIntactState(String intactState) { + this.intactState = intactState; + } + + public String getIsCalibrationTestEquipment() { + return isCalibrationTestEquipment; + } + + public void setIsCalibrationTestEquipment(String isCalibrationTestEquipment) { + this.isCalibrationTestEquipment = isCalibrationTestEquipment; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getIsFixedAssets() { + return isFixedAssets; + } + + public void setIsFixedAssets(String isFixedAssets) { + this.isFixedAssets = isFixedAssets; + } + + public String getIsMeasureAccount() { + return isMeasureAccount; + } + + public void setIsMeasureAccount(String isMeasureAccount) { + this.isMeasureAccount = isMeasureAccount; + } + + public String getIsStandardSupportEquipment() { + return isStandardSupportEquipment; + } + + public void setIsStandardSupportEquipment(String isStandardSupportEquipment) { + this.isStandardSupportEquipment = isStandardSupportEquipment; + } + + public String getLabelBind() { + return labelBind; + } + + public void setLabelBind(String labelBind) { + this.labelBind = labelBind; + } + + public String getMajorCategory() { + return majorCategory; + } + + public void setMajorCategory(String majorCategory) { + this.majorCategory = majorCategory; + } + + public String getMajorCategoryName() { + return majorCategoryName; + } + + public void setMajorCategoryName(String majorCategoryName) { + this.majorCategoryName = majorCategoryName; + } + + public String getManagerLevel() { + return managerLevel; + } + + public void setManagerLevel(String managerLevel) { + this.managerLevel = managerLevel; + } + + public String getManagerLevelName() { + return managerLevelName; + } + + public void setManagerLevelName(String managerLevelName) { + this.managerLevelName = managerLevelName; + } + + public String getManagerState() { + return managerState; + } + + public void setManagerState(String managerState) { + this.managerState = managerState; + } + + public String getManagerStateName() { + return managerStateName; + } + + public void setManagerStateName(String managerStateName) { + this.managerStateName = managerStateName; + } + + public String getManufacturer() { + return manufacturer; + } + + public void setManufacturer(String manufacturer) { + this.manufacturer = manufacturer; + } + + public String getManufacturerCountry() { + return manufacturerCountry; + } + + public void setManufacturerCountry(String manufacturerCountry) { + this.manufacturerCountry = manufacturerCountry; + } + + public String getManufacturingDate() { + return manufacturingDate; + } + + public void setManufacturingDate(String manufacturingDate) { + this.manufacturingDate = manufacturingDate; + } + + public String getManufacturingNo() { + return manufacturingNo; + } + + public void setManufacturingNo(String manufacturingNo) { + this.manufacturingNo = manufacturingNo; + } + + public String getMesureCycle() { + return mesureCycle; + } + + public void setMesureCycle(String mesureCycle) { + this.mesureCycle = mesureCycle; + } + + public String getMesureDate() { + return mesureDate; + } + + public void setMesureDate(String mesureDate) { + this.mesureDate = mesureDate; + } + + public String getMesureDept() { + return mesureDept; + } + + public void setMesureDept(String mesureDept) { + this.mesureDept = mesureDept; + } + + public String getMesureRange() { + return mesureRange; + } + + public void setMesureRange(String mesureRange) { + this.mesureRange = mesureRange; + } + + public String getMesureResult() { + return mesureResult; + } + + public void setMesureResult(String mesureResult) { + this.mesureResult = mesureResult; + } + + public String getMesureResultName() { + return mesureResultName; + } + + public void setMesureResultName(String mesureResultName) { + this.mesureResultName = mesureResultName; + } + + public String getMesureType() { + return mesureType; + } + + public void setMesureType(String mesureType) { + this.mesureType = mesureType; + } + + public String getMesureTypeName() { + return mesureTypeName; + } + + public void setMesureTypeName(String mesureTypeName) { + this.mesureTypeName = mesureTypeName; + } + + public String getModelNo() { + return modelNo; + } + + public void setModelNo(String modelNo) { + this.modelNo = modelNo; + } + + public String getOriginValue() { + return originValue; + } + + public void setOriginValue(String originValue) { + this.originValue = originValue; + } + + public String getOverallDimension() { + return overallDimension; + } + + public void setOverallDimension(String overallDimension) { + this.overallDimension = overallDimension; + } + + public String getPresentOriginValue() { + return presentOriginValue; + } + + public void setPresentOriginValue(String presentOriginValue) { + this.presentOriginValue = presentOriginValue; + } + + public String getPurpose() { + return purpose; + } + + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSinglePrice() { + return singlePrice; + } + + public void setSinglePrice(String singlePrice) { + this.singlePrice = singlePrice; + } + + public String getSupportStandardEquipmentName() { + return supportStandardEquipmentName; + } + + public void setSupportStandardEquipmentName(String supportStandardEquipmentName) { + this.supportStandardEquipmentName = supportStandardEquipmentName; + } + + public String getSupportStandardEquipmentNo() { + return supportStandardEquipmentNo; + } + + public void setSupportStandardEquipmentNo(String supportStandardEquipmentNo) { + this.supportStandardEquipmentNo = supportStandardEquipmentNo; + } + + public String getTechnicalLevel() { + return technicalLevel; + } + + public void setTechnicalLevel(String technicalLevel) { + this.technicalLevel = technicalLevel; + } + + public String getUncertainty() { + return uncertainty; + } + + public void setUncertainty(String uncertainty) { + this.uncertainty = uncertainty; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUseDept() { + return useDept; + } + + public void setUseDept(String useDept) { + this.useDept = useDept; + } + + public String getUseDeptName() { + return useDeptName; + } + + public void setUseDeptName(String useDeptName) { + this.useDeptName = useDeptName; + } + + public String getUsePerson() { + return usePerson; + } + + public void setUsePerson(String usePerson) { + this.usePerson = usePerson; + } + + public String getUsePersonName() { + return usePersonName; + } + + public void setUsePersonName(String usePersonName) { + this.usePersonName = usePersonName; + } + + public String getValidDate() { + return validDate; + } + + public void setValidDate(String validDate) { + this.validDate = validDate; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getWeight() { + return weight; + } + + public void setWeight(String weight) { + this.weight = weight; + } + } + + public static class MeterStaffListModel { + private String account; + private String administrationJob; + private String birthday; + private String certificateCompany; + private String certificateDate; + private String certificateList; + private String createTime; + private String deptId; + private String deptName; + private String education; + private String id; + private String idCard; + private String isDel; + private String mainExaminer; + private String major; + private String minioFileName; + private String name; + private String remark; + private String sex; + private String specialOperator; + private String staffNo; + private String technologyExam; + private String technologyJob; + private String updateTime; + private String userId; + private String verifierCertificateNo; + private String workDate; + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getAdministrationJob() { + return administrationJob; + } + + public void setAdministrationJob(String administrationJob) { + this.administrationJob = administrationJob; + } + + public String getBirthday() { + return birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getCertificateCompany() { + return certificateCompany; + } + + public void setCertificateCompany(String certificateCompany) { + this.certificateCompany = certificateCompany; + } + + public String getCertificateDate() { + return certificateDate; + } + + public void setCertificateDate(String certificateDate) { + this.certificateDate = certificateDate; + } + + public String getCertificateList() { + return certificateList; + } + + public void setCertificateList(String certificateList) { + this.certificateList = certificateList; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getDeptId() { + return deptId; + } + + public void setDeptId(String deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getEducation() { + return education; + } + + public void setEducation(String education) { + this.education = education; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard; + } + + public String getIsDel() { + return isDel; + } + + public void setIsDel(String isDel) { + this.isDel = isDel; + } + + public String getMainExaminer() { + return mainExaminer; + } + + public void setMainExaminer(String mainExaminer) { + this.mainExaminer = mainExaminer; + } + + public String getMajor() { + return major; + } + + public void setMajor(String major) { + this.major = major; + } + + public String getMinioFileName() { + return minioFileName; + } + + public void setMinioFileName(String minioFileName) { + this.minioFileName = minioFileName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getSpecialOperator() { + return specialOperator; + } + + public void setSpecialOperator(String specialOperator) { + this.specialOperator = specialOperator; + } + + public String getStaffNo() { + return staffNo; + } + + public void setStaffNo(String staffNo) { + this.staffNo = staffNo; + } + + public String getTechnologyExam() { + return technologyExam; + } + + public void setTechnologyExam(String technologyExam) { + this.technologyExam = technologyExam; + } + + public String getTechnologyJob() { + return technologyJob; + } + + public void setTechnologyJob(String technologyJob) { + this.technologyJob = technologyJob; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getVerifierCertificateNo() { + return verifierCertificateNo; + } + + public void setVerifierCertificateNo(String verifierCertificateNo) { + this.verifierCertificateNo = verifierCertificateNo; + } + + public String getWorkDate() { + return workDate; + } + + public void setWorkDate(String workDate) { + this.workDate = workDate; + } + } + } +} diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt index 5bb091f..3b9791a 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitService.kt @@ -477,4 +477,13 @@ @QueryMap limit: Map, @QueryMap offset: Map ): String + + /** + * 获取现场检测详情 + */ + @POST("/business/siteExecutive/detail") + suspend fun getOutfieldDetectionDetail( + @Header("token") token: String, + @Body requestBody: RequestBody + ): String } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt index add9920..996d452 100644 --- a/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt +++ b/app/src/main/java/com/casic/xz/meterage/utils/retrofit/RetrofitServiceManager.kt @@ -1094,4 +1094,16 @@ AuthenticationHelper.token!!, requestBody, limitMap, offsetMap ) } + + /** + * 获取现场检测详情 + */ + suspend fun getOutfieldDetectionDetail(id: String): String { + val param = JsonObject() + param.addProperty("id", id) + val requestBody = param.toString().toRequestBody( + "application/json;charset=UTF-8".toMediaType() + ) + return api.getOutfieldDetectionDetail(AuthenticationHelper.token!!, requestBody) + } } \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt index 549b79a..3ba54dc 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/OutfieldDetectionDetailActivity.kt @@ -45,17 +45,23 @@ } outfieldDetectionViewModel = ViewModelProvider(this)[OutfieldDetectionViewModel::class.java] + outfieldDetectionViewModel.getOutfieldDetectionDetail(args[0]) + outfieldDetectionViewModel.outfieldDetectionDetail.observe(this) { + if (it.code == 200) { + val data = it.data!! - fragmentPages.add(BasicInformationFragment()) - fragmentPages.add(TaskExecutorFragment()) - fragmentPages.add(TaskDeviceFragment()) - fragmentPages.add(ApprovalLogFragment()) + fragmentPages.add(BasicInformationFragment(data)) + fragmentPages.add(TaskExecutorFragment(data.meterStaffList)) + fragmentPages.add(TaskDeviceFragment(data.equipmentInfoList)) + fragmentPages.add(ApprovalLogFragment()) - approvalViewPager.adapter = SubViewPagerAdapter( - supportFragmentManager, fragmentPages, pageTitles - ) - //绑定 - topTabLayout.setupWithViewPager(approvalViewPager) + approvalViewPager.adapter = SubViewPagerAdapter( + supportFragmentManager, fragmentPages, pageTitles + ) + //绑定 + topTabLayout.setupWithViewPager(approvalViewPager) + } + } } override fun observeRequestState() { diff --git a/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt b/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt index fbded6a..2a3ac27 100644 --- a/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt +++ b/app/src/main/java/com/casic/xz/meterage/vm/OutfieldDetectionViewModel.kt @@ -4,6 +4,7 @@ import com.casic.xz.meterage.base.BaseApplication import com.casic.xz.meterage.extensions.separateResponseCode import com.casic.xz.meterage.extensions.toErrorMessage +import com.casic.xz.meterage.model.OutfieldDetectionDetailModel import com.casic.xz.meterage.model.OutfieldDetectionListModel import com.casic.xz.meterage.utils.retrofit.RetrofitServiceManager import com.google.gson.Gson @@ -20,6 +21,7 @@ private val gson by lazy { Gson() } val outfieldDetectionList = MutableLiveData() + val outfieldDetectionDetail = MutableLiveData() fun getOutfieldDetectionList( approvalStatus: String, @@ -47,4 +49,23 @@ it.cause.toString().show(BaseApplication.get()) it.printStackTrace() }) + + fun getOutfieldDetectionDetail(id: String) = launch({ + loadState.value = LoadState.Loading + val response = RetrofitServiceManager.getOutfieldDetectionDetail(id) + val responseCode = response.separateResponseCode() + if (responseCode == 200) { + loadState.value = LoadState.Success + outfieldDetectionDetail.value = gson.fromJson( + response, object : TypeToken() {}.type + ) + } else { + loadState.value = LoadState.Fail + response.toErrorMessage().show(BaseApplication.get()) + } + }, { + loadState.value = LoadState.Fail + it.cause.toString().show(BaseApplication.get()) + it.printStackTrace() + }) } \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_od_base_info.xml b/app/src/main/res/layout/fragment_od_base_info.xml index 77d9ef6..4e1b724 100644 --- a/app/src/main/res/layout/fragment_od_base_info.xml +++ b/app/src/main/res/layout/fragment_od_base_info.xml @@ -1,6 +1,198 @@ - + android:layout_height="match_parent" + android:background="@color/white"> - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_od_task_device.xml b/app/src/main/res/layout/fragment_od_task_device.xml index 77d9ef6..6ca5407 100644 --- a/app/src/main/res/layout/fragment_od_task_device.xml +++ b/app/src/main/res/layout/fragment_od_task_device.xml @@ -1,6 +1,13 @@ - + android:layout_height="match_parent" + android:background="@color/white"> - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_od_task_executor.xml b/app/src/main/res/layout/fragment_od_task_executor.xml index 77d9ef6..b4855f5 100644 --- a/app/src/main/res/layout/fragment_od_task_executor.xml +++ b/app/src/main/res/layout/fragment_od_task_executor.xml @@ -1,6 +1,13 @@ - + android:layout_height="match_parent" + android:background="@color/white"> - \ No newline at end of file + + \ No newline at end of file