Browse Source

1111

tags/old_version_1
fyf 1 year ago
parent
commit
b2da602fae
14 changed files with 94 additions and 11 deletions
  1. +11
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/gongxubuzhou_adapter1.java
  2. +21
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentPR.java
  3. +5
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java
  4. +8
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DishTestActivity.java
  5. +3
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/newhuoli_control.java
  6. +6
    -2
      app/src/main/res/layout/activity_bottom_navigation_new.xml
  7. +1
    -0
      app/src/main/res/layout/activity_bunkersetup.xml
  8. +2
    -1
      app/src/main/res/layout/activity_cooking.xml
  9. +2
    -1
      app/src/main/res/layout/activity_cookingsimulated.xml
  10. +3
    -1
      app/src/main/res/layout/activity_dishtest.xml
  11. +18
    -3
      app/src/main/res/layout/fragment_home_sbkz.xml
  12. +14
    -0
      app/src/main/res/layout/item/layout/plcstatus.xml
  13. BIN
     
  14. BIN
     

+ 11
- 1
app/src/main/java/com/bonait/bnframework/modules/home/adapter/gongxubuzhou_adapter1.java View File

@@ -16,6 +16,7 @@ import com.bonait.bnframework.common.constant.DataBus;
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE;
import com.bonait.bnframework.common.helper.I.MyClickListener;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;

@@ -51,7 +52,16 @@ public class gongxubuzhou_adapter1 extends ArrayAdapter<BPA_GOODSRECIPE> {
//分别获取 image view 和 textview 的实例

TextView text = view.findViewById(R.id.text);
text.setText((position+1)+"、"+lc.processms);

if(lc.processname.equals("液体料"))
{
text.setText((new DecimalFormat("00").format(datas.size()- position))
+"、"+lc.processname+" " +lc.processvalue);
}else
{
text.setText((new DecimalFormat("00").format(datas.size()- position))
+"、"+lc.processname+" "+" " +lc.processvalue);
}
return view;
}
}

+ 21
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentPR.java View File

@@ -121,6 +121,27 @@ public class HomeFragmentPR extends BaseFragment {
private void initTopBar() {
mTopBar.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.topbj1));
mTopBar.setTitle("菜谱");
mTopBar.addRightTextButton("设备状态:"+(ConfigName.getInstance().PlcIsConnect ? "已连接" : "未连接"),R.id.status_image);

new Thread(new Runnable() {
@Override
public void run() {
while (true)
{
try {
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
mTopBar.removeAllRightViews();
mTopBar.addRightTextButton("设备状态:"+(ConfigName.getInstance().PlcIsConnect ? "已连接" : "未连接"),R.id.status_image);
}
});
Thread.sleep(1000);
} catch (InterruptedException e) {
}
}
}
}).start();
/**
* 刷新菜品
*/


+ 5
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java View File

@@ -44,6 +44,9 @@ import butterknife.OnClick;
public class HomeFragmentSBKZ extends BaseFragment {

//region 变量
@BindView(R.id.plcstatus1)
ImageView plcstatus1;

@BindView(R.id.zidongqingxi)
RelativeLayout zidongqingxi;

@@ -251,6 +254,8 @@ public class HomeFragmentSBKZ extends BaseFragment {
} else {
chaoguo_wendu.setText("??°C");
}

plcstatus1.setImageResource(ConfigName.getInstance().PlcIsConnect ? R.mipmap.plc1 : R.mipmap.plc2);
}
});
}


+ 8
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DishTestActivity.java View File

