@@ -212,12 +212,12 @@ | |||
<category android:name="android.intent.category.LAUNCHER" /> | |||
</intent-filter> | |||
</receiver> | |||
<meta-data | |||
android:name="design_width_in_dp" | |||
android:value="800" /> | |||
<meta-data | |||
android:name="design_height_in_dp" | |||
android:value="1208" /> | |||
<!-- <meta-data--> | |||
<!-- android:name="design_width_in_dp"--> | |||
<!-- android:value="1920" />--> | |||
<!-- <meta-data--> | |||
<!-- android:name="design_height_in_dp"--> | |||
<!-- android:value="1080" />--> | |||
</application> | |||
</manifest> |
@@ -14,6 +14,7 @@ import com.apkfuns.logutils.LogUtils; | |||
import com.bonait.bnframework.HBL.Interface.IRun; | |||
import com.bonait.bnframework.HBL.Interface.IRunT; | |||
import com.bonait.bnframework.HBL.Thread.ThreadManager; | |||
import com.bonait.bnframework.MainApplication; | |||
import com.bonait.bnframework.Model.CheckPositionBean; | |||
import com.bonait.bnframework.Model.MyStatus; | |||
import com.bonait.bnframework.Service.ModbusTcpServer; | |||
@@ -141,6 +142,7 @@ public class ExecuteTheRecipe { | |||
ExecuteTheRecipe.IsPause2 = false; | |||
ExecuteTheRecipe.MakeStatus2 = false; | |||
ExecuteTheRecipe.IsStart2 = false; | |||
closeDownTimer(); | |||
} | |||
//endregion | |||
@@ -182,8 +184,14 @@ public class ExecuteTheRecipe { | |||
OrderDetailUtil.update(orderDetail); | |||
ArrayList<BPA_GOODS_PROCESS_DETAIL> goodsrecipes = GoodsProcessDetailDBUtil.getByGroupId(orderDetail.groupId); | |||
if(ExecuteTheRecipe.MakeStatus2&&!goodsrecipes.isEmpty()){ | |||
ExecuteTheRecipe.showlog("开始烹饪菜谱【" + orderDetail.goodsName + "】"); | |||
ExecuteOperationSteps(goodsrecipes.get(0).processname, goodsrecipes.get(0).processvalue); | |||
ThreadManager.get().execute(new Thread(new Runnable() { | |||
@Override | |||
public void run() { | |||
ExecuteOperationSteps(goodsrecipes.get(0).processname, goodsrecipes.get(0).processvalue); | |||
} | |||
})); | |||
} | |||
return; | |||
} | |||
@@ -229,13 +237,15 @@ public class ExecuteTheRecipe { | |||
OrderDetailUtil.update(orderDetail); | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
EventBus.getDefault().post(new MakingStepEvent(orderDetail.type,-1)); | |||
RecordManager.getInstance().addLogRecord("订单处理日志","("+orderDetail.goodsName+"-"+orderDetail.groupName+")-制作异常"); | |||
RecordManager.getInstance().addOrderRecords(orderDetail,"异常"); | |||
} finally { | |||
ExecuteTheRecipe.WritePLC("搅拌", false, null); | |||
ExecuteTheRecipe.WritePLC("加热", false, null); | |||
ExecuteTheRecipe.WritePLC("暂停开关", false, null); | |||
ConfigName.getInstance().IsOpenHuoLi = false; | |||
ExecuteTheRecipe.BottomClick("平移-去1号位"); | |||
long endTime = System.currentTimeMillis(); //结束时间 | |||
int time = (int) ((endTime - startTime) / 1000); | |||
Log.e("运行时长", String.format("方法使用时间 %d s", time)); | |||
@@ -260,12 +270,16 @@ public class ExecuteTheRecipe { | |||
{ | |||
ModbusCenter.robotWritePlc(true,"强制结束",null,null); | |||
} | |||
ExecuteTheRecipe.StopForcedEnd();//设置恢复强制结束 | |||
ExecuteTheRecipe.IsForcedEnd = false; | |||
RecordManager.getInstance().addLogRecord("订单处理日志","("+orderDetail.goodsName+"-"+orderDetail.groupName+")-制作取消"); | |||
RecordManager.getInstance().addOrderRecords(orderDetail,"取消"); | |||
}else { | |||
orderDetail.status = 2; | |||
orderDetail.process = 0; | |||
OrderDetailUtil.update(orderDetail); | |||
EventBus.getDefault().post(new MakingStepEvent(orderDetail.type,-3)); | |||
RecordManager.getInstance().addLogRecord("订单处理日志","("+orderDetail.goodsName+"-"+orderDetail.groupName+")-制作完成"); | |||
RecordManager.getInstance().addOrderRecords(orderDetail,"完成"); | |||
} | |||
ModbusTcpServer.get().WriteBool("M52.0", (boolean) false, null); | |||
reset1(); | |||
@@ -298,7 +312,7 @@ public class ExecuteTheRecipe { | |||
return false; | |||
} | |||
if ((!WokModbusTcpServer.get().plcIsConnect||!RobotModbusTcpServer.get().plcIsConnect||!OvenModbusTcpServer.get().plcIsConnect) && !ConfigName.TEST) { | |||
if ((!WokModbusTcpServer.get().plcIsConnect||!RobotModbusTcpServer.get().plcIsConnect) && !ConfigName.TEST) { | |||
ExecuteTheRecipe.showlog("客官,检测到硬件已经断开连接,主动停止炒制!!!"); | |||
IsForcedEnd = true; | |||
return false; | |||
@@ -1055,40 +1069,61 @@ public class ExecuteTheRecipe { | |||
ThreadWhile2("温度旋钮在档位"+wendu); | |||
BPA_ORDER_DETAIL detail = OrderDetailUtil.getByMaking(1); | |||
assert detail != null; | |||
detail.process = 1; | |||
detail.process = 0; | |||
OrderDetailUtil.update(detail); | |||
EventBus.getDefault().post(new MakingStepEvent(1,detail.process)); | |||
cookedTime = 0; | |||
countDownTimer = new CountDownTimer(cookingTime*60*1000,60*1000) { | |||
MainApplication.handler.post(new Runnable() { | |||
@Override | |||
public void onTick(long l) { | |||
BPA_ORDER_DETAIL bean = OrderDetailUtil.getByMaking(1); | |||
if(!ExecuteTheRecipe.MakeStatus2 || !ExecuteTheRecipe.IsStart||bean==null|| ExecuteTheRecipe.IsForcedEnd2){ | |||
if(countDownTimer!=null){ | |||
countDownTimer.cancel(); | |||
public void run() { | |||
countDownTimer = new CountDownTimer(cookingTime*60*1000L,1000L) { | |||
@Override | |||
public void onTick(long l) { | |||
BPA_ORDER_DETAIL bean = OrderDetailUtil.getByMaking(1); | |||
if(!ExecuteTheRecipe.MakeStatus2 ||bean==null|| ExecuteTheRecipe.IsForcedEnd2){ | |||
LogUtils.d("Write_PLC_Oven countDownTimer onTick 退出"); | |||
reset2(); | |||
} | |||
if(bean!=null){ | |||
bean.process = bean.process+1; | |||
cookedTime++; | |||
OrderDetailUtil.update(bean); | |||
EventBus.getDefault().post(new MakingStepEvent(1,bean.process)); | |||
} | |||
LogUtils.d("Write_PLC_Oven countDownTimer onTick 烤箱烹饪倒计时 cookingTime="+cookingTime+"; cookedTime="+cookedTime); | |||
} | |||
} | |||
if(bean!=null){ | |||
bean.process = bean.process+1; | |||
cookedTime++; | |||
OrderDetailUtil.update(bean); | |||
EventBus.getDefault().post(new MakingStepEvent(1,bean.process)); | |||
} | |||
} | |||
@Override | |||
public void onFinish() { | |||
cookedTime = cookingTime; | |||
BPA_ORDER_DETAIL bean = OrderDetailUtil.getByMaking(1); | |||
Write_PLC_Oven_End(); | |||
bean.process = ExecuteTheRecipe.cookingTime; | |||
bean.status = 2; | |||
OrderDetailUtil.update(bean); | |||
EventBus.getDefault().post(new MakingStepEvent(1,-3)); | |||
reset2(); | |||
@Override | |||
public void onFinish() { | |||
LogUtils.d("Write_PLC_Oven countDownTimer onFinish 烤箱烹饪倒计时1 cookingTime="+cookingTime+"; cookedTime="+cookedTime); | |||
cookedTime = cookingTime*60; | |||
ThreadManager.get().execute(new Thread(new Runnable() { | |||
@Override | |||
public void run() { | |||
BPA_ORDER_DETAIL bean = OrderDetailUtil.getByMaking(1); | |||
try { | |||
Write_PLC_Oven_End(); | |||
LogUtils.d("Write_PLC_Oven countDownTimer onFinish 烤箱烹饪倒计时2 cookingTime="+cookingTime+"; cookedTime="+cookedTime); | |||
}catch (Exception e){ | |||
LogUtils.d("异常信息:"+e.getMessage()); | |||
}finally { | |||
EventBus.getDefault().post(new MakingStepEvent(1,-3)); | |||
reset2(); | |||
assert bean != null; | |||
bean.process = ExecuteTheRecipe.cookingTime*60; | |||
bean.status = 2; | |||
OrderDetailUtil.update(bean); | |||
RecordManager.getInstance().addLogRecord("订单处理日志","("+bean.goodsName+"-"+bean.groupName+")-制作完成"); | |||
RecordManager.getInstance().addOrderRecords(bean,"完成"); | |||
} | |||
} | |||
})); | |||
} | |||
}; | |||
countDownTimer.start(); | |||
} | |||
}; | |||
countDownTimer.start(); | |||
}); | |||
ExecuteTheRecipe.showlog("等待烤箱烹饪!"); | |||
} catch (Exception ex) { | |||
BPA_ORDER_DETAIL bean = OrderDetailUtil.getByMaking(1); | |||
@@ -1099,6 +1134,8 @@ public class ExecuteTheRecipe { | |||
reset2(); | |||
EventBus.getDefault().post(new MakingStepEvent(1,-1)); | |||
NewToastUtil.getInstance().showToastError("异常信息:" + ex.getMessage()); | |||
RecordManager.getInstance().addLogRecord("订单处理日志","("+bean.goodsName+"-"+bean.groupName+")-制作异常"); | |||
RecordManager.getInstance().addOrderRecords(bean,"异常"); | |||
} | |||
} | |||
@@ -1115,7 +1152,7 @@ public class ExecuteTheRecipe { | |||
final boolean[] IsComplete = {true}; | |||
long a = System.currentTimeMillis(); | |||
while (IsComplete[0] && !IsForcedEnd && WokModbusTcpServer.get().plcIsConnect && ConfigName.TEST) { | |||
while (IsComplete[0] && !IsForcedEnd2 && WokModbusTcpServer.get().plcIsConnect && RobotModbusTcpServer.get().plcIsConnect && !ConfigName.TEST) { | |||
if ((System.currentTimeMillis() - a) > 1000 * whileTime) { | |||
ExecuteTheRecipe.showlog("烤箱功率判断是否工作,异常超时退出!"); | |||
break; | |||
@@ -1158,7 +1195,7 @@ public class ExecuteTheRecipe { | |||
public static void Wait_Robot_No_Working(){ | |||
try { | |||
boolean robotNoWorking = false; | |||
while (!robotNoWorking && !IsForcedEnd && !ConfigName.TEST) { | |||
while (!robotNoWorking && !ConfigName.TEST) { | |||
Object object1 = ModbusCenter.robotReadPlc("主任务读取"); | |||
Object object2 = ModbusCenter.robotReadPlc("机器人在原点"); | |||
Object object3 = ModbusCenter.robotReadPlc("机器人准备就绪"); | |||
@@ -1545,6 +1582,9 @@ public class ExecuteTheRecipe { | |||
* @return | |||
*/ | |||
public static Object getListingValue(String name) { | |||
if(ConfigName.TEST){ | |||
return true; | |||
} | |||
if (!ListeningValue.containsKey(name)) { | |||
return null; | |||
} | |||
@@ -1677,7 +1717,8 @@ public class ExecuteTheRecipe { | |||
NoticeAtPresentTime.Run(AtPresentTime); | |||
} | |||
long startTime = System.currentTimeMillis(); | |||
while ((System.currentTimeMillis() - startTime) <= (delay * 1000) && !IsForcedEnd && (WokModbusTcpServer.get().plcIsConnect ||ConfigName.TEST)) { | |||
while ((System.currentTimeMillis() - startTime) <= (delay * 1000) && !IsForcedEnd &&!IsPause&& | |||
((WokModbusTcpServer.get().plcIsConnect&&RobotModbusTcpServer.get().plcIsConnect) ||!ConfigName.TEST)) { | |||
try { | |||
Thread.sleep(100); | |||
int mmmm = delay - (int) ((System.currentTimeMillis() - startTime) / 1000); | |||
@@ -1758,7 +1799,7 @@ public class ExecuteTheRecipe { | |||
final boolean[] IsComplete = {false}; | |||
long a = System.currentTimeMillis(); | |||
ExecuteTheRecipe.showlog(name + ",等待中"); | |||
while (!IsComplete[0] && !IsForcedEnd && WokModbusTcpServer.get().plcIsConnect&&RobotModbusTcpServer.get().plcIsConnect&& OvenModbusTcpServer.get().plcIsConnect && ConfigName.TEST) { | |||
while (!IsComplete[0] && !IsForcedEnd && WokModbusTcpServer.get().plcIsConnect&&RobotModbusTcpServer.get().plcIsConnect&& OvenModbusTcpServer.get().plcIsConnect && !ConfigName.TEST) { | |||
if ((System.currentTimeMillis() - a) > 1000 * whileTime) { | |||
ExecuteTheRecipe.showlog(name + ",异常超时退出!"); | |||
break; | |||
@@ -1788,7 +1829,7 @@ public class ExecuteTheRecipe { | |||
final boolean[] IsComplete = {false}; | |||
long a = System.currentTimeMillis(); | |||
ExecuteTheRecipe.showlog(name + ",等待中"); | |||
while (!IsComplete[0] && !IsForcedEnd && WokModbusTcpServer.get().plcIsConnect&&RobotModbusTcpServer.get().plcIsConnect&& OvenModbusTcpServer.get().plcIsConnect && ConfigName.TEST) { | |||
while (!IsComplete[0] && !IsForcedEnd2 && WokModbusTcpServer.get().plcIsConnect&&RobotModbusTcpServer.get().plcIsConnect&& OvenModbusTcpServer.get().plcIsConnect && !ConfigName.TEST) { | |||
if ((System.currentTimeMillis() - a) > 1000 * whileTime) { | |||
ExecuteTheRecipe.showlog(name + ",异常超时退出!"); | |||
break; | |||
@@ -5,6 +5,7 @@ import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_SUBATTRIBUTE_GROUP; | |||
import com.bonait.bnframework.common.db.mode.BPA_LOG_RECORD; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_LIST; | |||
import com.bonait.bnframework.common.db.util.GoodsDBUtil; | |||
import com.bonait.bnframework.common.db.util.LogRecordUtil; | |||
@@ -110,6 +111,42 @@ public class RecordManager { | |||
})); | |||
} | |||
/** | |||
* 添加订单记录 | |||
* @param group | |||
* @param type 1完成 2取消 3异常 | |||
*/ | |||
public void addOrderRecords(BPA_ORDER_DETAIL group, String type){ | |||
if(group==null||type==null||type.isEmpty()){ | |||
return; | |||
} | |||
ThreadManager.get().execute(new Thread(()->{ | |||
try{ | |||
BPA_ORDER_LIST order = new BPA_ORDER_LIST(); | |||
order.groupName = group.groupName; | |||
order.groupId = group.groupId; | |||
order.goodsName = group.goodsName; | |||
order.classifyId = group.classifyId; | |||
order.goodsId = group.goodsId; | |||
switch (type){ | |||
case "完成": | |||
order.status = 1; | |||
break; | |||
case "取消": | |||
order.status = 2; | |||
break; | |||
case "异常": | |||
order.status = 3; | |||
break; | |||
} | |||
OrderListUtil.add(order); | |||
}catch (Exception e){ | |||
e.printStackTrace(); | |||
} | |||
})); | |||
} | |||
private boolean compareTime(String createTime) { | |||
try { | |||
// 使用 SimpleDateFormat 解析字符串为 Date 对象 | |||
@@ -60,6 +60,19 @@ public class ConfigName { | |||
public String ovenAddress = "192.168.1.103";//烤箱地址 | |||
public int ovenPost = 502; | |||
/** | |||
* 火力 | |||
*/ | |||
public String fireNum = ""; | |||
/** | |||
* 翻炒速度 | |||
*/ | |||
public String fanchaoSpeed = ""; | |||
/** | |||
* 锅口朝向 | |||
*/ | |||
public String guokouChaoxiang = ""; | |||
/** | |||
* 炒锅PLC模型 | |||
@@ -761,9 +774,6 @@ public class ConfigName { | |||
case "清洗方式": | |||
data = "一般清洗、深度清洗"; | |||
break; | |||
case "菜盘位置": | |||
data = "1号位、2号位、3号位、4号位、5号位、6号位、7号位、8号位、9号位、10号位、11号位、12号位、13号位、14号位、15号位、16号位、17号位、18号位、19号位、20号位"; | |||
break; | |||
case "主料位置": | |||
data = "1号位、2号位、3号位、4号位、5号位、6号位"; | |||
break; | |||
@@ -92,6 +92,10 @@ public class DisplayManager | |||
miReferencedMaxHeight = iMaxHeight; | |||
} | |||
public static double getScale(int num){ | |||
return 1920*num/1208; | |||
} | |||
/** | |||
* | |||
* 设置参考的样张屏幕密度 | |||
@@ -467,7 +471,7 @@ public class DisplayManager | |||
* @return | |||
*/ | |||
public static boolean shouldScale(TextView view){ | |||
if(view.getTextSize()> 34 || view.getTextSize()< 30){ | |||
if(view.getTextSize()> DisplayManager.getScale(32)+2 || view.getTextSize()< DisplayManager.getScale(32)-2){ | |||
return true; | |||
} | |||
return false; | |||
@@ -51,9 +51,15 @@ public class ModbusCenter { | |||
* plc连接 | |||
*/ | |||
public static void connectPlc(){ | |||
RobotModbusTcpServer.ConnectPLC(); | |||
OvenModbusTcpServer.ConnectPLC(); | |||
WokModbusTcpServer.ConnectPLC(); | |||
if(ConfigName.TEST){ | |||
RobotModbusTcpServer.get().plcIsConnect = true; | |||
OvenModbusTcpServer.get().plcIsConnect = true; | |||
WokModbusTcpServer.get().plcIsConnect = true; | |||
}else { | |||
RobotModbusTcpServer.ConnectPLC(); | |||
OvenModbusTcpServer.ConnectPLC(); | |||
WokModbusTcpServer.ConnectPLC(); | |||
} | |||
} | |||
/** | |||
@@ -130,6 +136,9 @@ public class ModbusCenter { | |||
} | |||
public static Object ReadPlc(String name){ | |||
if(ConfigName.TEST){ | |||
return true; | |||
} | |||
if (plcAddress.containsKey(name)) { | |||
BPA_PLCADDRESS plcaddress = plcAddress.get(name); | |||
assert plcaddress != null; | |||
@@ -1,9 +1,13 @@ | |||
package com.bonait.bnframework.newui.activity; | |||
import android.os.Bundle; | |||
import android.os.Handler; | |||
import android.os.Looper; | |||
import android.os.Message; | |||
import android.view.KeyEvent; | |||
import android.view.View; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.fragment.app.Fragment; | |||
import androidx.viewpager.widget.ViewPager; | |||
@@ -16,6 +20,7 @@ import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.db.file.DBHelper; | |||
import com.bonait.bnframework.common.db.mode.BPA_ALERTLOG; | |||
import com.bonait.bnframework.common.db.mode.BPA_LOG_RECORD; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_RECORD; | |||
import com.bonait.bnframework.common.db.mode.BPA_SUBORDER_RECORD; | |||
import com.bonait.bnframework.common.db.util.OrderDetailUtil; | |||
@@ -45,6 +50,48 @@ public class MainHActivity extends BaseActivity { | |||
private TabAdapter tabAdapter; | |||
private ArrayList<Fragment> pages; | |||
private Handler handler = new Handler(Looper.getMainLooper()){ | |||
@Override | |||
public void handleMessage(@NonNull Message msg) { | |||
super.handleMessage(msg); | |||
if(msg.what==1){ | |||
BPA_ORDER_DETAIL detail1 = OrderDetailUtil.getByMaking(0); | |||
BPA_ORDER_DETAIL detail2 = OrderDetailUtil.getByMaking(1); | |||
if(detail1!=null){ | |||
String desc = "烹饪中..."; | |||
if(detail1.status==1){ | |||
desc = "烹饪中..."; | |||
}else if(detail1.status==2){ | |||
desc = "烹饪完成"; | |||
}else if(detail1.status==3){ | |||
desc = "烹饪异常"; | |||
} | |||
viewBinding.tvWok.setText("炒锅:菜品【"+detail1.goodsName+(detail1.groupName==null?"":detail1.groupName)+"】"+desc); | |||
}else { | |||
viewBinding.tvWok.setText(""); | |||
} | |||
if(detail2!=null){ | |||
String desc = "烹饪中..."; | |||
if(detail2.status==1){ | |||
desc = "烹饪中..."; | |||
}else if(detail2.status==2){ | |||
desc = "烹饪完成"; | |||
}else if(detail2.status==3){ | |||
desc = "烹饪异常"; | |||
} | |||
viewBinding.tvOven.setText("烤箱:菜品【"+detail2.goodsName+(detail2.groupName==null?"":detail2.groupName)+"】"+desc); | |||
}else { | |||
viewBinding.tvOven.setText(""); | |||
} | |||
if(handler.hasMessages(1)){ | |||
handler.removeMessages(1); | |||
} | |||
handler.sendEmptyMessageDelayed(1,1000); | |||
} | |||
} | |||
}; | |||
@Override | |||
protected void onCreate(@Nullable Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
@@ -97,6 +144,13 @@ public class MainHActivity extends BaseActivity { | |||
initFragment(); | |||
viewBinding.viewpager.setOnPageChangeListener(pageChangeListener); | |||
viewBinding.viewpager.setOffscreenPageLimit(1); | |||
viewBinding.tvWok.setOnClickListener(v->{ | |||
viewBinding.viewpager.setCurrentItem(1); | |||
}); | |||
viewBinding.tvOven.setOnClickListener(v->{ | |||
viewBinding.viewpager.setCurrentItem(1); | |||
}); | |||
} | |||
/** | |||
@@ -171,10 +225,30 @@ public class MainHActivity extends BaseActivity { | |||
return super.onKeyDown(keyCode, event); | |||
} | |||
@Override | |||
protected void onResume() { | |||
super.onResume(); | |||
if(handler!=null){ | |||
handler.sendEmptyMessage(1); | |||
} | |||
} | |||
@Override | |||
protected void onPause() { | |||
super.onPause(); | |||
if(handler!=null){ | |||
handler.removeCallbacksAndMessages(null); | |||
} | |||
} | |||
@Override | |||
protected void onDestroy() { | |||
reset(); | |||
super.onDestroy(); | |||
if(handler!=null){ | |||
handler.removeCallbacksAndMessages(null); | |||
handler = null; | |||
} | |||
} | |||
private void reset(){ | |||
@@ -28,7 +28,7 @@ public class FoodInfoAdapter extends BaseAdapter<String, FoodInfoAdapter.ViewHol | |||
@SuppressLint("SetTextI18n") | |||
@Override | |||
public void onBindViewHolder(@NonNull FoodInfoAdapter.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
if(holder.binding.sort.getTextSize()>28||holder.binding.sort.getTextSize()<24){ | |||
if(holder.binding.sort.getTextSize()>DisplayManager.getScale(26)+2||holder.binding.sort.getTextSize()<DisplayManager.getScale(26)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.sort.setText((position+1)+"."); | |||
@@ -30,7 +30,7 @@ public abstract class GoodsClassifyAdapter extends BaseAdapter<BPA_GOODS_CLASSIF | |||
@SuppressLint("SetTextI18n") | |||
@Override | |||
public void onBindViewHolder(@NonNull GoodsClassifyAdapter.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
if(holder.binding.name.getTextSize()>34||holder.binding.name.getTextSize()<30){ | |||
if(holder.binding.name.getTextSize()>DisplayManager.getScale(32)+2||holder.binding.name.getTextSize()<DisplayManager.getScale(32)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.name.setText(mData.get(position).name+""); | |||
@@ -8,6 +8,7 @@ import android.view.ViewGroup; | |||
import androidx.annotation.NonNull; | |||
import androidx.recyclerview.widget.RecyclerView; | |||
import com.apkfuns.logutils.LogUtils; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseAdapter; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | |||
@@ -33,11 +34,12 @@ public abstract class HomeGoodsAdapter extends BaseAdapter<BPA_GOODS, HomeGoodsA | |||
@Override | |||
public void onBindViewHolder(@NonNull GoodsViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
try { | |||
if(holder.binding.name.getTextSize()> 30 || holder.binding.name.getTextSize()< 26){ | |||
LogUtils.d(" ///////// size28="+holder.binding.name.getTextSize()); | |||
if(holder.binding.name.getTextSize()> DisplayManager.getScale(28)+2 || holder.binding.name.getTextSize()< DisplayManager.getScale(28)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.add.setVisibility(View.GONE); | |||
LogUtils.d(" ///////// size28="+holder.binding.name.getTextSize()); | |||
BPA_GOODS goods = mData.get(position); | |||
holder.binding.name.setText(goods.name); | |||
@@ -8,6 +8,7 @@ import android.view.ViewGroup; | |||
import androidx.annotation.NonNull; | |||
import androidx.recyclerview.widget.RecyclerView; | |||
import com.apkfuns.logutils.LogUtils; | |||
import com.bonait.bnframework.business.ExecuteTheRecipe; | |||
import com.bonait.bnframework.common.base.BaseAdapter; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | |||
@@ -30,16 +31,22 @@ public abstract class OrderInfoAdapter extends BaseAdapter<BPA_ORDER_DETAIL,Orde | |||
@SuppressLint("SetTextI18n") | |||
@Override | |||
public void onBindViewHolder(@NonNull OrderInfoAdapter.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
if(holder.binding.sort.getTextSize()>34||holder.binding.sort.getTextSize()<30){ | |||
if(holder.binding.sort.getTextSize()>DisplayManager.getScale(32)+2||holder.binding.sort.getTextSize()<DisplayManager.getScale(32)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
BPA_ORDER_DETAIL bean = mData.get(position); | |||
holder.binding.cookDesc.setText(""); | |||
if(position==0){ | |||
if(bean.status==1){ | |||
if(bean.type==1){ | |||
holder.binding.progressBar.setMax(ExecuteTheRecipe.cookingTime); | |||
holder.binding.progressBar.setProgress(Math.min(bean.process,ExecuteTheRecipe.cookingTime)); | |||
holder.binding.progressBar.setMax(ExecuteTheRecipe.cookingTime*60); | |||
holder.binding.progressBar.setProgress(Math.min(bean.process,ExecuteTheRecipe.cookingTime*60)); | |||
if(ExecuteTheRecipe.cookingTime!=0){ | |||
LogUtils.d("setProcess 烤箱烹饪倒计时 cookingTime="+ExecuteTheRecipe.cookingTime+"; cookedTime="+ExecuteTheRecipe.cookedTime); | |||
holder.binding.cookDesc.setText("共"+ExecuteTheRecipe.cookingTime+"分钟,已烹饪"+ExecuteTheRecipe.cookedTime/60+"分"+ExecuteTheRecipe.cookedTime%60+"秒,"+"剩余"+ | |||
(ExecuteTheRecipe.cookingTime-(ExecuteTheRecipe.cookedTime/60))+"分钟"); | |||
} | |||
}else { | |||
int max= GoodsProcessDetailDBUtil.getByGroupId(bean.groupId).size(); | |||
holder.binding.progressBar.setMax(max); | |||
@@ -31,7 +31,7 @@ public class OrderNameAdapter extends BaseAdapter<BPA_ORDER_DETAIL, OrderNameAda | |||
@Override | |||
public void onBindViewHolder(@NonNull OrderNameAdapter.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
BPA_ORDER_DETAIL bean = mData.get(position); | |||
if(holder.binding.sort.getTextSize()>28||holder.binding.sort.getTextSize()<24){ | |||
if(holder.binding.sort.getTextSize()>DisplayManager.getScale(26)+2||holder.binding.sort.getTextSize()<DisplayManager.getScale(32)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
if(bean.type == 0){ | |||
@@ -30,7 +30,7 @@ public abstract class TabAdapter extends BaseAdapter<String, TabAdapter.ViewHold | |||
@Override | |||
public void onBindViewHolder(@NonNull TabAdapter.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
if(holder.binding.name.getTextSize()>34||holder.binding.name.getTextSize()<30){ | |||
if(holder.binding.name.getTextSize()>DisplayManager.getScale(32)+2||holder.binding.name.getTextSize()<DisplayManager.getScale(32)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.name.setText(mData.get(position)+""); | |||
@@ -29,7 +29,7 @@ public class WarnInfoAdapter extends BaseAdapter<String, WarnInfoAdapter.ViewHol | |||
@SuppressLint("SetTextI18n") | |||
@Override | |||
public void onBindViewHolder(@NonNull WarnInfoAdapter.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
if(holder.binding.name.getTextSize()>30||holder.binding.name.getTextSize()<26){ | |||
if(holder.binding.name.getTextSize()>DisplayManager.getScale(28)+2||holder.binding.name.getTextSize()<DisplayManager.getScale(28)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.name.setText(mData.get(position)+""); | |||
@@ -28,7 +28,7 @@ public class WarnRecordAdapter extends BaseAdapter<String, WarnRecordAdapter.Vie | |||
@SuppressLint("SetTextI18n") | |||
@Override | |||
public void onBindViewHolder(@NonNull WarnRecordAdapter.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
if(holder.binding.name.getTextSize()>30||holder.binding.name.getTextSize()<26){ | |||
if(holder.binding.name.getTextSize()>DisplayManager.getScale(28)+2||holder.binding.name.getTextSize()<DisplayManager.getScale(28)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.name.setText((position+1)+"."+mData.get(position)+""); | |||
@@ -174,106 +174,98 @@ public class FoodCheckDialog extends DialogFragment { | |||
case "主料位置1号位": | |||
if(value.exist){ | |||
if(value.number%2==0){ | |||
viewBinding.right1.setText("有盒"); | |||
viewBinding.right1.setText("有盆"); | |||
}else { | |||
viewBinding.right1.setText("有盒/未补料"); | |||
viewBinding.right1.setText("有盆/未补料"); | |||
} | |||
viewBinding.right1.setSelected(true); | |||
}else { | |||
viewBinding.right1.setText("无盒"); | |||
viewBinding.right1.setText("无盆"); | |||
viewBinding.right1.setSelected(false); | |||
} | |||
break; | |||
case "主料位置2号位": | |||
if(value.exist){ | |||
if(value.number%2==0){ | |||
viewBinding.right2.setText("有盒"); | |||
viewBinding.right2.setText("有盆"); | |||
}else { | |||
viewBinding.right2.setText("有盒/未补料"); | |||
viewBinding.right2.setText("有盆/未补料"); | |||
} | |||
viewBinding.right2.setSelected(true); | |||
}else { | |||
viewBinding.right2.setText("无盒"); | |||
viewBinding.right2.setText("无盆"); | |||
viewBinding.right2.setSelected(false); | |||
} | |||
break; | |||
case "主料位置3号位": | |||
if(value.exist){ | |||
if(value.number%2==0){ | |||
viewBinding.right3.setText("有盒"); | |||
viewBinding.right3.setText("有盆"); | |||
}else { | |||
viewBinding.right3.setText("有盒/未补料"); | |||
viewBinding.right3.setText("有盆/未补料"); | |||
} | |||
viewBinding.right3.setSelected(true); | |||
}else { | |||
viewBinding.right3.setText("无盒"); | |||
viewBinding.right3.setText("无盆"); | |||
viewBinding.right3.setSelected(false); | |||
} | |||
break; | |||
case "主料位置4号位": | |||
if(value.exist){ | |||
if(value.number%2==0){ | |||
viewBinding.right4.setText("有盒"); | |||
viewBinding.right4.setText("有盆"); | |||
}else { | |||
viewBinding.right4.setText("有盒/未补料"); | |||
viewBinding.right4.setText("有盆/未补料"); | |||
} | |||
viewBinding.right4.setSelected(true); | |||
}else { | |||
viewBinding.right4.setText("无盒"); | |||
viewBinding.right4.setText("无盆"); | |||
viewBinding.right4.setSelected(false); | |||
} | |||
break; | |||
case "主料位置5号位": | |||
if(value.exist){ | |||
if(value.number%2==0){ | |||
viewBinding.right5.setText("有盒"); | |||
viewBinding.right5.setText("有盆"); | |||
}else { | |||
viewBinding.right5.setText("有盒/未补料"); | |||
viewBinding.right5.setText("有盆/未补料"); | |||
} | |||
viewBinding.right5.setSelected(true); | |||
}else { | |||
viewBinding.right5.setText("无盒"); | |||
viewBinding.right5.setText("无盆"); | |||
viewBinding.right5.setSelected(false); | |||
} | |||
break; | |||
case "主料位置6号位": | |||
if(value.exist){ | |||
if(value.number%2==0){ | |||
viewBinding.right6.setText("有盒"); | |||
viewBinding.right6.setText("有盆"); | |||
}else { | |||
viewBinding.right6.setText("有盒/未补料"); | |||
viewBinding.right6.setText("有盆/未补料"); | |||
} | |||
viewBinding.right6.setSelected(true); | |||
}else { | |||
viewBinding.right6.setText("无盒"); | |||
viewBinding.right6.setText("无盆"); | |||
viewBinding.right6.setSelected(false); | |||
} | |||
break; | |||
case "烤盘位置1号位": | |||
view = viewBinding.left1; | |||
if(value.exist){ | |||
if(value.number%2==0){ | |||
view.setText("有盒"); | |||
}else { | |||
view.setText("有盒/未补料"); | |||
} | |||
view.setText("有盆"); | |||
view.setSelected(true); | |||
}else { | |||
view.setText("无盒"); | |||
view.setText("无盆"); | |||
view.setSelected(false); | |||
} | |||
break; | |||
case "烤盘位置2号位": | |||
view = viewBinding.left2; | |||
if(value.exist){ | |||
if(value.number%2==0){ | |||
view.setText("有盒"); | |||
}else { | |||
view.setText("有盒/未补料"); | |||
} | |||
view.setText("有盆"); | |||
view.setSelected(true); | |||
}else { | |||
view.setText("无盒"); | |||
view.setText("无盆"); | |||
view.setSelected(false); | |||
} | |||
break; | |||
@@ -210,7 +210,7 @@ public class FoodControlDialog extends DialogFragment { | |||
ExecuteTheRecipe.Wait_Robot_No_Working();//等待机器人空闲 | |||
Thread.sleep(100); | |||
ModbusCenter.robotWritePlc(true,"1#库取烤架放至烤箱",true,null); | |||
ExecuteTheRecipe.ThreadWhile("烤盘架放料至烤箱完成"); | |||
ExecuteTheRecipe.ThreadWhile2("烤盘架放料至烤箱完成"); | |||
WaitProcessUtil.getInstance().dismiss(); | |||
}catch (Exception e){ | |||
LogUtils.d("异常信息:"+e.getMessage()); | |||
@@ -235,7 +235,7 @@ public class FoodControlDialog extends DialogFragment { | |||
ExecuteTheRecipe.Wait_Robot_No_Working();//等待机器人空闲 | |||
Thread.sleep(100); | |||
ModbusCenter.robotWritePlc(true,"2#库取烤架放至烤箱",true,null); | |||
ExecuteTheRecipe.ThreadWhile("烤盘架放料至烤箱完成"); | |||
ExecuteTheRecipe.ThreadWhile2("烤盘架放料至烤箱完成"); | |||
WaitProcessUtil.getInstance().dismiss(); | |||
}catch (Exception e){ | |||
LogUtils.d("异常信息:"+e.getMessage()); | |||
@@ -186,11 +186,7 @@ public class SilosInfoDialog extends DialogFragment { | |||
*/ | |||
private void initData() { | |||
xuhao.setText(GetNum(mode.num)+""); | |||
if(mode.num == 4){ | |||
silosname.setText(""); | |||
}else { | |||
silosname.setText(mode.materialName+""); | |||
} | |||
silosname.setText(mode.materialName+""); | |||
int bfb=0; | |||
int yl=mode.silosmargin; | |||
@@ -377,7 +373,7 @@ public class SilosInfoDialog extends DialogFragment { | |||
LogUtils.d("SetData mode="+mode); | |||
click_dcqx.SetStatus(false); | |||
mode = data; | |||
viewBinding.rlChangeWl.setVisibility(mode.num==4?View.GONE:View.VISIBLE); | |||
// viewBinding.rlChangeWl.setVisibility(mode.num==4?View.GONE:View.VISIBLE); | |||
//region 设置物料下拉框 | |||
materials.clear(); | |||
List<BPA_MATERIAL> bpa_materials = QueryDB.GetMaterialALL(); | |||
@@ -25,6 +25,7 @@ import androidx.fragment.app.DialogFragment; | |||
import com.apkfuns.logutils.LogUtils; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.business.ExecuteTheRecipe; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | |||
import com.bonait.bnframework.common.db.mode.BPA_SILOS; | |||
@@ -133,7 +134,15 @@ public class WokControlDialog extends DialogFragment { | |||
} | |||
private void initData(){ | |||
//todo 读取设备翻炒速度 朝向 火力控制 | |||
if(!ConfigName.getInstance().guokouChaoxiang.isEmpty()){ | |||
viewBinding.guokoucaoxiang.setText("锅口朝向\n"+ConfigName.getInstance().guokouChaoxiang); | |||
} | |||
if(!ConfigName.getInstance().fanchaoSpeed.isEmpty()){ | |||
viewBinding.tvSpeed.setText(ConfigName.getInstance().fanchaoSpeed); | |||
} | |||
if(!ConfigName.getInstance().fireNum.isEmpty()){ | |||
viewBinding.fireControl.SetLevel(Integer.parseInt(ConfigName.getInstance().fireNum)); | |||
} | |||
} | |||
@SuppressLint("ClickableViewAccessibility") | |||
@@ -230,6 +239,7 @@ public class WokControlDialog extends DialogFragment { | |||
@Override | |||
public void clickListener(View v, Object data) { | |||
int hl = (int) data; | |||
ConfigName.getInstance().fireNum = hl+""; | |||
SetFire(hl); | |||
} | |||
@@ -348,30 +358,37 @@ public class WokControlDialog extends DialogFragment { | |||
case 原点位: | |||
ExecuteTheRecipe.BottomClick("原点位"); | |||
viewBinding.guokoucaoxiang.setText("锅口朝向\n原点位"); | |||
ConfigName.getInstance().guokouChaoxiang = "原点位"; | |||
break; | |||
case 炒菜位1: | |||
ExecuteTheRecipe.BottomClick("炒菜位1"); | |||
viewBinding.guokoucaoxiang.setText("锅口朝向\n炒菜位1"); | |||
ConfigName.getInstance().guokouChaoxiang = "炒菜位1"; | |||
break; | |||
case 炒菜位2: | |||
ExecuteTheRecipe.BottomClick("炒菜位2"); | |||
viewBinding.guokoucaoxiang.setText("锅口朝向\n炒菜位2"); | |||
ConfigName.getInstance().guokouChaoxiang = "炒菜位2"; | |||
break; | |||
case 炒菜位3: | |||
ExecuteTheRecipe.BottomClick("炒菜位3"); | |||
viewBinding.guokoucaoxiang.setText("锅口朝向\n炒菜位3"); | |||
ConfigName.getInstance().guokouChaoxiang = "炒菜位3"; | |||
break; | |||
case 抽料位: | |||
ExecuteTheRecipe.BottomClick("抽料位"); | |||
viewBinding.guokoucaoxiang.setText("锅口朝向\n抽料位"); | |||
ConfigName.getInstance().guokouChaoxiang = "抽料位"; | |||
break; | |||
case 倒菜位: | |||
ExecuteTheRecipe.BottomClick("倒菜位"); | |||
viewBinding.guokoucaoxiang.setText("锅口朝向\n倒菜位"); | |||
ConfigName.getInstance().guokouChaoxiang = "倒菜位"; | |||
break; | |||
case 清洗位: | |||
ExecuteTheRecipe.BottomClick("清洗位"); | |||
viewBinding.guokoucaoxiang.setText("锅口朝向\n清洗位"); | |||
ConfigName.getInstance().guokouChaoxiang = "清洗位"; | |||
break; | |||
} | |||
viewBinding.guokoucaoxiang1.setVisibility(View.GONE); | |||
@@ -390,18 +407,22 @@ public class WokControlDialog extends DialogFragment { | |||
case 快: | |||
_speed = 60; | |||
viewBinding.tvSpeed.setText("翻炒速度:快-"+_speed); | |||
ConfigName.getInstance().fanchaoSpeed = "翻炒速度:快-"+_speed; | |||
break; | |||
case 中: | |||
_speed = 40; | |||
viewBinding.tvSpeed.setText("翻炒速度:中-"+_speed); | |||
ConfigName.getInstance().fanchaoSpeed = "翻炒速度:中-"+_speed; | |||
break; | |||
case 慢: | |||
_speed = 20; | |||
viewBinding.tvSpeed.setText("翻炒速度:慢-"+_speed); | |||
ConfigName.getInstance().fanchaoSpeed = "翻炒速度:慢-"+_speed; | |||
break; | |||
case 停: | |||
_speed = 0; | |||
viewBinding.tvSpeed.setText("翻炒速度:停-"+_speed); | |||
ConfigName.getInstance().fanchaoSpeed = "翻炒速度:停-"+_speed; | |||
break; | |||
} | |||
@@ -198,6 +198,12 @@ public class CloudGoodsHFragment extends BaseFragment { | |||
BPA_GOODS_CLASSIFY goodsClassify = new BPA_GOODS_CLASSIFY(); | |||
goodsClassify.id = bean.getGoodsTypeId(); | |||
goodsClassify.name = bean.getGoodsTypeName(); | |||
for(GoodsClassifyBean bean2:viewModel.goodsList){ | |||
if(bean.getGoodsTypeId().equals(bean2.getGoodsTypeId())){ | |||
goodsClassify.type = 1; | |||
break; | |||
} | |||
} | |||
classifyList.add(goodsClassify); | |||
} | |||
} | |||
@@ -1,5 +1,6 @@ | |||
package com.bonait.bnframework.newui.fragment; | |||
import android.annotation.SuppressLint; | |||
import android.content.Intent; | |||
import android.graphics.Color; | |||
import android.os.Bundle; | |||
@@ -20,6 +21,7 @@ import com.apkfuns.logutils.LogUtils; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.Service.ModbusHelper; | |||
import com.bonait.bnframework.business.ExecuteTheRecipe; | |||
import com.bonait.bnframework.business.RecordManager; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | |||
@@ -32,6 +34,8 @@ import com.bonait.bnframework.common.utils.AlertDialogUtils; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.databinding.FragmentCooking2Binding; | |||
import com.bonait.bnframework.event.MakingStepEvent; | |||
import com.bonait.bnframework.modbus.OvenModbusTcpServer; | |||
import com.bonait.bnframework.modbus.RobotModbusTcpServer; | |||
import com.bonait.bnframework.newui.widget.NewToastUtil; | |||
import com.bonait.bnframework.ui.activity.ErrorInfoActivity; | |||
import com.bonait.bnframework.ui.dialog.WaiteProgressDialog; | |||
@@ -205,7 +209,7 @@ public class Cooking2Fragment extends BaseFragment { | |||
* 启动 | |||
*/ | |||
private void onRecordStart() { | |||
if (goodsSubattributeGroup != null&& !ExecuteTheRecipe.MakeStatus2) { | |||
if (goodsSubattributeGroup != null&& !ExecuteTheRecipe.MakeStatus2 && OvenModbusTcpServer.get().plcIsConnect&& RobotModbusTcpServer.get().plcIsConnect) { | |||
ExecuteTheRecipe.IsForcedEnd2 = false; | |||
ExecuteTheRecipe.IsPause2 = false; | |||
@@ -237,7 +241,9 @@ public class Cooking2Fragment extends BaseFragment { | |||
public void onRecordStop() { | |||
EventBus.getDefault().post(new MakingStepEvent(1,-2)); | |||
viewBinding.startGoodmake.setImageResource(R.mipmap.zhizuo_ks); | |||
ExecuteTheRecipe.closeDownTimer(); | |||
ExecuteTheRecipe.reset2(); | |||
RecordManager.getInstance().addLogRecord("订单处理日志","("+orderDetail.goodsName+"-"+orderDetail.groupName+")-制作取消"); | |||
RecordManager.getInstance().addOrderRecords(orderDetail,"取消"); | |||
if (goodsSubattributeGroup != null) { | |||
NewToastUtil.getInstance().showToast("停止制作"); | |||
process = 0; | |||
@@ -253,22 +259,25 @@ public class Cooking2Fragment extends BaseFragment { | |||
* | |||
* @param | |||
*/ | |||
@SuppressLint("SetTextI18n") | |||
private void setProcess() { | |||
LogUtils.d(this+"setProcess process="+process); | |||
if(viewBinding.goodname.getText().toString().contains("制作完成")){ | |||
viewBinding.progress.SetValue((100)); | |||
viewBinding.timeDesc.setText("共"+ExecuteTheRecipe.cookingTime+"分钟,已烹饪"+ExecuteTheRecipe.cookingTime+"分,"); | |||
}else { | |||
if(ExecuteTheRecipe.cookingTime!=0){ | |||
viewBinding.timeDesc.setText("总时间"+ExecuteTheRecipe.cookingTime+"分钟,已烹饪"+ExecuteTheRecipe.cookedTime+"分钟"); | |||
viewBinding.progress.SetValue(Math.min(process*100/ExecuteTheRecipe.cookingTime,100)); | |||
LogUtils.d("setProcess 烤箱烹饪倒计时 cookingTime="+ExecuteTheRecipe.cookingTime+"; cookedTime="+ExecuteTheRecipe.cookedTime); | |||
viewBinding.timeDesc.setText("共"+ExecuteTheRecipe.cookingTime+"分钟,已烹饪"+ExecuteTheRecipe.cookedTime/60+"分"+ExecuteTheRecipe.cookedTime%60+"秒,"+"剩余"+ | |||
(ExecuteTheRecipe.cookingTime-(ExecuteTheRecipe.cookedTime/60))+"分钟"); | |||
viewBinding.progress.SetValue(Math.min(process*100/(ExecuteTheRecipe.cookingTime*60),100)); | |||
}else { | |||
viewBinding.progress.SetValue((0)); | |||
} | |||
} | |||
if(handler!=null){ | |||
handler.sendEmptyMessage(MSG_Fresh_Step); | |||
} | |||
// if(handler!=null){ | |||
// handler.sendEmptyMessage(MSG_Fresh_Step); | |||
// } | |||
} | |||
/** | |||
@@ -34,6 +34,8 @@ import com.bonait.bnframework.common.utils.AlertDialogUtils; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.databinding.FragmentCookingBinding; | |||
import com.bonait.bnframework.event.MakingStepEvent; | |||
import com.bonait.bnframework.modbus.RobotModbusTcpServer; | |||
import com.bonait.bnframework.modbus.WokModbusTcpServer; | |||
import com.bonait.bnframework.newui.widget.NewToastUtil; | |||
import com.bonait.bnframework.ui.activity.ErrorInfoActivity; | |||
import com.bonait.bnframework.ui.adapter.step.StepAdapter; | |||
@@ -259,7 +261,7 @@ public class CookingFragment extends BaseFragment { | |||
* 启动 | |||
*/ | |||
private void onRecordStart() { | |||
if (goodsSubattributeGroup != null&& !ExecuteTheRecipe.MakeStatus) { | |||
if (goodsSubattributeGroup != null&& !ExecuteTheRecipe.MakeStatus && WokModbusTcpServer.get().plcIsConnect&& RobotModbusTcpServer.get().plcIsConnect) { | |||
ExecuteTheRecipe.IsForcedEnd = false; | |||
ExecuteTheRecipe.IsPause = false; | |||
isPause = false; | |||
@@ -384,6 +386,7 @@ public class CookingFragment extends BaseFragment { | |||
process= 0; | |||
setProcess(); | |||
viewBinding.startGoodmake.setImageResource(R.mipmap.zhizuo_ks); | |||
viewBinding.ivStartPause.setVisibility(View.GONE); | |||
}else if(event.process==-2){ | |||
String content = "强制停止!!!\n"+viewBinding.goodname.getText().toString().replace("\n","-"); | |||
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(content); | |||
@@ -391,6 +394,7 @@ public class CookingFragment extends BaseFragment { | |||
viewBinding.goodname.setText(spannableStringBuilder); | |||
viewBinding.startGoodmake.setImageResource(R.mipmap.zhizuo_ks); | |||
viewBinding.ivStartPause.setVisibility(View.GONE); | |||
isMaking = false; | |||
process = 0; | |||
setProcess(); | |||
@@ -402,6 +406,7 @@ public class CookingFragment extends BaseFragment { | |||
viewBinding.goodname.setText(spannableStringBuilder); | |||
viewBinding.startGoodmake.setImageResource(R.mipmap.zhizuo_ks); | |||
viewBinding.ivStartPause.setVisibility(View.GONE); | |||
isMaking = false; | |||
process = 100; | |||
setProcess(); | |||
@@ -9,6 +9,7 @@ import android.os.Message; | |||
import android.text.Spannable; | |||
import android.text.SpannableStringBuilder; | |||
import android.text.style.ForegroundColorSpan; | |||
import android.view.KeyEvent; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
@@ -64,15 +65,23 @@ public class HomeDevicesFragment extends BaseFragment { | |||
Object object4 = ModbusCenter.getListingValue("出餐工位检测有无"); | |||
if(object1 instanceof Boolean){ | |||
viewBinding.tvChuliaoBox.setText("出料盆位检测:"+(((Boolean)object1)?"有盆":"无盆")); | |||
}else { | |||
viewBinding.tvChuliaoBox.setText("出料盆位检测:异常"); | |||
} | |||
if(object2 instanceof Boolean){ | |||
viewBinding.tvBuliaoBox.setText("补盆位检测:"+(((Boolean)object2)?"有盆":"无盆")); | |||
}else { | |||
viewBinding.tvBuliaoBox.setText("补盆位检测:异常"); | |||
} | |||
if(object3 instanceof Boolean){ | |||
viewBinding.tvShusongxian.setText("输送线:"+(((Boolean)object3)?"启动":"停止")); | |||
viewBinding.tvShusongxian.setText("输送线状态:"+(((Boolean)object3)?"启动":"停止")); | |||
}else { | |||
viewBinding.tvShusongxian.setText("输送线状态:异常"); | |||
} | |||
if(object4 instanceof Boolean){ | |||
viewBinding.tvShusongxian.setText("出餐工位检测:"+(((Boolean)object4)?"有盆":"无盆")); | |||
viewBinding.tvChucaiBox.setText("出餐工位检测:"+(((Boolean)object4)?"有盆":"无盆")); | |||
}else { | |||
viewBinding.tvChucaiBox.setText("出餐工位检测:异常"); | |||
} | |||
}catch (Exception ignored){ | |||
} | |||
@@ -109,8 +118,9 @@ public class HomeDevicesFragment extends BaseFragment { | |||
ThreadManager.get().execute(new Thread(new Runnable() { | |||
@Override | |||
public void run() { | |||
ExecuteTheRecipe.Wait_Robot_No_Working();//等待机器人空闲 | |||
ModbusCenter.robotWritePlc(true,"机器人去维护位置",true,null); | |||
ExecuteTheRecipe.ThreadWhile("机器人到达维护位"); | |||
ExecuteTheRecipe.ThreadWhile2("机器人到达维护位"); | |||
WaitProcessUtil.getInstance().dismiss(); | |||
} | |||
})); | |||
@@ -141,6 +151,8 @@ public class HomeDevicesFragment extends BaseFragment { | |||
} | |||
}); | |||
} | |||
}else { | |||
NewToastUtil.getInstance().showToast("输送线检测异常"); | |||
} | |||
}); | |||
viewBinding.btnLineClose.setOnClickListener(v->{ | |||
@@ -169,6 +181,8 @@ public class HomeDevicesFragment extends BaseFragment { | |||
} | |||
}); | |||
} | |||
}else { | |||
NewToastUtil.getInstance().showToast("输送线检测异常"); | |||
} | |||
}); | |||
viewBinding.btnBulpen.setOnClickListener(v->{ | |||
@@ -185,18 +199,29 @@ public class HomeDevicesFragment extends BaseFragment { | |||
if((Boolean) object1){ | |||
NewToastUtil.getInstance().showToast("出料盆位有盆,不能补盆!"); | |||
}else { | |||
ModbusCenter.WritePlc("单次补盆流程触发", true, new IWriteCallBack() { | |||
@Override | |||
public void onSuccess() { | |||
NewToastUtil.getInstance().showToast("补盆成功!"); | |||
} | |||
Object object2 = ModbusCenter.getListingValue("补盆工位检测有无"); | |||
if(object2 instanceof Boolean){ | |||
if(!(Boolean) object2){ | |||
ModbusCenter.WritePlc("单次补盆流程触发", true, new IWriteCallBack() { | |||
@Override | |||
public void onSuccess() { | |||
NewToastUtil.getInstance().showToast("补盆成功!"); | |||
} | |||
@Override | |||
public void onFailure(String ErrorMsg) { | |||
NewToastUtil.getInstance().showToast("补盆失败!"+ErrorMsg); | |||
@Override | |||
public void onFailure(String ErrorMsg) { | |||
NewToastUtil.getInstance().showToast("补盆失败!"+ErrorMsg); | |||
} | |||
}); | |||
}else { | |||
NewToastUtil.getInstance().showToast("补料盆位无盆,不能补盆!"); | |||
} | |||
}); | |||
}else { | |||
NewToastUtil.getInstance().showToast("补料盆位检测异常!"); | |||
} | |||
} | |||
}else { | |||
NewToastUtil.getInstance().showToast("出料盆位检测异常!"); | |||
} | |||
}); | |||
viewBinding.btnFoods.setOnClickListener(v->{ | |||
@@ -299,4 +324,13 @@ public class HomeDevicesFragment extends BaseFragment { | |||
} | |||
} | |||
} | |||
@Override | |||
public boolean onKeyDown(int keyCode, KeyEvent event) { | |||
if (ExecuteTheRecipe.MakeStatus||ExecuteTheRecipe.MakeStatus2) { | |||
NewToastUtil.getInstance().showToast("正在制作订单,无法调试!"); | |||
return false; | |||
} | |||
return super.onKeyDown(keyCode, event); | |||
} | |||
} |
@@ -26,6 +26,9 @@ import com.bonait.bnframework.databinding.DialogOrderBinding; | |||
import com.bonait.bnframework.databinding.FragmentHomeOrderBinding; | |||
import com.bonait.bnframework.event.FreshOrderEvent; | |||
import com.bonait.bnframework.event.MakingStepEvent; | |||
import com.bonait.bnframework.modbus.OvenModbusTcpServer; | |||
import com.bonait.bnframework.modbus.RobotModbusTcpServer; | |||
import com.bonait.bnframework.modbus.WokModbusTcpServer; | |||
import com.bonait.bnframework.newui.activity.CookingHActivity; | |||
import com.bonait.bnframework.newui.adapter.FoodInfoAdapter; | |||
import com.bonait.bnframework.newui.adapter.OrderInfoAdapter; | |||
@@ -441,7 +444,7 @@ public class HomeOrderFragment extends BaseFragment { | |||
check.append("主料").append(res2[1]).append("未放置;"); | |||
} | |||
}else { | |||
check.append("位置解析失败;"); | |||
check.append("主料位置解析失败;"); | |||
} | |||
}else if(processDetail.processname.equals("辅料")){ | |||
String[] res = processDetail.processvalue.split("\\|"); | |||
@@ -457,10 +460,24 @@ public class HomeOrderFragment extends BaseFragment { | |||
check.append("辅料").append(res2[1]).append("未放置;"); | |||
} | |||
}else { | |||
check.append("位置解析失败;"); | |||
check.append("辅料位置解析失败;"); | |||
} | |||
}else if(processDetail.processname.equals("烤盘")){ | |||
//todo | |||
}else if(processDetail.processname.equals("烤箱")){ | |||
String[] res = processDetail.processvalue.split("\\|"); | |||
for(String s : res){ | |||
if(s.equals("烤盘位置")){ | |||
String[] res2= s.split(","); | |||
String pos = res2[1].replace("号位",""); | |||
CheckPositionBean positionBean = ConfigName.getInstance().positionList.get(pos+"#烤盘检测有无"); | |||
if(positionBean!=null && positionBean.exist){ | |||
}else { | |||
check.append("烤盘位置解析失败;"); | |||
} | |||
break; | |||
} | |||
} | |||
} | |||
} | |||
return check.toString(); | |||
@@ -500,7 +517,7 @@ public class HomeOrderFragment extends BaseFragment { | |||
} | |||
} | |||
}else if(processDetail.processname.equals("烤盘")){ | |||
//todo | |||
} | |||
} | |||
String error = checkPosition(orderDetail); | |||
@@ -526,7 +543,7 @@ public class HomeOrderFragment extends BaseFragment { | |||
* 开始制作 | |||
*/ | |||
private void startMakingThread(BPA_ORDER_DETAIL orderDetail){ | |||
if(!ExecuteTheRecipe.MakeStatus){ | |||
if(!ExecuteTheRecipe.MakeStatus&& WokModbusTcpServer.get().plcIsConnect&& RobotModbusTcpServer.get().plcIsConnect){ | |||
ExecuteTheRecipe.IsForcedEnd = false; | |||
ExecuteTheRecipe.IsPause = false; | |||
ExecuteTheRecipe.MakeStatus = true; | |||
@@ -537,7 +554,7 @@ public class HomeOrderFragment extends BaseFragment { | |||
} | |||
} | |||
private void startMakingThread2(BPA_ORDER_DETAIL orderDetail){ | |||
if(!ExecuteTheRecipe.MakeStatus2){ | |||
if(!ExecuteTheRecipe.MakeStatus2&& OvenModbusTcpServer.get().plcIsConnect&& RobotModbusTcpServer.get().plcIsConnect){ | |||
ExecuteTheRecipe.IsForcedEnd2 = false; | |||
ExecuteTheRecipe.IsPause2 = false; | |||
ExecuteTheRecipe.MakeStatus2 = true; | |||
@@ -33,7 +33,7 @@ public abstract class ClassifyAdapter extends BaseAdapter<BPA_GOODS_CLASSIFY,Cla | |||
if(DisplayManager.shouldScale(holder.binding.name)){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
if(holder.binding.name.getTextSize()>34||holder.binding.name.getTextSize()<30){ | |||
if(holder.binding.name.getTextSize()>DisplayManager.getScale(32)+2||holder.binding.name.getTextSize()<DisplayManager.getScale(32)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.name.setText(mData.get(position).name+""); | |||
@@ -51,7 +51,7 @@ public class ClassifySpinnerAdapter extends BaseAdapter { | |||
} | |||
TextView textView = convertView.findViewById(R.id.textViewCustom); | |||
textView.setText(getItem(position)); | |||
if(textView.getTextSize()>34||textView.getTextSize()<30){ | |||
if(textView.getTextSize()>DisplayManager.getScale(32)+2||textView.getTextSize()<DisplayManager.getScale(32)-2){ | |||
DisplayManager.scaleViewGroup(convertView.findViewById(R.id.root)); | |||
} | |||
@@ -62,7 +62,7 @@ public class SelectAttributeListAdapter extends ArrayAdapter<BPA_ATTRIBUTE> { | |||
//分别获取 image view 和 textview 的实例 | |||
TextView name = view.findViewById(R.id.attribute_name); | |||
RecyclerView recyclerView = view.findViewById(R.id.recycle_sub_attribute); | |||
if(name.getTextSize()>34||name.getTextSize()<30){ | |||
if(name.getTextSize()>DisplayManager.getScale(32)+2||name.getTextSize()<DisplayManager.getScale(32)-2){ | |||
DisplayManager.scaleViewGroup(view.findViewById(R.id.root)); | |||
} | |||
name.setText(bean.name+":"); | |||
@@ -42,7 +42,7 @@ public class SelectSubAttributeAdapter extends BaseAdapter<BPA_SUBATTRIBUTE,Sele | |||
@Override | |||
public void onBindViewHolder(@NonNull SelectSubAttributeAdapter.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
try { | |||
if(holder.binding.name.getTextSize()>34||holder.binding.name.getTextSize()<30){ | |||
if(holder.binding.name.getTextSize()>DisplayManager.getScale(32)+2||holder.binding.name.getTextSize()<DisplayManager.getScale(32)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
BPA_SUBATTRIBUTE subattribute = mData.get(position); | |||
@@ -37,7 +37,7 @@ public abstract class CloudGoodsAdapter extends BaseAdapter<BPA_GOODS,CloudGoods | |||
public void onBindViewHolder(@NonNull GoodsViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
try { | |||
LogUtils.d(" holder.binding.name.getTextSize()="+holder.binding.name.getTextSize()); | |||
if(holder.binding.name.getTextSize()>34||holder.binding.name.getTextSize()<30){ | |||
if(holder.binding.name.getTextSize()>DisplayManager.getScale(32)+2||holder.binding.name.getTextSize()<DisplayManager.getScale(32)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.add.setVisibility(View.GONE); | |||
@@ -38,7 +38,7 @@ public abstract class LocalGoodsAdapter extends BaseAdapter<BPA_GOODS,LocalGoods | |||
@Override | |||
public void onBindViewHolder(@NonNull GoodsViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
try { | |||
if(holder.binding.name.getTextSize()> 34 || holder.binding.name.getTextSize()< 30){ | |||
if(holder.binding.name.getTextSize()>DisplayManager.getScale(32)+2||holder.binding.name.getTextSize()<DisplayManager.getScale(32)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.add.setVisibility(View.GONE); | |||
@@ -29,7 +29,7 @@ public class LocalLogAdapter extends BaseAdapter<BPA_LOG_RECORD, LocalLogAdapter | |||
@Override | |||
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
BPA_LOG_RECORD log = mData.get(position); | |||
if(holder.binding.type.getTextSize()>28||holder.binding.type.getTextSize()<24){ | |||
if(holder.binding.type.getTextSize()>DisplayManager.getScale(26)+2||holder.binding.type.getTextSize()<DisplayManager.getScale(26)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.type.setText(log.typeName+""); | |||
@@ -28,7 +28,7 @@ public abstract class OrderAdapter extends BaseAdapter<BPA_ORDER_RECORD, OrderAd | |||
@Override | |||
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
BPA_ORDER_RECORD order = mData.get(position);//得到当前项选中item实例 | |||
if(holder.binding.name.getTextSize()>28||holder.binding.name.getTextSize()<24){ | |||
if(holder.binding.name.getTextSize()>DisplayManager.getScale(26)+2||holder.binding.name.getTextSize()<DisplayManager.getScale(26)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
@@ -30,9 +30,10 @@ public abstract class SubOrderAdapter extends BaseAdapter<BPA_SUBORDER_RECORD, S | |||
@Override | |||
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
BPA_SUBORDER_RECORD order = mData.get(position);//得到当前项选中item实例 | |||
if(holder.binding.name.getTextSize()>28||holder.binding.name.getTextSize()<24){ | |||
if(holder.binding.name.getTextSize()>DisplayManager.getScale(26)+2||holder.binding.name.getTextSize()<DisplayManager.getScale(26)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
if(order.subNames!=null && !order.subNames.isEmpty()){ | |||
holder.binding.name.setText(order.goodsName+"\n"+order.subNames); | |||
}else { | |||
@@ -31,9 +31,10 @@ public class RecProcessAdapter extends BaseAdapter<BPA_GOODSRECIPE, RecProcessAd | |||
@Override | |||
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
BPA_GOODSRECIPE lc = (BPA_GOODSRECIPE) mData.get(position); | |||
if(holder.binding.name.getTextSize()>34||holder.binding.name.getTextSize()<30){ | |||
if(holder.binding.name.getTextSize()>DisplayManager.getScale(32)+2||holder.binding.name.getTextSize()<DisplayManager.getScale(32)-2){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.name.setText((new DecimalFormat("00").format(position+1))+"、"+lc.processname+":" +lc.processvalue); | |||
} | |||
@@ -36,11 +36,12 @@ public class PlcAddressFragment extends BaseFragment { | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
initView(); | |||
} | |||
private void initView(){ | |||
viewBinding.llContent.removeAllViews(); | |||
viewBinding.llContent2.removeAllViews(); | |||
ArrayList<BPA_PLCADDRESS> arrayList = QueryDB.GetPlcaddressALL(); | |||
int i=0; | |||
for (BPA_PLCADDRESS plcaddress: arrayList) { | |||
@@ -57,4 +58,9 @@ public class PlcAddressFragment extends BaseFragment { | |||
} | |||
} | |||
@Override | |||
public void onResume() { | |||
super.onResume(); | |||
initView(); | |||
} | |||
} |
@@ -52,6 +52,7 @@ import java.util.Map; | |||
public class HomeGoodsViewModel extends ViewModel { | |||
public MutableLiveData<List<GoodsClassifyBean>> cloudGoodsList = new MutableLiveData<>(); | |||
public List<GoodsClassifyBean> goodsList = new ArrayList<>(); | |||
public boolean hasData = false; | |||
public void fetchCloudData(Context context){ | |||
@@ -84,6 +85,22 @@ public class HomeGoodsViewModel extends ViewModel { | |||
} | |||
public void GetGoodsInfo(){ | |||
String autoKey = ConfigName.getInstance().DeviceAutoKey; | |||
String url = "https://cfv.black-pa.com/kitchbase/api/goods/Getdevicegoods?deviceId=2"; | |||
LogUtils.d("GetGoodsInfo url="+url); | |||
RecordManager.getInstance().addLogRecord("数据接收", "请求商品信息-"+url); | |||
APIHelper.PostT(url,null,null,new TypeReference<APIResultT<GoodsData>>(){}).OnSource(s->{ | |||
LogUtils.d("GetGoodsInfo s.Content="+s.Content.toString()); | |||
RecordManager.getInstance().addLogRecord("数据接收", "接收商品信息成功"); | |||
goodsList.clear(); | |||
goodsList.addAll(s.Content.getGoodsInfoList()); | |||
ThreadManager.get().execute(new Thread(()->{ | |||
GetGoodsInfo2(); | |||
})); | |||
}); | |||
} | |||
public void GetGoodsInfo2(){ | |||
String autoKey = ConfigName.getInstance().DeviceAutoKey; | |||
String url = "https://cfv.black-pa.com/kitchbase/api/goods/Getdevicegoods?deviceId=257"; | |||
LogUtils.d("GetGoodsInfo url="+url); | |||
@@ -94,7 +111,10 @@ public class HomeGoodsViewModel extends ViewModel { | |||
runOnUiThread(new Runnable() { | |||
@Override | |||
public void run() { | |||
cloudGoodsList.setValue(s.Content.getGoodsInfoList()); | |||
List<GoodsClassifyBean> dataList = new ArrayList<>(); | |||
dataList.addAll(goodsList); | |||
dataList.addAll(s.Content.getGoodsInfoList()); | |||
cloudGoodsList.setValue(dataList); | |||
} | |||
}); | |||
hasData = true; | |||
@@ -298,6 +318,12 @@ public class HomeGoodsViewModel extends ViewModel { | |||
bpa_goodstype.name = item.getGoodsTypeName(); | |||
bpa_goodstype.id = item.getGoodsTypeId(); | |||
bpa_goodstype.userID="超级管理员"; | |||
for(GoodsClassifyBean bean:goodsList){ | |||
if(item.getGoodsTypeId().equals(bean.getGoodsTypeId())){ | |||
bpa_goodstype.type = 1; | |||
break; | |||
} | |||
} | |||
datas.add(bpa_goodstype); | |||
if(item.getGoodsTypeName()!=null){ | |||
List<BPA_GOODS_CLASSIFY> bean = GoodsClassifyDBUtil.getListByName(item.getGoodsTypeName()); | |||
@@ -39,7 +39,7 @@ | |||
android:layout_gravity="end" | |||
android:layout_width="500dp" | |||
tools:background="@color/right_bg_blue_50p" | |||
android:layout_height="510dp"/> | |||
android:layout_height="480dp"/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
@@ -48,7 +48,7 @@ | |||
android:textColor="@color/white" | |||
android:layout_gravity="end" | |||
android:layout_marginEnd="500dp" | |||
android:layout_marginTop="520dp" | |||
android:layout_marginTop="490dp" | |||
android:paddingStart="10dp" | |||
android:paddingTop="10dp" | |||
android:paddingBottom="10dp" | |||
@@ -59,7 +59,7 @@ | |||
android:layout_gravity="bottom|end" | |||
android:layout_width="500dp" | |||
tools:background="@color/right_bg_blue_50p" | |||
android:layout_height="200dp"/> | |||
android:layout_height="230dp"/> | |||
</FrameLayout> | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
@@ -2,6 +2,7 @@ | |||
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:layout_width="match_parent" | |||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||
xmlns:tools="http://schemas.android.com/tools" | |||
android:fitsSystemWindows="true" | |||
android:orientation="vertical" | |||
android:layout_height="match_parent"> | |||
@@ -22,4 +23,25 @@ | |||
android:layout_marginStart="150dp" | |||
/> | |||
<TextView | |||
android:id="@+id/tv_wok" | |||
android:layout_width="600dp" | |||
android:layout_height="wrap_content" | |||
android:layout_gravity="bottom" | |||
tools:text="炒锅:123465" | |||
android:textSize="28sp" | |||
android:layout_marginStart="5dp" | |||
android:textColor="@color/textcolor_subtile" | |||
/> | |||
<TextView | |||
android:id="@+id/tv_oven" | |||
android:layout_width="600dp" | |||
android:layout_height="wrap_content" | |||
android:layout_gravity="bottom|end" | |||
android:gravity="end" | |||
tools:text="炒锅:123465" | |||
android:textSize="28sp" | |||
android:layout_marginStart="5dp" | |||
android:textColor="@color/textcolor_subtile" | |||
/> | |||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -8,7 +8,7 @@ | |||
android:id="@+id/ll1" | |||
android:layout_width="500dp" | |||
android:background="@color/right_bg_blue_50p" | |||
android:layout_height="510dp"> | |||
android:layout_height="480dp"> | |||
<TextView | |||
android:id="@+id/goodname" | |||
android:layout_width="match_parent" | |||
@@ -8,7 +8,7 @@ | |||
android:id="@+id/ll1" | |||
android:layout_width="500dp" | |||
android:background="@color/right_bg_blue_50p" | |||
android:layout_height="200dp"> | |||
android:layout_height="230dp"> | |||
<TextView | |||
android:id="@+id/goodname" | |||
android:layout_width="match_parent" | |||
@@ -40,11 +40,14 @@ | |||
<TextView | |||
android:id="@+id/time_desc" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
tools:text="总时间10分钟,已烹饪1分钟" | |||
android:layout_height="70dp" | |||
tools:text="共100分钟,已烹饪99分59秒,还剩100分钟" | |||
android:textColor="@color/textbg_green" | |||
android:textSize="28sp" | |||
android:fontFamily="@font/fz2" | |||
android:gravity="center_vertical" | |||
android:lines="2" | |||
android:maxLines="2" | |||
android:layout_below="@id/start_goodmake" | |||
android:layout_marginStart="10dp" | |||
android:layout_marginEnd="10dp" | |||
@@ -53,11 +56,11 @@ | |||
<com.bonait.bnframework.newui.widget.jingdutiao | |||
android:id="@+id/progress" | |||
android:layout_width="match_parent" | |||
android:layout_marginTop="@dimen/dp_5" | |||
android:layout_marginStart="10dp" | |||
android:layout_marginEnd="10dp" | |||
android:layout_marginBottom="10dp" | |||
android:layout_alignParentBottom="true" | |||
android:layout_height="@dimen/dp_50" /> | |||
android:layout_height="@dimen/dp_50" | |||
/> | |||
</RelativeLayout> | |||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -78,6 +78,7 @@ | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="80dp" | |||
android:layout_marginStart="80dp" | |||
android:layout_marginBottom="20dp" | |||
android:paddingEnd="10dp" | |||
android:paddingStart="10dp" | |||
android:layout_marginEnd="160dp" | |||
@@ -89,6 +90,18 @@ | |||
android:layout_gravity="bottom" | |||
android:gravity="center" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:id="@+id/cook_desc" | |||
android:layout_marginStart="10dp" | |||
android:layout_marginEnd="160dp" | |||
android:layout_gravity="bottom" | |||
android:textSize="24sp" | |||
tools:text="44444444444444444444444444444444444444" | |||
android:textColor="@color/textbg_green" | |||
/> | |||
</FrameLayout> | |||
</FrameLayout> |