1. 修复多项可能引起空指针崩溃的bug;
2. 新建子任务时默认执行人员从全体人员改为当前用户;
3. 新建子任务时默认执行时间强制固定为总任务对应的时段内,确保子任务执行时间不会超出总任务范围。
已修改21个文件
已删除5个文件
已添加8个文件
已重命名4个文件
834 ■■■■■ 文件已修改
app/aliyun-emas-services.json 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/build.gradle 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/AndroidManifest.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/CommonApplication.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/activity/LoginActivity.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/activity/ScenseMapActivity.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/activity/UploadMediaFilesActivity.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/adapter/ContentFragmentAdapter.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/common/StatusBar.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/common/database/DbLink.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/common/database/DbSource.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/common/database/GreenDaoDb.java 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/fragment/SettingFragment.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/fragment/TaskFragment.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/module/MainActivity.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/module/base/BaseMapActivity.kt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/module/home/HomeFragment.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/module/home/HomeFragment_comptent.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/module/home/HomeFragment_scene.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/BaseProblemListActivity.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/module/inspectioninfo/ProblemChangeFragment.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/module/login/CardFragment.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/module/task/NewSubTaskActivity.kt 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/module/task/NewSubTaskViewModel.kt 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/util/GlobalConfig.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/util/GlobalConfig.kt 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/util/MyPreference.kt 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/util/notification/MyNotificationChannel.kt 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/util/push/LoginInitializer.kt 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/util/push/MyMessageIntentService.kt 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/util/push/MyMessageReceiver.kt 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/util/push/PushService.kt 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdapp/util/updateApp/UpdateAppUtil.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/ping/greendao/gen/DaoMaster.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/ping/greendao/gen/DaoSession.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/fragment_home.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/fragment_home_competent.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/aliyun-emas-services.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
{
  "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"
}
app/build.gradle
@@ -4,6 +4,7 @@
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
app/src/main/AndroidManifest.xml
@@ -33,15 +33,18 @@
        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">
@@ -70,6 +73,21 @@
            </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"
app/src/main/java/cn/flightfeather/thirdapp/CommonApplication.java
@@ -16,7 +16,10 @@
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;
@@ -55,6 +58,12 @@
        //x5内核初始化
        Tbs.Companion.init(this);
        //Android8.0后注册通知通道
        MyNotificationChannel.Companion.init(this);
        //初始化移动推送
        PushService.Companion.init(this);
        if (instance == null) {
            instance = this;
@@ -155,12 +164,18 @@
    public Userinfo getCurrentUser() {
        if (currentUser ==null){
            userinfoDao = this.getDaoSession().getUserinfoDao();
            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;
    }
app/src/main/java/cn/flightfeather/thirdapp/activity/LoginActivity.java
@@ -16,7 +16,7 @@
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;
app/src/main/java/cn/flightfeather/thirdapp/activity/ScenseMapActivity.java
@@ -55,7 +55,6 @@
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;
@@ -534,15 +533,15 @@
                }
                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;
        }
    }
app/src/main/java/cn/flightfeather/thirdapp/activity/UploadMediaFilesActivity.java
@@ -112,6 +112,7 @@
            mediaFileListCurrent.removeAll(mediaFileListCurrent);
            mediaFileListCurrent.addAll(mediaFileList2);
            photoTotal = mediaFileListCurrent.size();
            photoUploaded = 0;
            adapter.notifyDataSetChanged();
        }
    }
app/src/main/java/cn/flightfeather/thirdapp/adapter/ContentFragmentAdapter.java
@@ -13,7 +13,7 @@
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 {
app/src/main/java/cn/flightfeather/thirdapp/common/StatusBar.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdapp/common/database/DbLink.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdapp/common/database/DbSource.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdapp/common/database/GreenDaoDb.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdapp/fragment/SettingFragment.java
@@ -21,6 +21,7 @@
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;
@@ -59,7 +60,7 @@
        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);
@@ -73,6 +74,8 @@
        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();
app/src/main/java/cn/flightfeather/thirdapp/fragment/TaskFragment.java
@@ -346,6 +346,9 @@
        builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                if (list.isEmpty()) {
                    return;
                }
                showCheckTaskInfoDialog(list.get(mTopClassTaskChoice));
            }
        });
