Przeglądaj źródła

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

# Conflicts:
#	WeiChat/version.properties
raomeng 8 lat temu
rodzic
commit
9c553818db
21 zmienionych plików z 669 dodań i 1738 usunięć
  1. 3 3
      WeiChat/version.properties
  2. 1 4
      app_core/common/src/main/java/com/core/utils/CommonUtil.java
  3. 2 2
      app_core/common/src/main/java/com/core/utils/NotificationManage.java
  4. 0 83
      app_modular/apptasks/src/main/java/com/modular/apptasks/util/AutoTaskHttp.java
  5. 313 0
      app_modular/apputils/src/main/java/com/modular/apputils/activity/BaseNetActivity.java
  6. 3 4
      app_modular/apputils/src/main/java/com/modular/apputils/listener/OnSmartHttpListener.java
  7. 0 32
      app_modular/apputils/src/main/java/com/modular/apputils/network/Failure.java
  8. 187 93
      app_modular/apputils/src/main/java/com/modular/apputils/network/Parameter.java
  9. 0 106
      app_modular/apputils/src/main/java/com/modular/apputils/network/Result.java
  10. 0 138
      app_modular/apputils/src/main/java/com/modular/apputils/network/SmartHttpClient.java
  11. 0 61
      app_modular/apputils/src/main/java/com/modular/apputils/network/Success.java
  12. 36 148
      app_modular/apputils/src/main/java/com/modular/apputils/utils/TestStr.java
  13. 0 1
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountActivity.java
  14. 0 1
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountAddActivity.java
  15. 0 1
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountDetailsActivity.java
  16. 0 1
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountInfoActivity.java
  17. 0 973
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/model/TestStr.java
  18. 2 2
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/utils/AutoErpSigninUitl.java
  19. 46 57
      app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/activity/BusinessTravelActivity.java
  20. 39 4
      app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/adapter/BusinessTravelAdapter.java
  21. 37 24
      app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/model/BusinessTravel.java

+ 3 - 3
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Thu Jan 11 15:27:23 CST 2018
-debugName=399
+#Wed Jan 10 15:56:45 CST 2018
+debugName=405
 versionName=624
-debugCode=399
+debugCode=405
 versionCode=163

+ 1 - 4
app_core/common/src/main/java/com/core/utils/CommonUtil.java

@@ -100,7 +100,7 @@ public class CommonUtil {
         }
         String baseUrl = getSharedPreferences(ct, "erp_baseurl");
 //        if (BaseConfig.isDebug()){
-//            baseUrl="http://192.168.253.97:8080/ERP/";
+//            baseUrl="http://192.168.253.35:8080/ERP/";
 //        }
 //        baseUrl="http://192.168.253.203:8090/ERP/
 
@@ -525,9 +525,6 @@ public class CommonUtil {
         return StringUtil.isEmpty(name) ? "" : name;
     }
 
-    public static String getUUId() {
-        return "1";
-    }
 
 
     /**

+ 2 - 2
app_core/common/src/main/java/com/core/utils/NotificationManage.java

@@ -56,7 +56,7 @@ public class NotificationManage {
 
 
     public void sendNotification(Context context, int action, Class<? extends Activity> clazz) {
-        SharedPreferences sharePrefer = MyApplication.getInstance().getSharedPreferences("SIGNIN", Context.MODE_APPEND);
+        SharedPreferences sharePrefer = context.getSharedPreferences("SIGNIN", Context.MODE_APPEND);
         long oldTime = sharePrefer.getLong("SIGNIN_TIME", -1);
         if (System.currentTimeMillis() - oldTime > minutes2time) {//如果当前时间大于上次时间2分钟
             sharePrefer.edit().putLong("SIGNIN_TIME", System.currentTimeMillis());
@@ -72,7 +72,7 @@ public class NotificationManage {
         if (System.currentTimeMillis() - oldTime > minutes2time) {//如果当前时间大于上次时间2分钟
             sharePrefer.edit().putLong("SIGNIN_TIME", System.currentTimeMillis());
             sendNotification(context, R.drawable.uuu, context.getString(R.string.common_dialog_title), action, clazz);
-        } 
+        }
     }
 
     //update

+ 0 - 83
app_modular/apptasks/src/main/java/com/modular/apptasks/util/AutoTaskHttp.java

@@ -1,83 +0,0 @@
-package com.modular.apptasks.util;
-
-import com.alibaba.fastjson.JSONArray;
-import com.common.LogUtil;
-import com.core.api.wxapi.ApiConfig;
-import com.core.api.wxapi.ApiPlatform;
-import com.core.api.wxapi.ApiUtils;
-import com.core.net.http.http.OAHttpHelper;
-import com.core.net.http.http.Request;
-import com.core.utils.CommonUtil;
-import com.modular.apputils.listener.OnSmartHttpListener;
-import com.modular.apputils.network.Failure;
-import com.modular.apputils.network.Parameter;
-import com.modular.apputils.network.SmartHttpClient;
-import com.modular.apputils.network.Success;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Created by Bitliker on 2017/9/29
- */
-
-public class AutoTaskHttp implements OnSmartHttpListener {
-	private final int LOAD_PLAN = 21;//获取外勤计划
-	private final int SIGNIN_MISSION = 22;//外勤签到
-	private final int HAVE_OUT_PLAN = 23;//还有未拜访外勤计划
-
-	private final int LOAD_WORK_SET = 24;//获取打卡设置
-	private boolean isB2b;
-
-	public AutoTaskHttp() {
-		isB2b = ApiUtils.getApiModel() instanceof ApiPlatform;
-	}
-
-	/*获取打卡设置*/
-	public void loadWorkSet() {
-		String action = isB2b ? ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().get_plat_senior_setting_url :
-				"mobile/getconfigs.action";
-		Parameter.Builder builder = new Parameter.Builder().setAction(action).record(LOAD_WORK_SET);
-		if (!isB2b) {
-			builder.add("code", 1);
-		}
-		SmartHttpClient.api().get(builder.build(), this);
-	}
-
-	//获取外勤计划列表
-	public void loadMissionPlan() {
-		Parameter paramenter = new Parameter.Builder()
-				.setAction("mobile/mobileoutplan.action")
-				.add("emcode", CommonUtil.getEmcode())
-				.record(LOAD_PLAN)
-				.build();
-		SmartHttpClient.api().get(paramenter, this);
-	}
-
-	@Override
-	public void onSuccess(Success success) {
-		switch (success.getRecord()) {
-			case LOAD_PLAN:
-				handlerData(success.getJSONArray("data", "success"));
-				break;
-			case SIGNIN_MISSION:
-				break;
-			case HAVE_OUT_PLAN:
-				break;
-		}
-
-	}
-
-	@Override
-	public void onFailure(Failure failure) {
-		LogUtil.i(failure.getMessage());
-	}
-
-
-	private void handlerData(final JSONArray array) {
-
-
-	}
-
-}
-

+ 313 - 0
app_modular/apputils/src/main/java/com/modular/apputils/activity/BaseNetActivity.java

