|
|
@@ -45,7 +45,7 @@ class SelectedItemFragment : BaseFragment<FragmentSelectedItemBinding>() {
|
|
|
if (question != null && dao != null) {
|
|
|
question!!.inputString = bean
|
|
|
question!!.review_id = question!!.id
|
|
|
- question!!.review_answer = bean
|
|
|
+ question!!.review_answer = getWeekInfo(bean)
|
|
|
question!!.correct = ""
|
|
|
dao?.update(question!!)
|
|
|
}
|
|
|
@@ -142,4 +142,36 @@ class SelectedItemFragment : BaseFragment<FragmentSelectedItemBinding>() {
|
|
|
}
|
|
|
selectedAdapter.setData(itemList)
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 转化格式
|
|
|
+ */
|
|
|
+ private fun getWeekInfo(str: String): String {
|
|
|
+ when (str) {
|
|
|
+ "星期一" -> {
|
|
|
+ return "1"
|
|
|
+ }
|
|
|
+ "星期二" -> {
|
|
|
+ return "2"
|
|
|
+ }
|
|
|
+ "星期三" -> {
|
|
|
+ return "3"
|
|
|
+ }
|
|
|
+ "星期四" -> {
|
|
|
+ return "4"
|
|
|
+ }
|
|
|
+ "星期五" -> {
|
|
|
+ return "5"
|
|
|
+ }
|
|
|
+ "星期六" -> {
|
|
|
+ return ""
|
|
|
+ }
|
|
|
+ "星期日" -> {
|
|
|
+ return ""
|
|
|
+ }
|
|
|
+ else -> {
|
|
|
+ return ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|