Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
W
WoolTrace
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
WoolTrace
Commits
5a67a9b2
Commit
5a67a9b2
authored
Apr 07, 2021
by
hywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug,增加上传人、上传时间
parent
50287ea2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
633 additions
and
473 deletions
+633
-473
Configs.java
app/src/main/java/com/phlx/wool/Configs.java
+1
-0
LocalDataSourceImpl.java
...in/java/com/phlx/wool/data/local/LocalDataSourceImpl.java
+6
-2
DbUtil.java
app/src/main/java/com/phlx/wool/db/DbUtil.java
+1
-1
Harmless.java
app/src/main/java/com/phlx/wool/entity/Harmless.java
+118
-95
HarmlessDetail.java
app/src/main/java/com/phlx/wool/entity/HarmlessDetail.java
+102
-67
Marking.java
app/src/main/java/com/phlx/wool/entity/Marking.java
+118
-103
Quarantine.java
app/src/main/java/com/phlx/wool/entity/Quarantine.java
+141
-119
QuarantineDetail.java
app/src/main/java/com/phlx/wool/entity/QuarantineDetail.java
+96
-44
InventoryActivity.java
...in/java/com/phlx/wool/ui/inventory/InventoryActivity.java
+19
-18
LoginVM.java
app/src/main/java/com/phlx/wool/ui/login/LoginVM.java
+2
-1
MainActivity.java
app/src/main/java/com/phlx/wool/ui/main/MainActivity.java
+12
-13
SplashVM.java
app/src/main/java/com/phlx/wool/ui/splash/SplashVM.java
+3
-3
DownloadVM.java
app/src/main/java/com/phlx/wool/ui/sync/vm/DownloadVM.java
+3
-3
VillusBuyVM.java
...src/main/java/com/phlx/wool/ui/villus/vm/VillusBuyVM.java
+1
-1
VillusGaugeVM.java
...c/main/java/com/phlx/wool/ui/villus/vm/VillusGaugeVM.java
+1
-1
HarmlessVM.java
.../main/java/com/phlx/wool/ui/work/harmless/HarmlessVM.java
+3
-0
MarkingVM.java
app/src/main/java/com/phlx/wool/ui/work/mark/MarkingVM.java
+2
-2
QuarantineVM.java
...n/java/com/phlx/wool/ui/work/quarantine/QuarantineVM.java
+3
-0
activity_marking.xml
app/src/main/res/layout/activity_marking.xml
+1
-0
No files found.
app/src/main/java/com/phlx/wool/Configs.java
View file @
5a67a9b2
...
@@ -39,6 +39,7 @@ public class Configs {
...
@@ -39,6 +39,7 @@ public class Configs {
public
static
final
String
SP_USER_NAME
=
"sp_user_name"
;
public
static
final
String
SP_USER_NAME
=
"sp_user_name"
;
public
static
final
String
SP_ID
=
"sp_id"
;
public
static
final
String
SP_ID
=
"sp_id"
;
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_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"
;
...
...
app/src/main/java/com/phlx/wool/data/local/LocalDataSourceImpl.java
View file @
5a67a9b2
...
@@ -105,12 +105,16 @@ public class LocalDataSourceImpl implements LocalDataSource {
...
@@ -105,12 +105,16 @@ public class LocalDataSourceImpl implements LocalDataSource {
@Override
@Override
public
void
saveVariety
(
List
<
Variety
>
varieties
)
throws
Exception
{
public
void
saveVariety
(
List
<
Variety
>
varieties
)
throws
Exception
{
DbUtil
.
getInstance
().
insertOrReplaceInTx
(
varieties
);
DbUtil
.
getInstance
()
// .insertAsyncBatch(Variety.class, varieties);
.
insertOrReplaceInTx
(
varieties
);
}
}
@Override
@Override
public
void
saveTreatmentMethod
(
List
<
TreatmentMethod
>
treatmentMethods
)
throws
Exception
{
public
void
saveTreatmentMethod
(
List
<
TreatmentMethod
>
treatmentMethods
)
throws
Exception
{
DbUtil
.
getInstance
().
insertOrReplaceInTx
(
treatmentMethods
);
DbUtil
.
getInstance
()
// .insertAsyncBatch(TreatmentMethod.class, treatmentMethods);
.
insertOrReplaceInTx
(
treatmentMethods
);
}
}
@Override
@Override
...
...
app/src/main/java/com/phlx/wool/db/DbUtil.java
View file @
5a67a9b2
...
@@ -555,7 +555,7 @@ public class DbUtil {
...
@@ -555,7 +555,7 @@ public class DbUtil {
}
}
private
<
T
>
void
setCurrentDaoOfList
(
Collection
<
T
>
entities
)
{
private
<
T
>
void
setCurrentDaoOfList
(
Collection
<
T
>
entities
)
{
if
(
entities
!=
null
&&
entities
.
size
()
>
1
)
{
if
(
entities
!=
null
&&
entities
.
size
()
>
=
1
)
{
Iterator
<
T
>
iterator
=
entities
.
iterator
();
Iterator
<
T
>
iterator
=
entities
.
iterator
();
T
next
=
iterator
.
next
();
T
next
=
iterator
.
next
();
setCurrentDao
(
next
.
getClass
());
setCurrentDao
(
next
.
getClass
());
...
...
app/src/main/java/com/phlx/wool/entity/Harmless.java
View file @
5a67a9b2
...
@@ -32,8 +32,6 @@ public class Harmless extends BaseObservable implements Parcelable {
...
@@ -32,8 +32,6 @@ public class Harmless extends BaseObservable implements Parcelable {
@Expose
(
serialize
=
false
,
deserialize
=
false
)
@Expose
(
serialize
=
false
,
deserialize
=
false
)
private
Long
id
;
private
Long
id
;
/**
/**
* 养殖单位名称
* 养殖单位名称
*/
*/
...
@@ -119,39 +117,128 @@ public class Harmless extends BaseObservable implements Parcelable {
...
@@ -119,39 +117,128 @@ public class Harmless extends BaseObservable implements Parcelable {
@ToMany
(
referencedJoinProperty
=
"harmlessId"
)
@ToMany
(
referencedJoinProperty
=
"harmlessId"
)
private
List
<
HarmlessDetail
>
list
;
private
List
<
HarmlessDetail
>
list
;
/** 创建者 */
private
String
createBy
;
/**
/**
* 创建时间
* 创建时间
*/
*/
@Expose
(
serialize
=
false
,
deserialize
=
false
)
@Expose
(
serialize
=
false
,
deserialize
=
false
)
private
String
createTime
;
private
String
createTime
;
public
void
setList
(
List
<
HarmlessDetail
>
list
)
{
this
.
list
=
list
;
}
@Override
/** Used to resolve relations */
public
int
describeContents
()
{
@Generated
(
hash
=
2040040024
)
return
0
;
private
transient
DaoSession
daoSession
;
/** Used for active entity operations. */
@Generated
(
hash
=
1863564550
)
private
transient
HarmlessDao
myDao
;
@Generated
(
hash
=
1389738217
)
public
Harmless
(
Long
id
,
String
managerName
,
String
managerCode
,
String
deathReason
,
String
TreatmentMethodCode
,
String
TreatmentMethodName
,
String
onsetTime
,
String
deathTime
,
String
TreatmentNum
,
String
TreatmentUnit
,
String
veterinaryCode
,
String
veterinaryName
,
String
TreatmentTime
,
int
status
,
String
remark
,
String
createBy
,
String
createTime
)
{
this
.
id
=
id
;
this
.
managerName
=
managerName
;
this
.
managerCode
=
managerCode
;
this
.
deathReason
=
deathReason
;
this
.
TreatmentMethodCode
=
TreatmentMethodCode
;
this
.
TreatmentMethodName
=
TreatmentMethodName
;
this
.
onsetTime
=
onsetTime
;
this
.
deathTime
=
deathTime
;
this
.
TreatmentNum
=
TreatmentNum
;
this
.
TreatmentUnit
=
TreatmentUnit
;
this
.
veterinaryCode
=
veterinaryCode
;
this
.
veterinaryName
=
veterinaryName
;
this
.
TreatmentTime
=
TreatmentTime
;
this
.
status
=
status
;
this
.
remark
=
remark
;
this
.
createBy
=
createBy
;
this
.
createTime
=
createTime
;
}
@Generated
(
hash
=
729317827
)
public
Harmless
()
{
}
protected
Harmless
(
Parcel
in
)
{
if
(
in
.
readByte
()
==
0
)
{
id
=
null
;
}
else
{
id
=
in
.
readLong
();
}
managerName
=
in
.
readString
();
managerCode
=
in
.
readString
();
deathReason
=
in
.
readString
();
TreatmentMethodCode
=
in
.
readString
();
TreatmentMethodName
=
in
.
readString
();
onsetTime
=
in
.
readString
();
deathTime
=
in
.
readString
();
TreatmentNum
=
in
.
readString
();
TreatmentUnit
=
in
.
readString
();
veterinaryCode
=
in
.
readString
();
veterinaryName
=
in
.
readString
();
TreatmentTime
=
in
.
readString
();
status
=
in
.
readInt
();
remark
=
in
.
readString
();
list
=
in
.
createTypedArrayList
(
HarmlessDetail
.
CREATOR
);
createBy
=
in
.
readString
();
createTime
=
in
.
readString
();
}
}
@Override
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
dest
.
writeValue
(
this
.
id
);
if
(
id
==
null
)
{
dest
.
writeString
(
this
.
managerName
);
dest
.
writeByte
((
byte
)
0
);
dest
.
writeString
(
this
.
managerCode
);
}
else
{
dest
.
writeString
(
this
.
deathReason
);
dest
.
writeByte
((
byte
)
1
);
dest
.
writeString
(
this
.
TreatmentMethodCode
);
dest
.
writeLong
(
id
);
dest
.
writeString
(
this
.
TreatmentMethodName
);
}
dest
.
writeString
(
this
.
onsetTime
);
dest
.
writeString
(
managerName
);
dest
.
writeString
(
this
.
deathTime
);
dest
.
writeString
(
managerCode
);
dest
.
writeString
(
this
.
TreatmentNum
);
dest
.
writeString
(
deathReason
);
dest
.
writeString
(
this
.
TreatmentUnit
);
dest
.
writeString
(
TreatmentMethodCode
);
dest
.
writeString
(
this
.
veterinaryCode
);
dest
.
writeString
(
TreatmentMethodName
);
dest
.
writeString
(
this
.
veterinaryName
);
dest
.
writeString
(
onsetTime
);
dest
.
writeString
(
this
.
TreatmentTime
);
dest
.
writeString
(
deathTime
);
dest
.
writeInt
(
this
.
status
);
dest
.
writeString
(
TreatmentNum
);
dest
.
writeString
(
this
.
remark
);
dest
.
writeString
(
TreatmentUnit
);
dest
.
writeTypedList
(
this
.
list
);
dest
.
writeString
(
veterinaryCode
);
dest
.
writeString
(
this
.
createTime
);
dest
.
writeString
(
veterinaryName
);
dest
.
writeString
(
TreatmentTime
);
dest
.
writeInt
(
status
);
dest
.
writeString
(
remark
);
dest
.
writeTypedList
(
list
);
dest
.
writeString
(
createBy
);
dest
.
writeString
(
createTime
);
}
@Override
public
int
describeContents
()
{
return
0
;
}
}
public
static
final
Creator
<
Harmless
>
CREATOR
=
new
Creator
<
Harmless
>()
{
@Override
public
Harmless
createFromParcel
(
Parcel
in
)
{
return
new
Harmless
(
in
);
}
@Override
public
Harmless
[]
newArray
(
int
size
)
{
return
new
Harmless
[
size
];
}
};
public
Long
getId
()
{
public
Long
getId
()
{
return
this
.
id
;
return
this
.
id
;
}
}
...
@@ -272,6 +359,14 @@ public class Harmless extends BaseObservable implements Parcelable {
...
@@ -272,6 +359,14 @@ public class Harmless extends BaseObservable implements Parcelable {
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
String
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getCreateTime
()
{
public
String
getCreateTime
()
{
return
this
.
createTime
;
return
this
.
createTime
;
}
}
...
@@ -280,10 +375,6 @@ public class Harmless extends BaseObservable implements Parcelable {
...
@@ -280,10 +375,6 @@ public class Harmless extends BaseObservable implements Parcelable {
this
.
createTime
=
createTime
;
this
.
createTime
=
createTime
;
}
}
public
void
setList
(
List
<
HarmlessDetail
>
list
)
{
this
.
list
=
list
;
}
/**
/**
* To-many relationship, resolved on first access (and after reset).
* To-many relationship, resolved on first access (and after reset).
* Changes to to-many relations are not persisted, make changes to the target entity.
* Changes to to-many relations are not persisted, make changes to the target entity.
...
@@ -348,75 +439,6 @@ public class Harmless extends BaseObservable implements Parcelable {
...
@@ -348,75 +439,6 @@ public class Harmless extends BaseObservable implements Parcelable {
myDao
.
update
(
this
);
myDao
.
update
(
this
);
}
}
public
Harmless
()
{
}
protected
Harmless
(
Parcel
in
)
{
this
.
id
=
(
Long
)
in
.
readValue
(
Long
.
class
.
getClassLoader
());
this
.
managerName
=
in
.
readString
();
this
.
managerCode
=
in
.
readString
();
this
.
deathReason
=
in
.
readString
();
this
.
TreatmentMethodCode
=
in
.
readString
();
this
.
TreatmentMethodName
=
in
.
readString
();
this
.
onsetTime
=
in
.
readString
();
this
.
deathTime
=
in
.
readString
();
this
.
TreatmentNum
=
in
.
readString
();
this
.
TreatmentUnit
=
in
.
readString
();
this
.
veterinaryCode
=
in
.
readString
();
this
.
veterinaryName
=
in
.
readString
();
this
.
TreatmentTime
=
in
.
readString
();
this
.
status
=
in
.
readInt
();
this
.
remark
=
in
.
readString
();
this
.
list
=
in
.
createTypedArrayList
(
HarmlessDetail
.
CREATOR
);
this
.
createTime
=
in
.
readString
();
}
@Generated
(
hash
=
1666739555
)
public
Harmless
(
Long
id
,
String
managerName
,
String
managerCode
,
String
deathReason
,
String
TreatmentMethodCode
,
String
TreatmentMethodName
,
String
onsetTime
,
String
deathTime
,
String
TreatmentNum
,
String
TreatmentUnit
,
String
veterinaryCode
,
String
veterinaryName
,
String
TreatmentTime
,
int
status
,
String
remark
,
String
createTime
)
{
this
.
id
=
id
;
this
.
managerName
=
managerName
;
this
.
managerCode
=
managerCode
;
this
.
deathReason
=
deathReason
;
this
.
TreatmentMethodCode
=
TreatmentMethodCode
;
this
.
TreatmentMethodName
=
TreatmentMethodName
;
this
.
onsetTime
=
onsetTime
;
this
.
deathTime
=
deathTime
;
this
.
TreatmentNum
=
TreatmentNum
;
this
.
TreatmentUnit
=
TreatmentUnit
;
this
.
veterinaryCode
=
veterinaryCode
;
this
.
veterinaryName
=
veterinaryName
;
this
.
TreatmentTime
=
TreatmentTime
;
this
.
status
=
status
;
this
.
remark
=
remark
;
this
.
createTime
=
createTime
;
}
public
static
final
Creator
<
Harmless
>
CREATOR
=
new
Creator
<
Harmless
>()
{
@Override
public
Harmless
createFromParcel
(
Parcel
source
)
{
return
new
Harmless
(
source
);
}
@Override
public
Harmless
[]
newArray
(
int
size
)
{
return
new
Harmless
[
size
];
}
};
/** Used to resolve relations */
@Generated
(
hash
=
2040040024
)
private
transient
DaoSession
daoSession
;
/** Used for active entity operations. */
@Generated
(
hash
=
1863564550
)
private
transient
HarmlessDao
myDao
;
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"Harmless{"
+
return
"Harmless{"
+
...
@@ -436,6 +458,7 @@ public class Harmless extends BaseObservable implements Parcelable {
...
@@ -436,6 +458,7 @@ public class Harmless extends BaseObservable implements Parcelable {
", status="
+
status
+
", status="
+
status
+
", remark='"
+
remark
+
'\''
+
", remark='"
+
remark
+
'\''
+
", list="
+
list
+
", list="
+
list
+
", createBy='"
+
createBy
+
'\''
+
", createTime='"
+
createTime
+
'\''
+
", createTime='"
+
createTime
+
'\''
+
", daoSession="
+
daoSession
+
", daoSession="
+
daoSession
+
", myDao="
+
myDao
+
", myDao="
+
myDao
+
...
...
app/src/main/java/com/phlx/wool/entity/HarmlessDetail.java
View file @
5a67a9b2
...
@@ -72,26 +72,69 @@ public class HarmlessDetail extends BaseObservable implements Parcelable {
...
@@ -72,26 +72,69 @@ public class HarmlessDetail extends BaseObservable implements Parcelable {
@SerializedName
(
"inputTime"
)
@SerializedName
(
"inputTime"
)
private
long
timestamp
;
private
long
timestamp
;
/** 创建者 */
private
String
createBy
;
@Override
/**
public
int
describeContents
()
{
* 创建时间
return
0
;
*/
@Expose
(
serialize
=
false
,
deserialize
=
false
)
private
String
createTime
;
public
HarmlessDetail
()
{
}
}
@Override
protected
HarmlessDetail
(
Parcel
in
)
{
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
if
(
in
.
readByte
()
==
0
)
{
dest
.
writeValue
(
this
.
id
);
id
=
null
;
dest
.
writeValue
(
this
.
harmlessId
);
}
else
{
dest
.
writeString
(
this
.
receivingUnit
);
id
=
in
.
readLong
();
dest
.
writeString
(
this
.
Epc
);
}
dest
.
writeString
(
this
.
twodimensionno
);
if
(
in
.
readByte
()
==
0
)
{
dest
.
writeString
(
this
.
Tid
);
harmlessId
=
null
;
dest
.
writeString
(
this
.
isLegalStatus
);
}
else
{
dest
.
writeLong
(
this
.
timestamp
);
harmlessId
=
in
.
readLong
();
}
receivingUnit
=
in
.
readString
();
Epc
=
in
.
readString
();
twodimensionno
=
in
.
readString
();
Tid
=
in
.
readString
();
isLegalStatus
=
in
.
readString
();
timestamp
=
in
.
readLong
();
createBy
=
in
.
readString
();
createTime
=
in
.
readString
();
}
}
@Generated
(
hash
=
1267726135
)
public
HarmlessDetail
(
Long
id
,
Long
harmlessId
,
String
receivingUnit
,
String
Epc
,
String
twodimensionno
,
String
Tid
,
String
isLegalStatus
,
long
timestamp
,
String
createBy
,
String
createTime
)
{
this
.
id
=
id
;
this
.
harmlessId
=
harmlessId
;
this
.
receivingUnit
=
receivingUnit
;
this
.
Epc
=
Epc
;
this
.
twodimensionno
=
twodimensionno
;
this
.
Tid
=
Tid
;
this
.
isLegalStatus
=
isLegalStatus
;
this
.
timestamp
=
timestamp
;
this
.
createBy
=
createBy
;
this
.
createTime
=
createTime
;
}
public
static
final
Creator
<
HarmlessDetail
>
CREATOR
=
new
Creator
<
HarmlessDetail
>()
{
@Override
public
HarmlessDetail
createFromParcel
(
Parcel
in
)
{
return
new
HarmlessDetail
(
in
);
}
@Override
public
HarmlessDetail
[]
newArray
(
int
size
)
{
return
new
HarmlessDetail
[
size
];
}
};
public
Long
getId
()
{
public
Long
getId
()
{
return
this
.
id
;
return
id
;
}
}
public
void
setId
(
Long
id
)
{
public
void
setId
(
Long
id
)
{
...
@@ -99,7 +142,7 @@ public class HarmlessDetail extends BaseObservable implements Parcelable {
...
@@ -99,7 +142,7 @@ public class HarmlessDetail extends BaseObservable implements Parcelable {
}
}
public
Long
getHarmlessId
()
{
public
Long
getHarmlessId
()
{
return
this
.
harmlessId
;
return
harmlessId
;
}
}
public
void
setHarmlessId
(
Long
harmlessId
)
{
public
void
setHarmlessId
(
Long
harmlessId
)
{
...
@@ -107,7 +150,7 @@ public class HarmlessDetail extends BaseObservable implements Parcelable {
...
@@ -107,7 +150,7 @@ public class HarmlessDetail extends BaseObservable implements Parcelable {
}
}
public
String
getReceivingUnit
()
{
public
String
getReceivingUnit
()
{
return
this
.
receivingUnit
;
return
receivingUnit
;
}
}
public
void
setReceivingUnit
(
String
receivingUnit
)
{
public
void
setReceivingUnit
(
String
receivingUnit
)
{
...
@@ -115,15 +158,15 @@ public class HarmlessDetail extends BaseObservable implements Parcelable {
...
@@ -115,15 +158,15 @@ public class HarmlessDetail extends BaseObservable implements Parcelable {
}
}
public
String
getEpc
()
{
public
String
getEpc
()
{
return
this
.
Epc
;
return
Epc
;
}
}
public
void
setEpc
(
String
E
pc
)
{
public
void
setEpc
(
String
e
pc
)
{
this
.
Epc
=
E
pc
;
Epc
=
e
pc
;
}
}
public
String
getTwodimensionno
()
{
public
String
getTwodimensionno
()
{
return
t
his
.
t
wodimensionno
;
return
twodimensionno
;
}
}
public
void
setTwodimensionno
(
String
twodimensionno
)
{
public
void
setTwodimensionno
(
String
twodimensionno
)
{
...
@@ -131,15 +174,15 @@ public class HarmlessDetail extends BaseObservable implements Parcelable {
...
@@ -131,15 +174,15 @@ public class HarmlessDetail extends BaseObservable implements Parcelable {
}
}
public
String
getTid
()
{
public
String
getTid
()
{
return
this
.
Tid
;
return
Tid
;
}
}
public
void
setTid
(
String
T
id
)
{
public
void
setTid
(
String
t
id
)
{
this
.
Tid
=
T
id
;
Tid
=
t
id
;
}
}
public
String
getIsLegalStatus
()
{
public
String
getIsLegalStatus
()
{
return
this
.
isLegalStatus
;
return
isLegalStatus
;
}
}
public
void
setIsLegalStatus
(
String
isLegalStatus
)
{
public
void
setIsLegalStatus
(
String
isLegalStatus
)
{
...
@@ -147,64 +190,56 @@ public class HarmlessDetail extends BaseObservable implements Parcelable {
...
@@ -147,64 +190,56 @@ public class HarmlessDetail extends BaseObservable implements Parcelable {
}
}
public
long
getTimestamp
()
{
public
long
getTimestamp
()
{
return
t
his
.
t
imestamp
;
return
timestamp
;
}
}
public
void
setTimestamp
(
long
timestamp
)
{
public
void
setTimestamp
(
long
timestamp
)
{
this
.
timestamp
=
timestamp
;
this
.
timestamp
=
timestamp
;
}
}
public
HarmlessDetail
()
{
public
String
getCreateBy
()
{
return
createBy
;
}
}
protected
HarmlessDetail
(
Parcel
in
)
{
public
void
setCreateBy
(
String
createBy
)
{
this
.
id
=
(
Long
)
in
.
readValue
(
Long
.
class
.
getClassLoader
());
this
.
createBy
=
createBy
;
this
.
harmlessId
=
(
Long
)
in
.
readValue
(
Long
.
class
.
getClassLoader
());
this
.
receivingUnit
=
in
.
readString
();
this
.
Epc
=
in
.
readString
();
this
.
twodimensionno
=
in
.
readString
();
this
.
Tid
=
in
.
readString
();
this
.
isLegalStatus
=
in
.
readString
();
this
.
timestamp
=
in
.
readLong
();
}
}
@Generated
(
hash
=
1790410930
)
public
String
getCreateTime
()
{
public
HarmlessDetail
(
Long
id
,
Long
harmlessId
,
String
receivingUnit
,
String
Epc
,
return
createTime
;
String
twodimensionno
,
String
Tid
,
String
isLegalStatus
,
long
timestamp
)
{
this
.
id
=
id
;
this
.
harmlessId
=
harmlessId
;
this
.
receivingUnit
=
receivingUnit
;
this
.
Epc
=
Epc
;
this
.
twodimensionno
=
twodimensionno
;
this
.
Tid
=
Tid
;
this
.
isLegalStatus
=
isLegalStatus
;
this
.
timestamp
=
timestamp
;
}
}
public
static
final
Creator
<
HarmlessDetail
>
CREATOR
=
new
Creator
<
HarmlessDetail
>()
{
public
void
setCreateTime
(
String
createTime
)
{
@Override
this
.
createTime
=
createTime
;
public
HarmlessDetail
createFromParcel
(
Parcel
source
)
{
}
return
new
HarmlessDetail
(
source
);
}
@Override
@Override
public
HarmlessDetail
[]
newArray
(
int
size
)
{
public
int
describeContents
()
{
return
new
HarmlessDetail
[
size
];
return
0
;
}
}
};
@Override
@Override
public
String
toString
()
{
public
void
writeToParcel
(
Parcel
parcel
,
int
i
)
{
return
"HarmlessDetail{"
+
if
(
id
==
null
)
{
"id="
+
id
+
parcel
.
writeByte
((
byte
)
0
);
", harmlessId="
+
harmlessId
+
}
else
{
", receivingUnit='"
+
receivingUnit
+
'\''
+
parcel
.
writeByte
((
byte
)
1
);
", Epc='"
+
Epc
+
'\''
+
parcel
.
writeLong
(
id
);
", twodimensionno='"
+
twodimensionno
+
'\''
+
}
", Tid='"
+
Tid
+
'\''
+
if
(
harmlessId
==
null
)
{
", isLegalStatus='"
+
isLegalStatus
+
'\''
+
parcel
.
writeByte
((
byte
)
0
);
", timestamp="
+
timestamp
+
}
else
{
'}'
;
parcel
.
writeByte
((
byte
)
1
);
parcel
.
writeLong
(
harmlessId
);
}
parcel
.
writeString
(
receivingUnit
);
parcel
.
writeString
(
Epc
);
parcel
.
writeString
(
twodimensionno
);
parcel
.
writeString
(
Tid
);
parcel
.
writeString
(
isLegalStatus
);
parcel
.
writeLong
(
timestamp
);
parcel
.
writeString
(
createBy
);
parcel
.
writeString
(
createTime
);
}
}
}
}
...
...
app/src/main/java/com/phlx/wool/entity/Marking.java
View file @
5a67a9b2
...
@@ -134,6 +134,9 @@ public class Marking extends BaseObservable implements Parcelable {
...
@@ -134,6 +134,9 @@ public class Marking extends BaseObservable implements Parcelable {
@SerializedName
(
"remark"
)
@SerializedName
(
"remark"
)
private
String
remark
;
private
String
remark
;
/** 创建者 */
private
String
createBy
;
/**
/**
* 创建时间
* 创建时间
*/
*/
...
@@ -158,6 +161,113 @@ public class Marking extends BaseObservable implements Parcelable {
...
@@ -158,6 +161,113 @@ public class Marking extends BaseObservable implements Parcelable {
private
String
state
;
private
String
state
;
public
Marking
()
{
}
protected
Marking
(
Parcel
in
)
{
Tid
=
in
.
readString
();
managerName
=
in
.
readString
();
managerCode
=
in
.
readString
();
Epc
=
in
.
readString
();
birthTime
=
in
.
readString
();
isBreedSheep
=
in
.
readInt
();
varietyCode
=
in
.
readString
();
varietyName
=
in
.
readString
();
birthPlace
=
in
.
readString
();
sex
=
in
.
readInt
();
birthWeight
=
in
.
readString
();
veterinaryCode
=
in
.
readString
();
veterinaryName
=
in
.
readString
();
birthNum
=
in
.
readString
();
isTwins
=
in
.
readInt
();
eweEpc
=
in
.
readString
();
RamEpc
=
in
.
readString
();
remark
=
in
.
readString
();
createBy
=
in
.
readString
();
createTime
=
in
.
readString
();
status
=
in
.
readInt
();
isLegalStatus
=
in
.
readString
();
state
=
in
.
readString
();
}
@Generated
(
hash
=
631254713
)
public
Marking
(
String
Tid
,
String
managerName
,
String
managerCode
,
String
Epc
,
String
birthTime
,
int
isBreedSheep
,
String
varietyCode
,
String
varietyName
,
String
birthPlace
,
int
sex
,
String
birthWeight
,
String
veterinaryCode
,
String
veterinaryName
,
String
birthNum
,
int
isTwins
,
String
eweEpc
,
String
RamEpc
,
String
remark
,
String
createBy
,
String
createTime
,
int
status
,
String
isLegalStatus
,
String
state
)
{
this
.
Tid
=
Tid
;
this
.
managerName
=
managerName
;
this
.
managerCode
=
managerCode
;
this
.
Epc
=
Epc
;
this
.
birthTime
=
birthTime
;
this
.
isBreedSheep
=
isBreedSheep
;
this
.
varietyCode
=
varietyCode
;
this
.
varietyName
=
varietyName
;
this
.
birthPlace
=
birthPlace
;
this
.
sex
=
sex
;
this
.
birthWeight
=
birthWeight
;
this
.
veterinaryCode
=
veterinaryCode
;
this
.
veterinaryName
=
veterinaryName
;
this
.
birthNum
=
birthNum
;
this
.
isTwins
=
isTwins
;
this
.
eweEpc
=
eweEpc
;
this
.
RamEpc
=
RamEpc
;
this
.
remark
=
remark
;
this
.
createBy
=
createBy
;
this
.
createTime
=
createTime
;
this
.
status
=
status
;
this
.
isLegalStatus
=
isLegalStatus
;
this
.
state
=
state
;
}
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
dest
.
writeString
(
Tid
);
dest
.
writeString
(
managerName
);
dest
.
writeString
(
managerCode
);
dest
.
writeString
(
Epc
);
dest
.
writeString
(
birthTime
);
dest
.
writeInt
(
isBreedSheep
);
dest
.
writeString
(
varietyCode
);
dest
.
writeString
(
varietyName
);
dest
.
writeString
(
birthPlace
);
dest
.
writeInt
(
sex
);
dest
.
writeString
(
birthWeight
);
dest
.
writeString
(
veterinaryCode
);
dest
.
writeString
(
veterinaryName
);
dest
.
writeString
(
birthNum
);
dest
.
writeInt
(
isTwins
);
dest
.
writeString
(
eweEpc
);
dest
.
writeString
(
RamEpc
);
dest
.
writeString
(
remark
);
dest
.
writeString
(
createBy
);
dest
.
writeString
(
createTime
);
dest
.
writeInt
(
status
);
dest
.
writeString
(
isLegalStatus
);
dest
.
writeString
(
state
);
}
@Override
public
int
describeContents
()
{
return
0
;
}
public
static
final
Creator
<
Marking
>
CREATOR
=
new
Creator
<
Marking
>()
{
@Override
public
Marking
createFromParcel
(
Parcel
in
)
{
return
new
Marking
(
in
);
}
@Override
public
Marking
[]
newArray
(
int
size
)
{
return
new
Marking
[
size
];
}
};
public
String
getTid
()
{
public
String
getTid
()
{
return
Tid
;
return
Tid
;
}
}
...
@@ -302,6 +412,14 @@ public class Marking extends BaseObservable implements Parcelable {
...
@@ -302,6 +412,14 @@ public class Marking extends BaseObservable implements Parcelable {
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getCreateTime
()
{
public
String
getCreateTime
()
{
return
createTime
;
return
createTime
;
}
}
...
@@ -333,107 +451,4 @@ public class Marking extends BaseObservable implements Parcelable {
...
@@ -333,107 +451,4 @@ public class Marking extends BaseObservable implements Parcelable {
public
void
setState
(
String
state
)
{
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
this
.
state
=
state
;
}
}
@Override
public
int
describeContents
()
{
return
0
;
}
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
dest
.
writeString
(
this
.
Tid
);
dest
.
writeString
(
this
.
managerName
);
dest
.
writeString
(
this
.
managerCode
);
dest
.
writeString
(
this
.
Epc
);
dest
.
writeString
(
this
.
birthTime
);
dest
.
writeInt
(
this
.
isBreedSheep
);
dest
.
writeString
(
this
.
varietyCode
);
dest
.
writeString
(
this
.
varietyName
);
dest
.
writeString
(
this
.
birthPlace
);
dest
.
writeInt
(
this
.
sex
);
dest
.
writeString
(
this
.
birthWeight
);
dest
.
writeString
(
this
.
veterinaryCode
);
dest
.
writeString
(
this
.
veterinaryName
);
dest
.
writeString
(
this
.
birthNum
);
dest
.
writeInt
(
this
.
isTwins
);
dest
.
writeString
(
this
.
eweEpc
);
dest
.
writeString
(
this
.
RamEpc
);
dest
.
writeString
(
this
.
remark
);
dest
.
writeString
(
this
.
createTime
);
dest
.
writeInt
(
this
.
status
);
dest
.
writeString
(
this
.
isLegalStatus
);
dest
.
writeString
(
this
.
state
);
}
public
Marking
()
{
}
protected
Marking
(
Parcel
in
)
{
this
.
Tid
=
in
.
readString
();
this
.
managerName
=
in
.
readString
();
this
.
managerCode
=
in
.
readString
();
this
.
Epc
=
in
.
readString
();
this
.
birthTime
=
in
.
readString
();
this
.
isBreedSheep
=
in
.
readInt
();
this
.
varietyCode
=
in
.
readString
();
this
.
varietyName
=
in
.
readString
();
this
.
birthPlace
=
in
.
readString
();
this
.
sex
=
in
.
readInt
();
this
.
birthWeight
=
in
.
readString
();
this
.
veterinaryCode
=
in
.
readString
();
this
.
veterinaryName
=
in
.
readString
();
this
.
birthNum
=
in
.
readString
();
this
.
isTwins
=
in
.
readInt
();
this
.
eweEpc
=
in
.
readString
();
this
.
RamEpc
=
in
.
readString
();
this
.
remark
=
in
.
readString
();
this
.
createTime
=
in
.
readString
();
this
.
status
=
in
.
readInt
();
this
.
isLegalStatus
=
in
.
readString
();
this
.
state
=
in
.
readString
();
}
@Generated
(
hash
=
1296019690
)
public
Marking
(
String
Tid
,
String
managerName
,
String
managerCode
,
String
Epc
,
String
birthTime
,
int
isBreedSheep
,
String
varietyCode
,
String
varietyName
,
String
birthPlace
,
int
sex
,
String
birthWeight
,
String
veterinaryCode
,
String
veterinaryName
,
String
birthNum
,
int
isTwins
,
String
eweEpc
,
String
RamEpc
,
String
remark
,
String
createTime
,
int
status
,
String
isLegalStatus
,
String
state
)
{
this
.
Tid
=
Tid
;
this
.
managerName
=
managerName
;
this
.
managerCode
=
managerCode
;
this
.
Epc
=
Epc
;
this
.
birthTime
=
birthTime
;
this
.
isBreedSheep
=
isBreedSheep
;
this
.
varietyCode
=
varietyCode
;
this
.
varietyName
=
varietyName
;
this
.
birthPlace
=
birthPlace
;
this
.
sex
=
sex
;
this
.
birthWeight
=
birthWeight
;
this
.
veterinaryCode
=
veterinaryCode
;
this
.
veterinaryName
=
veterinaryName
;
this
.
birthNum
=
birthNum
;
this
.
isTwins
=
isTwins
;
this
.
eweEpc
=
eweEpc
;
this
.
RamEpc
=
RamEpc
;
this
.
remark
=
remark
;
this
.
createTime
=
createTime
;
this
.
status
=
status
;
this
.
isLegalStatus
=
isLegalStatus
;
this
.
state
=
state
;
}
public
static
final
Creator
<
Marking
>
CREATOR
=
new
Creator
<
Marking
>()
{
@Override
public
Marking
createFromParcel
(
Parcel
source
)
{
return
new
Marking
(
source
);
}
@Override
public
Marking
[]
newArray
(
int
size
)
{
return
new
Marking
[
size
];
}
};
}
}
app/src/main/java/com/phlx/wool/entity/Quarantine.java
View file @
5a67a9b2
This diff is collapsed.
Click to expand it.
app/src/main/java/com/phlx/wool/entity/QuarantineDetail.java
View file @
5a67a9b2
...
@@ -71,24 +71,97 @@ public class QuarantineDetail extends BaseObservable implements Parcelable {
...
@@ -71,24 +71,97 @@ public class QuarantineDetail extends BaseObservable implements Parcelable {
@SerializedName
(
"inputTime"
)
@SerializedName
(
"inputTime"
)
private
long
timestamp
;
private
long
timestamp
;
/** 创建者 */
private
String
createBy
;
@Override
/**
public
int
describeContents
()
{
* 创建时间
return
0
;
*/
@Expose
(
serialize
=
false
,
deserialize
=
false
)
private
String
createTime
;
@Generated
(
hash
=
1676464898
)
public
QuarantineDetail
(
Long
id
,
Long
quarantineId
,
String
receivingUnit
,
String
Epc
,
String
twodimensionno
,
String
Tid
,
String
isLegalStatus
,
long
timestamp
,
String
createBy
,
String
createTime
)
{
this
.
id
=
id
;
this
.
quarantineId
=
quarantineId
;
this
.
receivingUnit
=
receivingUnit
;
this
.
Epc
=
Epc
;
this
.
twodimensionno
=
twodimensionno
;
this
.
Tid
=
Tid
;
this
.
isLegalStatus
=
isLegalStatus
;
this
.
timestamp
=
timestamp
;
this
.
createBy
=
createBy
;
this
.
createTime
=
createTime
;
}
@Generated
(
hash
=
1582101677
)
public
QuarantineDetail
()
{
}
protected
QuarantineDetail
(
Parcel
in
)
{
if
(
in
.
readByte
()
==
0
)
{
id
=
null
;
}
else
{
id
=
in
.
readLong
();
}
if
(
in
.
readByte
()
==
0
)
{
quarantineId
=
null
;
}
else
{
quarantineId
=
in
.
readLong
();
}
receivingUnit
=
in
.
readString
();
Epc
=
in
.
readString
();
twodimensionno
=
in
.
readString
();
Tid
=
in
.
readString
();
isLegalStatus
=
in
.
readString
();
timestamp
=
in
.
readLong
();
createBy
=
in
.
readString
();
createTime
=
in
.
readString
();
}
}
@Override
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
dest
.
writeValue
(
this
.
id
);
if
(
id
==
null
)
{
dest
.
writeValue
(
this
.
quarantineId
);
dest
.
writeByte
((
byte
)
0
);
dest
.
writeString
(
this
.
receivingUnit
);
}
else
{
dest
.
writeString
(
this
.
Epc
);
dest
.
writeByte
((
byte
)
1
);
dest
.
writeString
(
this
.
twodimensionno
);
dest
.
writeLong
(
id
);
dest
.
writeString
(
this
.
Tid
);
}
dest
.
writeString
(
this
.
isLegalStatus
);
if
(
quarantineId
==
null
)
{
dest
.
writeLong
(
this
.
timestamp
);
dest
.
writeByte
((
byte
)
0
);
}
else
{
dest
.
writeByte
((
byte
)
1
);
dest
.
writeLong
(
quarantineId
);
}
dest
.
writeString
(
receivingUnit
);
dest
.
writeString
(
Epc
);
dest
.
writeString
(
twodimensionno
);
dest
.
writeString
(
Tid
);
dest
.
writeString
(
isLegalStatus
);
dest
.
writeLong
(
timestamp
);
dest
.
writeString
(
createBy
);
dest
.
writeString
(
createTime
);
}
@Override
public
int
describeContents
()
{
return
0
;
}
}
public
static
final
Creator
<
QuarantineDetail
>
CREATOR
=
new
Creator
<
QuarantineDetail
>()
{
@Override
public
QuarantineDetail
createFromParcel
(
Parcel
in
)
{
return
new
QuarantineDetail
(
in
);
}
@Override
public
QuarantineDetail
[]
newArray
(
int
size
)
{
return
new
QuarantineDetail
[
size
];
}
};
public
Long
getId
()
{
public
Long
getId
()
{
return
this
.
id
;
return
this
.
id
;
}
}
...
@@ -153,44 +226,21 @@ public class QuarantineDetail extends BaseObservable implements Parcelable {
...
@@ -153,44 +226,21 @@ public class QuarantineDetail extends BaseObservable implements Parcelable {
this
.
timestamp
=
timestamp
;
this
.
timestamp
=
timestamp
;
}
}
public
QuarantineDetail
()
{
public
String
getCreateBy
()
{
return
this
.
createBy
;
}
}
protected
QuarantineDetail
(
Parcel
in
)
{
public
void
setCreateBy
(
String
createBy
)
{
this
.
id
=
(
Long
)
in
.
readValue
(
Long
.
class
.
getClassLoader
());
this
.
createBy
=
createBy
;
this
.
quarantineId
=
(
Long
)
in
.
readValue
(
Long
.
class
.
getClassLoader
());
this
.
receivingUnit
=
in
.
readString
();
this
.
Epc
=
in
.
readString
();
this
.
twodimensionno
=
in
.
readString
();
this
.
Tid
=
in
.
readString
();
this
.
isLegalStatus
=
in
.
readString
();
this
.
timestamp
=
in
.
readLong
();
}
@Generated
(
hash
=
1088178498
)
public
QuarantineDetail
(
Long
id
,
Long
quarantineId
,
String
receivingUnit
,
String
Epc
,
String
twodimensionno
,
String
Tid
,
String
isLegalStatus
,
long
timestamp
)
{
this
.
id
=
id
;
this
.
quarantineId
=
quarantineId
;
this
.
receivingUnit
=
receivingUnit
;
this
.
Epc
=
Epc
;
this
.
twodimensionno
=
twodimensionno
;
this
.
Tid
=
Tid
;
this
.
isLegalStatus
=
isLegalStatus
;
this
.
timestamp
=
timestamp
;
}
}
public
static
final
Creator
<
QuarantineDetail
>
CREATOR
=
new
Creator
<
QuarantineDetail
>()
{
public
String
getCreateTime
()
{
@Override
return
this
.
createTime
;
public
QuarantineDetail
createFromParcel
(
Parcel
source
)
{
}
return
new
QuarantineDetail
(
source
);
}
@Override
public
void
setCreateTime
(
String
createTime
)
{
public
QuarantineDetail
[]
newArray
(
int
size
)
{
this
.
createTime
=
createTime
;
return
new
QuarantineDetail
[
size
];
}
}
};
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
...
@@ -203,6 +253,8 @@ public class QuarantineDetail extends BaseObservable implements Parcelable {
...
@@ -203,6 +253,8 @@ public class QuarantineDetail extends BaseObservable implements Parcelable {
", Tid='"
+
Tid
+
'\''
+
", Tid='"
+
Tid
+
'\''
+
", isLegalStatus='"
+
isLegalStatus
+
'\''
+
", isLegalStatus='"
+
isLegalStatus
+
'\''
+
", timestamp="
+
timestamp
+
", timestamp="
+
timestamp
+
", createBy='"
+
createBy
+
'\''
+
", createTime='"
+
createTime
+
'\''
+
'}'
;
'}'
;
}
}
}
}
app/src/main/java/com/phlx/wool/ui/inventory/InventoryActivity.java
View file @
5a67a9b2
...
@@ -11,6 +11,7 @@ import com.afollestad.materialdialogs.DialogAction;
...
@@ -11,6 +11,7 @@ import com.afollestad.materialdialogs.DialogAction;
import
com.afollestad.materialdialogs.MaterialDialog
;
import
com.afollestad.materialdialogs.MaterialDialog
;
import
com.phlx.wool.App
;
import
com.phlx.wool.App
;
import
com.phlx.wool.BR
;
import
com.phlx.wool.BR
;
import
com.phlx.wool.Configs
;
import
com.phlx.wool.R
;
import
com.phlx.wool.R
;
import
com.phlx.wool.data.VMFactory
;
import
com.phlx.wool.data.VMFactory
;
import
com.phlx.wool.databinding.ActivityInventoryBinding
;
import
com.phlx.wool.databinding.ActivityInventoryBinding
;
...
@@ -32,7 +33,6 @@ import me.tatarka.bindingcollectionadapter2.BindingRecyclerViewAdapter;
...
@@ -32,7 +33,6 @@ import me.tatarka.bindingcollectionadapter2.BindingRecyclerViewAdapter;
public
class
InventoryActivity
extends
BaseActivity
<
ActivityInventoryBinding
,
InventoryVM
>
{
public
class
InventoryActivity
extends
BaseActivity
<
ActivityInventoryBinding
,
InventoryVM
>
{
private
String
type
=
null
;
private
String
type
=
null
;
@Override
@Override
...
@@ -66,25 +66,26 @@ public class InventoryActivity extends BaseActivity<ActivityInventoryBinding, In
...
@@ -66,25 +66,26 @@ public class InventoryActivity extends BaseActivity<ActivityInventoryBinding, In
setSupportActionBar
(
binding
.
include
.
toolbar
);
setSupportActionBar
(
binding
.
include
.
toolbar
);
viewModel
.
initToolbar
(
type
);
viewModel
.
initToolbar
(
type
);
binding
.
setAdapter
(
new
BindingRecyclerViewAdapter
());
binding
.
setAdapter
(
new
BindingRecyclerViewAdapter
());
if
(
ModuleManager
.
powerOn
()
!=
0
)
{
if
(
"0"
.
equals
(
Configs
.
FREQUENCY_CONFIG
))
{
new
MaterialDialog
.
Builder
(
this
).
title
(
"系统提示"
).
content
(
"模块连接失败"
).
cancelable
(
false
).
canceledOnTouchOutside
(
false
).
positiveText
(
"退出"
).
onAny
(
new
MaterialDialog
.
SingleButtonCallback
()
{
if
(
ModuleManager
.
powerOn
()
!=
0
)
{
@Override
new
MaterialDialog
.
Builder
(
this
).
title
(
"系统提示"
).
content
(
"模块连接失败"
).
cancelable
(
false
).
canceledOnTouchOutside
(
false
).
positiveText
(
"退出"
).
onAny
(
new
MaterialDialog
.
SingleButtonCallback
()
{
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
@Override
if
(
which
==
DialogAction
.
POSITIVE
)
{
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
App
.
getInstance
().
getLinkage
().
stopInventory
();
if
(
which
==
DialogAction
.
POSITIVE
)
{
ModuleManager
.
destroyLibSO
();
App
.
getInstance
().
getLinkage
().
stopInventory
();
finish
();
ModuleManager
.
destroyLibSO
();
finish
();
}
}
}
}
}).
show
();
}).
show
();
}
//设置盘点内容:Epc + Tid
InventoryParams
inventoryParams
=
new
InventoryParams
();
inventoryParams
.
address
=
0
;
inventoryParams
.
inventoryArea
=
1
;
inventoryParams
.
len
=
6
;
App
.
getInstance
().
getLinkage
().
Radio_SetInventoryParams
(
inventoryParams
);
}
}
//设置盘点内容:Epc + Tid
InventoryParams
inventoryParams
=
new
InventoryParams
();
inventoryParams
.
address
=
0
;
inventoryParams
.
inventoryArea
=
1
;
inventoryParams
.
len
=
6
;
App
.
getInstance
().
getLinkage
().
Radio_SetInventoryParams
(
inventoryParams
);
}
}
...
...
app/src/main/java/com/phlx/wool/ui/login/LoginVM.java
View file @
5a67a9b2
...
@@ -58,7 +58,7 @@ public class LoginVM extends BackBarVM<Repository> {
...
@@ -58,7 +58,7 @@ public class LoginVM extends BackBarVM<Repository> {
// userName.set(model.getUserName());
// userName.set(model.getUserName());
// password.set(model.getPassword());
// password.set(model.getPassword());
userName
.
set
(
"
ds02
"
);
userName
.
set
(
"
als01
"
);
password
.
set
(
"123456"
);
password
.
set
(
"123456"
);
}
}
...
@@ -141,6 +141,7 @@ public class LoginVM extends BackBarVM<Repository> {
...
@@ -141,6 +141,7 @@ public class LoginVM extends BackBarVM<Repository> {
model
.
saveBreed
(
response
.
getData
().
getUser
().
getDept
().
getDeptName
());
model
.
saveBreed
(
response
.
getData
().
getUser
().
getDept
().
getDeptName
());
SPUtils
.
getInstance
().
put
(
Configs
.
SP_ID
,
response
.
getData
().
getUser
().
getUserId
());
SPUtils
.
getInstance
().
put
(
Configs
.
SP_ID
,
response
.
getData
().
getUser
().
getUserId
());
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_FREQUENCY
,
response
.
getData
().
getUser
().
getFrequencyConfig
());
SPUtils
.
getInstance
().
put
(
Configs
.
SP_FREQUENCY
,
response
.
getData
().
getUser
().
getFrequencyConfig
());
}
}
VMFactory
.
getInstance
(
getApplication
()).
refreshRepository
();
VMFactory
.
getInstance
(
getApplication
()).
refreshRepository
();
...
...
app/src/main/java/com/phlx/wool/ui/main/MainActivity.java
View file @
5a67a9b2
...
@@ -78,18 +78,19 @@ public class MainActivity extends BaseActivity<ActivityMainBinding, MainVM> {
...
@@ -78,18 +78,19 @@ public class MainActivity extends BaseActivity<ActivityMainBinding, MainVM> {
setSupportActionBar
(
binding
.
include
.
toolbar
);
setSupportActionBar
(
binding
.
include
.
toolbar
);
viewModel
.
initToolbar
();
viewModel
.
initToolbar
();
if
(
ModuleManager
.
openCom
()
!=
0
)
{
if
(
"0"
.
equals
(
Configs
.
FREQUENCY_CONFIG
))
new
MaterialDialog
.
Builder
(
this
).
title
(
"系统提示"
).
content
(
"串口打开失败,无法工作,请检查设备"
).
cancelable
(
false
).
canceledOnTouchOutside
(
false
).
positiveText
(
"退出"
).
onAny
(
new
MaterialDialog
.
SingleButtonCallback
()
{
if
(
ModuleManager
.
openCom
()
!=
0
)
{
@Override
new
MaterialDialog
.
Builder
(
this
).
title
(
"系统提示"
).
content
(
"串口打开失败,无法工作,请检查设备"
).
cancelable
(
false
).
canceledOnTouchOutside
(
false
).
positiveText
(
"退出"
).
onAny
(
new
MaterialDialog
.
SingleButtonCallback
()
{
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
@Override
if
(
which
==
DialogAction
.
POSITIVE
)
{
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
ModuleManager
.
destroyLibSO
();
if
(
which
==
DialogAction
.
POSITIVE
)
{
finish
();
ModuleManager
.
destroyLibSO
();
android
.
os
.
Process
.
killProcess
(
android
.
os
.
Process
.
myPid
());
finish
();
android
.
os
.
Process
.
killProcess
(
android
.
os
.
Process
.
myPid
());
}
}
}
}
}).
show
();
}).
show
();
}
}
}
}
@Override
@Override
...
@@ -126,11 +127,9 @@ public class MainActivity extends BaseActivity<ActivityMainBinding, MainVM> {
...
@@ -126,11 +127,9 @@ public class MainActivity extends BaseActivity<ActivityMainBinding, MainVM> {
});
});
}
}
/**
/**
* 监听Back键按下事件
* 监听Back键按下事件
*/
*/
...
...
app/src/main/java/com/phlx/wool/ui/splash/SplashVM.java
View file @
5a67a9b2
...
@@ -104,7 +104,7 @@ public class SplashVM extends MainBarVM<Repository> {
...
@@ -104,7 +104,7 @@ public class SplashVM extends MainBarVM<Repository> {
postParams
.
setInputTime
(
inputTime
);
postParams
.
setInputTime
(
inputTime
);
postParams
.
setPageNum
(
index
);
postParams
.
setPageNum
(
index
);
postParams
.
setPageSize
(
count
);
postParams
.
setPageSize
(
count
);
postParams
.
setYears
(
"
2018
"
);
postParams
.
setYears
(
""
);
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
new
Gson
().
toJson
(
postParams
));
new
Gson
().
toJson
(
postParams
));
KLog
.
e
(
"--Unit--"
+
postParams
.
toString
());
KLog
.
e
(
"--Unit--"
+
postParams
.
toString
());
...
@@ -175,7 +175,7 @@ public class SplashVM extends MainBarVM<Repository> {
...
@@ -175,7 +175,7 @@ public class SplashVM extends MainBarVM<Repository> {
postParams
.
setInputTime
(
0
);
postParams
.
setInputTime
(
0
);
postParams
.
setPageNum
(
1
);
postParams
.
setPageNum
(
1
);
postParams
.
setPageSize
(
200
);
postParams
.
setPageSize
(
200
);
postParams
.
setYears
(
"
2018
"
);
postParams
.
setYears
(
""
);
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
new
Gson
().
toJson
(
postParams
));
new
Gson
().
toJson
(
postParams
));
addSubscribe
(
model
.
getVeterinaryList
(
body
)
addSubscribe
(
model
.
getVeterinaryList
(
body
)
...
@@ -259,7 +259,7 @@ public class SplashVM extends MainBarVM<Repository> {
...
@@ -259,7 +259,7 @@ public class SplashVM extends MainBarVM<Repository> {
postParams
.
setInputTime
(
0
);
postParams
.
setInputTime
(
0
);
postParams
.
setPageNum
(
1
);
postParams
.
setPageNum
(
1
);
postParams
.
setPageSize
(
200
);
postParams
.
setPageSize
(
200
);
postParams
.
setYears
(
"
2018
"
);
postParams
.
setYears
(
""
);
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
new
Gson
().
toJson
(
postParams
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
new
Gson
().
toJson
(
postParams
));
addSubscribe
(
model
.
getBasicInfo
(
body
)
addSubscribe
(
model
.
getBasicInfo
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
...
...
app/src/main/java/com/phlx/wool/ui/sync/vm/DownloadVM.java
View file @
5a67a9b2
...
@@ -259,7 +259,7 @@ public class DownloadVM extends BackBarVM<Repository> {
...
@@ -259,7 +259,7 @@ public class DownloadVM extends BackBarVM<Repository> {
postParams
.
setInputTime
(
inputTime
);
postParams
.
setInputTime
(
inputTime
);
postParams
.
setPageNum
(
index
);
postParams
.
setPageNum
(
index
);
postParams
.
setPageSize
(
count
);
postParams
.
setPageSize
(
count
);
postParams
.
setYears
(
"
2018
"
);
postParams
.
setYears
(
""
);
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
new
Gson
().
toJson
(
postParams
));
new
Gson
().
toJson
(
postParams
));
KLog
.
e
(
"--Unit--"
+
postParams
.
toString
());
KLog
.
e
(
"--Unit--"
+
postParams
.
toString
());
...
@@ -331,7 +331,7 @@ public class DownloadVM extends BackBarVM<Repository> {
...
@@ -331,7 +331,7 @@ public class DownloadVM extends BackBarVM<Repository> {
postParams
.
setInputTime
(
0
);
postParams
.
setInputTime
(
0
);
postParams
.
setPageNum
(
1
);
postParams
.
setPageNum
(
1
);
postParams
.
setPageSize
(
200
);
postParams
.
setPageSize
(
200
);
postParams
.
setYears
(
"
2018
"
);
postParams
.
setYears
(
""
);
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
new
Gson
().
toJson
(
postParams
));
new
Gson
().
toJson
(
postParams
));
addSubscribe
(
model
.
getVeterinaryList
(
body
)
addSubscribe
(
model
.
getVeterinaryList
(
body
)
...
@@ -438,7 +438,7 @@ public class DownloadVM extends BackBarVM<Repository> {
...
@@ -438,7 +438,7 @@ public class DownloadVM extends BackBarVM<Repository> {
postParams
.
setInputTime
(
0
);
postParams
.
setInputTime
(
0
);
postParams
.
setPageNum
(
1
);
postParams
.
setPageNum
(
1
);
postParams
.
setPageSize
(
200
);
postParams
.
setPageSize
(
200
);
postParams
.
setYears
(
"
2018
"
);
postParams
.
setYears
(
""
);
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
new
Gson
().
toJson
(
postParams
));
new
Gson
().
toJson
(
postParams
));
addSubscribe
(
model
.
getBasicInfo
(
body
)
addSubscribe
(
model
.
getBasicInfo
(
body
)
...
...
app/src/main/java/com/phlx/wool/ui/villus/vm/VillusBuyVM.java
View file @
5a67a9b2
...
@@ -184,7 +184,7 @@ public class VillusBuyVM extends BackBarVM<Repository> {
...
@@ -184,7 +184,7 @@ public class VillusBuyVM extends BackBarVM<Repository> {
uploadData
=
new
ArrayList
<>();
uploadData
=
new
ArrayList
<>();
entity
.
setId
(
id
);
entity
.
setId
(
id
);
entity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_NAME
));
entity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_
LOGIN_
NAME
));
entity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
entity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
entity
.
setStatus
(
1
);
entity
.
setStatus
(
1
);
entity
.
setProductId
(
StringUtil
.
to32String
(
IdUtil
.
createSnowflake
(
3
,
1
).
nextId
()));
entity
.
setProductId
(
StringUtil
.
to32String
(
IdUtil
.
createSnowflake
(
3
,
1
).
nextId
()));
...
...
app/src/main/java/com/phlx/wool/ui/villus/vm/VillusGaugeVM.java
View file @
5a67a9b2
...
@@ -127,7 +127,7 @@ public class VillusGaugeVM extends BackBarVM<Repository> {
...
@@ -127,7 +127,7 @@ public class VillusGaugeVM extends BackBarVM<Repository> {
uploadData
=
new
ArrayList
<>();
uploadData
=
new
ArrayList
<>();
entity
.
setId
(
id
);
entity
.
setId
(
id
);
entity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_NAME
));
entity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_
LOGIN_
NAME
));
entity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
entity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
()));
entity
.
setStatus
(
1
);
entity
.
setStatus
(
1
);
uploadData
.
add
(
entity
);
uploadData
.
add
(
entity
);
...
...
app/src/main/java/com/phlx/wool/ui/work/harmless/HarmlessVM.java
View file @
5a67a9b2
...
@@ -133,6 +133,7 @@ public class HarmlessVM extends BackBarVM<Repository> {
...
@@ -133,6 +133,7 @@ public class HarmlessVM extends BackBarVM<Repository> {
if
(
parentId
==
-
1
)
{
if
(
parentId
==
-
1
)
{
entity
.
setManagerName
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_UNIT_NAME
));
entity
.
setManagerName
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_UNIT_NAME
));
entity
.
setManagerCode
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_UNIT_CODE
));
entity
.
setManagerCode
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_UNIT_CODE
));
entity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
entity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())));
entity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())));
entity
.
setStatus
(
1
);
entity
.
setStatus
(
1
);
parentId
=
DbUtil
.
getInstance
().
insertOrReplace
(
entity
);
parentId
=
DbUtil
.
getInstance
().
insertOrReplace
(
entity
);
...
@@ -145,6 +146,8 @@ public class HarmlessVM extends BackBarVM<Repository> {
...
@@ -145,6 +146,8 @@ public class HarmlessVM extends BackBarVM<Repository> {
harmlessDetail
.
setIsLegalStatus
(
labels
.
get
(
i
).
getIsLegalStatus
());
harmlessDetail
.
setIsLegalStatus
(
labels
.
get
(
i
).
getIsLegalStatus
());
harmlessDetail
.
setTwodimensionno
(
labels
.
get
(
i
).
getTwodimensionno
());
harmlessDetail
.
setTwodimensionno
(
labels
.
get
(
i
).
getTwodimensionno
());
harmlessDetail
.
setReceivingUnit
(
labels
.
get
(
i
).
getReceivingUnit
());
harmlessDetail
.
setReceivingUnit
(
labels
.
get
(
i
).
getReceivingUnit
());
harmlessDetail
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
harmlessDetail
.
setCreateTime
(
dateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())));
detailList
.
add
(
harmlessDetail
);
detailList
.
add
(
harmlessDetail
);
}
}
DbUtil
.
getInstance
().
setDbIDUCallBack
(
new
DbIDUCallBack
()
{
DbUtil
.
getInstance
().
setDbIDUCallBack
(
new
DbIDUCallBack
()
{
...
...
app/src/main/java/com/phlx/wool/ui/work/mark/MarkingVM.java
View file @
5a67a9b2
...
@@ -60,8 +60,7 @@ public class MarkingVM extends BackBarVM<Repository> {
...
@@ -60,8 +60,7 @@ public class MarkingVM extends BackBarVM<Repository> {
List
<
Variety
>
varieties
=
model
.
getVariety
();
List
<
Variety
>
varieties
=
model
.
getVariety
();
if
(
varieties
!=
null
&&
varieties
.
size
()
>
0
)
{
if
(
varieties
!=
null
&&
varieties
.
size
()
>
0
)
{
for
(
Variety
variety
:
varieties
)
{
for
(
Variety
variety
:
varieties
)
{
varietyItemData
.
add
(
new
ItemData
(
variety
.
getVarietyName
(),
varietyItemData
.
add
(
new
ItemData
(
variety
.
getVarietyName
(),
variety
.
getVarietyCode
()));
variety
.
getVarietyCode
()));
}
}
}
}
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
...
@@ -178,6 +177,7 @@ public class MarkingVM extends BackBarVM<Repository> {
...
@@ -178,6 +177,7 @@ public class MarkingVM extends BackBarVM<Repository> {
marking
.
setManagerCode
(
entity
.
getManagerCode
());
marking
.
setManagerCode
(
entity
.
getManagerCode
());
marking
.
setManagerName
(
entity
.
getManagerName
());
marking
.
setManagerName
(
entity
.
getManagerName
());
marking
.
setCreateTime
(
dateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())));
marking
.
setCreateTime
(
dateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())));
marking
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
uploadData
.
add
(
marking
);
uploadData
.
add
(
marking
);
}
}
...
...
app/src/main/java/com/phlx/wool/ui/work/quarantine/QuarantineVM.java
View file @
5a67a9b2
...
@@ -129,6 +129,7 @@ public class QuarantineVM extends BackBarVM<Repository> {
...
@@ -129,6 +129,7 @@ public class QuarantineVM extends BackBarVM<Repository> {
entity
.
setManagerName
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_UNIT_NAME
));
entity
.
setManagerName
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_UNIT_NAME
));
entity
.
setManagerCode
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_UNIT_CODE
));
entity
.
setManagerCode
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_UNIT_CODE
));
entity
.
setManagerPhone
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_UNIT_PHONE
));
entity
.
setManagerPhone
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_UNIT_PHONE
));
entity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
entity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())));
entity
.
setCreateTime
(
dateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())));
entity
.
setStatus
(
1
);
entity
.
setStatus
(
1
);
parentId
=
DbUtil
.
getInstance
().
insertOrReplace
(
entity
);
parentId
=
DbUtil
.
getInstance
().
insertOrReplace
(
entity
);
...
@@ -142,6 +143,8 @@ public class QuarantineVM extends BackBarVM<Repository> {
...
@@ -142,6 +143,8 @@ public class QuarantineVM extends BackBarVM<Repository> {
quarantineDetail
.
setIsLegalStatus
(
labels
.
get
(
i
).
getIsLegalStatus
());
quarantineDetail
.
setIsLegalStatus
(
labels
.
get
(
i
).
getIsLegalStatus
());
quarantineDetail
.
setTwodimensionno
(
labels
.
get
(
i
).
getTwodimensionno
());
quarantineDetail
.
setTwodimensionno
(
labels
.
get
(
i
).
getTwodimensionno
());
quarantineDetail
.
setReceivingUnit
(
labels
.
get
(
i
).
getReceivingUnit
());
quarantineDetail
.
setReceivingUnit
(
labels
.
get
(
i
).
getReceivingUnit
());
quarantineDetail
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
quarantineDetail
.
setCreateTime
(
dateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())));
detailList
.
add
(
quarantineDetail
);
detailList
.
add
(
quarantineDetail
);
}
}
DbUtil
.
getInstance
().
setDbIDUCallBack
(
new
DbIDUCallBack
()
{
DbUtil
.
getInstance
().
setDbIDUCallBack
(
new
DbIDUCallBack
()
{
...
...
app/src/main/res/layout/activity_marking.xml
View file @
5a67a9b2
...
@@ -308,6 +308,7 @@
...
@@ -308,6 +308,7 @@
android:layout_marginTop=
"@dimen/dp_5"
android:layout_marginTop=
"@dimen/dp_5"
android:background=
"@drawable/input_frame_bg"
android:background=
"@drawable/input_frame_bg"
android:hint=
"请输入胎次"
android:hint=
"请输入胎次"
android:inputType=
"number"
android:maxLines=
"1"
android:maxLines=
"1"
android:text=
"@={viewModel.entity.birthNum}"
android:text=
"@={viewModel.entity.birthNum}"
android:textSize=
"@dimen/edit_size"
android:textSize=
"@dimen/edit_size"
...
...
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