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
f50688fc
Commit
f50688fc
authored
Apr 23, 2021
by
hywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复一些bug
parent
80c4a802
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
8 deletions
+20
-8
build.gradle
app/build.gradle
+2
-2
LoginVM.java
app/src/main/java/com/phlx/wool/ui/login/LoginVM.java
+1
-2
MainActivity.java
app/src/main/java/com/phlx/wool/ui/main/MainActivity.java
+1
-1
VillusBuyVM.java
...src/main/java/com/phlx/wool/ui/villus/vm/VillusBuyVM.java
+2
-0
VillusGaugeVM.java
...c/main/java/com/phlx/wool/ui/villus/vm/VillusGaugeVM.java
+2
-0
HarmlessVM.java
.../main/java/com/phlx/wool/ui/work/harmless/HarmlessVM.java
+5
-0
MarkingVM.java
app/src/main/java/com/phlx/wool/ui/work/mark/MarkingVM.java
+3
-2
QuarantineVM.java
...n/java/com/phlx/wool/ui/work/quarantine/QuarantineVM.java
+4
-1
No files found.
app/build.gradle
View file @
f50688fc
...
@@ -8,8 +8,8 @@ android {
...
@@ -8,8 +8,8 @@ android {
applicationId
"com.phlx.wool"
applicationId
"com.phlx.wool"
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
29
targetSdkVersion
29
versionCode
1
3
versionCode
1
4
versionName
"1.1.
3
"
versionName
"1.1.
4
"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
}
}
...
...
app/src/main/java/com/phlx/wool/ui/login/LoginVM.java
View file @
f50688fc
...
@@ -116,8 +116,7 @@ public class LoginVM extends BackBarVM<Repository> {
...
@@ -116,8 +116,7 @@ public class LoginVM extends BackBarVM<Repository> {
if
(
checkPerson
(
userName
.
get
(),
password
.
get
()))
if
(
checkPerson
(
userName
.
get
(),
password
.
get
()))
return
;
return
;
String
postInfoStr
=
new
Gson
().
toJson
(
new
UserParams
(
userName
.
get
(),
password
.
get
()));
String
postInfoStr
=
new
Gson
().
toJson
(
new
UserParams
(
userName
.
get
(),
password
.
get
()));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
postInfoStr
);
postInfoStr
);
addSubscribe
(
model
.
loginPost
(
body
)
addSubscribe
(
model
.
loginPost
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
schedulersTransformer
())
.
compose
(
RxUtils
.
schedulersTransformer
())
...
...
app/src/main/java/com/phlx/wool/ui/main/MainActivity.java
View file @
f50688fc
...
@@ -85,7 +85,7 @@ public class MainActivity extends BaseActivity<ActivityMainBinding, MainVM> {
...
@@ -85,7 +85,7 @@ public class MainActivity extends BaseActivity<ActivityMainBinding, MainVM> {
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
if
(
which
==
DialogAction
.
POSITIVE
)
{
if
(
which
==
DialogAction
.
POSITIVE
)
{
ModuleManager
.
destroyLibSO
();
ModuleManager
.
destroyLibSO
();
finish
();
//
finish();
android
.
os
.
Process
.
killProcess
(
android
.
os
.
Process
.
myPid
());
android
.
os
.
Process
.
killProcess
(
android
.
os
.
Process
.
myPid
());
}
}
}
}
...
...
app/src/main/java/com/phlx/wool/ui/villus/vm/VillusBuyVM.java
View file @
f50688fc
...
@@ -128,6 +128,7 @@ public class VillusBuyVM extends BackBarVM<Repository> {
...
@@ -128,6 +128,7 @@ public class VillusBuyVM extends BackBarVM<Repository> {
public
BindingCommand
onBuyDateClick
=
new
BindingCommand
(()
->
buyDay
.
call
());
public
BindingCommand
onBuyDateClick
=
new
BindingCommand
(()
->
buyDay
.
call
());
public
void
setBuyDate
(
Date
date
)
{
public
void
setBuyDate
(
Date
date
)
{
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
entity
.
setBuyDate
(
dateFormat
.
format
(
date
));
entity
.
setBuyDate
(
dateFormat
.
format
(
date
));
entity
.
notifyChange
();
entity
.
notifyChange
();
}
}
...
@@ -192,6 +193,7 @@ public class VillusBuyVM extends BackBarVM<Repository> {
...
@@ -192,6 +193,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_LOGIN_NAME
));
entity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
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 @
f50688fc
...
@@ -82,6 +82,7 @@ public class VillusGaugeVM extends BackBarVM<Repository> {
...
@@ -82,6 +82,7 @@ public class VillusGaugeVM extends BackBarVM<Repository> {
public
BindingCommand
onGaugeDateClick
=
new
BindingCommand
(()
->
gaugeDay
.
call
());
public
BindingCommand
onGaugeDateClick
=
new
BindingCommand
(()
->
gaugeDay
.
call
());
public
void
setGaugeDate
(
Date
date
)
{
public
void
setGaugeDate
(
Date
date
)
{
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
entity
.
setMeasuringTime
(
dateFormat
.
format
(
date
));
entity
.
setMeasuringTime
(
dateFormat
.
format
(
date
));
entity
.
notifyChange
();
entity
.
notifyChange
();
}
}
...
@@ -128,6 +129,7 @@ public class VillusGaugeVM extends BackBarVM<Repository> {
...
@@ -128,6 +129,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_LOGIN_NAME
));
entity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
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 @
f50688fc
...
@@ -88,16 +88,19 @@ public class HarmlessVM extends BackBarVM<Repository> {
...
@@ -88,16 +88,19 @@ public class HarmlessVM extends BackBarVM<Repository> {
public
BindingCommand
onVeterinaryNameClick
=
new
BindingCommand
(()
->
showSearch
.
call
());
public
BindingCommand
onVeterinaryNameClick
=
new
BindingCommand
(()
->
showSearch
.
call
());
public
void
setOnsetTime
(
Date
date
)
{
public
void
setOnsetTime
(
Date
date
)
{
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
entity
.
setOnsetTime
(
dateFormat
.
format
(
date
));
entity
.
setOnsetTime
(
dateFormat
.
format
(
date
));
entity
.
notifyChange
();
entity
.
notifyChange
();
}
}
public
void
setDeathTime
(
Date
date
)
{
public
void
setDeathTime
(
Date
date
)
{
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
entity
.
setDeathTime
(
dateFormat
.
format
(
date
));
entity
.
setDeathTime
(
dateFormat
.
format
(
date
));
entity
.
notifyChange
();
entity
.
notifyChange
();
}
}
public
void
setTreatmentTime
(
Date
date
)
{
public
void
setTreatmentTime
(
Date
date
)
{
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
entity
.
setTreatmentTime
(
dateFormat
.
format
(
date
));
entity
.
setTreatmentTime
(
dateFormat
.
format
(
date
));
entity
.
notifyChange
();
entity
.
notifyChange
();
}
}
...
@@ -134,6 +137,7 @@ public class HarmlessVM extends BackBarVM<Repository> {
...
@@ -134,6 +137,7 @@ public class HarmlessVM 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
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
entity
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
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
);
...
@@ -147,6 +151,7 @@ public class HarmlessVM extends BackBarVM<Repository> {
...
@@ -147,6 +151,7 @@ public class HarmlessVM extends BackBarVM<Repository> {
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
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
harmlessDetail
.
setCreateTime
(
dateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())));
harmlessDetail
.
setCreateTime
(
dateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())));
detailList
.
add
(
harmlessDetail
);
detailList
.
add
(
harmlessDetail
);
}
}
...
...
app/src/main/java/com/phlx/wool/ui/work/mark/MarkingVM.java
View file @
f50688fc
...
@@ -119,6 +119,7 @@ public class MarkingVM extends BackBarVM<Repository> {
...
@@ -119,6 +119,7 @@ public class MarkingVM extends BackBarVM<Repository> {
public
BindingCommand
onVeterinaryNameClick
=
new
BindingCommand
(()
->
showSearch
.
call
());
public
BindingCommand
onVeterinaryNameClick
=
new
BindingCommand
(()
->
showSearch
.
call
());
public
void
setBirthTime
(
Date
date
)
{
public
void
setBirthTime
(
Date
date
)
{
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
dateStr
=
dateFormat
.
format
(
date
);
String
dateStr
=
dateFormat
.
format
(
date
);
entity
.
setBirthTime
(
dateStr
.
substring
(
0
,
dateStr
.
length
()
-
3
));
entity
.
setBirthTime
(
dateStr
.
substring
(
0
,
dateStr
.
length
()
-
3
));
entity
.
notifyChange
();
entity
.
notifyChange
();
...
@@ -179,6 +180,7 @@ public class MarkingVM extends BackBarVM<Repository> {
...
@@ -179,6 +180,7 @@ public class MarkingVM extends BackBarVM<Repository> {
marking
.
setVeterinaryName
(
entity
.
getVeterinaryName
());
marking
.
setVeterinaryName
(
entity
.
getVeterinaryName
());
marking
.
setManagerCode
(
entity
.
getManagerCode
());
marking
.
setManagerCode
(
entity
.
getManagerCode
());
marking
.
setManagerName
(
entity
.
getManagerName
());
marking
.
setManagerName
(
entity
.
getManagerName
());
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
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
));
marking
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
uploadData
.
add
(
marking
);
uploadData
.
add
(
marking
);
...
@@ -212,8 +214,7 @@ public class MarkingVM extends BackBarVM<Repository> {
...
@@ -212,8 +214,7 @@ public class MarkingVM extends BackBarVM<Repository> {
new
GsonBuilder
().
serializeNulls
()
new
GsonBuilder
().
serializeNulls
()
// .excludeFieldsWithoutExposeAnnotation()
// .excludeFieldsWithoutExposeAnnotation()
.
create
().
toJson
(
new
UploadParams
<
List
<
Marking
>>(
uploadData
));
.
create
().
toJson
(
new
UploadParams
<
List
<
Marking
>>(
uploadData
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
postInfoStr
);
postInfoStr
);
KLog
.
e
(
postInfoStr
);
KLog
.
e
(
postInfoStr
);
addSubscribe
(
model
.
submitMarking
(
body
)
addSubscribe
(
model
.
submitMarking
(
body
)
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
.
compose
(
RxUtils
.
bindToLifecycle
(
getLifecycleProvider
()))
...
...
app/src/main/java/com/phlx/wool/ui/work/quarantine/QuarantineVM.java
View file @
f50688fc
...
@@ -101,12 +101,13 @@ public class QuarantineVM extends BackBarVM<Repository> {
...
@@ -101,12 +101,13 @@ public class QuarantineVM extends BackBarVM<Repository> {
public
void
setQuarantineTime
(
Date
date
)
{
public
void
setQuarantineTime
(
Date
date
)
{
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
entity
.
setQuarantineTime
(
dateFormat
.
format
(
date
));
entity
.
setQuarantineTime
(
dateFormat
.
format
(
date
));
entity
.
notifyChange
();
entity
.
notifyChange
();
}
}
public
void
setImmunityTime
(
Date
date
)
{
public
void
setImmunityTime
(
Date
date
)
{
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
entity
.
setImmuneDate
(
dateFormat
.
format
(
date
));
entity
.
setImmuneDate
(
dateFormat
.
format
(
date
));
entity
.
notifyChange
();
entity
.
notifyChange
();
}
}
...
@@ -130,6 +131,7 @@ public class QuarantineVM extends BackBarVM<Repository> {
...
@@ -130,6 +131,7 @@ public class QuarantineVM extends BackBarVM<Repository> {
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
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
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
);
...
@@ -144,6 +146,7 @@ public class QuarantineVM extends BackBarVM<Repository> {
...
@@ -144,6 +146,7 @@ public class QuarantineVM extends BackBarVM<Repository> {
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
.
setCreateBy
(
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_LOGIN_NAME
));
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
quarantineDetail
.
setCreateTime
(
dateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())));
quarantineDetail
.
setCreateTime
(
dateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())));
detailList
.
add
(
quarantineDetail
);
detailList
.
add
(
quarantineDetail
);
}
}
...
...
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