Bläddra i källkod

update .gitignore

weizhengliang 5 månader sedan
förälder
incheckning
3cfe572322

+ 1 - 0
.gitignore

@@ -9,3 +9,4 @@
 .externalNativeBuild
 /.gradle
 /.idea
+/middleware/src/main/code/com/wdkl/greendao/gen

+ 68 - 68
android_bed/src/main/java/com/wdkl/app/ncs/callingbed/utils/DeviceReceiver.java

@@ -1,68 +1,68 @@
-package com.wdkl.app.ncs.callingbed.utils;
-
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.widget.ArrayAdapter;
-import android.widget.ListView;
-
-
-import com.wdkl.app.ncs.callingbed.R;
-
-import java.util.ArrayList;
-
-/**
- * Created by charlie on 2017/4/2.
- * Bluetooth search state braodcastrecever
- * 蓝牙搜索广播监听
- */
-
-public class DeviceReceiver extends BroadcastReceiver {
-
-
-    private ArrayList<String> deviceList_found=new ArrayList<String>();
-    private ArrayAdapter<String> adapter;
-    private ListView listView;
-
-    public DeviceReceiver(ArrayList<String> deviceList_found, ArrayAdapter<String> adapter, ListView listView) {
-        this.deviceList_found = deviceList_found;
-        this.adapter = adapter;
-        this.listView = listView;
-    }
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        String action=intent.getAction();
-        if (BluetoothDevice.ACTION_FOUND.equals(action)){
-            //搜索到的新设备
-            BluetoothDevice btd=intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
-            //搜索没有配对过的蓝牙设备
-            if(btd.getBondState()!= BluetoothDevice.BOND_BONDED){
-                if (!deviceList_found.contains(btd.getName()+'\n'+btd.getAddress())){
-                    deviceList_found.add(btd.getName()+'\n'+btd.getAddress());
-                    try{
-                         adapter.notifyDataSetChanged();
-                         listView.notify();
-                    }catch (Exception e){
-                        e.printStackTrace();
-                    }
-                }
-            }
-        }else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)){
-            //搜索结束
-            if(listView.getCount()==0){
-                deviceList_found.add(context.getString(R.string.none_ble_device));
-                try{
-                    adapter.notifyDataSetChanged();
-                }catch (Exception e){
-                    e.printStackTrace();
-                }
-            }
-
-
-        }
-
-    }
-}
+package com.wdkl.app.ncs.callingbed.utils;
+
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothDevice;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+
+
+import com.wdkl.app.ncs.callingbed.R;
+
+import java.util.ArrayList;
+
+/**
+ * Created by charlie on 2017/4/2.
+ * Bluetooth search state braodcastrecever
+ * 蓝牙搜索广播监听
+ */
+
+public class DeviceReceiver extends BroadcastReceiver {
+
+
+    private ArrayList<String> deviceList_found=new ArrayList<String>();
+    private ArrayAdapter<String> adapter;
+    private ListView listView;
+
+    public DeviceReceiver(ArrayList<String> deviceList_found, ArrayAdapter<String> adapter, ListView listView) {
+        this.deviceList_found = deviceList_found;
+        this.adapter = adapter;
+        this.listView = listView;
+    }
+
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        String action=intent.getAction();
+        if (BluetoothDevice.ACTION_FOUND.equals(action)){
+            //搜索到的新设备
+            BluetoothDevice btd=intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
+            //搜索没有配对过的蓝牙设备
+            if(btd.getBondState()!= BluetoothDevice.BOND_BONDED){
+                if (!deviceList_found.contains(btd.getName()+'\n'+btd.getAddress())){
+                    deviceList_found.add(btd.getName()+'\n'+btd.getAddress());
+                    try{
+                         adapter.notifyDataSetChanged();
+                         listView.notify();
+                    }catch (Exception e){
+                        e.printStackTrace();
+                    }
+                }
+            }
+        }else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)){
+            //搜索结束
+            if(listView.getCount()==0){
+                deviceList_found.add(context.getString(R.string.none_ble_device));
+                try{
+                    adapter.notifyDataSetChanged();
+                }catch (Exception e){
+                    e.printStackTrace();
+                }
+            }
+
+
+        }
+
+    }
+}

+ 69 - 69
android_bed/src/main/res/layout/printer_list.xml

