|
@@ -33,7 +33,8 @@ class BreedSubmitApi {
|
|
|
};
|
|
};
|
|
|
}).toList();
|
|
}).toList();
|
|
|
ResultModel result = ResultModel.offline();
|
|
ResultModel result = ResultModel.offline();
|
|
|
- if (!AppConfig.isOffline) {
|
|
|
|
|
|
|
+ if (!AppConfig.isOffline &&
|
|
|
|
|
+ await _breedingDataService.queryCount(TableConfig.chicken) == 0) {
|
|
|
result = await ApiService().post(
|
|
result = await ApiService().post(
|
|
|
bindChickenUrl,
|
|
bindChickenUrl,
|
|
|
data: list,
|
|
data: list,
|
|
@@ -65,7 +66,8 @@ class BreedSubmitApi {
|
|
|
};
|
|
};
|
|
|
}).toList();
|
|
}).toList();
|
|
|
ResultModel result = ResultModel.offline();
|
|
ResultModel result = ResultModel.offline();
|
|
|
- if (!AppConfig.isOffline) {
|
|
|
|
|
|
|
+ if (!AppConfig.isOffline &&
|
|
|
|
|
+ await _breedingDataService.queryCount(TableConfig.chicken) == 0) {
|
|
|
result = await ApiService().post(
|
|
result = await ApiService().post(
|
|
|
cageChangeUrl,
|
|
cageChangeUrl,
|
|
|
data: list,
|
|
data: list,
|
|
@@ -94,7 +96,8 @@ class BreedSubmitApi {
|
|
|
'is_export': 0,
|
|
'is_export': 0,
|
|
|
};
|
|
};
|
|
|
ResultModel result = ResultModel.offline();
|
|
ResultModel result = ResultModel.offline();
|
|
|
- if (!AppConfig.isOffline) {
|
|
|
|
|
|
|
+ if (!AppConfig.isOffline &&
|
|
|
|
|
+ await _breedingDataService.queryCount(TableConfig.chicken) == 0) {
|
|
|
result = await ApiService().post(
|
|
result = await ApiService().post(
|
|
|
weightUrl,
|
|
weightUrl,
|
|
|
data: weightData,
|
|
data: weightData,
|
|
@@ -126,7 +129,8 @@ class BreedSubmitApi {
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
|
ResultModel result = ResultModel.offline();
|
|
ResultModel result = ResultModel.offline();
|
|
|
- if (!AppConfig.isOffline) {
|
|
|
|
|
|
|
+ if (!AppConfig.isOffline &&
|
|
|
|
|
+ await _breedingDataService.queryCount(TableConfig.chicken) == 0) {
|
|
|
result = await ApiService().post(
|
|
result = await ApiService().post(
|
|
|
cullUrl,
|
|
cullUrl,
|
|
|
data: list,
|
|
data: list,
|
|
@@ -156,7 +160,8 @@ class BreedSubmitApi {
|
|
|
};
|
|
};
|
|
|
}).toList();
|
|
}).toList();
|
|
|
ResultModel result = ResultModel.offline();
|
|
ResultModel result = ResultModel.offline();
|
|
|
- if (!AppConfig.isOffline) {
|
|
|
|
|
|
|
+ if (!AppConfig.isOffline &&
|
|
|
|
|
+ await _breedingDataService.queryCount(TableConfig.chicken) == 0) {
|
|
|
result = await ApiService().post(
|
|
result = await ApiService().post(
|
|
|
cullUrl,
|
|
cullUrl,
|
|
|
data: list,
|
|
data: list,
|