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
98c33772
Commit
98c33772
authored
Mar 07, 2023
by
hywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.性能测定修改为每年龄段一条记录;
2.配种修改计算预产期; 3.配种主表改为固定显示品种和所属种蓄站,不再由后台配置;
parent
68bec6cf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
723 additions
and
155 deletions
+723
-155
build.gradle
app/build.gradle
+1
-1
Configs.java
app/src/main/java/com/phlx/anchorcollect/Configs.java
+2
-0
DaoMaster.java
...rc/main/java/com/phlx/anchorcollect/db/gen/DaoMaster.java
+2
-2
BreedingRecordDetailEntity.java
...phlx/anchorcollect/entity/BreedingRecordDetailEntity.java
+32
-8
CattleResumeEntity.java
...ava/com/phlx/anchorcollect/entity/CattleResumeEntity.java
+74
-9
DeptEntity.java
...c/main/java/com/phlx/anchorcollect/entity/DeptEntity.java
+243
-0
UserEntity.java
...c/main/java/com/phlx/anchorcollect/entity/UserEntity.java
+18
-12
RetrofitClient.java
.../main/java/com/phlx/anchorcollect/net/RetrofitClient.java
+4
-4
BreedingRecordFragment.java
...hlx/anchorcollect/ui/fragment/BreedingRecordFragment.java
+4
-4
BreedingRecordVM.java
...m/phlx/anchorcollect/ui/fragment/vm/BreedingRecordVM.java
+106
-38
PerformanceVM.java
.../com/phlx/anchorcollect/ui/fragment/vm/PerformanceVM.java
+34
-3
CattleVM.java
...rc/main/java/com/phlx/anchorcollect/ui/info/CattleVM.java
+2
-0
LoginVM.java
...rc/main/java/com/phlx/anchorcollect/ui/login/LoginVM.java
+11
-1
MainActivity.java
...ain/java/com/phlx/anchorcollect/ui/main/MainActivity.java
+1
-0
SyncVM.java
...c/main/java/com/phlx/anchorcollect/ui/setting/SyncVM.java
+88
-63
SplashVM.java
.../main/java/com/phlx/anchorcollect/ui/splash/SplashVM.java
+11
-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 @
98c33772
...
@@ -48,7 +48,7 @@ android {
...
@@ -48,7 +48,7 @@ android {
}
}
greendao
{
greendao
{
schemaVersion
1
//数据库版本号
schemaVersion
3
//数据库版本号
daoPackage
'com.phlx.anchorcollect.db.gen'
daoPackage
'com.phlx.anchorcollect.db.gen'
targetGenDir
'src/main/java'
targetGenDir
'src/main/java'
}
}
...
...
app/src/main/java/com/phlx/anchorcollect/Configs.java
View file @
98c33772
...
@@ -53,6 +53,7 @@ public class Configs {
...
@@ -53,6 +53,7 @@ public class Configs {
public
static
final
String
SP_NAME
=
"sp_name"
;
public
static
final
String
SP_NAME
=
"sp_name"
;
public
static
final
String
SP_LOGIN_NAME
=
"sp_login_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_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_FREQUENCY
=
"sp_frequency"
;
public
static
final
String
SP_USER_PASSWORD
=
"sp_user_password"
;
public
static
final
String
SP_USER_PASSWORD
=
"sp_user_password"
;
public
static
final
String
SP_USER_EMAIL
=
"sp_user_email"
;
public
static
final
String
SP_USER_EMAIL
=
"sp_user_email"
;
...
@@ -112,6 +113,7 @@ public class Configs {
...
@@ -112,6 +113,7 @@ public class Configs {
public
static
List
<
GenTableColumn
>
immunebatch
;
public
static
List
<
GenTableColumn
>
immunebatch
;
public
static
List
<
GenTableColumn
>
cattlematingMaster
;
public
static
List
<
GenTableColumn
>
cattlematingMaster
;
public
static
List
<
GenTableColumn
>
cattlematingDetaill
;
public
static
List
<
GenTableColumn
>
cattlematingDetaill
;
public
static
List
<
GenTableColumn
>
cattlematingDetaillList
;
//字典项
//字典项
public
static
List
<
DictEntity
>
dictList
=
new
ArrayList
<>();
public
static
List
<
DictEntity
>
dictList
=
new
ArrayList
<>();
...
...
app/src/main/java/com/phlx/anchorcollect/db/gen/DaoMaster.java
View file @
98c33772
...
@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
...
@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
/**
* Master of DAO (schema version
1
): knows all DAOs.
* Master of DAO (schema version
3
): knows all DAOs.
*/
*/
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
static
final
int
SCHEMA_VERSION
=
1
;
public
static
final
int
SCHEMA_VERSION
=
3
;
/** Creates underlying database table using DAOs. */
/** Creates underlying database table using DAOs. */
public
static
void
createAllTables
(
Database
db
,
boolean
ifNotExists
)
{
public
static
void
createAllTables
(
Database
db
,
boolean
ifNotExists
)
{
...
...
app/src/main/java/com/phlx/anchorcollect/entity/BreedingRecordDetailEntity.java
View file @
98c33772
...
@@ -76,6 +76,11 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
...
@@ -76,6 +76,11 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
*/
*/
private
Long
deptId
;
private
Long
deptId
;
/**
* 部门id
*/
private
Long
caId
;
/** 是否上传 0未上传,1已上传 */
/** 是否上传 0未上传,1已上传 */
private
String
uploadStatus
;
private
String
uploadStatus
;
...
@@ -129,6 +134,11 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
...
@@ -129,6 +134,11 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
}
else
{
}
else
{
deptId
=
in
.
readLong
();
deptId
=
in
.
readLong
();
}
}
if
(
in
.
readByte
()
==
0
)
{
caId
=
null
;
}
else
{
caId
=
in
.
readLong
();
}
uploadStatus
=
in
.
readString
();
uploadStatus
=
in
.
readString
();
searchValue
=
in
.
readString
();
searchValue
=
in
.
readString
();
createBy
=
in
.
readString
();
createBy
=
in
.
readString
();
...
@@ -138,10 +148,10 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
...
@@ -138,10 +148,10 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
remark
=
in
.
readString
();
remark
=
in
.
readString
();
}
}
@Generated
(
hash
=
933327768
)
@Generated
(
hash
=
1961071723
)
public
BreedingRecordDetailEntity
(
Long
unid
,
Long
fUnid
,
String
matingStyle
,
Long
cattleresumeId
,
public
BreedingRecordDetailEntity
(
Long
unid
,
Long
fUnid
,
String
matingStyle
,
Long
cattleresumeId
,
String
frozenSemenBatch
,
String
matingDate
,
String
isReturn
,
String
backLoveDate
,
String
dueDate
,
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
)
{
String
createTime
,
String
updateBy
,
String
updateTime
,
String
remark
)
{
this
.
unid
=
unid
;
this
.
unid
=
unid
;
this
.
fUnid
=
fUnid
;
this
.
fUnid
=
fUnid
;
...
@@ -154,6 +164,7 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
...
@@ -154,6 +164,7 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
this
.
dueDate
=
dueDate
;
this
.
dueDate
=
dueDate
;
this
.
pregnancy
=
pregnancy
;
this
.
pregnancy
=
pregnancy
;
this
.
deptId
=
deptId
;
this
.
deptId
=
deptId
;
this
.
caId
=
caId
;
this
.
uploadStatus
=
uploadStatus
;
this
.
uploadStatus
=
uploadStatus
;
this
.
searchValue
=
searchValue
;
this
.
searchValue
=
searchValue
;
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
...
@@ -196,6 +207,12 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
...
@@ -196,6 +207,12 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
dest
.
writeByte
((
byte
)
1
);
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
deptId
);
dest
.
writeLong
(
deptId
);
}
}
if
(
caId
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
}
else
{
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
caId
);
}
dest
.
writeString
(
uploadStatus
);
dest
.
writeString
(
uploadStatus
);
dest
.
writeString
(
searchValue
);
dest
.
writeString
(
searchValue
);
dest
.
writeString
(
createBy
);
dest
.
writeString
(
createBy
);
...
@@ -310,6 +327,14 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
...
@@ -310,6 +327,14 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
this
.
deptId
=
deptId
;
this
.
deptId
=
deptId
;
}
}
public
Long
getCaId
()
{
return
caId
;
}
public
void
setCaId
(
Long
caId
)
{
this
.
caId
=
caId
;
}
public
String
getUploadStatus
()
{
public
String
getUploadStatus
()
{
return
uploadStatus
;
return
uploadStatus
;
}
}
...
@@ -369,17 +394,18 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
...
@@ -369,17 +394,18 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"BreedingRecordDetailEntity{"
+
return
"BreedingRecordDetailEntity{"
+
"unid=
'"
+
unid
+
'\''
+
"unid=
"
+
unid
+
", fUnid=
'"
+
fUnid
+
'\''
+
", fUnid=
"
+
fUnid
+
", matingStyle='"
+
matingStyle
+
'\''
+
", matingStyle='"
+
matingStyle
+
'\''
+
", cattleresumeId=
'"
+
cattleresumeId
+
'\''
+
", cattleresumeId=
"
+
cattleresumeId
+
", frozenSemenBatch='"
+
frozenSemenBatch
+
'\''
+
", frozenSemenBatch='"
+
frozenSemenBatch
+
'\''
+
", matingDate='"
+
matingDate
+
'\''
+
", matingDate='"
+
matingDate
+
'\''
+
", isReturn='"
+
isReturn
+
'\''
+
", isReturn='"
+
isReturn
+
'\''
+
", backLoveDate='"
+
backLoveDate
+
'\''
+
", backLoveDate='"
+
backLoveDate
+
'\''
+
", dueDate='"
+
dueDate
+
'\''
+
", dueDate='"
+
dueDate
+
'\''
+
", pregnancy='"
+
pregnancy
+
'\''
+
", pregnancy='"
+
pregnancy
+
'\''
+
", deptId='"
+
deptId
+
'\''
+
", deptId="
+
deptId
+
", caId="
+
caId
+
", uploadStatus='"
+
uploadStatus
+
'\''
+
", uploadStatus='"
+
uploadStatus
+
'\''
+
", searchValue='"
+
searchValue
+
'\''
+
", searchValue='"
+
searchValue
+
'\''
+
", createBy='"
+
createBy
+
'\''
+
", createBy='"
+
createBy
+
'\''
+
...
@@ -397,6 +423,4 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
...
@@ -397,6 +423,4 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
public
void
setFUnid
(
Long
fUnid
)
{
public
void
setFUnid
(
Long
fUnid
)
{
this
.
fUnid
=
fUnid
;
this
.
fUnid
=
fUnid
;
}
}
}
}
app/src/main/java/com/phlx/anchorcollect/entity/CattleResumeEntity.java
View file @
98c33772
...
@@ -87,12 +87,23 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
...
@@ -87,12 +87,23 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
/** 是否淘汰;0,在用,1淘汰 */
/** 是否淘汰;0,在用,1淘汰 */
private
Long
isOut
;
private
Long
isOut
;
/**
* 母牛年龄
*/
private
Integer
age
;
/** 犊牛毛色 */
private
String
colour
;
/** 时间戳 */
/** 时间戳 */
private
String
inputTime
;
private
String
inputTime
;
/** 部门id */
/** 部门id */
private
Long
deptId
;
private
Long
deptId
;
/** 所属种蓄站*/
private
Long
deptName
;
/** 是否上传 0未上传,1已上传 */
/** 是否上传 0未上传,1已上传 */
private
String
uploadStatus
;
private
String
uploadStatus
;
...
@@ -157,12 +168,23 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
...
@@ -157,12 +168,23 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
}
else
{
}
else
{
isOut
=
in
.
readLong
();
isOut
=
in
.
readLong
();
}
}
if
(
in
.
readByte
()
==
0
)
{
age
=
null
;
}
else
{
age
=
in
.
readInt
();
}
colour
=
in
.
readString
();
inputTime
=
in
.
readString
();
inputTime
=
in
.
readString
();
if
(
in
.
readByte
()
==
0
)
{
if
(
in
.
readByte
()
==
0
)
{
deptId
=
null
;
deptId
=
null
;
}
else
{
}
else
{
deptId
=
in
.
readLong
();
deptId
=
in
.
readLong
();
}
}
if
(
in
.
readByte
()
==
0
)
{
deptName
=
null
;
}
else
{
deptName
=
in
.
readLong
();
}
uploadStatus
=
in
.
readString
();
uploadStatus
=
in
.
readString
();
uploadTime
=
in
.
readString
();
uploadTime
=
in
.
readString
();
createBy
=
in
.
readString
();
createBy
=
in
.
readString
();
...
@@ -172,14 +194,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
...
@@ -172,14 +194,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
remark
=
in
.
readString
();
remark
=
in
.
readString
();
}
}
@Generated
(
hash
=
2055075095
)
@Generated
(
hash
=
1106807371
)
public
CattleResumeEntity
(
Long
unid
,
String
registrationNo
,
String
individualNo
,
String
circleNo
,
public
CattleResumeEntity
(
Long
unid
,
String
registrationNo
,
String
individualNo
,
String
circleNo
,
String
raiseType
,
String
raiseVarieties
,
String
birthdate
,
Double
birthHeavy
,
String
sex
,
String
raiseType
,
String
raiseVarieties
,
String
birthdate
,
Double
birthHeavy
,
String
sex
,
String
birthDifficulty
,
String
isTwins
,
String
childTime
,
String
grade
,
String
fatherReg
,
String
birthDifficulty
,
String
isTwins
,
String
childTime
,
String
grade
,
String
fatherReg
,
String
motherReg
,
Double
fromMilkHeavy
,
String
health
,
String
junHeavy
,
String
decAppScore
,
String
motherReg
,
Double
fromMilkHeavy
,
String
health
,
String
junHeavy
,
String
decAppScore
,
String
photo
,
String
status
,
Long
isOut
,
String
inputTime
,
Long
deptId
,
String
uploadStatus
,
String
photo
,
String
status
,
Long
isOut
,
Integer
age
,
String
colour
,
String
inputTime
,
String
uploadTime
,
String
createBy
,
String
createTime
,
String
updateBy
,
String
updateTime
,
Long
deptId
,
Long
deptName
,
String
uploadStatus
,
String
uploadTime
,
String
createBy
,
String
remark
)
{
String
createTime
,
String
updateBy
,
String
updateTime
,
String
remark
)
{
this
.
unid
=
unid
;
this
.
unid
=
unid
;
this
.
registrationNo
=
registrationNo
;
this
.
registrationNo
=
registrationNo
;
this
.
individualNo
=
individualNo
;
this
.
individualNo
=
individualNo
;
...
@@ -202,8 +224,11 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
...
@@ -202,8 +224,11 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
this
.
photo
=
photo
;
this
.
photo
=
photo
;
this
.
status
=
status
;
this
.
status
=
status
;
this
.
isOut
=
isOut
;
this
.
isOut
=
isOut
;
this
.
age
=
age
;
this
.
colour
=
colour
;
this
.
inputTime
=
inputTime
;
this
.
inputTime
=
inputTime
;
this
.
deptId
=
deptId
;
this
.
deptId
=
deptId
;
this
.
deptName
=
deptName
;
this
.
uploadStatus
=
uploadStatus
;
this
.
uploadStatus
=
uploadStatus
;
this
.
uploadTime
=
uploadTime
;
this
.
uploadTime
=
uploadTime
;
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
...
@@ -257,6 +282,13 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
...
@@ -257,6 +282,13 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
dest
.
writeByte
((
byte
)
1
);
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
isOut
);
dest
.
writeLong
(
isOut
);
}
}
if
(
age
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
}
else
{
dest
.
writeByte
((
byte
)
1
);
dest
.
writeInt
(
age
);
}
dest
.
writeString
(
colour
);
dest
.
writeString
(
inputTime
);
dest
.
writeString
(
inputTime
);
if
(
deptId
==
null
)
{
if
(
deptId
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
dest
.
writeByte
((
byte
)
0
);
...
@@ -264,6 +296,12 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
...
@@ -264,6 +296,12 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
dest
.
writeByte
((
byte
)
1
);
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
deptId
);
dest
.
writeLong
(
deptId
);
}
}
if
(
deptName
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
}
else
{
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
deptName
);
}
dest
.
writeString
(
uploadStatus
);
dest
.
writeString
(
uploadStatus
);
dest
.
writeString
(
uploadTime
);
dest
.
writeString
(
uploadTime
);
dest
.
writeString
(
createBy
);
dest
.
writeString
(
createBy
);
...
@@ -470,6 +508,22 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
...
@@ -470,6 +508,22 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
this
.
isOut
=
isOut
;
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
()
{
public
String
getInputTime
()
{
return
inputTime
;
return
inputTime
;
}
}
...
@@ -486,6 +540,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
...
@@ -486,6 +540,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
this
.
deptId
=
deptId
;
this
.
deptId
=
deptId
;
}
}
public
Long
getDeptName
()
{
return
deptName
;
}
public
void
setDeptName
(
Long
deptName
)
{
this
.
deptName
=
deptName
;
}
public
String
getUploadStatus
()
{
public
String
getUploadStatus
()
{
return
uploadStatus
;
return
uploadStatus
;
}
}
...
@@ -545,14 +607,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
...
@@ -545,14 +607,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"CattleResumeEntity{"
+
return
"CattleResumeEntity{"
+
"unid=
'"
+
unid
+
'\''
+
"unid=
"
+
unid
+
", registrationNo='"
+
registrationNo
+
'\''
+
", registrationNo='"
+
registrationNo
+
'\''
+
", individualNo='"
+
individualNo
+
'\''
+
", individualNo='"
+
individualNo
+
'\''
+
", circleNo='"
+
circleNo
+
'\''
+
", circleNo='"
+
circleNo
+
'\''
+
", raiseType='"
+
raiseType
+
'\''
+
", raiseType='"
+
raiseType
+
'\''
+
", raiseVarieties='"
+
raiseVarieties
+
'\''
+
", raiseVarieties='"
+
raiseVarieties
+
'\''
+
", birthdate='"
+
birthdate
+
'\''
+
", birthdate='"
+
birthdate
+
'\''
+
", birthHeavy=
'"
+
birthHeavy
+
'\''
+
", birthHeavy=
"
+
birthHeavy
+
", sex='"
+
sex
+
'\''
+
", sex='"
+
sex
+
'\''
+
", birthDifficulty='"
+
birthDifficulty
+
'\''
+
", birthDifficulty='"
+
birthDifficulty
+
'\''
+
", isTwins='"
+
isTwins
+
'\''
+
", isTwins='"
+
isTwins
+
'\''
+
...
@@ -560,15 +622,18 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
...
@@ -560,15 +622,18 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
", grade='"
+
grade
+
'\''
+
", grade='"
+
grade
+
'\''
+
", fatherReg='"
+
fatherReg
+
'\''
+
", fatherReg='"
+
fatherReg
+
'\''
+
", motherReg='"
+
motherReg
+
'\''
+
", motherReg='"
+
motherReg
+
'\''
+
", fromMilkHeavy=
'"
+
fromMilkHeavy
+
'\''
+
", fromMilkHeavy=
"
+
fromMilkHeavy
+
", health='"
+
health
+
'\''
+
", health='"
+
health
+
'\''
+
", junHeavy='"
+
junHeavy
+
'\''
+
", junHeavy='"
+
junHeavy
+
'\''
+
", decAppScore='"
+
decAppScore
+
'\''
+
", decAppScore='"
+
decAppScore
+
'\''
+
", photo='"
+
photo
+
'\''
+
", photo='"
+
photo
+
'\''
+
", status='"
+
status
+
'\''
+
", status='"
+
status
+
'\''
+
", isOut='"
+
isOut
+
'\''
+
", isOut="
+
isOut
+
", age="
+
age
+
", colour='"
+
colour
+
'\''
+
", inputTime='"
+
inputTime
+
'\''
+
", inputTime='"
+
inputTime
+
'\''
+
", deptId='"
+
deptId
+
'\''
+
", deptId="
+
deptId
+
", deptName="
+
deptName
+
", uploadStatus='"
+
uploadStatus
+
'\''
+
", uploadStatus='"
+
uploadStatus
+
'\''
+
", uploadTime='"
+
uploadTime
+
'\''
+
", uploadTime='"
+
uploadTime
+
'\''
+
", createBy='"
+
createBy
+
'\''
+
", createBy='"
+
createBy
+
'\''
+
...
...
app/src/main/java/com/phlx/anchorcollect/entity/DeptEntity.java
0 → 100644
View file @
98c33772
package
com
.
phlx
.
anchorcollect
.
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/entity/UserEntity.java
View file @
98c33772
...
@@ -15,7 +15,6 @@ import java.util.List;
...
@@ -15,7 +15,6 @@ import java.util.List;
* @author ruoyi
* @author ruoyi
*/
*/
public
class
UserEntity
extends
BaseObservable
implements
Parcelable
{
public
class
UserEntity
extends
BaseObservable
implements
Parcelable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 用户ID */
/** 用户ID */
private
String
userId
;
private
String
userId
;
...
@@ -71,9 +70,9 @@ public class UserEntity extends BaseObservable implements Parcelable {
...
@@ -71,9 +70,9 @@ public class UserEntity extends BaseObservable implements Parcelable {
/** 密码最后更新时间 */
/** 密码最后更新时间 */
private
String
pwdUpdateDate
;
private
String
pwdUpdateDate
;
//
/** 部门对象 */
/** 部门对象 */
// private SysDept
dept;
private
DeptEntity
dept
;
//
private
List
<
UserRoleEntity
>
roles
;
private
List
<
UserRoleEntity
>
roles
;
/** 角色组 */
/** 角色组 */
...
@@ -105,6 +104,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
...
@@ -105,6 +104,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
loginIp
=
in
.
readString
();
loginIp
=
in
.
readString
();
loginDate
=
in
.
readString
();
loginDate
=
in
.
readString
();
pwdUpdateDate
=
in
.
readString
();
pwdUpdateDate
=
in
.
readString
();
dept
=
in
.
readParcelable
(
DeptEntity
.
class
.
getClassLoader
());
roles
=
in
.
createTypedArrayList
(
UserRoleEntity
.
CREATOR
);
roles
=
in
.
createTypedArrayList
(
UserRoleEntity
.
CREATOR
);
}
}
...
@@ -128,6 +128,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
...
@@ -128,6 +128,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
dest
.
writeString
(
loginIp
);
dest
.
writeString
(
loginIp
);
dest
.
writeString
(
loginDate
);
dest
.
writeString
(
loginDate
);
dest
.
writeString
(
pwdUpdateDate
);
dest
.
writeString
(
pwdUpdateDate
);
dest
.
writeParcelable
(
dept
,
flags
);
dest
.
writeTypedList
(
roles
);
dest
.
writeTypedList
(
roles
);
}
}
...
@@ -148,10 +149,6 @@ public class UserEntity extends BaseObservable implements Parcelable {
...
@@ -148,10 +149,6 @@ public class UserEntity extends BaseObservable implements Parcelable {
}
}
};
};
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
String
getUserId
()
{
public
String
getUserId
()
{
return
userId
;
return
userId
;
}
}
...
@@ -296,6 +293,14 @@ public class UserEntity extends BaseObservable implements Parcelable {
...
@@ -296,6 +293,14 @@ public class UserEntity extends BaseObservable implements Parcelable {
this
.
pwdUpdateDate
=
pwdUpdateDate
;
this
.
pwdUpdateDate
=
pwdUpdateDate
;
}
}
public
DeptEntity
getDept
()
{
return
dept
;
}
public
void
setDept
(
DeptEntity
dept
)
{
this
.
dept
=
dept
;
}
public
List
<
UserRoleEntity
>
getRoles
()
{
public
List
<
UserRoleEntity
>
getRoles
()
{
return
roles
;
return
roles
;
}
}
...
@@ -307,10 +312,10 @@ public class UserEntity extends BaseObservable implements Parcelable {
...
@@ -307,10 +312,10 @@ public class UserEntity extends BaseObservable implements Parcelable {
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"UserEntity{"
+
return
"UserEntity{"
+
"userId=
"
+
userId
+
"userId=
'"
+
userId
+
'\''
+
", deptId=
"
+
deptId
+
", deptId=
'"
+
deptId
+
'\''
+
", parentId=
"
+
parentId
+
", parentId=
'"
+
parentId
+
'\''
+
", roleId=
"
+
roleId
+
", roleId=
'"
+
roleId
+
'\''
+
", loginName='"
+
loginName
+
'\''
+
", loginName='"
+
loginName
+
'\''
+
", userName='"
+
userName
+
'\''
+
", userName='"
+
userName
+
'\''
+
", userType='"
+
userType
+
'\''
+
", userType='"
+
userType
+
'\''
+
...
@@ -325,6 +330,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
...
@@ -325,6 +330,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
", loginIp='"
+
loginIp
+
'\''
+
", loginIp='"
+
loginIp
+
'\''
+
", loginDate='"
+
loginDate
+
'\''
+
", loginDate='"
+
loginDate
+
'\''
+
", pwdUpdateDate='"
+
pwdUpdateDate
+
'\''
+
", pwdUpdateDate='"
+
pwdUpdateDate
+
'\''
+
", dept="
+
dept
+
", roles="
+
roles
+
", roles="
+
roles
+
'}'
;
'}'
;
}
}
...
...
app/src/main/java/com/phlx/anchorcollect/net/RetrofitClient.java
View file @
98c33772
...
@@ -50,15 +50,15 @@ public class RetrofitClient {
...
@@ -50,15 +50,15 @@ public class RetrofitClient {
private
static
final
int
CACHE_TIMEOUT
=
10
*
1024
*
1024
;
private
static
final
int
CACHE_TIMEOUT
=
10
*
1024
*
1024
;
//服务端根路径
//服务端根路径
public
static
String
baseUrl
=
public
static
String
baseUrl
=
"serve.xlglmnmyzspt.org.cn"
//正式
//
"serve.xlglmnmyzspt.org.cn"//正式
// "39.101.170.186"//阿里云测试
// "39.101.170.186"//阿里云测试
//
"192.168.8.135"//董
"192.168.8.135"
//董
// "192.168.43.154"//张敏
// "192.168.43.154"//张敏
;
;
public
static
String
port
=
public
static
String
port
=
""
//正式
//
""//正式
// "9000"//阿里云测试
// "9000"//阿里云测试
//
"9000"//董
"9000"
//董
;
;
private
static
Context
mContext
=
Utils
.
getContext
();
private
static
Context
mContext
=
Utils
.
getContext
();
...
...
app/src/main/java/com/phlx/anchorcollect/ui/fragment/BreedingRecordFragment.java
View file @
98c33772
...
@@ -97,7 +97,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
...
@@ -97,7 +97,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
viewModel
.
initGen
();
viewModel
.
initGen
();
binding
.
rvCollect
.
addItemDecoration
(
new
SpaceItemDecoration
(
10
));
//
binding.rvCollect.addItemDecoration(new SpaceItemDecoration(10));
binding
.
rvCollectDetail
.
addItemDecoration
(
new
SpaceItemDecoration
(
10
));
binding
.
rvCollectDetail
.
addItemDecoration
(
new
SpaceItemDecoration
(
10
));
initTimePicker
();
initTimePicker
();
...
@@ -154,7 +154,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
...
@@ -154,7 +154,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
gtc
.
notifyChange
();
gtc
.
notifyChange
();
}
}
viewModel
.
remarkParamEntity
.
notifyChange
();
viewModel
.
remarkParamEntity
.
notifyChange
();
binding
.
rvCollect
.
getAdapter
().
notifyDataSetChanged
();
//
binding.rvCollect.getAdapter().notifyDataSetChanged();
binding
.
rvCollectDetail
.
getAdapter
().
notifyDataSetChanged
();
binding
.
rvCollectDetail
.
getAdapter
().
notifyDataSetChanged
();
if
(
aBoolean
)
{
if
(
aBoolean
)
{
...
@@ -383,7 +383,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
...
@@ -383,7 +383,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
//初始化表头
//初始化表头
List
<
String
>
headerStr
=
new
ArrayList
<>();
List
<
String
>
headerStr
=
new
ArrayList
<>();
List
<
String
>
fieldNameStr
=
new
ArrayList
<>();
List
<
String
>
fieldNameStr
=
new
ArrayList
<>();
for
(
GenTableColumn
gtc
:
Configs
.
cattlematingDetaill
)
{
for
(
GenTableColumn
gtc
:
Configs
.
cattlematingDetaill
List
)
{
if
(
"1"
.
equals
(
gtc
.
getIsList
()))
{
if
(
"1"
.
equals
(
gtc
.
getIsList
()))
{
headerStr
.
add
(
gtc
.
getColumnComment
());
headerStr
.
add
(
gtc
.
getColumnComment
());
fieldNameStr
.
add
(
gtc
.
getJavaField
());
fieldNameStr
.
add
(
gtc
.
getJavaField
());
...
@@ -465,7 +465,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
...
@@ -465,7 +465,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
if
(
this
!=
null
&&
!
hidden
)
{
if
(
this
!=
null
&&
!
hidden
)
{
viewModel
.
clearParamList
();
viewModel
.
clearParamList
();
viewModel
.
clearDetailParamList
();
viewModel
.
clearDetailParamList
();
viewModel
.
query
BreedingRecord
();
viewModel
.
init
BreedingRecord
();
viewModel
.
rfid
.
set
(
Configs
.
tempRfid
);
viewModel
.
rfid
.
set
(
Configs
.
tempRfid
);
}
else
{
}
else
{
viewModel
.
rfid
.
set
(
""
);
viewModel
.
rfid
.
set
(
""
);
...
...
app/src/main/java/com/phlx/anchorcollect/ui/fragment/vm/BreedingRecordVM.java
View file @
98c33772
This diff is collapsed.
Click to expand it.
app/src/main/java/com/phlx/anchorcollect/ui/fragment/vm/PerformanceVM.java
View file @
98c33772
...
@@ -26,6 +26,7 @@ import com.phlx.anchorcollect.entity.DictEntity;
...
@@ -26,6 +26,7 @@ import com.phlx.anchorcollect.entity.DictEntity;
import
com.phlx.anchorcollect.entity.GenTableColumn
;
import
com.phlx.anchorcollect.entity.GenTableColumn
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
import
com.phlx.anchorcollect.ui.fragment.list.CollectGridItem
;
import
com.phlx.anchorcollect.ui.fragment.list.CollectGridItem
;
import
com.phlx.anchorcollect.util.DateUtils
;
import
com.phlx.anchorcollect.util.EntityUtils
;
import
com.phlx.anchorcollect.util.EntityUtils
;
import
com.phlx.anchorcollect.util.StringUtil
;
import
com.phlx.anchorcollect.util.StringUtil
;
...
@@ -119,7 +120,7 @@ public class PerformanceVM extends BaseViewModel<Repository> {
...
@@ -119,7 +120,7 @@ public class PerformanceVM extends BaseViewModel<Repository> {
}
}
public
void
refreshWeight
(){
public
void
refreshWeight
()
{
for
(
GenTableColumn
gtc
:
Configs
.
performance
)
{
for
(
GenTableColumn
gtc
:
Configs
.
performance
)
{
//强制赋值为扫标签时的重量
//强制赋值为扫标签时的重量
...
@@ -252,11 +253,11 @@ public class PerformanceVM extends BaseViewModel<Repository> {
...
@@ -252,11 +253,11 @@ public class PerformanceVM extends BaseViewModel<Repository> {
}
}
}
}
save
Performance
();
check
Performance
();
}
}
});
});
private
void
save
Performance
()
{
private
void
check
Performance
()
{
JsonObject
jsonObject
=
new
JsonObject
();
JsonObject
jsonObject
=
new
JsonObject
();
for
(
GenTableColumn
gtc
:
Configs
.
performance
)
{
for
(
GenTableColumn
gtc
:
Configs
.
performance
)
{
...
@@ -277,6 +278,35 @@ public class PerformanceVM extends BaseViewModel<Repository> {
...
@@ -277,6 +278,35 @@ public class PerformanceVM extends BaseViewModel<Repository> {
Gson
gson
=
new
Gson
();
Gson
gson
=
new
Gson
();
PerformanceEntity
performanceEntity
=
gson
.
fromJson
(
jsonObject
,
PerformanceEntity
.
class
);
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"
);
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(!
isModify
)
{
//新增
if
(!
isModify
)
{
//新增
uuid
=
IdUtil
.
createSnowflake
(
3
,
1
).
nextId
();
uuid
=
IdUtil
.
createSnowflake
(
3
,
1
).
nextId
();
...
@@ -325,6 +355,7 @@ public class PerformanceVM extends BaseViewModel<Repository> {
...
@@ -325,6 +355,7 @@ public class PerformanceVM extends BaseViewModel<Repository> {
remarkParamEntity
.
setShowName
(
""
);
remarkParamEntity
.
setShowName
(
""
);
currentParamEntity
=
new
GenTableColumn
();
currentParamEntity
=
new
GenTableColumn
();
uuid
=
0
;
uuid
=
0
;
refreshWeight
();
for
(
GenTableColumn
gtc
:
Configs
.
performance
)
{
for
(
GenTableColumn
gtc
:
Configs
.
performance
)
{
gtc
.
setShowName
(
""
);
gtc
.
setShowName
(
""
);
gtc
.
setContent
(
""
);
gtc
.
setContent
(
""
);
...
...
app/src/main/java/com/phlx/anchorcollect/ui/info/CattleVM.java
View file @
98c33772
...
@@ -154,6 +154,8 @@ public class CattleVM extends BackBarVM<Repository> {
...
@@ -154,6 +154,8 @@ public class CattleVM extends BackBarVM<Repository> {
}
}
}).
queryAsyncAll
(
ImmuneBatchEntity
.
class
,
builder
);
}).
queryAsyncAll
(
ImmuneBatchEntity
.
class
,
builder
);
}
}
}
else
{
observableRefreshList
.
setValue
(
2
);
}
}
}
}
...
...
app/src/main/java/com/phlx/anchorcollect/ui/login/LoginVM.java
View file @
98c33772
...
@@ -157,6 +157,7 @@ public class LoginVM extends BaseViewModel<Repository> {
...
@@ -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_NAME
,
response
.
getData
().
getUser
().
getUserName
());
SPUtils
.
getInstance
().
put
(
Configs
.
SP_LOGIN_NAME
,
response
.
getData
().
getUser
().
getLoginName
());
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_ID
,
response
.
getData
().
getUser
().
getDeptId
());
SPUtils
.
getInstance
().
put
(
Configs
.
SP_DEPT_NAME
,
response
.
getData
().
getUser
().
getDept
().
getDeptName
());
String
roleIds
=
""
;
String
roleIds
=
""
;
List
<
UserRoleEntity
>
roles
=
response
.
getData
().
getUser
().
getRoles
();
List
<
UserRoleEntity
>
roles
=
response
.
getData
().
getUser
().
getRoles
();
...
@@ -295,9 +296,18 @@ public class LoginVM extends BaseViewModel<Repository> {
...
@@ -295,9 +296,18 @@ public class LoginVM extends BaseViewModel<Repository> {
QueryBuilder
<
GenTableColumn
>
builderDetaile6
=
QueryBuilder
<
GenTableColumn
>
builderDetaile6
=
DbUtil
.
getInstance
().
getQueryBuilder
(
GenTableColumn
.
class
)
DbUtil
.
getInstance
().
getQueryBuilder
(
GenTableColumn
.
class
)
.
where
(
GenTableColumnDao
.
Properties
.
TableId
.
eq
(
gt
.
getTableId
())
.
where
(
GenTableColumnDao
.
Properties
.
TableId
.
eq
(
gt
.
getTableId
())
,
GenTableColumnDao
.
Properties
.
IsQuery
.
eq
(
"1"
))
,
GenTableColumnDao
.
Properties
.
IsQuery
.
eq
(
"1"
)
)
.
orderAsc
(
GenTableColumnDao
.
Properties
.
Sort
);
.
orderAsc
(
GenTableColumnDao
.
Properties
.
Sort
);
Configs
.
cattlematingDetaill
=
DbUtil
.
getInstance
().
queryAll
(
GenTableColumn
.
class
,
builderDetaile6
);
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
;
break
;
}
}
...
...
app/src/main/java/com/phlx/anchorcollect/ui/main/MainActivity.java
View file @
98c33772
...
@@ -213,6 +213,7 @@ public class MainActivity extends BaseActivity<ActivityMainBinding, MainVM> {
...
@@ -213,6 +213,7 @@ public class MainActivity extends BaseActivity<ActivityMainBinding, MainVM> {
viewModel
.
onTabClickEvent
.
observe
(
this
,
new
Observer
<
Integer
>()
{
viewModel
.
onTabClickEvent
.
observe
(
this
,
new
Observer
<
Integer
>()
{
@Override
@Override
public
void
onChanged
(
Integer
integer
)
{
public
void
onChanged
(
Integer
integer
)
{
Configs
.
resumeId
=
null
;
labelSwitching
(
integer
);
labelSwitching
(
integer
);
Configs
.
mainPosition
=
integer
;
Configs
.
mainPosition
=
integer
;
...
...
app/src/main/java/com/phlx/anchorcollect/ui/setting/SyncVM.java
View file @
98c33772
This diff is collapsed.
Click to expand it.
app/src/main/java/com/phlx/anchorcollect/ui/splash/SplashVM.java
View file @
98c33772
...
@@ -25,6 +25,7 @@ import com.phlx.anchorcollect.util.StringUtil;
...
@@ -25,6 +25,7 @@ import com.phlx.anchorcollect.util.StringUtil;
import
org.greenrobot.greendao.query.QueryBuilder
;
import
org.greenrobot.greendao.query.QueryBuilder
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.functions.Consumer
;
...
@@ -220,9 +221,18 @@ public class SplashVM extends MainBarVM<Repository> {
...
@@ -220,9 +221,18 @@ public class SplashVM extends MainBarVM<Repository> {
QueryBuilder
<
GenTableColumn
>
builderDetaile6
=
QueryBuilder
<
GenTableColumn
>
builderDetaile6
=
DbUtil
.
getInstance
().
getQueryBuilder
(
GenTableColumn
.
class
)
DbUtil
.
getInstance
().
getQueryBuilder
(
GenTableColumn
.
class
)
.
where
(
GenTableColumnDao
.
Properties
.
TableId
.
eq
(
gt
.
getTableId
())
.
where
(
GenTableColumnDao
.
Properties
.
TableId
.
eq
(
gt
.
getTableId
())
,
GenTableColumnDao
.
Properties
.
IsQuery
.
eq
(
"1"
))
,
GenTableColumnDao
.
Properties
.
IsQuery
.
eq
(
"1"
)
)
.
orderAsc
(
GenTableColumnDao
.
Properties
.
Sort
);
.
orderAsc
(
GenTableColumnDao
.
Properties
.
Sort
);
Configs
.
cattlematingDetaill
=
DbUtil
.
getInstance
().
queryAll
(
GenTableColumn
.
class
,
builderDetaile6
);
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
;
break
;
}
}
...
...
app/src/main/res/layout/activity_sync.xml
View file @
98c33772
...
@@ -441,6 +441,18 @@
...
@@ -441,6 +441,18 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatButton
android:id=
"@+id/btn_one_click_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_150"
binding:layout_constraintLeft_toLeftOf=
"parent"
binding:layout_constraintBottom_toBottomOf=
"parent"
binding:onClickCommand=
"@{viewModel.OnOneClickUploadClickCommand}"
/>
<androidx.appcompat.widget.AppCompatButton
<androidx.appcompat.widget.AppCompatButton
android:id=
"@+id/btn_error_data_upload"
android:id=
"@+id/btn_error_data_upload"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/fragment_breeding_record.xml
View file @
98c33772
...
@@ -60,21 +60,89 @@
...
@@ -60,21 +60,89 @@
binding:layout_constraintRight_toRightOf=
"parent"
binding:layout_constraintRight_toRightOf=
"parent"
binding:layout_constraintTop_toTopOf=
"parent"
/>
binding:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.
recyclerview.widget.RecyclerView
<androidx.
appcompat.widget.LinearLayoutCompat
android:id=
"@+id/rv_collect"
android:id=
"@+id/rv_collect"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"-5dp"
android:orientation=
"horizontal"
android:layout_marginTop=
"5dp"
android:nestedScrollingEnabled=
"false"
binding:adapter=
"@{adapter}"
binding:itemBinding=
"@{viewModel.itemBinding}"
binding:items=
"@{viewModel.observableList}"
binding:layoutManager=
"@{LayoutManagers.grid(5)}"
binding:layout_constraintBottom_toTopOf=
"@+id/ll_detail_title"
binding:layout_constraintBottom_toTopOf=
"@+id/ll_detail_title"
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/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_112"
android:layout_height=
"@dimen/dp_45"
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_8"
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_8"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/cl_title_2"
android:layout_width=
"@dimen/dp_112"
android:layout_height=
"@dimen/dp_45"
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_8"
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_8"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<com.lingber.mycontrol.datagridview.DataGridView
<com.lingber.mycontrol.datagridview.DataGridView
android:id=
"@+id/ll_detail_title"
android:id=
"@+id/ll_detail_title"
...
...
app/src/main/res/values/strings.xml
View file @
98c33772
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
<string
name=
"error_data_upload"
>
错误上报
</string>
<string
name=
"error_data_upload"
>
错误上报
</string>
<string
name=
"one_click_sync"
>
一键同步
</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