feat: warehouse_and_distribution in killhouse module

This commit is contained in:
2025-12-01 15:25:19 +03:30
parent 6861e873ba
commit c42ee069e6
57 changed files with 11246 additions and 208 deletions

View File

@@ -27,9 +27,14 @@ import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_ar
import 'package:rasadyar_core/core.dart';
abstract class ChickenRemoteDatasource {
Future<List<InventoryModel>?> getInventory({required String token, CancelToken? cancelToken});
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({required String token});
Future<List<InventoryModel>?> getInventory({
required String token,
required String role,
CancelToken? cancelToken,
});
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
required String token,
});
Future<BarInformation?> getGeneralBarInformation({
required String token,
@@ -41,7 +46,10 @@ abstract class ChickenRemoteDatasource {
Map<String, dynamic>? queryParameters,
});
Future<void> setSateForArrivals({required String token, required Map<String, dynamic> request});
Future<void> setSateForArrivals({
required String token,
required Map<String, dynamic> request,
});
Future<PaginationModel<ImportedLoadsModel>?> getImportedLoadsModel({
required String token,
@@ -53,9 +61,15 @@ abstract class ChickenRemoteDatasource {
Map<String, dynamic>? queryParameters,
});
Future<void> confirmAllocation({required String token, required Map<String, dynamic> allocation});
Future<void> confirmAllocation({
required String token,
required Map<String, dynamic> allocation,
});
Future<void> denyAllocation({required String token, required String allocationToken});
Future<void> denyAllocation({
required String token,
required String allocationToken,
});
Future<void> confirmAllAllocation({
required String token,
@@ -81,7 +95,10 @@ abstract class ChickenRemoteDatasource {
Map<String, dynamic>? queryParameters,
});
Future<void> updateStewardAllocation({required String token, required ConformAllocation request});
Future<void> updateStewardAllocation({
required String token,
required ConformAllocation request,
});
Future<StewardFreeBarDashboard?> getStewardDashboard({
required String token,
@@ -95,7 +112,8 @@ abstract class ChickenRemoteDatasource {
required String endDate,
});
Future<PaginationModel<StewardFreeBar>?> getStewardPurchasesOutSideOfTheProvince({
Future<PaginationModel<StewardFreeBar>?>
getStewardPurchasesOutSideOfTheProvince({
required String token,
Map<String, dynamic>? queryParameters,
});
@@ -115,8 +133,8 @@ abstract class ChickenRemoteDatasource {
Map<String, dynamic>? queryParameters,
});
Future<PaginationModel<OutProvinceCarcassesBuyer>?> getOutProvinceCarcassesBuyer({
Future<PaginationModel<OutProvinceCarcassesBuyer>?>
getOutProvinceCarcassesBuyer({
required String token,
Map<String, dynamic>? queryParameters,
});
@@ -145,29 +163,42 @@ abstract class ChickenRemoteDatasource {
required StewardFreeSaleBarRequest body,
});
Future<void> deleteOutProvinceStewardFreeBar({
required String token,
required String key
required String key,
});
Future<UserProfile?> getUserProfile({required String token});
Future<void> updateUserProfile({required String token, required UserProfile userProfile});
Future<void> updateUserProfile({
required String token,
required UserProfile userProfile,
});
Future<void> updatePassword({required String token, required ChangePasswordRequestModel model});
Future<void> updatePassword({
required String token,
required ChangePasswordRequestModel model,
});
Future<PaginationModel<SegmentationModel>?> getSegmentation({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<void> createSegmentation({required String token, required SegmentationModel model});
Future<void> createSegmentation({
required String token,
required SegmentationModel model,
});
Future<void> editSegmentation({required String token, required SegmentationModel model});
Future<void> editSegmentation({
required String token,
required SegmentationModel model,
});
Future<SegmentationModel?> deleteSegmentation({required String token, required String key});
Future<SegmentationModel?> deleteSegmentation({
required String token,
required String key,
});
Future<BroadcastPrice?> getBroadcastPrice({required String token});

View File

@@ -36,21 +36,25 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
@override
Future<List<InventoryModel>?> getInventory({
required String token,
required String role,
CancelToken? cancelToken,
}) async {
var res = await _httpClient.get(
'/roles-products/?role=Steward',
'/roles-products/?role=$role',
headers: {'Authorization': 'Bearer $token'},
fromJsonList: (json) =>
(json).map((item) => InventoryModel.fromJson(item as Map<String, dynamic>)).toList(),
fromJsonList: (json) => (json)
.map((item) => InventoryModel.fromJson(item as Map<String, dynamic>))
.toList(),
);
return res.data;
}
@override
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({required String token}) async {
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
required String token,
}) async {
var res = await _httpClient.get(
'/kill-house-distribution-info/?role=Steward',
headers: {'Authorization': 'Bearer $token'},
@@ -150,7 +154,10 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
}
@override
Future<void> denyAllocation({required String token, required String allocationToken}) async {
Future<void> denyAllocation({
required String token,
required String allocationToken,
}) async {
await _httpClient.delete(
'/steward-allocation/0/?steward_allocation_key=$allocationToken',
headers: {'Authorization': 'Bearer $token'},
@@ -174,8 +181,9 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
var res = await _httpClient.get(
'/roles-products/?role=Steward',
headers: {'Authorization': 'Bearer $token'},
fromJsonList: (json) =>
json.map((item) => ProductModel.fromJson(item as Map<String, dynamic>)).toList(),
fromJsonList: (json) => json
.map((item) => ProductModel.fromJson(item as Map<String, dynamic>))
.toList(),
);
return res.data;
}
@@ -189,8 +197,9 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
'/guilds/',
queryParameters: queryParameters,
headers: {'Authorization': 'Bearer $token'},
fromJsonList: (json) =>
json.map((item) => GuildModel.fromJson(item as Map<String, dynamic>)).toList(),
fromJsonList: (json) => json
.map((item) => GuildModel.fromJson(item as Map<String, dynamic>))
.toList(),
);
return res.data;
}
@@ -270,7 +279,8 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
}
@override
Future<PaginationModel<StewardFreeBar>?> getStewardPurchasesOutSideOfTheProvince({
Future<PaginationModel<StewardFreeBar>?>
getStewardPurchasesOutSideOfTheProvince({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
@@ -287,22 +297,34 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
}
@override
Future<List<IranProvinceCityModel>?> getCity({required String provinceName}) async {
Future<List<IranProvinceCityModel>?> getCity({
required String provinceName,
}) async {
var res = await _httpClient.get(
'/iran_city/',
queryParameters: {'name': provinceName},
fromJsonList: (json) =>
json.map((item) => IranProvinceCityModel.fromJson(item as Map<String, dynamic>)).toList(),
fromJsonList: (json) => json
.map(
(item) =>
IranProvinceCityModel.fromJson(item as Map<String, dynamic>),
)
.toList(),
);
return res.data;
}
@override
Future<List<IranProvinceCityModel>?> getProvince({CancelToken? cancelToken}) async {
Future<List<IranProvinceCityModel>?> getProvince({
CancelToken? cancelToken,
}) async {
var res = await _httpClient.get(
'/iran_province/',
fromJsonList: (json) =>
json.map((item) => IranProvinceCityModel.fromJson(item as Map<String, dynamic>)).toList(),
fromJsonList: (json) => json
.map(
(item) =>
IranProvinceCityModel.fromJson(item as Map<String, dynamic>),
)
.toList(),
);
return res.data;
}
@@ -315,7 +337,7 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
await _httpClient.post(
'/steward_free_bar/',
headers: {'Authorization': 'Bearer $token'},
data: body.toJson()..removeWhere((key, value) => value==null,),
data: body.toJson()..removeWhere((key, value) => value == null),
);
}
@@ -346,7 +368,8 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
}
@override
Future<PaginationModel<OutProvinceCarcassesBuyer>?> getOutProvinceCarcassesBuyer({
Future<PaginationModel<OutProvinceCarcassesBuyer>?>
getOutProvinceCarcassesBuyer({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
@@ -356,7 +379,8 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
headers: {'Authorization': 'Bearer $token'},
fromJson: (json) => PaginationModel<OutProvinceCarcassesBuyer>.fromJson(
json,
(json) => OutProvinceCarcassesBuyer.fromJson(json as Map<String, dynamic>),
(json) =>
OutProvinceCarcassesBuyer.fromJson(json as Map<String, dynamic>),
),
);
return res.data;
@@ -412,13 +436,19 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
'/steward_free_sale_bar/0/',
data: body.toJson()
..removeWhere((key, value) => value == null)
..addAll({'carcassWeight': body.weightOfCarcasses, 'carcassCount': body.numberOfCarcasses}),
..addAll({
'carcassWeight': body.weightOfCarcasses,
'carcassCount': body.numberOfCarcasses,
}),
headers: {'Authorization': 'Bearer $token'},
);
}
@override
Future<void> deleteOutProvinceStewardFreeBar({required String token, required String key}) async {
Future<void> deleteOutProvinceStewardFreeBar({
required String token,
required String key,
}) async {
await _httpClient.delete(
'/steward_free_sale_bar/0/',
queryParameters: {'key': key},
@@ -438,7 +468,10 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
}
@override
Future<void> updateUserProfile({required String token, required UserProfile userProfile}) async {
Future<void> updateUserProfile({
required String token,
required UserProfile userProfile,
}) async {
await _httpClient.put(
'/system_user_profile/0/',
headers: {'Authorization': 'Bearer $token'},
@@ -476,7 +509,10 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
}
@override
Future<void> createSegmentation({required String token, required SegmentationModel model}) async {
Future<void> createSegmentation({
required String token,
required SegmentationModel model,
}) async {
await _httpClient.post(
'/app-segmentation/',
data: model.toJson()..removeWhere((key, value) => value == null),
@@ -485,7 +521,10 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
}
@override
Future<void> editSegmentation({required String token, required SegmentationModel model}) async {
Future<void> editSegmentation({
required String token,
required SegmentationModel model,
}) async {
await _httpClient.put(
'/app-segmentation/0/',
data: model.toJson()..removeWhere((key, value) => value == null),
@@ -536,7 +575,9 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
}
@override
Future<StewardRemainWeight?> getStewardRemainWeight({required String token}) async {
Future<StewardRemainWeight?> getStewardRemainWeight({
required String token,
}) async {
var res = await _httpClient.get(
'/steward-remain-weight/',
headers: {'Authorization': 'Bearer $token'},
@@ -545,4 +586,5 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
return res.data;
}
}

View File

@@ -2,8 +2,12 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_house/kill_house_response.dart';
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
as listModel;
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
import 'package:rasadyar_core/core.dart';
abstract class KillHouseRemoteDataSource {
//region requestKill
Future<List<KillHouseResponse>?> getKillHouseList({
required String token,
Map<String, dynamic>? queryParameters,
@@ -22,4 +26,21 @@ abstract class KillHouseRemoteDataSource {
});
Future<void> deleteKillRequest({required String token, required int requestId});
//endregion
//region warehouseAndDistribution
Future<KillHouseSalesInfoDashboard?> getKillHouseSalesInfoDashboard({
required String token,
CancelToken? cancelToken,
Map<String, dynamic>? queryParameters,
});
//endregion
}

View File

@@ -3,6 +3,7 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_house/kill_house_response.dart';
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
as listModel;
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
import 'package:rasadyar_core/core.dart';
class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
@@ -20,7 +21,9 @@ class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
headers: {'Authorization': 'Bearer $token'},
fromJson: (json) {
var data = json['results'] as List<dynamic>;
return ChickenCommissionPrices.fromJson(data.first as Map<String, dynamic>);
return ChickenCommissionPrices.fromJson(
data.first as Map<String, dynamic>,
);
},
);
@@ -35,8 +38,9 @@ class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
var res = await _httpClient.get(
'/kill_house/?kill_house',
headers: {'Authorization': 'Bearer $token'},
fromJsonList: (json) =>
json.map((e) => KillHouseResponse.fromJson(e as Map<String, dynamic>)).toList(),
fromJsonList: (json) => json
.map((e) => KillHouseResponse.fromJson(e as Map<String, dynamic>))
.toList(),
);
return res.data;
@@ -63,18 +67,47 @@ class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
'/kill_request/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJsonList: (json) =>
json.map((e) => listModel.KillRequestList.fromJson(e as Map<String, dynamic>)).toList(),
fromJsonList: (json) => json
.map(
(e) =>
listModel.KillRequestList.fromJson(e as Map<String, dynamic>),
)
.toList(),
);
return res.data;
}
@override
Future<void> deleteKillRequest({required String token, required int requestId}) async {
Future<void> deleteKillRequest({
required String token,
required int requestId,
}) async {
await _httpClient.delete(
'/kill_request/$requestId/',
headers: {'Authorization': 'Bearer $token'},
);
}
//endregion
//region warehouseAndDistribution
@override
Future<KillHouseSalesInfoDashboard?> getKillHouseSalesInfoDashboard({
required String token,
CancelToken? cancelToken,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/kill-house-sales-info-dashboard/?role=KillHouse',
cancelToken: cancelToken,
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJson: KillHouseSalesInfoDashboard.fromJson,
);
return res.data;
}
//endregion
}

View File

@@ -0,0 +1,35 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'kill_house_sales_info_dashboard.freezed.dart';
part 'kill_house_sales_info_dashboard.g.dart';
@freezed
abstract class KillHouseSalesInfoDashboard with _$KillHouseSalesInfoDashboard {
const factory KillHouseSalesInfoDashboard({
double? totalGovernmentalInputWeight,
double? totalFreeInputWeight,
double? totalGovernmentalOutputWeight,
double? totalFreeOutputWeight,
double? totalGovernmentalRemainWeight,
double? totalFreeRemainWeight,
@JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight')
double? totalKillHouseFreeSaleBarCarcassesWeight,
double? totalKillHouseAllocationsWeight,
double? segmentationsWeight,
double? coldHouseAllocationsWeight,
double? totalSellingInProvinceGovernmentalWeight,
double? totalSellingInProvinceFreeWeight,
double? totalCommitmentSellingInProvinceGovernmentalWeight,
double? totalCommitmentSellingInProvinceGovernmentalRemainWeight,
double? totalCommitmentSellingInProvinceFreeWeight,
double? totalCommitmentSellingInProvinceFreeRemainWeight,
double? posAllocatedWeight,
double? posGovernmentalAllocatedWeight,
double? posFreeAllocatedWeight,
double? wareHouseArchiveGovernmentalWeight,
double? wareHouseArchiveFreeWeight,
}) = _KillHouseSalesInfoDashboard;
factory KillHouseSalesInfoDashboard.fromJson(Map<String, dynamic> json) =>
_$KillHouseSalesInfoDashboardFromJson(json);
}

View File

@@ -0,0 +1,337 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'kill_house_sales_info_dashboard.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$KillHouseSalesInfoDashboard {
double? get totalGovernmentalInputWeight; double? get totalFreeInputWeight; double? get totalGovernmentalOutputWeight; double? get totalFreeOutputWeight; double? get totalGovernmentalRemainWeight; double? get totalFreeRemainWeight;@JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') double? get totalKillHouseFreeSaleBarCarcassesWeight; double? get totalKillHouseAllocationsWeight; double? get segmentationsWeight; double? get coldHouseAllocationsWeight; double? get totalSellingInProvinceGovernmentalWeight; double? get totalSellingInProvinceFreeWeight; double? get totalCommitmentSellingInProvinceGovernmentalWeight; double? get totalCommitmentSellingInProvinceGovernmentalRemainWeight; double? get totalCommitmentSellingInProvinceFreeWeight; double? get totalCommitmentSellingInProvinceFreeRemainWeight; double? get posAllocatedWeight; double? get posGovernmentalAllocatedWeight; double? get posFreeAllocatedWeight; double? get wareHouseArchiveGovernmentalWeight; double? get wareHouseArchiveFreeWeight;
/// Create a copy of KillHouseSalesInfoDashboard
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$KillHouseSalesInfoDashboardCopyWith<KillHouseSalesInfoDashboard> get copyWith => _$KillHouseSalesInfoDashboardCopyWithImpl<KillHouseSalesInfoDashboard>(this as KillHouseSalesInfoDashboard, _$identity);
/// Serializes this KillHouseSalesInfoDashboard to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is KillHouseSalesInfoDashboard&&(identical(other.totalGovernmentalInputWeight, totalGovernmentalInputWeight) || other.totalGovernmentalInputWeight == totalGovernmentalInputWeight)&&(identical(other.totalFreeInputWeight, totalFreeInputWeight) || other.totalFreeInputWeight == totalFreeInputWeight)&&(identical(other.totalGovernmentalOutputWeight, totalGovernmentalOutputWeight) || other.totalGovernmentalOutputWeight == totalGovernmentalOutputWeight)&&(identical(other.totalFreeOutputWeight, totalFreeOutputWeight) || other.totalFreeOutputWeight == totalFreeOutputWeight)&&(identical(other.totalGovernmentalRemainWeight, totalGovernmentalRemainWeight) || other.totalGovernmentalRemainWeight == totalGovernmentalRemainWeight)&&(identical(other.totalFreeRemainWeight, totalFreeRemainWeight) || other.totalFreeRemainWeight == totalFreeRemainWeight)&&(identical(other.totalKillHouseFreeSaleBarCarcassesWeight, totalKillHouseFreeSaleBarCarcassesWeight) || other.totalKillHouseFreeSaleBarCarcassesWeight == totalKillHouseFreeSaleBarCarcassesWeight)&&(identical(other.totalKillHouseAllocationsWeight, totalKillHouseAllocationsWeight) || other.totalKillHouseAllocationsWeight == totalKillHouseAllocationsWeight)&&(identical(other.segmentationsWeight, segmentationsWeight) || other.segmentationsWeight == segmentationsWeight)&&(identical(other.coldHouseAllocationsWeight, coldHouseAllocationsWeight) || other.coldHouseAllocationsWeight == coldHouseAllocationsWeight)&&(identical(other.totalSellingInProvinceGovernmentalWeight, totalSellingInProvinceGovernmentalWeight) || other.totalSellingInProvinceGovernmentalWeight == totalSellingInProvinceGovernmentalWeight)&&(identical(other.totalSellingInProvinceFreeWeight, totalSellingInProvinceFreeWeight) || other.totalSellingInProvinceFreeWeight == totalSellingInProvinceFreeWeight)&&(identical(other.totalCommitmentSellingInProvinceGovernmentalWeight, totalCommitmentSellingInProvinceGovernmentalWeight) || other.totalCommitmentSellingInProvinceGovernmentalWeight == totalCommitmentSellingInProvinceGovernmentalWeight)&&(identical(other.totalCommitmentSellingInProvinceGovernmentalRemainWeight, totalCommitmentSellingInProvinceGovernmentalRemainWeight) || other.totalCommitmentSellingInProvinceGovernmentalRemainWeight == totalCommitmentSellingInProvinceGovernmentalRemainWeight)&&(identical(other.totalCommitmentSellingInProvinceFreeWeight, totalCommitmentSellingInProvinceFreeWeight) || other.totalCommitmentSellingInProvinceFreeWeight == totalCommitmentSellingInProvinceFreeWeight)&&(identical(other.totalCommitmentSellingInProvinceFreeRemainWeight, totalCommitmentSellingInProvinceFreeRemainWeight) || other.totalCommitmentSellingInProvinceFreeRemainWeight == totalCommitmentSellingInProvinceFreeRemainWeight)&&(identical(other.posAllocatedWeight, posAllocatedWeight) || other.posAllocatedWeight == posAllocatedWeight)&&(identical(other.posGovernmentalAllocatedWeight, posGovernmentalAllocatedWeight) || other.posGovernmentalAllocatedWeight == posGovernmentalAllocatedWeight)&&(identical(other.posFreeAllocatedWeight, posFreeAllocatedWeight) || other.posFreeAllocatedWeight == posFreeAllocatedWeight)&&(identical(other.wareHouseArchiveGovernmentalWeight, wareHouseArchiveGovernmentalWeight) || other.wareHouseArchiveGovernmentalWeight == wareHouseArchiveGovernmentalWeight)&&(identical(other.wareHouseArchiveFreeWeight, wareHouseArchiveFreeWeight) || other.wareHouseArchiveFreeWeight == wareHouseArchiveFreeWeight));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([runtimeType,totalGovernmentalInputWeight,totalFreeInputWeight,totalGovernmentalOutputWeight,totalFreeOutputWeight,totalGovernmentalRemainWeight,totalFreeRemainWeight,totalKillHouseFreeSaleBarCarcassesWeight,totalKillHouseAllocationsWeight,segmentationsWeight,coldHouseAllocationsWeight,totalSellingInProvinceGovernmentalWeight,totalSellingInProvinceFreeWeight,totalCommitmentSellingInProvinceGovernmentalWeight,totalCommitmentSellingInProvinceGovernmentalRemainWeight,totalCommitmentSellingInProvinceFreeWeight,totalCommitmentSellingInProvinceFreeRemainWeight,posAllocatedWeight,posGovernmentalAllocatedWeight,posFreeAllocatedWeight,wareHouseArchiveGovernmentalWeight,wareHouseArchiveFreeWeight]);
@override
String toString() {
return 'KillHouseSalesInfoDashboard(totalGovernmentalInputWeight: $totalGovernmentalInputWeight, totalFreeInputWeight: $totalFreeInputWeight, totalGovernmentalOutputWeight: $totalGovernmentalOutputWeight, totalFreeOutputWeight: $totalFreeOutputWeight, totalGovernmentalRemainWeight: $totalGovernmentalRemainWeight, totalFreeRemainWeight: $totalFreeRemainWeight, totalKillHouseFreeSaleBarCarcassesWeight: $totalKillHouseFreeSaleBarCarcassesWeight, totalKillHouseAllocationsWeight: $totalKillHouseAllocationsWeight, segmentationsWeight: $segmentationsWeight, coldHouseAllocationsWeight: $coldHouseAllocationsWeight, totalSellingInProvinceGovernmentalWeight: $totalSellingInProvinceGovernmentalWeight, totalSellingInProvinceFreeWeight: $totalSellingInProvinceFreeWeight, totalCommitmentSellingInProvinceGovernmentalWeight: $totalCommitmentSellingInProvinceGovernmentalWeight, totalCommitmentSellingInProvinceGovernmentalRemainWeight: $totalCommitmentSellingInProvinceGovernmentalRemainWeight, totalCommitmentSellingInProvinceFreeWeight: $totalCommitmentSellingInProvinceFreeWeight, totalCommitmentSellingInProvinceFreeRemainWeight: $totalCommitmentSellingInProvinceFreeRemainWeight, posAllocatedWeight: $posAllocatedWeight, posGovernmentalAllocatedWeight: $posGovernmentalAllocatedWeight, posFreeAllocatedWeight: $posFreeAllocatedWeight, wareHouseArchiveGovernmentalWeight: $wareHouseArchiveGovernmentalWeight, wareHouseArchiveFreeWeight: $wareHouseArchiveFreeWeight)';
}
}
/// @nodoc
abstract mixin class $KillHouseSalesInfoDashboardCopyWith<$Res> {
factory $KillHouseSalesInfoDashboardCopyWith(KillHouseSalesInfoDashboard value, $Res Function(KillHouseSalesInfoDashboard) _then) = _$KillHouseSalesInfoDashboardCopyWithImpl;
@useResult
$Res call({
double? totalGovernmentalInputWeight, double? totalFreeInputWeight, double? totalGovernmentalOutputWeight, double? totalFreeOutputWeight, double? totalGovernmentalRemainWeight, double? totalFreeRemainWeight,@JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') double? totalKillHouseFreeSaleBarCarcassesWeight, double? totalKillHouseAllocationsWeight, double? segmentationsWeight, double? coldHouseAllocationsWeight, double? totalSellingInProvinceGovernmentalWeight, double? totalSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceGovernmentalWeight, double? totalCommitmentSellingInProvinceGovernmentalRemainWeight, double? totalCommitmentSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceFreeRemainWeight, double? posAllocatedWeight, double? posGovernmentalAllocatedWeight, double? posFreeAllocatedWeight, double? wareHouseArchiveGovernmentalWeight, double? wareHouseArchiveFreeWeight
});
}
/// @nodoc
class _$KillHouseSalesInfoDashboardCopyWithImpl<$Res>
implements $KillHouseSalesInfoDashboardCopyWith<$Res> {
_$KillHouseSalesInfoDashboardCopyWithImpl(this._self, this._then);
final KillHouseSalesInfoDashboard _self;
final $Res Function(KillHouseSalesInfoDashboard) _then;
/// Create a copy of KillHouseSalesInfoDashboard
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? totalGovernmentalInputWeight = freezed,Object? totalFreeInputWeight = freezed,Object? totalGovernmentalOutputWeight = freezed,Object? totalFreeOutputWeight = freezed,Object? totalGovernmentalRemainWeight = freezed,Object? totalFreeRemainWeight = freezed,Object? totalKillHouseFreeSaleBarCarcassesWeight = freezed,Object? totalKillHouseAllocationsWeight = freezed,Object? segmentationsWeight = freezed,Object? coldHouseAllocationsWeight = freezed,Object? totalSellingInProvinceGovernmentalWeight = freezed,Object? totalSellingInProvinceFreeWeight = freezed,Object? totalCommitmentSellingInProvinceGovernmentalWeight = freezed,Object? totalCommitmentSellingInProvinceGovernmentalRemainWeight = freezed,Object? totalCommitmentSellingInProvinceFreeWeight = freezed,Object? totalCommitmentSellingInProvinceFreeRemainWeight = freezed,Object? posAllocatedWeight = freezed,Object? posGovernmentalAllocatedWeight = freezed,Object? posFreeAllocatedWeight = freezed,Object? wareHouseArchiveGovernmentalWeight = freezed,Object? wareHouseArchiveFreeWeight = freezed,}) {
return _then(_self.copyWith(
totalGovernmentalInputWeight: freezed == totalGovernmentalInputWeight ? _self.totalGovernmentalInputWeight : totalGovernmentalInputWeight // ignore: cast_nullable_to_non_nullable
as double?,totalFreeInputWeight: freezed == totalFreeInputWeight ? _self.totalFreeInputWeight : totalFreeInputWeight // ignore: cast_nullable_to_non_nullable
as double?,totalGovernmentalOutputWeight: freezed == totalGovernmentalOutputWeight ? _self.totalGovernmentalOutputWeight : totalGovernmentalOutputWeight // ignore: cast_nullable_to_non_nullable
as double?,totalFreeOutputWeight: freezed == totalFreeOutputWeight ? _self.totalFreeOutputWeight : totalFreeOutputWeight // ignore: cast_nullable_to_non_nullable
as double?,totalGovernmentalRemainWeight: freezed == totalGovernmentalRemainWeight ? _self.totalGovernmentalRemainWeight : totalGovernmentalRemainWeight // ignore: cast_nullable_to_non_nullable
as double?,totalFreeRemainWeight: freezed == totalFreeRemainWeight ? _self.totalFreeRemainWeight : totalFreeRemainWeight // ignore: cast_nullable_to_non_nullable
as double?,totalKillHouseFreeSaleBarCarcassesWeight: freezed == totalKillHouseFreeSaleBarCarcassesWeight ? _self.totalKillHouseFreeSaleBarCarcassesWeight : totalKillHouseFreeSaleBarCarcassesWeight // ignore: cast_nullable_to_non_nullable
as double?,totalKillHouseAllocationsWeight: freezed == totalKillHouseAllocationsWeight ? _self.totalKillHouseAllocationsWeight : totalKillHouseAllocationsWeight // ignore: cast_nullable_to_non_nullable
as double?,segmentationsWeight: freezed == segmentationsWeight ? _self.segmentationsWeight : segmentationsWeight // ignore: cast_nullable_to_non_nullable
as double?,coldHouseAllocationsWeight: freezed == coldHouseAllocationsWeight ? _self.coldHouseAllocationsWeight : coldHouseAllocationsWeight // ignore: cast_nullable_to_non_nullable
as double?,totalSellingInProvinceGovernmentalWeight: freezed == totalSellingInProvinceGovernmentalWeight ? _self.totalSellingInProvinceGovernmentalWeight : totalSellingInProvinceGovernmentalWeight // ignore: cast_nullable_to_non_nullable
as double?,totalSellingInProvinceFreeWeight: freezed == totalSellingInProvinceFreeWeight ? _self.totalSellingInProvinceFreeWeight : totalSellingInProvinceFreeWeight // ignore: cast_nullable_to_non_nullable
as double?,totalCommitmentSellingInProvinceGovernmentalWeight: freezed == totalCommitmentSellingInProvinceGovernmentalWeight ? _self.totalCommitmentSellingInProvinceGovernmentalWeight : totalCommitmentSellingInProvinceGovernmentalWeight // ignore: cast_nullable_to_non_nullable
as double?,totalCommitmentSellingInProvinceGovernmentalRemainWeight: freezed == totalCommitmentSellingInProvinceGovernmentalRemainWeight ? _self.totalCommitmentSellingInProvinceGovernmentalRemainWeight : totalCommitmentSellingInProvinceGovernmentalRemainWeight // ignore: cast_nullable_to_non_nullable
as double?,totalCommitmentSellingInProvinceFreeWeight: freezed == totalCommitmentSellingInProvinceFreeWeight ? _self.totalCommitmentSellingInProvinceFreeWeight : totalCommitmentSellingInProvinceFreeWeight // ignore: cast_nullable_to_non_nullable
as double?,totalCommitmentSellingInProvinceFreeRemainWeight: freezed == totalCommitmentSellingInProvinceFreeRemainWeight ? _self.totalCommitmentSellingInProvinceFreeRemainWeight : totalCommitmentSellingInProvinceFreeRemainWeight // ignore: cast_nullable_to_non_nullable
as double?,posAllocatedWeight: freezed == posAllocatedWeight ? _self.posAllocatedWeight : posAllocatedWeight // ignore: cast_nullable_to_non_nullable
as double?,posGovernmentalAllocatedWeight: freezed == posGovernmentalAllocatedWeight ? _self.posGovernmentalAllocatedWeight : posGovernmentalAllocatedWeight // ignore: cast_nullable_to_non_nullable
as double?,posFreeAllocatedWeight: freezed == posFreeAllocatedWeight ? _self.posFreeAllocatedWeight : posFreeAllocatedWeight // ignore: cast_nullable_to_non_nullable
as double?,wareHouseArchiveGovernmentalWeight: freezed == wareHouseArchiveGovernmentalWeight ? _self.wareHouseArchiveGovernmentalWeight : wareHouseArchiveGovernmentalWeight // ignore: cast_nullable_to_non_nullable
as double?,wareHouseArchiveFreeWeight: freezed == wareHouseArchiveFreeWeight ? _self.wareHouseArchiveFreeWeight : wareHouseArchiveFreeWeight // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
/// Adds pattern-matching-related methods to [KillHouseSalesInfoDashboard].
extension KillHouseSalesInfoDashboardPatterns on KillHouseSalesInfoDashboard {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _KillHouseSalesInfoDashboard value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _KillHouseSalesInfoDashboard() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _KillHouseSalesInfoDashboard value) $default,){
final _that = this;
switch (_that) {
case _KillHouseSalesInfoDashboard():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _KillHouseSalesInfoDashboard value)? $default,){
final _that = this;
switch (_that) {
case _KillHouseSalesInfoDashboard() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( double? totalGovernmentalInputWeight, double? totalFreeInputWeight, double? totalGovernmentalOutputWeight, double? totalFreeOutputWeight, double? totalGovernmentalRemainWeight, double? totalFreeRemainWeight, @JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') double? totalKillHouseFreeSaleBarCarcassesWeight, double? totalKillHouseAllocationsWeight, double? segmentationsWeight, double? coldHouseAllocationsWeight, double? totalSellingInProvinceGovernmentalWeight, double? totalSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceGovernmentalWeight, double? totalCommitmentSellingInProvinceGovernmentalRemainWeight, double? totalCommitmentSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceFreeRemainWeight, double? posAllocatedWeight, double? posGovernmentalAllocatedWeight, double? posFreeAllocatedWeight, double? wareHouseArchiveGovernmentalWeight, double? wareHouseArchiveFreeWeight)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _KillHouseSalesInfoDashboard() when $default != null:
return $default(_that.totalGovernmentalInputWeight,_that.totalFreeInputWeight,_that.totalGovernmentalOutputWeight,_that.totalFreeOutputWeight,_that.totalGovernmentalRemainWeight,_that.totalFreeRemainWeight,_that.totalKillHouseFreeSaleBarCarcassesWeight,_that.totalKillHouseAllocationsWeight,_that.segmentationsWeight,_that.coldHouseAllocationsWeight,_that.totalSellingInProvinceGovernmentalWeight,_that.totalSellingInProvinceFreeWeight,_that.totalCommitmentSellingInProvinceGovernmentalWeight,_that.totalCommitmentSellingInProvinceGovernmentalRemainWeight,_that.totalCommitmentSellingInProvinceFreeWeight,_that.totalCommitmentSellingInProvinceFreeRemainWeight,_that.posAllocatedWeight,_that.posGovernmentalAllocatedWeight,_that.posFreeAllocatedWeight,_that.wareHouseArchiveGovernmentalWeight,_that.wareHouseArchiveFreeWeight);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( double? totalGovernmentalInputWeight, double? totalFreeInputWeight, double? totalGovernmentalOutputWeight, double? totalFreeOutputWeight, double? totalGovernmentalRemainWeight, double? totalFreeRemainWeight, @JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') double? totalKillHouseFreeSaleBarCarcassesWeight, double? totalKillHouseAllocationsWeight, double? segmentationsWeight, double? coldHouseAllocationsWeight, double? totalSellingInProvinceGovernmentalWeight, double? totalSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceGovernmentalWeight, double? totalCommitmentSellingInProvinceGovernmentalRemainWeight, double? totalCommitmentSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceFreeRemainWeight, double? posAllocatedWeight, double? posGovernmentalAllocatedWeight, double? posFreeAllocatedWeight, double? wareHouseArchiveGovernmentalWeight, double? wareHouseArchiveFreeWeight) $default,) {final _that = this;
switch (_that) {
case _KillHouseSalesInfoDashboard():
return $default(_that.totalGovernmentalInputWeight,_that.totalFreeInputWeight,_that.totalGovernmentalOutputWeight,_that.totalFreeOutputWeight,_that.totalGovernmentalRemainWeight,_that.totalFreeRemainWeight,_that.totalKillHouseFreeSaleBarCarcassesWeight,_that.totalKillHouseAllocationsWeight,_that.segmentationsWeight,_that.coldHouseAllocationsWeight,_that.totalSellingInProvinceGovernmentalWeight,_that.totalSellingInProvinceFreeWeight,_that.totalCommitmentSellingInProvinceGovernmentalWeight,_that.totalCommitmentSellingInProvinceGovernmentalRemainWeight,_that.totalCommitmentSellingInProvinceFreeWeight,_that.totalCommitmentSellingInProvinceFreeRemainWeight,_that.posAllocatedWeight,_that.posGovernmentalAllocatedWeight,_that.posFreeAllocatedWeight,_that.wareHouseArchiveGovernmentalWeight,_that.wareHouseArchiveFreeWeight);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( double? totalGovernmentalInputWeight, double? totalFreeInputWeight, double? totalGovernmentalOutputWeight, double? totalFreeOutputWeight, double? totalGovernmentalRemainWeight, double? totalFreeRemainWeight, @JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') double? totalKillHouseFreeSaleBarCarcassesWeight, double? totalKillHouseAllocationsWeight, double? segmentationsWeight, double? coldHouseAllocationsWeight, double? totalSellingInProvinceGovernmentalWeight, double? totalSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceGovernmentalWeight, double? totalCommitmentSellingInProvinceGovernmentalRemainWeight, double? totalCommitmentSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceFreeRemainWeight, double? posAllocatedWeight, double? posGovernmentalAllocatedWeight, double? posFreeAllocatedWeight, double? wareHouseArchiveGovernmentalWeight, double? wareHouseArchiveFreeWeight)? $default,) {final _that = this;
switch (_that) {
case _KillHouseSalesInfoDashboard() when $default != null:
return $default(_that.totalGovernmentalInputWeight,_that.totalFreeInputWeight,_that.totalGovernmentalOutputWeight,_that.totalFreeOutputWeight,_that.totalGovernmentalRemainWeight,_that.totalFreeRemainWeight,_that.totalKillHouseFreeSaleBarCarcassesWeight,_that.totalKillHouseAllocationsWeight,_that.segmentationsWeight,_that.coldHouseAllocationsWeight,_that.totalSellingInProvinceGovernmentalWeight,_that.totalSellingInProvinceFreeWeight,_that.totalCommitmentSellingInProvinceGovernmentalWeight,_that.totalCommitmentSellingInProvinceGovernmentalRemainWeight,_that.totalCommitmentSellingInProvinceFreeWeight,_that.totalCommitmentSellingInProvinceFreeRemainWeight,_that.posAllocatedWeight,_that.posGovernmentalAllocatedWeight,_that.posFreeAllocatedWeight,_that.wareHouseArchiveGovernmentalWeight,_that.wareHouseArchiveFreeWeight);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _KillHouseSalesInfoDashboard implements KillHouseSalesInfoDashboard {
const _KillHouseSalesInfoDashboard({this.totalGovernmentalInputWeight, this.totalFreeInputWeight, this.totalGovernmentalOutputWeight, this.totalFreeOutputWeight, this.totalGovernmentalRemainWeight, this.totalFreeRemainWeight, @JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') this.totalKillHouseFreeSaleBarCarcassesWeight, this.totalKillHouseAllocationsWeight, this.segmentationsWeight, this.coldHouseAllocationsWeight, this.totalSellingInProvinceGovernmentalWeight, this.totalSellingInProvinceFreeWeight, this.totalCommitmentSellingInProvinceGovernmentalWeight, this.totalCommitmentSellingInProvinceGovernmentalRemainWeight, this.totalCommitmentSellingInProvinceFreeWeight, this.totalCommitmentSellingInProvinceFreeRemainWeight, this.posAllocatedWeight, this.posGovernmentalAllocatedWeight, this.posFreeAllocatedWeight, this.wareHouseArchiveGovernmentalWeight, this.wareHouseArchiveFreeWeight});
factory _KillHouseSalesInfoDashboard.fromJson(Map<String, dynamic> json) => _$KillHouseSalesInfoDashboardFromJson(json);
@override final double? totalGovernmentalInputWeight;
@override final double? totalFreeInputWeight;
@override final double? totalGovernmentalOutputWeight;
@override final double? totalFreeOutputWeight;
@override final double? totalGovernmentalRemainWeight;
@override final double? totalFreeRemainWeight;
@override@JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') final double? totalKillHouseFreeSaleBarCarcassesWeight;
@override final double? totalKillHouseAllocationsWeight;
@override final double? segmentationsWeight;
@override final double? coldHouseAllocationsWeight;
@override final double? totalSellingInProvinceGovernmentalWeight;
@override final double? totalSellingInProvinceFreeWeight;
@override final double? totalCommitmentSellingInProvinceGovernmentalWeight;
@override final double? totalCommitmentSellingInProvinceGovernmentalRemainWeight;
@override final double? totalCommitmentSellingInProvinceFreeWeight;
@override final double? totalCommitmentSellingInProvinceFreeRemainWeight;
@override final double? posAllocatedWeight;
@override final double? posGovernmentalAllocatedWeight;
@override final double? posFreeAllocatedWeight;
@override final double? wareHouseArchiveGovernmentalWeight;
@override final double? wareHouseArchiveFreeWeight;
/// Create a copy of KillHouseSalesInfoDashboard
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$KillHouseSalesInfoDashboardCopyWith<_KillHouseSalesInfoDashboard> get copyWith => __$KillHouseSalesInfoDashboardCopyWithImpl<_KillHouseSalesInfoDashboard>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$KillHouseSalesInfoDashboardToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillHouseSalesInfoDashboard&&(identical(other.totalGovernmentalInputWeight, totalGovernmentalInputWeight) || other.totalGovernmentalInputWeight == totalGovernmentalInputWeight)&&(identical(other.totalFreeInputWeight, totalFreeInputWeight) || other.totalFreeInputWeight == totalFreeInputWeight)&&(identical(other.totalGovernmentalOutputWeight, totalGovernmentalOutputWeight) || other.totalGovernmentalOutputWeight == totalGovernmentalOutputWeight)&&(identical(other.totalFreeOutputWeight, totalFreeOutputWeight) || other.totalFreeOutputWeight == totalFreeOutputWeight)&&(identical(other.totalGovernmentalRemainWeight, totalGovernmentalRemainWeight) || other.totalGovernmentalRemainWeight == totalGovernmentalRemainWeight)&&(identical(other.totalFreeRemainWeight, totalFreeRemainWeight) || other.totalFreeRemainWeight == totalFreeRemainWeight)&&(identical(other.totalKillHouseFreeSaleBarCarcassesWeight, totalKillHouseFreeSaleBarCarcassesWeight) || other.totalKillHouseFreeSaleBarCarcassesWeight == totalKillHouseFreeSaleBarCarcassesWeight)&&(identical(other.totalKillHouseAllocationsWeight, totalKillHouseAllocationsWeight) || other.totalKillHouseAllocationsWeight == totalKillHouseAllocationsWeight)&&(identical(other.segmentationsWeight, segmentationsWeight) || other.segmentationsWeight == segmentationsWeight)&&(identical(other.coldHouseAllocationsWeight, coldHouseAllocationsWeight) || other.coldHouseAllocationsWeight == coldHouseAllocationsWeight)&&(identical(other.totalSellingInProvinceGovernmentalWeight, totalSellingInProvinceGovernmentalWeight) || other.totalSellingInProvinceGovernmentalWeight == totalSellingInProvinceGovernmentalWeight)&&(identical(other.totalSellingInProvinceFreeWeight, totalSellingInProvinceFreeWeight) || other.totalSellingInProvinceFreeWeight == totalSellingInProvinceFreeWeight)&&(identical(other.totalCommitmentSellingInProvinceGovernmentalWeight, totalCommitmentSellingInProvinceGovernmentalWeight) || other.totalCommitmentSellingInProvinceGovernmentalWeight == totalCommitmentSellingInProvinceGovernmentalWeight)&&(identical(other.totalCommitmentSellingInProvinceGovernmentalRemainWeight, totalCommitmentSellingInProvinceGovernmentalRemainWeight) || other.totalCommitmentSellingInProvinceGovernmentalRemainWeight == totalCommitmentSellingInProvinceGovernmentalRemainWeight)&&(identical(other.totalCommitmentSellingInProvinceFreeWeight, totalCommitmentSellingInProvinceFreeWeight) || other.totalCommitmentSellingInProvinceFreeWeight == totalCommitmentSellingInProvinceFreeWeight)&&(identical(other.totalCommitmentSellingInProvinceFreeRemainWeight, totalCommitmentSellingInProvinceFreeRemainWeight) || other.totalCommitmentSellingInProvinceFreeRemainWeight == totalCommitmentSellingInProvinceFreeRemainWeight)&&(identical(other.posAllocatedWeight, posAllocatedWeight) || other.posAllocatedWeight == posAllocatedWeight)&&(identical(other.posGovernmentalAllocatedWeight, posGovernmentalAllocatedWeight) || other.posGovernmentalAllocatedWeight == posGovernmentalAllocatedWeight)&&(identical(other.posFreeAllocatedWeight, posFreeAllocatedWeight) || other.posFreeAllocatedWeight == posFreeAllocatedWeight)&&(identical(other.wareHouseArchiveGovernmentalWeight, wareHouseArchiveGovernmentalWeight) || other.wareHouseArchiveGovernmentalWeight == wareHouseArchiveGovernmentalWeight)&&(identical(other.wareHouseArchiveFreeWeight, wareHouseArchiveFreeWeight) || other.wareHouseArchiveFreeWeight == wareHouseArchiveFreeWeight));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([runtimeType,totalGovernmentalInputWeight,totalFreeInputWeight,totalGovernmentalOutputWeight,totalFreeOutputWeight,totalGovernmentalRemainWeight,totalFreeRemainWeight,totalKillHouseFreeSaleBarCarcassesWeight,totalKillHouseAllocationsWeight,segmentationsWeight,coldHouseAllocationsWeight,totalSellingInProvinceGovernmentalWeight,totalSellingInProvinceFreeWeight,totalCommitmentSellingInProvinceGovernmentalWeight,totalCommitmentSellingInProvinceGovernmentalRemainWeight,totalCommitmentSellingInProvinceFreeWeight,totalCommitmentSellingInProvinceFreeRemainWeight,posAllocatedWeight,posGovernmentalAllocatedWeight,posFreeAllocatedWeight,wareHouseArchiveGovernmentalWeight,wareHouseArchiveFreeWeight]);
@override
String toString() {
return 'KillHouseSalesInfoDashboard(totalGovernmentalInputWeight: $totalGovernmentalInputWeight, totalFreeInputWeight: $totalFreeInputWeight, totalGovernmentalOutputWeight: $totalGovernmentalOutputWeight, totalFreeOutputWeight: $totalFreeOutputWeight, totalGovernmentalRemainWeight: $totalGovernmentalRemainWeight, totalFreeRemainWeight: $totalFreeRemainWeight, totalKillHouseFreeSaleBarCarcassesWeight: $totalKillHouseFreeSaleBarCarcassesWeight, totalKillHouseAllocationsWeight: $totalKillHouseAllocationsWeight, segmentationsWeight: $segmentationsWeight, coldHouseAllocationsWeight: $coldHouseAllocationsWeight, totalSellingInProvinceGovernmentalWeight: $totalSellingInProvinceGovernmentalWeight, totalSellingInProvinceFreeWeight: $totalSellingInProvinceFreeWeight, totalCommitmentSellingInProvinceGovernmentalWeight: $totalCommitmentSellingInProvinceGovernmentalWeight, totalCommitmentSellingInProvinceGovernmentalRemainWeight: $totalCommitmentSellingInProvinceGovernmentalRemainWeight, totalCommitmentSellingInProvinceFreeWeight: $totalCommitmentSellingInProvinceFreeWeight, totalCommitmentSellingInProvinceFreeRemainWeight: $totalCommitmentSellingInProvinceFreeRemainWeight, posAllocatedWeight: $posAllocatedWeight, posGovernmentalAllocatedWeight: $posGovernmentalAllocatedWeight, posFreeAllocatedWeight: $posFreeAllocatedWeight, wareHouseArchiveGovernmentalWeight: $wareHouseArchiveGovernmentalWeight, wareHouseArchiveFreeWeight: $wareHouseArchiveFreeWeight)';
}
}
/// @nodoc
abstract mixin class _$KillHouseSalesInfoDashboardCopyWith<$Res> implements $KillHouseSalesInfoDashboardCopyWith<$Res> {
factory _$KillHouseSalesInfoDashboardCopyWith(_KillHouseSalesInfoDashboard value, $Res Function(_KillHouseSalesInfoDashboard) _then) = __$KillHouseSalesInfoDashboardCopyWithImpl;
@override @useResult
$Res call({
double? totalGovernmentalInputWeight, double? totalFreeInputWeight, double? totalGovernmentalOutputWeight, double? totalFreeOutputWeight, double? totalGovernmentalRemainWeight, double? totalFreeRemainWeight,@JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') double? totalKillHouseFreeSaleBarCarcassesWeight, double? totalKillHouseAllocationsWeight, double? segmentationsWeight, double? coldHouseAllocationsWeight, double? totalSellingInProvinceGovernmentalWeight, double? totalSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceGovernmentalWeight, double? totalCommitmentSellingInProvinceGovernmentalRemainWeight, double? totalCommitmentSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceFreeRemainWeight, double? posAllocatedWeight, double? posGovernmentalAllocatedWeight, double? posFreeAllocatedWeight, double? wareHouseArchiveGovernmentalWeight, double? wareHouseArchiveFreeWeight
});
}
/// @nodoc
class __$KillHouseSalesInfoDashboardCopyWithImpl<$Res>
implements _$KillHouseSalesInfoDashboardCopyWith<$Res> {
__$KillHouseSalesInfoDashboardCopyWithImpl(this._self, this._then);
final _KillHouseSalesInfoDashboard _self;
final $Res Function(_KillHouseSalesInfoDashboard) _then;
/// Create a copy of KillHouseSalesInfoDashboard
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? totalGovernmentalInputWeight = freezed,Object? totalFreeInputWeight = freezed,Object? totalGovernmentalOutputWeight = freezed,Object? totalFreeOutputWeight = freezed,Object? totalGovernmentalRemainWeight = freezed,Object? totalFreeRemainWeight = freezed,Object? totalKillHouseFreeSaleBarCarcassesWeight = freezed,Object? totalKillHouseAllocationsWeight = freezed,Object? segmentationsWeight = freezed,Object? coldHouseAllocationsWeight = freezed,Object? totalSellingInProvinceGovernmentalWeight = freezed,Object? totalSellingInProvinceFreeWeight = freezed,Object? totalCommitmentSellingInProvinceGovernmentalWeight = freezed,Object? totalCommitmentSellingInProvinceGovernmentalRemainWeight = freezed,Object? totalCommitmentSellingInProvinceFreeWeight = freezed,Object? totalCommitmentSellingInProvinceFreeRemainWeight = freezed,Object? posAllocatedWeight = freezed,Object? posGovernmentalAllocatedWeight = freezed,Object? posFreeAllocatedWeight = freezed,Object? wareHouseArchiveGovernmentalWeight = freezed,Object? wareHouseArchiveFreeWeight = freezed,}) {
return _then(_KillHouseSalesInfoDashboard(
totalGovernmentalInputWeight: freezed == totalGovernmentalInputWeight ? _self.totalGovernmentalInputWeight : totalGovernmentalInputWeight // ignore: cast_nullable_to_non_nullable
as double?,totalFreeInputWeight: freezed == totalFreeInputWeight ? _self.totalFreeInputWeight : totalFreeInputWeight // ignore: cast_nullable_to_non_nullable
as double?,totalGovernmentalOutputWeight: freezed == totalGovernmentalOutputWeight ? _self.totalGovernmentalOutputWeight : totalGovernmentalOutputWeight // ignore: cast_nullable_to_non_nullable
as double?,totalFreeOutputWeight: freezed == totalFreeOutputWeight ? _self.totalFreeOutputWeight : totalFreeOutputWeight // ignore: cast_nullable_to_non_nullable
as double?,totalGovernmentalRemainWeight: freezed == totalGovernmentalRemainWeight ? _self.totalGovernmentalRemainWeight : totalGovernmentalRemainWeight // ignore: cast_nullable_to_non_nullable
as double?,totalFreeRemainWeight: freezed == totalFreeRemainWeight ? _self.totalFreeRemainWeight : totalFreeRemainWeight // ignore: cast_nullable_to_non_nullable
as double?,totalKillHouseFreeSaleBarCarcassesWeight: freezed == totalKillHouseFreeSaleBarCarcassesWeight ? _self.totalKillHouseFreeSaleBarCarcassesWeight : totalKillHouseFreeSaleBarCarcassesWeight // ignore: cast_nullable_to_non_nullable
as double?,totalKillHouseAllocationsWeight: freezed == totalKillHouseAllocationsWeight ? _self.totalKillHouseAllocationsWeight : totalKillHouseAllocationsWeight // ignore: cast_nullable_to_non_nullable
as double?,segmentationsWeight: freezed == segmentationsWeight ? _self.segmentationsWeight : segmentationsWeight // ignore: cast_nullable_to_non_nullable
as double?,coldHouseAllocationsWeight: freezed == coldHouseAllocationsWeight ? _self.coldHouseAllocationsWeight : coldHouseAllocationsWeight // ignore: cast_nullable_to_non_nullable
as double?,totalSellingInProvinceGovernmentalWeight: freezed == totalSellingInProvinceGovernmentalWeight ? _self.totalSellingInProvinceGovernmentalWeight : totalSellingInProvinceGovernmentalWeight // ignore: cast_nullable_to_non_nullable
as double?,totalSellingInProvinceFreeWeight: freezed == totalSellingInProvinceFreeWeight ? _self.totalSellingInProvinceFreeWeight : totalSellingInProvinceFreeWeight // ignore: cast_nullable_to_non_nullable
as double?,totalCommitmentSellingInProvinceGovernmentalWeight: freezed == totalCommitmentSellingInProvinceGovernmentalWeight ? _self.totalCommitmentSellingInProvinceGovernmentalWeight : totalCommitmentSellingInProvinceGovernmentalWeight // ignore: cast_nullable_to_non_nullable
as double?,totalCommitmentSellingInProvinceGovernmentalRemainWeight: freezed == totalCommitmentSellingInProvinceGovernmentalRemainWeight ? _self.totalCommitmentSellingInProvinceGovernmentalRemainWeight : totalCommitmentSellingInProvinceGovernmentalRemainWeight // ignore: cast_nullable_to_non_nullable
as double?,totalCommitmentSellingInProvinceFreeWeight: freezed == totalCommitmentSellingInProvinceFreeWeight ? _self.totalCommitmentSellingInProvinceFreeWeight : totalCommitmentSellingInProvinceFreeWeight // ignore: cast_nullable_to_non_nullable
as double?,totalCommitmentSellingInProvinceFreeRemainWeight: freezed == totalCommitmentSellingInProvinceFreeRemainWeight ? _self.totalCommitmentSellingInProvinceFreeRemainWeight : totalCommitmentSellingInProvinceFreeRemainWeight // ignore: cast_nullable_to_non_nullable
as double?,posAllocatedWeight: freezed == posAllocatedWeight ? _self.posAllocatedWeight : posAllocatedWeight // ignore: cast_nullable_to_non_nullable
as double?,posGovernmentalAllocatedWeight: freezed == posGovernmentalAllocatedWeight ? _self.posGovernmentalAllocatedWeight : posGovernmentalAllocatedWeight // ignore: cast_nullable_to_non_nullable
as double?,posFreeAllocatedWeight: freezed == posFreeAllocatedWeight ? _self.posFreeAllocatedWeight : posFreeAllocatedWeight // ignore: cast_nullable_to_non_nullable
as double?,wareHouseArchiveGovernmentalWeight: freezed == wareHouseArchiveGovernmentalWeight ? _self.wareHouseArchiveGovernmentalWeight : wareHouseArchiveGovernmentalWeight // ignore: cast_nullable_to_non_nullable
as double?,wareHouseArchiveFreeWeight: freezed == wareHouseArchiveFreeWeight ? _self.wareHouseArchiveFreeWeight : wareHouseArchiveFreeWeight // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
// dart format on

View File

@@ -0,0 +1,91 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'kill_house_sales_info_dashboard.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_KillHouseSalesInfoDashboard _$KillHouseSalesInfoDashboardFromJson(
Map<String, dynamic> json,
) => _KillHouseSalesInfoDashboard(
totalGovernmentalInputWeight:
(json['total_governmental_input_weight'] as num?)?.toDouble(),
totalFreeInputWeight: (json['total_free_input_weight'] as num?)?.toDouble(),
totalGovernmentalOutputWeight:
(json['total_governmental_output_weight'] as num?)?.toDouble(),
totalFreeOutputWeight: (json['total_free_output_weight'] as num?)?.toDouble(),
totalGovernmentalRemainWeight:
(json['total_governmental_remain_weight'] as num?)?.toDouble(),
totalFreeRemainWeight: (json['total_free_remain_weight'] as num?)?.toDouble(),
totalKillHouseFreeSaleBarCarcassesWeight:
(json['total_kill_house_free_sale__bar_carcasses_weight'] as num?)
?.toDouble(),
totalKillHouseAllocationsWeight:
(json['total_kill_house_allocations_weight'] as num?)?.toDouble(),
segmentationsWeight: (json['segmentations_weight'] as num?)?.toDouble(),
coldHouseAllocationsWeight: (json['cold_house_allocations_weight'] as num?)
?.toDouble(),
totalSellingInProvinceGovernmentalWeight:
(json['total_selling_in_province_governmental_weight'] as num?)
?.toDouble(),
totalSellingInProvinceFreeWeight:
(json['total_selling_in_province_free_weight'] as num?)?.toDouble(),
totalCommitmentSellingInProvinceGovernmentalWeight:
(json['total_commitment_selling_in_province_governmental_weight'] as num?)
?.toDouble(),
totalCommitmentSellingInProvinceGovernmentalRemainWeight:
(json['total_commitment_selling_in_province_governmental_remain_weight']
as num?)
?.toDouble(),
totalCommitmentSellingInProvinceFreeWeight:
(json['total_commitment_selling_in_province_free_weight'] as num?)
?.toDouble(),
totalCommitmentSellingInProvinceFreeRemainWeight:
(json['total_commitment_selling_in_province_free_remain_weight'] as num?)
?.toDouble(),
posAllocatedWeight: (json['pos_allocated_weight'] as num?)?.toDouble(),
posGovernmentalAllocatedWeight:
(json['pos_governmental_allocated_weight'] as num?)?.toDouble(),
posFreeAllocatedWeight: (json['pos_free_allocated_weight'] as num?)
?.toDouble(),
wareHouseArchiveGovernmentalWeight:
(json['ware_house_archive_governmental_weight'] as num?)?.toDouble(),
wareHouseArchiveFreeWeight: (json['ware_house_archive_free_weight'] as num?)
?.toDouble(),
);
Map<String, dynamic> _$KillHouseSalesInfoDashboardToJson(
_KillHouseSalesInfoDashboard instance,
) => <String, dynamic>{
'total_governmental_input_weight': instance.totalGovernmentalInputWeight,
'total_free_input_weight': instance.totalFreeInputWeight,
'total_governmental_output_weight': instance.totalGovernmentalOutputWeight,
'total_free_output_weight': instance.totalFreeOutputWeight,
'total_governmental_remain_weight': instance.totalGovernmentalRemainWeight,
'total_free_remain_weight': instance.totalFreeRemainWeight,
'total_kill_house_free_sale__bar_carcasses_weight':
instance.totalKillHouseFreeSaleBarCarcassesWeight,
'total_kill_house_allocations_weight':
instance.totalKillHouseAllocationsWeight,
'segmentations_weight': instance.segmentationsWeight,
'cold_house_allocations_weight': instance.coldHouseAllocationsWeight,
'total_selling_in_province_governmental_weight':
instance.totalSellingInProvinceGovernmentalWeight,
'total_selling_in_province_free_weight':
instance.totalSellingInProvinceFreeWeight,
'total_commitment_selling_in_province_governmental_weight':
instance.totalCommitmentSellingInProvinceGovernmentalWeight,
'total_commitment_selling_in_province_governmental_remain_weight':
instance.totalCommitmentSellingInProvinceGovernmentalRemainWeight,
'total_commitment_selling_in_province_free_weight':
instance.totalCommitmentSellingInProvinceFreeWeight,
'total_commitment_selling_in_province_free_remain_weight':
instance.totalCommitmentSellingInProvinceFreeRemainWeight,
'pos_allocated_weight': instance.posAllocatedWeight,
'pos_governmental_allocated_weight': instance.posGovernmentalAllocatedWeight,
'pos_free_allocated_weight': instance.posFreeAllocatedWeight,
'ware_house_archive_governmental_weight':
instance.wareHouseArchiveGovernmentalWeight,
'ware_house_archive_free_weight': instance.wareHouseArchiveFreeWeight,
};

View File

@@ -26,6 +26,8 @@ abstract class InventoryModel with _$InventoryModel {
int? totalGovernmentalCarcassesWeight,
int? totalFreeBarsCarcassesQuantity,
int? totalFreeBarsCarcassesWeight,
int? totalFreeRemainWeight,
int? totalGovernmentalRemainWeight,
double? weightAverage,
int? totalCarcassesQuantity,
int? totalCarcassesWeight,

File diff suppressed because one or more lines are too long

View File

@@ -43,6 +43,9 @@ _InventoryModel _$InventoryModelFromJson(
(json['total_free_bars_carcasses_quantity'] as num?)?.toInt(),
totalFreeBarsCarcassesWeight:
(json['total_free_bars_carcasses_weight'] as num?)?.toInt(),
totalFreeRemainWeight: (json['total_free_remain_weight'] as num?)?.toInt(),
totalGovernmentalRemainWeight:
(json['total_governmental_remain_weight'] as num?)?.toInt(),
weightAverage: (json['weight_average'] as num?)?.toDouble(),
totalCarcassesQuantity: (json['total_carcasses_quantity'] as num?)?.toInt(),
totalCarcassesWeight: (json['total_carcasses_weight'] as num?)?.toInt(),
@@ -101,6 +104,8 @@ Map<String, dynamic> _$InventoryModelToJson(
instance.totalGovernmentalCarcassesWeight,
'total_free_bars_carcasses_quantity': instance.totalFreeBarsCarcassesQuantity,
'total_free_bars_carcasses_weight': instance.totalFreeBarsCarcassesWeight,
'total_free_remain_weight': instance.totalFreeRemainWeight,
'total_governmental_remain_weight': instance.totalGovernmentalRemainWeight,
'weight_average': instance.weightAverage,
'total_carcasses_quantity': instance.totalCarcassesQuantity,
'total_carcasses_weight': instance.totalCarcassesWeight,

View File

@@ -32,9 +32,16 @@ abstract class ChickenRepository {
//region Remote
//region Steward
Future<List<InventoryModel>?> getInventory({required String token, CancelToken? cancelToken});
Future<List<InventoryModel>?> getInventory({
required String token,
required String role,
CancelToken? cancelToken,
});
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({required String token});
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
required String token,
});
Future<BarInformation?> getGeneralBarInformation({
required String token,
@@ -46,7 +53,10 @@ abstract class ChickenRepository {
Map<String, dynamic>? queryParameters,
});
Future<void> setSateForArrivals({required String token, required Map<String, dynamic> request});
Future<void> setSateForArrivals({
required String token,
required Map<String, dynamic> request,
});
Future<PaginationModel<ImportedLoadsModel>?> getImportedLoadsModel({
required String token,
@@ -58,9 +68,15 @@ abstract class ChickenRepository {
Map<String, dynamic>? queryParameters,
});
Future<void> confirmAllocation({required String token, required Map<String, dynamic> allocation});
Future<void> confirmAllocation({
required String token,
required Map<String, dynamic> allocation,
});
Future<void> denyAllocation({required String token, required String allocationToken});
Future<void> denyAllocation({
required String token,
required String allocationToken,
});
Future<void> confirmAllAllocation({
required String token,
@@ -86,7 +102,10 @@ abstract class ChickenRepository {
Map<String, dynamic>? queryParameters,
});
Future<void> updateStewardAllocation({required String token, required ConformAllocation request});
Future<void> updateStewardAllocation({
required String token,
required ConformAllocation request,
});
Future<StewardFreeBarDashboard?> getStewardDashboard({
required String token,
@@ -100,7 +119,8 @@ abstract class ChickenRepository {
required String endDate,
});
Future<PaginationModel<StewardFreeBar>?> getStewardPurchasesOutSideOfTheProvince({
Future<PaginationModel<StewardFreeBar>?>
getStewardPurchasesOutSideOfTheProvince({
required String token,
Map<String, dynamic>? queryParameters,
});
@@ -110,20 +130,18 @@ abstract class ChickenRepository {
required CreateStewardFreeBar body,
});
Future<CreateStewardFreeBar?> editStewardPurchasesOutSideOfTheProvince({
required String token,
required CreateStewardFreeBar body,
});
Future<void> deleteStewardPurchasesOutSideOfTheProvince({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<PaginationModel<OutProvinceCarcassesBuyer>?> getOutProvinceCarcassesBuyer({
Future<PaginationModel<OutProvinceCarcassesBuyer>?>
getOutProvinceCarcassesBuyer({
required String token,
Map<String, dynamic>? queryParameters,
});
@@ -154,27 +172,40 @@ abstract class ChickenRepository {
Future<void> deleteOutProvinceStewardFreeBar({
required String token,
required String key
required String key,
});
Future<UserProfile?> getUserProfile({required String token});
Future<void> updateUserProfile({required String token, required UserProfile userProfile});
Future<void> updateUserProfile({
required String token,
required UserProfile userProfile,
});
Future<void> updatePassword({required String token, required ChangePasswordRequestModel model});
Future<void> updatePassword({
required String token,
required ChangePasswordRequestModel model,
});
Future<PaginationModel<SegmentationModel>?> getSegmentation({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<void> createSegmentation({required String token, required SegmentationModel model});
Future<void> createSegmentation({
required String token,
required SegmentationModel model,
});
Future<void> editSegmentation({required String token, required SegmentationModel model});
Future<void> editSegmentation({
required String token,
required SegmentationModel model,
});
Future<SegmentationModel?> deleteSegmentation({required String token, required String key});
Future<SegmentationModel?> deleteSegmentation({
required String token,
required String key,
});
Future<BroadcastPrice?> getBroadcastPrice({required String token});
@@ -187,9 +218,6 @@ abstract class ChickenRepository {
//endregion
//endregion
//region local

View File

@@ -41,12 +41,14 @@ class ChickenRepositoryImp implements ChickenRepository {
@override
Future<List<InventoryModel>?> getInventory({
required String token,
required String role,
CancelToken? cancelToken,
}) async {
var res = await remote.getInventory(token: token, cancelToken: cancelToken);
var res = await remote.getInventory(token: token, role: role, cancelToken: cancelToken);
return res;
}
@override
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
required String token,

View File

@@ -4,8 +4,11 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
as listModel
show KillRequestList;
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
import 'package:rasadyar_core/core.dart';
abstract class KillHouseRepository {
//region requestKill
Future<List<KillHouseResponse>?> getKillHouseList({
required String token,
Map<String, dynamic>? queryParameters,
@@ -16,12 +19,29 @@ abstract class KillHouseRepository {
Map<String, dynamic>? queryParameters,
});
Future<void> submitKillHouseRequest({required String token, required KillRequestResponse data});
Future<void> submitKillHouseRequest({
required String token,
required KillRequestResponse data,
});
Future<List<listModel.KillRequestList>?> getListKillRequest({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<void> deleteKillRequest({required String token, required int requestId});
Future<void> deleteKillRequest({
required String token,
required int requestId,
});
//endregion
//region warehouseAndDistribution
Future<KillHouseSalesInfoDashboard?> getKillHouseSalesInfoDashboard({
required String token,
CancelToken? cancelToken,
Map<String, dynamic>? queryParameters,
});
//endregion
}

View File

@@ -4,6 +4,8 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_house/kill_house_response.dart';
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
as listModel;
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
import 'package:rasadyar_core/core.dart';
import 'kill_house_repository.dart';
@@ -17,7 +19,10 @@ class KillHouseRepositoryImpl extends KillHouseRepository {
required String token,
Map<String, dynamic>? queryParameters,
}) async {
return await remoteDataSource.getKillHouseList(token: token, queryParameters: queryParameters);
return await remoteDataSource.getKillHouseList(
token: token,
queryParameters: queryParameters,
);
}
@override
@@ -37,7 +42,10 @@ class KillHouseRepositoryImpl extends KillHouseRepository {
required KillRequestResponse data,
}) async {
var jsonData = data.toJson();
return await remoteDataSource.submitKillHouseRequest(token: token, data: jsonData);
return await remoteDataSource.submitKillHouseRequest(
token: token,
data: jsonData,
);
}
@override
@@ -52,7 +60,31 @@ class KillHouseRepositoryImpl extends KillHouseRepository {
}
@override
Future<void> deleteKillRequest({required String token, required int requestId}) async {
await remoteDataSource.deleteKillRequest(token: token, requestId: requestId);
Future<void> deleteKillRequest({
required String token,
required int requestId,
}) async {
await remoteDataSource.deleteKillRequest(
token: token,
requestId: requestId,
);
}
//endregion
//region warehouseAndDistribution
@override
Future<KillHouseSalesInfoDashboard?> getKillHouseSalesInfoDashboard({
required String token,
CancelToken? cancelToken,
Map<String, dynamic>? queryParameters,
}) async {
return await remoteDataSource.getKillHouseSalesInfoDashboard(
token: token,
cancelToken: cancelToken,
queryParameters: queryParameters,
);
}
//endregion
}