@@ -78,7 +78,7 @@ public class ConfigName { | |||
* 锅口朝向 | |||
*/ | |||
public String guokouChaoxiang = ""; | |||
public static String dataPath = "/hblxiaochaokaoxiangdb"; | |||
public static String dataPath = "/hbldbWokRobot"; | |||
public String oven_wendu="0"; | |||
@@ -67,9 +67,9 @@ public class UpdateAppUtils { | |||
private static void doPost(final Context context,boolean showToast) { | |||
VersionMode mode=new VersionMode(); | |||
mode.productCode="1769564215952125952"; | |||
mode.moduleCode="shmz"; | |||
mode.moduleCode="hhzx"; | |||
mode.serverCode="1769564338190921728";//服务器 | |||
mode.branchCode="1810555594505506817"; | |||
mode.branchCode="1811244806858919937"; | |||
String msg= new Json<VersionMode>().objectToJson(VersionMode.class, mode); | |||
String getNewVersionUrl =ConfigName.getInstance().UpdateVersion; | |||
@@ -28,6 +28,7 @@ import com.bonait.bnframework.common.db.file.DBHelper; | |||
import com.bonait.bnframework.common.db.mode.BPA_ALERTLOG; | |||
import com.bonait.bnframework.common.db.mode.BPA_LOG_RECORD; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_LIST; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_RECORD; | |||
import com.bonait.bnframework.common.db.mode.BPA_SUBORDER_RECORD; | |||
import com.bonait.bnframework.common.db.util.OrderDetailUtil; | |||
@@ -132,6 +133,7 @@ public class MainHActivity extends BaseActivity { | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ORDER_RECORD.class,null); | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SUBORDER_RECORD.class,null); | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ALERTLOG.class,null); | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ORDER_LIST.class,null); | |||
PreferenceUtils.setInt("loginNum",0); | |||
}else { | |||
PreferenceUtils.setInt("loginNum",loginNum+1); | |||
@@ -268,7 +268,7 @@ public class RobotControlDialog extends DialogFragment { | |||
private HashMap<String, String> data = new HashMap<>();; | |||
@SuppressLint("NonConstantResourceId") | |||
@OnClick({R.id.top1, R.id.top2,R.id.top3,R.id.top4, | |||
@OnClick({R.id.top1, R.id.top2,R.id.top3,R.id.top4,R.id.top5,R.id.top6, | |||
R.id.right1,R.id.right2,R.id.right3,R.id.right4,R.id.right5,R.id.right6, | |||
R.id.btn_wok_chucai,R.id.btn_wok_chucai2,R.id.btn_weihu,R.id.btn_weihu_finish}) | |||
public void onViewClicked(View view) { | |||
@@ -387,6 +387,20 @@ public class RobotControlDialog extends DialogFragment { | |||
data.put("烹饪(秒)","0"); | |||
robotPutFoo2(); | |||
break; | |||
case R.id.top5: | |||
data.put("辅料名称","测试投料"); | |||
data.put("辅料位置","F5"); | |||
data.put("炒制位置","炒菜位高"); | |||
data.put("烹饪(秒)","0"); | |||
robotPutFoo2(); | |||
break; | |||
case R.id.top6: | |||
data.put("辅料名称","测试投料"); | |||
data.put("辅料位置","F6"); | |||
data.put("炒制位置","炒菜位高"); | |||
data.put("烹饪(秒)","0"); | |||
robotPutFoo2(); | |||
break; | |||
case R.id.right1: | |||
data.put("主料名称","测试投料"); | |||
data.put("主料位置","Z1"); | |||
@@ -11,13 +11,23 @@ import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import com.bonait.bnframework.HBL.Thread.ThreadManager; | |||
import com.bonait.bnframework.MainApplication; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
import com.bonait.bnframework.common.db.file.DBHelper; | |||
import com.bonait.bnframework.common.db.mode.BPA_ALERTLOG; | |||
import com.bonait.bnframework.common.db.mode.BPA_LOG_RECORD; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_LIST; | |||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_RECORD; | |||
import com.bonait.bnframework.common.db.mode.BPA_SUBORDER_RECORD; | |||
import com.bonait.bnframework.common.db.mode.BPA_SYSTEMSET; | |||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.common.utils.PreferenceUtils; | |||
import com.bonait.bnframework.databinding.DialogTipBinding; | |||
import com.bonait.bnframework.databinding.DialogWokTipBinding; | |||
import com.bonait.bnframework.databinding.FragmentSceneSetBinding; | |||
import com.bonait.bnframework.newui.http.UpdateDataService; | |||
import com.bonait.bnframework.newui.widget.NewToastUtil; | |||
@@ -123,6 +133,45 @@ public class SceneSetFragment extends BaseFragment { | |||
set_main4.userID = ConfigName.getInstance().user.userID; | |||
QueryDB.AddSystemset(set_main1); | |||
}); | |||
viewBinding.btnClearLog.setOnClickListener(v->{ | |||
AlertDialogUtils.showCancelAndConfirmDialog(getActivity(), R.layout.dialog_tip, (layoutView, xCom) -> { | |||
DialogTipBinding binding = DialogTipBinding.bind(layoutView); | |||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||
binding.title.setText("请确认"); | |||
binding.message.setText("是否清除本地日志记录"); | |||
binding.close.setOnClickListener(view1->{ | |||
xCom.dismissX(); | |||
}); | |||
binding.submit.setOnClickListener(view1 -> { | |||
xCom.dismissX(); | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_LOG_RECORD.class,null); | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ALERTLOG.class,null); | |||
PreferenceUtils.setInt("loginNum",0); | |||
NewToastUtil.getInstance().showToast("清除成功"); | |||
}); | |||
}); | |||
}); | |||
viewBinding.btnClearOrder.setOnClickListener(v->{ | |||
AlertDialogUtils.showCancelAndConfirmDialog(getActivity(), R.layout.dialog_tip, (layoutView, xCom) -> { | |||
DialogTipBinding binding = DialogTipBinding.bind(layoutView); | |||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||
binding.title.setText("请确认"); | |||
binding.message.setText("是否清除本地订单记录"); | |||
binding.close.setOnClickListener(view1->{ | |||
xCom.dismissX(); | |||
}); | |||
binding.submit.setOnClickListener(view1 -> { | |||
xCom.dismissX(); | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ORDER_RECORD.class,null); | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SUBORDER_RECORD.class,null); | |||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_ORDER_LIST.class,null); | |||
PreferenceUtils.setInt("loginNum",0); | |||
NewToastUtil.getInstance().showToast("清除成功"); | |||
}); | |||
}); | |||
}); | |||
} | |||
private void initData(){ | |||
@@ -11,12 +11,12 @@ | |||
android:layout_width="match_parent" | |||
android:orientation="vertical" | |||
android:padding="40dp" | |||
android:layout_marginTop="40dp" | |||
android:layout_marginTop="20dp" | |||
android:layout_height="match_parent"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:orientation="horizontal" | |||
android:layout_marginBottom="40dp" | |||
android:layout_marginBottom="20dp" | |||
android:layout_height="wrap_content"> | |||
<TextView | |||
android:layout_width="250dp" | |||
@@ -55,7 +55,7 @@ | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:orientation="horizontal" | |||
android:layout_marginBottom="40dp" | |||
android:layout_marginBottom="20dp" | |||
android:layout_height="wrap_content"> | |||
<TextView | |||
android:layout_width="250dp" | |||
@@ -84,7 +84,7 @@ | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:orientation="horizontal" | |||
android:layout_marginBottom="40dp" | |||
android:layout_marginBottom="20dp" | |||
android:visibility="gone" | |||
android:layout_height="wrap_content"> | |||
<TextView | |||
@@ -109,7 +109,7 @@ | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:orientation="horizontal" | |||
android:layout_marginBottom="40dp" | |||
android:layout_marginBottom="20dp" | |||
android:layout_height="wrap_content"> | |||
<TextView | |||
android:layout_width="250dp" | |||
@@ -133,7 +133,7 @@ | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:orientation="horizontal" | |||
android:layout_marginBottom="40dp" | |||
android:layout_marginBottom="20dp" | |||
android:layout_height="wrap_content"> | |||
<TextView | |||
android:layout_width="250dp" | |||
@@ -153,10 +153,65 @@ | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:orientation="horizontal" | |||
android:layout_marginBottom="20dp" | |||
android:layout_height="wrap_content"> | |||
<TextView | |||
android:layout_width="250dp" | |||
android:layout_height="70dp" | |||
android:textColor="@color/black" | |||
android:textSize="32sp" | |||
android:text="清除日志记录:" | |||
android:layout_gravity="center_vertical" | |||
android:gravity="center_vertical" | |||
/> | |||
<Button | |||
android:id="@+id/btn_clear_log" | |||
android:layout_width="300dp" | |||
android:layout_height="70dp" | |||
android:background="@drawable/bg_btn_login_selected" | |||
android:text="清除日志记录" | |||
android:textColor="@color/white" | |||
android:layout_marginLeft="50dp" | |||
android:textSize="32sp"/> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:orientation="horizontal" | |||
android:layout_marginBottom="20dp" | |||
android:layout_height="wrap_content"> | |||
<TextView | |||
android:layout_width="250dp" | |||
android:layout_height="70dp" | |||
android:textColor="@color/black" | |||
android:textSize="32sp" | |||
android:text="清除订单记录:" | |||
android:layout_gravity="center_vertical" | |||
android:gravity="center_vertical" | |||
/> | |||
<Button | |||
android:id="@+id/btn_clear_order" | |||
android:layout_width="300dp" | |||
android:layout_height="70dp" | |||
android:background="@drawable/bg_btn_login_selected" | |||
android:text="清除订单记录" | |||
android:textColor="@color/white" | |||
android:layout_marginLeft="50dp" | |||
android:textSize="32sp"/> | |||
</LinearLayout> | |||
<Button | |||
android:id="@+id/btn_save" | |||
android:layout_width="match_parent" | |||
android:layout_height="70dp" | |||
android:layout_marginTop="20dp" | |||
android:background="@drawable/bg_btn_login_selected" | |||
android:text="保存参数" | |||
android:textColor="@color/white" | |||
@@ -35,8 +35,8 @@ task clean(type: Delete) { | |||
ext { // 统一版本入口 | |||
//App版本号 | |||
versionCode = 101 | |||
versionName = "1.0.1" | |||
versionCode = 102 | |||
versionName = "1.0.2" | |||
// 支持Android版本 | |||
buildToolsVersion = "33.0.0" | |||
@@ -51,8 +51,8 @@ ext { // 统一版本入口 | |||
// 炒锅 | |||
// 设置applicationId(这里很重要,两个相同applicationId的apk不同同时安装在同一台Android手机中) | |||
applicationId="com.bonait.shanghaiminzhong" | |||
// applicationId="com.bonait.shanghaiminzhong" | |||
applicationId="com.bonait.wokrobot" | |||
// 奶茶机 | |||
// 设置applicationId(这里很重要,两个相同applicationId的apk不同同时安装在同一台Android手机中) | |||
// applicationId= "com.bonait.ncj" | |||