@@ -0,0 +1,313 @@
+package com.modular.apputils.activity;
+
+import android.app.Activity;
+import android.content.pm.ActivityInfo;
+import android.content.pm.PackageManager;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.os.Build;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.ActivityCompat;
+import android.support.v4.content.ContextCompat;
+import android.util.DisplayMetrics;
+import android.util.SparseArray;
+import android.view.View;
+
+import com.common.LogUtil;
+import com.common.data.StringUtil;
+import com.common.preferences.PreferenceUtils;
+import com.core.app.ActionBackActivity;
+import com.core.utils.CommonUtil;
+import com.core.widget.CustomProgressDialog;
+import com.me.network.app.http.HttpClient;
+import com.me.network.app.http.rx.Result2Listener;
+import com.me.network.app.http.rx.ResultSubscriber;
+import com.modular.apputils.listener.OnSmartHttpListener;
+import com.modular.apputils.network.Parameter;
+import com.modular.apputils.network.Tags;
+import com.umeng.analytics.MobclickAgent;
+
+import java.util.Locale;
+
+
+/**
+ * Created by Bitlike on 2018/1/10.
+ */
+
+public abstract class BaseNetActivity extends ActionBackActivity {
+    protected Activity ct;
+    private CustomProgressDialog progressDialog;
+    private HttpClient httpClient;
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        MobclickAgent.onResume(ct);
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        MobclickAgent.onPause(ct);
+    }
+
+    @Override
+    protected final void onCreate(Bundle savedInstanceState) {
+        preOnCreacte();
+        super.onCreate(savedInstanceState);
+        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);//竖屏
+        ct = this;
+        progressDialog = CustomProgressDialog.createDialog(this);
+        //重启之后恢复到之前的语言
+        switchLanguage(PreferenceUtils.getString(this, "language", "rCN"));
+        initHttpConfig();
+        View layout = getLayoutView();
+        if (layout == null) {
+            int layoutId = getLayoutId();
+            if (layoutId > 0) {
+                setContentView(layoutId);
+            }
+        } else {
+            setContentView(layout);
+        }
+        try {
+            init();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    protected void preOnCreacte() {
+    }
+
+    protected abstract int getLayoutId();
+
+    protected View getLayoutView() {
+        return null;
+    }
+
+    protected abstract void init() throws Exception;
+
+    protected abstract String getBaseUrl();
+
+
+    /**************网络请求**********************/
+
+    private void initHttpConfig() {
+        String baseUrl = getBaseUrl();
+        if (!StringUtil.isEmpty(baseUrl)) {
+            httpClient = new HttpClient.Builder(baseUrl).isDebug(true)
+                    .connectTimeout(5000)
+                    .readTimeout(5000).build();
+        }
+    }
+
+
+    protected void requestHttp(Parameter.Builder builder, final OnSmartHttpListener onHttpListener) {
+        if (httpClient != null && builder != null) {
+            HttpClient.Builder httpBuilder = new HttpClient.Builder();
+            final Parameter parameter = builder.builder();
+            httpBuilder.addParams(parameter.getParams())
+                    .addHeaders(parameter.getHeaders())
+                    .method(parameter.getMode())
+                    .url(parameter.getUrl())
+                    .isDebug(false);
+            if (parameter.autoProgress()) {
+                showProgress();
+            }
+            if (parameter.showLog()) {
+                LogUtil.prinlnLongMsg("SmartHttp", parameter.toString());
+            }
+            httpClient.Api().send(httpBuilder.build(), new ResultSubscriber<>(new Result2Listener<Object>() {
+                @Override
+                public void onResponse(Object o) {
+                    if (onHttpListener != null) try {
+                        Tags tags = parameter.getTag();
+                        int record = 0;
+                        if (tags != null) {
+                            record = tags.getRecord();
+                        }
+                        String message = o.toString();
+                        if (parameter.showLog()) {
+                            LogUtil.prinlnLongMsg("SmartHttp", message);
+                        }
+                        onHttpListener.onSuccess(record, message, tags);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                    dismissProgress();
+                }
+
+                @Override
+                public void onFailure(Object t) {
+                    if (onHttpListener != null) try {
+                        Tags tags = parameter.getTag();
+                        int record = 0;
+                        if (tags != null) {
+                            record = tags.getRecord();
+                        }
+                        String message = t.toString();
+                        if (parameter.showLog()) {
+                            LogUtil.prinlnLongMsg("SmartHttp", message);
+                        }
+                        onHttpListener.onFailure(record, message, tags);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                    dismissProgress();
+                }
+            }));
+        }
+    }
+
+    protected void requestCompanyHttp(Parameter.Builder builder, final OnSmartHttpListener onHttpListener) {
+        if (builder != null) {
+            String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
+            String emCode = CommonUtil.getEmcode();
+            builder.addSuperParams("sessionId", sessionId);
+            builder.addSuperParams("master", CommonUtil.getMaster());
+            builder.addSuperParams("sessionUser", emCode);
+            builder.addSuperHeaders("sessionUser", emCode);
+            builder.addSuperHeaders("Cookie", "JSESSIONID=" + sessionId);
+            requestHttp(builder, onHttpListener);
+        }
+    }
+
+
+    /*****************************显示进度框***************************************/
+    protected void showProgress() {
+        showProgress(true, "", "");
+    }
+
+    protected void showProgress(boolean cancelable) {
+        showProgress(cancelable, "", "");
+    }
+
+    protected void showProgress(boolean cancelable, String message) {
+        showProgress(cancelable, "", message);
+    }
+
+    protected void showProgress(boolean cancelable, String title, String message) {
+        if (progressDialog != null) {
+            progressDialog.setMessage(message);
+            progressDialog.setMessage(title);
+            progressDialog.setCanceledOnTouchOutside(cancelable);
+            progressDialog.setCancelable(cancelable);
+            progressDialog.show();
+        }
+    }
+
+    protected void dismissProgress() {
+        if (progressDialog != null && progressDialog.isShowing()) {
+            progressDialog.dismiss();
+        }
+    }
+
+    /*********************切换语言***************************/
+    protected void switchLanguage(String language) {
+        Resources resources = getResources();
+        Configuration config = resources.getConfiguration();
+        DisplayMetrics dm = resources.getDisplayMetrics();
+        if (language.equals("en")) {
+            config.locale = Locale.ENGLISH;
+        } else if (language.equals("rCN")) {
+            config.locale = Locale.SIMPLIFIED_CHINESE;
+        } else if (language.equals("rTW")) {
+            config.locale = Locale.TRADITIONAL_CHINESE;
+        } else if (language.equals("sys")) {
+            config.locale = Locale.getDefault();
+        }
+        resources.updateConfiguration(config, dm);
+        PreferenceUtils.putString("language", language);
+    }
+
+
+    /*********************处理权限问题*********************/
+    private SparseArray<Runnable> allowablePermissionRunnables;
+    private SparseArray<Runnable> disallowablePermissionRunnables;
+    private int permissionItem = 0;
+
+    /***********************判断是否缺少权限**********************/
+    protected boolean lacksPermission(String permission) {
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+            return ContextCompat.checkSelfPermission(ct, permission) != PackageManager.PERMISSION_GRANTED;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * 请求权限,先判断,如果没有权限就去请求
+     * 尽量不将权限请求放在onResume 中,会出现不断循环请求
+     *
+     * @param permission           权限
+     * @param allowableRunnable    当取得权限后执行操作,主线程
+     * @param disallowableRunnable 当用户拒绝权限后执行操作,主线程
+     */
+    public void requestPermission(String permission, Runnable allowableRunnable, Runnable disallowableRunnable) {
+        permissionItem++;
+        if (allowableRunnable != null) {
+            if (allowablePermissionRunnables == null) {
+                allowablePermissionRunnables = new SparseArray<>();
+            }
+            allowablePermissionRunnables.put(permissionItem, allowableRunnable);
+        }
+        if (disallowableRunnable != null) {
+            if (disallowablePermissionRunnables == null) {
+                disallowablePermissionRunnables = new SparseArray<>();
+            }
+            disallowablePermissionRunnables.put(permissionItem, disallowableRunnable);
+        }
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+            //减少是否拥有权限
+            int checkCallPhonePermission = ContextCompat.checkSelfPermission(getApplicationContext(), permission);
+            if (checkCallPhonePermission != PackageManager.PERMISSION_GRANTED) {//没有获取到权限
+//				if (!shouldShowRequestPermissionRationale(permission)) {
+                //弹出对话框接收权限
+                ActivityCompat.requestPermissions(ct, new String[]{permission}, permissionItem);
+//				} else {
+//					ToastUtil.showToast(ct, R.string.not_camera_permission);
+//				}
+            } else {
+                if (allowableRunnable != null) {
+                    allowableRunnable.run();
+                }
+            }
+        } else {
+            if (allowableRunnable != null) {
+                allowableRunnable.run();
+            }
+        }
+    }
+
+    @Override
+    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
+        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
+        if (permissions != null) {
+            for (String p : permissions) {
+                LogUtil.i("permission=" + p);
+            }
+        }
+        if (grantResults != null && grantResults.length > 0) {
+            if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+                if (allowablePermissionRunnables != null) {
+                    Runnable allowRun = allowablePermissionRunnables.get(requestCode);
+                    if (allowRun != null) {
+                        allowRun.run();
+                    }
+                }
+
+            } else {
+                if (disallowablePermissionRunnables != null) {
+                    Runnable disallowRun = disallowablePermissionRunnables.get(requestCode);
+                    if (disallowRun != null) {
+                        disallowRun.run();
+                    }
+                }
+
+            }
+        }
+    }
+
+}

+ 3 - 4
app_modular/apputils/src/main/java/com/modular/apputils/listener/OnSmartHttpListener.java

@@ -1,8 +1,7 @@
 package com.modular.apputils.listener;
 
 
-import com.modular.apputils.network.Failure;
-import com.modular.apputils.network.Success;
+import com.modular.apputils.network.Tags;
 
 /**
  * Created by Bitliker on 2017/9/29.
@@ -10,9 +9,9 @@ import com.modular.apputils.network.Success;
 
 public interface OnSmartHttpListener {
 
-	void onSuccess(Success success);
+	void onSuccess(int what,String message, Tags tag) throws Exception;
 
-	void onFailure(Failure failure);
+	void onFailure(int what,String message, Tags tag) throws Exception;
 
 
 }

+ 0 - 32
app_modular/apputils/src/main/java/com/modular/apputils/network/Failure.java

@@ -1,32 +0,0 @@
-package com.modular.apputils.network;
-
-import com.common.data.JSONUtil;
-import com.common.data.StringUtil;
-
-/**
- * Created by Bitliker on 2017/6/14.
- */
-
-public class Failure extends Result {
-	public Failure(Result result) {
-		super(result);
-	}
-
-	@Override
-	public String getMessage() {
-		if (message == null) {
-			return "";
-		} else {
-			if (isJSON()) {
-				String message = JSONUtil.getText(getMessage(), "exceptionInfo");
-				if (!StringUtil.isEmpty(message)) {
-					return message;
-				} else {
-					return super.getMessage();
-				}
-			} else {
-				return super.getMessage();
-			}
-		}
-	}
-}

+ 187 - 93
app_modular/apputils/src/main/java/com/modular/apputils/network/Parameter.java

@@ -1,6 +1,15 @@
 package com.modular.apputils.network;
 
