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

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

2.//TODO 设备三个子菜单,坩埚下单,mes其他页面,编辑任务担当无法修改.支数参数
上级 352408f4
...@@ -1252,6 +1252,14 @@ ...@@ -1252,6 +1252,14 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.user.MesUserClientActivity"
android:configChanges="keyboardHidden|orientation"
android:label="选择客户"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity <activity
android:name=".ui.activity.mes.ticket.MesTicketLogActivity" android:name=".ui.activity.mes.ticket.MesTicketLogActivity"
android:configChanges="orientation|screenSize|keyboardHidden" android:configChanges="orientation|screenSize|keyboardHidden"
...@@ -1921,6 +1929,31 @@ ...@@ -1921,6 +1929,31 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.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 <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="com.wd.workoffice.fileprovider" android:authorities="com.wd.workoffice.fileprovider"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -58,6 +58,25 @@ public class MesClientBean extends BaseMesPageBean { ...@@ -58,6 +58,25 @@ public class MesClientBean extends BaseMesPageBean {
private Object updateUserName; private Object updateUserName;
private String remark; private String remark;
private Object delete; 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() { public String getId() {
return id; return id;
......
...@@ -33,14 +33,15 @@ public class UserDataDetailBean { ...@@ -33,14 +33,15 @@ public class UserDataDetailBean {
*/ */
private MachineDetailBean.CastInfoBean castInfo; private MachineDetailBean.CastInfoBean castInfo;
private MachineDetailBean.CastLadleBean castLadle; private MachineDetailBean.CastLadleBean castLadle;
private MachineDetailBean.CovAgentBean covAgent; // private MachineDetailBean.CovAgentBean covAgent;
private MachineDetailBean.MouldFluBean mouldFlu; // private MachineDetailBean.MouldFluBean mouldFlu;
private List<MachineDetailBean.ProductListBean> productList; private List<MachineDetailBean.ProductListBean> productList;
private List<MachineDetailBean.SupplyListBean> supplyList; private List<MachineDetailBean.SupplyListBean> supplyList;
private List<MachineDetailBean.StockListBean> stockList; private List<MachineDetailBean.StockListBean> stockList;
private List<MachineDetailBean.OtherSupListBean> otherSupList; private List<MachineDetailBean.OtherSupListBean> otherSupList;
private List<MachineDetailBean.OtherLadleListBean> otherLadleList; private List<MachineDetailBean.OtherLadleListBean> otherLadleList;
private List<MachineDetailBean.SettleListBean> settleList; private List<MachineDetailBean.SettleListBean> settleList;
private List<MachineDetailBean.SpeedsBean> speeds;
private Object id; private Object id;
private Object createDateTime; private Object createDateTime;
private Object updateDateTime; private Object updateDateTime;
...@@ -52,6 +53,14 @@ public class UserDataDetailBean { ...@@ -52,6 +53,14 @@ public class UserDataDetailBean {
private List<FactoryDetailBean.SteelLadleListBean> steelLadleList; private List<FactoryDetailBean.SteelLadleListBean> steelLadleList;
private Object delete; private Object delete;
public List<MachineDetailBean.SpeedsBean> getSpeeds() {
return speeds;
}
public void setSpeeds(List<MachineDetailBean.SpeedsBean> speeds) {
this.speeds = speeds;
}
public MachineDetailBean.CastInfoBean getCastInfo() { public MachineDetailBean.CastInfoBean getCastInfo() {
return castInfo; return castInfo;
} }
...@@ -68,21 +77,21 @@ public class UserDataDetailBean { ...@@ -68,21 +77,21 @@ public class UserDataDetailBean {
this.castLadle = castLadle; this.castLadle = castLadle;
} }
public MachineDetailBean.CovAgentBean getCovAgent() { // public MachineDetailBean.CovAgentBean getCovAgent() {
return covAgent; // return covAgent;
} // }
//
public void setCovAgent(MachineDetailBean.CovAgentBean covAgent) { // public void setCovAgent(MachineDetailBean.CovAgentBean covAgent) {
this.covAgent = covAgent; // this.covAgent = covAgent;
} // }
//
public MachineDetailBean.MouldFluBean getMouldFlu() { // public MachineDetailBean.MouldFluBean getMouldFlu() {
return mouldFlu; // return mouldFlu;
} // }
//
public void setMouldFlu(MachineDetailBean.MouldFluBean mouldFlu) { // public void setMouldFlu(MachineDetailBean.MouldFluBean mouldFlu) {
this.mouldFlu = mouldFlu; // this.mouldFlu = mouldFlu;
} // }
public List<MachineDetailBean.ProductListBean> getProductList() { public List<MachineDetailBean.ProductListBean> getProductList() {
return productList; return productList;
......
...@@ -4,6 +4,7 @@ package com.wd.workoffice.retrofit; ...@@ -4,6 +4,7 @@ package com.wd.workoffice.retrofit;
import com.wd.workoffice.app.BaseBean; import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.Config; import com.wd.workoffice.app.Config;
import com.wd.workoffice.ui.activity.mes.user.MesChooseClientActivity;
import io.reactivex.Observable; import io.reactivex.Observable;
import okhttp3.MultipartBody; import okhttp3.MultipartBody;
...@@ -124,6 +125,15 @@ public interface MesApiService { ...@@ -124,6 +125,15 @@ public interface MesApiService {
@POST("/himes/api/msCustomerSales/show/page.json") @POST("/himes/api/msCustomerSales/show/page.json")
Observable<BaseMesBean> clientList(@Query("functionId") String functionId, @Body RequestBody requestBody); 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 { ...@@ -239,6 +249,16 @@ public interface MesApiService {
@POST("/himes/api/msContractAndSettlement/save.json") @POST("/himes/api/msContractAndSettlement/save.json")
Observable<BaseMesBean> middleAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody); 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 * otherSupplierAdd
* *
......
...@@ -40,6 +40,7 @@ import flexible.xd.android_base.network.rtfhttp.Transformer; ...@@ -40,6 +40,7 @@ import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable; import io.reactivex.disposables.Disposable;
/** /**
* 搜索连铸机
* author : flexible * author : flexible
* email : lgd19940421@163.com * email : lgd19940421@163.com
* github: https://github.com/FlexibleXd * github: https://github.com/FlexibleXd
......
package com.wd.workoffice.ui.activity.mes.user; package com.wd.workoffice.ui.activity.mes.user;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
...@@ -22,7 +20,6 @@ import com.wd.workoffice.bean.event.AddMachineEvent; ...@@ -22,7 +20,6 @@ import com.wd.workoffice.bean.event.AddMachineEvent;
import com.wd.workoffice.bean.event.AddMachineModifyChildEvent; import com.wd.workoffice.bean.event.AddMachineModifyChildEvent;
import com.wd.workoffice.bean.event.AddUserDataEvent; import com.wd.workoffice.bean.event.AddUserDataEvent;
import com.wd.workoffice.bean.mesBean.MachineDetailBean; import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import com.wd.workoffice.bean.mesBean.UserDataBean; 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;
...@@ -36,13 +33,13 @@ import java.util.ArrayList; ...@@ -36,13 +33,13 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer; import flexible.xd.android_base.network.rtfhttp.Transformer;
import flexible.xd.android_base.utils.LogUtils;
import io.reactivex.disposables.Disposable; import io.reactivex.disposables.Disposable;
import okhttp3.MediaType; import okhttp3.MediaType;
import okhttp3.RequestBody; import okhttp3.RequestBody;
...@@ -138,6 +135,12 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -138,6 +135,12 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
EditText tvMachineName; EditText tvMachineName;
@BindView(R.id.tv_add2) @BindView(R.id.tv_add2)
TextView tvAdd2; 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 data1Adapter;
private UserDataMachineAdapter data2Adapter; private UserDataMachineAdapter data2Adapter;
private UserDataMachineAdapter data3Adapter; private UserDataMachineAdapter data3Adapter;
...@@ -150,8 +153,10 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -150,8 +153,10 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
private MachineDetailBean machineDetailBean = new MachineDetailBean(); private MachineDetailBean machineDetailBean = new MachineDetailBean();
private UserDataMachineAdapter data5Adapter; private UserDataMachineAdapter data5Adapter;
private UserDataMachineAdapter data6Adapter; private UserDataMachineAdapter data6Adapter;
private UserDataMachineAdapter data7Adapter;
private List<String> data5List; private List<String> data5List;
private List<String> data6List; private List<String> data6List;
private List<String> data7List;
@Override @Override
protected void initView() { protected void initView() {
...@@ -162,6 +167,7 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -162,6 +167,7 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData6.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData6.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData7.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
} }
@Override @Override
...@@ -174,19 +180,21 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -174,19 +180,21 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
data4List = new ArrayList<>(); data4List = new ArrayList<>();
data5List = new ArrayList<>(); data5List = new ArrayList<>();
data6List = new ArrayList<>(); data6List = new ArrayList<>();
data7List = new ArrayList<>();
data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List); data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List);
data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List); data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List);
data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List); data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List);
data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List); data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List);
data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List); data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List);
data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List); data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List);
data7Adapter = new UserDataMachineAdapter(R.layout.item_machine, data7List);
data1Adapter.bindToRecyclerView(rvData1); data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2); data2Adapter.bindToRecyclerView(rvData2);
data3Adapter.bindToRecyclerView(rvData3); data3Adapter.bindToRecyclerView(rvData3);
data4Adapter.bindToRecyclerView(rvData4); data4Adapter.bindToRecyclerView(rvData4);
data5Adapter.bindToRecyclerView(rvData5); data5Adapter.bindToRecyclerView(rvData5);
data6Adapter.bindToRecyclerView(rvData6); data6Adapter.bindToRecyclerView(rvData6);
data7Adapter.bindToRecyclerView(rvData7);
} }
...@@ -238,6 +246,13 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -238,6 +246,13 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
"position", position + "", "from", "1", "data", JSON.toJSONString(machineDetailBean.getSettleList().get(position))); "position", position + "", "from", "1", "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,
"position", position + "", "from", "1", "data", JSON.toJSONString(machineDetailBean.getSpeeds().get(position)));
}
});
} }
@Override @Override
...@@ -276,26 +291,26 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -276,26 +291,26 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
castLadle.setBakingDateTime(Long.valueOf(tvMiddle8.getText().toString())); castLadle.setBakingDateTime(Long.valueOf(tvMiddle8.getText().toString()));
} }
MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent(); // MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent == null) { // if (covAgent == null) {
covAgent = new MachineDetailBean.CovAgentBean(); // covAgent = new MachineDetailBean.CovAgentBean();
machineDetailBean.setCovAgent(covAgent); // machineDetailBean.setCovAgent(covAgent);
} // }
covAgent.setLadleCoveringAgentName(tvCover1.getText().toString()); // covAgent.setLadleCoveringAgentName(tvCover1.getText().toString());
covAgent.setAcidAlkaliDegree(tvCover2.getText().toString()); // covAgent.setAcidAlkaliDegree(tvCover2.getText().toString());
covAgent.setChemicalComposition(tvCover3.getText().toString()); // covAgent.setChemicalComposition(tvCover3.getText().toString());
covAgent.setSupplierName(tvCover4.getText().toString()); // covAgent.setSupplierName(tvCover4.getText().toString());
//
//
MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu(); // MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu == null) { // if (mouldFlu == null) {
mouldFlu = new MachineDetailBean.MouldFluBean(); // mouldFlu = new MachineDetailBean.MouldFluBean();
machineDetailBean.setMouldFlu(mouldFlu); // machineDetailBean.setMouldFlu(mouldFlu);
} // }
mouldFlu.setMouldFluxesName(tvProtection1.getText().toString()); // mouldFlu.setMouldFluxesName(tvProtection1.getText().toString());
mouldFlu.setAcidAlkaliDegree(tvProtection2.getText().toString()); // mouldFlu.setAcidAlkaliDegree(tvProtection2.getText().toString());
mouldFlu.setChemicalComposition(tvProtection3.getText().toString()); // mouldFlu.setChemicalComposition(tvProtection3.getText().toString());
mouldFlu.setSupplierName(tvProtection4.getText().toString()); // mouldFlu.setSupplierName(tvProtection4.getText().toString());
} }
private void changeList() { private void changeList() {
...@@ -305,6 +320,7 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -305,6 +320,7 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
data4List.clear(); data4List.clear();
data5List.clear(); data5List.clear();
data6List.clear(); data6List.clear();
data7List.clear();
if (machineDetailBean.getProductList() != null) { if (machineDetailBean.getProductList() != null) {
for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) { for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) {
data1List.add(productListBean.getProductsName()); data1List.add(productListBean.getProductsName());
...@@ -341,9 +357,15 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -341,9 +357,15 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
} }
data6Adapter.notifyDataSetChanged(); data6Adapter.notifyDataSetChanged();
} }
if (machineDetailBean.getSpeeds() != null) {
for (MachineDetailBean.SpeedsBean productListBean : machineDetailBean.getSpeeds()) {
data7List.add(productListBean.getSteelGrade());
}
data7Adapter.notifyDataSetChanged();
}
} }
@OnClick({R.id.tv_next,R.id.tv_add2, R.id.rl_cover4, R.id.rl_protection4, 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.rl_cover4, R.id.rl_protection4, 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) { public void onViewClicked(View view) {
switch (view.getId()) { switch (view.getId()) {
case R.id.tv_next: case R.id.tv_next:
...@@ -356,6 +378,10 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -356,6 +378,10 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
startActivityForResult(MesChooseClientActivity.class, startActivityForResult(MesChooseClientActivity.class,
10002, "from", "1"); 10002, "from", "1");
break; break;
case R.id.tv_add7:
startActivity(MesSpeedAddActivity.class,
"from", "1", "continuousCasterCode", data.getContinuousCasterCode());
break;
case R.id.tv_add1: case R.id.tv_add1:
startActivity(MesThreeAddActivity.class, startActivity(MesThreeAddActivity.class,
"from", "1", "continuousCasterCode", data.getContinuousCasterCode()); "from", "1", "continuousCasterCode", data.getContinuousCasterCode());
...@@ -467,6 +493,13 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -467,6 +493,13 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
} }
machineDetailBean.getSettleList().add(JSON.parseObject(event.getData(), MachineDetailBean.SettleListBean.class)); machineDetailBean.getSettleList().add(JSON.parseObject(event.getData(), MachineDetailBean.SettleListBean.class));
break; break;
case 7:
List<MachineDetailBean.SpeedsBean> speedList = machineDetailBean.getSpeeds();
if (speedList == null) {
machineDetailBean.setSpeeds(new ArrayList<>());
}
machineDetailBean.getSpeeds().add(JSON.parseObject(event.getData(), MachineDetailBean.SpeedsBean.class));
break;
} }
changeList(); changeList();
} }
...@@ -522,6 +555,14 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -522,6 +555,14 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
settleList.remove(event.getPosition()); settleList.remove(event.getPosition());
settleList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.SettleListBean.class)); settleList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.SettleListBean.class));
break; break;
case 7:
List<MachineDetailBean.SpeedsBean> speedList = machineDetailBean.getSpeeds();
if (speedList == null) {
machineDetailBean.setSpeeds(new ArrayList<>());
}
speedList.remove(event.getPosition());
speedList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.SpeedsBean.class));
break;
} }
changeList(); changeList();
} }
...@@ -536,7 +577,7 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -536,7 +577,7 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) { switch (item.getItemId()) {
case R.id.finish: case R.id.finish:
if (TextUtils.isEmpty(tvMachineName.getText().toString())){ if (TextUtils.isEmpty(tvMachineName.getText().toString())) {
toast("请输入连铸机名称"); toast("请输入连铸机名称");
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
} }
...@@ -569,9 +610,9 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -569,9 +610,9 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
for (Map.Entry<String, Object> machineEntry : machineMap.entrySet()) { for (Map.Entry<String, Object> machineEntry : machineMap.entrySet()) {
param.put(machineEntry.getKey(), machineEntry.getValue()); param.put(machineEntry.getKey(), machineEntry.getValue());
} }
LogUtils.LOGE("flexible", JSON.toJSONString(param, true));
startActivity(MesUserDataDetailAddActivity.class,"from","1" startActivity(MesUserDataDetailAddActivity.class, "from", "1"
,"data",JSON.toJSONString(param)); , "data", JSON.toJSONString(param));
// showLoading(); // showLoading();
// RtfUtils.getMesRtf().userDataAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() { // RtfUtils.getMesRtf().userDataAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
...@@ -627,40 +668,9 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -627,40 +668,9 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
}); });
} }
@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.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent == null) {
covAgent = new MachineDetailBean.CovAgentBean();
machineDetailBean.setCovAgent(covAgent);
}
tvCover4.setText(modifyClient.getCustomerName());
covAgent.setSupplierCode(modifyClient.getCustomerCode());
covAgent.setSupplierName(modifyClient.getCustomerName());
}
break;
case 10002:
if (resultCode == 10001) {
MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class);
MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu == null) {
mouldFlu = new MachineDetailBean.MouldFluBean();
machineDetailBean.setMouldFlu(mouldFlu);
}
tvProtection4.setText(modifyClient.getCustomerName());
mouldFlu.setSupplierCode(modifyClient.getCustomerCode());
mouldFlu.setSupplierCode(modifyClient.getCustomerName());
}
break;
}
}
@Subscribe @Subscribe
public void refresh(AddUserDataEvent event) { public void refresh(AddUserDataEvent event) {
finish(); finish();
} }
} }
...@@ -125,6 +125,12 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -125,6 +125,12 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
TextView tvMachineName; TextView tvMachineName;
@BindView(R.id.tv_add2) @BindView(R.id.tv_add2)
TextView tvAdd2; 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 data1Adapter;
private UserDataMachineAdapter data2Adapter; private UserDataMachineAdapter data2Adapter;
private UserDataMachineAdapter data3Adapter; private UserDataMachineAdapter data3Adapter;
...@@ -137,9 +143,10 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -137,9 +143,10 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
private MachineDetailBean machineDetailBean; private MachineDetailBean machineDetailBean;
private UserDataMachineAdapter data5Adapter; private UserDataMachineAdapter data5Adapter;
private UserDataMachineAdapter data6Adapter; private UserDataMachineAdapter data6Adapter;
private UserDataMachineAdapter data7Adapter;
private List<String> data5List; private List<String> data5List;
private List<String> data6List; private List<String> data6List;
private List<String> data7List;
@Override @Override
protected void initView() { protected void initView() {
ButterKnife.bind(this); ButterKnife.bind(this);
...@@ -149,6 +156,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -149,6 +156,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData6.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData6.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData7.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
} }
@Override @Override
...@@ -160,6 +168,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -160,6 +168,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
data4List = new ArrayList<>(); data4List = new ArrayList<>();
data5List = new ArrayList<>(); data5List = new ArrayList<>();
data6List = new ArrayList<>(); data6List = new ArrayList<>();
data7List = new ArrayList<>();
data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List); data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List);
data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List); data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List);
...@@ -167,12 +176,15 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -167,12 +176,15 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List); data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List);
data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List); data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List);
data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List); data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List);
data7Adapter = new UserDataMachineAdapter(R.layout.item_machine, data7List);
data1Adapter.bindToRecyclerView(rvData1); data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2); data2Adapter.bindToRecyclerView(rvData2);
data3Adapter.bindToRecyclerView(rvData3); data3Adapter.bindToRecyclerView(rvData3);
data4Adapter.bindToRecyclerView(rvData4); data4Adapter.bindToRecyclerView(rvData4);
data5Adapter.bindToRecyclerView(rvData5); data5Adapter.bindToRecyclerView(rvData5);
data6Adapter.bindToRecyclerView(rvData6); data6Adapter.bindToRecyclerView(rvData6);
data7Adapter.bindToRecyclerView(rvData7);
getData(); getData();
} }
...@@ -218,20 +230,20 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -218,20 +230,20 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
tvMiddle7.setText(castLadle.getBakingTemperature()); tvMiddle7.setText(castLadle.getBakingTemperature());
tvMiddle8.setText(String.valueOf(castLadle.getBakingDateTime())); tvMiddle8.setText(String.valueOf(castLadle.getBakingDateTime()));
} }
MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent(); // MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent != null) { // if (covAgent != null) {
tvCover1.setText(covAgent.getLadleCoveringAgentName()); // tvCover1.setText(covAgent.getLadleCoveringAgentName());
tvCover2.setText(covAgent.getAcidAlkaliDegree()); // tvCover2.setText(covAgent.getAcidAlkaliDegree());
tvCover3.setText(covAgent.getChemicalComposition()); // tvCover3.setText(covAgent.getChemicalComposition());
tvCover4.setText(covAgent.getSupplierName()); // tvCover4.setText(covAgent.getSupplierName());
} // }
MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu(); // MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu != null) { // if (mouldFlu != null) {
tvProtection1.setText(mouldFlu.getMouldFluxesName()); // tvProtection1.setText(mouldFlu.getMouldFluxesName());
tvProtection2.setText(mouldFlu.getAcidAlkaliDegree()); // tvProtection2.setText(mouldFlu.getAcidAlkaliDegree());
tvProtection3.setText(mouldFlu.getChemicalComposition()); // tvProtection3.setText(mouldFlu.getChemicalComposition());
tvProtection4.setText(mouldFlu.getSupplierName()); // tvProtection4.setText(mouldFlu.getSupplierName());
} // }
changeList(); changeList();
} }
}); });
...@@ -244,6 +256,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -244,6 +256,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
data4List.clear(); data4List.clear();
data5List.clear(); data5List.clear();
data6List.clear(); data6List.clear();
data7List.clear();
if (machineDetailBean.getProductList() != null) { if (machineDetailBean.getProductList() != null) {
for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) { for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) {
data1List.add(productListBean.getProductsName()); data1List.add(productListBean.getProductsName());
...@@ -280,6 +293,12 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -280,6 +293,12 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
} }
data6Adapter.notifyDataSetChanged(); data6Adapter.notifyDataSetChanged();
} }
if (machineDetailBean.getSpeeds() != null) {
for (MachineDetailBean.SpeedsBean productListBean : machineDetailBean.getSpeeds()) {
data7List.add(productListBean.getSteelGrade());
}
data7Adapter.notifyDataSetChanged();
}
} }
@Override @Override
...@@ -323,6 +342,12 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -323,6 +342,12 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
startActivity(MesMiddleModifyActivity.class, "data", JSON.toJSONString(machineDetailBean.getSettleList().get(position))); 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 @Override
...@@ -331,7 +356,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -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) { public void onViewClicked(View view) {
switch (view.getId()) { switch (view.getId()) {
case R.id.tv_next: case R.id.tv_next:
...@@ -341,8 +366,8 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -341,8 +366,8 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
steelInfo.put("steelmakingWorksCode", data.getSteelmakingWorksCode()); steelInfo.put("steelmakingWorksCode", data.getSteelmakingWorksCode());
steelInfo.put("continuousCasterCode", data.getContinuousCasterCode()); steelInfo.put("continuousCasterCode", data.getContinuousCasterCode());
param.put("steelInfo", steelInfo); param.put("steelInfo", steelInfo);
startActivity(MesUserDataDetailAddActivity.class,"form","0" startActivity(MesUserDataDetailAddActivity.class, "from", "0"
,"data",JSON.toJSONString(param)); , "data", JSON.toJSONString(param));
break; break;
case R.id.tv_add1: case R.id.tv_add1:
startActivity(MesThreeAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode()); startActivity(MesThreeAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode());
...@@ -362,6 +387,9 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -362,6 +387,9 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
case R.id.tv_add6: case R.id.tv_add6:
startActivity(MesMiddleAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode()); startActivity(MesMiddleAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode());
break; break;
case R.id.tv_add7:
startActivity(MesSpeedAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode());
break;
case R.id.rl_add: case R.id.rl_add:
startActivity(MesMiddleAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode()); startActivity(MesMiddleAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode());
break; break;
...@@ -425,7 +453,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -425,7 +453,7 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
// break; // break;
case R.id.modify: case R.id.modify:
startActivity(MesChooseMachineModifyActivity.class, startActivity(MesChooseMachineModifyActivity.class,
"data",JSON.toJSONString(data)); "data", JSON.toJSONString(data));
break; break;
} }
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
...@@ -466,4 +494,5 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -466,4 +494,5 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
} }
}); });
} }
} }
package com.wd.workoffice.ui.activity.mes.user; package com.wd.workoffice.ui.activity.mes.user;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.Menu; import android.view.Menu;
...@@ -16,19 +15,11 @@ import com.chad.library.adapter.base.BaseQuickAdapter; ...@@ -16,19 +15,11 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.ModifyMachineEvent;
import com.wd.workoffice.bean.event.ModifyUserDataEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.FactoryDetailBean;
import com.wd.workoffice.bean.mesBean.MachineDetailBean; import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import com.wd.workoffice.bean.mesBean.UserDataBean; import com.wd.workoffice.bean.mesBean.UserDataBean;
import com.wd.workoffice.bean.mesBean.UserDataDetailBean;
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.UserDataAdd3LabelAdapter;
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.ui.adapter.UserDataMachineAdapter;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
...@@ -39,14 +30,12 @@ import java.util.ArrayList; ...@@ -39,14 +30,12 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer; import flexible.xd.android_base.network.rtfhttp.Transformer;
import flexible.xd.android_base.utils.TimeUtils;
import io.reactivex.disposables.Disposable; import io.reactivex.disposables.Disposable;
import okhttp3.MediaType; import okhttp3.MediaType;
import okhttp3.RequestBody; import okhttp3.RequestBody;
...@@ -142,6 +131,10 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity { ...@@ -142,6 +131,10 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity {
TextView tvAdd6; TextView tvAdd6;
@BindView(R.id.rl_add) @BindView(R.id.rl_add)
RelativeLayout rlAdd; RelativeLayout rlAdd;
@BindView(R.id.rv_data7)
RecyclerView rvData7;
@BindView(R.id.tv_add7)
TextView tvAdd7;
private UserDataMachineAdapter data1Adapter; private UserDataMachineAdapter data1Adapter;
private UserDataMachineAdapter data2Adapter; private UserDataMachineAdapter data2Adapter;
private UserDataMachineAdapter data3Adapter; private UserDataMachineAdapter data3Adapter;
...@@ -153,8 +146,10 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity { ...@@ -153,8 +146,10 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity {
private List<String> data4List; private List<String> data4List;
private UserDataMachineAdapter data5Adapter; private UserDataMachineAdapter data5Adapter;
private UserDataMachineAdapter data6Adapter; private UserDataMachineAdapter data6Adapter;
private UserDataMachineAdapter data7Adapter;
private List<String> data5List; private List<String> data5List;
private List<String> data6List; private List<String> data6List;
private List<String> data7List;
private boolean canFinish; private boolean canFinish;
private UserDataBean.ListBean data; private UserDataBean.ListBean data;
...@@ -167,6 +162,7 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity { ...@@ -167,6 +162,7 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity {
rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData6.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData6.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData7.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
} }
...@@ -180,18 +176,21 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity { ...@@ -180,18 +176,21 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity {
data4List = new ArrayList<>(); data4List = new ArrayList<>();
data5List = new ArrayList<>(); data5List = new ArrayList<>();
data6List = new ArrayList<>(); data6List = new ArrayList<>();
data7List = new ArrayList<>();
data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List); data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List);
data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List); data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List);
data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List); data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List);
data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List); data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List);
data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List); data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List);
data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List); data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List);
data7Adapter = new UserDataMachineAdapter(R.layout.item_machine, data7List);
data1Adapter.bindToRecyclerView(rvData1); data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2); data2Adapter.bindToRecyclerView(rvData2);
data3Adapter.bindToRecyclerView(rvData3); data3Adapter.bindToRecyclerView(rvData3);
data4Adapter.bindToRecyclerView(rvData4); data4Adapter.bindToRecyclerView(rvData4);
data5Adapter.bindToRecyclerView(rvData5); data5Adapter.bindToRecyclerView(rvData5);
data6Adapter.bindToRecyclerView(rvData6); data6Adapter.bindToRecyclerView(rvData6);
data7Adapter.bindToRecyclerView(rvData7);
getMachineData(data.getContinuousCasterCode()); getMachineData(data.getContinuousCasterCode());
} }
...@@ -237,20 +236,20 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity { ...@@ -237,20 +236,20 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity {
tvMiddle7.setText(castLadle.getBakingTemperature()); tvMiddle7.setText(castLadle.getBakingTemperature());
tvMiddle8.setText(String.valueOf(castLadle.getBakingDateTime())); tvMiddle8.setText(String.valueOf(castLadle.getBakingDateTime()));
} }
MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent(); // MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent != null) { // if (covAgent != null) {
tvCover1.setText(covAgent.getLadleCoveringAgentName()); // tvCover1.setText(covAgent.getLadleCoveringAgentName());
tvCover2.setText(covAgent.getAcidAlkaliDegree()); // tvCover2.setText(covAgent.getAcidAlkaliDegree());
tvCover3.setText(covAgent.getChemicalComposition()); // tvCover3.setText(covAgent.getChemicalComposition());
tvCover4.setText(covAgent.getSupplierName()); // tvCover4.setText(covAgent.getSupplierName());
} // }
MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu(); // MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu != null) { // if (mouldFlu != null) {
tvProtection1.setText(mouldFlu.getMouldFluxesName()); // tvProtection1.setText(mouldFlu.getMouldFluxesName());
tvProtection2.setText(mouldFlu.getAcidAlkaliDegree()); // tvProtection2.setText(mouldFlu.getAcidAlkaliDegree());
tvProtection3.setText(mouldFlu.getChemicalComposition()); // tvProtection3.setText(mouldFlu.getChemicalComposition());
tvProtection4.setText(mouldFlu.getSupplierName()); // tvProtection4.setText(mouldFlu.getSupplierName());
} // }
changeList(); changeList();
} }
}); });
...@@ -263,6 +262,7 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity { ...@@ -263,6 +262,7 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity {
data4List.clear(); data4List.clear();
data5List.clear(); data5List.clear();
data6List.clear(); data6List.clear();
data7List.clear();
if (machineDetailBean.getProductList() != null) { if (machineDetailBean.getProductList() != null) {
for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) { for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) {
data1List.add(productListBean.getProductsName()); data1List.add(productListBean.getProductsName());
...@@ -299,6 +299,12 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity { ...@@ -299,6 +299,12 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity {
} }
data6Adapter.notifyDataSetChanged(); data6Adapter.notifyDataSetChanged();
} }
if (machineDetailBean.getSpeeds() != null) {
for (MachineDetailBean.SpeedsBean productListBean : machineDetailBean.getSpeeds()) {
data7List.add(productListBean.getSteelGrade());
}
data7Adapter.notifyDataSetChanged();
}
} }
@Override @Override
...@@ -349,7 +355,7 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity { ...@@ -349,7 +355,7 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity {
@OnClick({R.id.rl_cover4, R.id.rl_protection4, @OnClick({R.id.rl_cover4, R.id.rl_protection4,
R.id.tv_add5, R.id.tv_add6, R.id.tv_add1, R.id.tv_add3, R.id.tv_add7, R.id.tv_add5, R.id.tv_add6, R.id.tv_add1, R.id.tv_add3,
R.id.tv_add4}) R.id.tv_add4})
public void onViewClicked(View view) { public void onViewClicked(View view) {
switch (view.getId()) { switch (view.getId()) {
...@@ -368,6 +374,13 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity { ...@@ -368,6 +374,13 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity {
} }
startActivity(MesThreeAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode()); startActivity(MesThreeAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode());
break; break;
case R.id.tv_add7:
if (machineDetailBean == null) {
toast("数据加载中,请稍后");
return;
}
startActivity(MesSpeedAddActivity.class, "continuousCasterCode", data.getContinuousCasterCode());
break;
case R.id.tv_add2: case R.id.tv_add2:
if (machineDetailBean == null) { if (machineDetailBean == null) {
toast("数据加载中,请稍后"); toast("数据加载中,请稍后");
...@@ -472,28 +485,29 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity { ...@@ -472,28 +485,29 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity {
castLadle.setLiquidSteelTemperature(tvMiddle5.getText().toString()); castLadle.setLiquidSteelTemperature(tvMiddle5.getText().toString());
castLadle.setBakingMethod(tvMiddle6.getText().toString()); castLadle.setBakingMethod(tvMiddle6.getText().toString());
castLadle.setBakingTemperature(tvMiddle7.getText().toString()); castLadle.setBakingTemperature(tvMiddle7.getText().toString());
if (!TextUtils.isEmpty(tvMiddle8.getText().toString())) if (!TextUtils.isEmpty(tvMiddle8.getText().toString())) {
castLadle.setBakingDateTime(Long.valueOf(tvMiddle8.getText().toString())); castLadle.setBakingDateTime(Long.valueOf(tvMiddle8.getText().toString()));
MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent == null) {
covAgent = new MachineDetailBean.CovAgentBean();
machineDetailBean.setCovAgent(covAgent);
} }
covAgent.setLadleCoveringAgentName(tvCover1.getText().toString());
covAgent.setAcidAlkaliDegree(tvCover2.getText().toString()); // MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
covAgent.setChemicalComposition(tvCover3.getText().toString()); // if (covAgent == null) {
covAgent.setSupplierName(tvCover4.getText().toString()); // covAgent = new MachineDetailBean.CovAgentBean();
// machineDetailBean.setCovAgent(covAgent);
MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu(); // }
if (mouldFlu == null) { // covAgent.setLadleCoveringAgentName(tvCover1.getText().toString());
mouldFlu = new MachineDetailBean.MouldFluBean(); // covAgent.setAcidAlkaliDegree(tvCover2.getText().toString());
machineDetailBean.setMouldFlu(mouldFlu); // covAgent.setChemicalComposition(tvCover3.getText().toString());
} // covAgent.setSupplierName(tvCover4.getText().toString());
mouldFlu.setMouldFluxesName(tvProtection1.getText().toString()); //
mouldFlu.setAcidAlkaliDegree(tvProtection2.getText().toString()); // MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
mouldFlu.setChemicalComposition(tvProtection3.getText().toString()); // if (mouldFlu == null) {
mouldFlu.setSupplierName(tvProtection4.getText().toString()); // mouldFlu = new MachineDetailBean.MouldFluBean();
// machineDetailBean.setMouldFlu(mouldFlu);
// }
// mouldFlu.setMouldFluxesName(tvProtection1.getText().toString());
// mouldFlu.setAcidAlkaliDegree(tvProtection2.getText().toString());
// mouldFlu.setChemicalComposition(tvProtection3.getText().toString());
// mouldFlu.setSupplierName(tvProtection4.getText().toString());
} }
private void submitMachine() { private void submitMachine() {
...@@ -542,37 +556,4 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity { ...@@ -542,37 +556,4 @@ public class MesChooseMachineModifyActivity extends WorkToolBarActivity {
getMachineData(data.getContinuousCasterCode()); getMachineData(data.getContinuousCasterCode());
} }
@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.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent == null) {
covAgent = new MachineDetailBean.CovAgentBean();
machineDetailBean.setCovAgent(covAgent);
}
tvCover4.setText(modifyClient.getCustomerName());
covAgent.setSupplierCode(modifyClient.getCustomerCode());
covAgent.setSupplierName(modifyClient.getCustomerName());
}
break;
case 10002:
if (resultCode == 10001) {
MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class);
MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu == null) {
mouldFlu = new MachineDetailBean.MouldFluBean();
machineDetailBean.setMouldFlu(mouldFlu);
}
tvProtection4.setText(modifyClient.getCustomerName());
mouldFlu.setSupplierCode(modifyClient.getCustomerCode());
mouldFlu.setSupplierCode(modifyClient.getCustomerName());
}
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.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 { ...@@ -60,38 +60,8 @@ public class MesUserDataAdd2Activity extends WorkToolBarActivity {
tvClient.setText(data.getCustomerUserName()); tvClient.setText(data.getCustomerUserName());
tvCompany.setText(data.getSalesCompanyName()); tvCompany.setText(data.getSalesCompanyName());
tvManager.setText(data.getSalesManagerName()); 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 @Override
protected void initEvent() { protected void initEvent() {
...@@ -102,33 +72,6 @@ public class MesUserDataAdd2Activity extends WorkToolBarActivity { ...@@ -102,33 +72,6 @@ public class MesUserDataAdd2Activity extends WorkToolBarActivity {
return R.layout.activity_mes_user_data_add2; 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) @OnClick(R.id.rl_factory)
public void onViewClicked() { public void onViewClicked() {
......
...@@ -26,7 +26,6 @@ public class MesUserDataAddActivity extends WorkToolBarActivity { ...@@ -26,7 +26,6 @@ public class MesUserDataAddActivity extends WorkToolBarActivity {
TextView tvClient; TextView tvClient;
@BindView(R.id.rl_client) @BindView(R.id.rl_client)
RelativeLayout rlClient; RelativeLayout rlClient;
private AccountBean dataBean;
@Override @Override
protected void initView() { protected void initView() {
...@@ -66,7 +65,7 @@ public class MesUserDataAddActivity extends WorkToolBarActivity { ...@@ -66,7 +65,7 @@ public class MesUserDataAddActivity extends WorkToolBarActivity {
@OnClick(R.id.rl_client) @OnClick(R.id.rl_client)
public void onViewClicked() { public void onViewClicked() {
// startActivityForResult(MesChooseClientActivity.class, 10001); // startActivityForResult(MesChooseClientActivity.class, 10001);
startActivity(MesChooseClientActivity.class); startActivity(MesUserClientActivity.class);
} }
......
package com.wd.workoffice.ui.activity.mes.user; package com.wd.workoffice.ui.activity.mes.user;
import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
...@@ -25,13 +26,8 @@ import com.wd.workoffice.bean.mesBean.UserDataDetailBean; ...@@ -25,13 +26,8 @@ import com.wd.workoffice.bean.mesBean.UserDataDetailBean;
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.UserDataAdd3AddAdapter;
import com.wd.workoffice.ui.adapter.UserDataAdd3LabelAdapter; 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.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.ui.adapter.UserDataMachineAdapter;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
...@@ -181,6 +177,10 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity { ...@@ -181,6 +177,10 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
TextView tvAdd2; TextView tvAdd2;
@BindView(R.id.tv_machine_name) @BindView(R.id.tv_machine_name)
TextView tvMachineName; TextView tvMachineName;
@BindView(R.id.rv_data7)
RecyclerView rvData7;
@BindView(R.id.tv_add7)
TextView tvAdd7;
private UserDataMachineAdapter data1Adapter; private UserDataMachineAdapter data1Adapter;
private UserDataMachineAdapter data2Adapter; private UserDataMachineAdapter data2Adapter;
private UserDataMachineAdapter data3Adapter; private UserDataMachineAdapter data3Adapter;
...@@ -199,8 +199,10 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity { ...@@ -199,8 +199,10 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
private UserDataMachineAdapter data5Adapter; private UserDataMachineAdapter data5Adapter;
private UserDataMachineAdapter data6Adapter; private UserDataMachineAdapter data6Adapter;
private UserDataMachineAdapter data7Adapter;
private List<String> data5List; private List<String> data5List;
private List<String> data6List; private List<String> data6List;
private List<String> data7List;
private UserDataDetailBean userDataDetailBean; private UserDataDetailBean userDataDetailBean;
...@@ -216,12 +218,14 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity { ...@@ -216,12 +218,14 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
tvAdd4.setVisibility(View.GONE); tvAdd4.setVisibility(View.GONE);
tvAdd5.setVisibility(View.GONE); tvAdd5.setVisibility(View.GONE);
tvAdd6.setVisibility(View.GONE); tvAdd6.setVisibility(View.GONE);
tvAdd7.setVisibility(View.GONE);
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)); rvData3.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData6.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)); rvFactoryData1.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvFactoryData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvFactoryData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
...@@ -236,18 +240,21 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity { ...@@ -236,18 +240,21 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
data4List = new ArrayList<>(); data4List = new ArrayList<>();
data5List = new ArrayList<>(); data5List = new ArrayList<>();
data6List = new ArrayList<>(); data6List = new ArrayList<>();
data7List = new ArrayList<>();
data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List); data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List);
data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List); data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List);
data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List); data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List);
data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List); data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List);
data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List); data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List);
data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List); data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List);
data7Adapter = new UserDataMachineAdapter(R.layout.item_machine, data7List);
data1Adapter.bindToRecyclerView(rvData1); data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2); data2Adapter.bindToRecyclerView(rvData2);
data3Adapter.bindToRecyclerView(rvData3); data3Adapter.bindToRecyclerView(rvData3);
data4Adapter.bindToRecyclerView(rvData4); data4Adapter.bindToRecyclerView(rvData4);
data5Adapter.bindToRecyclerView(rvData5); data5Adapter.bindToRecyclerView(rvData5);
data6Adapter.bindToRecyclerView(rvData6); data6Adapter.bindToRecyclerView(rvData6);
data7Adapter.bindToRecyclerView(rvData7);
dataFactory1List = new ArrayList<>(); dataFactory1List = new ArrayList<>();
dataFactory2List = new ArrayList<>(); dataFactory2List = new ArrayList<>();
dataFactory3List = new ArrayList<>(); dataFactory3List = new ArrayList<>();
...@@ -401,20 +408,20 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity { ...@@ -401,20 +408,20 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
tvMiddle7.setText(castLadle.getBakingTemperature()); tvMiddle7.setText(castLadle.getBakingTemperature());
tvMiddle8.setText(TimeUtils.millis2String(castLadle.getBakingDateTime())); tvMiddle8.setText(TimeUtils.millis2String(castLadle.getBakingDateTime()));
} }
MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent(); // MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent != null) { // if (covAgent != null) {
tvCover1.setText(covAgent.getLadleCoveringAgentName()); // tvCover1.setText(covAgent.getLadleCoveringAgentName());
tvCover2.setText(covAgent.getAcidAlkaliDegree()); // tvCover2.setText(covAgent.getAcidAlkaliDegree());
tvCover3.setText(covAgent.getChemicalComposition()); // tvCover3.setText(covAgent.getChemicalComposition());
tvCover4.setText(covAgent.getSupplierName()); // tvCover4.setText(covAgent.getSupplierName());
} // }
MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu(); // MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu != null) { // if (mouldFlu != null) {
tvProtection1.setText(mouldFlu.getMouldFluxesName()); // tvProtection1.setText(mouldFlu.getMouldFluxesName());
tvProtection2.setText(mouldFlu.getAcidAlkaliDegree()); // tvProtection2.setText(mouldFlu.getAcidAlkaliDegree());
tvProtection3.setText(mouldFlu.getChemicalComposition()); // tvProtection3.setText(mouldFlu.getChemicalComposition());
tvProtection4.setText(mouldFlu.getSupplierName()); // tvProtection4.setText(mouldFlu.getSupplierName());
} // }
changeList(); changeList();
} }
}); });
...@@ -427,6 +434,7 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity { ...@@ -427,6 +434,7 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
data4List.clear(); data4List.clear();
data5List.clear(); data5List.clear();
data6List.clear(); data6List.clear();
data7List.clear();
if (machineDetailBean.getProductList() != null) { if (machineDetailBean.getProductList() != null) {
for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) { for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) {
data1List.add(productListBean.getProductsName()); data1List.add(productListBean.getProductsName());
...@@ -463,6 +471,12 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity { ...@@ -463,6 +471,12 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
} }
data6Adapter.notifyDataSetChanged(); data6Adapter.notifyDataSetChanged();
} }
if (machineDetailBean.getSpeeds() != null) {
for (MachineDetailBean.SpeedsBean productListBean : machineDetailBean.getSpeeds()) {
data7List.add(productListBean.getSteelGrade());
}
data7Adapter.notifyDataSetChanged();
}
} }
@Override @Override
...@@ -503,6 +517,12 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity { ...@@ -503,6 +517,12 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
startActivity(MesMiddleDetailActivity.class, "data", JSON.toJSONString(machineDetailBean.getSettleList().get(position))); 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 @Override
...@@ -511,10 +531,17 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity { ...@@ -511,10 +531,17 @@ public class MesUserDataDetailActivity extends WorkToolBarActivity {
} }
@OnClick({R.id.tv_add5, R.id.tv_add6, R.id.btn_agree, @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}) 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) { public void onViewClicked(View view) {
switch (view.getId()) { 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: case R.id.tv_add1:
if (userDataDetailBean == null) { if (userDataDetailBean == null) {
toast("数据加载中,请稍后"); toast("数据加载中,请稍后");
......
package com.wd.workoffice.ui.activity.mes.user; package com.wd.workoffice.ui.activity.mes.user;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
...@@ -24,7 +25,6 @@ import com.wd.workoffice.bean.event.AddUserDataEvent; ...@@ -24,7 +25,6 @@ import com.wd.workoffice.bean.event.AddUserDataEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.FactoryDetailBean; import com.wd.workoffice.bean.mesBean.FactoryDetailBean;
import com.wd.workoffice.bean.mesBean.MachineDetailBean; import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import com.wd.workoffice.bean.mesBean.UserDataDetailBean; import com.wd.workoffice.bean.mesBean.UserDataDetailBean;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
...@@ -194,6 +194,10 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -194,6 +194,10 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
TextView tvFactoryAdd2; TextView tvFactoryAdd2;
@BindView(R.id.tv_factory_add3) @BindView(R.id.tv_factory_add3)
TextView tvFactoryAdd3; TextView tvFactoryAdd3;
@BindView(R.id.rv_data7)
RecyclerView rvData7;
@BindView(R.id.tv_add7)
TextView tvAdd7;
private UserDataMachineAdapter data1Adapter; private UserDataMachineAdapter data1Adapter;
private UserDataMachineAdapter data2Adapter; private UserDataMachineAdapter data2Adapter;
private UserDataMachineAdapter data3Adapter; private UserDataMachineAdapter data3Adapter;
...@@ -212,8 +216,10 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -212,8 +216,10 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
private UserDataMachineAdapter data5Adapter; private UserDataMachineAdapter data5Adapter;
private UserDataMachineAdapter data6Adapter; private UserDataMachineAdapter data6Adapter;
private UserDataMachineAdapter data7Adapter;
private List<String> data5List; private List<String> data5List;
private List<String> data6List; private List<String> data6List;
private List<String> data7List;
private UserDataDetailBean dataParam; private UserDataDetailBean dataParam;
@Override @Override
...@@ -227,7 +233,7 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -227,7 +233,7 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData6.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)); rvFactoryData1.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvFactoryData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvFactoryData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvFactoryData3.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvFactoryData3.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
...@@ -245,18 +251,21 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -245,18 +251,21 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
data4List = new ArrayList<>(); data4List = new ArrayList<>();
data5List = new ArrayList<>(); data5List = new ArrayList<>();
data6List = new ArrayList<>(); data6List = new ArrayList<>();
data7List = new ArrayList<>();
data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List); data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List);
data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List); data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List);
data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List); data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List);
data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List); data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List);
data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List); data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List);
data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List); data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List);
data7Adapter = new UserDataMachineAdapter(R.layout.item_machine, data7List);
data1Adapter.bindToRecyclerView(rvData1); data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2); data2Adapter.bindToRecyclerView(rvData2);
data3Adapter.bindToRecyclerView(rvData3); data3Adapter.bindToRecyclerView(rvData3);
data4Adapter.bindToRecyclerView(rvData4); data4Adapter.bindToRecyclerView(rvData4);
data5Adapter.bindToRecyclerView(rvData5); data5Adapter.bindToRecyclerView(rvData5);
data6Adapter.bindToRecyclerView(rvData6); data6Adapter.bindToRecyclerView(rvData6);
data7Adapter.bindToRecyclerView(rvData7);
dataFactory1List = new ArrayList<>(); dataFactory1List = new ArrayList<>();
dataFactory2List = new ArrayList<>(); dataFactory2List = new ArrayList<>();
dataFactory3List = new ArrayList<>(); dataFactory3List = new ArrayList<>();
...@@ -270,7 +279,6 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -270,7 +279,6 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
} }
private void changeInfo() { private void changeInfo() {
UserDataDetailBean.MainInfoBean mainInfo = dataParam.getMainInfo(); UserDataDetailBean.MainInfoBean mainInfo = dataParam.getMainInfo();
if (mainInfo != null) { if (mainInfo != null) {
...@@ -282,7 +290,7 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -282,7 +290,7 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
if (!TextUtils.equals("1", getIntent().getStringExtra("from"))) {//不是多步新增,需获取数据 if (!TextUtils.equals("1", getIntent().getStringExtra("from"))) {//不是多步新增,需获取数据
getMachineData(dataParam.getSteelInfo().getContinuousCasterCode()); getMachineData(dataParam.getSteelInfo().getContinuousCasterCode());
getFactoryData(dataParam.getSteelInfo().getSteelmakingWorksCode()); getFactoryData(dataParam.getSteelInfo().getSteelmakingWorksCode());
}else { } else {
changeFactoryInfo(); changeFactoryInfo();
changeList(); changeList();
} }
...@@ -368,8 +376,15 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -368,8 +376,15 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
MachineDetailBean machineDetailBean = JSON.parseObject(data.getData().toString(), MachineDetailBean.class); MachineDetailBean machineDetailBean = JSON.parseObject(data.getData().toString(), MachineDetailBean.class);
dataParam.setCastInfo(machineDetailBean.getCastInfo()); dataParam.setCastInfo(machineDetailBean.getCastInfo());
dataParam.setCastLadle(machineDetailBean.getCastLadle()); dataParam.setCastLadle(machineDetailBean.getCastLadle());
dataParam.setCovAgent(machineDetailBean.getCovAgent()); // dataParam.setCovAgent(machineDetailBean.getCovAgent());
dataParam.setMouldFlu(machineDetailBean.getMouldFlu()); // dataParam.setMouldFlu(machineDetailBean.getMouldFlu());
dataParam.setSpeeds(machineDetailBean.getSpeeds());
dataParam.setProductList(machineDetailBean.getProductList());
dataParam.setSettleList(machineDetailBean.getSettleList());
dataParam.setStockList(machineDetailBean.getStockList());
dataParam.setSupplyList(machineDetailBean.getSupplyList());
dataParam.setOtherLadleList(machineDetailBean.getOtherLadleList());
dataParam.setOtherSupList(machineDetailBean.getOtherSupList());
changeList(); changeList();
} }
}); });
...@@ -395,26 +410,27 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -395,26 +410,27 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
tvMiddle7.setText(castLadle.getBakingTemperature()); tvMiddle7.setText(castLadle.getBakingTemperature());
tvMiddle8.setText(String.valueOf(castLadle.getBakingDateTime())); tvMiddle8.setText(String.valueOf(castLadle.getBakingDateTime()));
} }
MachineDetailBean.CovAgentBean covAgent = dataParam.getCovAgent(); // MachineDetailBean.CovAgentBean covAgent = dataParam.getCovAgent();
if (covAgent != null) { // if (covAgent != null) {
tvCover1.setText(covAgent.getLadleCoveringAgentName()); // tvCover1.setText(covAgent.getLadleCoveringAgentName());
tvCover2.setText(covAgent.getAcidAlkaliDegree()); // tvCover2.setText(covAgent.getAcidAlkaliDegree());
tvCover3.setText(covAgent.getChemicalComposition()); // tvCover3.setText(covAgent.getChemicalComposition());
tvCover4.setText(covAgent.getSupplierName()); // tvCover4.setText(covAgent.getSupplierName());
} // }
MachineDetailBean.MouldFluBean mouldFlu = dataParam.getMouldFlu(); // MachineDetailBean.MouldFluBean mouldFlu = dataParam.getMouldFlu();
if (mouldFlu != null) { // if (mouldFlu != null) {
tvProtection1.setText(mouldFlu.getMouldFluxesName()); // tvProtection1.setText(mouldFlu.getMouldFluxesName());
tvProtection2.setText(mouldFlu.getAcidAlkaliDegree()); // tvProtection2.setText(mouldFlu.getAcidAlkaliDegree());
tvProtection3.setText(mouldFlu.getChemicalComposition()); // tvProtection3.setText(mouldFlu.getChemicalComposition());
tvProtection4.setText(mouldFlu.getSupplierName()); // tvProtection4.setText(mouldFlu.getSupplierName());
} // }
data1List.clear(); data1List.clear();
data2List.clear(); data2List.clear();
data3List.clear(); data3List.clear();
data4List.clear(); data4List.clear();
data5List.clear(); data5List.clear();
data6List.clear(); data6List.clear();
data7List.clear();
if (dataParam.getProductList() != null) { if (dataParam.getProductList() != null) {
for (MachineDetailBean.ProductListBean productListBean : dataParam.getProductList()) { for (MachineDetailBean.ProductListBean productListBean : dataParam.getProductList()) {
data1List.add(productListBean.getProductsName()); data1List.add(productListBean.getProductsName());
...@@ -451,6 +467,12 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -451,6 +467,12 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
} }
data6Adapter.notifyDataSetChanged(); data6Adapter.notifyDataSetChanged();
} }
if (dataParam.getSpeeds() != null) {
for (MachineDetailBean.SpeedsBean speedsBean : dataParam.getSpeeds()) {
data7List.add(speedsBean.getSteelGrade());
}
data7Adapter.notifyDataSetChanged();
}
} }
@Override @Override
...@@ -557,6 +579,17 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -557,6 +579,17 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
} }
} }
}); });
data7Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
if (TextUtils.equals(from, "1")) {
startActivity(MesSpeedModifyActivity.class,
"position", position + "", "from", "1", "data", JSON.toJSONString(dataParam.getSettleList().get(position)));
} else {
startActivity(MesSpeedModifyActivity.class, "data", JSON.toJSONString(dataParam.getSettleList().get(position)));
}
}
});
} }
@Override @Override
...@@ -567,8 +600,8 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -567,8 +600,8 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
@OnClick({R.id.tv_factory_add1, R.id.tv_factory_add2, R.id.tv_factory_add3, @OnClick({R.id.tv_factory_add1, R.id.tv_factory_add2, R.id.tv_factory_add3,
R.id.rl_cover4, R.id.rl_protection4, R.id.iv_modify_client, R.id.rl_cover4, R.id.rl_protection4, R.id.iv_modify_client,
R.id.iv_modify_machine, R.id.iv_modify_steel, R.id.iv_modify_machine, R.id.iv_modify_steel,
R.id.tv_add5, R.id.tv_add6, R.id.tv_add1, R.id.tv_add3, R.id.tv_add7, R.id.tv_add5, R.id.tv_add6, R.id.tv_add1, R.id.tv_add3,
R.id.tv_add4,R.id.rl_middle,R.id.rl_cover,R.id.rl_protection}) R.id.tv_add4, R.id.rl_middle, R.id.rl_cover, R.id.rl_protection})
public void onViewClicked(View view) { public void onViewClicked(View view) {
String from = getIntent().getStringExtra("from");//1 .多步骤新增(同时新增) String from = getIntent().getStringExtra("from");//1 .多步骤新增(同时新增)
switch (view.getId()) { switch (view.getId()) {
...@@ -611,6 +644,14 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -611,6 +644,14 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
submitFactory(); submitFactory();
} }
break; break;
case R.id.tv_add7:
if (TextUtils.equals("1", from)) {
startActivity(MesSpeedAddActivity.class,
"from", "1", "continuousCasterCode", dataParam.getSteelInfo().getContinuousCasterCode());
} else {
startActivity(MesSpeedAddActivity.class, "continuousCasterCode", dataParam.getSteelInfo().getContinuousCasterCode());
}
break;
case R.id.tv_add1: case R.id.tv_add1:
if (TextUtils.equals("1", from)) { if (TextUtils.equals("1", from)) {
startActivity(MesThreeAddActivity.class, startActivity(MesThreeAddActivity.class,
...@@ -626,7 +667,6 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -626,7 +667,6 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
} else { } else {
startActivity(MesSupplierAddActivity.class, "continuousCasterCode", dataParam.getSteelInfo().getContinuousCasterCode()); startActivity(MesSupplierAddActivity.class, "continuousCasterCode", dataParam.getSteelInfo().getContinuousCasterCode());
} }
// startActivity(MesSupplierAddActivity.class, "continuousCasterCode", userDataDetailBean.getSteelInfo().getContinuousCasterCode());
break; break;
case R.id.tv_add3: case R.id.tv_add3:
if (TextUtils.equals("1", from)) { if (TextUtils.equals("1", from)) {
...@@ -832,26 +872,26 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -832,26 +872,26 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
castLadle.setBakingDateTime(Long.valueOf(tvMiddle8.getText().toString())); castLadle.setBakingDateTime(Long.valueOf(tvMiddle8.getText().toString()));
} }
MachineDetailBean.CovAgentBean covAgent = dataParam.getCovAgent(); // MachineDetailBean.CovAgentBean covAgent = dataParam.getCovAgent();
if (covAgent == null) { // if (covAgent == null) {
covAgent = new MachineDetailBean.CovAgentBean(); // covAgent = new MachineDetailBean.CovAgentBean();
dataParam.setCovAgent(covAgent); // dataParam.setCovAgent(covAgent);
} // }
covAgent.setLadleCoveringAgentName(tvCover1.getText().toString()); // covAgent.setLadleCoveringAgentName(tvCover1.getText().toString());
covAgent.setAcidAlkaliDegree(tvCover2.getText().toString()); // covAgent.setAcidAlkaliDegree(tvCover2.getText().toString());
covAgent.setChemicalComposition(tvCover3.getText().toString()); // covAgent.setChemicalComposition(tvCover3.getText().toString());
covAgent.setSupplierName(tvCover4.getText().toString()); // covAgent.setSupplierName(tvCover4.getText().toString());
//
//
MachineDetailBean.MouldFluBean mouldFlu = dataParam.getMouldFlu(); // MachineDetailBean.MouldFluBean mouldFlu = dataParam.getMouldFlu();
if (mouldFlu == null) { // if (mouldFlu == null) {
mouldFlu = new MachineDetailBean.MouldFluBean(); // mouldFlu = new MachineDetailBean.MouldFluBean();
dataParam.setMouldFlu(mouldFlu); // dataParam.setMouldFlu(mouldFlu);
} // }
mouldFlu.setMouldFluxesName(tvProtection1.getText().toString()); // mouldFlu.setMouldFluxesName(tvProtection1.getText().toString());
mouldFlu.setAcidAlkaliDegree(tvProtection2.getText().toString()); // mouldFlu.setAcidAlkaliDegree(tvProtection2.getText().toString());
mouldFlu.setChemicalComposition(tvProtection3.getText().toString()); // mouldFlu.setChemicalComposition(tvProtection3.getText().toString());
mouldFlu.setSupplierName(tvProtection4.getText().toString()); // mouldFlu.setSupplierName(tvProtection4.getText().toString());
} }
private void changeFactoryParam() { private void changeFactoryParam() {
...@@ -1025,6 +1065,13 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -1025,6 +1065,13 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
} }
dataParam.getSettleList().add(JSON.parseObject(event.getData(), MachineDetailBean.SettleListBean.class)); dataParam.getSettleList().add(JSON.parseObject(event.getData(), MachineDetailBean.SettleListBean.class));
break; break;
case 7:
List<MachineDetailBean.SpeedsBean> speedsList = dataParam.getSpeeds();
if (speedsList == null) {
dataParam.setSpeeds(new ArrayList<>());
}
dataParam.getSpeeds().add(JSON.parseObject(event.getData(), MachineDetailBean.SpeedsBean.class));
break;
} }
changeList(); changeList();
} }
...@@ -1080,6 +1127,14 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -1080,6 +1127,14 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
settleList.remove(event.getPosition()); settleList.remove(event.getPosition());
settleList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.SettleListBean.class)); settleList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.SettleListBean.class));
break; break;
case 7:
List<MachineDetailBean.SpeedsBean> speedList = dataParam.getSpeeds();
if (speedList == null) {
dataParam.setSpeeds(new ArrayList<>());
}
speedList.remove(event.getPosition());
speedList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.SpeedsBean.class));
break;
} }
changeList(); changeList();
} }
...@@ -1094,32 +1149,38 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity { ...@@ -1094,32 +1149,38 @@ public class MesUserDataDetailAddActivity extends WorkToolBarActivity {
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) { switch (requestCode) {
case 10001: case 10001:
if (resultCode == 10001) { // if (resultCode == 10001) {
MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class); // MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class);
MachineDetailBean.CovAgentBean covAgent = dataParam.getCovAgent(); // MachineDetailBean.CovAgentBean covAgent = dataParam.getCovAgent();
if (covAgent == null) { // if (covAgent == null) {
covAgent = new MachineDetailBean.CovAgentBean(); // covAgent = new MachineDetailBean.CovAgentBean();
dataParam.setCovAgent(covAgent); // dataParam.setCovAgent(covAgent);
} // }
tvCover4.setText(modifyClient.getCustomerName()); // tvCover4.setText(modifyClient.getCustomerName());
covAgent.setSupplierCode(modifyClient.getCustomerCode()); // covAgent.setSupplierCode(modifyClient.getCustomerCode());
covAgent.setSupplierName(modifyClient.getCustomerName()); // covAgent.setSupplierName(modifyClient.getCustomerName());
} // }
break; break;
case 10002: case 10002:
if (resultCode == 10001) { // if (resultCode == 10001) {
MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class); // MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class);
MachineDetailBean.MouldFluBean mouldFlu = dataParam.getMouldFlu(); // MachineDetailBean.MouldFluBean mouldFlu = dataParam.getMouldFlu();
if (mouldFlu == null) { // if (mouldFlu == null) {
mouldFlu = new MachineDetailBean.MouldFluBean(); // mouldFlu = new MachineDetailBean.MouldFluBean();
dataParam.setMouldFlu(mouldFlu); // dataParam.setMouldFlu(mouldFlu);
} // }
tvProtection4.setText(modifyClient.getCustomerName()); // tvProtection4.setText(modifyClient.getCustomerName());
mouldFlu.setSupplierCode(modifyClient.getCustomerCode()); // mouldFlu.setSupplierCode(modifyClient.getCustomerCode());
mouldFlu.setSupplierCode(modifyClient.getCustomerName()); // mouldFlu.setSupplierCode(modifyClient.getCustomerName());
} // }
break; break;
} }
} }
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO: add setContentView(...) invocation
ButterKnife.bind(this);
}
} }
package com.wd.workoffice.ui.activity.mes.user; package com.wd.workoffice.ui.activity.mes.user;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.Menu; import android.view.Menu;
...@@ -24,16 +23,12 @@ import com.wd.workoffice.bean.event.ModifyUserDataEvent; ...@@ -24,16 +23,12 @@ import com.wd.workoffice.bean.event.ModifyUserDataEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.FactoryDetailBean; import com.wd.workoffice.bean.mesBean.FactoryDetailBean;
import com.wd.workoffice.bean.mesBean.MachineDetailBean; import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import com.wd.workoffice.bean.mesBean.UserDataDetailBean; import com.wd.workoffice.bean.mesBean.UserDataDetailBean;
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.UserDataAdd3AddAdapter; 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.UserDataAdd3LabelAddAdapter;
import com.wd.workoffice.ui.adapter.UserDataAdd3RefAddAdapter; 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.ui.adapter.UserDataMachineAdapter;
import com.wd.workoffice.util.PickTimeUtils; import com.wd.workoffice.util.PickTimeUtils;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
...@@ -46,7 +41,6 @@ import java.util.Date; ...@@ -46,7 +41,6 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView; import butterknife.BindView;
...@@ -197,6 +191,10 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -197,6 +191,10 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
TextView tvFactoryAdd2; TextView tvFactoryAdd2;
@BindView(R.id.tv_factory_add3) @BindView(R.id.tv_factory_add3)
TextView tvFactoryAdd3; TextView tvFactoryAdd3;
@BindView(R.id.rv_data7)
RecyclerView rvData7;
@BindView(R.id.tv_add7)
TextView tvAdd7;
private UserDataMachineAdapter data1Adapter; private UserDataMachineAdapter data1Adapter;
private UserDataMachineAdapter data2Adapter; private UserDataMachineAdapter data2Adapter;
private UserDataMachineAdapter data3Adapter; private UserDataMachineAdapter data3Adapter;
...@@ -212,12 +210,12 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -212,12 +210,12 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
private UserDataAdd3AddAdapter factory1Adapter; private UserDataAdd3AddAdapter factory1Adapter;
private UserDataAdd3RefAddAdapter factory2Adapter; private UserDataAdd3RefAddAdapter factory2Adapter;
private UserDataAdd3LabelAddAdapter factory3Adapter; private UserDataAdd3LabelAddAdapter factory3Adapter;
private UserDataMachineAdapter data5Adapter; private UserDataMachineAdapter data5Adapter;
private UserDataMachineAdapter data6Adapter; private UserDataMachineAdapter data6Adapter;
private UserDataMachineAdapter data7Adapter;
private List<String> data5List; private List<String> data5List;
private List<String> data6List; private List<String> data6List;
private List<String> data7List;
private UserDataDetailBean userDataDetailBean; private UserDataDetailBean userDataDetailBean;
private FactoryDetailBean factoryDetailBean; private FactoryDetailBean factoryDetailBean;
private boolean canFinish; private boolean canFinish;
...@@ -233,6 +231,7 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -233,6 +231,7 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData6.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)); rvFactoryData1.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvFactoryData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvFactoryData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
...@@ -250,18 +249,21 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -250,18 +249,21 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
data4List = new ArrayList<>(); data4List = new ArrayList<>();
data5List = new ArrayList<>(); data5List = new ArrayList<>();
data6List = new ArrayList<>(); data6List = new ArrayList<>();
data7List = new ArrayList<>();
data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List); data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List);
data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List); data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List);
data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List); data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List);
data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List); data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List);
data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List); data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List);
data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List); data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List);
data7Adapter = new UserDataMachineAdapter(R.layout.item_machine, data7List);
data1Adapter.bindToRecyclerView(rvData1); data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2); data2Adapter.bindToRecyclerView(rvData2);
data3Adapter.bindToRecyclerView(rvData3); data3Adapter.bindToRecyclerView(rvData3);
data4Adapter.bindToRecyclerView(rvData4); data4Adapter.bindToRecyclerView(rvData4);
data5Adapter.bindToRecyclerView(rvData5); data5Adapter.bindToRecyclerView(rvData5);
data6Adapter.bindToRecyclerView(rvData6); data6Adapter.bindToRecyclerView(rvData6);
data7Adapter.bindToRecyclerView(rvData7);
dataFactory1List = new ArrayList<>(); dataFactory1List = new ArrayList<>();
dataFactory2List = new ArrayList<>(); dataFactory2List = new ArrayList<>();
dataFactory3List = new ArrayList<>(); dataFactory3List = new ArrayList<>();
...@@ -402,20 +404,20 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -402,20 +404,20 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
tvMiddle7.setText(castLadle.getBakingTemperature()); tvMiddle7.setText(castLadle.getBakingTemperature());
tvMiddle8.setText(String.valueOf(castLadle.getBakingDateTime())); tvMiddle8.setText(String.valueOf(castLadle.getBakingDateTime()));
} }
MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent(); // MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent != null) { // if (covAgent != null) {
tvCover1.setText(covAgent.getLadleCoveringAgentName()); // tvCover1.setText(covAgent.getLadleCoveringAgentName());
tvCover2.setText(covAgent.getAcidAlkaliDegree()); // tvCover2.setText(covAgent.getAcidAlkaliDegree());
tvCover3.setText(covAgent.getChemicalComposition()); // tvCover3.setText(covAgent.getChemicalComposition());
tvCover4.setText(covAgent.getSupplierName()); // tvCover4.setText(covAgent.getSupplierName());
} // }
MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu(); // MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu != null) { // if (mouldFlu != null) {
tvProtection1.setText(mouldFlu.getMouldFluxesName()); // tvProtection1.setText(mouldFlu.getMouldFluxesName());
tvProtection2.setText(mouldFlu.getAcidAlkaliDegree()); // tvProtection2.setText(mouldFlu.getAcidAlkaliDegree());
tvProtection3.setText(mouldFlu.getChemicalComposition()); // tvProtection3.setText(mouldFlu.getChemicalComposition());
tvProtection4.setText(mouldFlu.getSupplierName()); // tvProtection4.setText(mouldFlu.getSupplierName());
} // }
changeList(); changeList();
} }
}); });
...@@ -428,6 +430,7 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -428,6 +430,7 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
data4List.clear(); data4List.clear();
data5List.clear(); data5List.clear();
data6List.clear(); data6List.clear();
data7List.clear();
if (machineDetailBean.getProductList() != null) { if (machineDetailBean.getProductList() != null) {
for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) { for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) {
data1List.add(productListBean.getProductsName()); data1List.add(productListBean.getProductsName());
...@@ -464,6 +467,12 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -464,6 +467,12 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
} }
data6Adapter.notifyDataSetChanged(); data6Adapter.notifyDataSetChanged();
} }
if (machineDetailBean.getSpeeds() != null) {
for (MachineDetailBean.SpeedsBean productListBean : machineDetailBean.getSpeeds()) {
data7List.add(productListBean.getSteelGrade());
}
data7Adapter.notifyDataSetChanged();
}
} }
@Override @Override
...@@ -541,6 +550,12 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -541,6 +550,12 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
startActivity(MesMiddleModifyActivity.class, "data", JSON.toJSONString(machineDetailBean.getSettleList().get(position))); 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.getSettleList().get(position)));
}
});
} }
@Override @Override
...@@ -550,8 +565,8 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -550,8 +565,8 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
@OnClick({R.id.tv_factory_add1, R.id.tv_factory_add2, R.id.tv_factory_add3, R.id.rl_cover4, R.id.rl_protection4, R.id.iv_modify_client, R.id.iv_modify_machine, R.id.iv_modify_steel, @OnClick({R.id.tv_factory_add1, R.id.tv_factory_add2, R.id.tv_factory_add3, R.id.rl_cover4, R.id.rl_protection4, R.id.iv_modify_client, R.id.iv_modify_machine, R.id.iv_modify_steel,
R.id.tv_add5, R.id.tv_add6, R.id.tv_add1, R.id.tv_add3, R.id.tv_add5,R.id.tv_add7, R.id.tv_add6, R.id.tv_add1, R.id.tv_add3,
R.id.tv_add4,R.id.rl_middle,R.id.rl_cover,R.id.rl_protection}) R.id.tv_add4, R.id.rl_middle, R.id.rl_cover, R.id.rl_protection})
public void onViewClicked(View view) { public void onViewClicked(View view) {
switch (view.getId()) { switch (view.getId()) {
case R.id.tv_factory_add1: case R.id.tv_factory_add1:
...@@ -643,6 +658,13 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -643,6 +658,13 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
} }
startActivity(MesMiddleAddActivity.class, "continuousCasterCode", userDataDetailBean.getSteelInfo().getContinuousCasterCode()); startActivity(MesMiddleAddActivity.class, "continuousCasterCode", userDataDetailBean.getSteelInfo().getContinuousCasterCode());
break; break;
case R.id.tv_add7:
if (userDataDetailBean == null) {
toast("数据加载中,请稍后");
return;
}
startActivity(MesSpeedAddActivity.class, "continuousCasterCode", userDataDetailBean.getSteelInfo().getContinuousCasterCode());
break;
case R.id.rl_middle: case R.id.rl_middle:
if (llMiddle.getVisibility() == View.VISIBLE) { if (llMiddle.getVisibility() == View.VISIBLE) {
llMiddle.setVisibility(View.GONE); llMiddle.setVisibility(View.GONE);
...@@ -782,29 +804,29 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -782,29 +804,29 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
castLadle.setLiquidSteelTemperature(tvMiddle5.getText().toString()); castLadle.setLiquidSteelTemperature(tvMiddle5.getText().toString());
castLadle.setBakingMethod(tvMiddle6.getText().toString()); castLadle.setBakingMethod(tvMiddle6.getText().toString());
castLadle.setBakingTemperature(tvMiddle7.getText().toString()); castLadle.setBakingTemperature(tvMiddle7.getText().toString());
if (!TextUtils.isEmpty(tvMiddle8.getText().toString())) // if (!TextUtils.isEmpty(tvMiddle8.getText().toString()))
castLadle.setBakingDateTime(Long.valueOf(tvMiddle8.getText().toString())); // castLadle.setBakingDateTime(Long.valueOf(tvMiddle8.getText().toString()));
MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent(); // MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent == null) { // if (covAgent == null) {
covAgent = new MachineDetailBean.CovAgentBean(); // covAgent = new MachineDetailBean.CovAgentBean();
machineDetailBean.setCovAgent(covAgent); // machineDetailBean.setCovAgent(covAgent);
} // }
covAgent.setLadleCoveringAgentName(tvCover1.getText().toString()); // covAgent.setLadleCoveringAgentName(tvCover1.getText().toString());
covAgent.setAcidAlkaliDegree(tvCover2.getText().toString()); // covAgent.setAcidAlkaliDegree(tvCover2.getText().toString());
covAgent.setChemicalComposition(tvCover3.getText().toString()); // covAgent.setChemicalComposition(tvCover3.getText().toString());
covAgent.setSupplierName(tvCover4.getText().toString()); // covAgent.setSupplierName(tvCover4.getText().toString());
//
//
MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu(); // MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu == null) { // if (mouldFlu == null) {
mouldFlu = new MachineDetailBean.MouldFluBean(); // mouldFlu = new MachineDetailBean.MouldFluBean();
machineDetailBean.setMouldFlu(mouldFlu); // machineDetailBean.setMouldFlu(mouldFlu);
} // }
mouldFlu.setMouldFluxesName(tvProtection1.getText().toString()); // mouldFlu.setMouldFluxesName(tvProtection1.getText().toString());
mouldFlu.setAcidAlkaliDegree(tvProtection2.getText().toString()); // mouldFlu.setAcidAlkaliDegree(tvProtection2.getText().toString());
mouldFlu.setChemicalComposition(tvProtection3.getText().toString()); // mouldFlu.setChemicalComposition(tvProtection3.getText().toString());
mouldFlu.setSupplierName(tvProtection4.getText().toString()); // mouldFlu.setSupplierName(tvProtection4.getText().toString());
} }
private void submitMachine() { private void submitMachine() {
...@@ -934,37 +956,11 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -934,37 +956,11 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
getData(); getData();
} }
@Override @Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { protected void onCreate(Bundle savedInstanceState) {
super.onActivityResult(requestCode, resultCode, data); super.onCreate(savedInstanceState);
switch (requestCode) { // TODO: add setContentView(...) invocation
case 10001: ButterKnife.bind(this);
if (resultCode == 10001) {
MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class);
MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
if (covAgent == null) {
covAgent = new MachineDetailBean.CovAgentBean();
machineDetailBean.setCovAgent(covAgent);
}
tvCover4.setText(modifyClient.getCustomerName());
covAgent.setSupplierCode(modifyClient.getCustomerCode());
covAgent.setSupplierName(modifyClient.getCustomerName());
}
break;
case 10002:
if (resultCode == 10001) {
MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class);
MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
if (mouldFlu == null) {
mouldFlu = new MachineDetailBean.MouldFluBean();
machineDetailBean.setMouldFlu(mouldFlu);
}
tvProtection4.setText(modifyClient.getCustomerName());
mouldFlu.setSupplierCode(modifyClient.getCustomerCode());
mouldFlu.setSupplierCode(modifyClient.getCustomerName());
}
break;
}
} }
} }
package com.wd.workoffice.ui.adapter; package com.wd.workoffice.ui.adapter;
import android.text.TextUtils;
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;
...@@ -20,7 +22,7 @@ public class UserDataClientAdapter extends BaseQuickAdapter<MesClientBean.ListBe ...@@ -20,7 +22,7 @@ public class UserDataClientAdapter extends BaseQuickAdapter<MesClientBean.ListBe
@Override @Override
protected void convert(BaseViewHolder helper, MesClientBean.ListBean item) { 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_person, item.getSalesCompanyName());
helper.setText(R.id.tv_sale, item.getSalesManagerName()); helper.setText(R.id.tv_sale, item.getSalesManagerName());
......
...@@ -289,7 +289,6 @@ ...@@ -289,7 +289,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white" android:background="@android:color/white"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
<TextView <TextView
...@@ -315,7 +314,6 @@ ...@@ -315,7 +314,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white" android:background="@android:color/white"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
<TextView <TextView
...@@ -340,7 +338,6 @@ ...@@ -340,7 +338,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white" android:background="@android:color/white"
android:orientation="vertical" android:orientation="vertical"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
<TextView <TextView
...@@ -462,6 +459,7 @@ ...@@ -462,6 +459,7 @@
<View style="@style/dividerX" /> <View style="@style/dividerX" />
<RelativeLayout <RelativeLayout
android:visibility="gone"
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:background="@android:color/white"
...@@ -485,9 +483,10 @@ ...@@ -485,9 +483,10 @@
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:visibility="gone"
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:background="@android:color/white"
...@@ -511,7 +510,7 @@ ...@@ -511,7 +510,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:id="@+id/rl_middle" android:id="@+id/rl_middle"
...@@ -756,9 +755,10 @@ ...@@ -756,9 +755,10 @@
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:visibility="gone"
android:id="@+id/rl_cover" android:id="@+id/rl_cover"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -781,9 +781,10 @@ ...@@ -781,9 +781,10 @@
android:src="@mipmap/mes_arrow_down" /> android:src="@mipmap/mes_arrow_down" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<LinearLayout <LinearLayout
android:visibility="gone"
android:id="@+id/ll_cover" android:id="@+id/ll_cover"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -897,9 +898,10 @@ ...@@ -897,9 +898,10 @@
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:visibility="gone"
android:id="@+id/rl_protection" android:id="@+id/rl_protection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -927,6 +929,7 @@ ...@@ -927,6 +929,7 @@
<LinearLayout <LinearLayout
android:id="@+id/ll_protection" android:id="@+id/ll_protection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white" android:background="@android:color/white"
android:orientation="vertical" android:orientation="vertical"
...@@ -1036,12 +1039,48 @@ ...@@ -1036,12 +1039,48 @@
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </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 <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:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:layout_marginTop="10mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
<TextView <TextView
......
...@@ -491,6 +491,7 @@ ...@@ -491,6 +491,7 @@
<View style="@style/dividerX" /> <View style="@style/dividerX" />
<RelativeLayout <RelativeLayout
android:visibility="gone"
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:background="@android:color/white"
...@@ -514,9 +515,10 @@ ...@@ -514,9 +515,10 @@
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:visibility="gone"
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:background="@android:color/white"
...@@ -540,7 +542,7 @@ ...@@ -540,7 +542,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:id="@+id/rl_middle" android:id="@+id/rl_middle"
...@@ -789,6 +791,7 @@ ...@@ -789,6 +791,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/rl_cover" android:id="@+id/rl_cover"
android:visibility="gone"
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:background="@android:color/white"
...@@ -810,10 +813,11 @@ ...@@ -810,10 +813,11 @@
android:src="@mipmap/mes_arrow_down" /> android:src="@mipmap/mes_arrow_down" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<LinearLayout <LinearLayout
android:id="@+id/ll_cover" android:id="@+id/ll_cover"
android:visibility="gone"
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:background="@android:color/white"
...@@ -926,12 +930,13 @@ ...@@ -926,12 +930,13 @@
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:id="@+id/rl_protection" android:id="@+id/rl_protection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:background="@android:color/white" android:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
...@@ -951,10 +956,11 @@ ...@@ -951,10 +956,11 @@
android:src="@mipmap/mes_arrow_down" /> android:src="@mipmap/mes_arrow_down" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<LinearLayout <LinearLayout
android:id="@+id/ll_protection" android:id="@+id/ll_protection"
android:visibility="gone"
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:background="@android:color/white"
...@@ -1066,12 +1072,47 @@ ...@@ -1066,12 +1072,47 @@
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </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 <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:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:layout_marginTop="10mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
<TextView <TextView
......
...@@ -129,6 +129,7 @@ ...@@ -129,6 +129,7 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data3" android:id="@+id/rv_data3"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginTop="10mm"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
......
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
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:background="@android:color/white"
android:visibility="gone"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
...@@ -125,6 +126,7 @@ ...@@ -125,6 +126,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white" android:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:visibility="gone"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
<TextView <TextView
...@@ -145,7 +147,7 @@ ...@@ -145,7 +147,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:id="@+id/rl_middle" android:id="@+id/rl_middle"
...@@ -398,13 +400,14 @@ ...@@ -398,13 +400,14 @@
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:id="@+id/rl_cover" android:id="@+id/rl_cover"
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:background="@android:color/white"
android:visibility="gone"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
...@@ -423,10 +426,11 @@ ...@@ -423,10 +426,11 @@
android:src="@mipmap/mes_arrow_down" /> android:src="@mipmap/mes_arrow_down" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<LinearLayout <LinearLayout
android:id="@+id/ll_cover" android:id="@+id/ll_cover"
android:visibility="gone"
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:background="@android:color/white"
...@@ -556,6 +560,7 @@ ...@@ -556,6 +560,7 @@
android:id="@+id/rl_protection" android:id="@+id/rl_protection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:background="@android:color/white" android:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
...@@ -575,9 +580,10 @@ ...@@ -575,9 +580,10 @@
android:src="@mipmap/mes_arrow_down" /> android:src="@mipmap/mes_arrow_down" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<LinearLayout <LinearLayout
android:visibility="gone"
android:id="@+id/ll_protection" android:id="@+id/ll_protection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -701,12 +707,47 @@ ...@@ -701,12 +707,47 @@
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
</LinearLayout> </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 <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:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:layout_marginTop="10mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
<TextView <TextView
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:background="@android:color/white" android:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
...@@ -114,13 +115,14 @@ ...@@ -114,13 +115,14 @@
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<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:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:visibility="gone"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
<TextView <TextView
...@@ -140,13 +142,14 @@ ...@@ -140,13 +142,14 @@
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:id="@+id/rl_middle" android:id="@+id/rl_middle"
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:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
...@@ -172,6 +175,7 @@ ...@@ -172,6 +175,7 @@
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:background="@android:color/white"
android:orientation="vertical" android:orientation="vertical"
android:paddingHorizontal="20mm"> android:paddingHorizontal="20mm">
...@@ -392,6 +396,7 @@ ...@@ -392,6 +396,7 @@
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:background="@android:color/white"
android:visibility="gone"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
...@@ -410,12 +415,13 @@ ...@@ -410,12 +415,13 @@
android:src="@mipmap/mes_arrow_down" /> android:src="@mipmap/mes_arrow_down" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<LinearLayout <LinearLayout
android:id="@+id/ll_cover" android:id="@+id/ll_cover"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:background="@android:color/white" android:background="@android:color/white"
android:orientation="vertical" android:orientation="vertical"
android:paddingHorizontal="20mm"> android:paddingHorizontal="20mm">
...@@ -526,13 +532,14 @@ ...@@ -526,13 +532,14 @@
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:id="@+id/rl_protection" android:id="@+id/rl_protection"
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:background="@android:color/white"
android:visibility="gone"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
...@@ -551,12 +558,13 @@ ...@@ -551,12 +558,13 @@
android:src="@mipmap/mes_arrow_down" /> android:src="@mipmap/mes_arrow_down" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<LinearLayout <LinearLayout
android:id="@+id/ll_protection" android:id="@+id/ll_protection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:background="@android:color/white" android:background="@android:color/white"
android:orientation="vertical" android:orientation="vertical"
android:paddingHorizontal="20mm"> android:paddingHorizontal="20mm">
...@@ -673,6 +681,43 @@ ...@@ -673,6 +681,43 @@
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> 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 <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -14,11 +14,6 @@ ...@@ -14,11 +14,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -113,9 +108,10 @@ ...@@ -113,9 +108,10 @@
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:visibility="gone"
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:background="@android:color/white"
...@@ -139,9 +135,10 @@ ...@@ -139,9 +135,10 @@
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:visibility="gone"
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:background="@android:color/white"
...@@ -410,10 +407,11 @@ ...@@ -410,10 +407,11 @@
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<RelativeLayout <RelativeLayout
android:id="@+id/rl_cover" android:id="@+id/rl_cover"
android:visibility="gone"
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:background="@android:color/white"
...@@ -435,10 +433,11 @@ ...@@ -435,10 +433,11 @@
android:src="@mipmap/mes_arrow_down" /> android:src="@mipmap/mes_arrow_down" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<LinearLayout <LinearLayout
android:id="@+id/ll_cover" android:id="@+id/ll_cover"
android:visibility="gone"
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:background="@android:color/white"
...@@ -554,6 +553,7 @@ ...@@ -554,6 +553,7 @@
<View style="@style/dividerX" /> <View style="@style/dividerX" />
<RelativeLayout <RelativeLayout
android:visibility="gone"
android:id="@+id/rl_protection" android:id="@+id/rl_protection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -576,9 +576,10 @@ ...@@ -576,9 +576,10 @@
android:src="@mipmap/mes_arrow_down" /> android:src="@mipmap/mes_arrow_down" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <!--<View style="@style/dividerX" />-->
<LinearLayout <LinearLayout
android:visibility="gone"
android:id="@+id/ll_protection" android:id="@+id/ll_protection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -691,7 +692,41 @@ ...@@ -691,7 +692,41 @@
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </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 <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
<?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="match_parent"
android:background="@color/white"
android:gravity="center_horizontal"
android:orientation="vertical">
<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="14sp" />
<EditText
android:hint="请输入"
android:id="@+id/tv_steel_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<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="14sp" />
<EditText
android:id="@+id/tv_speed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
android:hint="请输入"
android:textSize="14sp" />
</RelativeLayout>
<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: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:visibility="gone"
android:layout_marginRight="3mm"
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<View style="@style/dividerX" />
<LinearLayout
android:id="@+id/ll_cover"
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" />
<EditText android:hint="请输入"
android:id="@+id/tv_cover1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
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" />
<EditText android:hint="请输入"
android:id="@+id/tv_cover2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
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" />
<EditText android:hint="请输入"
android:id="@+id/tv_cover3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_cover4"
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:hint="请输入"
android:id="@+id/tv_cover4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
<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: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:visibility="gone"
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<View style="@style/dividerX" />
<LinearLayout
android:id="@+id/ll_protection"
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" />
<EditText android:hint="请输入"
android:id="@+id/tv_protection1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
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" />
<EditText android:hint="请输入"
android:id="@+id/tv_protection2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
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" />
<EditText android:hint="请输入"
android:id="@+id/tv_protection3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_protection4"
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:hint="请输入"
android:id="@+id/tv_protection4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:gravity="center_horizontal"
android:orientation="vertical">
<View style="@style/dividerX" />
<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="14sp" />
<TextView
android:id="@+id/tv_steel_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<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="14sp" />
<TextView
android:id="@+id/tv_speed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
android:textSize="14sp" />
</RelativeLayout>
<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">
<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>
<View style="@style/dividerX" />
<LinearLayout
android:id="@+id/ll_cover"
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_cover1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
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_cover2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
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_cover3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
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_cover4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
<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: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:visibility="gone"
android:layout_marginRight="3mm"
android:src="@mipmap/mes_arrow_down" />
</RelativeLayout>
<View style="@style/dividerX" />
<LinearLayout
android:id="@+id/ll_protection"
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_protection1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
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_protection2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
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_protection3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
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_protection4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论