You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.0 KiB

import 'package:aku_community_manager/const/api.dart';
4 years ago
import 'package:aku_community_manager/models/manager/bussiness_and_fix/dispatch_report_model.dart';
import 'package:aku_community_manager/models/manager/bussiness_and_fix/fixed_detail_model.dart';
import 'package:aku_community_manager/utils/network/base_model.dart';
import 'package:aku_community_manager/utils/network/net_util.dart';
import 'package:dio/dio.dart';
class ManageFunc {
static Future repairDetail(int id) async {
Response response =
await NetUtil().dio.get(API.manage.repairDetail, queryParameters: {
'repairId': id,
});
return FixedDetailModel.fromJson(response.data);
}
static Future dispatchListDetailType() async {
Response response = await NetUtil().dio.get(
'http://test.akuhotel.com:8804/IntelligentCommunity' +
API.manage.dispatchListDetailType);
return response.data as List;
}
static Future workOrderTimeType() async {
BaseModel baseModel = await NetUtil().get(API.manage.workOrderTimeLimit);
return baseModel.data as List;
}
static Future workOrderTypeDetail(int id) async {
BaseModel baseModel =
await NetUtil().get(API.manage.workOrderTypeDetail, params: {
'workOrderTypeId': id,
});
return baseModel.data as List;
}
4 years ago
static Future repairDispatch(DispatchReportModel model) async {
4 years ago
BaseModel baseModel =
await NetUtil().get(API.manage.repairDispatch, params: {
'dispatchListId': model.dispatchListId,
'workOrderType': model.workOrderTyoe,
'workOrderTypeDetail': model.workOrderTypeDetail,
'workOrderTimeLimit': model.workOrderTimeLimit,
'type': model.type,
'operator': model.operato,
'remake': model.remark,
4 years ago
});
4 years ago
return baseModel;
}
static Future repairReassignment(int id, int operato) async {
BaseModel baseModel = await NetUtil().get(API.manage.repairReassignment,
params: {'dispatchListId': id, 'operator': operato});
return baseModel;
4 years ago
}
}