-import com.me.network.app.http.HttpClient;
+
+import android.support.annotation.IntDef;
+
+import com.alibaba.fastjson.JSON;
+import com.me.network.app.http.Method;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * Created by Bitliker on 2017/9/29.
@@ -8,97 +17,182 @@ import com.me.network.app.http.HttpClient;
 
 public class Parameter {
 
-	private boolean neetCommon;
-	private String baseUrl;
-	private String action;
-	private Tags tags;
-	private HttpClient.Builder httpBuilder;
-
-	private Parameter() {
-	}
-
-	public boolean isNeetCommon() {
-		return neetCommon;
-	}
-
-	public String getBaseUrl() {
-		return baseUrl;
-	}
-
-	public String getAction() {
-		return action;
-	}
-
-	public HttpClient.Builder getHttpBuilder() {
-		return httpBuilder;
-	}
-
-	public Tags getTags() {
-		return tags;
-	}
-
-	public static class Builder {
-
-		private Parameter parameter;
-
-		public Builder(boolean neetCommon) {
-			parameter = new Parameter();
-			parameter.tags=new Tags();
-			parameter.neetCommon = neetCommon;
-			parameter.httpBuilder = new HttpClient.Builder();
-		}
-
-		public Builder() {
-			parameter.neetCommon = true;
-			parameter.tags=new Tags();
-			parameter.httpBuilder = new HttpClient.Builder();
-		}
-
-		public Builder setBaseUrl(String baseUrl) {
-			parameter.baseUrl = baseUrl;
-			return this;
-		}
-
-		public Builder setAction(String action) {
-			parameter.action = action;
-			return this;
-		}
-
-		public Builder add(String key, Object value) {
-			parameter.httpBuilder.add(key, value);
-			return this;
-		}
-
-		public Builder header(String key, Object value) {
-			parameter.httpBuilder.header(key, value);
-			return this;
-		}
-
-		public Builder tag(int key, Object value) {
-			parameter.tags.put(key, value);
-			return this;
-		}
-
-		public Builder tag(Object value) {
-			parameter.tags.put(Tags.DEF_TAG, value);
-			return this;
-		}
-
-		public Builder record(int value) {
-			parameter.tags.put(Tags.RECORD_TAG, value);
-			return this;
-		}
-
-		public Builder setTags(Tags tags) {
-			if (tags != null) {
-				parameter.tags = tags;
-			}
-			return this;
-		}
-
-		public Parameter build() {
-			return parameter;
-		}
-	}
+
+    public static final String MEDIA_TYPE_XWWW = "application/x-www-form-urlencoded;charset=utf-8";
+    public static final String MEDIA_TYPE_JSON = "application/json;charset=utf-8";
+    public static final String MEDIA_TYPE_PLAIN = "text/plain;charset=utf-8";
+    public static final String MEDIA_TYPE_STREAM = "application/octet-stream;charset=utf-8";
+    public static final String MEDIA_TYPE_MULTIPART = "multipart/form-data;charset=utf-8";
+
+
+    private int mode = Method.GET;//请求模式
+    private String url;//请求的url
+    private String mediaType = MEDIA_TYPE_JSON;
+    private Map<String, Object> params;
+    private Map<String, Object> headers;
+    private Tags tag;
+    private boolean autoProgress = false;
+    private boolean showLog = false;
+
+    @Override
+    public String toString() {
+        return JSON.toJSONString(this);
+    }
+
+    private Parameter() {
+        tag = new Tags();
+        params = new HashMap<>();
+        headers = new HashMap<>();
+    }
+
+    public boolean showLog() {
+        return showLog;
+    }
+
+    public boolean autoProgress() {
+        return autoProgress;
+    }
+
+    public Map<String, Object> getHeaders() {
+        return headers == null ? new HashMap<String, Object>() : headers;
+    }
+
+    public Map<String, Object> getParams() {
+        return params == null ? new HashMap<String, Object>() : params;
+    }
+
+    public Tags getTag() {
+        return tag == null ? new Tags() : tag;
+    }
+
+    public int getMode() {
+        return mode == 0 ? Method.GET : mode;
+    }
+
+
+    public String getUrl() {
+        return url;
+    }
+
+    public String getMediaType() {
+        return mediaType;
+    }
+
+    public static class Builder {
+
+        private Parameter request;
+
+        public Builder(Parameter request) {
+            this.request = request;
+        }
+
+        public Builder() {
+            this.request = new Parameter();
+        }
+
+
+        public Builder mode(@Duration int mode) {
+            this.request.mode = mode;
+            return this;
+        }
+
+        public Builder url(String url) {
+            if (url != null) {
+                this.request.url = url;
+            }
+            return this;
+        }
+
+        public Builder mediaType(String mediaType) {
+            if (mediaType != null) {
+                this.request.mediaType = mediaType;
+            }
+            return this;
+        }
+
+        public Builder headers(Map<String, Object> header) {
+            if (header != null) {
+                this.request.headers = header;
+            }
+            return this;
+        }
+
+        public Builder addHeaders(String key, Object value) {
+            this.request.getHeaders().put(key, value);
+            return this;
+        }
+
+        public Builder params(Map<String, Object> params) {
+            if (params != null) {
+                this.request.params = params;
+            }
+            return this;
+        }
+
+        public Builder addParams(String key, Object value) {
+            this.request.getParams().put(key, value);
+            return this;
+        }
+
+        public Builder addSuperParams(String key, Object value) {
+            if (!this.request.getParams().containsKey(key)) {
+                return addParams(key, value);
+            }
+            return this;
+        }
+
+        public Builder addSuperHeaders(String key, Object value) {
+            if (!this.request.getHeaders().containsKey(key)) {
+                return addHeaders(key, value);
+            }
+            return this;
+        }
+
+        public Builder tag(Object tag) {
+            if (tag != null) {
+                this.request.getTag().tag(tag);
+            }
+            return this;
+        }
+
+        public Builder record(int code) {
+            this.request.getTag().record(code);
+            return this;
+        }
+
+        public Builder autoProgress(boolean autoProgress) {
+            this.request.autoProgress = autoProgress;
+            return this;
+        }
+
+        public Builder showLog(boolean showLog) {
+            this.request.showLog = showLog;
+            return this;
+        }
+
+
+        public Builder addTag(int key, Object values) {
+            if (values != null) {
+                this.request.getTag().put(key, values);
+            }
+            return this;
+        }
+
+        public Parameter builder() {
+            return request;
+        }
+
+
+        public Parameter bulid() {
+            return request;
+        }
+    }
+
+
+    @IntDef({Method.GET, Method.POST})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface Duration {
+    }
+
 
 }

+ 0 - 106
app_modular/apputils/src/main/java/com/modular/apputils/network/Result.java

