Commit cb721198 by wangq

20211109前版本

parents
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="delegatedBuild" value="false" />
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: com.android.support.constraint:constraint-layout:1.1.3@aar">
<CLASSES>
<root url="jar://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/86bf49829fe2ed20f896c58ce9148d57/jars/classes.jar!/" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/86bf49829fe2ed20f896c58ce9148d57/res" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/86bf49829fe2ed20f896c58ce9148d57/AndroidManifest.xml" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: com.android.support.test.espresso:espresso-core:3.0.2@aar">
<CLASSES>
<root url="jar://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/2bbc8ceea223bbb25875dbafca0d5213/jars/classes.jar!/" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/2bbc8ceea223bbb25875dbafca0d5213/res" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/2bbc8ceea223bbb25875dbafca0d5213/AndroidManifest.xml" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://D:/Users/wangq/.gradle/caches/modules-2/files-2.1/com.android.support.test.espresso/espresso-core/3.0.2/433f4f601a3f3835691d80838dd7ff9414931b05/espresso-core-3.0.2-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: com.android.support.test.espresso:espresso-idling-resource:3.0.2@aar">
<CLASSES>
<root url="jar://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/4bc856d7ca604da45a5d104af07b50fb/jars/classes.jar!/" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/4bc856d7ca604da45a5d104af07b50fb/res" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/4bc856d7ca604da45a5d104af07b50fb/AndroidManifest.xml" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://D:/Users/wangq/.gradle/caches/modules-2/files-2.1/com.android.support.test.espresso/espresso-idling-resource/3.0.2/6071e2b310c16836ba475a94df377e2f75928546/espresso-idling-resource-3.0.2-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: com.android.support.test:monitor:1.0.2@aar">
<CLASSES>
<root url="jar://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/48376647246c002d2d2651a44df5338e/jars/classes.jar!/" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/48376647246c002d2d2651a44df5338e/res" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/48376647246c002d2d2651a44df5338e/AndroidManifest.xml" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://D:/Users/wangq/.gradle/caches/modules-2/files-2.1/com.android.support.test/monitor/1.0.2/5764301056100b445e9ba31df7d1b554a55450f6/monitor-1.0.2-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: com.android.support.test:runner:1.0.2@aar">
<CLASSES>
<root url="jar://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/384721d32573adad5806d74239fd4410/jars/classes.jar!/" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/384721d32573adad5806d74239fd4410/res" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/384721d32573adad5806d74239fd4410/AndroidManifest.xml" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://D:/Users/wangq/.gradle/caches/modules-2/files-2.1/com.android.support.test/runner/1.0.2/b2ce2342744a66e935dbc4a298259709a4c1f042/runner-1.0.2-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: com.zhy:autolayout:1.4.5@aar">
<CLASSES>
<root url="jar://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/5ca89fee295518b8946f5aaef110fb2b/jars/classes.jar!/" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/5ca89fee295518b8946f5aaef110fb2b/res" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/5ca89fee295518b8946f5aaef110fb2b/AndroidManifest.xml" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://D:/Users/wangq/.gradle/caches/modules-2/files-2.1/com.zhy/autolayout/1.4.5/dffc7b1642b42864ae590a0697200ca663d0c686/autolayout-1.4.5-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: io.reactivex.rxjava2:rxandroid:2.1.0@aar">
<CLASSES>
<root url="jar://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/fa0180792a7f34d4134ac0852814f5f2/jars/classes.jar!/" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/fa0180792a7f34d4134ac0852814f5f2/res" />
<root url="file://D:/Users/wangq/.gradle/caches/transforms-2/files-2.1/fa0180792a7f34d4134ac0852814f5f2/AndroidManifest.xml" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://D:/Users/wangq/.gradle/caches/modules-2/files-2.1/io.reactivex.rxjava2/rxandroid/2.1.0/6bb55f070564d0f3920f370223bdbede2b998682/rxandroid-2.1.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="14">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
<item index="10" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
<item index="11" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.Nullable" />
<item index="12" class="java.lang.String" itemvalue="io.reactivex.annotations.Nullable" />
<item index="13" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="13">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
<item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
<item index="9" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
<item index="10" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
<item index="11" class="java.lang.String" itemvalue="io.reactivex.annotations.NonNull" />
<item index="12" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/storeapp.iml" filepath="$PROJECT_DIR$/storeapp.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/storeapp.app.iml" filepath="$PROJECT_DIR$/.idea/modules/app/storeapp.app.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
手持机程序
apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.junmp.print"
minSdkVersion 21
targetSdkVersion 27
versionCode 4
versionName "3.0.3.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
/*ndk {
//选择要添加的对应CPU类型的so armeabi 第5代、第6代的ARM处理器
abiFilters 'armeabi'
//还可以选择'x86', 'x86_64', 'mips', 'mips64'
}*/
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
/* splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a','x86_64'
universalApk true
}
}*/
}
/*sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
*/
/*tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn(nativeLibsToJar)
}*/
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
android.applicationVariants.all {
variant ->
variant.outputs.all {
//这里修改apk文件名
outputFileName = "JPQYHand.apk"
}
}
}
/*
repositories {
flatDir {
dirs 'libs'
}
google()
}
*/
ext {
guavaVersion = '18.0'
glideVersion = '3.6.1'
glideokhttpVersion = '1.3.1'
okhttploggingVersion = '3.8.1'
retrofitVersion = '2.3.0'
okhttpVersion = '3.8.1'
butterknifeVersion = '8.4.0'
//butterknifeVersion = '7.0.1'
rxjavaVersion = '1.3.0'
rxandroidVersion = '1.2.1'
ottoVersion = '1.3.8'
stethoVersion = '1.3.1'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'org.greenrobot:greendao:3.2.2'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.alibaba:fastjson:1.1.46.android'
implementation 'com.google.guava:guava:25.0-android'
implementation 'org.bouncycastle:bcprov-jdk16:1.46'
implementation 'com.zhy:autolayout:1.4.5'
implementation "com.jakewharton:butterknife:$butterknifeVersion"
annotationProcessor "com.jakewharton:butterknife-compiler:$butterknifeVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.facebook.stetho:stetho:$stethoVersion"
implementation "com.facebook.stetho:stetho-okhttp3:$stethoVersion"
implementation 'io.reactivex.rxjava2:rxjava:2.2.6'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
}
greendao {
schemaVersion 11 //数据库版本号 表修改,必须更新版本号
daoPackage 'com.junmp.print.dao.db'// 设置DaoMaster、DaoSession、Dao 包名
targetGenDir 'src/main/java'//设置DaoMaster、DaoSession、Dao目录
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.junmp.print">
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
/><!-- sdcard写权限 android:maxSdkVersion="18"-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <!-- sdcard读权限 -->
<application
android:name=".PrintApplication"
android:allowBackup="true"
android:icon="@mipmap/scqy1"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<meta-data
android:name="design_width"
android:value="768"/>
<meta-data
android:name="design_height"
android:value="1280"/>
<activity
android:name=".ui.login.LoginActivity"
android:configChanges="keyboardHidden|orientation" android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar.AppBaseThemeMain"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity"
android:theme="@style/AppTheme.NoActionBar.AppBaseThemeMain">
</activity>
<activity
android:name=".ui.TestActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.matcheck.random.CheckRandomActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.matcheck.plan.TfMaintainMenuActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.matcheck.plan.maintain.TfMaintainActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.matcheck.plan.maintain.date.TfMaintainDateActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.matcheck.plan.maintain.unit.TfMaintainUnitActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.matcheck.plan.importplan.TfImportActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.matcheck.out.outcheck.OutCheckActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.matcheck.out.outcount.OutCountActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.matcheck.data.DataActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.matcheck.repeat.list.RepeatListActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.matcheck.repeat.scan.RepeatScanActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.data.randomcheck.RandomCheckListActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".ui.data.randomcheck.RandomCheckCxjgMxActivity"
android:configChanges="keyboardHidden|orientation" />
<receiver
android:name=".util.InitApkBroadCastReceiver"
android:enabled="true">
<intent-filter>
<!-- 一个新应用包已经安装在设备上,数据包括包名(监听所在的app,新安装时不能接收到这个广播)-->
<action android:name="android.intent.action.PACKAGE_ADDED" />
<!-- 一个新版本的应用安装到设备上,替换之前已存在的版本,替换时会先收到卸载的再收到替换的,替换自身也能收到-->
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<!-- 一个已存在的应用程序已经从设备上移除,包括包名(卸载监听所在的app,则无法接收到)-->
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
</application>
</manifest>
\ No newline at end of file
package com.junmp.print;
import android.app.Application;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
import android.os.Environment;
import android.os.Handler;
import android.support.v7.widget.ActionBarContainer;
import android.util.Log;
import android.widget.Toast;
import com.facebook.stetho.Stetho;
import com.junmp.print.app.AppManager;
import com.junmp.print.dao.db.DaoMaster;
import com.junmp.print.dao.db.DaoSession;
import com.junmp.print.dao.entity.JpTabConfig;
import com.junmp.print.util.RmoveFileUtil;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
/**
* <pre>
* 描述:
* 版本:1.0
* 日期:2018/4/18
* 作者:ningzp@junmp.com.cn
* </pre>
*/
public class PrintApplication extends Application {
/**
* 上下文对象
*/
private static Context mContext;
/**
* 主线程
*/
private static Thread mMainThread;
/**
* 主线程ID
*/
private static long mMainThreadId;
/**
* 主线程Handler
*/
private static Handler mHandler;
private DaoMaster.DevOpenHelper mHelper;
//private HMROpenHelper mHelper;
private SQLiteDatabase db;
private DaoMaster mDaoMaster;
private static DaoSession mDaoSession;
//静态单例
public static PrintApplication instances;
@Override
public void onCreate() {
super.onCreate();
instances = this;
mContext = getApplicationContext();
mMainThread = Thread.currentThread();
mMainThreadId = android.os.Process.myTid();
mHandler = new Handler();
setDatabase();
creatFile();
/*IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_PACKAGE_ADDED);
filter.addAction(Intent.ACTION_PACKAGE_REPLACED);
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
filter.addDataScheme("package");
registerReceiver(InitApkBroadCastReceiver,filter);*/
}
private BroadcastReceiver InitApkBroadCastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (Intent.ACTION_PACKAGE_ADDED.equals(intent.getAction())) {
RmoveFileUtil.rmoveFile(Environment.getExternalStorageDirectory() + "/Download/JPQYHand.apk");
Toast.makeText(context , "监听到系统广播添加" , Toast.LENGTH_LONG).show();
Log.d("InitApkBroad","监听到系统广播添加");
}
if (Intent.ACTION_PACKAGE_REMOVED.equals(intent.getAction())) {
RmoveFileUtil.rmoveFile(Environment.getExternalStorageDirectory() + "/Download/JPQYHand.apk");
Toast.makeText(context , "监听到系统广播移除" , Toast.LENGTH_LONG).show();
Log.d("InitApkBroad","监听到系统广播移除");
}
if (Intent.ACTION_PACKAGE_REPLACED.equals(intent.getAction())) {
RmoveFileUtil.rmoveFile(Environment.getExternalStorageDirectory() + "/Download/JPQYHand.apk");
Toast.makeText(context , "监听到系统广播替换" , Toast.LENGTH_LONG).show();
Log.d("InitApkBroad","监听到系统广播替换");
}
}
};
public static PrintApplication getInstances(){
return instances;
}
/**
* 初始化greenDao
*/
private void setDatabase() {
// 通过 DaoMaster 的内部类 DevOpenHelper,可以得到一个便利的 SQLiteOpenHelper 对象。
// 注意:默认的 DaoMaster.DevOpenHelper 会在数据库升级时,删除所有的表,意味着这将导致数据的丢失。
// 所以,在正式的项目中,还应该做一层封装,来实现数据库的安全升级。
//mHelper = new HMROpenHelper(this, "storeApp.db", null);
mHelper = new DaoMaster.DevOpenHelper(this, "storeApp.db", null);
db = mHelper.getWritableDatabase();
// 注意:该数据库连接属于 DaoMaster,所以多个 Session 指的是相同的数据库连接。
mDaoMaster = new DaoMaster(db);
mDaoSession = mDaoMaster.newSession();
//PrintApplication.getDaoSession().getJpTabConfigDao().deleteAll();
JpTabConfig JpTabConfig = new JpTabConfig(null,2,"csdm","产商代码","1", "1", 30, "", "N",
"", "N", "");
PrintApplication.getDaoSession().getJpTabConfigDao().insert(JpTabConfig);
}
/**
* 初始化文件夹
*/
private void creatFile() {
//先通过Environment(环境)的getExternalStorageState()方法来获取手机环境下的外置存储卡的状态,判断是否为挂载状态。
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
try{
String fileName = Environment.getExternalStorageDirectory()+"/JPQYHand/";
mkdir(fileName,"","");
mkdir(fileName+"ErrorXml/","重复数据","readMe.xml");
mkdir(fileName+"FwqdjyXml/","校验数据","readMe.xml");
mkdir(fileName+"TagsXml/","标签","readMe.xml");
mkdir(fileName+"Update/","发物清单和物资代码","readMe.xml");
}catch (Exception e){
e.printStackTrace();
}
}
}
private void mkdir(String fileName,String note,String file){
File path = new File(fileName);
//通知系统刷新文件夹
Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
if(!path.exists()){
path.mkdir();
try {
if(!note.equals("")){
File pathRead = new File(fileName+file);
//新建一个FileOutputStream(),把文件的路径传进去
FileOutputStream fileOutputStream = new FileOutputStream(pathRead);
//给定一个字符串,将其转换成字节数组
byte[] bytes = note.getBytes();
//通过输出流对象写入字节数组
fileOutputStream.write(bytes);
//关流
fileOutputStream.close();
pathRead.createNewFile();
}
//通过文件的对象file的createNewFile()方法来创建文件
intent.setData(Uri.fromFile(new File(fileName+file)));
this.sendBroadcast(intent);
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**
* 获取DaoSession
*/
public static DaoSession getDaoSession() {
return mDaoSession;
}
public SQLiteDatabase getDb() {
return db;
}
public static void exit() {
getApplicationManager().appExit(mContext);
}
public static PrintApplication getInstance() {
return instances;
}
private void init() {
//初始化LEAK内存泄露检查工具
//LeakCanary.install(this);
//初始化Stetho调试工具
Stetho.initialize(
Stetho.newInitializerBuilder(this)
.enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
.enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
.build());
}
public static AppManager getApplicationManager() {
return AppManager.getAppManager();
}
public static Context getContext() {
return mContext;
}
public static void setContext(Context mContext) {
PrintApplication.mContext = mContext;
}
public static Thread getMainThread() {
return mMainThread;
}
public static void setMainThread(Thread mMainThread) {
PrintApplication.mMainThread = mMainThread;
}
public static long getMainThreadId() {
return mMainThreadId;
}
public static void setMainThreadId(long mMainThreadId) {
PrintApplication.mMainThreadId = mMainThreadId;
}
public static Handler getMainHandler() {
return mHandler;
}
public static void setMainHandler(Handler mHandler) {
PrintApplication.mHandler = mHandler;
}
}
package com.junmp.print.app;
import com.junmp.print.util.LogUtil;
/**
* 全局常量
*/
public class AppConstants {
public static final String TAG = "Junmp_Store";
public static final int DEBUG_LEVEL = LogUtil.LEVEL_ALL;//日志输出级别
public static final class User {
public static final String USER_NO = "userNo";
public static final String NAME = "name";
public static final String PASSWORD = "password";
public static final String ID = "id";
public static final String ANTPOWER = "antPower";
public static final String ISJYSD = "isJysd";
public static final String ISJYSDHX = "isJysdhx";
public static final String STRWZHXNAME = "strWzhxName";
public static final String STRWZNAME = "strWzName";
public static final String STRWZDM = "strWzdm";
}
}
package com.junmp.print.app;
import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import java.util.Stack;
/**
* <pre>
* 描述:管理Activity
* 版本:1.0
* 日期:2017/8/24
* 作者:ningzp@junmp.com.cn
* </pre>
*/
public class AppManager {
private static Stack<Activity> activityStack;
private static AppManager instance;
private AppManager() {
}
/**
* 单一实例
*/
public static AppManager getAppManager() {
if (instance == null) {
instance = new AppManager();
}
return instance;
}
/**
* 添加Activity到堆栈
*/
public void addActivity(Activity activity) {
if (activityStack == null) {
activityStack = new Stack<Activity>();
}
activityStack.add(activity);
}
/**
* 获取当前Activity(堆栈中最后一个压入的)
*/
public Activity currentActivity() {
Activity activity = activityStack.lastElement();
return activity;
}
/**
* 结束当前Activity(堆栈中最后一个压入的)
*/
public void finishActivity() {
Activity activity = activityStack.lastElement();
finishActivity(activity);
}
/**
* 结束指定的Activity
*/
public void finishActivity(Activity activity) {
if (activity != null) {
activityStack.remove(activity);
activity.finish();
activity = null;
}
}
/**
* 结束指定类名的Activity
*/
public void finishActivity(Class<?> cls) {
for (Activity activity : activityStack) {
if (activity.getClass().equals(cls)) {
finishActivity(activity);
}
}
}
/**
* 结束所有Activity
*/
public void finishAllActivity() {
for (int i = 0, size = activityStack.size(); i < size; i++) {
if (null != activityStack.get(i)) {
activityStack.get(i).finish();
}
}
activityStack.clear();
}
/**
* 退出应用程序
*/
public void appExit(Context context) {
try {
finishAllActivity();
ActivityManager activityMgr =
(ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
activityMgr.killBackgroundProcesses(context.getPackageName());
System.exit(0);
} catch (Exception e) {
}
}
public boolean isAppExit() {
return activityStack == null || activityStack.isEmpty();
}
}
package com.junmp.print.app;
import android.app.ActivityManager;
import android.content.Context;
import android.os.Handler;
import android.support.multidex.MultiDex;
import com.facebook.stetho.Stetho;
import com.junmp.print.PrintApplication;
/**
* <pre>
* 描述:
* 版本:1.0
* 日期:2018/1/23
* 作者:ningzp@junmp.com.cn
* </pre>
*/
public class MainApplication extends PrintApplication {
public static MainApplication mInstance;
/**
* 上下文对象
*/
private static Context mContext;
/**
* 主线程
*/
private static Thread mMainThread;
/**
* 主线程ID
*/
private static long mMainThreadId;
/**
* 主线程Handler
*/
private static Handler mHandler;
@Override
public void onCreate() {
super.onCreate();
mInstance = this ;
mContext = getApplicationContext();
mMainThread = Thread.currentThread();
mMainThreadId = android.os.Process.myTid();
mHandler = new Handler();
MultiDex.install(this);
init();
}
public static void exit() {
getApplicationManager().appExit(mContext);
}
public static MainApplication getInstance() {
return mInstance;
}
private void init() {
//初始化LEAK内存泄露检查工具
//LeakCanary.install(this);
//初始化Stetho调试工具
Stetho.initialize(
Stetho.newInitializerBuilder(this)
.enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
.enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
.build());
}
public static String getCurrentProcessName(Context context) {
int pid = android.os.Process.myPid();
ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
for (ActivityManager.RunningAppProcessInfo appProcess : activityManager.getRunningAppProcesses()) {
if (appProcess.pid == pid) {
return appProcess.processName;
}
}
return null;
}
public static AppManager getApplicationManager() {
return AppManager.getAppManager();
}
public static Context getContext() {
return mContext;
}
public static void setContext(Context mContext) {
MainApplication.mContext = mContext;
}
public static Thread getMainThread() {
return mMainThread;
}
public static void setMainThread(Thread mMainThread) {
MainApplication.mMainThread = mMainThread;
}
public static long getMainThreadId() {
return mMainThreadId;
}
public static void setMainThreadId(long mMainThreadId) {
MainApplication.mMainThreadId = mMainThreadId;
}
public static Handler getMainHandler() {
return mHandler;
}
public static void setMainHandler(Handler mHandler) {
MainApplication.mHandler = mHandler;
}
}
package com.junmp.print.app;
import com.junmp.print.dao.entity.JpTabConfig;
import com.junmp.print.util.SPUtil;
import com.junmp.print.util.UIUtil;
/**
* <pre>
* 描述:设置用户相关的缓存
* 版本:1.0
* 日期:2017/8/24
* 作者:ningzp@junmp.com.cn
* </pre>
*/
public class UserCache {
/**
* 获取缓存的用户工号
*/
public static String getUserNo() {
return SPUtil.getInstance(UIUtil.getContext()).getString(AppConstants.User.USER_NO, "");
}
/**
* 获取缓存的用户名
*/
public static String getName() {
return SPUtil.getInstance(UIUtil.getContext()).getString(AppConstants.User.NAME, "");
}
/**
* 获取缓存的用户token
*/
public static String getPassWord() {
return SPUtil.getInstance(UIUtil.getContext()).getString(AppConstants.User.PASSWORD, "");
}
/**
* 获取缓存的用户id
*/
public static Long getId() {
return SPUtil.getInstance(UIUtil.getContext()).getLong(AppConstants.User.ID, 0l);
}
/**
* 获取缓存的设备天线功率antPower 默认25
*/
public static Integer getAntPower() {
return SPUtil.getInstance(UIUtil.getContext()).getInt(AppConstants.User.ANTPOWER, 25);
}
/**
* 设置设备天线功率antPower位置缓存
*
* @param antPower
*/
public static void saveAntPower(Integer antPower) {
SPUtil.getInstance(UIUtil.getContext()).putInt(AppConstants.User.ANTPOWER, antPower);
}
/**
* 获取缓存的是否锁定校验物资
*/
public static String getIsjysd() {
return SPUtil.getInstance(UIUtil.getContext()).getString(AppConstants.User.ISJYSD, "");
}
/**
* 获取缓存的是否锁定校验物资号型
*/
public static String getIsjysdhx() {
return SPUtil.getInstance(UIUtil.getContext()).getString(AppConstants.User.ISJYSDHX, "");
}
/**
* 获取缓存的物资号型名称
*/
public static String getStrWzhxName() {
return SPUtil.getInstance(UIUtil.getContext()).getString(AppConstants.User.STRWZHXNAME, "");
}
/**
* 获取缓存的物资名称
*/
public static String getStrWzName() {
return SPUtil.getInstance(UIUtil.getContext()).getString(AppConstants.User.STRWZNAME, "");
}
/**
* 获取缓存的物资代码
*/
public static String getStrWzdm() {
return SPUtil.getInstance(UIUtil.getContext()).getString(AppConstants.User.STRWZDM, "");
}
/**
* 设置登录用户缓存
*
* @param jpTabConfig
*/
public static void save(JpTabConfig jpTabConfig) {
SPUtil.getInstance(UIUtil.getContext()).putString(AppConstants.User.NAME, jpTabConfig.getStruser());
SPUtil.getInstance(UIUtil.getContext()).putString(AppConstants.User.PASSWORD, jpTabConfig.getStrpass());
SPUtil.getInstance(UIUtil.getContext()).putLong(AppConstants.User.ID, jpTabConfig.getId());
SPUtil.getInstance(UIUtil.getContext()).putString(AppConstants.User.ISJYSD, jpTabConfig.getIsjysd());
SPUtil.getInstance(UIUtil.getContext()).putString(AppConstants.User.ISJYSDHX, jpTabConfig.getIsjysdhx());
SPUtil.getInstance(UIUtil.getContext()).putString(AppConstants.User.STRWZHXNAME, jpTabConfig.getStrwzhxname());
SPUtil.getInstance(UIUtil.getContext()).putString(AppConstants.User.STRWZNAME, jpTabConfig.getStrwzname());
SPUtil.getInstance(UIUtil.getContext()).putString(AppConstants.User.STRWZDM, jpTabConfig.getStrwzdm());
SPUtil.getInstance(UIUtil.getContext()).putInt(AppConstants.User.ANTPOWER, jpTabConfig.getNpower());//0-33
}
/**
* 清除登出用户缓存
*/
public static void clear() {
SPUtil.getInstance(UIUtil.getContext()).remove(AppConstants.User.NAME);
SPUtil.getInstance(UIUtil.getContext()).remove(AppConstants.User.PASSWORD);
SPUtil.getInstance(UIUtil.getContext()).remove(AppConstants.User.ID);
SPUtil.getInstance(UIUtil.getContext()).remove(AppConstants.User.ISJYSD);
SPUtil.getInstance(UIUtil.getContext()).remove(AppConstants.User.ISJYSDHX);
SPUtil.getInstance(UIUtil.getContext()).remove(AppConstants.User.STRWZHXNAME);
SPUtil.getInstance(UIUtil.getContext()).remove(AppConstants.User.STRWZNAME);
SPUtil.getInstance(UIUtil.getContext()).remove(AppConstants.User.STRWZDM);
}
/**
* 设置登录用户密码
*
* @param password
*/
public static void savePassWord(String password) {
SPUtil.getInstance(UIUtil.getContext()).putString(AppConstants.User.PASSWORD, password);
}
}
package com.junmp.print.dao;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import com.junmp.print.dao.db.DaoMaster;
import com.junmp.print.dao.db.JpTabConfigDao;
import com.junmp.print.dao.db.JpTabCpjyjlDao;
import com.junmp.print.dao.db.JpTabCpjyjljgDao;
import com.junmp.print.dao.db.JpTabDjTempDao;
import com.junmp.print.dao.db.JpTabFwqdDao;
import com.junmp.print.dao.db.JpTabFwqdjyDao;
import com.junmp.print.dao.db.JpTabInoutTmpDao;
import com.junmp.print.dao.db.JpTabMbDao;
import com.junmp.print.dao.db.JpTabSysConfigDao;
import com.junmp.print.dao.db.JpTabTpRfidTempDao;
import com.junmp.print.dao.db.JpTabWzjyDao;
import com.junmp.print.dao.db.TabBzglWzdmDao;
import com.junmp.print.dao.db.TabBzglXtbzdwDao;
import com.junmp.print.dao.db.TabPzmxbWzdmJxcknewPmkDao;
import com.junmp.print.dao.db.TabPzzbJxcknewPmkDao;
import org.greenrobot.greendao.database.Database;
/**
* <pre>
* 描述:
* 版本:1.0
* 日期:2018/5/10
* 作者:wangq@junmp.com.cn
* </pre>
*/
public class HMROpenHelper extends DaoMaster.OpenHelper {
public HMROpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory) {
super(context, name, factory);
}
/**
* 数据库升级
* @param db
* @param oldVersion
* @param newVersion
*/
@Override
public void onUpgrade(Database db, int oldVersion, int newVersion) {
//操作数据库的更新 有几个表升级都可以传入到下面
MigrationHelper.getInstance().migrate(db,JpTabConfigDao.class,JpTabCpjyjlDao.class,JpTabCpjyjljgDao.class,JpTabDjTempDao.class,JpTabFwqdDao.class,
JpTabFwqdjyDao.class,JpTabInoutTmpDao.class,JpTabMbDao.class,JpTabSysConfigDao.class,JpTabTpRfidTempDao.class,JpTabWzjyDao.class,
TabBzglWzdmDao.class,TabBzglXtbzdwDao.class,TabPzmxbWzdmJxcknewPmkDao.class,TabPzzbJxcknewPmkDao.class);
}
}
package com.junmp.print.dao;
import android.database.Cursor;
import android.text.TextUtils;
import android.util.Log;
import com.junmp.print.dao.db.DaoMaster;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.internal.DaoConfig;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class MigrationHelper {
private static final String CONVERSION_CLASS_NOT_FOUND_EXCEPTION = "MIGRATION HELPER - CLASS DOESN'T MATCH WITH THE CURRENT PARAMETERS";
private static MigrationHelper instance;
public static MigrationHelper getInstance() {
if (instance == null) {
instance = new MigrationHelper();
}
return instance;
}
public void migrate(Database db, Class<? extends AbstractDao<?, ?>>... daoClasses) {
generateTempTables(db, daoClasses);
DaoMaster.dropAllTables(db, true);
DaoMaster.createAllTables(db, false);
restoreData(db, daoClasses);
}
/**
* 生成临时列表
*
* @param db
* @param daoClasses
*/
private void generateTempTables(Database db, Class<? extends AbstractDao<?, ?>>... daoClasses) {
for (int i = 0; i < daoClasses.length; i++) {
DaoConfig daoConfig = new DaoConfig(db, daoClasses[i]);
String divider = "";
String tableName = daoConfig.tablename;
String tempTableName = daoConfig.tablename.concat("_TEMP");
ArrayList<String> properties = new ArrayList<>();
StringBuilder createTableStringBuilder = new StringBuilder();
createTableStringBuilder.append("CREATE TABLE ").append(tempTableName).append(" (");
for (int j = 0; j < daoConfig.properties.length; j++) {
String columnName = daoConfig.properties[j].columnName;
if (getColumns(db, tableName).contains(columnName)) {
properties.add(columnName);
String type = null;
try {
type = getTypeByClass(daoConfig.properties[j].type);
} catch (Exception exception) {
exception.printStackTrace();
}
createTableStringBuilder.append(divider).append(columnName).append(" ").append(type);
if (daoConfig.properties[j].primaryKey) {
createTableStringBuilder.append(" PRIMARY KEY");
}
divider = ",";
}
}
createTableStringBuilder.append(");");
db.execSQL(createTableStringBuilder.toString());
StringBuilder insertTableStringBuilder = new StringBuilder();
insertTableStringBuilder.append("INSERT INTO ").append(tempTableName).append(" (");
insertTableStringBuilder.append(TextUtils.join(",", properties));
insertTableStringBuilder.append(") SELECT ");
insertTableStringBuilder.append(TextUtils.join(",", properties));
insertTableStringBuilder.append(" FROM ").append(tableName).append(";");
db.execSQL(insertTableStringBuilder.toString());
}
}
/**
* 存储新的数据库表 以及数据
*
* @param db
* @param daoClasses
*/
private void restoreData(Database db, Class<? extends AbstractDao<?, ?>>... daoClasses) {
for (int i = 0; i < daoClasses.length; i++) {
DaoConfig daoConfig = new DaoConfig(db, daoClasses[i]);
String tableName = daoConfig.tablename;
String tempTableName = daoConfig.tablename.concat("_TEMP");
ArrayList<String> properties = new ArrayList();
for (int j = 0; j < daoConfig.properties.length; j++) {
String columnName = daoConfig.properties[j].columnName;
if (getColumns(db, tempTableName).contains(columnName)) {
properties.add(columnName);
}
}
StringBuilder insertTableStringBuilder = new StringBuilder();
insertTableStringBuilder.append("INSERT INTO ").append(tableName).append(" (");
insertTableStringBuilder.append(TextUtils.join(",", properties));
insertTableStringBuilder.append(") SELECT ");
insertTableStringBuilder.append(TextUtils.join(",", properties));
insertTableStringBuilder.append(" FROM ").append(tempTableName).append(";");
StringBuilder dropTableStringBuilder = new StringBuilder();
dropTableStringBuilder.append("DROP TABLE ").append(tempTableName);
db.execSQL(insertTableStringBuilder.toString());
db.execSQL(dropTableStringBuilder.toString());
}
}
private String getTypeByClass(Class<?> type) throws Exception {
if (type.equals(String.class)) {
return "TEXT";
}
if (type.equals(Long.class) || type.equals(Integer.class) || type.equals(long.class)) {
return "INTEGER";
}
if (type.equals(Boolean.class)) {
return "BOOLEAN";
}
Exception exception = new Exception(CONVERSION_CLASS_NOT_FOUND_EXCEPTION.concat(" - Class: ").concat(type.toString()));
exception.printStackTrace();
throw exception;
}
private List<String> getColumns(Database db, String tableName) {
List<String> columns = new ArrayList<>();
Cursor cursor = null;
try {
cursor = db.rawQuery("SELECT * FROM " + tableName + " limit 1", null);
if (cursor != null) {
columns = new ArrayList<>(Arrays.asList(cursor.getColumnNames()));
}
} catch (Exception e) {
Log.v(tableName, e.getMessage(), e);
e.printStackTrace();
} finally {
if (cursor != null)
cursor.close();
}
return columns;
}
}
\ No newline at end of file
package com.junmp.print.dao;
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
import com.junmp.print.dao.entity.Wzdm;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.DatabaseStatement;
import org.greenrobot.greendao.internal.DaoConfig;
/**
* <pre>
* 描述:
* 版本:1.0
* 日期:2018/4/17
* 作者:ningzp@junmp.com.cn
* </pre>
*/
public class WzdmDao extends AbstractDao<Wzdm,Long>{
public static final String TABLE_NAME = "TAB_BZGL_WZDM" ;
public static class Properties {
}
public WzdmDao(DaoConfig config) {
super(config);
}
public WzdmDao(DaoConfig config, AbstractDaoSession daoSession) {
super(config, daoSession);
}
@Override
protected Wzdm readEntity(Cursor cursor, int offset) {
return null;
}
@Override
protected Long readKey(Cursor cursor, int offset) {
return null;
}
@Override
protected void readEntity(Cursor cursor, Wzdm entity, int offset) {
}
@Override
protected void bindValues(DatabaseStatement stmt, Wzdm entity) {
}
@Override
protected void bindValues(SQLiteStatement stmt, Wzdm entity) {
}
@Override
protected Long updateKeyAfterInsert(Wzdm entity, long rowId) {
return null;
}
@Override
protected Long getKey(Wzdm entity) {
return null;
}
@Override
protected boolean hasKey(Wzdm entity) {
return false;
}
@Override
protected boolean isEntityUpdateable() {
return false;
}
}
package com.junmp.print.dao.db;
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 11): knows all DAOs.
*/
public class DaoMaster extends AbstractDaoMaster {
public static final int SCHEMA_VERSION = 11;
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
JpTabConfigDao.createTable(db, ifNotExists);
JpTabCpjyjlDao.createTable(db, ifNotExists);
JpTabCpjyjljgDao.createTable(db, ifNotExists);
JpTabDjTempDao.createTable(db, ifNotExists);
JpTabFwqdDao.createTable(db, ifNotExists);
JpTabFwqdjyDao.createTable(db, ifNotExists);
JpTabInoutTmpDao.createTable(db, ifNotExists);
JpTabMbDao.createTable(db, ifNotExists);
JpTabSysConfigDao.createTable(db, ifNotExists);
JpTabTpRfidTempDao.createTable(db, ifNotExists);
JpTabWzjyDao.createTable(db, ifNotExists);
TabBzglWzdmDao.createTable(db, ifNotExists);
TabBzglXtbzdwDao.createTable(db, ifNotExists);
TabPzmxbWzdmJxcknewPmkDao.createTable(db, ifNotExists);
TabPzzbJxcknewPmkDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
JpTabConfigDao.dropTable(db, ifExists);
JpTabCpjyjlDao.dropTable(db, ifExists);
JpTabCpjyjljgDao.dropTable(db, ifExists);
JpTabDjTempDao.dropTable(db, ifExists);
JpTabFwqdDao.dropTable(db, ifExists);
JpTabFwqdjyDao.dropTable(db, ifExists);
JpTabInoutTmpDao.dropTable(db, ifExists);
JpTabMbDao.dropTable(db, ifExists);
JpTabSysConfigDao.dropTable(db, ifExists);
JpTabTpRfidTempDao.dropTable(db, ifExists);
JpTabWzjyDao.dropTable(db, ifExists);
TabBzglWzdmDao.dropTable(db, ifExists);
TabBzglXtbzdwDao.dropTable(db, ifExists);
TabPzmxbWzdmJxcknewPmkDao.dropTable(db, ifExists);
TabPzzbJxcknewPmkDao.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(JpTabConfigDao.class);
registerDaoClass(JpTabCpjyjlDao.class);
registerDaoClass(JpTabCpjyjljgDao.class);
registerDaoClass(JpTabDjTempDao.class);
registerDaoClass(JpTabFwqdDao.class);
registerDaoClass(JpTabFwqdjyDao.class);
registerDaoClass(JpTabInoutTmpDao.class);
registerDaoClass(JpTabMbDao.class);
registerDaoClass(JpTabSysConfigDao.class);
registerDaoClass(JpTabTpRfidTempDao.class);
registerDaoClass(JpTabWzjyDao.class);
registerDaoClass(TabBzglWzdmDao.class);
registerDaoClass(TabBzglXtbzdwDao.class);
registerDaoClass(TabPzmxbWzdmJxcknewPmkDao.class);
registerDaoClass(TabPzzbJxcknewPmkDao.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);
}
}
}
package com.junmp.print.dao.db;
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.junmp.print.dao.entity.JpTabConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "JP_TAB_CONFIG".
*/
public class JpTabConfigDao extends AbstractDao<JpTabConfig, Long> {
public static final String TABLENAME = "JP_TAB_CONFIG";
/**
* Properties of entity JpTabConfig.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property Id = new Property(0, Long.class, "id", true, "id");
public final static Property Nid = new Property(1, Integer.class, "nid", false, "nid");
public final static Property Strcsdm = new Property(2, String.class, "strcsdm", false, "strcsdm");
public final static Property Strcsmc = new Property(3, String.class, "strcsmc", false, "strcsmc");
public final static Property Struser = new Property(4, String.class, "struser", false, "struser");
public final static Property Strpass = new Property(5, String.class, "strpass", false, "strpass");
public final static Property Npower = new Property(6, Integer.class, "npower", false, "npower");
public final static Property Strwzdm = new Property(7, String.class, "strwzdm", false, "strwzdm");
public final static Property Isjysd = new Property(8, String.class, "isjysd", false, "isjysd");
public final static Property Strwzname = new Property(9, String.class, "strwzname", false, "strwzname");
public final static Property Isjysdhx = new Property(10, String.class, "isjysdhx", false, "isjysdhx");
public final static Property Strwzhxname = new Property(11, String.class, "strwzhxname", false, "strwzhx");
}
public JpTabConfigDao(DaoConfig config) {
super(config);
}
public JpTabConfigDao(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 + "\"JP_TAB_CONFIG\" (" + //
"\"id\" INTEGER PRIMARY KEY ," + // 0: id
"\"nid\" INTEGER NOT NULL ," + // 1: nid
"\"strcsdm\" TEXT," + // 2: strcsdm
"\"strcsmc\" TEXT," + // 3: strcsmc
"\"struser\" TEXT," + // 4: struser
"\"strpass\" TEXT," + // 5: strpass
"\"npower\" INTEGER," + // 6: npower
"\"strwzdm\" TEXT," + // 7: strwzdm
"\"isjysd\" TEXT," + // 8: isjysd
"\"strwzname\" TEXT," + // 9: strwzname
"\"isjysdhx\" TEXT," + // 10: isjysdhx
"\"strwzhx\" TEXT);"); // 11: strwzhxname
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"JP_TAB_CONFIG\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, JpTabConfig entity) {
stmt.clearBindings();
Long id = entity.getId();
if (id != null) {
stmt.bindLong(1, id);
}
stmt.bindLong(2, entity.getNid());
String strcsdm = entity.getStrcsdm();
if (strcsdm != null) {
stmt.bindString(3, strcsdm);
}
String strcsmc = entity.getStrcsmc();
if (strcsmc != null) {
stmt.bindString(4, strcsmc);
}
String struser = entity.getStruser();
if (struser != null) {
stmt.bindString(5, struser);
}
String strpass = entity.getStrpass();
if (strpass != null) {
stmt.bindString(6, strpass);
}
Integer npower = entity.getNpower();
if (npower != null) {
stmt.bindLong(7, npower);
}
String strwzdm = entity.getStrwzdm();
if (strwzdm != null) {
stmt.bindString(8, strwzdm);
}
String isjysd = entity.getIsjysd();
if (isjysd != null) {
stmt.bindString(9, isjysd);
}
String strwzname = entity.getStrwzname();
if (strwzname != null) {
stmt.bindString(10, strwzname);
}
String isjysdhx = entity.getIsjysdhx();
if (isjysdhx != null) {
stmt.bindString(11, isjysdhx);
}
String strwzhxname = entity.getStrwzhxname();
if (strwzhxname != null) {
stmt.bindString(12, strwzhxname);
}
}
@Override
protected final void bindValues(SQLiteStatement stmt, JpTabConfig entity) {
stmt.clearBindings();
Long id = entity.getId();
if (id != null) {
stmt.bindLong(1, id);
}
stmt.bindLong(2, entity.getNid());
String strcsdm = entity.getStrcsdm();
if (strcsdm != null) {
stmt.bindString(3, strcsdm);
}
String strcsmc = entity.getStrcsmc();
if (strcsmc != null) {
stmt.bindString(4, strcsmc);
}
String struser = entity.getStruser();
if (struser != null) {
stmt.bindString(5, struser);
}
String strpass = entity.getStrpass();
if (strpass != null) {
stmt.bindString(6, strpass);
}
Integer npower = entity.getNpower();
if (npower != null) {
stmt.bindLong(7, npower);
}
String strwzdm = entity.getStrwzdm();
if (strwzdm != null) {
stmt.bindString(8, strwzdm);
}
String isjysd = entity.getIsjysd();
if (isjysd != null) {
stmt.bindString(9, isjysd);
}
String strwzname = entity.getStrwzname();
if (strwzname != null) {
stmt.bindString(10, strwzname);
}
String isjysdhx = entity.getIsjysdhx();
if (isjysdhx != null) {
stmt.bindString(11, isjysdhx);
}
String strwzhxname = entity.getStrwzhxname();
if (strwzhxname != null) {
stmt.bindString(12, strwzhxname);
}
}
@Override
public Long readKey(Cursor cursor, int offset) {
return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
}
@Override
public JpTabConfig readEntity(Cursor cursor, int offset) {
JpTabConfig entity = new JpTabConfig( //
cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
cursor.getInt(offset + 1), // nid
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // strcsdm
cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // strcsmc
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // struser
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // strpass
cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6), // npower
cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // strwzdm
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // isjysd
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // strwzname
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // isjysdhx
cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11) // strwzhxname
);
return entity;
}
@Override
public void readEntity(Cursor cursor, JpTabConfig entity, int offset) {
entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
entity.setNid(cursor.getInt(offset + 1));
entity.setStrcsdm(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
entity.setStrcsmc(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
entity.setStruser(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
entity.setStrpass(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
entity.setNpower(cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6));
entity.setStrwzdm(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
entity.setIsjysd(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
entity.setStrwzname(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
entity.setIsjysdhx(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
entity.setStrwzhxname(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
}
@Override
protected final Long updateKeyAfterInsert(JpTabConfig entity, long rowId) {
entity.setId(rowId);
return rowId;
}
@Override
public Long getKey(JpTabConfig entity) {
if(entity != null) {
return entity.getId();
} else {
return null;
}
}
@Override
public boolean hasKey(JpTabConfig entity) {
return entity.getId() != null;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}
package com.junmp.print.dao.db;
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.junmp.print.dao.entity.JpTabDjTemp;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "JP_TAB_DJ_TEMP".
*/
public class JpTabDjTempDao extends AbstractDao<JpTabDjTemp, Void> {
public static final String TABLENAME = "JP_TAB_DJ_TEMP";
/**
* Properties of entity JpTabDjTemp.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property DJID = new Property(0, String.class, "DJID", false, "DJID");
public final static Property DWFH = new Property(1, String.class, "DWFH", false, "DWFH");
public final static Property DWDH = new Property(2, String.class, "DWDH", false, "DWDH");
public final static Property FHMC = new Property(3, String.class, "FHMC", false, "FHMC");
public final static Property MAID = new Property(4, String.class, "MAID", false, "MAID");
public final static Property BATCH = new Property(5, String.class, "BATCH", false, "BATCH");
public final static Property YQUANTITY = new Property(6, Integer.class, "YQUANTITY", false, "YQUANTITY");
public final static Property QUANTITY = new Property(7, Integer.class, "QUANTITY", false, "QUANTITY");
public final static Property MANAME = new Property(8, String.class, "MANAME", false, "MANAME");
public final static Property MAUNIT = new Property(9, String.class, "MAUNIT", false, "MAUNIT");
public final static Property YW = new Property(10, String.class, "YW", false, "YW");
public final static Property MAENGNAME = new Property(11, String.class, "MAENGNAME", false, "MAENGNAME");
}
public JpTabDjTempDao(DaoConfig config) {
super(config);
}
public JpTabDjTempDao(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 + "\"JP_TAB_DJ_TEMP\" (" + //
"\"DJID\" TEXT NOT NULL ," + // 0: DJID
"\"DWFH\" TEXT," + // 1: DWFH
"\"DWDH\" TEXT," + // 2: DWDH
"\"FHMC\" TEXT," + // 3: FHMC
"\"MAID\" TEXT," + // 4: MAID
"\"BATCH\" TEXT," + // 5: BATCH
"\"YQUANTITY\" INTEGER," + // 6: YQUANTITY
"\"QUANTITY\" INTEGER," + // 7: QUANTITY
"\"MANAME\" TEXT," + // 8: MANAME
"\"MAUNIT\" TEXT," + // 9: MAUNIT
"\"YW\" TEXT," + // 10: YW
"\"MAENGNAME\" TEXT);"); // 11: MAENGNAME
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"JP_TAB_DJ_TEMP\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, JpTabDjTemp entity) {
stmt.clearBindings();
stmt.bindString(1, entity.getDJID());
String DWFH = entity.getDWFH();
if (DWFH != null) {
stmt.bindString(2, DWFH);
}
String DWDH = entity.getDWDH();
if (DWDH != null) {
stmt.bindString(3, DWDH);
}
String FHMC = entity.getFHMC();
if (FHMC != null) {
stmt.bindString(4, FHMC);
}
String MAID = entity.getMAID();
if (MAID != null) {
stmt.bindString(5, MAID);
}
String BATCH = entity.getBATCH();
if (BATCH != null) {
stmt.bindString(6, BATCH);
}
Integer YQUANTITY = entity.getYQUANTITY();
if (YQUANTITY != null) {
stmt.bindLong(7, YQUANTITY);
}
Integer QUANTITY = entity.getQUANTITY();
if (QUANTITY != null) {
stmt.bindLong(8, QUANTITY);
}
String MANAME = entity.getMANAME();
if (MANAME != null) {
stmt.bindString(9, MANAME);
}
String MAUNIT = entity.getMAUNIT();
if (MAUNIT != null) {
stmt.bindString(10, MAUNIT);
}
String YW = entity.getYW();
if (YW != null) {
stmt.bindString(11, YW);
}
String MAENGNAME = entity.getMAENGNAME();
if (MAENGNAME != null) {
stmt.bindString(12, MAENGNAME);
}
}
@Override
protected final void bindValues(SQLiteStatement stmt, JpTabDjTemp entity) {
stmt.clearBindings();
stmt.bindString(1, entity.getDJID());
String DWFH = entity.getDWFH();
if (DWFH != null) {
stmt.bindString(2, DWFH);
}
String DWDH = entity.getDWDH();
if (DWDH != null) {
stmt.bindString(3, DWDH);
}
String FHMC = entity.getFHMC();
if (FHMC != null) {
stmt.bindString(4, FHMC);
}
String MAID = entity.getMAID();
if (MAID != null) {
stmt.bindString(5, MAID);
}
String BATCH = entity.getBATCH();
if (BATCH != null) {
stmt.bindString(6, BATCH);
}
Integer YQUANTITY = entity.getYQUANTITY();
if (YQUANTITY != null) {
stmt.bindLong(7, YQUANTITY);
}
Integer QUANTITY = entity.getQUANTITY();
if (QUANTITY != null) {
stmt.bindLong(8, QUANTITY);
}
String MANAME = entity.getMANAME();
if (MANAME != null) {
stmt.bindString(9, MANAME);
}
String MAUNIT = entity.getMAUNIT();
if (MAUNIT != null) {
stmt.bindString(10, MAUNIT);
}
String YW = entity.getYW();
if (YW != null) {
stmt.bindString(11, YW);
}
String MAENGNAME = entity.getMAENGNAME();
if (MAENGNAME != null) {
stmt.bindString(12, MAENGNAME);
}
}
@Override
public Void readKey(Cursor cursor, int offset) {
return null;
}
@Override
public JpTabDjTemp readEntity(Cursor cursor, int offset) {
JpTabDjTemp entity = new JpTabDjTemp( //
cursor.getString(offset + 0), // DJID
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // DWFH
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // DWDH
cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // FHMC
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // MAID
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // BATCH
cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6), // YQUANTITY
cursor.isNull(offset + 7) ? null : cursor.getInt(offset + 7), // QUANTITY
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // MANAME
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // MAUNIT
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // YW
cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11) // MAENGNAME
);
return entity;
}
@Override
public void readEntity(Cursor cursor, JpTabDjTemp entity, int offset) {
entity.setDJID(cursor.getString(offset + 0));
entity.setDWFH(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
entity.setDWDH(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
entity.setFHMC(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
entity.setMAID(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
entity.setBATCH(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
entity.setYQUANTITY(cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6));
entity.setQUANTITY(cursor.isNull(offset + 7) ? null : cursor.getInt(offset + 7));
entity.setMANAME(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
entity.setMAUNIT(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
entity.setYW(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
entity.setMAENGNAME(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
}
@Override
protected final Void updateKeyAfterInsert(JpTabDjTemp entity, long rowId) {
// Unsupported or missing PK type
return null;
}
@Override
public Void getKey(JpTabDjTemp entity) {
return null;
}
@Override
public boolean hasKey(JpTabDjTemp entity) {
// TODO
return false;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}
package com.junmp.print.dao.db;
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.junmp.print.dao.entity.JpTabInoutTmp;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "JP_TAB_INOUT_TMP".
*/
public class JpTabInoutTmpDao extends AbstractDao<JpTabInoutTmp, Void> {
public static final String TABLENAME = "JP_TAB_INOUT_TMP";
/**
* Properties of entity JpTabInoutTmp.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property STRWZDM = new Property(0, String.class, "STRWZDM", false, "STRWZDM");
public final static Property STRWZMC = new Property(1, String.class, "STRWZMC", false, "STRWZMC");
public final static Property STRWZHX = new Property(2, String.class, "STRWZHX", false, "STRWZHX");
public final static Property STRSCQY = new Property(3, String.class, "STRSCQY", false, "STRSCQY");
public final static Property STRSCRQ = new Property(4, String.class, "STRSCRQ", false, "STRSCRQ");
public final static Property NNUM = new Property(5, Integer.class, "NNUM", false, "NNUM");
public final static Property LSM = new Property(6, String.class, "LSM", false, "LSM");
public final static Property YW = new Property(7, String.class, "YW", false, "YW");
public final static Property KFID = new Property(8, String.class, "KFID", false, "KFID");
}
public JpTabInoutTmpDao(DaoConfig config) {
super(config);
}
public JpTabInoutTmpDao(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 + "\"JP_TAB_INOUT_TMP\" (" + //
"\"STRWZDM\" TEXT NOT NULL ," + // 0: STRWZDM
"\"STRWZMC\" TEXT NOT NULL ," + // 1: STRWZMC
"\"STRWZHX\" TEXT NOT NULL ," + // 2: STRWZHX
"\"STRSCQY\" TEXT NOT NULL ," + // 3: STRSCQY
"\"STRSCRQ\" TEXT NOT NULL ," + // 4: STRSCRQ
"\"NNUM\" INTEGER NOT NULL ," + // 5: NNUM
"\"LSM\" TEXT NOT NULL ," + // 6: LSM
"\"YW\" TEXT NOT NULL ," + // 7: YW
"\"KFID\" TEXT NOT NULL );"); // 8: KFID
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"JP_TAB_INOUT_TMP\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, JpTabInoutTmp entity) {
stmt.clearBindings();
stmt.bindString(1, entity.getSTRWZDM());
stmt.bindString(2, entity.getSTRWZMC());
stmt.bindString(3, entity.getSTRWZHX());
stmt.bindString(4, entity.getSTRSCQY());
stmt.bindString(5, entity.getSTRSCRQ());
stmt.bindLong(6, entity.getNNUM());
stmt.bindString(7, entity.getLSM());
stmt.bindString(8, entity.getYW());
stmt.bindString(9, entity.getKFID());
}
@Override
protected final void bindValues(SQLiteStatement stmt, JpTabInoutTmp entity) {
stmt.clearBindings();
stmt.bindString(1, entity.getSTRWZDM());
stmt.bindString(2, entity.getSTRWZMC());
stmt.bindString(3, entity.getSTRWZHX());
stmt.bindString(4, entity.getSTRSCQY());
stmt.bindString(5, entity.getSTRSCRQ());
stmt.bindLong(6, entity.getNNUM());
stmt.bindString(7, entity.getLSM());
stmt.bindString(8, entity.getYW());
stmt.bindString(9, entity.getKFID());
}
@Override
public Void readKey(Cursor cursor, int offset) {
return null;
}
@Override
public JpTabInoutTmp readEntity(Cursor cursor, int offset) {
JpTabInoutTmp entity = new JpTabInoutTmp( //
cursor.getString(offset + 0), // STRWZDM
cursor.getString(offset + 1), // STRWZMC
cursor.getString(offset + 2), // STRWZHX
cursor.getString(offset + 3), // STRSCQY
cursor.getString(offset + 4), // STRSCRQ
cursor.getInt(offset + 5), // NNUM
cursor.getString(offset + 6), // LSM
cursor.getString(offset + 7), // YW
cursor.getString(offset + 8) // KFID
);
return entity;
}
@Override
public void readEntity(Cursor cursor, JpTabInoutTmp entity, int offset) {
entity.setSTRWZDM(cursor.getString(offset + 0));
entity.setSTRWZMC(cursor.getString(offset + 1));
entity.setSTRWZHX(cursor.getString(offset + 2));
entity.setSTRSCQY(cursor.getString(offset + 3));
entity.setSTRSCRQ(cursor.getString(offset + 4));
entity.setNNUM(cursor.getInt(offset + 5));
entity.setLSM(cursor.getString(offset + 6));
entity.setYW(cursor.getString(offset + 7));
entity.setKFID(cursor.getString(offset + 8));
}
@Override
protected final Void updateKeyAfterInsert(JpTabInoutTmp entity, long rowId) {
// Unsupported or missing PK type
return null;
}
@Override
public Void getKey(JpTabInoutTmp entity) {
return null;
}
@Override
public boolean hasKey(JpTabInoutTmp entity) {
// TODO
return false;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}
package com.junmp.print.dao.db;
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.junmp.print.dao.entity.JpTabMb;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "JP_TAB_MB".
*/
public class JpTabMbDao extends AbstractDao<JpTabMb, Void> {
public static final String TABLENAME = "JP_TAB_MB";
/**
* Properties of entity JpTabMb.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property DJID = new Property(0, String.class, "DJID", false, "DJID");
public final static Property MAID = new Property(1, String.class, "MAID", false, "MAID");
public final static Property MANAME = new Property(2, String.class, "MANAME", false, "MANAME");
public final static Property MAENGNAME = new Property(3, String.class, "MAENGNAME", false, "MAENGNAME");
public final static Property YQUANTITY = new Property(4, Integer.class, "YQUANTITY", false, "YQUANTITY");
public final static Property QUANTITY = new Property(5, Integer.class, "QUANTITY", false, "QUANTITY");
public final static Property YZPNUM = new Property(6, Integer.class, "YZPNUM", false, "YZPNUM");
public final static Property LSM = new Property(7, String.class, "LSM", false, "LSM");
}
public JpTabMbDao(DaoConfig config) {
super(config);
}
public JpTabMbDao(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 + "\"JP_TAB_MB\" (" + //
"\"DJID\" TEXT NOT NULL ," + // 0: DJID
"\"MAID\" TEXT NOT NULL ," + // 1: MAID
"\"MANAME\" TEXT NOT NULL ," + // 2: MANAME
"\"MAENGNAME\" TEXT NOT NULL ," + // 3: MAENGNAME
"\"YQUANTITY\" INTEGER NOT NULL ," + // 4: YQUANTITY
"\"QUANTITY\" INTEGER NOT NULL ," + // 5: QUANTITY
"\"YZPNUM\" INTEGER NOT NULL ," + // 6: YZPNUM
"\"LSM\" TEXT);"); // 7: LSM
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"JP_TAB_MB\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, JpTabMb entity) {
stmt.clearBindings();
stmt.bindString(1, entity.getDJID());
stmt.bindString(2, entity.getMAID());
stmt.bindString(3, entity.getMANAME());
stmt.bindString(4, entity.getMAENGNAME());
stmt.bindLong(5, entity.getYQUANTITY());
stmt.bindLong(6, entity.getQUANTITY());
stmt.bindLong(7, entity.getYZPNUM());
String LSM = entity.getLSM();
if (LSM != null) {
stmt.bindString(8, LSM);
}
}
@Override
protected final void bindValues(SQLiteStatement stmt, JpTabMb entity) {
stmt.clearBindings();
stmt.bindString(1, entity.getDJID());
stmt.bindString(2, entity.getMAID());
stmt.bindString(3, entity.getMANAME());
stmt.bindString(4, entity.getMAENGNAME());
stmt.bindLong(5, entity.getYQUANTITY());
stmt.bindLong(6, entity.getQUANTITY());
stmt.bindLong(7, entity.getYZPNUM());
String LSM = entity.getLSM();
if (LSM != null) {
stmt.bindString(8, LSM);
}
}
@Override
public Void readKey(Cursor cursor, int offset) {
return null;
}
@Override
public JpTabMb readEntity(Cursor cursor, int offset) {
JpTabMb entity = new JpTabMb( //
cursor.getString(offset + 0), // DJID
cursor.getString(offset + 1), // MAID
cursor.getString(offset + 2), // MANAME
cursor.getString(offset + 3), // MAENGNAME
cursor.getInt(offset + 4), // YQUANTITY
cursor.getInt(offset + 5), // QUANTITY
cursor.getInt(offset + 6), // YZPNUM
cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // LSM
);
return entity;
}
@Override
public void readEntity(Cursor cursor, JpTabMb entity, int offset) {
entity.setDJID(cursor.getString(offset + 0));
entity.setMAID(cursor.getString(offset + 1));
entity.setMANAME(cursor.getString(offset + 2));
entity.setMAENGNAME(cursor.getString(offset + 3));
entity.setYQUANTITY(cursor.getInt(offset + 4));
entity.setQUANTITY(cursor.getInt(offset + 5));
entity.setYZPNUM(cursor.getInt(offset + 6));
entity.setLSM(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
}
@Override
protected final Void updateKeyAfterInsert(JpTabMb entity, long rowId) {
// Unsupported or missing PK type
return null;
}
@Override
public Void getKey(JpTabMb entity) {
return null;
}
@Override
public boolean hasKey(JpTabMb entity) {
// TODO
return false;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}
package com.junmp.print.dao.db;
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.junmp.print.dao.entity.JpTabSysConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "JP_TAB_SYS_CONFIG".
*/
public class JpTabSysConfigDao extends AbstractDao<JpTabSysConfig, Void> {
public static final String TABLENAME = "JP_TAB_SYS_CONFIG";
/**
* Properties of entity JpTabSysConfig.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property NID = new Property(0, Integer.class, "NID", false, "NID");
public final static Property StrUser = new Property(1, String.class, "StrUser", false, "StrUser");
public final static Property StrPass = new Property(2, String.class, "StrPass", false, "StrPass");
public final static Property NPower = new Property(3, Integer.class, "NPower", false, "NPower");
public final static Property StrJxckIP = new Property(4, String.class, "StrJxckIP", false, "StrJxckIP");
public final static Property StrJxckDbLink = new Property(5, String.class, "StrJxckDbLink", false, "StrJxckDbLink");
public final static Property StrWsIP = new Property(6, String.class, "StrWsIP", false, "StrWsIP");
public final static Property KFID = new Property(7, String.class, "KFID", false, "KFID");
public final static Property KFMC = new Property(8, String.class, "KFMC", false, "KFMC");
}
public JpTabSysConfigDao(DaoConfig config) {
super(config);
}
public JpTabSysConfigDao(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 + "\"JP_TAB_SYS_CONFIG\" (" + //
"\"NID\" INTEGER NOT NULL ," + // 0: NID
"\"StrUser\" TEXT NOT NULL ," + // 1: StrUser
"\"StrPass\" TEXT NOT NULL ," + // 2: StrPass
"\"NPower\" INTEGER NOT NULL ," + // 3: NPower
"\"StrJxckIP\" TEXT NOT NULL ," + // 4: StrJxckIP
"\"StrJxckDbLink\" TEXT NOT NULL ," + // 5: StrJxckDbLink
"\"StrWsIP\" TEXT NOT NULL ," + // 6: StrWsIP
"\"KFID\" TEXT NOT NULL ," + // 7: KFID
"\"KFMC\" TEXT NOT NULL );"); // 8: KFMC
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"JP_TAB_SYS_CONFIG\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, JpTabSysConfig entity) {
stmt.clearBindings();
stmt.bindLong(1, entity.getNID());
stmt.bindString(2, entity.getStrUser());
stmt.bindString(3, entity.getStrPass());
stmt.bindLong(4, entity.getNPower());
stmt.bindString(5, entity.getStrJxckIP());
stmt.bindString(6, entity.getStrJxckDbLink());
stmt.bindString(7, entity.getStrWsIP());
stmt.bindString(8, entity.getKFID());
stmt.bindString(9, entity.getKFMC());
}
@Override
protected final void bindValues(SQLiteStatement stmt, JpTabSysConfig entity) {
stmt.clearBindings();
stmt.bindLong(1, entity.getNID());
stmt.bindString(2, entity.getStrUser());
stmt.bindString(3, entity.getStrPass());
stmt.bindLong(4, entity.getNPower());
stmt.bindString(5, entity.getStrJxckIP());
stmt.bindString(6, entity.getStrJxckDbLink());
stmt.bindString(7, entity.getStrWsIP());
stmt.bindString(8, entity.getKFID());
stmt.bindString(9, entity.getKFMC());
}
@Override
public Void readKey(Cursor cursor, int offset) {
return null;
}
@Override
public JpTabSysConfig readEntity(Cursor cursor, int offset) {
JpTabSysConfig entity = new JpTabSysConfig( //
cursor.getInt(offset + 0), // NID
cursor.getString(offset + 1), // StrUser
cursor.getString(offset + 2), // StrPass
cursor.getInt(offset + 3), // NPower
cursor.getString(offset + 4), // StrJxckIP
cursor.getString(offset + 5), // StrJxckDbLink
cursor.getString(offset + 6), // StrWsIP
cursor.getString(offset + 7), // KFID
cursor.getString(offset + 8) // KFMC
);
return entity;
}
@Override
public void readEntity(Cursor cursor, JpTabSysConfig entity, int offset) {
entity.setNID(cursor.getInt(offset + 0));
entity.setStrUser(cursor.getString(offset + 1));
entity.setStrPass(cursor.getString(offset + 2));
entity.setNPower(cursor.getInt(offset + 3));
entity.setStrJxckIP(cursor.getString(offset + 4));
entity.setStrJxckDbLink(cursor.getString(offset + 5));
entity.setStrWsIP(cursor.getString(offset + 6));
entity.setKFID(cursor.getString(offset + 7));
entity.setKFMC(cursor.getString(offset + 8));
}
@Override
protected final Void updateKeyAfterInsert(JpTabSysConfig entity, long rowId) {
// Unsupported or missing PK type
return null;
}
@Override
public Void getKey(JpTabSysConfig entity) {
return null;
}
@Override
public boolean hasKey(JpTabSysConfig entity) {
// TODO
return false;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}
package com.junmp.print.dao.db;
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.junmp.print.dao.entity.JpTabTpRfidTemp;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "JP_TAB_TP_RFID_TEMP".
*/
public class JpTabTpRfidTempDao extends AbstractDao<JpTabTpRfidTemp, Void> {
public static final String TABLENAME = "JP_TAB_TP_RFID_TEMP";
/**
* Properties of entity JpTabTpRfidTemp.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property STRWZEPC = new Property(0, String.class, "STRWZEPC", false, "STRWZEPC");
public final static Property STRTPEPC = new Property(1, String.class, "STRTPEPC", false, "STRTPEPC");
public final static Property STRWZDM = new Property(2, String.class, "STRWZDM", false, "STRWZDM");
public final static Property STRWZMC = new Property(3, String.class, "STRWZMC", false, "STRWZMC");
public final static Property STRWZHX = new Property(4, String.class, "STRWZHX", false, "STRWZHX");
public final static Property NNUM = new Property(5, Integer.class, "NNUM", false, "NNUM");
public final static Property DJID = new Property(6, String.class, "DJID", false, "DJID");
public final static Property STRSCQY = new Property(7, String.class, "STRSCQY", false, "STRSCQY");
public final static Property STRSCRQ = new Property(8, String.class, "STRSCRQ", false, "STRSCRQ");
}
public JpTabTpRfidTempDao(DaoConfig config) {
super(config);
}
public JpTabTpRfidTempDao(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 + "\"JP_TAB_TP_RFID_TEMP\" (" + //
"\"STRWZEPC\" TEXT NOT NULL ," + // 0: STRWZEPC
"\"STRTPEPC\" TEXT NOT NULL ," + // 1: STRTPEPC
"\"STRWZDM\" TEXT NOT NULL ," + // 2: STRWZDM
"\"STRWZMC\" TEXT NOT NULL ," + // 3: STRWZMC
"\"STRWZHX\" TEXT NOT NULL ," + // 4: STRWZHX
"\"NNUM\" INTEGER NOT NULL ," + // 5: NNUM
"\"DJID\" TEXT NOT NULL ," + // 6: DJID
"\"STRSCQY\" TEXT NOT NULL ," + // 7: STRSCQY
"\"STRSCRQ\" TEXT NOT NULL );"); // 8: STRSCRQ
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"JP_TAB_TP_RFID_TEMP\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, JpTabTpRfidTemp entity) {
stmt.clearBindings();
stmt.bindString(1, entity.getSTRWZEPC());
stmt.bindString(2, entity.getSTRTPEPC());
stmt.bindString(3, entity.getSTRWZDM());
stmt.bindString(4, entity.getSTRWZMC());
stmt.bindString(5, entity.getSTRWZHX());
stmt.bindLong(6, entity.getNNUM());
stmt.bindString(7, entity.getDJID());
stmt.bindString(8, entity.getSTRSCQY());
stmt.bindString(9, entity.getSTRSCRQ());
}
@Override
protected final void bindValues(SQLiteStatement stmt, JpTabTpRfidTemp entity) {
stmt.clearBindings();
stmt.bindString(1, entity.getSTRWZEPC());
stmt.bindString(2, entity.getSTRTPEPC());
stmt.bindString(3, entity.getSTRWZDM());
stmt.bindString(4, entity.getSTRWZMC());
stmt.bindString(5, entity.getSTRWZHX());
stmt.bindLong(6, entity.getNNUM());
stmt.bindString(7, entity.getDJID());
stmt.bindString(8, entity.getSTRSCQY());
stmt.bindString(9, entity.getSTRSCRQ());
}
@Override
public Void readKey(Cursor cursor, int offset) {
return null;
}
@Override
public JpTabTpRfidTemp readEntity(Cursor cursor, int offset) {
JpTabTpRfidTemp entity = new JpTabTpRfidTemp( //
cursor.getString(offset + 0), // STRWZEPC
cursor.getString(offset + 1), // STRTPEPC
cursor.getString(offset + 2), // STRWZDM
cursor.getString(offset + 3), // STRWZMC
cursor.getString(offset + 4), // STRWZHX
cursor.getInt(offset + 5), // NNUM
cursor.getString(offset + 6), // DJID
cursor.getString(offset + 7), // STRSCQY
cursor.getString(offset + 8) // STRSCRQ
);
return entity;
}
@Override
public void readEntity(Cursor cursor, JpTabTpRfidTemp entity, int offset) {
entity.setSTRWZEPC(cursor.getString(offset + 0));
entity.setSTRTPEPC(cursor.getString(offset + 1));
entity.setSTRWZDM(cursor.getString(offset + 2));
entity.setSTRWZMC(cursor.getString(offset + 3));
entity.setSTRWZHX(cursor.getString(offset + 4));
entity.setNNUM(cursor.getInt(offset + 5));
entity.setDJID(cursor.getString(offset + 6));
entity.setSTRSCQY(cursor.getString(offset + 7));
entity.setSTRSCRQ(cursor.getString(offset + 8));
}
@Override
protected final Void updateKeyAfterInsert(JpTabTpRfidTemp entity, long rowId) {
// Unsupported or missing PK type
return null;
}
@Override
public Void getKey(JpTabTpRfidTemp entity) {
return null;
}
@Override
public boolean hasKey(JpTabTpRfidTemp entity) {
// TODO
return false;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}
package com.junmp.print.dao.db;
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.junmp.print.dao.entity.JpTabWzjy;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "JP_TAB_WZJY".
*/
public class JpTabWzjyDao extends AbstractDao<JpTabWzjy, Long> {
public static final String TABLENAME = "JP_TAB_WZJY";
/**
* Properties of entity JpTabWzjy.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property Id = new Property(0, Long.class, "id", true, "id");
public final static Property Strwzepc = new Property(1, String.class, "strwzepc", false, "strwzepc");
public final static Property IsOk = new Property(2, String.class, "isOk", false, "isOk");
public final static Property IsOut = new Property(3, String.class, "isOut", false, "isOut");
public final static Property DtDate = new Property(4, Integer.class, "dtDate", false, "dtDate");
public final static Property Strwzdm = new Property(5, String.class, "strwzdm", false, "strwzdm");
public final static Property Strwzmc = new Property(6, String.class, "strwzmc", false, "strwzmc");
public final static Property Strwzhx = new Property(7, String.class, "strwzhx", false, "strwzhx");
public final static Property StrXiang = new Property(8, String.class, "strXiang", false, "strXiang");
public final static Property StrNum = new Property(9, String.class, "strNum", false, "strNum");
public final static Property Lsm = new Property(10, String.class, "lsm", false, "lsm");
public final static Property StrSubEpc = new Property(11, String.class, "strSubEpc", false, "strSubEpc");
}
public JpTabWzjyDao(DaoConfig config) {
super(config);
}
public JpTabWzjyDao(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 + "\"JP_TAB_WZJY\" (" + //
"\"id\" INTEGER PRIMARY KEY ," + // 0: id
"\"strwzepc\" TEXT NOT NULL ," + // 1: strwzepc
"\"isOk\" TEXT," + // 2: isOk
"\"isOut\" TEXT," + // 3: isOut
"\"dtDate\" INTEGER," + // 4: dtDate
"\"strwzdm\" TEXT," + // 5: strwzdm
"\"strwzmc\" TEXT," + // 6: strwzmc
"\"strwzhx\" TEXT," + // 7: strwzhx
"\"strXiang\" TEXT," + // 8: strXiang
"\"strNum\" TEXT," + // 9: strNum
"\"lsm\" TEXT," + // 10: lsm
"\"strSubEpc\" TEXT);"); // 11: strSubEpc
// Add Indexes
db.execSQL("CREATE UNIQUE INDEX " + constraint + "strwzepc ON \"JP_TAB_WZJY\"" +
" (\"strwzepc\" ASC);");
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"JP_TAB_WZJY\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, JpTabWzjy entity) {
stmt.clearBindings();
Long id = entity.getId();
if (id != null) {
stmt.bindLong(1, id);
}
stmt.bindString(2, entity.getStrwzepc());
String isOk = entity.getIsOk();
if (isOk != null) {
stmt.bindString(3, isOk);
}
String isOut = entity.getIsOut();
if (isOut != null) {
stmt.bindString(4, isOut);
}
Integer dtDate = entity.getDtDate();
if (dtDate != null) {
stmt.bindLong(5, dtDate);
}
String strwzdm = entity.getStrwzdm();
if (strwzdm != null) {
stmt.bindString(6, strwzdm);
}
String strwzmc = entity.getStrwzmc();
if (strwzmc != null) {
stmt.bindString(7, strwzmc);
}
String strwzhx = entity.getStrwzhx();
if (strwzhx != null) {
stmt.bindString(8, strwzhx);
}
String strXiang = entity.getStrXiang();
if (strXiang != null) {
stmt.bindString(9, strXiang);
}
String strNum = entity.getStrNum();
if (strNum != null) {
stmt.bindString(10, strNum);
}
String lsm = entity.getLsm();
if (lsm != null) {
stmt.bindString(11, lsm);
}
String strSubEpc = entity.getStrSubEpc();
if (strSubEpc != null) {
stmt.bindString(12, strSubEpc);
}
}
@Override
protected final void bindValues(SQLiteStatement stmt, JpTabWzjy entity) {
stmt.clearBindings();
Long id = entity.getId();
if (id != null) {
stmt.bindLong(1, id);
}
stmt.bindString(2, entity.getStrwzepc());
String isOk = entity.getIsOk();
if (isOk != null) {
stmt.bindString(3, isOk);
}
String isOut = entity.getIsOut();
if (isOut != null) {
stmt.bindString(4, isOut);
}
Integer dtDate = entity.getDtDate();
if (dtDate != null) {
stmt.bindLong(5, dtDate);
}
String strwzdm = entity.getStrwzdm();
if (strwzdm != null) {
stmt.bindString(6, strwzdm);
}
String strwzmc = entity.getStrwzmc();
if (strwzmc != null) {
stmt.bindString(7, strwzmc);
}
String strwzhx = entity.getStrwzhx();
if (strwzhx != null) {
stmt.bindString(8, strwzhx);
}
String strXiang = entity.getStrXiang();
if (strXiang != null) {
stmt.bindString(9, strXiang);
}
String strNum = entity.getStrNum();
if (strNum != null) {
stmt.bindString(10, strNum);
}
String lsm = entity.getLsm();
if (lsm != null) {
stmt.bindString(11, lsm);
}
String strSubEpc = entity.getStrSubEpc();
if (strSubEpc != null) {
stmt.bindString(12, strSubEpc);
}
}
@Override
public Long readKey(Cursor cursor, int offset) {
return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
}
@Override
public JpTabWzjy readEntity(Cursor cursor, int offset) {
JpTabWzjy entity = new JpTabWzjy( //
cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
cursor.getString(offset + 1), // strwzepc
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // isOk
cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // isOut
cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4), // dtDate
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // strwzdm
cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // strwzmc
cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // strwzhx
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // strXiang
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // strNum
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // lsm
cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11) // strSubEpc
);
return entity;
}
@Override
public void readEntity(Cursor cursor, JpTabWzjy entity, int offset) {
entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
entity.setStrwzepc(cursor.getString(offset + 1));
entity.setIsOk(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
entity.setIsOut(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
entity.setDtDate(cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4));
entity.setStrwzdm(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
entity.setStrwzmc(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
entity.setStrwzhx(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
entity.setStrXiang(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
entity.setStrNum(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
entity.setLsm(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
entity.setStrSubEpc(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
}
@Override
protected final Long updateKeyAfterInsert(JpTabWzjy entity, long rowId) {
entity.setId(rowId);
return rowId;
}
@Override
public Long getKey(JpTabWzjy entity) {
if(entity != null) {
return entity.getId();
} else {
return null;
}
}
@Override
public boolean hasKey(JpTabWzjy entity) {
return entity.getId() != null;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}
package com.junmp.print.dao.db;
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.junmp.print.dao.entity.TabBzglWzdm;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "TAB_BZGL_WZDM".
*/
public class TabBzglWzdmDao extends AbstractDao<TabBzglWzdm, Void> {
public static final String TABLENAME = "TAB_BZGL_WZDM";
/**
* Properties of entity TabBzglWzdm.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property DRXH = new Property(0, String.class, "DRXH", false, "DRXH");
public final static Property FLDM = new Property(1, String.class, "FLDM", false, "FLDM");
public final static Property LSM = new Property(2, String.class, "LSM", false, "LSM");
public final static Property ZBQMC = new Property(3, String.class, "ZBQMC", false, "ZBQMC");
public final static Property JLDW = new Property(4, String.class, "JLDW", false, "JLDW");
public final static Property HXLBBSM = new Property(5, String.class, "HXLBBSM", false, "HXLBBSM");
public final static Property HXLBMC = new Property(6, String.class, "HXLBMC", false, "HXLBMC");
public final static Property HX = new Property(7, String.class, "HX", false, "HX");
public final static Property DMLBBM = new Property(8, String.class, "DMLBBM", false, "DMLBBM");
public final static Property DMLBMC = new Property(9, String.class, "DMLBMC", false, "DMLBMC");
public final static Property WZDM = new Property(10, String.class, "WZDM", false, "WZDM");
public final static Property HXDM = new Property(11, String.class, "HXDM", false, "HXDM");
public final static Property HXFLDM = new Property(12, String.class, "HXFLDM", false, "HXFLDM");
}
public TabBzglWzdmDao(DaoConfig config) {
super(config);
}
public TabBzglWzdmDao(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 + "\"TAB_BZGL_WZDM\" (" + //
"\"DRXH\" TEXT," + // 0: DRXH
"\"FLDM\" TEXT," + // 1: FLDM
"\"LSM\" TEXT NOT NULL ," + // 2: LSM
"\"ZBQMC\" TEXT NOT NULL ," + // 3: ZBQMC
"\"JLDW\" TEXT," + // 4: JLDW
"\"HXLBBSM\" TEXT," + // 5: HXLBBSM
"\"HXLBMC\" TEXT," + // 6: HXLBMC
"\"HX\" TEXT NOT NULL ," + // 7: HX
"\"DMLBBM\" TEXT," + // 8: DMLBBM
"\"DMLBMC\" TEXT," + // 9: DMLBMC
"\"WZDM\" TEXT," + // 10: WZDM
"\"HXDM\" TEXT NOT NULL ," + // 11: HXDM
"\"HXFLDM\" TEXT);"); // 12: HXFLDM
// Add Indexes
db.execSQL("CREATE UNIQUE INDEX " + constraint + "LSM ON \"TAB_BZGL_WZDM\"" +
" (\"LSM\" ASC);");
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TAB_BZGL_WZDM\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, TabBzglWzdm entity) {
stmt.clearBindings();
String DRXH = entity.getDRXH();
if (DRXH != null) {
stmt.bindString(1, DRXH);
}
String FLDM = entity.getFLDM();
if (FLDM != null) {
stmt.bindString(2, FLDM);
}
stmt.bindString(3, entity.getLSM());
stmt.bindString(4, entity.getZBQMC());
String JLDW = entity.getJLDW();
if (JLDW != null) {
stmt.bindString(5, JLDW);
}
String HXLBBSM = entity.getHXLBBSM();
if (HXLBBSM != null) {
stmt.bindString(6, HXLBBSM);
}
String HXLBMC = entity.getHXLBMC();
if (HXLBMC != null) {
stmt.bindString(7, HXLBMC);
}
stmt.bindString(8, entity.getHX());
String DMLBBM = entity.getDMLBBM();
if (DMLBBM != null) {
stmt.bindString(9, DMLBBM);
}
String DMLBMC = entity.getDMLBMC();
if (DMLBMC != null) {
stmt.bindString(10, DMLBMC);
}
String WZDM = entity.getWZDM();
if (WZDM != null) {
stmt.bindString(11, WZDM);
}
stmt.bindString(12, entity.getHXDM());
String HXFLDM = entity.getHXFLDM();
if (HXFLDM != null) {
stmt.bindString(13, HXFLDM);
}
}
@Override
protected final void bindValues(SQLiteStatement stmt, TabBzglWzdm entity) {
stmt.clearBindings();
String DRXH = entity.getDRXH();
if (DRXH != null) {
stmt.bindString(1, DRXH);
}
String FLDM = entity.getFLDM();
if (FLDM != null) {
stmt.bindString(2, FLDM);
}
stmt.bindString(3, entity.getLSM());
stmt.bindString(4, entity.getZBQMC());
String JLDW = entity.getJLDW();
if (JLDW != null) {
stmt.bindString(5, JLDW);
}
String HXLBBSM = entity.getHXLBBSM();
if (HXLBBSM != null) {
stmt.bindString(6, HXLBBSM);
}
String HXLBMC = entity.getHXLBMC();
if (HXLBMC != null) {
stmt.bindString(7, HXLBMC);
}
stmt.bindString(8, entity.getHX());
String DMLBBM = entity.getDMLBBM();
if (DMLBBM != null) {
stmt.bindString(9, DMLBBM);
}
String DMLBMC = entity.getDMLBMC();
if (DMLBMC != null) {
stmt.bindString(10, DMLBMC);
}
String WZDM = entity.getWZDM();
if (WZDM != null) {
stmt.bindString(11, WZDM);
}
stmt.bindString(12, entity.getHXDM());
String HXFLDM = entity.getHXFLDM();
if (HXFLDM != null) {
stmt.bindString(13, HXFLDM);
}
}
@Override
public Void readKey(Cursor cursor, int offset) {
return null;
}
@Override
public TabBzglWzdm readEntity(Cursor cursor, int offset) {
TabBzglWzdm entity = new TabBzglWzdm( //
cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // DRXH
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // FLDM
cursor.getString(offset + 2), // LSM
cursor.getString(offset + 3), // ZBQMC
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // JLDW
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // HXLBBSM
cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // HXLBMC
cursor.getString(offset + 7), // HX
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // DMLBBM
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // DMLBMC
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // WZDM
cursor.getString(offset + 11), // HXDM
cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12) // HXFLDM
);
return entity;
}
@Override
public void readEntity(Cursor cursor, TabBzglWzdm entity, int offset) {
entity.setDRXH(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
entity.setFLDM(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
entity.setLSM(cursor.getString(offset + 2));
entity.setZBQMC(cursor.getString(offset + 3));
entity.setJLDW(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
entity.setHXLBBSM(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
entity.setHXLBMC(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
entity.setHX(cursor.getString(offset + 7));
entity.setDMLBBM(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
entity.setDMLBMC(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
entity.setWZDM(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
entity.setHXDM(cursor.getString(offset + 11));
entity.setHXFLDM(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
}
@Override
protected final Void updateKeyAfterInsert(TabBzglWzdm entity, long rowId) {
// Unsupported or missing PK type
return null;
}
@Override
public Void getKey(TabBzglWzdm entity) {
return null;
}
@Override
public boolean hasKey(TabBzglWzdm entity) {
// TODO
return false;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}
package com.junmp.print.dao.db;
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.junmp.print.dao.entity.TabPzmxbWzdmJxcknewPmk;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "TAB_PZMXB_WZDM_JXCKNEW_PMK".
*/
public class TabPzmxbWzdmJxcknewPmkDao extends AbstractDao<TabPzmxbWzdmJxcknewPmk, Void> {
public static final String TABLENAME = "TAB_PZMXB_WZDM_JXCKNEW_PMK";
/**
* Properties of entity TabPzmxbWzdmJxcknewPmk.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property DJID = new Property(0, Integer.class, "DJID", false, "DJID");
public final static Property GZND = new Property(1, Integer.class, "GZND", false, "GZND");
public final static Property YW = new Property(2, String.class, "YW", false, "YW");
public final static Property KFID = new Property(3, String.class, "KFID", false, "KFID");
public final static Property KFMC = new Property(4, String.class, "KFMC", false, "KFMC");
public final static Property PMDM = new Property(5, String.class, "PMDM", false, "PMDM");
public final static Property LSM = new Property(6, String.class, "LSM", false, "LSM");
public final static Property ZBQMC = new Property(7, String.class, "ZBQMC", false, "ZBQMC");
public final static Property HX = new Property(8, String.class, "HX", false, "HX");
public final static Property JLDW = new Property(9, String.class, "JLDW", false, "JLDW");
public final static Property YSSL = new Property(10, Integer.class, "YSSL", false, "YSSL");
public final static Property SSSL = new Property(11, Integer.class, "SSSL", false, "SSSL");
public final static Property YFSL = new Property(12, Integer.class, "YFSL", false, "YFSL");
public final static Property SFSL = new Property(13, Integer.class, "SFSL", false, "SFSL");
public final static Property KFFL = new Property(14, String.class, "KFFL", false, "KFFL");
public final static Property ISSAVE = new Property(15, Integer.class, "ISSAVE", false, "ISSAVE");
public final static Property ISUPLOAD = new Property(16, Integer.class, "ISUPLOAD", false, "ISUPLOAD");
}
public TabPzmxbWzdmJxcknewPmkDao(DaoConfig config) {
super(config);
}
public TabPzmxbWzdmJxcknewPmkDao(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 + "\"TAB_PZMXB_WZDM_JXCKNEW_PMK\" (" + //
"\"DJID\" INTEGER NOT NULL ," + // 0: DJID
"\"GZND\" INTEGER NOT NULL ," + // 1: GZND
"\"YW\" TEXT NOT NULL ," + // 2: YW
"\"KFID\" TEXT NOT NULL ," + // 3: KFID
"\"KFMC\" TEXT NOT NULL ," + // 4: KFMC
"\"PMDM\" TEXT NOT NULL ," + // 5: PMDM
"\"LSM\" TEXT NOT NULL ," + // 6: LSM
"\"ZBQMC\" TEXT NOT NULL ," + // 7: ZBQMC
"\"HX\" TEXT NOT NULL ," + // 8: HX
"\"JLDW\" TEXT NOT NULL ," + // 9: JLDW
"\"YSSL\" INTEGER NOT NULL ," + // 10: YSSL
"\"SSSL\" INTEGER NOT NULL ," + // 11: SSSL
"\"YFSL\" INTEGER NOT NULL ," + // 12: YFSL
"\"SFSL\" INTEGER NOT NULL ," + // 13: SFSL
"\"KFFL\" TEXT NOT NULL ," + // 14: KFFL
"\"ISSAVE\" INTEGER NOT NULL ," + // 15: ISSAVE
"\"ISUPLOAD\" INTEGER NOT NULL );"); // 16: ISUPLOAD
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TAB_PZMXB_WZDM_JXCKNEW_PMK\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, TabPzmxbWzdmJxcknewPmk entity) {
stmt.clearBindings();
stmt.bindLong(1, entity.getDJID());
stmt.bindLong(2, entity.getGZND());
stmt.bindString(3, entity.getYW());
stmt.bindString(4, entity.getKFID());
stmt.bindString(5, entity.getKFMC());
stmt.bindString(6, entity.getPMDM());
stmt.bindString(7, entity.getLSM());
stmt.bindString(8, entity.getZBQMC());
stmt.bindString(9, entity.getHX());
stmt.bindString(10, entity.getJLDW());
stmt.bindLong(11, entity.getYSSL());
stmt.bindLong(12, entity.getSSSL());
stmt.bindLong(13, entity.getYFSL());
stmt.bindLong(14, entity.getSFSL());
stmt.bindString(15, entity.getKFFL());
stmt.bindLong(16, entity.getISSAVE());
stmt.bindLong(17, entity.getISUPLOAD());
}
@Override
protected final void bindValues(SQLiteStatement stmt, TabPzmxbWzdmJxcknewPmk entity) {
stmt.clearBindings();
stmt.bindLong(1, entity.getDJID());
stmt.bindLong(2, entity.getGZND());
stmt.bindString(3, entity.getYW());
stmt.bindString(4, entity.getKFID());
stmt.bindString(5, entity.getKFMC());
stmt.bindString(6, entity.getPMDM());
stmt.bindString(7, entity.getLSM());
stmt.bindString(8, entity.getZBQMC());
stmt.bindString(9, entity.getHX());
stmt.bindString(10, entity.getJLDW());
stmt.bindLong(11, entity.getYSSL());
stmt.bindLong(12, entity.getSSSL());
stmt.bindLong(13, entity.getYFSL());
stmt.bindLong(14, entity.getSFSL());
stmt.bindString(15, entity.getKFFL());
stmt.bindLong(16, entity.getISSAVE());
stmt.bindLong(17, entity.getISUPLOAD());
}
@Override
public Void readKey(Cursor cursor, int offset) {
return null;
}
@Override
public TabPzmxbWzdmJxcknewPmk readEntity(Cursor cursor, int offset) {
TabPzmxbWzdmJxcknewPmk entity = new TabPzmxbWzdmJxcknewPmk( //
cursor.getInt(offset + 0), // DJID
cursor.getInt(offset + 1), // GZND
cursor.getString(offset + 2), // YW
cursor.getString(offset + 3), // KFID
cursor.getString(offset + 4), // KFMC
cursor.getString(offset + 5), // PMDM
cursor.getString(offset + 6), // LSM
cursor.getString(offset + 7), // ZBQMC
cursor.getString(offset + 8), // HX
cursor.getString(offset + 9), // JLDW
cursor.getInt(offset + 10), // YSSL
cursor.getInt(offset + 11), // SSSL
cursor.getInt(offset + 12), // YFSL
cursor.getInt(offset + 13), // SFSL
cursor.getString(offset + 14), // KFFL
cursor.getInt(offset + 15), // ISSAVE
cursor.getInt(offset + 16) // ISUPLOAD
);
return entity;
}
@Override
public void readEntity(Cursor cursor, TabPzmxbWzdmJxcknewPmk entity, int offset) {
entity.setDJID(cursor.getInt(offset + 0));
entity.setGZND(cursor.getInt(offset + 1));
entity.setYW(cursor.getString(offset + 2));
entity.setKFID(cursor.getString(offset + 3));
entity.setKFMC(cursor.getString(offset + 4));
entity.setPMDM(cursor.getString(offset + 5));
entity.setLSM(cursor.getString(offset + 6));
entity.setZBQMC(cursor.getString(offset + 7));
entity.setHX(cursor.getString(offset + 8));
entity.setJLDW(cursor.getString(offset + 9));
entity.setYSSL(cursor.getInt(offset + 10));
entity.setSSSL(cursor.getInt(offset + 11));
entity.setYFSL(cursor.getInt(offset + 12));
entity.setSFSL(cursor.getInt(offset + 13));
entity.setKFFL(cursor.getString(offset + 14));
entity.setISSAVE(cursor.getInt(offset + 15));
entity.setISUPLOAD(cursor.getInt(offset + 16));
}
@Override
protected final Void updateKeyAfterInsert(TabPzmxbWzdmJxcknewPmk entity, long rowId) {
// Unsupported or missing PK type
return null;
}
@Override
public Void getKey(TabPzmxbWzdmJxcknewPmk entity) {
return null;
}
@Override
public boolean hasKey(TabPzmxbWzdmJxcknewPmk entity) {
// TODO
return false;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}
package com.junmp.print.dao.db;
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.junmp.print.dao.entity.TabPzzbJxcknewPmk;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "TAB_PZZB_JXCKNEW_PMK".
*/
public class TabPzzbJxcknewPmkDao extends AbstractDao<TabPzzbJxcknewPmk, Void> {
public static final String TABLENAME = "TAB_PZZB_JXCKNEW_PMK";
/**
* Properties of entity TabPzzbJxcknewPmk.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property GZND = new Property(0, Integer.class, "GZND", false, "GZND");
public final static Property DJID = new Property(1, Integer.class, "DJID", false, "DJID");
public final static Property KFID = new Property(2, String.class, "KFID", false, "KFID");
public final static Property PZZ = new Property(3, String.class, "PZZ", false, "PZZ");
public final static Property YW = new Property(4, String.class, "YW", false, "YW");
public final static Property FHMC = new Property(5, String.class, "FHMC", false, "FHMC");
public final static Property FWDW = new Property(6, String.class, "FWDW", false, "FWDW");
public final static Property SWDW = new Property(7, String.class, "SWDW", false, "SWDW");
public final static Property JSDW = new Property(8, String.class, "JSDW", false, "JSDW");
public final static Property ISSAVE = new Property(9, Integer.class, "ISSAVE", false, "ISSAVE");
public final static Property ISUPLOAD = new Property(10, Integer.class, "ISUPLOAD", false, "ISUPLOAD");
}
public TabPzzbJxcknewPmkDao(DaoConfig config) {
super(config);
}
public TabPzzbJxcknewPmkDao(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 + "\"TAB_PZZB_JXCKNEW_PMK\" (" + //
"\"GZND\" INTEGER NOT NULL ," + // 0: GZND
"\"DJID\" INTEGER NOT NULL ," + // 1: DJID
"\"KFID\" TEXT NOT NULL ," + // 2: KFID
"\"PZZ\" TEXT NOT NULL ," + // 3: PZZ
"\"YW\" TEXT NOT NULL ," + // 4: YW
"\"FHMC\" TEXT NOT NULL ," + // 5: FHMC
"\"FWDW\" TEXT NOT NULL ," + // 6: FWDW
"\"SWDW\" TEXT NOT NULL ," + // 7: SWDW
"\"JSDW\" TEXT NOT NULL ," + // 8: JSDW
"\"ISSAVE\" INTEGER NOT NULL ," + // 9: ISSAVE
"\"ISUPLOAD\" INTEGER NOT NULL );"); // 10: ISUPLOAD
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TAB_PZZB_JXCKNEW_PMK\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, TabPzzbJxcknewPmk entity) {
stmt.clearBindings();
stmt.bindLong(1, entity.getGZND());
stmt.bindLong(2, entity.getDJID());
stmt.bindString(3, entity.getKFID());
stmt.bindString(4, entity.getPZZ());
stmt.bindString(5, entity.getYW());
stmt.bindString(6, entity.getFHMC());
stmt.bindString(7, entity.getFWDW());
stmt.bindString(8, entity.getSWDW());
stmt.bindString(9, entity.getJSDW());
stmt.bindLong(10, entity.getISSAVE());
stmt.bindLong(11, entity.getISUPLOAD());
}
@Override
protected final void bindValues(SQLiteStatement stmt, TabPzzbJxcknewPmk entity) {
stmt.clearBindings();
stmt.bindLong(1, entity.getGZND());
stmt.bindLong(2, entity.getDJID());
stmt.bindString(3, entity.getKFID());
stmt.bindString(4, entity.getPZZ());
stmt.bindString(5, entity.getYW());
stmt.bindString(6, entity.getFHMC());
stmt.bindString(7, entity.getFWDW());
stmt.bindString(8, entity.getSWDW());
stmt.bindString(9, entity.getJSDW());
stmt.bindLong(10, entity.getISSAVE());
stmt.bindLong(11, entity.getISUPLOAD());
}
@Override
public Void readKey(Cursor cursor, int offset) {
return null;
}
@Override
public TabPzzbJxcknewPmk readEntity(Cursor cursor, int offset) {
TabPzzbJxcknewPmk entity = new TabPzzbJxcknewPmk( //
cursor.getInt(offset + 0), // GZND
cursor.getInt(offset + 1), // DJID
cursor.getString(offset + 2), // KFID
cursor.getString(offset + 3), // PZZ
cursor.getString(offset + 4), // YW
cursor.getString(offset + 5), // FHMC
cursor.getString(offset + 6), // FWDW
cursor.getString(offset + 7), // SWDW
cursor.getString(offset + 8), // JSDW
cursor.getInt(offset + 9), // ISSAVE
cursor.getInt(offset + 10) // ISUPLOAD
);
return entity;
}
@Override
public void readEntity(Cursor cursor, TabPzzbJxcknewPmk entity, int offset) {
entity.setGZND(cursor.getInt(offset + 0));
entity.setDJID(cursor.getInt(offset + 1));
entity.setKFID(cursor.getString(offset + 2));
entity.setPZZ(cursor.getString(offset + 3));
entity.setYW(cursor.getString(offset + 4));
entity.setFHMC(cursor.getString(offset + 5));
entity.setFWDW(cursor.getString(offset + 6));
entity.setSWDW(cursor.getString(offset + 7));
entity.setJSDW(cursor.getString(offset + 8));
entity.setISSAVE(cursor.getInt(offset + 9));
entity.setISUPLOAD(cursor.getInt(offset + 10));
}
@Override
protected final Void updateKeyAfterInsert(TabPzzbJxcknewPmk entity, long rowId) {
// Unsupported or missing PK type
return null;
}
@Override
public Void getKey(TabPzzbJxcknewPmk entity) {
return null;
}
@Override
public boolean hasKey(TabPzzbJxcknewPmk entity) {
// TODO
return false;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}
package com.junmp.print.dao.entity;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Property;
/**
* <pre>
* 描述:
* 版本:1.0
* 日期:2018/5/10
* 作者:wangq@junmp.com.cn
* </pre>
*/
@Entity( nameInDb = "JP_TAB_CONFIG")
public class JpTabConfig {
@Id
@Property(nameInDb = "id")
private Long id;
@NotNull
@Property(nameInDb = "nid")
private Integer nid;
/**
*产商代码
*/
@Property(nameInDb = "strcsdm")
private String strcsdm;
/**
*产商名称
*/
@Property(nameInDb = "strcsmc")
private String strcsmc;
/**
*登录用户名
*/
@Property(nameInDb = "struser")
private String struser;
/**
*登录密码
*/
@Property(nameInDb = "strpass")
private String strpass;
/**
*读写器功率
*/
@Property(nameInDb = "npower")
private Integer npower;
/**
*锁定的物资代码
*/
@Property(nameInDb = "strwzdm")
private String strwzdm;
/**
*是否锁定校验物资 Y / N
*/
@Property(nameInDb = "isjysd")
private String isjysd;
/**
*锁定的物资品名
*/
@Property(nameInDb = "strwzname")
private String strwzname;
/**
*是否锁定校验的物资号型
*/
@Property(nameInDb = "isjysdhx")
private String isjysdhx;
/**
*锁定的物资号型
*/
@Property(nameInDb = "strwzhx")
private String strwzhxname;
@Generated(hash = 1497768156)
public JpTabConfig(Long id, @NotNull Integer nid, String strcsdm,
String strcsmc, String struser, String strpass, Integer npower,
String strwzdm, String isjysd, String strwzname, String isjysdhx,
String strwzhxname) {
this.id = id;
this.nid = nid;
this.strcsdm = strcsdm;
this.strcsmc = strcsmc;
this.struser = struser;
this.strpass = strpass;
this.npower = npower;
this.strwzdm = strwzdm;
this.isjysd = isjysd;
this.strwzname = strwzname;
this.isjysdhx = isjysdhx;
this.strwzhxname = strwzhxname;
}
@Generated(hash = 745647916)
public JpTabConfig() {
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getNid() {
return this.nid;
}
public void setNid(Integer nid) {
this.nid = nid;
}
public String getStrcsdm() {
return this.strcsdm;
}
public void setStrcsdm(String strcsdm) {
this.strcsdm = strcsdm;
}
public String getStrcsmc() {
return this.strcsmc;
}
public void setStrcsmc(String strcsmc) {
this.strcsmc = strcsmc;
}
public String getStruser() {
return this.struser;
}
public void setStruser(String struser) {
this.struser = struser;
}
public String getStrpass() {
return this.strpass;
}
public void setStrpass(String strpass) {
this.strpass = strpass;
}
public Integer getNpower() {
return this.npower;
}
public void setNpower(Integer npower) {
this.npower = npower;
}
public String getStrwzdm() {
return this.strwzdm;
}
public void setStrwzdm(String strwzdm) {
this.strwzdm = strwzdm;
}
public String getIsjysd() {
return this.isjysd;
}
public void setIsjysd(String isjysd) {
this.isjysd = isjysd;
}
public String getStrwzname() {
return this.strwzname;
}
public void setStrwzname(String strwzname) {
this.strwzname = strwzname;
}
public String getIsjysdhx() {
return this.isjysdhx;
}
public void setIsjysdhx(String isjysdhx) {
this.isjysdhx = isjysdhx;
}
public String getStrwzhxname() {
return this.strwzhxname;
}
public void setStrwzhxname(String strwzhxname) {
this.strwzhxname = strwzhxname;
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。 点击展开。
差异被折叠。 点击展开。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论