|
|
@@ -39,11 +39,13 @@ import com.bonait.bnframework.common.db.mode.BPA_SUBORDER; |
|
|
|
import com.bonait.bnframework.common.db.res.ResGoodProperty; |
|
|
|
import com.bonait.bnframework.common.db.res.ResGoodsMake; |
|
|
|
import com.bonait.bnframework.common.db.res.SilosLsjyMode; |
|
|
|
import com.bonait.bnframework.common.db.res.UserLogEnum; |
|
|
|
import com.bonait.bnframework.common.helper.I.IRun; |
|
|
|
import com.bonait.bnframework.common.helper.I.IRunT; |
|
|
|
import com.bonait.bnframework.common.helper.I.IThread; |
|
|
|
import com.bonait.bnframework.common.helper.I.IWriteCallBack; |
|
|
|
import com.bonait.bnframework.common.helper.I.MyClickListener; |
|
|
|
import com.bonait.bnframework.common.helper.MessageLog; |
|
|
|
import com.bonait.bnframework.common.helper.ThreadManager; |
|
|
|
import com.bonait.bnframework.common.linktab.LinkMode; |
|
|
|
import com.bonait.bnframework.common.linktab.TopItemDecoration; |
|
|
@@ -243,74 +245,55 @@ public class MakeGoodFragment extends BaseFragment { |
|
|
|
@Override |
|
|
|
public void clickListener(View v, Object data) { |
|
|
|
ResGoodsMake makegood = (ResGoodsMake) data; |
|
|
|
if (!ConfigName.getInstance().PlcIsConnect) { |
|
|
|
ToastUtils.warning("设备已离线,请检查设备..."); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (DataBus.getInstance().ZDQX_IsStart) { |
|
|
|
ToastUtils.warning("自动清洗中,请等待清洗完成!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (ExecuteTheRecipe.IsMakeGood) { |
|
|
|
ToastUtils.warning("请耐心等待上一商品制作完成..."); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (makegood.subOrder.status == 1) { |
|
|
|
ToastUtils.warning("商品:" + makegood.good.name + ",已在制作中..."); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (makegood.subOrder.status == 2) { |
|
|
|
ToastUtils.warning("商品:" + makegood.good.name + ",已制作完成..."); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (ConfigName.getInstance().versionSelectionEnum.equals("奶茶机")) { |
|
|
|
if (!ExecuteTheRecipe.IsCup) { |
|
|
|
ToastUtils.warning("出料口没有检测到器皿!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// if (!ConfigName.getInstance().PlcIsConnect) { |
|
|
|
// ToastUtils.warning("设备已离线,请检查设备..."); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// |
|
|
|
// if (DataBus.getInstance().ZDQX_IsStart) { |
|
|
|
// ToastUtils.warning("自动清洗中,请等待清洗完成!"); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// |
|
|
|
// if (ExecuteTheRecipe.IsMakeGood) { |
|
|
|
// ToastUtils.warning("请耐心等待上一商品制作完成..."); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// |
|
|
|
// if (makegood.subOrder.status == 1) { |
|
|
|
// ToastUtils.warning("商品:" + makegood.good.name + ",已在制作中..."); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// |
|
|
|
// if (makegood.subOrder.status == 2) { |
|
|
|
// ToastUtils.warning("商品:" + makegood.good.name + ",已制作完成..."); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// |
|
|
|
// if (ConfigName.getInstance().versionSelectionEnum.equals("奶茶机")) { |
|
|
|
// if (!ExecuteTheRecipe.IsCup) { |
|
|
|
// ToastUtils.warning("出料口没有检测到器皿!"); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
String title = "温馨提示!"; |
|
|
|
String message = "客官确定要开始制作【" + makegood.good.name + "】吗?"; |
|
|
|
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { |
|
|
|
QMUIDialog dialog= AlertDialogUtils.showDialog111(context, title, message, new QMUIDialogAction.ActionListener() { |
|
|
|
@Override |
|
|
|
public void onClick(QMUIDialog dialog, int index) { |
|
|
|
|
|
|
|
//判断温度是否到达 |
|
|
|
if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) { |
|
|
|
if (makegood.Gt1) { |
|
|
|
if (ExecuteTheRecipe.SugarTempLeft < ExecuteTheRecipe.SugarTempLeft_SZ) { |
|
|
|
ToastUtils.warning("果糖左仓温度未达到设置值,不允许出料..."); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (makegood.Gt2) { |
|
|
|
if (ExecuteTheRecipe.SugarTempRight < ExecuteTheRecipe.SugarTempRight_SZ) { |
|
|
|
ToastUtils.warning("果糖右仓温度未达到设置值,不允许出料..."); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
new Thread(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
//设置清洗模式 |
|
|
|
ExecuteTheRecipe.WritePLC("清洗模式", false, null); |
|
|
|
ExecuteTheRecipe.WritePLC("砝码校准模式", false, null); |
|
|
|
ExecuteTheRecipe.WritePLC("手自切换", true, null); |
|
|
|
} |
|
|
|
}).start(); |
|
|
|
ExecuteTheRecipe.Execute(makegood); |
|
|
|
ToastUtils.warning("商品:" + makegood.good.name + ",开始制作"); |
|
|
|
make(makegood); |
|
|
|
dialog.dismiss(); |
|
|
|
} |
|
|
|
}); |
|
|
|
ExecuteTheRecipe.OnIngredientButtonPressedNotify = new IRun() { |
|
|
|
@Override |
|
|
|
public void Run() { |
|
|
|
make(makegood); |
|
|
|
dialog.dismiss(); |
|
|
|
} |
|
|
|
}; |
|
|
|
dialog.show(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@@ -319,11 +302,42 @@ public class MakeGoodFragment extends BaseFragment { |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
public void make(ResGoodsMake makegood) |
|
|
|
{ |
|
|
|
//判断温度是否到达 |
|
|
|
if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) { |
|
|
|
if (makegood.Gt1) { |
|
|
|
if (ExecuteTheRecipe.SugarTempLeft < ExecuteTheRecipe.SugarTempLeft_SZ) { |
|
|
|
ToastUtils.warning("果糖左仓温度未达到设置值,不允许出料..."); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (makegood.Gt2) { |
|
|
|
if (ExecuteTheRecipe.SugarTempRight < ExecuteTheRecipe.SugarTempRight_SZ) { |
|
|
|
ToastUtils.warning("果糖右仓温度未达到设置值,不允许出料..."); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
new Thread(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
//设置清洗模式 |
|
|
|
ExecuteTheRecipe.WritePLC("清洗模式", false, null); |
|
|
|
ExecuteTheRecipe.WritePLC("砝码校准模式", false, null); |
|
|
|
ExecuteTheRecipe.WritePLC("手自切换", true, null); |
|
|
|
} |
|
|
|
}).start(); |
|
|
|
ExecuteTheRecipe.Execute(makegood); |
|
|
|
ToastUtils.warning("商品:" + makegood.good.name + ",开始制作"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 初始化TopBar |
|
|
|
*/ |
|
|
|
private void initTopBar() { |
|
|
|
mTopBar.setTitle("智慧菠萝点餐系统"); |
|
|
|
|
|
|
|
mTopBar.setTitle("智慧菠萝点餐系统"+ConfigName.getInstance().Version); |
|
|
|
|
|
|
|
mTopBar.addLeftImageButton(R.mipmap.silos1,1).setOnClickListener(new View.OnClickListener() { |
|
|
|
@Override |
|
|
|