Browse Source

调试修改

按钮效果修改
滑动块限制修改
燃气自翻炒锅
pry 5 months ago
parent
commit
0fd6e42ec6
10 changed files with 41 additions and 24 deletions
  1. +1
    -1
      .idea/gradle.xml
  2. +1
    -1
      app/src/main/java/com/bonait/bnframework/business/ConfigData.java
  3. +21
    -11
      app/src/main/java/com/bonait/bnframework/business/MainInit.java
  4. +1
    -1
      app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java
  5. +2
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java
  6. +8
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/HandControlFragment.java
  7. +1
    -1
      app/src/main/java/com/bonait/bnframework/modules/mine/fragment/MyFragment.java
  8. +1
    -1
      app/src/main/res/drawable/bg_btn_false_color.xml
  9. +4
    -4
      app/src/main/res/layout/activity_diy.xml
  10. +1
    -1
      app/src/main/res/layout/fragment_hand_control.xml

+ 1
- 1
.idea/gradle.xml View File

@@ -5,7 +5,7 @@
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="gradleJvm" value="corretto-11" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />


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

@@ -96,7 +96,7 @@ public class ConfigData {
public void Init() {
//1.加载系统设置
LoadSystem();
ToggleEnvironment();
// ToggleEnvironment();
//2.加载配置
LoadingPZ();
//3.初始化业务


+ 21
- 11
app/src/main/java/com/bonait/bnframework/business/MainInit.java View File

@@ -26,6 +26,7 @@ import com.bonait.bnframework.common.helper.I.IMessageLogNotify;
import com.bonait.bnframework.common.helper.LogcatHelper;
import com.bonait.bnframework.common.helper.MessageLog;
import com.bonait.bnframework.common.helper.SdCart;
import com.bonait.bnframework.common.model.Authority;
import com.bonait.bnframework.common.notification.MainNotification;
import com.bonait.bnframework.common.utils.AppUtils;
import com.bonait.bnframework.common.utils.NetworkUtils;
@@ -190,31 +191,40 @@ public class MainInit {
if (QueryDB.GetUserALL().size() <= 0) {
BPA_USER user = new BPA_USER();
user.id = "20230415-fyf";
user.name = "管理员";
user.name = Authority.管理员.name();
user.account = "admin";
user.pass = "123456";
user.deviceID = ConfigName.getInstance().DeviceId;
user.userID = "超级管理员";
user.exp = "管理员";
user.userID = Authority.管理员.name();
user.exp = Authority.管理员.name();
QueryDB.AddUser(user);

BPA_USER user1 = new BPA_USER();
user1.name = "一般用户";
user1.account = "ybyh";
user1.name = Authority.维修员.name();
user1.account = "wxy";
user1.pass = "123456";
user1.deviceID = ConfigName.getInstance().DeviceId;
user1.userID = "一般用户";
user1.exp = "一般用户";
user1.userID = Authority.维修员.name();
user1.exp = Authority.维修员.name();
QueryDB.AddUser(user1);

BPA_USER user3 = new BPA_USER();
user3.name = Authority.操作员.name();
user3.account = "czy";
user3.pass = "123456";
user3.deviceID = ConfigName.getInstance().DeviceId;
user3.userID = Authority.操作员.name();
user3.exp = Authority.操作员.name();
QueryDB.AddUser(user3);


BPA_USER user2 = new BPA_USER();
user2.name = "研发用户";
user2.account = "yfyh";
user2.name = Authority.研发员.name();
user2.account = "yfy";
user2.pass = "123456";
user2.deviceID = ConfigName.getInstance().DeviceId;
user2.userID = "研发用户";
user2.exp = "研发用户";
user2.userID = Authority.研发员.name();
user2.exp = Authority.研发员.name();
QueryDB.AddUser(user2);




+ 1
- 1
app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java View File

@@ -45,7 +45,7 @@ public class UpdateAppUtils {
/**
* 当前版本号
*/
private static String myVersionCode = "1.13";
private static String myVersionCode = "1.19";
/**
* 服务器的版本号
*/


+ 2
- 2
app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java View File

@@ -101,9 +101,9 @@ public class BottomNavigationMainActivity extends BaseActivity {
//1.同步时间
NetworkUtils.SynchronizationTime();
//主持
ConfigData.getInstance().GetOrganize(this);
// ConfigData.getInstance().GetOrganize(this);
//判断连接环境
ConfigData.getInstance().ToggleEnvironment();
// ConfigData.getInstance().ToggleEnvironment();
//2.初始化PLC
// ReconnectModbus();
// ConfigData.getInstance().PLC_Init();


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

@@ -373,6 +373,14 @@ public class HandControlFragment extends BaseFragment {
public void InchingControl(View view,Boolean IsChick)
{
CommHelper.get().siemens. CancelWrite=true;
Button btn =activity.findViewById(view.getId());
if(btn!=null){
if(!IsChick){
btn.setBackgroundResource(R.drawable.bg_btn_false_color);
}else{
btn.setBackgroundResource(R.drawable.bg_btn_login_selected);
}
}
switch (view.getId()) {
case R.id.button_搅拌点动:
ExecuteTheRecipe.showlog("手动操作-搅拌点动开关,值:"+IsChick);
@@ -400,7 +408,6 @@ public class HandControlFragment extends BaseFragment {
public View.OnTouchListener touchListener = new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {

if(!ExecuteTheRecipe.getDeviceData.SystemStartStopStatusNotify.getValue()){
if(motionEvent.getAction() == MotionEvent.ACTION_DOWN){
DialogManager.showWarn("系统未启动,请启动后重试!",AlertDialogButton.OK,null);


+ 1
- 1
app/src/main/java/com/bonait/bnframework/modules/mine/fragment/MyFragment.java View File

@@ -287,7 +287,7 @@ public class MyFragment extends BaseFragment {
*/
private void skipToLoginActivity() {
// 跳转到登录页面
Intent intent = new Intent(context, LoginActivity.class);
Intent intent = new Intent(getContext(), LoginActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
//overridePend1ingTransition(android.R.anim.fade_in, android.R.anim.fade_out);


+ 1
- 1
app/src/main/res/drawable/bg_btn_false_color.xml View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#7FEF5362"
android:color="#336287"
android:radius="-1dp">

<item android:state_pressed="true">


+ 4
- 4
app/src/main/res/layout/activity_diy.xml View File

@@ -16,9 +16,9 @@
android:layout_marginTop="?attr/qmui_topbar_height"
android:background="@color/qmui_config_color_white">

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- <ScrollView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent">-->

<LinearLayout
android:layout_width="match_parent"
@@ -334,7 +334,7 @@
android:textSize="@dimen/textSize" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
<!-- </ScrollView>-->
<!-- <RelativeLayout-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_width="match_parent"-->


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

@@ -783,7 +783,7 @@
android:stepSize="1"
android:value="0"
android:valueFrom="0"
android:valueTo="100"
android:valueTo="50"
app:enableDrawHalo="false"
app:thumbColor="@color/we_read_thumb_color"
app:thumbRadius="21dp"


Loading…
Cancel
Save