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

1.用户数据采集,添加7小件

2.//TODO 设备三个子菜单,坩埚下单,mes其他页面,编辑任务担当无法修改.支数参数
上级 352408f4
......@@ -1252,6 +1252,14 @@
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.user.MesUserClientActivity"
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.ticket.MesTicketLogActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
......@@ -1921,6 +1929,31 @@
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.user.MesSpeedAddActivity"
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.user.MesSpeedModifyActivity"
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.user.MesSpeedDetailActivity"
android:configChanges="keyboardHidden|orientation"
android:label="连铸机钢种"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.wd.workoffice.fileprovider"
......
......@@ -58,6 +58,25 @@ public class MesClientBean extends BaseMesPageBean {
private Object updateUserName;
private String remark;
private Object delete;
private String customerUserCode;
private String customerUserName;
public String getCustomerUserCode() {
return customerUserCode;
}
public void setCustomerUserCode(String customerUserCode) {
this.customerUserCode = customerUserCode;
}
public String getCustomerUserName() {
return customerUserName;
}
public void setCustomerUserName(String customerUserName) {
this.customerUserName = customerUserName;
}
public String getId() {
return id;
......
......@@ -33,14 +33,15 @@ public class UserDataDetailBean {
*/
private MachineDetailBean.CastInfoBean castInfo;
private MachineDetailBean.CastLadleBean castLadle;
private MachineDetailBean.CovAgentBean covAgent;
private MachineDetailBean.MouldFluBean mouldFlu;
// private MachineDetailBean.CovAgentBean covAgent;
// private MachineDetailBean.MouldFluBean mouldFlu;
private List<MachineDetailBean.ProductListBean> productList;
private List<MachineDetailBean.SupplyListBean> supplyList;
private List<MachineDetailBean.StockListBean> stockList;
private List<MachineDetailBean.OtherSupListBean> otherSupList;
private List<MachineDetailBean.OtherLadleListBean> otherLadleList;
private List<MachineDetailBean.SettleListBean> settleList;
private List<MachineDetailBean.SpeedsBean> speeds;
private Object id;
private Object createDateTime;
private Object updateDateTime;
......@@ -52,6 +53,14 @@ public class UserDataDetailBean {
private List<FactoryDetailBean.SteelLadleListBean> steelLadleList;
private Object delete;
public List<MachineDetailBean.SpeedsBean> getSpeeds() {
return speeds;
}
public void setSpeeds(List<MachineDetailBean.SpeedsBean> speeds) {
this.speeds = speeds;
}
public MachineDetailBean.CastInfoBean getCastInfo() {
return castInfo;
}
......@@ -68,21 +77,21 @@ public class UserDataDetailBean {
this.castLadle = castLadle;
}
public MachineDetailBean.CovAgentBean getCovAgent() {
return covAgent;
}
public void setCovAgent(MachineDetailBean.CovAgentBean covAgent) {
this.covAgent = covAgent;
}
public MachineDetailBean.MouldFluBean getMouldFlu() {
return mouldFlu;
}
public void setMouldFlu(MachineDetailBean.MouldFluBean mouldFlu) {
this.mouldFlu = mouldFlu;
}
// public MachineDetailBean.CovAgentBean getCovAgent() {
// return covAgent;
// }
//
// public void setCovAgent(MachineDetailBean.CovAgentBean covAgent) {
// this.covAgent = covAgent;
// }
//
// public MachineDetailBean.MouldFluBean getMouldFlu() {
// return mouldFlu;
// }
//
// public void setMouldFlu(MachineDetailBean.MouldFluBean mouldFlu) {
// this.mouldFlu = mouldFlu;
// }
public List<MachineDetailBean.ProductListBean> getProductList() {
return productList;
......
......@@ -4,6 +4,7 @@ package com.wd.workoffice.retrofit;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.Config;
import com.wd.workoffice.ui.activity.mes.user.MesChooseClientActivity;
import io.reactivex.Observable;
import okhttp3.MultipartBody;
......@@ -124,6 +125,15 @@ public interface MesApiService {
@POST("/himes/api/msCustomerSales/show/page.json")
Observable<BaseMesBean> clientList(@Query("functionId") String functionId, @Body RequestBody requestBody);
/**
* 新建选择客户
*
* @return
*/
@POST("/himes/api/msSceneFeedback/createByWorkOrder.json")
Observable<BaseMesBean> userClientList(@Query("functionId") String functionId,@Body RequestBody requestBody);
/**
* 工作总结新增
*
......@@ -239,6 +249,16 @@ public interface MesApiService {
@POST("/himes/api/msContractAndSettlement/save.json")
Observable<BaseMesBean> middleAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);
/**
* otherSupplierAdd
*
* @return
*/
@POST("/himes/api/msContinuousCasterSpeed/save.json")
Observable<BaseMesBean> speedAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);
/**
* otherSupplierAdd
*
......
......@@ -40,6 +40,7 @@ import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* 搜索连铸机
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
......
......@@ -125,6 +125,12 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
TextView tvMachineName;
@BindView(R.id.tv_add2)
TextView tvAdd2;
@BindView(R.id.rv_data7)
RecyclerView rvData7;
@BindView(R.id.tv_add7)
TextView tvAdd7;
@BindView(R.id.tv_next)
TextView tvNext;
private UserDataMachineAdapter data1Adapter;
private UserDataMachineAdapter data2Adapter;
private UserDataMachineAdapter data3Adapter;
......@@ -137,9 +143,10 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
private MachineDetailBean machineDetailBean;
private UserDataMachineAdapter data5Adapter;
private UserDataMachineAdapter data6Adapter;
private UserDataMachineAdapter data7Adapter;
private List<String> data5List;
private List<String> data6List;
private List<String> data7List;
@Override
protected void initView() {
ButterKnife.bind(this);
......@@ -149,6 +156,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData6.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData7.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
......@@ -160,6 +168,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
data4List = new ArrayList<>();
data5List = new ArrayList<>();
data6List = new ArrayList<>();
data7List = new ArrayList<>();
data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List);
data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List);
......@@ -167,12 +176,15 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List);
data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List);
data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List);
data7Adapter = new UserDataMachineAdapter(R.layout.item_machine, data7List);
data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2);
data3Adapter.bindToRecyclerView(rvData3);
data4Adapter.bindToRecyclerView(rvData4);
data5Adapter.bindToRecyclerView(rvData5);
data6Adapter.bindToRecyclerView(rvData6);
data7Adapter.bindToRecyclerView(rvData7);
getData();
}
......@@ -218,20 +230,20 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
tvMiddle7.setText(castLadle.getBakingTemperature());
tvMiddle8.setText(String.valueOf(castLadle.getBakingDateTime()));
}
MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent != null) {
tvCover1.setText(covAgent.getLadleCoveringAgentName());
tvCover2.setText(covAgent.getAcidAlkaliDegree());
tvCover3.setText(covAgent.getChemicalComposition());
tvCover4.setText(covAgent.getSupplierName());
}
MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu != null) {
tvProtection1.setText(mouldFlu.getMouldFluxesName());
tvProtection2.setText(mouldFlu.getAcidAlkaliDegree());
tvProtection3.setText(mouldFlu.getChemicalComposition());
tvProtection4.setText(mouldFlu.getSupplierName());
}
// MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
// if (covAgent != null) {
// tvCover1.setText(covAgent.getLadleCoveringAgentName());
// tvCover2.setText(covAgent.getAcidAlkaliDegree());
// tvCover3.setText(covAgent.getChemicalComposition());
// tvCover4.setText(covAgent.getSupplierName());
// }
// MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
// if (mouldFlu != null) {
// tvProtection1.setText(mouldFlu.getMouldFluxesName());
// tvProtection2.setText(mouldFlu.getAcidAlkaliDegree());
// tvProtection3.setText(mouldFlu.getChemicalComposition());
// tvProtection4.setText(mouldFlu.getSupplierName());
// }
changeList();
}
});
......@@ -244,6 +256,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
data4List.clear();
data5List.clear();
data6List.clear();
data7List.clear();
if (machineDetailBean.getProductList() != null) {
for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) {
data1List.add(productListBean.getProductsName());
......@@ -280,6 +293,12 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
}
data6Adapter.notifyDataSetChanged();
}
if (machineDetailBean.getSpeeds() != null) {
for (MachineDetailBean.SpeedsBean productListBean : machineDetailBean.getSpeeds()) {
data7List.add(productListBean.getSteelGrade());
}
data7Adapter.notifyDataSetChanged();
}
}
@Override
......@@ -323,6 +342,12 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
startActivity(MesMiddleModifyActivity.class, "data", JSON.toJSONString(machineDetailBean.getSettleList().get(position)));
}
});
data7Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(MesSpeedModifyActivity.class, "data", JSON.toJSONString(machineDetailBean.getSpeeds().get(position)));
}
});
}
@Override
......@@ -331,7 +356,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
}
@OnClick({R.id.tv_next,R.id.tv_add2, R.id.tv_add5, R.id.tv_add6, R.id.rl_middle, R.id.rl_cover, R.id.rl_protection, R.id.tv_add1, R.id.tv_add3, R.id.tv_add4, R.id.rl_add})
@OnClick({R.id.tv_next, R.id.tv_add7,R.id.tv_add2, R.id.tv_add5, R.id.tv_add6, R.id.rl_middle, R.id.rl_cover, R.id.rl_protection, R.id.tv_add1, R.id.tv_add3, R.id.tv_add4, R.id.rl_add})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_next:
......@@ -341,8 +366,8 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
steelInfo.put("steelmakingWorksCode", data.getSteelmakingWorksCode());
steelInfo.put("continuousCasterCode", data.getContinuousCasterCode());
param.put("steelInfo", steelInfo);
startActivity(MesUserDataDetailAddActivity.class,"form","0"
,"data",JSON.toJSONString(param));
startActivity(MesUserDataDetailAddActivity.class, "from", "0"
, "data", JSON.toJSONString(param));
break;
case R.id.tv_add1:
startActivity(MesThreeAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode());
......@@ -362,6 +387,9 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
case R.id.tv_add6:
startActivity(MesMiddleAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode());
break;
case R.id.tv_add7:
startActivity(MesSpeedAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode());
break;
case R.id.rl_add:
startActivity(MesMiddleAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode());
break;
......@@ -425,7 +453,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
// break;
case R.id.modify:
startActivity(MesChooseMachineModifyActivity.class,
"data",JSON.toJSONString(data));
"data", JSON.toJSONString(data));
break;
}
return super.onOptionsItemSelected(item);
......@@ -466,4 +494,5 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
}
});
}
}
package com.wd.workoffice.ui.activity.mes.user;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
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.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineAddChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import org.greenrobot.eventbus.EventBus;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
import okhttp3.MediaType;
import okhttp3.RequestBody;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesSpeedAddActivity extends WorkToolBarActivity {
@BindView(R.id.tv_steel_type)
EditText tvSteelType;
@BindView(R.id.tv_speed)
EditText tvSpeed;
@BindView(R.id.rl_cover)
RelativeLayout rlCover;
@BindView(R.id.tv_cover1)
EditText tvCover1;
@BindView(R.id.tv_cover2)
EditText tvCover2;
@BindView(R.id.tv_cover3)
EditText tvCover3;
@BindView(R.id.tv_cover4)
TextView tvCover4;
@BindView(R.id.rl_cover4)
RelativeLayout rlCover4;
@BindView(R.id.ll_cover)
LinearLayout llCover;
@BindView(R.id.rl_protection)
RelativeLayout rlProtection;
@BindView(R.id.tv_protection1)
EditText tvProtection1;
@BindView(R.id.tv_protection2)
EditText tvProtection2;
@BindView(R.id.tv_protection3)
EditText tvProtection3;
@BindView(R.id.tv_protection4)
TextView tvProtection4;
@BindView(R.id.rl_protection4)
RelativeLayout rlProtection4;
@BindView(R.id.ll_protection)
LinearLayout llProtection;
// private Map<String, Object> param;
private String from;
private MachineDetailBean.SpeedsBean machineDetailBean;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
from = getIntent().getStringExtra("from");
machineDetailBean = new MachineDetailBean.SpeedsBean();
machineDetailBean.setContinuousCasterCode(getIntent().getStringExtra("continuousCasterCode"));
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_mes_user_data_speed_add;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_finish, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.finish:
submit();
break;
}
return super.onOptionsItemSelected(item);
}
private void submit() {
String speed = tvSpeed.getText().toString();
String steelType = tvSteelType.getText().toString();
if (TextUtils.isEmpty(speed)) {
toast("请输入拉速");
return;
}
if (TextUtils.isEmpty(steelType)) {
toast("请输入钢种");
return;
}
machineDetailBean.setCastingSpeed(speed);
machineDetailBean.setSteelGrade(steelType );
MachineDetailBean.SpeedsBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent == null) {
covAgent = new MachineDetailBean.SpeedsBean.CovAgentBean();
machineDetailBean.setCovAgent(covAgent);
}
covAgent.setLadleCoveringAgentName(tvCover1.getText().toString());
covAgent.setAcidAlkaliDegreeCov(tvCover2.getText().toString());
covAgent.setChemicalCompositionCov(tvCover3.getText().toString());
MachineDetailBean.SpeedsBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu == null) {
mouldFlu = new MachineDetailBean.SpeedsBean.MouldFluBean();
machineDetailBean.setMouldFlu(mouldFlu);
}
mouldFlu.setMouldFluxesName(tvProtection1.getText().toString());
mouldFlu.setAcidAlkaliDegreeFlu(tvProtection2.getText().toString());
mouldFlu.setChemicalCompositionFlu(tvProtection3.getText().toString());
if (TextUtils.equals(from, "1")) {
EventBus.getDefault().post(new AddMachineAddChildEvent(7, JSON.toJSONString(machineDetailBean)));
finish();
} else {
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), JSON.toJSONString(machineDetailBean));
RtfUtils.getMesRtf().speedAdd("1", "1", requestBody).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;
}
finish();
toast("添加成功");
EventBus.getDefault().post(new RefreshMachineEvent());
}
});
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case 10001:
if (resultCode == 10001) {
MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class);
MachineDetailBean.SpeedsBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent == null) {
covAgent = new MachineDetailBean.SpeedsBean.CovAgentBean();
machineDetailBean.setCovAgent(covAgent);
}
tvCover4.setText(modifyClient.getCustomerName());
covAgent.setSupplierCodeCov(modifyClient.getCustomerCode());
covAgent.setSupplierNameCov(modifyClient.getCustomerName());
}
break;
case 10002:
if (resultCode == 10001) {
MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class);
MachineDetailBean.SpeedsBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu == null) {
mouldFlu = new MachineDetailBean.SpeedsBean.MouldFluBean();
machineDetailBean.setMouldFlu(mouldFlu);
}
tvProtection4.setText(modifyClient.getCustomerName());
mouldFlu.setSupplierCodeFlu(modifyClient.getCustomerCode());
mouldFlu.setSupplierNameFlu(modifyClient.getCustomerName());
}
break;
}
}
@OnClick({R.id.rl_cover4, R.id.rl_protection4})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.rl_cover4:
startActivityForResult(MesChooseClientActivity.class,
10001, "from", "1");
break;
case R.id.rl_protection4:
startActivityForResult(MesChooseClientActivity.class,
10002, "from", "1");
break;
}
}
}
package com.wd.workoffice.ui.activity.mes.user;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
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.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineModifyChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import org.greenrobot.eventbus.EventBus;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
import okhttp3.MediaType;
import okhttp3.RequestBody;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesSpeedDetailActivity extends WorkToolBarActivity {
@BindView(R.id.tv_steel_type)
TextView tvSteelType;
@BindView(R.id.tv_speed)
TextView tvSpeed;
@BindView(R.id.rl_cover)
RelativeLayout rlCover;
@BindView(R.id.tv_cover1)
TextView tvCover1;
@BindView(R.id.tv_cover2)
TextView tvCover2;
@BindView(R.id.tv_cover3)
TextView tvCover3;
@BindView(R.id.tv_cover4)
TextView tvCover4;
@BindView(R.id.ll_cover)
LinearLayout llCover;
@BindView(R.id.rl_protection)
RelativeLayout rlProtection;
@BindView(R.id.tv_protection1)
TextView tvProtection1;
@BindView(R.id.tv_protection2)
TextView tvProtection2;
@BindView(R.id.tv_protection3)
TextView tvProtection3;
@BindView(R.id.tv_protection4)
TextView tvProtection4;
@BindView(R.id.ll_protection)
LinearLayout llProtection;
private String from;
private MachineDetailBean.SpeedsBean machineDetailBean;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
from = getIntent().getStringExtra("from");
machineDetailBean = JSON.parseObject(getIntent().getStringExtra("data"), MachineDetailBean.SpeedsBean.class);
MachineDetailBean.SpeedsBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent != null) {
tvCover1.setText(covAgent.getLadleCoveringAgentName());
tvCover2.setText(covAgent.getAcidAlkaliDegreeCov());
tvCover3.setText(covAgent.getChemicalCompositionCov());
tvCover4.setText(covAgent.getSupplierNameCov());
}
MachineDetailBean.SpeedsBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu != null) {
tvProtection1.setText(mouldFlu.getMouldFluxesName());
tvProtection2.setText(mouldFlu.getAcidAlkaliDegreeFlu());
tvProtection3.setText(mouldFlu.getChemicalCompositionFlu());
tvProtection4.setText(mouldFlu.getSupplierNameFlu());
}
tvSpeed.setText(machineDetailBean.getCastingSpeed());
tvSteelType.setText(machineDetailBean.getSteelGrade());
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_mes_user_data_speed_detail;
}
}
package com.wd.workoffice.ui.activity.mes.user;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
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.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineModifyChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import org.greenrobot.eventbus.EventBus;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
import okhttp3.MediaType;
import okhttp3.RequestBody;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesSpeedModifyActivity extends WorkToolBarActivity {
@BindView(R.id.tv_steel_type)
EditText tvSteelType;
@BindView(R.id.tv_speed)
EditText tvSpeed;
@BindView(R.id.rl_cover)
RelativeLayout rlCover;
@BindView(R.id.tv_cover1)
EditText tvCover1;
@BindView(R.id.tv_cover2)
EditText tvCover2;
@BindView(R.id.tv_cover3)
EditText tvCover3;
@BindView(R.id.tv_cover4)
TextView tvCover4;
@BindView(R.id.rl_cover4)
RelativeLayout rlCover4;
@BindView(R.id.ll_cover)
LinearLayout llCover;
@BindView(R.id.rl_protection)
RelativeLayout rlProtection;
@BindView(R.id.tv_protection1)
EditText tvProtection1;
@BindView(R.id.tv_protection2)
EditText tvProtection2;
@BindView(R.id.tv_protection3)
EditText tvProtection3;
@BindView(R.id.tv_protection4)
TextView tvProtection4;
@BindView(R.id.rl_protection4)
RelativeLayout rlProtection4;
@BindView(R.id.ll_protection)
LinearLayout llProtection;
private String from;
private MachineDetailBean.SpeedsBean machineDetailBean;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
from = getIntent().getStringExtra("from");
machineDetailBean = JSON.parseObject(getIntent().getStringExtra("data"), MachineDetailBean.SpeedsBean.class);
MachineDetailBean.SpeedsBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent != null) {
tvCover1.setText(covAgent.getLadleCoveringAgentName());
tvCover2.setText(covAgent.getAcidAlkaliDegreeCov());
tvCover3.setText(covAgent.getChemicalCompositionCov());
tvCover4.setText(covAgent.getSupplierNameCov());
}
MachineDetailBean.SpeedsBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu != null) {
tvProtection1.setText(mouldFlu.getMouldFluxesName());
tvProtection2.setText(mouldFlu.getAcidAlkaliDegreeFlu());
tvProtection3.setText(mouldFlu.getChemicalCompositionFlu());
tvProtection4.setText(mouldFlu.getSupplierNameFlu());
}
tvSpeed.setText(machineDetailBean.getCastingSpeed());
tvSteelType.setText(machineDetailBean.getSteelGrade());
}
private void submit() {
String speed = tvSpeed.getText().toString();
String steelType = tvSteelType.getText().toString();
if (TextUtils.isEmpty(speed)) {
toast("请输入拉速");
return;
}
if (TextUtils.isEmpty(steelType)) {
toast("请输入钢种");
return;
}
machineDetailBean.setCastingSpeed(speed);
machineDetailBean.setSteelGrade(steelType);
if (TextUtils.equals(from, "1")) {
EventBus.getDefault().post(new AddMachineModifyChildEvent(7, JSON.toJSONString(machineDetailBean)
, Integer.valueOf(getIntent().getStringExtra("position"))));
finish();
return;
}
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), JSON.toJSONString(machineDetailBean));
RtfUtils.getMesRtf().speedAdd("1", "2", requestBody).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;
}
finish();
toast("编辑成功");
EventBus.getDefault().post(new RefreshMachineEvent());
}
});
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_mes_user_data_speed_add;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_finish, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.finish:
submit();
break;
}
return super.onOptionsItemSelected(item);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case 10001:
if (resultCode == 10001) {
MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class);
MachineDetailBean.SpeedsBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent == null) {
covAgent = new MachineDetailBean.SpeedsBean.CovAgentBean();
machineDetailBean.setCovAgent(covAgent);
}
tvCover4.setText(modifyClient.getCustomerName());
covAgent.setSupplierCodeCov(modifyClient.getCustomerCode());
covAgent.setSupplierNameCov(modifyClient.getCustomerName());
}
break;
case 10002:
if (resultCode == 10001) {
MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class);
MachineDetailBean.SpeedsBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu == null) {
mouldFlu = new MachineDetailBean.SpeedsBean.MouldFluBean();
machineDetailBean.setMouldFlu(mouldFlu);
}
tvProtection4.setText(modifyClient.getCustomerName());
mouldFlu.setSupplierCodeFlu(modifyClient.getCustomerCode());
mouldFlu.setSupplierNameFlu(modifyClient.getCustomerName());
}
break;
}
}
@OnClick({R.id.rl_cover4, R.id.rl_protection4})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.rl_cover4:
startActivityForResult(MesChooseClientActivity.class,
10001, "from", "1");
break;
case R.id.rl_protection4:
startActivityForResult(MesChooseClientActivity.class,
10002, "from", "1");
break;
}
}
}
package com.wd.workoffice.ui.activity.mes.user;
import android.content.Intent;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddUserDataEvent;
import com.wd.workoffice.bean.mesBean.MesClientBean;
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.UserDataClientAdapter;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
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 butterknife.OnClick;
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 MesUserClientActivity extends WorkToolBarActivity {
@BindView(R.id.et_key)
EditText etKey;
@BindView(R.id.btn_search)
Button btnSearch;
@BindView(R.id.rv_client)
RecyclerView rvClient;
private Map<String, Object> param;
private List<MesClientBean.ListBean> clientList;
private UserDataClientAdapter clientAdapter;
private int page = 1;
private Map<String, Object> paramMap;
@Override
protected void initView() {
ButterKnife.bind(this);
rvClient.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
clientList = new ArrayList<>();
clientAdapter = new UserDataClientAdapter(R.layout.item_user_data_client, clientList);
clientAdapter.bindToRecyclerView(rvClient);
clientAdapter.setEmptyView(R.layout.view_empty_content, rvClient);
param = WorkUtils.pageMesKey();
paramMap = WorkUtils.simpleParam();
// param.put("pageNum", 1);
// param.put("paramMap",paramMap);
getData();
}
private void getData() {
RtfUtils.getMesRtf().userClientList("1",WorkUtils.convertMapToBody(paramMap)).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<MesClientBean.ListBean> getList = JSON.parseArray(data.getData().toString(), MesClientBean.ListBean.class);
// if (page == 1) {
clientList.clear();
clientList.addAll(getList);
clientAdapter.notifyDataSetChanged();
// clientAdapter.loadMoreComplete();
// } else {
// clientAdapter.loadMoreComplete();
// clientList.addAll(getList);
// clientAdapter.notifyDataSetChanged();
// }
// if (getList.size() == 0) {
// clientAdapter.loadMoreEnd();
// } else {
// page++;
// }
toast("搜索成功");
}
});
}
@Override
protected void initEvent() {
// clientAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
// @Override
// public void onLoadMoreRequested() {
// param.put("pageNum", page);
// getData();
// }
// }, rvClient);
clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
MesClientBean.ListBean chooseClient = clientList.get(position);
if (TextUtils.equals("1",getIntent().getStringExtra("from"))){//
Intent intent =new Intent();
intent.putExtra("data",JSON.toJSONString(chooseClient));
setResult(10001,intent);
finish();
}else{
UserDataBean.ListBean userDataBean = new UserDataBean.ListBean();
userDataBean.setCustomerUserCode(chooseClient.getCustomerUserCode());
userDataBean.setCustomerUserName(chooseClient.getCustomerUserName());
userDataBean.setSalesCompanyCode(chooseClient.getSalesCompanyCode());
userDataBean.setSalesCompanyName(chooseClient.getSalesCompanyName());
userDataBean.setSalesManagerCode(chooseClient.getSalesManagerCode());
userDataBean.setSalesManagerName(chooseClient.getSalesManagerName());
startActivity(MesUserDataAdd2Activity.class, "data", JSON.toJSONString(userDataBean));
}
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_bat_sale_client;
}
@OnClick(R.id.btn_search)
public void onViewClicked() {
paramMap.put("customerName", etKey.getText().toString());
param.put("pageNum", 1);
page = 1;
getData();
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(AddUserDataEvent event) {
finish();
}
}
\ No newline at end of file
......@@ -60,38 +60,8 @@ public class MesUserDataAdd2Activity extends WorkToolBarActivity {
tvClient.setText(data.getCustomerUserName());
tvCompany.setText(data.getSalesCompanyName());
tvManager.setText(data.getSalesManagerName());
// getData();
}
private void getData() {
RtfUtils.getRtf().getAccount().compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseBean data) {
hideLoading();
if (data.getCode() != 0) {
toast(data.getMessage());
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()));
}
});
}
@Override
protected void initEvent() {
......@@ -102,33 +72,6 @@ public class MesUserDataAdd2Activity extends WorkToolBarActivity {
return R.layout.activity_mes_user_data_add2;
}
// @Override
// public boolean onCreateOptionsMenu(Menu menu) {
// getMenuInflater().inflate(R.menu.menu_finish, menu);
// return super.onCreateOptionsMenu(menu);
// }
//
// @Override
// public boolean onOptionsItemSelected(MenuItem item) {
// switch (item.getItemId()) {
// case R.id.finish:
// startActivity(MesUserDataAdd3Activity.class);
// break;
// }
// return super.onOptionsItemSelected(item);
// }
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 10001 && resultCode == 10001) {
String clientName = data.getStringExtra("clientName");
// clientId = data.getIntExtra("id", 0);
// tvClient.setText(clientName);
}
}
@OnClick(R.id.rl_factory)
public void onViewClicked() {
......
......@@ -26,7 +26,6 @@ public class MesUserDataAddActivity extends WorkToolBarActivity {
TextView tvClient;
@BindView(R.id.rl_client)
RelativeLayout rlClient;
private AccountBean dataBean;
@Override
protected void initView() {
......@@ -66,7 +65,7 @@ public class MesUserDataAddActivity extends WorkToolBarActivity {
@OnClick(R.id.rl_client)
public void onViewClicked() {
// startActivityForResult(MesChooseClientActivity.class, 10001);
startActivity(MesChooseClientActivity.class);
startActivity(MesUserClientActivity.class);
}
......
package com.wd.workoffice.ui.activity.mes.user;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.Menu;
......@@ -25,13 +26,8 @@ import com.wd.workoffice.bean.mesBean.UserDataDetailBean;
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.UserDataAdd3AddAdapter;
import com.wd.workoffice.ui.adapter.UserDataAdd3LabelAdapter;
import com.wd.workoffice.ui.adapter.UserDataAdd3LabelAddAdapter;
import com.wd.workoffice.ui.adapter.UserDataAdd3RefAdapter;
import com.wd.workoffice.ui.adapter.UserDataAdd3RefAddAdapter;
import com.wd.workoffice.ui.adapter.UserDataDetailFactory1Adapter;
import com.wd.workoffice.ui.adapter.UserDataDetailFactory2Adapter;
import com.wd.workoffice.ui.adapter.UserDataMachineAdapter;
import com.wd.workoffice.util.WorkUtils;
......@@ -181,6 +177,10 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
TextView tvAdd2;
@BindView(R.id.tv_machine_name)
TextView tvMachineName;
@BindView(R.id.rv_data7)
RecyclerView rvData7;
@BindView(R.id.tv_add7)
TextView tvAdd7;
private UserDataMachineAdapter data1Adapter;
private UserDataMachineAdapter data2Adapter;
private UserDataMachineAdapter data3Adapter;
......@@ -199,8 +199,10 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
private UserDataMachineAdapter data5Adapter;
private UserDataMachineAdapter data6Adapter;
private UserDataMachineAdapter data7Adapter;
private List<String> data5List;
private List<String> data6List;
private List<String> data7List;
private UserDataDetailBean userDataDetailBean;
......@@ -216,12 +218,14 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
tvAdd4.setVisibility(View.GONE);
tvAdd5.setVisibility(View.GONE);
tvAdd6.setVisibility(View.GONE);
tvAdd7.setVisibility(View.GONE);
rvData1.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData3.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData6.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData7.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvFactoryData1.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvFactoryData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
......@@ -236,18 +240,21 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
data4List = new ArrayList<>();
data5List = new ArrayList<>();
data6List = new ArrayList<>();
data7List = new ArrayList<>();
data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List);
data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List);
data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List);
data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List);
data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List);
data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List);
data7Adapter = new UserDataMachineAdapter(R.layout.item_machine, data7List);
data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2);
data3Adapter.bindToRecyclerView(rvData3);
data4Adapter.bindToRecyclerView(rvData4);
data5Adapter.bindToRecyclerView(rvData5);
data6Adapter.bindToRecyclerView(rvData6);
data7Adapter.bindToRecyclerView(rvData7);
dataFactory1List = new ArrayList<>();
dataFactory2List = new ArrayList<>();
dataFactory3List = new ArrayList<>();
......@@ -401,20 +408,20 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
tvMiddle7.setText(castLadle.getBakingTemperature());
tvMiddle8.setText(TimeUtils.millis2String(castLadle.getBakingDateTime()));
}
MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent != null) {
tvCover1.setText(covAgent.getLadleCoveringAgentName());
tvCover2.setText(covAgent.getAcidAlkaliDegree());
tvCover3.setText(covAgent.getChemicalComposition());
tvCover4.setText(covAgent.getSupplierName());
}
MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu != null) {
tvProtection1.setText(mouldFlu.getMouldFluxesName());
tvProtection2.setText(mouldFlu.getAcidAlkaliDegree());
tvProtection3.setText(mouldFlu.getChemicalComposition());
tvProtection4.setText(mouldFlu.getSupplierName());
}
// MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
// if (covAgent != null) {
// tvCover1.setText(covAgent.getLadleCoveringAgentName());
// tvCover2.setText(covAgent.getAcidAlkaliDegree());
// tvCover3.setText(covAgent.getChemicalComposition());
// tvCover4.setText(covAgent.getSupplierName());
// }
// MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
// if (mouldFlu != null) {
// tvProtection1.setText(mouldFlu.getMouldFluxesName());
// tvProtection2.setText(mouldFlu.getAcidAlkaliDegree());
// tvProtection3.setText(mouldFlu.getChemicalComposition());
// tvProtection4.setText(mouldFlu.getSupplierName());
// }
changeList();
}
});
......@@ -427,6 +434,7 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
data4List.clear();
data5List.clear();
data6List.clear();
data7List.clear();
if (machineDetailBean.getProductList() != null) {
for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) {
data1List.add(productListBean.getProductsName());
......@@ -463,6 +471,12 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
}
data6Adapter.notifyDataSetChanged();
}
if (machineDetailBean.getSpeeds() != null) {
for (MachineDetailBean.SpeedsBean productListBean : machineDetailBean.getSpeeds()) {
data7List.add(productListBean.getSteelGrade());
}
data7Adapter.notifyDataSetChanged();
}
}
@Override
......@@ -503,6 +517,12 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
startActivity(MesMiddleDetailActivity.class, "data", JSON.toJSONString(machineDetailBean.getSettleList().get(position)));
}
});
data7Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(MesSpeedDetailActivity.class, "data", JSON.toJSONString(machineDetailBean.getSpeeds().get(position)));
}
});
}
@Override
......@@ -511,10 +531,17 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
}
@OnClick({R.id.tv_add5, R.id.tv_add6, R.id.btn_agree,
R.id.btn_refuse, R.id.tv_add1, R.id.tv_add3, R.id.tv_add4, R.id.rl_add,R.id.rl_middle,R.id.rl_cover,R.id.rl_protection})
@OnClick({R.id.tv_add7,R.id.tv_add5, R.id.tv_add6, R.id.btn_agree,
R.id.btn_refuse, R.id.tv_add1, R.id.tv_add3, R.id.tv_add4, R.id.rl_add, R.id.rl_middle, R.id.rl_cover, R.id.rl_protection})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_add7:
if (userDataDetailBean == null) {
toast("数据加载中,请稍后");
return;
}
startActivity(MesSpeedAddActivity.class, "continuousCasterCode", userDataDetailBean.getSteelInfo().getContinuousCasterCode());
break;
case R.id.tv_add1:
if (userDataDetailBean == null) {
toast("数据加载中,请稍后");
......
package com.wd.workoffice.ui.adapter;
import android.text.TextUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
......@@ -20,7 +22,7 @@ public class UserDataClientAdapter extends BaseQuickAdapter<MesClientBean.ListBe
@Override
protected void convert(BaseViewHolder helper, MesClientBean.ListBean item) {
helper.setText(R.id.tv_name, item.getCustomerName());
helper.setText(R.id.tv_name, TextUtils.isEmpty(item.getCustomerUserName())?item.getCustomerName():item.getCustomerUserName());
helper.setText(R.id.tv_person, item.getSalesCompanyName());
helper.setText(R.id.tv_sale, item.getSalesManagerName());
......
......@@ -289,7 +289,6 @@
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="horizontal"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
......@@ -315,7 +314,6 @@
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="horizontal"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
......@@ -340,7 +338,6 @@
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
......@@ -462,6 +459,7 @@
<View style="@style/dividerX" />
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
......@@ -485,9 +483,10 @@
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
......@@ -511,7 +510,7 @@
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:id="@+id/rl_middle"
......@@ -756,9 +755,10 @@
</RelativeLayout>
</LinearLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:visibility="gone"
android:id="@+id/rl_cover"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -781,9 +781,10 @@
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<LinearLayout
android:visibility="gone"
android:id="@+id/ll_cover"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -897,9 +898,10 @@
</RelativeLayout>
</LinearLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:visibility="gone"
android:id="@+id/rl_protection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -927,6 +929,7 @@
<LinearLayout
android:id="@+id/ll_protection"
android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical"
......@@ -1036,12 +1039,48 @@
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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="15sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data7"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_add7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="添加 +"
android:textSize="16sp" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:layout_marginTop="10mm"
android:paddingVertical="9mm">
<TextView
......
......@@ -491,6 +491,7 @@
<View style="@style/dividerX" />
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
......@@ -514,9 +515,10 @@
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
......@@ -540,7 +542,7 @@
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:id="@+id/rl_middle"
......@@ -789,6 +791,7 @@
<RelativeLayout
android:id="@+id/rl_cover"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
......@@ -810,10 +813,11 @@
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<LinearLayout
android:id="@+id/ll_cover"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
......@@ -926,12 +930,13 @@
</RelativeLayout>
</LinearLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:id="@+id/rl_protection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
......@@ -951,10 +956,11 @@
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<LinearLayout
android:id="@+id/ll_protection"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
......@@ -1066,12 +1072,47 @@
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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="15sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data7"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_add7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="添加 +"
android:textSize="16sp" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:layout_marginTop="10mm"
android:paddingVertical="9mm">
<TextView
......
......@@ -129,6 +129,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data3"
android:layout_width="match_parent"
android:layout_marginTop="10mm"
android:layout_height="wrap_content"
/>
......
......@@ -97,6 +97,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:visibility="gone"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
......@@ -125,6 +126,7 @@
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:visibility="gone"
android:paddingVertical="9mm">
<TextView
......@@ -145,7 +147,7 @@
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:id="@+id/rl_middle"
......@@ -398,13 +400,14 @@
</RelativeLayout>
</LinearLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:id="@+id/rl_cover"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:visibility="gone"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
......@@ -423,10 +426,11 @@
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<LinearLayout
android:id="@+id/ll_cover"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
......@@ -556,6 +560,7 @@
android:id="@+id/rl_protection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
......@@ -575,9 +580,10 @@
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<LinearLayout
android:visibility="gone"
android:id="@+id/ll_protection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -701,12 +707,47 @@
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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="15sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data7"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_add7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="添加 +"
android:textSize="16sp" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:layout_marginTop="10mm"
android:paddingVertical="9mm">
<TextView
......
......@@ -93,6 +93,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
......@@ -114,13 +115,14 @@
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:visibility="gone"
android:paddingVertical="9mm">
<TextView
......@@ -140,13 +142,14 @@
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:id="@+id/rl_middle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
......@@ -172,6 +175,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm">
......@@ -392,6 +396,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:visibility="gone"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
......@@ -410,12 +415,13 @@
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<LinearLayout
android:id="@+id/ll_cover"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:background="@android:color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm">
......@@ -526,13 +532,14 @@
</RelativeLayout>
</LinearLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:id="@+id/rl_protection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:visibility="gone"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
......@@ -551,12 +558,13 @@
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<LinearLayout
android:id="@+id/ll_protection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:background="@android:color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm">
......@@ -673,6 +681,43 @@
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="15sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data7"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_add7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="添加 +"
android:textSize="16sp" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:layout_marginTop="10mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -14,11 +14,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -113,9 +108,10 @@
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
......@@ -139,9 +135,10 @@
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
......@@ -410,10 +407,11 @@
</RelativeLayout>
</LinearLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<RelativeLayout
android:id="@+id/rl_cover"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
......@@ -435,10 +433,11 @@
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<LinearLayout
android:id="@+id/ll_cover"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
......@@ -554,6 +553,7 @@
<View style="@style/dividerX" />
<RelativeLayout
android:visibility="gone"
android:id="@+id/rl_protection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -576,9 +576,10 @@
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<View style="@style/dividerX" />
<!--<View style="@style/dividerX" />-->
<LinearLayout
android:visibility="gone"
android:id="@+id/ll_protection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -691,7 +692,41 @@
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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="15sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data7"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_add7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="添加 +"
android:textSize="16sp" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论