# Conflicts: # app/src/main/java/com/bonait/bnframework/ui/fragment/goods/LocalGoodsFragment.java # app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateDataService.java # app/src/main/java/com/bonait/bnframework/ui/widget/WaitProcessUtil.java授权码生成工具
@@ -1205,14 +1205,15 @@ public class ConfigData { | |||
processTS = ConfigName.getInstance().Process_大炒; | |||
} else if (ConfigName.getInstance().versionSelectionEnum.equals("大炒自动投料版本")) { | |||
plcaddresses = ConfigName.getInstance().PlcAddress_大炒自动投料; | |||
switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
processTS = ConfigName.getInstance().Process_大炒自动投料; | |||
/*switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
case "en": | |||
processTS = ConfigName.getInstance().Process_大炒自动投料_en; | |||
break; | |||
case "zh": | |||
processTS = ConfigName.getInstance().Process_大炒自动投料; | |||
break; | |||
} | |||
}*/ | |||
} else if (ConfigName.getInstance().versionSelectionEnum.equals("小炒版本")) { | |||
plcaddresses = ConfigName.getInstance().PlcAddress_小炒; | |||
processTS = ConfigName.getInstance().Process_小炒; | |||
@@ -1258,14 +1259,15 @@ public class ConfigData { | |||
processTS = ConfigName.getInstance().Process_大炒; | |||
} else if (ConfigName.getInstance().versionSelectionEnum.equals("大炒自动投料版本")) { | |||
plcaddresses = ConfigName.getInstance().PlcAddress_大炒自动投料; | |||
switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
processTS = ConfigName.getInstance().Process_大炒自动投料; | |||
/*switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
case "en": | |||
processTS = ConfigName.getInstance().Process_大炒自动投料_en; | |||
break; | |||
case "zh": | |||
processTS = ConfigName.getInstance().Process_大炒自动投料; | |||
break; | |||
} | |||
}*/ | |||
} else if (ConfigName.getInstance().versionSelectionEnum.equals("小炒版本")) { | |||
plcaddresses = ConfigName.getInstance().PlcAddress_小炒; | |||
@@ -274,7 +274,7 @@ public class MainInit { | |||
} | |||
} | |||
} | |||
ConfigData.getInstance().RevertPLCProcess(); | |||
if(QueryDB.GetPlcaddressALL().size()<=0) | |||
{ | |||
ConfigData.getInstance().RevertPLCProcess(); | |||
@@ -2,6 +2,7 @@ package com.bonait.bnframework.common.constant; | |||
import android.app.Application; | |||
import android.content.Context; | |||
import android.widget.Switch; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.db.mode.BPA_PLCADDRESS; | |||
@@ -19,6 +20,7 @@ import com.bonait.bnframework.common.utils.ScreenUtils; | |||
import java.util.ArrayList; | |||
import java.util.Arrays; | |||
import java.util.Dictionary; | |||
import java.util.HashMap; | |||
import java.util.LinkedHashMap; | |||
import java.util.List; | |||
@@ -730,6 +732,152 @@ public class ConfigName { | |||
add(new Res_PLCADDRESS("搅拌电机", "VW350", 1, 0)); | |||
add(new Res_PLCADDRESS("翻转电机", "VW352", 1, 0)); | |||
add(new Res_PLCADDRESS("炒锅", "VW354", 1, 0)); | |||
}}; | |||
public static String getKeyByValue(ConcurrentHashMap<String, String> map, String value) { | |||
for (Map.Entry<String, String> entry : map.entrySet()) { | |||
if (entry.getValue().equals(value)) { | |||
return entry.getKey(); // 返回第一个找到的键 | |||
} | |||
} | |||
return null; // 如果没有找到,返回 null | |||
} | |||
/** | |||
* 大炒自动投料工序模型-中英文资源字典 | |||
*/ | |||
public ConcurrentHashMap<String,String> Process_info = new ConcurrentHashMap<String,String>(){{ | |||
put("搅拌","Stir"); | |||
put("位置","Possition"); | |||
put("加热","Heat"); | |||
put("主料","Material"); | |||
put("液体料","Liquor"); | |||
put("并行出料","Parallel Pour"); | |||
put("延迟","Delay"); | |||
put("出菜","Serve"); | |||
put("清洗","Clean"); | |||
put("搅拌速度","Stirring Rate"); | |||
put("延迟(秒)","Delay(s)"); | |||
put("转动速度","Turn Rate"); | |||
put("位置动作","Move"); | |||
put("加热功率","Heat Power"); | |||
put("主料名称","Name"); | |||
put("主料位置","Main Possition"); | |||
put("主料重量","Weight"); | |||
put("投料动作","Input Move"); | |||
put("炒制位置","Fry Bit"); | |||
put("烹饪(秒)","Cook(s)"); | |||
put("出料克数","Gram Weight"); | |||
put("等待(秒)","Wait(s)"); | |||
put("清洗方式","Way"); | |||
put("抽水量","Weight"); | |||
put("正转反转、一直正转、一直反转","Positive&Negative、Positive、Negative"); | |||
put("原点位、出餐启动、倒菜位、抽料位、清洗位、炒菜位1、炒菜位2、炒菜位3","Origin、Pour-start、Pour、Extract、Clean、Fry1、Fry2、Fry3"); | |||
put("1号位、2号位、3号位、4号位","1 Bit、2 Bit、3 Bit、4 Bit"); | |||
put("炒菜位1、炒菜位2、炒菜位3、原点位","Fry1、Fry2、Fry3、Origin"); | |||
put("投出等待三秒、直接投出、手动投料","Wait 3s、Direct Throw、Manual Throw"); | |||
put("停止、最低、低速、中速、高速、最高、极高","Stop、Lowest、Low、Middle、High、Highest、Extreme"); | |||
put( "停止、一档、二档、三档、四档、五档、六档、七档、八档","Stop、1Gear、2Gear、3Gear、4Gear、5Gear、6Gear、7Gear、8Gear"); | |||
put( "一般清洗、深度清洗","Normal、Depth"); | |||
put("一般清洗","Normal"); | |||
put("深度清洗","Depth"); | |||
put("正转反转","Positive&Negative"); | |||
put("一直正转","Positive"); | |||
put("一直反转","Negative"); | |||
put("原点位","Origin"); | |||
put("出餐启动","Pour-start"); | |||
put("倒菜位","Pour"); | |||
put("抽料位","Extract"); | |||
put("清洗位","Clean"); | |||
put("炒菜位1","Fry1"); | |||
put("炒菜位2","Fry2"); | |||
put("炒菜位3","Fry3"); | |||
put("1号位","1 Bit"); | |||
put("2号位","2 Bit"); | |||
put("3号位","3 Bit"); | |||
put("4号位","4 Bit"); | |||
put("投出等待三秒","Wait 3s"); | |||
put("直接投出","Direct Throw"); | |||
put("手动投料","Manual Throw"); | |||
put("停止","Stop"); | |||
put("最低","Lowest"); | |||
put("低速","Low"); | |||
put("中速","Middle"); | |||
put("高速","High"); | |||
put("最高","Highest"); | |||
put("极高","Extreme"); | |||
put("一档","1Gear"); | |||
put("二档","2Gear"); | |||
put("三档","3Gear"); | |||
put("四档","4Gear"); | |||
put("五档","5Gear"); | |||
put("六档","6Gear"); | |||
put("七档","7Gear"); | |||
put("八档","8Gear"); | |||
}}; | |||
public ConcurrentHashMap<String,String> Process_info_en = new ConcurrentHashMap<String,String>(){{ | |||
put("Positive&Negative","正转反转"); | |||
put("Positive","一直正转"); | |||
put("Negative","一直反转"); | |||
put("Origin","原点位"); | |||
put("Pour-start","出餐启动"); | |||
put("Pour","倒菜位"); | |||
put("Extract","抽料位"); | |||
put("Clean","清洗位"); | |||
put("Fry1","炒菜位1"); | |||
put("Fry2","炒菜位2"); | |||
put("Fry3","炒菜位3"); | |||
put("1 Bit","1号位"); | |||
put("2 Bit","2号位"); | |||
put("3 Bit","3号位"); | |||
put("4 Bit","4号位"); | |||
put("Wait 3s","投出等待三秒"); | |||
put("Direct Throw","直接投出"); | |||
put("Manual Throw","手动投料"); | |||
put("Stop","停止"); | |||
put("Lowest","最低"); | |||
put("Low","低速"); | |||
put("Middle","中速"); | |||
put("High","高速"); | |||
put("Highest","最高"); | |||
put("Extreme","极高"); | |||
put("1Gear","一档"); | |||
put("2Gear","二档"); | |||
put("3Gear","三档"); | |||
put("4Gear","四档"); | |||
put("5Gear","五档"); | |||
put("6Gear","六档"); | |||
put("7Gear","七档"); | |||
put("8Gear","八档"); | |||
put("Normal","一般清洗"); | |||
put("Depth","深度清洗"); | |||
put("Stir","搅拌"); | |||
put("Possition","位置"); | |||
put("Heat","加热"); | |||
put("Material","主料"); | |||
put("Liquor","液体料"); | |||
put("Parallel Pour","并行出料"); | |||
put("Delay","延迟"); | |||
put("Serve Dishes","出菜"); | |||
put("Clean","清洗"); | |||
put("Stirring Rate","搅拌速度"); | |||
put("Delay(s)","延迟(秒)"); | |||
put("Turn Rate","转动速度"); | |||
put("Move","位置动作"); | |||
put("Heat Power","加热功率"); | |||
put("Name","主料名称"); | |||
put("Main Possition","主料位置"); | |||
put("Weight","主料重量"); | |||
put("Input Move","投料动作"); | |||
put("Fry Bit","炒制位置"); | |||
put("Cook(s)","烹饪(秒)"); | |||
put("Gram Weight","出料克数"); | |||
put("Wait(s)","等待(秒)"); | |||
put("Way","清洗方式"); | |||
put("Weight","抽水量"); | |||
}}; | |||
/** | |||
* 大炒自动投料工序模型 | |||
@@ -745,21 +893,6 @@ public class ConfigName { | |||
add(new ProcessT("出菜", Arrays.asList("等待(秒)"))); | |||
add(new ProcessT("清洗", Arrays.asList("清洗方式","抽水量","等待(秒)"))); | |||
}}; | |||
/** | |||
* 大炒自动投料工序模型 | |||
*/ | |||
public List<ProcessT> Process_大炒自动投料_en = new ArrayList<ProcessT>() {{ | |||
add(new ProcessT("Stir", Arrays.asList("Stirring Rate", "Delay(s)"))); | |||
add(new ProcessT("Possition", Arrays.asList("Turn Rate", "Move", "Delay(s)"))); | |||
add(new ProcessT("Heat", Arrays.asList("Heat Power", "Delay(s)"))); | |||
add(new ProcessT("Material", Arrays.asList("Name", "Main Possition", "Weight", "Input Move","Fry Bit","Cook(s)"))); | |||
add(new ProcessT("Liquor", new ArrayList<>())); | |||
add(new ProcessT("Parallel Pour", Arrays.asList("Gram Weight","Delay(s)"))); | |||
add(new ProcessT("Delay", Arrays.asList("Delay(s)"))); | |||
add(new ProcessT("Serve Dishes", Arrays.asList("Delay(s)"))); | |||
add(new ProcessT("Clean", Arrays.asList("Way","Weight","Delay(s)"))); | |||
}}; | |||
/** | |||
* 小炒基础PLC模型 | |||
@@ -1362,49 +1495,23 @@ public class ConfigName { | |||
*/ | |||
public static String GetProcessTypeVal(String item) { | |||
String data = ""; | |||
switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
case "en": | |||
if (item.equals("FryMove")) { | |||
data = "Positive&negative、Positive、negative"; | |||
} else if (item.equals("Move")) { | |||
data = "Origin、Maintain、Pour、Extract、Clean、Fry1、Fry2、Fry3"; | |||
} else if (item.equals("Fry Bit")) { | |||
data = "Fry1、Fry2、Fry3、Origin"; | |||
}else if (item.equals("Input Move")) { | |||
//data = "投出抖动三次、投出等待三秒、直接投出、手动投料"; | |||
data = "Wait 3s、Direct Throw、Manual Throw"; | |||
}else if (item.equals("Way")) { | |||
data = "Normal、Depth"; | |||
} | |||
else if (item.equals("Main Possition")) { | |||
data = "1Bit、2Bit、3Bit、4Bit"; | |||
} else if (item.equals("Positive") || item.equals("negative") || item.equals("Stirring Rate") || item.equals("Turn Rate")) { | |||
data = "Stop、Lowest、Low、Middle、High、Highest、Extreme"; | |||
} else if (item.equals("Heat Power") || item.equals("热锅功率")) { | |||
data = "Stop、1Gear、2Gear、3Gear、4Gear、5Gear、6Gear、7Gear、8Gear"; | |||
} | |||
break; | |||
case "zh": | |||
if (item.equals("搅拌动作")) { | |||
data = "正转反转、一直正转、一直反转"; | |||
} else if (item.equals("位置动作")) { | |||
data = "原点位、出餐启动、倒菜位、抽料位、清洗位、炒菜位1、炒菜位2、炒菜位3"; | |||
} else if (item.equals("炒制位置")) { | |||
data = "炒菜位1、炒菜位2、炒菜位3、原点位"; | |||
}else if (item.equals("投料动作")) { | |||
//data = "投出抖动三次、投出等待三秒、直接投出、手动投料"; | |||
data = "投出等待三秒、直接投出、手动投料"; | |||
}else if (item.equals("清洗方式")) { | |||
data = "一般清洗、深度清洗"; | |||
} | |||
else if (item.equals("主料位置")) { | |||
data = "1号位、2号位、3号位、4号位"; | |||
} else if (item.equals("正转速度") || item.equals("反转速度") || item.equals("转动速度") || item.equals("搅拌速度")) { | |||
data = "停止、最低、低速、中速、高速、最高、极高"; | |||
} else if (item.equals("加热功率") || item.equals("热锅功率")) { | |||
data = "停止、一档、二档、三档、四档、五档、六档、七档、八档"; | |||
} | |||
break; | |||
if (item.equals("搅拌动作")) { | |||
data = "正转反转、一直正转、一直反转"; | |||
} else if (item.equals("位置动作")) { | |||
data = "原点位、出餐启动、倒菜位、抽料位、清洗位、炒菜位1、炒菜位2、炒菜位3"; | |||
} else if (item.equals("炒制位置")) { | |||
data = "炒菜位1、炒菜位2、炒菜位3、原点位"; | |||
} else if (item.equals("投料动作")) { | |||
//data = "投出抖动三次、投出等待三秒、直接投出、手动投料"; | |||
data = "投出等待三秒、直接投出、手动投料"; | |||
} else if (item.equals("清洗方式")) { | |||
data = "一般清洗、深度清洗"; | |||
} else if (item.equals("主料位置")) { | |||
data = "1号位、2号位、3号位、4号位"; | |||
} else if (item.equals("正转速度") || item.equals("反转速度") || item.equals("转动速度") || item.equals("搅拌速度")) { | |||
data = "停止、最低、低速、中速、高速、最高、极高"; | |||
} else if (item.equals("加热功率") || item.equals("热锅功率")) { | |||
data = "停止、一档、二档、三档、四档、五档、六档、七档、八档"; | |||
} | |||
return data; | |||
} | |||
@@ -301,7 +301,7 @@ public class BatchSync { | |||
} | |||
} | |||
if(CompleteCount==goods.size()) { | |||
WaitDialog.TimeOut("商品同步完成!成功:"+CompleteCount+",失败:"+FaultCount); | |||
WaitDialog.TimeOut("商品同步完成!成功:"+CompleteCount+",失败:"+FaultCount,"Synchronous products successfully!Success:"+CompleteCount+",Fail:"+FaultCount); | |||
Log.i("sync", "商品同步完成!成功:"+CompleteCount+",失败:"+FaultCount); | |||
} | |||
else{ | |||
@@ -309,7 +309,7 @@ public class BatchSync { | |||
for (String error:FaultGoodName){ | |||
sb.append(error).append("、"); | |||
} | |||
WaitDialog.TimeOut("商品同步完成!成功:"+CompleteCount+",失败:"+FaultCount+"\r\n \r\n失败商品:"+sb.toString().substring(0,sb.toString().length()-1)); | |||
WaitDialog.TimeOut("商品同步完成!成功:"+CompleteCount+",失败:"+FaultCount+"\r\n \r\n失败商品:"+sb.toString().substring(0,sb.toString().length()-1),"Synchronous products successfully!Success:"+CompleteCount+",Fail:"+FaultCount+"\r\n \r\nProducts:"+sb.toString().substring(0,sb.toString().length()-1)); | |||
Log.i("sync", "商品同步完成!成功:"+CompleteCount+",失败:"+FaultCount+"\r\n \r\n失败商品:"+sb.toString().substring(0,sb.toString().length()-1)); | |||
} | |||
} | |||
@@ -46,7 +46,22 @@ public class WaitDialog { | |||
} | |||
} | |||
public static void TimeOut(String info,String info_en){ | |||
if(activity==null) return; | |||
if(progressDialog==null) return; | |||
activity.runOnUiThread(()->{ progressDialog.dismiss();}); | |||
activity.runOnUiThread(()->{ | |||
AlertDialogUtils.showDialog(context, "提示", info,"Tips",info_en, new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
context=null; | |||
activity=null; | |||
dialog.dismiss(); | |||
} | |||
}); | |||
}); | |||
} | |||
public static void TimeOut(String info){ | |||
if(activity==null) return; | |||
if(progressDialog==null) return; | |||
@@ -101,8 +101,10 @@ public abstract class FileProgressDialogCallBack extends FileCallback { | |||
private void initDialog(final Context context) { | |||
if (NetworkUtils.isActiveNetworkMobile(context)) { | |||
String title = "温馨提示!"; | |||
String title_en = "Tips"; | |||
String message_en = "The current network is a mobile network, which may consume a lot of mobile traffic data, are you sure to download it?"; | |||
String message = "当前网络为移动网络,可能会消耗大量移动流量数据,确定要下载吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,title_en,message_en, new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
downloadingDialog(context); | |||
@@ -98,7 +98,7 @@ public abstract class FileProgressDialogCallBack2 extends FileCallback2 { | |||
if (NetworkUtils.isActiveNetworkMobile(context)) { | |||
String title = "温馨提示!"; | |||
String message = "当前网络为移动网络,可能会消耗大量移动流量数据,确定要下载吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Tips","The current network is a mobile network, which may consume a lot of mobile traffic data, are you sure to download it?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
downloadingDialog(context, totalSize); | |||
@@ -1,6 +1,7 @@ | |||
package com.bonait.bnframework.common.utils; | |||
import android.content.Context; | |||
import android.provider.ContactsContract; | |||
import android.view.View; | |||
import android.widget.TextView; | |||
@@ -75,6 +76,32 @@ public class AlertDialogUtils { | |||
.addAction("确定", onClickListener) | |||
.create(mCurrentDialogStyle).show(); | |||
} | |||
/** | |||
* 对话框,有取消确定按钮 | |||
* */ | |||
public static void showDialog(Context context, String title, String message,String title_en,String message_en, QMUIDialogAction.ActionListener onClickListener) { | |||
switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
case "en": | |||
title = title_en; | |||
message = message_en; | |||
break; | |||
case "zh": | |||
break; | |||
} | |||
new QMUIDialog.MessageDialogBuilder(context) | |||
.setCancelable(false) | |||
.setTitle(title) | |||
.setMessage(message) | |||
.setCanceledOnTouchOutside(false) | |||
.addAction(ConfigName.getInstance().app.getString(R.string.btn_cancel), new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
dialog.dismiss(); | |||
} | |||
}) | |||
.addAction(ConfigName.getInstance().app.getString(R.string.tip_save_confirm), onClickListener) | |||
.create(mCurrentDialogStyle).show(); | |||
} | |||
/** | |||
* 对话框,自定义确定按钮 | |||
@@ -128,7 +128,7 @@ public class good_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||
//按钮点击 | |||
String title = "删除菜品操作提示!"; | |||
String message = "请问客官确定要删除[" + name + "]菜品吗?"; | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message,"Remove menu prompts","Are you sure you want to delete the dishes[" + name + "]?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
if (mListener != null) { | |||
@@ -148,7 +148,7 @@ public class good_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||
//按钮点击 | |||
String title = "收藏菜品操作提示!"; | |||
String message = "请问客官确定要[" + (myViewHolder.IsSC ? "取消收藏" : "收藏") + "]菜品吗?"; | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message,"Collection dishes operation tips", "Are you sure to[" + (myViewHolder.IsSC ? "uncollect" : "collect") + "] dishes?",new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
myViewHolder.IsSC = !myViewHolder.IsSC; | |||
@@ -65,7 +65,7 @@ public class image_sp_adapter extends RecyclerView.Adapter<RecyclerView.ViewHold | |||
//按钮点击 | |||
String title = "选择菜品操作提示!"; | |||
String message = "请问客官确定要选择该图片吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Select dishes operation tips","Are you sure you want to choose this picture?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
if(mListener!=null) | |||
@@ -222,7 +222,7 @@ public class lc_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { | |||
//按钮点击 | |||
String title = "料仓操作提示!"; | |||
String message = "请问客官确定要将["+lcModes.get(index).materialName+"]加满吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Bunker operation tips","Are you sure you want to fill["+lcModes.get(index).materialName+"]up?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
DataBus.getInstance().TopUp(index); | |||
@@ -66,7 +66,7 @@ public class sp_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { | |||
//按钮点击 | |||
String title = "选择菜品操作提示!"; | |||
String message = "请问客官确定要选择["+goods.get(position).name+"],开始制作吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message, "Select dishes operation tips","Is the guest sure to select ["+goods.get(position).name+"] and start production?",new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
if(mListener!=null) | |||
@@ -207,7 +207,7 @@ public class Home1Fragment extends BaseFragment { | |||
ExecuteTheRecipe.MakeStatus = false; | |||
mTopBar.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.app_color_theme_4)); | |||
mTopBar.setTitle("菜谱烹饪"); | |||
mTopBar.setTitle(getString(R.string.text_cooking)); | |||
} | |||
@@ -258,7 +258,7 @@ public class Home1Fragment extends BaseFragment { | |||
if (!IsMake(true)) { | |||
return; | |||
} | |||
gongxumiaoshu.setText("等待开始"); | |||
gongxumiaoshu.setText(getString(R.string.text_waitstart)); | |||
goodGroup = (BPA_GOODS_SUBATTRIBUTE_GROUP)data; | |||
good = GoodsDBUtil.getById(goodGroup.goodsId); | |||
SetBottonStatus(false); | |||
@@ -1042,8 +1042,10 @@ public class Home1Fragment extends BaseFragment { | |||
// return; | |||
//按钮点击 | |||
String title = "停止操作提示!"; | |||
String title_en = "Stop operation!"; | |||
String message_en ="Are you sure you want to stop production!"; | |||
String message = "请问客官确定要停止制作吗,小菠萝会生气的,啊啊啊啊啊啊啊...我的饭饭?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,title_en,message_en, new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
//强制结束 | |||
@@ -1070,8 +1072,10 @@ public class Home1Fragment extends BaseFragment { | |||
//按钮点击 | |||
String title = "开始操作提示!"; | |||
String title_en = "Start operation!"; | |||
String message_en ="Are you sure you want to start production!"; | |||
String message = "请问客官确定要开始制作吗,小菠萝好开心呀,马上就有好吃的耶?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,title_en,message_en, new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
ExecuteTheRecipe.StopForcedEnd(); | |||
@@ -102,7 +102,7 @@ public class Home4Fragment extends BaseFragment { | |||
case R.id.zhuxiaodenglu: | |||
String title = "温馨提示!"; | |||
String message = "客官确定要退出程序吗,小菠萝会想你的哦?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Tips","Are you sure you want to quit the program?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
skipToLoginActivity(); | |||
@@ -771,7 +771,7 @@ public class HomeFragmentSBKZ extends BaseFragment { | |||
*/ | |||
public void GoOutToDinner() { | |||
ExecuteTheRecipe.BottomClick("出菜"); | |||
ToastUtils.warning("出餐"); | |||
ToastUtils.warning(getString(R.string.text_servedish)); | |||
} | |||
@@ -77,7 +77,7 @@ public class BunkerSetupActivity extends BaseActivity { | |||
*/ | |||
private void initTopBar() { | |||
mTopBar.setBackgroundColor(ContextCompat.getColor(context, R.color.topbj1)); | |||
mTopBar.setTitle("料仓设置"); | |||
mTopBar.setTitle(getString(R.string.text_home_SZ)); | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui, R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
@@ -186,7 +186,7 @@ public class CookingActivity extends LinearLayout { | |||
SetReset(); | |||
SetRest1(); | |||
SetProcess(goodsGroup.maketime, 0); | |||
SetMiaoShu("等待开始..."); | |||
SetMiaoShu(ConfigName.getInstance().app.getString(R.string.text_waitstart)); | |||
runtime.setText(formatTime(goodsGroup.maketime)); | |||
if (ConfigName.getInstance().versionSelectionEnum.equals("大炒版本") || ConfigName.getInstance().versionSelectionEnum.contains("一拖")) { | |||
@@ -216,7 +216,7 @@ public class CookingActivity extends LinearLayout { | |||
* @param | |||
*/ | |||
public void SetMiaoShuTime(int time) { | |||
gongxutime.setText("预计等待:"+time+"s"); | |||
gongxutime.setText(ConfigName.getInstance().app.getString(R.string.text_expect)+time+"s"); | |||
} | |||
/** | |||
@@ -237,7 +237,7 @@ public class CookingActivity extends LinearLayout { | |||
* 复位 | |||
*/ | |||
public void SetReset() { | |||
SetMiaoShu("等待开始..."); | |||
SetMiaoShu(ConfigName.getInstance().app.getString(R.string.text_waitstart)); | |||
zanting_goodmake.SetStatus(false); | |||
zanting_goodmake.setVisibility(View.GONE); | |||
} | |||
@@ -299,7 +299,7 @@ public class CookingActivity extends LinearLayout { | |||
*/ | |||
private void initTopBar() { | |||
mTopBar.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.topbj1)); | |||
mTopBar.setTitle("菜谱烹饪"); | |||
mTopBar.setTitle(ConfigName.getInstance().app.getString(R.string.text_cooking)); | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui, R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
@@ -259,7 +259,7 @@ public class CpActivity extends BaseActivity { | |||
public void onClick(View v) { | |||
String title = "同步云端菜谱操作提示!"; | |||
String message = "请问客官确定要同步菜谱吗?此操作将完全复刻云端菜谱,本地菜谱将清除!请确认本地菜谱已上传云端!!!!"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Sync Tips","Are you sure you want to synchronize recipes? This action will completely copy the cloud recipe and the local recipe will be cleared! Make sure local recipes are uploaded to !!!!", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
@@ -536,7 +536,7 @@ public class DishTestActivity extends BaseActivity { | |||
//按钮点击 | |||
String title = "生成菜谱操作提示!"; | |||
String message = "请问客官确定要生成[" + DataBus.getInstance().ShowGoodName + "]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,"Creat recipe tips","Are you sure you want to generate the [" + DataBus.getInstance().ShowGoodName + "] recipe?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
boolean isSucess = QueryDB.GetGoodsIs(DataBus.getInstance().ShowGoodName); | |||
@@ -511,7 +511,7 @@ public class DiyActivity extends BaseActivity { | |||
//按钮点击 | |||
String title = "生成菜谱操作提示!"; | |||
String message = "请问客官确定要生成[" + name + "]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,"Create Recipe tips","Are you sure you want to generate [" + name + "] menu?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
int sc = 60 * 3; | |||
@@ -209,8 +209,10 @@ public class DiyMemoryActivity extends BaseActivity { | |||
case R.id.startbutton://启动 停止 | |||
if (isRun) { | |||
String title = "停止操作提示!"; | |||
String title_en = "Stop operation!"; | |||
String message_en ="Are you sure you want to stop production!"; | |||
String message = "请问客官确定要停止制作吗,小菠萝会生气的,啊啊啊啊啊啊啊...我的饭饭?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,title_en,message_en, new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
StopTime(); | |||
@@ -220,8 +222,10 @@ public class DiyMemoryActivity extends BaseActivity { | |||
} else { | |||
String title = "开始操作提示!"; | |||
String title_en = "Start operation!"; | |||
String message_en ="Are you sure you want to start production!"; | |||
String message = "请问客官确定要开始制作吗,小菠萝好开心呀,马上就有好吃的耶?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,title_en,message_en, new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
StartTime(); | |||
@@ -493,7 +493,7 @@ public class DiyUpdate1Activity extends BaseActivity { | |||
//按钮点击 | |||
String title = "生成菜谱操作提示!"; | |||
String message = "请问客官确定要生成[" + name1 + "]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,"Create recipe tips","Are you sure you want to generate [" + name1 + "] recipe?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
int sc = 60 * 3; | |||
@@ -545,7 +545,7 @@ public class DiyUpdate1Activity extends BaseActivity { | |||
//按钮点击 | |||
String title = "保存菜谱操作提示!"; | |||
String message = "请问客官确定要保存[" + name + "]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,"Save recipe","Are you sure you want to save the [" + name + "] recipe?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
int sc = 60 * 3; | |||
@@ -562,7 +562,7 @@ public class DiyUpdateActivity extends BaseActivity { | |||
//按钮点击 | |||
String title = "生成菜谱操作提示!"; | |||
String message = "请问客官确定要生成["+name1+"]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,"Create recipe tips","Are you sure you want to generate ["+name1+"] recipes?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
int sc=60*3; | |||
@@ -620,7 +620,7 @@ public class DiyUpdateActivity extends BaseActivity { | |||
//按钮点击 | |||
String title = "保存菜谱操作提示!"; | |||
String message = "请问客官确定要保存["+name+"]菜谱吗?"; | |||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(view.getContext(), title, message,"Save recipe","Are you sure you want to save the ["+name+"] recipe?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
int sc=60*3; | |||
@@ -389,7 +389,7 @@ public class AutoTestOneFragment extends BaseFragment { | |||
} else { | |||
String title = "停止操作提示!"; | |||
String message = "请问客官确定要运行测试吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Stop operation","Are you sure you want to run the test?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
//强制结束 | |||
@@ -117,7 +117,7 @@ public class SystemCsPLCFragment extends BaseFragment { | |||
case R.id.chushihua: | |||
String title = "温馨提示!"; | |||
String message = "客官确定要初始化PLC地址吗,小菠萝温馨提示你,此操作将会影响到实际运行哦?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Tips", "Is the guest officer sure to initialize the PLC address? Remind you that this operation will affect the actual operation?",new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
load_view.setVisibility(View.VISIBLE); | |||
@@ -236,7 +236,7 @@ public class SystemSeasoningsetFragment extends BaseFragment implements MyClickL | |||
case R.id.huifuchuchang://恢复出 | |||
String title = "温馨提示!"; | |||
String message = "客官确定要初始化PLC地址吗,小菠萝温馨提示你,此操作将会影响到实际运行哦?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Tips","Is the guest officer sure to initialize the PLC address?Remind you that this operation will affect the actual operation?",new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
ConfigData.getInstance().RevertPLCProcess(); | |||
@@ -133,7 +133,7 @@ public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter { | |||
//按钮点击 | |||
String title = "删除菜品操作提示!"; | |||
String message = "请问客官确定要删除["+name+"]菜品吗?"; | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message,"Delete recipe","Are you sure you want to delete ["+name+"] dishes?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
MessageManager.getInstance().sendMessage(MessageName.DeleteGood, ((SectionItem)section.getItemAt(itemIndex))); | |||
@@ -151,7 +151,7 @@ public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter { | |||
//按钮点击 | |||
String title = "收藏菜品操作提示!"; | |||
String message = "请问客官确定要["+(IsSC?"取消收藏":"收藏")+"]菜品吗?"; | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(holder.itemView.getContext(), title, message,"Collect operation tips","Are you sure to["+(IsSC?"uncollect":"collect")+"]dishes?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
IsSC=!IsSC; | |||
@@ -270,7 +270,7 @@ public class add_silos_message extends LinearLayout { | |||
return "③"; | |||
}else if(num==4) | |||
{ | |||
return "④(水阀)"; | |||
return ConfigName.getInstance().app.getString(R.string.text_valve); | |||
}else if(num==5) | |||
{ | |||
return "⑤"; | |||
@@ -304,7 +304,7 @@ public class add_silos_message extends LinearLayout { | |||
materials.add(item); | |||
} | |||
BPA_MATERIAL wsz = new BPA_MATERIAL(); | |||
wsz.name = "未设置"; | |||
wsz.name = ConfigName.getInstance().app.getString(R.string.text_waterset); | |||
wsz.id = ""; | |||
materials.add(wsz); | |||
names.clear(); | |||
@@ -88,7 +88,7 @@ public class fragment_plc extends LinearLayout { | |||
String title = "温馨提示!"; | |||
String message = "客官确定要修改["+model.name+"]地址吗,小菠萝温馨提示你,此操作将会影响到实际运行哦?"; | |||
AlertDialogUtils.showDialog(getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(getContext(), title, message,"Tips","Is the guest officer sure to modify the ["+model.name+"] address, reminds you that this operation will affect the actual operation?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
model.address=text; | |||
@@ -34,6 +34,8 @@ public class imagebuttom extends LinearLayout { | |||
ImageView image_u; | |||
private int ks_ys = R.mipmap.zhizuo_ks; | |||
private int tz_ys = R.mipmap.zhizuo_js; | |||
private int ks_ys_en = R.mipmap.zhizuo_ks; | |||
private int tz_ys_en = R.mipmap.zhizuo_js; | |||
/** | |||
* 当前状态 | |||
*/ | |||
@@ -59,6 +61,8 @@ public class imagebuttom extends LinearLayout { | |||
try { | |||
ks_ys = typedArray.getResourceId(R.styleable.imagebutton_control_imagesrc_ks, R.mipmap.zhizuo_ks); | |||
tz_ys = typedArray.getResourceId(R.styleable.imagebutton_control_imagesrc_tz,R.mipmap.zhizuo_js); | |||
ks_ys_en = typedArray.getResourceId(R.styleable.imagebutton_control_imagesrc_ks_en, R.mipmap.zhizuo_ks); | |||
tz_ys_en = typedArray.getResourceId(R.styleable.imagebutton_control_imagesrc_tz_en,R.mipmap.zhizuo_js); | |||
typedArray.recycle(); | |||
}catch (Exception exception) | |||
{ | |||
@@ -82,8 +86,10 @@ public class imagebuttom extends LinearLayout { | |||
if(Status) | |||
{ | |||
String title = "停止操作提示!"; | |||
String title_en = "Stop operation!"; | |||
String message_en ="Are you sure you want to stop production!"; | |||
String message = "请问客官确定要停止制作吗,小菠萝会生气的,啊啊啊啊啊啊啊...我的饭饭?"; | |||
AlertDialogUtils.showDialog(getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(getContext(), title, message,title_en,message_en, new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
//强制结束 | |||
@@ -110,8 +116,10 @@ public class imagebuttom extends LinearLayout { | |||
} | |||
String title = "开始操作提示!"; | |||
String title_en = "Start operation!"; | |||
String message_en ="Are you sure you want to start production!"; | |||
String message = "请问客官确定要开始制作吗,小菠萝好开心呀,马上就有好吃的耶?"; | |||
AlertDialogUtils.showDialog(getContext(), title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(getContext(), title, message,title_en,message_en, new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
ExecuteTheRecipe.StopForcedEnd(); | |||
@@ -147,12 +155,26 @@ public class imagebuttom extends LinearLayout { | |||
public void SetStatus(boolean status) | |||
{ | |||
Status=status; | |||
if(status) | |||
{ | |||
image_u.setImageResource(tz_ys); | |||
}else | |||
{ | |||
image_u.setImageResource(ks_ys); | |||
switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
case "en": | |||
if(status) | |||
{ | |||
image_u.setImageResource(tz_ys_en); | |||
}else | |||
{ | |||
image_u.setImageResource(ks_ys_en); | |||
} | |||
break; | |||
case "zh": | |||
if(status) | |||
{ | |||
image_u.setImageResource(tz_ys); | |||
}else | |||
{ | |||
image_u.setImageResource(ks_ys); | |||
} | |||
break; | |||
} | |||
} | |||
} |
@@ -12,6 +12,7 @@ import android.widget.TextView; | |||
import androidx.annotation.Nullable; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.res.lcMode; | |||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||
@@ -129,7 +130,7 @@ public class jingdutiao1 extends LinearLayout { | |||
return "③"; | |||
}else if(num==4) | |||
{ | |||
return "④(水阀)"; | |||
return ConfigName.getInstance().app.getString(R.string.text_valve); | |||
}else if(num==5) | |||
{ | |||
return "⑤"; | |||
@@ -164,7 +164,7 @@ public class MyFragment extends BaseFragment { | |||
public void onClickListener(SuperTextView superTextView) { | |||
String title = "温馨提示!"; | |||
String message = "客官确定要退出程序吗,小菠萝会想你的哦?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Tips!","Are you sure you want to exit the program?" ,new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
skipToLoginActivity(); | |||
@@ -355,7 +355,7 @@ public class MyFragment extends BaseFragment { | |||
public void onClickListener(SuperTextView superTextView) { | |||
String title = "温馨提示!"; | |||
String message = "客官确定要恢复出厂设置吗,小菠萝温馨提示你,此操作将会影响到实际运行哦?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(context, title, message,"Tips!","Are you sure you want to restore factory Settings,this operation will affect the actual operation?", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
ConfigData.getInstance().RevertPLCProcess(); | |||
@@ -145,7 +145,7 @@ public class UserActivity extends BaseActivity implements MyClickListener { | |||
String title = "温馨提示!"; | |||
String message = "客官确定要恢复出厂账户吗?"; | |||
AlertDialogUtils.showDialog(this, title, message, new QMUIDialogAction.ActionListener() { | |||
AlertDialogUtils.showDialog(this, title, message, "Tips","Are you sure you want to restore the factory account?",new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
ArrayList<BPA_USER> users=QueryDB.GetUserALL(); | |||
@@ -8,6 +8,7 @@ import android.os.Bundle; | |||
import android.os.Handler; | |||
import android.os.Looper; | |||
import android.os.Message; | |||
import android.os.Process; | |||
import android.view.MotionEvent; | |||
import android.view.View; | |||
import android.widget.AdapterView; | |||
@@ -112,7 +113,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
}else { | |||
progressDialog.dismiss(); | |||
} | |||
progressDialog.setTitleAndMessage("温馨提示","正在保存工序,请稍等..."); | |||
progressDialog.setTitleAndMessage("温馨提示","正在保存工序,请稍等...","Tips","Saving processes,please wait..."); | |||
progressDialog.setCancelable(false); | |||
progressDialog.show(); | |||
List<BPA_GOODS_PROCESS_DETAIL> processDetails1 = GoodsProcessDetailDBUtil.getByGroupId(subAttributeGroupId); | |||
@@ -123,7 +124,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
} | |||
SubAttributeGroupDBUtil.updateMakeTime(subAttributeGroupId, CookTimeUtils.measureCookingTime(processDetails)); | |||
if(GoodsProcessDetailDBUtil.addList(processDetails)){ | |||
NewToastUtil.getInstance().showToast("保存成功"); | |||
NewToastUtil.getInstance().showToast("保存成功","Save Success!"); | |||
RecordManager.getInstance().addLogRecord("角色操作日志","工序保存并返回-成功"); | |||
}else { | |||
NewToastUtil.getInstance().showToastError("保存失败"); | |||
@@ -196,7 +197,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
//移动光标 | |||
setSelectPos(index_up - 1); | |||
} else { | |||
NewToastUtil.getInstance().showToast("已经是最顶部!"); | |||
NewToastUtil.getInstance().showToast("已经是最顶部!","It's already at the top!"); | |||
} | |||
} | |||
@@ -210,7 +211,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
//移动光标 | |||
setSelectPos(index_down + 1); | |||
} else { | |||
NewToastUtil.getInstance().showToast("已经是最底部!"); | |||
NewToastUtil.getInstance().showToast("已经是最底部!","It's already at the top"); | |||
} | |||
} | |||
@@ -269,7 +270,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
//模拟炒制 | |||
viewBinding.btnSimulation.setOnClickListener(view -> { | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
Intent intent = new Intent(DiyProcessActivity.this, CookingSimulatedActivity.class); | |||
@@ -308,7 +309,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
*/ | |||
viewBinding.btnCopyProcess.setOnClickListener(view -> { | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("请勿快速点击!"); | |||
NewToastUtil.getInstance().showToast("请勿快速点击!","Click too fast!"); | |||
return; | |||
} | |||
if(attributeSelectDialog == null){ | |||
@@ -322,7 +323,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
@Override | |||
public void submit() { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
processDetails.clear(); | |||
@@ -353,8 +354,16 @@ public class DiyProcessActivity extends BaseActivity { | |||
int i = 0; | |||
String id = ""; | |||
for (BPA_PROCESS item : data) { | |||
processMap.put(item.name, item.id); | |||
processMapIndex.put(item.name, i); | |||
switch (getString(R.string.language)){ | |||
case "en": | |||
processMap.put(ConfigName.getInstance().Process_info.get(item.name),item.id); | |||
processMapIndex.put(item.name, i); | |||
break; | |||
case "zh": | |||
processMap.put(item.name, item.id); | |||
processMapIndex.put(item.name, i); | |||
break; | |||
} | |||
if (i == 0) { | |||
id = item.id; | |||
} | |||
@@ -422,7 +431,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
stepAdapter.notifyDataSetChanged(); | |||
viewBinding.recycleStep.smoothScrollToPosition(index_update); | |||
}else { | |||
NewToastUtil.getInstance().showToast("请先选择步骤!"); | |||
NewToastUtil.getInstance().showToast("请先选择步骤!","Please select a step first!"); | |||
} | |||
} | |||
} | |||
@@ -442,7 +451,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
stepAdapter.notifyDataSetChanged(); | |||
viewBinding.recycleStep.smoothScrollToPosition(index_update+1); | |||
}else { | |||
NewToastUtil.getInstance().showToast("请先选择步骤!"); | |||
NewToastUtil.getInstance().showToast("请先选择步骤!","Please select a step first!"); | |||
} | |||
} | |||
} | |||
@@ -455,16 +464,25 @@ public class DiyProcessActivity extends BaseActivity { | |||
int index_update = stepAdapter.getCurrentPosition(); | |||
if (index_update >= 0 && index_update < processDetails.size()) { | |||
BPA_GOODS_PROCESS_DETAIL obj_update = (BPA_GOODS_PROCESS_DETAIL) processDetails.get(index_update); | |||
String selectname = viewBinding.spinnerProcess.getSelectedItem().toString(); | |||
if (!obj_update.processname.equals(selectname)) { | |||
NewToastUtil.getInstance().showToast("修改失败,选中步骤名称不相同!"); | |||
return; | |||
if (obj_update!=null){ | |||
String selectname = viewBinding.spinnerProcess.getSelectedItem().toString(); | |||
switch (getString(R.string.language)){ | |||
case "en": | |||
selectname = ConfigName.getInstance().Process_info_en.get(selectname); | |||
break; | |||
case "zh": | |||
break; | |||
} | |||
if (!obj_update.processname.equals(selectname)) { | |||
NewToastUtil.getInstance().showToast("修改失败,选中步骤名称不相同!","Failed to modify, the selected step name is different!"); | |||
return; | |||
} | |||
processDetails.set(index_update, getSelectItemFromValue()); | |||
stepAdapter.notifyDataSetChanged(); | |||
NewToastUtil.getInstance().showToast("修改步骤[" + (index_update + 1) + ":" + obj_update.processname + "]成功!","Revise step [" + (index_update + 1) + ":" + obj_update.processname + "] Success!"); | |||
} | |||
processDetails.set(index_update, getSelectItemFromValue()); | |||
stepAdapter.notifyDataSetChanged(); | |||
NewToastUtil.getInstance().showToast("修改步骤[" + (index_update + 1) + ":" + obj_update.processname + "]成功!"); | |||
} else { | |||
NewToastUtil.getInstance().showToast("请先选择步骤!"); | |||
NewToastUtil.getInstance().showToast("请先选择步骤!","Please select a step first!"); | |||
} | |||
} | |||
@@ -482,9 +500,9 @@ public class DiyProcessActivity extends BaseActivity { | |||
if (index_delete - 1 >= 0) { | |||
setSelectPos(index_delete - 1); | |||
} | |||
NewToastUtil.getInstance().showToast("删除步骤[" + processDetail.processname + "]成功!"); | |||
NewToastUtil.getInstance().showToast("删除步骤[" + processDetail.processname + "]成功!","Delete step [" + processDetail.processname + "] success!"); | |||
} else { | |||
NewToastUtil.getInstance().showToast("请先选择步骤!"); | |||
NewToastUtil.getInstance().showToast("请先选择步骤!","Please select a step first!"); | |||
} | |||
} | |||
@@ -496,8 +514,11 @@ public class DiyProcessActivity extends BaseActivity { | |||
public BPA_GOODS_PROCESS_DETAIL getSelectItemFromValue() { | |||
BPA_GOODS_PROCESS_DETAIL processDetail = new BPA_GOODS_PROCESS_DETAIL(); | |||
try { | |||
ArrayList<BPA_PROCESS> data_1 = QueryDB.GetProcessALL(); | |||
processDetail.goodsSubAttributeGroupId = subAttributeGroupId; | |||
String name = viewBinding.spinnerProcess.getSelectedItem().toString(); | |||
long t= viewBinding.spinnerProcess.getSelectedItemId(); | |||
String name = data_1.get((int) t).name; | |||
/*String name = viewBinding.spinnerProcess.getSelectedItem().toString();*/ | |||
boolean IsVerify = true; | |||
StringBuilder description = new StringBuilder(); | |||
// 延迟,100|延迟,100|延迟,100|延迟,100| | |||
@@ -525,26 +546,48 @@ public class DiyProcessActivity extends BaseActivity { | |||
for (int i = 0; i < viewBinding.llProcessValue.getChildCount(); i++) { | |||
ProcessValueView viw = (ProcessValueView) viewBinding.llProcessValue.getChildAt(i); | |||
String values = viw.GetValues(); | |||
String modelname = ""; | |||
switch (getString(R.string.language)){ | |||
case "en": | |||
if (ConfigName.getInstance().Process_info_en.get(values)!=null){ | |||
values =ConfigName.getInstance().Process_info_en.get(values); | |||
} | |||
if (ConfigName.getInstance().Process_info_en.get(viw.model.name) != null){ | |||
modelname = ConfigName.getInstance().Process_info_en.get(viw.model.name); | |||
}else { | |||
modelname = viw.model.name; | |||
} | |||
break; | |||
case "zh": | |||
modelname = viw.model.name; | |||
break; | |||
} | |||
if (values.isEmpty()) { | |||
IsVerify = false; | |||
description.append(viw.model.name).append("不能为空"); | |||
} else { | |||
data.append(viw.model.name).append(",").append(values).append("|"); | |||
desc.append(values).append(","); | |||
if (ConfigName.getInstance().Process_info_en.get(values) != null) { | |||
data.append(modelname).append(",").append(ConfigName.getInstance().Process_info_en.get(values)).append("|"); | |||
desc.append(ConfigName.getInstance().Process_info_en.get(values)).append(","); | |||
} else { | |||
data.append(modelname).append(",").append(values).append("|"); | |||
desc.append(values).append(","); | |||
} | |||
} | |||
// if(viw.model.name.contains("位置")){ | |||
// position = Integer.parseInt(values.replace("号位","")); | |||
// } | |||
if(viw.model.name.contains("主料名称")){ | |||
/* if(modelname.contains("位置")){ | |||
position = Integer.parseInt(values.replace("号位","").replace(" Bit","")); | |||
}*/ | |||
if(modelname.contains("主料名称")){ | |||
mainFoodName = values; | |||
} | |||
} | |||
if(position>0){ | |||
/*if(mainFoodName!=""){ | |||
LogUtils.d(TAG+" getSelectItemFromValue 修改主料名称 old mainFoods="+mainFoods.toString()); | |||
mainFoods.set(position-1,mainFoodName); | |||
LogUtils.d(TAG+" getSelectItemFromValue 修改主料名称 new mainFoods="+mainFoods.toString()); | |||
} | |||
}*/ | |||
} | |||
if (IsVerify) { | |||
processDetail.processname = name; | |||
@@ -561,6 +604,10 @@ public class DiyProcessActivity extends BaseActivity { | |||
} | |||
} | |||
public BPA_GOODS_PROCESS_DETAIL getProcessValue_tozh(){ | |||
BPA_GOODS_PROCESS_DETAIL processDetail = new BPA_GOODS_PROCESS_DETAIL(); | |||
return processDetail; | |||
} | |||
/** | |||
* 移动光标 选中步骤 | |||
* @param index | |||
@@ -581,7 +628,7 @@ public class DiyProcessActivity extends BaseActivity { | |||
// viewBinding.topbar.setTitle("编辑工序"); | |||
viewBinding.back.setOnClickListener(v->{ | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
AlertDialogUtils.showCancelAndConfirmDialog(this,R.layout.dialog_with_cancel_confirm, new XComDialog.OnDialogListener(){ | |||
@@ -641,10 +688,20 @@ public class DiyProcessActivity extends BaseActivity { | |||
LogUtils.d("SelectItemFrom 1"); | |||
for (BPA_PROCESSModel item : mode) { | |||
item_gx gx = new item_gx(); | |||
gx.datatype = item.datatype; | |||
gx.name = item.name; | |||
gx.data = item.data; | |||
gx.IsWL = false; | |||
switch (getString(R.string.language)){ | |||
case "en": | |||
gx.datatype = item.datatype; | |||
gx.name = ConfigName.getInstance().Process_info.get(item.name); | |||
gx.data = ConfigName.getInstance().Process_info.get(item.data); | |||
gx.IsWL = false; | |||
break; | |||
case "zh": | |||
gx.datatype = item.datatype; | |||
gx.name = item.name; | |||
gx.data = item.data; | |||
gx.IsWL = false; | |||
break; | |||
} | |||
ProcessValueView view = new ProcessValueView(this, null, gx); | |||
if(item.datatype == 2){ | |||
view.setListener(spinnerSelectListener); | |||
@@ -678,14 +735,18 @@ public class DiyProcessActivity extends BaseActivity { | |||
@Override | |||
public void onSelect(int position,String name) { | |||
for (int i = 0; i < viewBinding.llProcessValue.getChildCount(); i++) { | |||
/*for (int i = 0; i < viewBinding.llProcessValue.getChildCount(); i++) { | |||
ProcessValueView processValueView = (ProcessValueView) viewBinding.llProcessValue.getChildAt(i); | |||
if(processValueView.model.name.equals("主料名称")){ | |||
String processName = ""; | |||
if (ConfigName.getInstance().Process_info_en.get(processValueView.model.name)!=null){ | |||
processName = ConfigName.getInstance().Process_info_en.get(processValueView.model.name); | |||
} | |||
if(processValueView.model.name.equals("主料名称")||processName.equals("主料名称")){ | |||
if(!mainFoods.isEmpty() && mainFoods.size()>position){ | |||
processValueView.setMainFoodName(mainFoods.get(position)); | |||
} | |||
} | |||
} | |||
}*/ | |||
} | |||
@@ -707,15 +768,34 @@ public class DiyProcessActivity extends BaseActivity { | |||
for (int i = 0; i < viewBinding.llProcessValue.getChildCount(); i++) { | |||
ProcessValueView processValueView = (ProcessValueView) viewBinding.llProcessValue.getChildAt(i); | |||
String res = formulation.get(processValueView.model.name); | |||
LogUtils.d(" updateProcessSpinner res="+res+";processValueView.model.name="+processValueView.model.name); | |||
String res=""; | |||
switch (getString(R.string.language)){ | |||
case "en": | |||
String processname = ""; | |||
if (ConfigName.getInstance().Process_info_en.get(processValueView.model.name)!=null){ | |||
processname = ConfigName.getInstance().Process_info_en.get(processValueView.model.name); | |||
}else { | |||
processname = processValueView.model.name; | |||
} | |||
res = formulation.get(processname); | |||
LogUtils.d(" updateProcessSpinner res="+res+";processValueView.model.name="+processname); | |||
break; | |||
case "zh": | |||
res = formulation.get(processValueView.model.name); | |||
LogUtils.d(" updateProcessSpinner res="+res+";processValueView.model.name="+processValueView.model.name); | |||
break; | |||
} | |||
if (res != null) { | |||
processValueView.SetValues(res); | |||
}else { | |||
if(processValueView.model.name.equals("主料名称")){ | |||
String processModelName = ""; | |||
if (ConfigName.getInstance().Process_info_en.get(processValueView.model.name)!=null){ | |||
processModelName=ConfigName.getInstance().Process_info_en.get(processValueView.model.name); | |||
} | |||
if(processValueView.model.name.equals("主料名称")||processModelName.equals("主料名称")){ | |||
processValueView.setMainFoodName(mainFoods.get(0)); | |||
} | |||
if(processValueView.model.name.contains("正转时间")||processValueView.model.name.contains("反转时间")){ | |||
if(processValueView.model.name.contains("正转时间")||processValueView.model.name.contains("反转时间")||processModelName.contains("反转时间")||processModelName.contains("反转时间")){ | |||
processValueView.SetValues("3"); | |||
} | |||
} | |||
@@ -261,7 +261,7 @@ public class EditClassifyActivity extends BaseActivity { | |||
public void onViewClicked(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
switch (view.getId()){ | |||
@@ -526,7 +526,7 @@ public class EditClassifyActivity extends BaseActivity { | |||
String classifyId = classifyList.get(viewBinding.spinnerClassify.getSelectedItem().toString()); | |||
String goodName = SubAttributeGroupDBUtil.isIncludeByClassify(classifyId,bean.name); | |||
if(!goodName.isEmpty()){ | |||
NewToastUtil.getInstance().showToast("商品["+goodName+"]正在使用["+bean.name+"]属性,请先删除对应商品"); | |||
NewToastUtil.getInstance().showToast("商品["+goodName+"]正在使用["+bean.name+"]属性,请先删除对应商品","Product ["+goodName+"] using ["+bean.name+"] attribute,Please delete the corresponding product first!"); | |||
return; | |||
} | |||
} | |||
@@ -73,7 +73,7 @@ public class EditGoodsActivity extends BaseActivity { | |||
viewBinding.back.setOnClickListener(v->{ | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
finish(); | |||
@@ -104,7 +104,7 @@ public class EditGoodsActivity extends BaseActivity { | |||
private void requestData(){ | |||
if (NetworkUtils.checkNetworkAvailable(context)) { | |||
if(!viewModel.hasData){ | |||
NewToastUtil.getInstance().showToast("正在请求云端数据"); | |||
NewToastUtil.getInstance().showToast("正在请求云端数据","Requesting cloud data!"); | |||
viewModel.fetchCloudData(context); | |||
} | |||
} else { | |||
@@ -120,7 +120,7 @@ public class EditGoodsActivity extends BaseActivity { | |||
@OnClick({R.id.localFoods, R.id.cloudFoods,R.id.search_view}) | |||
public void onViewClicked(View view) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
switch (view.getId()) { | |||
@@ -47,7 +47,7 @@ public abstract class SubOrderAdapter extends BaseAdapter<BPA_SUBORDER_RECORD, S | |||
holder.binding.error.setText(order.subErrorCount+""); | |||
holder.binding.root.setOnClickListener(view -> { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
onItemClick(view,position); | |||
@@ -6,6 +6,9 @@ import android.view.View; | |||
import android.view.ViewGroup; | |||
import androidx.annotation.NonNull; | |||
import androidx.recyclerview.widget.RecyclerView; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL; | |||
import com.bonait.bnframework.databinding.ItemStepBinding; | |||
import com.bonait.bnframework.ui.adapter.BaseAdapter; | |||
@@ -33,7 +36,16 @@ public abstract class DiyStepAdapter extends BaseAdapter<BPA_GOODS_PROCESS_DETAI | |||
holder.binding.root.setSelected(mCurrentPosition == position); | |||
holder.binding.removeUp.setVisibility(mCurrentPosition == position?View.VISIBLE:View.GONE); | |||
holder.binding.removeDown.setVisibility(mCurrentPosition == position?View.VISIBLE:View.GONE); | |||
holder.binding.name.setText((position+1)+"."+mData.get(position).processname); | |||
String processName = ""; | |||
switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
case "en": | |||
processName = ConfigName.getInstance().Process_info.get(mData.get(position).processname); | |||
break; | |||
case "zh": | |||
processName = mData.get(position).processname; | |||
break; | |||
} | |||
holder.binding.name.setText((position+1)+"."+processName); | |||
holder.binding.root.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
@@ -188,7 +188,7 @@ public class AddGoodsDialog extends DialogFragment { | |||
case 2: | |||
if(classifyList.isEmpty() || classifyPosition < 0 || classifyPosition>=classifyList.size()){ | |||
if(getContext()!=null){ | |||
NewToastUtil.getInstance().showToast("请选择分类"); | |||
NewToastUtil.getInstance().showToast("请选择分类","Please select class"); | |||
} | |||
return; | |||
} | |||
@@ -207,13 +207,13 @@ public class AddGoodsDialog extends DialogFragment { | |||
LogUtils.d(TAG+" name="+name); | |||
if(name.isEmpty()){ | |||
if(getContext()!=null){ | |||
NewToastUtil.getInstance().showToast("名称不能为空"); | |||
NewToastUtil.getInstance().showToast("名称不能为空","The name cannot be empty!"); | |||
} | |||
return; | |||
} | |||
if(GoodsDBUtil.getByName(name)!=null){ | |||
if(getContext()!=null){ | |||
NewToastUtil.getInstance().showToast("已有菜品,请换一个名称"); | |||
NewToastUtil.getInstance().showToast("已有菜品,请换一个名称","There is a name, please change the name"); | |||
} | |||
return; | |||
} | |||
@@ -229,7 +229,7 @@ public class AttributeSelectDialog extends DialogFragment { | |||
}); | |||
}); | |||
}else { | |||
NewToastUtil.getInstance().showToast("该组合没有工序,无法导入"); | |||
NewToastUtil.getInstance().showToast("该组合没有工序,无法导入","This combination has no process and cannot be imported!"); | |||
} | |||
}); | |||
} | |||
@@ -383,7 +383,7 @@ public class EditGoodsDialog extends DialogFragment { | |||
subattributeGroup.name = goods.name; | |||
subattributeGroup.subAttributeIdList = goodId; | |||
SubAttributeGroupDBUtil.add(subattributeGroup); | |||
NewToastUtil.getInstance().showToast("创建配方成功,请编辑工序"); | |||
NewToastUtil.getInstance().showToast("创建配方成功,请编辑工序","Recipe created successfully, please edit process!"); | |||
RecordManager.getInstance().addLogRecord("角色操作日志", subattributeGroup.name+"-创建配方成功"); | |||
} | |||
return; | |||
@@ -4,8 +4,11 @@ import android.app.ProgressDialog; | |||
import android.content.Context; | |||
import android.os.Bundle; | |||
import android.view.WindowManager; | |||
import android.widget.Switch; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.databinding.DialogProgressWaiteBinding; | |||
import com.bonait.bnframework.ui.util.DisplayManager; | |||
@@ -51,7 +54,22 @@ public class WaiteProgressDialog extends ProgressDialog { | |||
this.title = title; | |||
this.message = message; | |||
} | |||
public void setTitleAndMessage(String title,String message,String title_en,String message_en){ | |||
switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
case "en": | |||
title = title_en; | |||
message = message_en; | |||
break; | |||
case "zh": | |||
break; | |||
} | |||
if(binding!=null){ | |||
binding.title.setText(title); | |||
binding.message.setText(message); | |||
} | |||
this.title = title; | |||
this.message = message; | |||
} | |||
@Override | |||
public void show() { | |||
super.show(); | |||
@@ -125,7 +125,7 @@ public class HomeFoodsFragment extends BaseFragment { | |||
private void requestData(){ | |||
if (NetworkUtils.checkNetworkAvailable(context)) { | |||
if(!viewModel.hasData){ | |||
NewToastUtil.getInstance().showToast("正在请求云端数据"); | |||
NewToastUtil.getInstance().showToast("正在请求云端数据","Requesting cloud data!"); | |||
viewModel.fetchCloudData(context); | |||
} | |||
} else { | |||
@@ -143,7 +143,7 @@ public class HomeFoodsFragment extends BaseFragment { | |||
switch (view.getId()) { | |||
case R.id.localFoods: | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
LogUtils.d("//////1"); | |||
@@ -151,7 +151,7 @@ public class HomeFoodsFragment extends BaseFragment { | |||
break; | |||
case R.id.cloudFoods: | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
LogUtils.d("//////2"); | |||
@@ -110,22 +110,22 @@ public class CloudGoodsFragment extends BaseFragment { | |||
viewBinding.btnSynchronizedData.setVisibility(isEdit?View.VISIBLE:View.GONE); | |||
viewBinding.btnFresh.setOnClickListener(v->{ | |||
if (ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
NewToastUtil.getInstance().showToast("正在请求云端数据"); | |||
NewToastUtil.getInstance().showToast("正在请求云端数据","Requesting cloud data!"); | |||
viewModel.fetchCloudData(getContext()); | |||
}); | |||
viewBinding.btnSynchronizedData.setOnClickListener(v->{ | |||
if (ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "数据同步", "下载云端所有菜品到本地,拥有相同的分类将会被覆盖,请确认?", new AlertDialogUtils.DialogClickListener() { | |||
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "数据同步", "下载云端所有菜品到本地,拥有相同的分类将会被覆盖,请确认?","Data Synchronize","Download all dishes from the cloud to the local, with the same classification will be covered, please confirm?", new AlertDialogUtils.DialogClickListener() { | |||
@Override | |||
public void onConfirm() { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
RecordManager.getInstance().addLogRecord("角色操作日志", "数据同步"); | |||
@@ -134,7 +134,7 @@ public class CloudGoodsFragment extends BaseFragment { | |||
}else { | |||
progressDialog.dismiss(); | |||
} | |||
progressDialog.setTitleAndMessage("数据同步","正在同步数据,请耐心稍等..."); | |||
progressDialog.setTitleAndMessage("数据同步","正在同步数据,请耐心稍等...","Synchronous data","Synchronizing data,please wait..."); | |||
progressDialog.setCancelable(false); | |||
progressDialog.show(); | |||
viewModel.synchronizedCloudData(); | |||
@@ -156,7 +156,7 @@ public class CloudGoodsFragment extends BaseFragment { | |||
@Override | |||
protected boolean downLoadGoods(View v, int position) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return false; | |||
} | |||
return downLoadCloudGoods(position); | |||
@@ -172,17 +172,18 @@ public class LocalGoodsFragment extends BaseFragment { | |||
viewBinding.addClassify.setOnClickListener(view -> { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
jumpClassify(); | |||
}); | |||
viewBinding.deleteAll.setOnClickListener(v->{ | |||
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "请确认", "确认删除选择的所有商品信息?", new AlertDialogUtils.DialogClickListener() { | |||
// AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "请确认", "确认删除选择的所有商品信息?", new AlertDialogUtils.DialogClickListener() { | |||
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "请确认", "确认删除所有商品信息?","Confirm","Confirm to delete all product information?", new AlertDialogUtils.DialogClickListener() { | |||
@Override | |||
public void onConfirm() { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
List<BPA_GOODS> res = goodsList.stream().filter(p->p.status==1).collect(Collectors.toList()); | |||
@@ -218,7 +219,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
protected void onItemClick(View v, int position) { | |||
LogUtils.d(" LocalGoodsAdapter onItemClick position="+position); | |||
if(isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("请勿快速点击!"); | |||
NewToastUtil.getInstance().showToast("请勿快速点击!","Click too fast!"); | |||
return; | |||
} | |||
try { | |||
@@ -245,7 +246,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
@Override | |||
protected void uploadGoods(View v, int position) { | |||
if(ConfigName.getInstance().isFast2Click()){ | |||
NewToastUtil.getInstance().showToast("点击太快了"); | |||
NewToastUtil.getInstance().showToast("点击太快了","Click too fast!"); | |||
return; | |||
} | |||
UpdateDataService.startUpLoad(mData.get(position),getContext()); | |||
@@ -254,7 +255,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
@Override | |||
protected void deleteGoods(View v, int position) { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
AlertDialogUtils.showCancelAndConfirmDialog((AppCompatActivity) getActivity(), R.layout.dialog_delete_classify, (layoutView, xCom) -> { | |||
@@ -276,7 +277,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
}); | |||
binding.submit.setOnClickListener(view1 -> { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
NewToastUtil.getInstance().showToast("点击过快!"); | |||
NewToastUtil.getInstance().showToast("点击过快!","Click too fast!"); | |||
return; | |||
} | |||
GoodsProcessDetailDBUtil.deleteByGoodsId(bean.id); | |||
@@ -327,12 +328,12 @@ public class LocalGoodsFragment extends BaseFragment { | |||
BPA_GOODS_CLASSIFY classify = classifyList.get(classifyAdapter.getCurrentPosition()); | |||
List<BPA_ATTRIBUTE> attributes = AttributeDBUtil.getByClassify(classify.id); | |||
if(attributes.isEmpty()){ | |||
NewToastUtil.getInstance().showToast("当前分类没有属性,请先创建分类父属性"); | |||
NewToastUtil.getInstance().showToast("当前分类没有属性,请先创建分类父属性","The current class does not have attributes. Create the parent attributes of the class first"); | |||
return; | |||
}else { | |||
for(BPA_ATTRIBUTE attribute:attributes){ | |||
if(SubAttributeDBUtil.getByParentAttributeId(attribute.id).isEmpty()){ | |||
NewToastUtil.getInstance().showToast("当前分类父属性["+attribute.name+"]没有子属性,无法创建"); | |||
NewToastUtil.getInstance().showToast("当前分类父属性["+attribute.name+"]没有子属性,无法创建","Parent property of the current class ["+attribute.name+"] has no subattribute,Cannot create!"); | |||
return; | |||
} | |||
} | |||
@@ -400,7 +401,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
*/ | |||
public void addGoodsDialog(){ | |||
if(isFastClick()){ | |||
NewToastUtil.getInstance().showToast("请勿快速点击!"); | |||
NewToastUtil.getInstance().showToast("请勿快速点击!","Click too fast!"); | |||
return; | |||
} | |||
if(!classifyList.isEmpty() && getActivity()!=null){ | |||
@@ -415,7 +416,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
addGoodsDialog.setArguments(bundle); | |||
addGoodsDialog.show(getActivity().getSupportFragmentManager(), "addGoods"); | |||
}else { | |||
NewToastUtil.getInstance().showToast("当前没有分类,请先添加分类"); | |||
NewToastUtil.getInstance().showToast("当前没有分类,请先添加分类","Currently no class,Please add class first"); | |||
jumpClassify(); | |||
} | |||
} | |||
@@ -62,7 +62,7 @@ public class HomeGoodsViewModel extends ViewModel { | |||
public void fetchCloudData(Context context){ | |||
if (NetworkUtils.checkNetworkAvailable(context)) { | |||
WaitProcessUtil.getInstance().show(context,"下载云端","正在请求云端数据..."); | |||
WaitProcessUtil.getInstance().show(context,"下载云端","正在请求云端数据...","Download cloud","Requesting cloud data..."); | |||
ThreadManager.get().execute(new Thread(()->{ | |||
GetGoodsInfo(); | |||
GetMaterialInfo(); | |||
@@ -161,7 +161,7 @@ public class HomeGoodsViewModel extends ViewModel { | |||
LogUtils.d("UpdateLocalMaterial datas="+datas); | |||
if(!datas.isEmpty()){ | |||
MaterialUtil.addMaterialList(BPA_MATERIAL.class,datas); | |||
NewToastUtil.getInstance().showToast("已同步云端物料信息"); | |||
NewToastUtil.getInstance().showToast("已同步云端物料信息","Material information in the cloud has been synchronized!"); | |||
} | |||
EventBus.getDefault().post(new FreshSystemSeason()); | |||
} | |||
@@ -181,7 +181,7 @@ public class HomeGoodsViewModel extends ViewModel { | |||
if (goodsClassify.id.equals(bean.getGoodsTypeId())) { | |||
List<BPA_ATTRIBUTE> attributes = AttributeDBUtil.getByClassify(goodsClassify.id); | |||
if(attributes.size() != bean.getGoodsAttributeList().size()){ | |||
NewToastUtil.getInstance().showToast("与本地【"+goodsClassify.name+"】分类的父属性数量不匹配,无法下载"); | |||
NewToastUtil.getInstance().showToast("与本地【"+goodsClassify.name+"】分类的父属性数量不匹配,无法下载","Does not match the number of parent attributes of the local class【"+goodsClassify.name+"】,unable to download!"); | |||
return; | |||
} | |||
List<String> attributeName = new ArrayList<>(); | |||
@@ -190,7 +190,7 @@ public class HomeGoodsViewModel extends ViewModel { | |||
} | |||
for(GoodsClassifyBean.GoodsAttributeListBean goodsAttributeListBean: bean.getGoodsAttributeList()){ | |||
if(!attributeName.contains(goodsAttributeListBean.getGoodsAttributeId())){ | |||
NewToastUtil.getInstance().showToast("与本地【"+goodsClassify.name+"】分类的父属性id不匹配,无法下载"); | |||
NewToastUtil.getInstance().showToast("与本地【"+goodsClassify.name+"】分类的父属性id不匹配,无法下载","Does not match the number of parent attributes of the local class id【"+goodsClassify.name+"】,unable to download!"); | |||
return; | |||
} | |||
} | |||
@@ -198,7 +198,7 @@ public class HomeGoodsViewModel extends ViewModel { | |||
} | |||
} | |||
if(GoodsDBUtil.getByNameAndClassifyId(goods.name,goodsClassify.id)!=null){ | |||
NewToastUtil.getInstance().showToast("已有该商品,请先删除再【"+goods.name+"】,再下载"); | |||
NewToastUtil.getInstance().showToast("已有该商品,请先删除再【"+goods.name+"】,再下载","The same product【"+goods.name+"】available,please delete and download!"); | |||
return; | |||
} | |||
//添加商品 | |||
@@ -317,9 +317,9 @@ public class HomeGoodsViewModel extends ViewModel { | |||
LogUtils.d(" synchronizedCloudData3 usetime="+(curTime5-lastTime)); | |||
lastTime = curTime5; | |||
EventBus.getDefault().post(new FreshLocalGoodsEvent()); | |||
NewToastUtil.getInstance().showToast("云端数据同步成功"); | |||
NewToastUtil.getInstance().showToast("云端数据同步成功","The cloud data is synchronized successfully!"); | |||
}catch (Exception e){ | |||
NewToastUtil.getInstance().showToast("云端数据同步失败"); | |||
NewToastUtil.getInstance().showToast("云端数据同步失败","The cloud data is synchronized fails"); | |||
e.printStackTrace(); | |||
} | |||
})); | |||
@@ -91,10 +91,10 @@ public class UpdateDataService { | |||
}finally { | |||
} | |||
}else { | |||
NewToastUtil.getInstance().showToast("商品为空"); | |||
NewToastUtil.getInstance().showToast("商品为空","Goods empty!"); | |||
} | |||
}else { | |||
NewToastUtil.getInstance().showToast("无网络,请先连接网络"); | |||
NewToastUtil.getInstance().showToast("无网络,请先连接网络","No network exists. Please connect to the network first!"); | |||
} | |||
} | |||
@@ -108,6 +108,7 @@ public class UpdateDataService { | |||
if(context!=null){ | |||
// WaitProcessUtil.getInstance().show(context,"匹配工艺模型","正在同步云端工艺模型..."); | |||
WaitProcessUtil.getInstance().Show("正在同步云端工艺模型..."); | |||
WaitProcessUtil.getInstance().show(context,"匹配工艺模型","正在同步云端工艺模型...","Matching process model","Synchronizing cloud process models..."); | |||
} | |||
HashMap<String,String> params = new HashMap<>(); | |||
params.put("autokey",ConfigName.getInstance().DeviceAutoKey); | |||
@@ -339,7 +340,8 @@ public class UpdateDataService { | |||
private static void upLoadAttribute(List<BPA_ATTRIBUTE> attributes,String goodsId,Context context){ | |||
try{ | |||
// WaitProcessUtil.getInstance().show(context,"数据上传","正在上传分类属性信息,请耐心稍等..."); | |||
WaitProcessUtil.getInstance().Show("正在上传分类属性信息,请耐心稍等..."); | |||
// WaitProcessUtil.getInstance().Show("正在上传分类属性信息,请耐心稍等..."); | |||
WaitProcessUtil.getInstance().Show("正在上传分类属性信息,请耐心稍等...","Data Upload","Uploading classified attribute information, please wait..."); | |||
BPA_GOODS goods = GoodsDBUtil.getById(goodsId); | |||
assert goods != null; | |||
BPA_GOODS_CLASSIFY classify = GoodsClassifyDBUtil.getById(goods.classifyId); | |||
@@ -412,7 +414,8 @@ public class UpdateDataService { | |||
private static void upLoadDetailInfo(String goodsId,Context context){ | |||
try{ | |||
// WaitProcessUtil.getInstance().show(context,"数据上传","正在上传工艺信息,请耐心稍等..."); | |||
WaitProcessUtil.getInstance().Show("正在上传工艺信息,请耐心稍等..."); | |||
// WaitProcessUtil.getInstance().Show("正在上传工艺信息,请耐心稍等..."); | |||
WaitProcessUtil.getInstance().Show("正在上传工艺信息,请耐心稍等...","Data Upload","Uploading process information, please wait..."); | |||
BPA_GOODS goods = GoodsDBUtil.getById(goodsId); | |||
assert goods != null; | |||
BPA_GOODS_CLASSIFY classify = GoodsClassifyDBUtil.getById(goods.classifyId); | |||
@@ -10,6 +10,7 @@ import android.widget.ArrayAdapter; | |||
import android.widget.RelativeLayout; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.databinding.ViewProcessValueBinding; | |||
import com.bonait.bnframework.modules.home.fragment.mode.item_gx; | |||
import com.bonait.bnframework.ui.util.DisplayManager; | |||
@@ -182,10 +183,23 @@ public class ProcessValueView extends RelativeLayout { | |||
} | |||
break; | |||
case 2://选项 | |||
switch (ConfigName.getInstance().app.getString(R.string.language)){ | |||
case "en": | |||
if (ConfigName.getInstance().Process_info.get(value)!=null){ | |||
value = ConfigName.getInstance().Process_info.get(value); | |||
} | |||
break; | |||
case "zh": | |||
break; | |||
} | |||
Object res= editsp_map.get(value); | |||
if(res!=null) | |||
{ | |||
if(viewBinding.name.getText().toString().equals("搅拌档位")){ | |||
String name =""; | |||
if (ConfigName.getInstance().Process_info_en.get(viewBinding.name.getText().toString())!=null){ | |||
name = ConfigName.getInstance().Process_info_en.get(viewBinding.name.getText().toString()); | |||
} | |||
if(viewBinding.name.getText().toString().equals("搅拌档位")||name.equals("搅拌档位")){ | |||
viewBinding.spinner.setSelection(Math.min(((int)res-1),4)); | |||
}else { | |||
viewBinding.spinner.setSelection((int)res-1); | |||
@@ -39,6 +39,19 @@ public class WaitProcessUtil { | |||
}); | |||
} | |||
public void show(Context context,String title, String message,String title_en,String message_en){ | |||
MainApplication.handler.post(() -> { | |||
if(progressDialog!=null){ | |||
progressDialog.dismiss(); | |||
} | |||
progressDialog = new WaiteProgressDialog(context); | |||
progressDialog.setTitleAndMessage(title,message,title_en,message_en); | |||
progressDialog.setCancelable(false); | |||
progressDialog.show(); | |||
}); | |||
} | |||
public void dismiss(){ | |||
MainApplication.handler.post(()->{ | |||
if(progressDialog!=null){ | |||
@@ -0,0 +1,15 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<item> | |||
<shape> | |||
<solid android:color="#5D7436"/> | |||
<corners android:topLeftRadius="30dp" android:topRightRadius="30dp"/> | |||
</shape> | |||
</item> | |||
<item android:bottom="5dp"> | |||
<shape> | |||
<solid android:color="@color/white"/> | |||
<corners android:topLeftRadius="30dp" android:topRightRadius="30dp"/> | |||
</shape> | |||
</item> | |||
</layer-list> |
@@ -0,0 +1,15 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<item> | |||
<shape android:shape="rectangle"> | |||
<solid android:color="#5D7436"/> | |||
<corners android:radius="20dp"/> | |||
</shape> | |||
</item> | |||
<item android:left="10dp" android:end="10dp" android:top="10dp" android:bottom="10dp"> | |||
<shape android:shape="rectangle"> | |||
<solid android:color="@color/white"/> | |||
<corners android:radius="20dp"/> | |||
</shape> | |||
</item> | |||
</layer-list> |
@@ -0,0 +1,9 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<item> | |||
<shape android:shape="rectangle"> | |||
<solid android:color="#F37636"/> | |||
<corners android:radius="20dp"/> | |||
</shape> | |||
</item> | |||
</selector> |
@@ -155,7 +155,7 @@ | |||
android:layout_marginTop="10dp" | |||
android:layout_width="match_parent" | |||
android:layout_height="160dp" | |||
android:contentDescription="④(水阀)" | |||
android:contentDescription="@string/text_valve" | |||
android:tag="水"/> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
@@ -108,7 +108,7 @@ | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:layout_marginTop="5dp" | |||
android:text="预计等待:0" | |||
android:text="@string/text_expect" | |||
android:textColor="#797373" | |||
android:textSize="14dp" /> | |||
</LinearLayout> | |||
@@ -161,7 +161,7 @@ | |||
android:layout_width="150dp" | |||
android:layout_height="80dp" | |||
android:contentDescription="false" | |||
android:tag="翻炒速度-按钮" | |||
android:tag="@string/btn_fry_sp" | |||
app:imagesrc_ks="@mipmap/sb1" | |||
app:imagesrc_qt="@mipmap/sb2" | |||
app:imagesrc_tz="@mipmap/sb3" /> | |||
@@ -321,7 +321,7 @@ | |||
android:layout_width="100dp" | |||
android:layout_height="60dp" | |||
android:contentDescription="false" | |||
android:tag="液料" | |||
android:tag="@string/btn_liquid" | |||
app:imagesrc_ks="@mipmap/sb1" | |||
app:imagesrc_qt="@mipmap/sb2" | |||
app:imagesrc_tz="@mipmap/sb3" /> | |||
@@ -350,7 +350,7 @@ | |||
android:layout_width="100dp" | |||
android:layout_height="90dp" | |||
android:contentDescription="false" | |||
android:tag="锅口朝向-按钮" | |||
android:tag="@string/btn_pot" | |||
app:imagesrc_ks="@mipmap/sb1" | |||
app:imagesrc_qt="@mipmap/sb2" | |||
app:imagesrc_tz="@mipmap/sb3" /> | |||
@@ -145,7 +145,7 @@ | |||
<!--模拟炒制--> | |||
<TextView | |||
android:id="@+id/btn_simulation" | |||
android:layout_width="@dimen/dp_240" | |||
android:layout_width="@dimen/dp_280" | |||
style="@style/TextView_btn_normal" | |||
app:layout_constraintBottom_toBottomOf="parent" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
@@ -41,6 +41,8 @@ | |||
<LinearLayout | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="0.3" | |||
android:gravity="center" | |||
android:orientation="horizontal"> | |||
<TextView | |||
@@ -58,7 +60,7 @@ | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:fontFamily="@font/fz2" | |||
android:text=" 号料仓" | |||
android:text="@string/text_Silo" | |||
android:textColor="@color/topbj1" | |||
android:textSize="25dp" /> | |||
@@ -70,7 +72,7 @@ | |||
android:layout_marginLeft="10dp" | |||
android:fontFamily="@font/fz2" | |||
android:text="复合料" | |||
android:textColor="@color/topbj1" | |||
android:textColor="#F37636" | |||
android:textSize="25dp" /> | |||
<TextView | |||
@@ -80,7 +82,7 @@ | |||
android:layout_marginLeft="10dp" | |||
android:fontFamily="@font/zkgdh" | |||
android:text="50%" | |||
android:textColor="@color/topbj1" | |||
android:textColor="#5D7436" | |||
android:textSize="30dp" | |||
android:textStyle="bold" /> | |||
</LinearLayout> | |||
@@ -88,117 +90,305 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="10dp" | |||
android:background="@mipmap/rongliangshezhi"> | |||
android:layout_height="0dp" | |||
android:background="@drawable/bg_siloset" | |||
android:layout_weight="4" | |||
android:layout_marginTop="10dp"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="120dp" | |||
android:layout_marginTop="60dp" | |||
android:layout_marginRight="140dp" | |||
android:layout_height="match_parent" | |||
android:orientation="vertical"> | |||
<EditText | |||
android:id="@+id/zongliang" | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="35dp" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入制作时长" | |||
android:inputType="number" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:text="0" | |||
android:textSize="19dp" /> | |||
<EditText | |||
android:id="@+id/gaojingrongliang" | |||
android:layout_height="wrap_content" | |||
android:layout_marginHorizontal="10dp" | |||
android:layout_marginTop="20dp" | |||
android:background="@drawable/bg_frame_green"> | |||
<TextView | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:fontFamily="@font/fz2" | |||
android:text="@string/text_capacityset" | |||
android:gravity="center|left" | |||
android:layout_marginBottom="5dp" | |||
android:layout_marginLeft="10dp" | |||
android:textSize="20dp" | |||
android:textColor="#5D7436"/> | |||
</RelativeLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="35dp" | |||
android:layout_marginTop="10dp" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入制作时长" | |||
android:inputType="number" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:text="0" | |||
android:textSize="19dp" /> | |||
android:layout_height="match_parent" | |||
android:layout_marginRight="@dimen/dp_10" | |||
android:orientation="horizontal"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_weight="10" | |||
android:layout_height="match_parent" | |||
android:gravity="center" | |||
android:orientation="vertical"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginRight="20dp" | |||
android:layout_marginLeft="30dp" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:text="@string/text_totalcapacity" | |||
android:maxLines="1" | |||
android:layout_gravity="center" | |||
android:fontFamily="@font/fz2" | |||
android:textSize="15dp" | |||
android:textColor="@color/topbj1"/> | |||
<EditText | |||
android:id="@+id/zongliang" | |||
android:layout_width="match_parent" | |||
android:layout_height="30dp" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入制作时长" | |||
android:layout_gravity="center" | |||
android:inputType="number" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:text="0" | |||
android:textSize="19dp" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="10dp" | |||
android:layout_marginRight="20dp" | |||
android:layout_marginLeft="30dp" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:text="@string/text_alarmcapacity" | |||
android:maxLines="1" | |||
android:layout_gravity="center" | |||
android:fontFamily="@font/fz2" | |||
android:textSize="15dp" | |||
android:textColor="@color/topbj1"/> | |||
<EditText | |||
android:id="@+id/gaojingrongliang" | |||
android:layout_width="match_parent" | |||
android:layout_height="30dp" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入制作时长" | |||
android:layout_gravity="center" | |||
android:inputType="number" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:text="0" | |||
android:textSize="19dp" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="wrap_content" | |||
android:layout_weight="1" | |||
android:layout_marginRight="20dp" | |||
android:layout_height="match_parent"> | |||
<Button | |||
android:id="@+id/save_rlsz" | |||
android:text="@string/btn_save" | |||
android:textColor="@color/white" | |||
android:textSize="25dp" | |||
android:textStyle="bold" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_gravity="center" | |||
android:background="@drawable/btn_bg_orange" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<RelativeLayout | |||
android:id="@+id/save_rlsz" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_marginTop="54dp" | |||
android:layout_marginRight="30dp" | |||
android:background="@mipmap/save22" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="10dp" | |||
android:background="@mipmap/tiaoliaobiaoding"> | |||
<ImageView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="130dp" | |||
android:layout_marginTop="15dp" | |||
android:src="@mipmap/pkbdy" /> | |||
<EditText | |||
android:id="@+id/tiaoliaobiaoding" | |||
android:layout_height="0dp" | |||
android:layout_weight="4" | |||
android:layout_marginTop="10dp"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="35dp" | |||
android:layout_marginLeft="120dp" | |||
android:layout_marginTop="80dp" | |||
android:layout_marginRight="140dp" | |||
android:background="@drawable/input_bj" | |||
android:digits="0123456789" | |||
android:hint="请输入制作时长" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:text="0" | |||
android:textSize="19dp" /> | |||
<RelativeLayout | |||
android:id="@+id/save_tlbd" | |||
android:layout_height="match_parent" | |||
android:background="@drawable/bg_siloset" | |||
android:orientation="vertical"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginHorizontal="10dp" | |||
android:layout_marginTop="20dp" | |||
android:orientation="horizontal" | |||
android:background="@drawable/bg_frame_green"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:fontFamily="@font/fz2" | |||
android:text="@string/text_calibrationspices" | |||
android:gravity="center|left" | |||
android:layout_marginBottom="5dp" | |||
android:layout_marginLeft="10dp" | |||
android:textSize="20dp" | |||
android:textColor="#5D7436"/> | |||
<ImageView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_gravity="center" | |||
android:layout_marginLeft="30dp" | |||
android:src="@mipmap/pkbdy" /> | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_marginTop="70dp" | |||
android:layout_marginRight="30dp" | |||
android:background="@mipmap/save11" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginBottom="@dimen/dp_10" | |||
android:orientation="horizontal"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_weight="10" | |||
android:gravity="center" | |||
android:layout_height="match_parent" | |||
android:orientation="vertical"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginRight="20dp" | |||
android:layout_marginLeft="30dp" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:text="@string/text_grammage" | |||
android:maxLines="1" | |||
android:layout_gravity="center" | |||
android:fontFamily="@font/fz2" | |||
android:textSize="15dp" | |||
android:textColor="@color/topbj1"/> | |||
<EditText | |||
android:id="@+id/tiaoliaobiaoding" | |||
android:layout_width="match_parent" | |||
android:layout_height="30dp" | |||
android:background="@drawable/input_bj" | |||
android:digits="0123456789" | |||
android:hint="请输入制作时长" | |||
android:layout_gravity="center" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:text="0" | |||
android:textSize="19dp" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="wrap_content" | |||
android:layout_weight="1" | |||
android:layout_marginRight="30dp" | |||
android:layout_height="match_parent"> | |||
<Button | |||
android:id="@+id/save_tlbd" | |||
android:text="@string/btn_save" | |||
android:textColor="@color/white" | |||
android:textSize="25dp" | |||
android:textStyle="bold" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_gravity="center" | |||
android:background="@drawable/btn_bg_orange" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="10dp" | |||
android:background="@mipmap/genghuanwuliao"> | |||
<Spinner | |||
android:id="@+id/editsp_wl" | |||
style="@style/commonSpinnerStyle" | |||
android:layout_height="0dp" | |||
android:layout_weight="4" | |||
android:background="@drawable/bg_siloset" | |||
android:layout_marginTop="10dp"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="35dp" | |||
android:layout_marginLeft="120dp" | |||
android:layout_marginTop="80dp" | |||
android:layout_marginRight="140dp" /> | |||
android:layout_height="match_parent" | |||
android:orientation="vertical"> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginHorizontal="10dp" | |||
android:layout_marginTop="20dp" | |||
android:background="@drawable/bg_frame_green"> | |||
<TextView | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:fontFamily="@font/fz2" | |||
android:text="@string/text_replacematerial" | |||
android:gravity="center|left" | |||
android:layout_marginBottom="5dp" | |||
android:layout_marginLeft="10dp" | |||
android:textSize="20dp" | |||
android:textColor="#5D7436"/> | |||
<RelativeLayout | |||
android:id="@+id/save_ghtl" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_marginTop="70dp" | |||
android:layout_marginRight="30dp" | |||
android:background="@mipmap/save11" /> | |||
</RelativeLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginBottom="@dimen/dp_10" | |||
android:orientation="horizontal"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_weight="10" | |||
android:gravity="center" | |||
android:layout_height="match_parent" | |||
android:orientation="vertical"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginRight="20dp" | |||
android:layout_marginLeft="30dp" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
android:text="@string/text_selectmaterial" | |||
android:layout_gravity="center" | |||
android:fontFamily="@font/fz2" | |||
android:maxLines="1" | |||
android:textSize="15dp" | |||
android:textColor="@color/topbj1"/> | |||
<Spinner | |||
android:id="@+id/editsp_wl" | |||
style="@style/commonSpinnerStyle" | |||
android:layout_marginLeft="0dp" | |||
android:layout_gravity="center" | |||
android:layout_width="match_parent" | |||
android:layout_height="30dp" | |||
/> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="wrap_content" | |||
android:layout_weight="1" | |||
android:layout_marginRight="30dp" | |||
android:layout_height="match_parent"> | |||
<Button | |||
android:id="@+id/save_ghtl" | |||
android:text="@string/btn_save" | |||
android:textColor="@color/white" | |||
android:textSize="25dp" | |||
android:textStyle="bold" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_gravity="center" | |||
android:background="@drawable/btn_bg_orange" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
</LinearLayout> | |||
@@ -212,7 +402,7 @@ | |||
<ImageView | |||
android:id="@+id/click_dcbl" | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:layout_height="wrap_content" | |||
android:src="@mipmap/dcbl" /> | |||
<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom | |||
@@ -222,7 +412,9 @@ | |||
android:layout_alignParentBottom="true" | |||
android:layout_marginLeft="40dp" | |||
app:imagesrc_ks="@mipmap/dcqx_select" | |||
app:imagesrc_tz="@mipmap/dcqx" /> | |||
app:imagesrc_tz="@mipmap/dcqx" | |||
app:imagesrc_ks_en="@mipmap/dcbl" | |||
app:imagesrc_tz_en="@mipmap/cooking" /> | |||
<ImageView | |||
android:id="@+id/click_lcjz" | |||
@@ -70,11 +70,16 @@ | |||
android:textStyle="bold" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
<TextView | |||
android:layout_marginRight="-2dp" | |||
android:layout_alignParentRight="true" | |||
android:layout_width="60dp" | |||
android:layout_height="40dp" | |||
android:background="@mipmap/silos_sz"/> | |||
android:text="@string/btn_waterset" | |||
android:textSize="25dp" | |||
android:textColor="@color/white" | |||
android:textStyle="bold" | |||
android:gravity="center" | |||
android:background="@drawable/bg_round10_yellow2_btn"/> | |||
</RelativeLayout> |
@@ -14,7 +14,7 @@ | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
android:background="@drawable/bg_round25_top_yellow" | |||
style="@style/TextView_btn_dialog" | |||
android:text="选择分类" | |||
android:text="@string/btn_selectclass" | |||
/> | |||
<TextView | |||
@@ -25,7 +25,7 @@ | |||
android:layout_marginLeft="@dimen/dp_50" | |||
app:layout_constraintTop_toTopOf="parent" | |||
android:layout_marginTop="@dimen/dp_130" | |||
android:text="选择分类:" | |||
android:text="@string/btn_selectclass_1" | |||
style="@style/TextView_desc" | |||
/> | |||
@@ -49,7 +49,7 @@ | |||
android:layout_marginLeft="@dimen/dp_20" | |||
android:layout_marginBottom="@dimen/dp_20" | |||
style="@style/TextView_btn_dialog" | |||
android:text="取消" | |||
android:text="@string/btn_cancel" | |||
/> | |||
<TextView | |||
@@ -61,7 +61,7 @@ | |||
android:layout_marginLeft="@dimen/dp_480" | |||
android:layout_marginBottom="@dimen/dp_20" | |||
style="@style/TextView_btn_dialog" | |||
android:text="下一步" | |||
android:text="@string/btn_next" | |||
/> | |||
<ImageView | |||
@@ -2,7 +2,7 @@ | |||
<RelativeLayout 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="@dimen/dp_430" | |||
android:layout_width="430dp" | |||
android:layout_height="@dimen/dp_70" | |||
android:layout_marginBottom="@dimen/dp_10" | |||
android:id="@+id/root" | |||
@@ -17,14 +17,11 @@ | |||
android:buttonTint="@color/radiusImageView_selected_mask_color"/> | |||
<TextView | |||
android:id="@+id/name" | |||
android:paddingLeft="@dimen/dp_5" | |||
android:paddingRight="@dimen/dp_10" | |||
android:layout_width="@dimen/dp_190" | |||
android:layout_width="wrap_content" | |||
android:layout_height="@dimen/dp_70" | |||
tools:text="液体料液体料液体料" | |||
tools:text="Main Possition" | |||
android:textSize="25dp" | |||
android:maxLines="1" | |||
android:maxLength="10" | |||
android:gravity="center_vertical" | |||
android:layout_centerVertical="true" | |||
android:layout_toRightOf="@id/check" | |||
@@ -45,8 +42,6 @@ | |||
android:layout_height="@dimen/dp_70" | |||
android:background="@drawable/input_bj" | |||
android:layout_alignParentRight="true" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="@dimen/dp_3" | |||
android:textSize="@dimen/sp_32" /> | |||
</RelativeLayout> |
@@ -79,6 +79,7 @@ | |||
<string name="text_potdirection_1">Please control the pan direction: Extraction Position</string> | |||
<string name="text_potdirection_2">Please control the pan direction: Clean Position</string> | |||
<string name="text_waterset">Null</string> | |||
<string name="btn_waterset">Set</string> | |||
<string name="btn_pourmeal">Pour Out Meal-按钮</string> | |||
<string name="btn_putmeal">Feed-按钮</string> | |||
<string name="text_waitput">Please wait for the end of the last feeding!!!</string> | |||
@@ -137,6 +138,8 @@ | |||
<string name="info_selectprocess">Please select the subattribute for each row!</string> | |||
<string name="btn_addclass">Add Class</string> | |||
<string name="text_deleteinfo">Delete or Not?</string> | |||
<string name="btn_selectclass">Select Class</string> | |||
<string name="btn_selectclass_1">Select Class:</string> | |||
<string name="top_editclass">Edit Class</string> | |||
<string name="text_noselect">Unselect</string> | |||
<string name="text_attribute">Attribute</string> | |||
@@ -160,4 +163,19 @@ | |||
<string name="text_haveprocess_1">Existential process</string> | |||
<string name="text_haveprocess_2">Non-existent process</string> | |||
<string name="text_haveprocess_3">Unable to import while editing</string> | |||
<string name="text_cooking">Cooking</string> | |||
<string name="text_waitstart">Wait starting</string> | |||
<string name="text_expect">Expect to wait</string> | |||
<string name="btn_liquid">Liquid</string> | |||
<string name="text_Silo"> Bit Silo</string> | |||
<string name="text_capacityset">Capacity set</string> | |||
<string name="text_totalcapacity">Total Capacity:</string> | |||
<string name="text_alarmcapacity">Alarm Capacity:</string> | |||
<string name="text_calibrationspices">Calibration Spices</string> | |||
<string name="text_grammage">Grammage:</string> | |||
<string name="text_replacematerial">Replace Material</string> | |||
<string name="text_selectmaterial">Select Material:</string> | |||
<string name="btn_save">Save</string> | |||
<string name="text_valve">④(Valve)</string> | |||
<string name="text_servedish">Serve Dish</string> | |||
</resources> |
@@ -8,6 +8,9 @@ | |||
<attr name="imagesrc_ks" format="reference" /> | |||
<attr name="imagesrc_tz" format="reference" /> | |||
<attr name="imagesrc_qt" format="reference" /> | |||
<attr name="imagesrc_ks_en" format="reference" /> | |||
<attr name="imagesrc_tz_en" format="reference" /> | |||
<attr name="imagesrc_qt_en" format="reference" /> | |||
</declare-styleable> | |||
<declare-styleable name="myMagicProgress"> | |||
@@ -79,6 +79,7 @@ | |||
<string name="text_potdirection_1">请先控制锅口朝向:抽料位</string> | |||
<string name="text_potdirection_2">请先控制锅口朝向:清洗位</string> | |||
<string name="text_waterset">未设置</string> | |||
<string name="btn_waterset">设置</string> | |||
<string name="btn_pourmeal">出 餐-按钮</string> | |||
<string name="btn_putmeal">投料-按钮</string> | |||
<string name="text_waitput">请耐心等待上一次投料结束!!!</string> | |||
@@ -135,6 +136,8 @@ | |||
<string name="info_datanull">数据为空</string> | |||
<string name="info_editprocess">该组合没有工序,请先编辑工序</string> | |||
<string name="info_selectprocess">请选择每行对应的子属性!</string> | |||
<string name="btn_selectclass">选择分类</string> | |||
<string name="btn_selectclass_1">选择分类:</string> | |||
<string name="btn_addclass">添加分类</string> | |||
<string name="text_deleteinfo">是否删除?</string> | |||
<string name="top_editclass">编辑分类</string> | |||
@@ -160,4 +163,19 @@ | |||
<string name="text_haveprocess_1">存在分组</string> | |||
<string name="text_haveprocess_2">不存在分组</string> | |||
<string name="text_haveprocess_3">正在编辑无法导入</string> | |||
<string name="text_cooking">菜谱烹饪</string> | |||
<string name="text_waitstart">等待开始</string> | |||
<string name="text_expect">预计等待</string> | |||
<string name="btn_liquid">液料</string> | |||
<string name="text_Silo"> 号料仓</string> | |||
<string name="text_capacityset">容量设置</string> | |||
<string name="text_totalcapacity">总容量:</string> | |||
<string name="text_alarmcapacity">告警容量:</string> | |||
<string name="text_calibrationspices">调料标定</string> | |||
<string name="text_grammage">克重:</string> | |||
<string name="text_replacematerial">更换物料</string> | |||
<string name="text_selectmaterial">物料选择:</string> | |||
<string name="btn_save">保存</string> | |||
<string name="text_valve">④(水阀)</string> | |||
<string name="text_servedish">出餐</string> | |||
</resources> |