|
@@ -3,8 +3,13 @@ import 'package:domain/entity/response/agency_option_entity.dart';
|
|
import 'package:domain/entity/response/agency_table_entity.dart';
|
|
import 'package:domain/entity/response/agency_table_entity.dart';
|
|
import 'package:domain/entity/response/contract_detail_entity.dart';
|
|
import 'package:domain/entity/response/contract_detail_entity.dart';
|
|
import 'package:domain/entity/response/contract_option_entity.dart';
|
|
import 'package:domain/entity/response/contract_option_entity.dart';
|
|
|
|
+import 'package:domain/entity/response/contract_position_add_option_entity.dart';
|
|
|
|
+import 'package:domain/entity/response/contract_position_option_entity.dart';
|
|
|
|
+import 'package:domain/entity/response/contract_position_rate_detail_entity.dart';
|
|
|
|
+import 'package:domain/entity/response/contract_position_rate_specific_option_entity.dart';
|
|
|
|
+import 'package:domain/entity/response/contract_position_rate_table_entity.dart';
|
|
|
|
+import 'package:domain/entity/response/contract_position_table_entity.dart';
|
|
import 'package:domain/entity/response/contract_table_entity.dart';
|
|
import 'package:domain/entity/response/contract_table_entity.dart';
|
|
-import 'package:domain/entity/response/hotel_info_entity.dart';
|
|
|
|
import 'package:domain/entity/response/position_table_entity.dart';
|
|
import 'package:domain/entity/response/position_table_entity.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:plugin_platform/http/http_provider.dart';
|
|
import 'package:plugin_platform/http/http_provider.dart';
|
|
@@ -73,8 +78,41 @@ class SGAgencyRepository extends GetxService {
|
|
return result.convert();
|
|
return result.convert();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// 根据ID获取主列表的Item数据,用于刷新Item
|
|
|
|
+ Future<HttpResult<AgencyTableEntity>> fetchAgencyTableByIds(
|
|
|
|
+ String? ids, {
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params["cur_page"] = "1";
|
|
|
|
+ params["page_size"] = "9999";
|
|
|
|
+
|
|
|
|
+ if (!Utils.isEmpty(ids)) {
|
|
|
|
+ params["pivot_id"] = ids!;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiAgencyTable,
|
|
|
|
+ params: params,
|
|
|
|
+ isShowLoadingDialog: true,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ //根据返回的结果,封装原始数据为Bean/Entity对象
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ final json = result.getDataJson();
|
|
|
|
+ var data = AgencyTableEntity.fromJson(json!);
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert<AgencyTableEntity>(data: data);
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
/// 删除中介
|
|
/// 删除中介
|
|
- Future<HttpResult> deleteAgencySubmit(String? pivotId, {
|
|
|
|
|
|
+ Future<HttpResult> deleteAgencySubmit(
|
|
|
|
+ String? pivotId, {
|
|
CancelToken? cancelToken,
|
|
CancelToken? cancelToken,
|
|
}) async {
|
|
}) async {
|
|
//参数
|
|
//参数
|
|
@@ -249,6 +287,38 @@ class SGAgencyRepository extends GetxService {
|
|
return result.convert();
|
|
return result.convert();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// 根据ID获取主列表的Item数据,用于刷新Item
|
|
|
|
+ Future<HttpResult<PositionTableEntity>> fetchPositionTableByIds(
|
|
|
|
+ String? ids, {
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params["cur_page"] = "1";
|
|
|
|
+ params["page_size"] = "9999";
|
|
|
|
+
|
|
|
|
+ if (!Utils.isEmpty(ids)) {
|
|
|
|
+ params["id"] = ids!;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiAgencyPositionTable,
|
|
|
|
+ params: params,
|
|
|
|
+ isShowLoadingDialog: true,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ //根据返回的结果,封装原始数据为Bean/Entity对象
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ final json = result.getDataJson();
|
|
|
|
+ var data = PositionTableEntity.fromJson(json!);
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert<PositionTableEntity>(data: data);
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
/// 添加职位
|
|
/// 添加职位
|
|
Future<HttpResult> addPositionSubmit({
|
|
Future<HttpResult> addPositionSubmit({
|
|
required String? name,
|
|
required String? name,
|
|
@@ -379,6 +449,38 @@ class SGAgencyRepository extends GetxService {
|
|
return result.convert();
|
|
return result.convert();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// 根据ID获取主列表的Item数据,用于刷新Item
|
|
|
|
+ Future<HttpResult<ContractTableEntity>> fetchContractTableByIds(
|
|
|
|
+ String? ids, {
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params["cur_page"] = "1";
|
|
|
|
+ params["page_size"] = "9999";
|
|
|
|
+
|
|
|
|
+ if (!Utils.isEmpty(ids)) {
|
|
|
|
+ params["contract_id"] = ids!;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiContractTable,
|
|
|
|
+ params: params,
|
|
|
|
+ isShowLoadingDialog: true,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ //根据返回的结果,封装原始数据为Bean/Entity对象
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ final json = result.getDataJson();
|
|
|
|
+ var data = ContractTableEntity.fromJson(json!);
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert<ContractTableEntity>(data: data);
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
/// 获取中介的合同添加详情
|
|
/// 获取中介的合同添加详情
|
|
Future<HttpResult<ContractDetailEntity>> fetchContractAddOption({
|
|
Future<HttpResult<ContractDetailEntity>> fetchContractAddOption({
|
|
CancelToken? cancelToken,
|
|
CancelToken? cancelToken,
|
|
@@ -440,7 +542,7 @@ class SGAgencyRepository extends GetxService {
|
|
params['end_date'] = endDate ?? "";
|
|
params['end_date'] = endDate ?? "";
|
|
|
|
|
|
//文件
|
|
//文件
|
|
- Map<String,String> fileParams = {};
|
|
|
|
|
|
+ Map<String, String> fileParams = {};
|
|
if (paths != null && paths.isNotEmpty) {
|
|
if (paths != null && paths.isNotEmpty) {
|
|
fileParams['file'] = paths[0];
|
|
fileParams['file'] = paths[0];
|
|
}
|
|
}
|
|
@@ -479,7 +581,7 @@ class SGAgencyRepository extends GetxService {
|
|
params['end_date'] = endDate ?? "";
|
|
params['end_date'] = endDate ?? "";
|
|
|
|
|
|
//文件
|
|
//文件
|
|
- Map<String,String> fileParams = {};
|
|
|
|
|
|
+ Map<String, String> fileParams = {};
|
|
if (paths != null && paths.isNotEmpty) {
|
|
if (paths != null && paths.isNotEmpty) {
|
|
fileParams['file'] = paths[0];
|
|
fileParams['file'] = paths[0];
|
|
}
|
|
}
|
|
@@ -501,4 +603,415 @@ class SGAgencyRepository extends GetxService {
|
|
return result.convert();
|
|
return result.convert();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// 合同关联职位 Option
|
|
|
|
+ Future<HttpResult<ContractPositionOptionEntity>> fetchContractPositionOption({
|
|
|
|
+ required String? contractId,
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params["contract_id"] = contractId ?? "";
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiContractPositionOption,
|
|
|
|
+ params: params,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ final json = result.getDataJson();
|
|
|
|
+ var data = ContractPositionOptionEntity.fromJson(json!);
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert<ContractPositionOptionEntity>(data: data);
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// 获取中介合同列表Table
|
|
|
|
+ Future<HttpResult<ContractPositionTableEntity>> fetchContractPositionTable({
|
|
|
|
+ required int curPage,
|
|
|
|
+ required String? contractId,
|
|
|
|
+ String? positionId,
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params["cur_page"] = curPage.toString();
|
|
|
|
+ params["page_size"] = "10";
|
|
|
|
+
|
|
|
|
+ params["contract_id"] = contractId ?? "";
|
|
|
|
+
|
|
|
|
+ if (Utils.isNotEmpty(positionId)) {
|
|
|
|
+ params["position_id"] = positionId!;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiContractPositionTable,
|
|
|
|
+ params: params,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ final json = result.getDataJson();
|
|
|
|
+ var data = ContractPositionTableEntity.fromJson(json!);
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert<ContractPositionTableEntity>(data: data);
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// 合同关联职位 添加Option
|
|
|
|
+ Future<HttpResult<ContractPositionAddOptionEntity>> fetchContractPositionAddOption({
|
|
|
|
+ required String? contractId,
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params["contract_id"] = contractId ?? "";
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiContractPositionAddOption,
|
|
|
|
+ params: params,
|
|
|
|
+ isShowLoadingDialog: true,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ final json = result.getDataJson();
|
|
|
|
+ var data = ContractPositionAddOptionEntity.fromJson(json!);
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert<ContractPositionAddOptionEntity>(data: data);
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// 合同关联职位 添加Submit
|
|
|
|
+ Future<HttpResult> addContractPositionSubmit({
|
|
|
|
+ required String? contractId,
|
|
|
|
+ required String? positionId,
|
|
|
|
+ String? type_1,
|
|
|
|
+ String? type_2,
|
|
|
|
+ String? type_3,
|
|
|
|
+ String? type_7,
|
|
|
|
+ String? type_8,
|
|
|
|
+ String? type_9,
|
|
|
|
+ String? type_10,
|
|
|
|
+ String? type_11,
|
|
|
|
+ String? type_12,
|
|
|
|
+ String? type_13,
|
|
|
|
+ String? type_20,
|
|
|
|
+ String? type_21,
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params['contract_id'] = contractId ?? "";
|
|
|
|
+ params['position_id'] = positionId ?? "";
|
|
|
|
+
|
|
|
|
+ if (Utils.isNotEmpty(type_1)) {
|
|
|
|
+ params['type_1'] = type_1!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_2)) {
|
|
|
|
+ params['type_2'] = type_2!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_3)) {
|
|
|
|
+ params['type_3'] = type_3!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_7)) {
|
|
|
|
+ params['type_7'] = type_7!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_8)) {
|
|
|
|
+ params['type_8'] = type_8!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_9)) {
|
|
|
|
+ params['type_9'] = type_9!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_10)) {
|
|
|
|
+ params['type_10'] = type_10!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_11)) {
|
|
|
|
+ params['type_11'] = type_11!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_12)) {
|
|
|
|
+ params['type_12'] = type_12!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_13)) {
|
|
|
|
+ params['type_13'] = type_13!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_20)) {
|
|
|
|
+ params['type_20'] = type_20!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_21)) {
|
|
|
|
+ params['type_21'] = type_21!;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiContractPositionAddSubmit,
|
|
|
|
+ method: HttpMethod.POST,
|
|
|
|
+ params: params,
|
|
|
|
+ networkDebounce: true,
|
|
|
|
+ isShowLoadingDialog: true,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// 合同关联职位 编辑详情
|
|
|
|
+ Future<HttpResult<ContractPositionRateDetailEntity>> fetchContractPositionRateDetail({
|
|
|
|
+ required String? contractId,
|
|
|
|
+ required String? positionId,
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params["contract_id"] = contractId ?? "";
|
|
|
|
+ params["position_id"] = positionId ?? "";
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiContractPositionRateDetail,
|
|
|
|
+ params: params,
|
|
|
|
+ isShowLoadingDialog: true,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ final json = result.getDataJson();
|
|
|
|
+ var data = ContractPositionRateDetailEntity.fromJson(json!);
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert<ContractPositionRateDetailEntity>(data: data);
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// 合同关联职位 费率编辑的Submit
|
|
|
|
+ Future<HttpResult> editContractPositionRateSubmit({
|
|
|
|
+ required String? contractId,
|
|
|
|
+ required String? positionId,
|
|
|
|
+ String? type_1,
|
|
|
|
+ String? type_2,
|
|
|
|
+ String? type_3,
|
|
|
|
+ String? type_7,
|
|
|
|
+ String? type_8,
|
|
|
|
+ String? type_9,
|
|
|
|
+ String? type_10,
|
|
|
|
+ String? type_11,
|
|
|
|
+ String? type_12,
|
|
|
|
+ String? type_13,
|
|
|
|
+ String? type_20,
|
|
|
|
+ String? type_21,
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params['contract_id'] = contractId ?? "";
|
|
|
|
+ params['position_id'] = positionId ?? "";
|
|
|
|
+
|
|
|
|
+ if (Utils.isNotEmpty(type_1)) {
|
|
|
|
+ params['type_1'] = type_1!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_2)) {
|
|
|
|
+ params['type_2'] = type_2!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_3)) {
|
|
|
|
+ params['type_3'] = type_3!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_7)) {
|
|
|
|
+ params['type_7'] = type_7!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_8)) {
|
|
|
|
+ params['type_8'] = type_8!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_9)) {
|
|
|
|
+ params['type_9'] = type_9!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_10)) {
|
|
|
|
+ params['type_10'] = type_10!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_11)) {
|
|
|
|
+ params['type_11'] = type_11!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_12)) {
|
|
|
|
+ params['type_12'] = type_12!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_13)) {
|
|
|
|
+ params['type_13'] = type_13!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_20)) {
|
|
|
|
+ params['type_20'] = type_20!;
|
|
|
|
+ }
|
|
|
|
+ if (Utils.isNotEmpty(type_21)) {
|
|
|
|
+ params['type_21'] = type_21!;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiContractPositionRateEditSubmit,
|
|
|
|
+ method: HttpMethod.POST,
|
|
|
|
+ params: params,
|
|
|
|
+ networkDebounce: true,
|
|
|
|
+ isShowLoadingDialog: true,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// 获取中介合同的时薪列表Table
|
|
|
|
+ Future<HttpResult<ContractPositionRateTableEntity>> fetchContractPositionRateTable({
|
|
|
|
+ required int curPage,
|
|
|
|
+ required String? contractId,
|
|
|
|
+ required String? positionId,
|
|
|
|
+ String? rateId,
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params["cur_page"] = curPage.toString();
|
|
|
|
+ params["page_size"] = "20";
|
|
|
|
+ params["contract_id"] = contractId ?? "";
|
|
|
|
+ params["position_id"] = positionId ?? "";
|
|
|
|
+
|
|
|
|
+ if (Utils.isNotEmpty(rateId)) {
|
|
|
|
+ params["rate_id"] = rateId!;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiContractRateTable,
|
|
|
|
+ params: params,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ final json = result.getDataJson();
|
|
|
|
+ var data = ContractPositionRateTableEntity.fromJson(json!);
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert<ContractPositionRateTableEntity>(data: data);
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// 获取中介合同的时薪,指定日期Option
|
|
|
|
+ Future<HttpResult<ContractPositionRateSpecificOptionEntity>> fetchContractPositionRateSpecificOption({
|
|
|
|
+ required String? contractId,
|
|
|
|
+ required String? positionId,
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params["contract_id"] = contractId ?? "";
|
|
|
|
+ params["position_id"] = positionId ?? "";
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiContractRateSpecificOption,
|
|
|
|
+ params: params,
|
|
|
|
+ isShowLoadingDialog: true,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ final json = result.getDataJson();
|
|
|
|
+ var data = ContractPositionRateSpecificOptionEntity.fromJson(json!);
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert<ContractPositionRateSpecificOptionEntity>(data: data);
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// 获取中介合同的时薪,指定日期添加
|
|
|
|
+ Future<HttpResult> addContractPositionRateSpecificSubmit({
|
|
|
|
+ required String? contractId,
|
|
|
|
+ required String? positionId,
|
|
|
|
+ required String? day,
|
|
|
|
+ required String? amount,
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params['contract_id'] = contractId ?? "";
|
|
|
|
+ params['position_id'] = positionId ?? "";
|
|
|
|
+ params['special_day'] = day ?? "";
|
|
|
|
+ params['amount'] = amount ?? "";
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiContractRateSpecificAddSubmit,
|
|
|
|
+ method: HttpMethod.POST,
|
|
|
|
+ params: params,
|
|
|
|
+ networkDebounce: true,
|
|
|
|
+ isShowLoadingDialog: true,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// 中介合同时薪 修改金额
|
|
|
|
+ Future<HttpResult> editContractPositionRateAmountEdit({
|
|
|
|
+ required String? rateId,
|
|
|
|
+ required String? amount,
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params['rate_id'] = rateId ?? "";;
|
|
|
|
+ params['amount'] = amount ?? "";
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiContractRateAmountEdit,
|
|
|
|
+ method: HttpMethod.POST,
|
|
|
|
+ params: params,
|
|
|
|
+ networkDebounce: true,
|
|
|
|
+ isShowLoadingDialog: true,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// 中介合同时薪 删除记录
|
|
|
|
+ Future<HttpResult> deleteContractPositionRate({
|
|
|
|
+ required String? rateId,
|
|
|
|
+ CancelToken? cancelToken,
|
|
|
|
+ }) async {
|
|
|
|
+ //参数
|
|
|
|
+ Map<String, String> params = {};
|
|
|
|
+ params['rate_id'] = rateId ?? "";;
|
|
|
|
+
|
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
|
+ ApiConstants.apiContractRateDelete,
|
|
|
|
+ method: HttpMethod.POST,
|
|
|
|
+ params: params,
|
|
|
|
+ networkDebounce: true,
|
|
|
|
+ isShowLoadingDialog: true,
|
|
|
|
+ cancelToken: cancelToken,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ if (result.isSuccess) {
|
|
|
|
+ //重新赋值data或list
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+ return result.convert();
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|