Просмотр исходного кода

Merge branch 'draft' of https://gitlab.com/Arisono/SkWeiChat-Baidu into draft

FANGLH 8 лет назад
Родитель
Сommit
74f4ae8095
31 измененных файлов с 335 добавлено и 102 удалено
  1. 3 2
      WeiChat/src/main/java/com/xzjmyk/pm/activity/util/oa/OAHttpUtil.java
  2. 14 0
      app_core/common/src/main/java/com/common/config/VersionUtil.java
  3. 4 1
      app_core/common/src/main/java/com/common/ui/ViewUtils.java
  4. 5 0
      app_core/common/src/main/java/com/core/model/UUHelperModel.java
  5. 1 1
      app_core/common/src/main/java/com/core/model/WorkModel.java
  6. 42 0
      app_core/common/src/main/java/com/core/utils/IntentUtils.java
  7. 3 4
      app_core/common/src/main/java/com/core/xmpp/XChatManager.java
  8. 1 2
      app_core/common/src/main/res/layout/activity_approval.xml
  9. 3 1
      app_core/common/src/main/res/values/strings.xml
  10. 6 2
      app_modular/appmessages/src/main/AndroidManifest.xml
  11. 1 1
      app_modular/appmessages/src/main/java/com/modular/appmessages/activity/AppWebViewActivity.java
  12. 4 5
      app_modular/appmessages/src/main/java/com/modular/appmessages/activity/ApprovalActivity.java
  13. 123 1
      app_modular/appmessages/src/main/java/com/modular/appmessages/activity/MessageWebActivity.java
  14. 33 6
      app_modular/appmessages/src/main/java/com/modular/appmessages/activity/UUHelperActivity.java
  15. 4 5
      app_modular/appmessages/src/main/java/com/modular/appmessages/adapter/UUHelperAdapter.java
  16. 4 3
      app_modular/appmessages/src/main/java/com/modular/appmessages/presenter/MessagePresenter.java
  17. BIN
      app_modular/appmessages/src/main/res/drawable-hdpi/icon_scrm.png
  18. BIN
      app_modular/appmessages/src/main/res/drawable-xhdpi/icon_scrm.png
  19. BIN
      app_modular/appmessages/src/main/res/drawable-xxhdpi/icon_scrm.png
  20. 2 2
      app_modular/appmessages/src/main/res/drawable/text_hint_bg.xml
  21. 18 25
      app_modular/appmessages/src/main/res/layout/activity_uuhelper.xml
  22. 1 1
      app_modular/appmessages/src/main/res/layout/activity_uuhelper_details.xml
  23. 9 6
      app_modular/appmessages/src/main/res/layout/item_uuhelper_item.xml
  24. 4 4
      app_modular/appmessages/src/main/res/layout/item_uuhelper_time.xml
  25. 5 0
      app_modular/appmessages/src/main/res/values-en/strings.xml
  26. 5 0
      app_modular/appmessages/src/main/res/values-zh-rCN/strings.xml
  27. 5 0
      app_modular/appmessages/src/main/res/values-zh-rTW/strings.xml
  28. 2 0
      app_modular/appmessages/src/main/res/values/strings.xml
  29. 20 16
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/BusinessStateActivity.java
  30. 10 11
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/WorkActivity.java
  31. 3 3
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/presenter/WorkPresenter.java

+ 3 - 2
WeiChat/src/main/java/com/xzjmyk/pm/activity/util/oa/OAHttpUtil.java

@@ -44,7 +44,8 @@ public class OAHttpUtil {
         JSONObject o = JSONUtil.getJSONObject(object, key);
         if (o == null) return models;
         if (!isCrm) {
-            models.addAll(getModelByJSON(o, isMe, OAModel.OA_TYPE_TASK, "schedule", "task"));//添加任务日程
+            models.addAll(getModelByJSON(o, isMe, OAModel.OA_TYPE_TASK, "task"));//添加任务日程
+            models.addAll(getModelByJSON(o, isMe, OAModel.OA_TYPE_TASK, "schedule"));//添加任务日程
             models.addAll(getModelByJSON(o, isMe, OAModel.OA_TYPE_MISSION, "outPlan", "outplan"));//外勤计划
         }
         models.addAll(getModelByJSON(o, isMe, OAModel.OA_TYPE_RECORD, "visitRecord"));//拜访报告
@@ -96,7 +97,7 @@ public class OAHttpUtil {
         }
         String timeStr = JSONUtil.getText(object, keys);
         if (!StringUtil.isEmpty(timeStr))
-            return DateFormatUtil.str2Long(timeStr,DateFormatUtil.YMD_HMS);
+            return DateFormatUtil.str2Long(timeStr, DateFormatUtil.YMD_HMS);
         return 0;
     }
 

+ 14 - 0
app_core/common/src/main/java/com/common/config/VersionUtil.java

@@ -0,0 +1,14 @@
+package com.common.config;
+
+import com.core.utils.CommonUtil;
+
+/**
+ * Created by Bitliker on 2017/9/14.
+ */
+public class VersionUtil {
+
+    public static boolean showUUHelper() {
+        return CommonUtil.isReleaseVersion();
+    }
+
+}

+ 4 - 1
app_core/common/src/main/java/com/common/ui/ViewUtils.java

