Ver código fonte

Merge branch 'master' into master_task_9084

# Conflicts:
#	app/src/main/java/com/fxy/main/fragment/HomePagerFragment.java
#	app/src/main/res/layout/fragment_homepager.xml
guilin 1 ano atrás
pai
commit
e765abe91f

+ 6 - 0
app/src/main/AndroidManifest.xml

@@ -259,6 +259,12 @@
             android:screenOrientation="portrait"
             tools:ignore="DuplicateActivity,LockedOrientationActivity"/>
 
+        <activity
+            android:name=".tool.OrderToolMainActivity"
+            android:windowSoftInputMode="stateHidden|adjustPan"
+            android:screenOrientation="portrait"
+            tools:ignore="DuplicateActivity,LockedOrientationActivity"/>
+
         <activity
             android:name=".putOut.DeliveryGoodsMainActivity"
             android:windowSoftInputMode="stateHidden|adjustPan"

+ 6 - 1
app/src/main/java/com/fxy/main/fragment/HomePagerFragment.java

@@ -20,6 +20,7 @@ import com.fxy.putIn.TallyMainActivity;
 import com.fxy.putIn.TrayMainActivity;
 import com.fxy.putOut.DeliveryGoodsMainActivity;
 import com.fxy.putOut.QualityInspectionMainActivity;
+import com.fxy.tool.OrderToolMainActivity;
 import com.google.zxing.Result;
 import com.fxy.baselibrary.base.BaseFragment;
 import com.fxy.baselibrary.interfaces.OnRxScanerListener;
@@ -126,7 +127,7 @@ public class HomePagerFragment extends BaseFragment implements View.OnClickListe
      * 绑定事件
      * @param v
      */
-    @OnClick({R.id.search_view, R.id.ima_or_code,R.id.ivt_tally,R.id.ivt_cargo_storage,R.id.ivt_tray,R.id.ivt_quality})
+    @OnClick({R.id.search_view, R.id.ima_or_code,R.id.ivt_tally,R.id.ivt_cargo_storage,R.id.ivt_tray,R.id.ivt_quality,R.id.ivt_order_tool})
     public void onClick(View v) {
         Bundle bundle = new Bundle();
         switch (v.getId()) {
@@ -146,6 +147,10 @@ public class HomePagerFragment extends BaseFragment implements View.OnClickListe
                 bundle.putString("action","receive");
                 intent2Page(getActivity(), QualityInspectionMainActivity.class, false,bundle);;
                 break;
+            case R.id.ivt_order_tool:
+                intent2Page(getActivity(), OrderToolMainActivity.class, false,bundle);;
+                break;
+
             default:
                 showToast("还没有配置点击事件");
                 break;

+ 2 - 1
app/src/main/java/com/fxy/main/fragment/MineFragment.java

@@ -210,7 +210,8 @@ public class MineFragment extends BaseFragment {
     }
 
     @OnClick({R.id.iv_avatar,R.id.rl_account_feedback,R.id.rl_blue_setting,R.id.rl_scan_setting,R.id.rl_account_wipeCache,
-            R.id.rl_account_versionUpdate,R.id.rl_language_change, R.id.tv_exit,R.id.rl_electronic_scale,R.id.rl_upload_files,R.id.rl_picture_selector})
+            R.id.rl_account_versionUpdate,R.id.rl_language_change, R.id.tv_exit,R.id.rl_electronic_scale,R.id.rl_upload_files,
+            R.id.rl_picture_selector})
     public void onViewClicked(View view) {
         switch (view.getId()) {
             case R.id.iv_avatar:

+ 8 - 0
app/src/main/java/com/fxy/net/Urls.java

@@ -97,6 +97,14 @@ public class Urls {
     public static final String FXY_FINISH_LOAD = "/pda/Outbound/finishLoad";
     //扫描跟踪单号
     public static final String FXY_SCAN_PALLET_TRACKING = "/pda/inbound/scanPalletTracking";
+
+    //获取批次列表
+    public static final String FXY_GET_BATCH_LIST = "/pda/tool/getBatchData";
+    //获取批次详情
+    public static final String FXY_GET_BATCH_DETAILS = "/pda/tool/getBatchDataDetail";
+    //添加扫码结果
+    public static final String FXY_ADD_SCAN_RESULT = "/pda/tool/scanLog";
+
     /*返修易 -- end*/
 
 

+ 5 - 3
app/src/main/java/com/fxy/putIn/TallyMainActivity.java

@@ -354,8 +354,7 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
             }
             return true;
         }
-        return true;
-        //return super.dispatchKeyEvent(event);
+        return super.dispatchKeyEvent(event);
     }
 
     //监听按键
