@@ -137,6 +137,34 @@ public class DataBus { | |||
make.recipes=QueryDB.GetGoodsSreciperecipeList(suborder.recipeID); | |||
make.good=QueryDB.GetGoodsId(suborder.goodsID); | |||
make.goodsrecipename=QueryDB.GetGoodsRecipeNameId(suborder.recipeID); | |||
if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) | |||
{ | |||
make.Gt1=false; | |||
make.Gt2=false; | |||
for (ResGoodsRecipe recipe:make.recipes) | |||
{ | |||
BPA_SILOS silos = null; | |||
List<BPA_SILOS> siloslist = QueryDB.GetSolisByMaterialID(recipe.materialID); | |||
for (BPA_SILOS item : siloslist) { | |||
if(silos==null) | |||
silos = item; | |||
} | |||
if(silos!=null && silos.num==11) | |||
{ | |||
make.Gt1=true; | |||
}else if(silos!=null && silos.num==12) | |||
{ | |||
make.Gt2=true; | |||
} | |||
} | |||
}else | |||
{ | |||
make.Gt1=false; | |||
make.Gt2=false; | |||
} | |||
make.subOrder=suborder; | |||
make.makeStatus= MakeStatus.等待制作; | |||
make.makeMs="等待下发物料!"; | |||
@@ -42,6 +42,11 @@ public class ResGoodsMake { | |||
* 是否可制作 | |||
*/ | |||
public boolean IsMake; | |||
public boolean Gt1; | |||
public boolean Gt2; | |||
public ResGoodsMake() | |||
{ | |||
good=new BPA_GOODS(); | |||
@@ -51,6 +56,8 @@ public class ResGoodsMake { | |||
makeMs=""; | |||
makeProcess=0; | |||
IsMake=true; | |||
Gt1=false; | |||
Gt2=false; | |||
} | |||
} | |||
@@ -74,10 +74,10 @@ public class UpdateAppUtils { | |||
private static void doPost(final Context context) { | |||
VersionMode mode=new VersionMode(); | |||
//大炒 | |||
mode.productCode="1679306986915368960"; | |||
mode.moduleCode="dcdjbbd"; | |||
mode.serverCode="1680766359592243200"; | |||
mode.branchCode="1679308856555737089"; | |||
// mode.productCode="1679306986915368960"; | |||
// mode.moduleCode="dcdjbbd"; | |||
// mode.serverCode="1680766359592243200"; | |||
// mode.branchCode="1679308856555737089"; | |||
//小炒网络v版本 | |||
// mode.productCode="1679306986915368960"; | |||
@@ -90,6 +90,22 @@ public class UpdateAppUtils { | |||
// mode.moduleCode="xcdjbbd"; | |||
// mode.serverCode="1680766359592243200"; | |||
// mode.branchCode="1679308917918404609"; | |||
if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) | |||
{ | |||
mode.productCode="1679307017135329280"; | |||
mode.moduleCode="ncapp"; | |||
mode.serverCode="1680767784879656960"; | |||
mode.branchCode="1679307481578999809"; | |||
}else | |||
{ | |||
mode.productCode="1679307017135329280"; | |||
mode.moduleCode="twbt"; | |||
mode.serverCode="1680767784879656960"; | |||
mode.branchCode="1679309003247325185"; | |||
} | |||
//调味吧台 | |||
String msg= new Json<VersionMode>().objectToJson(VersionMode.class, mode); | |||
String getNewVersionUrl =ConfigName.getInstance().UpdateVersion; | |||
MediaType JSON = MediaType.parse("application/json; charset=utf-8"); | |||
@@ -11,6 +11,8 @@ import android.view.View; | |||
import android.view.ViewGroup; | |||
import android.widget.Button; | |||
import android.widget.EditText; | |||
import android.widget.LinearLayout; | |||
import android.widget.RelativeLayout; | |||
import android.widget.TextView; | |||
import androidx.annotation.NonNull; | |||
@@ -73,7 +75,7 @@ public class zdqxchid_adapter extends RecyclerView.Adapter<RecyclerView.ViewHold | |||
temp=d[2]; | |||
} | |||
} | |||
myViewHolder.name.setText("步骤-"+position+1); | |||
myViewHolder.name.setText("步骤-"+(position+1)); | |||
myViewHolder.edittext_pssj.setText(pssj+""); | |||
myViewHolder.edittext_xhsj.setText(qxsj+""); | |||
myViewHolder.edittext_qxwd.setText(temp+""); | |||
@@ -82,6 +84,7 @@ public class zdqxchid_adapter extends RecyclerView.Adapter<RecyclerView.ViewHold | |||
{ | |||
myViewHolder.status.setText("未开始"); | |||
myViewHolder.status.setTextColor(Color.parseColor("#99a0aa")); | |||
myViewHolder.qxlc_layout.setBackgroundResource(R.color.activity_background1); | |||
}else | |||
{ | |||
myViewHolder.status.setText(goodsMake.exp); | |||
@@ -89,6 +92,7 @@ public class zdqxchid_adapter extends RecyclerView.Adapter<RecyclerView.ViewHold | |||
if(goodsMake.exp.equals("执行中")) | |||
{ | |||
myViewHolder.status.setTextColor(Color.parseColor("#00A8E1")); | |||
myViewHolder.qxlc_layout.setBackgroundResource(R.color.selebottom); | |||
if (!myViewHolder.edittext_pssj.getText().toString().equals("")) { | |||
int k= (int)Math.round((Double.parseDouble(myViewHolder.edittext_pssj.getText().toString()) * 10)); | |||
@@ -113,11 +117,10 @@ public class zdqxchid_adapter extends RecyclerView.Adapter<RecyclerView.ViewHold | |||
}else //执行完成 | |||
{ | |||
myViewHolder.status.setTextColor(Color.parseColor("#FF4081")); | |||
myViewHolder.qxlc_layout.setBackgroundResource(R.color.activity_background1); | |||
} | |||
} | |||
myViewHolder.save_time.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
@@ -183,6 +186,8 @@ public class zdqxchid_adapter extends RecyclerView.Adapter<RecyclerView.ViewHold | |||
TextView name;//保存时间 | |||
TextView status;//保存时间 | |||
RelativeLayout qxlc_layout;//李总 | |||
public ZDQXViewHolder(View view) { | |||
super(view); | |||
edittext_pssj =view.findViewById(R.id.edittext_pssj); | |||
@@ -192,6 +197,8 @@ public class zdqxchid_adapter extends RecyclerView.Adapter<RecyclerView.ViewHold | |||
delete_time=view.findViewById(R.id.delete_time); | |||
name =view.findViewById(R.id.name); | |||
status =view.findViewById(R.id.status); | |||
qxlc_layout=view.findViewById(R.id.qxlc_layout); | |||
} | |||
} | |||
} |
@@ -235,6 +235,12 @@ 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(ExecuteTheRecipe.IsMakeGood) | |||
{ | |||
ToastUtils.warning("请耐心等待上一商品制作完成..."); | |||
@@ -252,6 +258,34 @@ public class MakeGoodFragment extends BaseFragment { | |||
ToastUtils.warning("商品:"+makegood.good.name+",已制作完成..."); | |||
return; | |||
} | |||
//判断温度是否到达 | |||
if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) | |||
{ | |||
if(makegood.Gt1) | |||
{ | |||
Object sx=ExecuteTheRecipe.ReadPLC("果糖左温度设置"); | |||
int wdsz=sx==null?0:(int)sx; | |||
if(gt1wd<wdsz) | |||
{ | |||
ToastUtils.warning("果糖左仓温度未达到设置值,不允许出料..."); | |||
return; | |||
} | |||
} | |||
if(makegood.Gt2) | |||
{ | |||
Object sx=ExecuteTheRecipe.ReadPLC("果糖右温度设置"); | |||
int wdsz=sx==null?0:(int)sx; | |||
if(gt2wd<wdsz) | |||
{ | |||
ToastUtils.warning("果糖右仓温度未达到设置值,不允许出料..."); | |||
return; | |||
} | |||
} | |||
} | |||
String title = "温馨提示!"; | |||
String message = "客官确定要开始制作【"+makegood.good.name+"】吗?"; | |||
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { | |||
@@ -350,6 +384,9 @@ public class MakeGoodFragment extends BaseFragment { | |||
String zhongliangxianshi="0g"; | |||
String tempwd="0°C"; | |||
int gt1wd=0; | |||
int gt2wd=0; | |||
/** | |||
* 实时显示线程 | |||
*/ | |||
@@ -373,6 +410,14 @@ public class MakeGoodFragment extends BaseFragment { | |||
{ | |||
tempwd=String.valueOf(obj1) + "°C"; | |||
} | |||
if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) | |||
{ | |||
Object obj2= ExecuteTheRecipe.ReadPLC("果糖左温度"); | |||
Object obj3= ExecuteTheRecipe.ReadPLC("果糖右温度"); | |||
gt1wd=obj2==null?0:(int)obj2; | |||
gt2wd=obj3==null?0:(int)obj3; | |||
} | |||
} | |||
mHandler.sendEmptyMessage(0); | |||
Thread.sleep(100); | |||
@@ -171,9 +171,39 @@ public class JiaoYan_lsjy_fragment extends BaseFragment { | |||
break; | |||
case R.id.ksjz://开始校准 | |||
//切换手动 | |||
//region 判断是否只勾选了一个料仓 | |||
SelectSilos(); | |||
//endregion | |||
//判断是否为果糖 | |||
if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) | |||
{ | |||
if(selectIndexSilos==11) | |||
{ | |||
Object sx=ExecuteTheRecipe.ReadPLC("果糖左温度设置"); | |||
int wdsz=sx==null?0:(int)sx; | |||
if(gt1wd<wdsz) | |||
{ | |||
ToastUtils.warning("果糖左仓温度未达到设置值,不允许校准..."); | |||
return; | |||
} | |||
}else if(selectIndexSilos==12) | |||
{ | |||
Object sx=ExecuteTheRecipe.ReadPLC("果糖右温度设置"); | |||
int wdsz=sx==null?0:(int)sx; | |||
if(gt2wd<wdsz) | |||
{ | |||
ToastUtils.warning("果糖右仓温度未达到设置值,不允许校准..."); | |||
return; | |||
} | |||
} | |||
} | |||
ExecuteTheRecipe.WritePLC("校准完成",false,null); | |||
ExecuteTheRecipe.WritePLC("手自切换", false, null); | |||
@@ -334,6 +364,8 @@ public class JiaoYan_lsjy_fragment extends BaseFragment { | |||
} | |||
}; | |||
int zhongliangxianshi=0; | |||
int gt1wd=0; | |||
int gt2wd=0; | |||
/** | |||
* 实时显示线程 | |||
*/ | |||
@@ -349,6 +381,14 @@ public class JiaoYan_lsjy_fragment extends BaseFragment { | |||
zhongliangxianshi=(int)obj;// | |||
mHandler.sendEmptyMessage(0); | |||
} | |||
if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) | |||
{ | |||
Object obj2= ExecuteTheRecipe.ReadPLC("果糖左温度"); | |||
Object obj3= ExecuteTheRecipe.ReadPLC("果糖右温度"); | |||
gt1wd=obj2==null?0:(int)obj2; | |||
gt2wd=obj3==null?0:(int)obj3; | |||
} | |||
Thread.sleep(200); | |||
} catch (InterruptedException e) { | |||
throw new RuntimeException(e); | |||
@@ -190,6 +190,12 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { | |||
IsStart=false; | |||
bt_start.setText("开始清洗"); | |||
bt_start.setBackgroundResource(R.drawable.sz_bj); | |||
for (BPA_SUGAR item: | |||
DataBus.getInstance().zdqx) { | |||
item.exp=""; | |||
} | |||
DataBus.getInstance().zdqxchidAdapter.refresh(); | |||
} | |||
}; | |||
@@ -3,11 +3,22 @@ | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content"> | |||
<RelativeLayout | |||
android:layout_margin="@dimen/dp_10" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content"> | |||
<RelativeLayout | |||
android:background="@color/selebottom" | |||
android:id="@+id/qxlc_layout" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content"> | |||
<LinearLayout | |||
android:layout_margin="@dimen/dp_10" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_centerInParent="true" | |||
android:orientation="vertical"> | |||
android:orientation="vertical" | |||
> | |||
<TextView | |||
android:id="@+id/name" | |||
android:layout_width="match_parent" | |||
@@ -143,4 +154,8 @@ | |||
android:textAlignment="center" | |||
android:textSize="20dp"/> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
</RelativeLayout> | |||
</RelativeLayout> |