Ver a proveniência

现场调整338899

茶饮新(现场)
fyf há 1 ano
ascendente
cometimento
d4a5769c66
32 ficheiros alterados com 908 adições e 405 eliminações
  1. +3
    -0
      app/src/main/AndroidManifest.xml
  2. +4
    -0
      app/src/main/java/com/bonait/bnframework/business/ConfigData.java
  3. +50
    -5
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  4. +22
    -2
      app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
  5. +25
    -0
      app/src/main/java/com/bonait/bnframework/common/constant/DataBus.java
  6. +1
    -1
      app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java
  7. +1
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java
  8. +0
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/loadinggood_adapter.java
  9. +48
    -28
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/pfsx_adapter.java
  10. +197
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/zdqxchid_adapter.java
  11. +19
    -21
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/JiaoYanFragment.java
  12. +0
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/MakeGoodFragment.java
  13. +36
    -3
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/GoodPeiFangActivity.java
  14. +17
    -23
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/JiaoYan_lsjy_fragment.java
  15. +91
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/JiaoYan_zdbs_fragment.java
  16. +81
    -94
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/JiaoYan_zdqx_fragment.java
  17. +14
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_makegood_control.java
  18. +33
    -41
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_pf_control.java
  19. +5
    -1
      app/src/main/res/layout/activity_bottom_navigation_main.xml
  20. +2
    -1
      app/src/main/res/layout/activity_systemparameter.xml
  21. +47
    -0
      app/src/main/res/layout/datatab/layout/fragment_jiaoyan_zdbs.xml
  22. +6
    -4
      app/src/main/res/layout/datatab/layout/pfsx_item.xml
  23. +3
    -3
      app/src/main/res/layout/datatab/layout/wl_item.xml
  24. +1
    -0
      app/src/main/res/layout/fragment_jiaoyan_wdsz.xml
  25. +27
    -140
      app/src/main/res/layout/fragment_jiaoyan_zdqx.xml
  26. +2
    -12
      app/src/main/res/layout/fragment_make_good.xml
  27. +24
    -13
      app/src/main/res/layout/item/layout/dialog_add_makegood.xml
  28. +2
    -6
      app/src/main/res/layout/item/layout/dialog_add_pf.xml
  29. +1
    -1
      app/src/main/res/layout/item/layout/new_propety_click.xml
  30. +146
    -0
      app/src/main/res/layout/item/layout/zdqxchid_item.xml
  31. BIN
     
  32. BIN
     

+ 3
- 0
app/src/main/AndroidManifest.xml Ver ficheiro

@@ -33,6 +33,9 @@
tools:ignore="GoogleAppIndexingWarning"
tools:node="merge"
tools:replace="android:icon">
<activity
android:name=".modules.home.fragment.from.fragment.JiaoYan_zdbs_fragment"
android:exported="false" />
<activity
android:name=".modules.home.fragment.from.fragment.JiaoYan_clsfbc_fragment"
android:exported="false" />


+ 4
- 0
app/src/main/java/com/bonait/bnframework/business/ConfigData.java Ver ficheiro

@@ -247,6 +247,8 @@ public class ConfigData {
ConfigName.getInstance().AutomaticHeating = ConfigUtil.read(ConfigName.getInstance().dishesCon, "AutomaticHeating", ConfigName.getInstance().AutomaticHeating);
ConfigName.getInstance().GT1_AutomaticHeating = ConfigUtil.read(ConfigName.getInstance().dishesCon, "GT1_AutomaticHeating", ConfigName.getInstance().GT1_AutomaticHeating);
ConfigName.getInstance().GT2_AutomaticHeating = ConfigUtil.read(ConfigName.getInstance().dishesCon, "GT2_AutomaticHeating", ConfigName.getInstance().GT2_AutomaticHeating);
ConfigName.getInstance().AutomaticWaterRefill = ConfigUtil.read(ConfigName.getInstance().dishesCon, "AutomaticWaterRefill", ConfigName.getInstance().AutomaticWaterRefill);

}

/**
@@ -265,6 +267,8 @@ public class ConfigData {
ConfigUtil.write(ConfigName.getInstance().dishesCon,"AutomaticHeating", ConfigName.getInstance().AutomaticHeating);
ConfigUtil.write(ConfigName.getInstance().dishesCon,"GT1_AutomaticHeating", ConfigName.getInstance().GT1_AutomaticHeating);
ConfigUtil.write(ConfigName.getInstance().dishesCon,"GT2_AutomaticHeating", ConfigName.getInstance().GT2_AutomaticHeating);
ConfigUtil.write(ConfigName.getInstance().dishesCon,"AutomaticWaterRefill", ConfigName.getInstance().AutomaticWaterRefill);

}

/**


+ 50
- 5
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java Ver ficheiro

@@ -77,6 +77,10 @@ public class ExecuteTheRecipe {
* 扫码信息
*/
public static String Code = "";
/**
* 出杯总量
*/
public static int MakeGoodCount = 0;
/**
* 接收到扫码信息,返回
*/
@@ -99,6 +103,11 @@ public class ExecuteTheRecipe {
*/
public static IRun CleaningComplete;

/**
* 自动排水完成
*/
public static IRun AutoPaiShui;

/**
* 当前制作商品
*/
@@ -236,9 +245,8 @@ public class ExecuteTheRecipe {
// }

ReadCode();

//ReadPLCStatus();
AutoJR();
} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
}
@@ -251,6 +259,23 @@ public class ExecuteTheRecipe {
}
});

ThreadManager.Get().StartLong("PLC设备-自动加热补水", true, new IThread() {
@Override
public void Run() throws InterruptedException {
try {
AutoJR();
} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
}
Thread.sleep(3000);
}

@Override
public void RunComplete() throws InterruptedException {

}
});

ThreadManager.Get().StartLong("PLC设备数据监听-信号检测", true, new IThread() {
@Override
public void Run() throws InterruptedException {
@@ -260,7 +285,7 @@ public class ExecuteTheRecipe {
} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
}
Thread.sleep(50);
Thread.sleep(100);
}
@Override
public void RunComplete() throws InterruptedException {
@@ -691,6 +716,15 @@ public class ExecuteTheRecipe {
});
}
}

