@@ -248,6 +248,7 @@ public class ConfigData { | |||||
ConfigName.getInstance().GT1_AutomaticHeating = ConfigUtil.read(ConfigName.getInstance().dishesCon, "GT1_AutomaticHeating", ConfigName.getInstance().GT1_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().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); | ConfigName.getInstance().AutomaticWaterRefill = ConfigUtil.read(ConfigName.getInstance().dishesCon, "AutomaticWaterRefill", ConfigName.getInstance().AutomaticWaterRefill); | ||||
ConfigName.getInstance().AutomaticWaterRefillTime = ConfigUtil.read(ConfigName.getInstance().dishesCon, "AutomaticWaterRefillTime", ConfigName.getInstance().AutomaticWaterRefillTime); | |||||
} | } | ||||
@@ -268,6 +269,8 @@ public class ConfigData { | |||||
ConfigUtil.write(ConfigName.getInstance().dishesCon,"GT1_AutomaticHeating", ConfigName.getInstance().GT1_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,"GT2_AutomaticHeating", ConfigName.getInstance().GT2_AutomaticHeating); | ||||
ConfigUtil.write(ConfigName.getInstance().dishesCon,"AutomaticWaterRefill", ConfigName.getInstance().AutomaticWaterRefill); | ConfigUtil.write(ConfigName.getInstance().dishesCon,"AutomaticWaterRefill", ConfigName.getInstance().AutomaticWaterRefill); | ||||
ConfigUtil.write(ConfigName.getInstance().dishesCon,"AutomaticWaterRefillTime", ConfigName.getInstance().AutomaticWaterRefillTime); | |||||
} | } | ||||
@@ -20,6 +20,7 @@ import com.bonait.bnframework.common.db.mode.BPA_SILOS; | |||||
import com.bonait.bnframework.common.db.res.AlertLogEnum; | import com.bonait.bnframework.common.db.res.AlertLogEnum; | ||||
import com.bonait.bnframework.common.db.res.ResGoodsMake; | import com.bonait.bnframework.common.db.res.ResGoodsMake; | ||||
import com.bonait.bnframework.common.db.res.ResGoodsRecipe; | import com.bonait.bnframework.common.db.res.ResGoodsRecipe; | ||||
import com.bonait.bnframework.common.db.res.SilosLsjyMode; | |||||
import com.bonait.bnframework.common.db.res.UserLogEnum; | import com.bonait.bnframework.common.db.res.UserLogEnum; | ||||
import com.bonait.bnframework.common.helper.ByteHelper; | import com.bonait.bnframework.common.helper.ByteHelper; | ||||
import com.bonait.bnframework.common.helper.DataFormat; | import com.bonait.bnframework.common.helper.DataFormat; | ||||
@@ -720,14 +721,14 @@ 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] ; | |||||
}); | |||||
} | |||||
} | |||||
// 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) { | } catch (Exception ex) { | ||||
ToastUtils.error("异常信息:" + ex.getMessage()); | ToastUtils.error("异常信息:" + ex.getMessage()); | ||||
} finally { | } finally { | ||||
@@ -813,6 +814,20 @@ public class ExecuteTheRecipe { | |||||
{ | { | ||||
WritePLC("水池进水阀",true,null); | WritePLC("水池进水阀",true,null); | ||||
} | } | ||||
if(yw!=null) | |||||
{ | |||||
Object jsf= ReadPLC("水池进水阀"); | |||||
if(jsf!=null && (boolean)jsf) | |||||
{ | |||||
new Handler().postDelayed(new Runnable() { | |||||
@Override | |||||
public void run() { | |||||
WritePLC("水池进水阀",false,null); | |||||
} | |||||
}, (int)Math.round((Double.parseDouble(ConfigName.getInstance().AutomaticWaterRefillTime) * 1000))); | |||||
} | |||||
} | |||||
} | } | ||||
} | } | ||||
} catch (Exception ex) { | } catch (Exception ex) { | ||||
@@ -102,6 +102,7 @@ public class MainInit { | |||||
//ConfigData.getInstance().LoadingCloud();//加载云端数据 | //ConfigData.getInstance().LoadingCloud();//加载云端数据 | ||||
DataBus.getInstance().GetTodayNoMake(); | DataBus.getInstance().GetTodayNoMake(); | ||||
//设置连接到有线网络 | //设置连接到有线网络 | ||||
// NetworkUtils.connetEnternet(app); | // NetworkUtils.connetEnternet(app); | ||||
@@ -412,6 +412,7 @@ public class ConfigName { | |||||
add(new Res_PLCADDRESS("排水阀排水时间", "VW244", 1, 1)); | add(new Res_PLCADDRESS("排水阀排水时间", "VW244", 1, 1)); | ||||
add(new Res_PLCADDRESS("循环清洗时间", "VW246", 1, 1)); | add(new Res_PLCADDRESS("循环清洗时间", "VW246", 1, 1)); | ||||
add(new Res_PLCADDRESS("加热时间", "VW248", 1, 1)); | add(new Res_PLCADDRESS("加热时间", "VW248", 1, 1)); | ||||
add(new Res_PLCADDRESS("自动补水延迟时间", "VW250", 1, 1)); | |||||
add(new Res_PLCADDRESS("清洗模式", "M0.4", 1, 1)); | add(new Res_PLCADDRESS("清洗模式", "M0.4", 1, 1)); | ||||
@@ -723,6 +724,8 @@ public class ConfigName { | |||||
add(new Res_PLCADDRESS("排水阀排水时间", "VW244", 1, 1)); | add(new Res_PLCADDRESS("排水阀排水时间", "VW244", 1, 1)); | ||||
add(new Res_PLCADDRESS("循环清洗时间", "VW246", 1, 1)); | add(new Res_PLCADDRESS("循环清洗时间", "VW246", 1, 1)); | ||||
add(new Res_PLCADDRESS("加热时间", "VW248", 1, 1)); | add(new Res_PLCADDRESS("加热时间", "VW248", 1, 1)); | ||||
add(new Res_PLCADDRESS("自动补水延迟时间", "VW250", 1, 1)); | |||||
add(new Res_PLCADDRESS("清洗模式", "M0.4", 1, 1)); | add(new Res_PLCADDRESS("清洗模式", "M0.4", 1, 1)); | ||||
add(new Res_PLCADDRESS("自动清洗开始", "M0.5", 1, 1)); | add(new Res_PLCADDRESS("自动清洗开始", "M0.5", 1, 1)); | ||||
@@ -1069,5 +1072,10 @@ public class ConfigName { | |||||
* 是否自动补水(水池) | * 是否自动补水(水池) | ||||
*/ | */ | ||||
public Boolean AutomaticWaterRefill=false; | public Boolean AutomaticWaterRefill=false; | ||||
/** | |||||
* 自动补水延迟时间 | |||||
*/ | |||||
public String AutomaticWaterRefillTime="0.0"; | |||||
//endregion | //endregion | ||||
} | } |
@@ -110,6 +110,8 @@ public class DataBus { | |||||
{ | { | ||||
AddGoodsMake(item); | AddGoodsMake(item); | ||||
} | } | ||||
ExecuteTheRecipe.MakeGoodCount= QueryDB.GetSuOrderTodanCount(); | |||||
} | } | ||||
/** | /** | ||||
@@ -28,4 +28,6 @@ public interface MessageName { | |||||
String ClickMakeGoodNew="ClickMakeGoodNew";//点击商品 | String ClickMakeGoodNew="ClickMakeGoodNew";//点击商品 | ||||
String ClickProperty="ClickProperty";//点击属性 | |||||
} | } |
@@ -1685,6 +1685,23 @@ public class QueryDB { | |||||
} | } | ||||
return data; | return data; | ||||
} | } | ||||
/** | |||||
* 获取今日总订单 | |||||
* @return | |||||
*/ | |||||
public static int GetSuOrderTodanCount() { | |||||
String orderby = Desc_Time_Up;//先按排序 创建时间倒序 | |||||
String where = "isDelete=? and createTime>? and createTime<?"; | |||||
String[] args = new String[]{"0", new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + " 00:00:00", | |||||
new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + " 23:59:59"}; | |||||
ArrayList<BPA_SUBORDER> data = new ArrayList<>(); | |||||
ArrayList<Object> obj = Get(BPA_SUBORDER.class, where, args, orderby); | |||||
for (Object k : obj) { | |||||
data.add((BPA_SUBORDER) k); | |||||
} | |||||
return data.size(); | |||||
} | |||||
//endregion | //endregion | ||||
//region BPA_ALERTLOG 预警日志表 | //region BPA_ALERTLOG 预警日志表 | ||||
@@ -12,8 +12,10 @@ import androidx.annotation.NonNull; | |||||
import androidx.recyclerview.widget.RecyclerView; | import androidx.recyclerview.widget.RecyclerView; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.constant.MessageName; | |||||
import com.bonait.bnframework.common.db.res.ResGoodProperty; | import com.bonait.bnframework.common.db.res.ResGoodProperty; | ||||
import com.bonait.bnframework.common.db.res.ResMaterilas; | import com.bonait.bnframework.common.db.res.ResMaterilas; | ||||
import com.bonait.bnframework.common.message.MessageManager; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.List; | import java.util.List; | ||||
@@ -61,6 +63,7 @@ public class newpropertyselect_adapter extends RecyclerView.Adapter<RecyclerView | |||||
@Override | @Override | ||||
public void onClick(View view) { | public void onClick(View view) { | ||||
SetSelect(goods); | SetSelect(goods); | ||||
MessageManager.getInstance().sendMessage(MessageName.ClickProperty,"ClickProperty"); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -43,6 +43,8 @@ public class wl_adapter extends ArrayAdapter<BPA_MATERIAL> { | |||||
//分别获取 image view 和 textview 的实例 | //分别获取 image view 和 textview 的实例 | ||||
TextView name = view.findViewById(R.id.name); | TextView name = view.findViewById(R.id.name); | ||||
Button button = view.findViewById(R.id.button_item); | Button button = view.findViewById(R.id.button_item); | ||||
Button button_update = view.findViewById(R.id.button_update); | |||||
// 设置要显示的图片和文字 | // 设置要显示的图片和文字 | ||||
name.setText(bpa_material.name); | name.setText(bpa_material.name); | ||||
name.setOnClickListener(new View.OnClickListener() { | name.setOnClickListener(new View.OnClickListener() { | ||||
@@ -52,12 +54,21 @@ public class wl_adapter extends ArrayAdapter<BPA_MATERIAL> { | |||||
} | } | ||||
}); | }); | ||||
button_update.setOnClickListener(new View.OnClickListener() { | |||||
@Override | |||||
public void onClick(View view) { | |||||
if(mListener!=null) mListener.clickListener(view,bpa_material); | |||||
} | |||||
}); | |||||
button.setOnClickListener(new View.OnClickListener() { | button.setOnClickListener(new View.OnClickListener() { | ||||
@Override | @Override | ||||
public void onClick(View view) { | public void onClick(View view) { | ||||
if(mListener!=null) mListener.clickListener(view,bpa_material); | if(mListener!=null) mListener.clickListener(view,bpa_material); | ||||
} | } | ||||
}); | }); | ||||
return view; | return view; | ||||
} | } | ||||
} | } |
@@ -217,6 +217,7 @@ public class Jcsjgl_wl_fragment extends BaseFragment implements MyClickListener | |||||
public void clickListener(View v, Object data) { | public void clickListener(View v, Object data) { | ||||
switch (v.getId()) { | switch (v.getId()) { | ||||
case R.id.name://修改物料名称按钮 | case R.id.name://修改物料名称按钮 | ||||
case R.id.button_update://修改物料名称按钮 | |||||
final QMUIDialog.EditTextDialogBuilder builder = new QMUIDialog.EditTextDialogBuilder(context); | final QMUIDialog.EditTextDialogBuilder builder = new QMUIDialog.EditTextDialogBuilder(context); | ||||
builder.setTitle("物料名称") | builder.setTitle("物料名称") | ||||
.setPlaceholder("在此输入物料名称") | .setPlaceholder("在此输入物料名称") | ||||
@@ -8,6 +8,7 @@ import android.content.Context; | |||||
import android.os.Bundle; | import android.os.Bundle; | ||||
import android.view.LayoutInflater; | import android.view.LayoutInflater; | ||||
import android.view.View; | import android.view.View; | ||||
import android.widget.Button; | |||||
import android.widget.EditText; | import android.widget.EditText; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
@@ -15,6 +16,7 @@ import com.bonait.bnframework.business.ConfigData; | |||||
import com.bonait.bnframework.business.ExecuteTheRecipe; | import com.bonait.bnframework.business.ExecuteTheRecipe; | ||||
import com.bonait.bnframework.common.base.BaseFragment; | import com.bonait.bnframework.common.base.BaseFragment; | ||||
import com.bonait.bnframework.common.constant.ConfigName; | import com.bonait.bnframework.common.constant.ConfigName; | ||||
import com.bonait.bnframework.common.utils.ToastUtils; | |||||
import com.orhanobut.logger.Logger; | import com.orhanobut.logger.Logger; | ||||
import com.suke.widget.SwitchButton; | import com.suke.widget.SwitchButton; | ||||
@@ -25,6 +27,10 @@ public class JiaoYan_zdbs_fragment extends BaseFragment { | |||||
@BindView(R.id.control_switch_zdbs) | @BindView(R.id.control_switch_zdbs) | ||||
SwitchButton control_switch_zdbs;//自动补水 | SwitchButton control_switch_zdbs;//自动补水 | ||||
@BindView(R.id.edittext_ycsj) | |||||
EditText edittext_ycsj;//自动补水延迟时间 | |||||
@BindView(R.id.save_time) | |||||
Button save_time;//自动补水延迟时间 | |||||
private Context context; | private Context context; | ||||
@Override | @Override | ||||
@@ -54,6 +60,7 @@ public class JiaoYan_zdbs_fragment extends BaseFragment { | |||||
*/ | */ | ||||
public void Initdata() { | public void Initdata() { | ||||
control_switch_zdbs.setChecked(ConfigName.getInstance().AutomaticWaterRefill); | control_switch_zdbs.setChecked(ConfigName.getInstance().AutomaticWaterRefill); | ||||
edittext_ycsj.setText(ConfigName.getInstance().AutomaticWaterRefillTime); | |||||
control_switch_zdbs.setOnCheckedChangeListener(new SwitchButton.OnCheckedChangeListener() { | control_switch_zdbs.setOnCheckedChangeListener(new SwitchButton.OnCheckedChangeListener() { | ||||
@Override | @Override | ||||
public void onCheckedChanged(SwitchButton view, boolean isChecked) { | public void onCheckedChanged(SwitchButton view, boolean isChecked) { | ||||
@@ -66,6 +73,21 @@ public class JiaoYan_zdbs_fragment extends BaseFragment { | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
save_time.setOnClickListener(new View.OnClickListener() { | |||||
@Override | |||||
public void onClick(View view) { | |||||
if(edittext_ycsj.getText().toString().isEmpty()) | |||||
{ | |||||
ToastUtils.warning("延迟时间不能为空!"); | |||||
return; | |||||
} | |||||
ConfigName.getInstance().AutomaticWaterRefillTime=edittext_ycsj.getText().toString(); | |||||
ConfigData.getInstance().SavePZ(); | |||||
ToastUtils.info("保存成功!"); | |||||
} | |||||
}); | |||||
} | } | ||||
@Override | @Override | ||||
@@ -1,6 +1,8 @@ | |||||
package com.bonait.bnframework.modules.home.fragment.mode; | package com.bonait.bnframework.modules.home.fragment.mode; | ||||
import android.app.Activity; | |||||
import android.content.Context; | import android.content.Context; | ||||
import android.content.ContextWrapper; | |||||
import android.util.AttributeSet; | import android.util.AttributeSet; | ||||
import android.view.LayoutInflater; | import android.view.LayoutInflater; | ||||
import android.view.View; | import android.view.View; | ||||
@@ -10,12 +12,14 @@ import android.widget.LinearLayout; | |||||
import android.widget.ListView; | import android.widget.ListView; | ||||
import android.widget.TextView; | import android.widget.TextView; | ||||
import androidx.annotation.NonNull; | |||||
import androidx.annotation.Nullable; | import androidx.annotation.Nullable; | ||||
import androidx.recyclerview.widget.LinearLayoutManager; | import androidx.recyclerview.widget.LinearLayoutManager; | ||||
import androidx.recyclerview.widget.RecyclerView; | import androidx.recyclerview.widget.RecyclerView; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.constant.DataBus; | import com.bonait.bnframework.common.constant.DataBus; | ||||
import com.bonait.bnframework.common.constant.MessageName; | |||||
import com.bonait.bnframework.common.db.QueryDB; | import com.bonait.bnframework.common.db.QueryDB; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY; | 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_GOODS; | ||||
@@ -26,6 +30,8 @@ import com.bonait.bnframework.common.db.res.ResGoodProperty; | |||||
import com.bonait.bnframework.common.db.res.ResGoodsRecipe; | import com.bonait.bnframework.common.db.res.ResGoodsRecipe; | ||||
import com.bonait.bnframework.common.db.res.ResMaterilas; | import com.bonait.bnframework.common.db.res.ResMaterilas; | ||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | import com.bonait.bnframework.common.helper.I.MyClickListener; | ||||
import com.bonait.bnframework.common.message.MessageLooper; | |||||
import com.bonait.bnframework.common.message.MessageManager; | |||||
import com.bonait.bnframework.common.utils.ToastUtils; | import com.bonait.bnframework.common.utils.ToastUtils; | ||||
import com.bonait.bnframework.common.view.MyLayoutManager; | import com.bonait.bnframework.common.view.MyLayoutManager; | ||||
import com.bonait.bnframework.modules.home.adapter.loadinggood_adapter; | import com.bonait.bnframework.modules.home.adapter.loadinggood_adapter; | ||||
@@ -83,17 +89,18 @@ public class add_pf_control extends LinearLayout implements MyClickListener { | |||||
*/ | */ | ||||
public MyClickListener mListener=null; | public MyClickListener mListener=null; | ||||
private View root; | private View root; | ||||
public Context acontext=null; | |||||
public add_pf_control(Context context, @Nullable AttributeSet attrs) { | public add_pf_control(Context context, @Nullable AttributeSet attrs) { | ||||
super(context, attrs); | super(context, attrs); | ||||
root= LayoutInflater.from(context).inflate(R.layout.dialog_add_pf, this); | root= LayoutInflater.from(context).inflate(R.layout.dialog_add_pf, this); | ||||
ButterKnife.bind(this, root); | ButterKnife.bind(this, root); | ||||
acontext=context; | |||||
Init(); | Init(); | ||||
} | } | ||||
public void Init() | public void Init() | ||||
{ | { | ||||
//初始化界面控件的事件 | //初始化界面控件的事件 | ||||
initEvent(); | initEvent(); | ||||
} | } | ||||
@@ -142,10 +149,15 @@ public class add_pf_control extends LinearLayout implements MyClickListener { | |||||
if(i==0) | if(i==0) | ||||
{ | { | ||||
c.isSelect=true; | c.isSelect=true; | ||||
}else | |||||
{ | |||||
c.isSelect=false; | |||||
} | } | ||||
i++; | i++; | ||||
} | } | ||||
} | } | ||||
edittext.setText(GetSelectName()); | |||||
}else | }else | ||||
{ | { | ||||
for(ResGoodProperty item:bpa_goodproperties) | for(ResGoodProperty item:bpa_goodproperties) | ||||
@@ -227,6 +239,15 @@ public class add_pf_control extends LinearLayout implements MyClickListener { | |||||
} | } | ||||
} | } | ||||
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; | |||||
} | |||||
} | |||||
private void initEvent() | private void initEvent() | ||||
{ | { | ||||
@@ -246,6 +267,27 @@ public class add_pf_control extends LinearLayout implements MyClickListener { | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
Activity activity = findActivity(acontext); | |||||
if (activity != null) { | |||||
MessageManager.getInstance().registerMessageReceiver(activity, MessageName.ClickProperty, new MessageLooper.OnMessageListener() { | |||||
@Override | |||||
public void onMessage(Object msg) { | |||||
if (msg != null) { | |||||
activity.runOnUiThread(new Runnable() { | |||||
@Override | |||||
public void run() { | |||||
try { | |||||
edittext.setText(GetSelectName()); | |||||
} catch (Exception e) { | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | } | ||||
/** | /** | ||||
@@ -305,7 +347,25 @@ public class add_pf_control extends LinearLayout implements MyClickListener { | |||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
/** | |||||
* 获取选中名称 | |||||
* @return | |||||
*/ | |||||
public String GetSelectName() | |||||
{ | |||||
String names=Good.name+"_"; | |||||
for(ResGoodProperty item:bpa_goodproperties) | |||||
{ | |||||
for(ResGoodProperty k:item.child) | |||||
{ | |||||
if(k.isSelect) | |||||
{ | |||||
names+=k.name+"_"; | |||||
} | |||||
} | |||||
} | |||||
return names.substring(0, names.length() - 1); | |||||
} | |||||
String pfname="";//配方名称集合 | String pfname="";//配方名称集合 | ||||
String ggids="";//规格id集合 | String ggids="";//规格id集合 | ||||
@@ -319,7 +379,7 @@ public class add_pf_control extends LinearLayout implements MyClickListener { | |||||
pfname=edittext.getText().toString(); | pfname=edittext.getText().toString(); | ||||
if(pfname.isEmpty()) | if(pfname.isEmpty()) | ||||
{ | { | ||||
ToastUtils.info("配方名称不能为空!"); | |||||
ToastUtils.warning("配方名称不能为空!"); | |||||
return isSuceess; | return isSuceess; | ||||
} | } | ||||
@@ -343,7 +403,14 @@ public class add_pf_control extends LinearLayout implements MyClickListener { | |||||
//2.必须选择一个规格 | //2.必须选择一个规格 | ||||
if(DataBus.getInstance().Recipe.size()<=0) | if(DataBus.getInstance().Recipe.size()<=0) | ||||
{ | { | ||||
ToastUtils.info("配方数据表格不能为空!"); | |||||
ToastUtils.warning("配方数据表格不能为空!"); | |||||
return isSuceess; | |||||
} | |||||
//判断配方是否有相同规格的了 | |||||
BPA_GOODSRECIPENAME goodsrecipename = QueryDB.GetGoodsRecipeNameDesignId(ggids,Good.id); | |||||
if (goodsrecipename != null) { | |||||
ToastUtils.warning("已有改做法配方,不能在新增了!"); | |||||
return isSuceess; | return isSuceess; | ||||
} | } | ||||
@@ -33,7 +33,7 @@ | |||||
<Button | <Button | ||||
android:id="@+id/add_fl" | android:id="@+id/add_fl" | ||||
android:layout_width="100dp" | android:layout_width="100dp" | ||||
android:layout_height="26dp" | |||||
android:layout_height="30dp" | |||||
android:layout_centerInParent="true" | android:layout_centerInParent="true" | ||||
android:layout_marginLeft="20dp" | android:layout_marginLeft="20dp" | ||||
android:background="@drawable/bg_btn_login_selected" | android:background="@drawable/bg_btn_login_selected" | ||||
@@ -61,7 +61,7 @@ | |||||
<Button | <Button | ||||
android:id="@+id/add_sp" | android:id="@+id/add_sp" | ||||
android:layout_width="100dp" | android:layout_width="100dp" | ||||
android:layout_height="26dp" | |||||
android:layout_height="30dp" | |||||
android:layout_marginTop="10dp" | android:layout_marginTop="10dp" | ||||
android:layout_marginBottom="10dp" | android:layout_marginBottom="10dp" | ||||
android:layout_marginRight="20dp" | android:layout_marginRight="20dp" | ||||
@@ -38,7 +38,47 @@ | |||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:focusable="true" | android:focusable="true" | ||||
/> | /> | ||||
<TextView | |||||
android:layout_marginLeft="@dimen/dp_10" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="match_parent" | |||||
android:text="关闭补水延迟(s):" | |||||
android:textAlignment="center" /> | |||||
<EditText | |||||
android:layout_marginLeft="20dp" | |||||
android:id="@+id/edittext_ycsj" | |||||
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" | |||||
android:text="0.0"/> | |||||
</LinearLayout> | |||||
<LinearLayout | |||||
android:layout_centerInParent="true" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:orientation="horizontal"> | |||||
</LinearLayout> | </LinearLayout> | ||||
<Button | |||||
android:layout_marginLeft="285dp" | |||||
android:id="@+id/save_time" | |||||
android:layout_width="110dp" | |||||
android:layout_height="40dp" | |||||
android:layout_alignParentLeft="true" | |||||
android:background="@drawable/bg_btn_login_selected" | |||||
android:text="保存" | |||||
android:textColor="@color/white" | |||||
android:textSize="14dp" /> | |||||
</LinearLayout> | </LinearLayout> | ||||
<!-- 物料信息管理 --> | <!-- 物料信息管理 --> | ||||
@@ -48,7 +48,7 @@ | |||||
android:id="@+id/button_item" | android:id="@+id/button_item" | ||||
android:layout_width="60dp" | android:layout_width="60dp" | ||||
android:layout_centerVertical="true" | android:layout_centerVertical="true" | ||||
android:layout_height="20dp" | |||||
android:layout_height="30dp" | |||||
android:layout_marginLeft="20dp" | android:layout_marginLeft="20dp" | ||||
android:background="@drawable/button" | android:background="@drawable/button" | ||||
android:focusable="false" | android:focusable="false" | ||||
@@ -59,7 +59,7 @@ | |||||
android:id="@+id/button_add" | android:id="@+id/button_add" | ||||
android:layout_width="80dp" | android:layout_width="80dp" | ||||
android:layout_centerVertical="true" | android:layout_centerVertical="true" | ||||
android:layout_height="20dp" | |||||
android:layout_height="30dp" | |||||
android:layout_marginLeft="100dp" | android:layout_marginLeft="100dp" | ||||
android:background="@drawable/button1" | android:background="@drawable/button1" | ||||
android:focusable="false" | android:focusable="false" | ||||
@@ -16,7 +16,7 @@ | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="0dp" | android:layout_height="0dp" | ||||
android:layout_weight="1"> | |||||
android:layout_weight="1.1"> | |||||
<androidx.recyclerview.widget.RecyclerView | <androidx.recyclerview.widget.RecyclerView | ||||
android:id="@+id/Recy_Lsjy" | android:id="@+id/Recy_Lsjy" | ||||
@@ -40,7 +40,6 @@ | |||||
android:layout_weight="1"> | android:layout_weight="1"> | ||||
<LinearLayout | <LinearLayout | ||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:layout_centerHorizontal="true" | android:layout_centerHorizontal="true" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content"> | android:layout_height="wrap_content"> | ||||
@@ -61,15 +60,15 @@ | |||||
</LinearLayout> | </LinearLayout> | ||||
<LinearLayout | <LinearLayout | ||||
android:layout_marginTop="50dp" | |||||
android:layout_marginTop="40dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content"> | android:layout_height="wrap_content"> | ||||
<TextView | <TextView | ||||
android:layout_marginLeft="@dimen/dp_10" | android:layout_marginLeft="@dimen/dp_10" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:text="通道校准:" | |||||
android:textSize="20dp"/> | |||||
android:text="校准:" | |||||
android:textSize="16dp"/> | |||||
<LinearLayout | <LinearLayout | ||||
android:layout_marginLeft="@dimen/dp_10" | android:layout_marginLeft="@dimen/dp_10" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
@@ -152,8 +151,8 @@ | |||||
</LinearLayout> | </LinearLayout> | ||||
<ImageView | <ImageView | ||||
android:layout_marginLeft="20dp" | |||||
android:layout_marginRight="20dp" | |||||
android:layout_marginLeft="10dp" | |||||
android:layout_marginRight="10dp" | |||||
android:layout_marginTop="30dp" | android:layout_marginTop="30dp" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
@@ -183,8 +182,8 @@ | |||||
</LinearLayout> | </LinearLayout> | ||||
<ImageView | <ImageView | ||||
android:layout_marginLeft="20dp" | |||||
android:layout_marginRight="20dp" | |||||
android:layout_marginLeft="10dp" | |||||
android:layout_marginRight="10dp" | |||||
android:layout_marginTop="30dp" | android:layout_marginTop="30dp" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
@@ -209,8 +208,8 @@ | |||||
</LinearLayout> | </LinearLayout> | ||||
<ImageView | <ImageView | ||||
android:layout_marginLeft="20dp" | |||||
android:layout_marginRight="20dp" | |||||
android:layout_marginLeft="10dp" | |||||
android:layout_marginRight="10dp" | |||||
android:layout_marginTop="30dp" | android:layout_marginTop="30dp" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
@@ -296,15 +295,15 @@ | |||||
</LinearLayout> | </LinearLayout> | ||||
<LinearLayout | <LinearLayout | ||||
android:layout_marginTop="160dp" | |||||
android:layout_marginTop="140dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content"> | android:layout_height="wrap_content"> | ||||
<TextView | <TextView | ||||
android:layout_marginLeft="@dimen/dp_10" | android:layout_marginLeft="@dimen/dp_10" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:text="模拟出料:" | |||||
android:textSize="20dp"/> | |||||
android:text="出料:" | |||||
android:textSize="16dp"/> | |||||
<LinearLayout | <LinearLayout | ||||
android:layout_marginLeft="@dimen/dp_10" | android:layout_marginLeft="@dimen/dp_10" | ||||
@@ -325,8 +324,8 @@ | |||||
</LinearLayout> | </LinearLayout> | ||||
<ImageView | <ImageView | ||||
android:layout_marginLeft="20dp" | |||||
android:layout_marginRight="20dp" | |||||
android:layout_marginLeft="10dp" | |||||
android:layout_marginRight="10dp" | |||||
android:layout_marginTop="30dp" | android:layout_marginTop="30dp" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
@@ -355,8 +354,8 @@ | |||||
</LinearLayout> | </LinearLayout> | ||||
<ImageView | <ImageView | ||||
android:layout_marginLeft="20dp" | |||||
android:layout_marginRight="20dp" | |||||
android:layout_marginLeft="10dp" | |||||
android:layout_marginRight="10dp" | |||||
android:layout_marginTop="30dp" | android:layout_marginTop="30dp" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
@@ -398,8 +397,8 @@ | |||||
</LinearLayout> | </LinearLayout> | ||||
<ImageView | <ImageView | ||||
android:layout_marginLeft="20dp" | |||||
android:layout_marginRight="20dp" | |||||
android:layout_marginLeft="10dp" | |||||
android:layout_marginRight="10dp" | |||||
android:layout_marginTop="30dp" | android:layout_marginTop="30dp" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
@@ -15,13 +15,13 @@ | |||||
android:id="@+id/bt_add_zdqx" | android:id="@+id/bt_add_zdqx" | ||||
android:layout_width="200dp" | android:layout_width="200dp" | ||||
android:layout_height="40dp" | android:layout_height="40dp" | ||||
android:layout_marginTop="20dp" | |||||
android:layout_marginTop="10dp" | |||||
android:background="@drawable/bg_btn_login_selected" | android:background="@drawable/bg_btn_login_selected" | ||||
android:text="增加流程" | android:text="增加流程" | ||||
android:textColor="@color/white" | android:textColor="@color/white" | ||||
android:textSize="20dp" /> | android:textSize="20dp" /> | ||||
<androidx.recyclerview.widget.RecyclerView | <androidx.recyclerview.widget.RecyclerView | ||||
android:layout_marginTop="80dp" | |||||
android:layout_marginTop="60dp" | |||||
android:id="@+id/Recy_zdqx" | android:id="@+id/Recy_zdqx" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
@@ -99,7 +99,7 @@ | |||||
android:visibility="gone"/> | android:visibility="gone"/> | ||||
<LinearLayout | <LinearLayout | ||||
android:layout_marginLeft="130dp" | |||||
android:layout_marginLeft="10dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_alignParentBottom="true"> | android:layout_alignParentBottom="true"> | ||||
@@ -6,7 +6,10 @@ | |||||
android:background="@color/dialogbj"> | android:background="@color/dialogbj"> | ||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_margin="50dp" | |||||
android:layout_marginLeft="50dp" | |||||
android:layout_marginRight="50dp" | |||||
android:layout_marginTop="10dp" | |||||
android:layout_marginBottom="10dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:background="@drawable/common_bg_with_radius_and_border"> | android:background="@drawable/common_bg_with_radius_and_border"> | ||||
@@ -25,7 +28,7 @@ | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_marginTop="46dp" | android:layout_marginTop="46dp" | ||||
android:layout_marginBottom="50dp" | |||||
android:layout_marginBottom="55dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent"> | android:layout_height="match_parent"> | ||||
@@ -147,7 +150,7 @@ | |||||
<!--物料类型--> | <!--物料类型--> | ||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_marginTop="10dp" | |||||
android:layout_marginTop="0dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent"> | android:layout_height="match_parent"> | ||||
@@ -174,8 +177,8 @@ | |||||
<Button | <Button | ||||
android:layout_alignParentBottom="true" | android:layout_alignParentBottom="true" | ||||
android:id="@+id/xinjian" | android:id="@+id/xinjian" | ||||
android:layout_width="120dp" | |||||
android:layout_height="35dp" | |||||
android:layout_width="200dp" | |||||
android:layout_height="40dp" | |||||
android:layout_centerHorizontal="true" | android:layout_centerHorizontal="true" | ||||
android:layout_marginBottom="@dimen/dp_10" | android:layout_marginBottom="@dimen/dp_10" | ||||
android:background="@drawable/bg_btn_login_selected" | android:background="@drawable/bg_btn_login_selected" | ||||
@@ -9,7 +9,7 @@ | |||||
android:layout_centerInParent="true" | android:layout_centerInParent="true" | ||||
android:layout_margin="50dp" | android:layout_margin="50dp" | ||||
android:layout_width="500dp" | android:layout_width="500dp" | ||||
android:layout_height="600dp" | |||||
android:layout_height="700dp" | |||||
android:background="@drawable/common_bg_with_radius_and_border"> | android:background="@drawable/common_bg_with_radius_and_border"> | ||||
<Button | <Button | ||||
@@ -75,7 +75,7 @@ | |||||
android:id="@+id/datatab_makesx" | android:id="@+id/datatab_makesx" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_marginTop="40dp"/> | |||||
android:layout_marginTop="10dp"/> | |||||
</RelativeLayout> | </RelativeLayout> | ||||
</LinearLayout> | </LinearLayout> | ||||
@@ -86,10 +86,11 @@ | |||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:orientation="horizontal"> | android:orientation="horizontal"> | ||||
<TextView | <TextView | ||||
android:layout_marginLeft="20dp" | |||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:text="订单总数" | |||||
android:textSize="19dp"/> | |||||
android:text="今日制作" | |||||
android:textSize="24dp"/> | |||||
<TextView | <TextView | ||||
android:id="@+id/chubeiliang" | android:id="@+id/chubeiliang" | ||||
@@ -7,7 +7,7 @@ | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_centerInParent="true" | android:layout_centerInParent="true" | ||||
android:layout_margin="50dp" | |||||
android:layout_margin="10dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:background="@drawable/common_bg_with_radius_and_border"> | android:background="@drawable/common_bg_with_radius_and_border"> | ||||
@@ -42,7 +42,7 @@ | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_marginTop="46dp" | android:layout_marginTop="46dp" | ||||
android:layout_marginBottom="50dp" | |||||
android:layout_marginBottom="55dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent"> | android:layout_height="match_parent"> | ||||
@@ -86,7 +86,8 @@ | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | <com.qmuiteam.qmui.widget.textview.QMUILinkTextView | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:text="配方名称:"/> | |||||
android:text="配方名称:" | |||||
android:textSize="16dp"/> | |||||
<!--账号输入框--> | <!--账号输入框--> | ||||
<EditText | <EditText | ||||
android:id="@+id/edittext" | android:id="@+id/edittext" | ||||
@@ -98,7 +99,7 @@ | |||||
android:inputType="text" | android:inputType="text" | ||||
android:maxLines="1" | android:maxLines="1" | ||||
android:padding="3dp" | android:padding="3dp" | ||||
android:textSize="12dp" /> | |||||
android:textSize="16dp" /> | |||||
</LinearLayout> | </LinearLayout> | ||||
@@ -111,8 +112,7 @@ | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_width="0dp" | android:layout_width="0dp" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_weight="1.5"> | |||||
android:layout_weight="1"> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="300dp"> | android:layout_height="300dp"> | ||||
@@ -236,8 +236,8 @@ | |||||
<Button | <Button | ||||
android:layout_alignParentBottom="true" | android:layout_alignParentBottom="true" | ||||
android:id="@+id/peifang_queren" | android:id="@+id/peifang_queren" | ||||
android:layout_width="120dp" | |||||
android:layout_height="35dp" | |||||
android:layout_width="200dp" | |||||
android:layout_height="40dp" | |||||
android:layout_centerHorizontal="true" | android:layout_centerHorizontal="true" | ||||
android:layout_marginBottom="@dimen/dp_10" | android:layout_marginBottom="@dimen/dp_10" | ||||
android:background="@drawable/bg_btn_login_selected" | android:background="@drawable/bg_btn_login_selected" | ||||
@@ -7,9 +7,9 @@ | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_centerInParent="true" | android:layout_centerInParent="true" | ||||
android:layout_margin="50dp" | |||||
android:layout_margin="20dp" | |||||
android:layout_width="400dp" | android:layout_width="400dp" | ||||
android:layout_height="600dp" | |||||
android:layout_height="800dp" | |||||
android:background="@drawable/common_bg_with_radius_and_border"> | android:background="@drawable/common_bg_with_radius_and_border"> | ||||
<Button | <Button | ||||
@@ -36,7 +36,7 @@ | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_marginTop="46dp" | android:layout_marginTop="46dp" | ||||
android:layout_marginBottom="50dp" | |||||
android:layout_marginBottom="55dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent"> | android:layout_height="match_parent"> | ||||
@@ -179,8 +179,8 @@ | |||||
<Button | <Button | ||||
android:layout_alignParentBottom="true" | android:layout_alignParentBottom="true" | ||||
android:id="@+id/xinjianpeifang" | android:id="@+id/xinjianpeifang" | ||||
android:layout_width="120dp" | |||||
android:layout_height="35dp" | |||||
android:layout_width="200dp" | |||||
android:layout_height="40dp" | |||||
android:layout_centerHorizontal="true" | android:layout_centerHorizontal="true" | ||||
android:layout_marginBottom="@dimen/dp_10" | android:layout_marginBottom="@dimen/dp_10" | ||||
android:background="@drawable/bg_btn_login_selected" | android:background="@drawable/bg_btn_login_selected" | ||||
@@ -64,7 +64,7 @@ | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_marginBottom="@dimen/dp_10" | android:layout_marginBottom="@dimen/dp_10" | ||||
android:paddingTop="@dimen/dp_10" | |||||
android:paddingTop="5dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_marginTop="5dp"> | android:layout_marginTop="5dp"> | ||||
@@ -73,7 +73,7 @@ | |||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_marginLeft="10dp" | android:layout_marginLeft="10dp" | ||||
android:textSize="12dp" | |||||
android:textSize="16dp" | |||||
android:textColor="@color/light_blue_primary" | android:textColor="@color/light_blue_primary" | ||||
android:text="保存"/> | android:text="保存"/> | ||||
<TextView | <TextView | ||||
@@ -81,7 +81,7 @@ | |||||
android:layout_marginRight="20dp" | android:layout_marginRight="20dp" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:textSize="12dp" | |||||
android:textSize="16dp" | |||||
android:layout_alignParentRight="true" | android:layout_alignParentRight="true" | ||||
android:textColor="@color/red_primary_dark" | android:textColor="@color/red_primary_dark" | ||||
android:text="删除"/> | android:text="删除"/> | ||||