提交 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 { ...@@ -164,4 +164,12 @@ public interface MesApiService {
*/ */
@POST("/himes/api/msSteelmakingWorks/show/list.json") @POST("/himes/api/msSteelmakingWorks/show/list.json")
Observable<BaseMesBean> factoryList(@Query("functionId") String functionId, @Query("customerUserCode") String customerUserCode, @Body RequestBody requestBody); 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 { ...@@ -113,11 +113,11 @@ public class MesChooseFactoryActivity extends WorkToolBarActivity {
clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent(); data.setSteelmakingWorksName(clientList.get(position).getSteelmakingWorksName());
// intent.putExtra("clientName", clientList.get(position).getName()); data.setSteelmakingWorksCode(clientList.get(position).getSteelmakingWorksCode());
// intent.putExtra("id", clientList.get(position).getId()); startActivity(MesUserDataAdd3Activity.class,
setResult(10001, intent); "data", JSON.toJSONString(data)
finish(); );
} }
}); });
} }
......
...@@ -9,15 +9,20 @@ import android.widget.TextView; ...@@ -9,15 +9,20 @@ import android.widget.TextView;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R; 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.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.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.UserDataAdd3Adapter; 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.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
...@@ -35,48 +40,59 @@ import io.reactivex.disposables.Disposable; ...@@ -35,48 +40,59 @@ import io.reactivex.disposables.Disposable;
* github: https://github.com/FlexibleXd * github: https://github.com/FlexibleXd
**/ **/
public class MesUserDataAdd3Activity extends WorkToolBarActivity { public class MesUserDataAdd3Activity extends WorkToolBarActivity {
@BindView(R.id.tv_client) @BindView(R.id.tv_factory)
TextView tvClient; TextView tvFactory;
@BindView(R.id.rl_client) @BindView(R.id.rl_client)
RelativeLayout rlClient; RelativeLayout rlClient;
@BindView(R.id.tv_sum)
TextView tvSum;
@BindView(R.id.tv_type)
TextView tvType;
@BindView(R.id.rv_data1) @BindView(R.id.rv_data1)
RecyclerView rvData1; RecyclerView rvData1;
@BindView(R.id.rv_data2) @BindView(R.id.rv_data2)
RecyclerView rvData2; RecyclerView rvData2;
@BindView(R.id.tv_factory) @BindView(R.id.rv_data3)
TextView tvFactory; RecyclerView rvData3;
@BindView(R.id.rl_factory) @BindView(R.id.tv_machine)
RelativeLayout rlFactory; TextView tvMachine;
private AccountBean dataBean; @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 @Override
protected void initView() { protected void initView() {
ButterKnife.bind(this); ButterKnife.bind(this);
rvData1.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData1.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData3.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
} }
@Override @Override
protected void initData() { protected void initData() {
List<Object> data1List = new ArrayList<>(); data = JSON.parseObject(getIntent().getStringExtra("data"), UserDataBean.ListBean.class);
data1List.add(null); data1List = new ArrayList<>();
data1List.add(null); data2List = new ArrayList<>();
data1List.add(null); data3List = new ArrayList<>();
List<Object> data2List = new ArrayList<>(); data1Adapter = new UserDataAdd3Adapter(R.layout.item_user_add3, data1List);
data2List.add(null); data2Adapter = new UserDataAdd3RefAdapter(R.layout.item_user_add3, data2List);
data2List.add(null); data3Adapter = new UserDataAdd3LabelAdapter(R.layout.item_add3_label, data3List);
data2List.add(null);
UserDataAdd3Adapter data1Adapter = new UserDataAdd3Adapter(R.layout.item_user_add3, data1List);
UserDataAdd3Adapter data2Adapter = new UserDataAdd3Adapter(R.layout.item_user_add3, data2List);
data1Adapter.bindToRecyclerView(rvData1); data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2); data2Adapter.bindToRecyclerView(rvData2);
// getData(); data3Adapter.bindToRecyclerView(rvData3);
getData();
} }
private void 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 @Override
public void doOnSubscribe(Disposable d) { public void doOnSubscribe(Disposable d) {
} }
...@@ -88,17 +104,32 @@ public class MesUserDataAdd3Activity extends WorkToolBarActivity { ...@@ -88,17 +104,32 @@ public class MesUserDataAdd3Activity extends WorkToolBarActivity {
} }
@Override @Override
public void onSuccess(BaseBean data) { public void onSuccess(BaseMesBean data) {
hideLoading(); hideLoading();
if (data.getCode() != 0) { if (!data.isSuccess()) {
toast(data.getMessage()); toast(data.getMsg());
return; return;
} }
dataBean = JSON.parseObject(data.getData().toString(), AccountBean.class); FactoryDetailBean factoryDetailBean = JSON.parseObject(data.getData().toString(), FactoryDetailBean.class);
// tvName.setText(dataBean.getName()); FactoryDetailBean.SteelWorksBean steelWorks = factoryDetailBean.getSteelWorks();
// tvDpeName.setText(dataBean.getName()); if (steelWorks != null) {
// tvDpePrice.setText(MathUtils.converData(dataBean.getBalance(), 2)); tvSum.setText(steelWorks.getAnnualOutput());
// tvDpeFreezePrice.setText(String.valueOf(dataBean.getFrozenAmount())); 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 { ...@@ -140,7 +171,7 @@ public class MesUserDataAdd3Activity extends WorkToolBarActivity {
} }
@OnClick(R.id.rl_factory) @OnClick(R.id.rl_machine)
public void onViewClicked() { public void onViewClicked() {
startActivityForResult(MesChooseMachineActivity.class, 10001); startActivityForResult(MesChooseMachineActivity.class, 10001);
} }
......
...@@ -6,6 +6,7 @@ import android.view.View; ...@@ -6,6 +6,7 @@ import android.view.View;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder; import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.FactoryDetailBean;
import java.util.List; import java.util.List;
...@@ -13,7 +14,7 @@ import java.util.List; ...@@ -13,7 +14,7 @@ import java.util.List;
* Created by flexible on 2018/8/13. * 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) { public UserDataAdd3Adapter(int layoutResId, List data) {
super(layoutResId, data); super(layoutResId, data);
...@@ -21,7 +22,7 @@ public class UserDataAdd3Adapter extends BaseQuickAdapter<Object, BaseViewHolder ...@@ -21,7 +22,7 @@ public class UserDataAdd3Adapter extends BaseQuickAdapter<Object, BaseViewHolder
@Override @Override
protected void convert(BaseViewHolder helper, Object item) { protected void convert(BaseViewHolder helper, FactoryDetailBean.SteelFurnListBean item) {
View content = helper.getView(R.id.ll_content); View content = helper.getView(R.id.ll_content);
helper.setOnClickListener(R.id.rl_title, new View.OnClickListener() { helper.setOnClickListener(R.id.rl_title, new View.OnClickListener() {
@Override @Override
...@@ -33,7 +34,9 @@ public class UserDataAdd3Adapter extends BaseQuickAdapter<Object, BaseViewHolder ...@@ -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 @@ ...@@ -21,17 +21,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:text="客户" android:text="炼钢厂"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:id="@+id/tv_client" android:id="@+id/tv_factory"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginRight="3mm" android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
...@@ -49,16 +48,16 @@ ...@@ -49,16 +48,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:text="销售公司" android:text="年产量"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:id="@+id/tv_sum"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginRight="3mm" android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
...@@ -76,16 +75,16 @@ ...@@ -76,16 +75,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:text="销售经理" android:text="钢种"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:id="@+id/tv_type"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginRight="3mm" android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
...@@ -102,116 +101,14 @@ ...@@ -102,116 +101,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10mm" /> android:layout_marginTop="10mm" />
<androidx.recyclerview.widget.RecyclerView
<RelativeLayout android:id="@+id/rv_data3"
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
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white" android:layout_marginTop="10mm" />
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>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_factory" android:id="@+id/rl_machine"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10mm" android:layout_marginTop="10mm"
...@@ -233,7 +130,7 @@ ...@@ -233,7 +130,7 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
android:id="@+id/tv_factory" android:id="@+id/tv_machine"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" 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 @@ ...@@ -14,6 +14,7 @@
android:paddingVertical="9mm"> android:paddingVertical="9mm">
<TextView <TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
...@@ -44,6 +45,7 @@ ...@@ -44,6 +45,7 @@
android:paddingLeft="25mm"> android:paddingLeft="25mm">
<TextView <TextView
android:id="@+id/tv_desc1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
...@@ -53,11 +55,11 @@ ...@@ -53,11 +55,11 @@
<TextView <TextView
android:id="@+id/tv_content1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginRight="3mm" android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
...@@ -69,6 +71,7 @@ ...@@ -69,6 +71,7 @@
android:paddingLeft="25mm"> android:paddingLeft="25mm">
<TextView <TextView
android:id="@+id/tv_desc2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
...@@ -78,11 +81,11 @@ ...@@ -78,11 +81,11 @@
<TextView <TextView
android:id="@+id/tv_content2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginRight="3mm" android:layout_marginRight="3mm"
android:text="请选择"
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论