app/src/main/java/cn/flightfeather/thirdapp/module/MainActivity.java
@@ -22,10 +22,10 @@
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;
app/src/main/java/cn/flightfeather/thirdapp/module/base/BaseMapActivity.kt
@@ -258,6 +258,9 @@
            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/module/home/HomeFragment.java
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdapp/fragment/HomeFragment.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package cn.flightfeather.thirdapp.fragment;
package cn.flightfeather.thirdapp.module.home;
import android.content.Context;
app/src/main/java/cn/flightfeather/thirdapp/module/home/HomeFragment_comptent.java
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdapp/business/widgettype2/HomeFragment_comptent.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package cn.flightfeather.thirdapp.business.widgettype2;
package cn.flightfeather.thirdapp.module.home;
import android.content.Context;
app/src/main/java/cn/flightfeather/thirdapp/module/home/HomeFragment_scene.java
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdapp/business/widgettype3/HomeFragment_scene.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package cn.flightfeather.thirdapp.business.widgettype3;
package cn.flightfeather.thirdapp.module.home;
import android.arch.lifecycle.ViewModelProviders;
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/BaseProblemListActivity.kt
@@ -64,6 +64,10 @@
            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)
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt
@@ -377,7 +377,8 @@
        //添加 ç”¨æˆ·ç±»åž‹ä¸ºâ€œä¸»ç®¡éƒ¨é—¨â€æˆ–“管理员”,编号为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
app/src/main/java/cn/flightfeather/thirdapp/module/inspectioninfo/ProblemChangeFragment.java
@@ -53,7 +53,7 @@
    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/module/login/CardFragment.java
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdapp/fragment/CardFragment.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package cn.flightfeather.thirdapp.fragment;
package cn.flightfeather.thirdapp.module.login;
import android.content.Context;
@@ -29,6 +29,7 @@
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;
@@ -218,6 +219,7 @@
                    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();
app/src/main/java/cn/flightfeather/thirdapp/module/task/NewSubTaskActivity.kt
@@ -9,6 +9,7 @@
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
@@ -215,19 +216,51 @@
            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)
            }
        }
@@ -303,22 +336,11 @@
    /**
     * æ˜¾ç¤ºä»»åŠ¡æ‰§è¡Œè€…å¤šé€‰å¯¹è¯æ¡†
     */
    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("选择任务执行者")
app/src/main/java/cn/flightfeather/thirdapp/module/task/NewSubTaskViewModel.kt
@@ -418,8 +418,16 @@
                tguid = UUIDGenerator.generate16ShortUUID()
                tsguid = selectedTopTask?.tguid
                levelnum = null
                val cal = Calendar.getInstance()
                cal.time = Date()
                // åˆ¤æ–­å½“前时间与总任务的时间段关系,不在总任务时间范围内时,使用总任务开始时间为默认时间,否则用当前时间为默认时间
                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)
@@ -428,6 +436,8 @@
                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
app/src/main/java/cn/flightfeather/thirdapp/util/GlobalConfig.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdapp/util/GlobalConfig.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
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
    }
}
app/src/main/java/cn/flightfeather/thirdapp/util/MyPreference.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
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()
    }
}
app/src/main/java/cn/flightfeather/thirdapp/util/notification/MyNotificationChannel.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
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)
            }
        }
    }
}
app/src/main/java/cn/flightfeather/thirdapp/util/push/LoginInitializer.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
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()
                }
            }
        }
    }
}
app/src/main/java/cn/flightfeather/thirdapp/util/push/MyMessageIntentService.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
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"
        )
    }
}
app/src/main/java/cn/flightfeather/thirdapp/util/push/MyMessageReceiver.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,72 @@
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")
    }
}
app/src/main/java/cn/flightfeather/thirdapp/util/push/PushService.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,65 @@
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?) {
                }
            })
        }
    }
}
app/src/main/java/cn/flightfeather/thirdapp/util/updateApp/UpdateAppUtil.java
@@ -87,7 +87,8 @@
                    .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();
        }
app/src/main/java/com/ping/greendao/gen/DaoMaster.java
@@ -35,6 +35,7 @@
        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);
