|
@@ -182,7 +182,7 @@ class UkLabourRepository extends GetxService {
|
|
|
return result.convert();
|
|
|
}
|
|
|
|
|
|
- /// 编辑用工请求发布
|
|
|
+ /// lab-request 的编辑用工请求发布
|
|
|
Future<HttpResult> editLabourRequestSubmit({
|
|
|
String? requestId,
|
|
|
String? templateId,
|
|
@@ -279,7 +279,104 @@ class UkLabourRepository extends GetxService {
|
|
|
return result.convert();
|
|
|
}
|
|
|
|
|
|
- /// 新增 labourequest用工请求发布
|
|
|
+ /// lab-request-review 的编辑用工请求发布
|
|
|
+ Future<HttpResult> editLabourRequestReviewSubmit({
|
|
|
+ String? requestId,
|
|
|
+ String? templateId,
|
|
|
+ String? jobStart,
|
|
|
+ String? jobEnd,
|
|
|
+ String? departmentId,
|
|
|
+ String? needNum,
|
|
|
+ String? salaryBy,
|
|
|
+ String? repeatDateStr,
|
|
|
+ String? amount,
|
|
|
+ String? certificate, // 多个逗号隔开
|
|
|
+ String? challenge25,
|
|
|
+ String? vehicle, // 多个逗号隔开
|
|
|
+ String? description,
|
|
|
+ String? employmentType,
|
|
|
+ String? eventName,
|
|
|
+ String? eventType,
|
|
|
+ String? passengers,
|
|
|
+ String? estRevenue,
|
|
|
+ String? position,
|
|
|
+ String? estCost,
|
|
|
+ dynamic? attUrl,
|
|
|
+ CancelToken? cancelToken,
|
|
|
+ }) async {
|
|
|
+
|
|
|
+ //参数
|
|
|
+ Map<String, dynamic> params = {};
|
|
|
+ params['request_id'] = requestId ?? "";
|
|
|
+ params['template_id'] = templateId ?? "";
|
|
|
+ params['job_start'] = jobStart ?? "";
|
|
|
+ params['job_end'] = jobEnd ?? "";
|
|
|
+ params['need_num'] = needNum ?? "";
|
|
|
+ if (!Utils.isEmpty(departmentId)) {
|
|
|
+ params["co_department_id"] = departmentId!;
|
|
|
+ }
|
|
|
+
|
|
|
+ params['salary_by'] = salaryBy ?? "";
|
|
|
+
|
|
|
+ if (!Utils.isEmpty(amount)) {
|
|
|
+ params["amount"] = amount!;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!Utils.isEmpty(certificate)){
|
|
|
+ params["certificate"] = certificate!;
|
|
|
+ }
|
|
|
+ if(!Utils.isEmpty(challenge25)){
|
|
|
+ params["challenge_25"] = challenge25!;
|
|
|
+ }
|
|
|
+ if(!Utils.isEmpty(vehicle)){
|
|
|
+ params["vehicle"] = vehicle!;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!Utils.isEmpty(repeatDateStr)) {
|
|
|
+ params["select"] = repeatDateStr!;
|
|
|
+ }
|
|
|
+
|
|
|
+ params['description'] = description ?? "";
|
|
|
+ params['employment_type'] = employmentType ?? "";
|
|
|
+ params['event_name'] = eventName ?? "";
|
|
|
+ params['event_type'] = eventType ?? "";
|
|
|
+ params['passengers'] = passengers ?? "";
|
|
|
+ params['est_revenue'] = estRevenue ?? "";
|
|
|
+ params['position'] = position ?? "";
|
|
|
+ params['est_cost'] = estCost ?? "";
|
|
|
+
|
|
|
+ //可能是file 也可能是 url
|
|
|
+ Map<String, String> filePathParams = {};
|
|
|
+ // 判断 http 或者 https 开头
|
|
|
+ if(Utils.isNotEmpty(attUrl)){
|
|
|
+ if(attUrl!.startsWith("http") || attUrl!.startsWith("https")){
|
|
|
+ params['att_url'] = attUrl;
|
|
|
+ }else {
|
|
|
+ filePathParams['att_url'] = attUrl;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ final result = await httpProvider.requestNetResult(
|
|
|
+ ApiConstants.apiLabourRequestReViewEditUK,
|
|
|
+ method: HttpMethod.POST,
|
|
|
+ params: params,
|
|
|
+ paths: filePathParams,
|
|
|
+ networkDebounce: true,
|
|
|
+ isShowLoadingDialog: true,
|
|
|
+ cancelToken: cancelToken,
|
|
|
+ );
|
|
|
+
|
|
|
+ //根据返回的结果,封装原始数据为Bean/Entity对象
|
|
|
+ if (result.isSuccess) {
|
|
|
+ //重新赋值data或list
|
|
|
+ return result.convert();
|
|
|
+ }
|
|
|
+ return result.convert();
|
|
|
+ }
|
|
|
+
|
|
|
+ /// lab-request 的新增 labourequest用工请求发布
|
|
|
Future<HttpResult> addLabourRequestSubmit({
|
|
|
String? templateId,
|
|
|
String? jobDate,
|