Kaynağa Gözat

配料吧台新后台更新

调味吧台
pry 6 ay önce
ebeveyn
işleme
dc0c12a114
9 değiştirilmiş dosya ile 1502 ekleme ve 59 silme
  1. +95
    -0
      app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java
  2. +3
    -0
      app/src/main/java/com/bonait/bnframework/common/db/file/DBHelper.java
  3. +41
    -0
      app/src/main/java/com/bonait/bnframework/common/db/mode/BPA_SILOS_CALIBRATE.java
  4. +445
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_silos_ck_edit.java
  5. +59
    -57
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/silos_jiaoyan.java
  6. +13
    -0
      app/src/main/res/drawable/edit_bord.xml
  7. +844
    -0
      app/src/main/res/layout/item/layout/silos_jiaoyan_item_edit.xml
  8. +1
    -1
      app/src/main/res/values/strings.xml
  9. +1
    -1
      build.gradle

+ 95
- 0
app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java Dosyayı Görüntüle

@@ -30,6 +30,7 @@ import com.bonait.bnframework.common.db.mode.BPA_PROCESS;
import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel;
import com.bonait.bnframework.common.db.mode.BPA_SILOS;
import com.bonait.bnframework.common.db.mode.BPA_SILOSANDMATERIAL;
import com.bonait.bnframework.common.db.mode.BPA_SILOS_CALIBRATE;
import com.bonait.bnframework.common.db.mode.BPA_SUBORDER;
import com.bonait.bnframework.common.db.mode.BPA_SUGAR;
import com.bonait.bnframework.common.db.mode.BPA_SYSTEMSET;
@@ -3070,6 +3071,100 @@ public class QueryDB {
}
//endregion

//region 料仓校准表
/**
* 新增料仓校准
* add liup 20240418
*
* @param data
* @return 是否成功
*/
public static boolean AddSilosCalibrate(BPA_SILOS_CALIBRATE data) {
return Add(BPA_SILOS_CALIBRATE.class, data);
}

/**
* 查询所有料仓校准
* add liup 20240418
* @return
*/
public static ArrayList<BPA_SILOS_CALIBRATE> GetSilosCalibrateAll() {
String orderby = "num";//先按排序 创建时间倒序
String where = "isDelete=?";
String[] args = new String[]{"0"};
ArrayList<BPA_SILOS_CALIBRATE> data = new ArrayList<>();
ArrayList<Object> obj = Get(BPA_SILOS_CALIBRATE.class, where, args, orderby);
for (Object k : obj) {
data.add((BPA_SILOS_CALIBRATE) k);
}
// LogUtils.d(" GetSilosCalibrateLIst 查询所有料仓校准 data="+data.toString());
return data;
}

/**
* 根据ID查询料仓校准
*
* @return
*/
public static BPA_SILOS_CALIBRATE GetSilosCalibrate(String id) {
BPA_SILOS_CALIBRATE data = null;
String orderby = "null";//先按排序 创建时间倒序
String where = "isDelete=? and id=?";
String[] args = new String[]{"0", id};
ArrayList<Object> obj = Get(BPA_SILOS_CALIBRATE.class, where, args, orderby);
for (Object k : obj) {
data = (BPA_SILOS_CALIBRATE) k;
}
return data;
}

/**
* 根据名称序号料仓校准
*
* @return
*/
public static BPA_SILOS_CALIBRATE GetSilosCalibrateByNum(int num) {
BPA_SILOS_CALIBRATE data = null;
String orderby = "num";//先按排序 创建时间倒序
String where = "isDelete=? and num=?";
String[] args = new String[]{"0", num+""};
ArrayList<Object> obj = Get(BPA_SILOS_CALIBRATE.class, where, args, orderby);
for (Object k : obj) {
data = (BPA_SILOS_CALIBRATE) k;
}
return data;
}

/**
* 修改料仓校准
*
* @param id
* @param outputMax
* @param outputMin
* @param inputMax
* @param inputMin
*/
public static void UpdateSilosCalibrate(String id, int outputMax,int outputMin,int inputMax,int inputMin) {
BPA_SILOS_CALIBRATE silos = GetSilosCalibrate(id);
if (silos != null) {
if(outputMax>=0){
silos.outputTimeMax = outputMax;
}
if(outputMin>=0){
silos.outputTimeMin = outputMin;
}
if(inputMax>=0){
silos.inputWightMax = inputMax;
}
if(inputMin>=0){
silos.inputWightMin = inputMin;
}
Update(BPA_SILOS_CALIBRATE.class, silos);
// ModbusHelper.get().Add(QueryDB.GetSilosCalibrateAll());
}
}
//endregion

//region 私有

