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.
61 lines
2.0 KiB
61 lines
2.0 KiB
import 'package:aku_community_manager/const/api.dart';
|
|
import 'package:aku_community_manager/models/manager/decoration/decoration_detail_model.dart';
|
|
import 'package:aku_community_manager/models/manager/inspection/inspection_detail_model.dart';
|
|
import 'package:aku_community_manager/models/manager/inspection/inspection_point_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';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class ManageFunc {
|
|
static Future<DecorationDetailModel> getDetcorationDetail(int id) async {
|
|
Response response = await NetUtil()
|
|
.dio
|
|
.get(API.manage.decorationFindByld, queryParameters: {
|
|
'decorationId': id,
|
|
});
|
|
return DecorationDetailModel.fromJson(response.data);
|
|
}
|
|
|
|
static Future getContactOwner(int id) async {
|
|
BaseModel baseModel = await NetUtil().get(
|
|
API.manage.goodsOutContactOwner,
|
|
params: {
|
|
'estateId': id,
|
|
},
|
|
);
|
|
return baseModel.data;
|
|
}
|
|
|
|
static Future<InspectionDetailModel> getInspectionDetail(
|
|
int executeId) async {
|
|
BaseModel baseModel =
|
|
await NetUtil().get(API.manage.inspectionFindDetailByld, params: {
|
|
"executeId": executeId,
|
|
});
|
|
return InspectionDetailModel.fromJson(baseModel.data);
|
|
}
|
|
|
|
static Future<List<InspectionPointModel>> getInspectionPointByPlanId(
|
|
{@required int planId}) async {
|
|
BaseModel baseModel =
|
|
await NetUtil().get(API.manage.inspectionPointByPlanId, params: {
|
|
"planId": planId,
|
|
});
|
|
return (baseModel.data as List)
|
|
.map((e) => InspectionPointModel.fromJson(e))
|
|
.toList();
|
|
}
|
|
|
|
static Future<List<InspectionPointModel>> getInspectionPointByExcuteId(
|
|
{@required int excuteId}) async {
|
|
BaseModel baseModel = await NetUtil()
|
|
.get(API.manage.inspecntionFindPointByExecuteId, params: {
|
|
"planId": excuteId,
|
|
});
|
|
return (baseModel.data as List)
|
|
.map((e) => InspectionPointModel.fromJson(e))
|
|
.toList();
|
|
}
|
|
}
|