Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
A
AnchorCollect_p
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_p
Commits
2bbdab56
Commit
2bbdab56
authored
Mar 07, 2023
by
hywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.性能测定修改为每年龄段一条记录;
2.配种修改计算预产期; 3.配种主表改为固定显示品种和所属种蓄站,不再由后台配置;
parent
8db1c32a
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
797 additions
and
218 deletions
+797
-218
build.gradle
app/build.gradle
+1
-1
Configs.java
app/src/main/java/com/phlx/anchorcollect_p/Configs.java
+2
-0
BreedingRecordDetailEntityDao.java
...anchorcollect_p/db/gen/BreedingRecordDetailEntityDao.java
+56
-42
CattleResumeEntityDao.java
...om/phlx/anchorcollect_p/db/gen/CattleResumeEntityDao.java
+82
-54
BreedingRecordDetailEntity.java
...lx/anchorcollect_p/entity/BreedingRecordDetailEntity.java
+32
-8
CattleResumeEntity.java
...a/com/phlx/anchorcollect_p/entity/CattleResumeEntity.java
+49
-4
DeptEntity.java
...main/java/com/phlx/anchorcollect_p/entity/DeptEntity.java
+243
-0
UserEntity.java
...main/java/com/phlx/anchorcollect_p/entity/UserEntity.java
+18
-13
RetrofitClient.java
...ain/java/com/phlx/anchorcollect_p/net/RetrofitClient.java
+4
-4
BreedingRecordFragment.java
...x/anchorcollect_p/ui/fragment/BreedingRecordFragment.java
+4
-4
BreedingRecordVM.java
...phlx/anchorcollect_p/ui/fragment/vm/BreedingRecordVM.java
+101
-38
PerformanceVM.java
...om/phlx/anchorcollect_p/ui/fragment/vm/PerformanceVM.java
+31
-2
LoginVM.java
.../main/java/com/phlx/anchorcollect_p/ui/login/LoginVM.java
+11
-1
MainActivity.java
...n/java/com/phlx/anchorcollect_p/ui/main/MainActivity.java
+1
-0
SyncVM.java
...main/java/com/phlx/anchorcollect_p/ui/setting/SyncVM.java
+62
-37
SplashVM.java
...ain/java/com/phlx/anchorcollect_p/ui/splash/SplashVM.java
+10
-1
activity_sync.xml
app/src/main/res/layout/activity_sync.xml
+12
-0
fragment_breeding_record.xml
app/src/main/res/layout/fragment_breeding_record.xml
+77
-9
strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/build.gradle
View file @
2bbdab56
...
...
@@ -48,7 +48,7 @@ android {
}
greendao
{
schemaVersion
1
//数据库版本号
schemaVersion
3
//数据库版本号
daoPackage
'com.phlx.anchorcollect_p.db.gen'
targetGenDir
'src/main/java'
}
...
...
app/src/main/java/com/phlx/anchorcollect_p/Configs.java
View file @
2bbdab56
...
...
@@ -50,6 +50,7 @@ public class Configs {
public
static
final
String
SP_NAME
=
"sp_name"
;
public
static
final
String
SP_LOGIN_NAME
=
"sp_login_name"
;
public
static
final
String
SP_DEPT_ID
=
"sp_dept_id"
;
public
static
final
String
SP_DEPT_NAME
=
"sp_dept_name"
;
public
static
final
String
SP_FREQUENCY
=
"sp_frequency"
;
public
static
final
String
SP_USER_PASSWORD
=
"sp_user_password"
;
public
static
final
String
SP_USER_EMAIL
=
"sp_user_email"
;
...
...
@@ -103,6 +104,7 @@ public class Configs {
public
static
List
<
GenTableColumn
>
immunebatch
;
public
static
List
<
GenTableColumn
>
cattlematingMaster
;
public
static
List
<
GenTableColumn
>
cattlematingDetaill
;
public
static
List
<
GenTableColumn
>
cattlematingDetaillList
;
//字典项
public
static
List
<
DictEntity
>
dictList
=
new
ArrayList
<>();
...
...
app/src/main/java/com/phlx/anchorcollect_p/db/gen/BreedingRecordDetailEntityDao.java
View file @
2bbdab56
...
...
@@ -35,13 +35,14 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet
public
final
static
Property
DueDate
=
new
Property
(
8
,
String
.
class
,
"dueDate"
,
false
,
"DUE_DATE"
);
public
final
static
Property
Pregnancy
=
new
Property
(
9
,
String
.
class
,
"pregnancy"
,
false
,
"PREGNANCY"
);
public
final
static
Property
DeptId
=
new
Property
(
10
,
Long
.
class
,
"deptId"
,
false
,
"DEPT_ID"
);
public
final
static
Property
UploadStatus
=
new
Property
(
11
,
String
.
class
,
"uploadStatus"
,
false
,
"UPLOAD_STATUS"
);
public
final
static
Property
SearchValue
=
new
Property
(
12
,
String
.
class
,
"searchValue"
,
false
,
"SEARCH_VALUE"
);
public
final
static
Property
CreateBy
=
new
Property
(
13
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
CreateTime
=
new
Property
(
14
,
String
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
UpdateBy
=
new
Property
(
15
,
String
.
class
,
"updateBy"
,
false
,
"UPDATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
16
,
String
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
Remark
=
new
Property
(
17
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
CaId
=
new
Property
(
11
,
Long
.
class
,
"caId"
,
false
,
"CA_ID"
);
public
final
static
Property
UploadStatus
=
new
Property
(
12
,
String
.
class
,
"uploadStatus"
,
false
,
"UPLOAD_STATUS"
);
public
final
static
Property
SearchValue
=
new
Property
(
13
,
String
.
class
,
"searchValue"
,
false
,
"SEARCH_VALUE"
);
public
final
static
Property
CreateBy
=
new
Property
(
14
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
CreateTime
=
new
Property
(
15
,
String
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
UpdateBy
=
new
Property
(
16
,
String
.
class
,
"updateBy"
,
false
,
"UPDATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
17
,
String
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
Remark
=
new
Property
(
18
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
}
...
...
@@ -68,13 +69,14 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet
"\"DUE_DATE\" TEXT,"
+
// 8: dueDate
"\"PREGNANCY\" TEXT,"
+
// 9: pregnancy
"\"DEPT_ID\" INTEGER,"
+
// 10: deptId
"\"UPLOAD_STATUS\" TEXT,"
+
// 11: uploadStatus
"\"SEARCH_VALUE\" TEXT,"
+
// 12: searchValue
"\"CREATE_BY\" TEXT,"
+
// 13: createBy
"\"CREATE_TIME\" TEXT,"
+
// 14: createTime
"\"UPDATE_BY\" TEXT,"
+
// 15: updateBy
"\"UPDATE_TIME\" TEXT,"
+
// 16: updateTime
"\"REMARK\" TEXT);"
);
// 17: remark
"\"CA_ID\" INTEGER,"
+
// 11: caId
"\"UPLOAD_STATUS\" TEXT,"
+
// 12: uploadStatus
"\"SEARCH_VALUE\" TEXT,"
+
// 13: searchValue
"\"CREATE_BY\" TEXT,"
+
// 14: createBy
"\"CREATE_TIME\" TEXT,"
+
// 15: createTime
"\"UPDATE_BY\" TEXT,"
+
// 16: updateBy
"\"UPDATE_TIME\" TEXT,"
+
// 17: updateTime
"\"REMARK\" TEXT);"
);
// 18: remark
}
/** Drops the underlying database table. */
...
...
@@ -142,39 +144,44 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet
stmt
.
bindLong
(
11
,
deptId
);
}
Long
caId
=
entity
.
getCaId
();
if
(
caId
!=
null
)
{
stmt
.
bindLong
(
12
,
caId
);
}
String
uploadStatus
=
entity
.
getUploadStatus
();
if
(
uploadStatus
!=
null
)
{
stmt
.
bindString
(
1
2
,
uploadStatus
);
stmt
.
bindString
(
1
3
,
uploadStatus
);
}
String
searchValue
=
entity
.
getSearchValue
();
if
(
searchValue
!=
null
)
{
stmt
.
bindString
(
1
3
,
searchValue
);
stmt
.
bindString
(
1
4
,
searchValue
);
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
1
4
,
createBy
);
stmt
.
bindString
(
1
5
,
createBy
);
}
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
1
5
,
createTime
);
stmt
.
bindString
(
1
6
,
createTime
);
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
1
6
,
updateBy
);
stmt
.
bindString
(
1
7
,
updateBy
);
}
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
1
7
,
updateTime
);
stmt
.
bindString
(
1
8
,
updateTime
);
}
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
1
8
,
remark
);
stmt
.
bindString
(
1
9
,
remark
);
}
}
...
...
@@ -237,39 +244,44 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet
stmt
.
bindLong
(
11
,
deptId
);
}
Long
caId
=
entity
.
getCaId
();
if
(
caId
!=
null
)
{
stmt
.
bindLong
(
12
,
caId
);
}
String
uploadStatus
=
entity
.
getUploadStatus
();
if
(
uploadStatus
!=
null
)
{
stmt
.
bindString
(
1
2
,
uploadStatus
);
stmt
.
bindString
(
1
3
,
uploadStatus
);
}
String
searchValue
=
entity
.
getSearchValue
();
if
(
searchValue
!=
null
)
{
stmt
.
bindString
(
1
3
,
searchValue
);
stmt
.
bindString
(
1
4
,
searchValue
);
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
1
4
,
createBy
);
stmt
.
bindString
(
1
5
,
createBy
);
}
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
1
5
,
createTime
);
stmt
.
bindString
(
1
6
,
createTime
);
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
1
6
,
updateBy
);
stmt
.
bindString
(
1
7
,
updateBy
);
}
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
1
7
,
updateTime
);
stmt
.
bindString
(
1
8
,
updateTime
);
}
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
1
8
,
remark
);
stmt
.
bindString
(
1
9
,
remark
);
}
}
...
...
@@ -292,13 +304,14 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// dueDate
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
),
// pregnancy
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getLong
(
offset
+
10
),
// deptId
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
),
// uploadStatus
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
),
// searchValue
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// createBy
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getString
(
offset
+
14
),
// createTime
cursor
.
isNull
(
offset
+
15
)
?
null
:
cursor
.
getString
(
offset
+
15
),
// updateBy
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
),
// updateTime
cursor
.
isNull
(
offset
+
17
)
?
null
:
cursor
.
getString
(
offset
+
17
)
// remark
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getLong
(
offset
+
11
),
// caId
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
),
// uploadStatus
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// searchValue
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getString
(
offset
+
14
),
// createBy
cursor
.
isNull
(
offset
+
15
)
?
null
:
cursor
.
getString
(
offset
+
15
),
// createTime
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
),
// updateBy
cursor
.
isNull
(
offset
+
17
)
?
null
:
cursor
.
getString
(
offset
+
17
),
// updateTime
cursor
.
isNull
(
offset
+
18
)
?
null
:
cursor
.
getString
(
offset
+
18
)
// remark
);
return
entity
;
}
...
...
@@ -316,13 +329,14 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet
entity
.
setDueDate
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setPregnancy
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
entity
.
setDeptId
(
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getLong
(
offset
+
10
));
entity
.
setUploadStatus
(
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
));
entity
.
setSearchValue
(
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getString
(
offset
+
14
));
entity
.
setUpdateBy
(
cursor
.
isNull
(
offset
+
15
)
?
null
:
cursor
.
getString
(
offset
+
15
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
17
)
?
null
:
cursor
.
getString
(
offset
+
17
));
entity
.
setCaId
(
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getLong
(
offset
+
11
));
entity
.
setUploadStatus
(
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
));
entity
.
setSearchValue
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getString
(
offset
+
14
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
15
)
?
null
:
cursor
.
getString
(
offset
+
15
));
entity
.
setUpdateBy
(
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
17
)
?
null
:
cursor
.
getString
(
offset
+
17
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
18
)
?
null
:
cursor
.
getString
(
offset
+
18
));
}
@Override
...
...
app/src/main/java/com/phlx/anchorcollect_p/db/gen/CattleResumeEntityDao.java
View file @
2bbdab56
...
...
@@ -47,15 +47,17 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long>
public
final
static
Property
PhotoPath
=
new
Property
(
20
,
String
.
class
,
"photoPath"
,
false
,
"PHOTO_PATH"
);
public
final
static
Property
Status
=
new
Property
(
21
,
String
.
class
,
"status"
,
false
,
"STATUS"
);
public
final
static
Property
IsOut
=
new
Property
(
22
,
Long
.
class
,
"isOut"
,
false
,
"IS_OUT"
);
public
final
static
Property
InputTime
=
new
Property
(
23
,
String
.
class
,
"inputTime"
,
false
,
"INPUT_TIME"
);
public
final
static
Property
DeptId
=
new
Property
(
24
,
Long
.
class
,
"deptId"
,
false
,
"DEPT_ID"
);
public
final
static
Property
UploadStatus
=
new
Property
(
25
,
String
.
class
,
"uploadStatus"
,
false
,
"UPLOAD_STATUS"
);
public
final
static
Property
UploadTime
=
new
Property
(
26
,
String
.
class
,
"uploadTime"
,
false
,
"UPLOAD_TIME"
);
public
final
static
Property
CreateBy
=
new
Property
(
27
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
CreateTime
=
new
Property
(
28
,
String
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
UpdateBy
=
new
Property
(
29
,
String
.
class
,
"updateBy"
,
false
,
"UPDATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
30
,
String
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
Remark
=
new
Property
(
31
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
Age
=
new
Property
(
23
,
Integer
.
class
,
"age"
,
false
,
"AGE"
);
public
final
static
Property
Colour
=
new
Property
(
24
,
String
.
class
,
"colour"
,
false
,
"COLOUR"
);
public
final
static
Property
InputTime
=
new
Property
(
25
,
String
.
class
,
"inputTime"
,
false
,
"INPUT_TIME"
);
public
final
static
Property
DeptId
=
new
Property
(
26
,
Long
.
class
,
"deptId"
,
false
,
"DEPT_ID"
);
public
final
static
Property
UploadStatus
=
new
Property
(
27
,
String
.
class
,
"uploadStatus"
,
false
,
"UPLOAD_STATUS"
);
public
final
static
Property
UploadTime
=
new
Property
(
28
,
String
.
class
,
"uploadTime"
,
false
,
"UPLOAD_TIME"
);
public
final
static
Property
CreateBy
=
new
Property
(
29
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
CreateTime
=
new
Property
(
30
,
String
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
UpdateBy
=
new
Property
(
31
,
String
.
class
,
"updateBy"
,
false
,
"UPDATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
32
,
String
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
Remark
=
new
Property
(
33
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
}
...
...
@@ -94,15 +96,17 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long>
"\"PHOTO_PATH\" TEXT,"
+
// 20: photoPath
"\"STATUS\" TEXT,"
+
// 21: status
"\"IS_OUT\" INTEGER,"
+
// 22: isOut
"\"INPUT_TIME\" TEXT,"
+
// 23: inputTime
"\"DEPT_ID\" INTEGER,"
+
// 24: deptId
"\"UPLOAD_STATUS\" TEXT,"
+
// 25: uploadStatus
"\"UPLOAD_TIME\" TEXT,"
+
// 26: uploadTime
"\"CREATE_BY\" TEXT,"
+
// 27: createBy
"\"CREATE_TIME\" TEXT,"
+
// 28: createTime
"\"UPDATE_BY\" TEXT,"
+
// 29: updateBy
"\"UPDATE_TIME\" TEXT,"
+
// 30: updateTime
"\"REMARK\" TEXT);"
);
// 31: remark
"\"AGE\" INTEGER,"
+
// 23: age
"\"COLOUR\" TEXT,"
+
// 24: colour
"\"INPUT_TIME\" TEXT,"
+
// 25: inputTime
"\"DEPT_ID\" INTEGER,"
+
// 26: deptId
"\"UPLOAD_STATUS\" TEXT,"
+
// 27: uploadStatus
"\"UPLOAD_TIME\" TEXT,"
+
// 28: uploadTime
"\"CREATE_BY\" TEXT,"
+
// 29: createBy
"\"CREATE_TIME\" TEXT,"
+
// 30: createTime
"\"UPDATE_BY\" TEXT,"
+
// 31: updateBy
"\"UPDATE_TIME\" TEXT,"
+
// 32: updateTime
"\"REMARK\" TEXT);"
);
// 33: remark
}
/** Drops the underlying database table. */
...
...
@@ -230,49 +234,59 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long>
stmt
.
bindLong
(
23
,
isOut
);
}
Integer
age
=
entity
.
getAge
();
if
(
age
!=
null
)
{
stmt
.
bindLong
(
24
,
age
);
}
String
colour
=
entity
.
getColour
();
if
(
colour
!=
null
)
{
stmt
.
bindString
(
25
,
colour
);
}
String
inputTime
=
entity
.
getInputTime
();
if
(
inputTime
!=
null
)
{
stmt
.
bindString
(
2
4
,
inputTime
);
stmt
.
bindString
(
2
6
,
inputTime
);
}
Long
deptId
=
entity
.
getDeptId
();
if
(
deptId
!=
null
)
{
stmt
.
bindLong
(
2
5
,
deptId
);
stmt
.
bindLong
(
2
7
,
deptId
);
}
String
uploadStatus
=
entity
.
getUploadStatus
();
if
(
uploadStatus
!=
null
)
{
stmt
.
bindString
(
2
6
,
uploadStatus
);
stmt
.
bindString
(
2
8
,
uploadStatus
);
}
String
uploadTime
=
entity
.
getUploadTime
();
if
(
uploadTime
!=
null
)
{
stmt
.
bindString
(
2
7
,
uploadTime
);
stmt
.
bindString
(
2
9
,
uploadTime
);
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
28
,
createBy
);
stmt
.
bindString
(
30
,
createBy
);
}
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
29
,
createTime
);
stmt
.
bindString
(
31
,
createTime
);
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
3
0
,
updateBy
);
stmt
.
bindString
(
3
2
,
updateBy
);
}
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
3
1
,
updateTime
);
stmt
.
bindString
(
3
3
,
updateTime
);
}
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
3
2
,
remark
);
stmt
.
bindString
(
3
4
,
remark
);
}
}
...
...
@@ -395,49 +409,59 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long>
stmt
.
bindLong
(
23
,
isOut
);
}
Integer
age
=
entity
.
getAge
();
if
(
age
!=
null
)
{
stmt
.
bindLong
(
24
,
age
);
}
String
colour
=
entity
.
getColour
();
if
(
colour
!=
null
)
{
stmt
.
bindString
(
25
,
colour
);
}
String
inputTime
=
entity
.
getInputTime
();
if
(
inputTime
!=
null
)
{
stmt
.
bindString
(
2
4
,
inputTime
);
stmt
.
bindString
(
2
6
,
inputTime
);
}
Long
deptId
=
entity
.
getDeptId
();
if
(
deptId
!=
null
)
{
stmt
.
bindLong
(
2
5
,
deptId
);
stmt
.
bindLong
(
2
7
,
deptId
);
}
String
uploadStatus
=
entity
.
getUploadStatus
();
if
(
uploadStatus
!=
null
)
{
stmt
.
bindString
(
2
6
,
uploadStatus
);
stmt
.
bindString
(
2
8
,
uploadStatus
);
}
String
uploadTime
=
entity
.
getUploadTime
();
if
(
uploadTime
!=
null
)
{
stmt
.
bindString
(
2
7
,
uploadTime
);
stmt
.
bindString
(
2
9
,
uploadTime
);
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
28
,
createBy
);
stmt
.
bindString
(
30
,
createBy
);
}
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
29
,
createTime
);
stmt
.
bindString
(
31
,
createTime
);
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
3
0
,
updateBy
);
stmt
.
bindString
(
3
2
,
updateBy
);
}
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
3
1
,
updateTime
);
stmt
.
bindString
(
3
3
,
updateTime
);
}
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
3
2
,
remark
);
stmt
.
bindString
(
3
4
,
remark
);
}
}
...
...
@@ -472,15 +496,17 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long>
cursor
.
isNull
(
offset
+
20
)
?
null
:
cursor
.
getString
(
offset
+
20
),
// photoPath
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
),
// status
cursor
.
isNull
(
offset
+
22
)
?
null
:
cursor
.
getLong
(
offset
+
22
),
// isOut
cursor
.
isNull
(
offset
+
23
)
?
null
:
cursor
.
getString
(
offset
+
23
),
// inputTime
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getLong
(
offset
+
24
),
// deptId
cursor
.
isNull
(
offset
+
25
)
?
null
:
cursor
.
getString
(
offset
+
25
),
// uploadStatus
cursor
.
isNull
(
offset
+
26
)
?
null
:
cursor
.
getString
(
offset
+
26
),
// uploadTime
cursor
.
isNull
(
offset
+
27
)
?
null
:
cursor
.
getString
(
offset
+
27
),
// createBy
cursor
.
isNull
(
offset
+
28
)
?
null
:
cursor
.
getString
(
offset
+
28
),
// createTime
cursor
.
isNull
(
offset
+
29
)
?
null
:
cursor
.
getString
(
offset
+
29
),
// updateBy
cursor
.
isNull
(
offset
+
30
)
?
null
:
cursor
.
getString
(
offset
+
30
),
// updateTime
cursor
.
isNull
(
offset
+
31
)
?
null
:
cursor
.
getString
(
offset
+
31
)
// remark
cursor
.
isNull
(
offset
+
23
)
?
null
:
cursor
.
getInt
(
offset
+
23
),
// age
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getString
(
offset
+
24
),
// colour
cursor
.
isNull
(
offset
+
25
)
?
null
:
cursor
.
getString
(
offset
+
25
),
// inputTime
cursor
.
isNull
(
offset
+
26
)
?
null
:
cursor
.
getLong
(
offset
+
26
),
// deptId
cursor
.
isNull
(
offset
+
27
)
?
null
:
cursor
.
getString
(
offset
+
27
),
// uploadStatus
cursor
.
isNull
(
offset
+
28
)
?
null
:
cursor
.
getString
(
offset
+
28
),
// uploadTime
cursor
.
isNull
(
offset
+
29
)
?
null
:
cursor
.
getString
(
offset
+
29
),
// createBy
cursor
.
isNull
(
offset
+
30
)
?
null
:
cursor
.
getString
(
offset
+
30
),
// createTime
cursor
.
isNull
(
offset
+
31
)
?
null
:
cursor
.
getString
(
offset
+
31
),
// updateBy
cursor
.
isNull
(
offset
+
32
)
?
null
:
cursor
.
getString
(
offset
+
32
),
// updateTime
cursor
.
isNull
(
offset
+
33
)
?
null
:
cursor
.
getString
(
offset
+
33
)
// remark
);
return
entity
;
}
...
...
@@ -510,15 +536,17 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long>
entity
.
setPhotoPath
(
cursor
.
isNull
(
offset
+
20
)
?
null
:
cursor
.
getString
(
offset
+
20
));
entity
.
setStatus
(
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
));
entity
.
setIsOut
(
cursor
.
isNull
(
offset
+
22
)
?
null
:
cursor
.
getLong
(
offset
+
22
));
entity
.
setInputTime
(
cursor
.
isNull
(
offset
+
23
)
?
null
:
cursor
.
getString
(
offset
+
23
));
entity
.
setDeptId
(
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getLong
(
offset
+
24
));
entity
.
setUploadStatus
(
cursor
.
isNull
(
offset
+
25
)
?
null
:
cursor
.
getString
(
offset
+
25
));
entity
.
setUploadTime
(
cursor
.
isNull
(
offset
+
26
)
?
null
:
cursor
.
getString
(
offset
+
26
));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
27
)
?
null
:
cursor
.
getString
(
offset
+
27
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
28
)
?
null
:
cursor
.
getString
(
offset
+
28
));
entity
.
setUpdateBy
(
cursor
.
isNull
(
offset
+
29
)
?
null
:
cursor
.
getString
(
offset
+
29
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
30
)
?
null
:
cursor
.
getString
(
offset
+
30
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
31
)
?
null
:
cursor
.
getString
(
offset
+
31
));
entity
.
setAge
(
cursor
.
isNull
(
offset
+
23
)
?
null
:
cursor
.
getInt
(
offset
+
23
));
entity
.
setColour
(
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getString
(
offset
+
24
));
entity
.
setInputTime
(
cursor
.
isNull
(
offset
+
25
)
?
null
:
cursor
.
getString
(
offset
+
25
));
entity
.
setDeptId
(
cursor
.
isNull
(
offset
+
26
)
?
null
:
cursor
.
getLong
(
offset
+
26
));
entity
.
setUploadStatus
(
cursor
.
isNull
(
offset
+
27
)
?
null
:
cursor
.
getString
(
offset
+
27
));
entity
.
setUploadTime
(
cursor
.
isNull
(
offset
+
28
)
?
null
:
cursor
.
getString
(
offset
+
28
));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
29
)
?
null
:
cursor
.
getString
(
offset
+
29
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
30
)
?
null
:
cursor
.
getString
(
offset
+
30
));
entity
.
setUpdateBy
(
cursor
.
isNull
(
offset
+
31
)
?
null
:
cursor
.
getString
(
offset
+
31
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
32
)
?
null
:
cursor
.
getString
(
offset
+
32
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
33
)
?
null
:
cursor
.
getString
(
offset
+
33
));
}
@Override
...
...
app/src/main/java/com/phlx/anchorcollect_p/entity/BreedingRecordDetailEntity.java
View file @
2bbdab56
...
...
@@ -74,6 +74,11 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
*/
private
Long
deptId
;
/**
* 部门id
*/
private
Long
caId
;
/** 是否上传 0未上传,1已上传 */
private
String
uploadStatus
;
...
...
@@ -127,6 +132,11 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
}
else
{
deptId
=
in
.
readLong
();
}
if
(
in
.
readByte
()
==
0
)
{
caId
=
null
;
}
else
{
caId
=
in
.
readLong
();
}
uploadStatus
=
in
.
readString
();
searchValue
=
in
.
readString
();
createBy
=
in
.
readString
();
...
...
@@ -136,10 +146,10 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
remark
=
in
.
readString
();
}
@Generated
(
hash
=
933327768
)
@Generated
(
hash
=
1961071723
)
public
BreedingRecordDetailEntity
(
Long
unid
,
Long
fUnid
,
String
matingStyle
,
Long
cattleresumeId
,
String
frozenSemenBatch
,
String
matingDate
,
String
isReturn
,
String
backLoveDate
,
String
dueDate
,
String
pregnancy
,
Long
deptId
,
String
uploadStatus
,
String
searchValue
,
String
createBy
,
String
pregnancy
,
Long
deptId
,
Long
caId
,
String
uploadStatus
,
String
searchValue
,
String
createBy
,
String
createTime
,
String
updateBy
,
String
updateTime
,
String
remark
)
{
this
.
unid
=
unid
;
this
.
fUnid
=
fUnid
;
...
...
@@ -152,6 +162,7 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
this
.
dueDate
=
dueDate
;
this
.
pregnancy
=
pregnancy
;
this
.
deptId
=
deptId
;
this
.
caId
=
caId
;
this
.
uploadStatus
=
uploadStatus
;
this
.
searchValue
=
searchValue
;
this
.
createBy
=
createBy
;
...
...
@@ -194,6 +205,12 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
deptId
);
}
if
(
caId
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
}
else
{
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
caId
);
}
dest
.
writeString
(
uploadStatus
);
dest
.
writeString
(
searchValue
);
dest
.
writeString
(
createBy
);
...
...
@@ -308,6 +325,14 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
this
.
deptId
=
deptId
;
}
public
Long
getCaId
()
{
return
caId
;
}
public
void
setCaId
(
Long
caId
)
{
this
.
caId
=
caId
;
}
public
String
getUploadStatus
()
{
return
uploadStatus
;
}
...
...
@@ -367,17 +392,18 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
@Override
public
String
toString
()
{
return
"BreedingRecordDetailEntity{"
+
"unid=
'"
+
unid
+
'\''
+
", fUnid=
'"
+
fUnid
+
'\''
+
"unid=
"
+
unid
+
", fUnid=
"
+
fUnid
+
", matingStyle='"
+
matingStyle
+
'\''
+
", cattleresumeId=
'"
+
cattleresumeId
+
'\''
+
", cattleresumeId=
"
+
cattleresumeId
+
", frozenSemenBatch='"
+
frozenSemenBatch
+
'\''
+
", matingDate='"
+
matingDate
+
'\''
+
", isReturn='"
+
isReturn
+
'\''
+
", backLoveDate='"
+
backLoveDate
+
'\''
+
", dueDate='"
+
dueDate
+
'\''
+
", pregnancy='"
+
pregnancy
+
'\''
+
", deptId='"
+
deptId
+
'\''
+
", deptId="
+
deptId
+
", caId="
+
caId
+
", uploadStatus='"
+
uploadStatus
+
'\''
+
", searchValue='"
+
searchValue
+
'\''
+
", createBy='"
+
createBy
+
'\''
+
...
...
@@ -395,6 +421,4 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
public
void
setFUnid
(
Long
fUnid
)
{
this
.
fUnid
=
fUnid
;
}
}
app/src/main/java/com/phlx/anchorcollect_p/entity/CattleResumeEntity.java
View file @
2bbdab56
...
...
@@ -90,6 +90,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
/** 是否淘汰;0,在用,1淘汰 */
private
Long
isOut
;
/**
* 母牛年龄
*/
private
Integer
age
;
/** 犊牛毛色 */
private
String
colour
;
/** 时间戳 */
private
String
inputTime
;
...
...
@@ -161,6 +169,12 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
}
else
{
isOut
=
in
.
readLong
();
}
if
(
in
.
readByte
()
==
0
)
{
age
=
null
;
}
else
{
age
=
in
.
readInt
();
}
colour
=
in
.
readString
();
inputTime
=
in
.
readString
();
if
(
in
.
readByte
()
==
0
)
{
deptId
=
null
;
...
...
@@ -176,14 +190,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
remark
=
in
.
readString
();
}
@Generated
(
hash
=
1
08010172
1
)
@Generated
(
hash
=
1
36924184
1
)
public
CattleResumeEntity
(
Long
unid
,
String
registrationNo
,
String
individualNo
,
String
circleNo
,
String
raiseType
,
String
raiseVarieties
,
String
birthdate
,
Double
birthHeavy
,
String
sex
,
String
birthDifficulty
,
String
isTwins
,
String
childTime
,
String
grade
,
String
fatherReg
,
String
motherReg
,
Double
fromMilkHeavy
,
String
health
,
String
junHeavy
,
String
decAppScore
,
String
photo
,
String
photoPath
,
String
status
,
Long
isOut
,
String
inputTime
,
Long
deptId
,
String
uploadStatus
,
String
uploadTime
,
String
createBy
,
String
createTime
,
String
upd
ateBy
,
String
updateTime
,
String
remark
)
{
String
photo
,
String
photoPath
,
String
status
,
Long
isOut
,
Integer
age
,
String
colour
,
String
inputTime
,
Long
deptId
,
String
uploadStatus
,
String
uploadTime
,
String
cre
ateBy
,
String
createTime
,
String
updateBy
,
String
updateTime
,
String
remark
)
{
this
.
unid
=
unid
;
this
.
registrationNo
=
registrationNo
;
this
.
individualNo
=
individualNo
;
...
...
@@ -207,6 +221,8 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
this
.
photoPath
=
photoPath
;
this
.
status
=
status
;
this
.
isOut
=
isOut
;
this
.
age
=
age
;
this
.
colour
=
colour
;
this
.
inputTime
=
inputTime
;
this
.
deptId
=
deptId
;
this
.
uploadStatus
=
uploadStatus
;
...
...
@@ -263,6 +279,13 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
isOut
);
}
if
(
age
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
}
else
{
dest
.
writeByte
((
byte
)
1
);
dest
.
writeInt
(
age
);
}
dest
.
writeString
(
colour
);
dest
.
writeString
(
inputTime
);
if
(
deptId
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
...
...
@@ -296,6 +319,10 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
}
};
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
Long
getUnid
()
{
return
unid
;
}
...
...
@@ -480,6 +507,22 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
this
.
isOut
=
isOut
;
}
public
Integer
getAge
()
{
return
age
;
}
public
void
setAge
(
Integer
age
)
{
this
.
age
=
age
;
}
public
String
getColour
()
{
return
colour
;
}
public
void
setColour
(
String
colour
)
{
this
.
colour
=
colour
;
}
public
String
getInputTime
()
{
return
inputTime
;
}
...
...
@@ -578,6 +621,8 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
", photoPath='"
+
photoPath
+
'\''
+
", status='"
+
status
+
'\''
+
", isOut="
+
isOut
+
", age="
+
age
+
", colour='"
+
colour
+
'\''
+
", inputTime='"
+
inputTime
+
'\''
+
", deptId="
+
deptId
+
", uploadStatus='"
+
uploadStatus
+
'\''
+
...
...
app/src/main/java/com/phlx/anchorcollect_p/entity/DeptEntity.java
0 → 100644
View file @
2bbdab56
package
com
.
phlx
.
anchorcollect_p
.
entity
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
androidx.databinding.BaseObservable
;
/**
* 部门表 sys_dept
*
* @author ruoyi
*/
public
class
DeptEntity
extends
BaseObservable
implements
Parcelable
{
/** 部门ID */
private
Long
deptId
;
/** 父部门ID */
private
Long
parentId
;
/** 祖级列表 */
private
String
ancestors
;
/** 部门名称 */
private
String
deptName
;
/** 显示顺序 */
private
String
orderNum
;
/** 负责人 */
private
String
leader
;
/** 联系电话 */
private
String
phone
;
/** 邮箱 */
private
String
email
;
/** 部门状态:0正常,1停用 */
private
String
status
;
/** 删除标志(0代表存在 2代表删除) */
private
String
delFlag
;
/** 父部门名称 */
private
String
parentName
;
/** 排除编号 */
private
Long
excludeId
;
public
DeptEntity
()
{
}
protected
DeptEntity
(
Parcel
in
)
{
if
(
in
.
readByte
()
==
0
)
{
deptId
=
null
;
}
else
{
deptId
=
in
.
readLong
();
}
if
(
in
.
readByte
()
==
0
)
{
parentId
=
null
;
}
else
{
parentId
=
in
.
readLong
();
}
ancestors
=
in
.
readString
();
deptName
=
in
.
readString
();
orderNum
=
in
.
readString
();
leader
=
in
.
readString
();
phone
=
in
.
readString
();
email
=
in
.
readString
();
status
=
in
.
readString
();
delFlag
=
in
.
readString
();
parentName
=
in
.
readString
();
if
(
in
.
readByte
()
==
0
)
{
excludeId
=
null
;
}
else
{
excludeId
=
in
.
readLong
();
}
}
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
if
(
deptId
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
}
else
{
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
deptId
);
}
if
(
parentId
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
}
else
{
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
parentId
);
}
dest
.
writeString
(
ancestors
);
dest
.
writeString
(
deptName
);
dest
.
writeString
(
orderNum
);
dest
.
writeString
(
leader
);
dest
.
writeString
(
phone
);
dest
.
writeString
(
email
);
dest
.
writeString
(
status
);
dest
.
writeString
(
delFlag
);
dest
.
writeString
(
parentName
);
if
(
excludeId
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
}
else
{
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
excludeId
);
}
}
@Override
public
int
describeContents
()
{
return
0
;
}
public
static
final
Creator
<
DeptEntity
>
CREATOR
=
new
Creator
<
DeptEntity
>()
{
@Override
public
DeptEntity
createFromParcel
(
Parcel
in
)
{
return
new
DeptEntity
(
in
);
}
@Override
public
DeptEntity
[]
newArray
(
int
size
)
{
return
new
DeptEntity
[
size
];
}
};
public
Long
getDeptId
()
{
return
deptId
;
}
public
void
setDeptId
(
Long
deptId
)
{
this
.
deptId
=
deptId
;
}
public
Long
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Long
parentId
)
{
this
.
parentId
=
parentId
;
}
public
String
getAncestors
()
{
return
ancestors
;
}
public
void
setAncestors
(
String
ancestors
)
{
this
.
ancestors
=
ancestors
;
}
public
String
getDeptName
()
{
return
deptName
;
}
public
void
setDeptName
(
String
deptName
)
{
this
.
deptName
=
deptName
;
}
public
String
getOrderNum
()
{
return
orderNum
;
}
public
void
setOrderNum
(
String
orderNum
)
{
this
.
orderNum
=
orderNum
;
}
public
String
getLeader
()
{
return
leader
;
}
public
void
setLeader
(
String
leader
)
{
this
.
leader
=
leader
;
}
public
String
getPhone
()
{
return
phone
;
}
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
}
public
String
getEmail
()
{
return
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getDelFlag
()
{
return
delFlag
;
}
public
void
setDelFlag
(
String
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
public
String
getParentName
()
{
return
parentName
;
}
public
void
setParentName
(
String
parentName
)
{
this
.
parentName
=
parentName
;
}
public
Long
getExcludeId
()
{
return
excludeId
;
}
public
void
setExcludeId
(
Long
excludeId
)
{
this
.
excludeId
=
excludeId
;
}
@Override
public
String
toString
()
{
return
"DeptEntity{"
+
"deptId="
+
deptId
+
", parentId="
+
parentId
+
", ancestors='"
+
ancestors
+
'\''
+
", deptName='"
+
deptName
+
'\''
+
", orderNum='"
+
orderNum
+
'\''
+
", leader='"
+
leader
+
'\''
+
", phone='"
+
phone
+
'\''
+
", email='"
+
email
+
'\''
+
", status='"
+
status
+
'\''
+
", delFlag='"
+
delFlag
+
'\''
+
", parentName='"
+
parentName
+
'\''
+
", excludeId="
+
excludeId
+
'}'
;
}
}
app/src/main/java/com/phlx/anchorcollect_p/entity/UserEntity.java
View file @
2bbdab56
...
...
@@ -13,8 +13,6 @@ import java.util.List;
* @author ruoyi
*/
public
class
UserEntity
extends
BaseObservable
implements
Parcelable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 用户ID */
private
String
userId
;
...
...
@@ -69,9 +67,9 @@ public class UserEntity extends BaseObservable implements Parcelable {
/** 密码最后更新时间 */
private
String
pwdUpdateDate
;
//
/** 部门对象 */
// private SysDept
dept;
//
/** 部门对象 */
private
DeptEntity
dept
;
private
List
<
UserRoleEntity
>
roles
;
/** 角色组 */
...
...
@@ -103,6 +101,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
loginIp
=
in
.
readString
();
loginDate
=
in
.
readString
();
pwdUpdateDate
=
in
.
readString
();
dept
=
in
.
readParcelable
(
DeptEntity
.
class
.
getClassLoader
());
roles
=
in
.
createTypedArrayList
(
UserRoleEntity
.
CREATOR
);
}
...
...
@@ -126,6 +125,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
dest
.
writeString
(
loginIp
);
dest
.
writeString
(
loginDate
);
dest
.
writeString
(
pwdUpdateDate
);
dest
.
writeParcelable
(
dept
,
flags
);
dest
.
writeTypedList
(
roles
);
}
...
...
@@ -146,10 +146,6 @@ public class UserEntity extends BaseObservable implements Parcelable {
}
};
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
String
getUserId
()
{
return
userId
;
}
...
...
@@ -294,6 +290,14 @@ public class UserEntity extends BaseObservable implements Parcelable {
this
.
pwdUpdateDate
=
pwdUpdateDate
;
}
public
DeptEntity
getDept
()
{
return
dept
;
}
public
void
setDept
(
DeptEntity
dept
)
{
this
.
dept
=
dept
;
}
public
List
<
UserRoleEntity
>
getRoles
()
{
return
roles
;
}
...
...
@@ -305,10 +309,10 @@ public class UserEntity extends BaseObservable implements Parcelable {
@Override
public
String
toString
()
{
return
"UserEntity{"
+
"userId=
"
+
userId
+
", deptId=
"
+
deptId
+
", parentId=
"
+
parentId
+
", roleId=
"
+
roleId
+
"userId=
'"
+
userId
+
'\''
+
", deptId=
'"
+
deptId
+
'\''
+
", parentId=
'"
+
parentId
+
'\''
+
", roleId=
'"
+
roleId
+
'\''
+
", loginName='"
+
loginName
+
'\''
+
", userName='"
+
userName
+
'\''
+
", userType='"
+
userType
+
'\''
+
...
...
@@ -323,6 +327,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
", loginIp='"
+
loginIp
+
'\''
+
", loginDate='"
+
loginDate
+
'\''
+
", pwdUpdateDate='"
+
pwdUpdateDate
+
'\''
+
", dept="
+
dept
+
", roles="
+
roles
+
'}'
;
}
...
...
app/src/main/java/com/phlx/anchorcollect_p/net/RetrofitClient.java
View file @
2bbdab56
...
...
@@ -49,15 +49,15 @@ public class RetrofitClient {
private
static
final
int
CACHE_TIMEOUT
=
10
*
1024
*
1024
;
//服务端根路径
public
static
String
baseUrl
=
"serve.xlglmnmyzspt.org.cn"
//正式
//
"serve.xlglmnmyzspt.org.cn"//正式
// "39.101.170.186"//阿里云测试
//
"192.168.8.135"//董
"192.168.8.135"
//董
// "192.168.43.154"//张敏
;
public
static
String
port
=
""
//正式
//
""//正式
// "9000"//阿里云测试
//
"9000"//董
"9000"
//董
;
private
static
Context
mContext
=
Utils
.
getContext
();
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/BreedingRecordFragment.java
View file @
2bbdab56
...
...
@@ -96,7 +96,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
viewModel
.
initGen
();
binding
.
rvCollect
.
addItemDecoration
(
new
SpaceItemDecoration
(
10
));
//
binding.rvCollect.addItemDecoration(new SpaceItemDecoration(10));
binding
.
rvCollectDetail
.
addItemDecoration
(
new
SpaceItemDecoration
(
10
));
initTimePicker
();
...
...
@@ -153,7 +153,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
gtc
.
notifyChange
();
}
viewModel
.
remarkParamEntity
.
notifyChange
();
binding
.
rvCollect
.
getAdapter
().
notifyDataSetChanged
();
//
binding.rvCollect.getAdapter().notifyDataSetChanged();
binding
.
rvCollectDetail
.
getAdapter
().
notifyDataSetChanged
();
if
(
aBoolean
)
{
...
...
@@ -382,7 +382,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
//初始化表头
List
<
String
>
headerStr
=
new
ArrayList
<>();
List
<
String
>
fieldNameStr
=
new
ArrayList
<>();
for
(
GenTableColumn
gtc
:
Configs
.
cattlematingDetaill
)
{
for
(
GenTableColumn
gtc
:
Configs
.
cattlematingDetaill
List
)
{
if
(
"1"
.
equals
(
gtc
.
getIsList
()))
{
headerStr
.
add
(
gtc
.
getColumnComment
());
fieldNameStr
.
add
(
gtc
.
getJavaField
());
...
...
@@ -464,7 +464,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
if
(
this
!=
null
&&
!
hidden
)
{
viewModel
.
clearParamList
();
viewModel
.
clearDetailParamList
();
viewModel
.
query
BreedingRecord
();
viewModel
.
init
BreedingRecord
();
viewModel
.
rfid
.
set
(
Configs
.
tempRfid
);
}
else
{
viewModel
.
rfid
.
set
(
""
);
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/vm/BreedingRecordVM.java
View file @
2bbdab56
...
...
@@ -18,11 +18,13 @@ import com.phlx.anchorcollect_p.data.Repository;
import
com.phlx.anchorcollect_p.db.DbUtil
;
import
com.phlx.anchorcollect_p.db.gen.BreedingRecordDetailEntityDao
;
import
com.phlx.anchorcollect_p.db.gen.BreedingRecordEntityDao
;
import
com.phlx.anchorcollect_p.db.gen.CattleResumeEntityDao
;
import
com.phlx.anchorcollect_p.db.gen.DictEntityDao
;
import
com.phlx.anchorcollect_p.db.interf.DbIDUCallBack
;
import
com.phlx.anchorcollect_p.db.interf.DbQueryCallBack
;
import
com.phlx.anchorcollect_p.entity.BreedingRecordDetailEntity
;
import
com.phlx.anchorcollect_p.entity.BreedingRecordEntity
;
import
com.phlx.anchorcollect_p.entity.CattleResumeEntity
;
import
com.phlx.anchorcollect_p.entity.DictEntity
;
import
com.phlx.anchorcollect_p.entity.GenTableColumn
;
import
com.phlx.anchorcollect_p.ui.fragment.list.CollectGridItem
;
...
...
@@ -32,8 +34,10 @@ import com.phlx.anchorcollect_p.util.EntityUtils;
import
org.greenrobot.greendao.query.QueryBuilder
;
import
java.io.File
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -78,6 +82,10 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
public
ObservableField
<
String
>
tag
=
new
ObservableField
<>(
""
);
public
ObservableField
<
String
>
weight
=
new
ObservableField
<>(
"125.5"
);
//品种于所属种蓄站
public
ObservableField
<
String
>
raiseVarieties
=
new
ObservableField
<>(
""
);
public
ObservableField
<
String
>
deptName
=
new
ObservableField
<>(
""
);
private
BreedingRecordEntity
tempEntity
;
private
BreedingRecordDetailEntity
tempDetailEntity
;
...
...
@@ -121,12 +129,49 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
}
public
void
initBreedingRecord
()
{
raiseVarieties
.
set
(
""
);
deptName
.
set
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_DEPT_NAME
,
""
));
//查询牛的品种和所属种蓄站
QueryBuilder
<
CattleResumeEntity
>
builder1
=
DbUtil
.
getInstance
().
getQueryBuilder
(
CattleResumeEntity
.
class
)
.
where
(
CattleResumeEntityDao
.
Properties
.
Unid
.
eq
(
Configs
.
tempUnid
));
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
CattleResumeEntity
>()
{
@Override
public
void
onSuccess
(
List
<
CattleResumeEntity
>
result
)
{
if
(
result
!=
null
&&
result
.
size
()
>
0
)
{
CattleResumeEntity
cattleResumeEntity
=
result
.
get
(
0
);
QueryBuilder
<
DictEntity
>
builder
=
DbUtil
.
getInstance
().
getQueryBuilder
(
DictEntity
.
class
)
.
where
(
DictEntityDao
.
Properties
.
DictType
.
eq
(
"zxgl_cattle_raiseVarieties"
)
,
DictEntityDao
.
Properties
.
DictValue
.
eq
(
cattleResumeEntity
.
getRaiseVarieties
()));
List
<
DictEntity
>
dictEntities
=
DbUtil
.
getInstance
().
queryAll
(
DictEntity
.
class
,
builder
);
if
(
dictEntities
!=
null
&&
dictEntities
.
size
()
>
0
)
{
raiseVarieties
.
set
(
dictEntities
.
get
(
0
).
getDictLabel
());
queryBreedingRecord
();
}
}
// onNotifyAllEvent.setValue(true);
ToastUtils
.
showShort
(
"查询-种蓄品种于所属种蓄站-成功!"
);
}
@Override
public
void
onFailed
()
{
onNotifyAllEvent
.
setValue
(
true
);
ToastUtils
.
showShort
(
"种蓄品种于所属种蓄站-数据库查询失败"
);
}
}).
queryAsyncAll
(
CattleResumeEntity
.
class
,
builder1
);
}
public
void
queryBreedingRecord
()
{
QueryBuilder
<
BreedingRecordEntity
>
builder
=
DbUtil
.
getInstance
().
getQueryBuilder
(
BreedingRecordEntity
.
class
)
.
where
(
BreedingRecordEntityDao
.
Properties
.
CattleresumeId
.
eq
(
Configs
.
tempUnid
)
,
BreedingRecordEntityDao
.
Properties
.
CreateTime
.
like
(
DateUtils
.
getYear
()
+
"%"
)
//
, BreedingRecordEntityDao.Properties.CreateTime.like(DateUtils.getYear() + "%")
)
.
orderDesc
(
BreedingRecordEntityDao
.
Properties
.
CreateTime
);
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
BreedingRecordEntity
>()
{
...
...
@@ -168,38 +213,38 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
tempEntity
.
setDeptId
(
breedingRecordEntity
.
getDeptId
());
tempEntity
.
setCattleresumeId
(
breedingRecordEntity
.
getCattleresumeId
());
String
[]
filedName
=
EntityUtils
.
getFiledName
(
breedingRecordEntity
);
for
(
String
name
:
filedName
)
{
for
(
GenTableColumn
gtc
:
Configs
.
cattlematingMaster
)
{
if
(
name
.
equals
(
gtc
.
getJavaField
()))
{
try
{
Object
fieldValueByName
=
EntityUtils
.
getFieldValueByName
(
name
,
breedingRecordEntity
);
String
value
=
fieldValueByName
==
null
?
""
:
fieldValueByName
.
toString
();
// Log.e("fieldValue:", "key:" + name + " | value:" + value);
gtc
.
setContent
(
value
);
String
showName
=
value
;
// 如果是选择的,查字典项
if
(!
StringUtils
.
isEmpty
(
gtc
.
getDictType
()))
{
QueryBuilder
<
DictEntity
>
builder
=
DbUtil
.
getInstance
().
getQueryBuilder
(
DictEntity
.
class
)
.
where
(
DictEntityDao
.
Properties
.
DictType
.
eq
(
gtc
.
getDictType
())
,
DictEntityDao
.
Properties
.
DictValue
.
eq
(
value
));
List
<
DictEntity
>
dictEntities
=
DbUtil
.
getInstance
().
queryAll
(
DictEntity
.
class
,
builder
);
if
(
dictEntities
!=
null
&&
dictEntities
.
size
()
>
0
)
{
showName
=
dictEntities
.
get
(
0
).
getDictLabel
();
}
}
gtc
.
setShowName
(
showName
);
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
}
}
}
//
String[] filedName = EntityUtils.getFiledName(breedingRecordEntity);
//
for (String name : filedName) {
//
//
for (GenTableColumn gtc : Configs.cattlematingMaster) {
//
//
if (name.equals(gtc.getJavaField())) {
//
try {
//
Object fieldValueByName = EntityUtils.getFieldValueByName(name, breedingRecordEntity);
//
String value = fieldValueByName == null ? "" : fieldValueByName.toString();
//
//
Log.e("fieldValue:", "key:" + name + " | value:" + value);
//
gtc.setContent(value);
//
String showName = value;
//
// 如果是选择的,查字典项
//
if (!StringUtils.isEmpty(gtc.getDictType())) {
//
QueryBuilder<DictEntity> builder =
//
DbUtil.getInstance().getQueryBuilder(DictEntity.class)
//
.where(DictEntityDao.Properties.DictType.eq(gtc.getDictType())
//
, DictEntityDao.Properties.DictValue.eq(value));
//
List<DictEntity> dictEntities = DbUtil.getInstance().queryAll(DictEntity.class, builder);
//
if (dictEntities != null && dictEntities.size() > 0) {
//
showName = dictEntities.get(0).getDictLabel();
//
}
//
}
//
gtc.setShowName(showName);
//
//
} catch (IllegalAccessException e) {
//
e.printStackTrace();
//
}
//
}
//
}
//
//
}
initDetailList
(
breedingRecordEntity
);
}
...
...
@@ -278,7 +323,9 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
QueryBuilder
<
BreedingRecordDetailEntity
>
builder
=
DbUtil
.
getInstance
().
getQueryBuilder
(
BreedingRecordDetailEntity
.
class
)
.
where
(
BreedingRecordDetailEntityDao
.
Properties
.
FUnid
.
eq
(
breedingRecordEntity
.
getUnid
()));
.
where
(
BreedingRecordDetailEntityDao
.
Properties
.
CaId
.
eq
(
breedingRecordEntity
.
getCattleresumeId
())
,
BreedingRecordDetailEntityDao
.
Properties
.
CreateTime
.
like
(
DateUtils
.
getYear
()
+
"%"
)
);
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
BreedingRecordDetailEntity
>()
{
@Override
public
void
onSuccess
(
List
<
BreedingRecordDetailEntity
>
result
)
{
...
...
@@ -313,7 +360,7 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
String
[]
filedName
=
EntityUtils
.
getFiledName
(
pe
);
for
(
String
name
:
filedName
)
{
for
(
GenTableColumn
gtc
:
Configs
.
cattlematingDetaill
)
{
for
(
GenTableColumn
gtc
:
Configs
.
cattlematingDetaill
List
)
{
if
(
name
.
equals
(
gtc
.
getJavaField
()))
{
try
{
...
...
@@ -347,7 +394,7 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
//再把格式bean里的数据转换为数据bean
JsonObject
jsonObject
=
new
JsonObject
();
for
(
GenTableColumn
gtc
:
Configs
.
cattlematingDetaill
)
{
for
(
GenTableColumn
gtc
:
Configs
.
cattlematingDetaill
List
)
{
//防止转json类型错误
if
(
""
.
equals
(
gtc
.
getContent
()))
{
switch
(
gtc
.
getJavaType
())
{
...
...
@@ -514,7 +561,7 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
if
(
tempDetailEntity
.
getUnid
()
==
null
)
{
//新增
breedingRecordDetailEntity
.
setUnid
(
IdUtil
.
createSnowflake
(
3
,
1
).
nextId
());
breedingRecordDetailEntity
.
setDeptId
(
Long
.
parseLong
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_DEPT_ID
)));
breedingRecordDetailEntity
.
setCattleresumeId
(
Configs
.
tempUnid
);
//
breedingRecordDetailEntity.setCattleresumeId(Configs.tempUnid);
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
breedingRecordDetailEntity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
breedingRecordDetailEntity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
...
...
@@ -523,14 +570,30 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
breedingRecordDetailEntity
.
setCreateBy
(
tempDetailEntity
.
getCreateBy
());
breedingRecordDetailEntity
.
setCreateTime
(
tempDetailEntity
.
getCreateTime
());
breedingRecordDetailEntity
.
setDeptId
(
tempDetailEntity
.
getDeptId
());
breedingRecordDetailEntity
.
setCattleresumeId
(
tempDetailEntity
.
getCattleresumeId
());
//
breedingRecordDetailEntity.setCattleresumeId(tempDetailEntity.getCattleresumeId());
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
breedingRecordDetailEntity
.
setUpdateTime
(
dateFormat
.
format
(
new
Date
()));
breedingRecordDetailEntity
.
setUpdateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
}
breedingRecordDetailEntity
.
setUploadStatus
(
"0"
);
breedingRecordDetailEntity
.
setCaId
(
Configs
.
tempUnid
);
breedingRecordDetailEntity
.
setfUnid
(
tempDetailEntity
.
getfUnid
());
breedingRecordDetailEntity
.
setRemark
(
remarkParamEntity
.
getContent
());
/**
计算预产期280天
*/
String
str
=
"yyyy-MM-dd"
;
SimpleDateFormat
format2
=
new
SimpleDateFormat
(
str
);
Date
date
=
null
;
try
{
date
=
format2
.
parse
(
breedingRecordDetailEntity
.
getMatingDate
());
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
DATE
,
280
);
breedingRecordDetailEntity
.
setDueDate
(
format2
.
format
(
calendar
.
getTime
()));
detailUploadData
=
new
ArrayList
<>();
detailUploadData
.
add
(
breedingRecordDetailEntity
);
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/vm/PerformanceVM.java
View file @
2bbdab56
...
...
@@ -225,11 +225,11 @@ public class PerformanceVM extends BaseViewModel<Repository> {
}
}
save
Performance
();
check
Performance
();
}
});
private
void
save
Performance
()
{
private
void
check
Performance
()
{
JsonObject
jsonObject
=
new
JsonObject
();
for
(
GenTableColumn
gtc
:
Configs
.
performance
)
{
...
...
@@ -250,6 +250,35 @@ public class PerformanceVM extends BaseViewModel<Repository> {
Gson
gson
=
new
Gson
();
PerformanceEntity
performanceEntity
=
gson
.
fromJson
(
jsonObject
,
PerformanceEntity
.
class
);
//查询此月龄是否存在,存在拿出主键 做覆盖
QueryBuilder
<
PerformanceEntity
>
builder
=
DbUtil
.
getInstance
().
getQueryBuilder
(
PerformanceEntity
.
class
)
.
where
(
PerformanceEntityDao
.
Properties
.
Age
.
eq
(
performanceEntity
.
getAge
())
,
PerformanceEntityDao
.
Properties
.
CattleresumeId
.
eq
(
Configs
.
tempUnid
)
);
DbUtil
.
getInstance
().
setDbQueryCallBack
(
new
DbQueryCallBack
<
PerformanceEntity
>()
{
@Override
public
void
onSuccess
(
List
<
PerformanceEntity
>
result
)
{
if
(
result
!=
null
&&
result
.
size
()
>
0
)
{
isModify
=
true
;
Configs
.
resumeId
=
result
.
get
(
0
).
getUnid
();
performanceEntity
.
setUnid
(
result
.
get
(
0
).
getUnid
());
}
savePerformance
(
performanceEntity
);
ToastUtils
.
showShort
(
"查询-性能测定月龄数据-成功!"
);
}
@Override
public
void
onFailed
()
{
ToastUtils
.
showShort
(
"性能测定月龄数据-数据库查询失败"
);
}
}).
queryAsyncAll
(
PerformanceEntity
.
class
,
builder
);
}
private
void
savePerformance
(
PerformanceEntity
performanceEntity
)
{
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(!
isModify
)
{
//新增
uuid
=
IdUtil
.
createSnowflake
(
3
,
1
).
nextId
();
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/login/LoginVM.java
View file @
2bbdab56
...
...
@@ -157,6 +157,7 @@ public class LoginVM extends BaseViewModel<Repository> {
SPUtils
.
getInstance
().
put
(
Configs
.
SP_NAME
,
response
.
getData
().
getUser
().
getUserName
());
SPUtils
.
getInstance
().
put
(
Configs
.
SP_LOGIN_NAME
,
response
.
getData
().
getUser
().
getLoginName
());
SPUtils
.
getInstance
().
put
(
Configs
.
SP_DEPT_ID
,
response
.
getData
().
getUser
().
getDeptId
());
SPUtils
.
getInstance
().
put
(
Configs
.
SP_DEPT_NAME
,
response
.
getData
().
getUser
().
getDept
().
getDeptName
());
String
roleIds
=
""
;
List
<
UserRoleEntity
>
roles
=
response
.
getData
().
getUser
().
getRoles
();
...
...
@@ -295,9 +296,18 @@ public class LoginVM extends BaseViewModel<Repository> {
QueryBuilder
<
GenTableColumn
>
builderDetaile6
=
DbUtil
.
getInstance
().
getQueryBuilder
(
GenTableColumn
.
class
)
.
where
(
GenTableColumnDao
.
Properties
.
TableId
.
eq
(
gt
.
getTableId
())
,
GenTableColumnDao
.
Properties
.
IsQuery
.
eq
(
"1"
))
,
GenTableColumnDao
.
Properties
.
IsQuery
.
eq
(
"1"
)
)
.
orderAsc
(
GenTableColumnDao
.
Properties
.
Sort
);
Configs
.
cattlematingDetaill
=
DbUtil
.
getInstance
().
queryAll
(
GenTableColumn
.
class
,
builderDetaile6
);
//取详情列表表头
QueryBuilder
<
GenTableColumn
>
builderDetaile7
=
DbUtil
.
getInstance
().
getQueryBuilder
(
GenTableColumn
.
class
)
.
where
(
GenTableColumnDao
.
Properties
.
TableId
.
eq
(
gt
.
getTableId
())
,
GenTableColumnDao
.
Properties
.
IsList
.
eq
(
"1"
)
)
.
orderAsc
(
GenTableColumnDao
.
Properties
.
Sort
);
Configs
.
cattlematingDetaillList
=
DbUtil
.
getInstance
().
queryAll
(
GenTableColumn
.
class
,
builderDetaile7
);
break
;
}
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/main/MainActivity.java
View file @
2bbdab56
...
...
@@ -210,6 +210,7 @@ public class MainActivity extends BaseActivity<ActivityMainBinding, MainVM> {
viewModel
.
onTabClickEvent
.
observe
(
this
,
new
Observer
<
Integer
>()
{
@Override
public
void
onChanged
(
Integer
integer
)
{
Configs
.
resumeId
=
null
;
labelSwitching
(
integer
);
Configs
.
mainPosition
=
integer
;
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/setting/SyncVM.java
View file @
2bbdab56
...
...
@@ -114,63 +114,71 @@ public class SyncVM extends BaseViewModel<Repository> {
public
BindingCommand
OnBaseArchivesSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
public
void
call
()
{
queryBaseArchives
();
//
queryBaseArchives();
}
});
public
BindingCommand
OnSignMeasureSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
public
void
call
()
{
showDialog
(
"正在同步性能测定数据..."
);
querySignMeasure
();
//
showDialog("正在同步性能测定数据...");
//
querySignMeasure();
}
});
public
BindingCommand
OnWeightingManageSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
public
void
call
()
{
showDialog
(
"正在同步称重管理数据..."
);
queryWeightMan
();
//
showDialog("正在同步称重管理数据...");
//
queryWeightMan();
}
});
public
BindingCommand
OnMedicalRecordSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
public
void
call
()
{
showDialog
(
"正在同步诊疗记录数据..."
);
queryMedicalRecord
();
//
showDialog("正在同步诊疗记录数据...");
//
queryMedicalRecord();
}
});
public
BindingCommand
OnImmunRecordSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
public
void
call
()
{
showDialog
(
"正在同步免疫记录-主表数据..."
);
queryImmuneBatch
();
//
showDialog("正在同步免疫记录-主表数据...");
//
queryImmuneBatch();
}
});
public
BindingCommand
OnImmunRecordDetailSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
public
void
call
()
{
showDialog
(
"正在同步免疫记录-子表数据..."
);
queryImmuneBatchDetail
();
//
showDialog("正在同步免疫记录-子表数据...");
//
queryImmuneBatchDetail();
}
});
public
BindingCommand
OnBreedingRecordSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
public
void
call
()
{
showDialog
(
"正在同步配种记录-主表数据..."
);
queryBreedingRecord
();
//
showDialog("正在同步配种记录-主表数据...");
//
queryBreedingRecord();
}
});
public
BindingCommand
OnBreedingRecordDetailSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
public
void
call
()
{
showDialog
(
"正在同步配种记录-子表数据..."
);
queryBreedingRecordDetail
();
// showDialog("正在同步配种记录-子表数据...");
// queryBreedingRecordDetail();
}
});
public
BindingCommand
OnOneClickUploadClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
public
void
call
()
{
showDialog
(
"正在一键同步数据..."
);
queryBaseArchives
();
}
});
...
...
@@ -202,7 +210,7 @@ public class SyncVM extends BaseViewModel<Repository> {
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
schedulersTransformer
())
.
compose
(
RxUtils
.
exceptionTransformer
())
.
doOnSubscribe
(
disposable
->
showDialog
(
"正在同步基础数据..."
))
//
.doOnSubscribe(disposable -> showDialog("正在同步基础数据..."))
.
subscribe
((
Consumer
<
ListResponse
<
CattleResumeEntity
>>)
response
->
{
if
(
response
.
getCode
()
==
0
)
{
...
...
@@ -246,7 +254,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
else
{
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步基础数据成功!"
);
queryCattleResumeUploadCount
(
false
,
"0"
);
dismissDialog
();
//
dismissDialog();
}
}
else
if
(
response
.
getCode
()
==
401
)
{
...
...
@@ -346,7 +354,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步性能测定数据..."))
.
subscribe
((
Consumer
<
ListResponse
<
Long
>>)
response
->
{
dismissDialog
();
//
dismissDialog();
KLog
.
e
(
"uploadBaseArchives"
,
response
.
toString
());
//先都设置成错误数据
for
(
CattleResumeEntity
pe
:
cattleResumeEntities
)
{
...
...
@@ -443,7 +451,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
}).
insertAsyncBatch
(
PerformanceEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
//
dismissDialog();
ToastUtils
.
showShort
(
"性能测定数据同步完成!"
);
queryPerformanceUploadCount
(
false
,
"0"
);
}
...
...
@@ -547,7 +555,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步性能测定数据..."))
.
subscribe
((
Consumer
<
ListResponse
<
Long
>>)
response
->
{
dismissDialog
();
//
dismissDialog();
KLog
.
e
(
"uploadSignMeasure"
,
response
.
toString
());
//先都设置成错误数据
for
(
PerformanceEntity
pe
:
performanceEntities
)
{
...
...
@@ -644,7 +652,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
}).
insertAsyncBatch
(
BreedingRecordEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步配种主表数据成功!"
);
queryBreedingRecordUploadCount
(
false
,
"0"
);
}
...
...
@@ -683,7 +691,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步基础数据..."))
.
subscribe
((
Consumer
<
CollectResponse
>)
response
->
{
dismissDialog
();
//
dismissDialog();
KLog
.
e
(
"downloadBreedingRecordListSync"
,
response
.
toString
());
if
(
response
.
getCode
()
==
0
)
{
requestBreedingRecord
();
...
...
@@ -779,7 +787,7 @@ public class SyncVM extends BaseViewModel<Repository> {
startActivity
(
LoginActivity
.
class
,
bundle
);
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"登录过期,请重新登录"
);
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"服务器:"
+
response
.
getMsg
());
requestBreedingRecord
();
}
...
...
@@ -841,7 +849,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
}).
insertAsyncBatch
(
BreedingRecordDetailEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步配种记录子表数据成功!"
);
queryBreedingRecordDetailUploadCount
(
false
,
"0"
);
}
...
...
@@ -880,7 +888,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步基础数据..."))
.
subscribe
((
Consumer
<
CollectResponse
>)
response
->
{
dismissDialog
();
//
dismissDialog();
KLog
.
e
(
"requestBreedingRecordDetailSync"
,
response
.
toString
());
if
(
response
.
getCode
()
==
0
)
{
queryBreedingRecordDetail
();
...
...
@@ -976,7 +984,7 @@ public class SyncVM extends BaseViewModel<Repository> {
startActivity
(
LoginActivity
.
class
,
bundle
);
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"登录过期,请重新登录"
);
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"服务器:"
+
response
.
getMsg
());
requestBreedingRecordDetail
();
}
...
...
@@ -1040,7 +1048,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}).
insertAsyncBatch
(
WeightManEntity
.
class
,
response
.
getData
());
}
else
{
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步称重管理数据成功!"
);
dismissDialog
();
//
dismissDialog();
queryWeightManUploadCount
(
false
,
"0"
);
}
...
...
@@ -1078,7 +1086,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步称重管理数据..."))
.
subscribe
((
Consumer
<
CollectResponse
>)
response
->
{
dismissDialog
();
//
dismissDialog();
KLog
.
e
(
"requestWeightManSync"
,
response
.
toString
());
if
(
response
.
getCode
()
==
0
)
{
queryWeightMan
();
...
...
@@ -1237,7 +1245,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
}).
insertAsyncBatch
(
MedicalRecordEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步诊疗记录数据成功!"
);
queryMedicalRecordUploadCount
(
false
,
"0"
);
}
...
...
@@ -1276,7 +1284,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步称重管理数据..."))
.
subscribe
((
Consumer
<
CollectResponse
>)
response
->
{
dismissDialog
();
//
dismissDialog();
KLog
.
e
(
"requestMedicalRecordSync"
,
response
.
toString
());
if
(
response
.
getCode
()
==
0
)
{
queryMedicalRecord
();
...
...
@@ -1373,7 +1381,7 @@ public class SyncVM extends BaseViewModel<Repository> {
startActivity
(
LoginActivity
.
class
,
bundle
);
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"登录过期,请重新登录"
);
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"服务器:"
+
response
.
getMsg
());
requestMedicalRecord
();
}
...
...
@@ -1436,7 +1444,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
}).
insertAsyncBatch
(
ImmuneBatchEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步免疫记录-主表数据成功!"
);
queryImmuneBatchUploadCount
(
false
,
"0"
);
}
...
...
@@ -1477,7 +1485,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步免疫记录-主表数据..."))
.
subscribe
((
Consumer
<
CollectResponse
>)
response
->
{
dismissDialog
();
//
dismissDialog();
KLog
.
e
(
"requestImmuneBatchSync"
,
response
.
toString
());
if
(
response
.
getCode
()
==
0
)
{
queryImmuneBatch
();
...
...
@@ -1574,7 +1582,7 @@ public class SyncVM extends BaseViewModel<Repository> {
startActivity
(
LoginActivity
.
class
,
bundle
);
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"登录过期,请重新登录"
);
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"服务器:"
+
response
.
getMsg
());
requestImmuneBatch
();
}
...
...
@@ -1637,7 +1645,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
}).
insertAsyncBatch
(
ImmuneBatchDetailEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步免疫记录-子表数据成功!"
);
queryImmuneBatchDetailUploadCount
(
false
,
"0"
);
}
...
...
@@ -1676,7 +1684,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步免疫记录-子表数据..."))
.
subscribe
((
Consumer
<
CollectResponse
>)
response
->
{
dismissDialog
();
//
dismissDialog();
KLog
.
e
(
"requestImmuneBatchDetailSync"
,
response
.
toString
());
if
(
response
.
getCode
()
==
0
)
{
queryImmuneBatchDetail
();
...
...
@@ -1773,7 +1781,7 @@ public class SyncVM extends BaseViewModel<Repository> {
startActivity
(
LoginActivity
.
class
,
bundle
);
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"登录过期,请重新登录"
);
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"服务器:"
+
response
.
getMsg
());
requestImmuneBatchDetail
();
}
...
...
@@ -1827,6 +1835,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续
if
(
UPLOAD_STATUS_HAVE_NOT
.
equals
(
uploadType
))
{
queryCattleResumeUploadCount
(
isContinue
,
UPLOAD_STATUS_ERROR
);
}
else
if
(!
isContinue
&&
UPLOAD_STATUS_ERROR
.
equals
(
uploadType
))
{
querySignMeasure
();
}
else
if
(
isContinue
)
queryPerformanceUploadCount
(
isContinue
,
UPLOAD_STATUS_HAVE_NOT
);
}
...
...
@@ -1864,6 +1874,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续
if
(
UPLOAD_STATUS_HAVE_NOT
.
equals
(
uploadType
))
{
queryPerformanceUploadCount
(
isContinue
,
UPLOAD_STATUS_ERROR
);
}
else
if
(!
isContinue
&&
UPLOAD_STATUS_ERROR
.
equals
(
uploadType
))
{
queryWeightMan
();
}
else
if
(
isContinue
)
queryWeightManUploadCount
(
isContinue
,
UPLOAD_STATUS_HAVE_NOT
);
...
...
@@ -1902,6 +1914,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续
if
(
UPLOAD_STATUS_HAVE_NOT
.
equals
(
uploadType
))
{
queryWeightManUploadCount
(
isContinue
,
UPLOAD_STATUS_ERROR
);
}
else
if
(!
isContinue
&&
UPLOAD_STATUS_ERROR
.
equals
(
uploadType
))
{
queryMedicalRecord
();
}
else
if
(
isContinue
)
queryMedicalRecordUploadCount
(
isContinue
,
UPLOAD_STATUS_HAVE_NOT
);
...
...
@@ -1940,6 +1954,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续
if
(
UPLOAD_STATUS_HAVE_NOT
.
equals
(
uploadType
))
{
queryMedicalRecordUploadCount
(
isContinue
,
UPLOAD_STATUS_ERROR
);
}
else
if
(!
isContinue
&&
UPLOAD_STATUS_ERROR
.
equals
(
uploadType
))
{
queryImmuneBatch
();
}
else
if
(
isContinue
)
queryImmuneBatchUploadCount
(
isContinue
,
UPLOAD_STATUS_HAVE_NOT
);
...
...
@@ -1978,6 +1994,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续
if
(
UPLOAD_STATUS_HAVE_NOT
.
equals
(
uploadType
))
{
queryImmuneBatchUploadCount
(
isContinue
,
UPLOAD_STATUS_ERROR
);
}
else
if
(!
isContinue
&&
UPLOAD_STATUS_ERROR
.
equals
(
uploadType
))
{
queryImmuneBatchDetail
();
}
else
if
(
isContinue
)
queryImmuneBatchDetailUploadCount
(
isContinue
,
UPLOAD_STATUS_HAVE_NOT
);
...
...
@@ -2016,6 +2034,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续
if
(
UPLOAD_STATUS_HAVE_NOT
.
equals
(
uploadType
))
{
queryImmuneBatchDetailUploadCount
(
isContinue
,
UPLOAD_STATUS_ERROR
);
}
else
if
(!
isContinue
&&
UPLOAD_STATUS_ERROR
.
equals
(
uploadType
))
{
queryBreedingRecord
();
}
else
if
(
isContinue
)
queryBreedingRecordUploadCount
(
isContinue
,
UPLOAD_STATUS_HAVE_NOT
);
...
...
@@ -2054,6 +2074,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续
if
(
UPLOAD_STATUS_HAVE_NOT
.
equals
(
uploadType
))
{
queryBreedingRecordUploadCount
(
isContinue
,
UPLOAD_STATUS_ERROR
);
}
else
if
(!
isContinue
&&
UPLOAD_STATUS_ERROR
.
equals
(
uploadType
))
{
queryBreedingRecordDetail
();
}
else
if
(
isContinue
)
queryBreedingRecordDetailUploadCount
(
isContinue
,
UPLOAD_STATUS_HAVE_NOT
);
...
...
@@ -2092,9 +2114,12 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就停止
if
(
UPLOAD_STATUS_HAVE_NOT
.
equals
(
uploadType
))
{
queryBreedingRecordDetailUploadCount
(
isContinue
,
UPLOAD_STATUS_ERROR
);
}
else
{
dismissDialog
();
}
}
@Override
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/splash/SplashVM.java
View file @
2bbdab56
...
...
@@ -220,9 +220,18 @@ public class SplashVM extends MainBarVM<Repository> {
QueryBuilder
<
GenTableColumn
>
builderDetaile6
=
DbUtil
.
getInstance
().
getQueryBuilder
(
GenTableColumn
.
class
)
.
where
(
GenTableColumnDao
.
Properties
.
TableId
.
eq
(
gt
.
getTableId
())
,
GenTableColumnDao
.
Properties
.
IsQuery
.
eq
(
"1"
))
,
GenTableColumnDao
.
Properties
.
IsQuery
.
eq
(
"1"
)
)
.
orderAsc
(
GenTableColumnDao
.
Properties
.
Sort
);
Configs
.
cattlematingDetaill
=
DbUtil
.
getInstance
().
queryAll
(
GenTableColumn
.
class
,
builderDetaile6
);
//取详情列表表头
QueryBuilder
<
GenTableColumn
>
builderDetaile7
=
DbUtil
.
getInstance
().
getQueryBuilder
(
GenTableColumn
.
class
)
.
where
(
GenTableColumnDao
.
Properties
.
TableId
.
eq
(
gt
.
getTableId
())
,
GenTableColumnDao
.
Properties
.
IsList
.
eq
(
"1"
)
)
.
orderAsc
(
GenTableColumnDao
.
Properties
.
Sort
);
Configs
.
cattlematingDetaillList
=
DbUtil
.
getInstance
().
queryAll
(
GenTableColumn
.
class
,
builderDetaile7
);
break
;
}
...
...
app/src/main/res/layout/activity_sync.xml
View file @
2bbdab56
...
...
@@ -443,6 +443,18 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatButton
android:id=
"@+id/btn_click_sync_upload"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/one_click_sync"
android:layout_marginBottom=
"@dimen/dp_15"
android:layout_marginLeft=
"@dimen/dp_80"
binding:layout_constraintLeft_toLeftOf=
"parent"
binding:layout_constraintBottom_toBottomOf=
"parent"
binding:onClickCommand=
"@{viewModel.OnOneClickUploadClickCommand}"
/>
<androidx.appcompat.widget.AppCompatButton
android:id=
"@+id/btn_error_data_upload"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/fragment_breeding_record.xml
View file @
2bbdab56
...
...
@@ -60,21 +60,89 @@
binding:layout_constraintRight_toRightOf=
"parent"
binding:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.
recyclerview.widget.RecyclerView
<androidx.
appcompat.widget.LinearLayoutCompat
android:id=
"@+id/rv_collect"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"-5dp"
android:layout_marginTop=
"5dp"
android:nestedScrollingEnabled=
"false"
binding:adapter=
"@{adapter}"
binding:itemBinding=
"@{viewModel.itemBinding}"
binding:items=
"@{viewModel.observableList}"
binding:layoutManager=
"@{LayoutManagers.grid(2)}"
android:orientation=
"horizontal"
binding:layout_constraintBottom_toTopOf=
"@+id/ll_detail_title"
binding:layout_constraintLeft_toLeftOf=
"parent"
binding:layout_constraintRight_toRightOf=
"parent"
binding:layout_constraintTop_toBottomOf=
"@+id/tv_rfid_text"
/>
binding:layout_constraintTop_toBottomOf=
"@+id/tv_rfid_text"
>
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/cl_title_1"
android:layout_width=
"@dimen/dp_172"
android:layout_height=
"@dimen/dp_50"
android:gravity=
"center_vertical"
android:orientation=
"vertical"
android:layout_marginTop=
"@dimen/dp_5"
android:layout_marginBottom=
"@dimen/dp_5"
android:padding=
"@dimen/dp_5"
android:background=
"@drawable/bg_radius_white_5"
binding:layout_constraintLeft_toLeftOf=
"parent"
binding:layout_constraintRight_toRightOf=
"parent"
binding:layout_constraintTop_toTopOf=
"parent"
>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:ellipsize=
"end"
android:gravity=
"center|start"
android:maxLines=
"1"
android:text=
"饲养品种"
android:textSize=
"@dimen/sp_10"
android:textColor=
"@color/colorPrimary"
/>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:ellipsize=
"end"
android:gravity=
"center|end"
android:maxLines=
"1"
android:text=
"@{viewModel.raiseVarieties}"
android:textSize=
"@dimen/sp_10"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/cl_title_2"
android:layout_width=
"@dimen/dp_172"
android:layout_height=
"@dimen/dp_50"
android:gravity=
"center_vertical"
android:orientation=
"vertical"
android:layout_marginTop=
"@dimen/dp_5"
android:layout_marginBottom=
"@dimen/dp_5"
android:layout_marginLeft=
"@dimen/dp_5"
android:padding=
"@dimen/dp_5"
android:background=
"@drawable/bg_radius_white_5"
binding:layout_constraintLeft_toLeftOf=
"parent"
binding:layout_constraintRight_toRightOf=
"parent"
binding:layout_constraintTop_toTopOf=
"parent"
>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:ellipsize=
"end"
android:gravity=
"center|start"
android:maxLines=
"1"
android:text=
"所属种蓄站"
android:textSize=
"@dimen/sp_10"
android:textColor=
"@color/colorPrimary"
/>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:ellipsize=
"end"
android:gravity=
"center|end"
android:maxLines=
"1"
android:text=
"@{viewModel.deptName}"
android:textSize=
"@dimen/sp_10"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<com.lingber.mycontrol.datagridview.DataGridView
android:id=
"@+id/ll_detail_title"
...
...
app/src/main/res/values/strings.xml
View file @
2bbdab56
...
...
@@ -28,6 +28,7 @@
<string
name=
"breeding_record_detail"
>
配种详情
</string>
<string
name=
"one_click_sync"
>
一键同步
</string>
<string
name=
"error_data_upload"
>
错误上报
</string>
...
...
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