提交 0fd69b78 authored 作者: lgd's avatar lgd

1.检修详情

上级 4cb61ed7
...@@ -1569,7 +1569,6 @@ ...@@ -1569,7 +1569,6 @@
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity <activity
android:name=".ui.activity.mes.order.MesOrderActivity" android:name=".ui.activity.mes.order.MesOrderActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
...@@ -2184,6 +2183,23 @@ ...@@ -2184,6 +2183,23 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.ServiceCheckDetailActivity"
android:configChanges="keyboardHidden|orientation"
android:label="点检详情"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.ServiceDetailActivity"
android:configChanges="keyboardHidden|orientation"
android:label="检修详情"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="com.wd.workoffice.fileprovider" android:authorities="com.wd.workoffice.fileprovider"
......
package com.wd.workoffice.bean.mesBean;
import com.wd.workoffice.app.BaseMesPageBean;
import java.util.List;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesServiceBillBean extends BaseMesPageBean {
private List<ListBean> list;
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public static class ListBean {
/**
* id : 06310adb6cc147ddb862b6d3da293dbc
* inspoId : b2016a5ca3b611ea8334fa163e1166bd
* assetId : null
* assetDesc : null
* locationId : null
* locaDesc : null
* description : 1
*/
private String id;
private String inspoId;
private Object assetId;
private Object assetDesc;
private Object locationId;
private Object locaDesc;
private String description;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getInspoId() {
return inspoId;
}
public void setInspoId(String inspoId) {
this.inspoId = inspoId;
}
public Object getAssetId() {
return assetId;
}
public void setAssetId(Object assetId) {
this.assetId = assetId;
}
public Object getAssetDesc() {
return assetDesc;
}
public void setAssetDesc(Object assetDesc) {
this.assetDesc = assetDesc;
}
public Object getLocationId() {
return locationId;
}
public void setLocationId(Object locationId) {
this.locationId = locationId;
}
public Object getLocaDesc() {
return locaDesc;
}
public void setLocaDesc(Object locaDesc) {
this.locaDesc = locaDesc;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}
}
package com.wd.workoffice.bean.mesBean;
import com.wd.workoffice.app.BaseMesPageBean;
import java.util.List;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesServiceCheckBillBean extends BaseMesPageBean {
/**
* pageNum : 1
* pageSize : 10
* size : 0
* startRow : 0
* endRow : 0
* total : 13
* pages : 0
* list : [{"id":"151aafa508a04a51a4b50c5c0d0ca0c8","createDateTime":null,"updateDateTime":null,"billId":"697eccdb9e5f11ea8334fa163e1166bd","assetId":null,"locationId":"96120392311011ea8334fa163e1166bd","spotCheckProject":"1","createby":null,"changeby":null,"delete":false,"astLocations":null,"astAsset":null,"assetCode":null,"assetName":null,"locationName":"铝碳"},{"id":"67a73e51c4b34a81979dd26a5bd7c321","createDateTime":null,"updateDateTime":null,"billId":"697eccdb9e5f11ea8334fa163e1166bd","assetId":null,"locationId":"7a9859d810e611ea8334fa163e1166bd","spotCheckProject":"1","createby":null,"changeby":null,"delete":false,"astLocations":null,"astAsset":null,"assetCode":null,"assetName":null,"locationName":"正望股份"},{"id":"e7445acbd6c54a53921e41aecd03d932","createDateTime":null,"updateDateTime":null,"billId":"697eccdb9e5f11ea8334fa163e1166bd","assetId":null,"locationId":"7a9859d810e611ea8334fa163e1166bd","spotCheckProject":"1","createby":null,"changeby":null,"delete":false,"astLocations":null,"astAsset":null,"assetCode":null,"assetName":null,"locationName":"正望股份"},{"id":"48879c3bab0b4b55a754e7fb95767398","createDateTime":null,"updateDateTime":null,"billId":"697eccdb9e5f11ea8334fa163e1166bd","assetId":null,"locationId":"7a9859d810e611ea8334fa163e1166bd","spotCheckProject":"1","createby":null,"changeby":null,"delete":false,"astLocations":null,"astAsset":null,"assetCode":null,"assetName":null,"locationName":"正望股份"},{"id":"e40cd4b4c7bb4b66a13c16c07258f8c4","createDateTime":null,"updateDateTime":null,"billId":"697eccdb9e5f11ea8334fa163e1166bd","assetId":null,"locationId":"7a9859d810e611ea8334fa163e1166bd","spotCheckProject":"1","createby":null,"changeby":null,"delete":false,"astLocations":null,"astAsset":null,"assetCode":null,"assetName":null,"locationName":"正望股份"},{"id":"3834c56dfd004c239e990c41bfe8d988","createDateTime":null,"updateDateTime":null,"billId":"697eccdb9e5f11ea8334fa163e1166bd","assetId":null,"locationId":"7a9859d810e611ea8334fa163e1166bd","spotCheckProject":"1","createby":null,"changeby":null,"delete":false,"astLocations":null,"astAsset":null,"assetCode":null,"assetName":null,"locationName":"正望股份"},{"id":"dbadb77b0dc140d5a267690c4c673cfe","createDateTime":null,"updateDateTime":null,"billId":"697eccdb9e5f11ea8334fa163e1166bd","assetId":null,"locationId":"7a9859d810e611ea8334fa163e1166bd","spotCheckProject":"1","createby":null,"changeby":null,"delete":false,"astLocations":null,"astAsset":null,"assetCode":null,"assetName":null,"locationName":"正望股份"},{"id":"198dd6dbfaa042e49a23621b50a68c75","createDateTime":null,"updateDateTime":null,"billId":"697eccdb9e5f11ea8334fa163e1166bd","assetId":null,"locationId":"7a9859d810e611ea8334fa163e1166bd","spotCheckProject":"1","createby":null,"changeby":null,"delete":false,"astLocations":null,"astAsset":null,"assetCode":null,"assetName":null,"locationName":"正望股份"},{"id":"891d6b7c51ae4c88bfa2fb931c70b5ef","createDateTime":null,"updateDateTime":null,"billId":"697eccdb9e5f11ea8334fa163e1166bd","assetId":null,"locationId":"7a9859d810e611ea8334fa163e1166bd","spotCheckProject":"1","createby":null,"changeby":null,"delete":false,"astLocations":null,"astAsset":null,"assetCode":null,"assetName":null,"locationName":"正望股份"},{"id":"17663ff0683c4259b2c8400e89e589a6","createDateTime":null,"updateDateTime":null,"billId":"697eccdb9e5f11ea8334fa163e1166bd","assetId":null,"locationId":"7a9859d810e611ea8334fa163e1166bd","spotCheckProject":"1","createby":null,"changeby":null,"delete":false,"astLocations":null,"astAsset":null,"assetCode":null,"assetName":null,"locationName":"正望股份"}]
* prePage : 0
* nextPage : 0
* isFirstPage : false
* isLastPage : false
* hasPreviousPage : false
* hasNextPage : false
* navigatePages : 0
* navigatepageNums : null
* navigateFirstPage : 0
* navigateLastPage : 0
* lastPage : 0
* firstPage : 0
*/
private List<ListBean> list;
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public static class ListBean {
/**
* id : 151aafa508a04a51a4b50c5c0d0ca0c8
* createDateTime : null
* updateDateTime : null
* billId : 697eccdb9e5f11ea8334fa163e1166bd
* assetId : null
* locationId : 96120392311011ea8334fa163e1166bd
* spotCheckProject : 1
* createby : null
* changeby : null
* delete : false
* astLocations : null
* astAsset : null
* assetCode : null
* assetName : null
* locationName : 铝碳
*/
private String id;
private Object createDateTime;
private Object updateDateTime;
private String billId;
private Object assetId;
private String locationId;
private String spotCheckProject;
private Object createby;
private Object changeby;
private boolean delete;
private Object astLocations;
private Object astAsset;
private Object assetCode;
private String assetName;
private String locationName;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Object getCreateDateTime() {
return createDateTime;
}
public void setCreateDateTime(Object createDateTime) {
this.createDateTime = createDateTime;
}
public Object getUpdateDateTime() {
return updateDateTime;
}
public void setUpdateDateTime(Object updateDateTime) {
this.updateDateTime = updateDateTime;
}
public String getBillId() {
return billId;
}
public void setBillId(String billId) {
this.billId = billId;
}
public Object getAssetId() {
return assetId;
}
public void setAssetId(Object assetId) {
this.assetId = assetId;
}
public String getLocationId() {
return locationId;
}
public void setLocationId(String locationId) {
this.locationId = locationId;
}
public String getSpotCheckProject() {
return spotCheckProject;
}
public void setSpotCheckProject(String spotCheckProject) {
this.spotCheckProject = spotCheckProject;
}
public Object getCreateby() {
return createby;
}
public void setCreateby(Object createby) {
this.createby = createby;
}
public Object getChangeby() {
return changeby;
}
public void setChangeby(Object changeby) {
this.changeby = changeby;
}
public boolean isDelete() {
return delete;
}
public void setDelete(boolean delete) {
this.delete = delete;
}
public Object getAstLocations() {
return astLocations;
}
public void setAstLocations(Object astLocations) {
this.astLocations = astLocations;
}
public Object getAstAsset() {
return astAsset;
}
public void setAstAsset(Object astAsset) {
this.astAsset = astAsset;
}
public Object getAssetCode() {
return assetCode;
}
public void setAssetCode(Object assetCode) {
this.assetCode = assetCode;
}
public String getAssetName() {
return assetName;
}
public void setAssetName(String assetName) {
this.assetName = assetName;
}
public String getLocationName() {
return locationName;
}
public void setLocationName(String locationName) {
this.locationName = locationName;
}
}
}
...@@ -89,7 +89,7 @@ public class ServiceBean extends BaseMesPageBean { ...@@ -89,7 +89,7 @@ public class ServiceBean extends BaseMesPageBean {
private String id; private String id;
private String planId; private String planId;
private String inspoCode; private String inspoCode;
private Object description; private String description;
private Object remark; private Object remark;
private Object inspoType; private Object inspoType;
private int appType; private int appType;
...@@ -149,11 +149,11 @@ public class ServiceBean extends BaseMesPageBean { ...@@ -149,11 +149,11 @@ public class ServiceBean extends BaseMesPageBean {
this.inspoCode = inspoCode; this.inspoCode = inspoCode;
} }
public Object getDescription() { public String getDescription() {
return description; return description;
} }
public void setDescription(Object description) { public void setDescription(String description) {
this.description = description; this.description = description;
} }
......
...@@ -176,7 +176,6 @@ public interface MesApiService { ...@@ -176,7 +176,6 @@ public interface MesApiService {
Observable<BaseMesBean> upload(@Part MultipartBody.Part file); Observable<BaseMesBean> upload(@Part MultipartBody.Part file);
/** /**
*
* @return * @return
*/ */
@POST("/himes/api/msSceneFeedback/show/page.json") @POST("/himes/api/msSceneFeedback/show/page.json")
...@@ -229,7 +228,7 @@ public interface MesApiService { ...@@ -229,7 +228,7 @@ public interface MesApiService {
* @return * @return
*/ */
@GET("/himes/api/msContinuousProducts/delete/{id}.json") @GET("/himes/api/msContinuousProducts/delete/{id}.json")
Observable<BaseMesBean> threeDelete(@Path("id") String id,@Query("functionId") String functionId); Observable<BaseMesBean> threeDelete(@Path("id") String id, @Query("functionId") String functionId);
/** /**
* 其他供应商供货三大件 * 其他供应商供货三大件
...@@ -270,7 +269,7 @@ public interface MesApiService { ...@@ -270,7 +269,7 @@ public interface MesApiService {
* @return * @return
*/ */
@GET("/himes/api/msSupplyRecord/delete/{id}.json") @GET("/himes/api/msSupplyRecord/delete/{id}.json")
Observable<BaseMesBean> supplierDelete( @Path("id") String id,@Query("functionId") String functionId); Observable<BaseMesBean> supplierDelete(@Path("id") String id, @Query("functionId") String functionId);
/** /**
* 中间包承包与结算 * 中间包承包与结算
...@@ -286,16 +285,17 @@ public interface MesApiService { ...@@ -286,16 +285,17 @@ public interface MesApiService {
* @return * @return
*/ */
@GET("/himes/api/msContractAndSettlement/delete/{id}.json") @GET("/himes/api/msContractAndSettlement/delete/{id}.json")
Observable<BaseMesBean> middleDelete(@Path("id")String id ,@Query("functionId") String functionId); Observable<BaseMesBean> middleDelete(@Path("id") String id, @Query("functionId") String functionId);
/** /**
*拉速信息 * 拉速信息
* *
* @return * @return
*/ */
@POST("/himes/api/msContinuousCasterSpeed/save.json") @POST("/himes/api/msContinuousCasterSpeed/save.json")
Observable<BaseMesBean> speedAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody); Observable<BaseMesBean> speedAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);
/** /**
* 拉速信息 删除 * 拉速信息 删除
* *
...@@ -425,6 +425,7 @@ public interface MesApiService { ...@@ -425,6 +425,7 @@ public interface MesApiService {
*/ */
@GET("/himes/api/feedback/show/{id}.json") @GET("/himes/api/feedback/show/{id}.json")
Observable<BaseMesBean> feedbackDetail(@Path("id") String id, @Query("functionId") String functionId); Observable<BaseMesBean> feedbackDetail(@Path("id") String id, @Query("functionId") String functionId);
/** /**
* 质量反馈 详情 * 质量反馈 详情
* *
...@@ -519,6 +520,7 @@ public interface MesApiService { ...@@ -519,6 +520,7 @@ public interface MesApiService {
*/ */
@POST("/himes/api/feedback/show/bom/page.json") @POST("/himes/api/feedback/show/bom/page.json")
Observable<BaseMesBean> questionList(@Query("functionId") String functionId, @Body RequestBody requestBody); Observable<BaseMesBean> questionList(@Query("functionId") String functionId, @Body RequestBody requestBody);
/** /**
* @return * @return
*/ */
...@@ -530,6 +532,7 @@ public interface MesApiService { ...@@ -530,6 +532,7 @@ public interface MesApiService {
*/ */
@POST("/himes/api/msStockRecord/show/page.json") @POST("/himes/api/msStockRecord/show/page.json")
Observable<BaseMesBean> stockList(@Query("functionId") String functionId, @Body RequestBody requestBody); Observable<BaseMesBean> stockList(@Query("functionId") String functionId, @Body RequestBody requestBody);
/** /**
* @return * @return
*/ */
...@@ -559,6 +562,7 @@ public interface MesApiService { ...@@ -559,6 +562,7 @@ public interface MesApiService {
*/ */
@POST("/himes/api/spotCheckBill/show/page.json") @POST("/himes/api/spotCheckBill/show/page.json")
Observable<BaseMesBean> spotCheckBillList(@Query("functionId") String functionId, @Body RequestBody requestBody); Observable<BaseMesBean> spotCheckBillList(@Query("functionId") String functionId, @Body RequestBody requestBody);
/** /**
* @return * @return
*/ */
...@@ -580,6 +584,7 @@ public interface MesApiService { ...@@ -580,6 +584,7 @@ public interface MesApiService {
/** /**
* 其他中包耐材记录根据ID获取 * 其他中包耐材记录根据ID获取
*
* @return * @return
*/ */
@POST("/himes/api/msSceneFeedbackHistory/showRef.json") @POST("/himes/api/msSceneFeedbackHistory/showRef.json")
...@@ -587,6 +592,7 @@ public interface MesApiService { ...@@ -587,6 +592,7 @@ public interface MesApiService {
/** /**
* 炼钢厂详情 * 炼钢厂详情
*
* @return * @return
*/ */
@POST("/himes/api/msSceneFeedbackHistory/show/getBySteel.json") @POST("/himes/api/msSceneFeedbackHistory/show/getBySteel.json")
...@@ -595,6 +601,7 @@ public interface MesApiService { ...@@ -595,6 +601,7 @@ public interface MesApiService {
/** /**
* 连铸机详情 * 连铸机详情
*
* @return * @return
*/ */
@POST("/himes/api/msSceneFeedbackHistory/show/getByCaster.json") @POST("/himes/api/msSceneFeedbackHistory/show/getByCaster.json")
...@@ -602,6 +609,7 @@ public interface MesApiService { ...@@ -602,6 +609,7 @@ public interface MesApiService {
/** /**
* 首页列表 * 首页列表
*
* @return * @return
*/ */
@POST("/himes/api/msSceneFeedbackHistory/show/page.json") @POST("/himes/api/msSceneFeedbackHistory/show/page.json")
...@@ -609,6 +617,7 @@ public interface MesApiService { ...@@ -609,6 +617,7 @@ public interface MesApiService {
/** /**
* 用户信息采集历史详情 * 用户信息采集历史详情
*
* @return * @return
*/ */
@POST("/himes/api/msSceneFeedbackHistory/show/getByFeedInfo.json") @POST("/himes/api/msSceneFeedbackHistory/show/getByFeedInfo.json")
...@@ -616,12 +625,15 @@ public interface MesApiService { ...@@ -616,12 +625,15 @@ public interface MesApiService {
/** /**
* 用户信息采集历史详情 * 用户信息采集历史详情
*
* @return * @return
*/ */
@POST("/himes/api/mpsProduct/show/getMpsProductByBasket/list.json") @POST("/himes/api/mpsProduct/show/getMpsProductByBasket/list.json")
Observable<BaseMesBean> getMpsProductByBasket(@Query("functionId") String functionId, @Body RequestBody requestBody); Observable<BaseMesBean> getMpsProductByBasket(@Query("functionId") String functionId, @Body RequestBody requestBody);
/** /**
* 用户信息采集历史详情 * 用户信息采集历史详情
*
* @return * @return
*/ */
@POST("/himes/api/quality/show/productBy/productMud.json") @POST("/himes/api/quality/show/productBy/productMud.json")
...@@ -630,10 +642,12 @@ public interface MesApiService { ...@@ -630,10 +642,12 @@ public interface MesApiService {
/** /**
* 用户信息采集历史详情 * 用户信息采集历史详情
*
* @return * @return
*/ */
@POST("/himes/api/quality/show/productBy/dispatchDetail.json") @POST("/himes/api/quality/show/productBy/dispatchDetail.json")
Observable<BaseMesBean> dispatchDetail(@Query("functionId") String functionId, @Body RequestBody requestBody); Observable<BaseMesBean> dispatchDetail(@Query("functionId") String functionId, @Body RequestBody requestBody);
/** /**
* @return * @return
*/ */
...@@ -646,4 +660,23 @@ public interface MesApiService { ...@@ -646,4 +660,23 @@ public interface MesApiService {
@POST("/himes/api/site/show/removes/page.json") @POST("/himes/api/site/show/removes/page.json")
Observable<BaseMesBean> siteShow(@Query("functionId") String functionId, @Body RequestBody requestBody); Observable<BaseMesBean> siteShow(@Query("functionId") String functionId, @Body RequestBody requestBody);
/**
* @return
*/
@POST("/himes/api/spotCheckBill/show/spotCheckBillProject/page.json")
Observable<BaseMesBean> spotCheckBill(@Query("functionId") String functionId, @Body RequestBody requestBody);
/**
* @return
*/
@GET("/himes/api/spotCheckBill/show/{id}.json")
Observable<BaseMesBean> spotCheckDetail(@Path("id") String id, @Query("functionId") String functionId);
/**
* @return
*/
@POST("/himes/api/modinspo/show/modinspoproject/list.json")
Observable<BaseMesBean> modinspoproject(@Query("functionId") String functionId, @Body RequestBody requestBody);
} }
package com.wd.workoffice.ui.activity.mes;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.Config;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.mesBean.MesServiceCheckBillBean;
import com.wd.workoffice.bean.mesBean.ServiceCheckBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.MesServiceCheckDetailAdapter;
import com.wd.workoffice.util.WorkUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class ServiceCheckDetailActivity extends WorkToolBarActivity {
@BindView(R.id.tv_refuse)
TextView tvRefuse;
@BindView(R.id.tv_agree)
TextView tvAgree;
@BindView(R.id.ll_bottom)
LinearLayout llBottom;
@BindView(R.id.tv_no)
TextView tvNo;
@BindView(R.id.tv_status)
TextView tvStatus;
@BindView(R.id.tv_person)
TextView tvPerson;
@BindView(R.id.tv_new_person)
TextView tvNewPerson;
@BindView(R.id.tv_new_time)
TextView tvNewTime;
@BindView(R.id.tv_machine)
TextView tvMachine;
@BindView(R.id.tv_factory)
TextView tvFactory;
@BindView(R.id.tv_remark)
TextView tvRemark;
@BindView(R.id.tv_plan_star_time)
TextView tvPlanStarTime;
@BindView(R.id.tv_plan_end_time)
TextView tvPlanEndTime;
@BindView(R.id.tv_change_star_time)
TextView tvChangeStarTime;
@BindView(R.id.tv_change_end_time)
TextView tvChangeEndTime;
@BindView(R.id.tv_true_star_time)
TextView tvTrueStarTime;
@BindView(R.id.tv_true_end_time)
TextView tvTrueEndTime;
@BindView(R.id.rv_data)
RecyclerView rvData;
private Map<String, Object> param;
private List<MesServiceCheckBillBean.ListBean> dataList;
private MesServiceCheckDetailAdapter dataAdapter;
private ServiceCheckBean.ListBean info;
private int page = 1;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData.setNestedScrollingEnabled(false);
}
@Override
protected void initData() {
info = JSON.parseObject(getIntent().getStringExtra("info"), ServiceCheckBean.ListBean.class);
changeView();
dataList = new ArrayList<>();
dataAdapter = new MesServiceCheckDetailAdapter(R.layout.item_mes_service_check, dataList);
dataAdapter.bindToRecyclerView(rvData);
param = WorkUtils.pageMesKey();
Map<String, Object> paramMap = WorkUtils.simpleParam();
param.put("paramMap", paramMap);
paramMap.put("billId", info.getId());
param.put("pageNum", page);
getDetail();
getData();
}
private void changeView() {
tvNo.setText(info.getBillNum());
tvStatus.setText(info.getStatus() + "");
tvPerson.setText(info.getSpotCheckPersonName());
tvNewPerson.setText(info.getCreateUserName());
tvNewTime.setText(info.getCreateDateTime());
tvMachine.setText(info.getAstAssetName());
tvFactory.setText(info.getSiteName());
tvRemark.setText(info.getBillDescription());
tvPlanStarTime.setText(info.getPlanBeginTime());
tvPlanEndTime.setText(info.getPlanEndTime());
tvChangeStarTime.setText(info.getAdjustBeginTime());
tvChangeEndTime.setText(info.getAdjustEndTime());
tvTrueStarTime.setText(info.getActualBeginTime());
tvTrueEndTime.setText(info.getActualEndTime());
}
private void getDetail() {
RtfUtils.getMesRtf().spotCheckDetail(info.getId(), "1").compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseMesBean data) {
hideLoading();
if (!data.isSuccess()) {
toast(data.getMessage());
return;
}
info = JSON.parseObject(data.getData().toString(), ServiceCheckBean.ListBean.class);
changeView();
}
});
}
private void getData() {
RtfUtils.getMesRtf().spotCheckBill("00d12c310f4411ea8334fa163e1166bd", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseMesBean data) {
hideLoading();
if (!data.isSuccess()) {
toast(data.getMessage());
return;
}
List<MesServiceCheckBillBean.ListBean> getList = JSON.parseObject(data.getData().toString(), MesServiceCheckBillBean.class).getList();
if (page == 1) {
dataList.clear();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
dataAdapter.loadMoreComplete();
} else {
dataAdapter.loadMoreComplete();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
}
if (getList.size() == 0 || getList.size() < Config.SIZE) {
dataAdapter.loadMoreEnd();
} else {
page++;
}
}
});
}
@Override
protected void initEvent() {
dataAdapter.setOnLoadMoreListener(() -> {
param.put("pageNum", page);
getData();
}, rvData);
}
@Override
protected int layoutId() {
return R.layout.activity_mes_service_check_detail;
}
}
package com.wd.workoffice.ui.activity.mes;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.Config;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.mesBean.MesServiceBillBean;
import com.wd.workoffice.bean.mesBean.ServiceBean;
import com.wd.workoffice.bean.mesBean.ServiceCheckBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.MesServiceDetailAdapter;
import com.wd.workoffice.util.WorkUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class ServiceDetailActivity extends WorkToolBarActivity {
@BindView(R.id.tv_refuse)
TextView tvRefuse;
@BindView(R.id.tv_agree)
TextView tvAgree;
@BindView(R.id.ll_bottom)
LinearLayout llBottom;
@BindView(R.id.tv_no)
TextView tvNo;
@BindView(R.id.tv_plan)
TextView tvPlan;
@BindView(R.id.tv_machine)
TextView tvMachine;
@BindView(R.id.tv_person)
TextView tvPerson;
@BindView(R.id.tv_location)
TextView tvLocation;
@BindView(R.id.tv_status)
TextView tvStatus;
@BindView(R.id.tv_factory)
TextView tvFactory;
@BindView(R.id.tv_remark)
TextView tvRemark;
@BindView(R.id.tv_plan_star_time)
TextView tvPlanStarTime;
@BindView(R.id.tv_plan_end_time)
TextView tvPlanEndTime;
@BindView(R.id.tv_change_star_time)
TextView tvChangeStarTime;
@BindView(R.id.tv_change_end_time)
TextView tvChangeEndTime;
@BindView(R.id.tv_true_star_time)
TextView tvTrueStarTime;
@BindView(R.id.tv_true_end_time)
TextView tvTrueEndTime;
@BindView(R.id.rv_data)
RecyclerView rvData;
private Map<String, Object> param;
private List<MesServiceBillBean.ListBean> dataList;
private MesServiceDetailAdapter dataAdapter;
private ServiceBean.ListBean info;
private int page = 1;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData.setNestedScrollingEnabled(false);
}
@Override
protected void initData() {
info = JSON.parseObject(getIntent().getStringExtra("info"),ServiceBean.ListBean.class);
changeView();
dataList = new ArrayList<>();
dataAdapter = new MesServiceDetailAdapter(R.layout.item_mes_service, dataList);
dataAdapter.bindToRecyclerView(rvData);
param = WorkUtils.pageMesKey();
Map<String, Object> paramMap = WorkUtils.simpleParam();
param.put("paramMap", paramMap);
paramMap.put("inspoId", info.getId());
param.put("pageNum", page);
getData();
}
private void changeView() {
tvNo.setText(info.getInspoCode());
tvStatus.setText(info.getStatus() + "");
tvPerson.setText(info.getPrincipalName());
tvPlan.setText(info.getPlanDesc());
tvLocation.setText(info.getLocationName());
tvMachine.setText(info.getAssetDesc());
tvFactory.setText(info.getSiteDesc());
tvRemark.setText(info.getDescription());
// tvPlanStarTime.setText(info.getPlanBeginTime());
// tvPlanEndTime.setText(info.getPlanEndTime());
tvChangeStarTime.setText(info.getAdjustBeginTime());
tvChangeEndTime.setText(info.getAdjustEndTime());
// tvTrueStarTime.setText(info.getActualBeginTime());
// tvTrueEndTime.setText(info.getActualEndTime());
}
private void getData() {
RtfUtils.getMesRtf().modinspoproject("1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseMesBean data) {
hideLoading();
if (!data.isSuccess()) {
toast(data.getMessage());
return;
}
List<MesServiceBillBean.ListBean> getList = JSON.parseObject(data.getData().toString(), MesServiceBillBean.class).getList();
if (page == 1) {
dataList.clear();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
dataAdapter.loadMoreComplete();
} else {
dataAdapter.loadMoreComplete();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
}
if (getList.size() == 0 || getList.size() < Config.SIZE) {
dataAdapter.loadMoreEnd();
} else {
page++;
}
}
});
}
@Override
protected void initEvent() {
dataAdapter.setOnLoadMoreListener(() -> {
param.put("pageNum", page);
getData();
}, rvData);
}
@Override
protected int layoutId() {
return R.layout.activity_mes_service_detail;
}
}
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.MesServiceCheckBillBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class MesServiceCheckDetailAdapter extends BaseQuickAdapter<MesServiceCheckBillBean.ListBean, BaseViewHolder> {
public MesServiceCheckDetailAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, MesServiceCheckBillBean.ListBean item) {
helper.setText(R.id.tv_machine, item.getAssetName());
helper.setText(R.id.tv_location, item.getLocationName());
helper.setText(R.id.tv_check_project, item.getSpotCheckProject());
}
}
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.MesServiceBillBean;
import com.wd.workoffice.bean.mesBean.MesServiceCheckBillBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class MesServiceDetailAdapter extends BaseQuickAdapter<MesServiceBillBean.ListBean, BaseViewHolder> {
public MesServiceDetailAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, MesServiceBillBean.ListBean item) {
helper.setText(R.id.tv_project, item.getDescription());
}
}
...@@ -15,6 +15,7 @@ import com.wd.workoffice.app.WorkBaseFg; ...@@ -15,6 +15,7 @@ import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.bean.mesBean.ServiceCheckBean; import com.wd.workoffice.bean.mesBean.ServiceCheckBean;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.activity.mes.ServiceCheckDetailActivity;
import com.wd.workoffice.ui.adapter.MesCheckAdapter; import com.wd.workoffice.ui.adapter.MesCheckAdapter;
import com.wd.workoffice.util.PickTimeUtils; import com.wd.workoffice.util.PickTimeUtils;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
...@@ -147,7 +148,7 @@ public class MesCheckFragment extends WorkBaseFg { ...@@ -147,7 +148,7 @@ public class MesCheckFragment extends WorkBaseFg {
dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
// startActivity(MesOrderDetailActivity.class); startActivity(ServiceCheckDetailActivity.class,"info",JSON.toJSONString(dataList.get(position)));
} }
}); });
} }
......
...@@ -15,6 +15,8 @@ import com.wd.workoffice.app.WorkBaseFg; ...@@ -15,6 +15,8 @@ import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.bean.mesBean.ServiceBean; import com.wd.workoffice.bean.mesBean.ServiceBean;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.activity.mes.ServiceCheckDetailActivity;
import com.wd.workoffice.ui.activity.mes.ServiceDetailActivity;
import com.wd.workoffice.ui.adapter.MesServiceAdapter; import com.wd.workoffice.ui.adapter.MesServiceAdapter;
import com.wd.workoffice.util.PickTimeUtils; import com.wd.workoffice.util.PickTimeUtils;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
...@@ -148,7 +150,7 @@ public class MesServiceFragment extends WorkBaseFg { ...@@ -148,7 +150,7 @@ public class MesServiceFragment extends WorkBaseFg {
dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
// startActivity(MesOrderDetailActivity.class); startActivity(ServiceDetailActivity.class,"info",JSON.toJSONString(dataList.get(position)));
} }
}); });
} }
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_margin="8mm"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm"
android:paddingTop="10mm"
android:paddingBottom="10mm">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:background="#FCFCFD"
android:orientation="vertical"
android:paddingVertical="10mm">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="检修项目"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_project"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_margin="8mm"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm"
android:paddingTop="10mm"
android:paddingBottom="10mm">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:background="#FCFCFD"
android:orientation="vertical"
android:paddingVertical="10mm">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="设备"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_machine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="位置"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="点检项目"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_check_project"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论