@@ -1093,7 +1092,10 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
     @Override
     protected void onDestroy() {
         unbinder.unbind();
-        pictureSelectorUpload.removeHandler();
+        if (pictureSelectorUpload!=null){
+            pictureSelectorUpload.removeHandler();
+        }
+
 
         super.onDestroy();
     }

+ 40 - 0
app/src/main/java/com/fxy/realm/ToolScanRealm.java

@@ -0,0 +1,40 @@
+package com.fxy.realm;
+
+import io.realm.RealmObject;
+import io.realm.annotations.PrimaryKey;
+
+public class ToolScanRealm extends RealmObject {
+    @PrimaryKey // 必须要有一个主键
+    private String id;
+    public String scan_batch="";//
+    public String number = ""; //基数
+    public String scan_date = ""; //基数扫描时间
+    public int details_id = 0; //数据ID
+    public int tool_data_id = 0; //所属批次id
+    public int scan_result  = -1; //基数扫描结果
+    public int rules  = 0; //业务类型, 1 - 查找;  2 - 核对;3 - 扫描
+    public int push_status = 0; //状态 1 - 启用;  -1 - 禁用
+
+
+    public int getDetailsId() {return this.details_id; }
+    public int getRules() {return this.rules; }
+    public String getBatchNumber() {return this.scan_batch; }
+    public String getNumber() {return this.number; }
+    public String getScanDate() {return this.scan_date; }
+    public int getToolDataId() {return this.tool_data_id; }
+    public int getIsPdaData() {return this.scan_result; }
+    public int getPushStatus() {return this.push_status; }
+
+
+
+    public void setId(String id) {  this.id=id;}
+    public void setDetailsId(int details_id) { this.details_id=details_id; }
+    public void setRules(int rules) { this.rules=rules; }
+    public void setScanBatch(String scan_batch) { this.scan_batch = scan_batch; }
+    public void setNumber(String number) { this.number = number; }
+    public void setScanDate(String scan_date) { this.scan_date=scan_date; }
+    public void setToolDataId(int tool_data_id) { this.tool_data_id=tool_data_id; }
+    public void setIsPdaData(int scan_result) { this.scan_result=scan_result; }
+    public void setPushStatus(int push_status) { this.push_status=push_status; }
+
+}

Diferenças do arquivo suprimidas por serem muito extensas
+ 1055 - 0
app/src/main/java/com/fxy/tool/OrderToolMainActivity.java


+ 59 - 0
app/src/main/java/com/fxy/tool/bean/ToolBean.java

@@ -0,0 +1,59 @@
+package com.fxy.tool.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Created by HuangYH on 2015/9/29.
+ */
+public class ToolBean implements Parcelable {
+
+    public int id = 0;
+    public int rules = 0;
+    public String batch_name = "";
+
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeInt(this.id);
+        dest.writeInt(this.rules);
+        dest.writeString(this.batch_name);
+    }
+
+    public ToolBean() {
+    }
+
+    protected ToolBean(Parcel in) {
+        this.id = in.readInt();
+        this.rules = in.readInt();
+        this.batch_name = in.readString();
+    }
+
+    public static final Parcelable.Creator<ToolBean> CREATOR = new Parcelable.Creator<ToolBean>() {
+        @Override
+        public ToolBean createFromParcel(Parcel source) {
+            return new ToolBean(source);
+        }
+
+        @Override
+        public ToolBean[] newArray(int size) {
+            return new ToolBean[size];
+        }
+    };
+
+    public int getId(){
+        return this.id;
+    }
+    public int getRules(){
+        return this.rules;
+    }
+
+    public String getBatchName(){
+        return this.batch_name;
+    }
+}

+ 74 - 0
app/src/main/java/com/fxy/tool/bean/ToolDetailBean.java