/**


+ 3
- 0
app/src/main/java/com/bonait/bnframework/common/db/file/DBHelper.java Dosyayı Görüntüle

@@ -27,6 +27,7 @@ import com.bonait.bnframework.common.db.mode.BPA_PROCESS;
import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel;
import com.bonait.bnframework.common.db.mode.BPA_SILOS;
import com.bonait.bnframework.common.db.mode.BPA_SILOSANDMATERIAL;
import com.bonait.bnframework.common.db.mode.BPA_SILOS_CALIBRATE;
import com.bonait.bnframework.common.db.mode.BPA_SUBORDER;
import com.bonait.bnframework.common.db.mode.BPA_SUGAR;
import com.bonait.bnframework.common.db.mode.BPA_SYSTEMSET;
@@ -131,6 +132,8 @@ public class DBHelper extends SQLiteOpenHelper {
CreateTablesAll(BPA_CLOUDDATA.class,null);//云端表
CreateTablesAll(BPA_PLCADDRESS.class,null);//PLC地址模型表

CreateTablesAll(BPA_SILOS_CALIBRATE.class,null);//料仓校准表

ForeignKeys();
}
/**


+ 41
- 0
app/src/main/java/com/bonait/bnframework/common/db/mode/BPA_SILOS_CALIBRATE.java Dosyayı Görüntüle

@@ -0,0 +1,41 @@
package com.bonait.bnframework.common.db.mode;

/**
* BPA_SILOS[料仓管理表]
* 创建人:fengyoufu add 20230412
*/
public class BPA_SILOS_CALIBRATE extends ModeBase {
//料仓名称
public String name;
//料仓编号
public int num;
//输出时间最大值:s
public int outputTimeMax;
//输出时间最小值:s
public int outputTimeMin;
//输入重量最大值: g
public int inputWightMax;
//输入重量最小值: g
public int inputWightMin;


@Override
public String toString() {
return "BPA_SILOS_CALIBRATE{" +
"name='" + name + '\'' +
"num='" + num + '\'' +
", outputTimeMax=" + outputTimeMax +
", outputTimeMin=" + outputTimeMin +
", inputWightMax=" + inputWightMax +
", inputWightMin=" + inputWightMin +
", id='" + id + '\'' +
", createTime='" + createTime + '\'' +
", updateTime='" + updateTime + '\'' +
", deleteTime='" + deleteTime + '\'' +
", deviceID='" + deviceID + '\'' +
", userID='" + userID + '\'' +
", isDelete=" + isDelete +
", exp='" + exp + '\'' +
'}';
}
}

+ 445
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_silos_ck_edit.java Dosyayı Görüntüle

@@ -0,0 +1,445 @@
package com.bonait.bnframework.modules.home.fragment.mode;

import android.content.Context;
import android.content.DialogInterface;
import android.os.Handler;
import android.os.SystemClock;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Chronometer;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ExecuteTheRecipe;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;
import com.bonait.bnframework.common.db.mode.BPA_SILOSANDMATERIAL;
import com.bonait.bnframework.common.db.res.lcMode;
import com.bonait.bnframework.common.helper.I.IWriteCallBack;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.suke.widget.SwitchButton;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class add_silos_ck_edit extends LinearLayout {

@BindView(R.id.title)
TextView title;

@BindView(R.id.close_from)
Button close_from;

@BindView(R.id.buchongyuanliao)
Button buchongyuanliao;

@BindView(R.id.manguan)
Button manguan;

@BindView(R.id.shezhi)
Button shezhi;

@BindView(R.id.jiaozhun)
Button jiaozhun;//校准

@BindView(R.id.queren)
Button queren;//校准


@BindView(R.id.xuhao)
TextView xuhao;
@BindView(R.id.wuliaoname)
TextView name;
@BindView(R.id.wuliaoimage)
ImageView wuliaoimage;
@BindView(R.id.baifenbi)
TextView baifenbi;

@BindView(R.id.control_switch_shoudong)
Button control_switch_shoudong;

@BindView(R.id.control_huishou)
Button control_huishou;

@BindView(R.id.liaochang_sz)
RelativeLayout liaochang_sz;

@BindView(R.id.editsp_wl)
Spinner editsp_wl;

@BindView(R.id.edittext1)
EditText edittext1;

@BindView(R.id.edittext2)
EditText edittext2;

@BindView(R.id.control_switch)
SwitchButton control_switch;//料仓开关

@BindView(R.id.runtime)
Chronometer runtime;//

@BindView(R.id.jishiqi)
RelativeLayout jishiqi;//

ArrayList<BPA_MATERIAL> materials = new ArrayList<>();

List<String> names = new ArrayList<>();


/**
* 点击事件
*/
public MyClickListener mListener = null;
private View root;

public add_silos_ck_edit(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
root = LayoutInflater.from(context).inflate(R.layout.dialog_add_silos_ck, this);
ButterKnife.bind(this, root);
Init();
}


public void Init() {
//初始化界面数据
initData();
//初始化界面控件的事件
initEvent();
}


private void initData() {
materials.clear();
List<BPA_MATERIAL> bpa_materials = QueryDB.GetMaterialALL();
for (BPA_MATERIAL item : bpa_materials) {
materials.add(item);
}
BPA_MATERIAL wsz = new BPA_MATERIAL();
wsz.name = "未设置";
wsz.id = "";
materials.add(wsz);

names.clear();
for (BPA_MATERIAL item : materials) {
names.add(item.name);
}
SetAdapter(editsp_wl, names);
}

public void SetAdapter(Spinner spinner, List<String> map) {
ArrayAdapter<String> adapter = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item, map);
adapter.setDropDownViewResource(R.layout.spinner_dropdown_item);
spinner.setAdapter(adapter);
}