@@ -54,6 +54,7 @@ import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import butterknife.BindView;
@@ -275,7 +276,13 @@ public class DishTestActivity extends BaseActivity {
runOnUiThread(new Runnable() {
@Override
public void run() {
gxbz_adapter = new gongxubuzhou_adapter1(getContext(), R.layout.newgx_item, DataBus.getInstance().bpa_goodsrecipes);
ArrayList<BPA_GOODSRECIPE> cipe=new ArrayList<>();
for (BPA_GOODSRECIPE item:DataBus.getInstance().bpa_goodsrecipes)
{
cipe.add(item);
}
Collections.reverse(cipe);
gxbz_adapter = new gongxubuzhou_adapter1(getContext(), R.layout.newgx_item, cipe);
datatab_gxbz.setAdapter(gxbz_adapter);

gxbz_adapter2=new gongxubuzhou_adapter2(getContext(), R.layout.newgx_item1, DataBus.getInstance().bpa_goodsrecipes);


+ 3
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/newhuoli_control.java View File

@@ -82,7 +82,6 @@ public class newhuoli_control extends LinearLayout {
ImageViews.get(0).setVisibility(View.GONE);
ImageViews.get(1).setVisibility(View.GONE);
ImageViews.get(2).setVisibility(View.GONE);
ImageViews.get(3).setVisibility(View.GONE);


if(ConfigName.getInstance().HeatingGear.get(ConfigName.getInstance().HuoLi)!=null)
@@ -157,9 +156,11 @@ public class newhuoli_control extends LinearLayout {
public void SetLevel(int value)
{
level=value;
colse.setVisibility(View.VISIBLE);
if(value==1)
{
Status=true;

colse.setImageResource(R.mipmap.huoli_open);
hl1.setImageResource(R.mipmap.hl1);
hl2.setImageResource(R.mipmap.hl2);
@@ -259,6 +260,7 @@ public class newhuoli_control extends LinearLayout {
}else
{
Status=false;
colse.setVisibility(View.INVISIBLE);
colse.setImageResource(R.mipmap.huoli_close);
hl1.setImageResource(R.mipmap.hl2);
hl2.setImageResource(R.mipmap.hl2);


+ 6
- 2
app/src/main/res/layout/activity_bottom_navigation_new.xml View File

@@ -45,7 +45,9 @@
android:layout_height="match_parent"
android:fitsSystemWindows="false"
android:background="@color/topbj1"
android:visibility="gone">
android:visibility="gone"
android:focusable="true"
android:clickable="true">
</com.bonait.bnframework.modules.home.fragment.from.CookingActivity>


@@ -57,7 +59,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
android:visibility="gone"
android:focusable="true"
android:clickable="true">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">


+ 1
- 0
app/src/main/res/layout/activity_bunkersetup.xml View File

@@ -88,6 +88,7 @@
android:orientation="vertical">

<RelativeLayout
android:visibility="gone"
android:layout_width="100dp"
android:layout_height="80dp"
android:background="@mipmap/silos_bottom"


+ 2
- 1
app/src/main/res/layout/activity_cooking.xml View File

@@ -154,7 +154,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="140dp"
android:layout_marginRight="200dp"
android:layout_alignParentRight="true"
android:layout_marginBottom="180dp"
android:orientation="vertical">



+ 2
- 1
app/src/main/res/layout/activity_cookingsimulated.xml View File

@@ -136,7 +136,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="140dp"
android:layout_marginRight="200dp"
android:layout_alignParentRight="true"
android:layout_marginBottom="180dp"
android:orientation="vertical">



+ 3
- 1
app/src/main/res/layout/activity_dishtest.xml View File

@@ -135,7 +135,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="140dp"
android:layout_marginRight="200dp"
android:layout_alignParentRight="true"
android:layout_marginBottom="180dp"
android:orientation="vertical">

@@ -723,6 +724,7 @@

<!-- 不透明蒙版 执行中-->
<RelativeLayout
android:visibility="gone"
android:id="@+id/gongyibuzhoujilu"
android:layout_width="match_parent"
android:layout_height="match_parent"


+ 18
- 3
app/src/main/res/layout/fragment_home_sbkz.xml View File

@@ -91,7 +91,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="140dp"
android:layout_marginRight="200dp"
android:layout_alignParentRight="true"
android:layout_marginBottom="100dp"
android:orientation="vertical">

@@ -102,13 +103,15 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp">
android:layout_marginTop="20dp"
>

<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
android:id="@+id/chuchan"
android:layout_width="160dp"
android:layout_height="120dp"
android:layout_centerHorizontal="true"
android:layout_marginRight="30dp"
android:layout_alignParentRight="true"
android:contentDescription="true"
android:tag="出餐-按钮"
app:imagesrc_ks="@mipmap/sb1"
@@ -369,6 +372,8 @@
app:imagesrc_qt="@mipmap/sb2"
app:imagesrc_tz="@mipmap/sb3" />



<LinearLayout
android:id="@+id/fanchaoshudu_1"
android:layout_width="wrap_content"
@@ -416,5 +421,15 @@
app:imagesrc_tz="@mipmap/sb3" />
</LinearLayout>
</LinearLayout>

<!-- plc状态 -->
<ImageView
android:id="@+id/plcstatus1"
android:layout_marginRight="0dp"
android:layout_marginTop="15dp"
android:layout_alignParentRight="true"
android:layout_width="130dp"
android:layout_height="wrap_content"
android:src="@mipmap/plc2"/>
</RelativeLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 14
- 0
app/src/main/res/layout/item/layout/plcstatus.xml View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="设备状态: "/>-->
<ImageView
android:id="@+id/status_image"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@mipmap/yjzt"/>
</LinearLayout>

BIN
View File


BIN
View File


Loading…
Cancel
Save