if (ConfigName.getInstance().PLC_Address.containsKey("配料次数")) {
BPA_PLCADDRESS plcaddress = ConfigName.getInstance().PLC_Address.get("配料次数");
if (!plcaddress.address.isEmpty() && ConfigName.getInstance().PlcIsConnect) {
ModbusTcpServer.get().ReadInt(plcaddress.address, 1, (data) -> {
MakeGoodCount=data[0] ;
});
}
}
} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
} finally {
@@ -714,6 +748,10 @@ public class ExecuteTheRecipe {

//清洗完成标志
CompleteListen( "自动清洗完成", CleaningComplete);

//管道自动排水完成
CompleteListen( "管道自动排水完成", AutoPaiShui);

} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
} finally {
@@ -762,9 +800,16 @@ public class ExecuteTheRecipe {
}
}
}
if(ConfigName.getInstance().AutomaticHeating)
{

//自动补水
if(ConfigName.getInstance().AutomaticWaterRefill)
{
Object yw= ReadPLC("水池液位检测");
boolean isopen=yw==null?false:(boolean) yw;
if(!isopen)
{
WritePLC("水池进水阀",true,null);
}
}
}
} catch (Exception ex) {


+ 22
- 2
app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java Ver ficheiro

@@ -290,7 +290,7 @@ public class ConfigName {
add(new Res_PLCADDRESS("通道19校准开关", "M4.2", 1, 1));
add(new Res_PLCADDRESS("通道20校准开关", "M4.3", 1, 1));

add(new Res_PLCADDRESS("配料次数", "VW90", 1, 1));
add(new Res_PLCADDRESS("配料次数", "VD90", 1, 1));
//add(new Res_PLCADDRESS("反转时间", "VW94", 1, 1));//pl
add(new Res_PLCADDRESS("基准时间", "VW96", 1, 1));
//add(new Res_PLCADDRESS("基准时间", "VW98", 1, 1));
@@ -477,6 +477,13 @@ public class ConfigName {

add(new Res_PLCADDRESS("水池液位检测", "M5.2", 1, 0));
add(new Res_PLCADDRESS("出料口检测", "M5.3", 1, 0));

add(new Res_PLCADDRESS("水池进水阀", "M103.6", 1, 1));
add(new Res_PLCADDRESS("水池排水阀-开", "M103.4", 1, 1));
add(new Res_PLCADDRESS("水池排水阀-关", "M103.5", 1, 1));

add(new Res_PLCADDRESS("管道自动排水", "M5.4", 1, 1));
add(new Res_PLCADDRESS("管道自动排水完成", "M5.5", 1, 1));
}};
/**
* 奶茶机工序模型
@@ -591,7 +598,7 @@ public class ConfigName {
add(new Res_PLCADDRESS("通道19校准开关", "M4.2", 1, 1));
add(new Res_PLCADDRESS("通道20校准开关", "M4.3", 1, 1));

add(new Res_PLCADDRESS("配料次数", "VW90", 1, 1));
add(new Res_PLCADDRESS("配料次数", "VD90", 1, 1));
add(new Res_PLCADDRESS("反转时间", "VW94", 1, 1));//pl
//add(new Res_PLCADDRESS("基准时间", "VW96", 1, 1));
add(new Res_PLCADDRESS("基准时间", "VW98", 1, 1));
@@ -757,6 +764,12 @@ public class ConfigName {
add(new Res_PLCADDRESS("实时状态", "VW500", 1, 0));
add(new Res_PLCADDRESS("水池液位检测", "M5.2", 1, 0));
add(new Res_PLCADDRESS("出料口检测", "M5.3", 1, 0));
add(new Res_PLCADDRESS("水池进水阀", "M103.4", 1, 1));
add(new Res_PLCADDRESS("水池排水阀-开", "M103.5", 1, 1));
add(new Res_PLCADDRESS("水池排水阀-关", "M103.5", 1, 1));

add(new Res_PLCADDRESS("管道自动排水", "M5.4", 1, 1));
add(new Res_PLCADDRESS("管道自动排水完成", "M5.5", 1, 1));

}};
/**
@@ -1059,4 +1072,11 @@ public class ConfigName {
*/
public Boolean GT2_AutomaticHeating=false;
//endregion

//region 是否自动补水
/**
* 是否自动补水(水池)
*/
public Boolean AutomaticWaterRefill=false;
//endregion
}

+ 25
- 0
app/src/main/java/com/bonait/bnframework/common/constant/DataBus.java Ver ficheiro

@@ -14,6 +14,7 @@ import com.bonait.bnframework.common.db.mode.BPA_LOG;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;
import com.bonait.bnframework.common.db.mode.BPA_SILOS;
import com.bonait.bnframework.common.db.mode.BPA_SUBORDER;
import com.bonait.bnframework.common.db.mode.BPA_SUGAR;
import com.bonait.bnframework.common.db.res.MakeStatus;
import com.bonait.bnframework.common.db.res.ResGoodProperty;
import com.bonait.bnframework.common.db.res.ResGoodsMake;
@@ -32,6 +33,7 @@ import com.bonait.bnframework.modules.home.adapter.loadinggood_adapter;
import com.bonait.bnframework.modules.home.adapter.lsjy_adapter;
import com.bonait.bnframework.modules.home.adapter.pfsx_adapter;
import com.bonait.bnframework.modules.home.adapter.wdsz_adapter;
import com.bonait.bnframework.modules.home.adapter.zdqxchid_adapter;
import com.bonait.bnframework.modules.home.fragment.mode.sdkz_control;
import com.bonait.bnframework.modules.home.fragment.mode.tab_control;

@@ -350,6 +352,29 @@ public class DataBus {
}
//endregion

//region 自动清洗
public ArrayList<BPA_SUGAR> zdqx = new ArrayList<BPA_SUGAR>();
public zdqxchid_adapter zdqxchidAdapter=null;
public void GetZDQXChid()
{
try {
zdqx.clear();
ArrayList<BPA_SUGAR> data= QueryDB.GetSugarALL();

for(BPA_SUGAR item:data)
{
zdqx.add(item);
}
if (zdqxchidAdapter!=null)
{
zdqxchidAdapter.refresh();
}
} catch (Exception e) {
e.printStackTrace();
}
}
//endregion

//region 手动控制
public LinearLayout sdkz_linrarlaout=null;
public Activity activity;


+ 1
- 1
app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java Ver ficheiro

