labour_repository.dart 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. import 'package:domain/entity/response/labour_request_edit_index_entity.dart';
  2. import 'package:domain/entity/response/labour_request_index_entity.dart';
  3. import 'package:domain/entity/response/labour_request_list_entity.dart';
  4. import 'package:domain/entity/response/labour_request_work_flow_entity.dart';
  5. import 'package:get/get.dart';
  6. import 'package:plugin_platform/dio_export.dart';
  7. import 'package:plugin_platform/http/http_provider.dart';
  8. import 'package:plugin_platform/http/http_result.dart';
  9. import 'package:shared/utils/util.dart';
  10. import '../constants/api_constants.dart';
  11. import '../entity/response/job_template_edit_index_entity.dart';
  12. import '../entity/response/labour_review_list_entity.dart';
  13. import '../entity/response/labour_review_status_entity.dart';
  14. /// 用工请求相关
  15. class LabourRepository extends GetxService {
  16. HttpProvider httpProvider;
  17. LabourRepository({required this.httpProvider});
  18. /// 获取用工请求的筛选选项
  19. Future<HttpResult<LabourRequestIndexEntity>> fetchLabourRequestIndex({
  20. CancelToken? cancelToken,
  21. }) async {
  22. final result = await httpProvider.requestNetResult(
  23. ApiConstants.apiLabourRequestIndex,
  24. cancelToken: cancelToken,
  25. );
  26. //根据返回的结果,封装原始数据为Bean/Entity对象
  27. if (result.isSuccess) {
  28. //重新赋值data或list
  29. final json = result.getDataJson();
  30. var data = LabourRequestIndexEntity.fromJson(json!);
  31. //重新赋值data或list
  32. return result.convert<LabourRequestIndexEntity>(data: data);
  33. }
  34. return result.convert();
  35. }
  36. /// 获取用工请求的主列表
  37. Future<HttpResult<LabourRequestListEntity>> fetchLabourRequestList(
  38. String? keyword,
  39. String? startDate,
  40. String? endDate,
  41. String? statusId,
  42. String? departmentId, {
  43. required int curPage,
  44. CancelToken? cancelToken,
  45. }) async {
  46. //参数
  47. Map<String, String> params = {};
  48. params["cur_page"] = curPage.toString();
  49. params["page_size"] = "20";
  50. if (!Utils.isEmpty(keyword)) {
  51. params["job_title"] = keyword!;
  52. }
  53. if (!Utils.isEmpty(startDate)) {
  54. params["job_start"] = startDate!;
  55. }
  56. if (!Utils.isEmpty(endDate)) {
  57. params["job_end"] = endDate!;
  58. }
  59. if (!Utils.isEmpty(statusId)) {
  60. params["co_status"] = statusId!;
  61. }
  62. if (!Utils.isEmpty(departmentId)) {
  63. params["co_department_id"] = departmentId!;
  64. }
  65. final result = await httpProvider.requestNetResult(
  66. ApiConstants.apiLabourRequestList,
  67. params: params,
  68. cancelToken: cancelToken,
  69. );
  70. //根据返回的结果,封装原始数据为Bean/Entity对象
  71. if (result.isSuccess) {
  72. //重新赋值data或list
  73. final json = result.getDataJson();
  74. var data = LabourRequestListEntity.fromJson(json!);
  75. //重新赋值data或list
  76. return result.convert<LabourRequestListEntity>(data: data);
  77. }
  78. return result.convert();
  79. }
  80. /// 根据ID获取主列表的Item数据,用于刷新Item
  81. Future<HttpResult<LabourRequestListEntity>> fetchItemByRequestId(
  82. String? requestId, {
  83. CancelToken? cancelToken,
  84. }) async {
  85. //参数
  86. Map<String, String> params = {};
  87. params["cur_page"] = "1";
  88. params["page_size"] = "1";
  89. if (!Utils.isEmpty(requestId)) {
  90. params["request_id"] = requestId!;
  91. }
  92. final result = await httpProvider.requestNetResult(
  93. ApiConstants.apiLabourRequestList,
  94. params: params,
  95. isShowLoadingDialog: true,
  96. cancelToken: cancelToken,
  97. );
  98. //根据返回的结果,封装原始数据为Bean/Entity对象
  99. if (result.isSuccess) {
  100. //重新赋值data或list
  101. final json = result.getDataJson();
  102. var data = LabourRequestListEntity.fromJson(json!);
  103. //重新赋值data或list
  104. return result.convert<LabourRequestListEntity>(data: data);
  105. }
  106. return result.convert();
  107. }
  108. /// 添加用工的选项
  109. Future<HttpResult<LabourRequestEditIndexEntity>> fetchLabourRequestAddOption({
  110. CancelToken? cancelToken,
  111. }) async {
  112. final result = await httpProvider.requestNetResult(
  113. ApiConstants.apiLabourRequestAddOption,
  114. isShowLoadingDialog: true,
  115. cancelToken: cancelToken,
  116. );
  117. //根据返回的结果,封装原始数据为Bean/Entity对象
  118. if (result.isSuccess) {
  119. //重新赋值data或list
  120. final json = result.getDataJson();
  121. var data = LabourRequestEditIndexEntity.fromJson(json!);
  122. //重新赋值data或list
  123. return result.convert<LabourRequestEditIndexEntity>(data: data);
  124. }
  125. return result.convert();
  126. }
  127. /// 添加用工请求发布
  128. Future<HttpResult> addLabourRequestSubmit(
  129. String? templateId,
  130. String? jobStart,
  131. String? jobEnd,
  132. String? departmentId,
  133. String? needNum,
  134. String? salaryBy,
  135. String? amount, {
  136. CancelToken? cancelToken,
  137. }) async {
  138. //参数
  139. Map<String, String> params = {};
  140. params['template_id'] = templateId ?? "";
  141. params['job_start'] = jobStart ?? "";
  142. params['job_end'] = jobEnd ?? "";
  143. params['need_num'] = needNum ?? "";
  144. if (!Utils.isEmpty(departmentId)) {
  145. params["co_department_id"] = departmentId!;
  146. }
  147. params['salary_by'] = salaryBy ?? "";
  148. if (!Utils.isEmpty(amount)) {
  149. params["amount"] = amount!;
  150. }
  151. final result = await httpProvider.requestNetResult(
  152. ApiConstants.apiLabourRequestAddSubmit,
  153. method: HttpMethod.POST,
  154. params: params,
  155. networkDebounce: true,
  156. isShowLoadingDialog: true,
  157. cancelToken: cancelToken,
  158. );
  159. //根据返回的结果,封装原始数据为Bean/Entity对象
  160. if (result.isSuccess) {
  161. //重新赋值data或list
  162. return result.convert();
  163. }
  164. return result.convert();
  165. }
  166. /// 用工的编辑详情
  167. Future<HttpResult<LabourRequestEditIndexEntity>> fetchLabourRequestEditDetail(
  168. String? requestId, {
  169. CancelToken? cancelToken,
  170. }) async {
  171. //参数
  172. Map<String, String> params = {};
  173. params['request_id'] = requestId ?? "";
  174. final result = await httpProvider.requestNetResult(
  175. ApiConstants.apiLabourRequestEditDetail,
  176. params: params,
  177. isShowLoadingDialog: true,
  178. cancelToken: cancelToken,
  179. );
  180. //根据返回的结果,封装原始数据为Bean/Entity对象
  181. if (result.isSuccess) {
  182. //重新赋值data或list
  183. final json = result.getDataJson();
  184. var data = LabourRequestEditIndexEntity.fromJson(json!);
  185. //重新赋值data或list
  186. return result.convert<LabourRequestEditIndexEntity>(data: data);
  187. }
  188. return result.convert();
  189. }
  190. /// 编辑用工请求发布
  191. Future<HttpResult> editLabourRequestSubmit(
  192. String? requestId,
  193. String? templateId,
  194. String? jobStart,
  195. String? jobEnd,
  196. String? departmentId,
  197. String? needNum,
  198. String? salaryBy,
  199. String? amount, {
  200. CancelToken? cancelToken,
  201. }) async {
  202. //参数
  203. Map<String, String> params = {};
  204. params['request_id'] = requestId ?? "";
  205. params['template_id'] = templateId ?? "";
  206. params['job_start'] = jobStart ?? "";
  207. params['job_end'] = jobEnd ?? "";
  208. params['need_num'] = needNum ?? "";
  209. if (!Utils.isEmpty(departmentId)) {
  210. params["co_department_id"] = departmentId!;
  211. }
  212. params['salary_by'] = salaryBy ?? "";
  213. if (!Utils.isEmpty(amount)) {
  214. params["amount"] = amount!;
  215. }
  216. final result = await httpProvider.requestNetResult(
  217. ApiConstants.apiLabourRequestEditSubmit,
  218. method: HttpMethod.POST,
  219. params: params,
  220. networkDebounce: true,
  221. isShowLoadingDialog: true,
  222. cancelToken: cancelToken,
  223. );
  224. //根据返回的结果,封装原始数据为Bean/Entity对象
  225. if (result.isSuccess) {
  226. //重新赋值data或list
  227. return result.convert();
  228. }
  229. return result.convert();
  230. }
  231. /// 撤回用工请求
  232. Future<HttpResult> recallLabourRequest(
  233. String? requestId, {
  234. CancelToken? cancelToken,
  235. }) async {
  236. //参数
  237. Map<String, String> params = {};
  238. params['request_id'] = requestId ?? "";
  239. final result = await httpProvider.requestNetResult(
  240. ApiConstants.apiLabourRequestRecall,
  241. method: HttpMethod.POST,
  242. params: params,
  243. networkDebounce: true,
  244. isShowLoadingDialog: true,
  245. cancelToken: cancelToken,
  246. );
  247. //根据返回的结果,封装原始数据为Bean/Entity对象
  248. if (result.isSuccess) {
  249. //重新赋值data或list
  250. return result.convert();
  251. }
  252. return result.convert();
  253. }
  254. /// 用工的审核详情工作流列表
  255. Future<HttpResult<LabourRequestWorkFlowEntity>> fetchLabourRequestWorkFlow(
  256. String? requestId, {
  257. CancelToken? cancelToken,
  258. }) async {
  259. //参数
  260. Map<String, String> params = {};
  261. if (!Utils.isEmpty(requestId)) {
  262. params["request_id"] = requestId!;
  263. }
  264. final result = await httpProvider.requestNetResult(
  265. ApiConstants.apiLabourRequestStateWorkFlow,
  266. params: params,
  267. cancelToken: cancelToken,
  268. );
  269. //根据返回的结果,封装原始数据为Bean/Entity对象
  270. if (result.isSuccess) {
  271. //重新赋值data或list
  272. final json = result.getDataJson();
  273. var data = LabourRequestWorkFlowEntity.fromJson(json!);
  274. //重新赋值data或list
  275. return result.convert<LabourRequestWorkFlowEntity>(data: data);
  276. }
  277. return result.convert();
  278. }
  279. /// 添加工作模板的详情或选项数据
  280. Future<HttpResult<JobTemplateEditIndexEntity>> fetchJobTemplateAddIndex({
  281. CancelToken? cancelToken,
  282. }) async {
  283. final result = await httpProvider.requestNetResult(
  284. ApiConstants.apiJobTemplateAddIndexSG,
  285. isShowLoadingDialog: true,
  286. cancelToken: cancelToken,
  287. );
  288. //根据返回的结果,封装原始数据为Bean/Entity对象
  289. if (result.isSuccess) {
  290. //重新赋值data或list
  291. final json = result.getDataJson();
  292. var data = JobTemplateEditIndexEntity.fromJson(json!);
  293. //重新赋值data或list
  294. return result.convert<JobTemplateEditIndexEntity>(data: data);
  295. }
  296. return result.convert();
  297. }
  298. /// 编辑工作模板的详情或选项数据
  299. Future<HttpResult<JobTemplateEditIndexEntity>> fetchJobTemplateEditIndex(
  300. String? templateId, {
  301. CancelToken? cancelToken,
  302. }) async {
  303. Map<String, String> params = {};
  304. params["template_id"] = templateId ?? "";
  305. final result = await httpProvider.requestNetResult(
  306. ApiConstants.apiJobTemplateEditIndexSG,
  307. params: params,
  308. isShowLoadingDialog: true,
  309. cancelToken: cancelToken,
  310. );
  311. //根据返回的结果,封装原始数据为Bean/Entity对象
  312. if (result.isSuccess) {
  313. //重新赋值data或list
  314. final json = result.getDataJson();
  315. var data = JobTemplateEditIndexEntity.fromJson(json!);
  316. //重新赋值data或list
  317. return result.convert<JobTemplateEditIndexEntity>(data: data);
  318. }
  319. return result.convert();
  320. }
  321. /// 添加工作模板的提交
  322. Future<HttpResult> addLabourTemplateSubmit(
  323. String? name,
  324. String? description,
  325. String? note,
  326. String? age,
  327. String? sex,
  328. String? language, {
  329. CancelToken? cancelToken,
  330. }) async {
  331. //参数
  332. Map<String, String> params = {};
  333. params['job_title'] = name ?? "";
  334. if (!Utils.isEmpty(description)) {
  335. params["description"] = description!;
  336. }
  337. if (!Utils.isEmpty(note)) {
  338. params["note"] = note!;
  339. }
  340. if (!Utils.isEmpty(age)) {
  341. params["age"] = age!;
  342. }
  343. if (!Utils.isEmpty(sex)) {
  344. params["gender"] = sex!;
  345. }
  346. if (!Utils.isEmpty(language)) {
  347. params["language"] = language!;
  348. }
  349. final result = await httpProvider.requestNetResult(
  350. ApiConstants.apiJobTemplateAddSubmitSG,
  351. method: HttpMethod.POST,
  352. params: params,
  353. networkDebounce: true,
  354. isShowLoadingDialog: true,
  355. cancelToken: cancelToken,
  356. );
  357. //根据返回的结果,封装原始数据为Bean/Entity对象
  358. if (result.isSuccess) {
  359. //重新赋值data或list
  360. return result.convert();
  361. }
  362. return result.convert();
  363. }
  364. /// 编辑工作模板的提交
  365. Future<HttpResult> editLabourTemplateSubmit(
  366. String? templateId,
  367. String? name,
  368. String? description,
  369. String? note,
  370. String? age,
  371. String? sex,
  372. String? language, {
  373. CancelToken? cancelToken,
  374. }) async {
  375. //参数
  376. Map<String, String> params = {};
  377. params['job_title'] = name ?? "";
  378. params['template_id'] = templateId ?? "";
  379. if (!Utils.isEmpty(description)) {
  380. params["description"] = description!;
  381. }
  382. if (!Utils.isEmpty(note)) {
  383. params["note"] = note!;
  384. }
  385. if (!Utils.isEmpty(age)) {
  386. params["age"] = age!;
  387. }
  388. if (!Utils.isEmpty(sex)) {
  389. params["gender"] = sex!;
  390. }
  391. if (!Utils.isEmpty(language)) {
  392. params["language"] = language!;
  393. }
  394. final result = await httpProvider.requestNetResult(
  395. ApiConstants.apiJobTemplateEditSubmitSG,
  396. method: HttpMethod.POST,
  397. params: params,
  398. networkDebounce: true,
  399. isShowLoadingDialog: true,
  400. cancelToken: cancelToken,
  401. );
  402. //根据返回的结果,封装原始数据为Bean/Entity对象
  403. if (result.isSuccess) {
  404. //重新赋值data或list
  405. return result.convert();
  406. }
  407. return result.convert();
  408. }
  409. /// 用工审核选项
  410. Future<HttpResult<LabourRequestIndexEntity>> fetchLabourReviewIndex({
  411. CancelToken? cancelToken,
  412. }) async {
  413. final result = await httpProvider.requestNetResult(
  414. ApiConstants.apiLabourReviewIndex,
  415. cancelToken: cancelToken,
  416. );
  417. //根据返回的结果,封装原始数据为Bean/Entity对象
  418. if (result.isSuccess) {
  419. //重新赋值data或list
  420. final json = result.getDataJson();
  421. var data = LabourRequestIndexEntity.fromJson(json!);
  422. //重新赋值data或list
  423. return result.convert<LabourRequestIndexEntity>(data: data);
  424. }
  425. return result.convert();
  426. }
  427. /// 用工审核列表
  428. Future<HttpResult<LabourReviewListEntity>> fetchLabourReviewList(
  429. String? keyword,
  430. String? startDate,
  431. String? endDate,
  432. String? departmentId, {
  433. required int curPage,
  434. CancelToken? cancelToken,
  435. }) async {
  436. //参数
  437. Map<String, String> params = {};
  438. params["cur_page"] = curPage.toString();
  439. params["page_size"] = "20";
  440. if (!Utils.isEmpty(keyword)) {
  441. params["job_title"] = keyword!;
  442. }
  443. if (!Utils.isEmpty(startDate)) {
  444. params["job_start"] = startDate!;
  445. }
  446. if (!Utils.isEmpty(endDate)) {
  447. params["job_end"] = endDate!;
  448. }
  449. if (!Utils.isEmpty(departmentId)) {
  450. params["department_id"] = departmentId!;
  451. }
  452. final result = await httpProvider.requestNetResult(
  453. ApiConstants.apiLabourReviewTable,
  454. params: params,
  455. cancelToken: cancelToken,
  456. );
  457. //根据返回的结果,封装原始数据为Bean/Entity对象
  458. if (result.isSuccess) {
  459. //重新赋值data或list
  460. final json = result.getDataJson();
  461. var data = LabourReviewListEntity.fromJson(json!);
  462. //重新赋值data或list
  463. return result.convert<LabourReviewListEntity>(data: data);
  464. }
  465. return result.convert();
  466. }
  467. /// 根据ID获取主列表的Item数据,用于刷新审核列表Item
  468. Future<HttpResult<LabourReviewListEntity>> fetchItemByRecordId(
  469. String? recordId, {
  470. CancelToken? cancelToken,
  471. }) async {
  472. //参数
  473. Map<String, String> params = {};
  474. params["cur_page"] = "1";
  475. params["page_size"] = "1";
  476. if (!Utils.isEmpty(recordId)) {
  477. params["record_id"] = recordId!;
  478. }
  479. final result = await httpProvider.requestNetResult(
  480. ApiConstants.apiLabourReviewTable,
  481. params: params,
  482. isShowLoadingDialog: true,
  483. cancelToken: cancelToken,
  484. );
  485. //根据返回的结果,封装原始数据为Bean/Entity对象
  486. if (result.isSuccess) {
  487. //重新赋值data或list
  488. final json = result.getDataJson();
  489. var data = LabourReviewListEntity.fromJson(json!);
  490. //重新赋值data或list
  491. return result.convert<LabourReviewListEntity>(data: data);
  492. }
  493. return result.convert();
  494. }
  495. /// 用工审核的编辑详情
  496. Future<HttpResult<LabourRequestEditIndexEntity>> fetchLabourReviewDetail(
  497. String? requestId, {
  498. CancelToken? cancelToken,
  499. }) async {
  500. //参数
  501. Map<String, String> params = {};
  502. params['request_id'] = requestId ?? "";
  503. final result = await httpProvider.requestNetResult(
  504. ApiConstants.apiLabourReviewDetail,
  505. params: params,
  506. isShowLoadingDialog: true,
  507. cancelToken: cancelToken,
  508. );
  509. //根据返回的结果,封装原始数据为Bean/Entity对象
  510. if (result.isSuccess) {
  511. //重新赋值data或list
  512. final json = result.getDataJson();
  513. var data = LabourRequestEditIndexEntity.fromJson(json!);
  514. //重新赋值data或list
  515. return result.convert<LabourRequestEditIndexEntity>(data: data);
  516. }
  517. return result.convert();
  518. }
  519. /// 用工审核的编辑提交
  520. Future<HttpResult> editLabourReviewSubmit(
  521. String? requestId,
  522. String? templateId,
  523. String? jobStart,
  524. String? jobEnd,
  525. String? departmentId,
  526. String? needNum,
  527. String? salaryBy,
  528. String? amount, {
  529. CancelToken? cancelToken,
  530. }) async {
  531. //参数
  532. Map<String, String> params = {};
  533. params['request_id'] = requestId ?? "";
  534. params['template_id'] = templateId ?? "";
  535. params['job_start'] = jobStart ?? "";
  536. params['job_end'] = jobEnd ?? "";
  537. params['need_num'] = needNum ?? "";
  538. if (!Utils.isEmpty(departmentId)) {
  539. params["co_department_id"] = departmentId!;
  540. }
  541. params['salary_by'] = salaryBy ?? "";
  542. if (!Utils.isEmpty(amount)) {
  543. params["amount"] = amount!;
  544. }
  545. final result = await httpProvider.requestNetResult(
  546. ApiConstants.apiLabourReviewEdit,
  547. method: HttpMethod.POST,
  548. params: params,
  549. networkDebounce: true,
  550. isShowLoadingDialog: true,
  551. cancelToken: cancelToken,
  552. );
  553. //根据返回的结果,封装原始数据为Bean/Entity对象
  554. if (result.isSuccess) {
  555. //重新赋值data或list
  556. return result.convert();
  557. }
  558. return result.convert();
  559. }
  560. /// 用工审核的审核流程列表
  561. Future<HttpResult<LabourReviewStatusEntity>> fetchLabourReviewStatusView(
  562. String? requestId, {
  563. CancelToken? cancelToken,
  564. }) async {
  565. //参数
  566. Map<String, String> params = {};
  567. params['request_id'] = requestId ?? "";
  568. final result = await httpProvider.requestNetResult(
  569. ApiConstants.apiLabourReviewStatusView,
  570. params: params,
  571. cancelToken: cancelToken,
  572. );
  573. //根据返回的结果,封装原始数据为Bean/Entity对象
  574. if (result.isSuccess) {
  575. //重新赋值data或list
  576. final json = result.getDataJson();
  577. var data = LabourReviewStatusEntity.fromJson(json!);
  578. //重新赋值data或list
  579. return result.convert<LabourReviewStatusEntity>(data: data);
  580. }
  581. return result.convert();
  582. }
  583. /// 用工审核的批量同意
  584. Future<HttpResult> approveLabourReviews(
  585. String? recordIds, {
  586. CancelToken? cancelToken,
  587. }) async {
  588. //参数
  589. Map<String, String> params = {};
  590. params['record_ids'] = recordIds ?? "";
  591. final result = await httpProvider.requestNetResult(
  592. ApiConstants.apiLabourReviewApprove,
  593. method: HttpMethod.POST,
  594. params: params,
  595. networkDebounce: true,
  596. isShowLoadingDialog: true,
  597. cancelToken: cancelToken,
  598. );
  599. //根据返回的结果,封装原始数据为Bean/Entity对象
  600. if (result.isSuccess) {
  601. //重新赋值data或list
  602. return result.convert();
  603. }
  604. return result.convert();
  605. }
  606. /// 用工审核的批量拒绝
  607. Future<HttpResult> rejectLabourReviews(
  608. String? recordIds,
  609. String? reason, {
  610. CancelToken? cancelToken,
  611. }) async {
  612. //参数
  613. Map<String, String> params = {};
  614. params['record_ids'] = recordIds ?? "";
  615. if (Utils.isNotEmpty(reason)) {
  616. params['audit_mark'] = reason ?? "";
  617. }
  618. final result = await httpProvider.requestNetResult(
  619. ApiConstants.apiLabourReviewReject,
  620. method: HttpMethod.POST,
  621. params: params,
  622. networkDebounce: true,
  623. isShowLoadingDialog: true,
  624. cancelToken: cancelToken,
  625. );
  626. //根据返回的结果,封装原始数据为Bean/Entity对象
  627. if (result.isSuccess) {
  628. //重新赋值data或list
  629. return result.convert();
  630. }
  631. return result.convert();
  632. }
  633. }