From d17be73f53c21c5ceae03fe8494c195f0bbf4abf Mon Sep 17 00:00:00 2001
From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期三, 29 三月 2017 14:10:19 +0800
Subject: [PATCH] 

---
 VisitFace/DemoForBsk/app/src/main/java/com/bsk/zhangbo/demoforbsk/service/VisitorCheckInMng.java |   49 +++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 45 insertions(+), 4 deletions(-)

diff --git a/VisitFace/DemoForBsk/app/src/main/java/com/bsk/zhangbo/demoforbsk/service/VisitorCheckInMng.java b/VisitFace/DemoForBsk/app/src/main/java/com/bsk/zhangbo/demoforbsk/service/VisitorCheckInMng.java
index 24398dd..3e56fca 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/com/bsk/zhangbo/demoforbsk/service/VisitorCheckInMng.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/com/bsk/zhangbo/demoforbsk/service/VisitorCheckInMng.java
@@ -1,6 +1,9 @@
 package com.bsk.zhangbo.demoforbsk.service;
 
+import android.widget.Toast;
+
 import com.bsk.zhangbo.demoforbsk.base.BaseApplication;
+import com.bsk.zhangbo.demoforbsk.ui.fragment.OneFragment;
 import com.bsk.zhangbo.demoforbsk.ui.fragment.VisitorRegisterFragment;
 import com.bsk.zhangbo.demoforbsk.util.AppApi;
 
@@ -41,19 +44,57 @@
     }
 
     /**
+     * 鏌ヨ鏉ヨ浜哄憳鍒楄〃
+     */
+    public void findVisitorList() {
+        //id锛屽悕绉帮紝澶村儚璺緞锛岃仈绯荤數璇濓紝鍏徃鍚嶇О锛岃瘉浠剁紪鍙�
+        RequestParams params = new RequestParams(AppApi.BASEURL+AppApi.VISITOR_LIST);
+        params.addBodyParameter(VisitorQueryCondition.FieldNames.notCompanyId, BaseApplication.getInstance().getPlace().getCompanyId());
+        x.http().post(params, new BaseCommonCallBack() {
+            public void success() {
+                OneFragment.getInstance().visitorListChanged(getList(VisitorQueryItem.class));
+            }
+        });
+    }
+
+    /**
      * 鏌ヨ琚闂汉鍛樺垪琛�
      */
     public void findIntervieweeList(String pageNum, String name, final boolean isClear) {
-        RequestParams params = new RequestParams(AppApi.BASEURL+AppApi.DICTIONARY_TYPE_LIST);
-        params.addBodyParameter(IntervieweeQueryCondition.FieldNames.companyId, "1");
-        params.addBodyParameter(IntervieweeQueryCondition.FieldNames.name, name);
+//        RequestParams params = new RequestParams(AppApi.BASEURL+AppApi.DICTIONARY_TYPE_LIST);
+//        params.addBodyParameter(IntervieweeQueryCondition.FieldNames.companyId, "1");
+//        params.addBodyParameter(IntervieweeQueryCondition.FieldNames.name, name);
+//        x.http().post(params, new BaseCommonCallBack() {
+//            public void success() {
+//                VisitorRegisterFragment.getInstance().listChanged(getList(IntervieweeQueryItem.class), isClear);
+//            }
+//        });
+        RequestParams params = new RequestParams(AppApi.BASEURL+AppApi.VISITOR_LIST);
+        params.addBodyParameter(VisitorQueryCondition.FieldNames.companyId, BaseApplication.getInstance().getPlace().getCompanyId());
+        params.addBodyParameter(VisitorQueryCondition.FieldNames.name, name);
         x.http().post(params, new BaseCommonCallBack() {
             public void success() {
-                VisitorRegisterFragment.getInstance().listChanged(getList(IntervieweeQueryItem.class), isClear);
+                VisitorRegisterFragment.getInstance().listChanged(getList(VisitorQueryItem.class), isClear);
             }
         });
     }
 
+    /**
+     * 娣诲姞璁垮璁板綍
+     * @param params
+     */
+    public void add(RequestParams params) {
+
+        params.setUri(AppApi.BASEURL+AppApi.CHECK_IN_ADD);
+        x.http().post(params, new BaseCommonCallBack() {
+            @Override
+            public void success() {
+                Toast.makeText(BaseApplication.getInstance(),"娣诲姞鎴愬姛", Toast.LENGTH_SHORT).show();
+            }
+        });
+
+    }
+
 
     /**
      * 鏌ヨ鎷滆浜嬬敱鍒楄〃

--
Gitblit v1.8.0