@@ -0,0 +1,74 @@
+package com.fxy.tool.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class ToolDetailBean implements Parcelable {
+
+    public String number = ""; //基数
+    public String scan_date = ""; //基数扫描时间
+    public String realm_id = ""; //基数扫描时间
+    public int id = 0; //数据ID
+    public int tool_data_id = 0; //所属批次id
+    public int scan_result  = -1; //基数扫描结果
+    public int rules  = 0; //业务类型, 1 - 查找;  2 - 核对;3 - 扫描
+    public int push_status = 0; //状态 1 - 启用;  -1 - 禁用
+
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeInt(this.id);
+        dest.writeInt(this.rules);
+        dest.writeString(this.number);
+        dest.writeString(this.scan_date);
+        dest.writeString(this.realm_id);
+        dest.writeInt(this.tool_data_id);
+        dest.writeInt(this.scan_result);
+        dest.writeInt(this.push_status);
+
+
+    }
+
+    public ToolDetailBean() {
+
+    }
+    protected ToolDetailBean(Parcel in) {
+        this.id = in.readInt();
+        this.rules = in.readInt();
+        this.number = in.readString();
+        this.scan_date = in.readString();
+        this.realm_id = in.readString();
+        this.tool_data_id = in.readInt();
+        this.scan_result = in.readInt();
+        this.push_status = in.readInt();
+
+    }
+
+    public static final Parcelable.Creator<ToolDetailBean> CREATOR = new Parcelable.Creator<ToolDetailBean>() {
+        @Override
+        public ToolDetailBean createFromParcel(Parcel in) {
+            return new ToolDetailBean(in);
+        }
+
+        @Override
+        public ToolDetailBean[] newArray(int size) {
+            return new ToolDetailBean[size];
+        }
+    };
+    public int getId() {return this.id; }
+    public int getRules() {return this.rules; }
+    public String getNumber() {return this.number; }
+    public String getScanDate() {return this.scan_date; }
+    public String getRealmId() {return this.realm_id; }
+    public int getToolDataId() {return this.tool_data_id; }
+    public int getIsPdaData() {return this.scan_result; }
+    public int getPushStatus() {return this.push_status; }
+
+    public void setPushStatus(int push_status) {
+        this.push_status = push_status;
+    }
+}

+ 207 - 0
app/src/main/res/layout/activity_fxy_order_tool.xml

@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout 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"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:background="@color/md_grey_100"
+    android:orientation="vertical">
+
+    <ScrollView
+        android:id="@+id/ll_scroll_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:scrollbars="none">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="4dp"
+                android:background="@color/md_grey_100" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:background="@null"
+                android:gravity="center_vertical"
+                android:visibility="gone"
+                android:orientation="vertical">
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:background="@null"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal"
+                    android:padding="5dp">
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        style="@style/tvLeftStyle"
+                        android:text="错误声音:"/>
+                    <RadioGroup
+                        android:id="@+id/radioGroup2"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+
+                        android:orientation="horizontal" >
+                        <RadioButton
+                            android:id="@+id/rb_open_sound"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:checked="true"
+                            android:textSize="@dimen/t24"
+                            android:onClick="onRadioButtonClicked"
+                            android:text="开启" />
+
+                        <RadioButton
+                            android:id="@+id/rb_turn_off_sound"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:onClick="onRadioButtonClicked"
+                            android:layout_marginStart="@dimen/dp_10"
+                            android:textSize="@dimen/t24"
+                            android:text="关闭" />
+
+                    </RadioGroup>
+                </LinearLayout>
+
+            </LinearLayout>
+
+
+            <LinearLayout
+                android:id="@+id/ll_batch_box"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:gravity="center_vertical"
+                android:orientation="horizontal"
+                android:padding="5dp"
+                android:background="@drawable/bg_white_et"
+                tools:ignore="RtlSymmetry">
+
+                <com.jaredrummler.materialspinner.MaterialSpinner
+                    android:id="@+id/ms_batch"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:ellipsize="marquee"
+                    android:focusable="true"
+                    app:ms_padding_top="5dp"
+                    app:ms_padding_bottom="5dp"
+                    app:ms_padding_left="10dp"
+                    app:ms_popup_padding_left="10dp"
+                    android:gravity="center"
+                    android:hint="请提示操作批次"
+                    android:textSize="@dimen/t24"/>
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/md_grey_100" />
+
+            <LinearLayout
+                style="@style/FromLinearLayoutItem"
+                android:orientation="horizontal">
+                <EditText
+                    style="@style/EditTextStyle"
+                    android:id="@+id/et_order_no"
+                    android:hint="@string/hint_please_scan_no"
+                    android:enabled="true"
+                    android:text=""/>
+                <ImageButton
+                    style="@style/ClearImg"
+                    android:id="@+id/ib_order_no_clear"
+                    />
+
+                <include   layout="@layout/item_image_code" />
+            </LinearLayout>
+
+
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/md_grey_100" />
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/md_grey_100" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:paddingBottom="5dp"
+                android:paddingTop="5dp"
+                android:orientation="horizontal">
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    style="@style/tvLeftStyle"
+                    android:text="最近扫描:" />
+
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:background="@drawable/bg_white_et"
+
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:gravity="center_vertical"
+                android:orientation="horizontal"
+                android:scrollbars="vertical"
+                android:paddingTop="@dimen/dp_10"
+                android:paddingBottom="@dimen/dp_10"
+                >
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/recyclerview"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:background="#fff"
+                    android:overScrollMode="never"/>
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:layout_marginBottom="@dimen/dp_4"
+                android:background="@drawable/bg_white_et"
+                android:gravity="center_vertical"
+                android:orientation="horizontal"
+                android:padding="10dp">
+                <TextView
+                    style="@style/fontSize"
+                    android:id="@+id/btn_batch_upload"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:layout_marginRight="@dimen/dp_10"
+                    android:background="@drawable/bg_orange_item"
+                    android:gravity="center"
+                    android:text="批量上传数据"
+                    android:padding="10dp"
+                    android:textColor="@color/white"
+                    android:visibility="visible" />
+            </LinearLayout>
+        </LinearLayout>
+    </ScrollView>
+
+
+    <include layout="@layout/item_float_image" />
+</LinearLayout>

