|
|
@ -1,7 +1,3 @@
|
|
|
|
// Package imports:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
import 'package:dio/dio.dart';
|
|
|
|
import 'package:dio/dio.dart';
|
|
|
|
import 'package:flustars/flustars.dart';
|
|
|
|
import 'package:flustars/flustars.dart';
|
|
|
@ -36,13 +32,13 @@ class ManagerFunc {
|
|
|
|
return baseModel;
|
|
|
|
return baseModel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<String> shareVisitor({
|
|
|
|
static Future<String?> shareVisitor({
|
|
|
|
@required int estateId,
|
|
|
|
required int? estateId,
|
|
|
|
String name,
|
|
|
|
String? name,
|
|
|
|
String tel,
|
|
|
|
String? tel,
|
|
|
|
int sex,
|
|
|
|
int? sex,
|
|
|
|
String carNumber,
|
|
|
|
String? carNumber,
|
|
|
|
DateTime date,
|
|
|
|
DateTime? date,
|
|
|
|
}) async {
|
|
|
|
}) async {
|
|
|
|
final cancel = BotToast.showLoading();
|
|
|
|
final cancel = BotToast.showLoading();
|
|
|
|
Map<String, dynamic> params = {
|
|
|
|
Map<String, dynamic> params = {
|
|
|
@ -54,7 +50,7 @@ class ManagerFunc {
|
|
|
|
if (carNumber != null) params.putIfAbsent('carNumber', () => carNumber);
|
|
|
|
if (carNumber != null) params.putIfAbsent('carNumber', () => carNumber);
|
|
|
|
if (date != null)
|
|
|
|
if (date != null)
|
|
|
|
params.putIfAbsent('visitDateStart', () => NetUtil.getDate(date));
|
|
|
|
params.putIfAbsent('visitDateStart', () => NetUtil.getDate(date));
|
|
|
|
Response response = await NetUtil().dio.post(
|
|
|
|
Response response = await NetUtil().dio!.post(
|
|
|
|
API.manager.shareInvite,
|
|
|
|
API.manager.shareInvite,
|
|
|
|
data: params,
|
|
|
|
data: params,
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -66,7 +62,7 @@ class ManagerFunc {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static reportRepairInsert(
|
|
|
|
static reportRepairInsert(
|
|
|
|
int id, int type, String reportDetail, List<String> fileUrls) async {
|
|
|
|
int? id, int type, String reportDetail, List<String?> fileUrls) async {
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
API.manager.reportRepairInsert,
|
|
|
|
API.manager.reportRepairInsert,
|
|
|
|
params: {
|
|
|
|
params: {
|
|
|
@ -80,7 +76,7 @@ class ManagerFunc {
|
|
|
|
return baseModel;
|
|
|
|
return baseModel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static reportRepairDelete(List<int> ids) async {
|
|
|
|
static reportRepairDelete(List<int?> ids) async {
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
API.manager.reportRepairDelete,
|
|
|
|
API.manager.reportRepairDelete,
|
|
|
|
params: {'ids': ids},
|
|
|
|
params: {'ids': ids},
|
|
|
@ -89,8 +85,8 @@ class ManagerFunc {
|
|
|
|
return baseModel;
|
|
|
|
return baseModel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<FixedDetailModel> reportRepairFindBYLD(int id) async {
|
|
|
|
static Future<FixedDetailModel> reportRepairFindBYLD(int? id) async {
|
|
|
|
Response response = await NetUtil().dio.get(
|
|
|
|
Response response = await NetUtil().dio!.get(
|
|
|
|
API.manager.reportRepairFindBYLD,
|
|
|
|
API.manager.reportRepairFindBYLD,
|
|
|
|
queryParameters: {
|
|
|
|
queryParameters: {
|
|
|
|
'repairId': id,
|
|
|
|
'repairId': id,
|
|
|
@ -99,7 +95,7 @@ class ManagerFunc {
|
|
|
|
return FixedDetailModel.fromJson(response.data);
|
|
|
|
return FixedDetailModel.fromJson(response.data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<BaseModel> reportRepairCancel(int id) async {
|
|
|
|
static Future<BaseModel> reportRepairCancel(int? id) async {
|
|
|
|
BaseModel baseModel = await NetUtil().get(API.manager.reportRepairCancel,
|
|
|
|
BaseModel baseModel = await NetUtil().get(API.manager.reportRepairCancel,
|
|
|
|
params: {
|
|
|
|
params: {
|
|
|
|
'repairId': id,
|
|
|
|
'repairId': id,
|
|
|
@ -109,7 +105,7 @@ class ManagerFunc {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<BaseModel> reportRepairEvaluate(
|
|
|
|
static Future<BaseModel> reportRepairEvaluate(
|
|
|
|
int id, int rate, String text) async {
|
|
|
|
int? id, int? rate, String text) async {
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
API.manager.reportRepairEvaluate,
|
|
|
|
API.manager.reportRepairEvaluate,
|
|
|
|
params: {
|
|
|
|
params: {
|
|
|
@ -122,7 +118,7 @@ class ManagerFunc {
|
|
|
|
return baseModel;
|
|
|
|
return baseModel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<BaseModel> reportRepairComplete(int id) async {
|
|
|
|
static Future<BaseModel> reportRepairComplete(int? id) async {
|
|
|
|
BaseModel baseModel = await NetUtil().get(
|
|
|
|
BaseModel baseModel = await NetUtil().get(
|
|
|
|
API.manager.reportRepairComplete,
|
|
|
|
API.manager.reportRepairComplete,
|
|
|
|
params: {
|
|
|
|
params: {
|
|
|
@ -134,20 +130,20 @@ class ManagerFunc {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<MovingCompanyModel> getMovingCompanyTel() async {
|
|
|
|
static Future<MovingCompanyModel> getMovingCompanyTel() async {
|
|
|
|
Response response = await NetUtil().dio.get(
|
|
|
|
Response response = await NetUtil().dio!.get(
|
|
|
|
API.manager.getMovingCompanyTel,
|
|
|
|
API.manager.getMovingCompanyTel,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
return MovingCompanyModel.fromJson(response.data);
|
|
|
|
return MovingCompanyModel.fromJson(response.data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<BaseModel> articleOutSubmit({
|
|
|
|
static Future<BaseModel> articleOutSubmit({
|
|
|
|
int id,
|
|
|
|
int? id,
|
|
|
|
String name,
|
|
|
|
String? name,
|
|
|
|
int weight,
|
|
|
|
int? weight,
|
|
|
|
int approach,
|
|
|
|
int? approach,
|
|
|
|
String tel,
|
|
|
|
String? tel,
|
|
|
|
String time,
|
|
|
|
required String time,
|
|
|
|
List<String> urls,
|
|
|
|
List<String?>? urls,
|
|
|
|
}) async {
|
|
|
|
}) async {
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
API.manager.articleOutSubmit,
|
|
|
|
API.manager.articleOutSubmit,
|
|
|
@ -166,8 +162,8 @@ class ManagerFunc {
|
|
|
|
return baseModel;
|
|
|
|
return baseModel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<ArticleQRModel> getQRcode(int id) async {
|
|
|
|
static Future<ArticleQRModel> getQRcode(int? id) async {
|
|
|
|
Response response = await NetUtil().dio.get(
|
|
|
|
Response response = await NetUtil().dio!.get(
|
|
|
|
API.manager.getQRcode,
|
|
|
|
API.manager.getQRcode,
|
|
|
|
queryParameters: {
|
|
|
|
queryParameters: {
|
|
|
|
'articleOutId': id,
|
|
|
|
'articleOutId': id,
|
|
|
@ -176,7 +172,7 @@ class ManagerFunc {
|
|
|
|
return ArticleQRModel.fromJson(response.data);
|
|
|
|
return ArticleQRModel.fromJson(response.data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<BaseModel> articleOutDelete(List<int> ids) async {
|
|
|
|
static Future<BaseModel> articleOutDelete(List<int?> ids) async {
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
API.manager.articleOutDelete,
|
|
|
|
API.manager.articleOutDelete,
|
|
|
|
params: {'ids': ids},
|
|
|
|
params: {'ids': ids},
|
|
|
@ -185,7 +181,7 @@ class ManagerFunc {
|
|
|
|
return baseModel;
|
|
|
|
return baseModel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<BaseModel> fromLoss(int id) async {
|
|
|
|
static Future<BaseModel> fromLoss(int? id) async {
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
API.manager.fromLoss,
|
|
|
|
API.manager.fromLoss,
|
|
|
|
params: {'articleBorrowId': id},
|
|
|
|
params: {'articleBorrowId': id},
|
|
|
@ -202,7 +198,7 @@ class ManagerFunc {
|
|
|
|
return baseModel;
|
|
|
|
return baseModel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<VotingDetailModel> voteDetail(int id) async {
|
|
|
|
static Future<VotingDetailModel> voteDetail(int? id) async {
|
|
|
|
BaseModel baseModel = await NetUtil().get(
|
|
|
|
BaseModel baseModel = await NetUtil().get(
|
|
|
|
API.manager.voteDetail,
|
|
|
|
API.manager.voteDetail,
|
|
|
|
params: {'voteId': id},
|
|
|
|
params: {'voteId': id},
|
|
|
@ -211,7 +207,7 @@ class ManagerFunc {
|
|
|
|
return VotingDetailModel.fromJson(baseModel.data);
|
|
|
|
return VotingDetailModel.fromJson(baseModel.data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<BaseModel> vote(int voteId, int candleId) async {
|
|
|
|
static Future<BaseModel> vote(int? voteId, int? candleId) async {
|
|
|
|
BaseModel baseModel = await NetUtil().post(API.manager.vote, params: {
|
|
|
|
BaseModel baseModel = await NetUtil().post(API.manager.vote, params: {
|
|
|
|
'voteId': voteId,
|
|
|
|
'voteId': voteId,
|
|
|
|
'candidateId': candleId,
|
|
|
|
'candidateId': candleId,
|
|
|
@ -219,7 +215,7 @@ class ManagerFunc {
|
|
|
|
return baseModel;
|
|
|
|
return baseModel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<QuestionnaireDetialModel> questionnairefindById(int id) async {
|
|
|
|
static Future<QuestionnaireDetialModel> questionnairefindById(int? id) async {
|
|
|
|
BaseModel baseModel = await NetUtil().get(
|
|
|
|
BaseModel baseModel = await NetUtil().get(
|
|
|
|
API.manager.questionnairefindById,
|
|
|
|
API.manager.questionnairefindById,
|
|
|
|
params: {
|
|
|
|
params: {
|
|
|
@ -231,7 +227,7 @@ class ManagerFunc {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Future<BaseModel> questionnaireSubmit(
|
|
|
|
static Future<BaseModel> questionnaireSubmit(
|
|
|
|
int id, List<AppQuestionnaireAnswerSubmits> model) async {
|
|
|
|
int? id, List<AppQuestionnaireAnswerSubmits> model) async {
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
BaseModel baseModel = await NetUtil().post(
|
|
|
|
API.manager.questionnaireSubmit,
|
|
|
|
API.manager.questionnaireSubmit,
|
|
|
|
params: {
|
|
|
|
params: {
|
|
|
|