Browse Source

增加绩效接口和功能,升级一个版本

songw 1 year ago
parent
commit
20a6d9c346

+ 25 - 1
app/src/main/java/com/uas/standard_esop/activity/BannerActivity.java

@@ -3,6 +3,7 @@ package com.uas.standard_esop.activity;
 import android.content.Context;
 import android.content.Context;
 import android.content.Intent;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Bundle;
+import android.text.TextUtils;
 import android.util.Base64;
 import android.util.Base64;
 import android.util.Log;
 import android.util.Log;
 import android.view.KeyEvent;
 import android.view.KeyEvent;
@@ -44,6 +45,8 @@ public class BannerActivity extends BaseActivity {
     private ImageView iv_pepole;
     private ImageView iv_pepole;
     private TextView iv_name;
     private TextView iv_name;
     private TextView iv_jin;
     private TextView iv_jin;
+    private TextView tv_jixiao;
+    private ImageView iv_jixiao;
     private ClearableEditText at_peoplecode;
     private ClearableEditText at_peoplecode;
     private TextView get_data;
     private TextView get_data;
     //    private BasePopupView show;
     //    private BasePopupView show;
@@ -60,6 +63,8 @@ public class BannerActivity extends BaseActivity {
         iv_pepole = findViewById(R.id.iv_pepole);
         iv_pepole = findViewById(R.id.iv_pepole);
         iv_name = findViewById(R.id.iv_name);
         iv_name = findViewById(R.id.iv_name);
         iv_jin = findViewById(R.id.iv_jin);
         iv_jin = findViewById(R.id.iv_jin);
+        tv_jixiao = findViewById(R.id.tv_jixiao);
+        iv_jixiao = findViewById(R.id.iv_jixiao);
         at_peoplecode = findViewById(R.id.at_peoplecode);
         at_peoplecode = findViewById(R.id.at_peoplecode);
         get_data = findViewById(R.id.get_data);
         get_data = findViewById(R.id.get_data);
         PhotoView photoView = findViewById(R.id.photo_view);
         PhotoView photoView = findViewById(R.id.photo_view);
@@ -184,7 +189,9 @@ public class BannerActivity extends BaseActivity {
                             }else {
                             }else {
                                 String SED_EMNAME = dataObject.getString("sed_emname") == null ? "" : dataObject.getString("sed_emname");
                                 String SED_EMNAME = dataObject.getString("sed_emname") == null ? "" : dataObject.getString("sed_emname");
                                 String PATH = dataObject.getString("path") == null ? "" : dataObject.getString("path");
                                 String PATH = dataObject.getString("path") == null ? "" : dataObject.getString("path");
-                                String SED_SKILL = dataObject.getString("path") == null ? "" : dataObject.getString("sed_skill");
+                                String SED_SKILL = dataObject.getString("sed_skill") == null ? "" : dataObject.getString("sed_skill");
+                                String sed_score = dataObject.getString("sed_score") == null ? "" : dataObject.getString("sed_score");
+
                                 String strs2 = new String(Base64.decode(PATH,Base64.DEFAULT));
                                 String strs2 = new String(Base64.decode(PATH,Base64.DEFAULT));
                                 Glide.with(context)
                                 Glide.with(context)
                                         .load(strs2)
                                         .load(strs2)
@@ -192,6 +199,23 @@ public class BannerActivity extends BaseActivity {
                                         .into(iv_pepole);
                                         .into(iv_pepole);
                                 iv_name.setText("姓名:"+SED_EMNAME);
                                 iv_name.setText("姓名:"+SED_EMNAME);
                                 iv_jin.setText("技能:"+SED_SKILL);
                                 iv_jin.setText("技能:"+SED_SKILL);
+                                tv_jixiao.setText("绩效:");
+                                if (!TextUtils.isEmpty(sed_score)) {
+                                    try {
+                                        //大于等于100分显示深绿,80-99分显示浅绿,80以下显示红色
+                                        int score = Integer.parseInt(sed_score);
+                                        iv_jixiao.setVisibility(View.VISIBLE);
+                                        if (score >= 100) {
+                                            iv_jixiao.setBackground(getResources().getDrawable(R.color.jx_greens));
+                                        }else if (score < 100 && score >= 80) {
+                                            iv_jixiao.setBackground(getResources().getDrawable(R.color.jx_green));
+                                        }else {
+                                            iv_jixiao.setBackground(getResources().getDrawable(R.color.jx_red));
+                                        }
+                                    }catch (Exception e) {
+
+                                    }
+                                }
                             }
                             }
                         }
                         }
                     }
                     }

+ 30 - 0
app/src/main/res/layout-large/activity_banner.xml

@@ -105,6 +105,36 @@
                 android:layout_marginLeft="@dimen/textsize_20"
                 android:layout_marginLeft="@dimen/textsize_20"
                 android:text="技能">
                 android:text="技能">
             </TextView>
             </TextView>
+
+            <LinearLayout
+                android:layout_marginTop="5dp"
+                android:layout_width="match_parent"
+                android:layout_height="30dp"
+                android:orientation="horizontal"
+                >
+
+                <TextView
+                    android:id="@+id/tv_jixiao"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textSize="@dimen/textsize_20"
+                    android:layout_marginLeft="@dimen/textsize_20"
+                    android:layout_gravity="center_vertical"
+                    android:text="绩效">
+                </TextView>
+
+                <ImageView
+                    android:visibility="gone"
+                    android:layout_gravity="center_vertical"
+                    android:id="@+id/iv_jixiao"
+                    android:layout_width="80dp"
+                    android:layout_height="20dp"
+                    android:background="@color/red"
+                    />
+
+            </LinearLayout>
+
+
         </LinearLayout>
         </LinearLayout>
         <LinearLayout
         <LinearLayout
             android:layout_marginLeft="@dimen/textsize_20"
             android:layout_marginLeft="@dimen/textsize_20"

+ 8 - 0
app/src/main/res/values/color.xml

@@ -107,4 +107,12 @@
 
 
     <color name="me_menu_item_normal">#FAF9F9</color>
     <color name="me_menu_item_normal">#FAF9F9</color>
     <color name="me_menu_item_press">#DFDEDE</color>
     <color name="me_menu_item_press">#DFDEDE</color>
+
+
+   <!--绩效颜色-->
+    <color name="jx_red">#FF0000</color>
+    <color name="jx_green">#00FF00</color>
+    <color name="jx_greens">#3C783C</color>
+
+
 </resources>
 </resources>

+ 1 - 1
build.gradle

@@ -58,7 +58,7 @@ ext {
             compileSdkVersion: 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
             buildToolsVersion: "28.0.3",
             versionCode      : 11,
             versionCode      : 11,
-            versionName      : "v1.0.1"
+            versionName      : "v1.0.2"
     ]
     ]
 
 
     depsVersion = [
     depsVersion = [