+ 12 - 0
app/src/main/res/layout/activity_fxy_tally.xml

@@ -42,6 +42,18 @@
             </LinearLayout>
 
 
+            <LinearLayout
+                style="@style/FromLinearLayoutItem"
+                android:orientation="horizontal">
+                <EditText
+                    style="@style/EditTextStyle"
+                    android:id="@+id/et_ctn"
+                    android:hint="请输入托数"
+                    android:enabled="true"
+                    android:text=""/>
+                <ImageButton style="@style/ClearImg" android:id="@+id/ib_ctn_clear" />
+
+            </LinearLayout>
 <!--            -->
 
             <LinearLayout

+ 45 - 0
app/src/main/res/layout/fragment_homepager.xml

@@ -201,6 +201,51 @@
 
                 </TableRow>
             </LinearLayout>
+
+
+
+
+            <LinearLayout
+                android:id="@+id/ll_tool"
+                style="@style/LinearLayoutCornerStyle"
+                android:layout_marginTop="10dp"
+                android:orientation="vertical"
+                android:padding="@dimen/dp_10"
+                android:visibility="visible">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:text="工具"
+                    android:textColor="@color/black_3d3d3d"
+                    android:textSize="@dimen/t14"
+                    android:textStyle="bold" />
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:text="@string/index_put_out"
+                    android:textColor="@color/black_3d3d3d"
+                    android:textSize="@dimen/t14"
+                    android:visibility="gone"
+                    android:textStyle="bold" />
+
+                <TableRow
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/t12"
+                    android:weightSum="2">
+
+                    <TextView
+                        style="@style/ImageViewWithTextStyle.FontSize"
+                        android:id="@+id/ivt_order_tool"
+                        android:drawableTop="@drawable/ic_mapan"
+                        android:drawablePadding="5dp"
+                        android:text="工具" />
+
+
+                </TableRow>
+            </LinearLayout>
         </LinearLayout>
     </ScrollView>
 </RelativeLayout>

+ 1 - 1
app/src/main/res/layout/item_card_intercept.xml

@@ -54,7 +54,7 @@
                     android:id="@+id/tv_status"
                     android:layout_gravity="left"
                     android:layout_width="0dp"
-                    android:layout_height="wrap_content"
+                    android:layout_height="match_parent"
                     android:layout_weight="1"
                     android:gravity="center"
                     android:textColor="@color/black_636363"

+ 10 - 3
baselibrary/src/main/java/com/fxy/baselibrary/base/BaseActivity.java

@@ -248,7 +248,6 @@ public abstract class BaseActivity extends SupportActivity implements Observer {
         if (openEventBus()) {
             EventBus.getDefault().register(this);
         }
-        Boolean AA = openRealm();
         if (openRealm()) {
             mRealm = Realm.getDefaultInstance();
         }
@@ -392,7 +391,7 @@ public abstract class BaseActivity extends SupportActivity implements Observer {
     /**
      *  返回
      */
-    private void showBack() {
+    protected void showBack() {
         tb_iv_left.setOnClickListener(new View.OnClickListener() {
 
             @Override
@@ -610,6 +609,14 @@ public abstract class BaseActivity extends SupportActivity implements Observer {
 
         }
     }
+
+    protected void showRepeatToast(String content) {
+        if (!StringUtils.isEmpty(content)) {
+            Toasty.success(this, content , Toast.LENGTH_SHORT).show();
+            playMusic(R.raw.repeat);
+        }
+    }
+
     @Override
     public boolean onKeyDown(int keyCode, KeyEvent event) {
         if (isShowBackDialog) {
@@ -763,7 +770,7 @@ public abstract class BaseActivity extends SupportActivity implements Observer {
      * 是否开启Realm数据库
      */
     public boolean openRealm() {
-        return false;
+        return true;
     }
 
     @Override

BIN
baselibrary/src/main/res/raw/repeat.mp3


+ 1 - 1
config.gradle

@@ -8,7 +8,7 @@ ext {
             minSdkVersion    : 17,
             targetSdkVersion : 23,
             versionCode      : 1,
-            versionName      : "2.1.0",
+            versionName      : "2.2.0",
             versionApi       : "2.1",
     ]