Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
A
anchor_collect_flutter
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
anchor_collect_flutter
Commits
733d7006
Commit
733d7006
authored
Mar 25, 2024
by
hywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.添加系谱功能;
2.修改配种详情页面逻辑; 3.性能测定增加十字部高。
parent
275dee22
Hide whitespace changes
Inline
Side-by-side
Showing
54 changed files
with
4499 additions
and
729 deletions
+4499
-729
HttpUtils.dart
lib/api/HttpUtils.dart
+2
-2
api_response.dart
lib/api/api_response.dart
+1
-1
apis.dart
lib/api/apis.dart
+4
-3
api_response.g.dart
lib/generated/json/api_response.g.dart
+3
-2
api_response.g.dart
lib/generated/json/base/api_response.g.dart
+76
-0
breeding_record_detail_entity.g.dart
lib/generated/json/breeding_record_detail_entity.g.dart
+7
-0
cattle_resume_entity.g.dart
lib/generated/json/cattle_resume_entity.g.dart
+84
-0
performance.g.dart
lib/generated/json/performance.g.dart
+7
-0
breeding_record_detail_entity.dart
lib/models/breeding_record_detail_entity.dart
+7
-2
breeding_record_detail_entity.g.dart
lib/models/breeding_record_detail_entity.g.dart
+237
-24
cattle_resume_entity.dart
lib/models/cattle_resume_entity.dart
+40
-1
cattle_resume_entity.g.dart
lib/models/cattle_resume_entity.g.dart
+2834
-314
dict_entity.dart
lib/models/dict_entity.dart
+1
-1
dict_entity.g.dart
lib/models/dict_entity.g.dart
+1
-135
performance.dart
lib/models/performance.dart
+5
-0
performance.g.dart
lib/models/performance.g.dart
+222
-87
sync.dart
lib/models/sync.dart
+2
-1
begats_record_binding.dart
lib/pages/begats_record/begats_record_binding.dart
+10
-0
begats_record_logic.dart
lib/pages/begats_record/begats_record_logic.dart
+111
-0
begats_record_state.dart
lib/pages/begats_record/begats_record_state.dart
+12
-0
begats_record_view.dart
lib/pages/begats_record/begats_record_view.dart
+431
-0
breeding_record_detail_logic.dart
.../breeding_record_detail/breeding_record_detail_logic.dart
+24
-50
breeding_record_detail_state.dart
.../breeding_record_detail/breeding_record_detail_state.dart
+3
-0
breeding_record_detail_view.dart
...d/breeding_record_detail/breeding_record_detail_view.dart
+111
-50
breeding_record_list_view.dart
...ecord/breeding_record_list/breeding_record_list_view.dart
+4
-1
breeding_record_logic.dart
lib/pages/breeding_record/breeding_record_logic.dart
+26
-12
breeding_record_view.dart
lib/pages/breeding_record/breeding_record_view.dart
+4
-1
cattle_resume_list_view.dart
...le_resume/cattle_resume_list/cattle_resume_list_view.dart
+4
-1
cattle_resume_logic.dart
lib/pages/cattle_resume/cattle_resume_logic.dart
+11
-1
cattle_resume_view.dart
lib/pages/cattle_resume/cattle_resume_view.dart
+18
-1
home_view.dart
lib/pages/home/home_view.dart
+4
-1
immune_batch_list_view.dart
...mmune_batch/immune_batch_list/immune_batch_list_view.dart
+4
-1
immune_batch_view.dart
lib/pages/immune_batch/immune_batch_view.dart
+4
-1
like_search_farmer_binding.dart
lib/pages/like_search_farmer/like_search_farmer_binding.dart
+10
-0
like_search_farmer_logic.dart
lib/pages/like_search_farmer/like_search_farmer_logic.dart
+7
-0
like_search_farmer_state.dart
lib/pages/like_search_farmer/like_search_farmer_state.dart
+5
-0
like_search_farmer_view.dart
lib/pages/like_search_farmer/like_search_farmer_view.dart
+17
-0
login_logic.dart
lib/pages/login/login_logic.dart
+11
-4
medical_record_list_view.dart
..._record/medical_record_list/medical_record_list_view.dart
+4
-1
medical_record_view.dart
lib/pages/medical_record/medical_record_view.dart
+4
-1
message_detail_view.dart
lib/pages/message/message_detail/message_detail_view.dart
+4
-1
message_list_view.dart
lib/pages/message/message_list/message_list_view.dart
+4
-1
message_view.dart
lib/pages/message/message_view.dart
+4
-1
mine_view.dart
lib/pages/mine/mine_view.dart
+4
-1
performance_list_view.dart
...s/performance/performance_list/performance_list_view.dart
+4
-1
performance_view.dart
lib/pages/performance/performance_view.dart
+26
-9
setting_view.dart
lib/pages/setting/setting_view.dart
+4
-1
sync_logic.dart
lib/pages/sync/sync_logic.dart
+43
-10
sync_view.dart
lib/pages/sync/sync_view.dart
+5
-2
weight_man_list_view.dart
...ages/weight_man/weight_man_list/weight_man_list_view.dart
+4
-1
weight_man_view.dart
lib/pages/weight_man/weight_man_view.dart
+4
-1
pages.dart
lib/routes/pages.dart
+14
-0
routes.dart
lib/routes/routes.dart
+6
-0
base64_utils.dart
lib/utils/base64_utils.dart
+1
-1
No files found.
lib/api/HttpUtils.dart
View file @
733d7006
...
@@ -37,7 +37,7 @@ class HttpUtils<T> {
...
@@ -37,7 +37,7 @@ class HttpUtils<T> {
_dio
=
Dio
(
options
);
_dio
=
Dio
(
options
);
_dio
.
interceptors
.
add
(
TokenInterceptor
());
_dio
.
interceptors
.
add
(
TokenInterceptor
());
_dio
.
interceptors
_dio
.
interceptors
.
add
(
PrettyDioLogger
(
requestHeader:
true
,
requestBody:
true
,
responseHeader:
true
,
responseBody:
tru
e
));
.
add
(
PrettyDioLogger
(
requestHeader:
true
,
requestBody:
false
,
responseHeader:
true
,
responseBody:
fals
e
));
}
}
factory
HttpUtils
()
{
factory
HttpUtils
()
{
...
@@ -148,8 +148,8 @@ class HttpUtils<T> {
...
@@ -148,8 +148,8 @@ class HttpUtils<T> {
_handleResponse
(
response
);
_handleResponse
(
response
);
}
catch
(
e
)
{
}
catch
(
e
)
{
loading
.
dismissLoading
();
loading
.
dismissLoading
();
DialogUtils
.
dismissDialog
();
var
exception
=
ApiException
.
from
(
e
);
var
exception
=
ApiException
.
from
(
e
);
// DialogUtils.dismissDialog();
if
(
errorCallback
!=
null
)
{
if
(
errorCallback
!=
null
)
{
errorCallback
!(
e
.
toString
(),
exception
.
code
??
-
1
);
errorCallback
!(
e
.
toString
(),
exception
.
code
??
-
1
);
}
}
...
...
lib/api/api_response.dart
View file @
733d7006
import
'dart:convert'
;
import
'dart:convert'
;
import
'../generated/json/api_response.g.dart'
;
import
'../generated/json/base/json_field.dart'
;
import
'../generated/json/base/json_field.dart'
;
import
'api_response.g.dart'
;
@JsonSerializable
()
@JsonSerializable
()
class
ApiResponse
<
T
>
{
class
ApiResponse
<
T
>
{
...
...
lib/api/apis.dart
View file @
733d7006
class
APIS
{
class
APIS
{
static
const
baseUrl
=
static
const
baseUrl
=
"http://192.168.8.135:9000/"
;
// "http://192.168.8.135:9000/";
// "http://82.156.29.228:9000/";
"http://82.156.29.228:9000/"
;
// "http://serve.xlglmnmyzspt.org.cn/";
// "http://serve.xlglmnmyzspt.org.cn";//正式old
// "http://serve.xlglzy.org.cn";//正式
/// 初始化游客token
/// 初始化游客token
static
const
initialize
=
"api/initialize"
;
static
const
initialize
=
"api/initialize"
;
...
...
lib/
api
/api_response.g.dart
→
lib/
generated/json
/api_response.g.dart
View file @
733d7006
import
'dart:convert'
;
import
'dart:convert'
;
import
'../generated/json/base/json_convert_content.dart'
;
import
'../../api/api_response.dart'
;
import
'api_response.dart'
;
import
'base/json_convert_content.dart'
;
ApiResponse
<
T
>
$ApiResponseFromJson
<
T
>(
Map
<
String
,
dynamic
>
json
)
{
ApiResponse
<
T
>
$ApiResponseFromJson
<
T
>(
Map
<
String
,
dynamic
>
json
)
{
final
ApiResponse
<
T
>
apiResponse
=
ApiResponse
<
T
>();
final
ApiResponse
<
T
>
apiResponse
=
ApiResponse
<
T
>();
...
...
lib/generated/json/base/api_response.g.dart
0 → 100644
View file @
733d7006
import
'dart:convert'
;
import
'package:anchor_collect_flutter/api/api_response.dart'
;
import
'json_convert_content.dart'
;
ApiResponse
<
T
>
$ApiResponseFromJson
<
T
>(
Map
<
String
,
dynamic
>
json
)
{
final
ApiResponse
<
T
>
apiResponse
=
ApiResponse
<
T
>();
final
int
?
code
=
jsonConvert
.
convert
<
int
>(
json
[
'code'
]);
if
(
code
!=
null
)
{
apiResponse
.
code
=
code
;
}
final
String
?
msg
=
jsonConvert
.
convert
<
String
>(
json
[
'msg'
]);
if
(
msg
!=
null
)
{
apiResponse
.
msg
=
msg
;
}
T
?
data
;
data
=
jsonConvert
.
convert
<
T
>(
json
[
'data'
]);
if
(
data
!=
null
)
{
apiResponse
.
data
=
data
;
}
return
apiResponse
;
}
ApiResponse
<
T
>
$ApiResponseFromJsonList
<
T
>(
Map
<
String
,
dynamic
>
json
)
{
final
ApiResponse
<
T
>
apiResponse
=
ApiResponse
<
T
>();
final
int
?
code
=
jsonConvert
.
convert
<
int
>(
json
[
'code'
]);
if
(
code
!=
null
)
{
apiResponse
.
code
=
code
;
}
final
String
?
msg
=
jsonConvert
.
convert
<
String
>(
json
[
'msg'
]);
if
(
msg
!=
null
)
{
apiResponse
.
msg
=
msg
;
}
List
<
T
?>?
data
;
data
=
jsonConvert
.
convertList
<
T
>(
json
[
'data'
]);
if
(
data
!=
null
)
{
apiResponse
.
list
=
data
;
}
return
apiResponse
;
}
Map
<
String
,
dynamic
>
$ApiResponseToJson
(
ApiResponse
entity
)
{
final
Map
<
String
,
dynamic
>
data
=
<
String
,
dynamic
>{};
data
[
'code'
]
=
entity
.
code
;
data
[
'msg'
]
=
entity
.
msg
;
data
[
'data'
]
=
entity
.
data
.
toJson
();
data
[
'list'
]
=
entity
.
data
.
toJson
();
return
data
;
}
extension
ApiResponseExtension
on
ApiResponse
{
ApiResponse
copyWith
({
int
?
code
,
String
?
msg
,
ApiResponseData
?
data
,
})
{
return
ApiResponse
()
..
code
=
code
??
this
.
code
..
msg
=
msg
??
this
.
msg
..
data
=
data
??
this
.
data
..
list
=
list
;
}
}
ApiResponseData
$ApiResponseDataFromJson
(
Map
<
String
,
dynamic
>
json
)
{
final
ApiResponseData
apiResponseData
=
ApiResponseData
();
return
apiResponseData
;
}
Map
<
String
,
dynamic
>
$ApiResponseDataToJson
(
ApiResponseData
entity
)
{
final
Map
<
String
,
dynamic
>
data
=
<
String
,
dynamic
>{};
return
data
;
}
extension
ApiResponseDataExtension
on
ApiResponseData
{}
lib/generated/json/breeding_record_detail_entity.g.dart
View file @
733d7006
...
@@ -37,6 +37,10 @@ BreedingRecordDetailEntity $BreedingRecordDetailEntityFromJson(Map<String, dynam
...
@@ -37,6 +37,10 @@ BreedingRecordDetailEntity $BreedingRecordDetailEntityFromJson(Map<String, dynam
if
(
frozenSemenBatch
!=
null
)
{
if
(
frozenSemenBatch
!=
null
)
{
breedingRecordDetailEntity
.
frozenSemenBatch
=
frozenSemenBatch
;
breedingRecordDetailEntity
.
frozenSemenBatch
=
frozenSemenBatch
;
}
}
final
String
?
other
=
jsonConvert
.
convert
<
String
>(
json
[
'other'
]);
if
(
other
!=
null
)
{
breedingRecordDetailEntity
.
other
=
other
;
}
final
String
?
matingDate
=
jsonConvert
.
convert
<
String
>(
json
[
'matingDate'
]);
final
String
?
matingDate
=
jsonConvert
.
convert
<
String
>(
json
[
'matingDate'
]);
if
(
matingDate
!=
null
)
{
if
(
matingDate
!=
null
)
{
breedingRecordDetailEntity
.
matingDate
=
matingDate
;
breedingRecordDetailEntity
.
matingDate
=
matingDate
;
...
@@ -106,6 +110,7 @@ Map<String, dynamic> $BreedingRecordDetailEntityToJson(BreedingRecordDetailEntit
...
@@ -106,6 +110,7 @@ Map<String, dynamic> $BreedingRecordDetailEntityToJson(BreedingRecordDetailEntit
data
[
'registrationNo'
]
=
entity
.
registrationNo
;
data
[
'registrationNo'
]
=
entity
.
registrationNo
;
data
[
'individualNo'
]
=
entity
.
individualNo
;
data
[
'individualNo'
]
=
entity
.
individualNo
;
data
[
'frozenSemenBatch'
]
=
entity
.
frozenSemenBatch
;
data
[
'frozenSemenBatch'
]
=
entity
.
frozenSemenBatch
;
data
[
'other'
]
=
entity
.
other
;
data
[
'matingDate'
]
=
entity
.
matingDate
;
data
[
'matingDate'
]
=
entity
.
matingDate
;
data
[
'isReturn'
]
=
entity
.
isReturn
;
data
[
'isReturn'
]
=
entity
.
isReturn
;
data
[
'backLoveDate'
]
=
entity
.
backLoveDate
;
data
[
'backLoveDate'
]
=
entity
.
backLoveDate
;
...
@@ -133,6 +138,7 @@ extension BreedingRecordDetailEntityExtension on BreedingRecordDetailEntity {
...
@@ -133,6 +138,7 @@ extension BreedingRecordDetailEntityExtension on BreedingRecordDetailEntity {
String
?
registrationNo
,
String
?
registrationNo
,
String
?
individualNo
,
String
?
individualNo
,
String
?
frozenSemenBatch
,
String
?
frozenSemenBatch
,
String
?
other
,
String
?
matingDate
,
String
?
matingDate
,
String
?
isReturn
,
String
?
isReturn
,
String
?
backLoveDate
,
String
?
backLoveDate
,
...
@@ -157,6 +163,7 @@ extension BreedingRecordDetailEntityExtension on BreedingRecordDetailEntity {
...
@@ -157,6 +163,7 @@ extension BreedingRecordDetailEntityExtension on BreedingRecordDetailEntity {
..
registrationNo
=
registrationNo
??
this
.
registrationNo
..
registrationNo
=
registrationNo
??
this
.
registrationNo
..
individualNo
=
individualNo
??
this
.
individualNo
..
individualNo
=
individualNo
??
this
.
individualNo
..
frozenSemenBatch
=
frozenSemenBatch
??
this
.
frozenSemenBatch
..
frozenSemenBatch
=
frozenSemenBatch
??
this
.
frozenSemenBatch
..
other
=
other
??
this
.
other
..
matingDate
=
matingDate
??
this
.
matingDate
..
matingDate
=
matingDate
??
this
.
matingDate
..
isReturn
=
isReturn
??
this
.
isReturn
..
isReturn
=
isReturn
??
this
.
isReturn
..
backLoveDate
=
backLoveDate
??
this
.
backLoveDate
..
backLoveDate
=
backLoveDate
??
this
.
backLoveDate
...
...
lib/generated/json/cattle_resume_entity.g.dart
View file @
733d7006
...
@@ -69,6 +69,54 @@ CattleResumeEntity $CattleResumeEntityFromJson(Map<String, dynamic> json) {
...
@@ -69,6 +69,54 @@ CattleResumeEntity $CattleResumeEntityFromJson(Map<String, dynamic> json) {
if
(
motherReg
!=
null
)
{
if
(
motherReg
!=
null
)
{
cattleResumeEntity
.
motherReg
=
motherReg
;
cattleResumeEntity
.
motherReg
=
motherReg
;
}
}
final
String
?
ffNum
=
jsonConvert
.
convert
<
String
>(
json
[
'ffNum'
]);
if
(
ffNum
!=
null
)
{
cattleResumeEntity
.
ffNum
=
ffNum
;
}
final
String
?
fmNum
=
jsonConvert
.
convert
<
String
>(
json
[
'fmNum'
]);
if
(
fmNum
!=
null
)
{
cattleResumeEntity
.
fmNum
=
fmNum
;
}
final
String
?
mfNum
=
jsonConvert
.
convert
<
String
>(
json
[
'mfNum'
]);
if
(
mfNum
!=
null
)
{
cattleResumeEntity
.
mfNum
=
mfNum
;
}
final
String
?
mmNum
=
jsonConvert
.
convert
<
String
>(
json
[
'mmNum'
]);
if
(
mmNum
!=
null
)
{
cattleResumeEntity
.
mmNum
=
mmNum
;
}
final
String
?
fffNum
=
jsonConvert
.
convert
<
String
>(
json
[
'fffNum'
]);
if
(
fffNum
!=
null
)
{
cattleResumeEntity
.
fffNum
=
fffNum
;
}
final
String
?
ffmNum
=
jsonConvert
.
convert
<
String
>(
json
[
'ffmNum'
]);
if
(
ffmNum
!=
null
)
{
cattleResumeEntity
.
ffmNum
=
ffmNum
;
}
final
String
?
fmfNum
=
jsonConvert
.
convert
<
String
>(
json
[
'fmfNum'
]);
if
(
fmfNum
!=
null
)
{
cattleResumeEntity
.
fmfNum
=
fmfNum
;
}
final
String
?
fmmNum
=
jsonConvert
.
convert
<
String
>(
json
[
'fmmNum'
]);
if
(
fmmNum
!=
null
)
{
cattleResumeEntity
.
fmmNum
=
fmmNum
;
}
final
String
?
mffNum
=
jsonConvert
.
convert
<
String
>(
json
[
'mffNum'
]);
if
(
mffNum
!=
null
)
{
cattleResumeEntity
.
mffNum
=
mffNum
;
}
final
String
?
mfmNum
=
jsonConvert
.
convert
<
String
>(
json
[
'mfmNum'
]);
if
(
mfmNum
!=
null
)
{
cattleResumeEntity
.
mfmNum
=
mfmNum
;
}
final
String
?
mmfNum
=
jsonConvert
.
convert
<
String
>(
json
[
'mmfNum'
]);
if
(
mmfNum
!=
null
)
{
cattleResumeEntity
.
mmfNum
=
mmfNum
;
}
final
String
?
mmmNum
=
jsonConvert
.
convert
<
String
>(
json
[
'mmmNum'
]);
if
(
mmmNum
!=
null
)
{
cattleResumeEntity
.
mmmNum
=
mmmNum
;
}
final
double
?
fromMilkHeavy
=
jsonConvert
.
convert
<
double
>(
json
[
'fromMilkHeavy'
]);
final
double
?
fromMilkHeavy
=
jsonConvert
.
convert
<
double
>(
json
[
'fromMilkHeavy'
]);
if
(
fromMilkHeavy
!=
null
)
{
if
(
fromMilkHeavy
!=
null
)
{
cattleResumeEntity
.
fromMilkHeavy
=
fromMilkHeavy
;
cattleResumeEntity
.
fromMilkHeavy
=
fromMilkHeavy
;
...
@@ -166,6 +214,18 @@ Map<String, dynamic> $CattleResumeEntityToJson(CattleResumeEntity entity) {
...
@@ -166,6 +214,18 @@ Map<String, dynamic> $CattleResumeEntityToJson(CattleResumeEntity entity) {
data
[
'grade'
]
=
entity
.
grade
;
data
[
'grade'
]
=
entity
.
grade
;
data
[
'fatherReg'
]
=
entity
.
fatherReg
;
data
[
'fatherReg'
]
=
entity
.
fatherReg
;
data
[
'motherReg'
]
=
entity
.
motherReg
;
data
[
'motherReg'
]
=
entity
.
motherReg
;
data
[
'ffNum'
]
=
entity
.
ffNum
;
data
[
'fmNum'
]
=
entity
.
fmNum
;
data
[
'mfNum'
]
=
entity
.
mfNum
;
data
[
'mmNum'
]
=
entity
.
mmNum
;
data
[
'fffNum'
]
=
entity
.
fffNum
;
data
[
'ffmNum'
]
=
entity
.
ffmNum
;
data
[
'fmfNum'
]
=
entity
.
fmfNum
;
data
[
'fmmNum'
]
=
entity
.
fmmNum
;
data
[
'mffNum'
]
=
entity
.
mffNum
;
data
[
'mfmNum'
]
=
entity
.
mfmNum
;
data
[
'mmfNum'
]
=
entity
.
mmfNum
;
data
[
'mmmNum'
]
=
entity
.
mmmNum
;
data
[
'fromMilkHeavy'
]
=
entity
.
fromMilkHeavy
;
data
[
'fromMilkHeavy'
]
=
entity
.
fromMilkHeavy
;
data
[
'health'
]
=
entity
.
health
;
data
[
'health'
]
=
entity
.
health
;
data
[
'junHeavy'
]
=
entity
.
junHeavy
;
data
[
'junHeavy'
]
=
entity
.
junHeavy
;
...
@@ -206,6 +266,18 @@ extension CattleResumeEntityExtension on CattleResumeEntity {
...
@@ -206,6 +266,18 @@ extension CattleResumeEntityExtension on CattleResumeEntity {
String
?
grade
,
String
?
grade
,
String
?
fatherReg
,
String
?
fatherReg
,
String
?
motherReg
,
String
?
motherReg
,
String
?
ffNum
,
String
?
fmNum
,
String
?
mfNum
,
String
?
mmNum
,
String
?
fffNum
,
String
?
ffmNum
,
String
?
fmfNum
,
String
?
fmmNum
,
String
?
mffNum
,
String
?
mfmNum
,
String
?
mmfNum
,
String
?
mmmNum
,
double
?
fromMilkHeavy
,
double
?
fromMilkHeavy
,
String
?
health
,
String
?
health
,
String
?
junHeavy
,
String
?
junHeavy
,
...
@@ -243,6 +315,18 @@ extension CattleResumeEntityExtension on CattleResumeEntity {
...
@@ -243,6 +315,18 @@ extension CattleResumeEntityExtension on CattleResumeEntity {
..
grade
=
grade
??
this
.
grade
..
grade
=
grade
??
this
.
grade
..
fatherReg
=
fatherReg
??
this
.
fatherReg
..
fatherReg
=
fatherReg
??
this
.
fatherReg
..
motherReg
=
motherReg
??
this
.
motherReg
..
motherReg
=
motherReg
??
this
.
motherReg
..
ffNum
=
ffNum
??
this
.
ffNum
..
fmNum
=
fmNum
??
this
.
fmNum
..
mfNum
=
mfNum
??
this
.
mfNum
..
mmNum
=
mmNum
??
this
.
mmNum
..
fffNum
=
fffNum
??
this
.
fffNum
..
ffmNum
=
ffmNum
??
this
.
ffmNum
..
fmfNum
=
fmfNum
??
this
.
fmfNum
..
fmmNum
=
fmmNum
??
this
.
fmmNum
..
mffNum
=
mffNum
??
this
.
mffNum
..
mfmNum
=
mfmNum
??
this
.
mfmNum
..
mmfNum
=
mmfNum
??
this
.
mmfNum
..
mmmNum
=
mmmNum
??
this
.
mmmNum
..
fromMilkHeavy
=
fromMilkHeavy
??
this
.
fromMilkHeavy
..
fromMilkHeavy
=
fromMilkHeavy
??
this
.
fromMilkHeavy
..
health
=
health
??
this
.
health
..
health
=
health
??
this
.
health
..
junHeavy
=
junHeavy
??
this
.
junHeavy
..
junHeavy
=
junHeavy
??
this
.
junHeavy
...
...
lib/generated/json/performance.g.dart
View file @
733d7006
...
@@ -73,6 +73,10 @@ PerformanceEntity $PerformanceEntityFromJson(Map<String, dynamic> json) {
...
@@ -73,6 +73,10 @@ PerformanceEntity $PerformanceEntityFromJson(Map<String, dynamic> json) {
if
(
crossWidth
!=
null
)
{
if
(
crossWidth
!=
null
)
{
performanceEntity
.
crossWidth
=
crossWidth
;
performanceEntity
.
crossWidth
=
crossWidth
;
}
}
final
double
?
crossHeight
=
jsonConvert
.
convert
<
double
>(
json
[
'crossHeight'
]);
if
(
crossHeight
!=
null
)
{
performanceEntity
.
crossHeight
=
crossHeight
;
}
final
double
?
guanWei
=
jsonConvert
.
convert
<
double
>(
json
[
'guanWei'
]);
final
double
?
guanWei
=
jsonConvert
.
convert
<
double
>(
json
[
'guanWei'
]);
if
(
guanWei
!=
null
)
{
if
(
guanWei
!=
null
)
{
performanceEntity
.
guanWei
=
guanWei
;
performanceEntity
.
guanWei
=
guanWei
;
...
@@ -167,6 +171,7 @@ Map<String, dynamic> $PerformanceEntityToJson(PerformanceEntity entity) {
...
@@ -167,6 +171,7 @@ Map<String, dynamic> $PerformanceEntityToJson(PerformanceEntity entity) {
data
[
'chestDeep'
]
=
entity
.
chestDeep
;
data
[
'chestDeep'
]
=
entity
.
chestDeep
;
data
[
'waistWidth'
]
=
entity
.
waistWidth
;
data
[
'waistWidth'
]
=
entity
.
waistWidth
;
data
[
'crossWidth'
]
=
entity
.
crossWidth
;
data
[
'crossWidth'
]
=
entity
.
crossWidth
;
data
[
'crossHeight'
]
=
entity
.
crossHeight
;
data
[
'guanWei'
]
=
entity
.
guanWei
;
data
[
'guanWei'
]
=
entity
.
guanWei
;
data
[
'eyeMuscleArea'
]
=
entity
.
eyeMuscleArea
;
data
[
'eyeMuscleArea'
]
=
entity
.
eyeMuscleArea
;
data
[
'grade'
]
=
entity
.
grade
;
data
[
'grade'
]
=
entity
.
grade
;
...
@@ -207,6 +212,7 @@ extension PerformanceEntityExtension on PerformanceEntity {
...
@@ -207,6 +212,7 @@ extension PerformanceEntityExtension on PerformanceEntity {
double
?
chestDeep
,
double
?
chestDeep
,
double
?
waistWidth
,
double
?
waistWidth
,
double
?
crossWidth
,
double
?
crossWidth
,
double
?
crossHeight
,
double
?
guanWei
,
double
?
guanWei
,
double
?
eyeMuscleArea
,
double
?
eyeMuscleArea
,
String
?
grade
,
String
?
grade
,
...
@@ -244,6 +250,7 @@ extension PerformanceEntityExtension on PerformanceEntity {
...
@@ -244,6 +250,7 @@ extension PerformanceEntityExtension on PerformanceEntity {
..
chestDeep
=
chestDeep
??
this
.
chestDeep
..
chestDeep
=
chestDeep
??
this
.
chestDeep
..
waistWidth
=
waistWidth
??
this
.
waistWidth
..
waistWidth
=
waistWidth
??
this
.
waistWidth
..
crossWidth
=
crossWidth
??
this
.
crossWidth
..
crossWidth
=
crossWidth
??
this
.
crossWidth
..
crossHeight
=
crossHeight
??
this
.
crossHeight
..
guanWei
=
guanWei
??
this
.
guanWei
..
guanWei
=
guanWei
??
this
.
guanWei
..
eyeMuscleArea
=
eyeMuscleArea
??
this
.
eyeMuscleArea
..
eyeMuscleArea
=
eyeMuscleArea
??
this
.
eyeMuscleArea
..
grade
=
grade
??
this
.
grade
..
grade
=
grade
??
this
.
grade
...
...
lib/models/breeding_record_detail_entity.dart
View file @
733d7006
...
@@ -28,7 +28,7 @@ class BreedingRecordDetailEntity{
...
@@ -28,7 +28,7 @@ class BreedingRecordDetailEntity{
String
?
matingStyle
;
String
?
matingStyle
;
/**
/**
*
种
畜耳标号
*
公
畜耳标号
*/
*/
String
?
cattleresumeId
;
String
?
cattleresumeId
;
...
@@ -39,10 +39,15 @@ class BreedingRecordDetailEntity{
...
@@ -39,10 +39,15 @@ class BreedingRecordDetailEntity{
String
?
individualNo
;
String
?
individualNo
;
/**
/**
* 冻精批
次号
* 冻精批
id
*/
*/
String
?
frozenSemenBatch
;
String
?
frozenSemenBatch
;
/**
* 冻精批次号
*/
String
?
other
;
/**
/**
* 配种日期
* 配种日期
*/
*/
...
...
lib/models/breeding_record_detail_entity.g.dart
View file @
733d7006
...
@@ -83,43 +83,48 @@ const BreedingRecordDetailEntitySchema = CollectionSchema(
...
@@ -83,43 +83,48 @@ const BreedingRecordDetailEntitySchema = CollectionSchema(
name:
r'matingStyle'
,
name:
r'matingStyle'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'
pregnancy
'
:
PropertySchema
(
r'
other
'
:
PropertySchema
(
id:
13
,
id:
13
,
name:
r'other'
,
type:
IsarType
.
string
,
),
r'pregnancy'
:
PropertySchema
(
id:
14
,
name:
r'pregnancy'
,
name:
r'pregnancy'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'registrationNo'
:
PropertySchema
(
r'registrationNo'
:
PropertySchema
(
id:
1
4
,
id:
1
5
,
name:
r'registrationNo'
,
name:
r'registrationNo'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'remark'
:
PropertySchema
(
r'remark'
:
PropertySchema
(
id:
1
5
,
id:
1
6
,
name:
r'remark'
,
name:
r'remark'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'searchValue'
:
PropertySchema
(
r'searchValue'
:
PropertySchema
(
id:
1
6
,
id:
1
7
,
name:
r'searchValue'
,
name:
r'searchValue'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'unid'
:
PropertySchema
(
r'unid'
:
PropertySchema
(
id:
1
7
,
id:
1
8
,
name:
r'unid'
,
name:
r'unid'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'updateBy'
:
PropertySchema
(
r'updateBy'
:
PropertySchema
(
id:
1
8
,
id:
1
9
,
name:
r'updateBy'
,
name:
r'updateBy'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'updateTime'
:
PropertySchema
(
r'updateTime'
:
PropertySchema
(
id:
19
,
id:
20
,
name:
r'updateTime'
,
name:
r'updateTime'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'uploadStatus'
:
PropertySchema
(
r'uploadStatus'
:
PropertySchema
(
id:
2
0
,
id:
2
1
,
name:
r'uploadStatus'
,
name:
r'uploadStatus'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
)
)
...
@@ -236,6 +241,12 @@ int _breedingRecordDetailEntityEstimateSize(
...
@@ -236,6 +241,12 @@ int _breedingRecordDetailEntityEstimateSize(
bytesCount
+=
3
+
value
.
length
*
3
;
bytesCount
+=
3
+
value
.
length
*
3
;
}
}
}
}
{
final
value
=
object
.
other
;
if
(
value
!=
null
)
{
bytesCount
+=
3
+
value
.
length
*
3
;
}
}
{
{
final
value
=
object
.
pregnancy
;
final
value
=
object
.
pregnancy
;
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
...
@@ -306,14 +317,15 @@ void _breedingRecordDetailEntitySerialize(
...
@@ -306,14 +317,15 @@ void _breedingRecordDetailEntitySerialize(
writer
.
writeString
(
offsets
[
10
],
object
.
isReturn
);
writer
.
writeString
(
offsets
[
10
],
object
.
isReturn
);
writer
.
writeString
(
offsets
[
11
],
object
.
matingDate
);
writer
.
writeString
(
offsets
[
11
],
object
.
matingDate
);
writer
.
writeString
(
offsets
[
12
],
object
.
matingStyle
);
writer
.
writeString
(
offsets
[
12
],
object
.
matingStyle
);
writer
.
writeString
(
offsets
[
13
],
object
.
pregnancy
);
writer
.
writeString
(
offsets
[
13
],
object
.
other
);
writer
.
writeString
(
offsets
[
14
],
object
.
registrationNo
);
writer
.
writeString
(
offsets
[
14
],
object
.
pregnancy
);
writer
.
writeString
(
offsets
[
15
],
object
.
remark
);
writer
.
writeString
(
offsets
[
15
],
object
.
registrationNo
);
writer
.
writeString
(
offsets
[
16
],
object
.
searchValue
);
writer
.
writeString
(
offsets
[
16
],
object
.
remark
);
writer
.
writeString
(
offsets
[
17
],
object
.
unid
);
writer
.
writeString
(
offsets
[
17
],
object
.
searchValue
);
writer
.
writeString
(
offsets
[
18
],
object
.
updateBy
);
writer
.
writeString
(
offsets
[
18
],
object
.
unid
);
writer
.
writeString
(
offsets
[
19
],
object
.
updateTime
);
writer
.
writeString
(
offsets
[
19
],
object
.
updateBy
);
writer
.
writeString
(
offsets
[
20
],
object
.
uploadStatus
);
writer
.
writeString
(
offsets
[
20
],
object
.
updateTime
);
writer
.
writeString
(
offsets
[
21
],
object
.
uploadStatus
);
}
}
BreedingRecordDetailEntity
_breedingRecordDetailEntityDeserialize
(
BreedingRecordDetailEntity
_breedingRecordDetailEntityDeserialize
(
...
@@ -337,14 +349,15 @@ BreedingRecordDetailEntity _breedingRecordDetailEntityDeserialize(
...
@@ -337,14 +349,15 @@ BreedingRecordDetailEntity _breedingRecordDetailEntityDeserialize(
object
.
isReturn
=
reader
.
readStringOrNull
(
offsets
[
10
]);
object
.
isReturn
=
reader
.
readStringOrNull
(
offsets
[
10
]);
object
.
matingDate
=
reader
.
readStringOrNull
(
offsets
[
11
]);
object
.
matingDate
=
reader
.
readStringOrNull
(
offsets
[
11
]);
object
.
matingStyle
=
reader
.
readStringOrNull
(
offsets
[
12
]);
object
.
matingStyle
=
reader
.
readStringOrNull
(
offsets
[
12
]);
object
.
pregnancy
=
reader
.
readStringOrNull
(
offsets
[
13
]);
object
.
other
=
reader
.
readStringOrNull
(
offsets
[
13
]);
object
.
registrationNo
=
reader
.
readStringOrNull
(
offsets
[
14
]);
object
.
pregnancy
=
reader
.
readStringOrNull
(
offsets
[
14
]);
object
.
remark
=
reader
.
readStringOrNull
(
offsets
[
15
]);
object
.
registrationNo
=
reader
.
readStringOrNull
(
offsets
[
15
]);
object
.
searchValue
=
reader
.
readStringOrNull
(
offsets
[
16
]);
object
.
remark
=
reader
.
readStringOrNull
(
offsets
[
16
]);
object
.
unid
=
reader
.
readStringOrNull
(
offsets
[
17
]);
object
.
searchValue
=
reader
.
readStringOrNull
(
offsets
[
17
]);
object
.
updateBy
=
reader
.
readStringOrNull
(
offsets
[
18
]);
object
.
unid
=
reader
.
readStringOrNull
(
offsets
[
18
]);
object
.
updateTime
=
reader
.
readStringOrNull
(
offsets
[
19
]);
object
.
updateBy
=
reader
.
readStringOrNull
(
offsets
[
19
]);
object
.
uploadStatus
=
reader
.
readStringOrNull
(
offsets
[
20
]);
object
.
updateTime
=
reader
.
readStringOrNull
(
offsets
[
20
]);
object
.
uploadStatus
=
reader
.
readStringOrNull
(
offsets
[
21
]);
return
object
;
return
object
;
}
}
...
@@ -397,6 +410,8 @@ P _breedingRecordDetailEntityDeserializeProp<P>(
...
@@ -397,6 +410,8 @@ P _breedingRecordDetailEntityDeserializeProp<P>(
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
20
:
case
20
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
21
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
default
:
default
:
throw
IsarError
(
'Unknown property with id
$propertyId
'
);
throw
IsarError
(
'Unknown property with id
$propertyId
'
);
}
}
...
@@ -2707,6 +2722,162 @@ extension BreedingRecordDetailEntityQueryFilter on QueryBuilder<
...
@@ -2707,6 +2722,162 @@ extension BreedingRecordDetailEntityQueryFilter on QueryBuilder<
});
});
}
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
otherIsNull
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
const
FilterCondition
.
isNull
(
property:
r'other'
,
));
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
otherIsNotNull
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
const
FilterCondition
.
isNotNull
(
property:
r'other'
,
));
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
otherEqualTo
(
String
?
value
,
{
bool
caseSensitive
=
true
,
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
equalTo
(
property:
r'other'
,
value:
value
,
caseSensitive:
caseSensitive
,
));
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
otherGreaterThan
(
String
?
value
,
{
bool
include
=
false
,
bool
caseSensitive
=
true
,
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
greaterThan
(
include:
include
,
property:
r'other'
,
value:
value
,
caseSensitive:
caseSensitive
,
));
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
otherLessThan
(
String
?
value
,
{
bool
include
=
false
,
bool
caseSensitive
=
true
,
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
lessThan
(
include:
include
,
property:
r'other'
,
value:
value
,
caseSensitive:
caseSensitive
,
));
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
otherBetween
(
String
?
lower
,
String
?
upper
,
{
bool
includeLower
=
true
,
bool
includeUpper
=
true
,
bool
caseSensitive
=
true
,
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
between
(
property:
r'other'
,
lower:
lower
,
includeLower:
includeLower
,
upper:
upper
,
includeUpper:
includeUpper
,
caseSensitive:
caseSensitive
,
));
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
otherStartsWith
(
String
value
,
{
bool
caseSensitive
=
true
,
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
startsWith
(
property:
r'other'
,
value:
value
,
caseSensitive:
caseSensitive
,
));
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
otherEndsWith
(
String
value
,
{
bool
caseSensitive
=
true
,
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
endsWith
(
property:
r'other'
,
value:
value
,
caseSensitive:
caseSensitive
,
));
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
otherContains
(
String
value
,
{
bool
caseSensitive
=
true
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
contains
(
property:
r'other'
,
value:
value
,
caseSensitive:
caseSensitive
,
));
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
otherMatches
(
String
pattern
,
{
bool
caseSensitive
=
true
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
matches
(
property:
r'other'
,
wildcard:
pattern
,
caseSensitive:
caseSensitive
,
));
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
otherIsEmpty
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
equalTo
(
property:
r'other'
,
value:
''
,
));
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
otherIsNotEmpty
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
greaterThan
(
property:
r'other'
,
value:
''
,
));
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterFilterCondition
>
pregnancyIsNull
()
{
QAfterFilterCondition
>
pregnancyIsNull
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
...
@@ -4146,6 +4317,20 @@ extension BreedingRecordDetailEntityQuerySortBy on QueryBuilder<
...
@@ -4146,6 +4317,20 @@ extension BreedingRecordDetailEntityQuerySortBy on QueryBuilder<
});
});
}
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterSortBy
>
sortByOther
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addSortBy
(
r'other'
,
Sort
.
asc
);
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterSortBy
>
sortByOtherDesc
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addSortBy
(
r'other'
,
Sort
.
desc
);
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterSortBy
>
sortByPregnancy
()
{
QAfterSortBy
>
sortByPregnancy
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
...
@@ -4457,6 +4642,20 @@ extension BreedingRecordDetailEntityQuerySortThenBy on QueryBuilder<
...
@@ -4457,6 +4642,20 @@ extension BreedingRecordDetailEntityQuerySortThenBy on QueryBuilder<
});
});
}
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterSortBy
>
thenByOther
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addSortBy
(
r'other'
,
Sort
.
asc
);
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterSortBy
>
thenByOtherDesc
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addSortBy
(
r'other'
,
Sort
.
desc
);
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QAfterSortBy
>
thenByPregnancy
()
{
QAfterSortBy
>
thenByPregnancy
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
...
@@ -4665,6 +4864,13 @@ extension BreedingRecordDetailEntityQueryWhereDistinct on QueryBuilder<
...
@@ -4665,6 +4864,13 @@ extension BreedingRecordDetailEntityQueryWhereDistinct on QueryBuilder<
});
});
}
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QDistinct
>
distinctByOther
({
bool
caseSensitive
=
true
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addDistinctBy
(
r'other'
,
caseSensitive:
caseSensitive
);
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QueryBuilder
<
BreedingRecordDetailEntity
,
BreedingRecordDetailEntity
,
QDistinct
>
distinctByPregnancy
({
bool
caseSensitive
=
true
})
{
QDistinct
>
distinctByPregnancy
({
bool
caseSensitive
=
true
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
...
@@ -4822,6 +5028,13 @@ extension BreedingRecordDetailEntityQueryProperty on QueryBuilder<
...
@@ -4822,6 +5028,13 @@ extension BreedingRecordDetailEntityQueryProperty on QueryBuilder<
});
});
}
}
QueryBuilder
<
BreedingRecordDetailEntity
,
String
?,
QQueryOperations
>
otherProperty
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addPropertyName
(
r'other'
);
});
}
QueryBuilder
<
BreedingRecordDetailEntity
,
String
?,
QQueryOperations
>
QueryBuilder
<
BreedingRecordDetailEntity
,
String
?,
QQueryOperations
>
pregnancyProperty
()
{
pregnancyProperty
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
...
...
lib/models/cattle_resume_entity.dart
View file @
733d7006
...
@@ -52,12 +52,51 @@ class CattleResumeEntity {
...
@@ -52,12 +52,51 @@ class CattleResumeEntity {
/** 等级 */
/** 等级 */
String
?
grade
;
String
?
grade
;
/** 父登记号 */
/**
* 父登记号
*/
String
?
fatherReg
;
String
?
fatherReg
;
/** 母登记号 */
/** 母登记号 */
String
?
motherReg
;
String
?
motherReg
;
/** 祖父号 */
String
?
ffNum
;
/** 祖母号 */
String
?
fmNum
;
/** 外祖父号 */
String
?
mfNum
;
/** 外祖母号 */
String
?
mmNum
;
/** 曾祖父 */
String
?
fffNum
;
/** 曾祖母 */
String
?
ffmNum
;
/** 曾外祖父 */
String
?
fmfNum
;
/** 曾外祖母 */
String
?
fmmNum
;
/** 外曾祖父 */
String
?
mffNum
;
/** 外曾祖母 */
String
?
mfmNum
;
/** 外曾外祖父 */
String
?
mmfNum
;
/** 外曾外祖母 */
String
?
mmmNum
;
/** 离乳重 */
/** 离乳重 */
double
?
fromMilkHeavy
;
double
?
fromMilkHeavy
;
...
...
lib/models/cattle_resume_entity.g.dart
View file @
733d7006
This source diff could not be displayed because it is too large. You can
view the blob
instead.
lib/models/dict_entity.dart
View file @
733d7006
...
@@ -22,7 +22,7 @@ class DictEntity {
...
@@ -22,7 +22,7 @@ class DictEntity {
String
?
dictLabel
;
String
?
dictLabel
;
/** 字典键值 */
/** 字典键值 */
@Index
(
unique:
true
,
replace:
true
)
//
@Index(unique: true, replace: true)
String
?
dictValue
;
String
?
dictValue
;
/** 字典类型 */
/** 字典类型 */
...
...
lib/models/dict_entity.g.dart
View file @
733d7006
...
@@ -98,21 +98,7 @@ const DictEntitySchema = CollectionSchema(
...
@@ -98,21 +98,7 @@ const DictEntitySchema = CollectionSchema(
deserialize:
_dictEntityDeserialize
,
deserialize:
_dictEntityDeserialize
,
deserializeProp:
_dictEntityDeserializeProp
,
deserializeProp:
_dictEntityDeserializeProp
,
idName:
r'id'
,
idName:
r'id'
,
indexes:
{
indexes:
{},
r'dictCode'
:
IndexSchema
(
id:
7118880238269416410
,
name:
r'dictCode'
,
unique:
true
,
replace:
true
,
properties:
[
IndexPropertySchema
(
name:
r'dictCode'
,
type:
IndexType
.
hash
,
caseSensitive:
true
,
)
],
)
},
links:
{},
links:
{},
embeddedSchemas:
{},
embeddedSchemas:
{},
getId:
_dictEntityGetId
,
getId:
_dictEntityGetId
,
...
@@ -323,61 +309,6 @@ void _dictEntityAttach(IsarCollection<dynamic> col, Id id, DictEntity object) {
...
@@ -323,61 +309,6 @@ void _dictEntityAttach(IsarCollection<dynamic> col, Id id, DictEntity object) {
object
.
id
=
id
;
object
.
id
=
id
;
}
}
extension
DictEntityByIndex
on
IsarCollection
<
DictEntity
>
{
Future
<
DictEntity
?>
getByDictCode
(
String
?
dictCode
)
{
return
getByIndex
(
r'dictCode'
,
[
dictCode
]);
}
DictEntity
?
getByDictCodeSync
(
String
?
dictCode
)
{
return
getByIndexSync
(
r'dictCode'
,
[
dictCode
]);
}
Future
<
bool
>
deleteByDictCode
(
String
?
dictCode
)
{
return
deleteByIndex
(
r'dictCode'
,
[
dictCode
]);
}
bool
deleteByDictCodeSync
(
String
?
dictCode
)
{
return
deleteByIndexSync
(
r'dictCode'
,
[
dictCode
]);
}
Future
<
List
<
DictEntity
?>>
getAllByDictCode
(
List
<
String
?>
dictCodeValues
)
{
final
values
=
dictCodeValues
.
map
((
e
)
=>
[
e
]).
toList
();
return
getAllByIndex
(
r'dictCode'
,
values
);
}
List
<
DictEntity
?>
getAllByDictCodeSync
(
List
<
String
?>
dictCodeValues
)
{
final
values
=
dictCodeValues
.
map
((
e
)
=>
[
e
]).
toList
();
return
getAllByIndexSync
(
r'dictCode'
,
values
);
}
Future
<
int
>
deleteAllByDictCode
(
List
<
String
?>
dictCodeValues
)
{
final
values
=
dictCodeValues
.
map
((
e
)
=>
[
e
]).
toList
();
return
deleteAllByIndex
(
r'dictCode'
,
values
);
}
int
deleteAllByDictCodeSync
(
List
<
String
?>
dictCodeValues
)
{
final
values
=
dictCodeValues
.
map
((
e
)
=>
[
e
]).
toList
();
return
deleteAllByIndexSync
(
r'dictCode'
,
values
);
}
Future
<
Id
>
putByDictCode
(
DictEntity
object
)
{
return
putByIndex
(
r'dictCode'
,
object
);
}
Id
putByDictCodeSync
(
DictEntity
object
,
{
bool
saveLinks
=
true
})
{
return
putByIndexSync
(
r'dictCode'
,
object
,
saveLinks:
saveLinks
);
}
Future
<
List
<
Id
>>
putAllByDictCode
(
List
<
DictEntity
>
objects
)
{
return
putAllByIndex
(
r'dictCode'
,
objects
);
}
List
<
Id
>
putAllByDictCodeSync
(
List
<
DictEntity
>
objects
,
{
bool
saveLinks
=
true
})
{
return
putAllByIndexSync
(
r'dictCode'
,
objects
,
saveLinks:
saveLinks
);
}
}
extension
DictEntityQueryWhereSort
extension
DictEntityQueryWhereSort
on
QueryBuilder
<
DictEntity
,
DictEntity
,
QWhere
>
{
on
QueryBuilder
<
DictEntity
,
DictEntity
,
QWhere
>
{
QueryBuilder
<
DictEntity
,
DictEntity
,
QAfterWhere
>
anyId
()
{
QueryBuilder
<
DictEntity
,
DictEntity
,
QAfterWhere
>
anyId
()
{
...
@@ -453,71 +384,6 @@ extension DictEntityQueryWhere
...
@@ -453,71 +384,6 @@ extension DictEntityQueryWhere
));
));
});
});
}
}
QueryBuilder
<
DictEntity
,
DictEntity
,
QAfterWhereClause
>
dictCodeIsNull
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addWhereClause
(
IndexWhereClause
.
equalTo
(
indexName:
r'dictCode'
,
value:
[
null
],
));
});
}
QueryBuilder
<
DictEntity
,
DictEntity
,
QAfterWhereClause
>
dictCodeIsNotNull
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addWhereClause
(
IndexWhereClause
.
between
(
indexName:
r'dictCode'
,
lower:
[
null
],
includeLower:
false
,
upper:
[],
));
});
}
QueryBuilder
<
DictEntity
,
DictEntity
,
QAfterWhereClause
>
dictCodeEqualTo
(
String
?
dictCode
)
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addWhereClause
(
IndexWhereClause
.
equalTo
(
indexName:
r'dictCode'
,
value:
[
dictCode
],
));
});
}
QueryBuilder
<
DictEntity
,
DictEntity
,
QAfterWhereClause
>
dictCodeNotEqualTo
(
String
?
dictCode
)
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
if
(
query
.
whereSort
==
Sort
.
asc
)
{
return
query
.
addWhereClause
(
IndexWhereClause
.
between
(
indexName:
r'dictCode'
,
lower:
[],
upper:
[
dictCode
],
includeUpper:
false
,
))
.
addWhereClause
(
IndexWhereClause
.
between
(
indexName:
r'dictCode'
,
lower:
[
dictCode
],
includeLower:
false
,
upper:
[],
));
}
else
{
return
query
.
addWhereClause
(
IndexWhereClause
.
between
(
indexName:
r'dictCode'
,
lower:
[
dictCode
],
includeLower:
false
,
upper:
[],
))
.
addWhereClause
(
IndexWhereClause
.
between
(
indexName:
r'dictCode'
,
lower:
[],
upper:
[
dictCode
],
includeUpper:
false
,
));
}
});
}
}
}
extension
DictEntityQueryFilter
extension
DictEntityQueryFilter
...
...
lib/models/performance.dart
View file @
733d7006
...
@@ -86,6 +86,11 @@ class PerformanceEntity{
...
@@ -86,6 +86,11 @@ class PerformanceEntity{
*/
*/
double
?
crossWidth
;
double
?
crossWidth
;
/**
* 十字部高(cm)
*/
double
?
crossHeight
;
/**
/**
* 管维(cm)
* 管维(cm)
*/
*/
...
...
lib/models/performance.g.dart
View file @
733d7006
...
@@ -62,128 +62,133 @@ const PerformanceEntitySchema = CollectionSchema(
...
@@ -62,128 +62,133 @@ const PerformanceEntitySchema = CollectionSchema(
name:
r'createTime'
,
name:
r'createTime'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'cross
Width
'
:
PropertySchema
(
r'cross
Height
'
:
PropertySchema
(
id:
9
,
id:
9
,
name:
r'crossHeight'
,
type:
IsarType
.
double
,
),
r'crossWidth'
:
PropertySchema
(
id:
10
,
name:
r'crossWidth'
,
name:
r'crossWidth'
,
type:
IsarType
.
double
,
type:
IsarType
.
double
,
),
),
r'deptId'
:
PropertySchema
(
r'deptId'
:
PropertySchema
(
id:
1
0
,
id:
1
1
,
name:
r'deptId'
,
name:
r'deptId'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'eyeMuscleArea'
:
PropertySchema
(
r'eyeMuscleArea'
:
PropertySchema
(
id:
1
1
,
id:
1
2
,
name:
r'eyeMuscleArea'
,
name:
r'eyeMuscleArea'
,
type:
IsarType
.
double
,
type:
IsarType
.
double
,
),
),
r'fatherReg'
:
PropertySchema
(
r'fatherReg'
:
PropertySchema
(
id:
1
2
,
id:
1
3
,
name:
r'fatherReg'
,
name:
r'fatherReg'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'grade'
:
PropertySchema
(
r'grade'
:
PropertySchema
(
id:
1
3
,
id:
1
4
,
name:
r'grade'
,
name:
r'grade'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'guanWei'
:
PropertySchema
(
r'guanWei'
:
PropertySchema
(
id:
1
4
,
id:
1
5
,
name:
r'guanWei'
,
name:
r'guanWei'
,
type:
IsarType
.
double
,
type:
IsarType
.
double
,
),
),
r'hairFineness'
:
PropertySchema
(
r'hairFineness'
:
PropertySchema
(
id:
1
5
,
id:
1
6
,
name:
r'hairFineness'
,
name:
r'hairFineness'
,
type:
IsarType
.
double
,
type:
IsarType
.
double
,
),
),
r'hairLength'
:
PropertySchema
(
r'hairLength'
:
PropertySchema
(
id:
1
6
,
id:
1
7
,
name:
r'hairLength'
,
name:
r'hairLength'
,
type:
IsarType
.
double
,
type:
IsarType
.
double
,
),
),
r'health'
:
PropertySchema
(
r'health'
:
PropertySchema
(
id:
1
7
,
id:
1
8
,
name:
r'health'
,
name:
r'health'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'height'
:
PropertySchema
(
r'height'
:
PropertySchema
(
id:
1
8
,
id:
1
9
,
name:
r'height'
,
name:
r'height'
,
type:
IsarType
.
double
,
type:
IsarType
.
double
,
),
),
r'immune'
:
PropertySchema
(
r'immune'
:
PropertySchema
(
id:
19
,
id:
20
,
name:
r'immune'
,
name:
r'immune'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'individualNo'
:
PropertySchema
(
r'individualNo'
:
PropertySchema
(
id:
2
0
,
id:
2
1
,
name:
r'individualNo'
,
name:
r'individualNo'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'length'
:
PropertySchema
(
r'length'
:
PropertySchema
(
id:
2
1
,
id:
2
2
,
name:
r'length'
,
name:
r'length'
,
type:
IsarType
.
double
,
type:
IsarType
.
double
,
),
),
r'measureDate'
:
PropertySchema
(
r'measureDate'
:
PropertySchema
(
id:
2
2
,
id:
2
3
,
name:
r'measureDate'
,
name:
r'measureDate'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'motherReg'
:
PropertySchema
(
r'motherReg'
:
PropertySchema
(
id:
2
3
,
id:
2
4
,
name:
r'motherReg'
,
name:
r'motherReg'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'registrationNo'
:
PropertySchema
(
r'registrationNo'
:
PropertySchema
(
id:
2
4
,
id:
2
5
,
name:
r'registrationNo'
,
name:
r'registrationNo'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'remark'
:
PropertySchema
(
r'remark'
:
PropertySchema
(
id:
2
5
,
id:
2
6
,
name:
r'remark'
,
name:
r'remark'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'searchValue'
:
PropertySchema
(
r'searchValue'
:
PropertySchema
(
id:
2
6
,
id:
2
7
,
name:
r'searchValue'
,
name:
r'searchValue'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'shearing'
:
PropertySchema
(
r'shearing'
:
PropertySchema
(
id:
2
7
,
id:
2
8
,
name:
r'shearing'
,
name:
r'shearing'
,
type:
IsarType
.
double
,
type:
IsarType
.
double
,
),
),
r'unid'
:
PropertySchema
(
r'unid'
:
PropertySchema
(
id:
2
8
,
id:
2
9
,
name:
r'unid'
,
name:
r'unid'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'updateBy'
:
PropertySchema
(
r'updateBy'
:
PropertySchema
(
id:
29
,
id:
30
,
name:
r'updateBy'
,
name:
r'updateBy'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'updateTime'
:
PropertySchema
(
r'updateTime'
:
PropertySchema
(
id:
3
0
,
id:
3
1
,
name:
r'updateTime'
,
name:
r'updateTime'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'uploadStatus'
:
PropertySchema
(
r'uploadStatus'
:
PropertySchema
(
id:
3
1
,
id:
3
2
,
name:
r'uploadStatus'
,
name:
r'uploadStatus'
,
type:
IsarType
.
string
,
type:
IsarType
.
string
,
),
),
r'waistWidth'
:
PropertySchema
(
r'waistWidth'
:
PropertySchema
(
id:
3
2
,
id:
3
3
,
name:
r'waistWidth'
,
name:
r'waistWidth'
,
type:
IsarType
.
double
,
type:
IsarType
.
double
,
),
),
r'weight'
:
PropertySchema
(
r'weight'
:
PropertySchema
(
id:
3
3
,
id:
3
4
,
name:
r'weight'
,
name:
r'weight'
,
type:
IsarType
.
double
,
type:
IsarType
.
double
,
)
)
...
@@ -360,31 +365,32 @@ void _performanceEntitySerialize(
...
@@ -360,31 +365,32 @@ void _performanceEntitySerialize(
writer
.
writeDouble
(
offsets
[
6
],
object
.
chestWidth
);
writer
.
writeDouble
(
offsets
[
6
],
object
.
chestWidth
);
writer
.
writeString
(
offsets
[
7
],
object
.
createBy
);
writer
.
writeString
(
offsets
[
7
],
object
.
createBy
);
writer
.
writeString
(
offsets
[
8
],
object
.
createTime
);
writer
.
writeString
(
offsets
[
8
],
object
.
createTime
);
writer
.
writeDouble
(
offsets
[
9
],
object
.
crossWidth
);
writer
.
writeDouble
(
offsets
[
9
],
object
.
crossHeight
);
writer
.
writeString
(
offsets
[
10
],
object
.
deptId
);
writer
.
writeDouble
(
offsets
[
10
],
object
.
crossWidth
);
writer
.
writeDouble
(
offsets
[
11
],
object
.
eyeMuscleArea
);
writer
.
writeString
(
offsets
[
11
],
object
.
deptId
);
writer
.
writeString
(
offsets
[
12
],
object
.
fatherReg
);
writer
.
writeDouble
(
offsets
[
12
],
object
.
eyeMuscleArea
);
writer
.
writeString
(
offsets
[
13
],
object
.
grade
);
writer
.
writeString
(
offsets
[
13
],
object
.
fatherReg
);
writer
.
writeDouble
(
offsets
[
14
],
object
.
guanWei
);
writer
.
writeString
(
offsets
[
14
],
object
.
grade
);
writer
.
writeDouble
(
offsets
[
15
],
object
.
hairFineness
);
writer
.
writeDouble
(
offsets
[
15
],
object
.
guanWei
);
writer
.
writeDouble
(
offsets
[
16
],
object
.
hairLength
);
writer
.
writeDouble
(
offsets
[
16
],
object
.
hairFineness
);
writer
.
writeString
(
offsets
[
17
],
object
.
health
);
writer
.
writeDouble
(
offsets
[
17
],
object
.
hairLength
);
writer
.
writeDouble
(
offsets
[
18
],
object
.
height
);
writer
.
writeString
(
offsets
[
18
],
object
.
health
);
writer
.
writeString
(
offsets
[
19
],
object
.
immune
);
writer
.
writeDouble
(
offsets
[
19
],
object
.
height
);
writer
.
writeString
(
offsets
[
20
],
object
.
individualNo
);
writer
.
writeString
(
offsets
[
20
],
object
.
immune
);
writer
.
writeDouble
(
offsets
[
21
],
object
.
length
);
writer
.
writeString
(
offsets
[
21
],
object
.
individualNo
);
writer
.
writeString
(
offsets
[
22
],
object
.
measureDate
);
writer
.
writeDouble
(
offsets
[
22
],
object
.
length
);
writer
.
writeString
(
offsets
[
23
],
object
.
motherReg
);
writer
.
writeString
(
offsets
[
23
],
object
.
measureDate
);
writer
.
writeString
(
offsets
[
24
],
object
.
registrationNo
);
writer
.
writeString
(
offsets
[
24
],
object
.
motherReg
);
writer
.
writeString
(
offsets
[
25
],
object
.
remark
);
writer
.
writeString
(
offsets
[
25
],
object
.
registrationNo
);
writer
.
writeString
(
offsets
[
26
],
object
.
searchValue
);
writer
.
writeString
(
offsets
[
26
],
object
.
remark
);
writer
.
writeDouble
(
offsets
[
27
],
object
.
shearing
);
writer
.
writeString
(
offsets
[
27
],
object
.
searchValue
);
writer
.
writeString
(
offsets
[
28
],
object
.
unid
);
writer
.
writeDouble
(
offsets
[
28
],
object
.
shearing
);
writer
.
writeString
(
offsets
[
29
],
object
.
updateBy
);
writer
.
writeString
(
offsets
[
29
],
object
.
unid
);
writer
.
writeString
(
offsets
[
30
],
object
.
updateTime
);
writer
.
writeString
(
offsets
[
30
],
object
.
updateBy
);
writer
.
writeString
(
offsets
[
31
],
object
.
uploadStatus
);
writer
.
writeString
(
offsets
[
31
],
object
.
updateTime
);
writer
.
writeDouble
(
offsets
[
32
],
object
.
waistWidth
);
writer
.
writeString
(
offsets
[
32
],
object
.
uploadStatus
);
writer
.
writeDouble
(
offsets
[
33
],
object
.
weight
);
writer
.
writeDouble
(
offsets
[
33
],
object
.
waistWidth
);
writer
.
writeDouble
(
offsets
[
34
],
object
.
weight
);
}
}
PerformanceEntity
_performanceEntityDeserialize
(
PerformanceEntity
_performanceEntityDeserialize
(
...
@@ -403,32 +409,33 @@ PerformanceEntity _performanceEntityDeserialize(
...
@@ -403,32 +409,33 @@ PerformanceEntity _performanceEntityDeserialize(
object
.
chestWidth
=
reader
.
readDoubleOrNull
(
offsets
[
6
]);
object
.
chestWidth
=
reader
.
readDoubleOrNull
(
offsets
[
6
]);
object
.
createBy
=
reader
.
readStringOrNull
(
offsets
[
7
]);
object
.
createBy
=
reader
.
readStringOrNull
(
offsets
[
7
]);
object
.
createTime
=
reader
.
readStringOrNull
(
offsets
[
8
]);
object
.
createTime
=
reader
.
readStringOrNull
(
offsets
[
8
]);
object
.
crossWidth
=
reader
.
readDoubleOrNull
(
offsets
[
9
]);
object
.
crossHeight
=
reader
.
readDoubleOrNull
(
offsets
[
9
]);
object
.
deptId
=
reader
.
readStringOrNull
(
offsets
[
10
]);
object
.
crossWidth
=
reader
.
readDoubleOrNull
(
offsets
[
10
]);
object
.
eyeMuscleArea
=
reader
.
readDoubleOrNull
(
offsets
[
11
]);
object
.
deptId
=
reader
.
readStringOrNull
(
offsets
[
11
]);
object
.
fatherReg
=
reader
.
readStringOrNull
(
offsets
[
12
]);
object
.
eyeMuscleArea
=
reader
.
readDoubleOrNull
(
offsets
[
12
]);
object
.
grade
=
reader
.
readStringOrNull
(
offsets
[
13
]);
object
.
fatherReg
=
reader
.
readStringOrNull
(
offsets
[
13
]);
object
.
guanWei
=
reader
.
readDoubleOrNull
(
offsets
[
14
]);
object
.
grade
=
reader
.
readStringOrNull
(
offsets
[
14
]);
object
.
hairFineness
=
reader
.
readDoubleOrNull
(
offsets
[
15
]);
object
.
guanWei
=
reader
.
readDoubleOrNull
(
offsets
[
15
]);
object
.
hairLength
=
reader
.
readDoubleOrNull
(
offsets
[
16
]);
object
.
hairFineness
=
reader
.
readDoubleOrNull
(
offsets
[
16
]);
object
.
health
=
reader
.
readStringOrNull
(
offsets
[
17
]);
object
.
hairLength
=
reader
.
readDoubleOrNull
(
offsets
[
17
]);
object
.
height
=
reader
.
readDoubleOrNull
(
offsets
[
18
]);
object
.
health
=
reader
.
readStringOrNull
(
offsets
[
18
]);
object
.
height
=
reader
.
readDoubleOrNull
(
offsets
[
19
]);
object
.
id
=
id
;
object
.
id
=
id
;
object
.
immune
=
reader
.
readStringOrNull
(
offsets
[
19
]);
object
.
immune
=
reader
.
readStringOrNull
(
offsets
[
20
]);
object
.
individualNo
=
reader
.
readStringOrNull
(
offsets
[
2
0
]);
object
.
individualNo
=
reader
.
readStringOrNull
(
offsets
[
2
1
]);
object
.
length
=
reader
.
readDoubleOrNull
(
offsets
[
2
1
]);
object
.
length
=
reader
.
readDoubleOrNull
(
offsets
[
2
2
]);
object
.
measureDate
=
reader
.
readStringOrNull
(
offsets
[
2
2
]);
object
.
measureDate
=
reader
.
readStringOrNull
(
offsets
[
2
3
]);
object
.
motherReg
=
reader
.
readStringOrNull
(
offsets
[
2
3
]);
object
.
motherReg
=
reader
.
readStringOrNull
(
offsets
[
2
4
]);
object
.
registrationNo
=
reader
.
readStringOrNull
(
offsets
[
2
4
]);
object
.
registrationNo
=
reader
.
readStringOrNull
(
offsets
[
2
5
]);
object
.
remark
=
reader
.
readStringOrNull
(
offsets
[
2
5
]);
object
.
remark
=
reader
.
readStringOrNull
(
offsets
[
2
6
]);
object
.
searchValue
=
reader
.
readStringOrNull
(
offsets
[
2
6
]);
object
.
searchValue
=
reader
.
readStringOrNull
(
offsets
[
2
7
]);
object
.
shearing
=
reader
.
readDoubleOrNull
(
offsets
[
2
7
]);
object
.
shearing
=
reader
.
readDoubleOrNull
(
offsets
[
2
8
]);
object
.
unid
=
reader
.
readStringOrNull
(
offsets
[
2
8
]);
object
.
unid
=
reader
.
readStringOrNull
(
offsets
[
2
9
]);
object
.
updateBy
=
reader
.
readStringOrNull
(
offsets
[
29
]);
object
.
updateBy
=
reader
.
readStringOrNull
(
offsets
[
30
]);
object
.
updateTime
=
reader
.
readStringOrNull
(
offsets
[
3
0
]);
object
.
updateTime
=
reader
.
readStringOrNull
(
offsets
[
3
1
]);
object
.
uploadStatus
=
reader
.
readStringOrNull
(
offsets
[
3
1
]);
object
.
uploadStatus
=
reader
.
readStringOrNull
(
offsets
[
3
2
]);
object
.
waistWidth
=
reader
.
readDoubleOrNull
(
offsets
[
3
2
]);
object
.
waistWidth
=
reader
.
readDoubleOrNull
(
offsets
[
3
3
]);
object
.
weight
=
reader
.
readDoubleOrNull
(
offsets
[
3
3
]);
object
.
weight
=
reader
.
readDoubleOrNull
(
offsets
[
3
4
]);
return
object
;
return
object
;
}
}
...
@@ -460,31 +467,31 @@ P _performanceEntityDeserializeProp<P>(
...
@@ -460,31 +467,31 @@ P _performanceEntityDeserializeProp<P>(
case
9
:
case
9
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
case
10
:
case
10
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
11
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
case
1
2
:
case
1
1
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
12
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
case
13
:
case
13
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
14
:
case
14
:
return
(
reader
.
read
Double
OrNull
(
offset
))
as
P
;
return
(
reader
.
read
String
OrNull
(
offset
))
as
P
;
case
15
:
case
15
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
case
16
:
case
16
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
case
17
:
case
17
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
18
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
case
1
9
:
case
1
8
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
19
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
case
20
:
case
20
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
21
:
case
21
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
case
22
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
22
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
case
23
:
case
23
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
24
:
case
24
:
...
@@ -494,9 +501,9 @@ P _performanceEntityDeserializeProp<P>(
...
@@ -494,9 +501,9 @@ P _performanceEntityDeserializeProp<P>(
case
26
:
case
26
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
27
:
case
27
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
case
28
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
28
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
case
29
:
case
29
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
30
:
case
30
:
...
@@ -504,9 +511,11 @@ P _performanceEntityDeserializeProp<P>(
...
@@ -504,9 +511,11 @@ P _performanceEntityDeserializeProp<P>(
case
31
:
case
31
:
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
return
(
reader
.
readStringOrNull
(
offset
))
as
P
;
case
32
:
case
32
:
return
(
reader
.
read
Double
OrNull
(
offset
))
as
P
;
return
(
reader
.
read
String
OrNull
(
offset
))
as
P
;
case
33
:
case
33
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
case
34
:
return
(
reader
.
readDoubleOrNull
(
offset
))
as
P
;
default
:
default
:
throw
IsarError
(
'Unknown property with id
$propertyId
'
);
throw
IsarError
(
'Unknown property with id
$propertyId
'
);
}
}
...
@@ -1836,6 +1845,90 @@ extension PerformanceEntityQueryFilter
...
@@ -1836,6 +1845,90 @@ extension PerformanceEntityQueryFilter
});
});
}
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterFilterCondition
>
crossHeightIsNull
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
const
FilterCondition
.
isNull
(
property:
r'crossHeight'
,
));
});
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterFilterCondition
>
crossHeightIsNotNull
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
const
FilterCondition
.
isNotNull
(
property:
r'crossHeight'
,
));
});
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterFilterCondition
>
crossHeightEqualTo
(
double
?
value
,
{
double
epsilon
=
Query
.
epsilon
,
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
equalTo
(
property:
r'crossHeight'
,
value:
value
,
epsilon:
epsilon
,
));
});
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterFilterCondition
>
crossHeightGreaterThan
(
double
?
value
,
{
bool
include
=
false
,
double
epsilon
=
Query
.
epsilon
,
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
greaterThan
(
include:
include
,
property:
r'crossHeight'
,
value:
value
,
epsilon:
epsilon
,
));
});
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterFilterCondition
>
crossHeightLessThan
(
double
?
value
,
{
bool
include
=
false
,
double
epsilon
=
Query
.
epsilon
,
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
lessThan
(
include:
include
,
property:
r'crossHeight'
,
value:
value
,
epsilon:
epsilon
,
));
});
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterFilterCondition
>
crossHeightBetween
(
double
?
lower
,
double
?
upper
,
{
bool
includeLower
=
true
,
bool
includeUpper
=
true
,
double
epsilon
=
Query
.
epsilon
,
})
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addFilterCondition
(
FilterCondition
.
between
(
property:
r'crossHeight'
,
lower:
lower
,
includeLower:
includeLower
,
upper:
upper
,
includeUpper:
includeUpper
,
epsilon:
epsilon
,
));
});
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterFilterCondition
>
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterFilterCondition
>
crossWidthIsNull
()
{
crossWidthIsNull
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
...
@@ -5176,6 +5269,20 @@ extension PerformanceEntityQuerySortBy
...
@@ -5176,6 +5269,20 @@ extension PerformanceEntityQuerySortBy
});
});
}
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterSortBy
>
sortByCrossHeight
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addSortBy
(
r'crossHeight'
,
Sort
.
asc
);
});
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterSortBy
>
sortByCrossHeightDesc
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addSortBy
(
r'crossHeight'
,
Sort
.
desc
);
});
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterSortBy
>
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterSortBy
>
sortByCrossWidth
()
{
sortByCrossWidth
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
...
@@ -5654,6 +5761,20 @@ extension PerformanceEntityQuerySortThenBy
...
@@ -5654,6 +5761,20 @@ extension PerformanceEntityQuerySortThenBy
});
});
}
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterSortBy
>
thenByCrossHeight
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addSortBy
(
r'crossHeight'
,
Sort
.
asc
);
});
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterSortBy
>
thenByCrossHeightDesc
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addSortBy
(
r'crossHeight'
,
Sort
.
desc
);
});
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterSortBy
>
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QAfterSortBy
>
thenByCrossWidth
()
{
thenByCrossWidth
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
...
@@ -6084,6 +6205,13 @@ extension PerformanceEntityQueryWhereDistinct
...
@@ -6084,6 +6205,13 @@ extension PerformanceEntityQueryWhereDistinct
});
});
}
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QDistinct
>
distinctByCrossHeight
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addDistinctBy
(
r'crossHeight'
);
});
}
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QDistinct
>
QueryBuilder
<
PerformanceEntity
,
PerformanceEntity
,
QDistinct
>
distinctByCrossWidth
()
{
distinctByCrossWidth
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
...
@@ -6330,6 +6458,13 @@ extension PerformanceEntityQueryProperty
...
@@ -6330,6 +6458,13 @@ extension PerformanceEntityQueryProperty
});
});
}
}
QueryBuilder
<
PerformanceEntity
,
double
?,
QQueryOperations
>
crossHeightProperty
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
query
.
addPropertyName
(
r'crossHeight'
);
});
}
QueryBuilder
<
PerformanceEntity
,
double
?,
QQueryOperations
>
QueryBuilder
<
PerformanceEntity
,
double
?,
QQueryOperations
>
crossWidthProperty
()
{
crossWidthProperty
()
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
return
QueryBuilder
.
apply
(
this
,
(
query
)
{
...
...
lib/models/sync.dart
View file @
733d7006
...
@@ -7,7 +7,8 @@ class SyncPageModel {
...
@@ -7,7 +7,8 @@ class SyncPageModel {
String
title
;
String
title
;
int
?
count
;
int
?
count
;
int
?
errorCount
;
int
?
errorCount
;
int
?
allCount
;
String
?
updateTime
;
String
?
updateTime
;
SyncPageModel
(
this
.
title
,{
this
.
count
=
0
,
this
.
errorCount
=
0
,
this
.
updateTime
=
''
});
SyncPageModel
(
this
.
title
,{
this
.
count
=
0
,
this
.
errorCount
=
0
,
this
.
allCount
=
0
,
this
.
updateTime
=
''
});
}
}
lib/pages/begats_record/begats_record_binding.dart
0 → 100644
View file @
733d7006
import
'package:get/get.dart'
;
import
'begats_record_logic.dart'
;
class
BegatsRecordBinding
extends
Bindings
{
@override
void
dependencies
()
{
Get
.
lazyPut
(()
=>
BegatsRecordLogic
());
}
}
lib/pages/begats_record/begats_record_logic.dart
0 → 100644
View file @
733d7006
import
'package:anchor_collect_flutter/models/cattle_resume_entity.dart'
;
import
'package:anchor_collect_flutter/utils/dialog_utils.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:get/get.dart'
;
import
'../../congifs.dart'
;
import
'../../controllers/global_service.dart'
;
import
'../../utils/sp_helper.dart'
;
import
'begats_record_state.dart'
;
class
BegatsRecordLogic
extends
GetxController
{
final
BegatsRecordState
state
=
BegatsRecordState
();
late
TextEditingController
individualController
;
late
TextEditingController
fatherRegController
;
late
TextEditingController
motherRegController
;
late
TextEditingController
ffNumController
;
late
TextEditingController
fmNumController
;
late
TextEditingController
mfNumController
;
late
TextEditingController
mmNumController
;
late
TextEditingController
fffNumController
;
late
TextEditingController
ffmNumController
;
late
TextEditingController
fmfNumController
;
late
TextEditingController
fmmNumController
;
late
TextEditingController
mffNumController
;
late
TextEditingController
mfmNumController
;
late
TextEditingController
mmfNumController
;
late
TextEditingController
mmmNumController
;
@override
void
onInit
()
{
individualController
=
TextEditingController
();
fatherRegController
=
TextEditingController
();
motherRegController
=
TextEditingController
();
ffNumController
=
TextEditingController
();
fmNumController
=
TextEditingController
();
mfNumController
=
TextEditingController
();
mmNumController
=
TextEditingController
();
fffNumController
=
TextEditingController
();
ffmNumController
=
TextEditingController
();
fmfNumController
=
TextEditingController
();
fmmNumController
=
TextEditingController
();
mffNumController
=
TextEditingController
();
mfmNumController
=
TextEditingController
();
mmfNumController
=
TextEditingController
();
mmmNumController
=
TextEditingController
();
Map
<
String
,
dynamic
>
arguments
=
Get
.
arguments
;
state
.
entity
.
value
=
arguments
[
'entity'
];
individualController
.
text
=
state
.
entity
.
value
.
registrationNo
??
''
;
fatherRegController
.
text
=
state
.
entity
.
value
.
fatherReg
??
''
;
motherRegController
.
text
=
state
.
entity
.
value
.
motherReg
??
''
;
ffNumController
.
text
=
state
.
entity
.
value
.
ffNum
??
''
;
fmNumController
.
text
=
state
.
entity
.
value
.
fmNum
??
''
;
mfNumController
.
text
=
state
.
entity
.
value
.
mfNum
??
''
;
mmNumController
.
text
=
state
.
entity
.
value
.
mmNum
??
''
;
fffNumController
.
text
=
state
.
entity
.
value
.
fffNum
??
''
;
ffmNumController
.
text
=
state
.
entity
.
value
.
ffmNum
??
''
;
fmfNumController
.
text
=
state
.
entity
.
value
.
fmfNum
??
''
;
fmmNumController
.
text
=
state
.
entity
.
value
.
fmmNum
??
''
;
mffNumController
.
text
=
state
.
entity
.
value
.
mffNum
??
''
;
mfmNumController
.
text
=
state
.
entity
.
value
.
mfmNum
??
''
;
mmfNumController
.
text
=
state
.
entity
.
value
.
mmfNum
??
''
;
mmmNumController
.
text
=
state
.
entity
.
value
.
mmmNum
??
''
;
}
Future
<
void
>
save
()
async
{
if
(
state
.
entity
==
null
)
{
DialogUtils
.
showToast
(
'牛只信息无效!'
);
return
;
}
state
.
entity
.
value
.
fatherReg
=
fatherRegController
.
text
??
''
;
state
.
entity
.
value
.
motherReg
=
motherRegController
.
text
??
''
;
state
.
entity
.
value
.
ffNum
=
ffNumController
.
text
??
''
;
state
.
entity
.
value
.
fmNum
=
fmNumController
.
text
??
''
;
state
.
entity
.
value
.
mfNum
=
mfNumController
.
text
??
''
;
state
.
entity
.
value
.
mmNum
=
mmNumController
.
text
??
''
;
state
.
entity
.
value
.
fffNum
=
fffNumController
.
text
??
''
;
state
.
entity
.
value
.
ffmNum
=
ffmNumController
.
text
??
''
;
state
.
entity
.
value
.
fmfNum
=
fmfNumController
.
text
??
''
;
state
.
entity
.
value
.
fmmNum
=
fmmNumController
.
text
??
''
;
state
.
entity
.
value
.
mffNum
=
mffNumController
.
text
??
''
;
state
.
entity
.
value
.
mfmNum
=
mfmNumController
.
text
??
''
;
state
.
entity
.
value
.
mmfNum
=
mmfNumController
.
text
??
''
;
state
.
entity
.
value
.
mmmNum
=
mmmNumController
.
text
??
''
;
state
.
entity
.
value
.
updateTime
=
DateTime
.
now
().
toString
();
state
.
entity
.
value
.
updateBy
=
SpHelper
.
getStorage
(
Config
.
SP_STR_USERNAME
);
state
.
entity
.
value
.
deptId
=
SpHelper
.
getStorage
(
Config
.
SP_DEPT_ID
);
state
.
entity
.
value
.
uploadStatus
=
'0'
;
await
GlobalService
.
to
.
isar
.
writeTxn
(()
async
=>
{
await
GlobalService
.
to
.
isar
.
cattleResumeEntitys
.
put
(
state
.
entity
.
value
),
});
DialogUtils
.
showToast
(
'保存系谱成功'
);
Get
.
back
();
}
}
lib/pages/begats_record/begats_record_state.dart
0 → 100644
View file @
733d7006
import
'package:get/get_rx/src/rx_types/rx_types.dart'
;
import
'../../models/cattle_resume_entity.dart'
;
class
BegatsRecordState
{
late
Rx
<
CattleResumeEntity
>
entity
=
CattleResumeEntity
().
obs
;
BegatsRecordState
()
{
///Initialize variables
}
}
lib/pages/begats_record/begats_record_view.dart
0 → 100644
View file @
733d7006
import
'package:flutter/material.dart'
;
import
'package:get/get.dart'
;
import
'begats_record_logic.dart'
;
class
BegatsRecordPage
extends
StatelessWidget
{
BegatsRecordPage
({
Key
?
key
})
:
super
(
key:
key
);
final
logic
=
Get
.
find
<
BegatsRecordLogic
>();
final
state
=
Get
.
find
<
BegatsRecordLogic
>().
state
;
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'系谱'
,
style:
TextStyle
(
color:
Colors
.
white
,
),
),
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
actions:
[
Padding
(
padding:
const
EdgeInsets
.
all
(
5.0
),
child:
InkWell
(
child:
const
Center
(
child:
Text
(
'保存'
),
),
onTap:
()
=>
logic
.
save
(),
),
),
],
),
resizeToAvoidBottomInset:
false
,
body:
SingleChildScrollView
(
scrollDirection:
Axis
.
horizontal
,
child:
Padding
(
padding:
const
EdgeInsets
.
all
(
20.0
),
child:
Row
(
mainAxisSize:
MainAxisSize
.
max
,
children:
[
Container
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
max
,
mainAxisAlignment:
MainAxisAlignment
.
spaceAround
,
children:
[
Row
(
children:
[
const
Text
(
'个体号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
readOnly:
true
,
controller:
logic
.
individualController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '个体号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
],
),
),
// SizedBox(
// width: 1,
// height: 300,
// child: Container(width: 1,
// color: Colors.black,),
// ),
Container
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceAround
,
children:
[
Row
(
children:
[
const
Text
(
'父登记号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
fatherRegController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '父登记号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
Row
(
children:
[
const
Text
(
'母登记号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
motherRegController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '母登记号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
],
),
),
Container
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceAround
,
children:
[
Row
(
children:
[
const
Text
(
' 祖父号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
ffNumController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '祖父号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
Row
(
children:
[
const
Text
(
' 祖母号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
fmNumController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '祖母号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
Row
(
children:
[
const
Text
(
'外祖父号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
mfNumController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '外祖父号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
Row
(
children:
[
const
Text
(
'外祖母号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
mmNumController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '外祖母号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
],
),
),
Container
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceAround
,
children:
[
Row
(
children:
[
const
Text
(
' 曾祖父号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
fffNumController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '曾祖父号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
Row
(
children:
[
const
Text
(
' 曾祖母号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
ffmNumController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '曾祖母号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
Row
(
children:
[
const
Text
(
' 曾外祖父号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
fmfNumController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '曾外祖父号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
Row
(
children:
[
const
Text
(
' 曾外祖母号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
fmmNumController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '曾外祖母号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
Row
(
children:
[
const
Text
(
'外曾父祖父号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
mffNumController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '外曾父祖父号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
Row
(
children:
[
const
Text
(
'外曾父祖母号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
mfmNumController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '外曾父祖母号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
Row
(
children:
[
const
Text
(
'外曾外祖父号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
mmfNumController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '外曾外祖父号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
Row
(
children:
[
const
Text
(
'外曾外祖母号:'
),
const
SizedBox
(
height:
5
,
),
Container
(
width:
180
,
height:
50
,
child:
TextField
(
controller:
logic
.
mmmNumController
,
onChanged:
(
text
)
{
// state.filterMotherNo = text;
},
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
// hintText: '外曾外祖母号',
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
10.0
,
vertical:
2.0
),
),
),
),
],
),
],
),
),
],
),
),
),
);
}
}
lib/pages/breeding_record/breeding_record_detail/breeding_record_detail_logic.dart
View file @
733d7006
import
'package:anchor_collect_flutter/models/breeding_record_detail_entity.dart'
;
import
'package:anchor_collect_flutter/models/breeding_record_detail_entity.dart'
;
import
'package:get/get.dart'
;
import
'package:get/get.dart'
;
import
'package:intl/intl.dart'
;
import
'package:uuid/uuid.dart'
;
import
'package:uuid/uuid.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'../../../congifs.dart'
;
import
'../../../congifs.dart'
;
...
@@ -16,29 +17,33 @@ import 'breeding_record_detail_state.dart';
...
@@ -16,29 +17,33 @@ import 'breeding_record_detail_state.dart';
class
BreedingRecordDetailLogic
extends
GetxController
{
class
BreedingRecordDetailLogic
extends
GetxController
{
final
BreedingRecordDetailState
state
=
BreedingRecordDetailState
();
final
BreedingRecordDetailState
state
=
BreedingRecordDetailState
();
BreedingRecordDetailEntity
?
detailEntity
;
BreedingRecordEntity
?
entity
;
// 创建一个Uuid实例
// 创建一个Uuid实例
var
uuid
=
Uuid
();
var
uuid
=
Uuid
();
@override
@override
void
onReady
()
{
void
onReady
()
{
Map
<
String
,
dynamic
>
arguments
=
Get
.
arguments
;
Map
<
String
,
dynamic
>
arguments
=
Get
.
arguments
;
BreedingRecordDetailEntity
?
detailEntity
=
arguments
[
'detailEntity'
];
detailEntity
=
arguments
[
'detailEntity'
];
BreedingRecordEntity
?
entity
=
arguments
[
'entity'
];
entity
=
arguments
[
'entity'
];
if
(
entity
==
null
)
{
if
(
entity
==
null
)
{
DialogUtils
.
showToast
(
'数据信息问题'
);
DialogUtils
.
showToast
(
'数据信息问题'
);
Get
.
back
(
result:
'refresh'
);
Get
.
back
(
result:
'refresh'
);
}
else
{
}
else
{
if
(
detailEntity
!=
null
)
{
if
(
detailEntity
!=
null
)
{
state
.
entity
.
value
=
detailEntity
;
state
.
entity
.
value
=
detailEntity
!
;
state
.
isModify
=
true
;
state
.
isModify
=
true
;
state
.
unid
=
state
.
entity
.
value
.
unid
!;
state
.
unid
=
state
.
entity
.
value
.
unid
!;
}
else
{
}
else
{
state
.
entity
.
value
.
unid
=
uuid
.
v4
().
hashCode
.
toString
()
+
uuid
.
v4
().
hashCode
.
toString
();
state
.
entity
.
value
.
unid
=
uuid
.
v4
().
hashCode
.
toString
()
+
uuid
.
v4
().
hashCode
.
toString
();
state
.
entity
.
value
.
cattleresumeId
=
entity
.
cattleresumeId
;
// state.entity.value.cattleresumeId = entity.cattleresumeId;
state
.
entity
.
value
.
registrationNo
=
entity
.
registrationNo
;
state
.
entity
.
value
.
registrationNo
=
entity
!.
registrationNo
;
state
.
entity
.
value
.
individualNo
=
entity
.
individualNo
;
state
.
entity
.
value
.
individualNo
=
entity
!.
individualNo
;
state
.
entity
.
value
.
fUnid
=
entity
.
unid
;
state
.
entity
.
value
.
fUnid
=
entity
!.
unid
;
state
.
entity
.
value
.
matingStyle
==
'2'
;
}
}
refreshDictData
();
refreshDictData
();
}
}
...
@@ -48,17 +53,21 @@ class BreedingRecordDetailLogic extends GetxController {
...
@@ -48,17 +53,21 @@ class BreedingRecordDetailLogic extends GetxController {
refreshDictData
()
async
{
refreshDictData
()
async
{
state
.
matingStyle
=
state
.
matingStyle
=
await
DictUtils
.
getDictName
(
'zxgl_cattlemating_matingStyle'
,
state
.
entity
.
value
.
matingStyle
??
''
);
await
DictUtils
.
getDictName
(
'zxgl_cattlemating_matingStyle'
,
state
.
entity
.
value
.
matingStyle
??
''
);
state
.
frozenSemenBatch
=
await
DictUtils
.
getDictName
(
'zxgl_frozen_semen'
,
state
.
entity
.
value
.
frozenSemenBatch
??
''
);
// state.grade = await DictUtils.getDictName('zxgl_cattleresume_grade', state.entity.value.grade ?? '');
// state.grade = await DictUtils.getDictName('zxgl_cattleresume_grade', state.entity.value.grade ?? '');
update
();
update
();
}
}
calculateDueDate
(
String
matingDate
){
///计算预产期
// DateFormat dateFormatter = DateFormat('yyyy-MM-dd');
calculateDueDate
(
String
matingDate
)
{
// DateTime startDate = DateTime(2024, 1, 21);
DateTime
startDate
=
DateTime
.
parse
(
matingDate
);
// dateFormatter.add(const Duration(days: 128));
int
daysToAdd
=
280
;
// final dateString = dateFormatter.format(matingDate),
DateTime
endDate
=
startDate
.
add
(
Duration
(
days:
daysToAdd
));
// DateTime.parse(dateString).;
String
formattedEndDate
=
DateFormat
(
'yyyy-MM-dd'
).
format
(
endDate
);
state
.
entity
.
value
.
dueDate
=
formattedEndDate
;
update
();
update
();
}
}
...
@@ -88,26 +97,10 @@ class BreedingRecordDetailLogic extends GetxController {
...
@@ -88,26 +97,10 @@ class BreedingRecordDetailLogic extends GetxController {
}
}
Future
<
bool
>
checkRequiredFields
()
async
{
Future
<
bool
>
checkRequiredFields
()
async
{
if
(
!
EmptyUtils
.
isStrNotEmpty
(
state
.
entity
.
value
.
cattleresumeId
))
{
if
(
entity
==
null
||
!
EmptyUtils
.
isStrNotEmpty
(
entity
!
.
cattleresumeId
))
{
DialogUtils
.
showToast
(
'高频耳标或者可视耳标无效'
);
DialogUtils
.
showToast
(
'高频耳标或者可视耳标无效'
);
return
true
;
return
true
;
}
}
// if (!EmptyUtils.isStrNotEmpty(state.entity.individualNo)) {
// DialogUtils.showToast('必须填写可视耳标');
// return true;
// }
// if (!EmptyUtils.isStrNotEmpty(state.entity.photoPath) && !EmptyUtils.isStrNotEmpty(state.photoPath)) {
// DialogUtils.showToast('必须上传牛只拍照');
// return true;
// }
// if (!EmptyUtils.isStrNotEmpty(state.entity.circleNo)) {
// DialogUtils.showToast('必须选择圈舍');
// return true;
// }
// if (!EmptyUtils.isStrNotEmpty(state.entity.raiseType)) {
// DialogUtils.showToast('必须选择饲养类型');
// return true;
// }
if
(!
EmptyUtils
.
isStrNotEmpty
(
state
.
entity
.
value
.
matingDate
))
{
if
(!
EmptyUtils
.
isStrNotEmpty
(
state
.
entity
.
value
.
matingDate
))
{
DialogUtils
.
showToast
(
'必须选择配种日期'
);
DialogUtils
.
showToast
(
'必须选择配种日期'
);
return
true
;
return
true
;
...
@@ -116,26 +109,6 @@ class BreedingRecordDetailLogic extends GetxController {
...
@@ -116,26 +109,6 @@ class BreedingRecordDetailLogic extends GetxController {
DialogUtils
.
showToast
(
'必须选择配种方式'
);
DialogUtils
.
showToast
(
'必须选择配种方式'
);
return
true
;
return
true
;
}
}
// if (state.entity.value.drugNumber == null ||state.entity.value.drugNumber == 0) {
// DialogUtils.showToast('必须填写用药数量');
// return true;
// }
// if (state.entity.birthHeavy == null || state.entity.birthHeavy == 0) {
// DialogUtils.showToast('必须填写出生重量');
// return true;
// }
// if (!EmptyUtils.isStrNotEmpty(state.entity.sex)) {
// DialogUtils.showToast('必须选择性别');
// return true;
// }
// if (!EmptyUtils.isStrNotEmpty(state.entity.status)) {
// DialogUtils.showToast('必须选择状态');
// return true;
// }
// if (!EmptyUtils.isStrNotEmpty(state.entity.colour)) {
// DialogUtils.showToast('必须填写犊牛毛色');
// return true;
// }
return
false
;
return
false
;
}
}
...
@@ -149,6 +122,7 @@ class BreedingRecordDetailLogic extends GetxController {
...
@@ -149,6 +122,7 @@ class BreedingRecordDetailLogic extends GetxController {
state
.
entity
.
value
.
matingStyle
=
formerEntity
.
matingStyle
;
state
.
entity
.
value
.
matingStyle
=
formerEntity
.
matingStyle
;
state
.
entity
.
value
.
frozenSemenBatch
=
formerEntity
.
frozenSemenBatch
;
state
.
entity
.
value
.
frozenSemenBatch
=
formerEntity
.
frozenSemenBatch
;
state
.
entity
.
value
.
matingDate
=
formerEntity
.
matingDate
;
state
.
entity
.
value
.
matingDate
=
formerEntity
.
matingDate
;
state
.
entity
.
value
.
other
=
formerEntity
.
other
;
state
.
entity
.
value
.
isReturn
=
formerEntity
.
isReturn
;
state
.
entity
.
value
.
isReturn
=
formerEntity
.
isReturn
;
state
.
entity
.
value
.
backLoveDate
=
formerEntity
.
backLoveDate
;
state
.
entity
.
value
.
backLoveDate
=
formerEntity
.
backLoveDate
;
state
.
entity
.
value
.
dueDate
=
formerEntity
.
dueDate
;
state
.
entity
.
value
.
dueDate
=
formerEntity
.
dueDate
;
...
...
lib/pages/breeding_record/breeding_record_detail/breeding_record_detail_state.dart
View file @
733d7006
...
@@ -15,7 +15,10 @@ class BreedingRecordDetailState {
...
@@ -15,7 +15,10 @@ class BreedingRecordDetailState {
bool
isModify
=
false
;
bool
isModify
=
false
;
bool
isOther
=
false
;
late
String
matingStyle
=
''
;
late
String
matingStyle
=
''
;
late
String
frozenSemenBatch
=
''
;
BreedingRecordDetailState
()
{
BreedingRecordDetailState
()
{
///Initialize variables
///Initialize variables
...
...
lib/pages/breeding_record/breeding_record_detail/breeding_record_detail_view.dart
View file @
733d7006
...
@@ -16,7 +16,10 @@ class BreedingRecordDetailPage extends StatelessWidget {
...
@@ -16,7 +16,10 @@ class BreedingRecordDetailPage extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'配种详情'
),
title:
const
Text
(
'配种详情'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
),
),
...
@@ -62,32 +65,101 @@ class BreedingRecordDetailPage extends StatelessWidget {
...
@@ -62,32 +65,101 @@ class BreedingRecordDetailPage extends StatelessWidget {
const
SizedBox
(
const
SizedBox
(
width:
10
,
width:
10
,
),
),
// getItemView(
// '配种方式',
// state.matingStyle ?? '',
// () async => {
// DialogUtils.showSingleListDialog(
// await DictUtils.getDictList('zxgl_cattlemating_matingStyle'),
// onPositive: (selectReslut) => {
// state.matingStyle = selectReslut.key,
// state.entity.value.matingStyle = selectReslut.value,
// if (selectReslut.value == '1')//1本交 2 受精
// {
// state.isMating = true,
// state.entity.value.frozenSemenBatch = '',
// state.frozenSemenBatch = '',
// state.entity.value.other = '',
// }
// else
// {
// state.isMating = false,
// state.entity.value.cattleresumeId = '',
// },
// logic.update(),
// }),
// }),
getItemView
(
'冻精信息'
,
state
.
frozenSemenBatch
??
''
,
()
async
=>
{
DialogUtils
.
showSingleListDialog
(
await
DictUtils
.
getDictList
(
'zxgl_frozen_semen'
),
onPositive:
(
selectReslut
)
=>
{
state
.
frozenSemenBatch
=
selectReslut
.
key
,
state
.
entity
.
value
.
frozenSemenBatch
=
selectReslut
.
value
,
if
(
selectReslut
.
value
==
'1'
)
{
state
.
isOther
=
true
,
state
.
entity
.
value
.
cattleresumeId
=
''
,
}
else
{
state
.
isOther
=
false
,
state
.
entity
.
value
.
other
=
''
,
state
.
entity
.
value
.
cattleresumeId
=
selectReslut
.
key
.
substring
(
selectReslut
.
key
.
lastIndexOf
(
'/'
)+
1
,
selectReslut
.
key
.
length
),
},
logic
.
update
(),
}),
}),
getItemView
(
getItemView
(
'配种方式'
,
'冻精注册号'
,
state
.
matingStyle
??
''
,
state
.
entity
.
value
.
cattleresumeId
??
''
,
()
async
=>
{
()
=>
{
DialogUtils
.
showSingleListDialog
(
// DialogUtils.showInputDialog(
await
DictUtils
.
getDictList
(
'zxgl_cattlemating_matingStyle'
),
// hintText: '输入冻精注册号',
onPositive:
(
selectReslut
)
=>
{
// onPositive: (text) => {
state
.
matingStyle
=
selectReslut
.
key
,
// state.entity.value.cattleresumeId = text ?? '',
state
.
entity
.
value
.
matingStyle
=
selectReslut
.
value
,
// logic.update(),
logic
.
update
(),
// }),
}),
}),
}),
],
),
),
Padding
(
padding:
const
EdgeInsets
.
all
(
2.0
),
child:
Row
(
children:
[
const
SizedBox
(
width:
10
,
),
getItemView
(
getItemView
(
'
配种日期
'
,
'
其它
'
,
state
.
entity
.
value
.
matingDate
??
''
,
state
.
entity
.
value
.
other
??
''
,
()
=>
{
()
=>
{
DialogUtils
.
showTimeDialog
(
if
(
state
.
isOther
)
Get
.
context
!,
{
isTime:
false
,
DialogUtils
.
showInputDialog
(
title:
'请选择配种日期'
,
hintText:
'输入冻精批次'
,
onPositive:
(
date
)
=>
{
onPositive:
(
text
)
=>
{
state
.
entity
.
value
.
matingDate
=
date
,
state
.
entity
.
value
.
other
=
text
??
''
,
logic
.
calculateDueDate
(
date
),
logic
.
update
(),
}),
},
},
),
}),
}),
getItemView
(
'配种日期'
,
state
.
entity
.
value
.
matingDate
??
''
,
()
=>
{
DialogUtils
.
showTimeDialog
(
Get
.
context
!,
isTime:
false
,
title:
'请选择配种日期'
,
onPositive:
(
date
)
=>
{
state
.
entity
.
value
.
matingDate
=
date
,
logic
.
calculateDueDate
(
date
),
},
),
}),
],
],
),
),
),
),
...
@@ -112,41 +184,30 @@ class BreedingRecordDetailPage extends StatelessWidget {
...
@@ -112,41 +184,30 @@ class BreedingRecordDetailPage extends StatelessWidget {
// },
// },
// ),
// ),
}),
}),
getItemView
(
'冻精批次'
,
state
.
entity
.
value
.
frozenSemenBatch
??
''
,
()
=>
{
DialogUtils
.
showInputDialog
(
hintText:
'输入冻精批次'
,
onPositive:
(
text
)
=>
{
state
.
entity
.
value
.
frozenSemenBatch
=
text
??
''
,
logic
.
update
(),
}),
}),
],
),
),
Padding
(
padding:
const
EdgeInsets
.
all
(
2.0
),
child:
Row
(
children:
[
const
SizedBox
(
width:
10
,
),
getItemView
(
getItemView
(
'备注'
,
'备注'
,
state
.
entity
.
value
.
remark
??
''
,
state
.
entity
.
value
.
remark
??
''
,
()
=>
{
()
=>
{
// DialogUtils.showInputDialog(
// DialogUtils.showInputDialog(
// hintText: '输入备注',
// hintText: '输入备注',
// onPositive: (text) => {
// onPositive: (text) => {
// itemDateList[i].remark = text ?? '',
// itemDateList[i].remark = text ?? '',
// update(),
// update(),
// }),
// }),
}),
}),
],
],
),
),
),
),
// Padding(
// padding: const EdgeInsets.all(2.0),
// child: Row(
// children: [
// const SizedBox(
// width: 10,
// ),
// ],
// ),
// ),
const
SizedBox
(
const
SizedBox
(
height:
5
,
height:
5
,
),
),
...
...
lib/pages/breeding_record/breeding_record_list/breeding_record_list_view.dart
View file @
733d7006
...
@@ -20,7 +20,10 @@ class BreedingRecordListPage extends StatelessWidget {
...
@@ -20,7 +20,10 @@ class BreedingRecordListPage extends StatelessWidget {
return
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
false
,
resizeToAvoidBottomInset:
false
,
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'配种列表'
),
title:
const
Text
(
'配种列表'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
actions:
[
actions:
[
...
...
lib/pages/breeding_record/breeding_record_logic.dart
View file @
733d7006
...
@@ -38,7 +38,7 @@ class BreedingRecordLogic extends GetxController {
...
@@ -38,7 +38,7 @@ class BreedingRecordLogic extends GetxController {
}
else
{
}
else
{
///如果没有配种记录,先要查询一下
///如果没有配种记录,先要查询一下
if
(
state
.
cattleResumeEntity
!=
null
)
{
if
(
state
.
cattleResumeEntity
!=
null
)
{
queryBreedingRecord
(
''
,
''
);
queryBreedingRecord
(
state
.
cattleResumeEntity
?.
registrationNo
??
''
,
state
.
cattleResumeEntity
?.
individualNo
??
''
);
}
}
}
}
}
}
...
@@ -57,8 +57,7 @@ class BreedingRecordLogic extends GetxController {
...
@@ -57,8 +57,7 @@ class BreedingRecordLogic extends GetxController {
if
(
bre
!=
null
)
{
if
(
bre
!=
null
)
{
copyEntity
(
bre
);
copyEntity
(
bre
);
queryBreedingRecordDetail
();
queryBreedingRecordDetail
();
}
else
{
}
else
{
///没有就创建新的
///没有就创建新的
CattleResumeEntity
?
cre
=
await
GlobalService
.
to
.
isar
.
cattleResumeEntitys
CattleResumeEntity
?
cre
=
await
GlobalService
.
to
.
isar
.
cattleResumeEntitys
.
filter
()
.
filter
()
.
optional
(
EmptyUtils
.
isStrNotEmpty
(
registrationNo
),
(
q
)
=>
q
.
registrationNoEqualTo
(
registrationNo
))
.
optional
(
EmptyUtils
.
isStrNotEmpty
(
registrationNo
),
(
q
)
=>
q
.
registrationNoEqualTo
(
registrationNo
))
...
@@ -70,6 +69,7 @@ class BreedingRecordLogic extends GetxController {
...
@@ -70,6 +69,7 @@ class BreedingRecordLogic extends GetxController {
state
.
entity
.
value
.
cattleresumeId
=
cre
.
unid
;
state
.
entity
.
value
.
cattleresumeId
=
cre
.
unid
;
state
.
entity
.
value
.
registrationNo
=
cre
.
registrationNo
;
state
.
entity
.
value
.
registrationNo
=
cre
.
registrationNo
;
state
.
entity
.
value
.
individualNo
=
cre
.
individualNo
;
state
.
entity
.
value
.
individualNo
=
cre
.
individualNo
;
state
.
entity
.
value
.
deptId
=
SpHelper
.
getStorage
(
Config
.
SP_DEPT_ID
);
update
();
update
();
}
else
{
}
else
{
DialogUtils
.
showWarningDialog
(
'无此标签数据!'
);
DialogUtils
.
showWarningDialog
(
'无此标签数据!'
);
...
@@ -89,7 +89,7 @@ class BreedingRecordLogic extends GetxController {
...
@@ -89,7 +89,7 @@ class BreedingRecordLogic extends GetxController {
//查询出高频耳标和可视耳标
//查询出高频耳标和可视耳标
if
(
pageData
!=
null
)
{
if
(
pageData
!=
null
)
{
for
(
int
i
=
0
;
i
<
pageData
!.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
pageData
!.
length
;
i
++)
{
pageData
[
i
].
cattleresumeId
=
state
.
entity
.
value
.
cattleresumeId
;
//
pageData[i].cattleresumeId = state.entity.value.cattleresumeId;
pageData
[
i
].
registrationNo
=
state
.
entity
.
value
.
registrationNo
;
pageData
[
i
].
registrationNo
=
state
.
entity
.
value
.
registrationNo
;
pageData
[
i
].
individualNo
=
state
.
entity
.
value
.
individualNo
;
pageData
[
i
].
individualNo
=
state
.
entity
.
value
.
individualNo
;
}
}
...
@@ -127,7 +127,9 @@ class BreedingRecordLogic extends GetxController {
...
@@ -127,7 +127,9 @@ class BreedingRecordLogic extends GetxController {
if
(!
RfidPlugin
.
isInventory
)
{
if
(!
RfidPlugin
.
isInventory
)
{
RfidPlugin
.
startInventory
((
epc
,
agrs1
)
{
RfidPlugin
.
startInventory
((
epc
,
agrs1
)
{
RfidPlugin
.
stopInventory
();
RfidPlugin
.
stopInventory
();
print
(
'why:epc:
$epc
'
);
if
(
kDebugMode
)
{
print
(
'why:epc:
$epc
'
);
}
RfidPlugin
.
isInventory
=
false
;
RfidPlugin
.
isInventory
=
false
;
state
.
entity
.
value
.
registrationNo
=
epc
;
state
.
entity
.
value
.
registrationNo
=
epc
;
state
.
entity
.
value
.
individualNo
=
''
;
state
.
entity
.
value
.
individualNo
=
''
;
...
@@ -183,11 +185,13 @@ class BreedingRecordLogic extends GetxController {
...
@@ -183,11 +185,13 @@ class BreedingRecordLogic extends GetxController {
padding:
const
EdgeInsets
.
all
(
2.0
),
padding:
const
EdgeInsets
.
all
(
2.0
),
child:
Row
(
child:
Row
(
children:
[
children:
[
getDialogItemView
(
// getDialogItemView(
'配种方式'
,
// '配种方式',
await
DictUtils
.
getDictName
(
// await DictUtils.getDictName(
'zxgl_cattlemating_matingStyle'
,
itemDateList
[
i
].
matingStyle
??
''
)),
// 'zxgl_cattlemating_matingStyle', itemDateList[i].matingStyle ?? '')),
getDialogItemView
(
'配种日期'
,
itemDateList
[
i
].
matingDate
??
''
),
getDialogItemView
(
'冻精信息'
,
await
DictUtils
.
getDictName
(
'zxgl_frozen_semen'
,
itemDateList
[
i
].
frozenSemenBatch
??
''
)),
getDialogItemView
(
'冻精注册号'
,
itemDateList
[
i
].
cattleresumeId
??
''
),
],
],
),
),
),
),
...
@@ -195,8 +199,8 @@ class BreedingRecordLogic extends GetxController {
...
@@ -195,8 +199,8 @@ class BreedingRecordLogic extends GetxController {
padding:
const
EdgeInsets
.
all
(
2.0
),
padding:
const
EdgeInsets
.
all
(
2.0
),
child:
Row
(
child:
Row
(
children:
[
children:
[
getDialogItemView
(
'
预产日期'
,
itemDateList
[
i
].
dueDate
??
''
),
getDialogItemView
(
'
其它'
,
itemDateList
[
i
].
other
??
''
),
getDialogItemView
(
'
冻精批次'
,
itemDateList
[
i
].
frozenSemenBatch
??
''
),
getDialogItemView
(
'
配种日期'
,
itemDateList
[
i
].
matingDate
??
''
),
],
],
),
),
),
),
...
@@ -204,10 +208,18 @@ class BreedingRecordLogic extends GetxController {
...
@@ -204,10 +208,18 @@ class BreedingRecordLogic extends GetxController {
padding:
const
EdgeInsets
.
all
(
2.0
),
padding:
const
EdgeInsets
.
all
(
2.0
),
child:
Row
(
child:
Row
(
children:
[
children:
[
getDialogItemView
(
'预产日期'
,
itemDateList
[
i
].
dueDate
??
''
),
getDialogItemView
(
'备注'
,
itemDateList
[
i
].
remark
??
''
),
getDialogItemView
(
'备注'
,
itemDateList
[
i
].
remark
??
''
),
],
],
),
),
),
),
// Padding(
// padding: const EdgeInsets.all(2.0),
// child: Row(
// children: [
// ],
// ),
// ),
const
SizedBox
(
const
SizedBox
(
height:
5
,
height:
5
,
),
),
...
@@ -264,6 +276,8 @@ class BreedingRecordLogic extends GetxController {
...
@@ -264,6 +276,8 @@ class BreedingRecordLogic extends GetxController {
),
),
Text
(
Text
(
context
,
context
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
const
TextStyle
(
style:
const
TextStyle
(
height:
1.5
,
height:
1.5
,
color:
Colors
.
black
,
color:
Colors
.
black
,
...
...
lib/pages/breeding_record/breeding_record_view.dart
View file @
733d7006
...
@@ -18,7 +18,10 @@ class BreedingRecordPage extends StatelessWidget {
...
@@ -18,7 +18,10 @@ class BreedingRecordPage extends StatelessWidget {
return
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
false
,
resizeToAvoidBottomInset:
false
,
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'配种记录'
),
title:
const
Text
(
'配种记录'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
actions:
[
actions:
[
...
...
lib/pages/cattle_resume/cattle_resume_list/cattle_resume_list_view.dart
View file @
733d7006
...
@@ -20,7 +20,10 @@ class CattleResumeListPage extends StatelessWidget {
...
@@ -20,7 +20,10 @@ class CattleResumeListPage extends StatelessWidget {
return
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
false
,
resizeToAvoidBottomInset:
false
,
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'基础信息列表'
),
title:
const
Text
(
'基础信息列表'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
actions:
[
actions:
[
...
...
lib/pages/cattle_resume/cattle_resume_logic.dart
View file @
733d7006
...
@@ -40,7 +40,7 @@ class CattleResumeLogic extends GetxController {
...
@@ -40,7 +40,7 @@ class CattleResumeLogic extends GetxController {
initCamera
()
{
initCamera
()
{
// 初始化 CameraController
// 初始化 CameraController
if
(
Config
.
cameras
[
0
]
!=
null
)
{
if
(
Config
.
cameras
!=
null
&&
Config
.
cameras
[
0
]
!=
null
)
{
Config
.
controller
=
CameraController
(
Config
.
cameras
[
0
],
ResolutionPreset
.
max
);
Config
.
controller
=
CameraController
(
Config
.
cameras
[
0
],
ResolutionPreset
.
max
);
Config
.
controller
.
initialize
().
then
(
Config
.
controller
.
initialize
().
then
(
(
_
)
{},
(
_
)
{},
...
@@ -85,6 +85,16 @@ class CattleResumeLogic extends GetxController {
...
@@ -85,6 +85,16 @@ class CattleResumeLogic extends GetxController {
}
}
}
}
forwardBegats
()
{
if
(
state
.
entity
.
value
==
null
)
{
DialogUtils
.
showToast
(
'请扫描或填写耳标'
);
return
;
}
Map
<
String
,
dynamic
>
params
=
{};
params
.
putIfAbsent
(
"entity"
,
()
=>
state
.
entity
.
value
);
Get
.
toNamed
(
AppRoute
.
BEGATS_RECORD
,
arguments:
params
);
}
save
()
async
{
save
()
async
{
if
(
await
checkRequiredFields
())
{
if
(
await
checkRequiredFields
())
{
return
;
return
;
...
...
lib/pages/cattle_resume/cattle_resume_view.dart
View file @
733d7006
...
@@ -22,9 +22,26 @@ class CattleResumePage extends StatelessWidget {
...
@@ -22,9 +22,26 @@ class CattleResumePage extends StatelessWidget {
state
.
isCamera
=
false
;
state
.
isCamera
=
false
;
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'基础信息'
),
title:
const
Text
(
'基础信息'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
actions:
[
Padding
(
padding:
const
EdgeInsets
.
all
(
5.0
),
child:
InkWell
(
child:
const
Center
(
child:
Text
(
'系谱'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
),
onTap:
()=>
logic
.
forwardBegats
(),
),
),
],
),
),
body:
Column
(
body:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
...
...
lib/pages/home/home_view.dart
View file @
733d7006
...
@@ -13,7 +13,10 @@ class HomePage extends StatelessWidget {
...
@@ -13,7 +13,10 @@ class HomePage extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'首页'
),
title:
const
Text
(
'首页'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
elevation:
10
,
elevation:
10
,
...
...
lib/pages/immune_batch/immune_batch_list/immune_batch_list_view.dart
View file @
733d7006
...
@@ -22,7 +22,10 @@ class ImmuneBatchListPage extends StatelessWidget {
...
@@ -22,7 +22,10 @@ class ImmuneBatchListPage extends StatelessWidget {
return
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
false
,
resizeToAvoidBottomInset:
false
,
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'免疫记录'
),
title:
const
Text
(
'免疫记录'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
actions:
[
actions:
[
...
...
lib/pages/immune_batch/immune_batch_view.dart
View file @
733d7006
...
@@ -15,7 +15,10 @@ class ImmuneBatchPage extends StatelessWidget {
...
@@ -15,7 +15,10 @@ class ImmuneBatchPage extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'免疫记录'
),
title:
const
Text
(
'免疫记录'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
),
),
...
...
lib/pages/like_search_farmer/like_search_farmer_binding.dart
0 → 100644
View file @
733d7006
import
'package:get/get.dart'
;
import
'like_search_farmer_logic.dart'
;
class
LikeSearchFarmerBinding
extends
Bindings
{
@override
void
dependencies
()
{
Get
.
lazyPut
(()
=>
LikeSearchFarmerLogic
());
}
}
lib/pages/like_search_farmer/like_search_farmer_logic.dart
0 → 100644
View file @
733d7006
import
'package:get/get.dart'
;
import
'like_search_farmer_state.dart'
;
class
LikeSearchFarmerLogic
extends
GetxController
{
final
LikeSearchFarmerState
state
=
LikeSearchFarmerState
();
}
lib/pages/like_search_farmer/like_search_farmer_state.dart
0 → 100644
View file @
733d7006
class
LikeSearchFarmerState
{
LikeSearchFarmerState
()
{
///Initialize variables
}
}
lib/pages/like_search_farmer/like_search_farmer_view.dart
0 → 100644
View file @
733d7006
import
'package:flutter/material.dart'
;
import
'package:get/get.dart'
;
import
'like_search_farmer_logic.dart'
;
class
LikeSearchFarmerPage
extends
StatelessWidget
{
LikeSearchFarmerPage
({
Key
?
key
})
:
super
(
key:
key
);
final
logic
=
Get
.
find
<
LikeSearchFarmerLogic
>();
final
state
=
Get
.
find
<
LikeSearchFarmerLogic
>().
state
;
@override
Widget
build
(
BuildContext
context
)
{
return
Container
();
}
}
lib/pages/login/login_logic.dart
View file @
733d7006
...
@@ -29,9 +29,16 @@ class LoginLogic extends GetxController {
...
@@ -29,9 +29,16 @@ class LoginLogic extends GetxController {
LoginLogic
()
{
LoginLogic
()
{
groupValue
=
0
.
obs
;
groupValue
=
0
.
obs
;
nameController
.
text
=
'13932316000'
;
nameController
.
text
=
SpHelper
.
getStorage
(
Config
.
SP_STR_USERNAME
)??
''
;
passwordController
.
text
=
SpHelper
.
getStorage
(
Config
.
SP_STR_PASSWORD
)??
''
;
// nameController.text = '13932316000';
// nameController.text = 'ewei';
// nameController.text = 'ewei';
passwordController
.
text
=
'123456'
;
// passwordController.text = '123456';
// nameController.text = '13664793087';
// passwordController.text = 'Abgq3087@';
// nameController.text = '15047917803';
// nameController.text = '15047917803';
// passwordController.text = 'Tpsq7803*';
// passwordController.text = 'Tpsq7803*';
}
}
...
@@ -95,7 +102,7 @@ class LoginLogic extends GetxController {
...
@@ -95,7 +102,7 @@ class LoginLogic extends GetxController {
})
})
..
onError
((
msg
,
code
)
{
..
onError
((
msg
,
code
)
{
// DialogUtils.showWarningDialog('登录失败:$msg');
// DialogUtils.showWarningDialog('登录失败:$msg');
DialogUtils
.
showToast
(
'登录失败'
);
DialogUtils
.
showToast
(
'登录失败
:
$msg
'
);
return
;
return
;
})
})
..
build
();
..
build
();
...
@@ -117,8 +124,8 @@ class LoginLogic extends GetxController {
...
@@ -117,8 +124,8 @@ class LoginLogic extends GetxController {
}
}
await
GlobalService
.
to
.
isar
.
writeTxn
(()
async
=>
{
await
GlobalService
.
to
.
isar
.
writeTxn
(()
async
=>
{
await
GlobalService
.
to
.
isar
.
dictEntitys
.
putAll
(
ListUtils
.
removeNullValues
<
DictEntity
>(
response
)),
await
GlobalService
.
to
.
isar
.
dictEntitys
.
putAll
(
ListUtils
.
removeNullValues
<
DictEntity
>(
response
)),
Get
.
offNamed
(
AppRoute
.
MAIN
),
});
});
Get
.
offNamed
(
AppRoute
.
MAIN
);
})
})
..
onError
((
msg
,
code
)
{
..
onError
((
msg
,
code
)
{
DialogUtils
.
showWarningDialog
(
'获取字典失败:
$msg
'
);
DialogUtils
.
showWarningDialog
(
'获取字典失败:
$msg
'
);
...
...
lib/pages/medical_record/medical_record_list/medical_record_list_view.dart
View file @
733d7006
...
@@ -21,7 +21,10 @@ class MedicalRecordListPage extends StatelessWidget {
...
@@ -21,7 +21,10 @@ class MedicalRecordListPage extends StatelessWidget {
return
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
false
,
resizeToAvoidBottomInset:
false
,
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'诊疗记录'
),
title:
const
Text
(
'诊疗记录'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
actions:
[
actions:
[
...
...
lib/pages/medical_record/medical_record_view.dart
View file @
733d7006
...
@@ -17,7 +17,10 @@ class MedicalRecordPage extends StatelessWidget {
...
@@ -17,7 +17,10 @@ class MedicalRecordPage extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'诊疗记录'
),
title:
const
Text
(
'诊疗记录'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
),
),
...
...
lib/pages/message/message_detail/message_detail_view.dart
View file @
733d7006
...
@@ -12,7 +12,10 @@ class MessageDetailPage extends StatelessWidget {
...
@@ -12,7 +12,10 @@ class MessageDetailPage extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'消息详情'
),
title:
const
Text
(
'消息详情'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
),
),
...
...
lib/pages/message/message_list/message_list_view.dart
View file @
733d7006
...
@@ -14,7 +14,10 @@ class MessageListPage extends StatelessWidget {
...
@@ -14,7 +14,10 @@ class MessageListPage extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'消息列表'
),
title:
const
Text
(
'消息列表'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
),
),
...
...
lib/pages/message/message_view.dart
View file @
733d7006
...
@@ -14,7 +14,10 @@ class MessagePage extends StatelessWidget {
...
@@ -14,7 +14,10 @@ class MessagePage extends StatelessWidget {
logic
.
getListData
();
logic
.
getListData
();
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'生产提醒'
),
title:
const
Text
(
'生产提醒'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
),
),
...
...
lib/pages/mine/mine_view.dart
View file @
733d7006
...
@@ -19,7 +19,10 @@ class MinePage extends StatelessWidget {
...
@@ -19,7 +19,10 @@ class MinePage extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'我的'
),
title:
const
Text
(
'我的'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
centerTitle:
true
,
centerTitle:
true
,
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
),
),
...
...
lib/pages/performance/performance_list/performance_list_view.dart
View file @
733d7006
...
@@ -20,7 +20,10 @@ class PerformanceListPage extends StatelessWidget {
...
@@ -20,7 +20,10 @@ class PerformanceListPage extends StatelessWidget {
return
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
false
,
resizeToAvoidBottomInset:
false
,
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'性能测定列表'
),
title:
const
Text
(
'性能测定列表'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
actions:
[
actions:
[
...
...
lib/pages/performance/performance_view.dart
View file @
733d7006
...
@@ -18,7 +18,12 @@ class PerformancePage extends StatelessWidget {
...
@@ -18,7 +18,12 @@ class PerformancePage extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'性能测定'
),
title:
const
Text
(
'性能测定'
,
style:
TextStyle
(
color:
Colors
.
white
,
),
),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
),
),
...
@@ -240,14 +245,14 @@ class PerformancePage extends StatelessWidget {
...
@@ -240,14 +245,14 @@ class PerformancePage extends StatelessWidget {
width:
10
,
width:
10
,
),
),
getItemView
(
getItemView
(
'
腰角宽
(cm)'
,
'
十字部高
(cm)'
,
(
state
.
entity
.
value
.
waistWidth
??
''
).
toString
(),
(
state
.
entity
.
value
.
crossHeight
??
''
).
toString
(),
()
=>
{
()
=>
{
DialogUtils
.
showInputDialog
(
DialogUtils
.
showInputDialog
(
hintText:
'输入牛只
腰角宽
'
,
hintText:
'输入牛只
十字部高度
'
,
isNum:
true
,
isNum:
true
,
onPositive:
(
text
)
=>
{
onPositive:
(
text
)
=>
{
state
.
entity
.
value
.
waistWidth
=
double
.
tryParse
(
text
??
'0'
),
state
.
entity
.
value
.
crossHeight
=
double
.
tryParse
(
text
??
'0'
),
logic
.
update
(),
logic
.
update
(),
}),
}),
}),
}),
...
@@ -400,13 +405,14 @@ class PerformancePage extends StatelessWidget {
...
@@ -400,13 +405,14 @@ class PerformancePage extends StatelessWidget {
}),
}),
}),
}),
getItemView
(
getItemView
(
'
繁殖成绩
'
,
'
腰角宽(cm)
'
,
state
.
entity
.
value
.
breedRes
??
''
,
(
state
.
entity
.
value
.
waistWidth
??
''
).
toString
()
,
()
=>
{
()
=>
{
DialogUtils
.
showInputDialog
(
DialogUtils
.
showInputDialog
(
hintText:
'输入牛只繁殖成绩'
,
hintText:
'输入牛只腰角宽'
,
isNum:
true
,
onPositive:
(
text
)
=>
{
onPositive:
(
text
)
=>
{
state
.
entity
.
value
.
breedRes
=
text
??
''
,
state
.
entity
.
value
.
waistWidth
=
double
.
tryParse
(
text
??
'0'
)
,
logic
.
update
(),
logic
.
update
(),
}),
}),
}),
}),
...
@@ -458,6 +464,17 @@ class PerformancePage extends StatelessWidget {
...
@@ -458,6 +464,17 @@ class PerformancePage extends StatelessWidget {
const
SizedBox
(
const
SizedBox
(
width:
10
,
width:
10
,
),
),
getItemView
(
'繁殖成绩'
,
state
.
entity
.
value
.
breedRes
??
''
,
()
=>
{
DialogUtils
.
showInputDialog
(
hintText:
'输入牛只繁殖成绩'
,
onPositive:
(
text
)
=>
{
state
.
entity
.
value
.
breedRes
=
text
??
''
,
logic
.
update
(),
}),
}),
getItemView
(
getItemView
(
'备注'
,
'备注'
,
state
.
entity
.
value
.
remark
??
''
,
state
.
entity
.
value
.
remark
??
''
,
...
...
lib/pages/setting/setting_view.dart
View file @
733d7006
...
@@ -18,7 +18,10 @@ class SettingPage extends StatelessWidget {
...
@@ -18,7 +18,10 @@ class SettingPage extends StatelessWidget {
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'设置'
),
title:
const
Text
(
'设置'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
),
),
...
...
lib/pages/sync/sync_logic.dart
View file @
733d7006
...
@@ -34,6 +34,8 @@ class SyncLogic extends GetxController {
...
@@ -34,6 +34,8 @@ class SyncLogic extends GetxController {
if
(
state
.
isCattleResumeCompleteSync
)
{
if
(
state
.
isCattleResumeCompleteSync
)
{
state
.
dataList
[
0
].
count
=
state
.
dataList
[
0
].
count
=
await
GlobalService
.
to
.
isar
.
cattleResumeEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
await
GlobalService
.
to
.
isar
.
cattleResumeEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
state
.
dataList
[
0
].
allCount
=
await
GlobalService
.
to
.
isar
.
cattleResumeEntitys
.
filter
().
uploadStatusEqualTo
(
'1'
).
count
();
state
.
dataList
[
0
].
errorCount
=
state
.
dataList
[
0
].
errorCount
=
await
GlobalService
.
to
.
isar
.
cattleResumeEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
await
GlobalService
.
to
.
isar
.
cattleResumeEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
state
.
dataList
[
0
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_CATTLERESUME_UPDATE_TIME
);
state
.
dataList
[
0
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_CATTLERESUME_UPDATE_TIME
);
...
@@ -42,6 +44,8 @@ class SyncLogic extends GetxController {
...
@@ -42,6 +44,8 @@ class SyncLogic extends GetxController {
if
(
state
.
isPerformanceCompleteSync
)
{
if
(
state
.
isPerformanceCompleteSync
)
{
state
.
dataList
[
1
].
count
=
state
.
dataList
[
1
].
count
=
await
GlobalService
.
to
.
isar
.
performanceEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
await
GlobalService
.
to
.
isar
.
performanceEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
state
.
dataList
[
1
].
allCount
=
await
GlobalService
.
to
.
isar
.
performanceEntitys
.
filter
().
uploadStatusEqualTo
(
'1'
).
count
();
state
.
dataList
[
1
].
errorCount
=
state
.
dataList
[
1
].
errorCount
=
await
GlobalService
.
to
.
isar
.
performanceEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
await
GlobalService
.
to
.
isar
.
performanceEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
state
.
dataList
[
1
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_PERFORMANCE_UPDATE_TIME
);
state
.
dataList
[
1
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_PERFORMANCE_UPDATE_TIME
);
...
@@ -49,6 +53,8 @@ class SyncLogic extends GetxController {
...
@@ -49,6 +53,8 @@ class SyncLogic extends GetxController {
if
(
state
.
isWeightManCompleteSync
)
{
if
(
state
.
isWeightManCompleteSync
)
{
state
.
dataList
[
2
].
count
=
await
GlobalService
.
to
.
isar
.
weightManEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
state
.
dataList
[
2
].
count
=
await
GlobalService
.
to
.
isar
.
weightManEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
state
.
dataList
[
2
].
allCount
=
await
GlobalService
.
to
.
isar
.
weightManEntitys
.
filter
().
uploadStatusEqualTo
(
'1'
).
count
();
state
.
dataList
[
2
].
errorCount
=
state
.
dataList
[
2
].
errorCount
=
await
GlobalService
.
to
.
isar
.
weightManEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
await
GlobalService
.
to
.
isar
.
weightManEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
state
.
dataList
[
2
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_WEIGHT_MAN_UPDATE_TIME
);
state
.
dataList
[
2
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_WEIGHT_MAN_UPDATE_TIME
);
...
@@ -57,6 +63,8 @@ class SyncLogic extends GetxController {
...
@@ -57,6 +63,8 @@ class SyncLogic extends GetxController {
if
(
state
.
isMedicalRecordCompleteSync
)
{
if
(
state
.
isMedicalRecordCompleteSync
)
{
state
.
dataList
[
3
].
count
=
state
.
dataList
[
3
].
count
=
await
GlobalService
.
to
.
isar
.
medicalRecordEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
await
GlobalService
.
to
.
isar
.
medicalRecordEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
state
.
dataList
[
3
].
allCount
=
await
GlobalService
.
to
.
isar
.
medicalRecordEntitys
.
filter
().
uploadStatusEqualTo
(
'1'
).
count
();
state
.
dataList
[
3
].
errorCount
=
state
.
dataList
[
3
].
errorCount
=
await
GlobalService
.
to
.
isar
.
medicalRecordEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
await
GlobalService
.
to
.
isar
.
medicalRecordEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
state
.
dataList
[
3
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_MEDICAL_RECORD_UPDATE_TIME
);
state
.
dataList
[
3
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_MEDICAL_RECORD_UPDATE_TIME
);
...
@@ -65,6 +73,8 @@ class SyncLogic extends GetxController {
...
@@ -65,6 +73,8 @@ class SyncLogic extends GetxController {
if
(
state
.
isImmuneBatchCompleteSync
)
{
if
(
state
.
isImmuneBatchCompleteSync
)
{
state
.
dataList
[
4
].
count
=
state
.
dataList
[
4
].
count
=
await
GlobalService
.
to
.
isar
.
immuneBatchEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
await
GlobalService
.
to
.
isar
.
immuneBatchEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
state
.
dataList
[
4
].
allCount
=
await
GlobalService
.
to
.
isar
.
immuneBatchEntitys
.
filter
().
uploadStatusEqualTo
(
'1'
).
count
();
state
.
dataList
[
4
].
errorCount
=
state
.
dataList
[
4
].
errorCount
=
await
GlobalService
.
to
.
isar
.
immuneBatchEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
await
GlobalService
.
to
.
isar
.
immuneBatchEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
state
.
dataList
[
4
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_IMMUNE_BATCH_UPDATE_TIME
);
state
.
dataList
[
4
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_IMMUNE_BATCH_UPDATE_TIME
);
...
@@ -73,6 +83,8 @@ class SyncLogic extends GetxController {
...
@@ -73,6 +83,8 @@ class SyncLogic extends GetxController {
if
(
state
.
isImmuneBatchDetailCompleteSync
)
{
if
(
state
.
isImmuneBatchDetailCompleteSync
)
{
state
.
dataList
[
5
].
count
=
state
.
dataList
[
5
].
count
=
await
GlobalService
.
to
.
isar
.
immuneBatchDetailEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
await
GlobalService
.
to
.
isar
.
immuneBatchDetailEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
state
.
dataList
[
5
].
allCount
=
await
GlobalService
.
to
.
isar
.
immuneBatchDetailEntitys
.
filter
().
uploadStatusEqualTo
(
'1'
).
count
();
state
.
dataList
[
5
].
errorCount
=
state
.
dataList
[
5
].
errorCount
=
await
GlobalService
.
to
.
isar
.
immuneBatchDetailEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
await
GlobalService
.
to
.
isar
.
immuneBatchDetailEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
state
.
dataList
[
5
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_IMMUNE_BATCH_DETAIL_UPDATE_TIME
);
state
.
dataList
[
5
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_IMMUNE_BATCH_DETAIL_UPDATE_TIME
);
...
@@ -81,6 +93,8 @@ class SyncLogic extends GetxController {
...
@@ -81,6 +93,8 @@ class SyncLogic extends GetxController {
if
(
state
.
isBreedingRecordCompleteSync
)
{
if
(
state
.
isBreedingRecordCompleteSync
)
{
state
.
dataList
[
6
].
count
=
state
.
dataList
[
6
].
count
=
await
GlobalService
.
to
.
isar
.
breedingRecordEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
await
GlobalService
.
to
.
isar
.
breedingRecordEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
state
.
dataList
[
6
].
allCount
=
await
GlobalService
.
to
.
isar
.
breedingRecordEntitys
.
filter
().
uploadStatusEqualTo
(
'1'
).
count
();
state
.
dataList
[
6
].
errorCount
=
state
.
dataList
[
6
].
errorCount
=
await
GlobalService
.
to
.
isar
.
breedingRecordEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
await
GlobalService
.
to
.
isar
.
breedingRecordEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
state
.
dataList
[
6
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_BREEDING_RECORD_UPDATE_TIME
);
state
.
dataList
[
6
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_BREEDING_RECORD_UPDATE_TIME
);
...
@@ -89,19 +103,30 @@ class SyncLogic extends GetxController {
...
@@ -89,19 +103,30 @@ class SyncLogic extends GetxController {
if
(
state
.
isBreedingRecordDetailCompleteSync
)
{
if
(
state
.
isBreedingRecordDetailCompleteSync
)
{
state
.
dataList
[
7
].
count
=
state
.
dataList
[
7
].
count
=
await
GlobalService
.
to
.
isar
.
breedingRecordDetailEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
await
GlobalService
.
to
.
isar
.
breedingRecordDetailEntitys
.
filter
().
uploadStatusEqualTo
(
'0'
).
count
();
state
.
dataList
[
7
].
allCount
=
await
GlobalService
.
to
.
isar
.
breedingRecordDetailEntitys
.
filter
().
uploadStatusEqualTo
(
'1'
).
count
();
state
.
dataList
[
7
].
errorCount
=
state
.
dataList
[
7
].
errorCount
=
await
GlobalService
.
to
.
isar
.
breedingRecordDetailEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
await
GlobalService
.
to
.
isar
.
breedingRecordDetailEntitys
.
filter
().
uploadStatusEqualTo
(
'2'
).
count
();
state
.
dataList
[
7
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_BREEDING_RECORD_DETAIL_UPDATE_TIME
);
state
.
dataList
[
7
].
updateTime
=
SpHelper
.
getStorage
(
Config
.
SP_BREEDING_RECORD_DETAIL_UPDATE_TIME
);
}
}
if
(
state
.
isCattleResumeCompleteSync
&&
if
(
state
.
isPerformanceCompleteSync
&&
state
.
isCattleResumeCompleteSync
state
.
isWeightManCompleteSync
&&
&&
state
.
isMedicalRecordCompleteSync
&&
state
.
isPerformanceCompleteSync
state
.
isImmuneBatchCompleteSync
&&
&&
state
.
isImmuneBatchDetailCompleteSync
&&
state
.
isWeightManCompleteSync
state
.
isBreedingRecordCompleteSync
&&
&&
state
.
isBreedingRecordDetailCompleteSync
)
{
state
.
isMedicalRecordCompleteSync
&&
state
.
isImmuneBatchCompleteSync
&&
state
.
isImmuneBatchDetailCompleteSync
&&
state
.
isBreedingRecordCompleteSync
&&
state
.
isBreedingRecordDetailCompleteSync
)
{
DialogUtils
.
dismissDialog
();
DialogUtils
.
dismissDialog
();
}
}
...
@@ -135,11 +160,12 @@ class SyncLogic extends GetxController {
...
@@ -135,11 +160,12 @@ class SyncLogic extends GetxController {
..
onResponseList
((
list
)
async
{
..
onResponseList
((
list
)
async
{
List
<
String
>
ids
=
[];
List
<
String
>
ids
=
[];
if
(
kDebugMode
)
{
if
(
kDebugMode
)
{
print
(
'接收数量:
${list.length}
'
);
print
(
'接收
基础信息
数量:
${list.length}
'
);
}
}
///保存图片
///保存图片
for
(
var
e
in
list
)
{
for
(
var
e
in
list
)
{
e
!.
uploadStatus
=
'1'
;
ids
.
add
(
e
!.
unid
.
toString
());
ids
.
add
(
e
!.
unid
.
toString
());
if
(
e
.
photo
!=
null
&&
e
.
photo
!.
isNotEmpty
)
{
if
(
e
.
photo
!=
null
&&
e
.
photo
!.
isNotEmpty
)
{
e
.
photoPath
=
await
Base64Utils
.
base64ToFile
(
e
.
photo
!,
e
.
unid
??
''
);
e
.
photoPath
=
await
Base64Utils
.
base64ToFile
(
e
.
photo
!,
e
.
unid
??
''
);
...
@@ -246,10 +272,11 @@ class SyncLogic extends GetxController {
...
@@ -246,10 +272,11 @@ class SyncLogic extends GetxController {
..
onResponseList
((
list
)
async
{
..
onResponseList
((
list
)
async
{
List
<
String
>
ids
=
[];
List
<
String
>
ids
=
[];
if
(
kDebugMode
)
{
if
(
kDebugMode
)
{
print
(
'接收数量:
${list.length}
'
);
print
(
'接收
性能测定
数量:
${list.length}
'
);
}
}
for
(
var
e
in
list
)
{
for
(
var
e
in
list
)
{
e
!.
uploadStatus
=
'1'
;
ids
.
add
(
e
!.
unid
.
toString
());
ids
.
add
(
e
!.
unid
.
toString
());
///保存数据库
///保存数据库
...
@@ -349,6 +376,7 @@ class SyncLogic extends GetxController {
...
@@ -349,6 +376,7 @@ class SyncLogic extends GetxController {
}
}
for
(
var
e
in
list
)
{
for
(
var
e
in
list
)
{
e
!.
uploadStatus
=
'1'
;
ids
.
add
(
e
!.
unid
.
toString
());
ids
.
add
(
e
!.
unid
.
toString
());
///保存数据库
///保存数据库
...
@@ -448,6 +476,7 @@ class SyncLogic extends GetxController {
...
@@ -448,6 +476,7 @@ class SyncLogic extends GetxController {
}
}
for
(
var
e
in
list
)
{
for
(
var
e
in
list
)
{
e
!.
uploadStatus
=
'1'
;
ids
.
add
(
e
!.
unid
.
toString
());
ids
.
add
(
e
!.
unid
.
toString
());
///保存数据库
///保存数据库
...
@@ -547,6 +576,7 @@ class SyncLogic extends GetxController {
...
@@ -547,6 +576,7 @@ class SyncLogic extends GetxController {
}
}
for
(
var
e
in
list
)
{
for
(
var
e
in
list
)
{
e
!.
uploadStatus
=
'1'
;
ids
.
add
(
e
!.
unid
.
toString
());
ids
.
add
(
e
!.
unid
.
toString
());
///保存数据库
///保存数据库
...
@@ -646,6 +676,7 @@ class SyncLogic extends GetxController {
...
@@ -646,6 +676,7 @@ class SyncLogic extends GetxController {
}
}
for
(
var
e
in
list
)
{
for
(
var
e
in
list
)
{
e
!.
uploadStatus
=
'1'
;
ids
.
add
(
e
!.
unid
.
toString
());
ids
.
add
(
e
!.
unid
.
toString
());
///保存数据库
///保存数据库
...
@@ -745,6 +776,7 @@ class SyncLogic extends GetxController {
...
@@ -745,6 +776,7 @@ class SyncLogic extends GetxController {
}
}
for
(
var
e
in
list
)
{
for
(
var
e
in
list
)
{
e
!.
uploadStatus
=
'1'
;
ids
.
add
(
e
!.
unid
.
toString
());
ids
.
add
(
e
!.
unid
.
toString
());
///保存数据库
///保存数据库
...
@@ -844,6 +876,7 @@ class SyncLogic extends GetxController {
...
@@ -844,6 +876,7 @@ class SyncLogic extends GetxController {
}
}
for
(
var
e
in
list
)
{
for
(
var
e
in
list
)
{
e
!.
uploadStatus
=
'1'
;
ids
.
add
(
e
!.
unid
.
toString
());
ids
.
add
(
e
!.
unid
.
toString
());
///保存数据库
///保存数据库
...
...
lib/pages/sync/sync_view.dart
View file @
733d7006
...
@@ -18,7 +18,10 @@ class SyncPage extends StatelessWidget {
...
@@ -18,7 +18,10 @@ class SyncPage extends StatelessWidget {
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'数据同步'
),
title:
const
Text
(
'数据同步'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
actions:
[
actions:
[
...
@@ -84,7 +87,7 @@ class SyncPage extends StatelessWidget {
...
@@ -84,7 +87,7 @@ class SyncPage extends StatelessWidget {
List
<
Widget
>
list
=
[];
List
<
Widget
>
list
=
[];
for
(
int
i
=
0
;
i
<
state
.
dataList
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
state
.
dataList
.
length
;
i
++)
{
list
.
add
(
ListTile
(
list
.
add
(
ListTile
(
title:
Text
(
state
.
dataList
[
i
].
title
),
title:
Text
(
'
${state.dataList[i].title}
-
${state.dataList[i].allCount}
'
),
subtitle:
GetBuilder
<
SyncLogic
>(
builder:
(
logic
)
{
subtitle:
GetBuilder
<
SyncLogic
>(
builder:
(
logic
)
{
return
return
// Text(
// Text(
...
...
lib/pages/weight_man/weight_man_list/weight_man_list_view.dart
View file @
733d7006
...
@@ -22,7 +22,10 @@ class WeightManListPage extends StatelessWidget {
...
@@ -22,7 +22,10 @@ class WeightManListPage extends StatelessWidget {
return
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
false
,
resizeToAvoidBottomInset:
false
,
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'称重记录'
),
title:
const
Text
(
'称重记录'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
actions:
[
actions:
[
...
...
lib/pages/weight_man/weight_man_view.dart
View file @
733d7006
...
@@ -16,7 +16,10 @@ class WeightManPage extends StatelessWidget {
...
@@ -16,7 +16,10 @@ class WeightManPage extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'称重'
),
title:
const
Text
(
'称重'
,
style:
TextStyle
(
color:
Colors
.
white
,
),),
backgroundColor:
Colors
.
blue
,
backgroundColor:
Colors
.
blue
,
centerTitle:
true
,
centerTitle:
true
,
),
),
...
...
lib/routes/pages.dart
View file @
733d7006
import
'package:anchor_collect_flutter/pages/begats_record/begats_record_view.dart'
;
import
'package:anchor_collect_flutter/pages/breeding_record/breeding_record_binding.dart'
;
import
'package:anchor_collect_flutter/pages/breeding_record/breeding_record_binding.dart'
;
import
'package:anchor_collect_flutter/pages/breeding_record/breeding_record_detail/breeding_record_detail_binding.dart'
;
import
'package:anchor_collect_flutter/pages/breeding_record/breeding_record_detail/breeding_record_detail_binding.dart'
;
import
'package:anchor_collect_flutter/pages/breeding_record/breeding_record_detail/breeding_record_detail_view.dart'
;
import
'package:anchor_collect_flutter/pages/breeding_record/breeding_record_detail/breeding_record_detail_view.dart'
;
...
@@ -8,6 +9,8 @@ import 'package:anchor_collect_flutter/pages/immune_batch/immune_batch_binding.d
...
@@ -8,6 +9,8 @@ import 'package:anchor_collect_flutter/pages/immune_batch/immune_batch_binding.d
import
'package:anchor_collect_flutter/pages/immune_batch/immune_batch_list/immune_batch_list_binding.dart'
;
import
'package:anchor_collect_flutter/pages/immune_batch/immune_batch_list/immune_batch_list_binding.dart'
;
import
'package:anchor_collect_flutter/pages/immune_batch/immune_batch_list/immune_batch_list_view.dart'
;
import
'package:anchor_collect_flutter/pages/immune_batch/immune_batch_list/immune_batch_list_view.dart'
;
import
'package:anchor_collect_flutter/pages/immune_batch/immune_batch_view.dart'
;
import
'package:anchor_collect_flutter/pages/immune_batch/immune_batch_view.dart'
;
import
'package:anchor_collect_flutter/pages/like_search_farmer/like_search_farmer_binding.dart'
;
import
'package:anchor_collect_flutter/pages/like_search_farmer/like_search_farmer_view.dart'
;
import
'package:anchor_collect_flutter/pages/main/main_binding.dart'
;
import
'package:anchor_collect_flutter/pages/main/main_binding.dart'
;
import
'package:anchor_collect_flutter/pages/main/main_view.dart'
;
import
'package:anchor_collect_flutter/pages/main/main_view.dart'
;
import
'package:anchor_collect_flutter/pages/medical_record/medical_record_binding.dart'
;
import
'package:anchor_collect_flutter/pages/medical_record/medical_record_binding.dart'
;
...
@@ -28,6 +31,7 @@ import 'package:anchor_collect_flutter/pages/weight_man/weight_man_list/weight_m
...
@@ -28,6 +31,7 @@ import 'package:anchor_collect_flutter/pages/weight_man/weight_man_list/weight_m
import
'package:anchor_collect_flutter/pages/weight_man/weight_man_list/weight_man_list_view.dart'
;
import
'package:anchor_collect_flutter/pages/weight_man/weight_man_list/weight_man_list_view.dart'
;
import
'package:anchor_collect_flutter/pages/weight_man/weight_man_view.dart'
;
import
'package:anchor_collect_flutter/pages/weight_man/weight_man_view.dart'
;
import
'package:get/get.dart'
;
import
'package:get/get.dart'
;
import
'../pages/begats_record/begats_record_binding.dart'
;
import
'../pages/camera/camera_binding.dart'
;
import
'../pages/camera/camera_binding.dart'
;
import
'../pages/camera/camera_view.dart'
;
import
'../pages/camera/camera_view.dart'
;
import
'../pages/cattle_resume/cattle_resume_binding.dart'
;
import
'../pages/cattle_resume/cattle_resume_binding.dart'
;
...
@@ -99,6 +103,11 @@ abstract class AppPages {
...
@@ -99,6 +103,11 @@ abstract class AppPages {
page:
()
=>
CattleResumePage
(),
page:
()
=>
CattleResumePage
(),
binding:
CattleResumeBinding
(),
binding:
CattleResumeBinding
(),
),
),
GetPage
(
name:
AppRoute
.
BEGATS_RECORD
,
page:
()
=>
BegatsRecordPage
(),
binding:
BegatsRecordBinding
(),
),
GetPage
(
GetPage
(
name:
AppRoute
.
PERFORMANCE_LIST
,
name:
AppRoute
.
PERFORMANCE_LIST
,
page:
()
=>
PerformanceListPage
(),
page:
()
=>
PerformanceListPage
(),
...
@@ -164,5 +173,10 @@ abstract class AppPages {
...
@@ -164,5 +173,10 @@ abstract class AppPages {
page:
()
=>
SettingPage
(),
page:
()
=>
SettingPage
(),
binding:
SettingBinding
(),
binding:
SettingBinding
(),
),
),
GetPage
(
name:
AppRoute
.
LIKE_SEARCH_FARMER
,
page:
()
=>
LikeSearchFarmerPage
(),
binding:
LikeSearchFarmerBinding
(),
),
];
];
}
}
lib/routes/routes.dart
View file @
733d7006
...
@@ -29,6 +29,9 @@ abstract class AppRoute {
...
@@ -29,6 +29,9 @@ abstract class AppRoute {
/// 基础信息
/// 基础信息
static
const
CATTLE_RESUME
=
'/cattle/resume'
;
static
const
CATTLE_RESUME
=
'/cattle/resume'
;
/// 系谱
static
const
BEGATS_RECORD
=
'/begats/record'
;
/// 性能测定列表
/// 性能测定列表
static
const
PERFORMANCE_LIST
=
'/performance/list'
;
static
const
PERFORMANCE_LIST
=
'/performance/list'
;
...
@@ -65,6 +68,9 @@ abstract class AppRoute {
...
@@ -65,6 +68,9 @@ abstract class AppRoute {
/// 照相机
/// 照相机
static
const
CAMERA
=
'/camera'
;
static
const
CAMERA
=
'/camera'
;
/// 模糊查询牧户
static
const
LIKE_SEARCH_FARMER
=
'/like/search/farmer'
;
/// 设置
/// 设置
static
const
SETTING
=
'/setting'
;
static
const
SETTING
=
'/setting'
;
}
}
lib/utils/base64_utils.dart
View file @
733d7006
...
@@ -23,7 +23,7 @@ class Base64Utils {
...
@@ -23,7 +23,7 @@ class Base64Utils {
try
{
try
{
Uint8List
bytes
=
base64
.
decode
(
photo
);
Uint8List
bytes
=
base64
.
decode
(
photo
);
String
fullPath
=
StorageUtils
.
getPath
(
unid
??
''
);
String
fullPath
=
StorageUtils
.
getPath
(
unid
??
''
);
print
(
"local file full path
${fullPath}
"
);
//
print("local file full path ${fullPath}");
File
file
=
File
(
fullPath
);
File
file
=
File
(
fullPath
);
await
file
.
writeAsBytes
(
bytes
);
await
file
.
writeAsBytes
(
bytes
);
}
catch
(
e
)
{
}
catch
(
e
)
{
...
...
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