@@ -1275,7 +1275,7 @@ public class QueryDB {
* 删除商品配方明细
* add fengyoufu 20230413
*
* @param data
* @param
* @return 是否成功
*/
public static boolean DeleteGoodsSrecipe(String id) {


+ 1
- 1
app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java Ver ficheiro

@@ -105,7 +105,7 @@ public class BottomNavigationMainActivity extends BaseActivity {
//1.同步时间
NetworkUtils.SynchronizationTime();
//主持
ConfigData.getInstance().GetOrganize(this);
//ConfigData.getInstance().GetOrganize(this);
//判断连接环境
ConfigData.getInstance().ToggleEnvironment();
//2.初始化PLC


+ 0
- 1
app/src/main/java/com/bonait/bnframework/modules/home/adapter/loadinggood_adapter.java Ver ficheiro

@@ -57,7 +57,6 @@ public class loadinggood_adapter extends RecyclerView.Adapter<RecyclerView.ViewH
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View inflate = mLayoutInflater.inflate(R.layout.loadinggood_item, parent, false);
return new MyViewHolder(inflate);

}

@Override


+ 48
- 28
app/src/main/java/com/bonait/bnframework/modules/home/adapter/pfsx_adapter.java Ver ficheiro

@@ -1,11 +1,14 @@
package com.bonait.bnframework.modules.home.adapter;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;

import androidx.annotation.NonNull;
@@ -17,47 +20,64 @@ import com.bonait.bnframework.common.constant.DataBus;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY;
import com.bonait.bnframework.common.db.res.ResGoodProperty;
import com.bonait.bnframework.common.db.res.ResGoodsMake;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.view.MyLayoutManager;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;

import java.util.ArrayList;
import java.util.List;

public class pfsx_adapter extends ArrayAdapter<ResGoodProperty> {
/**
* 内部点击事件
*/
private MyClickListener mListener;
private List<ResGoodProperty> datas= DataBus.getInstance().bpa_goodproperties;
public class pfsx_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private ArrayList<ResGoodProperty> datas= new ArrayList<>();
int resource1;
public Context contextA;
public pfsx_adapter(@NonNull Context context, int resource, @NonNull List<ResGoodProperty> objects) {
super(context, resource, objects);
contextA=context;
datas=objects;
this.resource1=resource;
private final LayoutInflater mLayoutInflater;

public pfsx_adapter(Context context,ArrayList<ResGoodProperty> ac) {
this.contextA = context;
datas=ac;
mLayoutInflater = LayoutInflater.from(context);
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View inflate = mLayoutInflater.inflate(R.layout.pfsx_item, parent, false);
return new MyViewHolder(inflate);
}
//每个子项被滚动到屏幕内的时候会被调用
@NonNull

@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
ResGoodProperty bpa_goodproperty = (ResGoodProperty) getItem(position);//得到当前项选中item实例
//为每一个子项加载设定的布局
View view = LayoutInflater.from(getContext()).inflate(resource1, parent, false);
//分别获取 image view 和 textview 的实例
TextView name = view.findViewById(R.id.name);//属性名称
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
if (holder instanceof MyViewHolder) {
MyViewHolder myViewHolder = (MyViewHolder) holder;
ResGoodProperty bpa_goodproperty =datas.get(position);
// 设置要显示的图片和文字

RecyclerView recyclerView=view.findViewById(R.id.recycler_view);

MyLayoutManager layout = new MyLayoutManager();
layout.setAutoMeasureEnabled(true);
recyclerView.setLayoutManager(layout);
newpropertyselect_adapter zsxadapter = new newpropertyselect_adapter(contextA,bpa_goodproperty.child);
recyclerView.setAdapter(zsxadapter);
MyLayoutManager layout = new MyLayoutManager();
layout.setAutoMeasureEnabled(true);
myViewHolder.recyclerView.setLayoutManager(layout);
newpropertyselect_adapter zsxadapter = new newpropertyselect_adapter(contextA,bpa_goodproperty.child);
myViewHolder.recyclerView.setAdapter(zsxadapter);

// 设置要显示的图片和文字
name.setText(bpa_goodproperty.name);
// 设置要显示的图片和文字
myViewHolder.name.setText(bpa_goodproperty.name);
}
}
@Override
public int getItemCount() {
return datas.size();
}

return view;
static class MyViewHolder extends RecyclerView.ViewHolder {
RecyclerView recyclerView;
TextView name;
public MyViewHolder(View view) {
super(view);
recyclerView = view.findViewById(R.id.recycler_view);
name = view.findViewById(R.id.name);
}
}

}

+ 197
- 0
app/src/main/java/com/bonait/bnframework/modules/home/adapter/zdqxchid_adapter.java Ver ficheiro

@@ -0,0 +1,197 @@
package com.bonait.bnframework.modules.home.adapter;

import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
import android.graphics.Color;
import android.os.Handler;
import android.os.Message;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.business.ExecuteTheRecipe;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.DataBus;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_SUGAR;
import com.bonait.bnframework.common.db.res.wdszMode;
import com.bonait.bnframework.common.helper.I.IWriteCallBack;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.suke.widget.SwitchButton;

import java.util.List;

public class zdqxchid_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {

private final LayoutInflater mLayoutInflater;

private Context context;

public List<BPA_SUGAR> zdqxModes = DataBus.getInstance().zdqx;
public Activity activity;
public zdqxchid_adapter(Context _context, Activity _activity) {
this.context = _context;
activity=_activity;
mLayoutInflater = LayoutInflater.from(context);

}

@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View inflate = mLayoutInflater.inflate(R.layout.zdqxchid_item, parent, false);
return new ZDQXViewHolder(inflate);

}

@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
try {
if (holder instanceof ZDQXViewHolder) {
ZDQXViewHolder myViewHolder = (ZDQXViewHolder) holder;
BPA_SUGAR goodsMake= zdqxModes.get(position);
String pssj="0.0";
String qxsj="0.0";
String temp="0";

if(goodsMake.plcvar.contains("|"))
{
String[] d= goodsMake.plcvar.split("[|]");
if(d.length>=3)
{
pssj=d[0];
qxsj=d[1];
temp=d[2];
}
}
myViewHolder.name.setText("步骤-"+position+1);
myViewHolder.edittext_pssj.setText(pssj+"");
myViewHolder.edittext_xhsj.setText(qxsj+"");
myViewHolder.edittext_qxwd.setText(temp+"");

if(goodsMake.exp==null || goodsMake.exp.isEmpty())
{
myViewHolder.status.setText("未开始");
myViewHolder.status.setTextColor(Color.parseColor("#99a0aa"));
}else
{
myViewHolder.status.setText(goodsMake.exp);

if(goodsMake.exp.equals("执行中"))
{
myViewHolder.status.setTextColor(Color.parseColor("#00A8E1"));

if (!myViewHolder.edittext_pssj.getText().toString().equals("")) {
int k= (int)Math.round((Double.parseDouble(myViewHolder.edittext_pssj.getText().toString()) * 10));
ExecuteTheRecipe.WritePLC("排水阀排水时间",(short)k,null);
Thread.sleep(50);
}

if (!myViewHolder.edittext_xhsj.getText().toString().equals("")) {
int k= (int)Math.round((Double.parseDouble(myViewHolder.edittext_xhsj.getText().toString()) * 10));
ExecuteTheRecipe.WritePLC("循环清洗时间",(short)k,null);
Thread.sleep(50);
}

if (!myViewHolder.edittext_qxwd.getText().toString().equals("")) {
int k= Integer.parseInt(myViewHolder.edittext_qxwd.getText().toString());
ExecuteTheRecipe.WritePLC("水池温度设置",k,null);
Thread.sleep(50);
}

ExecuteTheRecipe.WritePLC("自动清洗开始", true,null);

}else //执行完成
{
myViewHolder.status.setTextColor(Color.parseColor("#FF4081"));

}
}


myViewHolder.save_time.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
goodsMake.plcvar=myViewHolder.edittext_pssj.getText().toString()+"|"
+myViewHolder.edittext_xhsj.getText().toString()+"|"
+myViewHolder.edittext_qxwd.getText().toString();
QueryDB.UpdateSugar(goodsMake);
}
});

myViewHolder.delete_time.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
QueryDB.DeleteSugar(goodsMake);

zdqxModes.remove(position);
notifyDataSetChanged();
}
});
}
} catch (Exception e) {
e.printStackTrace();
}
}
private Activity findActivity(@NonNull Context context) {
if (context instanceof Activity) {
return (Activity) context;
} else if (context instanceof ContextWrapper) {
return findActivity(((ContextWrapper) context).getBaseContext());
} else {
return null;
}
}
/**
* 刷新
* @param
*/
public void refresh(){
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
try {
notifyDataSetChanged();
} catch (Exception e) {

}
}
});
}

@Override
public int getItemCount() {
return zdqxModes.size();
}

public static class ZDQXViewHolder extends RecyclerView.ViewHolder {
EditText edittext_pssj;//排水阀排水时间
EditText edittext_xhsj;//循环清洗时间
EditText edittext_qxwd;//清洗温度
Button save_time;//保存时间

Button delete_time;
TextView name;//保存时间
TextView status;//保存时间

public ZDQXViewHolder(View view) {
super(view);
edittext_pssj =view.findViewById(R.id.edittext_pssj);
edittext_xhsj =view.findViewById(R.id.edittext_xhsj);
edittext_qxwd =view.findViewById(R.id.edittext_qxwd);
save_time =view.findViewById(R.id.save_time);
delete_time=view.findViewById(R.id.delete_time);
name =view.findViewById(R.id.name);
status =view.findViewById(R.id.status);
}
}
}

+ 19
- 21
app/src/main/java/com/bonait/bnframework/modules/home/fragment/JiaoYanFragment.java Ver ficheiro