@@ -1,70 +1,70 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical" >
-
-<!--    <TextView-->
-<!--        android:id="@+id/textView1"-->
-<!--        android:layout_width="match_parent"-->
-<!--        android:layout_height="wrap_content"-->
-<!--        android:paddingLeft="18dp"-->
-<!--        android:text="@string/ble_device_1" />-->
-
-<!--    <RelativeLayout-->
-<!--        android:layout_width="match_parent"-->
-<!--        android:layout_height="wrap_content"-->
-<!--        android:layout_marginLeft="18dp"-->
-<!--        android:layout_marginRight="18dp"-->
-<!--        android:paddingRight="5dp"-->
-<!--        android:background="@drawable/spiner_selector"-->
-<!--        >-->
-<!--        <ListView-->
-<!--            android:id="@+id/listView1"-->
-<!--            android:layout_width="wrap_content"-->
-<!--            android:background="@android:color/white"-->
-<!--            android:layout_height="wrap_content" >-->
-<!--        </ListView>-->
-<!--    </RelativeLayout>-->
-
-
-<!--    <Button-->
-<!--        android:id="@+id/btn_scan"-->
-<!--        android:layout_width="match_parent"-->
-<!--        android:layout_height="wrap_content"-->
-<!--        android:layout_margin="18dp"-->
-<!--        android:background="@drawable/customer_button_selector"-->
-<!--        android:text="@string/ble_device_2" />-->
-
-<!--    <LinearLayout-->
-<!--        android:id="@+id/ll1"-->
-<!--        android:layout_width="match_parent"-->
-<!--        android:layout_height="wrap_content"-->
-<!--        android:visibility="gone"-->
-<!--        android:orientation="vertical" >-->
-<!--        <TextView-->
-<!--        android:id="@+id/textView2"-->
-<!--        android:layout_width="match_parent"-->
-<!--        android:layout_height="wrap_content"-->
-<!--        android:paddingLeft="18dp"-->
-<!--        android:text="@string/ble_device_3" />-->
-
-<!--        <RelativeLayout-->
-<!--            android:layout_width="match_parent"-->
-<!--            android:layout_height="wrap_content"-->
-<!--            android:layout_marginLeft="18dp"-->
-<!--            android:layout_marginRight="18dp"-->
-<!--            android:layout_marginBottom="18dp"-->
-<!--            android:paddingRight="5dp"-->
-<!--            android:background="@drawable/spiner_selector"-->
-<!--            >-->
-<!--            <ListView-->
-<!--                android:id="@+id/listView2"-->
-<!--                android:background="@android:color/white"-->
-<!--                android:layout_width="match_parent"-->
-<!--                android:layout_height="wrap_content" >-->
-<!--            </ListView>-->
-<!--        </RelativeLayout>-->
-<!--    </LinearLayout>-->
-
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical" >
+
+<!--    <TextView-->
+<!--        android:id="@+id/textView1"-->
+<!--        android:layout_width="match_parent"-->
+<!--        android:layout_height="wrap_content"-->
+<!--        android:paddingLeft="18dp"-->
+<!--        android:text="@string/ble_device_1" />-->
+
+<!--    <RelativeLayout-->
+<!--        android:layout_width="match_parent"-->
+<!--        android:layout_height="wrap_content"-->
+<!--        android:layout_marginLeft="18dp"-->
+<!--        android:layout_marginRight="18dp"-->
+<!--        android:paddingRight="5dp"-->
+<!--        android:background="@drawable/spiner_selector"-->
+<!--        >-->
+<!--        <ListView-->
+<!--            android:id="@+id/listView1"-->
+<!--            android:layout_width="wrap_content"-->
+<!--            android:background="@android:color/white"-->
+<!--            android:layout_height="wrap_content" >-->
+<!--        </ListView>-->
+<!--    </RelativeLayout>-->
+
+
+<!--    <Button-->
+<!--        android:id="@+id/btn_scan"-->
+<!--        android:layout_width="match_parent"-->
+<!--        android:layout_height="wrap_content"-->
+<!--        android:layout_margin="18dp"-->
+<!--        android:background="@drawable/customer_button_selector"-->
+<!--        android:text="@string/ble_device_2" />-->
+
+<!--    <LinearLayout-->
+<!--        android:id="@+id/ll1"-->
+<!--        android:layout_width="match_parent"-->
+<!--        android:layout_height="wrap_content"-->
+<!--        android:visibility="gone"-->
+<!--        android:orientation="vertical" >-->
+<!--        <TextView-->
+<!--        android:id="@+id/textView2"-->
+<!--        android:layout_width="match_parent"-->
+<!--        android:layout_height="wrap_content"-->
+<!--        android:paddingLeft="18dp"-->
+<!--        android:text="@string/ble_device_3" />-->
+
+<!--        <RelativeLayout-->
+<!--            android:layout_width="match_parent"-->
+<!--            android:layout_height="wrap_content"-->
+<!--            android:layout_marginLeft="18dp"-->
+<!--            android:layout_marginRight="18dp"-->
+<!--            android:layout_marginBottom="18dp"-->
+<!--            android:paddingRight="5dp"-->
+<!--            android:background="@drawable/spiner_selector"-->
+<!--            >-->
+<!--            <ListView-->
+<!--                android:id="@+id/listView2"-->
+<!--                android:background="@android:color/white"-->
+<!--                android:layout_width="match_parent"-->
+<!--                android:layout_height="wrap_content" >-->
+<!--            </ListView>-->
+<!--        </RelativeLayout>-->
+<!--    </LinearLayout>-->
+
 </LinearLayout>

+ 18 - 0
app/DX_156C/release/output-metadata.json

@@ -0,0 +1,18 @@
+{
+  "version": 2,
+  "artifactType": {
+    "type": "APK",
+    "kind": "Directory"
+  },
+  "applicationId": "com.wdkl.app.ncs.callingdoor",
+  "variantName": "DX_156CRelease",
+  "elements": [
+    {
+      "type": "SINGLE",
+      "filters": [],
+      "versionCode": 120,
+      "versionName": "1.4.10",
+      "outputFile": "wd_door_v1.4.10_120_2025-01-14.apk"
+    }
+  ]
+}

BIN
app/DX_156C/release/wd_door_v1.4.10_120_2025-01-14.apk


+ 66 - 66
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/hardware/HardTools.java