@@ -9,6 +9,8 @@ import android.view.View;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
+import com.common.LogUtil;
+
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -53,8 +55,9 @@ public class ViewUtils {
 
 
     public static void moveRecyclerView2Postion(RecyclerView recyclerView, int postion) {
+        LogUtil.i("postion="+postion);
         if (recyclerView != null && recyclerView.getLayoutManager() != null && recyclerView.getLayoutManager() instanceof LinearLayoutManager) {
-            ((LinearLayoutManager) recyclerView.getLayoutManager()).scrollToPositionWithOffset(postion, 0);
+            ((LinearLayoutManager) recyclerView.getLayoutManager()).scrollToPositionWithOffset(postion, -100);
             ((LinearLayoutManager) recyclerView.getLayoutManager()).setStackFromEnd(true);
         }
     }

+ 5 - 0
app_core/common/src/main/java/com/core/model/UUHelperModel.java

@@ -24,6 +24,11 @@ public class UUHelperModel {
     private boolean readed;
 
 
+
+
+
+
+
     @Override
     public String toString() {
         Map<String, Object> map = new HashMap<>();

+ 1 - 1
app_core/common/src/main/java/com/core/model/WorkModel.java

@@ -132,7 +132,7 @@ public class WorkModel implements Parcelable {
     }
 
     public String getWorkTime() {
-        return workTime;
+        return workTime==null?"":workTime;
     }
 
     public void setWorkTime(String workTime) {

+ 42 - 0
app_core/common/src/main/java/com/core/utils/IntentUtils.java

@@ -5,6 +5,13 @@ import android.content.Intent;
 
 
 public class IntentUtils {
+    public static final String KEY_URL = "url";
+    public static final String KEY_TITLE = "title";
+    public static final String KEY_NEER_COOKIE = "neerCookie";
+    public static final String KEY_NEER_SHARE = "neerShare";
+    public static final String KEY_SHARE_IMAGE = "shareImage";
+    public static final String KEY_SHARE_CONTENT = "shareContent";
+
 
     public static void webLinks(Context ct, String url, String text) {
         Intent intent_web = new Intent("com.modular.main.WebViewCommActivity");
@@ -13,4 +20,39 @@ public class IntentUtils {
         ct.startActivity(intent_web);
     }
 
+    public static void linkCommonWeb(Context ct, String url) {
+        linkCommonWeb(ct, url, null, null, null, false, false);
+    }
+
+    public static void linkCommonWeb(Context ct, String url, String title) {
+        linkCommonWeb(ct, url, title, null, null, false, false);
+    }
+
+    public static void linkCommonWeb(Context ct,
+                                     String url,
+                                     String title,
+                                     String imageUrl,
+                                     String content) {
+        linkCommonWeb(ct, url, title, imageUrl, content, true, false);
+    }
+
+
+    public static void linkCommonWeb(Context ct,
+                                     String url,
+                                     String title,
+                                     String imageUrl,
+                                     String content,
+                                     boolean neerShare,
+                                     boolean neerCookie) {
+        Intent intent_web = new Intent("com.modular.message.MessageWebActivity");
+        intent_web.putExtra(KEY_URL, url);
+        intent_web.putExtra(KEY_TITLE, title);
+        intent_web.putExtra(KEY_NEER_COOKIE, neerCookie);
+        intent_web.putExtra(KEY_NEER_SHARE, neerShare);
+        intent_web.putExtra(KEY_SHARE_IMAGE, imageUrl);
+        intent_web.putExtra(KEY_SHARE_CONTENT, content);
+        ct.startActivity(intent_web);
+    }
+
+
 }

+ 3 - 4
app_core/common/src/main/java/com/core/xmpp/XChatManager.java

@@ -5,7 +5,7 @@ import android.util.Log;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.common.LogUtil;
+import com.common.config.VersionUtil;
 import com.common.data.CalendarUtil;
 import com.common.data.JSONUtil;
 import com.common.thread.ThreadManager;
@@ -145,7 +145,7 @@ public class XChatManager {
             }
             String fromUserId = StringUtils.parseName(message.getFrom());
             String messageBody = message.getBody();
-            if (!StringUtils.isEmpty(messageBody) && fromUserId != null && fromUserId.equals("10000")) {
+            if (VersionUtil.showUUHelper() && !StringUtils.isEmpty(messageBody) && fromUserId != null && fromUserId.equals("10000")) {
                 saveUUHelperMessage(messageBody);
             } else {
                 saveSingleMessage(message, false);//将消息保存到本地
@@ -282,7 +282,6 @@ public class XChatManager {
     }
 
     private void saveUUHelperMessage(String messageBody) {
-        LogUtil.i("messageBody="+messageBody);
         JSONObject object = JSON.parseObject(messageBody);
         long timeSend = JSONUtil.getLong(object, "timeSend");
         String content = JSONUtil.getText(object, "content");
@@ -296,7 +295,7 @@ public class XChatManager {
         if (!StringUtils.isEmpty(linkUrl) && user != null) {
             linkUrl += "?userid=" + user.getUserId() + "&username=" + user.getNickName() + "&iconurl=" + AvatarHelper.getInstance().getAvatarUrl(user.getUserId(), true);
         }
-        UUHelperModel model = new UUHelperModel(timeSend, imageUrl,iconUrl, linkUrl, content);
+        UUHelperModel model = new UUHelperModel(timeSend, imageUrl, iconUrl, linkUrl, content);
         UUHelperDao.getInstance().saveData(model);
         NotificationManage.sendUUHelperNotif(content);
     }

+ 1 - 2
app_core/common/src/main/res/layout/activity_approval.xml

@@ -6,8 +6,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@color/item_line"
-    android:focusableInTouchMode="true"
-    tools:context="com.xzjmyk.pm.activity.ui.erp.activity.oa.ApprovalActivity">
+    android:focusableInTouchMode="true">
 
     <LinearLayout
         android:id="@+id/operationLL"

+ 3 - 1
app_core/common/src/main/res/values/strings.xml

@@ -1804,7 +1804,9 @@
     <string name="add_cost_details1">添加消费明细</string>
     <string name="invoice">发票</string>
     <string name="please_add_image">请添加图片</string>
-
+    <string name="added">已添加</string>
+    <string name="invite">邀请注册</string>
+    <string name="next_article">下一条</string>
     <string name="selector_folder_all">所有图片</string>
     <string name="selector_caption">选择图片</string>
     <!--http://stackoverflow.com/questions/17502824/whats-wrong-with-this-format-string-->

+ 6 - 2
app_modular/appmessages/src/main/AndroidManifest.xml

@@ -25,7 +25,7 @@
             android:theme="@style/StyledIndicators"/>
         <activity
             android:name=".activity.UUHelperActivity"
-            android:label="UU 助手"
+            android:label="@string/uu_helper"
             android:launchMode="singleTask">
             <intent-filter>
                 <action android:name="com.modular.appmessage.UUHelperActivity"/>
@@ -35,8 +35,12 @@
         </activity>
         <activity
             android:name=".activity.UUHelperDetailsActivity"
-            android:label="UU 助手"/>
+            android:label="@string/uu_helper"/>
         <activity android:name=".activity.MessageWebActivity">
+            <intent-filter>
+                <action android:name="com.modular.message.MessageWebActivity" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
         </activity>
     </application>
 

+ 1 - 1
app_modular/appmessages/src/main/java/com/modular/appmessages/activity/AppWebViewActivity.java

@@ -164,7 +164,7 @@ public class AppWebViewActivity extends BaseActivity {
                 handler.proceed();
             }
         });
-        webView.getRefreshableView().setWebChromeClient(new WebChromeClient());
+            webView.getRefreshableView().setWebChromeClient(new WebChromeClient());
         if (!StringUtil.isEmpty(masterId) && !StringUtil.isEmpty(master)) {
             checkUUMaster(uu, masterId, master, url);// 推送,判别公司,账套,实现自动切换
         } else {

+ 4 - 5
app_modular/appmessages/src/main/java/com/modular/appmessages/activity/ApprovalActivity.java

@@ -164,11 +164,10 @@ public class ApprovalActivity extends OABaseActivity implements IApproval, Appro
     }
 
     private void initView() {
-        opinionRL= (RelativeLayout) findViewById(R.id.opinionRL);
-        opinionET= (FormEditText) findViewById(R.id.opinionET);
-        contentRV= (RecyclerView) findViewById(R.id.contentRV);
-        inputTagIV= (ImageView) findViewById(R.id.inputTagIV);
-
+        opinionRL = (RelativeLayout) findViewById(R.id.opinionRL);
+        opinionET = (FormEditText) findViewById(R.id.opinionET);
+        contentRV = (RecyclerView) findViewById(R.id.contentRV);
+        inputTagIV = (ImageView) findViewById(R.id.inputTagIV);
         contentRV.setLayoutManager(new CrashLinearLayoutManager(ct));
         findViewById(R.id.commonWordsIV).setOnClickListener(this);//常用语
         findViewById(R.id.nextTV).setOnClickListener(this);

+ 123 - 1
app_modular/appmessages/src/main/java/com/modular/appmessages/activity/MessageWebActivity.java

@@ -1,18 +1,36 @@
 package com.modular.appmessages.activity;
 
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.net.http.SslError;
 import android.os.Bundle;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.webkit.SslErrorHandler;
+import android.webkit.WebChromeClient;
 import android.webkit.WebSettings;
+import android.webkit.WebView;
 import android.webkit.WebViewClient;
 import android.widget.ProgressBar;
 
+import com.common.system.SystemUtil;
 import com.core.base.BaseActivity;
+import com.core.utils.CommonUtil;
+import com.core.utils.IntentUtils;
+import com.handmark.pulltorefresh.library.PullToRefreshBase;
 import com.handmark.pulltorefresh.library.PullToRefreshWebView;
 import com.modular.appmessages.R;
+import com.umeng.socialize.ShareAction;
+import com.umeng.socialize.bean.SHARE_MEDIA;
+import com.umeng.socialize.media.UMImage;
 
 public class MessageWebActivity extends BaseActivity {
 
+
     private PullToRefreshWebView webViewRefresh;
     private ProgressBar progressBar;
+    private String url;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -21,6 +39,49 @@ public class MessageWebActivity extends BaseActivity {
         webViewRefresh = (PullToRefreshWebView) findViewById(R.id.webViewRefresh);
         progressBar = (ProgressBar) findViewById(R.id.progressBar);
         initView();
+        initData();
+    }
+
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        if (getIntent() != null && getIntent().getBooleanExtra(IntentUtils.KEY_NEER_SHARE, false)) {
+            getMenuInflater().inflate(R.menu.menu_about, menu);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        if (R.id.app_about == item.getItemId()) {
+            String title = getSupportActionBar().getTitle().toString();
+            String content = null;
+            String imageUrl = null;
+            Intent intent = getIntent();
+            if (intent != null) {
+                content = intent.getStringExtra(IntentUtils.KEY_SHARE_CONTENT);
+                imageUrl = intent.getStringExtra(IntentUtils.KEY_SHARE_IMAGE);
+            }
+            if (content == null) {
+                content = "UU互联 Android客户端" + SystemUtil.getVersionName(mContext);
+                imageUrl = "http://img.my.csdn.net/uploads/201609/30/1475204542_1365.png";
+            }
+            new ShareAction(activity).setDisplayList(
+                    SHARE_MEDIA.SINA,
+                    SHARE_MEDIA.QQ,
+                    SHARE_MEDIA.QZONE,
+                    SHARE_MEDIA.WEIXIN,
+                    SHARE_MEDIA.WEIXIN_CIRCLE,
+                    SHARE_MEDIA.WEIXIN_FAVORITE,
+                    SHARE_MEDIA.MORE)
+                    .withTitle(title)
+                    .withText(content)
+                    .withMedia(new UMImage(activity, imageUrl))
+                    .withTargetUrl(url)
+                    .setCallback(CommonUtil.umShareListener)
+                    .open();
+        }
+        return super.onOptionsItemSelected(item);
     }
 
     private void initView() {
@@ -34,6 +95,67 @@ public class MessageWebActivity extends BaseActivity {
         webViewRefresh.getRefreshableView().getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
         webViewRefresh.getRefreshableView().clearCache(true);
         webViewRefresh.getRefreshableView().clearHistory();
-        webViewRefresh.getRefreshableView().setWebViewClient(new WebViewClient());
+        webViewRefresh.getRefreshableView().setWebViewClient(new WebViewClient() {
+            public boolean shouldOverrideUrlLoading(WebView view, String url) {
+                view.loadUrl(url);
+                return true;
+            }
+
+            @Override
+            public void onPageStarted(WebView view, String url, Bitmap favicon) {
+                if (progressBar.getVisibility() == View.GONE) {
+                    progressBar.setVisibility(View.VISIBLE);
+                }
+            }
+
+            @Override
+            public void onPageFinished(WebView view, String url) {
+                if (progressBar.getVisibility() == View.VISIBLE) {
+                    progressBar.setVisibility(View.GONE);
+                }
+            }
+
+            @Override
+            public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
+                handler.proceed();
+            }
+        });
+        webViewRefresh.getRefreshableView().setWebChromeClient(new WebChromeClient() {
+            @Override
+            public void onProgressChanged(WebView view, int newProgress) {
+                progressBar.setProgress(newProgress);
+                if (newProgress == 100) {
+                    progressBar.setProgress(newProgress);
+                    progressBar.setVisibility(View.GONE);
+                    webViewRefresh.onRefreshComplete();
+                }
+                super.onProgressChanged(view, newProgress);
+            }
+        });
+        webViewRefresh.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener<WebView>() {
+            @Override
+            public void onRefresh(PullToRefreshBase<WebView> refreshView) {
+                loadData();
+            }
+        });
+    }
+
+    private void initData() {
+        Intent intent = getIntent();
+        if (intent != null) {
+            url = intent.getStringExtra(IntentUtils.KEY_URL);
+            String title = intent.getStringExtra(IntentUtils.KEY_TITLE);
+            if (title != null) {
+                getSupportActionBar().setTitle(title);
+            }
+        }
+        loadData();
+    }
+
+    private void loadData() {
+        if (url != null) {
+            webViewRefresh.getRefreshableView().loadUrl(url);
+        }
+
     }
 }

+ 33 - 6
app_modular/appmessages/src/main/java/com/modular/appmessages/activity/UUHelperActivity.java

@@ -13,13 +13,16 @@ import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 
+import com.common.LogUtil;
 import com.common.data.ListUtils;
+import com.common.thread.ThreadUtil;
 import com.common.ui.ViewUtils;
 import com.core.app.AppConstant;
 import com.core.app.Constants;
 import com.core.base.BaseActivity;
 import com.core.dao.UUHelperDao;
 import com.core.model.UUHelperModel;
+import com.core.net.http.http.OAHttpHelper;
 import com.core.utils.CommonUtil;
 import com.core.utils.IntentUtils;
 import com.modular.appmessages.R;
@@ -83,6 +86,10 @@ public class UUHelperActivity extends BaseActivity implements View.OnClickListen
 
     private void initData() {
         List<UUHelperModel> models = UUHelperDao.getInstance().getAllModels();
+        for (UUHelperModel e : models) {
+            LogUtil.i(e.toString());
+            LogUtil.i("__________________________");
+        }
         List<UUHelperModel> showModels = new ArrayList<>();
         if (!ListUtils.isEmpty(models)) {
             String dateChche = null;
@@ -94,6 +101,7 @@ public class UUHelperActivity extends BaseActivity implements View.OnClickListen
 
                 }
                 if (!dateChche.equals(model.getDate())) {
+                    dateChche = model.getDate();
                     showModels.add(new UUHelperModel(dateChche));
                 }
                 showModels.add(model);
@@ -102,7 +110,7 @@ public class UUHelperActivity extends BaseActivity implements View.OnClickListen
         showModel(showModels);
     }
 
-    private void showModel(List<UUHelperModel> models) {
+    private void showModel(final List<UUHelperModel> models) {
         if (mAdapter == null) {
             mAdapter = new UUHelperAdapter(ct, models);
             contentRV.setAdapter(mAdapter);
@@ -110,7 +118,26 @@ public class UUHelperActivity extends BaseActivity implements View.OnClickListen
             mAdapter.setModels(models);
             mAdapter.notifyDataSetChanged();
         }
-        ViewUtils.moveRecyclerView2Postion(contentRV, models.size());
+        if (ListUtils.getSize(models) > 5) {
+            ThreadUtil.getInstance().addTask(new Runnable() {
+                @Override
+                public void run() {
+                    int lastPostion = -1;
+                    for (int i = 0; i < models.size(); i++) {
+                        if (models.get(i).isTag()) {
+                            lastPostion = i;
+                        }
+                    }
+                    final int postion = lastPostion;
+                    OAHttpHelper.getInstance().post(new Runnable() {
+                        @Override
+                        public void run() {
+                            ViewUtils.moveRecyclerView2Postion(contentRV, postion);
+                        }
+                    });
+                }
+            });
+        }
     }
 
 
@@ -119,17 +146,17 @@ public class UUHelperActivity extends BaseActivity implements View.OnClickListen
         int id = v.getId();
         String url = null;
         if (id == R.id.successfulTV) {
-            url = "http://www.usoftchina.com/";
-            IntentUtils.webLinks(ct, url, "关于优软");
+            url = "http://www.usoftchina.com/about";
+            IntentUtils.linkCommonWeb(ct, url, "关于优软", null, null);
         } else if (id == R.id.experienceTV) {
             url = "http://113.105.74.140:8080/new/";
-            IntentUtils.webLinks(ct, url, "体验中心");
+            IntentUtils.linkCommonWeb(ct, url, "新功能介绍", null, null);
         } else if (id == R.id.serviceTV) {
             CommonUtil.setSharedPreferences(this, Constants.SET_CALL, true);
             Intent intent = new Intent("com.modular.main.FeedbackActivity");
             intent.putExtra("type", 1);
             intent.putExtra(AppConstant.EXTRA_URL, mConfig.help_url);
-            intent.putExtra(AppConstant.EXTRA_TITLE, "客服中心");
+            intent.putExtra(AppConstant.EXTRA_TITLE, "用户反馈");
             startActivity(intent);
         }
     }

+ 4 - 5
app_modular/appmessages/src/main/java/com/modular/appmessages/adapter/UUHelperAdapter.java

@@ -168,11 +168,10 @@ public class UUHelperAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
         return inflater.inflate(layout, parent, false);
     }
 
-    private void onItemClick(UUHelperModel item) {
-        String title = item.getContent();
-        UUHelperDao.getInstance().updateRead(item.getId());
-        String url = item.getLinkUrl();
-        IntentUtils.webLinks(ct, url, title);
+    private void onItemClick(UUHelperModel model) {
+        UUHelperDao.getInstance().updateRead(model.getId());
+        String url = model.getLinkUrl();
+        IntentUtils.linkCommonWeb(ct, url, "UU 助手",model.getImageUrl(),model.getContent());
     }
 
     private void onLongItemClick(final UUHelperModel model, final int position) {

+ 4 - 3
app_modular/appmessages/src/main/java/com/modular/appmessages/presenter/MessagePresenter.java

@@ -676,9 +676,9 @@ public class MessagePresenter implements OnHttpResultListener {
         }
         if (!ListUtils.isEmpty(uuHelperItems)) {
             Friend friend = new Friend();
-            friend.setNickName("UU 消息助手");
+            friend.setNickName("UU 助手");
             friend.setType(XmppMessage.TYPE_UUHELPER);
-            UUHelperModel lastModel= null;
+            UUHelperModel lastModel = null;
             int unReadUnm = 0;
             for (UUHelperModel model : uuHelperItems) {
                 if (!model.isReaded()) {
@@ -871,7 +871,8 @@ public class MessagePresenter implements OnHttpResultListener {
             ct.startActivity(new Intent(ct, UUHelperActivity.class));
             UUHelperDao.getInstance().updateRead();
             return;
-        } if (friend.getRoomFlag() == 0) {
+        }
+        if (friend.getRoomFlag() == 0) {
             if (friend.getUserId().equals(Friend.ID_NEW_FRIEND_MESSAGE)) {// 新朋友消息
                 mContext.startActivity(new Intent("com.modular.appcontact.NewFriendActivity"));
             } else {

BIN
app_modular/appmessages/src/main/res/drawable-hdpi/icon_scrm.png


BIN
app_modular/appmessages/src/main/res/drawable-xhdpi/icon_scrm.png


BIN
app_modular/appmessages/src/main/res/drawable-xxhdpi/icon_scrm.png


+ 2 - 2
app_modular/appmessages/src/main/res/drawable/text_hint_bg.xml

@@ -2,9 +2,9 @@
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item>
         <shape>
-            <solid android:color="@color/subscrip_text" />
+            <solid android:color="#cecece" />
             <corners android:radius="8dp" />
-            <padding android:bottom="2dp" android:left="2dp" android:right="2dp" android:top="2dp" />
+            <padding android:bottom="2dp" android:left="10dp" android:right="10dp" android:top="2dp" />
         </shape>
     </item>
 </selector>

+ 18 - 25
app_modular/appmessages/src/main/res/layout/activity_uuhelper.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                xmlns:tools="http://schemas.android.com/tools"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:background="@color/base_bg"
-                tools:context="com.modular.appmessages.activity.UUHelperActivity">
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/base_bg"
+    tools:context="com.modular.appmessages.activity.UUHelperActivity">
 
     <LinearLayout
         android:id="@+id/operationLL"
@@ -15,11 +15,17 @@
         android:orientation="horizontal"
         android:padding="10dp">
 
+        <ImageView
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="2"
+            android:layout_gravity="center_vertical"
+            android:src="@drawable/icon_scrm"/>
 
         <Button
             android:id="@+id/successfulTV"
             style="@style/bottomTextStyle"
-            android:layout_weight="2"
+            android:layout_weight="4"
             android:background="@color/white"
             android:text="关于优软"
             android:textColor="@drawable/bg_bule_yellow_text" />
@@ -33,9 +39,9 @@
         <Button
             android:id="@+id/experienceTV"
             style="@style/bottomTextStyle"
-            android:layout_weight="3"
+            android:layout_weight="5"
             android:background="@color/white"
-            android:text="体验中心"
+            android:text="新功能介绍"
             android:textColor="@drawable/bg_bule_yellow_text" />
 
         <View
@@ -44,25 +50,12 @@
             android:layout_gravity="center_vertical"
             android:background="@color/item_line" />
 
-        <TextView
-            android:id="@+id/changedealmanTV"
-            style="@style/bottomTextStyle"
-            android:layout_weight="5"
-            android:text="@string/common_changedealman"
-            android:visibility="gone" />
-
-        <View
-            android:layout_width="@dimen/line"
-            android:layout_height="20dp"
-            android:layout_gravity="center_vertical"
-            android:background="@color/item_line" />
-
         <Button
             android:id="@+id/serviceTV"
             style="@style/bottomTextStyle"
-            android:layout_weight="3"
+            android:layout_weight="4"
             android:background="@color/white"
-            android:text="客服中心"
+            android:text="用户反馈"
             android:textColor="@drawable/bg_bule_yellow_text" />
     </LinearLayout>
 
@@ -71,7 +64,7 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_above="@id/operationLL"
-        android:layout_marginBottom="15dp"
-        android:layout_alignParentTop="true" />
+        android:layout_alignParentTop="true"
+        android:layout_marginBottom="15dp" />
 
 </RelativeLayout>

+ 1 - 1
app_modular/appmessages/src/main/res/layout/activity_uuhelper_details.xml

@@ -21,7 +21,7 @@
         android:layout_alignTop="@id/headIMG"
         android:layout_toRightOf="@id/headIMG"
         android:gravity="center_vertical"
-        android:text="UU 助手"
+        android:text="@string/uu_helper"
         android:textColor="@color/black"
         android:textSize="18sp" />
 

+ 9 - 6
app_modular/appmessages/src/main/res/layout/item_uuhelper_item.xml

@@ -1,15 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-             android:layout_width="match_parent"
-             android:layout_marginLeft="20dp"
-             android:layout_marginRight="20dp"
-             android:background="@color/white"
-             android:layout_height="wrap_content">
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginLeft="20dp"
+    android:layout_marginRight="20dp"
+    android:background="@color/white"
+    android:paddingLeft="10dp"
+    android:paddingRight="10dp">
 
     <RelativeLayout
         android:id="@+id/fristRL"
         android:layout_width="match_parent"
-        android:layout_height="120dp">
+        android:layout_height="130dp"
+        android:paddingTop="10dp">
 
         <ImageView
             android:id="@+id/fristIV"

+ 4 - 4
app_modular/appmessages/src/main/res/layout/item_uuhelper_time.xml

@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content">
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
 
     <TextView
         android:id="@+id/timeTV"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_centerHorizontal="true"
-        android:layout_marginTop="10dp"
         android:layout_marginBottom="8dp"
+        android:layout_marginTop="10dp"
         android:background="@drawable/text_hint_bg"
-        android:text="2017-11-11 10:11:11"
+        android:text="2017-11-11"
         android:textColor="@color/white"
         android:textSize="@dimen/text_main" />
 </RelativeLayout>

+ 5 - 0
app_modular/appmessages/src/main/res/values-en/strings.xml

@@ -0,0 +1,5 @@
+<resources>
+    <string name="app_name">AppMessages</string>
+
+
+</resources>

+ 5 - 0
app_modular/appmessages/src/main/res/values-zh-rCN/strings.xml

@@ -0,0 +1,5 @@
+<resources>
+    <string name="app_name">AppMessages</string>
+
+
+</resources>

+ 5 - 0
app_modular/appmessages/src/main/res/values-zh-rTW/strings.xml

@@ -0,0 +1,5 @@
+<resources>
+    <string name="app_name">AppMessages</string>
+
+
+</resources>

+ 2 - 0
app_modular/appmessages/src/main/res/values/strings.xml

@@ -1,3 +1,5 @@
 <resources>
     <string name="app_name">AppMessages</string>
+    <string name="uu_helper">UU 助手</string>
+
 </resources>

+ 20 - 16
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/BusinessStateActivity.java

@@ -83,7 +83,7 @@ public class BusinessStateActivity extends BaseActivity implements View.OnClickL
         tv_unmanger = (TextView) findViewById(R.id.tv_unmanger);
         tv_timeout = (TextView) findViewById(R.id.tv_timeout);
         tv_transtered = (TextView) findViewById(R.id.tv_transtered);
-        tv_manged= (TextView) findViewById(R.id.tv_manged);
+        tv_manged = (TextView) findViewById(R.id.tv_manged);
         updateTabSelectState(tv_unmanger);
         mEmptyLayout = new EmptyLayout(this, mlist.getRefreshableView());
         mEmptyLayout.setShowLoadingButton(false);
@@ -98,22 +98,22 @@ public class BusinessStateActivity extends BaseActivity implements View.OnClickL
     }
 
     private void updateTabSelectState(TextView view) {
-        if (view.getId() == R.id.tv_unmanger){
+        if (view.getId() == R.id.tv_unmanger) {
             tv_unmanger.setSelected(true);
             tv_manged.setSelected(false);
             tv_timeout.setSelected(false);
             tv_transtered.setSelected(false);
-        }else if (view.getId() == R.id.tv_manged){
+        } else if (view.getId() == R.id.tv_manged) {
             tv_unmanger.setSelected(false);
             tv_manged.setSelected(true);
             tv_timeout.setSelected(false);
             tv_transtered.setSelected(false);
-        }else if (view.getId() == R.id.tv_timeout){
+        } else if (view.getId() == R.id.tv_timeout) {
             tv_unmanger.setSelected(false);
             tv_manged.setSelected(false);
             tv_timeout.setSelected(true);
             tv_transtered.setSelected(false);
-        }else if (view.getId() == R.id.tv_transtered){
+        } else if (view.getId() == R.id.tv_transtered) {
             tv_unmanger.setSelected(false);
             tv_manged.setSelected(false);
             tv_timeout.setSelected(false);
@@ -198,25 +198,25 @@ public class BusinessStateActivity extends BaseActivity implements View.OnClickL
 
     @Override
     public void onClick(View v) {
-        if (v.getId() == R.id.tv_unmanger){
+        if (v.getId() == R.id.tv_unmanger) {
             updateTabSelectState((TextView) v.findViewById(R.id.tv_unmanger));
             business_state = 0;
             page = 1;
             //  mAdapter=null;
             sendHttpResquest(Constants.HTTP_SUCCESS_INIT, page);
-        }else if (v.getId() == R.id.tv_manged){
+        } else if (v.getId() == R.id.tv_manged) {
             updateTabSelectState((TextView) v.findViewById(R.id.tv_manged));
             business_state = 1;
             page = 1;
             // mAdapter=null;
             sendHttpResquest(Constants.HTTP_SUCCESS_INIT, page);
-        }else if (v.getId() == R.id.tv_timeout){
+        } else if (v.getId() == R.id.tv_timeout) {
             updateTabSelectState((TextView) v.findViewById(R.id.tv_timeout));
             business_state = 2;
             page = 1;
             // mAdapter=null;
             sendHttpResquest(Constants.HTTP_SUCCESS_INIT, page);
-        }else if (v.getId() == R.id.tv_transtered){
+        } else if (v.getId() == R.id.tv_transtered) {
             updateTabSelectState((TextView) v.findViewById(R.id.tv_transtered));
             business_state = 3;
             page = 1;
@@ -471,15 +471,19 @@ public class BusinessStateActivity extends BaseActivity implements View.OnClickL
                     JSONArray arrayb = object.getJSONArray("listb");
                     JSONArray arrayc = object.getJSONArray("listc");
                     JSONArray arrayd = object.getJSONArray("listd");
-                    int counta = ListUtils.getSize(arraya);
-                    int countb = ListUtils.getSize(arrayb);
-                    int countc = ListUtils.getSize(arrayc);
+//                    int counta = ListUtils.getSize(arraya);
+//                    int countb = ListUtils.getSize(arrayb);
+//                    int countc = ListUtils.getSize(arrayc);
+//                    int countd = ListUtils.getSize(arrayd);
+                    int counta = JSONUtil.getInt(object, "counta");
+                    int countb = JSONUtil.getInt(object, "countb");
+                    int countc = JSONUtil.getInt(object, "countc");
                     int countd = ListUtils.getSize(arrayd);
                     if (page > 1) {
-                        counta +=StringUtil.getFirstInt(StringUtil.getTextRexHttp(tv_unmanger),0);
-                        countb +=StringUtil.getFirstInt(StringUtil.getTextRexHttp(tv_manged),0) ;
-                        countc +=StringUtil.getFirstInt(StringUtil.getTextRexHttp(tv_timeout),0) ;
-                        countd +=StringUtil.getFirstInt(StringUtil.getTextRexHttp(tv_transtered),0) ;
+                        counta += StringUtil.getFirstInt(StringUtil.getTextRexHttp(tv_unmanger), 0);
+                        countb += StringUtil.getFirstInt(StringUtil.getTextRexHttp(tv_manged), 0);
+                        countc += StringUtil.getFirstInt(StringUtil.getTextRexHttp(tv_timeout), 0);
+                        countd += StringUtil.getFirstInt(StringUtil.getTextRexHttp(tv_transtered), 0);
                     }
                     CommonUtil.textSpanForStyle(tv_unmanger, counta + getString(R.string.Unscheduled_schedule), String.valueOf(counta), ct.getResources().getColor(R.color.yellow_home));
                     CommonUtil.textSpanForStyle(tv_manged, countb + getString(R.string.Has_been_scheduled), String.valueOf(countb), ct.getResources().getColor(R.color.yellow_home));

+ 10 - 11
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/WorkActivity.java

@@ -88,7 +88,7 @@ public class WorkActivity extends OABaseActivity implements View.OnClickListener
 
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
-        if (item.getItemId() == R.id.title){
+        if (item.getItemId() == R.id.title) {
             showPopupWindow();
         }
         return super.onOptionsItemSelected(item);
@@ -121,9 +121,8 @@ public class WorkActivity extends OABaseActivity implements View.OnClickListener
     private void initView() {
         getSupportActionBar().setTitle(R.string.activity_signing);
         isAdmin = getIntent() == null ? false : getIntent().getBooleanExtra(AppConfig.IS_ADMIN, false);
-
-
         listview = (RecyclerView) findViewById(R.id.listview);
+        empty_tv = (TextView) findViewById(R.id.empty_tv);
         office_addr = (TextView) findViewById(R.id.office_addr);
         unoffice_mm = (TextView) findViewById(R.id.unoffice_mm);
         line = findViewById(R.id.line);
@@ -261,33 +260,33 @@ public class WorkActivity extends OABaseActivity implements View.OnClickListener
     public void onClick(View view) {
         Intent intent = null;
 
-        if (view.getId() == R.id.signin_btn){
+        if (view.getId() == R.id.signin_btn) {
             if (isSubmitAble()) {
                 isShowTocstAble = true;
                 presenter.submit((ArrayList<WorkModel>) adapter.getModels(), macAddress);
             }
-        }else if (view.getId() == R.id.date_tv){
+        } else if (view.getId() == R.id.date_tv) {
             isShowTocstAble = true;
             showDateDialog();
-        }else if (view.getId() == R.id.unoffice_){
+        } else if (view.getId() == R.id.unoffice_) {
             isShowTocstAble = true;
             presenter.gotoLocationActivity(WorkActivity.this);
-        }else if (view.getId() == R.id.super_setting_tv){
+        } else if (view.getId() == R.id.super_setting_tv) {
             startActivityForResult(new Intent(ct, SignSeniorSettingActivity.class), 0x12);
             closePopupWindow();
-        }else if (view.getId() == R.id.work_setting_tv){
+        } else if (view.getId() == R.id.work_setting_tv) {
             intent = new Intent(ct, FlightsActivity.class);
             startActivityForResult(intent, 0x12);
             closePopupWindow();
-        }else if (view.getId() == R.id.office_addr_setting_tv){
+        } else if (view.getId() == R.id.office_addr_setting_tv) {
             startActivityForResult(new Intent(ct, OfficeAddressSettingsActivity.class), 0x12);
             closePopupWindow();
-        }else if (view.getId() == R.id.my_rule_setting_tv){
+        } else if (view.getId() == R.id.my_rule_setting_tv) {
             intent = new Intent(ct, MyRuleSetActivity.class);
             presenter.showMyRele(intent, adapter.getModels());
             startActivity(intent);
             closePopupWindow();
-        }else if (view.getId() ==  R.id.cancel_tv){
+        } else if (view.getId() == R.id.cancel_tv) {
             closePopupWindow();
         }
     }

+ 3 - 3
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/presenter/WorkPresenter.java

@@ -243,7 +243,7 @@ public class WorkPresenter implements OnHttpResultListener, IWorkPresenter {
     /*请求班次数据*/
     private void loadWorkData(long time) {
         Map<String, Object> param = new HashMap<>();
-        param.put("date", DateFormatUtil.long2Str(time,"yyyyMMdd") );
+        param.put("date", DateFormatUtil.long2Str(time, "yyyyMMdd"));
         param.put("emcode", CommonUtil.getSharedPreferences(MyApplication.getInstance(), "erp_username"));
         Bundle bundle = new Bundle();
         bundle.putLong("time", time);
@@ -292,7 +292,7 @@ public class WorkPresenter implements OnHttpResultListener, IWorkPresenter {
         try {
             if (ListUtils.isEmpty(locationList)) return -1;
             for (WorkLocationModel b : locationList) {
-                String dis =  BaiduMapUtil.getInstence().getDistance(
+                String dis = BaiduMapUtil.getInstence().getDistance(
                         new LatLng(b.getLocation().longitude, b.getLocation().latitude)
                         , new LatLng(latitude, longitude));
                 if (StringUtil.isEmpty(dis)) continue;
@@ -650,7 +650,7 @@ public class WorkPresenter implements OnHttpResultListener, IWorkPresenter {
             }
         } catch (Exception e) {
             if (e != null)
-                LogUtil.i("result=" + e.getMessage());
+                LogUtil.i("result= " + what + " " + e.getMessage());
         }
     }