From e27f54aa7e10836e2741dc590559e1039fbade78 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 23 七月 2021 15:06:41 +0800
Subject: [PATCH] 1. 创建子任务时,执行用户默认为当前登录用户或执行组中的第一人 2. 修复部分企业类型问题图标错误 3. 新增场景账户自动生成功能
---
app/src/main/java/cn/flightfeather/thirdapp/CommonApplication.java | 38 ++++++++++++++------------------------
1 files changed, 14 insertions(+), 24 deletions(-)
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/CommonApplication.java b/app/src/main/java/cn/flightfeather/thirdapp/CommonApplication.java
index 708c711..e91af83 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/CommonApplication.java
+++ b/app/src/main/java/cn/flightfeather/thirdapp/CommonApplication.java
@@ -30,18 +30,17 @@
*/
public class CommonApplication extends Application {
-// private final String ROOTURL="http://106.14.187.51:8801/supervision/";
- public final String ROOT_URL ="http://192.168.0.200:8080/";
- public final String ROOT_URL_IMAGE ="http://192.168.0.200:8080/images/";
+// public final String ROOT_URL ="http://192.168.0.200:8080/";
+// public final String ROOT_URL_IMAGE ="http://192.168.0.200:8080/images/";
+ public final String ROOT_URL ="http://192.168.0.146:8080/";
+ public final String ROOT_URL_IMAGE ="http://192.168.0.146:8080/images/";
public final String ROOT_URL_RELEASE = "http://47.100.191.150:9005/";
public final String ROOT_URL_RELEASE_IMAGE = "http://47.100.191.150:9005/images/";
private Retrofit retrofit;
private Retrofit retrofitImage;
private DaoSession daoSession;
private Userinfo currentUser;
- private boolean debugMode = false;
- private boolean released = true;
- private UserinfoDao userinfoDao;
+ private final boolean released = true;
//鍦ㄧ▼搴忔墦寮�鏃惰仈缃戣幏鍙栭缃暟鎹�
private boolean loadPreDataWhenOpen = true;
@@ -75,8 +74,7 @@
}
/**
- * 2018.11.07 by riku 鑾峰彇鏁版嵁浼犺緭鎺ュ彛璋冪敤鐨勬牴鍦板潃
- * @return
+ * 鑾峰彇鏁版嵁浼犺緭鎺ュ彛璋冪敤鐨勬牴鍦板潃
*/
public Retrofit getRetrofit(){
@@ -104,8 +102,7 @@
}
/**
- * 2018.11.07 by riku 鑾峰彇鍥剧墖浼犺緭鎺ュ彛璋冪敤鐨勬牴鍦板潃
- * @return
+ * 鑾峰彇鍥剧墖浼犺緭鎺ュ彛璋冪敤鐨勬牴鍦板潃
*/
public Retrofit getRetrofitImage(){
@@ -130,13 +127,13 @@
/**
* 鑾峰彇鏁版嵁搴揝ession
- * @return
*/
public DaoSession getDaoSession() {
if (daoSession ==null) {
File path = new File(Environment.getExternalStorageDirectory(), "FlightFeather/third_new.db");
if(!path.exists())
path.getParentFile().mkdirs();
+
//鍒涘缓鏁版嵁搴搒hop.db"
DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(getApplicationContext(), path.getAbsolutePath(), null);
//鑾峰彇鍙啓鏁版嵁搴�
@@ -152,20 +149,14 @@
return daoSession;
}
- public boolean isDebugMode() {
- return debugMode;
- }
-
-
/**
- * 2018.11.07 by riku 鑾峰彇褰撳墠鐢ㄦ埛瀵硅薄
- * @return
+ * 鑾峰彇褰撳墠鐢ㄦ埛瀵硅薄
*/
public Userinfo getCurrentUser() {
if (currentUser ==null){
- userinfoDao = this.getDaoSession().getUserinfoDao();
- String userId = GlobalConfig.Companion.getInstance().getUserId();
- if (userId == null) {
+ UserinfoDao userinfoDao = this.getDaoSession().getUserinfoDao();
+ String userId = GlobalConfig.getInstance().getUserId();
+ if (userId.equals(GlobalConfig.DEFAULT_USER)) {
currentUser = userinfoDao.queryBuilder().unique();
} else {
currentUser = userinfoDao.queryBuilder().where(UserinfoDao.Properties.Guid.eq(userId)).unique();
@@ -175,13 +166,12 @@
}
public void setCurrentUser(Userinfo currentUser) {
- GlobalConfig.Companion.getInstance().setUserId(currentUser.getGuid());
+ GlobalConfig.getInstance().setUserId(currentUser.getGuid());
this.currentUser = currentUser;
}
/**
- * 2018.11.07 by riku app鍚姩鏃跺垽鏂槸鍚﹀姞杞藉垵濮嬪寲鏁版嵁瀹屾垚
- * @return
+ * app鍚姩鏃跺垽鏂槸鍚﹀姞杞藉垵濮嬪寲鏁版嵁瀹屾垚
*/
public boolean isLoadPreDataWhenOpen() {
return loadPreDataWhenOpen;
--
Gitblit v1.9.3