@@ -1,106 +0,0 @@
-package com.modular.apputils.network;
-
-import android.text.TextUtils;
-
-import com.alibaba.fastjson.JSON;
-
-/**
- * Created by Bitliker on 2017/7/19.
- */
-
-public class Result {
-    public static final int NETWORK_OUT = 543 >> 1;//网络连接失败
-    public static final int DATA_EXCEPTION = 542 >> 1;//数据处理异常
-    public static final int PARAMETER_ERROR = 541 >> 1;//参数错误
-    public static final int REQUEST_ERROR = 500;//请求失败
-    public static final int REQUEST_OK = 200;//请求成功
-
-    protected int code;
-    protected String message;
-    protected Tags tag;
-
-    public Result(Result result) {
-        this.code = result.code;
-        this.message = result.message;
-        this.tag = result.tag;
-    }
-
-    public Result(int code, String message) {
-        this.code = code;
-        this.message = message;
-    }
-
-
-    public Tags getTags() {
-        return tag == null ? new Tags() : tag;
-    }
-
-    public Object getTag() {
-        return getTags().getTag();
-    }
-
-    public Object getTag(int key) {
-        return getTags().get(key);
-    }
-
-    public void setTag(Tags tag) {
-        this.tag = tag;
-    }
-
-    public int getRecord() {
-        return getTags().getRecord();
-    }
-
-    public Result(int code) {
-        this.code = code;
-    }
-
-    public Result() {
-        this.code = REQUEST_ERROR;
-    }
-
-    public int getCode() {
-        return code;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public void setCode(int code) {
-        this.code = code;
-    }
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-    public boolean isJSON() {
-        return isJsonObject() || isJsonArray();
-    }
-
-    public boolean isJsonObject() {
-        if (TextUtils.isEmpty(message)) return false;
-        try {
-            JSON.parseObject(message);
-            return true;
-        } catch (Exception e) {
-            return false;
-        }
-    }
-
-    public boolean isJsonArray() {
-        if (TextUtils.isEmpty(message)) return false;
-        try {
-            JSON.parseArray(message);
-            return true;
-        } catch (Exception e) {
-            return false;
-        }
-    }
-
-    public boolean requestOK() {
-        return code == 200;
-    }
-}
-

+ 0 - 138
app_modular/apputils/src/main/java/com/modular/apputils/network/SmartHttpClient.java

@@ -1,138 +0,0 @@
-package com.modular.apputils.network;
-
-import android.support.annotation.IntDef;
-
-import com.common.LogUtil;
-import com.common.config.BaseConfig;
-import com.core.utils.CommonUtil;
-import com.me.network.app.http.HttpClient;
-import com.me.network.app.http.Method;
-import com.me.network.app.http.rx.Result2Listener;
-import com.me.network.app.http.rx.ResultSubscriber;
-import com.modular.apputils.listener.OnSmartHttpListener;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Created by Bitliker on 2017/9/29.
- */
-
-public class SmartHttpClient {
-
-	private static SmartHttpClient api;
-	private static HttpClient httpClient;
-	private static HttpClient httpClientErp;
-	private boolean isB2b;
-
-	public static SmartHttpClient api() {
-		SmartHttpClient inst = api;
-		if (inst == null) {
-			synchronized (SmartHttpClient.class) {
-				inst = api;
-				if (inst == null) {
-					inst = new SmartHttpClient();
-					api = inst;
-				}
-			}
-		}
-		return inst;
-	}
-
-	private SmartHttpClient() {
-		isB2b = false;
-	}
-
-	public void get(Parameter parameter, OnSmartHttpListener onSmartHttpListener) {
-		send(Method.GET, parameter, onSmartHttpListener);
-	}
-
-	public void post(Parameter parameter, OnSmartHttpListener onSmartHttpListener) {
-		send(Method.POST, parameter, onSmartHttpListener);
-	}
-
-	private void send(@Duration int mothod, final Parameter parameter, final OnSmartHttpListener onSmartHttpListener) {
-		if (parameter == null) {
-			return;
-		}
-		HttpClient httpClient = null;
-		if (parameter.isNeetCommon()) {
-			httpClient = getHttpClientErp(parameter.getBaseUrl());
-		} else {
-			httpClient = getHttpClient(parameter.getBaseUrl());
-		}
-		HttpClient.Builder builder = parameter.getHttpBuilder();
-		builder.method(mothod);
-		httpClient.Api().post(builder.build(), new ResultSubscriber<>(new Result2Listener<Object>() {
-			@Override
-			public void onResponse(Object t) {
-				try {
-					Result result = new Result(200, t.toString());
-					onSmartHttpListener.onSuccess(new Success(result));
-				} catch (Exception e) {
-					if (e != null) {
-						LogUtil.d("httpError", e.getMessage());
-					}
-				}
-
-			}
-
-			@Override
-			public void onFailure(Object t) {
-				try {
-					Result result = new Result(500, t.toString());
-					onSmartHttpListener.onFailure(new Failure(result));
-				} catch (Exception e) {
-					if (e != null) {
-						LogUtil.d("httpError", e.getMessage());
-					}
-				}
-			}
-		}));
-	}
-
-	private HttpClient getHttpClient(String baseUrl) {
-		if (httpClient == null) {
-			if (baseUrl == null || baseUrl.length() <= 0 || !baseUrl.startsWith("http")) {
-				baseUrl = CommonUtil.getAppBaseUrl(BaseConfig.getContext());
-			}
-			httpClient = new HttpClient.Builder(baseUrl)
-					.isDebug(BaseConfig.isDebug())
-					.connectTimeout(5000)
-					.readTimeout(5000)
-					.build();
-		}
-		return httpClient;
-	}
-
-
-	public static HttpClient getHttpClientErp(String baseUrl) {
-		if (httpClientErp == null) {
-			if (baseUrl == null || baseUrl.length() <= 0 || !baseUrl.startsWith("http")) {
-				baseUrl = CommonUtil.getAppBaseUrl(BaseConfig.getContext());
-			}
-			String sessionId = CommonUtil.getSharedPreferences(BaseConfig.getContext(), "sessionId");
-			httpClientErp = new HttpClient.Builder(baseUrl)
-					.isDebug(BaseConfig.isDebug())
-					.header("Cookie", "JSESSIONID=" + sessionId)
-					.add("master", CommonUtil.getMaster())
-					.add("sessionUser", CommonUtil.getEmcode())
-					.add("sessionId", sessionId)
-					.connectTimeout(5000)
-					.readTimeout(5000)
-					.build();
-		}
-		return httpClientErp;
-	}
-
-	public void updateB2b(boolean isB2b) {
-		this.isB2b = isB2b;
-		//TODO 进行HttpClient的初始化
-	}
-
-
-	@IntDef({Method.GET, Method.POST})
-	@Retention(RetentionPolicy.SOURCE)
-	public @interface Duration {
-	}
-}

+ 0 - 61
app_modular/apputils/src/main/java/com/modular/apputils/network/Success.java

@@ -1,61 +0,0 @@
-package com.modular.apputils.network;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.common.data.JSONUtil;
-
-/**
- * Created by Bitliker on 2017/6/14.
- */
-
-public class Success extends Result {
-
-
-	public Success(Result result) {
-		super(result);
-	}
-
-
-	public JSONObject getJsonObject() {
-		if (isJSON())
-			return JSON.parseObject(message);
-		else return new JSONObject();
-	}
-
-	public JSONObject getJsonObject(String... keys) {
-		if (isJSON()) {
-			JSONObject object = JSON.parseObject(message);
-			if (object != null && keys != null && keys.length > 0) {
-				for (String key : keys) {
-					if (object.containsKey(key) && object.get(key) instanceof JSONObject) {
-						return object.getJSONObject(key);
-					}
-				}
-			}
-		}
-		return new JSONObject();
-	}
-
-	public JSONArray getJSONArray() {
-		if (isJSON())
-			return JSON.parseArray(message);
-		else return new JSONArray();
-	}
-
-	public JSONArray getJSONArray(String... keys) {
-		try {
-			if (isJsonObject()) {
-				return JSONUtil.getJSONArray(message, keys);
-			} else if (isJsonArray()) {
-				//TODO  当返回的是数组的时候
-			}
-		} catch (Exception e) {
-			return new JSONArray();
-		}
-		return new JSONArray();
-
-	}
-
-
-}

+ 36 - 148
app_modular/apputils/src/main/java/com/modular/apputils/utils/TestStr.java

@@ -6,152 +6,40 @@ package com.modular.apputils.utils;
 
 public class TestStr {
 
-   public static final String FEEPLEASE= "{\n"+
-            "\t\"sessionId\": \"D71D476BF5EB594EDB54BF46ED12A404\",\n"+
-            "\t\"listdata\": [{\n"+
-            "\t\t\"fp_id\": 42568,\n"+
-            "\t\t\"fp_preenddate\": \"2017-09-30 14:30:00\",\n"+
-            "\t\t\"fp_prestartdate\": \"2017-09-29 09:00:00\",\n"+
-            "\t\t\"fp_code\": \"FP17090084\",\n"+
-            "\t\t\"fp_v3\": \"出差事由\",\n"+
-            "\t\t\"fp_people2\": \"出差人员编号\",\n"+
-            "\t\t\"reimbursement\": [{\n"+
-            "\t\t\t\"type\": \"train\",\n"+
-            "\t\t\t\"fpd_id\": 0121,\n"+
-            "\t\t\t\"fpd_code\": \"2017004010300\",\n"+
-            "\t\t\t\"fpd_starting\": \"深圳\",\n"+
-            "\t\t\t\"fpd_destination\": \"上海\",\n"+
-            "\t\t\t\"fpd_start_time\": 1513041215000,\n"+
-            "\t\t\t\"fpd_end_time\": 1513098815000,\n"+
-            "\t\t\t\"fpd_status\": \"已提交\",\n"+
-            "\t\t\t\"fpd_order_type\": \"成人票\",\n"+
-            "\t\t\t\"fpd_seat\": \"04车12D\",\n"+
-            "\t\t\t\"fpd_real_fee\": \"540\",\n"+
-            "\t\t\t\"fpd_expecte_fee\": \"500\",\n"+
-            "\t\t\t\"fpd_level\": \"一等座\",\n"+
-            "\t\t\t\"fpd_city\": \"深圳\",\n"+
-            "\t\t\t\"fpd_address\": null,\n"+
-            "\t\t\t\"fpd_all_time\": 280000,\n"+
-            "\t\t\t\"fpd_pay_type\": \"公司代付\",\n"+
-            "\t\t\t\"fpd_business_name\": \"深圳北站\",\n"+
-            "\t\t\t\"fpd_number\": \"1\",\n"+
-            "\t\t\t\"fpd_remark\": \"2017年12月12日,订单提交\"\n"+
-            "\t\t},{\n"+
-            "\t\t\t\"type\": \"air\",\n"+
-            "\t\t\t\"fpd_id\": 0122,\n"+
-            "\t\t\t\"fpd_code\": \"2017004010301\",\n"+
-            "\t\t\t\"fpd_starting\": \"深圳\",\n"+
-            "\t\t\t\"fpd_destination\": \"上海\",\n"+
-            "\t\t\t\"fpd_start_time\": 1513041215000,\n"+
-            "\t\t\t\"fpd_end_time\": 1513098815000,\n"+
-            "\t\t\t\"fpd_status\": \"已提交\",\n"+
-            "\t\t\t\"fpd_order_type\": \"成人票\",\n"+
-            "\t\t\t\"fpd_seat\": \"04车12D\",\n"+
-            "\t\t\t\"fpd_real_fee\": \"540\",\n"+
-            "\t\t\t\"fpd_expecte_fee\": \"500\",\n"+
-            "\t\t\t\"fpd_level\": \"头等舱\",\n"+
-            "\t\t\t\"fpd_city\": \"深圳\",\n"+
-            "\t\t\t\"fpd_address\": null,\n"+
-            "\t\t\t\"fpd_all_time\": 280000,\n"+
-            "\t\t\t\"fpd_pay_type\": \"公司代付\",\n"+
-            "\t\t\t\"fpd_business_name\": \"深圳北站\",\n"+
-            "\t\t\t\"fpd_number\": \"1\",\n"+
-            "\t\t\t\"fpd_remark\": \"2017年12月12日,订单提交\"\n"+
-            "\t\t},\n"+
-            "\t\t{\n"+
-            "\t\t\t\"type\": \"hotel\",\n"+
-            "\t\t\t\"fpd_id\": 0123,\n"+
-            "\t\t\t\"fpd_code\": \"2017004010302\",\n"+
-            "\t\t\t\"fpd_starting\": null,\n"+
-            "\t\t\t\"fpd_destination\":null,\n"+
-            "\t\t\t\"fpd_start_time\": 1513041215000,\n"+
-            "\t\t\t\"fpd_end_time\": 1513098815000,\n"+
-            "\t\t\t\"fpd_status\": \"可订购\",\n"+
-            "\t\t\t\"fpd_order_type\": \"全票\",\n"+
-            "\t\t\t\"fpd_seat\": null,\n"+
-            "\t\t\t\"fpd_real_fee\": \"540\",\n"+
-            "\t\t\t\"fpd_expecte_fee\": \"500\",\n"+
-            "\t\t\t\"fpd_level\": \"豪华单间\",\n"+
-            "\t\t\t\"fpd_city\": \"深圳\",\n"+
-            "\t\t\t\"fpd_address\": \"深圳天上人间\",\n"+
-            "\t\t\t\"fpd_all_time\": 280000,\n"+
-            "\t\t\t\"fpd_pay_type\": \"公司代付\",\n"+
-            "\t\t\t\"fpd_business_name\": \"天上人间\",\n"+
-            "\t\t\t\"fpd_number\": \"1\",\n"+
-            "\t\t\t\"fpd_remark\": \"2017年12月12日,订单提交\"\n"+
-            "\t\t}]\n"+
-            "\t},{\n"+
-            "\t\t\"fp_id\": 42568,\n"+
-            "\t\t\"fp_preenddate\": \"2017-09-30 14:30:00\",\n"+
-            "\t\t\"fp_prestartdate\": \"2017-09-29 09:00:00\",\n"+
-            "\t\t\"fp_code\": \"FP17090084\",\n"+
-            "\t\t\"fp_v3\": \"出差事由\",\n"+
-            "\t\t\"fp_people2\": \"出差人员编号\",\n"+
-            "\t\t\"reimbursement\": [{\n"+
-            "\t\t\t\"type\": \"train\",\n"+
-            "\t\t\t\"fpd_id\": 0121,\n"+
-            "\t\t\t\"fpd_code\": \"2017004010300\",\n"+
-            "\t\t\t\"fpd_starting\": \"深圳\",\n"+
-            "\t\t\t\"fpd_destination\": \"上海\",\n"+
-            "\t\t\t\"fpd_start_time\": 1513041215000,\n"+
-            "\t\t\t\"fpd_end_time\": 1513098815000,\n"+
-            "\t\t\t\"fpd_status\": \"已提交\",\n"+
-            "\t\t\t\"fpd_order_type\": \"成人票\",\n"+
-            "\t\t\t\"fpd_seat\": \"04车12D\",\n"+
-            "\t\t\t\"fpd_real_fee\": \"540\",\n"+
-            "\t\t\t\"fpd_expecte_fee\": \"500\",\n"+
-            "\t\t\t\"fpd_level\": \"一等座\",\n"+
-            "\t\t\t\"fpd_city\": \"深圳\",\n"+
-            "\t\t\t\"fpd_address\": null,\n"+
-            "\t\t\t\"fpd_all_time\": 280000,\n"+
-            "\t\t\t\"fpd_pay_type\": \"公司代付\",\n"+
-            "\t\t\t\"fpd_business_name\": \"深圳北站\",\n"+
-            "\t\t\t\"fpd_number\": \"1\",\n"+
-            "\t\t\t\"fpd_remark\": \"2017年12月12日,订单提交\"\n"+
-            "\t\t},{\n"+
-            "\t\t\t\"type\": \"air\",\n"+
-            "\t\t\t\"fpd_id\": 0122,\n"+
-            "\t\t\t\"fpd_code\": \"2017004010301\",\n"+
-            "\t\t\t\"fpd_starting\": \"深圳\",\n"+
-            "\t\t\t\"fpd_destination\": \"上海\",\n"+
-            "\t\t\t\"fpd_start_time\": 1513041215000,\n"+
-            "\t\t\t\"fpd_end_time\": 1513098815000,\n"+
-            "\t\t\t\"fpd_status\": \"已提交\",\n"+
-            "\t\t\t\"fpd_order_type\": \"成人票\",\n"+
-            "\t\t\t\"fpd_seat\": \"04车12D\",\n"+
-            "\t\t\t\"fpd_real_fee\": \"540\",\n"+
-            "\t\t\t\"fpd_expecte_fee\": \"500\",\n"+
-            "\t\t\t\"fpd_level\": \"头等舱\",\n"+
-            "\t\t\t\"fpd_city\": \"深圳\",\n"+
-            "\t\t\t\"fpd_address\": null,\n"+
-            "\t\t\t\"fpd_all_time\": 280000,\n"+
-            "\t\t\t\"fpd_pay_type\": \"公司代付\",\n"+
-            "\t\t\t\"fpd_business_name\": \"深圳北站\",\n"+
-            "\t\t\t\"fpd_number\": \"1\",\n"+
-            "\t\t\t\"fpd_remark\": \"2017年12月12日,订单提交\"\n"+
-            "\t\t},\n"+
-            "\t\t{\n"+
-            "\t\t\t\"type\": \"hotel\",\n"+
-            "\t\t\t\"fpd_id\": 0123,\n"+
-            "\t\t\t\"fpd_code\": \"2017004010302\",\n"+
-            "\t\t\t\"fpd_starting\": null,\n"+
-            "\t\t\t\"fpd_destination\":null,\n"+
-            "\t\t\t\"fpd_start_time\": 1513041215000,\n"+
-            "\t\t\t\"fpd_end_time\": 1513098815000,\n"+
-            "\t\t\t\"fpd_status\": \"可订购\",\n"+
-            "\t\t\t\"fpd_order_type\": \"全票\",\n"+
-            "\t\t\t\"fpd_seat\": null,\n"+
-            "\t\t\t\"fpd_real_fee\": \"540\",\n"+
-            "\t\t\t\"fpd_expecte_fee\": \"500\",\n"+
-            "\t\t\t\"fpd_level\": \"豪华单间\",\n"+
-            "\t\t\t\"fpd_city\": \"深圳\",\n"+
-            "\t\t\t\"fpd_address\": \"深圳天上人间\",\n"+
-            "\t\t\t\"fpd_all_time\": 280000,\n"+
-            "\t\t\t\"fpd_pay_type\": \"公司代付\",\n"+
-            "\t\t\t\"fpd_business_name\": \"天上人间\",\n"+
-            "\t\t\t\"fpd_number\": \"1\",\n"+
-            "\t\t\t\"fpd_remark\": \"2017年12月12日,订单提交\"\n"+
-            "\t\t}]\n"+
-            "\t}]\n"+
-            "}";
+   public static final String FEEPLEASE= "{\n" +
+           "\t\"listdata\": [{\n" +
+           "\t\t\"FP_ID\": 32442,\n" +
+           "\t\t\"FP_PREENDDATE\": 1516815000000,\n" +
+           "\t\t\"FP_PRESTARTDATE\": 1516221000000,\n" +
+           "\t\t\"FP_CODE\": \"2018010001\",\n" +
+           "\t\t\"FP_V3\": \"这个是目的\",\n" +
+           "\t\t\"FP_PEOPLE2\": \"U0736\",\n" +
+           "\t\t\"reimbursement\": [{\n" +
+           "\t\t\t\"FPD_ID\": 23662,\n" +
+           "\t\t\t\"FPD_RES_TYPE\": null,\n" +
+           "\t\t\t\"FPD_ORDER_CODE\": \"20180110223\",\n" +
+           "\t\t\t\"FPD_STARTING\": \"深圳\",\n" +
+           "\t\t\t\"FPD_DESTINATION\": \"南宁\",\n" +
+           "\t\t\t\"FPD_START_TIME\": 1516291200000,\n" +
+           "\t\t\t\"FPD_END_TIME\": 1516377600000,\n" +
+           "\t\t\t\"FPD_RES_STATUS\": null,\n" +
+           "\t\t\t\"FPD_RES_STATUSCODE\": null,\n" +
+           "\t\t\t\"FPD_ORDER_TYPE\": null,\n" +
+           "\t\t\t\"FPD_SEAT\": null,\n" +
+           "\t\t\t\"FPD_REAL_FEE\": null,\n" +
+           "\t\t\t\"FPD_EXPECTE_FEE\": 1231,\n" +
+           "\t\t\t\"FPD_LEVEL\": null,\n" +
+           "\t\t\t\"FPD_CITY\": null,\n" +
+           "\t\t\t\"FPD_ADDRESS\": null,\n" +
+           "\t\t\t\"FPD_ALL_TIME\": null,\n" +
+           "\t\t\t\"FPD_PAY_TYPE\": null,\n" +
+           "\t\t\t\"FPD_BUSINESS_NAME\": null,\n" +
+           "\t\t\t\"FPD_NUMBER\": 1,\n" +
+           "\t\t\t\"FPD_REMARK\": null\n" +
+           "\t\t}]\n" +
+           "\t}],\n" +
+           "\t\"success\": true,\n" +
+           "\t\"em_cttpid\": null,\n" +
+           "\t\"sessionId\": \"FF4B29623F0E5CD9A4D79160ED85160C\"\n" +
+           "}";
 }

+ 0 - 1
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountActivity.java

@@ -59,7 +59,6 @@ import com.uas.appworks.CRM.erp.adapter.CycleCountAdapter;
 import com.uas.appworks.CRM.erp.model.CycleCount;
 import com.uas.appworks.CRM.erp.model.CycleCountAdd;
 import com.uas.appworks.CRM.erp.model.DeviceInfo;
-import com.uas.appworks.CRM.erp.model.TestStr;
 import com.uas.appworks.R;
 
 import java.util.ArrayList;

+ 0 - 1
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountAddActivity.java

@@ -46,7 +46,6 @@ import com.modular.apputils.activity.SelectNetAcitivty;
 import com.uas.appworks.CRM.erp.adapter.CycleCountAdapter;
 import com.uas.appworks.CRM.erp.model.CycleCount;
 import com.uas.appworks.CRM.erp.model.CycleCountAdd;
-import com.uas.appworks.CRM.erp.model.TestStr;
 import com.uas.appworks.R;
 
 import java.util.ArrayList;

+ 0 - 1
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountDetailsActivity.java

@@ -23,7 +23,6 @@ import com.me.network.app.http.rx.ResultListener;
 import com.me.network.app.http.rx.ResultSubscriber;
 import com.uas.appworks.CRM.erp.adapter.CycleCountAdapter;
 import com.uas.appworks.CRM.erp.model.CycleCount;
-import com.uas.appworks.CRM.erp.model.TestStr;
 import com.uas.appworks.R;
 
 import java.util.ArrayList;

+ 0 - 1
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountInfoActivity.java

@@ -31,7 +31,6 @@ import com.me.network.app.http.rx.ResultListener;
 import com.me.network.app.http.rx.ResultSubscriber;
 import com.uas.appworks.CRM.erp.adapter.CycleCountAdapter;
 import com.uas.appworks.CRM.erp.model.CycleCount;
-import com.uas.appworks.CRM.erp.model.TestStr;
 import com.uas.appworks.R;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;

+ 0 - 973
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/model/TestStr.java

@@ -1,973 +0,0 @@
-package com.uas.appworks.CRM.erp.model;
-
-/**
- * Created by Bitlike on 2017/12/19.
- */
-
-public class TestStr {
-    public final static String BASE_URL = "http://192.168.253.203:8090/";
-    public final static String CYCLECOUNT_MESSAGE = "{\n" +
-            "\t\"keyField\": \"sa_id\",\n" +
-            "\t\"pfField\": \"sd_said\",\n" +
-            "\t\"sessionId\": \"951961997FFD118271BFA72A4459B7AD\",\n" +
-            "\t\"columns\": [{\n" +
-            "\t\t\"dataIndex\": \"sa_id\",\n" +
-            "\t\t\"caption\": \"ID\",\n" +
-            "\t\t\"width\": 100,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": \"0,000\",\n" +
-            "\t\t\"render\": null\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"dataIndex\": \"sa_status\",\n" +
-            "\t\t\"caption\": \"状态\",\n" +
-            "\t\t\"width\": 50,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": \"0,000\",\n" +
-            "\t\t\"render\": null\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"dataIndex\": \"sa_recorder\",\n" +
-            "\t\t\"caption\": \"录入人\",\n" +
-            "\t\t\"width\": 50,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": \"0,000\",\n" +
-            "\t\t\"render\": null\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"dataIndex\": \"sa_seller\",\n" +
-            "\t\t\"caption\": \"实行人\",\n" +
-            "\t\t\"width\": 50,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": \"0,000\",\n" +
-            "\t\t\"render\": null\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"dataIndex\": \"sa_custcode\",\n" +
-            "\t\t\"caption\": \"实行人编号\",\n" +
-            "\t\t\"width\": 100,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": \"0,000\",\n" +
-            "\t\t\"render\": null\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"dataIndex\": \"sa_recorddate\",\n" +
-            "\t\t\"caption\": \"录入日期\",\n" +
-            "\t\t\"width\": 100,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": \"0,000\",\n" +
-            "\t\t\"render\": null\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"dataIndex\": \"sa_code\",\n" +
-            "\t\t\"caption\": \"编号\",\n" +
-            "\t\t\"width\": 50,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": \"0,000\",\n" +
-            "\t\t\"render\": null\n" +
-            "\t}],\n" +
-            "\t\"listdata\": [{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"sa_status\": \"在录入\",\n" +
-            "\t\t\"sa_recorder\": \"林子健\",\n" +
-            "\t\t\"sa_seller\": \"陈炜\",\n" +
-            "\t\t\"sa_custcode\": \"HW0006\",\n" +
-            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
-            "\t\t\"sa_id\": 23039,\n" +
-            "\t\t\"sa_code\": \"SS17120001\"\n" +
-            "\t}]\n" +
-            "}";
-
-
-    public static final String CYCLE_COUNT_ADD = "{\n" +
-            "\t\"items\": [{\n" +
-            "\t\t\"fd_detno\": \"de_code\",\n" +
-            "\t\t\"fd_field\": \"db_code\",\n" +
-            "\t\t\"fd_caption\": \"单据编号\",\n" +
-            "\t\t\"fd_maxlength\": 80,\n" +
-            "\t\t\"fd_type\": \"SS\",\n" +
-            "\t\t\"fd_defaultvalue\": \"默认值\",\n" +
-            "\t\t\"fd_allowblank\": false,\n" +
-            "\t\t\"fd_group\": \"分组\",\n" +
-            "\t\t\"fd_id\": 231,\n" +
-            "\t\t\"fd_appwidth\": 12,\n" +
-            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
-            "\t\t\"fd_readonly\": false,\n" +
-            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"fd_detno\": \"de_code\",\n" +
-            "\t\t\"fd_field\": \"db_code\",\n" +
-            "\t\t\"fd_caption\": \"单据编号\",\n" +
-            "\t\t\"fd_maxlength\": 80,\n" +
-            "\t\t\"fd_type\": \"DBFIND\",\n" +
-            "\t\t\"fd_defaultvalue\": \"\",\n" +
-            "\t\t\"fd_allowblank\": true,\n" +
-            "\t\t\"fd_group\": \"分组\",\n" +
-            "\t\t\"fd_id\": 231,\n" +
-            "\t\t\"fd_appwidth\": 12,\n" +
-            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
-            "\t\t\"fd_readonly\": false,\n" +
-            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"fd_detno\": \"de_code\",\n" +
-            "\t\t\"fd_field\": \"db_code\",\n" +
-            "\t\t\"fd_caption\": \"单据编号\",\n" +
-            "\t\t\"fd_maxlength\": 80,\n" +
-            "\t\t\"fd_type\": \"SS\",\n" +
-            "\t\t\"fd_defaultvalue\": \"默认值\",\n" +
-            "\t\t\"fd_allowblank\": false,\n" +
-            "\t\t\"fd_group\": \"分组\",\n" +
-            "\t\t\"fd_id\": 231,\n" +
-            "\t\t\"fd_appwidth\": 12,\n" +
-            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
-            "\t\t\"fd_readonly\": false,\n" +
-            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"fd_detno\": \"de_code\",\n" +
-            "\t\t\"fd_field\": \"db_code\",\n" +
-            "\t\t\"fd_caption\": \"单据编号\",\n" +
-            "\t\t\"fd_maxlength\": 80,\n" +
-            "\t\t\"fd_type\": \"DBFIND\",\n" +
-            "\t\t\"fd_defaultvalue\": \"\",\n" +
-            "\t\t\"fd_allowblank\": false,\n" +
-            "\t\t\"fd_group\": \"分组\",\n" +
-            "\t\t\"fd_id\": 231,\n" +
-            "\t\t\"fd_appwidth\": 12,\n" +
-            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
-            "\t\t\"fd_readonly\": false,\n" +
-            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"fd_detno\": \"de_code\",\n" +
-            "\t\t\"fd_field\": \"db_code\",\n" +
-            "\t\t\"fd_caption\": \"单据编号\",\n" +
-            "\t\t\"fd_maxlength\": 80,\n" +
-            "\t\t\"fd_type\": \"DBFIND\",\n" +
-            "\t\t\"fd_defaultvalue\": \"\",\n" +
-            "\t\t\"fd_allowblank\": true,\n" +
-            "\t\t\"fd_group\": \"分组\",\n" +
-            "\t\t\"fd_id\": 231,\n" +
-            "\t\t\"fd_appwidth\": 12,\n" +
-            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
-            "\t\t\"fd_readonly\": false,\n" +
-            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"fd_detno\": \"de_code\",\n" +
-            "\t\t\"fd_field\": \"db_code\",\n" +
-            "\t\t\"fd_caption\": \"单据编号\",\n" +
-            "\t\t\"fd_maxlength\": 80,\n" +
-            "\t\t\"fd_type\": \"SS\",\n" +
-            "\t\t\"fd_defaultvalue\": \"默认值\",\n" +
-            "\t\t\"fd_allowblank\": false,\n" +
-            "\t\t\"fd_group\": \"分组\",\n" +
-            "\t\t\"fd_id\": 231,\n" +
-            "\t\t\"fd_appwidth\": 12,\n" +
-            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
-            "\t\t\"fd_readonly\": false,\n" +
-            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"fd_detno\": \"de_code\",\n" +
-            "\t\t\"fd_field\": \"db_code\",\n" +
-            "\t\t\"fd_caption\": \"单据编号\",\n" +
-            "\t\t\"fd_maxlength\": 80,\n" +
-            "\t\t\"fd_type\": \"DBFIND\",\n" +
-            "\t\t\"fd_defaultvalue\": \"\",\n" +
-            "\t\t\"fd_allowblank\": true,\n" +
-            "\t\t\"fd_group\": \"分组\",\n" +
-            "\t\t\"fd_id\": 231,\n" +
-            "\t\t\"fd_appwidth\": 12,\n" +
-            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
-            "\t\t\"fd_readonly\": false,\n" +
-            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
-            "\t}]\n" +
-            "}";
-    public static final String CYCLE_INFO = "{\n" +
-            "\t\"data\": {\n" +
-            "\t\t\"DB_ID\": 122,\n" +
-            "\t\t\"DB_CODE\": \"盘点单号\",\n" +
-            "\t\t\"DB_CENTERCODE\": \"所属部门编号\",\n" +
-            "\t\t\"DB_CENTERNAME\": \"所属部门名称\",\n" +
-            "\t\t\"DB_LINECODE\": \"所属线别\",\n" +
-            "\t\t\"DB_DEVKIND \": \"设备种类\",\n" +
-            "\t\t\"DB_INMAN \": \"录入人\",\n" +
-            "\t\t\"DB_INDATE\": \"录入日期\",\n" +
-            "\t\t\"DB_UNACTIONQTY\": 1223,\n" +
-            "\t\t\"DB_ACTIONQTY\": 1223\n" +
-            "\t}\n" +
-            "}";
-    public static final String CYCLE_DETAILS = "{\n" +
-            "    \"gridItem\": [\n" +
-            "        {\n" +
-            "            \"dataIndex\": \"da_detno\",\n" +
-            "            \"caption\": \"序号\",\n" +
-            "            \"width\": 80,\n" +
-            "            \"type\": \"numberfield\",\n" +
-            "            \"format\": null,\n" +
-            "            \"render\": \"\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"dataIndex\": \"da_id\",\n" +
-            "            \"caption\": \"ID\",\n" +
-            "            \"width\": 80,\n" +
-            "            \"type\": \"numberfield\",\n" +
-            "            \"format\": null,\n" +
-            "            \"render\": \"\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"dataIndex\": \"da_devcode\",\n" +
-            "            \"caption\": \"编号\",\n" +
-            "            \"width\": 80,\n" +
-            "            \"type\": \"numberfield\",\n" +
-            "            \"format\": null,\n" +
-            "            \"render\": \"\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"dataIndex\": \"da_attname\",\n" +
-            "            \"caption\": \"名称\",\n" +
-            "            \"width\": 80,\n" +
-            "            \"type\": \"numberfield\",\n" +
-            "            \"format\": null,\n" +
-            "            \"render\": \"\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"dataIndex\": \"da_attvalue\",\n" +
-            "            \"caption\": \"说明\",\n" +
-            "            \"width\": 80,\n" +
-            "            \"type\": \"numberfield\",\n" +
-            "            \"format\": null,\n" +
-            "            \"render\": \"\"\n" +
-            "        }\n" +
-            "    ],\n" +
-            "    \"gridData\": [\n" +
-            "        {\n" +
-            "            \"da_id\": 12,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 13,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 14,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 15,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 16,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 17,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 18,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 19,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 120,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 1312,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 1212,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 1211,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 123,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 125,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 127,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 121213,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 1112,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 121231,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 12131,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 121234124,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 1212313,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 1214123,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 121241224,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 121241,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"da_id\": 1213123,\n" +
-            "            \"da_devcode\": \"DE120334\",\n" +
-            "            \"da_detno\": 1,\n" +
-            "            \"da_attname\": \"分辨率\",\n" +
-            "            \"da_attvalue\": \"600大批dpi\"\n" +
-            "        }\n" +
-            "    ]\n" +
-            "}";
-    public static final String SUBMIT_CYCLE = "{\n" +
-            "    \"data\": {\n" +
-            "        \"DE_CODE\": \"设备编号\",\n" +
-            "        \"DE_NAME\": \"设备名称\",\n" +
-            "        \"DE_SPEC\": \"设备规格\",\n" +
-            "        \"DB_UNACTIONQTY\": 12\n" +
-            "    }\n" +
-            "}";
-    public static final String SCAN_DETAIL = "{\n" +
-            "\t\"formItem\": [{\n" +
-            "\t\t\"field\": \"de_code\",\n" +
-            "\t\t\"caption\": \"设备编号\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"type\": \"textfield\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"field\": \"de_maintenancedate\",\n" +
-            "\t\t\"caption\": \"最后盘点日期\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"type\": \"textfield\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"field\": \"de_startdate\",\n" +
-            "\t\t\"caption\": \"开始日期\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"type\": \"textfield\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"field\": \"de_currentuser\",\n" +
-            "\t\t\"caption\": \"当前使用人\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"type\": \"textfield\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"field\": \"de_name\",\n" +
-            "\t\t\"caption\": \"设备名称\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"type\": \"textfield\"\n" +
-            "\t}],\n" +
-            "\t\"formData\": {\n" +
-            "\t\t\"de_code\": \"DE203923\",\n" +
-            "\t\t\"de_name\": \"打印机XI4\",\n" +
-            "\t\t\"de_maintenancedate\": \"2017-12-12 00:00:00\",\n" +
-            "\t\t\"de_startdate\": \"2017-12-12 00:00:00\",\n" +
-            "\t\t\"de_currentuser\": \"小明\"\n" +
-            "\t},\n" +
-            "\t\"grid1Item\": [{\n" +
-            "\t\t\"dataIndex\": \"da_detno\",\n" +
-            "\t\t\"caption\": \"序号\",\n" +
-            "\t\t\"width\": 80,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"render\": \"\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"dataIndex\": \"DE120334\",\n" +
-            "\t\t\"caption\": \"设备编号\",\n" +
-            "\t\t\"width\": 80,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"render\": \"\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"dataIndex\": \"da_attname\",\n" +
-            "\t\t\"caption\": \"什么鬼名称\",\n" +
-            "\t\t\"width\": 80,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"render\": \"\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"dataIndex\": \"da_attvalue\",\n" +
-            "\t\t\"caption\": \"什么鬼的值\",\n" +
-            "\t\t\"width\": 80,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"render\": \"\"\n" +
-            "\t}],\n" +
-            "\t\"grid1Data\": [{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t}],\n" +
-            "\t\"grid2Item\": [{\n" +
-            "\t\t\"dataIndex\": \"da_detno\",\n" +
-            "\t\t\"caption\": \"序号\",\n" +
-            "\t\t\"width\": 80,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"render\": \"\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"dataIndex\": \"DE120334\",\n" +
-            "\t\t\"caption\": \"设备编号\",\n" +
-            "\t\t\"width\": 80,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"render\": \"\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"dataIndex\": \"da_attname\",\n" +
-            "\t\t\"caption\": \"什么鬼名称\",\n" +
-            "\t\t\"width\": 80,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"render\": \"\"\n" +
-            "\t},\n" +
-            "\t{\n" +
-            "\t\t\"dataIndex\": \"da_attvalue\",\n" +
-            "\t\t\"caption\": \"什么鬼的值\",\n" +
-            "\t\t\"width\": 80,\n" +
-            "\t\t\"type\": \"numberfield\",\n" +
-            "\t\t\"format\": null,\n" +
-            "\t\t\"render\": \"\"\n" +
-            "\t}],\n" +
-            "\t\"grid2Data\": [{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t},{\n" +
-            "\t\t\"da_devcode\": \"DE120334\",\n" +
-            "\t\t\"da_detno\": 1,\n" +
-            "\t\t\"da_attname\": \"分辨率\",\n" +
-            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
-            "\t}]\n" +
-            "}";
-}

+ 2 - 2
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/utils/AutoErpSigninUitl.java

@@ -13,6 +13,7 @@ import com.baidu.mapapi.model.LatLng;
 import com.baidu.mapapi.search.route.DrivingRouteLine;
 import com.baidu.mapapi.search.route.DrivingRouteResult;
 import com.common.LogUtil;
+import com.common.config.BaseConfig;
 import com.common.data.DateFormatUtil;
 import com.common.data.JSONUtil;
 import com.common.data.ListUtils;
@@ -56,7 +57,6 @@ import java.util.List;
 import java.util.Map;
 
 import static com.core.app.AppConstant.CHANGE_WORK_TASK;
-import static com.core.net.http.ViewUtil.ct;
 import static com.core.utils.CommonUtil.getSharedPreferences;
 
 /**
@@ -127,7 +127,7 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
     public void signinMission(MissionModel model) {
         if (model == null) return;
         if (!MyApplication.getInstance().isNetworkActive()) {
-            notificationManage.sendNotification(ct, R.string.out_net_signin, MissionActivity.class);
+            notificationManage.sendNotification(BaseConfig.getContext(), R.string.out_net_signin, MissionActivity.class);
             CommonUtil.saveAutoLogtoLocal(getString(R.string.auto_outplan_failed), getString(R.string.common_notlinknet));
             return;
         }

+ 46 - 57
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/activity/BusinessTravelActivity.java

@@ -1,24 +1,21 @@
 package com.uas.appworks.OA.platform.activity;
 
-import android.os.Bundle;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
-import android.util.Log;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.common.LogUtil;
 import com.common.config.BaseConfig;
 import com.common.data.JSONUtil;
 import com.common.data.ListUtils;
-import com.core.base.BaseActivity;
 import com.core.utils.CommonUtil;
-import com.core.utils.ToastUtil;
-import com.me.network.app.http.HttpClient;
 import com.me.network.app.http.Method;
-import com.me.network.app.http.rx.Result2Listener;
-import com.me.network.app.http.rx.ResultListener;
-import com.me.network.app.http.rx.ResultSubscriber;
+import com.modular.apputils.activity.BaseNetActivity;
+import com.modular.apputils.listener.OnSmartHttpListener;
+import com.modular.apputils.network.Parameter;
+import com.modular.apputils.network.Tags;
+import com.modular.apputils.utils.TestStr;
 import com.modular.apputils.widget.SpaceItemDecoration;
 import com.module.recyclerlibrary.ui.refresh.BaseRefreshLayout;
 import com.uas.appworks.OA.platform.adapter.BusinessTravelAdapter;
@@ -28,28 +25,28 @@ import com.uas.appworks.R;
 import java.util.ArrayList;
 import java.util.List;
 
-public class BusinessTravelActivity extends BaseActivity {
-    private HttpClient httpClient = new HttpClient.Builder(CommonUtil.getAppBaseUrl(BaseConfig.getContext()))
-            .readTimeout(5000)
-            .connectTimeout(5000)
-            .add("master", CommonUtil.getMaster())
-            .add("sessionUser", CommonUtil.getEmcode())
-            .add("sessionId", CommonUtil.getSharedPreferences(BaseConfig.getContext(), "sessionId"))
-            .isDebug(true).build();
+public class BusinessTravelActivity extends BaseNetActivity implements OnSmartHttpListener {
     private BaseRefreshLayout mRefreshLayout;
     private RecyclerView mRecyclerView;
     private BusinessTravelAdapter mAdapter;
-
     private int page = 1;
 
     @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_business_travel);
+    protected int getLayoutId() {
+        return R.layout.activity_business_travel;
+    }
+
+    @Override
+    protected void init() throws Exception {
         initView();
         loadData(page = 1);
     }
 
+    @Override
+    protected String getBaseUrl() {
+        return CommonUtil.getAppBaseUrl(BaseConfig.getContext());
+    }
+
     private void initView() {
         mRefreshLayout = findViewById(R.id.mRefreshLayout);
         mRecyclerView = findViewById(R.id.mRecyclerView);
@@ -69,64 +66,56 @@ public class BusinessTravelActivity extends BaseActivity {
 
     public void loadData(int page) {
         if (!mRefreshLayout.isRefreshing()) {
-            progressDialog.show();
+            showProgress();
         }
-        httpClient.Api().send(new HttpClient.Builder()
-                .url("mobile/getBussinessTrip.action")
-                .add("emcode", CommonUtil.getEmcode())
-                .header("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(BaseConfig.getContext(), "sessionId"))
-                .method(Method.POST)
-                .build(), new ResultSubscriber<>(new Result2Listener<Object>() {
-            @Override
-            public void onResponse(Object o) {
-                try {
-                    if (o != null) {
-                        LogUtil.d("businesstravelresult", o.toString());
-                        handlerData(o.toString());
-                    }
-                } catch (Exception e) {
-                    if (e != null) {
-                        LogUtil.i("e=" + e.getMessage());
-                        ToastUtil.showToast(ct, e.getMessage());
-                    }
-                }
-                mRefreshLayout.stopRefresh();
-                progressDialog.dismiss();
-            }
+        Parameter.Builder builder = new Parameter.Builder();
+        builder.url("mobile/getBussinessTrip.action")
+                .addParams("emcode", CommonUtil.getEmcode())
+                .mode(Method.POST)
+                .showLog(BaseConfig.showLogAble());
+        requestCompanyHttp(builder, this);
+    }
 
-            @Override
-            public void onFailure(Object t) {
-                mRefreshLayout.stopRefresh();
-                progressDialog.dismiss();
-                LogUtil.d("businesstravelerror", t.toString());
-            }
-        }));
+
+
+    @Override
+    public void onSuccess(int what, String message, Tags tags) throws Exception {
+        handlerData(message);
+        mRefreshLayout.stopRefresh();
+        dismissProgress();
     }
 
+    @Override
+    public void onFailure(int what, String message, Tags tags) throws Exception {
+        handlerData(TestStr.FEEPLEASE);
+        mRefreshLayout.stopRefresh();
+        dismissProgress();
+    }
+
+
     private void handlerData(String message) throws Exception {
-        JSONArray listdata = JSONUtil.getJSONArray(message, "listdata");
+        JSONObject object= JSON.parseObject(message);
+        JSONArray listdata = JSONUtil.getJSONArray(object, "listdata");
         List<BusinessTravel> models = new ArrayList<>();
         BusinessTravel model = null;
+        String cttpid=JSONUtil.getText(object, "em_cttpid");
         for (int i = 0; i < listdata.size(); i++) {
             JSONObject data = listdata.getJSONObject(i);
             model = new BusinessTravel();
             model.setType(BusinessTravel.TITLE);
-            model.setCode(JSONUtil.getText(data, "fp_id"));
+            model.setCode(JSONUtil.getText(data, "FP_ID"));
             models.add(model);
             JSONArray reimbursements = JSONUtil.getJSONArray(data, "reimbursement");
             for (int j = 0; j < reimbursements.size(); j++) {
-                models.add(new BusinessTravel(reimbursements.getJSONObject(i)));
+                models.add(new BusinessTravel(cttpid,reimbursements.getJSONObject(i)));
             }
         }
-
         setAdapter(models);
     }
 
     private void setAdapter(List<BusinessTravel> models) {
         if (BaseConfig.isDebug()) {
-            if (ListUtils.isEmpty(models)) {
 
-            }
         }
         if (mAdapter == null) {
             mAdapter = new BusinessTravelAdapter(ct, models, new BusinessTravelAdapter.OnItemClickListener() {

+ 39 - 4
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/adapter/BusinessTravelAdapter.java

@@ -9,8 +9,12 @@ import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 
+import com.alibaba.fastjson.JSON;
+import com.common.LogUtil;
 import com.common.data.DateFormatUtil;
 import com.common.data.ListUtils;
+import com.common.data.StringUtil;
+import com.core.utils.CommonUtil;
 import com.modular.apputils.widget.TravelDirectionView;
 import com.uas.appworks.OA.platform.model.BusinessTravel;
 import com.uas.appworks.R;
@@ -25,11 +29,13 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
     private Context ct;
     private List<BusinessTravel> models;
     private OnItemClickListener listener;
+    private String currentName;
 
     public BusinessTravelAdapter(Context ct, List<BusinessTravel> models, OnItemClickListener listener) {
         this.ct = ct;
         this.models = models;
         this.listener = listener;
+        this.currentName = CommonUtil.getName();
     }
 
 
@@ -89,12 +95,14 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
         holder.codeTv.setText(model.getCode());
     }
 
+    private final String DONE_SUBMIT = "预约/订票";
+    private final String DONE_CANCEL = "取消预约";
 
     private void bindBaseView(BaseViewHlder holder, BusinessTravel model, int position) {
         holder.codeTv.setText(model.getTitle());
         holder.statusTv.setText(model.getStatus());
-        holder.nameTv.setText("龚鹏明");
-        holder.idCardTv.setText("450122xxxxxxx");
+        holder.nameTv.setText(currentName == null ? "**" : currentName);
+        holder.idCardTv.setText(model.getCttpid());
         holder.seatTv.setText(model.getSeat());
         holder.realFeeTv.setText(model.getRealFee());
         holder.payTypeTv.setText(model.getPayType());
@@ -102,6 +110,15 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
         holder.expecteFeeTv.setText(model.getExpecteFee());
         holder.idTypeTv.setText("二代身份证");
         holder.dateTv.setText(model.getDate());
+        if (StringUtil.isEmpty(model.getCode())) {
+            holder.doneTv.setText(DONE_SUBMIT);
+            holder.doneTv.setBackgroundResource(R.drawable.text_frame_radian_hint_bg);
+            holder.doneTv.setTextColor(ct.getResources().getColor(R.color.text_hine));
+        } else {
+            holder.doneTv.setText(DONE_CANCEL);
+            holder.doneTv.setBackgroundResource(R.drawable.text_frame_radian_red_bg);
+            holder.doneTv.setTextColor(ct.getResources().getColor(R.color.indianred));
+        }
         holder.doneTv.setTag(R.id.tag_key, model);
         holder.doneTv.setTag(R.id.tag_key2, position);
         holder.doneTv.setOnClickListener(this);
@@ -128,9 +145,14 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
         holder.mTravelDirectionView.setData(model.getSeat(), longTime2Time(model.getAllTime()));
         //改签
         if (model.canChange()) {
+            holder.changeTv.setVisibility(View.VISIBLE);
+            holder.changeTv.setBackgroundResource(R.drawable.text_frame_radian_hint_bg);
+            holder.changeTv.setTextColor(ct.getResources().getColor(R.color.text_hine));
             holder.changeTv.setTag(R.id.tag_key, model);
-            holder.changeTv.setTag(R.id.tag_key2,position );
+            holder.changeTv.setTag(R.id.tag_key2, position);
             holder.changeTv.setOnClickListener(this);
+        } else {
+            holder.changeTv.setVisibility(View.GONE);
         }
     }
 
@@ -263,9 +285,22 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
     public void onClick(View v) {
         BusinessTravel model = (BusinessTravel) v.getTag(R.id.tag_key);
         int position = (int) v.getTag(R.id.tag_key2);
-        if (v.getId() == R.id.expandTv) {
+        LogUtil.i("model=" + JSON.toJSONString(model));
+        LogUtil.i("position=" + position);
+        int id = v.getId();
+        if (id == R.id.expandTv) {
             model.setExpand(!model.isExpand());
             notifyItemChanged(position);
+        } else if (R.id.doneTv == id && v instanceof TextView) {
+            TextView doneTv = (TextView) v;
+            String doneMessage = StringUtil.getText(doneTv);
+            if (doneMessage.equals(DONE_CANCEL)) {
+                LogUtil.i("点击了取消预约");
+            } else {
+                LogUtil.i("点击了预约/订票");
+            }
+        } else if (R.id.changeTv == id) {
+            LogUtil.i("点击了改签");
         }
     }
 

+ 37 - 24
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/model/BusinessTravel.java

@@ -3,6 +3,7 @@ package com.uas.appworks.OA.platform.model;
 import com.alibaba.fastjson.JSONObject;
 import com.common.data.DateFormatUtil;
 import com.common.data.JSONUtil;
+import com.common.data.StringUtil;
 
 
 /**
@@ -35,32 +36,41 @@ public class BusinessTravel {
     private String businessName;
     private String remark;
     private String title;
+    private String cttpid;
 
     public BusinessTravel() {
     }
 
-    public BusinessTravel(JSONObject reimbursement) {
+    public BusinessTravel(String cttpid, JSONObject reimbursement) {
         try {
-            id = JSONUtil.getInt(reimbursement, "fpd_id");
-            String type = JSONUtil.getText(reimbursement, "type");
-            code = JSONUtil.getText(reimbursement, "fpd_code");
-            starting = JSONUtil.getText(reimbursement, "fpd_starting");
-            destination = JSONUtil.getText(reimbursement, "fpd_destination");
-            startTime = JSONUtil.getLong(reimbursement, "fpd_start_time");
-            endTime = JSONUtil.getLong(reimbursement, "fpd_end_time");
-            status = JSONUtil.getText(reimbursement, "fpd_status");
-            orderType = JSONUtil.getText(reimbursement, "fpd_order_type");
-            seat = JSONUtil.getText(reimbursement, "fpd_seat");
-            realFee = JSONUtil.getText(reimbursement, "fpd_real_fee");
-            expecteFee = JSONUtil.getText(reimbursement, "fpd_expecte_fee");
-            level = JSONUtil.getText(reimbursement, "fpd_level");
-            city = JSONUtil.getText(reimbursement, "fpd_city");
-            address = JSONUtil.getText(reimbursement, "fpd_address");
-            allTime = JSONUtil.getLong(reimbursement, "fpd_all_time");
-            number = JSONUtil.getInt(reimbursement, "fpd_number");
-            payType = JSONUtil.getText(reimbursement, "fpd_pay_type");
-            businessName = JSONUtil.getText(reimbursement, "fpd_business_name");
-            remark = JSONUtil.getText(reimbursement, "fpd_remark");
+            this.cttpid = cttpid;
+            id = JSONUtil.getInt(reimbursement, "FPD_ID");
+            String type = JSONUtil.getText(reimbursement, "FPD_RES_TYPE");
+            code = JSONUtil.getText(reimbursement, "FPD_ORDER_CODE");
+            starting = JSONUtil.getText(reimbursement, "FPD_STARTING");
+            destination = JSONUtil.getText(reimbursement, "FPD_DESTINATION");
+            startTime = JSONUtil.getLong(reimbursement, "FPD_START_TIME");
+            endTime = JSONUtil.getLong(reimbursement, "FPD_END_TIME");
+            status = JSONUtil.getText(reimbursement, "FPD_RES_STATUS");
+            orderType = JSONUtil.getText(reimbursement, "FPD_ORDER_TYPE");
+            seat = JSONUtil.getText(reimbursement, "FPD_SEAT");
+            realFee = JSONUtil.getText(reimbursement, "FPD_REAL_FEE");
+            expecteFee = JSONUtil.getText(reimbursement, "FPD_EXPECTE_FEE");
+            level = JSONUtil.getText(reimbursement, "FPD_LEVEL");
+            city = JSONUtil.getText(reimbursement, "FPD_CITY");
+            address = JSONUtil.getText(reimbursement, "FPD_ADDRESS");
+            allTime = JSONUtil.getLong(reimbursement, "FPD_ALL_TIME");
+            number = JSONUtil.getInt(reimbursement, "FPD_PAY_TYPE");
+            payType = JSONUtil.getText(reimbursement, "FPD_BUSINESS_NAME");
+            businessName = JSONUtil.getText(reimbursement, "FPD_NUMBER");
+            remark = JSONUtil.getText(reimbursement, "FPD_REMARK");
+            if (StringUtil.isEmpty(type)) {
+                type = "train";
+            }
+            if (allTime == 0) {
+                allTime = endTime - startTime;
+            }
+
             if (type.equals("train")) {
                 title = "火车票";
                 this.type = AIR;
@@ -106,6 +116,10 @@ public class BusinessTravel {
         return allTime;
     }
 
+    public String getCttpid() {
+        return StringUtil.isEmpty(cttpid) ? "****" : cttpid;
+    }
+
     public void setAllTime(long allTime) {
         this.allTime = allTime;
     }
@@ -247,15 +261,14 @@ public class BusinessTravel {
     }
 
     public boolean canChange() {
-        //TODO 判断时候可以改签
         return true;
     }
 
     public String getTitle() {
-        return title + "   " + code;
+        return title + "   " + (StringUtil.isEmpty(code) ? "未订票" : code);
     }
 
     public String getDate() {
-        return type==AIR?(DateFormatUtil.long2Str(endTime,"yyyy-MM-dd")):(DateFormatUtil.long2Str(startTime,"yyyy-MM-dd")+"-"+DateFormatUtil.long2Str(endTime,"yyyy-MM-dd"));
+        return type == AIR ? (DateFormatUtil.long2Str(endTime, "yyyy-MM-dd")) : (DateFormatUtil.long2Str(startTime, "yyyy-MM-dd") + "-" + DateFormatUtil.long2Str(endTime, "yyyy-MM-dd"));
     }
 }