1. 修复多项可能引起空指针崩溃的bug;
2. 新建子任务时默认执行人员从全体人员改为当前用户;
3. 新建子任务时默认执行时间强制固定为总任务对应的时段内,确保子任务执行时间不会超出总任务范围。
已修改21个文件
已删除5个文件
已添加8个文件
已重命名4个文件
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "config": { |
| | | "emas.appKey":"333388958", |
| | | "emas.appSecret":"1836d953e9f2434a9e8a3f94cc8aff93", |
| | | "emas.packageName":"cn.flightfeather.thirdapp", |
| | | "hotfix.idSecret":"333388958-1", |
| | | "hotfix.rsaSecret":"MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCflE9YnKCC9YEgsyn3f0M4IQNGr6qBr8SFDKG/Iu3Bkfx8YwsQu2WqhWzVggQazZY5V1t5spUGQgcKA18m/MQ7Cxyc52+QGnyXT2GkCFxZNLpxAE04uUSBDsh9PvhPkzaYXCxoxWfHokgjk67G7rgVGkSWuiaZrbUdTtlIT/tt45bi9GAhILFuZZ/ztMdh+SKH9jvMRrUZU4S+vUPprgkEN7SiTrOjYiAcM91lZ9cdxj86BpmQ6ljhtbbf8wAs+H8Rr8dGp8NkzhppnlAAQwcsbyTo63WgBBtFIIU/EbxoECr10n5oE3bv+3puc7LtB51WjONTFEJBEiQuu+rVLyNRAgMBAAECggEBAJtmBc641+YvxUteraOCnqbuHw6aymP4EluubWSAUx+JVmKa4I+urdZckBtqvSyMv5mfZEkiitTJP6mUlviUdVM6AucYyR9/a4y9lMv0CFomatjX/lsar4cuKjctNwnmxeeg+u4cLm/NrIpYqn62wTRrnBdbt3M4IYMk4Zr1qFbdG6qr0fLBgC1nKJTzQTis7LPdPnmbS6FfGCxQsa4EA6Qfb+fq3ge99vmPSlDrQbWh5YLPrf2jaVfukH1ib+Sakv/pLh3c6ic5PENWHWfs4jHEdjo8Ng575b2Us/VLsbEkC9JYqb1Q6U9+uKv+l99y0c95vwsvdaSIGnNyxvNXrXECgYEA2hvrrD8/R3/crCGXBpIWoTRuT/iOppWZ+zAmMF1o5jvMN0bSI0rm7mD6tqo8+5B1Odw7yMf4zzOng8L7TZ8h0RSaRxsQ2+R8ZTMIxD0RL5Sdh91mYTCF6yIyP2lXJiAgR7GMoNBUwc4BrT/oh8sDjlA2P9kfmS4hI5+3cfOW1QsCgYEAu01dqLyYBxUHpx/nVd8eefE/KcgozQQCuqAXhpCIAVw/UTxhR4Ge9siQTxVycMCIu6sTrFtyKN3CDDxrmjOPDkgP6Kj0NOcCq+/U57mXLLfFIV/X3xtUEZSh/PMsTYuLVD8zYZqnj1hFufLoJokov7RZgCQrHUG88Jh2jzk9KpMCgYA3XlEkp+Wrg/UEKX7KZzmhcMr0ODgWZ/HwB1gafQwNLm74NV1RIkmfiDT9PBhBEHoB1zvCC6nJB+bllxDuspAGIMHNfTx5ZfaCRkNaddowBv06qWS9FXFZsJOq71X1UsB/Er6NcHWjwWVBkvC30Dy12vz6lmbkHwbAoWITZnAK4wKBgHjPzjmoa+cliWojCfQ5lk7RbQxmLusOSzRVTtddIly+Q5kCeTzGPuKvO2XHT6mqhoeGMYpa8aeqYh/CWSV9XCi6EojfcaUt3GtKpulQrFILtvtv9q3R0sgENvgRYeIiwBv3KA0s1CeBqHfoVhWFIuOEULZ2ndihLl2B+fcn1GxBAoGBAMjCk7WIXV0bxIFA/7e7XnMEFpM8t+ycfWWNig3bP8/Vcc1utyQ3PMIRRf/ksGa0hNEfjUhIqymNB01XvX7nvyBMXNKYKj8EMYtOo2SM78pa8S9B5ZgLrHvE6b2D2T3TXELl18MXSLv7GboDzG8XmFZ5yt8aUEPn3rHfhBQu59MM", |
| | | "httpdns.accountId":"181675", |
| | | "httpdns.secretKey":"08a9a1d5ae2ed3579280e0fff5292f16", |
| | | "appmonitor.tlog.rsaSecret":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+Xc/Yr0Cy2CiVXXdb44kqIFBe0mTjl4dF3xFG427ObC4yL/KFrdTmDiNb6FkYu1lpqICdbWPLIHxPgrTOiadvwWUPtzs/5tZhhnfNPFN/L39q52KKrz6YZ22a8B3FndHXHgg4rcLA3evqEQQqNra0H2H1glVaII16huwGWcdYFwIDAQAB", |
| | | "appmonitor.rsaSecret":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+Xc/Yr0Cy2CiVXXdb44kqIFBe0mTjl4dF3xFG427ObC4yL/KFrdTmDiNb6FkYu1lpqICdbWPLIHxPgrTOiadvwWUPtzs/5tZhhnfNPFN/L39q52KKrz6YZ22a8B3FndHXHgg4rcLA3evqEQQqNra0H2H1glVaII16huwGWcdYFwIDAQAB" |
| | | }, |
| | | "services": { |
| | | "hotfix_service":{ |
| | | "status":1, |
| | | "version":"3.2.17" |
| | | }, |
| | | "ha-adapter_service":{ |
| | | "status":1, |
| | | "version":"1.1.3.8-open" |
| | | }, |
| | | "feedback_service":{ |
| | | "status":1, |
| | | "version":"3.3.2" |
| | | }, |
| | | "tlog_service":{ |
| | | "status":1, |
| | | "version":"1.1.3.1-open" |
| | | }, |
| | | "httpdns_service":{ |
| | | "status":1, |
| | | "version":"2.0.0" |
| | | }, |
| | | "apm_service":{ |
| | | "status":1, |
| | | "version":"1.0.8.2-open" |
| | | }, |
| | | "man_service":{ |
| | | "status":1, |
| | | "version":"1.2.5" |
| | | }, |
| | | "cps_service":{ |
| | | "status":1, |
| | | "version":"3.2.5" |
| | | } |
| | | }, |
| | | "use_maven":true, |
| | | "proguard_keeplist":"\n#httpdns\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n\n#cps\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n-keepclasseswithmembernames class ** {\nnative <methods>;\n}\n-keepattributes Signature\n-keep class sun.misc.Unsafe { *; }\n-keep class com.alipay.** {*;}\n-dontwarn com.alipay.**\n-keep class anet.**{*;}\n-keep class org.android.spdy.**{*;}\n-keep class org.android.agoo.**{*;}\n-dontwarn anet.**\n-dontwarn org.android.spdy.**\n-dontwarn org.android.agoo.**\n\n#hotfix\n#åºçº¿å
使ç¨ï¼çæmapping.txt\n-printmapping mapping.txt\n#çæçmapping.txtå¨app/buidl/outputs/mapping/releaseè·¯å¾ä¸ï¼ç§»å¨å°/appè·¯å¾ä¸\n#ä¿®å¤åç项ç®ä½¿ç¨ï¼ä¿è¯æ··æ·ç»æä¸è´\n#-applymapping mapping.txt\n#hotfix\n-keep class com.taobao.sophix.**{*;}\n-keep class com.ta.utdid2.device.**{*;}\n#鲿¢inline\n-dontoptimize\n\n#man\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n\n#feedback\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n" |
| | | } |
| | |
| | | apply plugin: 'kotlin-android-extensions' // apply plugin |
| | | apply plugin: 'kotlin-kapt' |
| | | apply plugin: 'com.jakewharton.butterknife' |
| | | apply plugin: 'com.aliyun.ams.emas-services' |
| | | |
| | | android { |
| | | compileSdkVersion 28 |
| | |
| | | android:name="android.permission.REQUEST_INSTALL_PACKAGES" |
| | | tools:ignore="ProtectedPermissions" /> |
| | | |
| | | <!-- Android 9 ç³»ç»ä¸é»è®¤ææHttp请æ±è¢«ç¦æ¢ï¼æ·»å android:usesCleartextTraffic="true" ï¼ç¡®ä¿Android 9ä¸å¯ä»¥ç¨tbsæå¼ææ¡£--> |
| | | <application |
| | | android:name=".CommonApplication" |
| | | android:allowBackup="true" |
| | | tools:replace="android:allowBackup" |
| | | android:hardwareAccelerated="true" |
| | | android:icon="@mipmap/ic_launcher" |
| | | android:label="@string/app_name" |
| | | android:networkSecurityConfig="@xml/network_config" |
| | | android:roundIcon="@mipmap/ic_launcher_round" |
| | | android:supportsRtl="true" |
| | | android:usesCleartextTraffic="true" |
| | | android:theme="@style/AppTheme.NoActionBar" |
| | | tools:ignore="GoogleAppIndexingWarning, LockedOrientationActivity" |
| | | tools:targetApi="n"> |
| | |
| | | </intent-filter> |
| | | </receiver> |
| | | |
| | | <receiver |
| | | android:name=".util.push.MyMessageReceiver" |
| | | android:exported="false"> <!-- 为ä¿è¯receiverå®å
¨ï¼å»ºè®®è®¾ç½®ä¸å¯å¯¼åºï¼å¦é对å
¶ä»åºç¨å¼æ¾å¯éè¿androidï¼permissionè¿è¡éå¶ --> |
| | | <intent-filter> |
| | | <action android:name="com.alibaba.push2.action.NOTIFICATION_OPENED" /> |
| | | </intent-filter> |
| | | <intent-filter> |
| | | <action android:name="com.alibaba.push2.action.NOTIFICATION_REMOVED" /> |
| | | </intent-filter> |
| | | <intent-filter> |
| | | <action android:name="com.alibaba.sdk.android.push.RECEIVE" /> |
| | | </intent-filter> |
| | | </receiver> |
| | | |
| | | |
| | | <activity |
| | | android:name=".module.MainActivity" |
| | | android:label="@string/app_name" |
| | |
| | | |
| | | import cn.flightfeather.thirdapp.bean.entity.Userinfo; |
| | | import cn.flightfeather.thirdapp.common.net.RetrofitFactory; |
| | | import cn.flightfeather.thirdapp.util.GlobalConfig; |
| | | import cn.flightfeather.thirdapp.util.crashreport.MyCrashHandler; |
| | | import cn.flightfeather.thirdapp.util.notification.MyNotificationChannel; |
| | | import cn.flightfeather.thirdapp.util.push.PushService; |
| | | import cn.flightfeather.thirdapp.util.tbs.Tbs; |
| | | import retrofit2.Retrofit; |
| | | import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; |
| | |
| | | |
| | | //x5å
æ ¸åå§å |
| | | Tbs.Companion.init(this); |
| | | |
| | | //Android8.0åæ³¨åéç¥éé |
| | | MyNotificationChannel.Companion.init(this); |
| | | |
| | | //åå§åç§»å¨æ¨é |
| | | PushService.Companion.init(this); |
| | | |
| | | if (instance == null) { |
| | | instance = this; |
| | |
| | | public Userinfo getCurrentUser() { |
| | | if (currentUser ==null){ |
| | | userinfoDao = this.getDaoSession().getUserinfoDao(); |
| | | currentUser = userinfoDao.queryBuilder().unique(); |
| | | String userId = GlobalConfig.Companion.getInstance().getUserId(); |
| | | if (userId == null) { |
| | | currentUser = userinfoDao.queryBuilder().unique(); |
| | | } else { |
| | | currentUser = userinfoDao.queryBuilder().where(UserinfoDao.Properties.Guid.eq(userId)).unique(); |
| | | } |
| | | } |
| | | return currentUser; |
| | | } |
| | | |
| | | public void setCurrentUser(Userinfo currentUser) { |
| | | GlobalConfig.Companion.getInstance().setUserId(currentUser.getGuid()); |
| | | this.currentUser = currentUser; |
| | | } |
| | | |
| | |
| | | import cn.flightfeather.thirdapp.R; |
| | | import cn.flightfeather.thirdapp.adapter.ContentFragmentAdapter; |
| | | import cn.flightfeather.thirdapp.CommonApplication; |
| | | import cn.flightfeather.thirdapp.fragment.CardFragment; |
| | | import cn.flightfeather.thirdapp.module.login.CardFragment; |
| | | import cn.flightfeather.thirdapp.util.updateApp.UpdateAppUtil; |
| | | import cn.flightfeather.thirdapp.view.OrientedViewPager; |
| | | import cn.flightfeather.thirdapp.view.VerticalStackTransformer; |
| | |
| | | import cn.flightfeather.thirdapp.bean.entity.Scense; |
| | | import cn.flightfeather.thirdapp.bean.entity.Subtask; |
| | | import cn.flightfeather.thirdapp.bean.entity.Town; |
| | | import cn.flightfeather.thirdapp.module.MainActivity; |
| | | import cn.flightfeather.thirdapp.task.ObtainBoundaryRunnable; |
| | | import cn.flightfeather.thirdapp.util.Area; |
| | | import cn.flightfeather.thirdapp.util.CommonUtils; |
| | |
| | | } |
| | | break; |
| | | case R.id.iBtn_data: |
| | | Intent detailIntent = new Intent(this, TaskDetailActivity.class); |
| | | detailIntent.putExtra(Constant.KEY_INTENT_SUBTASK, mSubTaskList.get(curPos)); |
| | | startActivity(detailIntent); |
| | | // Intent detailIntent = new Intent(this, TaskDetailActivity.class); |
| | | // detailIntent.putExtra(Constant.KEY_INTENT_SUBTASK, mSubTaskList.get(curPos)); |
| | | // startActivity(detailIntent); |
| | | break; |
| | | case R.id.iBtn_inspection: |
| | | Intent inspectionIntent = new Intent(this, MainActivity.class); |
| | | inspectionIntent.putExtra(Constant.KEY_INTENT_SUBTASK, mSubTaskList.get(curPos)); |
| | | setResult(RESULT_OK, inspectionIntent); |
| | | this.finish(); |
| | | // Intent inspectionIntent = new Intent(this, MainActivity.class); |
| | | // inspectionIntent.putExtra(Constant.KEY_INTENT_SUBTASK, mSubTaskList.get(curPos)); |
| | | // setResult(RESULT_OK, inspectionIntent); |
| | | // this.finish(); |
| | | break; |
| | | } |
| | | } |
| | |
| | | mediaFileListCurrent.removeAll(mediaFileListCurrent); |
| | | mediaFileListCurrent.addAll(mediaFileList2); |
| | | photoTotal = mediaFileListCurrent.size(); |
| | | photoUploaded = 0; |
| | | adapter.notifyDataSetChanged(); |
| | | } |
| | | } |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import cn.flightfeather.thirdapp.fragment.CardFragment; |
| | | import cn.flightfeather.thirdapp.module.login.CardFragment; |
| | | |
| | | |
| | | public class ContentFragmentAdapter extends FragmentStatePagerAdapter { |
| | |
| | | import cn.flightfeather.thirdapp.bean.entity.Userinfo; |
| | | import cn.flightfeather.thirdapp.httpservice.SettingsService; |
| | | import cn.flightfeather.thirdapp.util.GlobalConfig; |
| | | import cn.flightfeather.thirdapp.util.push.LoginInitializer; |
| | | import cn.flightfeather.thirdapp.view.SettingCommItemView; |
| | | import okhttp3.ResponseBody; |
| | | import retrofit2.Call; |
| | |
| | | tv_userName = (TextView) view.findViewById(R.id.tv_user_name); |
| | | tv_userName.setText(application.getCurrentUser().getRealname()); |
| | | text_version = view.findViewById(R.id.text_version); |
| | | text_version.setText(GlobalConfig.getInstance().getVersionName()); |
| | | text_version.setText(GlobalConfig.Companion.getInstance().getVersionName()); |
| | | sc_changePassword = (SettingCommItemView) view.findViewById(R.id.sc_edit_password); |
| | | sc_logOut = (SettingCommItemView) view.findViewById(R.id.sc_logout); |
| | | |
| | |
| | | dialog.setPositiveButton("ç¡®å®", new DialogInterface.OnClickListener() { |
| | | @Override |
| | | public void onClick(DialogInterface dialogInterface, int i) { |
| | | LoginInitializer.INSTANCE.onLoginStatusCheck(getContext(), false, application.getCurrentUser().getAcountname()); |
| | | |
| | | Intent intent = new Intent(getActivity(), LoginActivity.class); |
| | | startActivity(intent); |
| | | getActivity().finish(); |
| | |
| | | builder.setPositiveButton("ç¡®å®", new DialogInterface.OnClickListener() { |
| | | @Override |
| | | public void onClick(DialogInterface dialog, int which) { |
| | | if (list.isEmpty()) { |
| | | return; |
| | | } |
| | | showCheckTaskInfoDialog(list.get(mTopClassTaskChoice)); |
| | | } |
| | | }); |
| | |
| | | import cn.flightfeather.thirdapp.R; |
| | | import cn.flightfeather.thirdapp.bean.entity.Subtask; |
| | | import cn.flightfeather.thirdapp.bean.vo.ProblemlistVo; |
| | | import cn.flightfeather.thirdapp.business.widgettype2.HomeFragment_comptent; |
| | | import cn.flightfeather.thirdapp.business.widgettype3.HomeFragment_scene; |
| | | import cn.flightfeather.thirdapp.module.home.HomeFragment_comptent; |
| | | import cn.flightfeather.thirdapp.module.home.HomeFragment_scene; |
| | | import cn.flightfeather.thirdapp.dataanalysis.AnalysisOverViewFragment; |
| | | import cn.flightfeather.thirdapp.fragment.HomeFragment; |
| | | import cn.flightfeather.thirdapp.module.home.HomeFragment; |
| | | import cn.flightfeather.thirdapp.fragment.SettingFragment; |
| | | import cn.flightfeather.thirdapp.fragment.TaskFragment; |
| | | import cn.flightfeather.thirdapp.module.inspection.InspectionFragment; |
| | |
| | | |
| | | if (needMerge) { |
| | | for (i in myLatLngList.indices) { |
| | | if (i >= myLatLngList.size) { |
| | | return@create |
| | | } |
| | | val p1 = myLatLngList[i] |
| | | |
| | | for (y in i + 1 until myLatLngList.size) { |
| ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdapp/fragment/HomeFragment.java ÐÞ¸Ä |
| | |
| | | package cn.flightfeather.thirdapp.fragment; |
| | | package cn.flightfeather.thirdapp.module.home; |
| | | |
| | | |
| | | import android.content.Context; |
| ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdapp/business/widgettype2/HomeFragment_comptent.java ÐÞ¸Ä |
| | |
| | | package cn.flightfeather.thirdapp.business.widgettype2; |
| | | package cn.flightfeather.thirdapp.module.home; |
| | | |
| | | |
| | | import android.content.Context; |
| ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdapp/business/widgettype3/HomeFragment_scene.java ÐÞ¸Ä |
| | |
| | | package cn.flightfeather.thirdapp.business.widgettype3; |
| | | package cn.flightfeather.thirdapp.module.home; |
| | | |
| | | |
| | | import android.arch.lifecycle.ViewModelProviders; |
| | |
| | | adapter = ProblemListAdapter(this@BaseProblemListActivity, viewModel.problemList.value, viewHolderType) |
| | | addOnItemTouchListener(RecyclerItemClickListener(this@BaseProblemListActivity, this, object : RecyclerItemClickListener.OnItemClickListener { |
| | | override fun onItemClick(view: View?, position: Int) { |
| | | val size = viewModel.problemList.value?.size ?: 0 |
| | | if (position >= size) { |
| | | return |
| | | } |
| | | val intent = Intent(this@BaseProblemListActivity, ProblemDetailActivity::class.java) |
| | | intent.putExtra("problemlistVo", viewModel.problemList.value?.get(position)) |
| | | intent.putExtra("subTaskSelected", subTaskSelected) |
| | |
| | | |
| | | //æ·»å ç¨æ·ç±»å为â主管é¨é¨âæâ管çåâï¼ç¼å·ä¸º2æ0æ¶ï¼æé®iv_startEndTask没æç¹å»äºä»¶ |
| | | if (viewModel.userTypeId != Domain.USER_COMPTENT.toByte() |
| | | && viewModel.userTypeId != Domain.USER_ADMIN.toByte()) { |
| | | // && viewModel.userTypeId != Domain.USER_ADMIN.toByte() |
| | | ) { |
| | | iv_start_end_task.setOnClickListener(this) |
| | | } else { |
| | | iv_start_end_task.alpha = 0.5f |
| | |
| | | public static final int REQUEST_CODE_SUBMIT = 11; |
| | | |
| | | private CommonApplication application; |
| | | private ArrayList<ProblemlistVo> problemlistVos; |
| | | private ArrayList<ProblemlistVo> problemlistVos = new ArrayList<>(); |
| | | private String fragmentType; |
| | | private MediafileDao mediafileDao; |
| | | private Unbinder unbinder; |
| ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdapp/fragment/CardFragment.java ÐÞ¸Ä |
| | |
| | | package cn.flightfeather.thirdapp.fragment; |
| | | package cn.flightfeather.thirdapp.module.login; |
| | | |
| | | |
| | | import android.content.Context; |
| | |
| | | import cn.flightfeather.thirdapp.activity.LoginActivity; |
| | | import cn.flightfeather.thirdapp.bean.entity.Userinfo; |
| | | import cn.flightfeather.thirdapp.module.MainActivity; |
| | | import cn.flightfeather.thirdapp.util.push.LoginInitializer; |
| | | import retrofit2.Call; |
| | | import retrofit2.Callback; |
| | | import retrofit2.Response; |
| | |
| | | application.setCurrentUser(user); |
| | | useinfoDao.deleteAll(); |
| | | useinfoDao.insert(user); |
| | | LoginInitializer.INSTANCE.onLoginStatusCheck(getContext(), true, accountName); |
| | | Toast.makeText(application, "ç»å½æå", Toast.LENGTH_SHORT).show(); |
| | | startActivity(new Intent(getActivity(), MainActivity.class)); |
| | | getActivity().finish(); |
| | |
| | | import android.view.View |
| | | import android.view.animation.AnimationUtils |
| | | import android.widget.* |
| | | import cn.flightfeather.thirdapp.CommonApplication |
| | | import cn.flightfeather.thirdapp.R |
| | | import cn.flightfeather.thirdapp.adapter.AllRecyclerViewAdapter |
| | | import cn.flightfeather.thirdapp.bean.entity.Scense |
| | |
| | | val tvExecDate = findViewById<TextView>(R.id.tv_exec_date).apply { |
| | | text = DateFormatter.dateFormat.format(viewModel.todayTask.starttime) |
| | | } |
| | | |
| | | // fixme: 2021/5/31 åå§ä»»å¡æ§è¡è
é»è®¤ä¸ºå½åç¨æ· |
| | | val ids = viewModel.selectedTopTask?.executorguids?.split(Constant.CONNECTOR) |
| | | val userNames = viewModel.selectedTopTask?.executorusernames?.split(Constant.CONNECTOR) |
| | | val realNames = viewModel.selectedTopTask?.executorrealnames?.split(Constant.CONNECTOR) |
| | | var size = ids?.size |
| | | size = when { |
| | | userNames?.size!! > size ?: 0 -> userNames.size |
| | | realNames?.size!! > size ?: 0 -> realNames.size |
| | | else -> size |
| | | } |
| | | val mCheckedArray = BooleanArray(size ?: 0) |
| | | |
| | | val id = StringBuilder() |
| | | val userName = StringBuilder() |
| | | val realName = StringBuilder() |
| | | for (i in ids?.indices ?: 0..0) { |
| | | if (CommonApplication.getInstance().currentUser.guid == ids?.get(i)) { |
| | | mCheckedArray[i] = true |
| | | if (id.isNotEmpty()) { |
| | | id.append(Constant.CONNECTOR) |
| | | userName.append(Constant.CONNECTOR) |
| | | realName.append(Constant.CONNECTOR) |
| | | } |
| | | id.append(ids?.get(i)) |
| | | userName.append(userNames?.get(i)) |
| | | realName.append(realNames?.get(i)) |
| | | } else { |
| | | mCheckedArray[i] = false |
| | | } |
| | | } |
| | | |
| | | val tvTaskExecutors = findViewById<TextView>(R.id.tv_task_executors).apply { |
| | | text = viewModel.selectedTopTask?.executorrealnames?.replace(Constant.CONNECTOR, Constant.CONNECTOR_FOR_VIEW) |
| | | text = realName.toString().replace(Constant.CONNECTOR, Constant.CONNECTOR_FOR_VIEW) |
| | | } |
| | | viewModel.subTaskExecutor.apply { |
| | | this.executorGuids = viewModel.selectedTopTask?.executorguids |
| | | this.executorUserNames = viewModel.selectedTopTask?.executorusernames |
| | | this.executorRealNames = viewModel.selectedTopTask?.executorrealnames |
| | | this.executorGuids = ids.toString() |
| | | this.executorUserNames = userName.toString() |
| | | this.executorRealNames = realName.toString() |
| | | } |
| | | findViewById<LinearLayout>(R.id.ll_exec_date).setOnClickListener{ |
| | | showDatePickerDialog(tvExecDate) |
| | | } |
| | | findViewById<LinearLayout>(R.id.ll_task_executors).setOnClickListener{ |
| | | showExecutorsDialog(tvTaskExecutors) |
| | | showExecutorsDialog(tvTaskExecutors, mCheckedArray) |
| | | } |
| | | } |
| | | |
| | |
| | | /** |
| | | * æ¾ç¤ºä»»å¡æ§è¡è
å¤éå¯¹è¯æ¡ |
| | | */ |
| | | private fun showExecutorsDialog(t: TextView) { |
| | | private fun showExecutorsDialog(t: TextView, mCheckedArray: BooleanArray) { |
| | | // 设置é»è®¤éä¸çé项ï¼å
¨ä¸ºfalseé»è®¤åæªéä¸ |
| | | val executorGuids = viewModel.selectedTopTask?.executorguids?.split(Constant.CONNECTOR) |
| | | val executorUNames = viewModel.selectedTopTask?.executorusernames?.split(Constant.CONNECTOR)?.toTypedArray() |
| | | val executorRNames = viewModel.selectedTopTask?.executorrealnames?.split(Constant.CONNECTOR)?.toTypedArray() |
| | | |
| | | var size = executorGuids?.size |
| | | size = when { |
| | | executorUNames?.size!! > size ?: 0 -> executorUNames.size |
| | | executorRNames?.size!! > size ?: 0 -> executorRNames.size |
| | | else -> size |
| | | } |
| | | val mCheckedArray = BooleanArray(size ?: 0) |
| | | for (i in mCheckedArray.indices) { |
| | | mCheckedArray[i] = true |
| | | } |
| | | |
| | | val multiChoiceDialog = AlertDialog.Builder(this) |
| | | multiChoiceDialog.setTitle("鿩任塿§è¡è
") |
| | |
| | | tguid = UUIDGenerator.generate16ShortUUID() |
| | | tsguid = selectedTopTask?.tguid |
| | | levelnum = null |
| | | |
| | | val cal = Calendar.getInstance() |
| | | cal.time = Date() |
| | | cal.set(Calendar.HOUR_OF_DAY, 0) |
| | | cal.set(Calendar.MINUTE, 0) |
| | | cal.set(Calendar.SECOND, 0) |
| | | starttime = cal.time |
| | | cal.set(Calendar.HOUR_OF_DAY, 23) |
| | | cal.set(Calendar.MINUTE, 59) |
| | | cal.set(Calendar.SECOND, 59) |
| | | endtime = cal.time |
| | | // 夿å½åæ¶é´ä¸æ»ä»»å¡çæ¶é´æ®µå
³ç³»ï¼ä¸å¨æ»ä»»å¡æ¶é´èå´å
æ¶ï¼ä½¿ç¨æ»ä»»å¡å¼å§æ¶é´ä¸ºé»è®¤æ¶é´ï¼å¦åç¨å½åæ¶é´ä¸ºé»è®¤æ¶é´ |
| | | if (cal.time < starttime || cal.time > endtime) { |
| | | cal.time = starttime |
| | | cal.set(Calendar.HOUR_OF_DAY, 23) |
| | | cal.set(Calendar.MINUTE, 59) |
| | | cal.set(Calendar.SECOND, 59) |
| | | endtime = cal.time |
| | | } else { |
| | | cal.set(Calendar.HOUR_OF_DAY, 0) |
| | | cal.set(Calendar.MINUTE, 0) |
| | | cal.set(Calendar.SECOND, 0) |
| | | starttime = cal.time |
| | | cal.set(Calendar.HOUR_OF_DAY, 23) |
| | | cal.set(Calendar.MINUTE, 59) |
| | | cal.set(Calendar.SECOND, 59) |
| | | endtime = cal.time |
| | | } |
| | | |
| | | plannerguid = application.currentUser.guid |
| | | plannerusername = application.currentUser.acountname |
| | | plannerrealname = application.currentUser.realname |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.thirdapp.util |
| | | |
| | | class GlobalConfig private constructor() { |
| | | var versionCode = 0 |
| | | |
| | | var versionName: String? = null |
| | | |
| | | var userId: String by MyPreference("userId", "default_customer") |
| | | |
| | | companion object { |
| | | @get:Synchronized |
| | | var instance: GlobalConfig? = null |
| | | get() { |
| | | if (field == null) { |
| | | field = GlobalConfig() |
| | | } |
| | | return field |
| | | } |
| | | private set |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.thirdapp.util |
| | | |
| | | import android.content.Context |
| | | import android.content.SharedPreferences |
| | | import cn.flightfeather.thirdapp.CommonApplication |
| | | import kotlin.reflect.KProperty |
| | | |
| | | /** |
| | | * SharedPreference对象 |
| | | * @author riku |
| | | * Date: 2019/4/9 |
| | | */ |
| | | class MyPreference<T>(private val keyName: String, private val default: T) { |
| | | |
| | | private val prefs:SharedPreferences by lazy { CommonApplication.getInstance().getSharedPreferences("preference", Context.MODE_PRIVATE)} |
| | | |
| | | operator fun getValue(thisRef: Any?, property: KProperty<*>): T { |
| | | return findSharedPreferences(keyName, default) |
| | | } |
| | | |
| | | operator fun setValue(thisRef: Any?, property: KProperty<*>, value: T) { |
| | | putSharedPreferences(keyName, value) |
| | | } |
| | | |
| | | fun get(): T { |
| | | return findSharedPreferences(keyName, default) |
| | | } |
| | | |
| | | fun set(value: T) { |
| | | putSharedPreferences(keyName, value) |
| | | } |
| | | |
| | | @Suppress("UNCHECKED_CAST") |
| | | private fun findSharedPreferences(name: String, default: T): T = with(prefs) { |
| | | val res: Any = when (default) { |
| | | is Long -> getLong(name, default) |
| | | is String -> getString(name, default) |
| | | is Int -> getInt(name, default) |
| | | is Boolean -> getBoolean(name, default) |
| | | is Float -> getFloat(name, default) |
| | | else -> throw IllegalArgumentException("Type Error, cannot be got!") |
| | | } |
| | | |
| | | return res as T |
| | | } |
| | | |
| | | private fun putSharedPreferences(name: String, value: T) = with(prefs.edit()) { |
| | | when (value) { |
| | | is Long -> putLong(name, value) |
| | | is String -> putString(name, value) |
| | | is Int -> putInt(name, value) |
| | | is Boolean -> putBoolean(name, value) |
| | | is Float -> putFloat(name, value) |
| | | else->throw IllegalArgumentException("Type Error, cannot be saved!") |
| | | }.apply() |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.thirdapp.util.notification |
| | | |
| | | import android.app.NotificationChannel |
| | | import android.app.NotificationManager |
| | | import android.content.Context |
| | | import android.content.Context.NOTIFICATION_SERVICE |
| | | import android.graphics.Color |
| | | import android.os.Build |
| | | |
| | | |
| | | /** |
| | | * Android 8.0 åéè¦æ³¨åNotificationChannelæå¯ä»¥æ¥æ¶éç¥ |
| | | * @author riku |
| | | * Date: 2019/12/26 |
| | | */ |
| | | class MyNotificationChannel { |
| | | companion object { |
| | | fun init(applicationContext: Context) { |
| | | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
| | | val mNotificationManager = applicationContext.getSystemService(NOTIFICATION_SERVICE) as NotificationManager? |
| | | // éç¥æ¸ éçid |
| | | val id = "1" |
| | | // ç¨æ·å¯ä»¥çå°çéç¥æ¸ éçåå. |
| | | val name = "aliCloudPush channel" |
| | | // ç¨æ·å¯ä»¥çå°çéç¥æ¸ éçæè¿° |
| | | val description = "aliCloudPush" |
| | | val importance = NotificationManager.IMPORTANCE_HIGH |
| | | val mChannel = NotificationChannel(id, name, importance) |
| | | // é
ç½®éç¥æ¸ éç屿§ |
| | | mChannel.description = description |
| | | // 设置éç¥åºç°æ¶çéªç¯ï¼å¦æ android è®¾å¤æ¯æçè¯ï¼ |
| | | mChannel.enableLights(true) |
| | | mChannel.lightColor = Color.RED |
| | | // 设置éç¥åºç°æ¶çéå¨ï¼å¦æ android è®¾å¤æ¯æçè¯ï¼ |
| | | mChannel.enableVibration(true) |
| | | mChannel.vibrationPattern = longArrayOf(100, 200, 300, 400, 500, 400, 300, 200, 400) |
| | | //æåå¨notificationmanagerä¸å建该éç¥æ¸ é |
| | | mNotificationManager?.createNotificationChannel(mChannel) |
| | | } |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.thirdapp.util.push |
| | | |
| | | import android.content.Context |
| | | import android.content.SharedPreferences |
| | | /** |
| | | * @author riku |
| | | * Date: 2019/12/26 |
| | | */ |
| | | object LoginInitializer { |
| | | |
| | | /** |
| | | * æ ¹æ®ç»å½ç¶æç»å®æ¨é |
| | | */ |
| | | fun onLoginStatusCheck(context: Context?, isLogin: Boolean, accountName: String) { |
| | | if (context==null) return |
| | | //读åç»å½ç¨æ·ä¿¡æ¯ |
| | | val sharedPre: SharedPreferences = context.getSharedPreferences("config", Context.MODE_PRIVATE) |
| | | val isBindAccount = sharedPre.getBoolean("isBindAccount", false) |
| | | |
| | | if (isLogin) { |
| | | if (!isBindAccount) { |
| | | PushService.bindAccount(accountName) { |
| | | sharedPre.edit().putBoolean("isBindAccount", true).apply() |
| | | } |
| | | } |
| | | } else { |
| | | if (isBindAccount) { |
| | | PushService.unBindAccount { |
| | | sharedPre.edit().putBoolean("isBindAccount", false).apply() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.thirdapp.util.push |
| | | |
| | | import android.content.Context |
| | | import android.util.Log |
| | | |
| | | import com.alibaba.sdk.android.push.AliyunMessageIntentService |
| | | import com.alibaba.sdk.android.push.notification.CPushMessage |
| | | |
| | | /** |
| | | * 为é¿å
æ¨é广æè¢«ç³»ç»æ¦æªçå°æ¦çäºä»¶,æä»¬æ¨èç¨æ·éè¿IntentServiceå¤çæ¶æ¯äºè°,æ¥å
¥æ¥éª¤: |
| | | * 详ç»ç¨æ·å¯åè:https://help.aliyun.com/document_detail/30066.html#h2-2-messagereceiver-aliyunmessageintentservice |
| | | */ |
| | | |
| | | class MyMessageIntentService : AliyunMessageIntentService() { |
| | | |
| | | companion object { |
| | | private const val REC_TAG = "MyMessageIntentService" |
| | | } |
| | | |
| | | /** |
| | | * æ¨ééç¥çåè°æ¹æ³ |
| | | * @param context |
| | | * @param title |
| | | * @param summary |
| | | * @param extraMap |
| | | */ |
| | | override fun onNotification(context: Context, title: String, summary: String, extraMap: Map<String, String>) { |
| | | Log.i(REC_TAG, "æ¶å°ä¸æ¡æ¨ééç¥ ï¼ $title, summary:$summary") |
| | | } |
| | | |
| | | /** |
| | | * æ¨éæ¶æ¯çåè°æ¹æ³ |
| | | * @param context |
| | | * @param cPushMessage |
| | | */ |
| | | override fun onMessage(context: Context, cPushMessage: CPushMessage) { |
| | | Log.i(REC_TAG, "æ¶å°ä¸æ¡æ¨éæ¶æ¯ ï¼ " + cPushMessage.title + ", content:" + cPushMessage.content) |
| | | } |
| | | |
| | | /** |
| | | * ä»éç¥æ æå¼éç¥çæ©å±å¤ç |
| | | * @param context |
| | | * @param title |
| | | * @param summary |
| | | * @param extraMap |
| | | */ |
| | | override fun onNotificationOpened(context: Context, title: String, summary: String, extraMap: String) { |
| | | Log.i(REC_TAG, "onNotificationOpened ï¼ : $title : $summary : $extraMap") |
| | | |
| | | } |
| | | |
| | | /** |
| | | * æ å¨ä½éç¥ç¹å»åè°ãå½å¨åå°æé¿éäºæ§å¶å°æå®çéç¥å¨ä½ä¸ºæ é»è¾è·³è½¬æ¶,éç¥ç¹å»åè°ä¸ºonNotificationClickedWithNoActionè䏿¯onNotificationOpened |
| | | * @param context |
| | | * @param title |
| | | * @param summary |
| | | * @param extraMap |
| | | */ |
| | | override fun onNotificationClickedWithNoAction(context: Context, title: String, summary: String, extraMap: String) { |
| | | Log.i(REC_TAG, "onNotificationClickedWithNoAction ï¼ : $title : $summary : $extraMap") |
| | | } |
| | | |
| | | /** |
| | | * éç¥å é¤åè° |
| | | * @param context |
| | | * @param messageId |
| | | */ |
| | | override fun onNotificationRemoved(context: Context, messageId: String) { |
| | | Log.i(REC_TAG, "onNotificationRemoved ï¼ $messageId") |
| | | } |
| | | |
| | | /** |
| | | * åºç¨å¤äºåå°æ¶éç¥å°è¾¾åè°ã注æ:è¯¥æ¹æ³ä»
对èªå®ä¹æ ·å¼éç¥ææ,ç¸å
³è¯¦æ
请åèhttps://help.aliyun.com/document_detail/30066.html#h3-3-4-basiccustompushnotification-api |
| | | * @param context |
| | | * @param title |
| | | * @param summary |
| | | * @param extraMap |
| | | * @param openType |
| | | * @param openActivity |
| | | * @param openUrl |
| | | */ |
| | | override fun onNotificationReceivedInApp( |
| | | context: Context, |
| | | title: String, |
| | | summary: String, |
| | | extraMap: Map<String, String>, |
| | | openType: Int, |
| | | openActivity: String, |
| | | openUrl: String |
| | | ) { |
| | | Log.i( |
| | | REC_TAG, |
| | | "onNotificationReceivedInApp ï¼ : $title : $summary $extraMap : $openType : $openActivity : $openUrl" |
| | | ) |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.thirdapp.util.push |
| | | |
| | | import android.content.Context |
| | | import android.util.Log |
| | | import com.alibaba.sdk.android.push.MessageReceiver |
| | | import com.alibaba.sdk.android.push.notification.CPushMessage |
| | | |
| | | /** |
| | | * é¿éäºæ¨éæ¶æ¯æ¥æ¶ |
| | | * @author riku |
| | | * Date: 2019/12/26 |
| | | */ |
| | | class MyMessageReceiver : MessageReceiver() { |
| | | companion object { |
| | | // æ¶æ¯æ¥æ¶é¨åçLOG_TAG |
| | | const val REC_TAG = "MyMessageReceiver" |
| | | } |
| | | |
| | | override fun onNotification( |
| | | context: Context?, |
| | | title: String?, |
| | | summary: String?, |
| | | extraMap: Map<String, String>? |
| | | ) { |
| | | // TODO å¤çæ¨ééç¥ |
| | | Log.e(REC_TAG, "Receive notification, title: $title, summary: $summary, extraMap: $extraMap") |
| | | } |
| | | |
| | | override fun onMessage(context: Context?, cPushMessage: CPushMessage) { |
| | | Log.e( |
| | | REC_TAG, |
| | | "onMessage, messageId: " + cPushMessage.messageId + ", title: " + cPushMessage.title + ", content:" + cPushMessage.content |
| | | ) |
| | | |
| | | |
| | | } |
| | | |
| | | override fun onNotificationOpened(context: Context?, title: String?, summary: String?, extraMap: String?) { |
| | | Log.e(REC_TAG, "onNotificationOpened, title: $title, summary: $summary, extraMap:$extraMap") |
| | | } |
| | | |
| | | override fun onNotificationClickedWithNoAction( |
| | | context: Context?, |
| | | title: String?, |
| | | summary: String?, |
| | | extraMap: String? |
| | | ) { |
| | | Log.e( |
| | | REC_TAG, |
| | | "onNotificationClickedWithNoAction, title: $title, summary: $summary, extraMap:$extraMap" |
| | | ) |
| | | } |
| | | |
| | | override fun onNotificationReceivedInApp( |
| | | context: Context?, |
| | | title: String?, |
| | | summary: String?, |
| | | extraMap: Map<String, String>?, |
| | | openType: Int, |
| | | openActivity: String?, |
| | | openUrl: String? |
| | | ) { |
| | | Log.e( |
| | | REC_TAG, |
| | | "onNotificationReceivedInApp, title: $title, summary: $summary, extraMap:$extraMap, openType:$openType, openActivity:$openActivity, openUrl:$openUrl" |
| | | ) |
| | | } |
| | | |
| | | override fun onNotificationRemoved(context: Context?, messageId: String?) { |
| | | Log.e(REC_TAG, "onNotificationRemoved") |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.thirdapp.util.push |
| | | |
| | | import android.content.Context |
| | | import android.util.Log |
| | | import com.alibaba.sdk.android.push.CloudPushService |
| | | import com.alibaba.sdk.android.push.CommonCallback |
| | | import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory |
| | | |
| | | /** |
| | | * ç§»å¨æ¨éæå¡é
置类 |
| | | * @author riku |
| | | * Date: 2019/12/26 |
| | | */ |
| | | class PushService { |
| | | companion object { |
| | | const val TAG = "PushService" |
| | | |
| | | private var mPushService: CloudPushService? = null |
| | | |
| | | /** |
| | | * åå§åäºæ¨ééé |
| | | * @param applicationContext |
| | | */ |
| | | fun init(applicationContext: Context) { |
| | | PushServiceFactory.init(applicationContext) |
| | | mPushService = PushServiceFactory.getCloudPushService() |
| | | mPushService?.register(applicationContext, object : CommonCallback { |
| | | override fun onSuccess(response: String) { |
| | | Log.d(TAG, "init cloudChannel success") |
| | | Log.d(TAG, response) |
| | | } |
| | | |
| | | override fun onFailed(errorCode: String, errorMessage: String) { |
| | | Log.d(TAG, "init cloudChannel failed -- errorCode:$errorCode -- errorMessage:$errorMessage") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | fun bindAccount(account: String, s: () -> Unit) { |
| | | mPushService?.bindAccount(account, object : CommonCallback { |
| | | override fun onSuccess(p0: String?) { |
| | | Log.d(TAG, "bind account $account success") |
| | | s() |
| | | } |
| | | |
| | | override fun onFailed(p0: String?, p1: String?) { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | fun unBindAccount(s: () -> Unit) { |
| | | mPushService?.unbindAccount(object : CommonCallback { |
| | | override fun onSuccess(p0: String?) { |
| | | Log.d(TAG, "unbind account success") |
| | | s() |
| | | } |
| | | |
| | | override fun onFailed(p0: String?, p1: String?) { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | .getPackageInfo(application.getPackageName(), 0); |
| | | localVersion = packageInfo.versionCode; |
| | | localVersionName = packageInfo.versionName; |
| | | GlobalConfig.getInstance().setVersionCode(localVersion).setVersionName(localVersionName); |
| | | GlobalConfig.Companion.getInstance().setVersionCode(localVersion); |
| | | GlobalConfig.Companion.getInstance().setVersionName(localVersionName); |
| | | } catch (PackageManager.NameNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | InspectionDao.createTable(db, ifNotExists); |
| | | ItemevaluationDao.createTable(db, ifNotExists); |
| | | MediafileDao.createTable(db, ifNotExists); |
| | | MediaFileCacheDao.createTable(db, ifNotExists); |
| | | MediaTypeAliasDao.createTable(db, ifNotExists); |
| | | MonitorobjectversionDao.createTable(db, ifNotExists); |
| | | ProblemlistDao.createTable(db, ifNotExists); |
| | |
| | | TaskvertionDao.createTable(db, ifNotExists); |
| | | TownDao.createTable(db, ifNotExists); |
| | | UserinfoDao.createTable(db, ifNotExists); |
| | | MediaFileCacheDao.createTable(db, ifNotExists); |
| | | } |
| | | |
| | | /** Drops underlying database table using DAOs. */ |
| | |
| | | InspectionDao.dropTable(db, ifExists); |
| | | ItemevaluationDao.dropTable(db, ifExists); |
| | | MediafileDao.dropTable(db, ifExists); |
| | | MediaFileCacheDao.dropTable(db, ifExists); |
| | | MediaTypeAliasDao.dropTable(db, ifExists); |
| | | MonitorobjectversionDao.dropTable(db, ifExists); |
| | | ProblemlistDao.dropTable(db, ifExists); |
| | |
| | | TaskvertionDao.dropTable(db, ifExists); |
| | | TownDao.dropTable(db, ifExists); |
| | | UserinfoDao.dropTable(db, ifExists); |
| | | MediaFileCacheDao.dropTable(db, ifExists); |
| | | } |
| | | |
| | | /** |
| | |
| | | registerDaoClass(InspectionDao.class); |
| | | registerDaoClass(ItemevaluationDao.class); |
| | | registerDaoClass(MediafileDao.class); |
| | | registerDaoClass(MediaFileCacheDao.class); |
| | | registerDaoClass(MediaTypeAliasDao.class); |
| | | registerDaoClass(MonitorobjectversionDao.class); |
| | | registerDaoClass(ProblemlistDao.class); |
| | |
| | | registerDaoClass(TaskvertionDao.class); |
| | | registerDaoClass(TownDao.class); |
| | | registerDaoClass(UserinfoDao.class); |
| | | registerDaoClass(MediaFileCacheDao.class); |
| | | } |
| | | |
| | | public DaoSession newSession() { |
| | |
| | | import cn.flightfeather.thirdapp.bean.entity.Inspection; |
| | | import cn.flightfeather.thirdapp.bean.entity.Itemevaluation; |
| | | import cn.flightfeather.thirdapp.bean.entity.Mediafile; |
| | | import cn.flightfeather.thirdapp.bean.entity.MediaFileCache; |
| | | import cn.flightfeather.thirdapp.bean.entity.MediaTypeAlias; |
| | | import cn.flightfeather.thirdapp.bean.entity.Monitorobjectversion; |
| | | import cn.flightfeather.thirdapp.bean.entity.Problemlist; |
| | |
| | | import cn.flightfeather.thirdapp.bean.entity.Taskvertion; |
| | | import cn.flightfeather.thirdapp.bean.entity.Town; |
| | | import cn.flightfeather.thirdapp.bean.entity.Userinfo; |
| | | import cn.flightfeather.thirdapp.bean.entity.MediaFileCache; |
| | | |
| | | import com.ping.greendao.gen.ChangeAdviceDao; |
| | | import com.ping.greendao.gen.ChangeEffectDao; |
| | |
| | | import com.ping.greendao.gen.InspectionDao; |
| | | import com.ping.greendao.gen.ItemevaluationDao; |
| | | import com.ping.greendao.gen.MediafileDao; |
| | | import com.ping.greendao.gen.MediaFileCacheDao; |
| | | import com.ping.greendao.gen.MediaTypeAliasDao; |
| | | import com.ping.greendao.gen.MonitorobjectversionDao; |
| | | import com.ping.greendao.gen.ProblemlistDao; |
| | |
| | | import com.ping.greendao.gen.TaskvertionDao; |
| | | import com.ping.greendao.gen.TownDao; |
| | | import com.ping.greendao.gen.UserinfoDao; |
| | | import com.ping.greendao.gen.MediaFileCacheDao; |
| | | |
| | | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. |
| | | |
| | |
| | | private final DaoConfig inspectionDaoConfig; |
| | | private final DaoConfig itemevaluationDaoConfig; |
| | | private final DaoConfig mediafileDaoConfig; |
| | | private final DaoConfig mediaFileCacheDaoConfig; |
| | | private final DaoConfig mediaTypeAliasDaoConfig; |
| | | private final DaoConfig monitorobjectversionDaoConfig; |
| | | private final DaoConfig problemlistDaoConfig; |
| | |
| | | private final DaoConfig taskvertionDaoConfig; |
| | | private final DaoConfig townDaoConfig; |
| | | private final DaoConfig userinfoDaoConfig; |
| | | private final DaoConfig mediaFileCacheDaoConfig; |
| | | |
| | | private final ChangeAdviceDao changeAdviceDao; |
| | | private final ChangeEffectDao changeEffectDao; |
| | |
| | | private final InspectionDao inspectionDao; |
| | | private final ItemevaluationDao itemevaluationDao; |
| | | private final MediafileDao mediafileDao; |
| | | private final MediaFileCacheDao mediaFileCacheDao; |
| | | private final MediaTypeAliasDao mediaTypeAliasDao; |
| | | private final MonitorobjectversionDao monitorobjectversionDao; |
| | | private final ProblemlistDao problemlistDao; |
| | |
| | | private final TaskvertionDao taskvertionDao; |
| | | private final TownDao townDao; |
| | | private final UserinfoDao userinfoDao; |
| | | private final MediaFileCacheDao mediaFileCacheDao; |
| | | |
| | | public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> |
| | | daoConfigMap) { |
| | |
| | | mediafileDaoConfig = daoConfigMap.get(MediafileDao.class).clone(); |
| | | mediafileDaoConfig.initIdentityScope(type); |
| | | |
| | | mediaFileCacheDaoConfig = daoConfigMap.get(MediaFileCacheDao.class).clone(); |
| | | mediaFileCacheDaoConfig.initIdentityScope(type); |
| | | |
| | | mediaTypeAliasDaoConfig = daoConfigMap.get(MediaTypeAliasDao.class).clone(); |
| | | mediaTypeAliasDaoConfig.initIdentityScope(type); |
| | | |
| | |
| | | userinfoDaoConfig = daoConfigMap.get(UserinfoDao.class).clone(); |
| | | userinfoDaoConfig.initIdentityScope(type); |
| | | |
| | | mediaFileCacheDaoConfig = daoConfigMap.get(MediaFileCacheDao.class).clone(); |
| | | mediaFileCacheDaoConfig.initIdentityScope(type); |
| | | |
| | | changeAdviceDao = new ChangeAdviceDao(changeAdviceDaoConfig, this); |
| | | changeEffectDao = new ChangeEffectDao(changeEffectDaoConfig, this); |
| | | cityDao = new CityDao(cityDaoConfig, this); |
| | |
| | | inspectionDao = new InspectionDao(inspectionDaoConfig, this); |
| | | itemevaluationDao = new ItemevaluationDao(itemevaluationDaoConfig, this); |
| | | mediafileDao = new MediafileDao(mediafileDaoConfig, this); |
| | | mediaFileCacheDao = new MediaFileCacheDao(mediaFileCacheDaoConfig, this); |
| | | mediaTypeAliasDao = new MediaTypeAliasDao(mediaTypeAliasDaoConfig, this); |
| | | monitorobjectversionDao = new MonitorobjectversionDao(monitorobjectversionDaoConfig, this); |
| | | problemlistDao = new ProblemlistDao(problemlistDaoConfig, this); |
| | |
| | | taskvertionDao = new TaskvertionDao(taskvertionDaoConfig, this); |
| | | townDao = new TownDao(townDaoConfig, this); |
| | | userinfoDao = new UserinfoDao(userinfoDaoConfig, this); |
| | | mediaFileCacheDao = new MediaFileCacheDao(mediaFileCacheDaoConfig, this); |
| | | |
| | | registerDao(ChangeAdvice.class, changeAdviceDao); |
| | | registerDao(ChangeEffect.class, changeEffectDao); |
| | |
| | | registerDao(Inspection.class, inspectionDao); |
| | | registerDao(Itemevaluation.class, itemevaluationDao); |
| | | registerDao(Mediafile.class, mediafileDao); |
| | | registerDao(MediaFileCache.class, mediaFileCacheDao); |
| | | registerDao(MediaTypeAlias.class, mediaTypeAliasDao); |
| | | registerDao(Monitorobjectversion.class, monitorobjectversionDao); |
| | | registerDao(Problemlist.class, problemlistDao); |
| | |
| | | registerDao(Taskvertion.class, taskvertionDao); |
| | | registerDao(Town.class, townDao); |
| | | registerDao(Userinfo.class, userinfoDao); |
| | | registerDao(MediaFileCache.class, mediaFileCacheDao); |
| | | } |
| | | |
| | | public void clear() { |
| | |
| | | inspectionDaoConfig.clearIdentityScope(); |
| | | itemevaluationDaoConfig.clearIdentityScope(); |
| | | mediafileDaoConfig.clearIdentityScope(); |
| | | mediaFileCacheDaoConfig.clearIdentityScope(); |
| | | mediaTypeAliasDaoConfig.clearIdentityScope(); |
| | | monitorobjectversionDaoConfig.clearIdentityScope(); |
| | | problemlistDaoConfig.clearIdentityScope(); |
| | |
| | | taskvertionDaoConfig.clearIdentityScope(); |
| | | townDaoConfig.clearIdentityScope(); |
| | | userinfoDaoConfig.clearIdentityScope(); |
| | | mediaFileCacheDaoConfig.clearIdentityScope(); |
| | | } |
| | | |
| | | public ChangeAdviceDao getChangeAdviceDao() { |
| | |
| | | return mediafileDao; |
| | | } |
| | | |
| | | public MediaFileCacheDao getMediaFileCacheDao() { |
| | | return mediaFileCacheDao; |
| | | } |
| | | |
| | | public MediaTypeAliasDao getMediaTypeAliasDao() { |
| | | return mediaTypeAliasDao; |
| | | } |
| | |
| | | |
| | | public UserinfoDao getUserinfoDao() { |
| | | return userinfoDao; |
| | | } |
| | | |
| | | public MediaFileCacheDao getMediaFileCacheDao() { |
| | | return mediaFileCacheDao; |
| | | } |
| | | |
| | | } |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical" |
| | | tools:context="cn.flightfeather.thirdapp.fragment.HomeFragment"> |
| | | tools:context="cn.flightfeather.thirdapp.module.home.HomeFragment"> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_weather_bg" |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical" |
| | | tools:context="cn.flightfeather.thirdapp.fragment.HomeFragment" |
| | | tools:context="cn.flightfeather.thirdapp.module.home.HomeFragment" |
| | | android:background="@drawable/shape_bg_gradient"> |
| | | |
| | | <include android:id="@+id/topPanel_" layout="@layout/tab_panel_scenetype" android:visibility="gone"/> |