boolean ismanguan = false;

private void initEvent() {
buchongyuanliao.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
QueryDB.UpdateYL(lcMode.id, lcMode.siloszl);
lcMode.silosmargin = lcMode.siloszl;
SetData(lcMode);
//补充原料
if (mListener != null) {
mListener.clickListenerNew(view, 1, lcMode);
}
}
});
name.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
int index = 0;
int count = 0;
for (BPA_MATERIAL item : materials) {
if (item.name.equals(lcMode.materialName)) {
index = count;
}
count++;
}
String[] items = names.toArray(new String[names.size()]);
final int checkIndex = index;
new QMUIDialog.CheckableDialogBuilder(root.getContext())
.addItems(items, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {

BPA_SILOSANDMATERIAL item = new BPA_SILOSANDMATERIAL();
BPA_MATERIAL material = materials.get(which);
item.silosID = lcMode.id;
item.materialID = material.id;
//更新
if (QueryDB.UpdateSilosAndMaterial(item)) {
lcMode.materialId = material.id;
lcMode.materialName = material.name;
if (mListener != null) {
mListener.clickListenerNew(view, 5, lcMode);
name.setText(material.name);
}
SetData(lcMode);
dialog.dismiss();
}
}
})
.setCheckedIndex(checkIndex)
.show();
}
});
manguan.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
if (ismanguan == false) {
ismanguan = true;
StartTime();
ExecuteTheRecipe.WritePLC("手自切换", false, null);
int time = lcMode.bValue <= 0 ? 10 : lcMode.bValue;//默认10秒
ExecuteTheRecipe.WritePLC("手动控制" + lcMode.num, true, null);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
ExecuteTheRecipe.WritePLC("手动控制" + lcMode.num, false, null);
ToastUtils.info("满管成功!!!");
ismanguan = false;
StopTime();
}
}, time * 1000);
//满管
if (mListener != null) {
mListener.clickListenerNew(view, 2, lcMode);
}
} else {
ToastUtils.warning("满管中,请稍后!!!");
}
}
});
shezhi.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
liaochang_sz.setVisibility(View.VISIBLE);
int index = 0;
int count = 0;
for (BPA_MATERIAL item : materials) {
if (item.name.equals(lcMode.materialName)) {
index = count;
}
count++;
}
final int checkIndex = index;
editsp_wl.setSelection(checkIndex);

edittext1.setText(lcMode.siloszl + "");
edittext2.setText(lcMode.warningValue + "");
//设置
if (mListener != null) {
mListener.clickListenerNew(view, 3, lcMode);
}

}
});

queren.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {

String type = editsp_wl.getSelectedItem().toString();
String zl = edittext1.getText().toString();
if (zl == null || zl.isEmpty()) {
ToastUtils.warning("料仓容量不能为空!");
return;
}
String bjz = edittext2.getText().toString();
if (bjz == null || bjz.isEmpty()) {
ToastUtils.warning("报警值不能为空!");
return;
}

int zl_int = 0;
int bj_int = 0;

try {
zl_int = Integer.parseInt(zl);
bj_int = Integer.parseInt(bjz);
} catch (Exception ex) {

}

if (bj_int > zl_int) {
ToastUtils.warning("报警值不能大于料仓容量!");
return;
}

QueryDB.UpdateSilosZL(lcMode.id, zl_int);
QueryDB.UpdateSilosBJZ(lcMode.id, bj_int);
lcMode.siloszl = zl_int;
lcMode.warningValue = bj_int;

BPA_SILOSANDMATERIAL item = new BPA_SILOSANDMATERIAL();
BPA_MATERIAL material = materials.get(editsp_wl.getSelectedItemPosition());
item.silosID = lcMode.id;
item.materialID = material.id;
//更新
if (QueryDB.UpdateSilosAndMaterial(item)) {
lcMode.materialId = material.id;
lcMode.materialName = material.name;
}
SetData(lcMode);
liaochang_sz.setVisibility(View.GONE);

if (mListener != null) {
mListener.clickListenerNew(view, 6, lcMode);
}
}
});
jiaozhun.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
//校准
if (mListener != null) {
mListener.clickListenerNew(view, 4, lcMode);
}
}
});
close_from.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
liaochang_sz.setVisibility(View.GONE);
if (mListener != null) {
mListener.clickListenerNew(v, 0, null);
}
}
});
control_switch_shoudong.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
Log.e("鼠标", "按下: ");
ExecuteTheRecipe.WritePLC("手自切换", false, new IWriteCallBack() {
@Override
public void onSuccess() {
ExecuteTheRecipe.WritePLC("手动控制" + lcMode.num, true, null);
}

@Override
public void onFailure(String ErrorMsg) {
}
});
} else if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
Log.e("鼠标", "松开: ");
ExecuteTheRecipe.WritePLC("手动控制" + lcMode.num, false, null);
}
return false;
}
});

