修改 液体称量

master
wangh 1 year ago
parent 9faa3c70be
commit ac63b55a89

@ -10,7 +10,7 @@ android {
applicationId "com.example.pulit"
minSdkVersion 26
targetSdkVersion 30
versionCode 4
versionCode 7
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

@ -10,7 +10,7 @@
{
"type": "SINGLE",
"filters": [],
"versionCode": 4,
"versionCode": 6,
"versionName": "1.0",
"outputFile": "app-release.apk"
}

@ -15,7 +15,8 @@
android:supportsRtl="true"
android:theme="@style/Theme.PuLiT"
android:usesCleartextTraffic="true">
<activity android:name=".So2Activity"></activity>
<activity android:name=".PlanActivity"></activity>
<activity android:name=".So2Activity" />
<activity android:name=".X3Activity" />
<activity android:name=".SolventActivity" />
<activity android:name=".X2Activity" />

@ -32,7 +32,8 @@ public class MainActivity extends AppCompatActivity {
}
@OnClick({R.id.home_xl_b, R.id.home_xl_t, R.id.home_xl_z, R.id.home_rj_c, R.id.home_rj_t, R.id.home_setting, R.id.home_back})
@OnClick({R.id.home_xl_b, R.id.home_xl_t, R.id.home_xl_z, R.id.home_rj_c, R.id.home_rj_t,
R.id.home_setting, R.id.home_back, R.id.home_plan})
public void onClick(View view) {
Intent intent = null;
switch (view.getId()) {
@ -51,6 +52,9 @@ public class MainActivity extends AppCompatActivity {
case R.id.home_rj_t:
intent = new Intent(this, So2Activity.class);
break;
// case R.id.home_plan:
// intent = new Intent(this, PlanActivity.class);
// break;
case R.id.home_setting:
textDialog.setIpAddress(SharedPreferencesUtils.getstring("ip", null));
textDialog.show();

@ -55,11 +55,11 @@ public class MyApplication extends Application {
builder.addInterceptor(loggingInterceptor);
//全局的读取超时时间
builder.readTimeout(OkGo.DEFAULT_MILLISECONDS, TimeUnit.MILLISECONDS);
builder.readTimeout(3000, TimeUnit.MILLISECONDS);
//全局的写入超时时间
builder.writeTimeout(OkGo.DEFAULT_MILLISECONDS, TimeUnit.MILLISECONDS);
builder.writeTimeout(3000, TimeUnit.MILLISECONDS);
//全局的连接超时时间
builder.connectTimeout(OkGo.DEFAULT_MILLISECONDS, TimeUnit.MILLISECONDS);
builder.connectTimeout(3000, TimeUnit.MILLISECONDS);
//使用内存保持cookieapp退出后cookie消失
builder.cookieJar(new CookieJarImpl(new MemoryCookieStore()));
OkGo.getInstance().init(this).setOkHttpClient(builder.build()) //建议设置OkHttpClient不设置将使用默认的

@ -0,0 +1,89 @@
package com.example.pulit;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Spinner;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.example.pulit.adapter.PlanAdapter;
import com.example.pulit.entity.AxPlan;
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 java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class PlanActivity extends BaseActivity {
@BindView(R.id.plan_type)
Spinner planType;
@BindView(R.id.plan_recycler)
RecyclerView planRecycler;
private PlanAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_plan);
ButterKnife.bind(this);
planRecycler.setLayoutManager(new LinearLayoutManager(this));
adapter = new PlanAdapter(this);
}
@Override
public void scanInfo(String info) {
}
@OnClick({R.id.info_title_back, R.id.plan_select})
public void onClick(View view) {
switch (view.getId()) {
case R.id.info_title_back:
finish();
break;
case R.id.plan_select:
String type = planType.getSelectedItem().toString();
String url = null;
if (type.equals("小料")) {
url = "/api/xl_material/GetXlPlanInfo";
} else {
url = "/api/Solvent/GetSolventPlanInfo";
}
dialog.show();
OkGo.<Resust>get("http://"+SharedPreferencesUtils.getstring("ip", null)+url).execute(new MyOkGoCallback(){
@Override
public void onSuccess(Response<Resust> response) {
super.onSuccess(response);
dialog.dismiss();
List<AxPlan> list= JSON.parseArray(response.body().getData(),AxPlan.class);
Log.e("TAG", "onSuccess:" + list.toString());
adapter.setList(list);
planRecycler.setAdapter(adapter);
}
@Override
public void onError(Response<Resust> response) {
super.onError(response);
dialog.dismiss();
Toast.makeText(PlanActivity.this, "网络连接错误", Toast.LENGTH_SHORT).show();
}
});
break;
}
}
}

@ -3,7 +3,6 @@ package com.example.pulit;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
@ -15,6 +14,7 @@ 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.callback.StringCallback;
import com.lzy.okgo.model.Response;
import butterknife.BindView;
@ -35,8 +35,13 @@ public class SolventActivity extends BaseActivity {
LinearLayout s2gion;
@BindView(R.id.solvent_db)
Spinner solventDb;
@BindView(R.id.solvent_goodslv)
TextView solventGoodslv;
@BindView(R.id.solvent_goodslv_state)
LinearLayout solventGoodslvState;
private boolean sanType;
private boolean sanLvType;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -44,17 +49,21 @@ public class SolventActivity extends BaseActivity {
setContentView(R.layout.activity_solvent);
ButterKnife.bind(this);
sanType = true;
sanLvType = false;
}
private PlanView planView;
@Override
public void scanInfo(String info) {
if (sanLvType) {
solventGoodslv.setText(info.replace("%", "").trim());
} else {
if (sanType) {
dialog.show();
solventCode.setText(info);
selectSup(info);
String dbName = solventDb.getSelectedItem().toString();
selectSup(info, dbName);
} else {
try {
checkGoods(info);
@ -62,10 +71,11 @@ public class SolventActivity extends BaseActivity {
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()) {
@ -77,11 +87,18 @@ public class SolventActivity extends BaseActivity {
break;
case R.id.solvent_submit:
if (planView == null) return;
String string1 = solventGoodslv.getText().toString();
if (sanLvType && string1.isEmpty()) {
Toast.makeText(this, "必须扫描固含率", Toast.LENGTH_SHORT).show();
return;
}
String dbaname = solventDb.getSelectedItem().toString();
String string = solventCode.getText().toString();
dialog.show();
planView.setWeighbridge(dbaname);
planView.setCylinderBarCode(string);
planView.setRate(string1);
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json;"),
JSONObject.toJSONString(planView));
OkGo.<Resust>post("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/Solvent/ExecPlcState")
@ -108,28 +125,36 @@ public class SolventActivity extends BaseActivity {
}
}
private void selectSup(String info) {
OkGo.<Resust>get("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/Solvent/GetByCylinderInfo")
private void selectSup(String info, String dbName) {
OkGo.<String>get("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/Solvent/GetByCylinderInfo")
.params("code", info)
.execute(new MyOkGoCallback() {
.params("weighbridge", dbName)
.execute(new StringCallback() {
@Override
public void onSuccess(Response<Resust> response) {
super.onSuccess(response);
public void onSuccess(Response<String> response) {
dialog.dismiss();
if (response.body().isSuccess()) {
planView = JSONObject.parseObject(response.body().getData(), PlanView.class);
String body = response.body();
Resust resust = JSONObject.parseObject(response.body(), Resust.class);
if (resust.isSuccess()) {
String substring = body.substring(body.indexOf(":{") + 1, body.length() - 1);
planView = JSONObject.parseObject(substring, PlanView.class);
Log.e("TAG", "onSuccess:" + planView.toString());
if (planView.isExist()) {
solventGoodslvState.setVisibility(View.VISIBLE);
}
Toast.makeText(SolventActivity.this, "查询成功", Toast.LENGTH_SHORT).show();
sanType = false;
} else {
Toast.makeText(SolventActivity.this, response.body().getMsg(), Toast.LENGTH_SHORT).show();
Toast.makeText(SolventActivity.this, resust.getMsg(), Toast.LENGTH_SHORT).show();
}
}
@Override
public void onError(Response<Resust> response) {
public void onError(Response<String> response) {
super.onError(response);
dialog.dismiss();
Toast.makeText(SolventActivity.this, "网络请求失败", Toast.LENGTH_SHORT).show();
Toast.makeText(SolventActivity.this, "网络连接错误", Toast.LENGTH_SHORT).show();
}
});
}
@ -157,6 +182,7 @@ public class SolventActivity extends BaseActivity {
if (planView.getMaterial_code().equals(goodsCode)) {
planView.setState(1);
tipDialog.showState(true);
sanLvType = true;
} else {
planView.setState(0);
tipDialog.showState(false);

@ -12,6 +12,7 @@ import android.widget.Toast;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.example.pulit.adapter.ItemAdapter;
import com.example.pulit.entity.Item;
@ -53,7 +54,10 @@ public class X1Activity extends BaseActivity {
private ItemAdapter adapter;
private X1Submit entrySubmit;
private ListPopupWindow lpw;
private List<String> planList;
private String kcode;
private int station;
private String pianId;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -64,8 +68,11 @@ public class X1Activity extends BaseActivity {
adapter = new ItemAdapter(this);
lpw = new ListPopupWindow(this);
lpw.setAnchorView(x1Code1);
lpw.setAdapter(new ArrayAdapter(this, R.layout.support_simple_spinner_dropdown_item, Arrays.asList("B20230011", "B20230300", "B20230221", "B20230192", "B20230223")));
lpw.setOnItemClickListener((adapterView, view, i, l) -> lpw.dismiss());
lpw.setOnItemClickListener((adapterView, view, i, l) -> {
String planId = planList.get(i);
selectPlanByID(x1Code.getText().toString(), planId);
lpw.dismiss();
});
}
@Override
@ -108,6 +115,12 @@ public class X1Activity extends BaseActivity {
break;
case R.id.x1_submit:
if (entrySubmit == null) return;
for(Item item:items){
if (!item.isState()){
Toast.makeText(this, "还有物料未验证", Toast.LENGTH_SHORT).show();
return;
}
}
submit(entrySubmit, 1);
break;
case R.id.x1_submit2:
@ -118,13 +131,11 @@ public class X1Activity extends BaseActivity {
}
}
private String kcode;
private int station;
private String pianId;
//提交
private void submit(X1Submit entrySubmit, int state) {
dialog.show();
entrySubmit.setStates(state);
entrySubmit.setState(state);
entrySubmit.setPlanId(pianId);
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json;"),
JSONObject.toJSONString(entrySubmit));
@ -137,6 +148,10 @@ public class X1Activity extends BaseActivity {
dialog.dismiss();
Toast.makeText(X1Activity.this, response.body().getMsg(), Toast.LENGTH_SHORT).show();
if (response.body().isSuccess()) {
if (state == 1) {
tipDialog.showMsg(true, "提交成功");
return;
}
finish();
}
}
@ -149,10 +164,42 @@ public class X1Activity extends BaseActivity {
});
}
//查询 釜
private void getF(String info) {
OkGo.<Resust>get("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/Warehouse/GetByCode")
OkGo.<Resust>get("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/Warehouse/GetWarehousePlan")
.params("code", info)
.execute(new MyOkGoCallback() {
@Override
public void onSuccess(Response<Resust> response) {
super.onSuccess(response);
dialog.dismiss();
if (response.body().isSuccess()) {
planList = JSON.parseArray(response.body().getData(), String.class);
lpw.setAdapter(new ArrayAdapter(X1Activity.this,
R.layout.support_simple_spinner_dropdown_item,
planList));
lpw.show();
} else {
Toast.makeText(X1Activity.this, "请求失败,条码不正确", Toast.LENGTH_SHORT).show();
}
}
@Override
public void onError(Response<Resust> response) {
super.onError(response);
dialog.dismiss();
Toast.makeText(X1Activity.this, "网络请求失败", Toast.LENGTH_SHORT).show();
}
}
);
}
//查询计划中的物料
private void selectPlanByID(String code, String planID) {
OkGo.<Resust>get("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/Warehouse/GetByCode")
.params("code", code)
.params("planId", planID)
.execute(new MyOkGoCallback() {
@Override
public void onSuccess(Response<Resust> response) {
@ -167,7 +214,6 @@ public class X1Activity extends BaseActivity {
adapter.setList(items);
x1RecyclerView.setAdapter(adapter);
scanStates = false;//扫描
lpw.show();
} else {
Toast.makeText(X1Activity.this, "请求失败,条码不正确", Toast.LENGTH_SHORT).show();
}
@ -227,6 +273,8 @@ public class X1Activity extends BaseActivity {
if (selectWeight - errorWeight <= goodsWeight && selectWeight + errorWeight >= goodsWeight) {
entrySubmit.setState(1);
tipDialog.showState(true);
selectItem.setState(true);
adapter.notifyDataSetChanged();
} else {
tipDialog.showState(false);
entrySubmit.setState(2);

@ -1,6 +1,7 @@
package com.example.pulit;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
@ -35,6 +36,7 @@ public class X2Activity extends BaseActivity {
private boolean sanType;
private int state = 0;
private int Bin_Serial;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -42,7 +44,11 @@ public class X2Activity extends BaseActivity {
ButterKnife.bind(this);
sanType = true;
}
//1A000001、000524
private String weight;
private String goodsCode;
@Override
public void scanInfo(String info) {
if (sanType) {
@ -50,19 +56,27 @@ public class X2Activity extends BaseActivity {
selectSup(info);
} else {
x2Goods.setText(info);
if (info.contains("kg")) {
// if (info.contains("kg")) {
try {
//整包 截取
String goodsCode = info.substring(0, info.indexOf("-"));
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);
weight = info.substring(endIndex + 1, info.indexOf("kg"));
Log.e("TAG", "截取的重量:" + weight);
} catch (Exception e) {
e.printStackTrace();
Toast.makeText(this, "条码错误", Toast.LENGTH_SHORT).show();
}
// } else {
// selectGoodsInfo(info);
//
// }
}
@ -97,6 +111,8 @@ public class X2Activity extends BaseActivity {
OkGo.<Resust>get("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/xl_material/ExecPlcCode")
.params("code", Bin_Serial)
.params("state", state)
.params("materialCode", goodsCode)
.params("weight", weight)
.execute(new MyOkGoCallback() {
@Override
public void onSuccess(Response<Resust> response) {
@ -152,7 +168,7 @@ public class X2Activity extends BaseActivity {
}
private void selectGoodsInfo(String info) {
/* private void selectGoodsInfo(String info) {
dialog.show();
OkGo.<Resust>get("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/xl_material/GetByMaterialCode")
.params("code", info)
@ -183,7 +199,7 @@ public class X2Activity extends BaseActivity {
}
);
}
}*/
}

@ -1,6 +1,8 @@
package com.example.pulit.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Color;
import android.os.Build;
import android.util.Log;
import android.view.LayoutInflater;
@ -49,13 +51,22 @@ public class ItemAdapter extends RecyclerView.Adapter<ItemAdapter.MyViewHolder>
return new MyViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
Item been = list.get(position);
holder.index.setText(position+1+"");
holder.code.setText(been.getMaterial_Code());
holder.name.setText(been.getMaterialName());
holder.number.setText(been.getSetWeight()+"");
if (been.isState()){
holder.state.setText("正确");
holder.state.setTextColor(Color.GREEN);
}else{
holder.state.setText("未验证");
holder.state.setTextColor(Color.RED);
}
}
@ -84,7 +95,7 @@ public class ItemAdapter extends RecyclerView.Adapter<ItemAdapter.MyViewHolder>
//如果要点击变色必须要写用来固定view
class MyViewHolder extends RecyclerView.ViewHolder {
TextView index;
TextView state;
TextView code;
TextView name;
TextView number;
@ -92,7 +103,7 @@ public class ItemAdapter extends RecyclerView.Adapter<ItemAdapter.MyViewHolder>
public MyViewHolder(View view) {
super(view);
index=view.findViewById(R.id.item_index);
state=view.findViewById(R.id.item_state);
code=view.findViewById(R.id.item_code);
name=view.findViewById(R.id.item_name);
number=view.findViewById(R.id.item_weight);

@ -0,0 +1,64 @@
package com.example.pulit.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.example.pulit.R;
import com.example.pulit.entity.AxPlan;
import java.util.List;
import java.util.Optional;
/**
* @author wanghao
* @date 2023/11/3 10:59
*/
public class PlanAdapter extends RecyclerView.Adapter<PlanAdapter.vm> {
private Context context;
private List<AxPlan> list;
public PlanAdapter(Context context) {
this.context = context;
}
public void setList(List<AxPlan> list) {
this.list = list;
}
@Override
public vm onCreateViewHolder(ViewGroup parent, int viewType) {
View inflate = LayoutInflater.from(context).inflate(R.layout.item_plan, parent, false);
return new vm(inflate);
}
@Override
public void onBindViewHolder(PlanAdapter.vm holder, int position) {
AxPlan axPlan = list.get(position);
holder.index.setText(String.valueOf(position + 1));
holder.planID.setText(axPlan.getPlan_Id());
holder.planState.setText(axPlan.getPlan_StateText());
}
@Override
@NonNull
public int getItemCount() {
return Optional.ofNullable(list).map(List::size).orElse(0);
}
public class vm extends RecyclerView.ViewHolder {
private TextView index, planID, planState;
public vm(View view) {
super(view);
index = view.findViewById(R.id.item_plan_index);
planID = view.findViewById(R.id.item_plan_id);
planState = view.findViewById(R.id.item_plan_state);
}
}
}

@ -0,0 +1,116 @@
package com.example.pulit.entity;
/**
* @author wanghao
* @date 2023/11/3 11:14
*/
public class AxPlan {
private String Plan_Id; //计划ID
private int Plan_Num;//计划执行数量
private int Real_Num;//实际执行数量
private int Plan_Serial;//划序号我拿来传给PLC作为了唯一值
private String Plan_Date;//计划执行时间
private int Plan_State;//计划执行状态
private String Plan_StateText;//中文状态标识
private double Plan_TotalError;//合计误差
private int Plan_TotalWeight;//合计重量
private String RecipeID;// 配方ID
private String Recipe_Code;// 配方条码
private String Recipe_Name;//配方名称
public String getPlan_Id() {
return Plan_Id;
}
public void setPlan_Id(String plan_Id) {
Plan_Id = plan_Id;
}
public int getPlan_Num() {
return Plan_Num;
}
public void setPlan_Num(int plan_Num) {
Plan_Num = plan_Num;
}
public int getReal_Num() {
return Real_Num;
}
public void setReal_Num(int real_Num) {
Real_Num = real_Num;
}
public int getPlan_Serial() {
return Plan_Serial;
}
public void setPlan_Serial(int plan_Serial) {
Plan_Serial = plan_Serial;
}
public String getPlan_Date() {
return Plan_Date;
}
public void setPlan_Date(String plan_Date) {
Plan_Date = plan_Date;
}
public int getPlan_State() {
return Plan_State;
}
public void setPlan_State(int plan_State) {
Plan_State = plan_State;
}
public String getPlan_StateText() {
return Plan_StateText;
}
public void setPlan_StateText(String plan_StateText) {
Plan_StateText = plan_StateText;
}
public double getPlan_TotalError() {
return Plan_TotalError;
}
public void setPlan_TotalError(double plan_TotalError) {
Plan_TotalError = plan_TotalError;
}
public int getPlan_TotalWeight() {
return Plan_TotalWeight;
}
public void setPlan_TotalWeight(int plan_TotalWeight) {
Plan_TotalWeight = plan_TotalWeight;
}
public String getRecipeID() {
return RecipeID;
}
public void setRecipeID(String recipeID) {
RecipeID = recipeID;
}
public String getRecipe_Code() {
return Recipe_Code;
}
public void setRecipe_Code(String recipe_Code) {
Recipe_Code = recipe_Code;
}
public String getRecipe_Name() {
return Recipe_Name;
}
public void setRecipe_Name(String recipe_Name) {
Recipe_Name = recipe_Name;
}
}

@ -12,6 +12,7 @@ public class Item {
private String Material_Code;
private double SetWeight;
private double SetError;
private boolean state=false;
public double getSetError() {
return SetError;
@ -69,6 +70,14 @@ public class Item {
SetWeight = setWeight;
}
public boolean isState() {
return state;
}
public void setState(boolean state) {
this.state = state;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;

@ -40,6 +40,9 @@ public class PlanView {
private String Weighbridge;//9.25新增 地磅
private String CylinderBarCode;//9.25新增 地磅
private boolean Exist;
private String Rate;
public String getCylinderBarCode() {
return CylinderBarCode;
}
@ -280,6 +283,22 @@ public class PlanView {
State = state;
}
public boolean isExist() {
return Exist;
}
public void setExist(boolean exist) {
Exist = exist;
}
public String getRate() {
return Rate;
}
public void setRate(String rate) {
Rate = rate;
}
@Override
public String toString() {
return "PlanView{" +
@ -304,12 +323,17 @@ public class PlanView {
", Material_name='" + Material_name + '\'' +
", Set_Weight=" + Set_Weight +
", Set_Error=" + Set_Error +
", Material_code='" + Material_code + '\'' +
", RMatCode=" + RMatCode +
", Code='" + Code + '\'' +
", MaterialName='" + MaterialName + '\'' +
", MaterialWeight=" + MaterialWeight +
", WholeMaterial='" + WholeMaterial + '\'' +
", State=" + State +
", Weighbridge='" + Weighbridge + '\'' +
", CylinderBarCode='" + CylinderBarCode + '\'' +
", IsRate=" + isExist() +
", Rate='" + Rate + '\'' +
'}';
}
}

@ -13,7 +13,7 @@ public class X1Submit {
private int state;//状态 0:未扫描 1:匹配 2:报警
private String wholePackage;
private String PlanId; //计划ID
private int State;
public String getPlanId() {
return PlanId;
@ -71,13 +71,7 @@ public class X1Submit {
this.state = state;
}
public int getStateS() {
return State;
}
public void setStates(int state) {
this.State = state;
}

@ -72,7 +72,12 @@
style="@style/TabRadioButton"
android:drawableTop="@mipmap/home_rj"
android:text="液体核对" />
<RadioButton
android:id="@+id/home_plan"
style="@style/TabRadioButton"
/>
<!--android:drawableTop="@mipmap/home_plan"
android:text="计划工单"-->
</RadioGroup>
<LinearLayout

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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=".PlanActivity">
<FrameLayout
android:id="@+id/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:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="68dp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="16dp">
<TextView
style="@style/text_view"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="选择查询:" />
<Spinner
android:id="@+id/plan_type"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:entries="@array/plan"
android:textAlignment="center" />
<Button
android:id="@+id/plan_select"
style="@style/button_style1"
android:layout_width="100dp"
android:layout_height="match_parent"
android:text="搜索" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/plan_recycler"
android:layout_width="0dp"
android:layout_height="0dp"
android:padding="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout"
app:layout_constraintVertical_bias="0.0" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -26,7 +26,27 @@
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="地磅编号" />
<Spinner
android:id="@+id/solvent_db"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:entries="@array/power"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
@ -100,26 +120,29 @@
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">
android:orientation="horizontal"
android:visibility="gone"
android:id="@+id/solvent_goodslv_state">
<TextView
style="@style/text_view"
android:layout_width="100dp"
android:layout_height="46dp"
android:text="地磅编号" />
android:text="扫描固含率" />
<Spinner
android:id="@+id/solvent_db"
<TextView
android:id="@+id/solvent_goodslv"
style="@style/text_view2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:entries="@array/power"/>
android:layout_marginLeft="10dp" />
</LinearLayout>

@ -6,17 +6,6 @@
android:background="#DEE3E6"
android:orientation="horizontal">
<TextView
android:id="@+id/item_index"
style="@style/item_text_style"
android:layout_width="50dp"
android:layout_height="match_parent"
android:text="01" />
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:background="@color/white" />
<TextView
@ -52,6 +41,17 @@
android:layout_width="80dp"
android:layout_height="match_parent"
android:text="55.001" />
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:background="@color/white" />
<TextView
android:id="@+id/item_state"
style="@style/item_text_style"
android:layout_width="80dp"
android:layout_height="match_parent"
android:text="未验证" />
</LinearLayout>

@ -0,0 +1,46 @@
<?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="44dp"
android:layout_marginTop="2dp"
android:background="#DEE3E6"
android:orientation="horizontal">
<TextView
android:id="@+id/item_plan_index"
style="@style/item_text_style"
android:layout_width="50dp"
android:layout_height="match_parent"
android:text="01" />
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:background="@color/white" />
<TextView
android:id="@+id/item_plan_id"
style="@style/item_text_style"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="面涂稀释剂S823A" />
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:background="@color/white" />
<TextView
android:id="@+id/item_plan_state"
style="@style/item_text_style"
android:layout_width="80dp"
android:layout_height="match_parent"
android:text="已完成" />
</LinearLayout>

@ -4,4 +4,9 @@
<item>1号地磅</item>
<item>2号地磅</item>
</string-array>
<string-array name="plan" >
<item>小料</item>
<item>溶剂</item>
</string-array>
</resources>

@ -9,4 +9,5 @@
<color name="white">#FFFFFFFF</color>
<color name="blue">#3C77E5</color>
<color name="bg1">#F2F3F5</color>
<color name="red">#F44336</color>
</resources>

@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.PuLiT" parent="Theme.AppCompat.Light.NoActionBar">
<style name="Theme.PuLiT" parent="Theme.Design.Light.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
@ -11,6 +11,7 @@
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
Loading…
Cancel
Save