@@ -33,6 +33,7 @@ import com.bonait.bnframework.modules.home.fragment.from.fragment.JiaoYan_dzcjy_
import com.bonait.bnframework.modules.home.fragment.from.fragment.JiaoYan_lsjy_fragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.JiaoYan_sdkz_fragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.JiaoYan_wdsz_fragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.JiaoYan_zdbs_fragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.JiaoYan_zdqx_fragment;
import com.orhanobut.logger.Logger;
import com.qmuiteam.qmui.widget.QMUITopBarLayout;
@@ -92,32 +93,30 @@ public class JiaoYanFragment extends BaseFragment {
fragmentList = new ArrayList<>();
menuModes.clear();

// if (ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) {
// names.add("水池温度");
// }else
// {
// names.add("水池温度");
// names.add("果糖左温度");
// names.add("果糖右温度");
// }
menuModes.add(new ResMenuLeft(new JiaoYan_dzcjy_fragment(),"电子秤校验", R.mipmap.dzcjy, R.mipmap.dzcjy_select,true));
menuModes.add(new ResMenuLeft(new JiaoYan_lsjy_fragment(),"流速校验", R.mipmap.lsjy, R.mipmap.lsjy_select,false));
menuModes.add(new ResMenuLeft(new JiaoYan_clsfbc_fragment(),"出料算法补偿", R.mipmap.clsfbc, R.mipmap.clsfbc_selectd,false));

menuModes.add(new ResMenuLeft(new JiaoYan_wdsz_fragment(),"温度设置", R.mipmap.lsjy, R.mipmap.lsjy_select,false));
menuModes.add(new ResMenuLeft(new JiaoYan_zdqx_fragment(),"自动清洗", R.mipmap.zdqx1, R.mipmap.zdqx1_select,false));
menuModes.add(new ResMenuLeft(new JiaoYan_sdkz_fragment(),"手动控制", R.mipmap.sdkz, R.mipmap.sdkz_select,false));
if (ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) {
menuModes.add(new ResMenuLeft(new JiaoYan_dzcjy_fragment(),"电子秤校验", R.mipmap.dzcjy, R.mipmap.dzcjy_select,true));
menuModes.add(new ResMenuLeft(new JiaoYan_lsjy_fragment(),"流速校验", R.mipmap.lsjy, R.mipmap.lsjy_select,false));
menuModes.add(new ResMenuLeft(new JiaoYan_clsfbc_fragment(),"出料算法补偿", R.mipmap.clsfbc, R.mipmap.clsfbc_selectd,false));

menuModes.add(new ResMenuLeft(new JiaoYan_wdsz_fragment(),"温度设置", R.mipmap.lsjy, R.mipmap.lsjy_select,false));
menuModes.add(new ResMenuLeft(new JiaoYan_zdqx_fragment(),"自动清洗", R.mipmap.zdqx1, R.mipmap.zdqx1_select,false));
menuModes.add(new ResMenuLeft(new JiaoYan_zdbs_fragment(),"自动补水", R.mipmap.zdbs, R.mipmap.zdbs_select,false));
menuModes.add(new ResMenuLeft(new JiaoYan_sdkz_fragment(),"手动控制", R.mipmap.sdkz, R.mipmap.sdkz_select,false));
}else
{
menuModes.add(new ResMenuLeft(new JiaoYan_dzcjy_fragment(),"电子秤校验", R.mipmap.dzcjy, R.mipmap.dzcjy_select,true));
menuModes.add(new ResMenuLeft(new JiaoYan_lsjy_fragment(),"流速校验", R.mipmap.lsjy, R.mipmap.lsjy_select,false));
menuModes.add(new ResMenuLeft(new JiaoYan_wdsz_fragment(),"温度设置", R.mipmap.lsjy, R.mipmap.lsjy_select,false));
menuModes.add(new ResMenuLeft(new JiaoYan_zdqx_fragment(),"自动清洗", R.mipmap.zdqx1, R.mipmap.zdqx1_select,false));
menuModes.add(new ResMenuLeft(new JiaoYan_zdbs_fragment(),"自动补水", R.mipmap.zdbs, R.mipmap.zdbs_select,false));
menuModes.add(new ResMenuLeft(new JiaoYan_sdkz_fragment(),"手动控制", R.mipmap.sdkz, R.mipmap.sdkz_select,false));
}

for(ResMenuLeft item:menuModes)
{
fragmentList.add(item.fragment);
}
//FragmentAdapter fragmentAdapter=new FragmentAdapter(getChildFragmentManager(),fragmentList);
ShowFragment(menuModes.get(0).fragment);
// viewpager_jiaoyan.setAdapter(fragmentAdapter);
// viewpager_jiaoyan.setOffscreenPageLimit(5);
// viewpager_jiaoyan.setCurrentItem(0);
// viewpager_jiaoyan.addOnPageChangeListener(pageChangeListener);
adapter=new jiaoyan_adapter(getContext(),menuModes);
rv_left.setAdapter(adapter);
rv_left.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@@ -155,7 +154,6 @@ public class JiaoYanFragment extends BaseFragment {
mPosition=position;
adapter.notifyDataSetChanged();
ShowFragment(menuModes.get(position).fragment);
//viewpager_jiaoyan.setCurrentItem(position);
}

@Override


+ 0
- 2
app/src/main/java/com/bonait/bnframework/modules/home/fragment/MakeGoodFragment.java Ver ficheiro

@@ -103,8 +103,6 @@ public class MakeGoodFragment extends BaseFragment {
@BindView(R.id.good_gengxin)
Button good_gengxin;

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


/**


+ 36
- 3
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/GoodPeiFangActivity.java Ver ficheiro

@@ -24,11 +24,13 @@ import com.bonait.bnframework.common.base.BaseFragment;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.MessageName;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY;
import com.bonait.bnframework.common.db.mode.BPA_GOODS;
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE;
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPENAME;
import com.bonait.bnframework.common.db.mode.BPA_GOODSTYPE;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;
import com.bonait.bnframework.common.db.res.ResGoodProperty;
import com.bonait.bnframework.common.db.res.lcMode;
import com.bonait.bnframework.common.helper.I.IRunT;
import com.bonait.bnframework.common.helper.I.MyClickListener;
@@ -233,7 +235,7 @@ public class GoodPeiFangActivity extends BaseActivity {
//打开新建配方界面
BPA_GOODS good=(BPA_GOODS)data;
add_pf.setVisibility(View.VISIBLE);
add_pf.SetData(null,good);
add_pf.SetData(null,good,bpa_goodproperties);
}else if(k==2)
{
//修改配方
@@ -243,7 +245,7 @@ public class GoodPeiFangActivity extends BaseActivity {
//打开新建配方界面
BPA_GOODS good=(BPA_GOODS)data;
add_pf.setVisibility(View.VISIBLE);
add_pf.SetData(SelectDataName,good);
add_pf.SetData(SelectDataName,good,bpa_goodproperties);
}
}
};
@@ -266,13 +268,44 @@ public class GoodPeiFangActivity extends BaseActivity {
};
}


/**
* 属性数据
*/
ArrayList<ResGoodProperty> bpa_goodproperties = new ArrayList<>();
public List<LinkMode> Fdata = new ArrayList<>();
/**
* 初始化数据
*/
public void Initdata()
{

bpa_goodproperties.clear();
ArrayList<BPA_GOODPROPERTY> da = QueryDB.GetGoodsPropertyALL("0");
for (BPA_GOODPROPERTY item:da)
{
ResGoodProperty re=new ResGoodProperty();
re.id=item.id;
re.name=item.name;

ArrayList<BPA_GOODPROPERTY> zsx =QueryDB.GetGoodsPropertyALL(item.id);
re.child=new ArrayList<>();


ArrayList<ResGoodProperty> _chid = new ArrayList<>();
for (BPA_GOODPROPERTY k:zsx)
{
ResGoodProperty m=new ResGoodProperty();
m.id=k.id;
m.name=k.name;
m.isSelect=false;
_chid.add(m);
}
re.child=_chid;

bpa_goodproperties.add(re);
}


//1.商品类型
goodstypes = QueryDB.GetGoodsTypeALL();



+ 17
- 23
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/JiaoYan_lsjy_fragment.java Ver ficheiro

@@ -176,26 +176,17 @@ public class JiaoYan_lsjy_fragment extends BaseFragment {
//endregion
ExecuteTheRecipe.WritePLC("校准完成",false,null);

ExecuteTheRecipe.WritePLC("手自切换", false, new IWriteCallBack() {
ExecuteTheRecipe.WritePLC("手自切换", false, null);
ExecuteTheRecipe.WritePLC("通道校准", true, new IWriteCallBack() {
@Override
public void onSuccess() {
ExecuteTheRecipe.WritePLC("通道校准", true, new IWriteCallBack() {
@Override
public void onSuccess() {
ToastUtils.info("启动通道校准成功!");
}
@Override
public void onFailure(String ErrorMsg) {
ToastUtils.error("启动通道校准失败!");
}
});
ToastUtils.info("启动通道校准成功!");
}
@Override
public void onFailure(String ErrorMsg) {
ToastUtils.error("启动通道校准失败!");
}
});

break;
case R.id.kscl://开始出料
String zltext = edittext_cl.getText().toString();
@@ -369,18 +360,19 @@ public class JiaoYan_lsjy_fragment extends BaseFragment {
ExecuteTheRecipe.OnChargeMixtureComNotPar = new IRun() {
@Override
public void Run() {
ToastUtils.warning("通道校准完成!");
if (selectIndexSilos > 0) {
final int kkk = selectIndexSilos;
try {
new Handler().postDelayed(new Runnable() {

getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
try {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
ToastUtils.warning("通道校准完成!");

getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
try {
// 在2秒后执行按钮操作
ExecuteTheRecipe.WritePLC("校准值"+kkk,(short) zhongliangxianshi,null);

@@ -397,13 +389,15 @@ public class JiaoYan_lsjy_fragment extends BaseFragment {
{
lsjyAdapter.refresh();
}
} catch (Exception e) {
ToastUtils.error("重量解析显示异常!" + e.getMessage());
}
}
});
}, 2000);

} catch (Exception e) {
ToastUtils.error("重量解析显示异常!" + e.getMessage());
}
}
}, 1000);
});


} catch (Exception ex) {
Log.d("dsds", "Run: " + ex.getMessage());


+ 91
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/JiaoYan_zdbs_fragment.java Ver ficheiro

@@ -0,0 +1,91 @@
package com.bonait.bnframework.modules.home.fragment.from.fragment;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;

import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.business.ExecuteTheRecipe;
import com.bonait.bnframework.common.base.BaseFragment;
import com.bonait.bnframework.common.constant.ConfigName;
import com.orhanobut.logger.Logger;
import com.suke.widget.SwitchButton;

import butterknife.BindView;
import butterknife.ButterKnife;

public class JiaoYan_zdbs_fragment extends BaseFragment {

@BindView(R.id.control_switch_zdbs)
SwitchButton control_switch_zdbs;//自动补水
private Context context;

@Override
protected View onCreateView() {
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_jiaoyan_zdbs, null);
ButterKnife.bind(this, root);
return root;
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Logger.d("我的fragment创建");
context = getContext();
InitView();
}

/**
* 初始化界面
*/
public void InitView() {
Initdata();
}

/**
* 初始化数据加载
*/
public void Initdata() {
control_switch_zdbs.setChecked(ConfigName.getInstance().AutomaticWaterRefill);
control_switch_zdbs.setOnCheckedChangeListener(new SwitchButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(SwitchButton view, boolean isChecked) {
//设置
ConfigName.getInstance().AutomaticWaterRefill=isChecked;
ConfigData.getInstance().SavePZ();
if(!isChecked) //关闭
{
ExecuteTheRecipe.WritePLC("水池进水阀",false,null);
}
}
});
}

@Override
public void onDestroy() {
super.onDestroy();
Logger.d("我的fragment销毁");
ExecuteTheRecipe.WritePLC("清洗模式",false,null);
}

/**
* 当在activity设置viewPager + BottomNavigation + fragment时,
* 为防止viewPager左滑动切换界面,与fragment左滑返回上一界面冲突引起闪退问题,
* 必须加上此方法,禁止fragment左滑返回上一界面。
* <p>
* 切记!切记!切记!否则会闪退!
* <p>
* 当在fragment设置viewPager + BottomNavigation + fragment时,则不会出现这个问题。
*/
@Override
protected boolean canDragBack() {
return false;
}
}

+ 81
- 94
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/JiaoYan_zdqx_fragment.java Ver ficheiro

@@ -5,6 +5,7 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager.widget.ViewPager;

import android.content.Context;
@@ -17,15 +18,22 @@ import android.widget.Button;
import android.widget.EditText;

import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.business.ExecuteTheRecipe;
import com.bonait.bnframework.common.base.BaseFragment;
import com.bonait.bnframework.common.constant.DataBus;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_SUGAR;
import com.bonait.bnframework.common.helper.I.IRun;
import com.bonait.bnframework.common.helper.I.IWriteCallBack;
import com.bonait.bnframework.common.helper.WrapContentLinearLayoutManager;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.wdsz_adapter;
import com.bonait.bnframework.modules.home.adapter.zdqxchid_adapter;
import com.orhanobut.logger.Logger;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;

import butterknife.BindView;
import butterknife.ButterKnife;
@@ -33,16 +41,13 @@ import butterknife.OnClick;

public class JiaoYan_zdqx_fragment extends BaseFragment {

@BindView(R.id.edittext_pssj)
EditText edittext_pssj;//排水阀排水时间
@BindView(R.id.edittext_xhsj)
EditText edittext_xhsj;//循环清洗时间

@BindView(R.id.edittext_qxwd)
EditText edittext_qxwd;//清洗温度

@BindView(R.id.bt_start)
Button bt_start;//开始时间
Button bt_start;//开始清洗

@BindView(R.id.Recy_zdqx)
RecyclerView Recy_zdqx;//自动清洗流程

private Context context;
@Override
protected View onCreateView() {
@@ -66,73 +71,78 @@ public class JiaoYan_zdqx_fragment extends BaseFragment {
}

boolean IsStart = false;
@OnClick({R.id.save_time,R.id.bt_start})
@OnClick({R.id.bt_add_zdqx,R.id.bt_start})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.save_time://保存时间
new Thread(new Runnable() {
@Override
public void run() {
try {
if (!edittext_pssj.getText().toString().equals("")) {
int k= (int)Math.round((Double.parseDouble(edittext_pssj.getText().toString()) * 10));
ExecuteTheRecipe.WritePLC("排水阀排水时间",(short)k,null);
Thread.sleep(200);
}

if (!edittext_xhsj.getText().toString().equals("")) {
int k= (int)Math.round((Double.parseDouble(edittext_xhsj.getText().toString()) * 10));
ExecuteTheRecipe.WritePLC("循环清洗时间",(short)k,null);
Thread.sleep(200);
}

if (!edittext_qxwd.getText().toString().equals("")) {
int k= Integer.parseInt(edittext_qxwd.getText().toString());
ExecuteTheRecipe.WritePLC("水池温度设置",k,null);
Thread.sleep(200);
}

} catch (InterruptedException e) {

} catch (Exception e) {

}

}
}).start();
ToastUtils.info("保存成功!");
case R.id.bt_add_zdqx://增加流程
BPA_SUGAR sugar=new BPA_SUGAR();
sugar.plcvar="0.0|0.0|0";
QueryDB.AddSugar(sugar);
DataBus.getInstance().GetZDQXChid();
ToastUtils.info("增加成功!");
break;
case R.id.bt_start://开始清洗

if (IsStart) {

String title = "温馨提示!";
String message = "客官确定要强制停止清洗吗?";
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
IsStart=false;
bt_start.setText("开始清洗");
bt_start.setBackgroundResource(R.drawable.sz_bj);
}
});
ToastUtils.warning("正在清洗中,请勿重复点击!");
return;
}
ExecuteTheRecipe.WritePLC("清洗模式", true, new IWriteCallBack() {
@Override
public void onSuccess() {
IsStart=true;
bt_start.setText("正在清洗");
bt_start.setBackgroundResource(R.drawable.cp_bj);
}
@Override
public void onFailure(String ErrorMsg) {

}
});


new Thread(new Runnable() {
@Override
public void run() {
try {
ExecuteTheRecipe.WritePLC("清洗模式",true,null);
ExecuteTheRecipe.WritePLC("自动清洗开始", true, new IWriteCallBack() {
@Override
public void onSuccess() {
//UI线程操作UI控件
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
IsStart=true;
bt_start.setText("正在清洗");
bt_start.setBackgroundResource(R.drawable.cp_bj);
}
});
}

@Override
public void onFailure(String ErrorMsg) {

for (BPA_SUGAR item:
DataBus.getInstance().zdqx) {

item.exp="执行中";
DataBus.getInstance().zdqxchidAdapter.refresh();

final boolean[] IsStop = {false};
ExecuteTheRecipe.CleaningComplete=new IRun() {
@Override
public void Run() {
IsStop[0] =true;
}
};

long a = System.currentTimeMillis();
while (IsStart && !IsStop[0] && IsStart) {
if ((System.currentTimeMillis() - a) > 1000 * 500) {
break;
}
Thread.sleep(100);//10 *6
}
});
item.exp="执行完成";
DataBus.getInstance().zdqxchidAdapter.refresh();
}

ExecuteTheRecipe.WritePLC("管道自动排水",true,null);

} catch (Exception e) {

@@ -146,23 +156,6 @@ public class JiaoYan_zdqx_fragment extends BaseFragment {


//region 数据加载
private Handler mHandler = new Handler() {
public void handleMessage(Message msg) {
switch (msg.what) {
case 0:
bt_start.setText("开始清洗");
bt_start.setBackgroundResource(R.drawable.sz_bj);
break;
case 1:

break;
case 2:

break;
}

}
};
/**
* 初始化数据加载
*/
@@ -172,40 +165,34 @@ public class JiaoYan_zdqx_fragment extends BaseFragment {
@Override
public void run() {
try {
//填充数据
Object t1= ExecuteTheRecipe.ReadPLC("排水阀排水时间");
Object t5= ExecuteTheRecipe.ReadPLC("循环清洗时间");
Object t7= ExecuteTheRecipe.ReadPLC("水池温度设置");
DataBus.getInstance().GetZDQXChid();
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
edittext_pssj.setText(t1==null?"0.0":(String.format ("%.1f", (Double.parseDouble(t1.toString())/10))));
edittext_xhsj.setText(t5==null?"0.0":(String.format ("%.1f", (Double.parseDouble(t5.toString())/10))));
edittext_qxwd.setText((t7==null?0:(int)t7) +"");
if(isAdded())
{
Recy_zdqx.setLayoutManager(new WrapContentLinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL,false));
DataBus.getInstance().zdqxchidAdapter = new zdqxchid_adapter(getContext(),getActivity());
Recy_zdqx.setAdapter(DataBus.getInstance().zdqxchidAdapter);
}
}
});
ExecuteTheRecipe.WritePLC("手自切换",true,null);
} catch (Exception e) {

}
}
}).start();


