@@ -5,7 +5,7 @@ | |||||
<option name="linkedExternalProjectsSettings"> | <option name="linkedExternalProjectsSettings"> | ||||
<GradleProjectSettings> | <GradleProjectSettings> | ||||
<option name="externalProjectPath" value="$PROJECT_DIR$" /> | <option name="externalProjectPath" value="$PROJECT_DIR$" /> | ||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" /> | |||||
<option name="gradleJvm" value="corretto-11" /> | |||||
<option name="modules"> | <option name="modules"> | ||||
<set> | <set> | ||||
<option value="$PROJECT_DIR$" /> | <option value="$PROJECT_DIR$" /> | ||||
@@ -96,7 +96,7 @@ public class ConfigData { | |||||
public void Init() { | public void Init() { | ||||
//1.加载系统设置 | //1.加载系统设置 | ||||
LoadSystem(); | LoadSystem(); | ||||
ToggleEnvironment(); | |||||
// ToggleEnvironment(); | |||||
//2.加载配置 | //2.加载配置 | ||||
LoadingPZ(); | LoadingPZ(); | ||||
//3.初始化业务 | //3.初始化业务 | ||||
@@ -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.LogcatHelper; | ||||
import com.bonait.bnframework.common.helper.MessageLog; | import com.bonait.bnframework.common.helper.MessageLog; | ||||
import com.bonait.bnframework.common.helper.SdCart; | 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.notification.MainNotification; | ||||
import com.bonait.bnframework.common.utils.AppUtils; | import com.bonait.bnframework.common.utils.AppUtils; | ||||
import com.bonait.bnframework.common.utils.NetworkUtils; | import com.bonait.bnframework.common.utils.NetworkUtils; | ||||
@@ -190,31 +191,40 @@ public class MainInit { | |||||
if (QueryDB.GetUserALL().size() <= 0) { | if (QueryDB.GetUserALL().size() <= 0) { | ||||
BPA_USER user = new BPA_USER(); | BPA_USER user = new BPA_USER(); | ||||
user.id = "20230415-fyf"; | user.id = "20230415-fyf"; | ||||
user.name = "管理员"; | |||||
user.name = Authority.管理员.name(); | |||||
user.account = "admin"; | user.account = "admin"; | ||||
user.pass = "123456"; | user.pass = "123456"; | ||||
user.deviceID = ConfigName.getInstance().DeviceId; | user.deviceID = ConfigName.getInstance().DeviceId; | ||||
user.userID = "超级管理员"; | |||||
user.exp = "管理员"; | |||||
user.userID = Authority.管理员.name(); | |||||
user.exp = Authority.管理员.name(); | |||||
QueryDB.AddUser(user); | QueryDB.AddUser(user); | ||||
BPA_USER user1 = new BPA_USER(); | BPA_USER user1 = new BPA_USER(); | ||||
user1.name = "一般用户"; | |||||
user1.account = "ybyh"; | |||||
user1.name = Authority.维修员.name(); | |||||
user1.account = "wxy"; | |||||
user1.pass = "123456"; | user1.pass = "123456"; | ||||
user1.deviceID = ConfigName.getInstance().DeviceId; | user1.deviceID = ConfigName.getInstance().DeviceId; | ||||
user1.userID = "一般用户"; | |||||
user1.exp = "一般用户"; | |||||
user1.userID = Authority.维修员.name(); | |||||
user1.exp = Authority.维修员.name(); | |||||
QueryDB.AddUser(user1); | 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(); | BPA_USER user2 = new BPA_USER(); | ||||
user2.name = "研发用户"; | |||||
user2.account = "yfyh"; | |||||
user2.name = Authority.研发员.name(); | |||||
user2.account = "yfy"; | |||||
user2.pass = "123456"; | user2.pass = "123456"; | ||||
user2.deviceID = ConfigName.getInstance().DeviceId; | user2.deviceID = ConfigName.getInstance().DeviceId; | ||||
user2.userID = "研发用户"; | |||||
user2.exp = "研发用户"; | |||||
user2.userID = Authority.研发员.name(); | |||||
user2.exp = Authority.研发员.name(); | |||||
QueryDB.AddUser(user2); | QueryDB.AddUser(user2); | ||||
@@ -45,7 +45,7 @@ public class UpdateAppUtils { | |||||
/** | /** | ||||
* 当前版本号 | * 当前版本号 | ||||
*/ | */ | ||||
private static String myVersionCode = "1.13"; | |||||
private static String myVersionCode = "1.19"; | |||||
/** | /** | ||||
* 服务器的版本号 | * 服务器的版本号 | ||||
*/ | */ | ||||
@@ -101,9 +101,9 @@ public class BottomNavigationMainActivity extends BaseActivity { | |||||
//1.同步时间 | //1.同步时间 | ||||
NetworkUtils.SynchronizationTime(); | NetworkUtils.SynchronizationTime(); | ||||
//主持 | //主持 | ||||
ConfigData.getInstance().GetOrganize(this); | |||||
// ConfigData.getInstance().GetOrganize(this); | |||||
//判断连接环境 | //判断连接环境 | ||||
ConfigData.getInstance().ToggleEnvironment(); | |||||
// ConfigData.getInstance().ToggleEnvironment(); | |||||
//2.初始化PLC | //2.初始化PLC | ||||
// ReconnectModbus(); | // ReconnectModbus(); | ||||
// ConfigData.getInstance().PLC_Init(); | // ConfigData.getInstance().PLC_Init(); | ||||
@@ -373,6 +373,14 @@ public class HandControlFragment extends BaseFragment { | |||||
public void InchingControl(View view,Boolean IsChick) | public void InchingControl(View view,Boolean IsChick) | ||||
{ | { | ||||
CommHelper.get().siemens. CancelWrite=true; | 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()) { | switch (view.getId()) { | ||||
case R.id.button_搅拌点动: | case R.id.button_搅拌点动: | ||||
ExecuteTheRecipe.showlog("手动操作-搅拌点动开关,值:"+IsChick); | ExecuteTheRecipe.showlog("手动操作-搅拌点动开关,值:"+IsChick); | ||||
@@ -400,7 +408,6 @@ public class HandControlFragment extends BaseFragment { | |||||
public View.OnTouchListener touchListener = new View.OnTouchListener() { | public View.OnTouchListener touchListener = new View.OnTouchListener() { | ||||
@Override | @Override | ||||
public boolean onTouch(View view, MotionEvent motionEvent) { | public boolean onTouch(View view, MotionEvent motionEvent) { | ||||
if(!ExecuteTheRecipe.getDeviceData.SystemStartStopStatusNotify.getValue()){ | if(!ExecuteTheRecipe.getDeviceData.SystemStartStopStatusNotify.getValue()){ | ||||
if(motionEvent.getAction() == MotionEvent.ACTION_DOWN){ | if(motionEvent.getAction() == MotionEvent.ACTION_DOWN){ | ||||
DialogManager.showWarn("系统未启动,请启动后重试!",AlertDialogButton.OK,null); | DialogManager.showWarn("系统未启动,请启动后重试!",AlertDialogButton.OK,null); | ||||
@@ -287,7 +287,7 @@ public class MyFragment extends BaseFragment { | |||||
*/ | */ | ||||
private void skipToLoginActivity() { | private void skipToLoginActivity() { | ||||
// 跳转到登录页面 | // 跳转到登录页面 | ||||
Intent intent = new Intent(context, LoginActivity.class); | |||||
Intent intent = new Intent(getContext(), LoginActivity.class); | |||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | ||||
startActivity(intent); | startActivity(intent); | ||||
//overridePend1ingTransition(android.R.anim.fade_in, android.R.anim.fade_out); | //overridePend1ingTransition(android.R.anim.fade_in, android.R.anim.fade_out); | ||||
@@ -1,6 +1,6 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" | <ripple xmlns:android="http://schemas.android.com/apk/res/android" | ||||
android:color="#7FEF5362" | |||||
android:color="#336287" | |||||
android:radius="-1dp"> | android:radius="-1dp"> | ||||
<item android:state_pressed="true"> | <item android:state_pressed="true"> | ||||
@@ -16,9 +16,9 @@ | |||||
android:layout_marginTop="?attr/qmui_topbar_height" | android:layout_marginTop="?attr/qmui_topbar_height" | ||||
android:background="@color/qmui_config_color_white"> | 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 | <LinearLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
@@ -334,7 +334,7 @@ | |||||
android:textSize="@dimen/textSize" /> | android:textSize="@dimen/textSize" /> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
</LinearLayout> | </LinearLayout> | ||||
</ScrollView> | |||||
<!-- </ScrollView>--> | |||||
<!-- <RelativeLayout--> | <!-- <RelativeLayout--> | ||||
<!-- android:layout_alignParentBottom="true"--> | <!-- android:layout_alignParentBottom="true"--> | ||||
<!-- android:layout_width="match_parent"--> | <!-- android:layout_width="match_parent"--> | ||||
@@ -783,7 +783,7 @@ | |||||
android:stepSize="1" | android:stepSize="1" | ||||
android:value="0" | android:value="0" | ||||
android:valueFrom="0" | android:valueFrom="0" | ||||
android:valueTo="100" | |||||
android:valueTo="50" | |||||
app:enableDrawHalo="false" | app:enableDrawHalo="false" | ||||
app:thumbColor="@color/we_read_thumb_color" | app:thumbColor="@color/we_read_thumb_color" | ||||
app:thumbRadius="21dp" | app:thumbRadius="21dp" | ||||