| | |
| | | import cn.flightfeather.thirdapp.util.file.FileUtil |
| | | import com.ping.greendao.gen.GittypeDao |
| | | import kotlinx.android.synthetic.main.dialog_camera.* |
| | | import kotlinx.android.synthetic.main.dialog_camera.fab_problem_list_close |
| | | import kotlinx.android.synthetic.main.dialog_camera.iv_new_photo |
| | | import kotlinx.android.synthetic.main.dialog_camera.tv_title |
| | | import kotlinx.android.synthetic.main.dialog_camera_2.* |
| | | import okhttp3.ResponseBody |
| | | import retrofit2.Call |
| | | import retrofit2.Callback |
| | |
| | | |
| | | override fun getImageViews(): MutableList<ImageView> = mutableListOf() |
| | | |
| | | override fun getLayoutId(): Int = R.layout.dialog_camera |
| | | override fun getLayoutId(): Int = R.layout.dialog_camera_2 |
| | | |
| | | lateinit var viewModel: MenuNewGitViewModel |
| | | |
| | |
| | | intent.putExtra("gitlistVo", viewModel.gitList.value?.get(position)) |
| | | intent.putExtra("subTask", subTask) |
| | | intent.putExtra("inspectionGuid", inspection?.guid) |
| | | intent.putExtra("scenseAddress", "${scene?.cityname ?: ""} + ${scene?.districtname?:""} + ${scene?.townname?:""} + ${scene?.location?:""}") |
| | | intent.putExtra("scenseAddress", "${scene?.cityname ?: ""}${scene?.districtname?:""}${scene?.townname?:""}${scene?.location?:""}") |
| | | startActivity(intent) |
| | | } |
| | | |
| | |
| | | et_problemDes.visibility = View.GONE |
| | | ll_change_suggestion.visibility = View.GONE |
| | | //加载预置数据 |
| | | val gittypeList = DbFactory.getInstance().gittypeDao.queryBuilder() |
| | | val gittypeList = DbFactory.getInstance().gittypeDao.queryBuilder() |
| | | .where( |
| | | GittypeDao.Properties.Tasktype.eq(subTask?.type) , |
| | | GittypeDao.Properties.Scensetype.eq(scene?.type), |
| | | GittypeDao.Properties.Districtname.eq(subTask?.districtname) |
| | | GittypeDao.Properties.Tasktype.eq(subTask?.type ?: ""), |
| | | GittypeDao.Properties.Scensetype.eq(scene?.type ?: ""), |
| | | GittypeDao.Properties.Districtname.eq(subTask?.districtname ?: "") |
| | | ).orderAsc(GittypeDao.Properties.Typeid).list() |
| | | if (gittypeList.size == 0) { |
| | | val gittype1 = Gittype() |
| | |
| | | override fun onResponse(call: Call<ResponseBody>, response: Response<ResponseBody>) { |
| | | if (response.body() != null) { |
| | | Toast.makeText(application, "提交成功", Toast.LENGTH_SHORT).show() |
| | | for (oldfile in pathTempList) { |
| | | for (l in pathTempList) { |
| | | val oldfile = l.first |
| | | val fileName = gitSelected.name + " " + UUIDGenerator.generateUUID(4) + ".jpg" |
| | | val mediafile = Mediafile() |
| | | mediafile.guid = UUIDGenerator.generate16ShortUUID() |