提交 a5189841 authored 作者: lgd's avatar lgd

1.用户反馈炼钢厂详情

2.//TODO erp用户是否选择新部门为空,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes,刷新token,编辑任务担当无法修改
上级 25f9eb5d
package com.wd.workoffice.bean.mesBean;
import java.util.List;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class FactoryDetailBean {
/**
* id : null
* createDateTime : null
* updateDateTime : null
* steelWorks : {"id":"17","createDateTime":1585721646000,"updateDateTime":1587459925000,"steelmakingWorksCode":"lgc1","steelmakingWorksName":"Liangan7","annualOutput":"1111777","steelGrade":"88888777","createUserId":"398c852b38e911ea8334fa163e1166bd","createUserName":null,"updateUserId":"398c852b38e911ea8334fa163e1166bd","updateUserName":"hello","remark":null,"customerUserCode":"KN00185","delete":false}
* steelFurnList : [{"id":"18","isDelete":null,"createDateTime":1585721646000,"updateDateTime":1587459925000,"steelmakingFurnaceCode":"lgl1","steelmakingWorksCode":"lgc1","steelmakingWorksName":"炼钢厂1","type":"888877777","capacity":"888777","createUserId":"398c852b38e911ea8334fa163e1166bd","createUserName":null,"updateUserId":"398c852b38e911ea8334fa163e1166bd","updateUserName":"hello","remark":null,"delete":null},{"id":"20","isDelete":null,"createDateTime":null,"updateDateTime":null,"steelmakingFurnaceCode":"lgl2","steelmakingWorksCode":"lgc1","steelmakingWorksName":"炼钢厂1","type":"类型1","capacity":"容量","createUserId":"","createUserName":null,"updateUserId":null,"updateUserName":null,"remark":null,"delete":null}]
* steelRefFurnList : [{"id":"18","isDelete":null,"createDateTime":1585721646000,"updateDateTime":1587459925000,"refiningFurnaceCode":"jlu1","steelmakingWorksCode":"lgc1","steelmakingWorksName":"炼钢厂1","modelNumber":"55566777","tablesNumber":888777,"calciumTreatmentSituation":"888777","createUserId":"398c852b38e911ea8334fa163e1166bd","createUserName":null,"updateUserId":"398c852b38e911ea8334fa163e1166bd","updateUserName":"hello","remark":null,"delete":null}]
* steelLadleList : [{"id":"17","createDateTime":1585721647000,"updateDateTime":1587459925000,"ladleCode":"gb1","steelmakingWorksCode":"lgc1","steelmakingWorksName":"炼钢厂1","capacity":"121277","temperatureRange":"141477","castingDateTime":1515777,"createUserId":"398c852b38e911ea8334fa163e1166bd","createUserName":null,"updateUserId":"398c852b38e911ea8334fa163e1166bd","updateUserName":"hello","remark":null,"delete":false}]
* delete : null
*/
private Object id;
private Object createDateTime;
private Object updateDateTime;
private SteelWorksBean steelWorks;
private Object delete;
private List<SteelFurnListBean> steelFurnList;
private List<SteelRefFurnListBean> steelRefFurnList;
private List<SteelLadleListBean> steelLadleList;
public Object getId() {
return id;
}
public void setId(Object 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 SteelWorksBean getSteelWorks() {
return steelWorks;
}
public void setSteelWorks(SteelWorksBean steelWorks) {
this.steelWorks = steelWorks;
}
public Object getDelete() {
return delete;
}
public void setDelete(Object delete) {
this.delete = delete;
}
public List<SteelFurnListBean> getSteelFurnList() {
return steelFurnList;
}
public void setSteelFurnList(List<SteelFurnListBean> steelFurnList) {
this.steelFurnList = steelFurnList;
}
public List<SteelRefFurnListBean> getSteelRefFurnList() {
return steelRefFurnList;
}
public void setSteelRefFurnList(List<SteelRefFurnListBean> steelRefFurnList) {
this.steelRefFurnList = steelRefFurnList;
}
public List<SteelLadleListBean> getSteelLadleList() {
return steelLadleList;
}
public void setSteelLadleList(List<SteelLadleListBean> steelLadleList) {
this.steelLadleList = steelLadleList;
}
public static class SteelWorksBean {
/**
* id : 17
* createDateTime : 1585721646000
* updateDateTime : 1587459925000
* steelmakingWorksCode : lgc1
* steelmakingWorksName : Liangan7
* annualOutput : 1111777
* steelGrade : 88888777
* createUserId : 398c852b38e911ea8334fa163e1166bd
* createUserName : null
* updateUserId : 398c852b38e911ea8334fa163e1166bd
* updateUserName : hello
* remark : null
* customerUserCode : KN00185
* delete : false
*/
private String id;
private long createDateTime;
private long updateDateTime;
private String steelmakingWorksCode;
private String steelmakingWorksName;
private String annualOutput;
private String steelGrade;
private String createUserId;
private Object createUserName;
private String updateUserId;
private String updateUserName;
private Object remark;
private String customerUserCode;
private boolean delete;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public long getCreateDateTime() {
return createDateTime;
}
public void setCreateDateTime(long createDateTime) {
this.createDateTime = createDateTime;
}
public long getUpdateDateTime() {
return updateDateTime;
}
public void setUpdateDateTime(long updateDateTime) {
this.updateDateTime = updateDateTime;
}
public String getSteelmakingWorksCode() {
return steelmakingWorksCode;
}
public void setSteelmakingWorksCode(String steelmakingWorksCode) {
this.steelmakingWorksCode = steelmakingWorksCode;
}
public String getSteelmakingWorksName() {
return steelmakingWorksName;
}
public void setSteelmakingWorksName(String steelmakingWorksName) {
this.steelmakingWorksName = steelmakingWorksName;
}
public String getAnnualOutput() {
return annualOutput;
}
public void setAnnualOutput(String annualOutput) {
this.annualOutput = annualOutput;
}
public String getSteelGrade() {
return steelGrade;
}
public void setSteelGrade(String steelGrade) {
this.steelGrade = steelGrade;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Object getCreateUserName() {
return createUserName;
}
public void setCreateUserName(Object createUserName) {
this.createUserName = createUserName;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getUpdateUserName() {
return updateUserName;
}
public void setUpdateUserName(String updateUserName) {
this.updateUserName = updateUserName;
}
public Object getRemark() {
return remark;
}
public void setRemark(Object remark) {
this.remark = remark;
}
public String getCustomerUserCode() {
return customerUserCode;
}
public void setCustomerUserCode(String customerUserCode) {
this.customerUserCode = customerUserCode;
}
public boolean isDelete() {
return delete;
}
public void setDelete(boolean delete) {
this.delete = delete;
}
}
public static class SteelFurnListBean {
/**
* id : 18
* isDelete : null
* createDateTime : 1585721646000
* updateDateTime : 1587459925000
* steelmakingFurnaceCode : lgl1
* steelmakingWorksCode : lgc1
* steelmakingWorksName : 炼钢厂1
* type : 888877777
* capacity : 888777
* createUserId : 398c852b38e911ea8334fa163e1166bd
* createUserName : null
* updateUserId : 398c852b38e911ea8334fa163e1166bd
* updateUserName : hello
* remark : null
* delete : null
*/
private String id;
private Object isDelete;
private long createDateTime;
private long updateDateTime;
private String steelmakingFurnaceCode;
private String steelmakingWorksCode;
private String steelmakingWorksName;
private String type;
private String capacity;
private String createUserId;
private Object createUserName;
private String updateUserId;
private String updateUserName;
private Object remark;
private Object delete;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Object getIsDelete() {
return isDelete;
}
public void setIsDelete(Object isDelete) {
this.isDelete = isDelete;
}
public long getCreateDateTime() {
return createDateTime;
}
public void setCreateDateTime(long createDateTime) {
this.createDateTime = createDateTime;
}
public long getUpdateDateTime() {
return updateDateTime;
}
public void setUpdateDateTime(long updateDateTime) {
this.updateDateTime = updateDateTime;
}
public String getSteelmakingFurnaceCode() {
return steelmakingFurnaceCode;
}
public void setSteelmakingFurnaceCode(String steelmakingFurnaceCode) {
this.steelmakingFurnaceCode = steelmakingFurnaceCode;
}
public String getSteelmakingWorksCode() {
return steelmakingWorksCode;
}
public void setSteelmakingWorksCode(String steelmakingWorksCode) {
this.steelmakingWorksCode = steelmakingWorksCode;
}
public String getSteelmakingWorksName() {
return steelmakingWorksName;
}
public void setSteelmakingWorksName(String steelmakingWorksName) {
this.steelmakingWorksName = steelmakingWorksName;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getCapacity() {
return capacity;
}
public void setCapacity(String capacity) {
this.capacity = capacity;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Object getCreateUserName() {
return createUserName;
}
public void setCreateUserName(Object createUserName) {
this.createUserName = createUserName;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getUpdateUserName() {
return updateUserName;
}
public void setUpdateUserName(String updateUserName) {
this.updateUserName = updateUserName;
}
public Object getRemark() {
return remark;
}
public void setRemark(Object remark) {
this.remark = remark;
}
public Object getDelete() {
return delete;
}
public void setDelete(Object delete) {
this.delete = delete;
}
}
public static class SteelRefFurnListBean {
/**
* id : 18
* isDelete : null
* createDateTime : 1585721646000
* updateDateTime : 1587459925000
* refiningFurnaceCode : jlu1
* steelmakingWorksCode : lgc1
* steelmakingWorksName : 炼钢厂1
* modelNumber : 55566777
* tablesNumber : 888777
* calciumTreatmentSituation : 888777
* createUserId : 398c852b38e911ea8334fa163e1166bd
* createUserName : null
* updateUserId : 398c852b38e911ea8334fa163e1166bd
* updateUserName : hello
* remark : null
* delete : null
*/
private String id;
private Object isDelete;
private long createDateTime;
private long updateDateTime;
private String refiningFurnaceCode;
private String steelmakingWorksCode;
private String steelmakingWorksName;
private String modelNumber;
private int tablesNumber;
private String calciumTreatmentSituation;
private String createUserId;
private Object createUserName;
private String updateUserId;
private String updateUserName;
private Object remark;
private Object delete;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Object getIsDelete() {
return isDelete;
}
public void setIsDelete(Object isDelete) {
this.isDelete = isDelete;
}
public long getCreateDateTime() {
return createDateTime;
}
public void setCreateDateTime(long createDateTime) {
this.createDateTime = createDateTime;
}
public long getUpdateDateTime() {
return updateDateTime;
}
public void setUpdateDateTime(long updateDateTime) {
this.updateDateTime = updateDateTime;
}
public String getRefiningFurnaceCode() {
return refiningFurnaceCode;
}
public void setRefiningFurnaceCode(String refiningFurnaceCode) {
this.refiningFurnaceCode = refiningFurnaceCode;
}
public String getSteelmakingWorksCode() {
return steelmakingWorksCode;
}
public void setSteelmakingWorksCode(String steelmakingWorksCode) {
this.steelmakingWorksCode = steelmakingWorksCode;
}
public String getSteelmakingWorksName() {
return steelmakingWorksName;
}
public void setSteelmakingWorksName(String steelmakingWorksName) {
this.steelmakingWorksName = steelmakingWorksName;
}
public String getModelNumber() {
return modelNumber;
}
public void setModelNumber(String modelNumber) {
this.modelNumber = modelNumber;
}
public int getTablesNumber() {
return tablesNumber;
}
public void setTablesNumber(int tablesNumber) {
this.tablesNumber = tablesNumber;
}
public String getCalciumTreatmentSituation() {
return calciumTreatmentSituation;
}
public void setCalciumTreatmentSituation(String calciumTreatmentSituation) {
this.calciumTreatmentSituation = calciumTreatmentSituation;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Object getCreateUserName() {
return createUserName;
}
public void setCreateUserName(Object createUserName) {
this.createUserName = createUserName;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getUpdateUserName() {
return updateUserName;
}
public void setUpdateUserName(String updateUserName) {
this.updateUserName = updateUserName;
}
public Object getRemark() {
return remark;
}
public void setRemark(Object remark) {
this.remark = remark;
}
public Object getDelete() {
return delete;
}
public void setDelete(Object delete) {
this.delete = delete;
}
}
public static class SteelLadleListBean {
/**
* id : 17
* createDateTime : 1585721647000
* updateDateTime : 1587459925000
* ladleCode : gb1
* steelmakingWorksCode : lgc1
* steelmakingWorksName : 炼钢厂1
* capacity : 121277
* temperatureRange : 141477
* castingDateTime : 1515777
* createUserId : 398c852b38e911ea8334fa163e1166bd
* createUserName : null
* updateUserId : 398c852b38e911ea8334fa163e1166bd
* updateUserName : hello
* remark : null
* delete : false
*/
private String id;
private long createDateTime;
private long updateDateTime;
private String ladleCode;
private String steelmakingWorksCode;
private String steelmakingWorksName;
private String capacity;
private String temperatureRange;
private long castingDateTime;
private String createUserId;
private Object createUserName;
private String updateUserId;
private String updateUserName;
private Object remark;
private boolean delete;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public long getCreateDateTime() {
return createDateTime;
}
public void setCreateDateTime(long createDateTime) {
this.createDateTime = createDateTime;
}
public long getUpdateDateTime() {
return updateDateTime;
}
public void setUpdateDateTime(long updateDateTime) {
this.updateDateTime = updateDateTime;
}
public String getLadleCode() {
return ladleCode;
}
public void setLadleCode(String ladleCode) {
this.ladleCode = ladleCode;
}
public String getSteelmakingWorksCode() {
return steelmakingWorksCode;
}
public void setSteelmakingWorksCode(String steelmakingWorksCode) {
this.steelmakingWorksCode = steelmakingWorksCode;
}
public String getSteelmakingWorksName() {
return steelmakingWorksName;
}
public void setSteelmakingWorksName(String steelmakingWorksName) {
this.steelmakingWorksName = steelmakingWorksName;
}
public String getCapacity() {
return capacity;
}
public void setCapacity(String capacity) {
this.capacity = capacity;
}
public String getTemperatureRange() {
return temperatureRange;
}
public void setTemperatureRange(String temperatureRange) {
this.temperatureRange = temperatureRange;
}
public long getCastingDateTime() {
return castingDateTime;
}
public void setCastingDateTime(long castingDateTime) {
this.castingDateTime = castingDateTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Object getCreateUserName() {
return createUserName;
}
public void setCreateUserName(Object createUserName) {
this.createUserName = createUserName;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getUpdateUserName() {
return updateUserName;
}
public void setUpdateUserName(String updateUserName) {
this.updateUserName = updateUserName;
}
public Object getRemark() {
return remark;
}
public void setRemark(Object remark) {
this.remark = remark;
}
public boolean isDelete() {
return delete;
}
public void setDelete(boolean delete) {
this.delete = delete;
}
}
}
......@@ -164,4 +164,12 @@ public interface MesApiService {
*/
@POST("/himes/api/msSteelmakingWorks/show/list.json")
Observable<BaseMesBean> factoryList(@Query("functionId") String functionId, @Query("customerUserCode") String customerUserCode, @Body RequestBody requestBody);
/**
* 炼钢厂列表查询
*
* @return
*/
@POST("/himes/api/msSteelmakingWorks/show/getBySteel.json")
Observable<BaseMesBean> factoryDetail(@Query("functionId") String functionId, @Body RequestBody requestBody);
}
......@@ -113,11 +113,11 @@ public class MesChooseFactoryActivity extends WorkToolBarActivity {
clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent();
// intent.putExtra("clientName", clientList.get(position).getName());
// intent.putExtra("id", clientList.get(position).getId());
setResult(10001, intent);
finish();
data.setSteelmakingWorksName(clientList.get(position).getSteelmakingWorksName());
data.setSteelmakingWorksCode(clientList.get(position).getSteelmakingWorksCode());
startActivity(MesUserDataAdd3Activity.class,
"data", JSON.toJSONString(data)
);
}
});
}
......
......@@ -9,15 +9,20 @@ import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.AccountBean;
import com.wd.workoffice.bean.mesBean.FactoryDetailBean;
import com.wd.workoffice.bean.mesBean.UserDataBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.UserDataAdd3Adapter;
import com.wd.workoffice.ui.adapter.UserDataAdd3LabelAdapter;
import com.wd.workoffice.ui.adapter.UserDataAdd3RefAdapter;
import com.wd.workoffice.util.WorkUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
......@@ -35,48 +40,59 @@ import io.reactivex.disposables.Disposable;
* github: https://github.com/FlexibleXd
**/
public class MesUserDataAdd3Activity extends WorkToolBarActivity {
@BindView(R.id.tv_client)
TextView tvClient;
@BindView(R.id.tv_factory)
TextView tvFactory;
@BindView(R.id.rl_client)
RelativeLayout rlClient;
@BindView(R.id.tv_sum)
TextView tvSum;
@BindView(R.id.tv_type)
TextView tvType;
@BindView(R.id.rv_data1)
RecyclerView rvData1;
@BindView(R.id.rv_data2)
RecyclerView rvData2;
@BindView(R.id.tv_factory)
TextView tvFactory;
@BindView(R.id.rl_factory)
RelativeLayout rlFactory;
private AccountBean dataBean;
@BindView(R.id.rv_data3)
RecyclerView rvData3;
@BindView(R.id.tv_machine)
TextView tvMachine;
@BindView(R.id.rl_machine)
RelativeLayout rlMachine;
private UserDataBean.ListBean data;
private List<FactoryDetailBean.SteelFurnListBean> data1List;
private List<FactoryDetailBean.SteelRefFurnListBean> data2List;
private List<FactoryDetailBean.SteelLadleListBean> data3List;
private UserDataAdd3Adapter data1Adapter;
private UserDataAdd3RefAdapter data2Adapter;
private UserDataAdd3LabelAdapter data3Adapter;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData1.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData3.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
List<Object> data1List = new ArrayList<>();
data1List.add(null);
data1List.add(null);
data1List.add(null);
List<Object> data2List = new ArrayList<>();
data2List.add(null);
data2List.add(null);
data2List.add(null);
UserDataAdd3Adapter data1Adapter = new UserDataAdd3Adapter(R.layout.item_user_add3, data1List);
UserDataAdd3Adapter data2Adapter = new UserDataAdd3Adapter(R.layout.item_user_add3, data2List);
data = JSON.parseObject(getIntent().getStringExtra("data"), UserDataBean.ListBean.class);
data1List = new ArrayList<>();
data2List = new ArrayList<>();
data3List = new ArrayList<>();
data1Adapter = new UserDataAdd3Adapter(R.layout.item_user_add3, data1List);
data2Adapter = new UserDataAdd3RefAdapter(R.layout.item_user_add3, data2List);
data3Adapter = new UserDataAdd3LabelAdapter(R.layout.item_add3_label, data3List);
data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2);
// getData();
data3Adapter.bindToRecyclerView(rvData3);
getData();
}
private void getData() {
RtfUtils.getRtf().getAccount().compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
Map<String, Object> param = WorkUtils.simpleParam();
param.put("steelmakingWorksCode", data.getSteelmakingWorksCode());
RtfUtils.getMesRtf().factoryDetail("1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
......@@ -88,17 +104,32 @@ public class MesUserDataAdd3Activity extends WorkToolBarActivity {
}
@Override
public void onSuccess(BaseBean data) {
public void onSuccess(BaseMesBean data) {
hideLoading();
if (data.getCode() != 0) {
toast(data.getMessage());
if (!data.isSuccess()) {
toast(data.getMsg());
return;
}
dataBean = JSON.parseObject(data.getData().toString(), AccountBean.class);
// tvName.setText(dataBean.getName());
// tvDpeName.setText(dataBean.getName());
// tvDpePrice.setText(MathUtils.converData(dataBean.getBalance(), 2));
// tvDpeFreezePrice.setText(String.valueOf(dataBean.getFrozenAmount()));
FactoryDetailBean factoryDetailBean = JSON.parseObject(data.getData().toString(), FactoryDetailBean.class);
FactoryDetailBean.SteelWorksBean steelWorks = factoryDetailBean.getSteelWorks();
if (steelWorks != null) {
tvSum.setText(steelWorks.getAnnualOutput());
tvFactory.setText(steelWorks.getSteelmakingWorksName());
tvType.setText(steelWorks.getSteelGrade());
}
if (factoryDetailBean.getSteelFurnList() != null) {
data1List.addAll(factoryDetailBean.getSteelFurnList());
data1Adapter.notifyDataSetChanged();
}
if (factoryDetailBean.getSteelRefFurnList() != null) {
data2List.addAll(factoryDetailBean.getSteelRefFurnList());
data2Adapter.notifyDataSetChanged();
}
if (factoryDetailBean.getSteelLadleList() != null) {
data3List.addAll(factoryDetailBean.getSteelLadleList());
data3Adapter.notifyDataSetChanged();
}
}
});
}
......@@ -140,7 +171,7 @@ public class MesUserDataAdd3Activity extends WorkToolBarActivity {
}
@OnClick(R.id.rl_factory)
@OnClick(R.id.rl_machine)
public void onViewClicked() {
startActivityForResult(MesChooseMachineActivity.class, 10001);
}
......
......@@ -6,6 +6,7 @@ import android.view.View;
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.FactoryDetailBean;
import java.util.List;
......@@ -13,7 +14,7 @@ import java.util.List;
* Created by flexible on 2018/8/13.
*/
public class UserDataAdd3Adapter extends BaseQuickAdapter<Object, BaseViewHolder> {
public class UserDataAdd3Adapter extends BaseQuickAdapter<FactoryDetailBean.SteelFurnListBean, BaseViewHolder> {
public UserDataAdd3Adapter(int layoutResId, List data) {
super(layoutResId, data);
......@@ -21,7 +22,7 @@ public class UserDataAdd3Adapter extends BaseQuickAdapter<Object, BaseViewHolder
@Override
protected void convert(BaseViewHolder helper, Object item) {
protected void convert(BaseViewHolder helper, FactoryDetailBean.SteelFurnListBean item) {
View content = helper.getView(R.id.ll_content);
helper.setOnClickListener(R.id.rl_title, new View.OnClickListener() {
@Override
......@@ -33,7 +34,9 @@ public class UserDataAdd3Adapter extends BaseQuickAdapter<Object, BaseViewHolder
}
}
});
helper.setText(R.id.tv_name, item.getSteelmakingFurnaceCode());
helper.setText(R.id.tv_content1, item.getType());
helper.setText(R.id.tv_content2, item.getCapacity());
}
}
package com.wd.workoffice.ui.adapter;
import android.view.View;
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.FactoryDetailBean;
import java.util.List;
import flexible.xd.android_base.utils.TimeUtils;
/**
* Created by flexible on 2018/8/13.
*/
public class UserDataAdd3LabelAdapter extends BaseQuickAdapter<FactoryDetailBean.SteelLadleListBean, BaseViewHolder> {
public UserDataAdd3LabelAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, FactoryDetailBean.SteelLadleListBean item) {
View content = helper.getView(R.id.ll_content);
helper.setOnClickListener(R.id.rl_title, new View.OnClickListener() {
@Override
public void onClick(View v) {
if (content.getVisibility() == View.VISIBLE) {
content.setVisibility(View.GONE);
} else {
content.setVisibility(View.VISIBLE);
}
}
});
helper.setText(R.id.tv_name, item.getLadleCode());
helper.setText(R.id.tv_content1, item.getCapacity());
helper.setText(R.id.tv_content2, item.getTemperatureRange());
helper.setText(R.id.tv_content3, TimeUtils.millis2String(item.getCastingDateTime()));
}
}
package com.wd.workoffice.ui.adapter;
import android.view.View;
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.FactoryDetailBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class UserDataAdd3RefAdapter extends BaseQuickAdapter<FactoryDetailBean.SteelRefFurnListBean, BaseViewHolder> {
public UserDataAdd3RefAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, FactoryDetailBean.SteelRefFurnListBean item) {
View content = helper.getView(R.id.ll_content);
helper.setOnClickListener(R.id.rl_title, new View.OnClickListener() {
@Override
public void onClick(View v) {
if (content.getVisibility() == View.VISIBLE) {
content.setVisibility(View.GONE);
} else {
content.setVisibility(View.VISIBLE);
}
}
});
helper.setText(R.id.tv_desc1, "型号和台数");
helper.setText(R.id.tv_desc2, "钙处理方式");
helper.setText(R.id.tv_name, item.getRefiningFurnaceCode());
helper.setText(R.id.tv_content1, item.getModelNumber());
helper.setText(R.id.tv_content2, item.getCalciumTreatmentSituation());
}
}
......@@ -21,17 +21,16 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="客户"
android:text="炼钢厂"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_client"
android:id="@+id/tv_factory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" />
</RelativeLayout>
......@@ -49,16 +48,16 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="销售公司"
android:text="年产量"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_sum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" />
</RelativeLayout>
......@@ -76,16 +75,16 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="销售经理"
android:text="钢种"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" />
</RelativeLayout>
......@@ -102,116 +101,14 @@
android:layout_height="wrap_content"
android:layout_marginTop="10mm" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="钢包"
android:textSize="14sp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingVertical="9mm"
android:paddingLeft="25mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="容量"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingVertical="9mm"
android:paddingLeft="25mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="温度范围"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingVertical="9mm"
android:paddingLeft="25mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="每炉浇铸时间"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
android:layout_marginTop="10mm" />
<RelativeLayout
android:id="@+id/rl_factory"
android:id="@+id/rl_machine"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
......@@ -233,7 +130,7 @@
android:gravity="center_vertical">
<TextView
android:id="@+id/tv_factory"
android:id="@+id/tv_machine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
......
<?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:orientation="vertical">
<RelativeLayout
android:id="@+id/rl_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="钢包"
android:textSize="14sp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingVertical="9mm"
android:paddingLeft="25mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="容量"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_content1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingVertical="9mm"
android:paddingLeft="25mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="温度范围"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_content2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingVertical="9mm"
android:paddingLeft="25mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="每炉浇铸时间"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_content3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -14,6 +14,7 @@
android:paddingVertical="9mm">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
......@@ -44,6 +45,7 @@
android:paddingLeft="25mm">
<TextView
android:id="@+id/tv_desc1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
......@@ -53,11 +55,11 @@
<TextView
android:id="@+id/tv_content1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" />
</RelativeLayout>
......@@ -69,6 +71,7 @@
android:paddingLeft="25mm">
<TextView
android:id="@+id/tv_desc2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
......@@ -78,11 +81,11 @@
<TextView
android:id="@+id/tv_content2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论