diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 4bc15681..0e8d345d 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -33,6 +33,9 @@
tools:ignore="GoogleAppIndexingWarning"
tools:node="merge"
tools:replace="android:icon">
+
diff --git a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
index 91cb02b5..434154d6 100644
--- a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
+++ b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
@@ -825,6 +825,8 @@ public class ExecuteTheRecipe {
WritePLC("初始化",false,null);
ExecuteTheRecipe.WritePLC("温控开关", false, null);//开关闭合
+ ExecuteTheRecipe.WritePLC("暂停开关", false, null);//开关闭合
+
} catch (InterruptedException e) {
ToastUtils.info("异常信息:" + e.getMessage());
}
diff --git a/app/src/main/java/com/bonait/bnframework/business/MainInit.java b/app/src/main/java/com/bonait/bnframework/business/MainInit.java
index 89c58b01..c524be0a 100644
--- a/app/src/main/java/com/bonait/bnframework/business/MainInit.java
+++ b/app/src/main/java/com/bonait/bnframework/business/MainInit.java
@@ -190,9 +190,31 @@ public class MainInit {
user.account = "admin";
user.pass = "123456";
user.deviceID = ConfigName.getInstance().DeviceId;
- user.userID = "20230415-fyf";
+ user.userID = "超级管理员";
user.exp = "管理员";
QueryDB.AddUser(user);
+
+ BPA_USER user1 = new BPA_USER();
+ user1.name = "一般用户";
+ user1.account = "ybyh";
+ user1.pass = "123456";
+ user1.deviceID = ConfigName.getInstance().DeviceId;
+ user1.userID = "一般用户";
+ user1.exp = "一般用户";
+ QueryDB.AddUser(user1);
+
+
+ BPA_USER user2 = new BPA_USER();
+ user2.name = "研发用户";
+ user2.account = "yfyh";
+ user2.pass = "123456";
+ user2.deviceID = ConfigName.getInstance().DeviceId;
+ user2.userID = "研发用户";
+ user2.exp = "研发用户";
+ QueryDB.AddUser(user2);
+
+
+
//10个料仓
if (QueryDB.GetSilosALL().size() == 0) {
for (int i = 0; i < 5; i++) {
diff --git a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
index 6690a5dc..c0c21c02 100644
--- a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
+++ b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
@@ -252,6 +252,7 @@ public class ConfigName {
add(new Res_PLCADDRESS("加热", "M10.6", 0, 1));
add(new Res_PLCADDRESS("加热功率", "VW100", 1, 1));
add(new Res_PLCADDRESS("温控开关", "M17.6", 1, 1));
+ add(new Res_PLCADDRESS("暂停开关", "M17.7", 1, 1));
//主料
add(new Res_PLCADDRESS("主料", "M17.4", 0, 1));
@@ -402,6 +403,7 @@ public class ConfigName {
add(new Res_PLCADDRESS("加热", "M10.6", 0, 1));
add(new Res_PLCADDRESS("加热功率", "VW100", 1, 1));
add(new Res_PLCADDRESS("温控开关", "M17.6", 1, 1));
+ add(new Res_PLCADDRESS("暂停开关", "M17.7", 1, 1));
//主料
add(new Res_PLCADDRESS("主料", "M17.4", 0, 1));
@@ -611,6 +613,7 @@ public class ConfigName {
add(new Res_PLCADDRESS("加热", "M10.6", 0, 1));
add(new Res_PLCADDRESS("加热功率", "VW100", 1, 1));
add(new Res_PLCADDRESS("温控开关", "M17.6", 1, 1));
+ add(new Res_PLCADDRESS("暂停开关", "M17.7", 1, 1));
//主料
add(new Res_PLCADDRESS("主料", "M17.4", 0, 1));
@@ -996,4 +999,12 @@ public class ConfigName {
*/
public String versionSelectionEnum = "大炒版本";
//endregion
+
+ //region 用户角色
+ public List UserRole = new ArrayList() {{
+ add("一般用户");
+ add("研发用户");
+ add("超级管理员");
+ }};
+ //eneregion
}
diff --git a/app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java b/app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java
index e1bcd4cf..f9f96e6c 100644
--- a/app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java
+++ b/app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java
@@ -4,6 +4,7 @@ import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
+import android.widget.TableRow;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.file.DBHelper;
@@ -1740,6 +1741,23 @@ public class QueryDB {
/**
* ID查询用户
*
+ * @param
+ * @return
+ */
+ public static boolean GetUserIsCZ(String account,String name) {
+ String orderby = Desc_Time_Up;//先按排序 创建时间倒序
+ String where = "isDelete=? and (account=? or name=?)";
+ String[] args = new String[]{"0", account, name};
+ ArrayList data = new ArrayList<>();
+ ArrayList