@@ -47,7 +48,6 @@
        TaskvertionDao.createTable(db, ifNotExists);
        TownDao.createTable(db, ifNotExists);
        UserinfoDao.createTable(db, ifNotExists);
        MediaFileCacheDao.createTable(db, ifNotExists);
    }
    /** Drops underlying database table using DAOs. */
@@ -66,6 +66,7 @@
        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);
@@ -78,7 +79,6 @@
        TaskvertionDao.dropTable(db, ifExists);
        TownDao.dropTable(db, ifExists);
        UserinfoDao.dropTable(db, ifExists);
        MediaFileCacheDao.dropTable(db, ifExists);
    }
    /**
@@ -111,6 +111,7 @@
        registerDaoClass(InspectionDao.class);
        registerDaoClass(ItemevaluationDao.class);
        registerDaoClass(MediafileDao.class);
        registerDaoClass(MediaFileCacheDao.class);
        registerDaoClass(MediaTypeAliasDao.class);
        registerDaoClass(MonitorobjectversionDao.class);
        registerDaoClass(ProblemlistDao.class);
@@ -123,7 +124,6 @@
        registerDaoClass(TaskvertionDao.class);
        registerDaoClass(TownDao.class);
        registerDaoClass(UserinfoDao.class);
        registerDaoClass(MediaFileCacheDao.class);
    }
    public DaoSession newSession() {
app/src/main/java/com/ping/greendao/gen/DaoSession.java
@@ -22,6 +22,7 @@
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;
@@ -34,7 +35,6 @@
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;
@@ -50,6 +50,7 @@
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;
@@ -62,7 +63,6 @@
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.
@@ -87,6 +87,7 @@
    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;
@@ -99,7 +100,6 @@
    private final DaoConfig taskvertionDaoConfig;
    private final DaoConfig townDaoConfig;
    private final DaoConfig userinfoDaoConfig;
    private final DaoConfig mediaFileCacheDaoConfig;
    private final ChangeAdviceDao changeAdviceDao;
    private final ChangeEffectDao changeEffectDao;
@@ -115,6 +115,7 @@
    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;
@@ -127,7 +128,6 @@
    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) {
@@ -175,6 +175,9 @@
        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);
@@ -211,9 +214,6 @@
        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);
@@ -228,6 +228,7 @@
        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);
@@ -240,7 +241,6 @@
        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);
@@ -256,6 +256,7 @@
        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);
@@ -268,7 +269,6 @@
        registerDao(Taskvertion.class, taskvertionDao);
        registerDao(Town.class, townDao);
        registerDao(Userinfo.class, userinfoDao);
        registerDao(MediaFileCache.class, mediaFileCacheDao);
    }
    
    public void clear() {
@@ -286,6 +286,7 @@
        inspectionDaoConfig.clearIdentityScope();
        itemevaluationDaoConfig.clearIdentityScope();
        mediafileDaoConfig.clearIdentityScope();
        mediaFileCacheDaoConfig.clearIdentityScope();
        mediaTypeAliasDaoConfig.clearIdentityScope();
        monitorobjectversionDaoConfig.clearIdentityScope();
        problemlistDaoConfig.clearIdentityScope();
@@ -298,7 +299,6 @@
        taskvertionDaoConfig.clearIdentityScope();
        townDaoConfig.clearIdentityScope();
        userinfoDaoConfig.clearIdentityScope();
        mediaFileCacheDaoConfig.clearIdentityScope();
    }
    public ChangeAdviceDao getChangeAdviceDao() {
@@ -357,6 +357,10 @@
        return mediafileDao;
    }
    public MediaFileCacheDao getMediaFileCacheDao() {
        return mediaFileCacheDao;
    }
    public MediaTypeAliasDao getMediaTypeAliasDao() {
        return mediaTypeAliasDao;
    }
@@ -403,10 +407,6 @@
    public UserinfoDao getUserinfoDao() {
        return userinfoDao;
    }
    public MediaFileCacheDao getMediaFileCacheDao() {
        return mediaFileCacheDao;
    }
}
app/src/main/res/layout/fragment_home.xml
@@ -3,7 +3,7 @@
    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"
app/src/main/res/layout/fragment_home_competent.xml
@@ -3,7 +3,7 @@
    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"/>