Procházet zdrojové kódy

现场修改8968

tags/old_version_1
fyf před 1 rokem
rodič
revize
711286045e
1 změnil soubory, kde provedl 75 přidání a 69 odebrání
  1. +75
    -69
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/lc_adapter.java

+ 75
- 69
app/src/main/java/com/bonait/bnframework/modules/home/adapter/lc_adapter.java Zobrazit soubor

@@ -77,32 +77,34 @@ public class lc_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
{
kg="关闭";
}
String title = "料仓操作提示!";
String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?";
// String title = "料仓操作提示!";
// String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?";
String finalKg = kg;
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
if(finalKg.equals("打开"))
{
//打开
myViewHolder.imageView.setTag(finalKg);
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g));

ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null);
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg);
}else
{
//关闭
myViewHolder.imageView.setTag(finalKg);
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2));
if(finalKg.equals("打开"))
{
//打开
myViewHolder.imageView.setTag(finalKg);
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g));

ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null);
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg);
}else
{
//关闭
myViewHolder.imageView.setTag(finalKg);
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2));

ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null);
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg);
}
dialog.dismiss();
}
});
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null);
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg);
}
// AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() {
// @Override
// public void onClick(QMUIDialog dialog, int index) {
//
// dialog.dismiss();
// }
// });
}
});

@@ -117,32 +119,34 @@ public class lc_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
{
kg="关闭";
}
String title = "料仓操作提示!";
String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?";
// String title = "料仓操作提示!";
// String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?";
String finalKg = kg;
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
if(finalKg.equals("打开"))
{
//打开
myViewHolder.imageView.setTag(finalKg);
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g));

ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null);
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg);
}else
{
//关闭
myViewHolder.imageView.setTag(finalKg);
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2));
if(finalKg.equals("打开"))
{
//打开
myViewHolder.imageView.setTag(finalKg);
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g));

ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null);
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg);
}
dialog.dismiss();
}
});
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null);
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg);
}else
{
//关闭
myViewHolder.imageView.setTag(finalKg);
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2));

ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null);
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg);
}
// AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() {
// @Override
// public void onClick(QMUIDialog dialog, int index) {
//
// dialog.dismiss();
// }
// });
}
});

@@ -157,32 +161,34 @@ public class lc_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
{
kg="关闭";
}
String title = "料仓操作提示!";
String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?";
// String title = "料仓操作提示!";
// String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?";
String finalKg = kg;
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
if(finalKg.equals("打开"))
{
//打开
myViewHolder.imageView.setTag(finalKg);
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g));

ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null);
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg);
}else
{
//关闭
myViewHolder.imageView.setTag(finalKg);
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2));
if(finalKg.equals("打开"))
{
//打开
myViewHolder.imageView.setTag(finalKg);
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g));

ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null);
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg);
}else
{
//关闭
myViewHolder.imageView.setTag(finalKg);
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2));

ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null);
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg);
}
dialog.dismiss();
}
});
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null);
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg);
}
// AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() {
// @Override
// public void onClick(QMUIDialog dialog, int index) {
//
// dialog.dismiss();
// }
// });
}
});



Načítá se…
Zrušit
Uložit