control_huishou.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
Log.e("鼠标", "按下: ");
ExecuteTheRecipe.WritePLC("手自切换", false, new IWriteCallBack() {
@Override
public void onSuccess() {
ExecuteTheRecipe.WritePLC("M_外置仓" + lcMode.num + "反转", true, null);
}
@Override
public void onFailure(String ErrorMsg) {
}
});
} else if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
Log.e("鼠标", "松开: ");
ExecuteTheRecipe.WritePLC("M_外置仓" + lcMode.num + "反转", false, null);
}
return false;
}
});

control_switch.setOnCheckedChangeListener(new SwitchButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(SwitchButton view, boolean isChecked) {
//设置
lcMode.status = isChecked ? 0 : 1;
QueryDB.UpdateSilosStatus(lcMode.id, isChecked);
}
});
}

lcMode lcMode = null;

public void SetData(lcMode _good) {
lcMode = _good;
control_switch.setChecked(_good.status == 0 ? true : false);
title.setText("查看料仓-(" + lcMode.name + ")");
xuhao.setText(lcMode.exp + "");

if (lcMode.name.equals("外置仓")) {
control_huishou.setVisibility(View.VISIBLE);
} else {
control_huishou.setVisibility(View.GONE);
}

name.setText(lcMode.materialName.isEmpty() ? "未设置" : (lcMode.materialName + ""));
if (lcMode.materialName.isEmpty() || lcMode.materialName.equals("未设置")) {
wuliaoimage.setImageResource(R.mipmap.newsilos);
baifenbi.setText("");
} else {
if (lcMode.warningValue >= lcMode.silosmargin || lcMode.siloszl == 0) {
wuliaoimage.setImageResource(R.mipmap.newsilos_yc);
} else {
wuliaoimage.setImageResource(R.mipmap.newsilos);
}
baifenbi.setText(get(lcMode.silosmargin, lcMode.siloszl));
}
}

public static String get(int up, int down) {
if (down == 0) {
return "0%";
}
double value = new BigDecimal((float) up / down).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
return new DecimalFormat("#%").format(value);
}


/**
* 启动定时器
*/
public void StartTime() {
jishiqi.setVisibility(View.VISIBLE);

runtime.setBase(SystemClock.elapsedRealtime());
runtime.start();
}

/**
* 停止定时器
*/
public int StopTime() {
jishiqi.setVisibility(View.GONE);
long elapsedMillis = SystemClock.elapsedRealtime() - runtime.getBase();
runtime.stop();

int time = (int) (elapsedMillis / 1000);
return time;//当前点击多少秒
}
}

+ 59
- 57
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/silos_jiaoyan.java Dosyayı Görüntüle

