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
Show 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 {
}
greendao
{
schemaVersion
1
//数据库版本号
schemaVersion
3
//数据库版本号
daoPackage
'com.phlx.anchorcollect.db.gen'
targetGenDir
'src/main/java'
}
...
...
app/src/main/java/com/phlx/anchorcollect/Configs.java
View file @
98c33772
...
...
@@ -53,6 +53,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"
;
...
...
@@ -112,6 +113,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/db/gen/DaoMaster.java
View file @
98c33772
...
...
@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
// 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
static
final
int
SCHEMA_VERSION
=
1
;
public
static
final
int
SCHEMA_VERSION
=
3
;
/** Creates underlying database table using DAOs. */
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
*/
private
Long
deptId
;
/**
* 部门id
*/
private
Long
caId
;
/** 是否上传 0未上传,1已上传 */
private
String
uploadStatus
;
...
...
@@ -129,6 +134,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
();
...
...
@@ -138,10 +148,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
;
...
...
@@ -154,6 +164,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
;
...
...
@@ -196,6 +207,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
);
...
...
@@ -310,6 +327,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
;
}
...
...
@@ -369,17 +394,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
+
'\''
+
...
...
@@ -397,6 +423,4 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
public
void
setFUnid
(
Long
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 {
/** 是否淘汰;0,在用,1淘汰 */
private
Long
isOut
;
/**
* 母牛年龄
*/
private
Integer
age
;
/** 犊牛毛色 */
private
String
colour
;
/** 时间戳 */
private
String
inputTime
;
/** 部门id */
private
Long
deptId
;
/** 所属种蓄站*/
private
Long
deptName
;
/** 是否上传 0未上传,1已上传 */
private
String
uploadStatus
;
...
...
@@ -157,12 +168,23 @@ 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
;
}
else
{
deptId
=
in
.
readLong
();
}
if
(
in
.
readByte
()
==
0
)
{
deptName
=
null
;
}
else
{
deptName
=
in
.
readLong
();
}
uploadStatus
=
in
.
readString
();
uploadTime
=
in
.
readString
();
createBy
=
in
.
readString
();
...
...
@@ -172,14 +194,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
remark
=
in
.
readString
();
}
@Generated
(
hash
=
2055075095
)
@Generated
(
hash
=
1106807371
)
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
status
,
Long
isOut
,
String
inputTime
,
Long
deptId
,
String
uploadStatus
,
String
uploadTime
,
String
createBy
,
String
createTime
,
String
updateBy
,
String
updateTime
,
String
remark
)
{
String
photo
,
String
status
,
Long
isOut
,
Integer
age
,
String
colour
,
String
inputTime
,
Long
deptId
,
Long
deptName
,
String
uploadStatus
,
String
uploadTime
,
String
createBy
,
String
createTime
,
String
updateBy
,
String
updateTime
,
String
remark
)
{
this
.
unid
=
unid
;
this
.
registrationNo
=
registrationNo
;
this
.
individualNo
=
individualNo
;
...
...
@@ -202,8 +224,11 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
this
.
photo
=
photo
;
this
.
status
=
status
;
this
.
isOut
=
isOut
;
this
.
age
=
age
;
this
.
colour
=
colour
;
this
.
inputTime
=
inputTime
;
this
.
deptId
=
deptId
;
this
.
deptName
=
deptName
;
this
.
uploadStatus
=
uploadStatus
;
this
.
uploadTime
=
uploadTime
;
this
.
createBy
=
createBy
;
...
...
@@ -257,6 +282,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
);
...
...
@@ -264,6 +296,12 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
deptId
);
}
if
(
deptName
==
null
)
{
dest
.
writeByte
((
byte
)
0
);
}
else
{
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
deptName
);
}
dest
.
writeString
(
uploadStatus
);
dest
.
writeString
(
uploadTime
);
dest
.
writeString
(
createBy
);
...
...
@@ -470,6 +508,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
;
}
...
...
@@ -486,6 +540,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
this
.
deptId
=
deptId
;
}
public
Long
getDeptName
()
{
return
deptName
;
}
public
void
setDeptName
(
Long
deptName
)
{
this
.
deptName
=
deptName
;
}
public
String
getUploadStatus
()
{
return
uploadStatus
;
}
...
...
@@ -545,14 +607,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
@Override
public
String
toString
()
{
return
"CattleResumeEntity{"
+
"unid=
'"
+
unid
+
'\''
+
"unid=
"
+
unid
+
", registrationNo='"
+
registrationNo
+
'\''
+
", individualNo='"
+
individualNo
+
'\''
+
", circleNo='"
+
circleNo
+
'\''
+
", raiseType='"
+
raiseType
+
'\''
+
", raiseVarieties='"
+
raiseVarieties
+
'\''
+
", birthdate='"
+
birthdate
+
'\''
+
", birthHeavy=
'"
+
birthHeavy
+
'\''
+
", birthHeavy=
"
+
birthHeavy
+
", sex='"
+
sex
+
'\''
+
", birthDifficulty='"
+
birthDifficulty
+
'\''
+
", isTwins='"
+
isTwins
+
'\''
+
...
...
@@ -560,15 +622,18 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
", grade='"
+
grade
+
'\''
+
", fatherReg='"
+
fatherReg
+
'\''
+
", motherReg='"
+
motherReg
+
'\''
+
", fromMilkHeavy=
'"
+
fromMilkHeavy
+
'\''
+
", fromMilkHeavy=
"
+
fromMilkHeavy
+
", health='"
+
health
+
'\''
+
", junHeavy='"
+
junHeavy
+
'\''
+
", decAppScore='"
+
decAppScore
+
'\''
+
", photo='"
+
photo
+
'\''
+
", status='"
+
status
+
'\''
+
", isOut='"
+
isOut
+
'\''
+
", isOut="
+
isOut
+
", age="
+
age
+
", colour='"
+
colour
+
'\''
+
", inputTime='"
+
inputTime
+
'\''
+
", deptId='"
+
deptId
+
'\''
+
", deptId="
+
deptId
+
", deptName="
+
deptName
+
", uploadStatus='"
+
uploadStatus
+
'\''
+
", uploadTime='"
+
uploadTime
+
'\''
+
", 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;
* @author ruoyi
*/
public
class
UserEntity
extends
BaseObservable
implements
Parcelable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 用户ID */
private
String
userId
;
...
...
@@ -71,9 +70,9 @@ public class UserEntity extends BaseObservable implements Parcelable {
/** 密码最后更新时间 */
private
String
pwdUpdateDate
;
//
/** 部门对象 */
// private SysDept
dept;
//
/** 部门对象 */
private
DeptEntity
dept
;
private
List
<
UserRoleEntity
>
roles
;
/** 角色组 */
...
...
@@ -105,6 +104,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
);
}
...
...
@@ -128,6 +128,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
dest
.
writeString
(
loginIp
);
dest
.
writeString
(
loginDate
);
dest
.
writeString
(
pwdUpdateDate
);
dest
.
writeParcelable
(
dept
,
flags
);
dest
.
writeTypedList
(
roles
);
}
...
...
@@ -148,10 +149,6 @@ public class UserEntity extends BaseObservable implements Parcelable {
}
};
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
String
getUserId
()
{
return
userId
;
}
...
...
@@ -296,6 +293,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
;
}
...
...
@@ -307,10 +312,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
+
'\''
+
...
...
@@ -325,6 +330,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/net/RetrofitClient.java
View file @
98c33772
...
...
@@ -50,15 +50,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/ui/fragment/BreedingRecordFragment.java
View file @
98c33772
...
...
@@ -97,7 +97,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
();
...
...
@@ -154,7 +154,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
)
{
...
...
@@ -383,7 +383,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
());
...
...
@@ -465,7 +465,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/ui/fragment/vm/BreedingRecordVM.java
View file @
98c33772
...
...
@@ -3,6 +3,7 @@ package com.phlx.anchorcollect.ui.fragment.vm;
import
android.app.Application
;
import
android.graphics.drawable.Drawable
;
import
android.os.Environment
;
import
android.util.Log
;
import
androidx.annotation.NonNull
;
import
androidx.databinding.ObservableArrayList
;
...
...
@@ -18,11 +19,13 @@ import com.phlx.anchorcollect.data.Repository;
import
com.phlx.anchorcollect.db.DbUtil
;
import
com.phlx.anchorcollect.db.gen.BreedingRecordDetailEntityDao
;
import
com.phlx.anchorcollect.db.gen.BreedingRecordEntityDao
;
import
com.phlx.anchorcollect.db.gen.CattleResumeEntityDao
;
import
com.phlx.anchorcollect.db.gen.DictEntityDao
;
import
com.phlx.anchorcollect.db.interf.DbIDUCallBack
;
import
com.phlx.anchorcollect.db.interf.DbQueryCallBack
;
import
com.phlx.anchorcollect.entity.BreedingRecordDetailEntity
;
import
com.phlx.anchorcollect.entity.BreedingRecordEntity
;
import
com.phlx.anchorcollect.entity.CattleResumeEntity
;
import
com.phlx.anchorcollect.entity.DictEntity
;
import
com.phlx.anchorcollect.entity.GenTableColumn
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
...
...
@@ -33,8 +36,10 @@ import com.phlx.anchorcollect.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
;
...
...
@@ -79,6 +84,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
;
...
...
@@ -122,12 +131,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
>()
{
...
...
@@ -169,38 +215,39 @@ 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
);
}
...
...
@@ -279,7 +326,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
)
{
...
...
@@ -314,8 +363,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
.
cattlematingDetaillList
)
{
if
(
name
.
equals
(
gtc
.
getJavaField
()))
{
try
{
// Log.e("key:", name);
...
...
@@ -348,7 +396,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
())
{
...
...
@@ -515,7 +563,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
));
...
...
@@ -524,14 +572,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
);
...
...
@@ -572,5 +636,9 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
gtc
.
setShowName
(
""
);
gtc
.
setContent
(
""
);
}
for
(
GenTableColumn
gtc
:
Configs
.
cattlematingDetaillList
)
{
gtc
.
setShowName
(
""
);
gtc
.
setContent
(
""
);
}
}
}
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;
import
com.phlx.anchorcollect.entity.GenTableColumn
;
import
com.phlx.anchorcollect.entity.PerformanceEntity
;
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.StringUtil
;
...
...
@@ -119,7 +120,7 @@ public class PerformanceVM extends BaseViewModel<Repository> {
}
public
void
refreshWeight
(){
public
void
refreshWeight
()
{
for
(
GenTableColumn
gtc
:
Configs
.
performance
)
{
//强制赋值为扫标签时的重量
...
...
@@ -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
();
for
(
GenTableColumn
gtc
:
Configs
.
performance
)
{
...
...
@@ -277,6 +278,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
();
...
...
@@ -325,6 +355,7 @@ public class PerformanceVM extends BaseViewModel<Repository> {
remarkParamEntity
.
setShowName
(
""
);
currentParamEntity
=
new
GenTableColumn
();
uuid
=
0
;
refreshWeight
();
for
(
GenTableColumn
gtc
:
Configs
.
performance
)
{
gtc
.
setShowName
(
""
);
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> {
}
}).
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> {
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/ui/main/MainActivity.java
View file @
98c33772
...
...
@@ -213,6 +213,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/ui/setting/SyncVM.java
View file @
98c33772
...
...
@@ -113,63 +113,71 @@ public class SyncVM extends BaseViewModel<Repository> {
public
BindingCommand
OnBaseArchivesSyncClickCommand
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
public
void
call
()
{
requestBaseArchives
();
//
requestBaseArchives();
}
});
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
(
"正在一键同步数据..."
);
requestBaseArchives
();
}
});
...
...
@@ -201,7 +209,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
)
{
...
...
@@ -241,8 +249,8 @@ public class SyncVM extends BaseViewModel<Repository> {
}).
insertAsyncBatch
(
CattleResumeEntity
.
class
,
response
.
getData
());
}
else
{
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步基础数据成功!"
);
queryCattleResumeUploadCount
(
false
,
"0"
);
dismissDialog
();
queryCattleResumeUploadCount
(
false
,
UPLOAD_STATUS_HAVE_NOT
);
//
dismissDialog();
}
}
else
if
(
response
.
getCode
()
==
401
)
{
...
...
@@ -350,7 +358,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
}).
insertAsyncBatch
(
PerformanceEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
//
dismissDialog();
ToastUtils
.
showShort
(
"性能测定数据同步完成!"
);
queryPerformanceUploadCount
(
false
,
"0"
);
}
...
...
@@ -454,7 +462,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步性能测定数据..."))
.
subscribe
((
Consumer
<
ListResponse
<
Long
>>)
response
->
{
dismissDialog
();
//
dismissDialog();
KLog
.
e
(
"requestSignMeasureSync"
,
response
.
toString
());
//先都设置成错误数据
for
(
PerformanceEntity
pe
:
performanceEntities
)
{
...
...
@@ -551,7 +559,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
}).
insertAsyncBatch
(
BreedingRecordEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步配种主表数据成功!"
);
queryBreedingRecordUploadCount
(
false
,
"0"
);
}
...
...
@@ -686,7 +694,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
();
}
...
...
@@ -748,7 +756,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
}).
insertAsyncBatch
(
BreedingRecordDetailEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步配种记录子表数据成功!"
);
queryBreedingRecordDetailUploadCount
(
false
,
"0"
);
}
...
...
@@ -883,7 +891,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
();
}
...
...
@@ -947,7 +955,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}).
insertAsyncBatch
(
WeightManEntity
.
class
,
response
.
getData
());
}
else
{
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步称重管理数据成功!"
);
dismissDialog
();
//
dismissDialog();
queryWeightManUploadCount
(
false
,
"0"
);
}
...
...
@@ -1144,7 +1152,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
}).
insertAsyncBatch
(
MedicalRecordEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步诊疗记录数据成功!"
);
queryMedicalRecordUploadCount
(
false
,
"0"
);
}
...
...
@@ -1183,7 +1191,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
();
...
...
@@ -1280,7 +1288,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
();
}
...
...
@@ -1343,7 +1351,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
}).
insertAsyncBatch
(
ImmuneBatchEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步免疫记录-主表数据成功!"
);
queryImmuneBatchUploadCount
(
false
,
"0"
);
}
...
...
@@ -1384,7 +1392,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
();
...
...
@@ -1481,7 +1489,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
();
}
...
...
@@ -1544,7 +1552,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}
}).
insertAsyncBatch
(
ImmuneBatchDetailEntity
.
class
,
response
.
getData
());
}
else
{
dismissDialog
();
//
dismissDialog();
me
.
goldze
.
mvvmhabit
.
utils
.
ToastUtils
.
showShort
(
"同步免疫记录-子表数据成功!"
);
queryImmuneBatchDetailUploadCount
(
false
,
"0"
);
}
...
...
@@ -1583,7 +1591,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
();
...
...
@@ -1680,7 +1688,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
();
}
...
...
@@ -1734,6 +1742,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
);
}
...
...
@@ -1768,9 +1778,12 @@ 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
);
...
...
@@ -1809,6 +1822,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
);
...
...
@@ -1847,6 +1862,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
);
...
...
@@ -1885,6 +1902,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
);
...
...
@@ -1923,6 +1942,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
);
...
...
@@ -1961,6 +1982,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
);
...
...
@@ -1999,6 +2022,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就停止
if
(
UPLOAD_STATUS_HAVE_NOT
.
equals
(
uploadType
))
{
queryBreedingRecordDetailUploadCount
(
isContinue
,
UPLOAD_STATUS_ERROR
);
}
else
{
dismissDialog
();
}
...
...
app/src/main/java/com/phlx/anchorcollect/ui/splash/SplashVM.java
View file @
98c33772
...
...
@@ -25,6 +25,7 @@ import com.phlx.anchorcollect.util.StringUtil;
import
org.greenrobot.greendao.query.QueryBuilder
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
io.reactivex.functions.Consumer
;
...
...
@@ -220,9 +221,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 @
98c33772
...
...
@@ -441,6 +441,18 @@
</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
android:id=
"@+id/btn_error_data_upload"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/fragment_breeding_record.xml
View file @
98c33772
...
...
@@ -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(5)}"
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_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
android:id=
"@+id/ll_detail_title"
...
...
app/src/main/res/values/strings.xml
View file @
98c33772
...
...
@@ -28,6 +28,7 @@
<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