@@ -1,66 +1,66 @@
-package com.wdkl.app.ncs.callingdoor.hardware;
-
-
-import android.app.Application;
-import android.content.Context;
-
-import com.wdkl.app.ncs.callingdoor.activity.AppUpdateActivity;
-import com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivationActivity;
-import com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivity;
-
-public  class HardTools {
-
-    public HardTools() {
-
-    }
-    //初始化
-    public void init(CallingdoorActivationActivity CallingdoorActivationActivity){}
-    //退出
-    public void unInit(){}
-    //是否卸载旧版本
-    public void uninstallApp(Context context , boolean isuninstall, String name){}
-    //串口设置
-    public void setSerial(CallingdoorActivity callingdoorActivity){}
-    //检查launch版本
-    public void checkLaunch(){}
-    //紧急按钮Start
-    public void setSOSStart(){}
-    //紧急按钮Stop
-    public void setSOSStop(){}
-    //门灯颜色
-    public void setDoorLight(int type){}
-    //重置设备
-    public void resetDevice(){}
-    //重置设备 XCrashUtils
-    public void resetDevicex(Application application){}
-    //注册方式
-    public void Registration(Context context ){}
-    //安装方式1
-    public void installApk(AppUpdateActivity context ){}
-    //安装方式2
-    public void startInstallApk(AppUpdateActivity context ){}
-    public void setTime(Context context , long timeMills, String timeZone){}
-
-    public void startbar(Boolean is){}
-    //关闭守护
-    public void CloseDaemon(Context context){}
-
-
-
-    public void CallConfigg(int mic,int yl){}
-    //提供卡号
-    public  void offerCardData(String data){}
-    //提供按键数据
-    public void offerKeyBoardData(String data){}
-    //是否开启灯光
-    public  void enableLed(boolean isEnable){}
-    public  void enableIRLed(boolean isEnable){}
-    public  void enableControlLed(boolean isEnable,int id){}
-    //麦克风
-    //
-
-    public void enalbeNet(boolean isEnable){}
-    //设置voip 初始化配置
-    public void setVoipConfig(){}
-
-}
+package com.wdkl.app.ncs.callingdoor.hardware;
+
+
+import android.app.Application;
+import android.content.Context;
+
+import com.wdkl.app.ncs.callingdoor.activity.AppUpdateActivity;
+import com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivationActivity;
+import com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivity;
+
+public  class HardTools {
+
+    public HardTools() {
+
+    }
+    //初始化
+    public void init(CallingdoorActivationActivity CallingdoorActivationActivity){}
+    //退出
+    public void unInit(){}
+    //是否卸载旧版本
+    public void uninstallApp(Context context , boolean isuninstall, String name){}
+    //串口设置
+    public void setSerial(CallingdoorActivity callingdoorActivity){}
+    //检查launch版本
+    public void checkLaunch(){}
+    //紧急按钮Start
+    public void setSOSStart(){}
+    //紧急按钮Stop
+    public void setSOSStop(){}
+    //门灯颜色
+    public void setDoorLight(int type){}
+    //重置设备
+    public void resetDevice(){}
+    //重置设备 XCrashUtils
+    public void resetDevicex(Application application){}
+    //注册方式
+    public void Registration(Context context ){}
+    //安装方式1
+    public void installApk(AppUpdateActivity context ){}
+    //安装方式2
+    public void startInstallApk(AppUpdateActivity context ){}
+    public void setTime(Context context , long timeMills, String timeZone){}
+
+    public void startbar(Boolean is){}
+    //关闭守护
+    public void CloseDaemon(Context context){}
+
+
+
+    public void CallConfigg(int mic,int yl){}
+    //提供卡号
+    public  void offerCardData(String data){}
+    //提供按键数据
+    public void offerKeyBoardData(String data){}
+    //是否开启灯光
+    public  void enableLed(boolean isEnable){}
+    public  void enableIRLed(boolean isEnable){}
+    public  void enableControlLed(boolean isEnable,int id){}
+    //麦克风
+    //
+
+    public void enalbeNet(boolean isEnable){}
+    //设置voip 初始化配置
+    public void setVoipConfig(){}
+
+}

+ 0 - 0
gradlew


+ 0 - 102
middleware/src/main/code/com/wdkl/greendao/gen/DaoMaster.java

