Browse Source

新增PI号显示,打印模板调整

ChengJH 3 tháng trước cách đây
mục cha
commit
7c83df75fd

+ 1 - 0
app/src/main/java/com/uas/ruiziuasmes/WorkOrderSearchActivity.java

@@ -336,6 +336,7 @@ public class WorkOrderSearchActivity extends BaseActivity {
             jltStorageInBean.setPR_DETAIL(dataObject.getString("PR_DETAIL"));
             jltStorageInBean.setPR_SPEC(dataObject.getString("PR_SPEC"));
             jltStorageInBean.setMA_KIND(dataObject.getString("MA_KIND"));
+            jltStorageInBean.setMA_POCODE(dataObject.getString("MA_POCODE"));
             mFilterStorageInBeans.add(jltStorageInBean);
             MyaddAdapter addadapter = new MyaddAdapter(this, mFilterStorageInBeans);
             recyclerView.setLayoutManager(new LinearLayoutManager(this));

+ 37 - 1
app/src/main/java/com/uas/ruiziuasmes/fragment/LabeLreprintingFragment.java

@@ -3,6 +3,7 @@ package com.uas.ruiziuasmes.fragment;
 import android.annotation.SuppressLint;
 import android.content.Intent;
 import android.os.Bundle;
+import android.util.Log;
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.inputmethod.EditorInfo;
@@ -10,7 +11,9 @@ import android.widget.Button;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.android.volley.Request;
 import com.android.volley.toolbox.StringRequest;
 import com.uas.ruiziuasmes.R;
@@ -24,6 +27,7 @@ import com.uas.ruiziuasmes.util.FragmentUtils;
 import com.uas.ruiziuasmes.util.HttpCallback;
 import com.uas.ruiziuasmes.util.HttpParams;
 import com.uas.ruiziuasmes.util.PrintUtils;
+import com.uas.ruiziuasmes.util.VolleyRequest;
 import com.uas.ruiziuasmes.util.VollyRequest;
 import com.uas.ruiziuasmes.view.ClearableEditText;
 
@@ -65,7 +69,7 @@ public class LabeLreprintingFragment extends BaseFragment implements View.OnClic
 
     @Override
     protected void initEvents() {
-
+        getPrintTemplate();
         storage_recharge_collect_ets.setOnEditorActionListener(new TextView.OnEditorActionListener() {
             @Override
             public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
@@ -88,7 +92,39 @@ public class LabeLreprintingFragment extends BaseFragment implements View.OnClic
 
 
     }
+    private void getPrintTemplate() {
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_BARINFO_PRINTMODEL)
+                        .method(Request.Method.GET)
+                        .flag(0)
+                        .tag("barinfoPrint")
+                        .addParam("caller", "Lotno!PDAPrint")//Barcode!PDAPrint仓库
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        try {
+                            String result = o.toString();
+                            Log.e("prints", result);
+                            if (FastjsonUtil.validate(result)) {
+                                JSONObject resultObject = JSON.parseObject(result);
+                                JSONArray dataArray = resultObject.getJSONArray("data");
+                                if (dataArray != null && dataArray.size() > 0) {
+                                    SharedPreUtil.saveString(mActivity, Constants.FLAG.PRINT_TEMPLATE_CACHE, dataArray.toJSONString());
+                                }
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
 
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        Log.e("printf", failStr);
+                    }
+                });
+    }
     @Override
     protected void initDatas() {
 

+ 2 - 2
build.gradle

@@ -51,8 +51,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 19,
-            versionName      : "v1.0.9"
+            versionCode      : 21,
+            versionName      : "v1.1.1"
     ]
 
     depsVersion = [