ExecuteTheRecipe.CleaningComplete=new IRun() {
ExecuteTheRecipe.AutoPaiShui=new IRun() {
@Override
public void Run() {
if (IsStart) {
IsStart = false;
mHandler.sendEmptyMessage(0);
ExecuteTheRecipe.WritePLC("清洗模式",false,null);
ToastUtils.info("清洗完成");
}
IsStart=false;
bt_start.setText("开始清洗");
bt_start.setBackgroundResource(R.drawable.sz_bj);
}
};



} catch (Exception e) {

}


+ 14
- 2
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_makegood_control.java Ver ficheiro

@@ -11,9 +11,11 @@ import android.widget.ListView;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ExecuteTheRecipe;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.DataBus;
import com.bonait.bnframework.common.db.QueryDB;
@@ -50,10 +52,14 @@ public class add_makegood_control extends LinearLayout{
public BPA_GOODS Good = null;

@BindView(R.id.datatab_makesx)
ListView datatab_makesx;//属性
RecyclerView datatab_makesx;//属性

@BindView(R.id.makegoodtitle)
TextView makegoodtitle;//配方名称

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

/**
* 点击事件
*/
@@ -79,10 +85,15 @@ public class add_makegood_control extends LinearLayout{

private void initData() {
//2.填充规则数据,查询所有属性大类
LinearLayoutManager layoutManager=new LinearLayoutManager(getContext());
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
datatab_makesx.setLayoutManager(layoutManager);

if(DataBus.getInstance().sxadapter==null)
{
DataBus.getInstance().sxadapter = new pfsx_adapter(contextMian, R.layout.pfsx_item, DataBus.getInstance().bpa_goodproperties);
DataBus.getInstance().sxadapter = new pfsx_adapter(contextMian,DataBus.getInstance().bpa_goodproperties);
}

datatab_makesx.setAdapter(DataBus.getInstance().sxadapter);
}

@@ -95,6 +106,7 @@ public class add_makegood_control extends LinearLayout{
try {
Good = good;
makegoodtitle.setText(Good.name + "");
chubeiliang.setText(ExecuteTheRecipe.MakeGoodCount +"杯");
initData();
} catch (Exception ex) {



+ 33
- 41
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_pf_control.java Ver ficheiro

@@ -11,6 +11,7 @@ import android.widget.ListView;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.bonait.bnframework.R;
@@ -27,6 +28,7 @@ import com.bonait.bnframework.common.db.res.ResMaterilas;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.common.view.MyLayoutManager;
import com.bonait.bnframework.modules.home.adapter.loadinggood_adapter;
import com.bonait.bnframework.modules.home.adapter.newmeatrilselect_adapter;
import com.bonait.bnframework.modules.home.adapter.newneatril_adapter;
import com.bonait.bnframework.modules.home.adapter.pfsx_adapter;
@@ -57,17 +59,14 @@ public class add_pf_control extends LinearLayout implements MyClickListener {
EditText edittext;//配方名称

@BindView(R.id.datatab_sx)
ListView datatab_sx;
RecyclerView datatab_sx;

@BindView(R.id.datatab_pf)
ListView datatab_pf;

@BindView(R.id.title)
TextView title;//配方名称
/**
* 属性数据
*/
ArrayList<ResGoodProperty> bpa_goodproperties = new ArrayList<>();


/**
* 当前物料数据
@@ -75,7 +74,10 @@ public class add_pf_control extends LinearLayout implements MyClickListener {
public ArrayList<BPA_MATERIAL> resMaterilas=new ArrayList<>();



/**
* 属性数据
*/
ArrayList<ResGoodProperty> bpa_goodproperties = new ArrayList<>();
/**
* 点击事件
*/
@@ -128,37 +130,7 @@ public class add_pf_control extends LinearLayout implements MyClickListener {
recycler_view_wl_click.setAdapter(adapter);

//2.填充规则数据,查询所有属性大类
bpa_goodproperties.clear();
ArrayList<BPA_GOODPROPERTY> da = QueryDB.GetGoodsPropertyALL("0");
for (BPA_GOODPROPERTY item:da)
{
ResGoodProperty re=new ResGoodProperty();
re.id=item.id;
re.name=item.name;

ArrayList<BPA_GOODPROPERTY> zsx =QueryDB.GetGoodsPropertyALL(item.id);
re.child=new ArrayList<>();


ArrayList<ResGoodProperty> _chid = new ArrayList<>();
for (BPA_GOODPROPERTY k:zsx)
{
ResGoodProperty m=new ResGoodProperty();
m.id=k.id;
m.name=k.name;
if(bpaGoodsrecipename!=null && bpaGoodsrecipename.design!=null && !bpaGoodsrecipename.design.isEmpty() && bpaGoodsrecipename.design.contains(k.id))
{
m.isSelect=true;
}else
{
m.isSelect=false;
}
_chid.add(m);
}
re.child=_chid;

bpa_goodproperties.add(re);
}

if(bpaGoodsrecipename==null)
{
@@ -174,10 +146,28 @@ public class add_pf_control extends LinearLayout implements MyClickListener {
i++;
}
}
}else
{
for(ResGoodProperty item:bpa_goodproperties)
{
for(ResGoodProperty c:item.child)
{
if(bpaGoodsrecipename!=null && bpaGoodsrecipename.design!=null && !bpaGoodsrecipename.design.isEmpty() && bpaGoodsrecipename.design.contains(c.id))
{
c.isSelect=true;
}else
{
c.isSelect=false;
}
}
}
}

LinearLayoutManager layoutManager=new LinearLayoutManager(getContext());
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
datatab_sx.setLayoutManager(layoutManager);

pfsx_adapter sxadapter = new pfsx_adapter(getContext(), R.layout.pfsx_item, bpa_goodproperties);
pfsx_adapter sxadapter = new pfsx_adapter(getContext(), bpa_goodproperties);
datatab_sx.setAdapter(sxadapter);

InitTab();
@@ -215,9 +205,10 @@ public class add_pf_control extends LinearLayout implements MyClickListener {
* 设置数据
* @param name
*/
public void SetData(BPA_GOODSRECIPENAME name, BPA_GOODS good)
public void SetData(BPA_GOODSRECIPENAME name, BPA_GOODS good,ArrayList<ResGoodProperty> properties)
{
try {
bpa_goodproperties=properties;
bpaGoodsrecipename=name;
Good=good;
if(name!=null)
@@ -242,8 +233,7 @@ public class add_pf_control extends LinearLayout implements MyClickListener {
peifang_queren.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
if (mListener != null) {
SaveData();
if (mListener != null && SaveData()) {
mListener.clickListenerNew(view,1,null);
}
}
@@ -261,7 +251,7 @@ public class add_pf_control extends LinearLayout implements MyClickListener {
/**
* 保存数据
*/
public void SaveData()
public boolean SaveData()
{
if(DataValidation())
{
@@ -311,7 +301,9 @@ public class add_pf_control extends LinearLayout implements MyClickListener {
QueryDB.AddGoodsSrecipe(good);
}
}
return true;
}
return false;
}




+ 5
- 1
app/src/main/res/layout/activity_bottom_navigation_main.xml Ver ficheiro

@@ -45,14 +45,17 @@
android:gravity="center|top"
android:orientation="vertical">
<RelativeLayout
android:clickable="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:clickable="false"
android:id="@+id/tab_post_icon"
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@drawable/zailaiyibei" />
<TextView
android:clickable="false"
android:layout_width="43dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
@@ -62,11 +65,12 @@
android:textSize="36dp"
android:textStyle="bold|italic" />
<TextView
android:clickable="false"
android:layout_width="17dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="52dp"
android:text="来\n一\n"
android:text="来\n一\n"
android:textColor="@color/white"
android:textSize="12dp"
android:textStyle="bold|italic" />


+ 2
- 1
app/src/main/res/layout/activity_systemparameter.xml Ver ficheiro

@@ -154,8 +154,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:layout_centerHorizontal="true"
android:id="@+id/StartButton"
android:layout_width="match_parent"
android:layout_width="400dp"
android:layout_height="45dp"
android:background="@drawable/bg_btn_login_selected"
android:text="保存参数"


+ 47
- 0
app/src/main/res/layout/datatab/layout/fragment_jiaoyan_zdbs.xml Ver ficheiro

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout 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=".modules.home.fragment.from.fragment.JiaoYan_zdbs_fragment">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/main_background"
android:orientation="vertical">
<LinearLayout
android:layout_marginTop="@dimen/dp_40"
android:layout_marginLeft="@dimen/dp_40"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">

<LinearLayout
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="自动补水:"
android:textAlignment="center" />
<com.suke.widget.SwitchButton
android:layout_centerInParent="true"
app:sb_uncheck_color="@color/app_color_blue"
app:sb_uncheckcircle_color="@color/app_color_blue"
app:sb_button_color="@color/app_color_blue"
android:id="@+id/control_switch_zdbs"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:focusable="true"
/>
</LinearLayout>

</LinearLayout>
<!-- 物料信息管理 -->
</RelativeLayout>

</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout >

+ 6
- 4
app/src/main/res/layout/datatab/layout/pfsx_item.xml Ver ficheiro

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.android.com/apk/res/android ">
@@ -10,15 +10,17 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView
android:id="@+id/name"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_10"
android:text="回锅"
android:textSize="13dp"/>
android:textAlignment="textEnd"
android:textSize="16dp" />

<RelativeLayout
android:layout_width="match_parent"


+ 3
- 3
app/src/main/res/layout/datatab/layout/wl_item.xml Ver ficheiro

@@ -32,7 +32,7 @@
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="回锅肉"
android:textSize="12dp"/>
android:textSize="14dp"/>
</RelativeLayout>

<!-- <RelativeLayout-->
@@ -59,7 +59,7 @@
android:id="@+id/button_update"
android:layout_width="60dp"
android:layout_centerVertical="true"
android:layout_height="20dp"
android:layout_height="30dp"
android:layout_marginLeft="20dp"
android:background="@drawable/button1"
android:focusable="false"
@@ -69,7 +69,7 @@
android:id="@+id/button_item"
android:layout_width="60dp"
android:layout_centerVertical="true"
android:layout_height="20dp"
android:layout_height="30dp"
android:layout_marginLeft="100dp"
android:background="@drawable/button"
android:focusable="false"


+ 1
- 0
app/src/main/res/layout/fragment_jiaoyan_wdsz.xml Ver ficheiro

@@ -16,6 +16,7 @@
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/Recy_wdsz"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="0dp">


+ 27
- 140
app/src/main/res/layout/fragment_jiaoyan_zdqx.xml Ver ficheiro

@@ -6,153 +6,40 @@
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.fragment.JiaoYan_zdqx_fragment">
<RelativeLayout
android:layout_marginLeft="20dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/main_background"
android:orientation="vertical">
<LinearLayout
<Button
android:id="@+id/bt_add_zdqx"
android:layout_width="200dp"
android:layout_height="40dp"
android:layout_marginTop="20dp"
android:background="@drawable/bg_btn_login_selected"
android:text="增加流程"
android:textColor="@color/white"
android:textSize="20dp" />
<androidx.recyclerview.widget.RecyclerView
android:layout_marginTop="80dp"
android:id="@+id/Recy_zdqx"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
android:layout_marginLeft="0dp">
</androidx.recyclerview.widget.RecyclerView>

<Button
android:id="@+id/bt_start"
android:layout_width="400dp"
android:layout_height="50dp"
android:layout_marginBottom="50dp"
android:background="@drawable/bg_btn_login_selected"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="开始清洗"
android:textColor="@color/white"
android:textSize="20dp" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="① 填入时间"
android:textAlignment="center" />
<ImageView
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/jt_x"/>
<LinearLayout
android:layout_width="300dp"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="排水阀排水时间"
android:textAlignment="center" />
<TextView
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="循环清洗时间"
android:textAlignment="center" />
</LinearLayout>
<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_width="2dp"
android:layout_height="60dp"
android:background="@color/app_color_blue">
</RelativeLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
android:layout_marginLeft="20dp"
android:id="@+id/edittext_pssj"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:background="@drawable/input_bj"
android:hint="请输入"
android:inputType="text"
android:digits="0123456789."
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp" />

<EditText
android:layout_marginLeft="20dp"
android:layout_marginTop="17dp"
android:id="@+id/edittext_xhsj"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:background="@drawable/input_bj"
android:hint="请输入"
android:inputType="text"
android:digits="0123456789."
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp" />
</LinearLayout>
</LinearLayout>
<ImageView
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/jt_x"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="② 清洗温度"
android:textAlignment="center" />

<EditText
android:layout_margin="@dimen/dp_10"
android:id="@+id/edittext_qxwd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/input_bj"
android:hint="请输入"
android:inputType="text"
android:digits="0123456789"
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp"
android:text="0"/>
<ImageView
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/jt_x"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="③ 点击保存"
android:textAlignment="center" />
<Button
android:id="@+id/save_time"
android:layout_marginTop="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="26dp"
android:layout_centerInParent="true"
android:background="@drawable/bg_btn_login_selected"
android:text="保存"
android:textColor="@color/white"
android:textSize="14dp" />

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

<Button
android:id="@+id/bt_start"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_centerInParent="true"
android:layout_marginTop="40dp"
android:background="@drawable/sz_bj"
android:text="开始清洗"
android:textColor="@color/black_light"
android:textSize="20dp"/>
</RelativeLayout>

</LinearLayout>
<!-- 物料信息管理 -->
</RelativeLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 2
- 12
app/src/main/res/layout/fragment_make_good.xml Ver ficheiro

@@ -133,9 +133,10 @@
android:layout_margin="5dp"/>

<TextView
android:id="@+id/cheng_clear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="称:"
android:text="称(单击清零):"
android:textSize="@dimen/TitleSize"
android:layout_margin="5dp"/>

@@ -147,17 +148,6 @@
android:textSize="@dimen/TitleSize"
android:text="11.9g"
android:layout_margin="5dp"/>

<Button
android:id="@+id/cheng_clear"
android:layout_marginTop="5dp"
android:layout_width="40dp"
android:layout_height="30dp"
android:layout_centerInParent="true"
android:background="@drawable/bg_btn_login_selected"
android:text="清零"
android:textColor="@color/white"
android:textSize="14dp" />
<!-- <TextView-->
<!-- android:id="@+id/pf_ms"-->
<!-- android:layout_width="match_parent"-->


+ 24
- 13
app/src/main/res/layout/item/layout/dialog_add_makegood.xml Ver ficheiro

@@ -71,36 +71,45 @@
android:layout_height="wrap_content"
android:layout_weight="1">
<!-- 商品分类 -->
<ListView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/datatab_makesx"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="40dp"
android:divider="#00000000"
android:dividerHeight="3dp" >
</ListView>
android:layout_marginTop="40dp"/>
</RelativeLayout>

</LinearLayout>

<LinearLayout
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginBottom="40dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="当日出杯量"
android:text="订单总数"
android:textSize="19dp"/>


<TextView
android:layout_width="match_parent"
android:id="@+id/chubeiliang"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:fontFamily="cursive"
android:text="21"
android:text="21"
android:textAlignment="center"
android:textColor="@color/app_color_blue"
android:textSize="50dp"
android:textStyle="bold" />

<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:fontFamily="cursive"
android:text="单"
android:textAlignment="viewStart"
android:textColor="@color/app_color_blue"
android:textSize="30dp"
android:textStyle="bold" />
</LinearLayout>
@@ -110,8 +119,10 @@
<Button
android:layout_alignParentBottom="true"
android:id="@+id/quzhizuo"
android:layout_width="120dp"
android:layout_height="35dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/dp_10"
android:background="@drawable/bg_btn_login_selected"


+ 2
- 6
app/src/main/res/layout/item/layout/dialog_add_pf.xml Ver ficheiro

@@ -102,15 +102,11 @@


</LinearLayout>

<ListView

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/datatab_sx"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="40dp"
android:divider="#00000000"
android:dividerHeight="3dp" />
android:layout_marginTop="40dp"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"


+ 1
- 1
app/src/main/res/layout/item/layout/new_propety_click.xml Ver ficheiro

@@ -7,7 +7,7 @@
android:layout_marginBottom="5dp"
android:id="@+id/button_select"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_height="35dp"
android:text="糖水"
android:background="@drawable/button2"
android:textColor="@color/white"


+ 146
- 0
app/src/main/res/layout/item/layout/zdqxchid_item.xml Ver ficheiro

@@ -0,0 +1,146 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="步骤1"
android:textAlignment="center"
android:layout_marginBottom="@dimen/dp_10"
android:textSize="20dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:text="① 填入时间"
android:textAlignment="center" />

<LinearLayout
android:layout_width="300dp"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="排水阀排水时间"
android:textAlignment="center" />
<TextView
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="循环清洗时间"
android:textAlignment="center" />
</LinearLayout>
<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_width="2dp"
android:layout_height="60dp"
android:background="@color/app_color_blue">
</RelativeLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
android:layout_marginLeft="20dp"
android:id="@+id/edittext_pssj"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:background="@drawable/input_bj"
android:hint="请输入"
android:inputType="text"
android:digits="0123456789."
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp" />

<EditText
android:layout_marginLeft="20dp"
android:layout_marginTop="17dp"
android:id="@+id/edittext_xhsj"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:background="@drawable/input_bj"
android:hint="请输入"
android:inputType="text"
android:digits="0123456789."
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp" />
</LinearLayout>
</LinearLayout>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="② 清洗温度"
android:textAlignment="center" />

<EditText
android:layout_margin="@dimen/dp_10"
android:id="@+id/edittext_qxwd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/input_bj"
android:hint="请输入"
android:inputType="text"
android:digits="0123456789"
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp"
android:text="0"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="③ 保存时间或删除流程"
android:textAlignment="center" />
<RelativeLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/save_time"
android:layout_width="130dp"
android:layout_height="36dp"
android:layout_alignParentLeft="true"
android:background="@drawable/bg_btn_login_selected"
android:text="保存"
android:textColor="@color/white"
android:textSize="14dp" />

<Button
android:id="@+id/delete_time"
android:layout_width="130dp"
android:layout_height="36dp"
android:layout_alignParentRight="true"
android:background="@drawable/cp_bj"
android:text="删除"
android:textColor="@color/white"
android:textSize="14dp" />
</RelativeLayout>

<TextView
android:id="@+id/status"
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="未开始"
android:textAlignment="center"
android:textSize="20dp"/>
</LinearLayout>
</RelativeLayout>



Carregando…
Cancelar
Guardar