@@ -1,102 +0,0 @@
-package com.wdkl.greendao.gen;
-
-import android.content.Context;
-import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteDatabase.CursorFactory;
-import android.util.Log;
-
-import org.greenrobot.greendao.AbstractDaoMaster;
-import org.greenrobot.greendao.database.StandardDatabase;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseOpenHelper;
-import org.greenrobot.greendao.identityscope.IdentityScopeType;
-
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
- * Master of DAO (schema version 2): knows all DAOs.
- */
-public class DaoMaster extends AbstractDaoMaster {
-    public static final int SCHEMA_VERSION = 2;
-
-    /** Creates underlying database table using DAOs. */
-    public static void createAllTables(Database db, boolean ifNotExists) {
-        DeviceInfoBeanDao.createTable(db, ifNotExists);
-        FrameBedBeanDao.createTable(db, ifNotExists);
-        LedDeviceInfoBeanDao.createTable(db, ifNotExists);
-    }
-
-    /** Drops underlying database table using DAOs. */
-    public static void dropAllTables(Database db, boolean ifExists) {
-        DeviceInfoBeanDao.dropTable(db, ifExists);
-        FrameBedBeanDao.dropTable(db, ifExists);
-        LedDeviceInfoBeanDao.dropTable(db, ifExists);
-    }
-
-    /**
-     * WARNING: Drops all table on Upgrade! Use only during development.
-     * Convenience method using a {@link DevOpenHelper}.
-     */
-    public static DaoSession newDevSession(Context context, String name) {
-        Database db = new DevOpenHelper(context, name).getWritableDb();
-        DaoMaster daoMaster = new DaoMaster(db);
-        return daoMaster.newSession();
-    }
-
-    public DaoMaster(SQLiteDatabase db) {
-        this(new StandardDatabase(db));
-    }
-
-    public DaoMaster(Database db) {
-        super(db, SCHEMA_VERSION);
-        registerDaoClass(DeviceInfoBeanDao.class);
-        registerDaoClass(FrameBedBeanDao.class);
-        registerDaoClass(LedDeviceInfoBeanDao.class);
-    }
-
-    public DaoSession newSession() {
-        return new DaoSession(db, IdentityScopeType.Session, daoConfigMap);
-    }
-
-    public DaoSession newSession(IdentityScopeType type) {
-        return new DaoSession(db, type, daoConfigMap);
-    }
-
-    /**
-     * Calls {@link #createAllTables(Database, boolean)} in {@link #onCreate(Database)} -
-     */
-    public static abstract class OpenHelper extends DatabaseOpenHelper {
-        public OpenHelper(Context context, String name) {
-            super(context, name, SCHEMA_VERSION);
-        }
-
-        public OpenHelper(Context context, String name, CursorFactory factory) {
-            super(context, name, factory, SCHEMA_VERSION);
-        }
-
-        @Override
-        public void onCreate(Database db) {
-            Log.i("greenDAO", "Creating tables for schema version " + SCHEMA_VERSION);
-            createAllTables(db, false);
-        }
-    }
-
-    /** WARNING: Drops all table on Upgrade! Use only during development. */
-    public static class DevOpenHelper extends OpenHelper {
-        public DevOpenHelper(Context context, String name) {
-            super(context, name);
-        }
-
-        public DevOpenHelper(Context context, String name, CursorFactory factory) {
-            super(context, name, factory);
-        }
-
-        @Override
-        public void onUpgrade(Database db, int oldVersion, int newVersion) {
-            Log.i("greenDAO", "Upgrading schema from version " + oldVersion + " to " + newVersion + " by dropping all tables");
-            dropAllTables(db, true);
-            onCreate(db);
-        }
-    }
-
-}

+ 0 - 76
middleware/src/main/code/com/wdkl/greendao/gen/DaoSession.java

@@ -1,76 +0,0 @@
-package com.wdkl.greendao.gen;
-
-import java.util.Map;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.AbstractDaoSession;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.identityscope.IdentityScopeType;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-import com.wdkl.ncs.android.middleware.dao.entity.DeviceInfoBean;
-import com.wdkl.ncs.android.middleware.dao.entity.FrameBedBean;
-import com.wdkl.ncs.android.middleware.dao.entity.LedDeviceInfoBean;
-
-import com.wdkl.greendao.gen.DeviceInfoBeanDao;
-import com.wdkl.greendao.gen.FrameBedBeanDao;
-import com.wdkl.greendao.gen.LedDeviceInfoBeanDao;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-
-/**
- * {@inheritDoc}
- * 
- * @see org.greenrobot.greendao.AbstractDaoSession
- */
-public class DaoSession extends AbstractDaoSession {
-
-    private final DaoConfig deviceInfoBeanDaoConfig;
-    private final DaoConfig frameBedBeanDaoConfig;
-    private final DaoConfig ledDeviceInfoBeanDaoConfig;
-
-    private final DeviceInfoBeanDao deviceInfoBeanDao;
-    private final FrameBedBeanDao frameBedBeanDao;
-    private final LedDeviceInfoBeanDao ledDeviceInfoBeanDao;
-
-    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
-            daoConfigMap) {
-        super(db);
-
-        deviceInfoBeanDaoConfig = daoConfigMap.get(DeviceInfoBeanDao.class).clone();
-        deviceInfoBeanDaoConfig.initIdentityScope(type);
-
-        frameBedBeanDaoConfig = daoConfigMap.get(FrameBedBeanDao.class).clone();
-        frameBedBeanDaoConfig.initIdentityScope(type);
-
-        ledDeviceInfoBeanDaoConfig = daoConfigMap.get(LedDeviceInfoBeanDao.class).clone();
-        ledDeviceInfoBeanDaoConfig.initIdentityScope(type);
-
-        deviceInfoBeanDao = new DeviceInfoBeanDao(deviceInfoBeanDaoConfig, this);
-        frameBedBeanDao = new FrameBedBeanDao(frameBedBeanDaoConfig, this);
-        ledDeviceInfoBeanDao = new LedDeviceInfoBeanDao(ledDeviceInfoBeanDaoConfig, this);
-
-        registerDao(DeviceInfoBean.class, deviceInfoBeanDao);
-        registerDao(FrameBedBean.class, frameBedBeanDao);
-        registerDao(LedDeviceInfoBean.class, ledDeviceInfoBeanDao);
-    }
-    
-    public void clear() {
-        deviceInfoBeanDaoConfig.clearIdentityScope();
-        frameBedBeanDaoConfig.clearIdentityScope();
-        ledDeviceInfoBeanDaoConfig.clearIdentityScope();
-    }
-
-    public DeviceInfoBeanDao getDeviceInfoBeanDao() {
-        return deviceInfoBeanDao;
-    }
-
-    public FrameBedBeanDao getFrameBedBeanDao() {
-        return frameBedBeanDao;
-    }
-
-    public LedDeviceInfoBeanDao getLedDeviceInfoBeanDao() {
-        return ledDeviceInfoBeanDao;
-    }
-
-}