@@ -89,15 +89,15 @@ public class silos_jiaoyan extends LinearLayout {
//endregion

//region 称相关
@BindView(R.id.dianzicheng1)
TextView dianzicheng1;
// @BindView(R.id.dianzicheng1)
// TextView dianzicheng1;
@BindView(R.id.dianzicheng2)
TextView dianzicheng2;
@BindView(R.id.dianzicheng3)
TextView dianzicheng3;

@BindView(R.id.chuliaokeshu1)
EditText chuliaokeshu1;
// @BindView(R.id.chuliaokeshu1)
// EditText chuliaokeshu1;
@BindView(R.id.chuliaokeshu2)
EditText chuliaokeshu2;
@BindView(R.id.chuliaokeshu3)
@@ -119,17 +119,17 @@ public class silos_jiaoyan extends LinearLayout {
//endregion

//region 物料校准变量
@BindView(R.id.wljz1)
EditText wljz1;
// @BindView(R.id.wljz1)
// EditText wljz1;

@BindView(R.id.wljz2)
EditText wljz2;
// @BindView(R.id.wljz2)
// EditText wljz2;

@BindView(R.id.wljz3)
EditText wljz3;
// @BindView(R.id.wljz3)
// EditText wljz3;

@BindView(R.id.text_wljz)
TextView text_wljz2;
// @BindView(R.id.text_wljz)
// TextView text_wljz2;
//endregion

//region 通道补偿
@@ -148,7 +148,8 @@ public class silos_jiaoyan extends LinearLayout {

public silos_jiaoyan(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
root= LayoutInflater.from(context).inflate(R.layout.silos_jiaoyan_item, this);
// root= LayoutInflater.from(context).inflate(R.layout.silos_jiaoyan_item, this);
root= LayoutInflater.from(context).inflate(R.layout.silos_jiaoyan_item_edit, this);
ButterKnife.bind(this, root);
//初始化界面控件的事件
initEvent();
@@ -184,8 +185,8 @@ public class silos_jiaoyan extends LinearLayout {
text_bckz1.setVisibility(View.VISIBLE);


text_wljz2.setVisibility(View.GONE);
wljz2.setVisibility(View.GONE);
// text_wljz2.setVisibility(View.GONE);
// wljz2.setVisibility(View.GONE);
}else
{
text_jlkz.setVisibility(View.GONE);
@@ -194,8 +195,8 @@ public class silos_jiaoyan extends LinearLayout {
text_bckz1.setVisibility(View.GONE);


text_wljz2.setVisibility(View.GONE);
wljz2.setVisibility(View.GONE);
// text_wljz2.setVisibility(View.GONE);
// wljz2.setVisibility(View.GONE);
}
}

@@ -386,7 +387,7 @@ public class silos_jiaoyan extends LinearLayout {
ExecuteTheRecipe.WritePLC("校准值" + kkk, (short) zhongliangxianshi, null);
String s = String.valueOf(zhongliangxianshi);
String zll = String.format("%.1f", (Double.parseDouble(s) / 10));
wljz3.setText(zll + "");
// wljz3.setText(zll + "");
lcMode.jValue = zll;
QueryDB.UpdateJYZ(lcMode.id, zll);
ToastUtils.warning("通道校准完成!");
@@ -422,9 +423,9 @@ public class silos_jiaoyan extends LinearLayout {
String time = lcMode.jTime == null ? "0.0" : lcMode.jTime;
String ftime = lcMode.fTime == null ? "0.0" : lcMode.fTime;
String jvalue = lcMode.jValue == null ? "0.0" : lcMode.jValue;
wljz1.setText(time);
wljz2.setText(ftime);
wljz3.setText(jvalue);
// wljz1.setText(time);
// wljz2.setText(ftime);
// wljz3.setText(jvalue);

String Gxs = lcMode.Gxs == null ? "0.0" : lcMode.Gxs;
String Lxs = lcMode.Lxs == null ? "0.0" : lcMode.Lxs;
@@ -450,7 +451,7 @@ public class silos_jiaoyan extends LinearLayout {
public void handleMessage(Message msg) {
switch (msg.what) {
case 0:
dianzicheng1.setText(String.valueOf((int) ExecuteTheRecipe.OutletWeigh / 10.0) + " g");
// dianzicheng1.setText(String.valueOf((int) ExecuteTheRecipe.OutletWeigh / 10.0) + " g");
dianzicheng2.setText(String.valueOf((int) ExecuteTheRecipe.OutletWeigh / 10.0) + " g");
dianzicheng3.setText(String.valueOf((int) ExecuteTheRecipe.OutletWeigh / 10.0) + " g");
break;
@@ -470,8 +471,9 @@ public class silos_jiaoyan extends LinearLayout {

//region 点击事件
@OnClick({
R.id.qingling1, R.id.qingling2, R.id.qingling3,
R.id.chuliao1, R.id.chuliao2, R.id.chuliao3,
// R.id.qingling1,R.id.chuliao1,
R.id.qingling2, R.id.qingling3,
R.id.chuliao2, R.id.chuliao3,
R.id.click_mgjz, R.id.click_mgjz_save,
R.id.click_wljz, R.id.click_wljz_save,
R.id.click_bcjz_save,
@@ -543,22 +545,22 @@ public class silos_jiaoyan extends LinearLayout {
* 模拟出料
*/
public void mncl() {
String zltext = chuliaokeshu1.getText().toString();
if (TypeName.equals("物料校准")) {
zltext = chuliaokeshu1.getText().toString();
} else if (TypeName.equals("酱料校准")) {
zltext = chuliaokeshu2.getText().toString();
} else if (TypeName.equals("补偿校准")) {
zltext = chuliaokeshu3.getText().toString();
}
if (zltext.equals("")) {
ToastUtils.warning("出料重量不能为空!");
return;
}
// String zltext = chuliaokeshu1.getText().toString();
// if (TypeName.equals("物料校准")) {
// zltext = chuliaokeshu1.getText().toString();
// } else if (TypeName.equals("酱料校准")) {
// zltext = chuliaokeshu2.getText().toString();
// } else if (TypeName.equals("补偿校准")) {
// zltext = chuliaokeshu3.getText().toString();
// }
// if (zltext.equals("")) {
// ToastUtils.warning("出料重量不能为空!");
// return;
// }
double zl = 0;
try {
zl = Double.parseDouble(zltext);
// zl = Double.parseDouble(zltext);
} catch (Exception e) {
ToastUtils.warning("出料重量获取异常!" + e.getMessage());
return;
@@ -608,14 +610,14 @@ public class silos_jiaoyan extends LinearLayout {

//region 保存物料校准参数
public void SaveWLJZ() {
String stime = wljz1.getText().toString();
String ftime = wljz2.getText().toString();
String zl = wljz3.getText().toString();
// String stime = wljz1.getText().toString();
// String ftime = wljz2.getText().toString();
// String zl = wljz3.getText().toString();

if (stime.equals("")) {
ToastUtils.warning("校准基准时间不能为空!");
return;
}
// if (stime.equals("")) {
// ToastUtils.warning("校准基准时间不能为空!");
// return;
// }

if (zl.equals("")) {
ToastUtils.warning("校准重量不能为空!");
@@ -626,7 +628,7 @@ public class silos_jiaoyan extends LinearLayout {
int ftime_1 = 0;

try {
stime_1 = (int) Math.round((Double.parseDouble(stime) * 10));
// stime_1 = (int) Math.round((Double.parseDouble(stime) * 10));
} catch (Exception e) {
ToastUtils.error("时间异常!" + e.getMessage());
return;
@@ -634,7 +636,7 @@ public class silos_jiaoyan extends LinearLayout {
double zhongl= 0;

try {
zhongl=Double.parseDouble(zl);
// zhongl=Double.parseDouble(zl);
} catch (Exception e) {
ToastUtils.error("校准重量获取异常!" + e.getMessage());
return;
@@ -646,12 +648,12 @@ public class silos_jiaoyan extends LinearLayout {


if (!ConfigName.getInstance().versionSelectionEnum.equals("奶茶机")) {
if (ftime.equals("")) {
ToastUtils.warning("反转基准时间不能为空!");
return;
}
// if (ftime.equals("")) {
// ToastUtils.warning("反转基准时间不能为空!");
// return;
// }
try {
ftime_1 = (int) Math.round((Double.parseDouble(ftime) * 10));
// ftime_1 = (int) Math.round((Double.parseDouble(ftime) * 10));
} catch (Exception e) {
ToastUtils.error("时间异常!" + e.getMessage());
return;
@@ -668,16 +670,16 @@ public class silos_jiaoyan extends LinearLayout {
}
});
}
lcMode.fTime=ftime;
lcMode.jTime=stime;
lcMode.jValue=zl;
// lcMode.fTime=ftime;
// lcMode.jTime=stime;
// lcMode.jValue=zl;

ArrayList<BPA_SILOS> Ss=QueryDB.GetSilosALL();
for (BPA_SILOS item:Ss)
{
QueryDB.UpdateSilosJZTime(item.id, stime, ftime);
// QueryDB.UpdateSilosJZTime(item.id, stime, ftime);
}
QueryDB.UpdateJYZ(lcMode.id, zl);
// QueryDB.UpdateJYZ(lcMode.id, zl);
ExecuteTheRecipe.WritePLC("基准时间", (short) stime_1, new IWriteCallBack() {
@Override
public void onSuccess() {


+ 13
- 0
app/src/main/res/drawable/edit_bord.xml Dosyayı Görüntüle

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:topLeftRadius="5dp"
android:topRightRadius="5dp"
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"/>

<solid android:color="@color/qmui_s_transparent"/>

<stroke android:color="@color/gray" android:width="1dp"/>

</shape>

+ 844
- 0
app/src/main/res/layout/item/layout/silos_jiaoyan_item_edit.xml Dosyayı Görüntüle

@@ -0,0 +1,844 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:focusable="true"
android:background="@color/black">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_margin="10dp"
android:background="@drawable/common_bg_with_radius_and_border">

<LinearLayout
android:layout_marginLeft="10dp"
android:layout_marginTop="15dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<TextView
android:id="@+id/text_wlkz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="物料校准"
android:textSize="20dp"
android:textStyle="bold" />

<TextView
android:id="@+id/text_mgkz1"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/"
android:textSize="20dp"
android:textStyle="bold" />
<TextView
android:id="@+id/text_mgkz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="满管校准"
android:textSize="20dp"
android:textStyle="bold" />
<TextView
android:id="@+id/text_jlkz1"

android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/"
android:textSize="20dp"
android:textStyle="bold" />

<TextView
android:id="@+id/text_jlkz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="酱料校准"
android:textSize="20dp"
android:textStyle="bold" />

<TextView
android:id="@+id/text_bckz1"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/"
android:textSize="20dp"
android:textStyle="bold" />

<TextView
android:id="@+id/text_bckz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="补偿校准"
android:textSize="20dp"
android:textStyle="bold" />


</LinearLayout>

<Button
android:id="@+id/close_from"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@mipmap/newdelete"
android:textColor="@color/white"
android:textSize="14dp" />
<TextView
android:layout_marginRight="80dp"
android:layout_alignParentRight="true"
android:id="@+id/title_bc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:text="11 豆瓣酱"
android:textAlignment="center"
android:textSize="20dp"
android:textColor="@color/app_color_blue"/>

<RelativeLayout
android:layout_marginTop="55dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- 物料校准 -->
<LinearLayout
android:id="@+id/wuliaojiaozhun"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/main_background">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="5dp"
android:text="校准后可模拟出料"
android:textAlignment="center"
android:textSize="19dp"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginBottom="5dp"
android:text="1.清零 2.写时间 3.开始校准 4.保存"
android:textAlignment="center"
android:textColor="@color/red_primary_dark"/>
</RelativeLayout>

<RelativeLayout
android:layout_margin="@dimen/dp_10"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:orientation="vertical">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="最小出料时间:"
android:textSize="25sp"/>

<EditText
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/edit_bord"
android:digits="0123456789"
android:hint="请输入"
android:inputType="number"
android:maxLines="1"
android:padding="3dp"
android:text="2"
android:textSize="25dp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text="最小出料重量:"
android:textSize="25sp"/>

<EditText
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/edit_bord"
android:digits="0123456789"
android:hint="请输入"
android:inputType="number"
android:maxLines="1"
android:padding="3dp"
android:text="0"
android:textSize="25dp"/>

<Button
android:id="@+id/click_wljz_save"
android:layout_marginLeft="20dp"
android:layout_width="130dp"
android:layout_height="wrap_content"
android:background="@drawable/bg_btn_login_selected"
android:text="最小校准"
android:textColor="@color/white"
android:textSize="25sp"
/>

</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="最大出料时间:"
android:textSize="25sp"/>

<EditText
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/edit_bord"
android:digits="0123456789"
android:hint="请输入"
android:inputType="number"
android:maxLines="1"
android:padding="3dp"
android:text="2"
android:textSize="25dp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text="最大出料重量:"
android:textSize="25sp"/>

<EditText
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/edit_bord"
android:digits="0123456789"
android:hint="请输入"
android:inputType="number"
android:maxLines="1"
android:padding="3dp"
android:text="0"
android:textSize="25dp"/>

<Button
android:id="@+id/click_wljz"
android:layout_marginLeft="20dp"
android:layout_width="130dp"
android:layout_height="wrap_content"
android:background="@drawable/bg_btn_login_selected"
android:text="最大校准"
android:textColor="@color/white"
android:textSize="25sp"
/>

</LinearLayout>

</LinearLayout>

</RelativeLayout>
</LinearLayout>

<!-- 满管校准 -->
<LinearLayout
android:visibility="gone"
android:id="@+id/manguanjiaozhun"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/main_background">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="5dp"
android:text="请将原料装满料桶后执行该操作"
android:textAlignment="center"
android:textSize="19dp"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginBottom="5dp"
android:text="1.点校准 2.查看校准时间 3.保存"
android:textAlignment="center"
android:textColor="@color/red_primary_dark"/>
</RelativeLayout>
<RelativeLayout
android:layout_margin="@dimen/dp_10"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:id="@+id/click_mgjz"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="@drawable/bg"
android:text="校准"
android:textColor="@color/white"
android:textSize="18sp"
/>
<RelativeLayout
android:layout_width="120dp"
android:layout_height="120dp">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/jishiqibj">
</ImageView>
<Chronometer
android:layout_centerInParent="true"
android:id="@+id/runtime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/purple_primary"
android:textSize="24dp"
android:textStyle="bold|italic" />
</RelativeLayout>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="校准时间"
android:textAlignment="center"
android:textSize="16dp"/>
<EditText
android:id="@+id/exit_mgjz"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/input_bj"
android:digits="0123456789"
android:hint="请输入"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:text="0"
android:textSize="16dp"
android:layout_marginBottom="10dp"
/>
<Button
android:id="@+id/click_mgjz_save"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="@drawable/bg"
android:text="保存"
android:textColor="@color/white"
android:textSize="18sp"
android:layout_marginBottom="10dp"
/>
</LinearLayout>

</RelativeLayout>
</LinearLayout>

<!-- 酱料校准 -->
<LinearLayout
android:visibility="gone"
android:id="@+id/jiaoliaojiaozhun"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/main_background">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="5dp"
android:text="校准后可模拟出料"
android:textAlignment="center"
android:textSize="19dp"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginBottom="5dp"
android:text="1.清零 2.填入校准重量范围(50g-100g) 3.填入校准频率 4.开始校准"
android:textAlignment="center"
android:textColor="@color/red_primary_dark"/>
</RelativeLayout>
<RelativeLayout
android:layout_margin="@dimen/dp_10"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="校准重量范围(g)"
android:textAlignment="center"
android:textSize="16dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/input_bj"
android:digits="0123456789"
android:hint="请输入"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:text="0"
android:textSize="12dp"
android:layout_marginBottom="10dp"
/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_centerInParent="true"
android:layout_width="2dp"
android:layout_height="30dp"
android:background="@color/color3"/>
</RelativeLayout>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/input_bj"
android:digits="0123456789"
android:hint="请输入"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:text="0"
android:textSize="12dp"
android:layout_marginBottom="10dp"
/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="校准频率(s)"
android:textAlignment="center"
android:textSize="16dp"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/input_bj"
android:digits="0123456789."
android:hint="请输入"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:text="0"
android:textSize="12dp"
android:layout_marginBottom="10dp"
/>
<Button
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="@drawable/bg"
android:text="开始校准"
android:textColor="@color/white"
android:textSize="18sp"
android:layout_marginBottom="10dp"
/>
</LinearLayout>

<LinearLayout
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:text="称"
android:textAlignment="center"
android:textSize="16dp"/>
<RelativeLayout
android:layout_width="120dp"
android:layout_height="120dp">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/jishiqibj">
</ImageView>

<TextView
android:id="@+id/dianzicheng2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:fontFamily="sans-serif-medium"
android:text="128.0g"
android:textSize="20dp"
android:textStyle="bold|italic"
android:textColor="@color/red_primary_dark"/>
</RelativeLayout>
<RelativeLayout
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/qingling2"
android:layout_width="60dp"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="@drawable/button1"
android:text="清零"
android:textColor="@color/white"
android:textSize="18sp"/>
</RelativeLayout>


</LinearLayout>

<LinearLayout
android:layout_alignParentRight="true"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="60dp"
android:text="模拟出料(g)"
android:textAlignment="center"
android:textSize="16dp"/>
<EditText
android:id="@+id/chuliaokeshu2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/input_bj"
android:digits="0123456789."
android:hint="请输入"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:text="0"
android:textSize="12dp"
android:layout_marginBottom="60dp"
/>
<Button
android:id="@+id/chuliao2"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="@drawable/bg"
android:text="出料"
android:textColor="@color/white"
android:textSize="18sp"
android:layout_marginBottom="10dp"
/>
</LinearLayout>

<RelativeLayout
android:focusable="true"
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#BE000000">
<TextView
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="研发中..."
android:textSize="40dp"
android:textColor="#DA1CD7"></TextView>
</RelativeLayout>

</RelativeLayout>
</LinearLayout>

<!-- 补偿校准 -->
<LinearLayout
android:visibility="gone"
android:id="@+id/buchangjiaozhun"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/main_background">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="5dp"
android:text="设置补偿校准参数后模拟出料"
android:textAlignment="center"
android:textSize="19dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginBottom="5dp"
android:text="1.清零 2.填入校准重量范围(50g-100g) 3.填入校准频率 4.开始校准"
android:textAlignment="center"
android:textColor="@color/red_primary_dark"/>
</RelativeLayout>
<RelativeLayout
android:layout_margin="@dimen/dp_10"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="通道补偿开关"
android:textAlignment="center"
android:textSize="16dp"/>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.suke.widget.SwitchButton
android:id="@+id/control_switch"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:focusable="true"
app:sb_button_color="@color/app_color_blue"
app:sb_uncheck_color="@color/app_color_blue"
app:sb_uncheckcircle_color="@color/app_color_blue" />
</RelativeLayout>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="高范围系数"
android:textAlignment="center"
android:textSize="16dp"
/>
<EditText
android:id="@+id/bcjz_gxs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/input_bj"
android:digits="0123456789."
android:hint="请输入"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:text="0"
android:textSize="12dp"
android:layout_marginBottom="10dp"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="低范围系数"
android:textAlignment="center"
android:textSize="16dp"/>
<EditText
android:id="@+id/bcjz_dxs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/input_bj"
android:digits="0123456789."
android:hint="请输入"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:text="0"
android:textSize="12dp"
/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="通道出料时间(s)"
android:textAlignment="center"
android:textSize="16dp"
/>
<EditText
android:id="@+id/bcjz_clsj"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/input_bj"
android:digits="0123456789."
android:hint="请输入"
android:inputType="numberDecimal"
android:maxLines="1"
android:padding="3dp"
android:text="0"
android:textSize="12dp"
/>
<Button
android:id="@+id/click_bcjz_save"
android:layout_marginTop="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="@drawable/bg"
android:text="保存"
android:textColor="@color/white"
android:textSize="18sp"
android:layout_marginBottom="10dp"
/>
</LinearLayout>

<LinearLayout
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:text="称"
android:textAlignment="center"
android:textSize="16dp"/>
<RelativeLayout
android:layout_width="120dp"
android:layout_height="120dp">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/jishiqibj">
</ImageView>

<TextView
android:id="@+id/dianzicheng3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:fontFamily="sans-serif-medium"
android:text="128.0g"
android:textColor="@color/red_primary_dark"
android:textSize="20dp"
android:textStyle="bold|italic" />
</RelativeLayout>
<RelativeLayout
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/qingling3"
android:layout_width="60dp"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="@drawable/button1"
android:text="清零"
android:textColor="@color/white"
android:textSize="18sp"/>
</RelativeLayout>


</LinearLayout>

<LinearLayout
android:layout_alignParentRight="true"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="60dp"
android:text="模拟出料(g)"
android:textAlignment="center"
android:textSize="16dp"/>
<EditText
android:id="@+id/chuliaokeshu3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/input_bj"
android:digits="0123456789."
android:hint="请输入"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:text="0"
android:textSize="12dp"
android:layout_marginBottom="60dp"
/>
<Button
android:id="@+id/chuliao3"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="@drawable/bg"
android:text="出料"
android:textColor="@color/white"
android:textSize="18sp"
android:layout_marginBottom="10dp"
/>
</LinearLayout>

</RelativeLayout>
</LinearLayout>
</RelativeLayout>

</RelativeLayout>
</RelativeLayout>
</RelativeLayout>

+ 1
- 1
app/src/main/res/values/strings.xml Dosyayı Görüntüle

@@ -1,5 +1,5 @@
<resources>
<string name="app_name">菠萝智慧吧</string>
<string name="app_name">配料吧台</string>
<string name="file_normal">常用文件</string>
<string name="file_all">全部文件</string>
<string name="empty_data">没有数据</string>


+ 1
- 1
build.gradle Dosyayı Görüntüle

@@ -55,7 +55,7 @@ ext { // 统一版本入口

// 奶茶机
// 设置applicationId(这里很重要,两个相同applicationId的apk不同同时安装在同一台Android手机中)
applicationId= "com.bonait.ncj"
applicationId= "com.tiaoweibatai.chayin"


// 调味吧


Yükleniyor…
İptal
Kaydet