[fix]
[net fix]
This commit is contained in:
yangyakun
2025-02-19 14:11:58 +08:00
parent b6bd6e4684
commit 68b6c2118e

View File

@@ -4,6 +4,7 @@ import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.google.gson.annotations.SerializedName
import com.mogo.och.weaknet.repository.RepositoryManager
@Entity(tableName = TaskDataBean.tableName)
data class TaskDataBean(
@@ -95,15 +96,24 @@ data class TaskDataBean(
}
fun getLineIdAndName(function: (shiftsId:Long,taskId: Long, taskTime: Long , taskDate:Long) -> Unit) {
taskId?.let { id ->
taskStartTime?.let { time ->
taskDate?.let { date ->
shiftsId?.let {shiftsId->
function(shiftsId,id, time, date)
if (RepositoryManager.supportDb()) {
taskId?.let { id ->
taskStartTime?.let { time ->
taskDate?.let { date ->
shiftsId?.let {shiftsId->
function(shiftsId,id, time, date)
}
}
}
}
}else{
taskId?.let { id ->
taskStartTime?.let { time ->
function(shiftsId?:0,id, time, taskDate?:System.currentTimeMillis())
}
}
}
}