@@ -0,0 +1,329 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<project version="4"> | |||
<component name="direct_access_persist.xml"> | |||
<option name="deviceSelectionList"> | |||
<list> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="27" /> | |||
<option name="brand" value="DOCOMO" /> | |||
<option name="codename" value="F01L" /> | |||
<option name="id" value="F01L" /> | |||
<option name="manufacturer" value="FUJITSU" /> | |||
<option name="name" value="F-01L" /> | |||
<option name="screenDensity" value="360" /> | |||
<option name="screenX" value="720" /> | |||
<option name="screenY" value="1280" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="28" /> | |||
<option name="brand" value="DOCOMO" /> | |||
<option name="codename" value="SH-01L" /> | |||
<option name="id" value="SH-01L" /> | |||
<option name="manufacturer" value="SHARP" /> | |||
<option name="name" value="AQUOS sense2 SH-01L" /> | |||
<option name="screenDensity" value="480" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2160" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="Lenovo" /> | |||
<option name="codename" value="TB370FU" /> | |||
<option name="id" value="TB370FU" /> | |||
<option name="manufacturer" value="Lenovo" /> | |||
<option name="name" value="Tab P12" /> | |||
<option name="screenDensity" value="340" /> | |||
<option name="screenX" value="1840" /> | |||
<option name="screenY" value="2944" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="31" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="a51" /> | |||
<option name="id" value="a51" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy A51" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="akita" /> | |||
<option name="id" value="akita" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 8a" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="b0q" /> | |||
<option name="id" value="b0q" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy S22 Ultra" /> | |||
<option name="screenDensity" value="600" /> | |||
<option name="screenX" value="1440" /> | |||
<option name="screenY" value="3088" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="32" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="bluejay" /> | |||
<option name="id" value="bluejay" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 6a" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="caiman" /> | |||
<option name="id" value="caiman" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 9 Pro" /> | |||
<option name="screenDensity" value="360" /> | |||
<option name="screenX" value="960" /> | |||
<option name="screenY" value="2142" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="comet" /> | |||
<option name="id" value="comet" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 9 Pro Fold" /> | |||
<option name="screenDensity" value="390" /> | |||
<option name="screenX" value="2076" /> | |||
<option name="screenY" value="2152" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="29" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="crownqlteue" /> | |||
<option name="id" value="crownqlteue" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy Note9" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="2220" /> | |||
<option name="screenY" value="1080" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="dm3q" /> | |||
<option name="id" value="dm3q" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy S23 Ultra" /> | |||
<option name="screenDensity" value="600" /> | |||
<option name="screenX" value="1440" /> | |||
<option name="screenY" value="3088" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="e1q" /> | |||
<option name="id" value="e1q" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy S24" /> | |||
<option name="screenDensity" value="480" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2340" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="felix" /> | |||
<option name="id" value="felix" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel Fold" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="2208" /> | |||
<option name="screenY" value="1840" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="felix" /> | |||
<option name="id" value="felix" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel Fold" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="2208" /> | |||
<option name="screenY" value="1840" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="felix_camera" /> | |||
<option name="id" value="felix_camera" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel Fold (Camera-enabled)" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="2208" /> | |||
<option name="screenY" value="1840" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="gts8uwifi" /> | |||
<option name="id" value="gts8uwifi" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy Tab S8 Ultra" /> | |||
<option name="screenDensity" value="320" /> | |||
<option name="screenX" value="1848" /> | |||
<option name="screenY" value="2960" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="husky" /> | |||
<option name="id" value="husky" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 8 Pro" /> | |||
<option name="screenDensity" value="390" /> | |||
<option name="screenX" value="1008" /> | |||
<option name="screenY" value="2244" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="30" /> | |||
<option name="brand" value="motorola" /> | |||
<option name="codename" value="java" /> | |||
<option name="id" value="java" /> | |||
<option name="manufacturer" value="Motorola" /> | |||
<option name="name" value="G20" /> | |||
<option name="screenDensity" value="280" /> | |||
<option name="screenX" value="720" /> | |||
<option name="screenY" value="1600" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="komodo" /> | |||
<option name="id" value="komodo" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 9 Pro XL" /> | |||
<option name="screenDensity" value="360" /> | |||
<option name="screenX" value="1008" /> | |||
<option name="screenY" value="2244" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="lynx" /> | |||
<option name="id" value="lynx" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 7a" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="31" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="oriole" /> | |||
<option name="id" value="oriole" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 6" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="panther" /> | |||
<option name="id" value="panther" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 7" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="q5q" /> | |||
<option name="id" value="q5q" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy Z Fold5" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1812" /> | |||
<option name="screenY" value="2176" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="q6q" /> | |||
<option name="id" value="q6q" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy Z Fold6" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1856" /> | |||
<option name="screenY" value="2160" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="30" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="r11" /> | |||
<option name="id" value="r11" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel Watch" /> | |||
<option name="screenDensity" value="320" /> | |||
<option name="screenX" value="384" /> | |||
<option name="screenY" value="384" /> | |||
<option name="type" value="WEAR_OS" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="30" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="redfin" /> | |||
<option name="id" value="redfin" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 5" /> | |||
<option name="screenDensity" value="440" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2340" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="shiba" /> | |||
<option name="id" value="shiba" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 8" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="tangorpro" /> | |||
<option name="id" value="tangorpro" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel Tablet" /> | |||
<option name="screenDensity" value="320" /> | |||
<option name="screenX" value="1600" /> | |||
<option name="screenY" value="2560" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="tokay" /> | |||
<option name="id" value="tokay" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 9" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2424" /> | |||
</PersistentDeviceSelectionData> | |||
</list> | |||
</option> | |||
</component> | |||
</project> |
@@ -83,8 +83,11 @@ | |||
android:windowSoftInputMode="adjustPan" | |||
android:screenOrientation="landscape" | |||
android:exported="false" /> | |||
<activity | |||
android:name=".newui.activity.PlcDebugActivity" | |||
android:windowSoftInputMode="adjustPan" | |||
android:screenOrientation="landscape" | |||
android:exported="false" /> | |||
<provider | |||
android:name="androidx.core.content.FileProvider" | |||
@@ -43,17 +43,14 @@ public class ExecuteTheRecipe { | |||
public static int whileTime = 600; | |||
public static void reset1(int deviceNum){ | |||
if(deviceNum == 1){ | |||
ConfigName.IsForcedEnd[0] = false; | |||
ConfigName.IsPause[0] = false; | |||
ConfigName.MakeStatus[0] = false; | |||
ConfigName.IsStart[0] = false; | |||
}else if(deviceNum == 2){ | |||
ConfigName.IsForcedEnd[1] = false; | |||
ConfigName.IsPause[1] = false; | |||
ConfigName.MakeStatus[1] = false; | |||
ConfigName.IsStart[1] = false; | |||
try{ | |||
ConfigName.IsForcedEnd[deviceNum-1] = false; | |||
ConfigName.IsPause[deviceNum-1] = false; | |||
ConfigName.MakeStatus[deviceNum-1] = false; | |||
ConfigName.IsStart[deviceNum-1] = false; | |||
}catch (Exception e){ | |||
showToastErrorTip("异常 "+e.getMessage()); | |||
LogUtils.d("异常 "+e.getMessage()); | |||
} | |||
} | |||
@@ -68,7 +65,7 @@ public class ExecuteTheRecipe { | |||
if (ConfigName.MakeStatus[orderDetail.type-1] && orderDetail != null) { | |||
boolean isError = false; | |||
long startTime = System.currentTimeMillis(); //起始时间 | |||
showlog("开始烹饪菜谱【" + orderDetail.goodsName + "】"); | |||
showlog(orderDetail.type,"开始烹饪菜谱【" + orderDetail.goodsName + "】"); | |||
try { | |||
//获取工艺 | |||
ArrayList<BPA_GOODS_PROCESS_DETAIL> goodsrecipes = GoodsProcessDetailDBUtil.getByGroupId(orderDetail.groupId); | |||
@@ -93,27 +90,51 @@ public class ExecuteTheRecipe { | |||
if(!goodsrecipes.isEmpty()){ | |||
ConfigName.hasClear[orderDetail.type-1] = goodsrecipes.get(goodsrecipes.size()-1).processname.contains("清洗"); | |||
} | |||
EventBus.getDefault().post(new MakingStepEvent(orderDetail.type,1)); | |||
orderDetail.process=1; | |||
orderDetail.status=1; | |||
OrderDetailUtil.update(orderDetail); | |||
//是否允许取料 | |||
String name = "翻转轴1允许机器人放盒取盒"; | |||
String name2 = "翻转轴2允许机器人放盒取盒"; | |||
boolean permissionTakePen = false; | |||
long a = System.currentTimeMillis(); | |||
while (!permissionTakePen && !ConfigName.IsForcedEnd[orderDetail.type-1]) { | |||
if ((System.currentTimeMillis() - a) > 1000 * (whileTime)) { | |||
return; | |||
} else { | |||
Object object1 = ReadPLC(orderDetail.type,name);//ListeningValue.get(name); | |||
Object object2 = ReadPLC(orderDetail.type,name2);//ListeningValue.get(name); | |||
if (object1 != null) { | |||
permissionTakePen = (boolean) (object1) && (boolean) (object2); | |||
} | |||
LogUtils.d(" Write_PLC_RebackPen:"+orderDetail.type +" 允许机器人放盒取盒"+object1+object2); | |||
if (permissionTakePen) { | |||
RecordManager.getInstance().addLogRecord("订单处理日志",orderDetail.type+"号炒锅-" + ",允许机器人放盒取盒:"+object1+object2); | |||
}else { | |||
RecordManager.getInstance().addLogRecord("订单处理日志",orderDetail.type+"号炒锅-" + ",不允许机器人放盒取盒:"+object1+object2); | |||
showToastErrorTip(orderDetail.type+"号炒锅-"+"不允许机器人放盒取盒"); | |||
} | |||
} | |||
Thread.sleep(100); | |||
} | |||
Wait_Robot_No_Working(orderDetail.type); | |||
ConfigName.RobotIsWorking[orderDetail.type-1] = true; | |||
ModbusCenter.robotWritePlc(true,orderDetail.mainPosition+"#库取原料",true,null); | |||
RobotModbusTcpServer.get().WriteShort("GI1", (short) orderDetail.type, null); | |||
Thread.sleep(5000); | |||
Thread.sleep(1000); | |||
ThreadWhile(orderDetail.type,orderDetail.type+"#炒锅放原料盆完成"); | |||
ConfigName.RobotIsWorking[orderDetail.type-1] = false; | |||
EventBus.getDefault().post(new MakingStepEvent(orderDetail.type,1)); | |||
orderDetail.process=1; | |||
orderDetail.status=1; | |||
OrderDetailUtil.update(orderDetail); | |||
for (BPA_GOODS_PROCESS_DETAIL item : goodsrecipes) { | |||
if(!ConfigName.MakeStatus[orderDetail.type-1]){ | |||
RecordManager.getInstance().addLogRecord("订单处理日志",orderDetail.type+"号炒锅-"+",MakeStatus=false"); | |||
return; | |||
} | |||
while (ConfigName.IsPause[orderDetail.type-1]) { | |||
NewToastUtil.getInstance().showToast("当前菜品已暂停制作!"); | |||
showToastTip(orderDetail.type+"号炒锅,"+"当前菜品已暂停制作!"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",orderDetail.type+"号炒锅-"+",当前菜品已暂停制作"); | |||
Thread.sleep(500); | |||
@@ -141,7 +162,7 @@ public class ExecuteTheRecipe { | |||
isError = true; | |||
orderDetail.status = 3; | |||
OrderDetailUtil.update(orderDetail); | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(orderDetail.type+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
EventBus.getDefault().post(new MakingStepEvent(orderDetail.type,-1)); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",orderDetail.type+"号炒锅("+orderDetail.goodsName+"-"+orderDetail.groupName+")-制作异常:"+ex.getMessage()); | |||
RecordManager.getInstance().addOrderRecords(orderDetail,orderDetail.type+"号炒锅-"+"异常"); | |||
@@ -169,7 +190,7 @@ public class ExecuteTheRecipe { | |||
long endTime = System.currentTimeMillis(); //结束时间 | |||
int time = (int) ((endTime - startTime) / 1000); | |||
Log.e("运行时长", String.format("方法使用时间 %d s", time)); | |||
showlog("结束烹饪菜谱【" + orderDetail.goodsName + "】,关闭搅拌、关闭加热," + String.format("方法使用时间 %d s", time)); | |||
showlog(orderDetail.type,"结束烹饪菜谱【" + orderDetail.goodsName + "】," + String.format("方法使用时间 %d s", time)); | |||
if (ConfigName.IsForcedEnd[orderDetail.type-1])//强制结束 | |||
@@ -178,10 +199,8 @@ public class ExecuteTheRecipe { | |||
orderDetail.process = 0; | |||
OrderDetailUtil.update(orderDetail); | |||
EventBus.getDefault().post(new MakingStepEvent(orderDetail.type,-2)); | |||
NewToastUtil.getInstance().showToast("客官,当前菜品已强制结束!!!"); | |||
//初始化 | |||
// BottomClick("初始化"); | |||
showlog("菜谱【" + orderDetail.goodsName + "】已强制结束..."); | |||
showlog(orderDetail.type,"菜谱【" + orderDetail.goodsName + "】已强制结束..."); | |||
ConfigName.IsForcedEnd[orderDetail.type-1] = false; | |||
RecordManager.getInstance().addLogRecord("订单处理日志",orderDetail.type+"号炒锅("+orderDetail.goodsName+"-"+orderDetail.groupName+")-制作取消"); | |||
RecordManager.getInstance().addOrderRecords(orderDetail,orderDetail.type+"号炒锅-"+"取消"); | |||
@@ -200,7 +219,9 @@ public class ExecuteTheRecipe { | |||
} | |||
Thread.sleep(1000); | |||
} catch (InterruptedException e) { | |||
NewToastUtil.getInstance().showToast("异常信息:" + e.getMessage()); | |||
showToastTip(orderDetail.type+"号炒锅,"+"异常信息:" + e.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",orderDetail.type+"号炒锅,"+"异常信息:" + e.getMessage()); | |||
} | |||
} | |||
})); | |||
@@ -218,14 +239,14 @@ public class ExecuteTheRecipe { | |||
try { | |||
//1.解析 | |||
if (ConfigName.IsForcedEnd[deviceNum-1]) { | |||
showlog("客官,小菠萝正在强制结束当前炒制菜品,请耐心等候!!!"); | |||
showlog(deviceNum,"客官,小菠萝正在强制结束当前炒制菜品,请耐心等候!!!"); | |||
return false; | |||
} | |||
if(deviceNum==1){ | |||
while (!Wok1ModbusTcpServer.get().plcIsConnect||!RobotModbusTcpServer.get().plcIsConnect | |||
&&!ConfigName.IsForcedEnd[deviceNum-1]){ | |||
try{ | |||
showlog("客官,检测到硬件已经断开连接,等待重连!!!"); | |||
showlog(deviceNum,"客官,检测到硬件已经断开连接,等待重连!!!"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+" 检测到硬件已经断开连接,等待连接中 Wok:" | |||
+deviceNum + Wok1ModbusTcpServer.get().plcIsConnect+" Robot:"+RobotModbusTcpServer.get().plcIsConnect); | |||
Thread.sleep(100); | |||
@@ -237,7 +258,7 @@ public class ExecuteTheRecipe { | |||
while (!Wok2ModbusTcpServer.get().plcIsConnect||!RobotModbusTcpServer.get().plcIsConnect | |||
&&!ConfigName.IsForcedEnd[deviceNum-1]){ | |||
try{ | |||
showlog("客官,检测到硬件已经断开连接,等待重连!!!"); | |||
showlog(deviceNum,"客官,检测到硬件已经断开连接,等待重连!!!"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+" 检测到硬件已经断开连接,等待连接中 Wok:" | |||
+deviceNum +Wok2ModbusTcpServer.get().plcIsConnect+" Robot:"+RobotModbusTcpServer.get().plcIsConnect); | |||
Thread.sleep(100); | |||
@@ -249,7 +270,7 @@ public class ExecuteTheRecipe { | |||
while (!Wok3ModbusTcpServer.get().plcIsConnect||!RobotModbusTcpServer.get().plcIsConnect | |||
&&!ConfigName.IsForcedEnd[deviceNum-1]){ | |||
try{ | |||
showlog("客官,检测到硬件已经断开连接,等待重连!!!"); | |||
showlog(deviceNum,"客官,检测到硬件已经断开连接,等待重连!!!"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+" 检测到硬件已经断开连接,等待连接中 Wok:" | |||
+deviceNum +Wok3ModbusTcpServer.get().plcIsConnect+" Robot:"+RobotModbusTcpServer.get().plcIsConnect); | |||
Thread.sleep(100); | |||
@@ -261,7 +282,7 @@ public class ExecuteTheRecipe { | |||
while (!Wok4ModbusTcpServer.get().plcIsConnect||!RobotModbusTcpServer.get().plcIsConnect | |||
&&!ConfigName.IsForcedEnd[deviceNum-1]){ | |||
try{ | |||
showlog("客官,检测到硬件已经断开连接,等待重连!!!"); | |||
showlog(deviceNum,"客官,检测到硬件已经断开连接,等待重连!!!"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+" 检测到硬件已经断开连接,等待连接中 Wok:" | |||
+deviceNum +Wok4ModbusTcpServer.get().plcIsConnect+" Robot:"+RobotModbusTcpServer.get().plcIsConnect); | |||
Thread.sleep(100); | |||
@@ -283,12 +304,12 @@ public class ExecuteTheRecipe { | |||
{ | |||
Object gz = ReadPLC(deviceNum,"异常加热故障信息"); | |||
if (gz != null && (boolean) gz && !ConfigName.TEST) { | |||
showlog("客官,检测到硬件加热异常,已主动停止炒制,请联系海科人员!!!"); | |||
showlog(deviceNum,"客官,检测到硬件加热异常,已主动停止炒制,请联系海科人员!!!"); | |||
ConfigName.IsForcedEnd[deviceNum-1] = true; | |||
String title = "加热异常-温馨提示!"; | |||
String message = "客官硬件加热异常,请联系海科人员,已强制停止炒制!"; | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅("+deviceNum+")-加热异常"); | |||
NewToastUtil.getInstance().showToastError(title+message); | |||
showToastErrorTip(deviceNum+"号炒锅,"+title+message); | |||
return false; | |||
} | |||
} | |||
@@ -306,8 +327,10 @@ public class ExecuteTheRecipe { | |||
ExecuteOperationSteps(deviceNum,recipe.processname, recipe.processvalue,mainPosition); | |||
} | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
status = false; | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
} finally { | |||
return status; | |||
} | |||
@@ -354,7 +377,7 @@ public class ExecuteTheRecipe { | |||
BPA_SILOS silos = bpa_silos.get(0); | |||
if (val >= 32767) { | |||
val = 32767; | |||
showlog("料仓" + silos.num + "出量克数溢出,已按照最大出量出料!!!"); | |||
showlog(deviceNum,"料仓" + silos.num + "出量克数溢出,已按照最大出量出料!!!"); | |||
} | |||
formulation.put(silos, val); | |||
@@ -365,8 +388,9 @@ public class ExecuteTheRecipe { | |||
int ztime = (int) (val / (jzzz_1 / 5.0)); | |||
MaxValue = ztime > MaxValue ? ztime : MaxValue; | |||
}else { | |||
NewToastUtil.getInstance().showToastError("料仓" + silos.num + "校准值为空"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志","料仓" + silos.num + "校准值为空"); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"料仓" + silos.num + "校准值为空"); | |||
LogUtils.d("料仓" + silos.num + "校准值为空"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"料仓" + silos.num + "校准值为空"); | |||
} | |||
} | |||
} | |||
@@ -389,7 +413,9 @@ public class ExecuteTheRecipe { | |||
} | |||
} | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
@@ -430,10 +456,8 @@ public class ExecuteTheRecipe { | |||
//写入PLC | |||
if (formulation.size() > 0) { | |||
switch (processname){ | |||
case "主料": | |||
case "辅料": | |||
case "出菜": | |||
//等待机器人工作 关闭加热或搅拌 | |||
boolean isJre; | |||
Object K = ReadPLC(deviceNum,"加热"); | |||
@@ -525,9 +549,7 @@ public class ExecuteTheRecipe { | |||
Write_PLC_Heating(deviceNum,formulation); | |||
break; | |||
case "主料": | |||
ConfigName.RobotIsWorking[deviceNum-1] = true; | |||
Write_PLC_MainIngredients(deviceNum,formulation); | |||
ConfigName.RobotIsWorking[deviceNum-1] = false; | |||
break; | |||
case "辅料": | |||
ConfigName.RobotIsWorking[deviceNum-1] = true; | |||
@@ -552,7 +574,9 @@ public class ExecuteTheRecipe { | |||
} | |||
} | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
@@ -576,14 +600,14 @@ public class ExecuteTheRecipe { | |||
@Override | |||
public void onSuccess() { | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-"+"物料"+"料仓" + silos.num + "需求值"+val+"写入成功"); | |||
// showlog("需求值写入成功!"); | |||
// showlog(deviceNum,"需求值写入成功!"); | |||
IsComplete[0] = true; | |||
} | |||
@Override | |||
public void onFailure(String ErrorMsg) { | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-"+"物料"+"料仓" + silos.num + "需求值"+val+"写入失败:"+ErrorMsg); | |||
showlog("需求值写入失败!尝试再次写入...错误原因:" + ErrorMsg); | |||
showlog(deviceNum,"需求值写入失败!尝试再次写入...错误原因:" + ErrorMsg); | |||
WritePLC(deviceNum,"料仓" + silos.num + "需求值", val, null); | |||
IsComplete[0] = true; | |||
} | |||
@@ -597,7 +621,9 @@ public class ExecuteTheRecipe { | |||
int otherG = silos.silosmargin - (val / 10); | |||
QueryDB.UpdateYL(silos.id, otherG >= 0 ? otherG : 0); | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
@@ -617,7 +643,7 @@ public class ExecuteTheRecipe { | |||
if (key.contains("(秒)")) { | |||
val = Integer.parseInt(value); | |||
} else { | |||
NewToastUtil.getInstance().showToast("工序:" + key + "," + value); | |||
showToastTip(deviceNum+"号炒锅,"+"工序:" + key + "," + value); | |||
writeValue = GetMXValue(key, value); | |||
int finalWriteValue = writeValue; | |||
WritePLC(deviceNum,key, writeValue, new IWriteCallBack() { | |||
@@ -664,7 +690,9 @@ public class ExecuteTheRecipe { | |||
ThreadDelay(deviceNum,val,"Write_PLC_Stir"); | |||
} | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
@@ -707,7 +735,9 @@ public class ExecuteTheRecipe { | |||
ThreadDelay(deviceNum,val,"Write_PLC_Location"); | |||
} | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
@@ -839,7 +869,9 @@ public class ExecuteTheRecipe { | |||
} | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
@@ -895,7 +927,9 @@ public class ExecuteTheRecipe { | |||
ThreadDelay(deviceNum,val,"Write_PLC_ParallelDischarge"); | |||
} | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
@@ -915,7 +949,9 @@ public class ExecuteTheRecipe { | |||
} | |||
} | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
@@ -926,7 +962,7 @@ public class ExecuteTheRecipe { | |||
*/ | |||
private static void Write_PLC_CleanPan(int deviceNum,HashMap<String, String> data) { | |||
try { | |||
showlog("准备清洗!"); | |||
showlog(deviceNum,"准备清洗!"); | |||
String qx_type = "一般清洗"; | |||
int val_csl=0; | |||
int clearTime = 150; | |||
@@ -935,7 +971,7 @@ public class ExecuteTheRecipe { | |||
for (HashMap.Entry<String, String> entry : data.entrySet()) { | |||
String key = entry.getKey(); | |||
String value = entry.getValue(); | |||
NewToastUtil.getInstance().showToast("工序:" + key + "," + value); | |||
showToastTip(deviceNum+"号炒锅,"+"工序:" + key + "," + value); | |||
if (key.contains("(秒)") && !ConfigName.IsForcedEnd[deviceNum-1]) { | |||
int val = Integer.parseInt(value); | |||
ThreadDelay(deviceNum,val,"Write_PLC_CleanPan"); | |||
@@ -968,10 +1004,12 @@ public class ExecuteTheRecipe { | |||
//等待清洗完成 | |||
ThreadWhileClear(deviceNum,"炒锅清洗反馈", 5); | |||
Make位置(deviceNum,"原点位"); | |||
showlog("炒锅清洗完成!"); | |||
NewToastUtil.getInstance().showToast("炒锅清洗完成"); | |||
showlog(deviceNum,"炒锅清洗完成!"); | |||
showToastTip(deviceNum+"号炒锅,"+"炒锅清洗完成"); | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
@@ -998,7 +1036,9 @@ public class ExecuteTheRecipe { | |||
} | |||
}catch (Exception ex){ | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
@@ -1009,10 +1049,11 @@ public class ExecuteTheRecipe { | |||
*/ | |||
public static void Write_PLC_MainIngredients(int deviceNum,HashMap<String, String> data) { | |||
try { | |||
showlog("准备倒入主料!"); | |||
Thread.sleep(50); | |||
showlog(deviceNum,"准备倒入主料!"); | |||
//判断炒制位置 | |||
String czwz = "炒菜位高"; | |||
String foodPosition = "Z1"; | |||
String foodPosition = "1号位"; | |||
String foodName = ""; | |||
for (HashMap.Entry<String, String> entry : data.entrySet()) { | |||
@@ -1021,36 +1062,18 @@ public class ExecuteTheRecipe { | |||
if (key.contains("炒制位置")) { | |||
czwz = value; | |||
}else if(key.contains("主料位置")){ | |||
foodPosition = value.replace("Z",""); | |||
if (value.contains("1号位") || value.contains("2号位")) { | |||
foodPosition = value; | |||
} | |||
}else if(key.contains("主料名称")){ | |||
foodName = value; | |||
} | |||
} | |||
boolean isJre = false; | |||
Object K = ReadPLC(deviceNum,"加热"); | |||
isJre = K == null ? false : (boolean) K; | |||
if (isJre && ConfigName.getInstance().WhetherManualFeedingSuspended.contains("是")) { | |||
WritePLC(deviceNum,"加热", false, null); | |||
}//提前关闭加热 | |||
Make位置(deviceNum,"原点位"); | |||
//检测盆是否存在 | |||
// ThreadWhile(foodPosition+"#料仓检测有无"); | |||
Wait_Robot_No_Working(deviceNum);//等待机器人空闲 | |||
if(!ConfigName.MakeStatus[deviceNum-1]){ | |||
return; | |||
} | |||
ModbusCenter.robotWritePlc(true,foodPosition+"#位取原料",true,null); | |||
RobotModbusTcpServer.get().WriteShort("GI1", (short) deviceNum, null); | |||
Thread.sleep(2000); | |||
ThreadWhile(deviceNum,deviceNum+"#炒锅放原料盆完成"); | |||
if (isJre && ConfigName.getInstance().WhetherManualFeedingSuspended.contains("是")) { | |||
WritePLC(deviceNum,"加热", true, null); | |||
}//再次释放加热 | |||
Make位置(deviceNum,"炒菜位高"); | |||
//2.给倒菜启动 | |||
BottomClick1(deviceNum,"主料" + foodPosition); | |||
ThreadWhile(deviceNum,foodPosition + "倒菜完成"); | |||
Make位置(deviceNum,czwz); | |||
//判断是否有烹饪时间 | |||
@@ -1069,7 +1092,9 @@ public class ExecuteTheRecipe { | |||
Thread.sleep(5000); | |||
} | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
}finally { | |||
} | |||
} | |||
@@ -1080,7 +1105,7 @@ public class ExecuteTheRecipe { | |||
*/ | |||
public static void Write_PLC_MainIngredients_shoudong(int deviceNum,HashMap<String, String> data) { | |||
try { | |||
showlog("准备倒入主料!"); | |||
showlog(deviceNum,"准备倒入主料!"); | |||
//判断炒制位置 | |||
String czwz = "炒菜位高"; | |||
String foodPosition = "Z1"; | |||
@@ -1124,7 +1149,9 @@ public class ExecuteTheRecipe { | |||
Make位置(deviceNum,czwz); | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
}finally { | |||
} | |||
} | |||
@@ -1136,7 +1163,8 @@ public class ExecuteTheRecipe { | |||
*/ | |||
public static void Write_PLC_MainAccessory(int deviceNum,HashMap<String, String> data) { | |||
try { | |||
showlog("准备倒入辅料!"); | |||
Thread.sleep(50); | |||
showlog(deviceNum,"准备倒入辅料!"); | |||
//判断炒制位置 | |||
String czwz = "炒菜位高"; | |||
String foodPosition = "F1"; | |||
@@ -1195,7 +1223,9 @@ public class ExecuteTheRecipe { | |||
Thread.sleep(5000); | |||
} | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
}finally { | |||
} | |||
} | |||
@@ -1206,7 +1236,7 @@ public class ExecuteTheRecipe { | |||
*/ | |||
public static void Write_PLC_MainAccessory_shoudong(int deviceNum,HashMap<String, String> data) { | |||
try { | |||
showlog("准备倒入辅料!"); | |||
showlog(deviceNum,"准备倒入辅料!"); | |||
//判断炒制位置 | |||
String czwz = "炒菜位高"; | |||
String foodPosition = "F1"; | |||
@@ -1250,7 +1280,9 @@ public class ExecuteTheRecipe { | |||
Make位置(deviceNum,czwz); | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
}finally { | |||
} | |||
} | |||
@@ -1262,13 +1294,14 @@ public class ExecuteTheRecipe { | |||
*/ | |||
public static void Write_PLC_MainOutdishes(int deviceNum,HashMap<String, String> data,int mainPosition) { | |||
try { | |||
showlog("准备出菜!"); | |||
Thread.sleep(50); | |||
showlog(deviceNum,"准备出菜!"); | |||
//先延迟 | |||
for (HashMap.Entry<String, String> entry : data.entrySet()) { | |||
String key = entry.getKey(); | |||
String value = entry.getValue(); | |||
NewToastUtil.getInstance().showToast("工序:" + key + "," + value); | |||
showToastTip(deviceNum+"号炒锅,"+"工序:" + key + "," + value); | |||
if (key.contains("(秒)")) { | |||
int val = Integer.parseInt(value); | |||
ThreadDelay(deviceNum,val,"Write_PLC_MainOutdishes"); | |||
@@ -1277,7 +1310,7 @@ public class ExecuteTheRecipe { | |||
WritePLC(deviceNum,"加热", false, null); | |||
showlog("关闭搅拌、关闭加热!"); | |||
showlog(deviceNum,"关闭搅拌、关闭加热!"); | |||
Wait_Robot_No_Working(deviceNum);//等待机器人空闲 | |||
@@ -1298,7 +1331,7 @@ public class ExecuteTheRecipe { | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-" + ",空盆库位检测有无:异常"); | |||
} | |||
if(!isCheck){ | |||
NewToastUtil.getInstance().showToast("请检测出餐盆是否放置正确!"); | |||
showToastTip(deviceNum+"号炒锅,"+"请检测出餐盆是否放置正确!"); | |||
}else { | |||
if(deviceNum==1){ | |||
index = 31; | |||
@@ -1421,9 +1454,11 @@ public class ExecuteTheRecipe { | |||
} | |||
ConfigName.getInstance().isPutFinish = true; | |||
} | |||
showlog("出菜完成,锅体准备回到原位!"); | |||
showlog(deviceNum,"出菜完成,锅体准备回到原位!"); | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
@@ -1454,7 +1489,7 @@ public class ExecuteTheRecipe { | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-" + ",允许机器人放盒取盒:"+object1+object2); | |||
}else { | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-" + ",不允许机器人放盒取盒:"+object1+object2); | |||
NewToastUtil.getInstance().showToastError(deviceNum+"号炒锅-"+"允许机器人放盒取盒"); | |||
showToastErrorTip(deviceNum+"号炒锅-"+"不允许机器人放盒取盒"); | |||
} | |||
} | |||
Thread.sleep(100); | |||
@@ -1464,7 +1499,7 @@ public class ExecuteTheRecipe { | |||
return; | |||
} | |||
ConfigName.RobotIsWorking[deviceNum-1] = true; | |||
NewToastUtil.getInstance().showToastError(deviceNum + "#炒锅投料位取原料空盆 放回Z"+mainPosition); | |||
showToastTip(deviceNum + "#炒锅投料位取原料空盆 放回Z"+mainPosition); | |||
ModbusCenter.robotWritePlc(true, deviceNum + "#炒锅投料位取原料空盆", true, new IWriteCallBack() { | |||
@Override | |||
public void onSuccess() { | |||
@@ -1491,7 +1526,9 @@ public class ExecuteTheRecipe { | |||
ThreadWhile(deviceNum,mainPosition+"#库原料空盆放回完成"); | |||
ConfigName.RobotIsWorking[deviceNum-1] = false; | |||
}catch (Exception ex){ | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
}finally { | |||
ConfigName.RobotIsWorking[deviceNum-1] = false; | |||
} | |||
@@ -1518,10 +1555,12 @@ public class ExecuteTheRecipe { | |||
public void onFailure(String ErrorMsg) { | |||
} | |||
}); | |||
NewToastUtil.getInstance().showToast("火力按钮点击,当前级别:" + data); | |||
showToastTip(deviceNum+"号炒锅,"+"火力按钮点击,当前级别:" + data); | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip(deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅,"+"异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
@@ -1592,7 +1631,8 @@ public class ExecuteTheRecipe { | |||
} | |||
} | |||
} catch (Exception ex) { | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
showToastErrorTip("异常信息:" + ex.getMessage()); | |||
LogUtils.d("异常信息:" + ex.getMessage()); | |||
} finally { | |||
return ReturnsVariable[0]; | |||
} | |||
@@ -1617,7 +1657,7 @@ public class ExecuteTheRecipe { | |||
int mmmm = delay - (int) ((System.currentTimeMillis() - startTime) / 1000); | |||
if (AtPresentTime != mmmm) { | |||
AtPresentTime = mmmm; | |||
NewToastUtil.getInstance().showToast(deviceNum+"号炒锅,延迟等待中,剩余"+AtPresentTime+"秒"); | |||
// showToastTip(deviceNum+"号炒锅,延迟等待中,剩余"+AtPresentTime+"秒"); | |||
} | |||
} catch (InterruptedException ex) { | |||
} | |||
@@ -1639,7 +1679,7 @@ public class ExecuteTheRecipe { | |||
while (!IsComplete[0] && !ConfigName.IsForcedEnd[deviceNum-1]) { | |||
if ((System.currentTimeMillis() - a) > 1000 * whileTime) { | |||
showlog(name + ",异常超时退出!"); | |||
showlog(deviceNum,name + ",异常超时退出!"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhile_WL-"+"异常超时退出"); | |||
break; | |||
} else { | |||
@@ -1650,7 +1690,7 @@ public class ExecuteTheRecipe { | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhile_WL-"+"true"); | |||
}else { | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhile_WL-"+"false"); | |||
NewToastUtil.getInstance().showToast(deviceNum+"号炒锅,等待"+name); | |||
// showToastTip(deviceNum+"号炒锅,等待"+name); | |||
} | |||
}else { | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhile_WL-"+"null"); | |||
@@ -1665,7 +1705,7 @@ public class ExecuteTheRecipe { | |||
Thread.sleep(500);//10 *6 | |||
} catch (InterruptedException e) { | |||
IsComplete[0] = true; | |||
showlog(name + ",异常退出!" + e.getMessage()); | |||
showlog(deviceNum,name + ",异常退出!" + e.getMessage()); | |||
} | |||
} | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhile_WL-"+"等待物料("+name+")出料完成"); | |||
@@ -1684,7 +1724,7 @@ public class ExecuteTheRecipe { | |||
while (!IsComplete[0] && !ConfigName.IsForcedEnd[deviceNum-1] && !ConfigName.TEST) { | |||
if ((System.currentTimeMillis() - a) > 1000 * whileTime) { | |||
showlog(name + ",异常超时退出!"); | |||
showlog(deviceNum,name + ",异常超时退出!"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhile-"+name + ",异常超时退出"); | |||
break; | |||
} else { | |||
@@ -1695,11 +1735,8 @@ public class ExecuteTheRecipe { | |||
LogUtils.d(TAG+" ThreadWhile name="+name+" true ////"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhile-"+name + ",true"); | |||
}else { | |||
if(name.equals("出料空盆检测有无")){ | |||
NewToastUtil.getInstance().showToastError("出料空盆没有盆,请检查传感器或放置空盆!"); | |||
} | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhile-"+name + ",false"); | |||
NewToastUtil.getInstance().showToast(deviceNum+"号炒锅,等待"+name); | |||
// showToastTip(deviceNum+"号炒锅,等待"+name); | |||
LogUtils.d(TAG+" ThreadWhile name="+name+" false"); | |||
} | |||
}else { | |||
@@ -1710,7 +1747,7 @@ public class ExecuteTheRecipe { | |||
Thread.sleep(500);//10 *6 | |||
} catch (InterruptedException e) { | |||
IsComplete[0] = true; | |||
showlog(name + ",异常退出!" + e.getMessage()); | |||
showlog(deviceNum,name + ",异常退出!" + e.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhile-"+name + ",异常退出"); | |||
} | |||
} | |||
@@ -1726,7 +1763,7 @@ public class ExecuteTheRecipe { | |||
while (!IsComplete[0] && !ConfigName.IsForcedEnd[deviceNum-1] && !ConfigName.TEST) { | |||
if ((System.currentTimeMillis() - a) > 1000 * whileTime) { | |||
showlog(name + ",异常超时退出!"); | |||
showlog(deviceNum,name + ",异常超时退出!"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhile-"+name + ",异常超时退出"); | |||
break; | |||
} else { | |||
@@ -1742,7 +1779,7 @@ public class ExecuteTheRecipe { | |||
BottomClick1(deviceNum,value); | |||
} | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhile-"+name + ",false"); | |||
NewToastUtil.getInstance().showToast(deviceNum+"号炒锅,等待"+name); | |||
// showToastTip(deviceNum+"号炒锅,等待"+name); | |||
LogUtils.d(TAG+" ThreadWhile name="+name+" false"); | |||
} | |||
}else { | |||
@@ -1753,7 +1790,7 @@ public class ExecuteTheRecipe { | |||
Thread.sleep(500);//10 *6 | |||
} catch (InterruptedException e) { | |||
IsComplete[0] = true; | |||
showlog(name + ",异常退出!" + e.getMessage()); | |||
showlog(deviceNum,name + ",异常退出!" + e.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhile-"+name + ",异常退出"); | |||
} | |||
} | |||
@@ -1773,7 +1810,7 @@ public class ExecuteTheRecipe { | |||
while (!IsComplete[0] && !ConfigName.IsForcedEnd[deviceNum-1]&& !ConfigName.TEST) { | |||
if ((System.currentTimeMillis() - a) > 1000 * whileTime * k) { | |||
showlog(name + ",异常超时退出!"); | |||
showlog(deviceNum,name + ",异常超时退出!"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhileClear-"+name + ",异常超时退出"); | |||
break; | |||
} else { | |||
@@ -1783,11 +1820,11 @@ public class ExecuteTheRecipe { | |||
if (IsComplete[0]) { | |||
LogUtils.d(TAG+" ThreadWhileClear name="+name+" true"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhileClear-"+name + ",true"); | |||
NewToastUtil.getInstance().showToast(deviceNum+"号炒锅,清洗完成"); | |||
// showToastTip(deviceNum+"号炒锅,清洗完成"); | |||
}else { | |||
LogUtils.d(TAG+" ThreadWhileClear name="+name+" false"); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhileClear-"+name + ",false"); | |||
NewToastUtil.getInstance().showToast(deviceNum+"号炒锅,清洗中..."); | |||
// showToastTip(deviceNum+"号炒锅,清洗中..."); | |||
} | |||
}else { | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhileClear-"+name + ",null"); | |||
@@ -1797,7 +1834,7 @@ public class ExecuteTheRecipe { | |||
Thread.sleep(500);//10 *6 | |||
} catch (InterruptedException e) { | |||
IsComplete[0] = true; | |||
showlog(name + ",异常退出!" + e.getMessage()); | |||
showlog(deviceNum,name + ",异常退出!" + e.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-ThreadWhileClear-"+name + ",转换异常"); | |||
} | |||
} | |||
@@ -1813,10 +1850,21 @@ public class ExecuteTheRecipe { | |||
/** | |||
* 显示日志 | |||
*/ | |||
public static void showlog(String msg) { | |||
public static void showlog(int deviceNum,String msg) { | |||
LogUtils.d(TAG+" showlog msg="+msg); | |||
NewToastUtil.getInstance().showToast(msg); | |||
RecordManager.getInstance().addLogRecord("订单处理日志","炒锅-showlog-"+msg + ""); | |||
showToastTip(deviceNum+"号炒锅,"+msg); | |||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅-showlog-"+msg + ""); | |||
} | |||
public static void showToastTip(String content){ | |||
LogUtils.d(TAG+" showToastTip content="+content); | |||
if(ConfigName.getInstance().showCookingToast){ | |||
NewToastUtil.getInstance().showToast(content); | |||
} | |||
} | |||
public static void showToastErrorTip(String content){ | |||
LogUtils.d(TAG+" showToastErrorTip content="+content); | |||
NewToastUtil.getInstance().showToastError(content); | |||
} | |||
} |
@@ -224,6 +224,7 @@ public class ConfigName { | |||
add(new Res_PLCADDRESS("炒锅工作范围下限", "VD206", 0, 1)); | |||
add(new Res_PLCADDRESS("炒锅工作范围上限", "VD210", 0, 1)); | |||
//自动投料-翻转轴 | |||
add(new Res_PLCADDRESS("翻转轴控制1", "-------------", 0, 0)); | |||
add(new Res_PLCADDRESS("翻转1-伺服当前值", "VD260", 1, 1)); | |||
@@ -551,6 +552,7 @@ public class ConfigName { | |||
public final static String deviceLocationDetail="deviceLocationDetail"; | |||
public final static String storesNum="storesNum"; | |||
public final static String rootTip="rootTip"; | |||
public final static String cookToast="cookToast"; | |||
public final static String SHARE_KEY_loginNum="SHARE_KEY_loginNum"; | |||
/** | |||
@@ -558,6 +560,8 @@ public class ConfigName { | |||
*/ | |||
public String WhetherManualFeedingSuspended="是"; | |||
public boolean showCookingToast = true; | |||
/** | |||
* 判断重复点击 | |||
*/ | |||
@@ -12,6 +12,7 @@ import com.bonait.bnframework.common.db.mode.BPA_GOODS_SUBATTRIBUTE_GROUP; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
* @author: liup | |||
@@ -151,4 +152,24 @@ public class OrderDetailUtil { | |||
ArrayList<Object> obj = QueryDB.Get(BPA_ORDER_DETAIL.class, where, args, orderby); | |||
return obj.size() > 0 ? (BPA_ORDER_DETAIL) obj.get(0) : null; | |||
} | |||
/** | |||
* 获取正在制作的订单 | |||
* @return | |||
*/ | |||
public static List<BPA_ORDER_DETAIL> getByAllMaking() { | |||
String orderby = QueryDB.Desc_Time_Up; | |||
String where = "isDelete=? and status!=0"; | |||
String[] args = new String[]{"0"}; | |||
ArrayList<BPA_ORDER_DETAIL> data = new ArrayList<>(); | |||
ArrayList<Object> obj = QueryDB.Get(BPA_ORDER_DETAIL.class, where, args, orderby); | |||
for (Object k : obj) { | |||
if(((BPA_ORDER_DETAIL) k).status!=0){ | |||
data.add(0,(BPA_ORDER_DETAIL) k); | |||
}else { | |||
data.add((BPA_ORDER_DETAIL) k); | |||
} | |||
} | |||
return data; | |||
} | |||
} |
@@ -81,7 +81,7 @@ public class MainHActivity extends BaseActivity { | |||
desc = "烹饪异常"; | |||
} | |||
viewBinding.tvWok1.setVisibility(View.VISIBLE); | |||
viewBinding.tvWok1.setText("1号炒锅:菜品【"+detail1.goodsName+(detail1.groupName==null?"":detail1.groupName)+"】"+desc); | |||
viewBinding.tvWok1.setText("1号炒锅:【"+detail1.goodsName+"】"+desc); | |||
}else { | |||
viewBinding.tvWok1.setVisibility(View.GONE); | |||
viewBinding.tvWok1.setText(""); | |||
@@ -96,7 +96,7 @@ public class MainHActivity extends BaseActivity { | |||
desc = "烹饪异常"; | |||
} | |||
viewBinding.tvWok2.setVisibility(View.VISIBLE); | |||
viewBinding.tvWok2.setText("2号炒锅:菜品【"+detail2.goodsName+(detail2.groupName==null?"":detail2.groupName)+"】"+desc); | |||
viewBinding.tvWok2.setText("2号炒锅:【"+detail2.goodsName+"】"+desc); | |||
}else { | |||
viewBinding.tvWok2.setVisibility(View.GONE); | |||
viewBinding.tvWok2.setText(""); | |||
@@ -111,7 +111,7 @@ public class MainHActivity extends BaseActivity { | |||
desc = "烹饪异常"; | |||
} | |||
viewBinding.tvWok3.setVisibility(View.VISIBLE); | |||
viewBinding.tvWok3.setText("3号炒锅:菜品【"+detail3.goodsName+(detail3.groupName==null?"":detail3.groupName)+"】"+desc); | |||
viewBinding.tvWok3.setText("3号炒锅:【"+detail3.goodsName+"】"+desc); | |||
}else { | |||
viewBinding.tvWok3.setVisibility(View.GONE); | |||
viewBinding.tvWok3.setText(""); | |||
@@ -126,7 +126,7 @@ public class MainHActivity extends BaseActivity { | |||
desc = "烹饪异常"; | |||
} | |||
viewBinding.tvWok4.setVisibility(View.VISIBLE); | |||
viewBinding.tvWok4.setText("4号炒锅:菜品【"+detail4.goodsName+(detail4.groupName==null?"":detail4.groupName)+"】"+desc); | |||
viewBinding.tvWok4.setText("4号炒锅:【"+detail4.goodsName+"】"+desc); | |||
}else { | |||
viewBinding.tvWok4.setVisibility(View.GONE); | |||
viewBinding.tvWok4.setText(""); | |||
@@ -323,6 +323,7 @@ public class MainHActivity extends BaseActivity { | |||
RootTipDialog dialog = new RootTipDialog(); | |||
dialog.show(getSupportFragmentManager(),"开机自检"); | |||
} | |||
ConfigName.getInstance().showCookingToast = PreferenceUtils.getBoolean(ConfigName.cookToast,true); | |||
} | |||
} | |||
@@ -0,0 +1,134 @@ | |||
package com.bonait.bnframework.newui.activity; | |||
import android.os.Bundle; | |||
import android.view.View; | |||
import androidx.annotation.Nullable; | |||
import androidx.viewpager.widget.ViewPager; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.common.utils.ToastUtils; | |||
import com.bonait.bnframework.databinding.ActivityPlcDebugBinding; | |||
import com.bonait.bnframework.databinding.ActivitySystemSetBinding; | |||
import com.bonait.bnframework.newui.adapter.base.FragmentAdapter; | |||
import com.bonait.bnframework.newui.fragment.setting.PicManagerFragment; | |||
import com.bonait.bnframework.newui.fragment.setting.PlcAddressFragment; | |||
import com.bonait.bnframework.newui.fragment.setting.SceneSetFragment; | |||
import com.bonait.bnframework.newui.fragment.setting.WokDirectionSetFragment; | |||
/** | |||
* @author: liup | |||
* @description: 系统设置 | |||
* @date: 2024/5/30 15:31. | |||
*/ | |||
public class PlcDebugActivity extends BaseActivity { | |||
private ActivityPlcDebugBinding viewBinding; | |||
@Override | |||
protected void onCreate(@Nullable Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
viewBinding = ActivityPlcDebugBinding.inflate(getLayoutInflater()); | |||
setContentView(viewBinding.getRoot()); | |||
DisplayManager.scaleViewGroup(viewBinding.getRoot()); | |||
initTopBar(); | |||
initView(); | |||
} | |||
private void initView(){ | |||
initFragment(); | |||
viewBinding.viewpager.addOnPageChangeListener(pageChangeListener); | |||
// 设置viewPager缓存多少个fragment | |||
viewBinding.viewpager.setOffscreenPageLimit(1); | |||
// viewBinding.navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener); | |||
updateTopBar(1); | |||
viewBinding.ll4.setOnClickListener(v->{ | |||
viewBinding.viewpager.setCurrentItem(0); | |||
}); | |||
} | |||
private void updateTopBar(int pos){ | |||
viewBinding.img4.setSelected(pos==1); | |||
viewBinding.tvTitle4.setSelected(pos==1); | |||
} | |||
private void initTopBar(){ | |||
// viewBinding.topbar.setTitle("系统设置"); | |||
viewBinding.back.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
finish(); | |||
} | |||
}); | |||
} | |||
/** | |||
* viewPager里添加fragment | |||
*/ | |||
private void initFragment() { | |||
FragmentAdapter fragmentAdapter = new FragmentAdapter(getSupportFragmentManager()); | |||
fragmentAdapter.addFragment(new PlcAddressFragment()); | |||
viewBinding.viewpager.setAdapter(fragmentAdapter); | |||
} | |||
// /** | |||
// * 配置bottom底部菜单栏监听器,手指点击底部菜单监听 | |||
// */ | |||
// private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener | |||
// = new BottomNavigationView.OnNavigationItemSelectedListener() { | |||
// | |||
// @Override | |||
// public boolean onNavigationItemSelected(@NonNull MenuItem item) { | |||
// switch (item.getItemId()) { | |||
// case R.id.bottom_navigation_1: | |||
// viewBinding.viewpager.setCurrentItem(0); | |||
// return true; | |||
// case R.id.bottom_navigation_2: | |||
// viewBinding.viewpager.setCurrentItem(1); | |||
// return true; | |||
// case R.id.bottom_navigation_3: | |||
// viewBinding.viewpager.setCurrentItem(2); | |||
// return true; | |||
// case R.id.bottom_navigation_4: | |||
// viewBinding.viewpager.setCurrentItem(3); | |||
// return true; | |||
// } | |||
// return false; | |||
// } | |||
// }; | |||
/** | |||
* 配置ViewPager监听器,手指滑动监听 | |||
*/ | |||
private ViewPager.OnPageChangeListener pageChangeListener = new ViewPager.OnPageChangeListener() { | |||
@Override | |||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { | |||
// MenuItem menuItem = viewBinding.navigation.getMenu().getItem(position); | |||
} | |||
@Override | |||
public void onPageSelected(int position) { | |||
// viewBinding.navigation.getMenu().getItem(position).setChecked(true); | |||
updateTopBar(position+1); | |||
} | |||
@Override | |||
public void onPageScrollStateChanged(int state) { | |||
} | |||
}; | |||
@Override | |||
protected String getClassName() { | |||
return "系统设置页"; | |||
} | |||
@Override | |||
protected boolean canDragBack() { | |||
return false; | |||
} | |||
} |
@@ -52,9 +52,7 @@ public class SystemSetActivity extends BaseActivity { | |||
viewBinding.ll3.setOnClickListener(v->{ | |||
viewBinding.viewpager.setCurrentItem(2); | |||
}); | |||
viewBinding.ll4.setOnClickListener(v->{ | |||
viewBinding.viewpager.setCurrentItem(3); | |||
}); | |||
} | |||
private void updateTopBar(int pos){ | |||
@@ -64,8 +62,7 @@ public class SystemSetActivity extends BaseActivity { | |||
viewBinding.tvTitle2.setSelected(pos==2); | |||
viewBinding.img3.setSelected(pos==3); | |||
viewBinding.tvTitle3.setSelected(pos==3); | |||
viewBinding.img4.setSelected(pos==4); | |||
viewBinding.tvTitle4.setSelected(pos==4); | |||
} | |||
private void initTopBar(){ | |||
@@ -76,26 +73,6 @@ public class SystemSetActivity extends BaseActivity { | |||
finish(); | |||
} | |||
}); | |||
viewBinding.btnSubmit.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
String s=viewBinding.edittextQuanxian.getText().toString(); | |||
if (s.isEmpty()) | |||
{ | |||
ToastUtils.warning("权限密码不能为空!"); | |||
}else | |||
{ | |||
if(s.equals(ConfigName.getInstance().user.pass)) | |||
{ | |||
viewBinding.rlQuanxian.setVisibility(View.GONE); | |||
viewBinding.viewpager.setVisibility(View.VISIBLE); | |||
}else | |||
{ | |||
ToastUtils.warning("权限密码不正确!"); | |||
} | |||
} | |||
} | |||
}); | |||
} | |||
/** | |||
@@ -106,7 +83,6 @@ public class SystemSetActivity extends BaseActivity { | |||
fragmentAdapter.addFragment(new SceneSetFragment()); | |||
fragmentAdapter.addFragment(new PicManagerFragment()); | |||
fragmentAdapter.addFragment(new WokDirectionSetFragment()); | |||
fragmentAdapter.addFragment(new PlcAddressFragment()); | |||
viewBinding.viewpager.setAdapter(fragmentAdapter); | |||
} | |||
@@ -1,6 +1,10 @@ | |||
package com.bonait.bnframework.newui.adapter.order; | |||
import android.annotation.SuppressLint; | |||
import android.graphics.Color; | |||
import android.text.Spannable; | |||
import android.text.SpannableStringBuilder; | |||
import android.text.style.ForegroundColorSpan; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
@@ -8,6 +12,9 @@ import android.view.ViewGroup; | |||
import androidx.annotation.NonNull; | |||
import androidx.recyclerview.widget.RecyclerView; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL; | |||
import com.bonait.bnframework.common.utils.ProcessValueUtil; | |||
import com.bonait.bnframework.modbus.Wok1ModbusTcpServer; | |||
import com.bonait.bnframework.newui.adapter.base.BaseAdapter; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.databinding.ItemFoodInfoBinding; | |||
@@ -17,7 +24,7 @@ import com.bonait.bnframework.databinding.ItemFoodInfoBinding; | |||
* @description: 订单右边的配料信息 | |||
* @date: 2024/5/9 9:02. | |||
*/ | |||
public class FoodInfoAdapter extends BaseAdapter<String, FoodInfoAdapter.ViewHolder> { | |||
public class FoodInfoAdapter extends BaseAdapter<BPA_GOODS_PROCESS_DETAIL, FoodInfoAdapter.ViewHolder> { | |||
@NonNull | |||
@Override | |||
@@ -32,7 +39,16 @@ public class FoodInfoAdapter extends BaseAdapter<String, FoodInfoAdapter.ViewHol | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.line1.setVisibility(position==0?View.VISIBLE:View.GONE); | |||
holder.binding.desc.setText((position+1)+"."+mData.get(position)+""); | |||
String name = (position+1)+mData.get(position).processname+":"; | |||
String value = ProcessValueUtil.getProcessSms(mData.get(position).processname,mData.get(position).processvalue); | |||
String content = name+value; | |||
SpannableStringBuilder spannable = new SpannableStringBuilder(content); | |||
spannable.setSpan(new ForegroundColorSpan(Color.parseColor("#999999")) | |||
, content.length()-value.length(), content.length(), | |||
Spannable.SPAN_EXCLUSIVE_INCLUSIVE);//SPAN_EXCLUSIVE_INCLUSIVE前面不包括后面包括 | |||
holder.binding.desc.setText(spannable); | |||
} | |||
@Override | |||
@@ -42,7 +42,7 @@ public abstract class OrderInfoAdapter extends BaseAdapter<BPA_ORDER_DETAIL,Orde | |||
holder.binding.cookDesc.setText(""); | |||
} | |||
if(position==0 || position==1){ | |||
if(position==0 || position==1 || position == 2||position == 3){ | |||
if(bean.status==1){ | |||
int max= GoodsProcessDetailDBUtil.getByGroupId(bean.groupId).size(); | |||
holder.binding.progressBar.setMax(max); | |||
@@ -0,0 +1,172 @@ | |||
package com.bonait.bnframework.newui.dialog.check; | |||
import android.annotation.SuppressLint; | |||
import android.graphics.Color; | |||
import android.graphics.drawable.ColorDrawable; | |||
import android.os.Build; | |||
import android.os.Bundle; | |||
import android.os.Handler; | |||
import android.os.Looper; | |||
import android.os.Message; | |||
import android.view.Gravity; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
import android.view.Window; | |||
import android.view.WindowManager; | |||
import android.widget.TextView; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.fragment.app.DialogFragment; | |||
import com.bonait.bnframework.HBL.Thread.ThreadManager; | |||
import com.bonait.bnframework.Model.CheckPositionBean; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.business.RecordManager; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.utils.AdbCommandUtil; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.databinding.DialogChuCanPenCheckBinding; | |||
import com.bonait.bnframework.databinding.DialogFoodCheckBinding; | |||
import com.bonait.bnframework.modbus.ModbusCenter; | |||
import com.bonait.bnframework.modbus.RobotModbusTcpServer; | |||
import com.bonait.bnframework.newui.fragment.setting.SceneSetFragment; | |||
import java.util.Map; | |||
import butterknife.ButterKnife; | |||
/** | |||
* @author: liup | |||
* @description: 出餐盆检测 | |||
* @date: 2024/6/3 17:59. | |||
*/ | |||
public class ChuCanPenCheckDialog extends DialogFragment { | |||
private String TAG = " ChuCanPenCheckDialog =>"; | |||
private DialogChuCanPenCheckBinding viewBinding; | |||
private boolean[] kongPenList = new boolean[4]; | |||
@Override | |||
public void onCreate(@Nullable Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setStyle(STYLE_NORMAL, R.style.DialogScale); | |||
} | |||
private Handler handler = new Handler(Looper.getMainLooper()){ | |||
@Override | |||
public void handleMessage(@NonNull Message msg) { | |||
super.handleMessage(msg); | |||
if(msg.what==1){ | |||
freshView(); | |||
viewBinding.tvChucan1.setSelected(kongPenList[0]); | |||
viewBinding.tvChucan2.setSelected(kongPenList[1]); | |||
viewBinding.tvChucan3.setSelected(kongPenList[2]); | |||
viewBinding.tvChucan4.setSelected(kongPenList[3]); | |||
viewBinding.tvChucan1.setText(kongPenList[0]?"出餐空盆1:有盆":"出餐空盆1:无盆"); | |||
viewBinding.tvChucan2.setText(kongPenList[1]?"出餐空盆2:有盆":"出餐空盆2:无盆"); | |||
viewBinding.tvChucan3.setText(kongPenList[2]?"出餐空盆3:有盆":"出餐空盆3:无盆"); | |||
viewBinding.tvChucan4.setText(kongPenList[3]?"出餐空盆4:有盆":"出餐空盆4:无盆"); | |||
if(handler.hasMessages(1)){ | |||
handler.removeMessages(1); | |||
} | |||
handler.sendEmptyMessageDelayed(1,500); | |||
} | |||
} | |||
}; | |||
@Nullable | |||
@Override | |||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | |||
viewBinding = DialogChuCanPenCheckBinding.inflate(inflater, container, false); | |||
DisplayManager.scaleViewGroup(viewBinding.getRoot()); | |||
ButterKnife.bind(this, viewBinding.getRoot()); | |||
return viewBinding.getRoot(); | |||
} | |||
private void fullScreen(Window window){ | |||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { | |||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |||
// 全屏显示,隐藏状态栏和导航栏,拉出状态栏和导航栏显示一会儿后消失。 | |||
// 启动游戏模式,设置状态栏和导航栏中的图标变小,变模糊或者弱化其效果 | |||
window.getDecorView().setSystemUiVisibility( | |||
View.SYSTEM_UI_FLAG_LOW_PROFILE | |||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE | |||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | |||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | |||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | |||
| View.SYSTEM_UI_FLAG_FULLSCREEN | |||
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); | |||
} else { | |||
// 全屏显示,隐藏状态栏 | |||
window.getDecorView().setSystemUiVisibility(View.INVISIBLE); | |||
} | |||
} | |||
} | |||
@Override | |||
public void onStart() { | |||
super.onStart(); | |||
if (getDialog() != null) { | |||
Window window = getDialog().getWindow(); | |||
assert window != null; | |||
fullScreen(window); | |||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); | |||
WindowManager.LayoutParams params = window.getAttributes(); | |||
params.gravity = Gravity.CENTER; | |||
params.width = ViewGroup.LayoutParams.WRAP_CONTENT; | |||
params.height = ViewGroup.LayoutParams.WRAP_CONTENT; | |||
window.setAttributes(params); | |||
} | |||
AdbCommandUtil.hideStatusBar(true); | |||
initView(); | |||
} | |||
private void initView(){ | |||
viewBinding.btnClose1.setOnClickListener(v->{ | |||
dismiss(); | |||
}); | |||
freshView(); | |||
handler.sendEmptyMessageDelayed(1,200); | |||
} | |||
@SuppressLint("SetTextI18n") | |||
private void freshView(){ | |||
if(RobotModbusTcpServer.get().plcIsConnect){ | |||
ThreadManager.get().execute(()->{ | |||
for(int i=1;i<=4;i++){ | |||
Object kongPen = ModbusCenter.ReadPlc(i,i+"#空盆库位检测有无"); | |||
if(kongPen != null){ | |||
kongPenList[i-1] = (Boolean) kongPen; | |||
}else{ | |||
kongPenList[i-1] = false; | |||
} | |||
} | |||
}); | |||
}else { | |||
viewBinding.tvChucan1.setText("出餐盘1:无盆"); | |||
viewBinding.tvChucan2.setText("出餐盘2:无盆"); | |||
viewBinding.tvChucan3.setText("出餐盘3:无盆"); | |||
viewBinding.tvChucan4.setText("出餐盘4:无盆"); | |||
viewBinding.tvChucan1.setSelected(false); | |||
viewBinding.tvChucan2.setSelected(false); | |||
viewBinding.tvChucan3.setSelected(false); | |||
viewBinding.tvChucan4.setSelected(false); | |||
} | |||
} | |||
@Override | |||
public void dismiss() { | |||
super.dismiss(); | |||
if(handler!=null){ | |||
handler.removeCallbacksAndMessages(null); | |||
handler = null; | |||
} | |||
} | |||
@Override | |||
public void onDestroy() { | |||
super.onDestroy(); | |||
if(handler!=null){ | |||
handler.removeCallbacksAndMessages(null); | |||
handler = null; | |||
} | |||
} | |||
} |
@@ -129,7 +129,12 @@ public class FoodPosSetDialog extends DialogFragment { | |||
ArrayAdapter<String> spinnerAdapter3 = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item, posList); | |||
spinnerAdapter3.setDropDownViewResource(R.layout.spinner_dropdown_item); | |||
viewBinding.spinnerPosition.setAdapter(spinnerAdapter3); | |||
viewBinding.spinnerPosition.setSelection(0); | |||
if(order.mainPosition!=0){ | |||
viewBinding.spinnerPosition.setSelection(order.mainPosition-1); | |||
}else { | |||
viewBinding.spinnerPosition.setSelection(0); | |||
} | |||
mainPosition = Integer.parseInt(viewBinding.spinnerPosition.getSelectedItem().toString().substring(1)); | |||
viewBinding.spinnerPosition.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | |||
@Override | |||
@@ -151,7 +156,11 @@ public class FoodPosSetDialog extends DialogFragment { | |||
ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item, wokList); | |||
spinnerAdapter.setDropDownViewResource(R.layout.spinner_dropdown_item); | |||
viewBinding.spinnerWok.setAdapter(spinnerAdapter); | |||
viewBinding.spinnerWok.setSelection(0); | |||
if(order.type!=0){ | |||
viewBinding.spinnerWok.setSelection(order.type-1); | |||
}else { | |||
viewBinding.spinnerWok.setSelection(0); | |||
} | |||
deviceNum = Integer.parseInt(viewBinding.spinnerWok.getSelectedItem().toString().substring(0,1)); | |||
viewBinding.spinnerWok.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | |||
@Override | |||
@@ -402,7 +402,7 @@ public class RobotControlDialog extends DialogFragment { | |||
return; | |||
} | |||
WaitProcessUtil.getInstance().show(getContext(),"提示","机器人正在向炒锅投主料"+data.get("主料位置")+",请等待完成,不要进行其他操作!"); | |||
WaitProcessUtil.getInstance().show(getContext(),"提示","机器人正在向炒锅放主料盆Z"+position+",请等待完成,不要进行其他操作!"); | |||
ThreadManager.get().execute(new Thread(new Runnable() { | |||
@Override | |||
public void run() { | |||
@@ -47,6 +47,7 @@ import com.bonait.bnframework.modbus.Wok1ModbusTcpServer; | |||
import com.bonait.bnframework.modbus.Wok3ModbusTcpServer; | |||
import com.bonait.bnframework.modbus.Wok4ModbusTcpServer; | |||
import com.bonait.bnframework.newui.widget.NewToastUtil; | |||
import com.bonait.bnframework.newui.widget.WaitProcessUtil; | |||
import com.qmuiteam.qmui.widget.dialog.QMUIDialog; | |||
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction; | |||
@@ -500,12 +501,25 @@ public class WokControlDialog extends DialogFragment { | |||
} | |||
}); | |||
freshSilos(); | |||
//todo 投料 | |||
viewBinding.mainFoodTouliao1.setOnClickListener(v->{ | |||
WaitProcessUtil.getInstance().show(getContext(),"提示",deviceNum+"号炒锅正在投放主料1号位,请等待完成,不要进行其他操作!"); | |||
ThreadManager.get().execute(()->{ | |||
ExecuteTheRecipe.Make位置(deviceNum,"炒菜位高"); | |||
ExecuteTheRecipe.BottomClick1(deviceNum,"主料1号位"); | |||
ExecuteTheRecipe.ThreadWhile(deviceNum, "1号位倒菜完成"); | |||
WaitProcessUtil.getInstance().dismiss(); | |||
NewToastUtil.getInstance().showToast("投料完成"); | |||
}); | |||
}); | |||
viewBinding.mainFoodTouliao1.setOnClickListener(v->{ | |||
viewBinding.mainFoodTouliao2.setOnClickListener(v->{ | |||
WaitProcessUtil.getInstance().show(getContext(),"提示",deviceNum+"号炒锅正在投放主料2号位,请等待完成,不要进行其他操作!"); | |||
ThreadManager.get().execute(()->{ | |||
ExecuteTheRecipe.Make位置(deviceNum,"炒菜位高"); | |||
ExecuteTheRecipe.BottomClick1(deviceNum,"主料2号位"); | |||
ExecuteTheRecipe.ThreadWhile(deviceNum, "2号位倒菜完成"); | |||
WaitProcessUtil.getInstance().dismiss(); | |||
NewToastUtil.getInstance().showToast("投料完成"); | |||
}); | |||
}); | |||
} | |||
@@ -23,6 +23,7 @@ import com.bonait.bnframework.modbus.Wok2ModbusTcpServer; | |||
import com.bonait.bnframework.modbus.Wok1ModbusTcpServer; | |||
import com.bonait.bnframework.modbus.Wok3ModbusTcpServer; | |||
import com.bonait.bnframework.modbus.Wok4ModbusTcpServer; | |||
import com.bonait.bnframework.newui.dialog.check.ChuCanPenCheckDialog; | |||
import com.bonait.bnframework.newui.dialog.control.RobotControlDialog; | |||
import com.bonait.bnframework.newui.dialog.control.WokControlDialog; | |||
import com.bonait.bnframework.newui.widget.NewToastUtil; | |||
@@ -80,6 +81,27 @@ public class HomeDevicesFragment extends BaseFragment { | |||
} | |||
showWokDialog(2); | |||
}); | |||
viewBinding.btnChaoguo3.setOnClickListener(v->{ | |||
if(ConfigName.getInstance().isFastClick()){ | |||
return; | |||
} | |||
showWokDialog(3); | |||
}); | |||
viewBinding.btnChaoguo4.setOnClickListener(v->{ | |||
if(ConfigName.getInstance().isFastClick()){ | |||
return; | |||
} | |||
showWokDialog(4); | |||
}); | |||
viewBinding.btnChuCan.setOnClickListener(v->{ | |||
if(ConfigName.getInstance().isFastClick()){ | |||
return; | |||
} | |||
if(getActivity()!=null){ | |||
ChuCanPenCheckDialog dialog = new ChuCanPenCheckDialog(); | |||
dialog.show(getActivity().getSupportFragmentManager(),"空盆检测"); | |||
} | |||
}); | |||
} | |||
/** | |||
@@ -97,7 +119,7 @@ public class HomeDevicesFragment extends BaseFragment { | |||
bundle.putBoolean("showTip",showTip); | |||
dialog.setArguments(bundle); | |||
if(getActivity()!=null){ | |||
dialog.show(getActivity().getSupportFragmentManager(),"投料控制2"); | |||
dialog.show(getActivity().getSupportFragmentManager(),"机器人控制"); | |||
} | |||
} | |||
@@ -19,6 +19,8 @@ import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.common.utils.UpdateAppUtils; | |||
import com.bonait.bnframework.databinding.DialogOrderBinding; | |||
import com.bonait.bnframework.databinding.DialogPswBinding; | |||
import com.bonait.bnframework.databinding.DialogWithCancelConfirmBinding; | |||
import com.bonait.bnframework.databinding.FragmentHomeMainsBinding; | |||
import com.bonait.bnframework.manager.ActivityLifecycleManager; | |||
@@ -27,6 +29,7 @@ import com.bonait.bnframework.newui.activity.EditGoodsHActivity; | |||
import com.bonait.bnframework.newui.activity.LogRecordHActivity; | |||
import com.bonait.bnframework.newui.activity.LoginHActivity; | |||
import com.bonait.bnframework.newui.activity.OrderRecordHActivity; | |||
import com.bonait.bnframework.newui.activity.PlcDebugActivity; | |||
import com.bonait.bnframework.newui.widget.XComDialog; | |||
import com.bonait.bnframework.newui.activity.SetSeasoningActivity; | |||
import com.bonait.bnframework.newui.activity.SystemSetActivity; | |||
@@ -107,7 +110,7 @@ public class HomeMainsFragment extends BaseFragment { | |||
OpenActivity(OrderRecordHActivity.class); | |||
}); | |||
binding.llSetting.setOnClickListener(v->{ | |||
binding.llSetting.setOnClickListener(view->{ | |||
if(!ConfigName.getInstance().user.name.equals("管理员")){ | |||
NewToastUtil.getInstance().showToast("管理员才能进行操作"); | |||
return; | |||
@@ -115,7 +118,30 @@ public class HomeMainsFragment extends BaseFragment { | |||
if(ConfigName.getInstance().isFastClick()){ | |||
return; | |||
} | |||
OpenActivity(SystemSetActivity.class); | |||
AlertDialogUtils.showCancelAndConfirmDialog((AppCompatActivity) getActivity(), R.layout.dialog_psw, (layoutView, xCom) -> { | |||
DialogPswBinding binding = DialogPswBinding.bind(layoutView); | |||
binding.title.setText("提示"); | |||
binding.submit.setText("确认"); | |||
binding.submit.setOnClickListener(v->{ | |||
String psw = binding.edit.getText().toString(); | |||
if(psw.equals("123")){ | |||
OpenActivity(PlcDebugActivity.class); | |||
xCom.dismissX(); | |||
}else if(psw.equals("123456")){ | |||
OpenActivity(SystemSetActivity.class); | |||
xCom.dismissX(); | |||
}else { | |||
NewToastUtil.getInstance().showToastError("密码错误"); | |||
} | |||
}); | |||
binding.cancel.setOnClickListener(v->{ | |||
xCom.dismissX(); | |||
}); | |||
binding.btnClose.setOnClickListener(v->{ | |||
xCom.dismissX(); | |||
}); | |||
}); | |||
}); | |||
binding.llUpdate.setOnClickListener(v->{ | |||
if(ConfigName.getInstance().user.name.equals("一般用户")){ | |||
@@ -2,13 +2,19 @@ package com.bonait.bnframework.newui.fragment.main; | |||
import android.content.Intent; | |||
import android.os.Bundle; | |||
import android.os.Handler; | |||
import android.os.Looper; | |||
import android.os.Message; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
import androidx.lifecycle.Lifecycle; | |||
import androidx.lifecycle.LifecycleEventObserver; | |||
import androidx.lifecycle.LifecycleObserver; | |||
import androidx.lifecycle.LifecycleOwner; | |||
import com.apkfuns.logutils.LogUtils; | |||
import com.bonait.bnframework.Model.CheckPositionBean; | |||
@@ -58,17 +64,44 @@ import java.util.List; | |||
* @description: 首页订单 | |||
* @date: 2024/5/24 13:30. | |||
*/ | |||
public class HomeOrderFragment extends BaseFragment { | |||
public class HomeOrderFragment extends BaseFragment{ | |||
private String TAG = "HomeOrderFragment==>"; | |||
private FragmentHomeOrderBinding viewBinding; | |||
private OrderInfoAdapter orderAdapter1;//订单列表 | |||
private FoodInfoAdapter foodInfoAdapter;// 订单右边的配料信息 | |||
private List<BPA_ORDER_DETAIL> orderDetails1; | |||
private List<String> foodInfoList = new ArrayList<>(); | |||
private List<BPA_GOODS_PROCESS_DETAIL> foodInfoList = new ArrayList<>(); | |||
private BPA_ORDER_DETAIL orderDetail; | |||
private DeviceStatusView deviceStatusView1,deviceStatusView2,deviceStatusView3,deviceStatusView4; | |||
private Handler handler = new Handler(Looper.getMainLooper()){ | |||
@Override | |||
public void handleMessage(@NonNull Message msg) { | |||
super.handleMessage(msg); | |||
if(msg.what==1){ | |||
if(viewBinding!=null){ | |||
if(deviceStatusView1!=null){ | |||
deviceStatusView1.init(); | |||
} | |||
if(deviceStatusView2!=null){ | |||
deviceStatusView2.init(); | |||
} | |||
if(deviceStatusView3!=null){ | |||
deviceStatusView3.init(); | |||
} | |||
if(deviceStatusView4!=null){ | |||
deviceStatusView4.init(); | |||
} | |||
if(handler.hasMessages(1)){ | |||
handler.removeMessages(1); | |||
} | |||
handler.sendEmptyMessageDelayed(1,1000); | |||
} | |||
} | |||
} | |||
}; | |||
@Override | |||
protected View onCreateView() { | |||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_home_order, null); | |||
@@ -95,6 +128,8 @@ public class HomeOrderFragment extends BaseFragment { | |||
viewBinding.llDevices.addView(deviceStatusView3); | |||
viewBinding.llDevices.addView(deviceStatusView4); | |||
LogUtils.d("Home4Fragment onViewCreated"); | |||
handler.sendEmptyMessage(1); | |||
} | |||
@Override | |||
@@ -161,6 +196,7 @@ public class HomeOrderFragment extends BaseFragment { | |||
xCom.dismissX(); | |||
orderMaking(mData,position); | |||
}); | |||
}); | |||
}else { | |||
orderMaking(mData,position); | |||
@@ -264,9 +300,33 @@ public class HomeOrderFragment extends BaseFragment { | |||
*/ | |||
private boolean checkPosition(int mainPosition,int deviceNum){ | |||
if(mainPosition==0|deviceNum==0){ | |||
NewToastUtil.getInstance().showToastError("请设置位置信息"); | |||
NewToastUtil.getInstance().showToastError("请先绑定位置信息"); | |||
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "警告", | |||
"请先绑定位置信息,在页面右下角点击“设置位置", new AlertDialogUtils.DialogClickListener() { | |||
@Override | |||
public void onConfirm() { | |||
} | |||
@Override | |||
public void onCancel() { | |||
} | |||
}); | |||
return false; | |||
} | |||
List<BPA_ORDER_DETAIL> orderDetails = OrderDetailUtil.getByAllMaking(); | |||
for(BPA_ORDER_DETAIL bean : orderDetails){ | |||
if (bean.mainPosition == mainPosition){ | |||
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "警告", | |||
"Z"+mainPosition+"库位正在使用,请更换位置", new AlertDialogUtils.DialogClickListener() { | |||
@Override | |||
public void onConfirm() { | |||
} | |||
@Override | |||
public void onCancel() { | |||
} | |||
}); | |||
return false; | |||
} | |||
} | |||
if(mainPosition==1 || mainPosition == 2 || mainPosition == 3){ | |||
if(deviceNum == 1 || deviceNum == 4){ | |||
return true; | |||
@@ -276,8 +336,8 @@ public class HomeOrderFragment extends BaseFragment { | |||
return true; | |||
} | |||
} | |||
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "提示", | |||
"Z1 Z2 Z3库位只能绑定1号和4号炒锅,Z4 Z5 Z6库位只能绑定2号和3号炒锅", new AlertDialogUtils.DialogClickListener() { | |||
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "警告", | |||
"Z1 Z2 Z3库位只能绑定1号和4号炒锅\nZ4 Z5 Z6库位只能绑定2号和3号炒锅", new AlertDialogUtils.DialogClickListener() { | |||
@Override | |||
public void onConfirm() { | |||
} | |||
@@ -285,7 +345,6 @@ public class HomeOrderFragment extends BaseFragment { | |||
public void onCancel() { | |||
} | |||
}); | |||
NewToastUtil.getInstance().showToastError("Z1 Z2 Z3库位只能绑定1号和4号炒锅,Z4 Z5 Z6库位只能绑定2号和3号炒锅"); | |||
return false; | |||
} | |||
@@ -341,6 +400,7 @@ public class HomeOrderFragment extends BaseFragment { | |||
NewToastUtil.getInstance().showToastError("请放置对应出餐空盆!"); | |||
AlertDialogUtils.showCancelAndConfirmDialog((AppCompatActivity) getActivity(), R.layout.dialog_order, (layoutView, xCom) -> { | |||
DialogOrderBinding binding = DialogOrderBinding.bind(layoutView); | |||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||
binding.title.setText("出菜盆检测警告"); | |||
binding.edit.setText(mData.get(position).type+"号炒锅未检测到出菜盆,请放置对应出餐空盆!或检测盆是否放置正确"); | |||
binding.cancel.setVisibility(View.GONE); | |||
@@ -351,6 +411,9 @@ public class HomeOrderFragment extends BaseFragment { | |||
binding.cancel.setOnClickListener(v->{ | |||
xCom.dismissX(); | |||
}); | |||
binding.btnClose.setOnClickListener(v->{ | |||
xCom.dismissX(); | |||
}); | |||
}); | |||
return; | |||
} | |||
@@ -398,9 +461,10 @@ public class HomeOrderFragment extends BaseFragment { | |||
} | |||
} | |||
} | |||
for(BPA_GOODS_PROCESS_DETAIL detail:details){ | |||
foodInfoList.add(detail.processname+":"+ ProcessValueUtil.getProcessSms(detail.processname,detail.processvalue)); | |||
} | |||
// for(BPA_GOODS_PROCESS_DETAIL detail:details){ | |||
// foodInfoList.add(detail.processname+":"+ ProcessValueUtil.getProcessSms(detail.processname,detail.processvalue)); | |||
// } | |||
foodInfoList.addAll(details); | |||
foodInfoAdapter.notifyDataSetChanged(); | |||
changeRightBtn(); | |||
} | |||
@@ -428,6 +492,7 @@ public class HomeOrderFragment extends BaseFragment { | |||
AlertDialogUtils.showCancelAndConfirmDialog((AppCompatActivity) getActivity(), R.layout.dialog_order, (layoutView, xCom) -> { | |||
String name = goodsName +"-"+ (groupName==null?"":groupName); | |||
DialogOrderBinding binding = DialogOrderBinding.bind(layoutView); | |||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||
String desc = "是否取消【"+name+"】订单?"; | |||
binding.submit.setText("删除"); | |||
@@ -446,7 +511,6 @@ public class HomeOrderFragment extends BaseFragment { | |||
desc = "【"+name+"】订单出现异常,是否删除?"; | |||
break; | |||
} | |||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||
binding.title.setText("取消订单"); | |||
binding.edit.setText(desc); | |||
binding.submit.setOnClickListener(view1 -> { | |||
@@ -490,6 +554,7 @@ public class HomeOrderFragment extends BaseFragment { | |||
// } | |||
AlertDialogUtils.showCancelAndConfirmDialog((AppCompatActivity) getActivity(), R.layout.dialog_order, (layoutView, xCom) -> { | |||
DialogOrderBinding binding = DialogOrderBinding.bind(layoutView); | |||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||
String desc = "【"+name+"】订单"; | |||
switch (status){ | |||
case -1: | |||
@@ -514,7 +579,6 @@ public class HomeOrderFragment extends BaseFragment { | |||
break; | |||
} | |||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||
binding.title.setText("制作订单"); | |||
binding.edit.setText(desc); | |||
binding.submit.setOnClickListener(view1 -> { | |||
@@ -697,6 +761,9 @@ public class HomeOrderFragment extends BaseFragment { | |||
public void setUserVisibleHint(boolean isVisibleToUser) { | |||
super.setUserVisibleHint(isVisibleToUser); | |||
if(isVisibleToUser){ | |||
if(handler!=null){ | |||
handler.sendEmptyMessage(1); | |||
} | |||
LogUtils.d("HomeOrderFragment setUserVisibleHint true"); | |||
if(orderDetails1!=null){ | |||
orderDetails1.clear(); | |||
@@ -712,6 +779,9 @@ public class HomeOrderFragment extends BaseFragment { | |||
} | |||
EventBus.getDefault().register(this); | |||
}else { | |||
if(handler!=null){ | |||
handler.removeCallbacksAndMessages(null); | |||
} | |||
LogUtils.d("HomeOrderFragment setUserVisibleHint false"); | |||
EventBus.getDefault().unregister(this); | |||
} | |||
@@ -105,6 +105,7 @@ public class SceneSetFragment extends BaseFragment { | |||
viewBinding.editDeviceNumber.setText(PreferenceUtils.getString(ConfigName.deviceNumber,"")); | |||
viewBinding.zijianSwitch.setChecked(PreferenceUtils.getBoolean(ConfigName.rootTip,true)); | |||
viewBinding.switchToast.setChecked(PreferenceUtils.getBoolean(ConfigName.cookToast,true)); | |||
viewBinding.btnUpdateKey.setOnClickListener(v->{ | |||
ThreadManager.get().execute(new Thread(()->{ | |||
HomeGoodsViewModel.GetServiceKey(new HomeGoodsViewModel.CallBack() { | |||
@@ -131,6 +132,8 @@ public class SceneSetFragment extends BaseFragment { | |||
PreferenceUtils.setString(ConfigName.serviceKey,viewBinding.editKey.getText().toString()); | |||
PreferenceUtils.setString(ConfigName.deviceNumber,viewBinding.editDeviceNumber.getText().toString()); | |||
PreferenceUtils.setBoolean(ConfigName.rootTip,viewBinding.zijianSwitch.isChecked()); | |||
PreferenceUtils.setBoolean(ConfigName.cookToast,viewBinding.switchToast.isChecked()); | |||
ConfigName.getInstance().showCookingToast = viewBinding.switchToast.isChecked(); | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SYSTEMSET.class,null); | |||
ConfigName.getInstance().DeviceAutoKey = viewBinding.editDeviceNumber.getText().toString(); | |||
@@ -9,11 +9,13 @@ import android.util.Log; | |||
import android.view.LayoutInflater; | |||
import android.view.MotionEvent; | |||
import android.view.View; | |||
import android.widget.ArrayAdapter; | |||
import android.widget.EditText; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import com.apkfuns.logutils.LogUtils; | |||
import com.bonait.bnframework.HBL.Thread.ThreadManager; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.business.ExecuteTheRecipe; | |||
@@ -27,6 +29,9 @@ import com.bonait.bnframework.databinding.FragmentWokDirectionSetBinding; | |||
import com.bonait.bnframework.modbus.ModbusCenter; | |||
import com.bonait.bnframework.newui.widget.NewToastUtil; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
* @author: liup | |||
* @description: 设备信息设置 | |||
@@ -155,17 +160,37 @@ public class WokDirectionSetFragment extends BaseFragment { | |||
} | |||
}); | |||
List<String> wokList = new ArrayList<>(); | |||
wokList.add("1"); | |||
wokList.add("2"); | |||
wokList.add("3"); | |||
wokList.add("4"); | |||
ArrayAdapter<String> spinnerAdapter2 = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item, wokList); | |||
spinnerAdapter2.setDropDownViewResource(R.layout.spinner_dropdown_item); | |||
viewBinding.spinnerWok.setAdapter(spinnerAdapter2); | |||
viewBinding.spinnerWok.setSelection(0); | |||
viewBinding.deviceNumSave.setOnClickListener(v->{ | |||
String num = viewBinding.edtDeviceNum.getText().toString(); | |||
if(num.equals("2")){ | |||
deviceNum = 2; | |||
RefreshThread(); | |||
}else if(num.equals("1")){ | |||
deviceNum = 1; | |||
RefreshThread(); | |||
}else { | |||
NewToastUtil.getInstance().showToastError("请输入有效设备号!"); | |||
return; | |||
String num = viewBinding.spinnerWok.getSelectedItem().toString(); | |||
switch (num) { | |||
case "1": | |||
deviceNum = 1; | |||
RefreshThread(); | |||
break; | |||
case "2": | |||
deviceNum = 2; | |||
RefreshThread(); | |||
break; | |||
case "3": | |||
deviceNum = 3; | |||
RefreshThread(); | |||
break; | |||
case "4": | |||
deviceNum = 4; | |||
RefreshThread(); | |||
break; | |||
default: | |||
NewToastUtil.getInstance().showToastError("请输入有效设备号!"); | |||
return; | |||
} | |||
viewBinding.tvDeviceNum.setText(deviceNum+"号设备"); | |||
}); | |||
@@ -40,24 +40,24 @@ public class DeviceStatusView extends FrameLayout implements LifecycleEventObser | |||
private static final Logger log = LoggerFactory.getLogger(DeviceStatusView.class); | |||
private ViewDeviceStatusBinding viewBinding; | |||
private int deviceNum = 1; | |||
private int deviceNum = 0; | |||
private boolean isResume = true; | |||
private Handler handler = new Handler(Looper.getMainLooper()){ | |||
@Override | |||
public void handleMessage(@NonNull Message msg) { | |||
super.handleMessage(msg); | |||
if(msg.what==1){ | |||
if(viewBinding!=null){ | |||
init(); | |||
if(handler.hasMessages(1)){ | |||
handler.removeMessages(1); | |||
} | |||
handler.sendEmptyMessageDelayed(1,1000); | |||
} | |||
} | |||
} | |||
}; | |||
// private Handler handler = new Handler(Looper.getMainLooper()){ | |||
// @Override | |||
// public void handleMessage(@NonNull Message msg) { | |||
// super.handleMessage(msg); | |||
// if(msg.what==1){ | |||
// if(viewBinding!=null){ | |||
// init(); | |||
// if(handler.hasMessages(1)){ | |||
// handler.removeMessages(1); | |||
// } | |||
// handler.sendEmptyMessageDelayed(1,1000); | |||
// } | |||
// } | |||
// } | |||
// }; | |||
public DeviceStatusView(Context context, AttributeSet attrs, int deviceNum) { | |||
super(context, attrs); | |||
@@ -68,20 +68,23 @@ public class DeviceStatusView extends FrameLayout implements LifecycleEventObser | |||
init(); | |||
} | |||
private void init(){ | |||
public void init(){ | |||
try { | |||
if(deviceNum==0 || viewBinding.name==null){ | |||
return; | |||
} | |||
BPA_ORDER_DETAIL orderDetail = OrderDetailUtil.getByMaking(deviceNum); | |||
viewBinding.name.setText(deviceNum+"号炒锅"); | |||
if(orderDetail==null){ | |||
viewBinding.tvGoods.setText(""); | |||
}else { | |||
viewBinding.tvGoods.setText(orderDetail.goodsName+"-"+orderDetail.groupName); | |||
viewBinding.tvGoods.setText(orderDetail.goodsName); | |||
} | |||
Object val_wd = ModbusCenter.getWokListingValue(deviceNum,"当前锅底温度"); | |||
if (val_wd != null) { | |||
viewBinding.tvWendu.setText("锅内温度:"+val_wd + "°C"); | |||
viewBinding.tvWendu.setText(val_wd + "°C"); | |||
} else { | |||
viewBinding.tvWendu.setText("锅内温度:"+"??°C"); | |||
viewBinding.tvWendu.setText("??°C"); | |||
} | |||
if(Wok1ModbusTcpServer.get().plcIsConnect){ | |||
@@ -106,16 +109,16 @@ public class DeviceStatusView extends FrameLayout implements LifecycleEventObser | |||
public void onStateChanged(@NonNull LifecycleOwner source, @NonNull Lifecycle.Event event) { | |||
switch (event) { | |||
case ON_PAUSE: | |||
if(handler!=null){ | |||
handler.removeCallbacksAndMessages(null); | |||
LogUtils.d("DeviceStatusView onStateChanged ON_PAUSE"); | |||
} | |||
// if(handler!=null){ | |||
// handler.removeCallbacksAndMessages(null); | |||
// LogUtils.d("DeviceStatusView onStateChanged ON_PAUSE"); | |||
// } | |||
break; | |||
case ON_RESUME: | |||
if(handler!=null){ | |||
handler.sendEmptyMessage(1); | |||
LogUtils.d("DeviceStatusView onStateChanged ON_RESUME"); | |||
} | |||
// if(handler!=null){ | |||
// handler.sendEmptyMessage(1); | |||
// LogUtils.d("DeviceStatusView onStateChanged ON_RESUME"); | |||
// } | |||
break; | |||
} | |||
} | |||
@@ -1,6 +1,6 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<solid android:color="#A0BEAA6A"/> | |||
<solid android:color="#60BEAA6A"/> | |||
<corners android:radius="10dp"/> | |||
</shape> |
@@ -0,0 +1,121 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||
android:background="@color/white" | |||
xmlns:tools="http://schemas.android.com/tools"> | |||
<LinearLayout | |||
android:orientation="vertical" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent"> | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
app:layout_constraintTop_toTopOf="parent" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/home_tab_height" > | |||
<TextView | |||
android:id="@+id/back" | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:textColor="@color/white" | |||
android:textSize="@dimen/sp_32" | |||
android:text=" 返 回" | |||
android:paddingRight="@dimen/dp_50" | |||
android:drawableLeft="@mipmap/fanhui" | |||
android:gravity="center" | |||
android:paddingLeft="@dimen/dp_5" | |||
android:drawablePadding="@dimen/dp_5" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:text="调试设置" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
/> | |||
</com.qmuiteam.qmui.widget.QMUITopBarLayout> | |||
<androidx.constraintlayout.widget.ConstraintLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent"> | |||
<!-- <com.google.android.material.bottomnavigation.BottomNavigationView--> | |||
<!-- android:id="@+id/navigation"--> | |||
<!-- android:layout_width="match_parent"--> | |||
<!-- android:layout_height="@dimen/dp_56"--> | |||
<!-- android:layout_gravity="top"--> | |||
<!-- app:layout_constraintTop_toTopOf="parent"--> | |||
<!-- app:layout_constraintLeft_toLeftOf="parent"--> | |||
<!-- android:background="@drawable/qmui_list_item_bg_with_border_bottom"--> | |||
<!-- app:itemHorizontalTranslationEnabled="false"--> | |||
<!-- app:labelVisibilityMode="labeled"--> | |||
<!-- style="@style/BottomNavigationTextStyle"--> | |||
<!-- app:menu="@menu/system"--> | |||
<!-- android:fitsSystemWindows="true"/>--> | |||
<LinearLayout | |||
android:id="@+id/ll_top_bar" | |||
android:layout_width="match_parent" | |||
android:layout_height="90dp" | |||
android:orientation="horizontal" | |||
app:layout_constraintTop_toTopOf="parent" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
android:background="@color/white" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
> | |||
<LinearLayout | |||
android:id="@+id/ll4" | |||
android:layout_width="150dp" | |||
android:orientation="vertical" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
android:layout_marginStart="50dp" | |||
android:layout_marginTop="5dp" | |||
android:layout_height="match_parent"> | |||
<ImageView | |||
android:id="@+id/img4" | |||
android:layout_width="40dp" | |||
android:src="@drawable/icon_systemsettings" | |||
android:layout_height="40dp"/> | |||
<TextView | |||
android:id="@+id/tv_title4" | |||
android:layout_width="match_parent" | |||
android:text="PLC地址" | |||
android:textSize="28sp" | |||
android:textColor="@drawable/selector_bop_bar_textcolor" | |||
android:gravity="center" | |||
android:layout_height="match_parent"/> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<com.qmuiteam.qmui.widget.QMUIViewPager | |||
android:id="@+id/viewpager" | |||
android:layout_width="match_parent" | |||
android:layout_height="0dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toBottomOf="@id/ll_top_bar" | |||
app:layout_constraintBottom_toBottomOf="parent" | |||
android:background="?attr/app_content_bg_color" /> | |||
<TextView | |||
android:layout_width="1dp" | |||
android:focusableInTouchMode="true" | |||
android:focusable="true" | |||
app:layout_constraintTop_toTopOf="parent" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
android:layout_marginTop="@dimen/dp_80" | |||
android:layout_height="1dp"> | |||
<requestFocus/> | |||
</TextView> | |||
</androidx.constraintlayout.widget.ConstraintLayout> | |||
</LinearLayout> | |||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -78,12 +78,12 @@ | |||
android:layout_marginTop="5dp" | |||
android:layout_height="match_parent"> | |||
<ImageView | |||
android:id="@+id/img3" | |||
android:id="@+id/img1" | |||
android:layout_width="40dp" | |||
android:src="@drawable/icon_systemsettings" | |||
android:layout_height="40dp"/> | |||
<TextView | |||
android:id="@+id/tv_title3" | |||
android:id="@+id/tv_title1" | |||
android:layout_width="match_parent" | |||
android:text="系统设置" | |||
android:textSize="28sp" | |||
@@ -103,12 +103,12 @@ | |||
android:layout_marginTop="5dp" | |||
android:layout_height="match_parent"> | |||
<ImageView | |||
android:id="@+id/img1" | |||
android:id="@+id/img2" | |||
android:layout_width="40dp" | |||
android:src="@drawable/icon_networkmanagement" | |||
android:layout_height="40dp"/> | |||
<TextView | |||
android:id="@+id/tv_title1" | |||
android:id="@+id/tv_title2" | |||
android:layout_width="match_parent" | |||
android:text="资源管理" | |||
android:textSize="28sp" | |||
@@ -127,12 +127,12 @@ | |||
android:layout_marginTop="5dp" | |||
android:layout_height="match_parent"> | |||
<ImageView | |||
android:id="@+id/img2" | |||
android:id="@+id/img3" | |||
android:layout_width="40dp" | |||
android:src="@drawable/icon_deviceinformation" | |||
android:layout_height="40dp"/> | |||
<TextView | |||
android:id="@+id/tv_title2" | |||
android:id="@+id/tv_title3" | |||
android:layout_width="match_parent" | |||
android:text="限位设置" | |||
android:textSize="28sp" | |||
@@ -142,29 +142,29 @@ | |||
</LinearLayout> | |||
<LinearLayout | |||
android:id="@+id/ll4" | |||
android:layout_width="150dp" | |||
android:orientation="vertical" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
android:layout_marginStart="50dp" | |||
android:layout_marginTop="5dp" | |||
android:layout_height="match_parent"> | |||
<ImageView | |||
android:id="@+id/img4" | |||
android:layout_width="40dp" | |||
android:src="@drawable/icon_systemsettings" | |||
android:layout_height="40dp"/> | |||
<TextView | |||
android:id="@+id/tv_title4" | |||
android:layout_width="match_parent" | |||
android:text="PLC地址" | |||
android:textSize="28sp" | |||
android:textColor="@drawable/selector_bop_bar_textcolor" | |||
android:gravity="center" | |||
android:layout_height="match_parent"/> | |||
</LinearLayout> | |||
<!-- <LinearLayout--> | |||
<!-- android:id="@+id/ll4"--> | |||
<!-- android:layout_width="150dp"--> | |||
<!-- android:orientation="vertical"--> | |||
<!-- android:layout_gravity="center"--> | |||
<!-- android:gravity="center"--> | |||
<!-- android:layout_marginStart="50dp"--> | |||
<!-- android:layout_marginTop="5dp"--> | |||
<!-- android:layout_height="match_parent">--> | |||
<!-- <ImageView--> | |||
<!-- android:id="@+id/img4"--> | |||
<!-- android:layout_width="40dp"--> | |||
<!-- android:src="@drawable/icon_systemsettings"--> | |||
<!-- android:layout_height="40dp"/>--> | |||
<!-- <TextView--> | |||
<!-- android:id="@+id/tv_title4"--> | |||
<!-- android:layout_width="match_parent"--> | |||
<!-- android:text="PLC地址"--> | |||
<!-- android:textSize="28sp"--> | |||
<!-- android:textColor="@drawable/selector_bop_bar_textcolor"--> | |||
<!-- android:gravity="center"--> | |||
<!-- android:layout_height="match_parent"/>--> | |||
<!-- </LinearLayout>--> | |||
</LinearLayout> | |||
<com.qmuiteam.qmui.widget.QMUIViewPager | |||
@@ -174,7 +174,6 @@ | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toBottomOf="@id/ll_top_bar" | |||
app:layout_constraintBottom_toBottomOf="parent" | |||
android:visibility="gone" | |||
android:background="?attr/app_content_bg_color" /> | |||
<TextView | |||
@@ -187,56 +186,6 @@ | |||
android:layout_height="1dp"> | |||
<requestFocus/> | |||
</TextView> | |||
<RelativeLayout | |||
android:id="@+id/rl_quanxian" | |||
android:layout_gravity="top" | |||
android:layout_width="match_parent" | |||
android:layout_height="0dp" | |||
app:layout_constraintBottom_toBottomOf="parent" | |||
app:layout_constraintTop_toBottomOf="@id/ll_top_bar" | |||
android:focusableInTouchMode="true" | |||
android:background="#90BEAA6A"> | |||
<LinearLayout | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_centerHorizontal="true" | |||
android:orientation="vertical"> | |||
<EditText | |||
android:id="@+id/edittext_quanxian" | |||
android:layout_width="@dimen/dp_400" | |||
android:layout_marginTop="@dimen/dp_300" | |||
android:layout_height="@dimen/dp_90" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入权限密码" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:text="123456" | |||
android:padding="@dimen/dp_3" | |||
android:textSize="@dimen/sp_32" /> | |||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||
android:layout_width="wrap_content" | |||
android:visibility="gone" | |||
android:layout_height="wrap_content" | |||
android:text="密码提示:12****" | |||
android:textColor="@color/colorAccent" | |||
android:textSize="8dp" | |||
android:layout_centerVertical="true" | |||
android:layout_marginRight="@dimen/dp_10" | |||
android:layout_alignParentRight="true"/> | |||
<Button | |||
android:id="@+id/btn_submit" | |||
android:layout_width="@dimen/dp_150" | |||
android:layout_height="@dimen/dp_70" | |||
android:layout_marginTop="20dp" | |||
android:layout_alignParentRight="true" | |||
android:background="@drawable/button1" | |||
android:text="确认" | |||
android:textColor="@color/black" | |||
android:layout_gravity="right" | |||
android:textSize="@dimen/sp_32" /> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
</androidx.constraintlayout.widget.ConstraintLayout> | |||
</LinearLayout> | |||
@@ -0,0 +1,82 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
xmlns:tools="http://schemas.android.com/tools" | |||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||
android:orientation="vertical" | |||
tools:background="#88000000"> | |||
<FrameLayout | |||
android:layout_width="@dimen/dp_1000" | |||
android:layout_height="wrap_content" | |||
android:layout_gravity="center" | |||
android:background="@drawable/bg_round25_white" | |||
> | |||
<TextView | |||
android:id="@+id/title" | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_85" | |||
android:background="@drawable/bg_top_round25_yellow" | |||
android:textSize="@dimen/sp_32" | |||
android:textColor="@color/white" | |||
android:text="提示" | |||
android:gravity="center" | |||
/> | |||
<EditText | |||
android:id="@+id/edit" | |||
android:layout_width="@dimen/dp_900" | |||
android:layout_height="80dp" | |||
android:background="@drawable/input_bj" | |||
android:textSize="36sp" | |||
android:hint="请输入密码" | |||
android:maxLength="6" | |||
android:gravity="center" | |||
android:paddingLeft="@dimen/dp_10" | |||
android:paddingRight="@dimen/dp_10" | |||
android:layout_gravity="center" | |||
android:layout_marginTop="@dimen/dp_160" | |||
android:layout_marginBottom="@dimen/dp_160" | |||
/> | |||
<Button | |||
android:id="@+id/cancel" | |||
android:layout_width="wrap_content" | |||
android:layout_height="@dimen/dp_90" | |||
android:textSize="@dimen/sp_32" | |||
android:textColor="@color/white" | |||
android:text="取消" | |||
android:paddingStart="40dp" | |||
android:paddingEnd="40dp" | |||
android:background="@drawable/bg_round25_yellow_btn" | |||
android:layout_gravity="bottom" | |||
android:layout_marginBottom="@dimen/dp_20" | |||
android:layout_marginLeft="@dimen/dp_30" | |||
/> | |||
<Button | |||
android:id="@+id/submit" | |||
android:layout_width="wrap_content" | |||
android:layout_height="@dimen/dp_90" | |||
android:textSize="@dimen/sp_32" | |||
android:textColor="@color/white" | |||
android:text="确认" | |||
android:paddingStart="40dp" | |||
android:paddingEnd="40dp" | |||
android:background="@drawable/bg_round25_yellow_btn" | |||
android:layout_gravity="bottom|end" | |||
android:layout_marginBottom="@dimen/dp_20" | |||
android:layout_marginEnd="20dp" | |||
/> | |||
<ImageView | |||
android:id="@+id/btn_close" | |||
android:layout_width="@dimen/dp_80" | |||
android:layout_marginEnd="20dp" | |||
android:layout_height="@dimen/dp_80" | |||
android:layout_gravity="end" | |||
style="@style/TextView_btn_dialog" | |||
android:background="@mipmap/ic_clear_white_48dp" | |||
/> | |||
</FrameLayout> | |||
</LinearLayout> |
@@ -220,6 +220,28 @@ | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:orientation="horizontal" | |||
android:layout_marginBottom="20dp" | |||
android:layout_height="wrap_content"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="70dp" | |||
android:textColor="@color/black" | |||
android:textSize="32sp" | |||
android:text="是否展示烹饪信息提示框:" | |||
android:layout_gravity="center_vertical" | |||
android:gravity="center_vertical" | |||
/> | |||
<com.suke.widget.SwitchButton | |||
android:id="@+id/switch_toast" | |||
android:layout_width="200dp" | |||
android:layout_height="@dimen/dp_70" | |||
android:layout_marginStart="20dp" | |||
android:layout_centerVertical="true" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:orientation="horizontal" | |||
@@ -0,0 +1,125 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:layout_width="wrap_content" | |||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||
xmlns:tools="http://schemas.android.com/tools" | |||
android:layout_gravity="center" | |||
android:gravity="center" | |||
android:background="@color/transparent" | |||
android:layout_height="wrap_content"> | |||
<RelativeLayout | |||
android:layout_width="1200dp" | |||
android:background="@drawable/bg_round25_white" | |||
android:layout_height="900dp"> | |||
<androidx.constraintlayout.widget.ConstraintLayout | |||
android:layout_width="1200dp" | |||
android:id="@+id/cl_content2" | |||
android:background="@drawable/bg_round25_white" | |||
android:layout_height="900dp"> | |||
<ImageView | |||
android:layout_width="1100dp" | |||
android:layout_height="550dp" | |||
android:layout_marginTop="220dp" | |||
app:layout_constraintTop_toTopOf="parent" | |||
app:layout_constraintStart_toStartOf="parent" | |||
app:layout_constraintEnd_toEndOf="parent" | |||
android:scaleY="1.1" | |||
android:scaleX="1.1" | |||
/> | |||
<TextView | |||
android:id="@+id/tv_chucan1" | |||
android:layout_width="270dp" | |||
android:layout_height="80dp" | |||
android:background="@drawable/bg_pen_check" | |||
app:layout_constraintStart_toStartOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
android:layout_marginTop="340dp" | |||
android:layout_marginStart="140dp" | |||
android:gravity="center" | |||
android:textSize="32sp" | |||
android:maxLines="2" | |||
android:ellipsize="end" | |||
android:text="出餐盆1有盆" | |||
android:textColor="@color/black" | |||
tools:background="@mipmap/ic_pen" | |||
/> | |||
<TextView | |||
android:id="@+id/tv_chucan2" | |||
android:layout_width="270dp" | |||
android:layout_height="80dp" | |||
android:background="@drawable/bg_pen_check" | |||
app:layout_constraintStart_toStartOf="@id/tv_chucan1" | |||
app:layout_constraintTop_toTopOf="@id/tv_chucan1" | |||
android:layout_marginStart="540dp" | |||
android:gravity="center" | |||
android:textSize="32sp" | |||
android:maxLines="2" | |||
android:ellipsize="end" | |||
android:text="出餐盆2有盆" | |||
android:textColor="@color/black" | |||
tools:background="@mipmap/ic_pen" | |||
/> | |||
<TextView | |||
android:id="@+id/tv_chucan3" | |||
android:layout_width="270dp" | |||
android:layout_height="80dp" | |||
android:background="@drawable/bg_pen_check" | |||
app:layout_constraintStart_toStartOf="@id/tv_chucan1" | |||
app:layout_constraintTop_toTopOf="@id/tv_chucan1" | |||
android:layout_marginTop="200dp" | |||
android:gravity="center" | |||
android:textSize="32sp" | |||
android:maxLines="2" | |||
android:ellipsize="end" | |||
android:text="出餐盆3有盆" | |||
android:textColor="@color/black" | |||
tools:background="@mipmap/ic_pen" | |||
/> | |||
<TextView | |||
android:id="@+id/tv_chucan4" | |||
android:layout_width="270dp" | |||
android:layout_height="80dp" | |||
android:background="@drawable/bg_pen_check" | |||
app:layout_constraintStart_toStartOf="@id/tv_chucan2" | |||
app:layout_constraintTop_toTopOf="@id/tv_chucan3" | |||
android:gravity="center" | |||
android:textSize="32sp" | |||
android:maxLines="2" | |||
android:ellipsize="end" | |||
android:text="出餐盆4有盆" | |||
android:textColor="@color/black" | |||
tools:background="@mipmap/ic_pen" | |||
/> | |||
</androidx.constraintlayout.widget.ConstraintLayout> | |||
<TextView | |||
android:id="@+id/title1" | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_80" | |||
android:background="@drawable/bg_round25_top_yellow" | |||
style="@style/TextView_btn_dialog" | |||
android:text="出餐盒检测" | |||
app:layout_constraintTop_toTopOf="parent" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
/> | |||
<ImageView | |||
android:id="@+id/btn_close1" | |||
android:layout_width="@dimen/dp_80" | |||
android:layout_height="@dimen/dp_80" | |||
style="@style/TextView_btn_dialog" | |||
android:layout_marginEnd="20dp" | |||
android:layout_alignParentEnd="true" | |||
android:background="@mipmap/ic_clear_white_48dp" | |||
app:layout_constraintTop_toTopOf="parent" | |||
app:layout_constraintEnd_toEndOf="parent" | |||
/> | |||
</RelativeLayout> | |||
</LinearLayout> |
@@ -411,7 +411,7 @@ | |||
android:textSize="32sp" | |||
android:maxLines="2" | |||
android:ellipsize="end" | |||
android:text="主料Z6" | |||
android:text="主料Z1" | |||
android:textColor="@color/black" | |||
/> | |||
<TextView | |||
@@ -426,7 +426,7 @@ | |||
android:textSize="32sp" | |||
android:maxLines="2" | |||
android:ellipsize="end" | |||
android:text="主料Z5" | |||
android:text="主料Z2" | |||
android:textColor="@color/black" | |||
/> | |||
<TextView | |||
@@ -442,7 +442,7 @@ | |||
android:textSize="32sp" | |||
android:maxLines="2" | |||
android:ellipsize="end" | |||
android:text="主料Z4" | |||
android:text="主料Z3" | |||
android:textColor="@color/black" | |||
/> | |||
<TextView | |||
@@ -456,7 +456,7 @@ | |||
android:textSize="32sp" | |||
android:maxLines="2" | |||
android:ellipsize="end" | |||
android:text="主料Z3" | |||
android:text="主料Z4" | |||
android:textColor="@color/black" | |||
/> | |||
<TextView | |||
@@ -472,7 +472,7 @@ | |||
android:textSize="32sp" | |||
android:maxLines="2" | |||
android:ellipsize="end" | |||
android:text="主料Z2" | |||
android:text="主料Z5" | |||
android:textColor="@color/black" | |||
/> | |||
<TextView | |||
@@ -486,7 +486,7 @@ | |||
android:textSize="32sp" | |||
android:maxLines="2" | |||
android:ellipsize="end" | |||
android:text="主料Z1" | |||
android:text="主料Z6" | |||
android:textColor="@color/black" | |||
/> | |||
@@ -4,7 +4,7 @@ | |||
android:layout_height="wrap_content" | |||
xmlns:tools="http://schemas.android.com/tools"> | |||
<LinearLayout | |||
android:layout_width="1400dp" | |||
android:layout_width="1000dp" | |||
android:layout_height="wrap_content" | |||
android:background="@drawable/bg_round25_white" | |||
android:layout_gravity="center" | |||
@@ -36,8 +36,22 @@ | |||
android:layout_width="120dp" | |||
android:layout_height="120dp" | |||
android:src="@mipmap/ic_click" | |||
android:layout_marginTop="300dp" | |||
android:layout_marginStart="1150dp" | |||
android:layout_marginTop="800dp" | |||
android:layout_marginStart="1550dp" | |||
/> | |||
<ImageView | |||
android:layout_width="120dp" | |||
android:layout_height="120dp" | |||
android:src="@mipmap/ic_click" | |||
android:layout_marginTop="400dp" | |||
android:layout_marginStart="1550dp" | |||
/> | |||
<ImageView | |||
android:layout_width="120dp" | |||
android:layout_height="120dp" | |||
android:src="@mipmap/ic_click" | |||
android:layout_marginTop="800dp" | |||
android:layout_marginStart="550dp" | |||
/> | |||
<ImageView | |||
@@ -48,27 +62,6 @@ | |||
android:layout_marginStart="950dp" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_marginTop="200dp" | |||
android:layout_marginStart="1100dp" | |||
android:textSize="36sp" | |||
android:textColor="@color/white" | |||
android:text="点击检测货架" | |||
android:gravity="center" | |||
android:paddingStart="10dp" | |||
android:paddingEnd="10dp" | |||
android:background="#c0BEAA6A" | |||
android:layout_height="80dp"/> | |||
<TextView | |||
android:id="@+id/btn_dish_check" | |||
android:layout_width="320dp" | |||
android:layout_marginTop="200dp" | |||
android:layout_marginStart="1050dp" | |||
android:textSize="36sp" | |||
android:textColor="@color/white" | |||
android:layout_height="200dp"/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
@@ -113,6 +106,73 @@ | |||
android:gravity="center" | |||
android:layout_height="400dp"/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="120dp" | |||
android:layout_marginTop="250dp" | |||
android:background="#c0BEAA6A" | |||
android:gravity="center" | |||
android:layout_marginStart="1450dp" | |||
android:text="点击调试\n3号炒锅" | |||
android:paddingStart="10dp" | |||
android:paddingEnd="10dp" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" /> | |||
<TextView | |||
android:id="@+id/btn_chaoguo3" | |||
android:layout_width="300dp" | |||
android:layout_marginTop="250dp" | |||
android:textSize="36sp" | |||
android:textColor="@color/white" | |||
android:gravity="center" | |||
android:layout_marginStart="1450dp" | |||
android:layout_height="400dp"/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="120dp" | |||
android:layout_marginTop="650dp" | |||
android:background="#c0BEAA6A" | |||
android:gravity="center" | |||
android:layout_marginStart="1450dp" | |||
android:text="点击调试\n4号炒锅" | |||
android:paddingStart="10dp" | |||
android:paddingEnd="10dp" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" /> | |||
<TextView | |||
android:id="@+id/btn_chaoguo4" | |||
android:layout_width="300dp" | |||
android:layout_marginTop="650dp" | |||
android:textSize="36sp" | |||
android:textColor="@color/white" | |||
android:gravity="center" | |||
android:layout_marginStart="1450dp" | |||
android:layout_height="350dp"/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="120dp" | |||
android:layout_marginTop="700dp" | |||
android:background="#c0BEAA6A" | |||
android:gravity="center" | |||
android:layout_marginStart="450dp" | |||
android:text="查看出餐盆" | |||
android:paddingStart="10dp" | |||
android:paddingEnd="10dp" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" /> | |||
<TextView | |||
android:id="@+id/btn_chuCan" | |||
android:layout_width="300dp" | |||
android:layout_marginTop="700dp" | |||
android:textSize="36sp" | |||
android:textColor="@color/white" | |||
android:gravity="center" | |||
android:layout_marginStart="450dp" | |||
android:layout_height="300dp"/> | |||
<TextView | |||
android:layout_width="200dp" | |||
android:layout_marginTop="500dp" | |||
@@ -110,29 +110,35 @@ | |||
android:layout_weight="1" | |||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||
android:orientation="vertical" | |||
android:layout_marginBottom="100dp" | |||
/> | |||
<TextView | |||
android:id="@+id/btn_food_pos_set" | |||
android:layout_width="280dp" | |||
android:layout_height="80dp" | |||
android:layout_marginTop="10dp" | |||
android:layout_gravity="center_horizontal|bottom" | |||
style="@style/TextView_btn_blue" | |||
android:text="设置位置信息" | |||
/> | |||
<TextView | |||
android:id="@+id/btn_location_info" | |||
android:layout_width="280dp" | |||
android:layout_height="80dp" | |||
android:layout_marginTop="10dp" | |||
android:layout_gravity="center_horizontal|bottom" | |||
style="@style/TextView_btn_blue" | |||
android:text="查看原料位置" | |||
android:layout_marginBottom="10dp" | |||
/> | |||
</LinearLayout> | |||
<TextView | |||
android:id="@+id/btn_food_pos_set" | |||
android:layout_width="wrap_content" | |||
android:layout_height="80dp" | |||
android:layout_marginTop="10dp" | |||
android:layout_gravity="end|bottom" | |||
style="@style/TextView_btn_blue" | |||
android:text="设置位置" | |||
android:paddingStart="20dp" | |||
android:paddingEnd="20dp" | |||
android:layout_marginEnd="210dp" | |||
android:layout_marginBottom="10dp" | |||
/> | |||
<TextView | |||
android:id="@+id/btn_location_info" | |||
android:layout_width="wrap_content" | |||
android:layout_height="80dp" | |||
android:layout_marginTop="10dp" | |||
android:layout_gravity="end|bottom" | |||
android:layout_marginEnd="10dp" | |||
style="@style/TextView_btn_blue" | |||
android:text="查看位置" | |||
android:layout_marginBottom="10dp" | |||
android:paddingStart="20dp" | |||
android:paddingEnd="20dp" | |||
/> | |||
</FrameLayout> | |||
@@ -15,7 +15,7 @@ | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_height="50dp" | |||
android:layout_marginTop="@dimen/dp_20"> | |||
<TextView | |||
@@ -27,22 +27,18 @@ | |||
android:minWidth="60dp" | |||
android:textSize="32sp" | |||
android:text="设备号" /> | |||
<LinearLayout | |||
android:layout_width="wrap_content" | |||
android:layout_height="50dp"> | |||
<Spinner | |||
android:id="@+id/spinner_wok" | |||
style="@style/commonSpinnerStyle" | |||
android:layout_width="300dp" | |||
android:layout_height="50dp" | |||
/> | |||
</LinearLayout> | |||
<EditText | |||
android:imeOptions="actionDone" | |||
android:id="@+id/edt_deviceNum" | |||
android:layout_width="200dp" | |||
android:layout_height="wrap_content" | |||
android:layout_marginStart="5dp" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入设备号" | |||
android:inputType="number" | |||
android:gravity="center" | |||
android:maxLines="1" | |||
android:textSize="32sp" | |||
android:padding="3dp" | |||
android:text="1"/> | |||
<Button | |||
android:id="@+id/device_num_save" | |||
@@ -3,11 +3,11 @@ | |||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||
xmlns:tools="http://schemas.android.com/tools" | |||
android:layout_width="match_parent" | |||
android:layout_height="300dp" | |||
android:layout_height="200dp" | |||
tools:layout_width="400dp" | |||
android:paddingBottom="20dp" | |||
android:paddingBottom="10dp" | |||
android:id="@+id/root" | |||
android:paddingTop="20dp" | |||
android:paddingTop="10dp" | |||
android:paddingStart="20dp" | |||
android:paddingEnd="20dp" | |||
android:background="@drawable/bg_order_select" | |||
@@ -46,23 +46,39 @@ | |||
android:layout_height="wrap_content" | |||
tools:text="正在烹饪:小炒肉-大份" | |||
android:textSize="@dimen/sp_32" | |||
android:maxLines="3" | |||
android:maxLines="1" | |||
android:ellipsize="end" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:textColor="@color/black" | |||
android:textColor="@color/gray_deep" | |||
/> | |||
<TextView | |||
android:id="@+id/tv_wendu" | |||
<LinearLayout | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
tools:text="锅内温度:??°C" | |||
android:textSize="@dimen/sp_32" | |||
android:maxLines="1" | |||
android:singleLine="true" | |||
android:ellipsize="end" | |||
android:layout_gravity="end|bottom" | |||
android:textColor="@color/black" | |||
/> | |||
android:layout_height="wrap_content"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="锅内温度:" | |||
android:textSize="@dimen/sp_32" | |||
android:maxLines="1" | |||
android:singleLine="true" | |||
android:ellipsize="end" | |||
android:textColor="@color/black" | |||
/> | |||
<TextView | |||
android:id="@+id/tv_wendu" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
tools:text=" 00°C" | |||
android:textSize="@dimen/sp_32" | |||
android:maxLines="1" | |||
android:singleLine="true" | |||
android:ellipsize="end" | |||
android:textColor="@color/red_primary" | |||
/> | |||
</LinearLayout> | |||
</FrameLayout> |