Browse Source

lyw 上传

鸿鹄中学一拖二
lyw 3 months ago
parent
commit
c5fdf3f32f
5 changed files with 47 additions and 6 deletions
  1. +0
    -1
      .idea/misc.xml
  2. +1
    -1
      app/src/main/java/com/bonait/bnframework/business/FryingPanPar.java
  3. +2
    -2
      app/src/main/java/com/bonait/bnframework/business/YJDeviceHelper.java
  4. +11
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/DoubleFryingpanFragment.java
  5. +33
    -2
      app/src/main/res/layout/datatab/layout/activity_par_set1.xml

+ 0
- 1
.idea/misc.xml View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="corretto-11" project-jdk-type="JavaSDK" />


+ 1
- 1
app/src/main/java/com/bonait/bnframework/business/FryingPanPar.java View File

@@ -39,7 +39,7 @@ public class FryingPanPar {
/**
* 主料位置
*/
public int[] IngredientsLocs=new int[2];
public int[] IngredientsLocs=new int[3];

/**
* 辅料位置


+ 2
- 2
app/src/main/java/com/bonait/bnframework/business/YJDeviceHelper.java View File

@@ -34,9 +34,9 @@ public class YJDeviceHelper extends ModbusMaster {
});

ReadBool("M12.0", 4, 1, (bools)->{
PeripheralData.EmptyBowl[2]=bools[0];
PeripheralData.ConveyorLineOutputBowl.setValue(bools[3]);
PeripheralData.EmptyBowl[2]=bools[0];//3号空盆检测
PeripheralData.ConveyorLineInputBowl=bools[2];
PeripheralData.ConveyorLineOutputBowl.setValue(bools[3]);
});

ReadBool("M15.0", 1, 1, (bools)->{


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

@@ -288,6 +288,13 @@ public class DoubleFryingpanFragment extends BaseFragment {
}
}

if(fry.IngredientsLocs[2]>0){
if( !YJDeviceHelper.getInstance().MainMaterialLocVerify(fry.IngredientsLocs[2])){
DialogHelper.showError(getActivity(),"主料位置 "+fry.IngredientsLocs[2] +"未检测到有物料!",AlertDialogButton.OK,null);
return;
}
}

//辅料验证
if(fry.AccessoriesLocs[0]>0){
if( !YJDeviceHelper.getInstance().AccessoriesLocVerify(fry.AccessoriesLocs[0])){
@@ -356,6 +363,7 @@ public class DoubleFryingpanFragment extends BaseFragment {

ParSetInit(R.id.location_selection_1,new String[] {"0", "1", "2", "3", "4","5","6"});
ParSetInit(R.id.location_selection_2,new String[] {"0", "1", "2", "3", "4","5","6"});
ParSetInit(R.id.location_selection_3,new String[] {"0", "1", "2", "3", "4","5","6"});
ParSetInit(R.id.accessories_selection_1,new String[] {"0", "1", "2", "3", "4","5","6"});
ParSetInit(R.id.accessories_selection_2,new String[] {"0", "1", "2", "3", "4","5","6"});
}
@@ -562,6 +570,9 @@ public class DoubleFryingpanFragment extends BaseFragment {
else if (R.id.location_selection_2==id) {
fry.IngredientsLocs[1]=Integer.parseInt(adapterView.getItemAtPosition(i).toString());;
}
else if (R.id.location_selection_3==id) {
fry.IngredientsLocs[2]=Integer.parseInt(adapterView.getItemAtPosition(i).toString());;
}
else if (R.id.accessories_selection_1==id) {
fry.AccessoriesLocs[0]=Integer.parseInt(adapterView.getItemAtPosition(i).toString());;
}


+ 33
- 2
app/src/main/res/layout/datatab/layout/activity_par_set1.xml View File

@@ -96,7 +96,38 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="选择辅料1:"/>
android:text=" 选择主料3:"/>

<Spinner
android:id="@+id/location_selection_3"
android:layout_width="match_parent"
android:spinnerMode="dropdown"
android:layout_marginLeft="10dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:dropDownWidth="match_parent"
android:background="@drawable/spinner_br"
tools:ignore="TouchTargetSizeCheck"
android:dropDownVerticalOffset="0dp"
android:dropDownSelector="@color/red_primary_dark"
android:entries="@array/sp1"
android:layout_height="wrap_content"/>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:layout_height="wrap_content">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text=" 选择辅料1:"/>

<Spinner
android:id="@+id/accessories_selection_1"
@@ -126,7 +157,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="选择辅料2:"/>
android:text=" 选择辅料2:"/>

<Spinner
android:id="@+id/accessories_selection_2"


Loading…
Cancel
Save