+ 0 - 252
middleware/src/main/code/com/wdkl/greendao/gen/DeviceInfoBeanDao.java

@@ -1,252 +0,0 @@
-package com.wdkl.greendao.gen;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.internal.DaoConfig;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-
-import com.wdkl.ncs.android.middleware.dao.entity.DeviceInfoBean;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/** 
- * DAO for table "DEVICE_INFO_BEAN".
-*/
-public class DeviceInfoBeanDao extends AbstractDao<DeviceInfoBean, Void> {
-
-    public static final String TABLENAME = "DEVICE_INFO_BEAN";
-
-    /**
-     * Properties of entity DeviceInfoBean.<br/>
-     * Can be used for QueryBuilder and for referencing column names.
-     */
-    public static class Properties {
-        public final static Property Id = new Property(0, Integer.class, "id", false, "ID");
-        public final static Property PartId = new Property(1, Integer.class, "partId", false, "PART_ID");
-        public final static Property DeviceType = new Property(2, Integer.class, "deviceType", false, "DEVICE_TYPE");
-        public final static Property Name = new Property(3, String.class, "name", false, "NAME");
-        public final static Property SipId = new Property(4, String.class, "sipId", false, "SIP_ID");
-        public final static Property SipPassword = new Property(5, String.class, "sipPassword", false, "SIP_PASSWORD");
-        public final static Property HospitalId = new Property(6, Integer.class, "hospitalId", false, "HOSPITAL_ID");
-        public final static Property HospitalName = new Property(7, String.class, "hospitalName", false, "HOSPITAL_NAME");
-        public final static Property PartName = new Property(8, String.class, "partName", false, "PART_NAME");
-        public final static Property PartDisplay = new Property(9, String.class, "partDisplay", false, "PART_DISPLAY");
-        public final static Property FrameName = new Property(10, String.class, "frameName", false, "FRAME_NAME");
-    }
-
-
-    public DeviceInfoBeanDao(DaoConfig config) {
-        super(config);
-    }
-    
-    public DeviceInfoBeanDao(DaoConfig config, DaoSession daoSession) {
-        super(config, daoSession);
-    }
-
-    /** Creates the underlying database table. */
-    public static void createTable(Database db, boolean ifNotExists) {
-        String constraint = ifNotExists? "IF NOT EXISTS ": "";
-        db.execSQL("CREATE TABLE " + constraint + "\"DEVICE_INFO_BEAN\" (" + //
-                "\"ID\" INTEGER," + // 0: id
-                "\"PART_ID\" INTEGER," + // 1: partId
-                "\"DEVICE_TYPE\" INTEGER," + // 2: deviceType
-                "\"NAME\" TEXT," + // 3: name
-                "\"SIP_ID\" TEXT," + // 4: sipId
-                "\"SIP_PASSWORD\" TEXT," + // 5: sipPassword
-                "\"HOSPITAL_ID\" INTEGER," + // 6: hospitalId
-                "\"HOSPITAL_NAME\" TEXT," + // 7: hospitalName
-                "\"PART_NAME\" TEXT," + // 8: partName
-                "\"PART_DISPLAY\" TEXT," + // 9: partDisplay
-                "\"FRAME_NAME\" TEXT);"); // 10: frameName
-    }
-
-    /** Drops the underlying database table. */
-    public static void dropTable(Database db, boolean ifExists) {
-        String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"DEVICE_INFO_BEAN\"";
-        db.execSQL(sql);
-    }
-
-    @Override
-    protected final void bindValues(DatabaseStatement stmt, DeviceInfoBean entity) {
-        stmt.clearBindings();
- 
-        Integer id = entity.getId();
-        if (id != null) {
-            stmt.bindLong(1, id);
-        }
- 
-        Integer partId = entity.getPartId();
-        if (partId != null) {
-            stmt.bindLong(2, partId);
-        }
- 
-        Integer deviceType = entity.getDeviceType();
-        if (deviceType != null) {
-            stmt.bindLong(3, deviceType);
-        }
- 
-        String name = entity.getName();
-        if (name != null) {
-            stmt.bindString(4, name);
-        }
- 
-        String sipId = entity.getSipId();
-        if (sipId != null) {
-            stmt.bindString(5, sipId);
-        }
- 
-        String sipPassword = entity.getSipPassword();
-        if (sipPassword != null) {
-            stmt.bindString(6, sipPassword);
-        }
- 
-        Integer hospitalId = entity.getHospitalId();
-        if (hospitalId != null) {
-            stmt.bindLong(7, hospitalId);
-        }
- 
-        String hospitalName = entity.getHospitalName();
-        if (hospitalName != null) {
-            stmt.bindString(8, hospitalName);
-        }
- 
-        String partName = entity.getPartName();
-        if (partName != null) {
-            stmt.bindString(9, partName);
-        }
- 
-        String partDisplay = entity.getPartDisplay();
-        if (partDisplay != null) {
-            stmt.bindString(10, partDisplay);
-        }
- 
-        String frameName = entity.getFrameName();
-        if (frameName != null) {
-            stmt.bindString(11, frameName);
-        }
-    }
-
-    @Override
-    protected final void bindValues(SQLiteStatement stmt, DeviceInfoBean entity) {
-        stmt.clearBindings();
- 
-        Integer id = entity.getId();
-        if (id != null) {
-            stmt.bindLong(1, id);
-        }
- 
-        Integer partId = entity.getPartId();
-        if (partId != null) {
-            stmt.bindLong(2, partId);
-        }
- 
-        Integer deviceType = entity.getDeviceType();
-        if (deviceType != null) {
-            stmt.bindLong(3, deviceType);
-        }
- 
-        String name = entity.getName();
-        if (name != null) {
-            stmt.bindString(4, name);
-        }
- 
-        String sipId = entity.getSipId();
-        if (sipId != null) {
-            stmt.bindString(5, sipId);
-        }
- 
-        String sipPassword = entity.getSipPassword();
-        if (sipPassword != null) {
-            stmt.bindString(6, sipPassword);
-        }
- 
-        Integer hospitalId = entity.getHospitalId();
-        if (hospitalId != null) {
-            stmt.bindLong(7, hospitalId);
-        }
- 
-        String hospitalName = entity.getHospitalName();
-        if (hospitalName != null) {
-            stmt.bindString(8, hospitalName);
-        }
- 
-        String partName = entity.getPartName();
-        if (partName != null) {
-            stmt.bindString(9, partName);
-        }
- 
-        String partDisplay = entity.getPartDisplay();
-        if (partDisplay != null) {
-            stmt.bindString(10, partDisplay);
-        }
- 
-        String frameName = entity.getFrameName();
-        if (frameName != null) {
-            stmt.bindString(11, frameName);
-        }
-    }
-
-    @Override
-    public Void readKey(Cursor cursor, int offset) {
-        return null;
-    }    
-
-    @Override
-    public DeviceInfoBean readEntity(Cursor cursor, int offset) {
-        DeviceInfoBean entity = new DeviceInfoBean( //
-            cursor.isNull(offset + 0) ? null : cursor.getInt(offset + 0), // id
-            cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1), // partId
-            cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2), // deviceType
-            cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // name
-            cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // sipId
-            cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // sipPassword
-            cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6), // hospitalId
-            cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // hospitalName
-            cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // partName
-            cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // partDisplay
-            cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10) // frameName
-        );
-        return entity;
-    }
-     
-    @Override
-    public void readEntity(Cursor cursor, DeviceInfoBean entity, int offset) {
-        entity.setId(cursor.isNull(offset + 0) ? null : cursor.getInt(offset + 0));
-        entity.setPartId(cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1));
-        entity.setDeviceType(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2));
-        entity.setName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
-        entity.setSipId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
-        entity.setSipPassword(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
-        entity.setHospitalId(cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6));
-        entity.setHospitalName(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
-        entity.setPartName(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
-        entity.setPartDisplay(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
-        entity.setFrameName(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
-     }
-    
-    @Override
-    protected final Void updateKeyAfterInsert(DeviceInfoBean entity, long rowId) {
-        // Unsupported or missing PK type
-        return null;
-    }
-    
-    @Override
-    public Void getKey(DeviceInfoBean entity) {
-        return null;
-    }
-
-    @Override
-    public boolean hasKey(DeviceInfoBean entity) {
-        // TODO
-        return false;
-    }
-
-    @Override
-    protected final boolean isEntityUpdateable() {
-        return true;
-    }
-    
-}

+ 0 - 224
middleware/src/main/code/com/wdkl/greendao/gen/FrameBedBeanDao.java

@@ -1,224 +0,0 @@
-package com.wdkl.greendao.gen;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.internal.DaoConfig;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-
-import com.wdkl.ncs.android.middleware.dao.entity.FrameBedBean;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/** 
- * DAO for table "FRAME_BED_BEAN".
-*/
-public class FrameBedBeanDao extends AbstractDao<FrameBedBean, Void> {
-
-    public static final String TABLENAME = "FRAME_BED_BEAN";
-
-    /**
-     * Properties of entity FrameBedBean.<br/>
-     * Can be used for QueryBuilder and for referencing column names.
-     */
-    public static class Properties {
-        public final static Property Id = new Property(0, Integer.class, "id", false, "ID");
-        public final static Property PartId = new Property(1, Integer.class, "partId", false, "PART_ID");
-        public final static Property FrameName = new Property(2, String.class, "frameName", false, "FRAME_NAME");
-        public final static Property CustomerName = new Property(3, String.class, "customerName", false, "CUSTOMER_NAME");
-        public final static Property DoctorName = new Property(4, String.class, "doctorName", false, "DOCTOR_NAME");
-        public final static Property NurseName = new Property(5, String.class, "nurseName", false, "NURSE_NAME");
-        public final static Property DeviceSipId = new Property(6, String.class, "deviceSipId", false, "DEVICE_SIP_ID");
-        public final static Property BedDeviceId = new Property(7, Integer.class, "bedDeviceId", false, "BED_DEVICE_ID");
-        public final static Property BedDeviceMac = new Property(8, String.class, "bedDeviceMac", false, "BED_DEVICE_MAC");
-    }
-
-
-    public FrameBedBeanDao(DaoConfig config) {
-        super(config);
-    }
-    
-    public FrameBedBeanDao(DaoConfig config, DaoSession daoSession) {
-        super(config, daoSession);
-    }
-
-    /** Creates the underlying database table. */
-    public static void createTable(Database db, boolean ifNotExists) {
-        String constraint = ifNotExists? "IF NOT EXISTS ": "";
-        db.execSQL("CREATE TABLE " + constraint + "\"FRAME_BED_BEAN\" (" + //
-                "\"ID\" INTEGER," + // 0: id
-                "\"PART_ID\" INTEGER," + // 1: partId
-                "\"FRAME_NAME\" TEXT," + // 2: frameName
-                "\"CUSTOMER_NAME\" TEXT," + // 3: customerName
-                "\"DOCTOR_NAME\" TEXT," + // 4: doctorName
-                "\"NURSE_NAME\" TEXT," + // 5: nurseName
-                "\"DEVICE_SIP_ID\" TEXT," + // 6: deviceSipId
-                "\"BED_DEVICE_ID\" INTEGER," + // 7: bedDeviceId
-                "\"BED_DEVICE_MAC\" TEXT);"); // 8: bedDeviceMac
-    }
-
-    /** Drops the underlying database table. */
-    public static void dropTable(Database db, boolean ifExists) {
-        String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"FRAME_BED_BEAN\"";
-        db.execSQL(sql);
-    }
-
-    @Override
-    protected final void bindValues(DatabaseStatement stmt, FrameBedBean entity) {
-        stmt.clearBindings();
- 
-        Integer id = entity.getId();
-        if (id != null) {
-            stmt.bindLong(1, id);
-        }
- 
-        Integer partId = entity.getPartId();
-        if (partId != null) {
-            stmt.bindLong(2, partId);
-        }
- 
-        String frameName = entity.getFrameName();
-        if (frameName != null) {
-            stmt.bindString(3, frameName);
-        }
- 
-        String customerName = entity.getCustomerName();
-        if (customerName != null) {
-            stmt.bindString(4, customerName);
-        }
- 
-        String doctorName = entity.getDoctorName();
-        if (doctorName != null) {
-            stmt.bindString(5, doctorName);
-        }
- 
-        String nurseName = entity.getNurseName();
-        if (nurseName != null) {
-            stmt.bindString(6, nurseName);
-        }
- 
-        String deviceSipId = entity.getDeviceSipId();
-        if (deviceSipId != null) {
-            stmt.bindString(7, deviceSipId);
-        }
- 
-        Integer bedDeviceId = entity.getBedDeviceId();
-        if (bedDeviceId != null) {
-            stmt.bindLong(8, bedDeviceId);
-        }
- 
-        String bedDeviceMac = entity.getBedDeviceMac();
-        if (bedDeviceMac != null) {
-            stmt.bindString(9, bedDeviceMac);
-        }
-    }
-
-    @Override
-    protected final void bindValues(SQLiteStatement stmt, FrameBedBean entity) {
-        stmt.clearBindings();
- 
-        Integer id = entity.getId();
-        if (id != null) {
-            stmt.bindLong(1, id);
-        }
- 
-        Integer partId = entity.getPartId();
-        if (partId != null) {
-            stmt.bindLong(2, partId);
-        }
- 
-        String frameName = entity.getFrameName();
-        if (frameName != null) {
-            stmt.bindString(3, frameName);
-        }
- 
-        String customerName = entity.getCustomerName();
-        if (customerName != null) {
-            stmt.bindString(4, customerName);
-        }
- 
-        String doctorName = entity.getDoctorName();
-        if (doctorName != null) {
-            stmt.bindString(5, doctorName);
-        }
- 
-        String nurseName = entity.getNurseName();
-        if (nurseName != null) {
-            stmt.bindString(6, nurseName);
-        }
- 
-        String deviceSipId = entity.getDeviceSipId();
-        if (deviceSipId != null) {
-            stmt.bindString(7, deviceSipId);
-        }
- 
-        Integer bedDeviceId = entity.getBedDeviceId();
-        if (bedDeviceId != null) {
-            stmt.bindLong(8, bedDeviceId);
-        }
- 
-        String bedDeviceMac = entity.getBedDeviceMac();
-        if (bedDeviceMac != null) {
-            stmt.bindString(9, bedDeviceMac);
-        }
-    }
-
-    @Override
-    public Void readKey(Cursor cursor, int offset) {
-        return null;
-    }    
-
-    @Override
-    public FrameBedBean readEntity(Cursor cursor, int offset) {
-        FrameBedBean entity = new FrameBedBean( //
-            cursor.isNull(offset + 0) ? null : cursor.getInt(offset + 0), // id
-            cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1), // partId
-            cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // frameName
-            cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // customerName
-            cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // doctorName
-            cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // nurseName
-            cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // deviceSipId
-            cursor.isNull(offset + 7) ? null : cursor.getInt(offset + 7), // bedDeviceId
-            cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8) // bedDeviceMac
-        );
-        return entity;
-    }
-     
-    @Override
-    public void readEntity(Cursor cursor, FrameBedBean entity, int offset) {
-        entity.setId(cursor.isNull(offset + 0) ? null : cursor.getInt(offset + 0));
-        entity.setPartId(cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1));
-        entity.setFrameName(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
-        entity.setCustomerName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
-        entity.setDoctorName(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
-        entity.setNurseName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
-        entity.setDeviceSipId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
-        entity.setBedDeviceId(cursor.isNull(offset + 7) ? null : cursor.getInt(offset + 7));
-        entity.setBedDeviceMac(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
-     }
-    
-    @Override
-    protected final Void updateKeyAfterInsert(FrameBedBean entity, long rowId) {
-        // Unsupported or missing PK type
-        return null;
-    }
-    
-    @Override
-    public Void getKey(FrameBedBean entity) {
-        return null;
-    }
-
-    @Override
-    public boolean hasKey(FrameBedBean entity) {
-        // TODO
-        return false;
-    }
-
-    @Override
-    protected final boolean isEntityUpdateable() {
-        return true;
-    }
-    
-}

+ 0 - 138
middleware/src/main/code/com/wdkl/greendao/gen/LedDeviceInfoBeanDao.java

@@ -1,138 +0,0 @@
-package com.wdkl.greendao.gen;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.internal.DaoConfig;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-
-import com.wdkl.ncs.android.middleware.dao.entity.LedDeviceInfoBean;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/** 
- * DAO for table "LED_DEVICE_INFO_BEAN".
-*/
-public class LedDeviceInfoBeanDao extends AbstractDao<LedDeviceInfoBean, Void> {
-
-    public static final String TABLENAME = "LED_DEVICE_INFO_BEAN";
-
-    /**
-     * Properties of entity LedDeviceInfoBean.<br/>
-     * Can be used for QueryBuilder and for referencing column names.
-     */
-    public static class Properties {
-        public final static Property Resolution = new Property(0, String.class, "resolution", false, "RESOLUTION");
-        public final static Property Ip = new Property(1, String.class, "ip", false, "IP");
-        public final static Property VoiceOn = new Property(2, boolean.class, "voiceOn", false, "VOICE_ON");
-        public final static Property FontSize = new Property(3, int.class, "fontSize", false, "FONT_SIZE");
-    }
-
-
-    public LedDeviceInfoBeanDao(DaoConfig config) {
-        super(config);
-    }
-    
-    public LedDeviceInfoBeanDao(DaoConfig config, DaoSession daoSession) {
-        super(config, daoSession);
-    }
-
-    /** Creates the underlying database table. */
-    public static void createTable(Database db, boolean ifNotExists) {
-        String constraint = ifNotExists? "IF NOT EXISTS ": "";
-        db.execSQL("CREATE TABLE " + constraint + "\"LED_DEVICE_INFO_BEAN\" (" + //
-                "\"RESOLUTION\" TEXT," + // 0: resolution
-                "\"IP\" TEXT," + // 1: ip
-                "\"VOICE_ON\" INTEGER NOT NULL ," + // 2: voiceOn
-                "\"FONT_SIZE\" INTEGER NOT NULL );"); // 3: fontSize
-    }
-
-    /** Drops the underlying database table. */
-    public static void dropTable(Database db, boolean ifExists) {
-        String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LED_DEVICE_INFO_BEAN\"";
-        db.execSQL(sql);
-    }
-
-    @Override
-    protected final void bindValues(DatabaseStatement stmt, LedDeviceInfoBean entity) {
-        stmt.clearBindings();
- 
-        String resolution = entity.getResolution();
-        if (resolution != null) {
-            stmt.bindString(1, resolution);
-        }
- 
-        String ip = entity.getIp();
-        if (ip != null) {
-            stmt.bindString(2, ip);
-        }
-        stmt.bindLong(3, entity.getVoiceOn() ? 1L: 0L);
-        stmt.bindLong(4, entity.getFontSize());
-    }
-
-    @Override
-    protected final void bindValues(SQLiteStatement stmt, LedDeviceInfoBean entity) {
-        stmt.clearBindings();
- 
-        String resolution = entity.getResolution();
-        if (resolution != null) {
-            stmt.bindString(1, resolution);
-        }
- 
-        String ip = entity.getIp();
-        if (ip != null) {
-            stmt.bindString(2, ip);
-        }
-        stmt.bindLong(3, entity.getVoiceOn() ? 1L: 0L);
-        stmt.bindLong(4, entity.getFontSize());
-    }
-
-    @Override
-    public Void readKey(Cursor cursor, int offset) {
-        return null;
-    }    
-
-    @Override
-    public LedDeviceInfoBean readEntity(Cursor cursor, int offset) {
-        LedDeviceInfoBean entity = new LedDeviceInfoBean( //
-            cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // resolution
-            cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // ip
-            cursor.getShort(offset + 2) != 0, // voiceOn
-            cursor.getInt(offset + 3) // fontSize
-        );
-        return entity;
-    }
-     
-    @Override
-    public void readEntity(Cursor cursor, LedDeviceInfoBean entity, int offset) {
-        entity.setResolution(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
-        entity.setIp(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
-        entity.setVoiceOn(cursor.getShort(offset + 2) != 0);
-        entity.setFontSize(cursor.getInt(offset + 3));
-     }
-    
-    @Override
-    protected final Void updateKeyAfterInsert(LedDeviceInfoBean entity, long rowId) {
-        // Unsupported or missing PK type
-        return null;
-    }
-    
-    @Override
-    public Void getKey(LedDeviceInfoBean entity) {
-        return null;
-    }
-
-    @Override
-    public boolean hasKey(LedDeviceInfoBean entity) {
-        // TODO
-        return false;
-    }
-
-    @Override
-    protected final boolean isEntityUpdateable() {
-        return true;
-    }
-    
-}

BIN
release/wd_door_test.apk