修改测评问题人记录错误2.调整车道边界类型渲染原则
This commit is contained in:
parent
c83ed1b97e
commit
04f157c036
@ -24,6 +24,11 @@ class Constant {
|
|||||||
*/
|
*/
|
||||||
lateinit var USER_ID: String
|
lateinit var USER_ID: String
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前用户名称
|
||||||
|
*/
|
||||||
|
lateinit var USER_REAL_NAME: String
|
||||||
|
|
||||||
//数据版本
|
//数据版本
|
||||||
lateinit var VERSION_ID: String
|
lateinit var VERSION_ID: String
|
||||||
|
|
||||||
|
@ -106,11 +106,12 @@ class LoginViewModel @Inject constructor(
|
|||||||
val userNameCache = sharedPreferences?.getString("userName", null)
|
val userNameCache = sharedPreferences?.getString("userName", null)
|
||||||
val passwordCache = sharedPreferences?.getString("passWord", null)
|
val passwordCache = sharedPreferences?.getString("passWord", null)
|
||||||
val userCodeCache = sharedPreferences?.getString("userCode", null)
|
val userCodeCache = sharedPreferences?.getString("userCode", null)
|
||||||
|
val userRealName = sharedPreferences?.getString("userRealName", null)
|
||||||
//增加缓存记录,不用每次连接网络登录
|
//增加缓存记录,不用每次连接网络登录
|
||||||
if (userNameCache != null && passwordCache != null && userCodeCache != null) {
|
if (userNameCache != null && passwordCache != null && userCodeCache != null&&userRealName!=null) {
|
||||||
if (userNameCache == userName && passwordCache == password) {
|
if (userNameCache == userName && passwordCache == password) {
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
createUserFolder(context, userCodeCache)
|
createUserFolder(context, userCodeCache,userRealName)
|
||||||
loginStatus.postValue(LoginStatus.LOGIN_STATUS_SUCCESS)
|
loginStatus.postValue(LoginStatus.LOGIN_STATUS_SUCCESS)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@ -133,6 +134,7 @@ class LoginViewModel @Inject constructor(
|
|||||||
//网络访问
|
//网络访问
|
||||||
loginStatus.postValue(LoginStatus.LOGIN_STATUS_NET_LOADING)
|
loginStatus.postValue(LoginStatus.LOGIN_STATUS_NET_LOADING)
|
||||||
var userCode = "99999";
|
var userCode = "99999";
|
||||||
|
var userRealName = "";
|
||||||
//登录访问
|
//登录访问
|
||||||
when (val result = networkService.loginUser(LoginUserBean(userName, password))) {
|
when (val result = networkService.loginUser(LoginUserBean(userName, password))) {
|
||||||
is NetResult.Success<*> -> {
|
is NetResult.Success<*> -> {
|
||||||
@ -153,6 +155,7 @@ class LoginViewModel @Inject constructor(
|
|||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
userCode = defaultUserResponse.obj?.userCode.toString()
|
userCode = defaultUserResponse.obj?.userCode.toString()
|
||||||
|
userRealName = defaultUserResponse.obj?.userName.toString()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
@ -200,7 +203,9 @@ class LoginViewModel @Inject constructor(
|
|||||||
sharedPreferences?.edit()?.putString("userName", userName)?.commit()
|
sharedPreferences?.edit()?.putString("userName", userName)?.commit()
|
||||||
sharedPreferences?.edit()?.putString("passWord", password)?.commit()
|
sharedPreferences?.edit()?.putString("passWord", password)?.commit()
|
||||||
sharedPreferences?.edit()?.putString("userCode", userCode)?.commit()
|
sharedPreferences?.edit()?.putString("userCode", userCode)?.commit()
|
||||||
createUserFolder(context, userCode)
|
sharedPreferences?.edit()?.putString("userRealName", userRealName)?.commit()
|
||||||
|
|
||||||
|
createUserFolder(context, userCode,userRealName)
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
loginStatus.postValue(LoginStatus.LOGIN_STATUS_FOLDER_FAILURE)
|
loginStatus.postValue(LoginStatus.LOGIN_STATUS_FOLDER_FAILURE)
|
||||||
}
|
}
|
||||||
@ -242,9 +247,10 @@ class LoginViewModel @Inject constructor(
|
|||||||
/**
|
/**
|
||||||
* 创建用户目录
|
* 创建用户目录
|
||||||
*/
|
*/
|
||||||
private fun createUserFolder(context: Context, userId: String) {
|
private fun createUserFolder(context: Context, userId: String,userRealName:String) {
|
||||||
Constant.IS_VIDEO_SPEED = false
|
Constant.IS_VIDEO_SPEED = false
|
||||||
Constant.USER_ID = userId
|
Constant.USER_ID = userId
|
||||||
|
Constant.USER_REAL_NAME = userRealName
|
||||||
Constant.VERSION_ID = userId
|
Constant.VERSION_ID = userId
|
||||||
Constant.USER_DATA_PATH = Constant.DATA_PATH + Constant.USER_ID + "/" + Constant.VERSION_ID
|
Constant.USER_DATA_PATH = Constant.DATA_PATH + Constant.USER_ID + "/" + Constant.VERSION_ID
|
||||||
Constant.USER_DATA_ATTACHEMNT_PATH = Constant.USER_DATA_PATH + "/attachment/"
|
Constant.USER_DATA_ATTACHEMNT_PATH = Constant.USER_DATA_PATH + "/attachment/"
|
||||||
|
@ -321,9 +321,11 @@ class MainViewModel @Inject constructor(
|
|||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|
||||||
}
|
}
|
||||||
val id = sharedPreferences.getInt(Constant.SELECT_TASK_ID, -1)
|
|
||||||
location.taskId = id.toString()
|
location.taskId = sharedPreferences.getInt(Constant.SELECT_TASK_ID, -1).toString()
|
||||||
if (shareUtil?.connectstate == true) {
|
|
||||||
|
//判断如果是连接状态并处于录像模式,标记为有效点
|
||||||
|
if (shareUtil?.connectstate == true&&shareUtil?.takeCameraMode==0) {
|
||||||
location.media = 1
|
location.media = 1
|
||||||
}
|
}
|
||||||
var disance = 0.0
|
var disance = 0.0
|
||||||
@ -333,7 +335,6 @@ class MainViewModel @Inject constructor(
|
|||||||
location.latitude, location.longitude,
|
location.latitude, location.longitude,
|
||||||
lastNiLocaion!!.latitude, lastNiLocaion!!.longitude
|
lastNiLocaion!!.latitude, lastNiLocaion!!.longitude
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
//室内整理工具时不能进行轨迹存储,判断轨迹间隔要超过2.5并小于60米
|
//室内整理工具时不能进行轨迹存储,判断轨迹间隔要超过2.5并小于60米
|
||||||
if (Constant.INDOOR_IP.isEmpty() && (disance == 0.0 || (disance > 2.5 && disance < 60))) {
|
if (Constant.INDOOR_IP.isEmpty() && (disance == 0.0 || (disance > 2.5 && disance < 60))) {
|
||||||
|
@ -329,6 +329,7 @@ class EvaluationResultViewModel @Inject constructor(
|
|||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
val realm = Realm.getDefaultInstance()
|
val realm = Realm.getDefaultInstance()
|
||||||
liveDataQsRecordBean.value!!.checkTime = DateTimeUtil.getDataTime()
|
liveDataQsRecordBean.value!!.checkTime = DateTimeUtil.getDataTime()
|
||||||
|
liveDataQsRecordBean.value!!.checkUserId = Constant.USER_REAL_NAME
|
||||||
realm.executeTransaction {
|
realm.executeTransaction {
|
||||||
it.copyToRealmOrUpdate(liveDataQsRecordBean.value)
|
it.copyToRealmOrUpdate(liveDataQsRecordBean.value)
|
||||||
}
|
}
|
||||||
|
@ -1560,7 +1560,7 @@
|
|||||||
<m k="qi_table">
|
<m k="qi_table">
|
||||||
<!--车道数-->
|
<!--车道数-->
|
||||||
<m v="OMDB_LANE_NUM">
|
<m v="OMDB_LANE_NUM">
|
||||||
<!-- <m k="laneNum">
|
<!-- <m k="laneNum">
|
||||||
<m v="1">
|
<m v="1">
|
||||||
<line stroke="#545D6C" width="3" />
|
<line stroke="#545D6C" width="3" />
|
||||||
</m>
|
</m>
|
||||||
@ -1600,11 +1600,11 @@
|
|||||||
</m>-->
|
</m>-->
|
||||||
</m>
|
</m>
|
||||||
<!-- 道路线 -->
|
<!-- 道路线 -->
|
||||||
<m v="OMDB_RD_LINK">
|
<m v="OMDB_RD_LINK" zoom-max="19">
|
||||||
<line stroke="#9c9c9c" width="1" />
|
<line stroke="#9c9c9c" width="1" />
|
||||||
</m>
|
</m>
|
||||||
<!--道路种别-->
|
<!--道路种别-->
|
||||||
<m v="OMDB_RD_LINK_KIND">
|
<m v="OMDB_RD_LINK_KIND" zoom-max="19">
|
||||||
<outline-layer id="kind0" stroke="#44000000" width="0.1" />
|
<outline-layer id="kind0" stroke="#44000000" width="0.1" />
|
||||||
<outline-layer id="kind1" stroke="#aa807040" width="0.1" />
|
<outline-layer id="kind1" stroke="#aa807040" width="0.1" />
|
||||||
<m k="kind" v="1">
|
<m k="kind" v="1">
|
||||||
@ -1698,7 +1698,7 @@
|
|||||||
</m>
|
</m>
|
||||||
<!--车道中心线-->
|
<!--车道中心线-->
|
||||||
<m v="OMDB_LANE_LINK_LG">
|
<m v="OMDB_LANE_LINK_LG">
|
||||||
<!-- <m k="eLaneNodePid">
|
<!-- <m k="eLaneNodePid">
|
||||||
<line dasharray="35,35" stroke="#ecf0f1" width="0.1" />
|
<line dasharray="35,35" stroke="#ecf0f1" width="0.1" />
|
||||||
</m>-->
|
</m>-->
|
||||||
<m k="width">
|
<m k="width">
|
||||||
@ -1715,7 +1715,7 @@
|
|||||||
<!--无标线无可区分边界-->
|
<!--无标线无可区分边界-->
|
||||||
<line dasharray="20,8" repeat-start="0" stroke="#ffffff" width="0.2"/>
|
<line dasharray="20,8" repeat-start="0" stroke="#ffffff" width="0.2"/>
|
||||||
</m>
|
</m>
|
||||||
<!-- <outline-layer id="boundaryType" stroke="#fcba5a" width="0.2" />
|
<!-- <outline-layer id="boundaryType" stroke="#fcba5a" width="0.2" />
|
||||||
<m k="boundaryType" v="0">
|
<m k="boundaryType" v="0">
|
||||||
<!–不应用–>
|
<!–不应用–>
|
||||||
<line stroke="#fcba5a" use="boundaryType"/>
|
<line stroke="#fcba5a" use="boundaryType"/>
|
||||||
@ -1761,10 +1761,9 @@
|
|||||||
<!-- 车道边界类型 -->
|
<!-- 车道边界类型 -->
|
||||||
<m v="OMDB_LANE_MARK_BOUNDARYTYPE">
|
<m v="OMDB_LANE_MARK_BOUNDARYTYPE">
|
||||||
<outline-layer id="boundary" stroke="#ffffff" width="0.2" />
|
<outline-layer id="boundary" stroke="#ffffff" width="0.2" />
|
||||||
<m k="boundaryType">
|
<m k="boundaryType" v="2">
|
||||||
<!--标线-->
|
<!--标线-->
|
||||||
<m v="2">
|
<m k="markType" v="0|1|4|5|6|7|8">
|
||||||
<m k="markType">
|
|
||||||
<!--其他|实线-->
|
<!--其他|实线-->
|
||||||
<m v="0|1|2|3|4|5|6|7|8">
|
<m v="0|1|2|3|4|5|6|7|8">
|
||||||
<m k="markColor">
|
<m k="markColor">
|
||||||
@ -1772,7 +1771,7 @@
|
|||||||
<line stroke="#ffffff" use="boundaryType" />
|
<line stroke="#ffffff" use="boundaryType" />
|
||||||
</m>
|
</m>
|
||||||
<m v="2">
|
<m v="2">
|
||||||
<line dasharray="10,2,2,2,2,2,2,2" repeat-start="0" stroke="#eccc68" use="boundaryType" />
|
<line stroke="#eccc68" use="boundaryType" />
|
||||||
</m>
|
</m>
|
||||||
<m v="6">
|
<m v="6">
|
||||||
<line stroke="#0000ff" use="boundaryType" />
|
<line stroke="#0000ff" use="boundaryType" />
|
||||||
@ -1785,46 +1784,38 @@
|
|||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<!-- <!–虚线–>
|
</m>
|
||||||
<m v="2">
|
|
||||||
|
<m k="markType" v="2|3">
|
||||||
|
<!--其他|实线-->
|
||||||
|
<m v="0|1|2|3|4|5|6|7|8">
|
||||||
<m k="markColor">
|
<m k="markColor">
|
||||||
<m v="0|1">
|
|
||||||
<line dasharray="13,135" stipple="5" stipple-stroke="#000000"
|
|
||||||
stroke="#ffffff" use="boundaryType" />
|
|
||||||
</m>
|
|
||||||
<m v="2">
|
|
||||||
<line dasharray="13,135" stipple="5" stipple-stroke="#ffffff"
|
|
||||||
stroke="#eccc68" use="boundaryType" />
|
|
||||||
</m>
|
|
||||||
<m v="6">
|
|
||||||
<line dasharray="13,135" stipple="5" stipple-stroke="#ffffff"
|
|
||||||
stroke="#0000ff" use="boundaryType" />
|
|
||||||
</m>
|
|
||||||
<m v="7">
|
|
||||||
<line dasharray="13,135" stipple="5" stipple-stroke="#ffffff"
|
|
||||||
stroke="#00ff00" use="boundaryType" />
|
|
||||||
</m>
|
|
||||||
<m v="9">
|
|
||||||
<line dasharray="13,135" stipple="5" stipple-stroke="#ffffff"
|
|
||||||
stroke="#8e44ad" use="boundaryType" />
|
|
||||||
</m>
|
|
||||||
</m>
|
|
||||||
</m>
|
|
||||||
<!–导流区边线–>
|
|
||||||
<m v="4">
|
|
||||||
<line outline="boundary" stroke="#545D6C"></line>
|
|
||||||
<lineSymbol repeat-gap="0.5" repeat-start="0"
|
|
||||||
src="assets:omdb/icon_right.png" />
|
|
||||||
</m>-->
|
|
||||||
</m>
|
|
||||||
</m>
|
|
||||||
<m v="0|3|4|5|6|7|8|9">
|
|
||||||
<line stroke="#ffffff" use="boundaryType" />
|
|
||||||
</m>
|
|
||||||
<!--只区分虚线与实线-->
|
|
||||||
<m v="1">
|
<m v="1">
|
||||||
<line dasharray="20,8" repeat-start="0" stroke="#ffffff" width="0.2"/>
|
<line dasharray="20,8" repeat-start="0" stroke="#ffffff" width="0.2"/>
|
||||||
</m>
|
</m>
|
||||||
|
<m v="2">
|
||||||
|
<line dasharray="20,8" repeat-start="0" stroke="#eccc68" width="0.2"/>
|
||||||
|
</m>
|
||||||
|
<m v="6">
|
||||||
|
<line dasharray="20,8" repeat-start="0" stroke="#0000ff" width="0.2"/>
|
||||||
|
</m>
|
||||||
|
<m v="7">
|
||||||
|
<line dasharray="20,8" repeat-start="0" stroke="#00ff00" width="0.2"/>
|
||||||
|
</m>
|
||||||
|
<m v="0|9">
|
||||||
|
<line dasharray="20,8" repeat-start="0" stroke="#8e44ad" width="0.2"/>
|
||||||
|
</m>
|
||||||
|
</m>
|
||||||
|
</m>
|
||||||
|
</m>
|
||||||
|
</m>
|
||||||
|
|
||||||
|
<m k="boundaryType" v="0|3|4|5|6|7|8|9">
|
||||||
|
<line stroke="#ffffff" use="boundaryType" />
|
||||||
|
</m>
|
||||||
|
<!--只区分虚线与实线-->
|
||||||
|
<m k="boundaryType" v="1">
|
||||||
|
<line dasharray="20,8" repeat-start="0" stroke="#ffffff" width="0.2"/>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ open class QsRecordBean @JvmOverloads constructor(
|
|||||||
/**
|
/**
|
||||||
* 质检员ID
|
* 质检员ID
|
||||||
*/
|
*/
|
||||||
var checkUserId: String = "张海球",
|
var checkUserId: String = "",
|
||||||
/**
|
/**
|
||||||
* 质检日期
|
* 质检日期
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user