소스 검색

现场修改8968

tags/old_version_1
fyf 1 년 전
부모
커밋
711286045e
1개의 변경된 파일75개의 추가작업 그리고 69개의 파일을 삭제
  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 파일 보기

@@ -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();
// }
// });
}
});



불러오는 중...
취소
저장