Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
A
AnchorCollect
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hywang
AnchorCollect
Commits
a4c6ad67
Commit
a4c6ad67
authored
Feb 25, 2022
by
hywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加称重、诊疗、免疫接口
parent
429a4804
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1983 additions
and
2029 deletions
+1983
-2029
Repository.java
...src/main/java/com/phlx/anchorcollect/data/Repository.java
+48
-3
ApiService.java
...ain/java/com/phlx/anchorcollect/data/http/ApiService.java
+69
-1
HttpDataSource.java
...java/com/phlx/anchorcollect/data/http/HttpDataSource.java
+50
-1
HttpDataSourceImpl.java
.../com/phlx/anchorcollect/data/http/HttpDataSourceImpl.java
+48
-1
DaoMaster.java
...rc/main/java/com/phlx/anchorcollect/db/gen/DaoMaster.java
+9
-9
DaoSession.java
...c/main/java/com/phlx/anchorcollect/db/gen/DaoSession.java
+39
-39
ImmuneEntityDao.java
...n/java/com/phlx/anchorcollect/db/gen/ImmuneEntityDao.java
+0
-408
MedicalEntityDao.java
.../java/com/phlx/anchorcollect/db/gen/MedicalEntityDao.java
+0
-423
WeightingEntityDao.java
...ava/com/phlx/anchorcollect/db/gen/WeightingEntityDao.java
+0
-232
ImmuneBatchEntity.java
...java/com/phlx/anchorcollect/entity/ImmuneBatchEntity.java
+160
-196
MedicalRecordEntity.java
...va/com/phlx/anchorcollect/entity/MedicalRecordEntity.java
+357
-0
WeightManEntity.java
...n/java/com/phlx/anchorcollect/entity/WeightManEntity.java
+228
-0
WeightingEntity.java
...n/java/com/phlx/anchorcollect/entity/WeightingEntity.java
+0
-224
BasicsCollectFragment.java
...phlx/anchorcollect/ui/fragment/BasicsCollectFragment.java
+1
-1
BreedingRecordFragment.java
...hlx/anchorcollect/ui/fragment/BreedingRecordFragment.java
+2
-2
PerformanceFragment.java
...m/phlx/anchorcollect/ui/fragment/PerformanceFragment.java
+1
-1
CollectListVM.java
.../com/phlx/anchorcollect/ui/fragment/vm/CollectListVM.java
+46
-48
CollectVM.java
...java/com/phlx/anchorcollect/ui/fragment/vm/CollectVM.java
+185
-190
CattleItem.java
.../main/java/com/phlx/anchorcollect/ui/info/CattleItem.java
+0
-9
CattleVM.java
...rc/main/java/com/phlx/anchorcollect/ui/info/CattleVM.java
+42
-51
SettingVM.java
...ain/java/com/phlx/anchorcollect/ui/setting/SettingVM.java
+501
-3
fragment_basics_collect.xml
app/src/main/res/layout/fragment_basics_collect.xml
+197
-187
No files found.
app/src/main/java/com/phlx/anchorcollect/data/Repository.java
View file @
a4c6ad67
...
@@ -10,19 +10,19 @@ import com.phlx.anchorcollect.entity.BreedingRecordEntity;
...
@@ -10,19 +10,19 @@ import com.phlx.anchorcollect.entity.BreedingRecordEntity;
import
com.phlx.anchorcollect.entity.CattleResumeEntity
;
import
com.phlx.anchorcollect.entity.CattleResumeEntity
;
import
com.phlx.anchorcollect.entity.DictEntity
;
import
com.phlx.anchorcollect.entity.DictEntity
;
import
com.phlx.anchorcollect.entity.GenData
;
import
com.phlx.anchorcollect.entity.GenData
;
import
com.phlx.anchorcollect.entity.ImmuneBatchEntity
;
import
com.phlx.anchorcollect.entity.LoginData
;
import
com.phlx.anchorcollect.entity.LoginData
;
import
com.phlx.anchorcollect.entity.MedicalRecordEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.WeightManEntity
;
import
com.phlx.anchorcollect.params.CollectResponse
;
import
com.phlx.anchorcollect.params.CollectResponse
;
import
com.phlx.anchorcollect.params.ListResponse
;
import
com.phlx.anchorcollect.params.ListResponse
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
io.reactivex.Observable
;
import
io.reactivex.Observable
;
import
me.goldze.mvvmhabit.base.BaseModel
;
import
me.goldze.mvvmhabit.base.BaseModel
;
import
okhttp3.RequestBody
;
import
okhttp3.RequestBody
;
import
retrofit2.http.Body
;
import
retrofit2.http.FieldMap
;
/**
/**
*
*
...
@@ -126,6 +126,51 @@ public class Repository extends BaseModel implements HttpDataSource, LocalDataSo
...
@@ -126,6 +126,51 @@ public class Repository extends BaseModel implements HttpDataSource, LocalDataSo
return
mHttpDataSource
.
uploadBreedingRecordDetailList
(
body
);
return
mHttpDataSource
.
uploadBreedingRecordDetailList
(
body
);
}
}
@Override
public
Observable
<
ListResponse
<
WeightManEntity
>>
downloadWeightManList
(
Map
<
String
,
String
>
map
)
{
return
mHttpDataSource
.
downloadWeightManList
(
map
);
}
@Override
public
Observable
<
CollectResponse
>
downloadWeightManListSync
(
RequestBody
body
)
{
return
mHttpDataSource
.
downloadWeightManListSync
(
body
);
}
@Override
public
Observable
<
CollectResponse
>
uploadWeightManList
(
RequestBody
body
)
{
return
mHttpDataSource
.
uploadWeightManList
(
body
);
}
@Override
public
Observable
<
ListResponse
<
MedicalRecordEntity
>>
downloadMedicalRecordList
(
Map
<
String
,
String
>
map
)
{
return
mHttpDataSource
.
downloadMedicalRecordList
(
map
);
}
@Override
public
Observable
<
CollectResponse
>
downloadMedicalRecordListSync
(
RequestBody
body
)
{
return
mHttpDataSource
.
downloadMedicalRecordListSync
(
body
);
}
@Override
public
Observable
<
CollectResponse
>
uploadMedicalRecordList
(
RequestBody
body
)
{
return
mHttpDataSource
.
uploadMedicalRecordList
(
body
);
}
@Override
public
Observable
<
ListResponse
<
ImmuneBatchEntity
>>
downloadImmuneBatchList
(
Map
<
String
,
String
>
map
)
{
return
mHttpDataSource
.
downloadImmuneBatchList
(
map
);
}
@Override
public
Observable
<
CollectResponse
>
downloadImmuneBatchListSync
(
RequestBody
body
)
{
return
mHttpDataSource
.
downloadImmuneBatchListSync
(
body
);
}
@Override
public
Observable
<
CollectResponse
>
uploadImmuneBatchList
(
RequestBody
body
)
{
return
mHttpDataSource
.
uploadImmuneBatchList
(
body
);
}
/****************************************************************************/
/****************************************************************************/
@Override
@Override
...
...
app/src/main/java/com/phlx/anchorcollect/data/http/ApiService.java
View file @
a4c6ad67
...
@@ -6,12 +6,14 @@ import com.phlx.anchorcollect.entity.BreedingRecordEntity;
...
@@ -6,12 +6,14 @@ import com.phlx.anchorcollect.entity.BreedingRecordEntity;
import
com.phlx.anchorcollect.entity.CattleResumeEntity
;
import
com.phlx.anchorcollect.entity.CattleResumeEntity
;
import
com.phlx.anchorcollect.entity.DictEntity
;
import
com.phlx.anchorcollect.entity.DictEntity
;
import
com.phlx.anchorcollect.entity.GenData
;
import
com.phlx.anchorcollect.entity.GenData
;
import
com.phlx.anchorcollect.entity.ImmuneBatchEntity
;
import
com.phlx.anchorcollect.entity.LoginData
;
import
com.phlx.anchorcollect.entity.LoginData
;
import
com.phlx.anchorcollect.entity.MedicalRecordEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.WeightManEntity
;
import
com.phlx.anchorcollect.params.CollectResponse
;
import
com.phlx.anchorcollect.params.CollectResponse
;
import
com.phlx.anchorcollect.params.ListResponse
;
import
com.phlx.anchorcollect.params.ListResponse
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
io.reactivex.Observable
;
import
io.reactivex.Observable
;
...
@@ -144,6 +146,72 @@ public interface ApiService {
...
@@ -144,6 +146,72 @@ public interface ApiService {
@POST
(
"/api/cattlematingDetaill/add"
)
@POST
(
"/api/cattlematingDetaill/add"
)
Observable
<
CollectResponse
>
uploadBreedingRecordDetailList
(
@Body
RequestBody
body
);
Observable
<
CollectResponse
>
uploadBreedingRecordDetailList
(
@Body
RequestBody
body
);
/**
* 获取-称重管理-列表
* SyncState 0根据记录更新,1重新更新
*/
@FormUrlEncoded
@POST
(
"/api/weightMan/list"
)
Observable
<
ListResponse
<
WeightManEntity
>>
downloadWeightManList
(
@FieldMap
Map
<
String
,
String
>
map
);
/**
* 获取-称重管理-列表-返回
*/
@Headers
({
"Content-Type: application/json"
,
"Accept: application/json"
})
@POST
(
"/api/weightMan/sync/add"
)
Observable
<
CollectResponse
>
downloadWeightManListSync
(
@Body
RequestBody
body
);
/**
* 上传-称重管理-列表
*/
@Headers
({
"Content-Type: application/json"
,
"Accept: application/json"
})
@POST
(
"/api/weightMan/add"
)
Observable
<
CollectResponse
>
uploadWeightManList
(
@Body
RequestBody
body
);
/**
* 获取-诊疗记录-列表
* SyncState 0根据记录更新,1重新更新
*/
@FormUrlEncoded
@POST
(
"/api/medicalrecords/list"
)
Observable
<
ListResponse
<
MedicalRecordEntity
>>
downloadMedicalRecordList
(
@FieldMap
Map
<
String
,
String
>
map
);
/**
* 获取-诊疗记录-列表-返回
*/
@Headers
({
"Content-Type: application/json"
,
"Accept: application/json"
})
@POST
(
"/api/medicalrecords/sync/add"
)
Observable
<
CollectResponse
>
downloadMedicalRecordListSync
(
@Body
RequestBody
body
);
/**
* 上传-诊疗记录-列表
*/
@Headers
({
"Content-Type: application/json"
,
"Accept: application/json"
})
@POST
(
"/api/medicalrecords/add"
)
Observable
<
CollectResponse
>
uploadMedicalRecordList
(
@Body
RequestBody
body
);
/**
* 获取-免疫记录-列表
* SyncState 0根据记录更新,1重新更新
*/
@FormUrlEncoded
@POST
(
"/api/immunebatch/list"
)
Observable
<
ListResponse
<
ImmuneBatchEntity
>>
downloadImmuneBatchList
(
@FieldMap
Map
<
String
,
String
>
map
);
/**
* 获取-免疫记录-列表-返回
*/
@Headers
({
"Content-Type: application/json"
,
"Accept: application/json"
})
@POST
(
"/api/immunebatch/sync/add"
)
Observable
<
CollectResponse
>
downloadImmuneBatchListSync
(
@Body
RequestBody
body
);
/**
* 上传-免疫记录-列表
*/
@Headers
({
"Content-Type: application/json"
,
"Accept: application/json"
})
@POST
(
"/api/immunebatch/add"
)
Observable
<
CollectResponse
>
uploadImmuneBatchList
(
@Body
RequestBody
body
);
...
...
app/src/main/java/com/phlx/anchorcollect/data/http/HttpDataSource.java
View file @
a4c6ad67
...
@@ -6,12 +6,14 @@ import com.phlx.anchorcollect.entity.BreedingRecordEntity;
...
@@ -6,12 +6,14 @@ import com.phlx.anchorcollect.entity.BreedingRecordEntity;
import
com.phlx.anchorcollect.entity.CattleResumeEntity
;
import
com.phlx.anchorcollect.entity.CattleResumeEntity
;
import
com.phlx.anchorcollect.entity.DictEntity
;
import
com.phlx.anchorcollect.entity.DictEntity
;
import
com.phlx.anchorcollect.entity.GenData
;
import
com.phlx.anchorcollect.entity.GenData
;
import
com.phlx.anchorcollect.entity.ImmuneBatchEntity
;
import
com.phlx.anchorcollect.entity.LoginData
;
import
com.phlx.anchorcollect.entity.LoginData
;
import
com.phlx.anchorcollect.entity.MedicalRecordEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.WeightManEntity
;
import
com.phlx.anchorcollect.params.CollectResponse
;
import
com.phlx.anchorcollect.params.CollectResponse
;
import
com.phlx.anchorcollect.params.ListResponse
;
import
com.phlx.anchorcollect.params.ListResponse
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
io.reactivex.Observable
;
import
io.reactivex.Observable
;
...
@@ -112,4 +114,51 @@ public interface HttpDataSource {
...
@@ -112,4 +114,51 @@ public interface HttpDataSource {
*/
*/
Observable
<
CollectResponse
>
uploadBreedingRecordDetailList
(
@Body
RequestBody
body
);
Observable
<
CollectResponse
>
uploadBreedingRecordDetailList
(
@Body
RequestBody
body
);
/**
* 获取-称重管理-列表
* SyncState 0根据记录更新,1重新更新
*/
Observable
<
ListResponse
<
WeightManEntity
>>
downloadWeightManList
(
@FieldMap
Map
<
String
,
String
>
map
);
/**
* 获取-称重管理-列表-返回
*/
Observable
<
CollectResponse
>
downloadWeightManListSync
(
@Body
RequestBody
body
);
/**
* 上传-称重管理-列表
*/
Observable
<
CollectResponse
>
uploadWeightManList
(
@Body
RequestBody
body
);
/**
* 获取-诊疗记录-列表
* SyncState 0根据记录更新,1重新更新
*/
Observable
<
ListResponse
<
MedicalRecordEntity
>>
downloadMedicalRecordList
(
@FieldMap
Map
<
String
,
String
>
map
);
/**
* 获取-诊疗记录-列表-返回
*/
Observable
<
CollectResponse
>
downloadMedicalRecordListSync
(
@Body
RequestBody
body
);
/**
* 上传-诊疗记录-列表
*/
Observable
<
CollectResponse
>
uploadMedicalRecordList
(
@Body
RequestBody
body
);
/**
* 获取-免疫记录-列表
* SyncState 0根据记录更新,1重新更新
*/
Observable
<
ListResponse
<
ImmuneBatchEntity
>>
downloadImmuneBatchList
(
@FieldMap
Map
<
String
,
String
>
map
);
/**
* 获取-免疫记录-列表-返回
*/
Observable
<
CollectResponse
>
downloadImmuneBatchListSync
(
@Body
RequestBody
body
);
/**
* 上传-免疫记录-列表
*/
Observable
<
CollectResponse
>
uploadImmuneBatchList
(
@Body
RequestBody
body
);
}
}
app/src/main/java/com/phlx/anchorcollect/data/http/HttpDataSourceImpl.java
View file @
a4c6ad67
...
@@ -6,12 +6,14 @@ import com.phlx.anchorcollect.entity.BreedingRecordEntity;
...
@@ -6,12 +6,14 @@ import com.phlx.anchorcollect.entity.BreedingRecordEntity;
import
com.phlx.anchorcollect.entity.CattleResumeEntity
;
import
com.phlx.anchorcollect.entity.CattleResumeEntity
;
import
com.phlx.anchorcollect.entity.DictEntity
;
import
com.phlx.anchorcollect.entity.DictEntity
;
import
com.phlx.anchorcollect.entity.GenData
;
import
com.phlx.anchorcollect.entity.GenData
;
import
com.phlx.anchorcollect.entity.ImmuneBatchEntity
;
import
com.phlx.anchorcollect.entity.LoginData
;
import
com.phlx.anchorcollect.entity.LoginData
;
import
com.phlx.anchorcollect.entity.MedicalRecordEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.WeightManEntity
;
import
com.phlx.anchorcollect.params.CollectResponse
;
import
com.phlx.anchorcollect.params.CollectResponse
;
import
com.phlx.anchorcollect.params.ListResponse
;
import
com.phlx.anchorcollect.params.ListResponse
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
io.reactivex.Observable
;
import
io.reactivex.Observable
;
...
@@ -115,4 +117,49 @@ public class HttpDataSourceImpl implements HttpDataSource {
...
@@ -115,4 +117,49 @@ public class HttpDataSourceImpl implements HttpDataSource {
public
Observable
<
CollectResponse
>
uploadBreedingRecordDetailList
(
RequestBody
body
)
{
public
Observable
<
CollectResponse
>
uploadBreedingRecordDetailList
(
RequestBody
body
)
{
return
apiService
.
uploadBreedingRecordDetailList
(
body
);
return
apiService
.
uploadBreedingRecordDetailList
(
body
);
}
}
@Override
public
Observable
<
ListResponse
<
WeightManEntity
>>
downloadWeightManList
(
Map
<
String
,
String
>
map
)
{
return
apiService
.
downloadWeightManList
(
map
);
}
@Override
public
Observable
<
CollectResponse
>
downloadWeightManListSync
(
RequestBody
body
)
{
return
apiService
.
downloadWeightManListSync
(
body
);
}
@Override
public
Observable
<
CollectResponse
>
uploadWeightManList
(
RequestBody
body
)
{
return
apiService
.
uploadWeightManList
(
body
);
}
@Override
public
Observable
<
ListResponse
<
MedicalRecordEntity
>>
downloadMedicalRecordList
(
Map
<
String
,
String
>
map
)
{
return
apiService
.
downloadMedicalRecordList
(
map
);
}
@Override
public
Observable
<
CollectResponse
>
downloadMedicalRecordListSync
(
RequestBody
body
)
{
return
apiService
.
downloadMedicalRecordListSync
(
body
);
}
@Override
public
Observable
<
CollectResponse
>
uploadMedicalRecordList
(
RequestBody
body
)
{
return
apiService
.
uploadMedicalRecordList
(
body
);
}
@Override
public
Observable
<
ListResponse
<
ImmuneBatchEntity
>>
downloadImmuneBatchList
(
Map
<
String
,
String
>
map
)
{
return
apiService
.
downloadImmuneBatchList
(
map
);
}
@Override
public
Observable
<
CollectResponse
>
downloadImmuneBatchListSync
(
RequestBody
body
)
{
return
apiService
.
downloadImmuneBatchListSync
(
body
);
}
@Override
public
Observable
<
CollectResponse
>
uploadImmuneBatchList
(
RequestBody
body
)
{
return
apiService
.
uploadImmuneBatchList
(
body
);
}
}
}
app/src/main/java/com/phlx/anchorcollect/db/gen/DaoMaster.java
View file @
a4c6ad67
...
@@ -29,11 +29,11 @@ public class DaoMaster extends AbstractDaoMaster {
...
@@ -29,11 +29,11 @@ public class DaoMaster extends AbstractDaoMaster {
DictEntityDao
.
createTable
(
db
,
ifNotExists
);
DictEntityDao
.
createTable
(
db
,
ifNotExists
);
GenTableDao
.
createTable
(
db
,
ifNotExists
);
GenTableDao
.
createTable
(
db
,
ifNotExists
);
GenTableColumnDao
.
createTable
(
db
,
ifNotExists
);
GenTableColumnDao
.
createTable
(
db
,
ifNotExists
);
ImmuneEntityDao
.
createTable
(
db
,
ifNotExists
);
MedicalEntityDao
.
createTable
(
db
,
ifNotExists
);
PerformanceEntityDao
.
createTable
(
db
,
ifNotExists
);
PerformanceEntityDao
.
createTable
(
db
,
ifNotExists
);
UserRoleEntityDao
.
createTable
(
db
,
ifNotExists
);
UserRoleEntityDao
.
createTable
(
db
,
ifNotExists
);
WeightingEntityDao
.
createTable
(
db
,
ifNotExists
);
WeightManEntityDao
.
createTable
(
db
,
ifNotExists
);
ImmuneBatchEntityDao
.
createTable
(
db
,
ifNotExists
);
MedicalRecordEntityDao
.
createTable
(
db
,
ifNotExists
);
}
}
/** Drops underlying database table using DAOs. */
/** Drops underlying database table using DAOs. */
...
@@ -46,11 +46,11 @@ public class DaoMaster extends AbstractDaoMaster {
...
@@ -46,11 +46,11 @@ public class DaoMaster extends AbstractDaoMaster {
DictEntityDao
.
dropTable
(
db
,
ifExists
);
DictEntityDao
.
dropTable
(
db
,
ifExists
);
GenTableDao
.
dropTable
(
db
,
ifExists
);
GenTableDao
.
dropTable
(
db
,
ifExists
);
GenTableColumnDao
.
dropTable
(
db
,
ifExists
);
GenTableColumnDao
.
dropTable
(
db
,
ifExists
);
ImmuneEntityDao
.
dropTable
(
db
,
ifExists
);
MedicalEntityDao
.
dropTable
(
db
,
ifExists
);
PerformanceEntityDao
.
dropTable
(
db
,
ifExists
);
PerformanceEntityDao
.
dropTable
(
db
,
ifExists
);
UserRoleEntityDao
.
dropTable
(
db
,
ifExists
);
UserRoleEntityDao
.
dropTable
(
db
,
ifExists
);
WeightingEntityDao
.
dropTable
(
db
,
ifExists
);
WeightManEntityDao
.
dropTable
(
db
,
ifExists
);
ImmuneBatchEntityDao
.
dropTable
(
db
,
ifExists
);
MedicalRecordEntityDao
.
dropTable
(
db
,
ifExists
);
}
}
/**
/**
...
@@ -77,11 +77,11 @@ public class DaoMaster extends AbstractDaoMaster {
...
@@ -77,11 +77,11 @@ public class DaoMaster extends AbstractDaoMaster {
registerDaoClass
(
DictEntityDao
.
class
);
registerDaoClass
(
DictEntityDao
.
class
);
registerDaoClass
(
GenTableDao
.
class
);
registerDaoClass
(
GenTableDao
.
class
);
registerDaoClass
(
GenTableColumnDao
.
class
);
registerDaoClass
(
GenTableColumnDao
.
class
);
registerDaoClass
(
ImmuneEntityDao
.
class
);
registerDaoClass
(
MedicalEntityDao
.
class
);
registerDaoClass
(
PerformanceEntityDao
.
class
);
registerDaoClass
(
PerformanceEntityDao
.
class
);
registerDaoClass
(
UserRoleEntityDao
.
class
);
registerDaoClass
(
UserRoleEntityDao
.
class
);
registerDaoClass
(
WeightingEntityDao
.
class
);
registerDaoClass
(
WeightManEntityDao
.
class
);
registerDaoClass
(
ImmuneBatchEntityDao
.
class
);
registerDaoClass
(
MedicalRecordEntityDao
.
class
);
}
}
public
DaoSession
newSession
()
{
public
DaoSession
newSession
()
{
...
...
app/src/main/java/com/phlx/anchorcollect/db/gen/DaoSession.java
View file @
a4c6ad67
...
@@ -16,11 +16,11 @@ import com.phlx.anchorcollect.entity.CattleResumeEntity;
...
@@ -16,11 +16,11 @@ import com.phlx.anchorcollect.entity.CattleResumeEntity;
import
com.phlx.anchorcollect.entity.DictEntity
;
import
com.phlx.anchorcollect.entity.DictEntity
;
import
com.phlx.anchorcollect.entity.GenTable
;
import
com.phlx.anchorcollect.entity.GenTable
;
import
com.phlx.anchorcollect.entity.GenTableColumn
;
import
com.phlx.anchorcollect.entity.GenTableColumn
;
import
com.phlx.anchorcollect.entity.ImmuneEntity
;
import
com.phlx.anchorcollect.entity.MedicalEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.UserRoleEntity
;
import
com.phlx.anchorcollect.entity.UserRoleEntity
;
import
com.phlx.anchorcollect.entity.WeightingEntity
;
import
com.phlx.anchorcollect.entity.WeightManEntity
;
import
com.phlx.anchorcollect.entity.ImmuneBatchEntity
;
import
com.phlx.anchorcollect.entity.MedicalRecordEntity
;
import
com.phlx.anchorcollect.db.gen.AncestryinfoEntityDao
;
import
com.phlx.anchorcollect.db.gen.AncestryinfoEntityDao
;
import
com.phlx.anchorcollect.db.gen.BreedingRecordDetailEntityDao
;
import
com.phlx.anchorcollect.db.gen.BreedingRecordDetailEntityDao
;
...
@@ -30,11 +30,11 @@ import com.phlx.anchorcollect.db.gen.CattleResumeEntityDao;
...
@@ -30,11 +30,11 @@ import com.phlx.anchorcollect.db.gen.CattleResumeEntityDao;
import
com.phlx.anchorcollect.db.gen.DictEntityDao
;
import
com.phlx.anchorcollect.db.gen.DictEntityDao
;
import
com.phlx.anchorcollect.db.gen.GenTableDao
;
import
com.phlx.anchorcollect.db.gen.GenTableDao
;
import
com.phlx.anchorcollect.db.gen.GenTableColumnDao
;
import
com.phlx.anchorcollect.db.gen.GenTableColumnDao
;
import
com.phlx.anchorcollect.db.gen.ImmuneEntityDao
;
import
com.phlx.anchorcollect.db.gen.MedicalEntityDao
;
import
com.phlx.anchorcollect.db.gen.PerformanceEntityDao
;
import
com.phlx.anchorcollect.db.gen.PerformanceEntityDao
;
import
com.phlx.anchorcollect.db.gen.UserRoleEntityDao
;
import
com.phlx.anchorcollect.db.gen.UserRoleEntityDao
;
import
com.phlx.anchorcollect.db.gen.WeightingEntityDao
;
import
com.phlx.anchorcollect.db.gen.WeightManEntityDao
;
import
com.phlx.anchorcollect.db.gen.ImmuneBatchEntityDao
;
import
com.phlx.anchorcollect.db.gen.MedicalRecordEntityDao
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
...
@@ -53,11 +53,11 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -53,11 +53,11 @@ public class DaoSession extends AbstractDaoSession {
private
final
DaoConfig
dictEntityDaoConfig
;
private
final
DaoConfig
dictEntityDaoConfig
;
private
final
DaoConfig
genTableDaoConfig
;
private
final
DaoConfig
genTableDaoConfig
;
private
final
DaoConfig
genTableColumnDaoConfig
;
private
final
DaoConfig
genTableColumnDaoConfig
;
private
final
DaoConfig
immuneEntityDaoConfig
;
private
final
DaoConfig
medicalEntityDaoConfig
;
private
final
DaoConfig
performanceEntityDaoConfig
;
private
final
DaoConfig
performanceEntityDaoConfig
;
private
final
DaoConfig
userRoleEntityDaoConfig
;
private
final
DaoConfig
userRoleEntityDaoConfig
;
private
final
DaoConfig
weightingEntityDaoConfig
;
private
final
DaoConfig
weightManEntityDaoConfig
;
private
final
DaoConfig
immuneBatchEntityDaoConfig
;
private
final
DaoConfig
medicalRecordEntityDaoConfig
;
private
final
AncestryinfoEntityDao
ancestryinfoEntityDao
;
private
final
AncestryinfoEntityDao
ancestryinfoEntityDao
;
private
final
BreedingRecordDetailEntityDao
breedingRecordDetailEntityDao
;
private
final
BreedingRecordDetailEntityDao
breedingRecordDetailEntityDao
;
...
@@ -67,11 +67,11 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -67,11 +67,11 @@ public class DaoSession extends AbstractDaoSession {
private
final
DictEntityDao
dictEntityDao
;
private
final
DictEntityDao
dictEntityDao
;
private
final
GenTableDao
genTableDao
;
private
final
GenTableDao
genTableDao
;
private
final
GenTableColumnDao
genTableColumnDao
;
private
final
GenTableColumnDao
genTableColumnDao
;
private
final
ImmuneEntityDao
immuneEntityDao
;
private
final
MedicalEntityDao
medicalEntityDao
;
private
final
PerformanceEntityDao
performanceEntityDao
;
private
final
PerformanceEntityDao
performanceEntityDao
;
private
final
UserRoleEntityDao
userRoleEntityDao
;
private
final
UserRoleEntityDao
userRoleEntityDao
;
private
final
WeightingEntityDao
weightingEntityDao
;
private
final
WeightManEntityDao
weightManEntityDao
;
private
final
ImmuneBatchEntityDao
immuneBatchEntityDao
;
private
final
MedicalRecordEntityDao
medicalRecordEntityDao
;
public
DaoSession
(
Database
db
,
IdentityScopeType
type
,
Map
<
Class
<?
extends
AbstractDao
<?,
?>>,
DaoConfig
>
public
DaoSession
(
Database
db
,
IdentityScopeType
type
,
Map
<
Class
<?
extends
AbstractDao
<?,
?>>,
DaoConfig
>
daoConfigMap
)
{
daoConfigMap
)
{
...
@@ -101,20 +101,20 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -101,20 +101,20 @@ public class DaoSession extends AbstractDaoSession {
genTableColumnDaoConfig
=
daoConfigMap
.
get
(
GenTableColumnDao
.
class
).
clone
();
genTableColumnDaoConfig
=
daoConfigMap
.
get
(
GenTableColumnDao
.
class
).
clone
();
genTableColumnDaoConfig
.
initIdentityScope
(
type
);
genTableColumnDaoConfig
.
initIdentityScope
(
type
);
immuneEntityDaoConfig
=
daoConfigMap
.
get
(
ImmuneEntityDao
.
class
).
clone
();
immuneEntityDaoConfig
.
initIdentityScope
(
type
);
medicalEntityDaoConfig
=
daoConfigMap
.
get
(
MedicalEntityDao
.
class
).
clone
();
medicalEntityDaoConfig
.
initIdentityScope
(
type
);
performanceEntityDaoConfig
=
daoConfigMap
.
get
(
PerformanceEntityDao
.
class
).
clone
();
performanceEntityDaoConfig
=
daoConfigMap
.
get
(
PerformanceEntityDao
.
class
).
clone
();
performanceEntityDaoConfig
.
initIdentityScope
(
type
);
performanceEntityDaoConfig
.
initIdentityScope
(
type
);
userRoleEntityDaoConfig
=
daoConfigMap
.
get
(
UserRoleEntityDao
.
class
).
clone
();
userRoleEntityDaoConfig
=
daoConfigMap
.
get
(
UserRoleEntityDao
.
class
).
clone
();
userRoleEntityDaoConfig
.
initIdentityScope
(
type
);
userRoleEntityDaoConfig
.
initIdentityScope
(
type
);
weightingEntityDaoConfig
=
daoConfigMap
.
get
(
WeightingEntityDao
.
class
).
clone
();
weightManEntityDaoConfig
=
daoConfigMap
.
get
(
WeightManEntityDao
.
class
).
clone
();
weightingEntityDaoConfig
.
initIdentityScope
(
type
);
weightManEntityDaoConfig
.
initIdentityScope
(
type
);
immuneBatchEntityDaoConfig
=
daoConfigMap
.
get
(
ImmuneBatchEntityDao
.
class
).
clone
();
immuneBatchEntityDaoConfig
.
initIdentityScope
(
type
);
medicalRecordEntityDaoConfig
=
daoConfigMap
.
get
(
MedicalRecordEntityDao
.
class
).
clone
();
medicalRecordEntityDaoConfig
.
initIdentityScope
(
type
);
ancestryinfoEntityDao
=
new
AncestryinfoEntityDao
(
ancestryinfoEntityDaoConfig
,
this
);
ancestryinfoEntityDao
=
new
AncestryinfoEntityDao
(
ancestryinfoEntityDaoConfig
,
this
);
breedingRecordDetailEntityDao
=
new
BreedingRecordDetailEntityDao
(
breedingRecordDetailEntityDaoConfig
,
this
);
breedingRecordDetailEntityDao
=
new
BreedingRecordDetailEntityDao
(
breedingRecordDetailEntityDaoConfig
,
this
);
...
@@ -124,11 +124,11 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -124,11 +124,11 @@ public class DaoSession extends AbstractDaoSession {
dictEntityDao
=
new
DictEntityDao
(
dictEntityDaoConfig
,
this
);
dictEntityDao
=
new
DictEntityDao
(
dictEntityDaoConfig
,
this
);
genTableDao
=
new
GenTableDao
(
genTableDaoConfig
,
this
);
genTableDao
=
new
GenTableDao
(
genTableDaoConfig
,
this
);
genTableColumnDao
=
new
GenTableColumnDao
(
genTableColumnDaoConfig
,
this
);
genTableColumnDao
=
new
GenTableColumnDao
(
genTableColumnDaoConfig
,
this
);
immuneEntityDao
=
new
ImmuneEntityDao
(
immuneEntityDaoConfig
,
this
);
medicalEntityDao
=
new
MedicalEntityDao
(
medicalEntityDaoConfig
,
this
);
performanceEntityDao
=
new
PerformanceEntityDao
(
performanceEntityDaoConfig
,
this
);
performanceEntityDao
=
new
PerformanceEntityDao
(
performanceEntityDaoConfig
,
this
);
userRoleEntityDao
=
new
UserRoleEntityDao
(
userRoleEntityDaoConfig
,
this
);
userRoleEntityDao
=
new
UserRoleEntityDao
(
userRoleEntityDaoConfig
,
this
);
weightingEntityDao
=
new
WeightingEntityDao
(
weightingEntityDaoConfig
,
this
);
weightManEntityDao
=
new
WeightManEntityDao
(
weightManEntityDaoConfig
,
this
);
immuneBatchEntityDao
=
new
ImmuneBatchEntityDao
(
immuneBatchEntityDaoConfig
,
this
);
medicalRecordEntityDao
=
new
MedicalRecordEntityDao
(
medicalRecordEntityDaoConfig
,
this
);
registerDao
(
AncestryinfoEntity
.
class
,
ancestryinfoEntityDao
);
registerDao
(
AncestryinfoEntity
.
class
,
ancestryinfoEntityDao
);
registerDao
(
BreedingRecordDetailEntity
.
class
,
breedingRecordDetailEntityDao
);
registerDao
(
BreedingRecordDetailEntity
.
class
,
breedingRecordDetailEntityDao
);
...
@@ -138,11 +138,11 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -138,11 +138,11 @@ public class DaoSession extends AbstractDaoSession {
registerDao
(
DictEntity
.
class
,
dictEntityDao
);
registerDao
(
DictEntity
.
class
,
dictEntityDao
);
registerDao
(
GenTable
.
class
,
genTableDao
);
registerDao
(
GenTable
.
class
,
genTableDao
);
registerDao
(
GenTableColumn
.
class
,
genTableColumnDao
);
registerDao
(
GenTableColumn
.
class
,
genTableColumnDao
);
registerDao
(
ImmuneEntity
.
class
,
immuneEntityDao
);
registerDao
(
MedicalEntity
.
class
,
medicalEntityDao
);
registerDao
(
PerformanceEntity
.
class
,
performanceEntityDao
);
registerDao
(
PerformanceEntity
.
class
,
performanceEntityDao
);
registerDao
(
UserRoleEntity
.
class
,
userRoleEntityDao
);
registerDao
(
UserRoleEntity
.
class
,
userRoleEntityDao
);
registerDao
(
WeightingEntity
.
class
,
weightingEntityDao
);
registerDao
(
WeightManEntity
.
class
,
weightManEntityDao
);
registerDao
(
ImmuneBatchEntity
.
class
,
immuneBatchEntityDao
);
registerDao
(
MedicalRecordEntity
.
class
,
medicalRecordEntityDao
);
}
}
public
void
clear
()
{
public
void
clear
()
{
...
@@ -154,11 +154,11 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -154,11 +154,11 @@ public class DaoSession extends AbstractDaoSession {
dictEntityDaoConfig
.
clearIdentityScope
();
dictEntityDaoConfig
.
clearIdentityScope
();
genTableDaoConfig
.
clearIdentityScope
();
genTableDaoConfig
.
clearIdentityScope
();
genTableColumnDaoConfig
.
clearIdentityScope
();
genTableColumnDaoConfig
.
clearIdentityScope
();
immuneEntityDaoConfig
.
clearIdentityScope
();
medicalEntityDaoConfig
.
clearIdentityScope
();
performanceEntityDaoConfig
.
clearIdentityScope
();
performanceEntityDaoConfig
.
clearIdentityScope
();
userRoleEntityDaoConfig
.
clearIdentityScope
();
userRoleEntityDaoConfig
.
clearIdentityScope
();
weightingEntityDaoConfig
.
clearIdentityScope
();
weightManEntityDaoConfig
.
clearIdentityScope
();
immuneBatchEntityDaoConfig
.
clearIdentityScope
();
medicalRecordEntityDaoConfig
.
clearIdentityScope
();
}
}
public
AncestryinfoEntityDao
getAncestryinfoEntityDao
()
{
public
AncestryinfoEntityDao
getAncestryinfoEntityDao
()
{
...
@@ -193,14 +193,6 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -193,14 +193,6 @@ public class DaoSession extends AbstractDaoSession {
return
genTableColumnDao
;
return
genTableColumnDao
;
}
}
public
ImmuneEntityDao
getImmuneEntityDao
()
{
return
immuneEntityDao
;
}
public
MedicalEntityDao
getMedicalEntityDao
()
{
return
medicalEntityDao
;
}
public
PerformanceEntityDao
getPerformanceEntityDao
()
{
public
PerformanceEntityDao
getPerformanceEntityDao
()
{
return
performanceEntityDao
;
return
performanceEntityDao
;
}
}
...
@@ -209,8 +201,16 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -209,8 +201,16 @@ public class DaoSession extends AbstractDaoSession {
return
userRoleEntityDao
;
return
userRoleEntityDao
;
}
}
public
WeightingEntityDao
getWeightingEntityDao
()
{
public
WeightManEntityDao
getWeightManEntityDao
()
{
return
weightingEntityDao
;
return
weightManEntityDao
;
}
public
ImmuneBatchEntityDao
getImmuneBatchEntityDao
()
{
return
immuneBatchEntityDao
;
}
public
MedicalRecordEntityDao
getMedicalRecordEntityDao
()
{
return
medicalRecordEntityDao
;
}
}
}
}
app/src/main/java/com/phlx/anchorcollect/db/gen/ImmuneEntityDao.java
deleted
100644 → 0
View file @
429a4804
package
com
.
phlx
.
anchorcollect
.
db
.
gen
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.phlx.anchorcollect.entity.ImmuneEntity
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "IMMUNE_ENTITY".
*/
public
class
ImmuneEntityDao
extends
AbstractDao
<
ImmuneEntity
,
String
>
{
public
static
final
String
TABLENAME
=
"IMMUNE_ENTITY"
;
/**
* Properties of entity ImmuneEntity.<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"
,
false
,
"ID"
);
public
final
static
Property
Unid
=
new
Property
(
1
,
String
.
class
,
"unid"
,
true
,
"UNID"
);
public
final
static
Property
RegistrationNo
=
new
Property
(
2
,
String
.
class
,
"registrationNo"
,
false
,
"REGISTRATION_NO"
);
public
final
static
Property
CircleNo
=
new
Property
(
3
,
String
.
class
,
"circleNo"
,
false
,
"CIRCLE_NO"
);
public
final
static
Property
VaccineName
=
new
Property
(
4
,
String
.
class
,
"vaccineName"
,
false
,
"VACCINE_NAME"
);
public
final
static
Property
Lotnumber
=
new
Property
(
5
,
String
.
class
,
"lotnumber"
,
false
,
"LOTNUMBER"
);
public
final
static
Property
Manufacturer
=
new
Property
(
6
,
String
.
class
,
"manufacturer"
,
false
,
"MANUFACTURER"
);
public
final
static
Property
ProductName
=
new
Property
(
7
,
String
.
class
,
"productName"
,
false
,
"PRODUCT_NAME"
);
public
final
static
Property
Specifications
=
new
Property
(
8
,
String
.
class
,
"specifications"
,
false
,
"SPECIFICATIONS"
);
public
final
static
Property
RemainingNumber
=
new
Property
(
9
,
String
.
class
,
"remainingNumber"
,
false
,
"REMAINING_NUMBER"
);
public
final
static
Property
ImmuneMethod
=
new
Property
(
10
,
String
.
class
,
"immuneMethod"
,
false
,
"IMMUNE_METHOD"
);
public
final
static
Property
ImmuneDosage
=
new
Property
(
11
,
String
.
class
,
"immuneDosage"
,
false
,
"IMMUNE_DOSAGE"
);
public
final
static
Property
ImmuneDate
=
new
Property
(
12
,
String
.
class
,
"immuneDate"
,
false
,
"IMMUNE_DATE"
);
public
final
static
Property
ImmunePerson
=
new
Property
(
13
,
String
.
class
,
"immunePerson"
,
false
,
"IMMUNE_PERSON"
);
public
final
static
Property
Note
=
new
Property
(
14
,
String
.
class
,
"note"
,
false
,
"NOTE"
);
public
final
static
Property
UpdateId
=
new
Property
(
15
,
String
.
class
,
"updateId"
,
false
,
"UPDATE_ID"
);
public
final
static
Property
CreateBy
=
new
Property
(
16
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
CreateTime
=
new
Property
(
17
,
String
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
UpdateBy
=
new
Property
(
18
,
String
.
class
,
"updateBy"
,
false
,
"UPDATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
19
,
String
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
Permissions
=
new
Property
(
20
,
String
.
class
,
"permissions"
,
false
,
"PERMISSIONS"
);
public
final
static
Property
InputTime
=
new
Property
(
21
,
String
.
class
,
"inputTime"
,
false
,
"INPUT_TIME"
);
}
public
ImmuneEntityDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
ImmuneEntityDao
(
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
+
"\"IMMUNE_ENTITY\" ("
+
//
"\"ID\" INTEGER,"
+
// 0: id
"\"UNID\" TEXT PRIMARY KEY NOT NULL ,"
+
// 1: unid
"\"REGISTRATION_NO\" TEXT,"
+
// 2: registrationNo
"\"CIRCLE_NO\" TEXT,"
+
// 3: circleNo
"\"VACCINE_NAME\" TEXT,"
+
// 4: vaccineName
"\"LOTNUMBER\" TEXT,"
+
// 5: lotnumber
"\"MANUFACTURER\" TEXT,"
+
// 6: manufacturer
"\"PRODUCT_NAME\" TEXT,"
+
// 7: productName
"\"SPECIFICATIONS\" TEXT,"
+
// 8: specifications
"\"REMAINING_NUMBER\" TEXT,"
+
// 9: remainingNumber
"\"IMMUNE_METHOD\" TEXT,"
+
// 10: immuneMethod
"\"IMMUNE_DOSAGE\" TEXT,"
+
// 11: immuneDosage
"\"IMMUNE_DATE\" TEXT,"
+
// 12: immuneDate
"\"IMMUNE_PERSON\" TEXT,"
+
// 13: immunePerson
"\"NOTE\" TEXT,"
+
// 14: note
"\"UPDATE_ID\" TEXT,"
+
// 15: updateId
"\"CREATE_BY\" TEXT,"
+
// 16: createBy
"\"CREATE_TIME\" TEXT,"
+
// 17: createTime
"\"UPDATE_BY\" TEXT,"
+
// 18: updateBy
"\"UPDATE_TIME\" TEXT,"
+
// 19: updateTime
"\"PERMISSIONS\" TEXT,"
+
// 20: permissions
"\"INPUT_TIME\" TEXT);"
);
// 21: inputTime
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"IMMUNE_ENTITY\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
ImmuneEntity
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
String
unid
=
entity
.
getUnid
();
if
(
unid
!=
null
)
{
stmt
.
bindString
(
2
,
unid
);
}
String
registrationNo
=
entity
.
getRegistrationNo
();
if
(
registrationNo
!=
null
)
{
stmt
.
bindString
(
3
,
registrationNo
);
}
String
circleNo
=
entity
.
getCircleNo
();
if
(
circleNo
!=
null
)
{
stmt
.
bindString
(
4
,
circleNo
);
}
String
vaccineName
=
entity
.
getVaccineName
();
if
(
vaccineName
!=
null
)
{
stmt
.
bindString
(
5
,
vaccineName
);
}
String
lotnumber
=
entity
.
getLotnumber
();
if
(
lotnumber
!=
null
)
{
stmt
.
bindString
(
6
,
lotnumber
);
}
String
manufacturer
=
entity
.
getManufacturer
();
if
(
manufacturer
!=
null
)
{
stmt
.
bindString
(
7
,
manufacturer
);
}
String
productName
=
entity
.
getProductName
();
if
(
productName
!=
null
)
{
stmt
.
bindString
(
8
,
productName
);
}
String
specifications
=
entity
.
getSpecifications
();
if
(
specifications
!=
null
)
{
stmt
.
bindString
(
9
,
specifications
);
}
String
remainingNumber
=
entity
.
getRemainingNumber
();
if
(
remainingNumber
!=
null
)
{
stmt
.
bindString
(
10
,
remainingNumber
);
}
String
immuneMethod
=
entity
.
getImmuneMethod
();
if
(
immuneMethod
!=
null
)
{
stmt
.
bindString
(
11
,
immuneMethod
);
}
String
immuneDosage
=
entity
.
getImmuneDosage
();
if
(
immuneDosage
!=
null
)
{
stmt
.
bindString
(
12
,
immuneDosage
);
}
String
immuneDate
=
entity
.
getImmuneDate
();
if
(
immuneDate
!=
null
)
{
stmt
.
bindString
(
13
,
immuneDate
);
}
String
immunePerson
=
entity
.
getImmunePerson
();
if
(
immunePerson
!=
null
)
{
stmt
.
bindString
(
14
,
immunePerson
);
}
String
note
=
entity
.
getNote
();
if
(
note
!=
null
)
{
stmt
.
bindString
(
15
,
note
);
}
String
updateId
=
entity
.
getUpdateId
();
if
(
updateId
!=
null
)
{
stmt
.
bindString
(
16
,
updateId
);
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
17
,
createBy
);
}
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
18
,
createTime
);
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
19
,
updateBy
);
}
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
20
,
updateTime
);
}
String
permissions
=
entity
.
getPermissions
();
if
(
permissions
!=
null
)
{
stmt
.
bindString
(
21
,
permissions
);
}
String
inputTime
=
entity
.
getInputTime
();
if
(
inputTime
!=
null
)
{
stmt
.
bindString
(
22
,
inputTime
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
ImmuneEntity
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
String
unid
=
entity
.
getUnid
();
if
(
unid
!=
null
)
{
stmt
.
bindString
(
2
,
unid
);
}
String
registrationNo
=
entity
.
getRegistrationNo
();
if
(
registrationNo
!=
null
)
{
stmt
.
bindString
(
3
,
registrationNo
);
}
String
circleNo
=
entity
.
getCircleNo
();
if
(
circleNo
!=
null
)
{
stmt
.
bindString
(
4
,
circleNo
);
}
String
vaccineName
=
entity
.
getVaccineName
();
if
(
vaccineName
!=
null
)
{
stmt
.
bindString
(
5
,
vaccineName
);
}
String
lotnumber
=
entity
.
getLotnumber
();
if
(
lotnumber
!=
null
)
{
stmt
.
bindString
(
6
,
lotnumber
);
}
String
manufacturer
=
entity
.
getManufacturer
();
if
(
manufacturer
!=
null
)
{
stmt
.
bindString
(
7
,
manufacturer
);
}
String
productName
=
entity
.
getProductName
();
if
(
productName
!=
null
)
{
stmt
.
bindString
(
8
,
productName
);
}
String
specifications
=
entity
.
getSpecifications
();
if
(
specifications
!=
null
)
{
stmt
.
bindString
(
9
,
specifications
);
}
String
remainingNumber
=
entity
.
getRemainingNumber
();
if
(
remainingNumber
!=
null
)
{
stmt
.
bindString
(
10
,
remainingNumber
);
}
String
immuneMethod
=
entity
.
getImmuneMethod
();
if
(
immuneMethod
!=
null
)
{
stmt
.
bindString
(
11
,
immuneMethod
);
}
String
immuneDosage
=
entity
.
getImmuneDosage
();
if
(
immuneDosage
!=
null
)
{
stmt
.
bindString
(
12
,
immuneDosage
);
}
String
immuneDate
=
entity
.
getImmuneDate
();
if
(
immuneDate
!=
null
)
{
stmt
.
bindString
(
13
,
immuneDate
);
}
String
immunePerson
=
entity
.
getImmunePerson
();
if
(
immunePerson
!=
null
)
{
stmt
.
bindString
(
14
,
immunePerson
);
}
String
note
=
entity
.
getNote
();
if
(
note
!=
null
)
{
stmt
.
bindString
(
15
,
note
);
}
String
updateId
=
entity
.
getUpdateId
();
if
(
updateId
!=
null
)
{
stmt
.
bindString
(
16
,
updateId
);
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
17
,
createBy
);
}
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
18
,
createTime
);
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
19
,
updateBy
);
}
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
20
,
updateTime
);
}
String
permissions
=
entity
.
getPermissions
();
if
(
permissions
!=
null
)
{
stmt
.
bindString
(
21
,
permissions
);
}
String
inputTime
=
entity
.
getInputTime
();
if
(
inputTime
!=
null
)
{
stmt
.
bindString
(
22
,
inputTime
);
}
}
@Override
public
String
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getString
(
offset
+
1
);
}
@Override
public
ImmuneEntity
readEntity
(
Cursor
cursor
,
int
offset
)
{
ImmuneEntity
entity
=
new
ImmuneEntity
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getString
(
offset
+
1
),
// unid
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// registrationNo
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
),
// circleNo
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// vaccineName
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// lotnumber
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// manufacturer
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// productName
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// specifications
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
),
// remainingNumber
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
),
// immuneMethod
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
),
// immuneDosage
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
),
// immuneDate
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// immunePerson
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getString
(
offset
+
14
),
// note
cursor
.
isNull
(
offset
+
15
)
?
null
:
cursor
.
getString
(
offset
+
15
),
// updateId
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
),
// createBy
cursor
.
isNull
(
offset
+
17
)
?
null
:
cursor
.
getString
(
offset
+
17
),
// createTime
cursor
.
isNull
(
offset
+
18
)
?
null
:
cursor
.
getString
(
offset
+
18
),
// updateBy
cursor
.
isNull
(
offset
+
19
)
?
null
:
cursor
.
getString
(
offset
+
19
),
// updateTime
cursor
.
isNull
(
offset
+
20
)
?
null
:
cursor
.
getString
(
offset
+
20
),
// permissions
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
)
// inputTime
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
ImmuneEntity
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setUnid
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getString
(
offset
+
1
));
entity
.
setRegistrationNo
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setCircleNo
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
));
entity
.
setVaccineName
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
entity
.
setLotnumber
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setManufacturer
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setProductName
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setSpecifications
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setRemainingNumber
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
entity
.
setImmuneMethod
(
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
));
entity
.
setImmuneDosage
(
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
));
entity
.
setImmuneDate
(
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
));
entity
.
setImmunePerson
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setNote
(
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getString
(
offset
+
14
));
entity
.
setUpdateId
(
cursor
.
isNull
(
offset
+
15
)
?
null
:
cursor
.
getString
(
offset
+
15
));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
17
)
?
null
:
cursor
.
getString
(
offset
+
17
));
entity
.
setUpdateBy
(
cursor
.
isNull
(
offset
+
18
)
?
null
:
cursor
.
getString
(
offset
+
18
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
19
)
?
null
:
cursor
.
getString
(
offset
+
19
));
entity
.
setPermissions
(
cursor
.
isNull
(
offset
+
20
)
?
null
:
cursor
.
getString
(
offset
+
20
));
entity
.
setInputTime
(
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
));
}
@Override
protected
final
String
updateKeyAfterInsert
(
ImmuneEntity
entity
,
long
rowId
)
{
return
entity
.
getUnid
();
}
@Override
public
String
getKey
(
ImmuneEntity
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getUnid
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
ImmuneEntity
entity
)
{
return
entity
.
getUnid
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
app/src/main/java/com/phlx/anchorcollect/db/gen/MedicalEntityDao.java
deleted
100644 → 0
View file @
429a4804
package
com
.
phlx
.
anchorcollect
.
db
.
gen
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.phlx.anchorcollect.entity.MedicalEntity
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "MEDICAL_ENTITY".
*/
public
class
MedicalEntityDao
extends
AbstractDao
<
MedicalEntity
,
Long
>
{
public
static
final
String
TABLENAME
=
"MEDICAL_ENTITY"
;
/**
* Properties of entity MedicalEntity.<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
Unid
=
new
Property
(
1
,
String
.
class
,
"unid"
,
false
,
"UNID"
);
public
final
static
Property
RegistrationNo
=
new
Property
(
2
,
String
.
class
,
"registrationNo"
,
false
,
"REGISTRATION_NO"
);
public
final
static
Property
TreatDate
=
new
Property
(
3
,
String
.
class
,
"treatDate"
,
false
,
"TREAT_DATE"
);
public
final
static
Property
TreatPersonnel
=
new
Property
(
4
,
String
.
class
,
"treatPersonnel"
,
false
,
"TREAT_PERSONNEL"
);
public
final
static
Property
CauseOf
=
new
Property
(
5
,
String
.
class
,
"causeOf"
,
false
,
"CAUSE_OF"
);
public
final
static
Property
BatchNo
=
new
Property
(
6
,
String
.
class
,
"batchNo"
,
false
,
"BATCH_NO"
);
public
final
static
Property
DrugName
=
new
Property
(
7
,
String
.
class
,
"drugName"
,
false
,
"DRUG_NAME"
);
public
final
static
Property
ProductName
=
new
Property
(
8
,
String
.
class
,
"productName"
,
false
,
"PRODUCT_NAME"
);
public
final
static
Property
Specifications
=
new
Property
(
9
,
String
.
class
,
"specifications"
,
false
,
"SPECIFICATIONS"
);
public
final
static
Property
RemainingNumber
=
new
Property
(
10
,
String
.
class
,
"remainingNumber"
,
false
,
"REMAINING_NUMBER"
);
public
final
static
Property
Number
=
new
Property
(
11
,
String
.
class
,
"number"
,
false
,
"NUMBER"
);
public
final
static
Property
DrugMethods
=
new
Property
(
12
,
String
.
class
,
"drugMethods"
,
false
,
"DRUG_METHODS"
);
public
final
static
Property
HoofDisease
=
new
Property
(
13
,
String
.
class
,
"hoofDisease"
,
false
,
"HOOF_DISEASE"
);
public
final
static
Property
Insecticide
=
new
Property
(
14
,
String
.
class
,
"insecticide"
,
false
,
"INSECTICIDE"
);
public
final
static
Property
Results
=
new
Property
(
15
,
String
.
class
,
"results"
,
false
,
"RESULTS"
);
public
final
static
Property
UpdateId
=
new
Property
(
16
,
String
.
class
,
"updateId"
,
false
,
"UPDATE_ID"
);
public
final
static
Property
CreateBy
=
new
Property
(
17
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
CreateTime
=
new
Property
(
18
,
String
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
UpdateBy
=
new
Property
(
19
,
String
.
class
,
"updateBy"
,
false
,
"UPDATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
20
,
String
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
Permissions
=
new
Property
(
21
,
String
.
class
,
"permissions"
,
false
,
"PERMISSIONS"
);
public
final
static
Property
InputTime
=
new
Property
(
22
,
String
.
class
,
"inputTime"
,
false
,
"INPUT_TIME"
);
}
public
MedicalEntityDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
MedicalEntityDao
(
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
+
"\"MEDICAL_ENTITY\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY ,"
+
// 0: id
"\"UNID\" TEXT,"
+
// 1: unid
"\"REGISTRATION_NO\" TEXT,"
+
// 2: registrationNo
"\"TREAT_DATE\" TEXT,"
+
// 3: treatDate
"\"TREAT_PERSONNEL\" TEXT,"
+
// 4: treatPersonnel
"\"CAUSE_OF\" TEXT,"
+
// 5: causeOf
"\"BATCH_NO\" TEXT,"
+
// 6: batchNo
"\"DRUG_NAME\" TEXT,"
+
// 7: drugName
"\"PRODUCT_NAME\" TEXT,"
+
// 8: productName
"\"SPECIFICATIONS\" TEXT,"
+
// 9: specifications
"\"REMAINING_NUMBER\" TEXT,"
+
// 10: remainingNumber
"\"NUMBER\" TEXT,"
+
// 11: number
"\"DRUG_METHODS\" TEXT,"
+
// 12: drugMethods
"\"HOOF_DISEASE\" TEXT,"
+
// 13: hoofDisease
"\"INSECTICIDE\" TEXT,"
+
// 14: insecticide
"\"RESULTS\" TEXT,"
+
// 15: results
"\"UPDATE_ID\" TEXT,"
+
// 16: updateId
"\"CREATE_BY\" TEXT,"
+
// 17: createBy
"\"CREATE_TIME\" TEXT,"
+
// 18: createTime
"\"UPDATE_BY\" TEXT,"
+
// 19: updateBy
"\"UPDATE_TIME\" TEXT,"
+
// 20: updateTime
"\"PERMISSIONS\" TEXT,"
+
// 21: permissions
"\"INPUT_TIME\" TEXT);"
);
// 22: inputTime
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"MEDICAL_ENTITY\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
MedicalEntity
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
String
unid
=
entity
.
getUnid
();
if
(
unid
!=
null
)
{
stmt
.
bindString
(
2
,
unid
);
}
String
registrationNo
=
entity
.
getRegistrationNo
();
if
(
registrationNo
!=
null
)
{
stmt
.
bindString
(
3
,
registrationNo
);
}
String
treatDate
=
entity
.
getTreatDate
();
if
(
treatDate
!=
null
)
{
stmt
.
bindString
(
4
,
treatDate
);
}
String
treatPersonnel
=
entity
.
getTreatPersonnel
();
if
(
treatPersonnel
!=
null
)
{
stmt
.
bindString
(
5
,
treatPersonnel
);
}
String
causeOf
=
entity
.
getCauseOf
();
if
(
causeOf
!=
null
)
{
stmt
.
bindString
(
6
,
causeOf
);
}
String
batchNo
=
entity
.
getBatchNo
();
if
(
batchNo
!=
null
)
{
stmt
.
bindString
(
7
,
batchNo
);
}
String
drugName
=
entity
.
getDrugName
();
if
(
drugName
!=
null
)
{
stmt
.
bindString
(
8
,
drugName
);
}
String
productName
=
entity
.
getProductName
();
if
(
productName
!=
null
)
{
stmt
.
bindString
(
9
,
productName
);
}
String
specifications
=
entity
.
getSpecifications
();
if
(
specifications
!=
null
)
{
stmt
.
bindString
(
10
,
specifications
);
}
String
remainingNumber
=
entity
.
getRemainingNumber
();
if
(
remainingNumber
!=
null
)
{
stmt
.
bindString
(
11
,
remainingNumber
);
}
String
number
=
entity
.
getNumber
();
if
(
number
!=
null
)
{
stmt
.
bindString
(
12
,
number
);
}
String
drugMethods
=
entity
.
getDrugMethods
();
if
(
drugMethods
!=
null
)
{
stmt
.
bindString
(
13
,
drugMethods
);
}
String
hoofDisease
=
entity
.
getHoofDisease
();
if
(
hoofDisease
!=
null
)
{
stmt
.
bindString
(
14
,
hoofDisease
);
}
String
insecticide
=
entity
.
getInsecticide
();
if
(
insecticide
!=
null
)
{
stmt
.
bindString
(
15
,
insecticide
);
}
String
results
=
entity
.
getResults
();
if
(
results
!=
null
)
{
stmt
.
bindString
(
16
,
results
);
}
String
updateId
=
entity
.
getUpdateId
();
if
(
updateId
!=
null
)
{
stmt
.
bindString
(
17
,
updateId
);
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
18
,
createBy
);
}
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
19
,
createTime
);
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
20
,
updateBy
);
}
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
21
,
updateTime
);
}
String
permissions
=
entity
.
getPermissions
();
if
(
permissions
!=
null
)
{
stmt
.
bindString
(
22
,
permissions
);
}
String
inputTime
=
entity
.
getInputTime
();
if
(
inputTime
!=
null
)
{
stmt
.
bindString
(
23
,
inputTime
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
MedicalEntity
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
String
unid
=
entity
.
getUnid
();
if
(
unid
!=
null
)
{
stmt
.
bindString
(
2
,
unid
);
}
String
registrationNo
=
entity
.
getRegistrationNo
();
if
(
registrationNo
!=
null
)
{
stmt
.
bindString
(
3
,
registrationNo
);
}
String
treatDate
=
entity
.
getTreatDate
();
if
(
treatDate
!=
null
)
{
stmt
.
bindString
(
4
,
treatDate
);
}
String
treatPersonnel
=
entity
.
getTreatPersonnel
();
if
(
treatPersonnel
!=
null
)
{
stmt
.
bindString
(
5
,
treatPersonnel
);
}
String
causeOf
=
entity
.
getCauseOf
();
if
(
causeOf
!=
null
)
{
stmt
.
bindString
(
6
,
causeOf
);
}
String
batchNo
=
entity
.
getBatchNo
();
if
(
batchNo
!=
null
)
{
stmt
.
bindString
(
7
,
batchNo
);
}
String
drugName
=
entity
.
getDrugName
();
if
(
drugName
!=
null
)
{
stmt
.
bindString
(
8
,
drugName
);
}
String
productName
=
entity
.
getProductName
();
if
(
productName
!=
null
)
{
stmt
.
bindString
(
9
,
productName
);
}
String
specifications
=
entity
.
getSpecifications
();
if
(
specifications
!=
null
)
{
stmt
.
bindString
(
10
,
specifications
);
}
String
remainingNumber
=
entity
.
getRemainingNumber
();
if
(
remainingNumber
!=
null
)
{
stmt
.
bindString
(
11
,
remainingNumber
);
}
String
number
=
entity
.
getNumber
();
if
(
number
!=
null
)
{
stmt
.
bindString
(
12
,
number
);
}
String
drugMethods
=
entity
.
getDrugMethods
();
if
(
drugMethods
!=
null
)
{
stmt
.
bindString
(
13
,
drugMethods
);
}
String
hoofDisease
=
entity
.
getHoofDisease
();
if
(
hoofDisease
!=
null
)
{
stmt
.
bindString
(
14
,
hoofDisease
);
}
String
insecticide
=
entity
.
getInsecticide
();
if
(
insecticide
!=
null
)
{
stmt
.
bindString
(
15
,
insecticide
);
}
String
results
=
entity
.
getResults
();
if
(
results
!=
null
)
{
stmt
.
bindString
(
16
,
results
);
}
String
updateId
=
entity
.
getUpdateId
();
if
(
updateId
!=
null
)
{
stmt
.
bindString
(
17
,
updateId
);
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
18
,
createBy
);
}
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
19
,
createTime
);
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
20
,
updateBy
);
}
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
21
,
updateTime
);
}
String
permissions
=
entity
.
getPermissions
();
if
(
permissions
!=
null
)
{
stmt
.
bindString
(
22
,
permissions
);
}
String
inputTime
=
entity
.
getInputTime
();
if
(
inputTime
!=
null
)
{
stmt
.
bindString
(
23
,
inputTime
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
MedicalEntity
readEntity
(
Cursor
cursor
,
int
offset
)
{
MedicalEntity
entity
=
new
MedicalEntity
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getString
(
offset
+
1
),
// unid
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// registrationNo
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
),
// treatDate
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// treatPersonnel
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// causeOf
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// batchNo
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// drugName
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// productName
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
),
// specifications
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
),
// remainingNumber
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
),
// number
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
),
// drugMethods
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// hoofDisease
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getString
(
offset
+
14
),
// insecticide
cursor
.
isNull
(
offset
+
15
)
?
null
:
cursor
.
getString
(
offset
+
15
),
// results
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
),
// updateId
cursor
.
isNull
(
offset
+
17
)
?
null
:
cursor
.
getString
(
offset
+
17
),
// createBy
cursor
.
isNull
(
offset
+
18
)
?
null
:
cursor
.
getString
(
offset
+
18
),
// createTime
cursor
.
isNull
(
offset
+
19
)
?
null
:
cursor
.
getString
(
offset
+
19
),
// updateBy
cursor
.
isNull
(
offset
+
20
)
?
null
:
cursor
.
getString
(
offset
+
20
),
// updateTime
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
),
// permissions
cursor
.
isNull
(
offset
+
22
)
?
null
:
cursor
.
getString
(
offset
+
22
)
// inputTime
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
MedicalEntity
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setUnid
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getString
(
offset
+
1
));
entity
.
setRegistrationNo
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setTreatDate
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
));
entity
.
setTreatPersonnel
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
entity
.
setCauseOf
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setBatchNo
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setDrugName
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setProductName
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setSpecifications
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
entity
.
setRemainingNumber
(
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
));
entity
.
setNumber
(
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
));
entity
.
setDrugMethods
(
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
));
entity
.
setHoofDisease
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setInsecticide
(
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getString
(
offset
+
14
));
entity
.
setResults
(
cursor
.
isNull
(
offset
+
15
)
?
null
:
cursor
.
getString
(
offset
+
15
));
entity
.
setUpdateId
(
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
17
)
?
null
:
cursor
.
getString
(
offset
+
17
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
18
)
?
null
:
cursor
.
getString
(
offset
+
18
));
entity
.
setUpdateBy
(
cursor
.
isNull
(
offset
+
19
)
?
null
:
cursor
.
getString
(
offset
+
19
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
20
)
?
null
:
cursor
.
getString
(
offset
+
20
));
entity
.
setPermissions
(
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
));
entity
.
setInputTime
(
cursor
.
isNull
(
offset
+
22
)
?
null
:
cursor
.
getString
(
offset
+
22
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
MedicalEntity
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
MedicalEntity
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
MedicalEntity
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
app/src/main/java/com/phlx/anchorcollect/db/gen/WeightingEntityDao.java
deleted
100644 → 0
View file @
429a4804
package
com
.
phlx
.
anchorcollect
.
db
.
gen
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.phlx.anchorcollect.entity.WeightingEntity
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "WEIGHTING_ENTITY".
*/
public
class
WeightingEntityDao
extends
AbstractDao
<
WeightingEntity
,
String
>
{
public
static
final
String
TABLENAME
=
"WEIGHTING_ENTITY"
;
/**
* Properties of entity WeightingEntity.<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"
,
false
,
"ID"
);
public
final
static
Property
Unid
=
new
Property
(
1
,
String
.
class
,
"unid"
,
true
,
"UNID"
);
public
final
static
Property
RegistrationNo
=
new
Property
(
2
,
String
.
class
,
"RegistrationNo"
,
false
,
"REGISTRATION_NO"
);
public
final
static
Property
WeightName
=
new
Property
(
3
,
String
.
class
,
"weightName"
,
false
,
"WEIGHT_NAME"
);
public
final
static
Property
Weight
=
new
Property
(
4
,
String
.
class
,
"weight"
,
false
,
"WEIGHT"
);
public
final
static
Property
WeightingDate
=
new
Property
(
5
,
String
.
class
,
"weightingDate"
,
false
,
"WEIGHTING_DATE"
);
public
final
static
Property
PrincipalName
=
new
Property
(
6
,
String
.
class
,
"principalName"
,
false
,
"PRINCIPAL_NAME"
);
public
final
static
Property
PrincipalId
=
new
Property
(
7
,
String
.
class
,
"principalId"
,
false
,
"PRINCIPAL_ID"
);
public
final
static
Property
WeightCount
=
new
Property
(
8
,
String
.
class
,
"weightCount"
,
false
,
"WEIGHT_COUNT"
);
public
final
static
Property
CircleNo
=
new
Property
(
9
,
String
.
class
,
"circleNo"
,
false
,
"CIRCLE_NO"
);
}
public
WeightingEntityDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
WeightingEntityDao
(
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
+
"\"WEIGHTING_ENTITY\" ("
+
//
"\"ID\" INTEGER NOT NULL ,"
+
// 0: id
"\"UNID\" TEXT PRIMARY KEY NOT NULL ,"
+
// 1: unid
"\"REGISTRATION_NO\" TEXT,"
+
// 2: RegistrationNo
"\"WEIGHT_NAME\" TEXT,"
+
// 3: weightName
"\"WEIGHT\" TEXT,"
+
// 4: weight
"\"WEIGHTING_DATE\" TEXT,"
+
// 5: weightingDate
"\"PRINCIPAL_NAME\" TEXT,"
+
// 6: principalName
"\"PRINCIPAL_ID\" TEXT,"
+
// 7: principalId
"\"WEIGHT_COUNT\" TEXT,"
+
// 8: weightCount
"\"CIRCLE_NO\" TEXT);"
);
// 9: circleNo
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"WEIGHTING_ENTITY\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
WeightingEntity
entity
)
{
stmt
.
clearBindings
();
stmt
.
bindLong
(
1
,
entity
.
getId
());
String
unid
=
entity
.
getUnid
();
if
(
unid
!=
null
)
{
stmt
.
bindString
(
2
,
unid
);
}
String
RegistrationNo
=
entity
.
getRegistrationNo
();
if
(
RegistrationNo
!=
null
)
{
stmt
.
bindString
(
3
,
RegistrationNo
);
}
String
weightName
=
entity
.
getWeightName
();
if
(
weightName
!=
null
)
{
stmt
.
bindString
(
4
,
weightName
);
}
String
weight
=
entity
.
getWeight
();
if
(
weight
!=
null
)
{
stmt
.
bindString
(
5
,
weight
);
}
String
weightingDate
=
entity
.
getWeightingDate
();
if
(
weightingDate
!=
null
)
{
stmt
.
bindString
(
6
,
weightingDate
);
}
String
principalName
=
entity
.
getPrincipalName
();
if
(
principalName
!=
null
)
{
stmt
.
bindString
(
7
,
principalName
);
}
String
principalId
=
entity
.
getPrincipalId
();
if
(
principalId
!=
null
)
{
stmt
.
bindString
(
8
,
principalId
);
}
String
weightCount
=
entity
.
getWeightCount
();
if
(
weightCount
!=
null
)
{
stmt
.
bindString
(
9
,
weightCount
);
}
String
circleNo
=
entity
.
getCircleNo
();
if
(
circleNo
!=
null
)
{
stmt
.
bindString
(
10
,
circleNo
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
WeightingEntity
entity
)
{
stmt
.
clearBindings
();
stmt
.
bindLong
(
1
,
entity
.
getId
());
String
unid
=
entity
.
getUnid
();
if
(
unid
!=
null
)
{
stmt
.
bindString
(
2
,
unid
);
}
String
RegistrationNo
=
entity
.
getRegistrationNo
();
if
(
RegistrationNo
!=
null
)
{
stmt
.
bindString
(
3
,
RegistrationNo
);
}
String
weightName
=
entity
.
getWeightName
();
if
(
weightName
!=
null
)
{
stmt
.
bindString
(
4
,
weightName
);
}
String
weight
=
entity
.
getWeight
();
if
(
weight
!=
null
)
{
stmt
.
bindString
(
5
,
weight
);
}
String
weightingDate
=
entity
.
getWeightingDate
();
if
(
weightingDate
!=
null
)
{
stmt
.
bindString
(
6
,
weightingDate
);
}
String
principalName
=
entity
.
getPrincipalName
();
if
(
principalName
!=
null
)
{
stmt
.
bindString
(
7
,
principalName
);
}
String
principalId
=
entity
.
getPrincipalId
();
if
(
principalId
!=
null
)
{
stmt
.
bindString
(
8
,
principalId
);
}
String
weightCount
=
entity
.
getWeightCount
();
if
(
weightCount
!=
null
)
{
stmt
.
bindString
(
9
,
weightCount
);
}
String
circleNo
=
entity
.
getCircleNo
();
if
(
circleNo
!=
null
)
{
stmt
.
bindString
(
10
,
circleNo
);
}
}
@Override
public
String
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getString
(
offset
+
1
);
}
@Override
public
WeightingEntity
readEntity
(
Cursor
cursor
,
int
offset
)
{
WeightingEntity
entity
=
new
WeightingEntity
(
//
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getString
(
offset
+
1
),
// unid
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// RegistrationNo
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
),
// weightName
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// weight
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// weightingDate
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// principalName
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// principalId
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// weightCount
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
)
// circleNo
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
WeightingEntity
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
getLong
(
offset
+
0
));
entity
.
setUnid
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getString
(
offset
+
1
));
entity
.
setRegistrationNo
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setWeightName
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
));
entity
.
setWeight
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
entity
.
setWeightingDate
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setPrincipalName
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setPrincipalId
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setWeightCount
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setCircleNo
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
}
@Override
protected
final
String
updateKeyAfterInsert
(
WeightingEntity
entity
,
long
rowId
)
{
return
entity
.
getUnid
();
}
@Override
public
String
getKey
(
WeightingEntity
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getUnid
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
WeightingEntity
entity
)
{
return
entity
.
getUnid
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
app/src/main/java/com/phlx/anchorcollect/entity/ImmuneEntity.java
→
app/src/main/java/com/phlx/anchorcollect/entity/Immune
Batch
Entity.java
View file @
a4c6ad67
...
@@ -5,204 +5,186 @@ import android.os.Parcelable;
...
@@ -5,204 +5,186 @@ import android.os.Parcelable;
import
androidx.databinding.BaseObservable
;
import
androidx.databinding.BaseObservable
;
import
org.greenrobot.greendao.annotation.Entity
;
import
org.greenrobot.greendao.annotation.Entity
;
import
java.util.Date
;
import
org.greenrobot.greendao.annotation.Generated
;
import
org.greenrobot.greendao.annotation.Generated
;
import
org.greenrobot.greendao.annotation.Id
;
import
org.greenrobot.greendao.annotation.Id
;
/**
/**
* 免疫记录
* 免疫记录对象 zxgl_immunebatch
* 作者 : lei
*
* 时间 : 2018/12/3 11 : 04
* @author phlx
* @date 2022-01-10
*/
*/
@Entity
@Entity
public
class
ImmuneEntity
extends
BaseObservable
implements
Parcelable
{
public
class
ImmuneBatchEntity
extends
BaseObservable
implements
Parcelable
{
//主键
private
Long
id
;
/**
/**
* 主键
* 主键
*/
*/
@Id
@Id
(
autoincrement
=
false
)
private
String
unid
;
private
String
unid
;
/**
* 登记号
*/
private
String
registrationNo
;
/**
/**
* 圈舍号
* 圈舍号
*/
*/
private
String
circleNo
;
private
String
circleNo
;
/**
* 疫苗品种
*/
private
String
vaccineName
;
/**
* 疫苗批号
*/
private
String
lotnumber
;
/**
* 生产厂家
*/
private
String
manufacturer
;
/**
* 商品名
*/
private
String
productName
;
/**
* 规格
*/
private
String
specifications
;
/**
/**
* 库存
* 免疫有效期(月)
*/
private
String
remainingNumber
;
/**
* 免疫方法(滴鼻,注射,口服,刺种,气雾)
*/
*/
private
String
immuneMethod
;
private
String
immuneExp
;
/**
* 免疫剂量
*/
private
String
immuneDosage
;
/**
/**
* 免疫日期
* 免疫日期
*/
*/
private
String
immuneDate
;
private
String
immuneDate
;
/**
/**
* 免疫人员
* 免疫人员
*/
*/
private
String
immunePerson
;
private
String
immunePerson
;
/**
/**
*
备注
*
围药期(月)
*/
*/
private
String
note
;
private
String
perinatalPeriod
;
/**
/**
*
更新状态
*
疫苗名称
*/
*/
private
String
updateId
;
private
String
vaccineName
;
/**
/**
*
创建者
*
疫苗批号
*/
*/
private
String
createBy
;
private
String
lotnumber
;
/**
/**
*
创建时间
*
生产厂家
*/
*/
private
String
createTime
;
private
String
manufacturer
;
/**
/**
*
更新者
*
规格
*/
*/
private
String
updateBy
;
private
String
specifications
;
/**
/**
*
更新时间
*
免疫剂量
*/
*/
private
String
updateTim
e
;
private
String
immuneDosag
e
;
/**
/**
*
权限标识
*
免疫方法;(滴鼻,注射,口服,刺种,气雾)
*/
*/
private
String
permissions
;
private
String
immuneMethod
;
/** 是否上传 0未上传,1已上传 */
private
String
uploadStatus
;
/**
/**
*
从服务器接收,时间戳,终端需要上传给服务器,
*
部门id
*/
*/
private
String
inputTime
;
private
String
deptId
;
public
ImmuneEntity
()
{
/** 搜索值 */
}
private
String
searchValue
;
/** 创建者 */
private
String
createBy
;
/** 创建时间 */
private
String
createTime
;
/** 更新者 */
private
String
updateBy
;
protected
ImmuneEntity
(
Parcel
in
)
{
/** 更新时间 */
if
(
in
.
readByte
()
==
0
)
{
private
String
updateTime
;
id
=
null
;
}
else
{
/** 备注 */
id
=
in
.
readLong
();
private
String
remark
;
public
ImmuneBatchEntity
()
{
}
}
protected
ImmuneBatchEntity
(
Parcel
in
)
{
unid
=
in
.
readString
();
unid
=
in
.
readString
();
registrationNo
=
in
.
readString
();
circleNo
=
in
.
readString
();
circleNo
=
in
.
readString
();
immuneExp
=
in
.
readString
();
immuneDate
=
in
.
readString
();
immunePerson
=
in
.
readString
();
perinatalPeriod
=
in
.
readString
();
vaccineName
=
in
.
readString
();
vaccineName
=
in
.
readString
();
lotnumber
=
in
.
readString
();
lotnumber
=
in
.
readString
();
manufacturer
=
in
.
readString
();
manufacturer
=
in
.
readString
();
productName
=
in
.
readString
();
specifications
=
in
.
readString
();
specifications
=
in
.
readString
();
remainingNumber
=
in
.
readString
();
immuneMethod
=
in
.
readString
();
immuneDosage
=
in
.
readString
();
immuneDosage
=
in
.
readString
();
immune
Date
=
in
.
readString
();
immune
Method
=
in
.
readString
();
immunePerson
=
in
.
readString
();
uploadStatus
=
in
.
readString
();
note
=
in
.
readString
();
deptId
=
in
.
readString
();
updateId
=
in
.
readString
();
searchValue
=
in
.
readString
();
createBy
=
in
.
readString
();
createBy
=
in
.
readString
();
createTime
=
in
.
readString
();
createTime
=
in
.
readString
();
updateBy
=
in
.
readString
();
updateBy
=
in
.
readString
();
updateTime
=
in
.
readString
();
updateTime
=
in
.
readString
();
permissions
=
in
.
readString
();
remark
=
in
.
readString
();
inputTime
=
in
.
readString
();
}
}
@Generated
(
hash
=
520368057
)
@Generated
(
hash
=
986685803
)
public
ImmuneBatchEntity
(
String
unid
,
String
circleNo
,
String
immuneExp
,
String
immuneDate
,
public
ImmuneEntity
(
Long
id
,
String
unid
,
String
registrationNo
,
String
circleNo
,
String
immunePerson
,
String
perinatalPeriod
,
String
vaccineName
,
String
lotnumber
,
String
vaccineName
,
String
lotnumber
,
String
manufacturer
,
String
productName
,
String
manufacturer
,
String
specifications
,
String
immuneDosage
,
String
immuneMethod
,
String
specifications
,
String
remainingNumber
,
String
immuneMethod
,
String
uploadStatus
,
String
deptId
,
String
searchValue
,
String
createBy
,
String
createTime
,
String
immuneDosage
,
String
immuneDate
,
String
immunePerson
,
String
note
,
String
updateBy
,
String
updateTime
,
String
remark
)
{
String
updateId
,
String
createBy
,
String
createTime
,
String
updateBy
,
String
updateTime
,
String
permissions
,
String
inputTime
)
{
this
.
id
=
id
;
this
.
unid
=
unid
;
this
.
unid
=
unid
;
this
.
registrationNo
=
registrationNo
;
this
.
circleNo
=
circleNo
;
this
.
circleNo
=
circleNo
;
this
.
immuneExp
=
immuneExp
;
this
.
immuneDate
=
immuneDate
;
this
.
immunePerson
=
immunePerson
;
this
.
perinatalPeriod
=
perinatalPeriod
;
this
.
vaccineName
=
vaccineName
;
this
.
vaccineName
=
vaccineName
;
this
.
lotnumber
=
lotnumber
;
this
.
lotnumber
=
lotnumber
;
this
.
manufacturer
=
manufacturer
;
this
.
manufacturer
=
manufacturer
;
this
.
productName
=
productName
;
this
.
specifications
=
specifications
;
this
.
specifications
=
specifications
;
this
.
remainingNumber
=
remainingNumber
;
this
.
immuneMethod
=
immuneMethod
;
this
.
immuneDosage
=
immuneDosage
;
this
.
immuneDosage
=
immuneDosage
;
this
.
immune
Date
=
immuneDate
;
this
.
immune
Method
=
immuneMethod
;
this
.
immunePerson
=
immunePerson
;
this
.
uploadStatus
=
uploadStatus
;
this
.
note
=
note
;
this
.
deptId
=
deptId
;
this
.
updateId
=
updateId
;
this
.
searchValue
=
searchValue
;
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
this
.
createTime
=
createTime
;
this
.
createTime
=
createTime
;
this
.
updateBy
=
updateBy
;
this
.
updateBy
=
updateBy
;
this
.
updateTime
=
updateTime
;
this
.
updateTime
=
updateTime
;
this
.
permissions
=
permissions
;
this
.
remark
=
remark
;
this
.
inputTime
=
inputTime
;
}
}
@Override
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
if
(
id
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
}
else
{
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
id
);
}
dest
.
writeString
(
unid
);
dest
.
writeString
(
unid
);
dest
.
writeString
(
registrationNo
);
dest
.
writeString
(
circleNo
);
dest
.
writeString
(
circleNo
);
dest
.
writeString
(
immuneExp
);
dest
.
writeString
(
immuneDate
);
dest
.
writeString
(
immunePerson
);
dest
.
writeString
(
perinatalPeriod
);
dest
.
writeString
(
vaccineName
);
dest
.
writeString
(
vaccineName
);
dest
.
writeString
(
lotnumber
);
dest
.
writeString
(
lotnumber
);
dest
.
writeString
(
manufacturer
);
dest
.
writeString
(
manufacturer
);
dest
.
writeString
(
productName
);
dest
.
writeString
(
specifications
);
dest
.
writeString
(
specifications
);
dest
.
writeString
(
remainingNumber
);
dest
.
writeString
(
immuneMethod
);
dest
.
writeString
(
immuneDosage
);
dest
.
writeString
(
immuneDosage
);
dest
.
writeString
(
immune
Date
);
dest
.
writeString
(
immune
Method
);
dest
.
writeString
(
immunePerson
);
dest
.
writeString
(
uploadStatus
);
dest
.
writeString
(
note
);
dest
.
writeString
(
deptId
);
dest
.
writeString
(
updateId
);
dest
.
writeString
(
searchValue
);
dest
.
writeString
(
createBy
);
dest
.
writeString
(
createBy
);
dest
.
writeString
(
createTime
);
dest
.
writeString
(
createTime
);
dest
.
writeString
(
updateBy
);
dest
.
writeString
(
updateBy
);
dest
.
writeString
(
updateTime
);
dest
.
writeString
(
updateTime
);
dest
.
writeString
(
permissions
);
dest
.
writeString
(
remark
);
dest
.
writeString
(
inputTime
);
}
}
@Override
@Override
...
@@ -210,26 +192,18 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
...
@@ -210,26 +192,18 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
return
0
;
return
0
;
}
}
public
static
final
Creator
<
Immune
Entity
>
CREATOR
=
new
Creator
<
Immune
Entity
>()
{
public
static
final
Creator
<
Immune
BatchEntity
>
CREATOR
=
new
Creator
<
ImmuneBatch
Entity
>()
{
@Override
@Override
public
ImmuneEntity
createFromParcel
(
Parcel
in
)
{
public
Immune
Batch
Entity
createFromParcel
(
Parcel
in
)
{
return
new
ImmuneEntity
(
in
);
return
new
Immune
Batch
Entity
(
in
);
}
}
@Override
@Override
public
ImmuneEntity
[]
newArray
(
int
size
)
{
public
Immune
Batch
Entity
[]
newArray
(
int
size
)
{
return
new
ImmuneEntity
[
size
];
return
new
Immune
Batch
Entity
[
size
];
}
}
};
};
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getUnid
()
{
public
String
getUnid
()
{
return
unid
;
return
unid
;
}
}
...
@@ -238,14 +212,6 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
...
@@ -238,14 +212,6 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
this
.
unid
=
unid
;
this
.
unid
=
unid
;
}
}
public
String
getRegistrationNo
()
{
return
registrationNo
;
}
public
void
setRegistrationNo
(
String
registrationNo
)
{
this
.
registrationNo
=
registrationNo
;
}
public
String
getCircleNo
()
{
public
String
getCircleNo
()
{
return
circleNo
;
return
circleNo
;
}
}
...
@@ -254,6 +220,38 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
...
@@ -254,6 +220,38 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
this
.
circleNo
=
circleNo
;
this
.
circleNo
=
circleNo
;
}
}
public
String
getImmuneExp
()
{
return
immuneExp
;
}
public
void
setImmuneExp
(
String
immuneExp
)
{
this
.
immuneExp
=
immuneExp
;
}
public
String
getImmuneDate
()
{
return
immuneDate
;
}
public
void
setImmuneDate
(
String
immuneDate
)
{
this
.
immuneDate
=
immuneDate
;
}
public
String
getImmunePerson
()
{
return
immunePerson
;
}
public
void
setImmunePerson
(
String
immunePerson
)
{
this
.
immunePerson
=
immunePerson
;
}
public
String
getPerinatalPeriod
()
{
return
perinatalPeriod
;
}
public
void
setPerinatalPeriod
(
String
perinatalPeriod
)
{
this
.
perinatalPeriod
=
perinatalPeriod
;
}
public
String
getVaccineName
()
{
public
String
getVaccineName
()
{
return
vaccineName
;
return
vaccineName
;
}
}
...
@@ -278,14 +276,6 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
...
@@ -278,14 +276,6 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
this
.
manufacturer
=
manufacturer
;
this
.
manufacturer
=
manufacturer
;
}
}
public
String
getProductName
()
{
return
productName
;
}
public
void
setProductName
(
String
productName
)
{
this
.
productName
=
productName
;
}
public
String
getSpecifications
()
{
public
String
getSpecifications
()
{
return
specifications
;
return
specifications
;
}
}
...
@@ -294,22 +284,6 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
...
@@ -294,22 +284,6 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
this
.
specifications
=
specifications
;
this
.
specifications
=
specifications
;
}
}
public
String
getRemainingNumber
()
{
return
remainingNumber
;
}
public
void
setRemainingNumber
(
String
remainingNumber
)
{
this
.
remainingNumber
=
remainingNumber
;
}
public
String
getImmuneMethod
()
{
return
immuneMethod
;
}
public
void
setImmuneMethod
(
String
immuneMethod
)
{
this
.
immuneMethod
=
immuneMethod
;
}
public
String
getImmuneDosage
()
{
public
String
getImmuneDosage
()
{
return
immuneDosage
;
return
immuneDosage
;
}
}
...
@@ -318,36 +292,36 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
...
@@ -318,36 +292,36 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
this
.
immuneDosage
=
immuneDosage
;
this
.
immuneDosage
=
immuneDosage
;
}
}
public
String
getImmune
Date
()
{
public
String
getImmune
Method
()
{
return
immune
Date
;
return
immune
Method
;
}
}
public
void
setImmune
Date
(
String
immuneDate
)
{
public
void
setImmune
Method
(
String
immuneMethod
)
{
this
.
immune
Date
=
immuneDate
;
this
.
immune
Method
=
immuneMethod
;
}
}
public
String
get
ImmunePerson
()
{
public
String
get
UploadStatus
()
{
return
immunePerson
;
return
uploadStatus
;
}
}
public
void
set
ImmunePerson
(
String
immunePerson
)
{
public
void
set
UploadStatus
(
String
uploadStatus
)
{
this
.
immunePerson
=
immunePerson
;
this
.
uploadStatus
=
uploadStatus
;
}
}
public
String
get
Note
()
{
public
String
get
DeptId
()
{
return
note
;
return
deptId
;
}
}
public
void
set
Note
(
String
note
)
{
public
void
set
DeptId
(
String
deptId
)
{
this
.
note
=
note
;
this
.
deptId
=
deptId
;
}
}
public
String
get
UpdateId
()
{
public
String
get
SearchValue
()
{
return
updateId
;
return
searchValue
;
}
}
public
void
set
UpdateId
(
String
updateId
)
{
public
void
set
SearchValue
(
String
searchValue
)
{
this
.
updateId
=
updateId
;
this
.
searchValue
=
searchValue
;
}
}
public
String
getCreateBy
()
{
public
String
getCreateBy
()
{
...
@@ -382,47 +356,37 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
...
@@ -382,47 +356,37 @@ public class ImmuneEntity extends BaseObservable implements Parcelable {
this
.
updateTime
=
updateTime
;
this
.
updateTime
=
updateTime
;
}
}
public
String
get
Permissions
()
{
public
String
get
Remark
()
{
return
permissions
;
return
remark
;
}
}
public
void
setPermissions
(
String
permissions
)
{
public
void
setRemark
(
String
remark
)
{
this
.
permissions
=
permissions
;
this
.
remark
=
remark
;
}
public
String
getInputTime
()
{
return
inputTime
;
}
public
void
setInputTime
(
String
inputTime
)
{
this
.
inputTime
=
inputTime
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"ImmuneEntity{"
+
return
"ImmuneBatchEntity{"
+
"id="
+
id
+
"unid='"
+
unid
+
'\''
+
", unid='"
+
unid
+
'\''
+
", registrationNo='"
+
registrationNo
+
'\''
+
", circleNo='"
+
circleNo
+
'\''
+
", circleNo='"
+
circleNo
+
'\''
+
", immuneExp='"
+
immuneExp
+
'\''
+
", immuneDate='"
+
immuneDate
+
'\''
+
", immunePerson='"
+
immunePerson
+
'\''
+
", perinatalPeriod='"
+
perinatalPeriod
+
'\''
+
", vaccineName='"
+
vaccineName
+
'\''
+
", vaccineName='"
+
vaccineName
+
'\''
+
", lotnumber='"
+
lotnumber
+
'\''
+
", lotnumber='"
+
lotnumber
+
'\''
+
", manufacturer='"
+
manufacturer
+
'\''
+
", manufacturer='"
+
manufacturer
+
'\''
+
", productName='"
+
productName
+
'\''
+
", specifications='"
+
specifications
+
'\''
+
", specifications='"
+
specifications
+
'\''
+
", remainingNumber='"
+
remainingNumber
+
'\''
+
", immuneMethod='"
+
immuneMethod
+
'\''
+
", immuneDosage='"
+
immuneDosage
+
'\''
+
", immuneDosage='"
+
immuneDosage
+
'\''
+
", immune
Date='"
+
immuneDate
+
'\''
+
", immune
Method='"
+
immuneMethod
+
'\''
+
",
immunePerson='"
+
immunePerson
+
'\''
+
",
uploadStatus='"
+
uploadStatus
+
'\''
+
",
note='"
+
note
+
'\''
+
",
deptId='"
+
deptId
+
'\''
+
",
updateId='"
+
updateId
+
'\''
+
",
searchValue='"
+
searchValue
+
'\''
+
", createBy='"
+
createBy
+
'\''
+
", createBy='"
+
createBy
+
'\''
+
", createTime='"
+
createTime
+
'\''
+
", createTime='"
+
createTime
+
'\''
+
", updateBy='"
+
updateBy
+
'\''
+
", updateBy='"
+
updateBy
+
'\''
+
", updateTime='"
+
updateTime
+
'\''
+
", updateTime='"
+
updateTime
+
'\''
+
", permissions='"
+
permissions
+
'\''
+
", remark='"
+
remark
+
'\''
+
", inputTime='"
+
inputTime
+
'\''
+
'}'
;
'}'
;
}
}
}
}
app/src/main/java/com/phlx/anchorcollect/entity/MedicalEntity.java
→
app/src/main/java/com/phlx/anchorcollect/entity/Medical
Record
Entity.java
View file @
a4c6ad67
...
@@ -5,210 +5,169 @@ import android.os.Parcelable;
...
@@ -5,210 +5,169 @@ import android.os.Parcelable;
import
androidx.databinding.BaseObservable
;
import
androidx.databinding.BaseObservable
;
import
org.greenrobot.greendao.annotation.Entity
;
import
org.greenrobot.greendao.annotation.Entity
;
import
java.util.Date
;
import
org.greenrobot.greendao.annotation.Generated
;
import
org.greenrobot.greendao.annotation.Generated
;
import
org.greenrobot.greendao.annotation.Id
;
import
org.greenrobot.greendao.annotation.Id
;
/**
/**
* 病例档案表
* 诊疗记录对象 zxgl_medicalrecords
* 作者 : lei
*
* 时间 : 2018/12/3 11 : 57
* @author phlx
* @date 2022-01-10
*/
*/
@Entity
@Entity
public
class
MedicalEntity
extends
BaseObservable
implements
Parcelable
{
public
class
MedicalRecordEntity
extends
BaseObservable
implements
Parcelable
{
//主键
@Id
private
Long
id
;
/**
/**
* 自增列
* 自增列
*/
*/
@Id
(
autoincrement
=
false
)
private
String
unid
;
private
String
unid
;
/**
/**
*
登记号
*
基本信息ID
*/
*/
private
String
registrationNo
;
private
String
cattleresumeId
;
/**
/**
* 诊疗日期
* 诊疗日期
*/
*/
private
String
treatDate
;
private
String
treatDate
;
/**
/**
* 治疗人员
* 治疗人员
*/
*/
private
String
treatPersonnel
;
private
String
treatPersonnel
;
/**
/**
* 病因
* 病因
*/
*/
private
String
causeOf
;
private
String
causeOf
;
/**
* 批次
*/
private
String
batchNo
;
/**
/**
* 用药名称
* 用药名称
*/
*/
private
String
drugName
;
private
String
drugName
;
/**
* 商品名
*/
private
String
productName
;
/**
/**
* 规格
* 规格
*/
*/
private
String
specifications
;
private
String
specifications
;
/**
* 库存
*/
private
String
remainingNumber
;
/**
* 用药数量
*/
private
String
number
;
/**
/**
* 用药方法
* 用药方法
*/
*/
private
String
drugMethods
;
private
String
drugMethods
;
/**
/**
* 蹄病处理
* 用药数量
*/
private
String
hoofDisease
;
/**
* 驱虫
*/
*/
private
String
insecticide
;
private
String
drugNumber
;
/**
/**
* 结果
*
诊疗
结果
*/
*/
private
String
results
;
private
String
results
;
/** 是否上传 0未上传,1已上传 */
private
String
uploadStatus
;
/**
/**
* 更新状态
* 部门id
*/
private
String
updateId
;
/**
* 创建者
*/
*/
private
String
deptId
;
/** 搜索值 */
private
String
searchValue
;
/** 创建者 */
private
String
createBy
;
private
String
createBy
;
/**
/** 创建时间 */
* 创建时间
*/
private
String
createTime
;
private
String
createTime
;
/**
/** 更新者 */
* 更新者
*/
private
String
updateBy
;
private
String
updateBy
;
/**
/** 更新时间 */
* 更新时间
*/
private
String
updateTime
;
private
String
updateTime
;
/**
/** 备注 */
* 权限标识
private
String
remark
;
*/
private
String
permissions
;
/**
* 从服务器接收,时间戳,终端需要上传给服务器,
*/
private
String
inputTime
;
public
MedicalEntity
()
{
public
Medical
Record
Entity
()
{
}
}
protected
MedicalEntity
(
Parcel
in
)
{
protected
MedicalRecordEntity
(
Parcel
in
)
{
if
(
in
.
readByte
()
==
0
)
{
id
=
null
;
}
else
{
id
=
in
.
readLong
();
}
unid
=
in
.
readString
();
unid
=
in
.
readString
();
registrationNo
=
in
.
readString
();
cattleresumeId
=
in
.
readString
();
treatDate
=
in
.
readString
();
treatDate
=
in
.
readString
();
treatPersonnel
=
in
.
readString
();
treatPersonnel
=
in
.
readString
();
causeOf
=
in
.
readString
();
causeOf
=
in
.
readString
();
batchNo
=
in
.
readString
();
drugName
=
in
.
readString
();
drugName
=
in
.
readString
();
productName
=
in
.
readString
();
specifications
=
in
.
readString
();
specifications
=
in
.
readString
();
remainingNumber
=
in
.
readString
();
number
=
in
.
readString
();
drugMethods
=
in
.
readString
();
drugMethods
=
in
.
readString
();
hoofDisease
=
in
.
readString
();
drugNumber
=
in
.
readString
();
insecticide
=
in
.
readString
();
results
=
in
.
readString
();
results
=
in
.
readString
();
updateId
=
in
.
readString
();
uploadStatus
=
in
.
readString
();
deptId
=
in
.
readString
();
searchValue
=
in
.
readString
();
createBy
=
in
.
readString
();
createBy
=
in
.
readString
();
createTime
=
in
.
readString
();
createTime
=
in
.
readString
();
updateBy
=
in
.
readString
();
updateBy
=
in
.
readString
();
updateTime
=
in
.
readString
();
updateTime
=
in
.
readString
();
permissions
=
in
.
readString
();
remark
=
in
.
readString
();
inputTime
=
in
.
readString
();
}
}
@Generated
(
hash
=
1678677230
)
@Generated
(
hash
=
479849452
)
public
MedicalRecordEntity
(
String
unid
,
String
cattleresumeId
,
String
treatDate
,
public
MedicalEntity
(
Long
id
,
String
unid
,
String
registrationNo
,
String
treatDate
,
String
treatPersonnel
,
String
causeOf
,
String
drugName
,
String
specifications
,
String
treatPersonnel
,
String
causeOf
,
String
batchNo
,
String
drugName
,
String
drugMethods
,
String
drugNumber
,
String
results
,
String
uploadStatus
,
String
deptId
,
String
productName
,
String
specifications
,
String
remainingNumber
,
String
number
,
String
searchValue
,
String
createBy
,
String
createTime
,
String
updateBy
,
String
updateTime
,
String
drugMethods
,
String
hoofDisease
,
String
insecticide
,
String
results
,
String
remark
)
{
String
updateId
,
String
createBy
,
String
createTime
,
String
updateBy
,
String
updateTime
,
String
permissions
,
String
inputTime
)
{
this
.
id
=
id
;
this
.
unid
=
unid
;
this
.
unid
=
unid
;
this
.
registrationNo
=
registrationNo
;
this
.
cattleresumeId
=
cattleresumeId
;
this
.
treatDate
=
treatDate
;
this
.
treatDate
=
treatDate
;
this
.
treatPersonnel
=
treatPersonnel
;
this
.
treatPersonnel
=
treatPersonnel
;
this
.
causeOf
=
causeOf
;
this
.
causeOf
=
causeOf
;
this
.
batchNo
=
batchNo
;
this
.
drugName
=
drugName
;
this
.
drugName
=
drugName
;
this
.
productName
=
productName
;
this
.
specifications
=
specifications
;
this
.
specifications
=
specifications
;
this
.
remainingNumber
=
remainingNumber
;
this
.
number
=
number
;
this
.
drugMethods
=
drugMethods
;
this
.
drugMethods
=
drugMethods
;
this
.
hoofDisease
=
hoofDisease
;
this
.
drugNumber
=
drugNumber
;
this
.
insecticide
=
insecticide
;
this
.
results
=
results
;
this
.
results
=
results
;
this
.
updateId
=
updateId
;
this
.
uploadStatus
=
uploadStatus
;
this
.
deptId
=
deptId
;
this
.
searchValue
=
searchValue
;
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
this
.
createTime
=
createTime
;
this
.
createTime
=
createTime
;
this
.
updateBy
=
updateBy
;
this
.
updateBy
=
updateBy
;
this
.
updateTime
=
updateTime
;
this
.
updateTime
=
updateTime
;
this
.
permissions
=
permissions
;
this
.
remark
=
remark
;
this
.
inputTime
=
inputTime
;
}
}
@Override
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
if
(
id
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
}
else
{
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
id
);
}
dest
.
writeString
(
unid
);
dest
.
writeString
(
unid
);
dest
.
writeString
(
registrationNo
);
dest
.
writeString
(
cattleresumeId
);
dest
.
writeString
(
treatDate
);
dest
.
writeString
(
treatDate
);
dest
.
writeString
(
treatPersonnel
);
dest
.
writeString
(
treatPersonnel
);
dest
.
writeString
(
causeOf
);
dest
.
writeString
(
causeOf
);
dest
.
writeString
(
batchNo
);
dest
.
writeString
(
drugName
);
dest
.
writeString
(
drugName
);
dest
.
writeString
(
productName
);
dest
.
writeString
(
specifications
);
dest
.
writeString
(
specifications
);
dest
.
writeString
(
remainingNumber
);
dest
.
writeString
(
number
);
dest
.
writeString
(
drugMethods
);
dest
.
writeString
(
drugMethods
);
dest
.
writeString
(
hoofDisease
);
dest
.
writeString
(
drugNumber
);
dest
.
writeString
(
insecticide
);
dest
.
writeString
(
results
);
dest
.
writeString
(
results
);
dest
.
writeString
(
updateId
);
dest
.
writeString
(
uploadStatus
);
dest
.
writeString
(
deptId
);
dest
.
writeString
(
searchValue
);
dest
.
writeString
(
createBy
);
dest
.
writeString
(
createBy
);
dest
.
writeString
(
createTime
);
dest
.
writeString
(
createTime
);
dest
.
writeString
(
updateBy
);
dest
.
writeString
(
updateBy
);
dest
.
writeString
(
updateTime
);
dest
.
writeString
(
updateTime
);
dest
.
writeString
(
permissions
);
dest
.
writeString
(
remark
);
dest
.
writeString
(
inputTime
);
}
}
@Override
@Override
...
@@ -216,26 +175,18 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
...
@@ -216,26 +175,18 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
return
0
;
return
0
;
}
}
public
static
final
Creator
<
Medical
Entity
>
CREATOR
=
new
Creator
<
Medical
Entity
>()
{
public
static
final
Creator
<
Medical
RecordEntity
>
CREATOR
=
new
Creator
<
MedicalRecord
Entity
>()
{
@Override
@Override
public
MedicalEntity
createFromParcel
(
Parcel
in
)
{
public
Medical
Record
Entity
createFromParcel
(
Parcel
in
)
{
return
new
MedicalEntity
(
in
);
return
new
Medical
Record
Entity
(
in
);
}
}
@Override
@Override
public
MedicalEntity
[]
newArray
(
int
size
)
{
public
Medical
Record
Entity
[]
newArray
(
int
size
)
{
return
new
MedicalEntity
[
size
];
return
new
Medical
Record
Entity
[
size
];
}
}
};
};
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getUnid
()
{
public
String
getUnid
()
{
return
unid
;
return
unid
;
}
}
...
@@ -244,12 +195,12 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
...
@@ -244,12 +195,12 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
this
.
unid
=
unid
;
this
.
unid
=
unid
;
}
}
public
String
get
RegistrationNo
()
{
public
String
get
CattleresumeId
()
{
return
registrationNo
;
return
cattleresumeId
;
}
}
public
void
set
RegistrationNo
(
String
registrationNo
)
{
public
void
set
CattleresumeId
(
String
cattleresumeId
)
{
this
.
registrationNo
=
registrationNo
;
this
.
cattleresumeId
=
cattleresumeId
;
}
}
public
String
getTreatDate
()
{
public
String
getTreatDate
()
{
...
@@ -276,14 +227,6 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
...
@@ -276,14 +227,6 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
this
.
causeOf
=
causeOf
;
this
.
causeOf
=
causeOf
;
}
}
public
String
getBatchNo
()
{
return
batchNo
;
}
public
void
setBatchNo
(
String
batchNo
)
{
this
.
batchNo
=
batchNo
;
}
public
String
getDrugName
()
{
public
String
getDrugName
()
{
return
drugName
;
return
drugName
;
}
}
...
@@ -292,14 +235,6 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
...
@@ -292,14 +235,6 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
this
.
drugName
=
drugName
;
this
.
drugName
=
drugName
;
}
}
public
String
getProductName
()
{
return
productName
;
}
public
void
setProductName
(
String
productName
)
{
this
.
productName
=
productName
;
}
public
String
getSpecifications
()
{
public
String
getSpecifications
()
{
return
specifications
;
return
specifications
;
}
}
...
@@ -308,22 +243,6 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
...
@@ -308,22 +243,6 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
this
.
specifications
=
specifications
;
this
.
specifications
=
specifications
;
}
}
public
String
getRemainingNumber
()
{
return
remainingNumber
;
}
public
void
setRemainingNumber
(
String
remainingNumber
)
{
this
.
remainingNumber
=
remainingNumber
;
}
public
String
getNumber
()
{
return
number
;
}
public
void
setNumber
(
String
number
)
{
this
.
number
=
number
;
}
public
String
getDrugMethods
()
{
public
String
getDrugMethods
()
{
return
drugMethods
;
return
drugMethods
;
}
}
...
@@ -332,20 +251,12 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
...
@@ -332,20 +251,12 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
this
.
drugMethods
=
drugMethods
;
this
.
drugMethods
=
drugMethods
;
}
}
public
String
getHoofDisease
()
{
public
String
getDrugNumber
()
{
return
hoofDisease
;
return
drugNumber
;
}
public
void
setHoofDisease
(
String
hoofDisease
)
{
this
.
hoofDisease
=
hoofDisease
;
}
public
String
getInsecticide
()
{
return
insecticide
;
}
}
public
void
set
Insecticide
(
String
insecticide
)
{
public
void
set
DrugNumber
(
String
drugNumber
)
{
this
.
insecticide
=
insecticide
;
this
.
drugNumber
=
drugNumber
;
}
}
public
String
getResults
()
{
public
String
getResults
()
{
...
@@ -356,12 +267,28 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
...
@@ -356,12 +267,28 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
this
.
results
=
results
;
this
.
results
=
results
;
}
}
public
String
getUpdateId
()
{
public
String
getUploadStatus
()
{
return
updateId
;
return
uploadStatus
;
}
public
void
setUploadStatus
(
String
uploadStatus
)
{
this
.
uploadStatus
=
uploadStatus
;
}
}
public
void
setUpdateId
(
String
updateId
)
{
public
String
getDeptId
()
{
this
.
updateId
=
updateId
;
return
deptId
;
}
public
void
setDeptId
(
String
deptId
)
{
this
.
deptId
=
deptId
;
}
public
String
getSearchValue
()
{
return
searchValue
;
}
public
void
setSearchValue
(
String
searchValue
)
{
this
.
searchValue
=
searchValue
;
}
}
public
String
getCreateBy
()
{
public
String
getCreateBy
()
{
...
@@ -396,48 +323,35 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
...
@@ -396,48 +323,35 @@ public class MedicalEntity extends BaseObservable implements Parcelable {
this
.
updateTime
=
updateTime
;
this
.
updateTime
=
updateTime
;
}
}
public
String
getPermissions
()
{
public
String
getRemark
()
{
return
permissions
;
return
remark
;
}
public
void
setPermissions
(
String
permissions
)
{
this
.
permissions
=
permissions
;
}
public
String
getInputTime
()
{
return
inputTime
;
}
}
public
void
set
InputTime
(
String
inputTime
)
{
public
void
set
Remark
(
String
remark
)
{
this
.
inputTime
=
inputTime
;
this
.
remark
=
remark
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"MedicalEntity{"
+
return
"MedicalRecordEntity{"
+
"id="
+
id
+
"unid='"
+
unid
+
'\''
+
", unid='"
+
unid
+
'\''
+
", cattleresumeId='"
+
cattleresumeId
+
'\''
+
", registrationNo='"
+
registrationNo
+
'\''
+
", treatDate='"
+
treatDate
+
'\''
+
", treatDate='"
+
treatDate
+
'\''
+
", treatPersonnel='"
+
treatPersonnel
+
'\''
+
", treatPersonnel='"
+
treatPersonnel
+
'\''
+
", causeOf='"
+
causeOf
+
'\''
+
", causeOf='"
+
causeOf
+
'\''
+
", batchNo='"
+
batchNo
+
'\''
+
", drugName='"
+
drugName
+
'\''
+
", drugName='"
+
drugName
+
'\''
+
", productName='"
+
productName
+
'\''
+
", specifications='"
+
specifications
+
'\''
+
", specifications='"
+
specifications
+
'\''
+
", remainingNumber='"
+
remainingNumber
+
'\''
+
", number='"
+
number
+
'\''
+
", drugMethods='"
+
drugMethods
+
'\''
+
", drugMethods='"
+
drugMethods
+
'\''
+
", hoofDisease='"
+
hoofDisease
+
'\''
+
", drugNumber='"
+
drugNumber
+
'\''
+
", insecticide='"
+
insecticide
+
'\''
+
", results='"
+
results
+
'\''
+
", results='"
+
results
+
'\''
+
", updateId='"
+
updateId
+
'\''
+
", uploadStatus='"
+
uploadStatus
+
'\''
+
", deptId='"
+
deptId
+
'\''
+
", searchValue='"
+
searchValue
+
'\''
+
", createBy='"
+
createBy
+
'\''
+
", createBy='"
+
createBy
+
'\''
+
", createTime='"
+
createTime
+
'\''
+
", createTime='"
+
createTime
+
'\''
+
", updateBy='"
+
updateBy
+
'\''
+
", updateBy='"
+
updateBy
+
'\''
+
", updateTime='"
+
updateTime
+
'\''
+
", updateTime='"
+
updateTime
+
'\''
+
", permissions='"
+
permissions
+
'\''
+
", remark='"
+
remark
+
'\''
+
", inputTime='"
+
inputTime
+
'\''
+
'}'
;
'}'
;
}
}
}
}
app/src/main/java/com/phlx/anchorcollect/entity/WeightManEntity.java
0 → 100644
View file @
a4c6ad67
package
com
.
phlx
.
anchorcollect
.
entity
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
androidx.databinding.BaseObservable
;
import
org.greenrobot.greendao.annotation.Entity
;
import
org.greenrobot.greendao.annotation.Generated
;
/**
* 称重管理类
*/
@Entity
public
class
WeightManEntity
extends
BaseObservable
implements
Parcelable
{
/**
* unid
*/
private
String
unid
;
/**
* 基本信息ID
*/
private
String
cattleresumeId
;
/**
* 体重
*/
private
String
weight
;
/** 是否上传 0未上传,1已上传 */
private
String
uploadStatus
;
/**
* 部门id
*/
private
String
deptId
;
/** 搜索值 */
private
String
searchValue
;
/** 创建者 */
private
String
createBy
;
/** 创建时间 */
private
String
createTime
;
/** 更新者 */
private
String
updateBy
;
/** 更新时间 */
private
String
updateTime
;
/** 备注 */
private
String
remark
;
public
WeightManEntity
()
{
}
protected
WeightManEntity
(
Parcel
in
)
{
unid
=
in
.
readString
();
cattleresumeId
=
in
.
readString
();
weight
=
in
.
readString
();
uploadStatus
=
in
.
readString
();
deptId
=
in
.
readString
();
searchValue
=
in
.
readString
();
createBy
=
in
.
readString
();
createTime
=
in
.
readString
();
updateBy
=
in
.
readString
();
updateTime
=
in
.
readString
();
remark
=
in
.
readString
();
}
@Generated
(
hash
=
445089683
)
public
WeightManEntity
(
String
unid
,
String
cattleresumeId
,
String
weight
,
String
uploadStatus
,
String
deptId
,
String
searchValue
,
String
createBy
,
String
createTime
,
String
updateBy
,
String
updateTime
,
String
remark
)
{
this
.
unid
=
unid
;
this
.
cattleresumeId
=
cattleresumeId
;
this
.
weight
=
weight
;
this
.
uploadStatus
=
uploadStatus
;
this
.
deptId
=
deptId
;
this
.
searchValue
=
searchValue
;
this
.
createBy
=
createBy
;
this
.
createTime
=
createTime
;
this
.
updateBy
=
updateBy
;
this
.
updateTime
=
updateTime
;
this
.
remark
=
remark
;
}
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
dest
.
writeString
(
unid
);
dest
.
writeString
(
cattleresumeId
);
dest
.
writeString
(
weight
);
dest
.
writeString
(
uploadStatus
);
dest
.
writeString
(
deptId
);
dest
.
writeString
(
searchValue
);
dest
.
writeString
(
createBy
);
dest
.
writeString
(
createTime
);
dest
.
writeString
(
updateBy
);
dest
.
writeString
(
updateTime
);
dest
.
writeString
(
remark
);
}
@Override
public
int
describeContents
()
{
return
0
;
}
public
static
final
Creator
<
WeightManEntity
>
CREATOR
=
new
Creator
<
WeightManEntity
>()
{
@Override
public
WeightManEntity
createFromParcel
(
Parcel
in
)
{
return
new
WeightManEntity
(
in
);
}
@Override
public
WeightManEntity
[]
newArray
(
int
size
)
{
return
new
WeightManEntity
[
size
];
}
};
public
String
getUnid
()
{
return
unid
;
}
public
void
setUnid
(
String
unid
)
{
this
.
unid
=
unid
;
}
public
String
getCattleresumeId
()
{
return
cattleresumeId
;
}
public
void
setCattleresumeId
(
String
cattleresumeId
)
{
this
.
cattleresumeId
=
cattleresumeId
;
}
public
String
getWeight
()
{
return
weight
;
}
public
void
setWeight
(
String
weight
)
{
this
.
weight
=
weight
;
}
public
String
getUploadStatus
()
{
return
uploadStatus
;
}
public
void
setUploadStatus
(
String
uploadStatus
)
{
this
.
uploadStatus
=
uploadStatus
;
}
public
String
getDeptId
()
{
return
deptId
;
}
public
void
setDeptId
(
String
deptId
)
{
this
.
deptId
=
deptId
;
}
public
String
getSearchValue
()
{
return
searchValue
;
}
public
void
setSearchValue
(
String
searchValue
)
{
this
.
searchValue
=
searchValue
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
String
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
String
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
String
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
@Override
public
String
toString
()
{
return
"WeightingEntity{"
+
"unid='"
+
unid
+
'\''
+
", cattleresumeId='"
+
cattleresumeId
+
'\''
+
", weight='"
+
weight
+
'\''
+
", uploadStatus='"
+
uploadStatus
+
'\''
+
", deptId='"
+
deptId
+
'\''
+
", searchValue='"
+
searchValue
+
'\''
+
", createBy='"
+
createBy
+
'\''
+
", createTime='"
+
createTime
+
'\''
+
", updateBy='"
+
updateBy
+
'\''
+
", updateTime='"
+
updateTime
+
'\''
+
", remark='"
+
remark
+
'\''
+
'}'
;
}
}
app/src/main/java/com/phlx/anchorcollect/entity/WeightingEntity.java
deleted
100644 → 0
View file @
429a4804
package
com
.
phlx
.
anchorcollect
.
entity
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
androidx.databinding.BaseObservable
;
import
org.greenrobot.greendao.annotation.Entity
;
import
org.greenrobot.greendao.annotation.Id
;
import
org.greenrobot.greendao.annotation.Generated
;
/**
* 称重管理类
*/
@Entity
public
class
WeightingEntity
extends
BaseObservable
implements
Parcelable
{
private
long
id
;
/**
* unid主键
*/
@Id
(
autoincrement
=
false
)
private
String
unid
;
/**
* 登记号
*/
private
String
RegistrationNo
;
/**
* 称重名称
*/
private
String
weightName
;
/**
* 重量
*/
private
String
weight
;
/**
* 称重日期
*/
private
String
weightingDate
;
/**
* 负责人
*/
private
String
principalName
;
/**
* 负责人id
*/
private
String
principalId
;
/**
* 圈号
*/
private
String
weightCount
;
/**
* 圈号
*/
private
String
circleNo
;
public
WeightingEntity
()
{
}
protected
WeightingEntity
(
Parcel
in
)
{
id
=
in
.
readLong
();
unid
=
in
.
readString
();
RegistrationNo
=
in
.
readString
();
weightName
=
in
.
readString
();
weight
=
in
.
readString
();
weightingDate
=
in
.
readString
();
principalName
=
in
.
readString
();
principalId
=
in
.
readString
();
weightCount
=
in
.
readString
();
circleNo
=
in
.
readString
();
}
@Generated
(
hash
=
1553460234
)
public
WeightingEntity
(
long
id
,
String
unid
,
String
RegistrationNo
,
String
weightName
,
String
weight
,
String
weightingDate
,
String
principalName
,
String
principalId
,
String
weightCount
,
String
circleNo
)
{
this
.
id
=
id
;
this
.
unid
=
unid
;
this
.
RegistrationNo
=
RegistrationNo
;
this
.
weightName
=
weightName
;
this
.
weight
=
weight
;
this
.
weightingDate
=
weightingDate
;
this
.
principalName
=
principalName
;
this
.
principalId
=
principalId
;
this
.
weightCount
=
weightCount
;
this
.
circleNo
=
circleNo
;
}
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
dest
.
writeLong
(
id
);
dest
.
writeString
(
unid
);
dest
.
writeString
(
RegistrationNo
);
dest
.
writeString
(
weightName
);
dest
.
writeString
(
weight
);
dest
.
writeString
(
weightingDate
);
dest
.
writeString
(
principalName
);
dest
.
writeString
(
principalId
);
dest
.
writeString
(
weightCount
);
dest
.
writeString
(
circleNo
);
}
@Override
public
int
describeContents
()
{
return
0
;
}
public
static
final
Creator
<
WeightingEntity
>
CREATOR
=
new
Creator
<
WeightingEntity
>()
{
@Override
public
WeightingEntity
createFromParcel
(
Parcel
in
)
{
return
new
WeightingEntity
(
in
);
}
@Override
public
WeightingEntity
[]
newArray
(
int
size
)
{
return
new
WeightingEntity
[
size
];
}
};
public
long
getId
()
{
return
id
;
}
public
void
setId
(
long
id
)
{
this
.
id
=
id
;
}
public
String
getUnid
()
{
return
unid
;
}
public
void
setUnid
(
String
unid
)
{
this
.
unid
=
unid
;
}
public
String
getRegistrationNo
()
{
return
RegistrationNo
;
}
public
void
setRegistrationNo
(
String
registrationNo
)
{
RegistrationNo
=
registrationNo
;
}
public
String
getWeightName
()
{
return
weightName
;
}
public
void
setWeightName
(
String
weightName
)
{
this
.
weightName
=
weightName
;
}
public
String
getWeight
()
{
return
weight
;
}
public
void
setWeight
(
String
weight
)
{
this
.
weight
=
weight
;
}
public
String
getWeightingDate
()
{
return
weightingDate
;
}
public
void
setWeightingDate
(
String
weightingDate
)
{
this
.
weightingDate
=
weightingDate
;
}
public
String
getPrincipalName
()
{
return
principalName
;
}
public
void
setPrincipalName
(
String
principalName
)
{
this
.
principalName
=
principalName
;
}
public
String
getPrincipalId
()
{
return
principalId
;
}
public
void
setPrincipalId
(
String
principalId
)
{
this
.
principalId
=
principalId
;
}
public
String
getWeightCount
()
{
return
weightCount
;
}
public
void
setWeightCount
(
String
weightCount
)
{
this
.
weightCount
=
weightCount
;
}
public
String
getCircleNo
()
{
return
circleNo
;
}
public
void
setCircleNo
(
String
circleNo
)
{
this
.
circleNo
=
circleNo
;
}
@Override
public
String
toString
()
{
return
"WeightingEntity{"
+
"id="
+
id
+
", unid='"
+
unid
+
'\''
+
", RegistrationNo='"
+
RegistrationNo
+
'\''
+
", weightName='"
+
weightName
+
'\''
+
", weight='"
+
weight
+
'\''
+
", weightingDate='"
+
weightingDate
+
'\''
+
", principalName='"
+
principalName
+
'\''
+
", principalId='"
+
principalId
+
'\''
+
", weightCount='"
+
weightCount
+
'\''
+
", circleNo='"
+
circleNo
+
'\''
+
'}'
;
}
}
app/src/main/java/com/phlx/anchorcollect/ui/fragment/BasicsCollectFragment.java
View file @
a4c6ad67
...
@@ -109,7 +109,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -109,7 +109,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
binding
.
tvWeighAdg
.
setTypeface
(
Configs
.
typeface
);
binding
.
tvWeighAdg
.
setTypeface
(
Configs
.
typeface
);
binding
.
tvWeighBwg
.
setTypeface
(
Configs
.
typeface
);
binding
.
tvWeighBwg
.
setTypeface
(
Configs
.
typeface
);
binding
.
rvCollect
.
addItemDecoration
(
new
SpaceItemDecoration
(
1
6
));
binding
.
rvCollect
.
addItemDecoration
(
new
SpaceItemDecoration
(
1
0
));
initTimePicker
();
initTimePicker
();
}
}
...
...
app/src/main/java/com/phlx/anchorcollect/ui/fragment/BreedingRecordFragment.java
View file @
a4c6ad67
...
@@ -96,8 +96,8 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
...
@@ -96,8 +96,8 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
viewModel
.
initGen
();
viewModel
.
initGen
();
binding
.
rvCollect
.
addItemDecoration
(
new
SpaceItemDecoration
(
1
6
));
binding
.
rvCollect
.
addItemDecoration
(
new
SpaceItemDecoration
(
1
0
));
binding
.
rvCollectDetail
.
addItemDecoration
(
new
SpaceItemDecoration
(
1
6
));
binding
.
rvCollectDetail
.
addItemDecoration
(
new
SpaceItemDecoration
(
1
0
));
initTimePicker
();
initTimePicker
();
...
...
app/src/main/java/com/phlx/anchorcollect/ui/fragment/PerformanceFragment.java
View file @
a4c6ad67
...
@@ -90,7 +90,7 @@ public class PerformanceFragment extends BaseFragment<FragmentPerformanceBinding
...
@@ -90,7 +90,7 @@ public class PerformanceFragment extends BaseFragment<FragmentPerformanceBinding
viewModel
.
initGen
();
viewModel
.
initGen
();
binding
.
rvCollect
.
addItemDecoration
(
new
SpaceItemDecoration
(
1
6
));
binding
.
rvCollect
.
addItemDecoration
(
new
SpaceItemDecoration
(
1
0
));
initTimePicker
();
initTimePicker
();
}
}
...
...
app/src/main/java/com/phlx/anchorcollect/ui/fragment/vm/CollectListVM.java
View file @
a4c6ad67
...
@@ -14,10 +14,8 @@ import com.phlx.anchorcollect.data.Repository;
...
@@ -14,10 +14,8 @@ import com.phlx.anchorcollect.data.Repository;
import
com.phlx.anchorcollect.db.DbUtil
;
import
com.phlx.anchorcollect.db.DbUtil
;
import
com.phlx.anchorcollect.db.interf.DbQueryCallBack
;
import
com.phlx.anchorcollect.db.interf.DbQueryCallBack
;
import
com.phlx.anchorcollect.entity.CardEntity
;
import
com.phlx.anchorcollect.entity.CardEntity
;
import
com.phlx.anchorcollect.entity.ImmuneEntity
;
import
com.phlx.anchorcollect.entity.MedicalEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.Weight
ing
Entity
;
import
com.phlx.anchorcollect.entity.Weight
Man
Entity
;
import
com.phlx.anchorcollect.ui.fragment.list.CollectItem
;
import
com.phlx.anchorcollect.ui.fragment.list.CollectItem
;
import
org.greenrobot.greendao.query.QueryBuilder
;
import
org.greenrobot.greendao.query.QueryBuilder
;
...
@@ -133,16 +131,16 @@ public class CollectListVM extends BaseViewModel<Repository> {
...
@@ -133,16 +131,16 @@ public class CollectListVM extends BaseViewModel<Repository> {
}
}
private
void
refreshWeight
()
{
private
void
refreshWeight
()
{
QueryBuilder
<
Weight
ing
Entity
>
builder
=
QueryBuilder
<
Weight
Man
Entity
>
builder
=
DbUtil
.
getInstance
().
getQueryBuilder
(
Weight
ing
Entity
.
class
);
DbUtil
.
getInstance
().
getQueryBuilder
(
Weight
Man
Entity
.
class
);
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
Weight
ing
Entity
>()
{
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
Weight
Man
Entity
>()
{
@Override
@Override
public
void
onSuccess
(
List
<
Weight
ing
Entity
>
result
)
{
public
void
onSuccess
(
List
<
Weight
Man
Entity
>
result
)
{
observableList
.
clear
();
observableList
.
clear
();
for
(
Weight
ing
Entity
ce
:
result
)
{
for
(
Weight
Man
Entity
ce
:
result
)
{
CollectItem
ci
=
new
CollectItem
(
CollectListVM
.
this
,
ce
.
getUnid
()
+
""
//
CollectItem ci = new CollectItem(CollectListVM.this, ce.getUnid() + ""
,
ce
.
getWeightName
(),
ce
.
getCircleNo
(),
ce
.
getWeightingDate
());
//
, ce.getWeightName(), ce.getCircleNo(), ce.getWeightingDate());
observableList
.
add
(
ci
);
//
observableList.add(ci);
}
}
}
}
...
@@ -150,7 +148,7 @@ public class CollectListVM extends BaseViewModel<Repository> {
...
@@ -150,7 +148,7 @@ public class CollectListVM extends BaseViewModel<Repository> {
public
void
onFailed
()
{
public
void
onFailed
()
{
ToastUtils
.
showShort
(
"称重管理数据库查询失败"
);
ToastUtils
.
showShort
(
"称重管理数据库查询失败"
);
}
}
}).
queryAsyncAll
(
Weight
ing
Entity
.
class
,
builder
);
}).
queryAsyncAll
(
Weight
Man
Entity
.
class
,
builder
);
}
}
private
void
refreshSign
()
{
private
void
refreshSign
()
{
...
@@ -175,44 +173,44 @@ public class CollectListVM extends BaseViewModel<Repository> {
...
@@ -175,44 +173,44 @@ public class CollectListVM extends BaseViewModel<Repository> {
}
}
private
void
refreshHealth
()
{
private
void
refreshHealth
()
{
QueryBuilder
<
MedicalEntity
>
builder
=
//
QueryBuilder<MedicalEntity> builder =
DbUtil
.
getInstance
().
getQueryBuilder
(
MedicalEntity
.
class
);
//
DbUtil.getInstance().getQueryBuilder(MedicalEntity.class);
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
MedicalEntity
>()
{
//
DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<MedicalEntity>() {
@Override
//
@Override
public
void
onSuccess
(
List
<
MedicalEntity
>
result
)
{
//
public void onSuccess(List<MedicalEntity> result) {
observableList
.
clear
();
//
observableList.clear();
for
(
MedicalEntity
ce
:
result
)
{
//
for (MedicalEntity ce : result) {
CollectItem
ci
=
new
CollectItem
(
CollectListVM
.
this
,
ce
.
getUnid
()
+
""
//
CollectItem ci = new CollectItem(CollectListVM.this, ce.getUnid() + ""
,
ce
.
getCauseOf
(),
ce
.
getDrugName
(),
ce
.
getTreatDate
());
//
, ce.getCauseOf(), ce.getDrugName(), ce.getTreatDate());
observableList
.
add
(
ci
);
//
observableList.add(ci);
}
//
}
}
//
}
//
@Override
//
@Override
public
void
onFailed
()
{
//
public void onFailed() {
ToastUtils
.
showShort
(
"健康管理数据库查询失败"
);
//
ToastUtils.showShort("健康管理数据库查询失败");
}
//
}
}).
queryAsyncAll
(
MedicalEntity
.
class
,
builder
);
//
}).queryAsyncAll(MedicalEntity.class, builder);
}
}
private
void
refreshImmun
()
{
private
void
refreshImmun
()
{
QueryBuilder
<
ImmuneEntity
>
builder
=
//
QueryBuilder<ImmuneEntity> builder =
DbUtil
.
getInstance
().
getQueryBuilder
(
ImmuneEntity
.
class
);
//
DbUtil.getInstance().getQueryBuilder(ImmuneEntity.class);
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
ImmuneEntity
>()
{
//
DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<ImmuneEntity>() {
@Override
//
@Override
public
void
onSuccess
(
List
<
ImmuneEntity
>
result
)
{
//
public void onSuccess(List<ImmuneEntity> result) {
observableList
.
clear
();
//
observableList.clear();
for
(
ImmuneEntity
ce
:
result
)
{
//
for (ImmuneEntity ce : result) {
CollectItem
ci
=
new
CollectItem
(
CollectListVM
.
this
,
ce
.
getUnid
()
+
""
//
CollectItem ci = new CollectItem(CollectListVM.this, ce.getUnid() + ""
,
ce
.
getVaccineName
(),
ce
.
getProductName
(),
ce
.
getImmuneDate
());
//
, ce.getVaccineName(), ce.getProductName(), ce.getImmuneDate());
observableList
.
add
(
ci
);
//
observableList.add(ci);
}
//
}
}
//
}
//
@Override
//
@Override
public
void
onFailed
()
{
//
public void onFailed() {
ToastUtils
.
showShort
(
"免疫管理数据库查询失败"
);
//
ToastUtils.showShort("免疫管理数据库查询失败");
}
//
}
}).
queryAsyncAll
(
ImmuneEntity
.
class
,
builder
);
//
}).queryAsyncAll(ImmuneEntity.class, builder);
}
}
}
}
app/src/main/java/com/phlx/anchorcollect/ui/fragment/vm/CollectVM.java
View file @
a4c6ad67
...
@@ -13,17 +13,12 @@ import com.phlx.anchorcollect.R;
...
@@ -13,17 +13,12 @@ import com.phlx.anchorcollect.R;
import
com.phlx.anchorcollect.data.Repository
;
import
com.phlx.anchorcollect.data.Repository
;
import
com.phlx.anchorcollect.db.DbUtil
;
import
com.phlx.anchorcollect.db.DbUtil
;
import
com.phlx.anchorcollect.db.gen.CardEntityDao
;
import
com.phlx.anchorcollect.db.gen.CardEntityDao
;
import
com.phlx.anchorcollect.db.gen.ImmuneEntityDao
;
import
com.phlx.anchorcollect.db.gen.MedicalEntityDao
;
import
com.phlx.anchorcollect.db.gen.WeightingEntityDao
;
import
com.phlx.anchorcollect.db.interf.DbIDUCallBack
;
import
com.phlx.anchorcollect.db.interf.DbIDUCallBack
;
import
com.phlx.anchorcollect.db.interf.DbQueryCallBack
;
import
com.phlx.anchorcollect.db.interf.DbQueryCallBack
;
import
com.phlx.anchorcollect.entity.CardEntity
;
import
com.phlx.anchorcollect.entity.CardEntity
;
import
com.phlx.anchorcollect.entity.ImmuneEntity
;
import
com.phlx.anchorcollect.entity.MedicalEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.UIParamEntity
;
import
com.phlx.anchorcollect.entity.UIParamEntity
;
import
com.phlx.anchorcollect.entity.Weight
ing
Entity
;
import
com.phlx.anchorcollect.entity.Weight
Man
Entity
;
import
com.phlx.anchorcollect.util.TextUtil
;
import
com.phlx.anchorcollect.util.TextUtil
;
import
org.greenrobot.greendao.query.QueryBuilder
;
import
org.greenrobot.greendao.query.QueryBuilder
;
...
@@ -219,37 +214,37 @@ public class CollectVM extends BaseViewModel<Repository> {
...
@@ -219,37 +214,37 @@ public class CollectVM extends BaseViewModel<Repository> {
* 称重管理-查询数据库
* 称重管理-查询数据库
*/
*/
private
void
queryWeight
(
String
tag
)
{
private
void
queryWeight
(
String
tag
)
{
QueryBuilder
<
Weighting
Entity
>
builder
=
// QueryBuilder<WeightMan
Entity> builder =
DbUtil
.
getInstance
().
getQueryBuilder
(
Weighting
Entity
.
class
).
where
(
WeightingEntityDao
.
Properties
.
RegistrationNo
.
eq
(
tag
));
// DbUtil.getInstance().getQueryBuilder(WeightMan
Entity.class).where(WeightingEntityDao.Properties.RegistrationNo.eq(tag));
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
Weighting
Entity
>()
{
// DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<WeightMan
Entity>() {
@Override
//
@Override
public
void
onSuccess
(
List
<
Weighting
Entity
>
result
)
{
// public void onSuccess(List<WeightMan
Entity> result) {
//
if
(
result
!=
null
&&
result
.
size
()
>
0
)
{
//
if (result != null && result.size() > 0) {
uiList
.
get
(
0
).
setValue
(
result
.
get
(
0
).
getWeightName
());
//
uiList.get(0).setValue(result.get(0).getWeightName());
uiList
.
get
(
0
).
setName
(
result
.
get
(
0
).
getWeightName
());
//
uiList.get(0).setName(result.get(0).getWeightName());
uiList
.
get
(
1
).
setValue
(
result
.
get
(
0
).
getWeightingDate
());
//
uiList.get(1).setValue(result.get(0).getWeightingDate());
uiList
.
get
(
1
).
setName
(
result
.
get
(
0
).
getWeightingDate
());
//
uiList.get(1).setName(result.get(0).getWeightingDate());
uiList
.
get
(
2
).
setValue
(
result
.
get
(
0
).
getPrincipalName
());
//
uiList.get(2).setValue(result.get(0).getPrincipalName());
uiList
.
get
(
2
).
setName
(
result
.
get
(
0
).
getPrincipalName
());
//
uiList.get(2).setName(result.get(0).getPrincipalName());
uiList
.
get
(
3
).
setValue
(
result
.
get
(
0
).
getWeightCount
());
//
uiList.get(3).setValue(result.get(0).getWeightCount());
uiList
.
get
(
3
).
setName
(
result
.
get
(
0
).
getWeightCount
());
//
uiList.get(3).setName(result.get(0).getWeightCount());
uiList
.
get
(
4
).
setValue
(
result
.
get
(
0
).
getCircleNo
());
//
uiList.get(4).setValue(result.get(0).getCircleNo());
uiList
.
get
(
4
).
setName
(
result
.
get
(
0
).
getCircleNo
());
//
uiList.get(4).setName(result.get(0).getCircleNo());
onNotifyAllEvent
.
setValue
(
false
);
//
onNotifyAllEvent.setValue(false);
}
else
{
//
} else {
onNotifyAllEvent
.
setValue
(
true
);
//
onNotifyAllEvent.setValue(true);
}
//
}
//
Configs
.
tempTag
=
""
;
//
Configs.tempTag = "";
}
//
}
//
@Override
//
@Override
public
void
onFailed
()
{
//
public void onFailed() {
Configs
.
tempTag
=
""
;
//
Configs.tempTag = "";
ToastUtils
.
showShort
(
"称重管理数据库查询失败"
);
//
ToastUtils.showShort("称重管理数据库查询失败");
}
//
}
}).
queryAsyncAll
(
Weighting
Entity
.
class
,
builder
);
// }).queryAsyncAll(WeightMan
Entity.class, builder);
}
}
/**
/**
...
@@ -309,90 +304,90 @@ public class CollectVM extends BaseViewModel<Repository> {
...
@@ -309,90 +304,90 @@ public class CollectVM extends BaseViewModel<Repository> {
* 健康管理-查询数据库
* 健康管理-查询数据库
*/
*/
private
void
queryHealth
(
String
tag
)
{
private
void
queryHealth
(
String
tag
)
{
QueryBuilder
<
MedicalEntity
>
builder
=
//
QueryBuilder<MedicalEntity> builder =
DbUtil
.
getInstance
().
getQueryBuilder
(
MedicalEntity
.
class
).
where
(
MedicalEntityDao
.
Properties
.
RegistrationNo
.
eq
(
tag
));
//
DbUtil.getInstance().getQueryBuilder(MedicalEntity.class).where(MedicalEntityDao.Properties.RegistrationNo.eq(tag));
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
MedicalEntity
>()
{
//
DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<MedicalEntity>() {
@Override
//
@Override
public
void
onSuccess
(
List
<
MedicalEntity
>
result
)
{
//
public void onSuccess(List<MedicalEntity> result) {
//
if
(
result
!=
null
&&
result
.
size
()
>
0
)
{
//
if (result != null && result.size() > 0) {
uiList
.
get
(
0
).
setValue
(
result
.
get
(
0
).
getTreatDate
());
//
uiList.get(0).setValue(result.get(0).getTreatDate());
uiList
.
get
(
0
).
setName
(
result
.
get
(
0
).
getTreatDate
());
//
uiList.get(0).setName(result.get(0).getTreatDate());
uiList
.
get
(
1
).
setValue
(
result
.
get
(
0
).
getTreatPersonnel
());
//
uiList.get(1).setValue(result.get(0).getTreatPersonnel());
uiList
.
get
(
1
).
setName
(
result
.
get
(
0
).
getTreatPersonnel
());
//
uiList.get(1).setName(result.get(0).getTreatPersonnel());
uiList
.
get
(
2
).
setValue
(
result
.
get
(
0
).
getCauseOf
());
//
uiList.get(2).setValue(result.get(0).getCauseOf());
uiList
.
get
(
2
).
setName
(
result
.
get
(
0
).
getCauseOf
());
//
uiList.get(2).setName(result.get(0).getCauseOf());
uiList
.
get
(
3
).
setValue
(
result
.
get
(
0
).
getDrugName
());
//
uiList.get(3).setValue(result.get(0).getDrugName());
uiList
.
get
(
3
).
setName
(
result
.
get
(
0
).
getDrugName
());
//
uiList.get(3).setName(result.get(0).getDrugName());
uiList
.
get
(
4
).
setValue
(
result
.
get
(
0
).
getSpecifications
());
//
uiList.get(4).setValue(result.get(0).getSpecifications());
uiList
.
get
(
4
).
setName
(
result
.
get
(
0
).
getSpecifications
());
//
uiList.get(4).setName(result.get(0).getSpecifications());
uiList
.
get
(
5
).
setValue
(
result
.
get
(
0
).
getDrugMethods
());
//
uiList.get(5).setValue(result.get(0).getDrugMethods());
uiList
.
get
(
5
).
setName
(
result
.
get
(
0
).
getDrugMethods
());
//
uiList.get(5).setName(result.get(0).getDrugMethods());
uiList
.
get
(
6
).
setValue
(
result
.
get
(
0
).
getNumber
());
//
uiList.get(6).setValue(result.get(0).getNumber());
uiList
.
get
(
6
).
setName
(
result
.
get
(
0
).
getNumber
());
//
uiList.get(6).setName(result.get(0).getNumber());
uiList
.
get
(
7
).
setValue
(
result
.
get
(
0
).
getHoofDisease
());
//
uiList.get(7).setValue(result.get(0).getHoofDisease());
uiList
.
get
(
7
).
setName
(
result
.
get
(
0
).
getHoofDisease
());
//
uiList.get(7).setName(result.get(0).getHoofDisease());
uiList
.
get
(
8
).
setValue
(
result
.
get
(
0
).
getInsecticide
());
//
uiList.get(8).setValue(result.get(0).getInsecticide());
uiList
.
get
(
8
).
setName
(
result
.
get
(
0
).
getInsecticide
());
//
uiList.get(8).setName(result.get(0).getInsecticide());
onNotifyAllEvent
.
setValue
(
false
);
//
onNotifyAllEvent.setValue(false);
}
else
{
//
} else {
onNotifyAllEvent
.
setValue
(
true
);
//
onNotifyAllEvent.setValue(true);
}
//
}
//
Configs
.
tempTag
=
""
;
//
Configs.tempTag = "";
}
//
}
//
@Override
//
@Override
public
void
onFailed
()
{
//
public void onFailed() {
Configs
.
tempTag
=
""
;
//
Configs.tempTag = "";
ToastUtils
.
showShort
(
"健康管理数据库查询失败"
);
//
ToastUtils.showShort("健康管理数据库查询失败");
}
//
}
}).
queryAsyncAll
(
MedicalEntity
.
class
,
builder
);
//
}).queryAsyncAll(MedicalEntity.class, builder);
}
}
/**
/**
* 免疫管理-查询数据库
* 免疫管理-查询数据库
*/
*/
private
void
queryImmun
(
String
tag
)
{
private
void
queryImmun
(
String
tag
)
{
QueryBuilder
<
ImmuneEntity
>
builder
=
//
QueryBuilder<ImmuneEntity> builder =
DbUtil
.
getInstance
().
getQueryBuilder
(
ImmuneEntity
.
class
).
where
(
ImmuneEntityDao
.
Properties
.
RegistrationNo
.
eq
(
tag
));
//
DbUtil.getInstance().getQueryBuilder(ImmuneEntity.class).where(ImmuneEntityDao.Properties.RegistrationNo.eq(tag));
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
ImmuneEntity
>()
{
//
DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<ImmuneEntity>() {
@Override
//
@Override
public
void
onSuccess
(
List
<
ImmuneEntity
>
result
)
{
//
public void onSuccess(List<ImmuneEntity> result) {
//
if
(
result
!=
null
&&
result
.
size
()
>
0
)
{
//
if (result != null && result.size() > 0) {
uiList
.
get
(
0
).
setValue
(
result
.
get
(
0
).
getImmuneDate
());
//
uiList.get(0).setValue(result.get(0).getImmuneDate());
uiList
.
get
(
0
).
setName
(
result
.
get
(
0
).
getImmuneDate
());
//
uiList.get(0).setName(result.get(0).getImmuneDate());
uiList
.
get
(
1
).
setValue
(
result
.
get
(
0
).
getVaccineName
());
//
uiList.get(1).setValue(result.get(0).getVaccineName());
uiList
.
get
(
1
).
setName
(
result
.
get
(
0
).
getVaccineName
());
//
uiList.get(1).setName(result.get(0).getVaccineName());
uiList
.
get
(
2
).
setValue
(
result
.
get
(
0
).
getImmunePerson
());
//
uiList.get(2).setValue(result.get(0).getImmunePerson());
uiList
.
get
(
2
).
setName
(
result
.
get
(
0
).
getImmunePerson
());
//
uiList.get(2).setName(result.get(0).getImmunePerson());
uiList
.
get
(
3
).
setValue
(
result
.
get
(
0
).
getCircleNo
());
//
uiList.get(3).setValue(result.get(0).getCircleNo());
uiList
.
get
(
3
).
setName
(
result
.
get
(
0
).
getCircleNo
());
//
uiList.get(3).setName(result.get(0).getCircleNo());
uiList
.
get
(
4
).
setValue
(
result
.
get
(
0
).
getProductName
());
//
uiList.get(4).setValue(result.get(0).getProductName());
uiList
.
get
(
4
).
setName
(
result
.
get
(
0
).
getProductName
());
//
uiList.get(4).setName(result.get(0).getProductName());
uiList
.
get
(
5
).
setValue
(
result
.
get
(
0
).
getLotnumber
());
//
uiList.get(5).setValue(result.get(0).getLotnumber());
uiList
.
get
(
5
).
setName
(
result
.
get
(
0
).
getLotnumber
());
//
uiList.get(5).setName(result.get(0).getLotnumber());
uiList
.
get
(
6
).
setValue
(
result
.
get
(
0
).
getSpecifications
());
//
uiList.get(6).setValue(result.get(0).getSpecifications());
uiList
.
get
(
6
).
setName
(
result
.
get
(
0
).
getSpecifications
());
//
uiList.get(6).setName(result.get(0).getSpecifications());
uiList
.
get
(
7
).
setValue
(
result
.
get
(
0
).
getImmuneDosage
());
//
uiList.get(7).setValue(result.get(0).getImmuneDosage());
uiList
.
get
(
7
).
setName
(
result
.
get
(
0
).
getImmuneDosage
());
//
uiList.get(7).setName(result.get(0).getImmuneDosage());
uiList
.
get
(
8
).
setValue
(
result
.
get
(
0
).
getImmuneMethod
());
//
uiList.get(8).setValue(result.get(0).getImmuneMethod());
uiList
.
get
(
8
).
setName
(
result
.
get
(
0
).
getImmuneMethod
());
//
uiList.get(8).setName(result.get(0).getImmuneMethod());
onNotifyAllEvent
.
setValue
(
false
);
//
onNotifyAllEvent.setValue(false);
}
else
{
//
} else {
onNotifyAllEvent
.
setValue
(
true
);
//
onNotifyAllEvent.setValue(true);
}
//
}
//
Configs
.
tempTag
=
""
;
//
Configs.tempTag = "";
}
//
}
//
@Override
//
@Override
public
void
onFailed
()
{
//
public void onFailed() {
Configs
.
tempTag
=
""
;
//
Configs.tempTag = "";
ToastUtils
.
showShort
(
"免疫管理数据库查询失败"
);
//
ToastUtils.showShort("免疫管理数据库查询失败");
}
//
}
}).
queryAsyncAll
(
ImmuneEntity
.
class
,
builder
);
//
}).queryAsyncAll(ImmuneEntity.class, builder);
}
}
/* ===========================查询数据库 页面赋值结束================================= */
/* ===========================查询数据库 页面赋值结束================================= */
...
@@ -459,17 +454,17 @@ public class CollectVM extends BaseViewModel<Repository> {
...
@@ -459,17 +454,17 @@ public class CollectVM extends BaseViewModel<Repository> {
*/
*/
private
void
saveWeight
()
{
private
void
saveWeight
()
{
List
<
Weight
ing
Entity
>
uploadData
=
new
ArrayList
<>();
List
<
Weight
Man
Entity
>
uploadData
=
new
ArrayList
<>();
Weight
ingEntity
_entity
=
new
Weighting
Entity
();
Weight
ManEntity
_entity
=
new
WeightMan
Entity
();
_entity
.
setUnid
(
tag
.
get
());
//
_entity.setUnid(tag.get());
_entity
.
setRegistrationNo
(
tag
.
get
());
//
_entity.setRegistrationNo(tag.get());
_entity
.
setWeight
(
"125.5"
);
//
_entity.setWeight("125.5");
_entity
.
setWeightName
(
uiList
.
get
(
0
).
getValue
());
//
_entity.setWeightName(uiList.get(0).getValue());
_entity
.
setWeightingDate
(
uiList
.
get
(
1
).
getValue
());
//
_entity.setWeightingDate(uiList.get(1).getValue());
_entity
.
setPrincipalName
(
uiList
.
get
(
2
).
getValue
());
//
_entity.setPrincipalName(uiList.get(2).getValue());
_entity
.
setWeightCount
(
uiList
.
get
(
3
).
getValue
());
//
_entity.setWeightCount(uiList.get(3).getValue());
_entity
.
setCircleNo
(
uiList
.
get
(
4
).
getValue
());
//
_entity.setCircleNo(uiList.get(4).getValue());
uploadData
.
add
(
_entity
);
uploadData
.
add
(
_entity
);
...
@@ -486,7 +481,7 @@ public class CollectVM extends BaseViewModel<Repository> {
...
@@ -486,7 +481,7 @@ public class CollectVM extends BaseViewModel<Repository> {
ToastUtils
.
showShort
(
"称重管理保存失败"
);
ToastUtils
.
showShort
(
"称重管理保存失败"
);
}
}
}
}
}).
insertAsyncBatch
(
Weight
ing
Entity
.
class
,
uploadData
);
}).
insertAsyncBatch
(
Weight
Man
Entity
.
class
,
uploadData
);
}
}
...
@@ -539,38 +534,38 @@ public class CollectVM extends BaseViewModel<Repository> {
...
@@ -539,38 +534,38 @@ public class CollectVM extends BaseViewModel<Repository> {
*/
*/
private
void
saveHealth
()
{
private
void
saveHealth
()
{
List
<
MedicalEntity
>
uploadData
=
new
ArrayList
<>();
//
List<MedicalEntity> uploadData = new ArrayList<>();
//
MedicalEntity
_entity
=
new
MedicalEntity
();
//
MedicalEntity _entity = new MedicalEntity();
_entity
.
setUnid
(
tag
.
get
());
//
_entity.setUnid(tag.get());
_entity
.
setRegistrationNo
(
tag
.
get
());
//
_entity.setRegistrationNo(tag.get());
// _entity.setBirthHeavy(weight.get());
//
//
_entity.setBirthHeavy(weight.get());
_entity
.
setTreatDate
(
uiList
.
get
(
0
).
getValue
());
//
_entity.setTreatDate(uiList.get(0).getValue());
_entity
.
setTreatPersonnel
(
uiList
.
get
(
1
).
getValue
());
//
_entity.setTreatPersonnel(uiList.get(1).getValue());
_entity
.
setCauseOf
(
uiList
.
get
(
2
).
getValue
());
//
_entity.setCauseOf(uiList.get(2).getValue());
_entity
.
setDrugName
(
uiList
.
get
(
3
).
getValue
());
//
_entity.setDrugName(uiList.get(3).getValue());
_entity
.
setSpecifications
(
uiList
.
get
(
4
).
getValue
());
//
_entity.setSpecifications(uiList.get(4).getValue());
_entity
.
setDrugMethods
(
uiList
.
get
(
5
).
getValue
());
//
_entity.setDrugMethods(uiList.get(5).getValue());
_entity
.
setNumber
(
uiList
.
get
(
6
).
getValue
());
//
_entity.setNumber(uiList.get(6).getValue());
_entity
.
setHoofDisease
(
uiList
.
get
(
7
).
getValue
());
//
_entity.setHoofDisease(uiList.get(7).getValue());
_entity
.
setInsecticide
(
uiList
.
get
(
8
).
getValue
());
//
_entity.setInsecticide(uiList.get(8).getValue());
//
uploadData
.
add
(
_entity
);
//
uploadData.add(_entity);
//
showDialog
(
"正在保存本地..."
);
//
showDialog("正在保存本地...");
DbUtil
.
getInstance
().
setDbIDUCallBack
(
new
DbIDUCallBack
()
{
//
DbUtil.getInstance().setDbIDUCallBack(new DbIDUCallBack() {
@Override
//
@Override
public
void
onNotification
(
boolean
result
)
{
//
public void onNotification(boolean result) {
dismissDialog
();
//
dismissDialog();
if
(
result
)
{
//
if (result) {
ToastUtils
.
showShort
(
"健康管理保存成功"
);
//
ToastUtils.showShort("健康管理保存成功");
tag
.
set
(
""
);
//
tag.set("");
onNotifyAllEvent
.
setValue
(
true
);
//
onNotifyAllEvent.setValue(true);
}
else
{
//
} else {
ToastUtils
.
showShort
(
"健康管理保存失败"
);
//
ToastUtils.showShort("健康管理保存失败");
}
//
}
}
//
}
}).
insertAsyncBatch
(
MedicalEntity
.
class
,
uploadData
);
//
}).insertAsyncBatch(MedicalEntity.class, uploadData);
}
}
...
@@ -579,38 +574,38 @@ public class CollectVM extends BaseViewModel<Repository> {
...
@@ -579,38 +574,38 @@ public class CollectVM extends BaseViewModel<Repository> {
*/
*/
private
void
saveImmun
()
{
private
void
saveImmun
()
{
List
<
ImmuneEntity
>
uploadData
=
new
ArrayList
<>();
//
List<ImmuneEntity> uploadData = new ArrayList<>();
//
ImmuneEntity
_entity
=
new
ImmuneEntity
();
//
ImmuneEntity _entity = new ImmuneEntity();
_entity
.
setUnid
(
tag
.
get
());
//
_entity.setUnid(tag.get());
_entity
.
setRegistrationNo
(
tag
.
get
());
//
_entity.setRegistrationNo(tag.get());
// _cardEntity.setBirthHeavy(weight.get());
//
//
_cardEntity.setBirthHeavy(weight.get());
_entity
.
setImmuneDate
(
uiList
.
get
(
0
).
getValue
());
//
_entity.setImmuneDate(uiList.get(0).getValue());
_entity
.
setVaccineName
(
uiList
.
get
(
1
).
getValue
());
//
_entity.setVaccineName(uiList.get(1).getValue());
_entity
.
setImmunePerson
(
uiList
.
get
(
2
).
getValue
());
//
_entity.setImmunePerson(uiList.get(2).getValue());
_entity
.
setCircleNo
(
uiList
.
get
(
3
).
getValue
());
//
_entity.setCircleNo(uiList.get(3).getValue());
_entity
.
setProductName
(
uiList
.
get
(
4
).
getValue
());
//
_entity.setProductName(uiList.get(4).getValue());
_entity
.
setLotnumber
(
uiList
.
get
(
5
).
getValue
());
//
_entity.setLotnumber(uiList.get(5).getValue());
_entity
.
setSpecifications
(
uiList
.
get
(
6
).
getValue
());
//
_entity.setSpecifications(uiList.get(6).getValue());
_entity
.
setImmuneDosage
(
uiList
.
get
(
7
).
getValue
());
//
_entity.setImmuneDosage(uiList.get(7).getValue());
_entity
.
setImmuneMethod
(
uiList
.
get
(
8
).
getValue
());
//
_entity.setImmuneMethod(uiList.get(8).getValue());
//
uploadData
.
add
(
_entity
);
//
uploadData.add(_entity);
//
showDialog
(
"正在保存本地..."
);
//
showDialog("正在保存本地...");
DbUtil
.
getInstance
().
setDbIDUCallBack
(
new
DbIDUCallBack
()
{
//
DbUtil.getInstance().setDbIDUCallBack(new DbIDUCallBack() {
@Override
//
@Override
public
void
onNotification
(
boolean
result
)
{
//
public void onNotification(boolean result) {
dismissDialog
();
//
dismissDialog();
if
(
result
)
{
//
if (result) {
ToastUtils
.
showShort
(
"免疫管理保存成功"
);
//
ToastUtils.showShort("免疫管理保存成功");
tag
.
set
(
""
);
//
tag.set("");
onNotifyAllEvent
.
setValue
(
true
);
//
onNotifyAllEvent.setValue(true);
}
else
{
//
} else {
ToastUtils
.
showShort
(
"免疫管理保存失败"
);
//
ToastUtils.showShort("免疫管理保存失败");
}
//
}
}
//
}
}).
insertAsyncBatch
(
ImmuneEntity
.
class
,
uploadData
);
//
}).insertAsyncBatch(ImmuneEntity.class, uploadData);
}
}
...
...
app/src/main/java/com/phlx/anchorcollect/ui/info/CattleItem.java
View file @
a4c6ad67
...
@@ -3,16 +3,7 @@ package com.phlx.anchorcollect.ui.info;
...
@@ -3,16 +3,7 @@ package com.phlx.anchorcollect.ui.info;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
import
androidx.databinding.ObservableField
;
import
androidx.databinding.ObservableField
;
import
com.phlx.anchorcollect.Configs
;
import
com.phlx.anchorcollect.entity.CardEntity
;
import
com.phlx.anchorcollect.entity.ImmuneEntity
;
import
com.phlx.anchorcollect.entity.MedicalEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.ui.fragment.vm.CollectListVM
;
import
me.goldze.mvvmhabit.base.ItemViewModel
;
import
me.goldze.mvvmhabit.base.ItemViewModel
;
import
me.goldze.mvvmhabit.binding.command.BindingAction
;
import
me.goldze.mvvmhabit.binding.command.BindingCommand
;
public
class
CattleItem
extends
ItemViewModel
<
CattleVM
>
{
public
class
CattleItem
extends
ItemViewModel
<
CattleVM
>
{
...
...
app/src/main/java/com/phlx/anchorcollect/ui/info/CattleVM.java
View file @
a4c6ad67
...
@@ -5,30 +5,21 @@ import android.view.View;
...
@@ -5,30 +5,21 @@ import android.view.View;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
import
androidx.databinding.ObservableArrayList
;
import
androidx.databinding.ObservableArrayList
;
import
androidx.databinding.ObservableField
;
import
androidx.databinding.ObservableList
;
import
androidx.databinding.ObservableList
;
import
com.phlx.anchorcollect.BR
;
import
com.phlx.anchorcollect.BR
;
import
com.phlx.anchorcollect.Configs
;
import
com.phlx.anchorcollect.R
;
import
com.phlx.anchorcollect.R
;
import
com.phlx.anchorcollect.data.Repository
;
import
com.phlx.anchorcollect.data.Repository
;
import
com.phlx.anchorcollect.db.DbUtil
;
import
com.phlx.anchorcollect.db.DbUtil
;
import
com.phlx.anchorcollect.db.interf.DbQueryCallBack
;
import
com.phlx.anchorcollect.db.interf.DbQueryCallBack
;
import
com.phlx.anchorcollect.entity.CardEntity
;
import
com.phlx.anchorcollect.entity.CardEntity
;
import
com.phlx.anchorcollect.entity.ImmuneEntity
;
import
com.phlx.anchorcollect.entity.MedicalEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.WeightingEntity
;
import
com.phlx.anchorcollect.ui.base.BackBarVM
;
import
com.phlx.anchorcollect.ui.base.BackBarVM
;
import
com.phlx.anchorcollect.ui.fragment.list.CollectItem
;
import
org.greenrobot.greendao.query.QueryBuilder
;
import
org.greenrobot.greendao.query.WhereCondition
;
import
org.greenrobot.greendao.query.WhereCondition
;
import
java.util.List
;
import
java.util.List
;
import
me.goldze.mvvmhabit.base.BaseViewModel
;
import
me.goldze.mvvmhabit.bus.event.SingleLiveEvent
;
import
me.goldze.mvvmhabit.utils.ToastUtils
;
import
me.goldze.mvvmhabit.utils.ToastUtils
;
import
me.tatarka.bindingcollectionadapter2.ItemBinding
;
import
me.tatarka.bindingcollectionadapter2.ItemBinding
;
...
@@ -124,54 +115,54 @@ public class CattleVM extends BackBarVM<Repository> {
...
@@ -124,54 +115,54 @@ public class CattleVM extends BackBarVM<Repository> {
}
}
private
void
refreshHealth
()
{
private
void
refreshHealth
()
{
String
sql
=
(
"REGISTRATION_NO IN "
+
//
String sql = ("REGISTRATION_NO IN " +
"(SELECT REGISTRATION_NO FROM MEDICAL_ENTITY WHERE REGISTRATION_NO ="
+
registrationNo
+
" )"
);
//
"(SELECT REGISTRATION_NO FROM MEDICAL_ENTITY WHERE REGISTRATION_NO =" + registrationNo + " )");
WhereCondition
.
StringCondition
stringCondition
=
new
WhereCondition
.
StringCondition
(
sql
);
//
WhereCondition.StringCondition stringCondition = new WhereCondition.StringCondition(sql);
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
MedicalEntity
>()
{
//
DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<MedicalEntity>() {
@Override
//
@Override
public
void
onSuccess
(
List
<
MedicalEntity
>
result
)
{
//
public void onSuccess(List<MedicalEntity> result) {
observableHealthyList
.
clear
();
//
observableHealthyList.clear();
if
(
result
.
size
()
>
0
)
{
//
if (result.size() > 0) {
MedicalEntity
medicalEntity
=
result
.
get
(
0
);
//
MedicalEntity medicalEntity = result.get(0);
observableHealthyList
.
add
(
new
CattleItem
(
CattleVM
.
this
,
"日期"
,
medicalEntity
.
getTreatDate
()));
//
observableHealthyList.add(new CattleItem(CattleVM.this, "日期", medicalEntity.getTreatDate()));
observableHealthyList
.
add
(
new
CattleItem
(
CattleVM
.
this
,
"病因"
,
medicalEntity
.
getCauseOf
()));
//
observableHealthyList.add(new CattleItem(CattleVM.this, "病因", medicalEntity.getCauseOf()));
observableHealthyList
.
add
(
new
CattleItem
(
CattleVM
.
this
,
"用药"
,
medicalEntity
.
getDrugName
()));
//
observableHealthyList.add(new CattleItem(CattleVM.this, "用药", medicalEntity.getDrugName()));
observableHealthyList
.
add
(
new
CattleItem
(
CattleVM
.
this
,
"方法"
,
medicalEntity
.
getDrugMethods
()));
//
observableHealthyList.add(new CattleItem(CattleVM.this, "方法", medicalEntity.getDrugMethods()));
observableHealthyList
.
add
(
new
CattleItem
(
CattleVM
.
this
,
"兽医"
,
medicalEntity
.
getTreatPersonnel
()));
//
observableHealthyList.add(new CattleItem(CattleVM.this, "兽医", medicalEntity.getTreatPersonnel()));
}
//
}
refreshImmunity
();
//
refreshImmunity();
}
//
}
//
@Override
//
@Override
public
void
onFailed
()
{
//
public void onFailed() {
ToastUtils
.
showShort
(
"健康管理数据库查询失败"
);
//
ToastUtils.showShort("健康管理数据库查询失败");
refreshImmunity
();
//
refreshImmunity();
}
//
}
}).
queryAsync
(
MedicalEntity
.
class
,
stringCondition
);
//
}).queryAsync(MedicalEntity.class, stringCondition);
}
}
private
void
refreshImmunity
()
{
private
void
refreshImmunity
()
{
String
sql
=
(
"REGISTRATION_NO IN "
+
String
sql
=
(
"REGISTRATION_NO IN "
+
"(SELECT REGISTRATION_NO FROM IMMUNE_ENTITY WHERE REGISTRATION_NO ="
+
registrationNo
+
" )"
);
"(SELECT REGISTRATION_NO FROM IMMUNE_ENTITY WHERE REGISTRATION_NO ="
+
registrationNo
+
" )"
);
WhereCondition
.
StringCondition
stringCondition
=
new
WhereCondition
.
StringCondition
(
sql
);
WhereCondition
.
StringCondition
stringCondition
=
new
WhereCondition
.
StringCondition
(
sql
);
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
ImmuneEntity
>()
{
//
DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<ImmuneEntity>() {
@Override
//
@Override
public
void
onSuccess
(
List
<
ImmuneEntity
>
result
)
{
//
public void onSuccess(List<ImmuneEntity> result) {
observableImmunityList
.
clear
();
//
observableImmunityList.clear();
if
(
result
.
size
()
>
0
)
{
//
if (result.size() > 0) {
ImmuneEntity
immuneEntity
=
result
.
get
(
0
);
//
ImmuneEntity immuneEntity = result.get(0);
observableImmunityList
.
add
(
new
CattleItem
(
CattleVM
.
this
,
"日期"
,
immuneEntity
.
getImmuneDate
()));
//
observableImmunityList.add(new CattleItem(CattleVM.this, "日期", immuneEntity.getImmuneDate()));
observableImmunityList
.
add
(
new
CattleItem
(
CattleVM
.
this
,
"名称"
,
immuneEntity
.
getImmuneDosage
()));
//
observableImmunityList.add(new CattleItem(CattleVM.this, "名称", immuneEntity.getImmuneDosage()));
observableImmunityList
.
add
(
new
CattleItem
(
CattleVM
.
this
,
"批号"
,
immuneEntity
.
getLotnumber
()));
//
observableImmunityList.add(new CattleItem(CattleVM.this, "批号", immuneEntity.getLotnumber()));
observableImmunityList
.
add
(
new
CattleItem
(
CattleVM
.
this
,
"兽医"
,
immuneEntity
.
getImmunePerson
()));
//
observableImmunityList.add(new CattleItem(CattleVM.this, "兽医", immuneEntity.getImmunePerson()));
}
//
}
}
//
}
//
@Override
//
@Override
public
void
onFailed
()
{
//
public void onFailed() {
ToastUtils
.
showShort
(
"免疫管理数据库查询失败"
);
//
ToastUtils.showShort("免疫管理数据库查询失败");
}
//
}
}).
queryAsync
(
ImmuneEntity
.
class
,
stringCondition
);
//
}).queryAsync(ImmuneEntity.class, stringCondition);
}
}
...
...
app/src/main/java/com/phlx/anchorcollect/ui/setting/SettingVM.java
View file @
a4c6ad67
...
@@ -29,13 +29,19 @@ import com.phlx.anchorcollect.data.Repository;
...
@@ -29,13 +29,19 @@ import com.phlx.anchorcollect.data.Repository;
import
com.phlx.anchorcollect.db.DbUtil
;
import
com.phlx.anchorcollect.db.DbUtil
;
import
com.phlx.anchorcollect.db.gen.BreedingRecordDetailEntityDao
;
import
com.phlx.anchorcollect.db.gen.BreedingRecordDetailEntityDao
;
import
com.phlx.anchorcollect.db.gen.BreedingRecordEntityDao
;
import
com.phlx.anchorcollect.db.gen.BreedingRecordEntityDao
;
import
com.phlx.anchorcollect.db.gen.ImmuneBatchEntityDao
;
import
com.phlx.anchorcollect.db.gen.MedicalRecordEntityDao
;
import
com.phlx.anchorcollect.db.gen.PerformanceEntityDao
;
import
com.phlx.anchorcollect.db.gen.PerformanceEntityDao
;
import
com.phlx.anchorcollect.db.gen.WeightManEntityDao
;
import
com.phlx.anchorcollect.db.interf.DbIDUCallBack
;
import
com.phlx.anchorcollect.db.interf.DbIDUCallBack
;
import
com.phlx.anchorcollect.db.interf.DbQueryCallBack
;
import
com.phlx.anchorcollect.db.interf.DbQueryCallBack
;
import
com.phlx.anchorcollect.entity.BreedingRecordDetailEntity
;
import
com.phlx.anchorcollect.entity.BreedingRecordDetailEntity
;
import
com.phlx.anchorcollect.entity.BreedingRecordEntity
;
import
com.phlx.anchorcollect.entity.BreedingRecordEntity
;
import
com.phlx.anchorcollect.entity.CattleResumeEntity
;
import
com.phlx.anchorcollect.entity.CattleResumeEntity
;
import
com.phlx.anchorcollect.entity.ImmuneBatchEntity
;
import
com.phlx.anchorcollect.entity.MedicalRecordEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.WeightManEntity
;
import
com.phlx.anchorcollect.params.CollectResponse
;
import
com.phlx.anchorcollect.params.CollectResponse
;
import
com.phlx.anchorcollect.params.ListResponse
;
import
com.phlx.anchorcollect.params.ListResponse
;
import
com.phlx.anchorcollect.rfid.InventoryManger
;
import
com.phlx.anchorcollect.rfid.InventoryManger
;
...
@@ -236,21 +242,21 @@ public class SettingVM extends BaseViewModel<Repository> implements DiscoveryLis
...
@@ -236,21 +242,21 @@ public class SettingVM extends BaseViewModel<Repository> implements DiscoveryLis
public
BindingCommand
OnWeightingManageSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
public
BindingCommand
OnWeightingManageSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
@Override
public
void
call
()
{
public
void
call
()
{
queryWeightMan
();
}
}
});
});
public
BindingCommand
OnTreatmentRecordSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
public
BindingCommand
OnTreatmentRecordSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
@Override
public
void
call
()
{
public
void
call
()
{
queryMedicalRecord
();
}
}
});
});
public
BindingCommand
OnImmunRecordSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
public
BindingCommand
OnImmunRecordSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
@Override
public
void
call
()
{
public
void
call
()
{
queryImmuneBatch
();
}
}
});
});
...
@@ -1001,4 +1007,496 @@ public class SettingVM extends BaseViewModel<Repository> implements DiscoveryLis
...
@@ -1001,4 +1007,496 @@ public class SettingVM extends BaseViewModel<Repository> implements DiscoveryLis
}
}
/**===========================================称重管理================================================= */
/**
* 下载-称重管理-
*/
private
void
requestWeightMan
()
{
//SyncState 0根据记录更新,1重新更新
Map
<
String
,
String
>
requestParam
=
new
HashMap
<>();
List
<
WeightManEntity
>
queryList
=
DbUtil
.
getInstance
().
queryAll
(
WeightManEntity
.
class
);
if
(
queryList
==
null
||
queryList
.
size
()
==
0
)
requestParam
.
put
(
"SyncState"
,
"1"
);
else
requestParam
.
put
(
"SyncState"
,
"0"
);
addSubscribe
(
model
.
downloadWeightManList
(
requestParam
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
schedulersTransformer
())
.
compose
(
RxUtils
.
exceptionTransformer
())
// .doOnSubscribe(disposable -> showDialog("正在同步称重管理数据..."))
.
subscribe
((
Consumer
<
ListResponse
<
WeightManEntity
>>)
response
->
{
if
(
response
.
getCode
()
==
0
)
{
if
(
response
.
getData
()
!=
null
&&
response
.
getData
().
size
()
>
0
)
{
KLog
.
e
(
"--requestWeightManDetail--"
+
response
.
getData
().
size
());
List
<
String
>
ids
=
new
ArrayList
<>();
for
(
WeightManEntity
cre
:
response
.
getData
())
{
cre
.
setUploadStatus
(
"1"
);
ids
.
add
(
cre
.
getUnid
());
}
DbUtil
.
getInstance
().
setDbIDUCallBack
(
new
DbIDUCallBack
()
{
@Override
public
void
onNotification
(
boolean
result
)
{
if
(
result
)
{
requestWeightManSync
(
ids
);
}
else
{
dismissDialog
();
errorEvent
.
setValue
(
"保存称重管理数据失败!"
);
}
}
}).
insertAsyncBatch
(
WeightManEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
}
}
else
{
errorEvent
.
setValue
(
"服务器 :"
+
response
.
getMsg
());
}
},
(
Consumer
<
ResponseThrowable
>)
throwable
->
{
KLog
.
e
(
throwable
.
message
);
})
);
}
/**
* 上传-称重管理-成功
*/
private
void
requestWeightManSync
(
List
<
String
>
ids
)
{
// Map<String, String> syncParam = new HashMap<>();
// syncParam.put("ids", new Gson().toJson(ids).toString());
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
ids
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
downloadWeightManListSync
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
schedulersTransformer
())
.
compose
(
RxUtils
.
exceptionTransformer
())
// .doOnSubscribe(disposable -> showDialog("正在同步称重管理数据..."))
.
subscribe
((
Consumer
<
CollectResponse
>)
response
->
{
dismissDialog
();
KLog
.
e
(
"requestWeightManSync"
,
response
.
toString
());
if
(
response
.
getCode
()
==
0
)
{
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步称重管理数据成功!"
);
queryWeightMan
();
}
else
{
dismissDialog
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"服务器:"
+
response
.
getMsg
());
}
},
(
Consumer
<
ResponseThrowable
>)
throwable
->
{
dismissDialog
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
throwable
.
message
);
})
);
}
/**
* 查询-称重管理-
*/
private
void
queryWeightMan
()
{
QueryBuilder
<
WeightManEntity
>
builder
=
DbUtil
.
getInstance
().
getQueryBuilder
(
WeightManEntity
.
class
)
.
where
(
WeightManEntityDao
.
Properties
.
UploadStatus
.
eq
(
"0"
))
.
limit
(
10
);
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
WeightManEntity
>()
{
@Override
public
void
onSuccess
(
List
<
WeightManEntity
>
result
)
{
if
(
result
!=
null
&&
result
.
size
()
>
0
)
{
uploadWeightMan
(
result
);
}
else
{
requestWeightMan
();
}
}
@Override
public
void
onFailed
()
{
ToastUtils
.
showShort
(
"查询-称重管理-失败!"
);
dismissDialog
();
}
}).
queryAsyncAll
(
WeightManEntity
.
class
,
builder
);
}
/**
* 上传-称重管理-
*/
private
void
uploadWeightMan
(
List
<
WeightManEntity
>
weightManEntities
)
{
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
weightManEntities
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
uploadWeightManList
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
schedulersTransformer
())
.
compose
(
RxUtils
.
exceptionTransformer
())
.
doOnSubscribe
(
disposable
->
showDialog
(
"正在同步-称重管理-数据..."
))
.
subscribe
((
Consumer
<
CollectResponse
>)
response
->
{
if
(
response
.
getCode
()
==
0
)
{
KLog
.
e
(
"uploadWeightMan"
,
response
.
toString
());
for
(
WeightManEntity
pe
:
weightManEntities
)
{
pe
.
setUploadStatus
(
"1"
);
}
DbUtil
.
getInstance
().
setDbIDUCallBack
(
new
DbIDUCallBack
()
{
@Override
public
void
onNotification
(
boolean
result
)
{
if
(
result
)
{
queryWeightMan
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"上传-称重管理-数据成功!"
);
}
else
{
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"修改-称重管理-数据失败"
);
}
}
}).
updateAsyncBatch
(
WeightManEntity
.
class
,
weightManEntities
);
}
else
{
dismissDialog
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"服务器:"
+
response
.
getMsg
());
requestWeightMan
();
}
},
(
Consumer
<
ResponseThrowable
>)
throwable
->
{
dismissDialog
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
throwable
.
message
);
})
);
}
/**===========================================诊疗记录================================================= */
/**
* 下载-诊疗记录-
*/
private
void
requestMedicalRecord
()
{
//SyncState 0根据记录更新,1重新更新
Map
<
String
,
String
>
requestParam
=
new
HashMap
<>();
List
<
MedicalRecordEntity
>
queryList
=
DbUtil
.
getInstance
().
queryAll
(
MedicalRecordEntity
.
class
);
if
(
queryList
==
null
||
queryList
.
size
()
==
0
)
requestParam
.
put
(
"SyncState"
,
"1"
);
else
requestParam
.
put
(
"SyncState"
,
"0"
);
addSubscribe
(
model
.
downloadMedicalRecordList
(
requestParam
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
schedulersTransformer
())
.
compose
(
RxUtils
.
exceptionTransformer
())
// .doOnSubscribe(disposable -> showDialog("正在同步诊疗记录数据..."))
.
subscribe
((
Consumer
<
ListResponse
<
MedicalRecordEntity
>>)
response
->
{
if
(
response
.
getCode
()
==
0
)
{
if
(
response
.
getData
()
!=
null
&&
response
.
getData
().
size
()
>
0
)
{
KLog
.
e
(
"--requestMedicalRecord--"
+
response
.
getData
().
size
());
List
<
String
>
ids
=
new
ArrayList
<>();
for
(
MedicalRecordEntity
cre
:
response
.
getData
())
{
cre
.
setUploadStatus
(
"1"
);
ids
.
add
(
cre
.
getUnid
());
}
DbUtil
.
getInstance
().
setDbIDUCallBack
(
new
DbIDUCallBack
()
{
@Override
public
void
onNotification
(
boolean
result
)
{
if
(
result
)
{
requestMedicalRecordSync
(
ids
);
}
else
{
dismissDialog
();
errorEvent
.
setValue
(
"保存诊疗记录数据失败!"
);
}
}
}).
insertAsyncBatch
(
MedicalRecordEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
}
}
else
{
errorEvent
.
setValue
(
"服务器 :"
+
response
.
getMsg
());
}
},
(
Consumer
<
ResponseThrowable
>)
throwable
->
{
KLog
.
e
(
throwable
.
message
);
})
);
}
/**
* 上传-诊疗记录-成功
*/
private
void
requestMedicalRecordSync
(
List
<
String
>
ids
)
{
// Map<String, String> syncParam = new HashMap<>();
// syncParam.put("ids", new Gson().toJson(ids).toString());
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
ids
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
downloadMedicalRecordListSync
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
schedulersTransformer
())
.
compose
(
RxUtils
.
exceptionTransformer
())
// .doOnSubscribe(disposable -> showDialog("正在同步称重管理数据..."))
.
subscribe
((
Consumer
<
CollectResponse
>)
response
->
{
dismissDialog
();
KLog
.
e
(
"requestMedicalRecordSync"
,
response
.
toString
());
if
(
response
.
getCode
()
==
0
)
{
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步诊疗记录数据成功!"
);
queryMedicalRecord
();
}
else
{
dismissDialog
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"服务器:"
+
response
.
getMsg
());
}
},
(
Consumer
<
ResponseThrowable
>)
throwable
->
{
dismissDialog
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
throwable
.
message
);
})
);
}
/**
* 查询-诊疗记录-
*/
private
void
queryMedicalRecord
()
{
QueryBuilder
<
MedicalRecordEntity
>
builder
=
DbUtil
.
getInstance
().
getQueryBuilder
(
MedicalRecordEntity
.
class
)
.
where
(
MedicalRecordEntityDao
.
Properties
.
UploadStatus
.
eq
(
"0"
))
.
limit
(
10
);
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
MedicalRecordEntity
>()
{
@Override
public
void
onSuccess
(
List
<
MedicalRecordEntity
>
result
)
{
if
(
result
!=
null
&&
result
.
size
()
>
0
)
{
uploadMedicalRecord
(
result
);
}
else
{
requestMedicalRecord
();
}
}
@Override
public
void
onFailed
()
{
ToastUtils
.
showShort
(
"查询-诊疗记录-失败!"
);
dismissDialog
();
}
}).
queryAsyncAll
(
MedicalRecordEntity
.
class
,
builder
);
}
/**
* 上传-诊疗记录-
*/
private
void
uploadMedicalRecord
(
List
<
MedicalRecordEntity
>
medicalRecordEntities
)
{
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
medicalRecordEntities
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
uploadMedicalRecordList
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
schedulersTransformer
())
.
compose
(
RxUtils
.
exceptionTransformer
())
.
doOnSubscribe
(
disposable
->
showDialog
(
"正在同步-诊疗记录-数据..."
))
.
subscribe
((
Consumer
<
CollectResponse
>)
response
->
{
if
(
response
.
getCode
()
==
0
)
{
KLog
.
e
(
"uploadMedicalRecord"
,
response
.
toString
());
for
(
MedicalRecordEntity
pe
:
medicalRecordEntities
)
{
pe
.
setUploadStatus
(
"1"
);
}
DbUtil
.
getInstance
().
setDbIDUCallBack
(
new
DbIDUCallBack
()
{
@Override
public
void
onNotification
(
boolean
result
)
{
if
(
result
)
{
queryMedicalRecord
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"上传-诊疗记录-数据成功!"
);
}
else
{
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"修改-诊疗记录-数据失败"
);
}
}
}).
updateAsyncBatch
(
MedicalRecordEntity
.
class
,
medicalRecordEntities
);
}
else
{
dismissDialog
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"服务器:"
+
response
.
getMsg
());
requestMedicalRecord
();
}
},
(
Consumer
<
ResponseThrowable
>)
throwable
->
{
dismissDialog
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
throwable
.
message
);
})
);
}
/**===========================================免疫记录================================================= */
/**
* 下载-免疫记录-
*/
private
void
requestImmuneBatch
()
{
//SyncState 0根据记录更新,1重新更新
Map
<
String
,
String
>
requestParam
=
new
HashMap
<>();
List
<
ImmuneBatchEntity
>
queryList
=
DbUtil
.
getInstance
().
queryAll
(
ImmuneBatchEntity
.
class
);
if
(
queryList
==
null
||
queryList
.
size
()
==
0
)
requestParam
.
put
(
"SyncState"
,
"1"
);
else
requestParam
.
put
(
"SyncState"
,
"0"
);
addSubscribe
(
model
.
downloadImmuneBatchList
(
requestParam
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
schedulersTransformer
())
.
compose
(
RxUtils
.
exceptionTransformer
())
// .doOnSubscribe(disposable -> showDialog("正在同步免疫记录数据..."))
.
subscribe
((
Consumer
<
ListResponse
<
ImmuneBatchEntity
>>)
response
->
{
if
(
response
.
getCode
()
==
0
)
{
if
(
response
.
getData
()
!=
null
&&
response
.
getData
().
size
()
>
0
)
{
KLog
.
e
(
"--requestImmuneBatch--"
+
response
.
getData
().
size
());
List
<
String
>
ids
=
new
ArrayList
<>();
for
(
ImmuneBatchEntity
cre
:
response
.
getData
())
{
cre
.
setUploadStatus
(
"1"
);
ids
.
add
(
cre
.
getUnid
());
}
DbUtil
.
getInstance
().
setDbIDUCallBack
(
new
DbIDUCallBack
()
{
@Override
public
void
onNotification
(
boolean
result
)
{
if
(
result
)
{
requestImmuneBatchSync
(
ids
);
}
else
{
dismissDialog
();
errorEvent
.
setValue
(
"保存免疫记录数据失败!"
);
}
}
}).
insertAsyncBatch
(
ImmuneBatchEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
}
}
else
{
errorEvent
.
setValue
(
"服务器 :"
+
response
.
getMsg
());
}
},
(
Consumer
<
ResponseThrowable
>)
throwable
->
{
KLog
.
e
(
throwable
.
message
);
})
);
}
/**
* 上传-免疫记录-成功
*/
private
void
requestImmuneBatchSync
(
List
<
String
>
ids
)
{
// Map<String, String> syncParam = new HashMap<>();
// syncParam.put("ids", new Gson().toJson(ids).toString());
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
ids
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
downloadImmuneBatchListSync
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
schedulersTransformer
())
.
compose
(
RxUtils
.
exceptionTransformer
())
// .doOnSubscribe(disposable -> showDialog("正在同步称重管理数据..."))
.
subscribe
((
Consumer
<
CollectResponse
>)
response
->
{
dismissDialog
();
KLog
.
e
(
"requestImmuneBatchSync"
,
response
.
toString
());
if
(
response
.
getCode
()
==
0
)
{
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步免疫记录数据成功!"
);
queryImmuneBatch
();
}
else
{
dismissDialog
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"服务器:"
+
response
.
getMsg
());
}
},
(
Consumer
<
ResponseThrowable
>)
throwable
->
{
dismissDialog
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
throwable
.
message
);
})
);
}
/**
* 查询-免疫记录-
*/
private
void
queryImmuneBatch
()
{
QueryBuilder
<
ImmuneBatchEntity
>
builder
=
DbUtil
.
getInstance
().
getQueryBuilder
(
ImmuneBatchEntity
.
class
)
.
where
(
ImmuneBatchEntityDao
.
Properties
.
UploadStatus
.
eq
(
"0"
))
.
limit
(
10
);
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
ImmuneBatchEntity
>()
{
@Override
public
void
onSuccess
(
List
<
ImmuneBatchEntity
>
result
)
{
if
(
result
!=
null
&&
result
.
size
()
>
0
)
{
uploadImmuneBatch
(
result
);
}
else
{
requestImmuneBatch
();
}
}
@Override
public
void
onFailed
()
{
ToastUtils
.
showShort
(
"查询-免疫记录-失败!"
);
dismissDialog
();
}
}).
queryAsyncAll
(
ImmuneBatchEntity
.
class
,
builder
);
}
/**
* 上传-诊疗记录-
*/
private
void
uploadImmuneBatch
(
List
<
ImmuneBatchEntity
>
immuneBatchEntities
)
{
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
new
Gson
().
toJson
(
immuneBatchEntities
));
// KLog.e("label", postParams.toString());
addSubscribe
(
model
.
uploadImmuneBatchList
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
schedulersTransformer
())
.
compose
(
RxUtils
.
exceptionTransformer
())
.
doOnSubscribe
(
disposable
->
showDialog
(
"正在同步-免疫记录-数据..."
))
.
subscribe
((
Consumer
<
CollectResponse
>)
response
->
{
if
(
response
.
getCode
()
==
0
)
{
KLog
.
e
(
"uploadImmuneBatch"
,
response
.
toString
());
for
(
ImmuneBatchEntity
pe
:
immuneBatchEntities
)
{
pe
.
setUploadStatus
(
"1"
);
}
DbUtil
.
getInstance
().
setDbIDUCallBack
(
new
DbIDUCallBack
()
{
@Override
public
void
onNotification
(
boolean
result
)
{
if
(
result
)
{
queryImmuneBatch
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"上传-免疫记录-数据成功!"
);
}
else
{
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"修改-免疫记录-数据失败"
);
}
}
}).
updateAsyncBatch
(
ImmuneBatchEntity
.
class
,
immuneBatchEntities
);
}
else
{
dismissDialog
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"服务器:"
+
response
.
getMsg
());
requestImmuneBatch
();
}
},
(
Consumer
<
ResponseThrowable
>)
throwable
->
{
dismissDialog
();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
throwable
.
message
);
})
);
}
}
}
app/src/main/res/layout/fragment_basics_collect.xml
View file @
a4c6ad67
...
@@ -331,15 +331,20 @@
...
@@ -331,15 +331,20 @@
binding:onClickCommand=
"@{viewModel.onSettingClick}"
/>
binding:onClickCommand=
"@{viewModel.onSettingClick}"
/>
<!--右侧表格区-->
<!--右侧表格区-->
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.core.widget.NestedScrollView
android:id=
"@+id/nsv_right_content"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:layout_marginTop=
"5dp"
android:layout_marginTop=
"5dp"
binding:layout_constraintBottom_to
BottomOf=
"parent
"
binding:layout_constraintBottom_to
TopOf=
"@+id/ll_save
"
binding:layout_constraintLeft_toLeftOf=
"@+id/guideline_vertical"
binding:layout_constraintLeft_toLeftOf=
"@+id/guideline_vertical"
binding:layout_constraintRight_toRightOf=
"parent"
binding:layout_constraintRight_toRightOf=
"parent"
binding:layout_constraintTop_toBottomOf=
"@+id/iv_setting"
>
binding:layout_constraintTop_toBottomOf=
"@+id/iv_setting"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<androidx.appcompat.widget.LinearLayoutCompat
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/card_100"
android:id=
"@+id/card_100"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
...
@@ -506,29 +511,37 @@
...
@@ -506,29 +511,37 @@
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_collect"
android:id=
"@+id/rv_collect"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"0dp
"
android:layout_height=
"wrap_content
"
android:layout_marginTop=
"5dp"
android:layout_marginTop=
"5dp"
binding:adapter=
"@{adapter}"
binding:adapter=
"@{adapter}"
binding:itemBinding=
"@{viewModel.itemBinding}"
binding:itemBinding=
"@{viewModel.itemBinding}"
binding:items=
"@{viewModel.observableList}"
binding:items=
"@{viewModel.observableList}"
binding:layoutManager=
"@{LayoutManagers.grid(3)}"
binding:layoutManager=
"@{LayoutManagers.grid(3)}"
binding:layout_constraintBottom_toTopOf=
"@+id/card_99"
binding:layout_constraintLeft_toLeftOf=
"parent"
binding:layout_constraintLeft_toLeftOf=
"parent"
binding:layout_constraintRight_toRightOf=
"parent"
binding:layout_constraintRight_toRightOf=
"parent"
binding:layout_constraintTop_toBottomOf=
"@+id/card_100"
/>
binding:layout_constraintTop_toBottomOf=
"@+id/card_100"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
<androidx.appcompat.widget.LinearLayoutCompat
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/card_99
"
android:id=
"@+id/ll_save
"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:paddingLeft=
"5dp"
binding:layout_constraintBottom_toBottomOf=
"parent"
binding:layout_constraintLeft_toRightOf=
"@+id/guideline_vertical"
binding:layout_constraintRight_toRightOf=
"parent"
>
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/card_99"
android:layout_width=
"match_parent"
android:layout_height=
"37dp"
android:layout_height=
"37dp"
android:background=
"@drawable/bg_radius_white_5"
android:background=
"@drawable/bg_radius_white_5"
android:onClick=
"@{() ->viewModel.click(99)}"
android:onClick=
"@{() ->viewModel.click(99)}"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:padding=
"5dp"
android:padding=
"5dp"
>
binding:layout_constraintLeft_toLeftOf=
"@+id/card_100"
binding:layout_constraintRight_toRightOf=
"@+id/card_0"
binding:layout_constraintBottom_toBottomOf=
"parent"
>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/tv_title_16"
android:id=
"@+id/tv_title_16"
...
@@ -547,16 +560,13 @@
...
@@ -547,16 +560,13 @@
android:textSize=
"@dimen/sp_8"
/>
android:textSize=
"@dimen/sp_8"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/card_save"
android:id=
"@+id/card_save"
android:layout_width=
"100dp"
android:layout_width=
"100dp"
android:layout_height=
"37dp"
android:layout_height=
"37dp"
android:layout_marginLeft=
"5dp"
android:layout_marginLeft=
"5dp"
android:background=
"@drawable/bg_radius_white_5"
android:visibility=
"gone"
binding:layout_constraintBottom_toBottomOf=
"parent"
android:background=
"@drawable/bg_radius_white_5"
>
binding:layout_constraintRight_toRightOf=
"parent"
>
<!-- binding:onClickCommand="@{viewModel.onCardSaveClick}"-->
<!-- binding:onClickCommand="@{viewModel.onCardSaveClick}"-->
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
...
@@ -568,7 +578,7 @@
...
@@ -568,7 +578,7 @@
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_12"
/>
android:textSize=
"@dimen/sp_12"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.
constraintlayout.widget.ConstraintLayou
t>
</androidx.
appcompat.widget.LinearLayoutCompa
t>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
</layout>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment