第一版完成
parent
2302c91787
commit
cf38cce772
@ -0,0 +1,201 @@
|
||||
package com.example.pulit;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.example.pulit.entity.PlanView;
|
||||
import com.example.pulit.util.MyOkGoCallback;
|
||||
import com.example.pulit.util.Resust;
|
||||
import com.example.pulit.util.SharedPreferencesUtils;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class SolventActivity extends BaseActivity {
|
||||
|
||||
@BindView(R.id.solvent_title)
|
||||
TextView solventTitle;
|
||||
@BindView(R.id.solvent_frist_name)
|
||||
TextView solventFristName;
|
||||
@BindView(R.id.solvent_code)
|
||||
TextView solventCode;
|
||||
@BindView(R.id.solvent_title_name)
|
||||
TextView solventTitleName;
|
||||
@BindView(R.id.solvent_goods_code)
|
||||
TextView solventGoodsCode;
|
||||
@BindView(R.id.solvent_goodsName)
|
||||
TextView solventGoodsName;
|
||||
@BindView(R.id.solvent_goods)
|
||||
TextView solventGoods;
|
||||
@BindView(R.id.solvent_wc)
|
||||
TextView solventWc;
|
||||
|
||||
// @BindView(R.id.solvent_submit)
|
||||
// Button solventSubmit;
|
||||
|
||||
private boolean type;
|
||||
private boolean sanType;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_solvent);
|
||||
ButterKnife.bind(this);
|
||||
sanType = true;
|
||||
type = getIntent().getBooleanExtra("type", true);
|
||||
if (type) {
|
||||
solventTitle.setText("物料称重");
|
||||
solventFristName.setText("扫描拉缸条码");
|
||||
} else {
|
||||
solventTitle.setText("溶剂投料");
|
||||
solventFristName.setText("扫描泵位条码");
|
||||
solventTitleName.setText("扫描容器条码");
|
||||
}
|
||||
}
|
||||
|
||||
private PlanView planView;
|
||||
|
||||
@Override
|
||||
public void scanInfo(String info) {
|
||||
|
||||
if (sanType) {
|
||||
dialog.show();
|
||||
solventCode.setText(info);
|
||||
selectSup(info);
|
||||
} else {
|
||||
try {
|
||||
checkGoods(info);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Toast.makeText(this, "条码格式错误", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@OnClick({R.id.info_title_back, R.id.solvent_scan, R.id.solvent_submit})
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.info_title_back:
|
||||
finish();
|
||||
break;
|
||||
case R.id.solvent_scan:
|
||||
super.sanCode();
|
||||
break;
|
||||
case R.id.solvent_submit:
|
||||
if (planView == null) return;
|
||||
dialog.show();
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json;"),
|
||||
JSONObject.toJSONString(planView));
|
||||
OkGo.<Resust>post("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/Warehouse/ExecPlcState")
|
||||
.upRequestBody(requestBody)
|
||||
.execute(new MyOkGoCallback() {
|
||||
@Override
|
||||
public void onSuccess(Response<Resust> response) {
|
||||
super.onSuccess(response);
|
||||
dialog.dismiss();
|
||||
Toast.makeText(SolventActivity.this, response.body().getMsg(), Toast.LENGTH_SHORT).show();
|
||||
if (response.body().isSuccess()) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<Resust> response) {
|
||||
super.onError(response);
|
||||
dialog.dismiss();
|
||||
Toast.makeText(SolventActivity.this, "网络请求失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void selectSup(String info) {
|
||||
String uri = type ? "/api/Solvent/GetByCylinderCode" : "/api/Solvent/GetByPumpCode";
|
||||
OkGo.<Resust>get("http://" + SharedPreferencesUtils.getstring("ip", null) + uri)
|
||||
.params("code", info)
|
||||
.execute(new MyOkGoCallback() {
|
||||
@Override
|
||||
public void onSuccess(Response<Resust> response) {
|
||||
super.onSuccess(response);
|
||||
dialog.dismiss();
|
||||
if (response.body().isSuccess()) {
|
||||
planView = JSONObject.parseObject(response.body().getData(), PlanView.class);
|
||||
// Log.e("TAG", "onSuccess:" + planView.toString());
|
||||
solventWc.setText(planView.getSet_Error()+"");
|
||||
Toast.makeText(SolventActivity.this, "扫描成功", Toast.LENGTH_SHORT).show();
|
||||
sanType = false;
|
||||
} else {
|
||||
Toast.makeText(SolventActivity.this, response.body().getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<Resust> response) {
|
||||
super.onError(response);
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void checkGoods(String scanInfo) {
|
||||
{
|
||||
solventGoodsCode.setText(scanInfo);
|
||||
//物料编码
|
||||
String goodsCode = scanInfo.substring(0, scanInfo.indexOf("-"));
|
||||
Log.e("TAG", "scanInfo:" + goodsCode);
|
||||
planView.setCode(goodsCode);
|
||||
//品名
|
||||
int index = scanInfo.indexOf("-", scanInfo.indexOf("-", scanInfo.indexOf("-") + 1) + 1) + 1;
|
||||
int endIndex = scanInfo.indexOf("|");
|
||||
String goodsName = scanInfo.substring(index, endIndex);
|
||||
Log.e("TAG", "scanInfo:" + goodsName);
|
||||
planView.setMaterialName(goodsName);
|
||||
solventGoodsName.setText(goodsName);
|
||||
//重量
|
||||
String format = decimalFormat.format(
|
||||
Double.parseDouble(
|
||||
scanInfo.substring(scanInfo.indexOf("|") + 1, scanInfo.indexOf("kg"))
|
||||
));
|
||||
solventGoods.setText(format);
|
||||
double weight = Double.parseDouble(format);
|
||||
|
||||
planView.setMaterialWeight(weight);
|
||||
planView.setWholeMaterial(scanInfo);
|
||||
double set_weight = planView.getSet_Weight();
|
||||
double set_error = planView.getSet_Error();
|
||||
if (type) {
|
||||
//称量只验证重量
|
||||
|
||||
// double set_weight = planView.getSet_Weight();
|
||||
// double set_error = planView.getSet_Error();
|
||||
if (set_weight+set_error >= weight && set_weight-set_error <= weight) {
|
||||
planView.setState(1);
|
||||
tipDialog.showState(true);
|
||||
} else {
|
||||
planView.setState(0);
|
||||
tipDialog.showState(false);
|
||||
}
|
||||
} else {
|
||||
if (planView.getMaterial_code() .equals(goodsCode) && set_weight+set_error >= weight && set_weight-set_error <= weight) {
|
||||
planView.setState(1);
|
||||
tipDialog.showState(true);
|
||||
} else {
|
||||
planView.setState(0);
|
||||
tipDialog.showState(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,189 @@
|
||||
package com.example.pulit;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.example.pulit.util.MyOkGoCallback;
|
||||
import com.example.pulit.util.Resust;
|
||||
import com.example.pulit.util.SharedPreferencesUtils;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class X2Activity extends BaseActivity {
|
||||
|
||||
@BindView(R.id.x2_code)
|
||||
TextView x2Code;
|
||||
@BindView(R.id.x2_plan_code)
|
||||
TextView x2PlanCode;
|
||||
@BindView(R.id.x2_goods)
|
||||
TextView x2Goods;
|
||||
@BindView(R.id.x2_goods_code)
|
||||
TextView x2GoodsCode;
|
||||
@BindView(R.id.x2_plan_name)
|
||||
TextView x2PlanName;
|
||||
@BindView(R.id.x2_goods_name)
|
||||
TextView x2GoodsName;
|
||||
private boolean sanType;
|
||||
private int state = 0;
|
||||
private int Bin_Serial;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_x2);
|
||||
ButterKnife.bind(this);
|
||||
sanType = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scanInfo(String info) {
|
||||
if (sanType) {
|
||||
x2Code.setText(info);
|
||||
selectSup(info);
|
||||
} else {
|
||||
x2Goods.setText(info);
|
||||
if (info.contains("kg")) {
|
||||
//整包 截取
|
||||
String goodsCode = info.substring(0, info.indexOf("-"));
|
||||
checkItem(goodsCode);
|
||||
x2GoodsCode.setText(goodsCode);
|
||||
int index = info.indexOf("-", info.indexOf("-", info.indexOf("-") + 1) + 1) + 1;
|
||||
int endIndex = info.indexOf("|");
|
||||
String goodsName = info.substring(index, endIndex);
|
||||
x2GoodsName.setText(goodsName);
|
||||
} else {
|
||||
selectGoodsInfo(info);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void checkItem(String goodsCode) {
|
||||
String planCode = x2PlanCode.getText().toString();
|
||||
if (planCode.equals(goodsCode)) {
|
||||
tipDialog.showState(true);
|
||||
state = 1;
|
||||
} else {
|
||||
tipDialog.showState(false);
|
||||
state = 2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@OnClick({R.id.info_title_back, R.id.x2_scan, R.id.x2_submit})
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.info_title_back:
|
||||
finish();
|
||||
break;
|
||||
case R.id.x2_scan:
|
||||
super.sanCode();
|
||||
break;
|
||||
case R.id.x2_submit:
|
||||
if (state == 0) return;
|
||||
dialog.show();
|
||||
|
||||
OkGo.<Resust>post("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/xl_material/ExecPlcCode")
|
||||
.params("code",Bin_Serial)
|
||||
.params("state",state)
|
||||
.execute(new MyOkGoCallback() {
|
||||
@Override
|
||||
public void onSuccess(Response<Resust> response) {
|
||||
super.onSuccess(response);
|
||||
dialog.dismiss();
|
||||
Toast.makeText(X2Activity.this, response.body().getMsg(), Toast.LENGTH_SHORT).show();
|
||||
if (response.body().isSuccess()){
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<Resust> response) {
|
||||
super.onError(response);
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void selectSup(String info) {
|
||||
dialog.show();
|
||||
OkGo.<Resust>get("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/xl_material/GetByBinCode")
|
||||
.params("code", info)
|
||||
.execute(new MyOkGoCallback() {
|
||||
@Override
|
||||
public void onSuccess(Response<Resust> response) {
|
||||
super.onSuccess(response);
|
||||
dialog.dismiss();
|
||||
if (response.body().isSuccess()) {
|
||||
JSONObject obj = response.body().getDateObj();
|
||||
x2PlanCode.setText(obj.getString("Material_code"));
|
||||
Bin_Serial=obj.getInteger("Bin_Serial");
|
||||
x2PlanName.setText(obj.getString("Material_Name"));
|
||||
sanType=false;
|
||||
} else {
|
||||
Toast.makeText(X2Activity.this, "请求失败,条码不正确", Toast.LENGTH_SHORT).show();
|
||||
x2PlanCode.setText(null);
|
||||
x2PlanName.setText(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<Resust> response) {
|
||||
super.onError(response);
|
||||
dialog.dismiss();
|
||||
Toast.makeText(X2Activity.this, "网络请求失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void selectGoodsInfo(String info) {
|
||||
dialog.show();
|
||||
OkGo.<Resust>get("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/xl_material/GetByMaterialCode")
|
||||
.params("code", info)
|
||||
.execute(new MyOkGoCallback() {
|
||||
@Override
|
||||
public void onSuccess(Response<Resust> response) {
|
||||
super.onSuccess(response);
|
||||
dialog.dismiss();
|
||||
if (response.body().isSuccess()) {
|
||||
JSONObject obj = response.body().getDateObj();
|
||||
String material_code = obj.getString("Material_code");
|
||||
x2GoodsCode.setText(material_code);
|
||||
x2GoodsName.setText(obj.getString("Material_name"));
|
||||
checkItem(material_code);
|
||||
} else {
|
||||
Toast.makeText(X2Activity.this, "请求失败,条码不正确", Toast.LENGTH_SHORT).show();
|
||||
x2GoodsCode.setText(null);
|
||||
x2GoodsCode.setText(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<Resust> response) {
|
||||
super.onError(response);
|
||||
dialog.dismiss();
|
||||
Toast.makeText(X2Activity.this, "网络请求失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package com.example.pulit.entity;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2023/8/7 15:42
|
||||
*/
|
||||
public class Item {
|
||||
private int ID;
|
||||
private String MainId;
|
||||
private String MaterialID;
|
||||
private String MaterialName;
|
||||
private String Material_Code;
|
||||
private double SetWeight;
|
||||
|
||||
public int getID() {
|
||||
return ID;
|
||||
}
|
||||
|
||||
public void setID(int ID) {
|
||||
this.ID = ID;
|
||||
}
|
||||
|
||||
public String getMainId() {
|
||||
return MainId;
|
||||
}
|
||||
|
||||
public void setMainId(String mainId) {
|
||||
MainId = mainId;
|
||||
}
|
||||
|
||||
public String getMaterialID() {
|
||||
return MaterialID;
|
||||
}
|
||||
|
||||
public void setMaterialID(String materialID) {
|
||||
MaterialID = materialID;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return MaterialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
MaterialName = materialName;
|
||||
}
|
||||
|
||||
public String getMaterial_Code() {
|
||||
return Material_Code;
|
||||
}
|
||||
|
||||
public void setMaterial_Code(String material_Code) {
|
||||
Material_Code = material_Code;
|
||||
}
|
||||
|
||||
public double getSetWeight() {
|
||||
return SetWeight;
|
||||
}
|
||||
|
||||
public void setSetWeight(double setWeight) {
|
||||
SetWeight = setWeight;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Item item = (Item) o;
|
||||
|
||||
if (Double.compare(item.SetWeight, SetWeight) != 0) return false;
|
||||
return Material_Code != null ? Material_Code.equals(item.Material_Code) : item.Material_Code == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result;
|
||||
long temp;
|
||||
result = Material_Code != null ? Material_Code.hashCode() : 0;
|
||||
temp = Double.doubleToLongBits(SetWeight);
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.example.pulit.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2023/8/7 15:39
|
||||
*/
|
||||
public class X1 {
|
||||
private int ID;
|
||||
private String Name;
|
||||
private String BarCode;
|
||||
private String CreateTime;
|
||||
private List<Item> Children;
|
||||
|
||||
public int getID() {
|
||||
return ID;
|
||||
}
|
||||
|
||||
public void setID(int ID) {
|
||||
this.ID = ID;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return Name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return BarCode;
|
||||
}
|
||||
|
||||
public void setBarCode(String barCode) {
|
||||
BarCode = barCode;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return CreateTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
CreateTime = createTime;
|
||||
}
|
||||
|
||||
public List<Item> getChildren() {
|
||||
return Children;
|
||||
}
|
||||
|
||||
public void setChildren(List<Item> children) {
|
||||
Children = children;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "X1{" +
|
||||
"ID=" + ID +
|
||||
", Name='" + Name + '\'' +
|
||||
", BarCode='" + BarCode + '\'' +
|
||||
", CreateTime='" + CreateTime + '\'' +
|
||||
", Children=" + Children +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.example.pulit.entity;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2023/8/8 11:20
|
||||
*/
|
||||
public class X1Submit {
|
||||
private int station;// 釜工位——主键
|
||||
private String kCode;// 投料釜条码
|
||||
private String matCode;// 物料条码
|
||||
private double matWeight;//物料重量
|
||||
private String matType;// 物料类型:整包、散装
|
||||
private int state;//状态 0:未扫描 1:匹配 2:报警
|
||||
private String wholePackage;
|
||||
public int getStation() {
|
||||
return station;
|
||||
}
|
||||
|
||||
public void setStation(int station) {
|
||||
this.station = station;
|
||||
}
|
||||
|
||||
public String getkCode() {
|
||||
return kCode;
|
||||
}
|
||||
|
||||
public void setkCode(String kCode) {
|
||||
this.kCode = kCode;
|
||||
}
|
||||
|
||||
public String getMatCode() {
|
||||
return matCode;
|
||||
}
|
||||
|
||||
public void setMatCode(String matCode) {
|
||||
this.matCode = matCode;
|
||||
}
|
||||
|
||||
public double getMatWeight() {
|
||||
return matWeight;
|
||||
}
|
||||
|
||||
public void setMatWeight(double matWeight) {
|
||||
this.matWeight = matWeight;
|
||||
}
|
||||
|
||||
public String getMatType() {
|
||||
return matType;
|
||||
}
|
||||
|
||||
public void setMatType(String matType) {
|
||||
this.matType = matType;
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public String getWholePackage() {
|
||||
return wholePackage;
|
||||
}
|
||||
|
||||
public void setWholePackage(String wholePackage) {
|
||||
this.wholePackage = wholePackage;
|
||||
}
|
||||
|
||||
public void setState(int state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.example.pulit.util;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.lzy.okgo.callback.AbsCallback;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import okhttp3.ResponseBody;
|
||||
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2022/9/20 17:26
|
||||
*/
|
||||
public class MyOkGoCallback extends AbsCallback<Resust> {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Response<Resust> response) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Resust convertResponse(okhttp3.Response response) throws Throwable {
|
||||
ResponseBody body = response.body();
|
||||
if (body == null) return null;
|
||||
|
||||
Resust resust = JSONObject.parseObject(body.string(), Resust.class);
|
||||
|
||||
return resust;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.example.pulit.util;
|
||||
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2022/9/20 17:22
|
||||
*/
|
||||
public class Resust {
|
||||
private int status;
|
||||
private boolean success;
|
||||
private Object data;
|
||||
private String msg;
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return data.toString();
|
||||
}
|
||||
public JSONObject getDateObj(){
|
||||
return (JSONObject)data;
|
||||
}
|
||||
|
||||
public void setData(Object data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Resust{" +
|
||||
"status=" + status +
|
||||
", success=" + success +
|
||||
", data=" + data +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".SolventActivity"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
android:background="@color/blue"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/solvent_title"
|
||||
style="@style/title_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/info_title_back"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="15dp"
|
||||
android:src="@mipmap/icon_back" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/solvent_frist_name"
|
||||
style="@style/text_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="46dp"
|
||||
android:text="" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/solvent_code"
|
||||
style="@style/text_view2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/text_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="46dp"
|
||||
android:text="设置误差" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/solvent_wc"
|
||||
style="@style/text_view1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/solvent_title_name"
|
||||
style="@style/text_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="46dp"
|
||||
android:text="扫描物料条码" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/solvent_goods_code"
|
||||
style="@style/text_view2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/text_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="46dp"
|
||||
android:text="物料名称" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/solvent_goodsName"
|
||||
style="@style/text_view1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/text_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="46dp"
|
||||
android:text="物料重量" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/solvent_goods"
|
||||
style="@style/text_view1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/solvent_scan"
|
||||
style="@style/button_style1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="触发扫描" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/solvent_submit"
|
||||
style="@style/button_style2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="22dp"
|
||||
android:text="提交" />
|
||||
</LinearLayout>
|
@ -0,0 +1,184 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".X2Activity"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
android:background="@color/blue"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
style="@style/title_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="料仓补料" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/info_title_back"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="15dp"
|
||||
android:src="@mipmap/icon_back" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/text_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="46dp"
|
||||
android:text="扫描料仓条码" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/x2_code"
|
||||
style="@style/text_view2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/text_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="46dp"
|
||||
android:text="计划物料编码" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/x2_plan_code"
|
||||
style="@style/text_view1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/text_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="46dp"
|
||||
android:text="计划物料名称" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/x2_plan_name"
|
||||
style="@style/text_view1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/text_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="46dp"
|
||||
android:text="扫描原材料" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/x2_goods"
|
||||
style="@style/text_view2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/text_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="46dp"
|
||||
android:text="实际物料条码" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/x2_goods_code"
|
||||
style="@style/text_view1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/text_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="46dp"
|
||||
android:text="实际物料名称" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/x2_goods_name"
|
||||
style="@style/text_view1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/x2_scan"
|
||||
style="@style/button_style1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="触发扫描" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/x2_submit"
|
||||
style="@style/button_style2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="22dp"
|
||||
android:text="补料完毕" />
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue