Explorar el Código

Labour Request 的 模块重构,页面与接口的调整,新页面相关逻辑

liukai hace 6 días
padre
commit
3494a93c83
Se han modificado 59 ficheros con 2977 adiciones y 1816 borrados
  1. 0 3
      packages/cpt_sg/lib/modules/agency/contract_list/contract_list_controller.dart
  2. 0 1
      packages/cpt_sg/lib/modules/agency/contract_rate_edit_list/contract_rate_edit_list_controller.dart
  3. 0 5
      packages/cpt_sg/lib/modules/agency/position_list/position_list_controller.dart
  4. 0 2
      packages/cpt_sg/lib/modules/agency/position_list/position_list_state.dart
  5. 1 1
      packages/cpt_sg/lib/modules/labour/job_list/job_list_controller.dart
  6. 0 0
      packages/cpt_sg/lib/modules/job/job_list/job_list_filter.dart
  7. 0 0
      packages/cpt_sg/lib/modules/job/job_list/job_list_item.dart
  8. 0 0
      packages/cpt_sg/lib/modules/job/job_list/job_list_page.dart
  9. 0 0
      packages/cpt_sg/lib/modules/job/job_list/job_list_state.dart
  10. 0 0
      packages/cpt_sg/lib/modules/job/job_list_edit/job_list_edit_controller.dart
  11. 0 0
      packages/cpt_sg/lib/modules/job/job_list_edit/job_list_edit_page.dart
  12. 0 0
      packages/cpt_sg/lib/modules/job/job_list_edit/job_list_edit_state.dart
  13. 0 1
      packages/cpt_sg/lib/modules/labour/job_template_list/job_template_list_controller.dart
  14. 250 0
      packages/cpt_sg/lib/modules/labour/labour_request_add/AgencyNeedNumberWidget.dart
  15. 48 37
      packages/cpt_sg/lib/modules/labour/labour_request_add/labour_request_add_controller.dart
  16. 40 127
      packages/cpt_sg/lib/modules/labour/labour_request_add/labour_request_add_page.dart
  17. 7 26
      packages/cpt_sg/lib/modules/labour/labour_request_add/labour_request_add_state.dart
  18. 77 82
      packages/cpt_sg/lib/modules/labour/labour_request_edit/labour_request_edit_controller.dart
  19. 94 31
      packages/cpt_sg/lib/modules/labour/labour_request_edit/labour_request_edit_page.dart
  20. 5 7
      packages/cpt_sg/lib/modules/labour/labour_request_edit/labour_request_edit_state.dart
  21. 95 21
      packages/cpt_sg/lib/modules/labour/labour_request_list/labour_request_filter.dart
  22. 122 42
      packages/cpt_sg/lib/modules/labour/labour_request_list/labour_request_item.dart
  23. 47 33
      packages/cpt_sg/lib/modules/labour/labour_request_list/labour_request_list_controller.dart
  24. 9 23
      packages/cpt_sg/lib/modules/labour/labour_request_list/labour_request_list_page.dart
  25. 6 8
      packages/cpt_sg/lib/modules/labour/labour_request_list/labour_request_list_state.dart
  26. 98 0
      packages/cpt_sg/lib/modules/labour/labour_review_workflow/labour_request_workflow_controller.dart
  27. 228 0
      packages/cpt_sg/lib/modules/labour/labour_review_workflow/labour_request_workflow_item.dart
  28. 102 0
      packages/cpt_sg/lib/modules/labour/labour_review_workflow/labour_request_workflow_page.dart
  29. 10 0
      packages/cpt_sg/lib/modules/labour/labour_review_workflow/labour_request_workflow_state.dart
  30. 1 1
      packages/cpt_sg/lib/modules/main/main_controller.dart
  31. 1 1
      packages/cpt_sg/lib/modules/review/labour_review_list/labour_review_controller.dart
  32. 1 1
      packages/cpt_sg/lib/modules/review/labour_review_workflow/labour_review_workflow_controller.dart
  33. 2 2
      packages/cpt_sg/lib/modules/review/labour_review_workflow/labour_request_workflow_page.dart
  34. 0 0
      packages/cpt_sg/lib/modules/review/labour_review_workflow/labour_review_workflow_state.dart
  35. 10 3
      packages/cpt_sg/lib/router/sg_router.dart
  36. 22 6
      packages/cs_domain/lib/constants/api_constants.dart
  37. 17 0
      packages/cs_domain/lib/entity/agency_need_number.dart
  38. 0 45
      packages/cs_domain/lib/entity/response/labour_request_s_g_add_index_entity.dart
  39. 0 142
      packages/cs_domain/lib/entity/response/labour_request_s_g_edit_index_entity.dart
  40. 0 43
      packages/cs_domain/lib/entity/response/labour_request_s_g_entity.dart
  41. 0 57
      packages/cs_domain/lib/entity/response/labour_request_s_g_list_entity.dart
  42. 51 0
      packages/cs_domain/lib/entity/response/s_g_labour_request_add_option_entity.dart
  43. 114 0
      packages/cs_domain/lib/entity/response/s_g_labour_request_detail_entity.dart
  44. 33 0
      packages/cs_domain/lib/entity/response/s_g_labour_request_option_entity.dart
  45. 57 0
      packages/cs_domain/lib/entity/response/s_g_labour_request_table_entity.dart
  46. 132 0
      packages/cs_domain/lib/entity/response/s_g_labour_request_worl_flow_entity.dart
  47. 45 44
      packages/cs_domain/lib/generated/json/base/json_convert_content.dart
  48. 0 89
      packages/cs_domain/lib/generated/json/labour_request_s_g_add_index_entity.g.dart
  49. 0 388
      packages/cs_domain/lib/generated/json/labour_request_s_g_edit_index_entity.g.dart
  50. 0 79
      packages/cs_domain/lib/generated/json/labour_request_s_g_entity.g.dart
  51. 0 129
      packages/cs_domain/lib/generated/json/labour_request_s_g_list_entity.g.dart
  52. 100 0
      packages/cs_domain/lib/generated/json/s_g_labour_request_add_option_entity.g.dart
  53. 329 0
      packages/cs_domain/lib/generated/json/s_g_labour_request_detail_entity.g.dart
  54. 66 0
      packages/cs_domain/lib/generated/json/s_g_labour_request_option_entity.g.dart
  55. 136 0
      packages/cs_domain/lib/generated/json/s_g_labour_request_table_entity.g.dart
  56. 362 0
      packages/cs_domain/lib/generated/json/s_g_labour_request_worl_flow_entity.g.dart
  57. 254 334
      packages/cs_domain/lib/repository/labour_sg_repository.dart
  58. 2 1
      packages/cs_router/lib/path/router_path.dart
  59. 3 1
      packages/cs_widgets/lib/shatter/round_my_text_field.dart

+ 0 - 3
packages/cpt_sg/lib/modules/agency/contract_list/contract_list_controller.dart

@@ -2,9 +2,6 @@ import 'package:cpt_sg/modules/agency/contract_add/contract_add_page.dart';
 import 'package:cpt_sg/modules/agency/contract_rate_list/contract_rate_list_page.dart';
 import 'package:domain/entity/response/contract_option_entity.dart';
 import 'package:domain/entity/response/contract_table_entity.dart';
-import 'package:domain/entity/response/labour_request_s_g_list_entity.dart';
-
-import 'package:domain/entity/response/labour_request_index_entity.dart';
 import 'package:domain/repository/sg_agency_repository.dart';
 import 'package:get/get.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';

+ 0 - 1
packages/cpt_sg/lib/modules/agency/contract_rate_edit_list/contract_rate_edit_list_controller.dart

@@ -1,5 +1,4 @@
 import 'package:domain/entity/response/contract_position_rate_table_entity.dart';
-import 'package:domain/entity/response/labour_request_s_g_list_entity.dart';
 import 'package:domain/repository/sg_agency_repository.dart';
 import 'package:get/get.dart';
 import 'package:plugin_platform/engine/dialog/dialog_engine.dart';

+ 0 - 5
packages/cpt_sg/lib/modules/agency/position_list/position_list_controller.dart

@@ -1,20 +1,15 @@
-import 'package:domain/entity/response/labour_request_s_g_list_entity.dart';
 import 'package:domain/entity/response/position_table_entity.dart';
-import 'package:domain/repository/labour_sg_repository.dart';
 
-import 'package:domain/entity/response/labour_request_index_entity.dart';
 import 'package:domain/repository/sg_agency_repository.dart';
 import 'package:get/get.dart';
 import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
 import 'package:plugin_platform/engine/notify/notify_engine.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
-import 'package:plugin_platform/http/http_result.dart';
 import 'package:widgets/dialog/app_default_dialog.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
 
-import '../agency_add/agency_add_page.dart';
 import '../position_add/position_add_page.dart';
 import 'position_list_state.dart';
 

+ 0 - 2
packages/cpt_sg/lib/modules/agency/position_list/position_list_state.dart

@@ -1,5 +1,3 @@
-import 'package:domain/entity/response/labour_request_index_entity.dart';
-import 'package:domain/entity/response/labour_request_s_g_list_entity.dart';
 import 'package:domain/entity/response/position_table_entity.dart';
 import 'package:flutter/material.dart';
 

+ 1 - 1
packages/cpt_sg/lib/modules/labour/job_list/job_list_controller.dart

@@ -15,7 +15,7 @@ import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../job_list_edit/job_list_edit_page.dart';
-import '../labour_request_add/labour_request_add_page.dart';
+import '../../labour/labour_request_add/labour_request_add_page.dart';
 import 'job_list_filter.dart';
 import 'job_list_state.dart';
 

packages/cpt_sg/lib/modules/labour/job_list/job_list_filter.dart → packages/cpt_sg/lib/modules/job/job_list/job_list_filter.dart


packages/cpt_sg/lib/modules/labour/job_list/job_list_item.dart → packages/cpt_sg/lib/modules/job/job_list/job_list_item.dart


packages/cpt_sg/lib/modules/labour/job_list/job_list_page.dart → packages/cpt_sg/lib/modules/job/job_list/job_list_page.dart


packages/cpt_sg/lib/modules/labour/job_list/job_list_state.dart → packages/cpt_sg/lib/modules/job/job_list/job_list_state.dart


packages/cpt_sg/lib/modules/labour/job_list_edit/job_list_edit_controller.dart → packages/cpt_sg/lib/modules/job/job_list_edit/job_list_edit_controller.dart


packages/cpt_sg/lib/modules/labour/job_list_edit/job_list_edit_page.dart → packages/cpt_sg/lib/modules/job/job_list_edit/job_list_edit_page.dart


packages/cpt_sg/lib/modules/labour/job_list_edit/job_list_edit_state.dart → packages/cpt_sg/lib/modules/job/job_list_edit/job_list_edit_state.dart


+ 0 - 1
packages/cpt_sg/lib/modules/labour/job_template_list/job_template_list_controller.dart

@@ -10,7 +10,6 @@ import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../job_template_add/job_template_add_page.dart';
-import 'add_edit_template.dart';
 import 'job_template_list_state.dart';
 
 class JobTemplateListController extends GetxController with DioCancelableMixin {

+ 250 - 0
packages/cpt_sg/lib/modules/labour/labour_request_add/AgencyNeedNumberWidget.dart

@@ -0,0 +1,250 @@
+import 'package:cs_resources/constants/color_constants.dart';
+import 'package:cs_resources/generated/assets.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:plugin_basic/basic_export.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/picker/option_pick_util.dart';
+import 'package:widgets/shatter/round_my_text_field.dart';
+import 'package:domain/entity/agency_need_number.dart';
+
+/*
+ * 代理商选择人数的控件封装
+ * 选择性别限制的数量或者不限制性别限制的数量
+ */
+class AgencyNeedNumberWidget extends StatefulWidget {
+  final String? agencyId;
+  final String? agencyName;
+
+  AgencyNeedNumberWidget({
+    this.agencyId,
+    this.agencyName,
+    Key? key,
+  }) : super(key: key ?? GlobalKey<AgencyNeedNumberState>()); // 使用新的 GlobalKey
+
+  @override
+  State<AgencyNeedNumberWidget> createState() => AgencyNeedNumberState();
+}
+
+class AgencyNeedNumberState extends State<AgencyNeedNumberWidget> {
+  int limitType = 0;
+  List<String> limitTypeList = [
+    "Gender Unlimited".tr,
+    "Gender Limited".tr,
+  ];
+
+  final Map<String, Map<String, dynamic>> formData = {
+    'need_male': {
+      'value': '',
+      'controller': TextEditingController(),
+      'focusNode': FocusNode(),
+      'hintText': 'Male'.tr,
+      'obsecure': false,
+    },
+    'need_female': {
+      'value': '',
+      'controller': TextEditingController(),
+      'focusNode': FocusNode(),
+      'hintText': 'Female'.tr,
+      'obsecure': false,
+    },
+    'need_no': {
+      'value': '',
+      'controller': TextEditingController(),
+      'focusNode': FocusNode(),
+      'hintText': 'Needs Num'.tr,
+      'obsecure': false,
+    },
+  };
+
+  @override
+  void initState() {
+    super.initState();
+    limitType = 0;
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      children: [
+        //中介性别
+        MyTextView(
+          widget.agencyName ?? "-",
+          fontSize: 15,
+          isFontRegular: true,
+          marginBottom: 7,
+          textColor: Colors.white,
+          marginTop: 15,
+        ),
+
+        Row(
+          children: [
+            Container(
+              padding: const EdgeInsets.only(left: 16, right: 10),
+              margin: const EdgeInsets.only(right: 12),
+              height: 45,
+              decoration: BoxDecoration(
+                color: const Color(0xFF4DCFF6).withOpacity(0.2),
+                borderRadius: const BorderRadius.all(Radius.circular(5)),
+              ),
+              child: Row(
+                mainAxisSize: MainAxisSize.max,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                mainAxisAlignment: MainAxisAlignment.start,
+                children: [
+                  MyTextView(
+                    limitTypeList[limitType],
+                    fontSize: 14,
+                    textHintColor: ColorConstants.textGrayAECAE5,
+                    isFontRegular: true,
+                    textColor: ColorConstants.white,
+                  ).expanded(),
+                  //下拉选图标
+                  const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
+                ],
+              ),
+            ).onTap(() {
+              FocusScope.of(context).unfocus();
+              pickLimitType();
+            }).expanded(flex: 45),
+
+            //输入框-不限制性别
+            Visibility(
+              visible: limitType == 0,
+              child: CustomTextField(
+                formKey: "need_no",
+                marginLeft: 0,
+                marginRight: 0,
+                paddingTop: 0,
+                paddingBottom: 0,
+                height: 45,
+                fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(0.2),
+                inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
+                textInputType: TextInputType.number,
+                formData: formData,
+                textInputAction: TextInputAction.done,
+                onSubmit: (key, value) {
+                  FocusScope.of(context).unfocus();
+                },
+              ).expanded(flex: 55),
+            ),
+
+            //输入框组-限制性别
+            Visibility(
+              visible: limitType != 0,
+              child: Row(
+                children: [
+                  Row(
+                    children: [
+                      MyTextView(
+                        "M",
+                        fontSize: 15,
+                        paddingLeft: 10,
+                        isFontRegular: true,
+                        textColor: ColorConstants.white,
+                      ),
+                      CustomTextField(
+                        formKey: "need_male",
+                        marginLeft: 0,
+                        marginRight: 0,
+                        paddingTop: 0,
+                        paddingBottom: 0,
+                        paddingLeft: 10,
+                        paddingRight: 10,
+                        height: 45,
+                        cornerRadius: 0,
+                        fillBackgroundColor: Colors.transparent,
+                        inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
+                        textInputType: TextInputType.number,
+                        formData: formData,
+                        textInputAction: TextInputAction.done,
+                        onSubmit: (key, value) {
+                          FocusScope.of(context).unfocus();
+                        },
+                      ).expanded(),
+                    ],
+                  )
+                      .decorated(
+                        color: const Color(0xFF4DCFF6).withOpacity(0.2),
+                        borderRadius: const BorderRadius.all(Radius.circular(5)),
+                      )
+                      .expanded(),
+                  const SizedBox(width: 12),
+                  Row(
+                    children: [
+                      MyTextView(
+                        "F",
+                        fontSize: 15,
+                        paddingLeft: 10,
+                        isFontRegular: true,
+                        textColor: ColorConstants.white,
+                      ),
+                      CustomTextField(
+                        formKey: "need_female",
+                        marginLeft: 0,
+                        marginRight: 0,
+                        paddingTop: 0,
+                        paddingBottom: 0,
+                        paddingLeft: 10,
+                        paddingRight: 10,
+                        height: 45,
+                        cornerRadius: 0,
+                        fillBackgroundColor: Colors.transparent,
+                        inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
+                        textInputType: TextInputType.number,
+                        formData: formData,
+                        textInputAction: TextInputAction.done,
+                        onSubmit: (key, value) {
+                          FocusScope.of(context).unfocus();
+                        },
+                      ).expanded(),
+                    ],
+                  )
+                      .decorated(
+                        color: const Color(0xFF4DCFF6).withOpacity(0.2),
+                        borderRadius: const BorderRadius.all(Radius.circular(5)),
+                      )
+                      .expanded(),
+                ],
+              ).expanded(flex: 55),
+            ),
+          ],
+        ),
+      ],
+    );
+  }
+
+  //选择分类
+  void pickLimitType() {
+    OptionPickerUtil.showCupertinoOptionPicker(
+      items: limitTypeList,
+      initialSelectIndex: limitType,
+      onPickerChanged: (_, index) {
+        setState(() {
+          limitType = index;
+        });
+      },
+    );
+  }
+
+  // 返回 AgencyNeedNumberEntity 对象
+  AgencyNeedNumberEntity getAgencyNeedNumberEntity() {
+    AgencyNeedNumberEntity entity = AgencyNeedNumberEntity();
+    entity.isInHouse = widget.agencyId != null && (widget.agencyId == "0");
+    entity.agencyId = widget.agencyId;
+    entity.agencyName = widget.agencyName;
+    entity.sexLimit = limitType; // 设置性别限制
+    if (limitType == 0) {
+      // 不限制性别的总人数
+      entity.needNum = int.tryParse(formData['need_no']!['controller']!.text) ?? 0;
+    } else {
+      // 限制性别
+      entity.maleLimit = int.tryParse(formData['need_male']!['controller']!.text) ?? 0;
+      entity.femaleLimit = int.tryParse(formData['need_female']!['controller']!.text) ?? 0;
+    }
+    return entity;
+  }
+}

+ 48 - 37
packages/cpt_sg/lib/modules/labour/labour_request_add/labour_request_add_controller.dart

@@ -1,3 +1,4 @@
+import 'package:domain/entity/agency_need_number.dart';
 import 'package:domain/repository/labour_sg_repository.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:get/get.dart';
@@ -5,10 +6,12 @@ import 'package:plugin_platform/engine/notify/notify_engine.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:shared/utils/date_time_utils.dart';
+import 'package:shared/utils/log_utils.dart';
 import 'package:shared/utils/util.dart';
 import 'package:widgets/picker/date_picker_util.dart';
 import 'package:widgets/picker/option_pick_util.dart';
 
+import 'AgencyNeedNumberWidget.dart';
 import 'labour_request_add_state.dart';
 
 class LabourRequestAddController extends GetxController with DioCancelableMixin {
@@ -17,12 +20,36 @@ class LabourRequestAddController extends GetxController with DioCancelableMixin
 
   // 获取添加选项数据
   void fetchLabourRequestAddIndex() async {
-    var result = await _labourRepository.fetchLabourRequestAddIndex(
+    var result = await _labourRepository.fetchLabourRequestAddOption(
       cancelToken: cancelToken,
     );
 
     if (result.isSuccess) {
       state.indexEntity = result.data;
+
+      state.agencyKeys.clear();
+      state.agencyWidgets.clear();
+
+      state.agencyWidgets = state.indexEntity!.agencyList.map((e) {
+        final key = GlobalKey<AgencyNeedNumberState>();
+        state.agencyKeys.add(key); // 存储 key
+        return AgencyNeedNumberWidget(
+          key: key,
+          agencyId: e.agencyId,
+          agencyName: e.agencyName,
+        );
+      }).toList(growable: true);
+
+      // 添加 InHouse 的 AgencyNeedNumberWidget
+      final inHouseKey = GlobalKey<AgencyNeedNumberState>();
+      state.agencyKeys.add(inHouseKey);
+      final inHouseWidget = AgencyNeedNumberWidget(
+        key: inHouseKey,
+        agencyId: "0",
+        agencyName: "In House",
+      );
+      state.agencyWidgets.add(inHouseWidget);
+
       update();
     } else {
       ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
@@ -159,15 +186,8 @@ class LabourRequestAddController extends GetxController with DioCancelableMixin
 
   // 提交LabourRequest表单
   void doSubmit() async {
-    var maleNoController = state.formData['need_male']!['controller'];
-    var femaleNoController = state.formData['need_female']!['controller'];
-    var needNoController = state.formData['need_no']!['controller'];
-    var remarkController = state.formData['remark']!['controller'];
-
-    String maleNo = maleNoController.text.toString();
-    String femaleNo = femaleNoController.text.toString();
-    String needNo = needNoController.text.toString();
-    String remark = remarkController.text.toString();
+    TextEditingController remarkController = state.formData['remark']!['controller'];
+    String? remark = remarkController.text;
 
     if (Utils.isEmpty(state.selectedJobTitleId)) {
       ToastEngine.show("Select Job Title".tr);
@@ -189,32 +209,23 @@ class LabourRequestAddController extends GetxController with DioCancelableMixin
       return;
     }
 
-    if (state.genderOptionType == 0) {
-      if (Utils.isEmpty(needNo)) {
-        ToastEngine.show("Enter No. of Staff".tr);
-        return;
-      }
-    } else {
-      if (Utils.isEmpty(maleNo) || Utils.isEmpty(femaleNo)) {
-        ToastEngine.show("Enter No. of Staff of The Corresponding Gender".tr);
-        return;
-      }
-    }
-
-    var result = await _labourRepository.submitLabourRequestAdd(
-      state.selectedJobTitleId,
-      DateTimeUtils.formatDate(state.selectedStartTime),
-      DateTimeUtils.formatDate(state.selectedEndTime),
-      DateTimeUtils.formatDate(state.selectedRepeatStartTime, format: "yyyy-MM-dd"),
-      DateTimeUtils.formatDate(state.selectedRepeatEndTime, format: "yyyy-MM-dd"),
-      state.selectedOutletId,
-      state.genderOptionType,
-      maleNo,
-      femaleNo,
-      needNo,
-      state.selectRequestTypeId,
-      state.selectPositionId,
-      remark,
+    // 获取所有 AgencyNeedNumberEntity
+    List<AgencyNeedNumberEntity> agencyEntities = state.agencyKeys.map((key) {
+      return key.currentState!.getAgencyNeedNumberEntity();
+    }).toList();
+    Log.d("agencyEntities:$agencyEntities");
+
+    var result = await _labourRepository.addLabourRequestSubmit(
+      jobTitleId: state.selectedJobTitleId,
+      startTime: DateTimeUtils.formatDate(state.selectedStartTime),
+      endTime: DateTimeUtils.formatDate(state.selectedEndTime),
+      repeatStart: DateTimeUtils.formatDate(state.selectedRepeatStartTime, format: "yyyy-MM-dd"),
+      repeatEnd: DateTimeUtils.formatDate(state.selectedRepeatEndTime, format: "yyyy-MM-dd"),
+      outletId: state.selectedOutletId,
+      requestType: state.selectRequestTypeId,
+      positionId: state.selectPositionId,
+      remark: remark,
+      list: agencyEntities,
       cancelToken: cancelToken,
     );
 
@@ -250,7 +261,7 @@ class LabourRequestAddController extends GetxController with DioCancelableMixin
       selectedIndex++;
     }
 
-    List<String> list = ["Position"];
+    List<String> list = [];
     list.addAll(state.indexEntity!.positionList.map((e) => e.txt!).toList(growable: false));
 
     OptionPickerUtil.showCupertinoOptionPicker(

+ 40 - 127
packages/cpt_sg/lib/modules/labour/labour_request_add/labour_request_add_page.dart

@@ -17,6 +17,7 @@ import 'package:widgets/shatter/form_require_text.dart';
 import 'package:widgets/shatter/round_my_text_field.dart';
 import 'package:widgets/widget_export.dart';
 
+import 'AgencyNeedNumberWidget.dart';
 import 'labour_request_add_controller.dart';
 
 import 'package:plugin_basic/base/base_stateless_page.dart';
@@ -193,6 +194,41 @@ class LabourRequestAddPage extends BaseStatelessPage<LabourRequestAddController>
                         ],
                       ).marginOnly(top: 10),
 
+                      //工作选择部门
+                      FormRequireText(
+                        text: "Outlet".tr,
+                      ).marginOnly(top: 15),
+
+                      //选择部门
+                      Container(
+                        padding: const EdgeInsets.only(left: 16, right: 10),
+                        margin: const EdgeInsets.only(top: 10),
+                        height: 45,
+                        decoration: BoxDecoration(
+                          color: const Color(0xFF4DCFF6).withOpacity(0.2),
+                          borderRadius: const BorderRadius.all(Radius.circular(5)),
+                        ),
+                        child: Row(
+                          mainAxisSize: MainAxisSize.max,
+                          crossAxisAlignment: CrossAxisAlignment.center,
+                          mainAxisAlignment: MainAxisAlignment.start,
+                          children: [
+                            MyTextView(
+                              state.selectedOutlet ?? "",
+                              fontSize: 14,
+                              hint: "Choose Outlet".tr,
+                              textHintColor: ColorConstants.textGrayAECAE5,
+                              isFontMedium: true,
+                              textColor: ColorConstants.white,
+                            ).expanded(),
+                            const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
+                          ],
+                        ),
+                      ).onTap(() {
+                        FocusScope.of(context).unfocus();
+                        controller.pickOutlet();
+                      }),
+
                       //选择重复时间
                       MyTextView(
                         "Repeat".tr,
@@ -274,133 +310,6 @@ class LabourRequestAddPage extends BaseStatelessPage<LabourRequestAddController>
                         ],
                       ).marginOnly(top: 10),
 
-                      //工作选择部门
-                      FormRequireText(
-                        text: "Outlet".tr,
-                      ).marginOnly(top: 15),
-
-                      //选择部门
-                      Container(
-                        padding: const EdgeInsets.only(left: 16, right: 10),
-                        margin: const EdgeInsets.only(top: 10),
-                        height: 45,
-                        decoration: BoxDecoration(
-                          color: const Color(0xFF4DCFF6).withOpacity(0.2),
-                          borderRadius: const BorderRadius.all(Radius.circular(5)),
-                        ),
-                        child: Row(
-                          mainAxisSize: MainAxisSize.max,
-                          crossAxisAlignment: CrossAxisAlignment.center,
-                          mainAxisAlignment: MainAxisAlignment.start,
-                          children: [
-                            MyTextView(
-                              state.selectedOutlet ?? "",
-                              fontSize: 14,
-                              hint: "Choose Outlet".tr,
-                              textHintColor: ColorConstants.textGrayAECAE5,
-                              isFontMedium: true,
-                              textColor: ColorConstants.white,
-                            ).expanded(),
-                            const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
-                          ],
-                        ),
-                      ).onTap(() {
-                        FocusScope.of(context).unfocus();
-                        controller.pickOutlet();
-                      }),
-
-                      //需要的人数
-                      FormRequireText(
-                        text: "No. of Staff".tr,
-                      ).marginOnly(top: 15),
-
-                      //选择人数类型单选
-                      CustomRadioCheck(
-                        options: state.genderOptions,
-                        onOptionSelected: (index, text) {
-                          state.genderOptionType = index;
-                          controller.update();
-                        },
-                        selectedPosition: state.genderOptionType,
-                      ).marginOnly(top: 10),
-
-                      //输入框(只允许输入数字)
-                      Visibility(
-                        visible: state.genderOptionType == 0,
-                        child: CustomTextField(
-                          formKey: "need_no",
-                          marginLeft: 0,
-                          marginRight: 0,
-                          paddingTop: 0,
-                          paddingBottom: 0,
-                          height: 45,
-                          fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(0.2),
-                          inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
-                          textInputType: TextInputType.number,
-                          formData: state.formData,
-                          textInputAction: TextInputAction.done,
-                          onSubmit: (key, value) {
-                            FocusScope.of(context).unfocus();
-                          },
-                          marginTop: 10,
-                        ),
-                      ),
-
-                      Visibility(
-                        visible: state.genderOptionType != 0,
-                        child: Row(
-                          children: [
-                            MyTextView(
-                              "Male".tr,
-                              fontSize: 15,
-                              isFontRegular: true,
-                              marginRight: 10,
-                              textColor: ColorConstants.textGrayAECAE5,
-                            ),
-                            CustomTextField(
-                              formKey: "need_male",
-                              marginLeft: 0,
-                              marginRight: 0,
-                              paddingTop: 0,
-                              paddingBottom: 0,
-                              height: 45,
-                              fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(0.2),
-                              inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
-                              textInputType: TextInputType.number,
-                              formData: state.formData,
-                              textInputAction: TextInputAction.done,
-                              onSubmit: (key, value) {
-                                FocusScope.of(context).unfocus();
-                              },
-                            ).expanded(),
-                            MyTextView(
-                              "Female".tr,
-                              fontSize: 15,
-                              isFontRegular: true,
-                              marginLeft: 12,
-                              marginRight: 10,
-                              textColor: ColorConstants.textGrayAECAE5,
-                            ),
-                            CustomTextField(
-                              formKey: "need_female",
-                              marginLeft: 0,
-                              marginRight: 0,
-                              paddingTop: 0,
-                              paddingBottom: 0,
-                              height: 45,
-                              fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(0.2),
-                              inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
-                              textInputType: TextInputType.number,
-                              formData: state.formData,
-                              textInputAction: TextInputAction.done,
-                              onSubmit: (key, value) {
-                                FocusScope.of(context).unfocus();
-                              },
-                            ).expanded(),
-                          ],
-                        ).marginOnly(top: 10),
-                      ),
-
                       //Request Type
                       MyTextView(
                         "Request Type".tr,
@@ -458,6 +367,10 @@ class LabourRequestAddPage extends BaseStatelessPage<LabourRequestAddController>
                             );
                           }),
 
+                      /// 根据 Agency 列表动态展示性别的选择
+                      if (state.agencyWidgets.isNotEmpty)
+                        ...state.agencyWidgets,
+
                       //输入Remark
                       MyTextView(
                         "Remark".tr,

+ 7 - 26
packages/cpt_sg/lib/modules/labour/labour_request_add/labour_request_add_state.dart

@@ -1,32 +1,13 @@
-import 'package:domain/entity/response/labour_request_s_g_add_index_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_add_option_entity.dart';
 import 'package:flutter/material.dart';
 import 'package:plugin_basic/basic_export.dart';
 import 'package:shared/utils/date_time_utils.dart';
 
+import 'AgencyNeedNumberWidget.dart';
+
 class LabourRequestAddState {
   //表单的校验与数据
   Map<String, Map<String, dynamic>> formData = {
-    'need_male': {
-      'value': '',
-      'controller': TextEditingController(),
-      'focusNode': FocusNode(),
-      'hintText': 'Needs Num'.tr,
-      'obsecure': false,
-    },
-    'need_female': {
-      'value': '',
-      'controller': TextEditingController(),
-      'focusNode': FocusNode(),
-      'hintText': 'Needs Num'.tr,
-      'obsecure': false,
-    },
-    'need_no': {
-      'value': '',
-      'controller': TextEditingController(),
-      'focusNode': FocusNode(),
-      'hintText': 'Needs Num'.tr,
-      'obsecure': false,
-    },
     'remark': {
       'value': '',
       'controller': TextEditingController(),
@@ -38,10 +19,8 @@ class LabourRequestAddState {
 
   void Function(dynamic value)? cb;
 
-  List<String> genderOptions = ["Gender Unlimited".tr, "Gender Limited".tr];
-  int genderOptionType = 0;  //使用哪一种类型限制
 
-  LabourRequestSGAddIndexEntity? indexEntity;
+  SGLabourRequestAddOptionEntity? indexEntity;
 
   String? selectedJobTitle;
   String? selectedJobTitleId;
@@ -60,5 +39,7 @@ class LabourRequestAddState {
   String? selectPositionId;
   String? selectPositionName;
 
-
+  // 保存 AgencyNeedNumberWidget 的数据
+  List<AgencyNeedNumberWidget> agencyWidgets = [];
+  List<GlobalKey<AgencyNeedNumberState>> agencyKeys = []; // 用于存储每个 Widget 的 key
 }

+ 77 - 82
packages/cpt_sg/lib/modules/labour/labour_request_edit/labour_request_edit_controller.dart

@@ -18,106 +18,61 @@ class LabourRequestEditController extends GetxController with DioCancelableMixin
   final LabourRequestEditState state = LabourRequestEditState();
 
   // 获取添加选项数据
-  void fetchLabourRequestAddIndex() async {
-    LoadingEngine.show();
-    var result = await _labourRepository.fetchLabourRequestAddIndex(
-      isShowLoadingDialog: false,
-      cancelToken: cancelToken,
-    );
-
-    if (result.isSuccess) {
-      state.indexEntity = result.data;
-      update();
-    } else {
-      ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
-    }
-
-    var result2 = await _labourRepository.fetchLabourRequestEditDetail(
-      isShowLoadingDialog: false,
+  void fetchLabourRequestEditDetail() async {
+    var result = await _labourRepository.fetchLabourRequestEditDetail(
       state.requestId,
       cancelToken: cancelToken,
     );
 
     LoadingEngine.dismiss();
 
-    if (result2.isSuccess) {
-      state.editIndexEntity = result2.data;
+    if (result.isSuccess) {
+      state.editDetailEntity = result.data;
       var needMallController = state.formData['need_male']!['controller'];
       var needFemaleController = state.formData['need_female']!['controller'];
       var needNumController = state.formData['need_no']!['controller'];
       var remarkController = state.formData['remark']!['controller'];
 
-      // int genderOptionType = 0;  //使用哪一种类型限制
-      if (state.editIndexEntity?.job?.genderNumberLimit == 1) {
+      int genderOptionType = 0; //使用哪一种类型限制
+      if (state.editDetailEntity?.labReq?.sexLimit == 1) {
         state.genderOptionType = 1;
-        needMallController.text = state.editIndexEntity?.job?.maleNumberLimit?.toString();
-        needFemaleController.text = state.editIndexEntity?.job?.femaleNumberLimit?.toString();
+        needMallController.text = state.editDetailEntity?.labReq?.maleLimit?.toString();
+        needFemaleController.text = state.editDetailEntity?.labReq?.femaleLimit?.toString();
         needNumController.text = '';
       } else {
         state.genderOptionType = 0;
         needMallController.text = '';
         needFemaleController.text = '';
-        needNumController.text = state.editIndexEntity?.job?.needNum?.toString();
+        needNumController.text = state.editDetailEntity?.labReq?.hiringNum?.toString();
       }
 
-      remarkController.text = state.editIndexEntity?.remark ?? '';
+      remarkController.text = state.editDetailEntity?.labReq?.description ?? '';
 
-      state.selectedJobTitle = state.editIndexEntity?.job?.jobTitle;
-      state.selectedJobTitleId = state.editIndexEntity?.job?.jobTitleId?.toString();
+      state.selectedStartTime = DateTimeUtils.getDateTime(state.editDetailEntity!.startTime!);
+      state.selectedEndTime = DateTimeUtils.getDateTime(state.editDetailEntity!.endTime!);
 
-      state.selectedStartTime = DateTimeUtils.getDateTime(state.editIndexEntity!.startTime!);
-      state.selectedEndTime = DateTimeUtils.getDateTime(state.editIndexEntity!.endTime!);
+      state.selectedOutlet = state.editDetailEntity?.labReq?.outletName;
+      state.selectedOutletId = state.editDetailEntity?.labReq?.outletId?.toString();
 
-      state.selectedOutlet = state.editIndexEntity?.job?.outletName;
-      state.selectedOutletId = state.editIndexEntity?.job?.outletId?.toString();
-
-      state.selectRequestTypeId = state.editIndexEntity?.job?.requestType?.toString();
-
-      // String? selectRequestTypeId;
+      state.selectRequestTypeId = state.editDetailEntity?.labReq?.requestType?.toString();
+      state.selectPositionId = state.editDetailEntity?.labReq?.positionId?.toString();
+      state.selectPositionName = state.editDetailEntity?.labReq?.positionName?.toString();
 
       update();
     } else {
-      ToastEngine.show(result2.errorMsg ?? "Network Load Error".tr);
+      ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
     }
   }
 
   @override
   void onReady() {
     super.onReady();
-    fetchLabourRequestAddIndex();
-  }
-
-  // 选择工标题
-  void pickJobTitle() {
-    if (state.indexEntity == null) {
-      return;
-    }
-
-    int selectedTemplateIndex;
-    if (state.selectedJobTitleId == null) {
-      selectedTemplateIndex = 0;
-    } else {
-      selectedTemplateIndex = state.indexEntity!.titleList.indexWhere((department) => department.value.toString() == state.selectedJobTitleId);
-    }
-
-    if (selectedTemplateIndex < 0) {
-      selectedTemplateIndex = 0;
-    }
-
-    OptionPickerUtil.showCupertinoOptionPicker(
-      items: state.indexEntity!.titleList.map((e) => e.txt!).toList(growable: false),
-      initialSelectIndex: selectedTemplateIndex,
-      onPickerChanged: (_, index) {
-        state.selectedJobTitleId = state.indexEntity!.titleList[index].value!.toString();
-        state.selectedJobTitle = state.indexEntity!.titleList[index].txt!.toString();
-        update();
-      },
-    );
+    fetchLabourRequestEditDetail();
   }
 
   //选择开始时间
   void pickStartTime() {
-    if (state.indexEntity == null) {
+    if (state.editDetailEntity == null) {
       return;
     }
 
@@ -134,7 +89,7 @@ class LabourRequestEditController extends GetxController with DioCancelableMixin
 
   // 选择结束时间
   void pickEndTime() {
-    if (state.indexEntity == null) {
+    if (state.editDetailEntity == null) {
       return;
     }
 
@@ -151,7 +106,7 @@ class LabourRequestEditController extends GetxController with DioCancelableMixin
 
   //选择部门
   void pickOutlet() {
-    if (state.indexEntity == null) {
+    if (state.editDetailEntity == null) {
       return;
     }
 
@@ -159,7 +114,7 @@ class LabourRequestEditController extends GetxController with DioCancelableMixin
     if (state.selectedOutletId == null) {
       selectedIndex = 0;
     } else {
-      selectedIndex = state.indexEntity!.outletList.indexWhere((department) => department.value.toString() == state.selectedOutletId);
+      selectedIndex = state.editDetailEntity!.outletList.indexWhere((department) => department.value.toString() == state.selectedOutletId);
     }
 
     if (selectedIndex < 0) {
@@ -167,11 +122,11 @@ class LabourRequestEditController extends GetxController with DioCancelableMixin
     }
 
     OptionPickerUtil.showCupertinoOptionPicker(
-      items: state.indexEntity!.outletList.map((e) => e.txt!).toList(growable: false),
+      items: state.editDetailEntity!.outletList.map((e) => e.txt!).toList(growable: false),
       initialSelectIndex: selectedIndex,
       onPickerChanged: (_, index) {
-        state.selectedOutletId = state.indexEntity!.outletList[index].value!.toString();
-        state.selectedOutlet = state.indexEntity!.outletList[index].txt!.toString();
+        state.selectedOutletId = state.editDetailEntity!.outletList[index].value!.toString();
+        state.selectedOutlet = state.editDetailEntity!.outletList[index].txt!.toString();
         update();
       },
     );
@@ -216,17 +171,18 @@ class LabourRequestEditController extends GetxController with DioCancelableMixin
       }
     }
 
-    var result = await _labourRepository.submitLabourRequestEdit(
-      state.requestId,
-      DateTimeUtils.formatDate(state.selectedStartTime),
-      DateTimeUtils.formatDate(state.selectedEndTime),
-      state.selectedOutletId,
-      state.genderOptionType,
-      maleNo,
-      femaleNo,
-      needNo,
-      state.selectRequestTypeId,
-      remark,
+    var result = await _labourRepository.editLabourRequestSubmit(
+      requestId: state.requestId,
+      startTime: DateTimeUtils.formatDate(state.selectedStartTime),
+      endTime: DateTimeUtils.formatDate(state.selectedEndTime),
+      outletId: state.selectedOutletId,
+      sexLimit: state.genderOptionType,
+      maleLimit: maleNo,
+      femaleLimit: femaleNo,
+      needNum: needNo,
+      requestType: state.selectRequestTypeId,
+      positionId: state.selectPositionId,
+      remark: remark,
       cancelToken: cancelToken,
     );
 
@@ -242,4 +198,43 @@ class LabourRequestEditController extends GetxController with DioCancelableMixin
       ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
     }
   }
+
+  //选择常规职位
+  void pickRegularPosition() {
+    if (state.editDetailEntity == null) {
+      return;
+    }
+
+    int selectedIndex;
+    if (state.selectPositionId == null) {
+      selectedIndex = 0;
+    } else {
+      selectedIndex = state.editDetailEntity!.positionList.indexWhere((bean) => bean.value.toString() == state.selectPositionId);
+    }
+
+    if (selectedIndex < 0) {
+      selectedIndex = 0;
+    } else {
+      selectedIndex++;
+    }
+
+    List<String> list = [];
+    list.addAll(state.editDetailEntity!.positionList.map((e) => e.txt!).toList(growable: false));
+
+    OptionPickerUtil.showCupertinoOptionPicker(
+      items: list,
+      initialSelectIndex: selectedIndex,
+      onPickerChanged: (_, index) {
+        if (index == 0) {
+          state.selectPositionId = null;
+          state.selectPositionName = null;
+        } else {
+          state.selectPositionId = state.editDetailEntity!.positionList[index - 1].value!.toString();
+          state.selectPositionName = state.editDetailEntity!.positionList[index - 1].txt!.toString();
+        }
+
+        update();
+      },
+    );
+  }
 }

+ 94 - 31
packages/cpt_sg/lib/modules/labour/labour_request_edit/labour_request_edit_page.dart

@@ -82,6 +82,36 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                   child: Column(
                     crossAxisAlignment: CrossAxisAlignment.start,
                     children: [
+                      //中介商
+                      FormRequireText(
+                        text: "Source".tr,
+                      ).marginOnly(top: 15),
+
+                      //工作标题
+                      Container(
+                        padding: const EdgeInsets.only(left: 16, right: 10),
+                        margin: const EdgeInsets.only(top: 10),
+                        height: 45,
+                        decoration: BoxDecoration(
+                          color: const Color(0xFF4DCFF6).withOpacity(0.5),
+                          borderRadius: const BorderRadius.all(Radius.circular(5)),
+                        ),
+                        child: Row(
+                          mainAxisSize: MainAxisSize.max,
+                          crossAxisAlignment: CrossAxisAlignment.center,
+                          mainAxisAlignment: MainAxisAlignment.start,
+                          children: [
+                            MyTextView(
+                              state.editDetailEntity?.labReq?.agencyName ?? "",
+                              fontSize: 14,
+                              textHintColor: ColorConstants.textGrayAECAE5,
+                              isFontMedium: true,
+                              textColor: ColorConstants.white,
+                            ).expanded(),
+                          ],
+                        ),
+                      ),
+
                       //工作标题,选择模板
                       FormRequireText(
                         text: "Job Title".tr,
@@ -102,24 +132,15 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                           mainAxisAlignment: MainAxisAlignment.start,
                           children: [
                             MyTextView(
-                              state.selectedJobTitle ?? "",
+                              state.editDetailEntity?.labReq?.jobTitle ?? "",
                               fontSize: 14,
-                              hint: "Choose Job Title".tr,
                               textHintColor: ColorConstants.textGrayAECAE5,
                               isFontMedium: true,
                               textColor: ColorConstants.white,
                             ).expanded(),
-
-                            //下拉选图标
-                            Visibility(
-                              visible: state.pageType != 2,
-                              child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
-                            ),
                           ],
                         ),
-                      ).onTap(() {
-                        FocusScope.of(context).unfocus();
-                      }),
+                      ),
 
                       //选择工作时间
                       FormRequireText(
@@ -299,7 +320,8 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                               paddingTop: 0,
                               paddingBottom: 0,
                               height: 45,
-                              fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(0.2),
+                              fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
+                              enabled: state.pageType != 2,
                               inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
                               textInputType: TextInputType.number,
                               formData: state.formData,
@@ -323,7 +345,8 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                               paddingTop: 0,
                               paddingBottom: 0,
                               height: 45,
-                              fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(0.2),
+                              fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
+                              enabled: state.pageType != 2,
                               inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
                               textInputType: TextInputType.number,
                               formData: state.formData,
@@ -337,27 +360,67 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                       ),
 
                       //Request Type
-                      MyTextView(
-                        "Request Type".tr,
-                        fontSize: 15,
-                        isFontRegular: true,
-                        textColor: Colors.white,
-                        marginTop: 15,
+                      Visibility(
+                        visible: state.editDetailEntity?.isYY == true,
+                        child: MyTextView(
+                          "Request Type".tr,
+                          fontSize: 15,
+                          isFontRegular: true,
+                          textColor: Colors.white,
+                          marginTop: 15,
+                        ),
                       ),
 
                       //Request Type单选
-                      CustomRadioCheck(
-                        options: state.indexEntity?.requestType.map((e) => e.txt!).toList() ?? [],
-                        enable: state.pageType != 2,
-                        onOptionSelected: (index, text) {
-                          state.selectRequestTypeId = state.indexEntity!.requestType[index].value;
-                        },
-                        selectedPosition: state.indexEntity == null
-                            ? -1
-                            : Utils.isEmpty(state.selectRequestTypeId)
-                                ? 0
-                                : state.indexEntity!.requestType.indexWhere((e) => e.value.toString() == state.selectRequestTypeId),
-                      ).marginOnly(top: 10),
+                      Visibility(
+                        visible: state.editDetailEntity?.isYY == true,
+                        child: CustomRadioCheck(
+                          options: state.editDetailEntity?.requestType.map((e) => e.txt!).toList() ?? [],
+                          onOptionSelected: (index, text) {
+                            state.selectRequestTypeId = state.editDetailEntity!.requestType[index].value;
+                            controller.update(["position"]);
+                          },
+                          selectedPosition: state.editDetailEntity == null ? -1 : state.editDetailEntity?.requestType.indexWhere((e) => e.checked == "checked"),
+                        ).marginOnly(top: 10),
+                      ),
+
+                      //当 Request Type 选择 Regular 的时候,需要展示 Position 的下拉选
+                      GetBuilder<LabourRequestEditController>(
+                          id: "position",
+                          init: controller,
+                          builder: (controller) {
+                            return Visibility(
+                              visible: state.editDetailEntity?.isYY == true && state.selectRequestTypeId == "1",
+                              child: Container(
+                                padding: const EdgeInsets.only(left: 16, right: 10),
+                                margin: const EdgeInsets.only(top: 10),
+                                height: 45,
+                                decoration: BoxDecoration(
+                                  color: const Color(0xFF4DCFF6).withOpacity(0.2),
+                                  borderRadius: const BorderRadius.all(Radius.circular(5)),
+                                ),
+                                child: Row(
+                                  mainAxisSize: MainAxisSize.max,
+                                  crossAxisAlignment: CrossAxisAlignment.center,
+                                  mainAxisAlignment: MainAxisAlignment.start,
+                                  children: [
+                                    MyTextView(
+                                      state.selectPositionName ?? "",
+                                      fontSize: 14,
+                                      hint: "Choose Position".tr,
+                                      textHintColor: ColorConstants.textGrayAECAE5,
+                                      isFontMedium: true,
+                                      textColor: ColorConstants.white,
+                                    ).expanded(),
+                                    const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
+                                  ],
+                                ),
+                              ).onTap(() {
+                                FocusScope.of(context).unfocus();
+                                controller.pickRegularPosition();
+                              }),
+                            );
+                          }),
 
                       //输入Remark
                       MyTextView(

+ 5 - 7
packages/cpt_sg/lib/modules/labour/labour_request_edit/labour_request_edit_state.dart

@@ -1,8 +1,7 @@
-import 'package:domain/entity/response/labour_request_s_g_add_index_entity.dart';
-import 'package:domain/entity/response/labour_request_s_g_edit_index_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_add_option_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_detail_entity.dart';
 import 'package:flutter/material.dart';
 import 'package:plugin_basic/basic_export.dart';
-import 'package:shared/utils/date_time_utils.dart';
 
 class LabourRequestEditState {
   //表单的校验与数据
@@ -44,11 +43,8 @@ class LabourRequestEditState {
   List<String> genderOptions = ["Gender Unlimited".tr, "Gender Limited".tr];
   int genderOptionType = 0;  //使用哪一种类型限制
 
-  LabourRequestSGAddIndexEntity? indexEntity;
-  LabourRequestSGEditIndexEntity? editIndexEntity;
+  SGLabourRequestDetailEntity? editDetailEntity;
 
-  String? selectedJobTitle;
-  String? selectedJobTitleId;
 
   DateTime? selectedStartTime;
   DateTime? selectedEndTime;
@@ -57,4 +53,6 @@ class LabourRequestEditState {
   String? selectedOutletId;
 
   String? selectRequestTypeId;
+  String? selectPositionId;
+  String? selectPositionName;
 }

+ 95 - 21
packages/cpt_sg/lib/modules/labour/labour_request_list/labour_request_filter.dart

@@ -1,14 +1,12 @@
-import 'dart:typed_data';
 import 'dart:ui';
 import 'package:cs_resources/generated/assets.dart';
-import 'package:domain/entity/response/labour_request_index_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_option_entity.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/widgets.dart';
 import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
 import 'package:get/get.dart';
 import 'package:shared/utils/date_time_utils.dart';
-import 'package:shared/utils/log_utils.dart';
 import 'package:shared/utils/screen_util.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:cs_resources/constants/color_constants.dart';
@@ -23,15 +21,17 @@ import 'package:widgets/widget_export.dart';
  * 用工请求列表的筛选
  */
 class LabourRequestFilter extends StatefulWidget {
-  void Function(DateTime? selectedStartDate, DateTime? selectedEndDate, String? selectedStatusId, String? selectedDepartmentId)? onFilterAction;
-  LabourRequestIndexEntity optionResult;
+  void Function(DateTime? selectedStartDate, DateTime? selectedEndDate, String? selectedStatusId, String? selectedDepartmentId,String? selectedAgencyId)? onFilterAction;
+  SGLabourRequestOptionEntity optionResult;
   DateTime? selectedStartDate;
   DateTime? selectedEndDate;
   String? selectedStatusId;
   String? selectedDepartmentId;
+  String? selectedAgencyId;
 
   LabourRequestFilter({
     required this.optionResult,
+    required this.selectedAgencyId,
     required this.selectedStartDate,
     required this.selectedEndDate,
     required this.selectedStatusId,
@@ -48,6 +48,7 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
   DateTime? selectedEndDate;
   String? selectedStatusId;
   String? selectedDepartmentId;
+  String? selectedAgencyId;
 
   @override
   void initState() {
@@ -56,6 +57,7 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
     this.selectedEndDate = widget.selectedEndDate;
     this.selectedStatusId = widget.selectedStatusId;
     this.selectedDepartmentId = widget.selectedDepartmentId;
+    this.selectedAgencyId = widget.selectedAgencyId;
   }
 
   @override
@@ -76,10 +78,51 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
           child: Column(
             crossAxisAlignment: CrossAxisAlignment.start,
             children: [
+              //Source 中介
+              MyTextView(
+                "Source".tr,
+                fontSize: 14,
+                isFontMedium: true,
+                textColor: ColorConstants.black33,
+              ),
+
+              //选择中介
+              Container(
+                padding: const EdgeInsets.only(left: 16, right: 10),
+                margin: const EdgeInsets.only(top: 10),
+                height: 45,
+                decoration: const BoxDecoration(
+                  color: ColorConstants.grayECECEC,
+                  borderRadius: BorderRadius.all(Radius.circular(5)),
+                ),
+                child: Row(
+                  mainAxisSize: MainAxisSize.max,
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.start,
+                  children: [
+                    MyTextView(
+                      selectedAgencyId == null
+                          ? ""
+                          : (widget.optionResult.agencyList.isEmpty == true ? widget.optionResult.agencyList : widget.optionResult.agencyList)
+                          .firstWhere((element) => element.value.toString() == selectedAgencyId).txt!,
+                      hint: "Choose Source".tr,
+                      textHintColor: ColorConstants.textBlackHint,
+                      fontSize: 14,
+                      isFontMedium: true,
+                      textColor: ColorConstants.black33,
+                    ).expanded(),
+                    const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
+                  ],
+                ),
+              ).onTap(() {
+                pickerAgency();
+              }),
+
               //部门
               MyTextView(
                 "Outlet".tr,
                 fontSize: 14,
+                marginTop: 11,
                 isFontMedium: true,
                 textColor: ColorConstants.black33,
               ),
@@ -101,7 +144,7 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
                     MyTextView(
                       selectedDepartmentId == null || selectedDepartmentId == "0"
                           ? ""
-                          : (widget.optionResult.departmentList?.isEmpty == true ? widget.optionResult.outletList : widget.optionResult.departmentList)!
+                          : (widget.optionResult.outletList.isEmpty == true ? widget.optionResult.outletList : widget.optionResult.outletList)
                               .firstWhere((element) => element.value.toString() == selectedDepartmentId)
                               .txt!,
                       hint: "Choose Outlet".tr,
@@ -150,7 +193,7 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
                       isFontMedium: true,
                       textColor: ColorConstants.black33,
                     ).expanded(),
-                    MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
+                    const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
                   ],
                 ),
               ).onTap(() {
@@ -168,12 +211,12 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
 
               //选择时间
               Container(
-                padding: EdgeInsets.only(left: 16, right: 10),
-                margin: EdgeInsets.only(top: 10),
+                padding: const EdgeInsets.only(left: 16, right: 10),
+                margin: const EdgeInsets.only(top: 10),
                 height: 45,
-                decoration: BoxDecoration(
+                decoration: const BoxDecoration(
                   color: ColorConstants.grayECECEC,
-                  borderRadius: const BorderRadius.all(Radius.circular(5)),
+                  borderRadius: BorderRadius.all(Radius.circular(5)),
                 ),
                 child: Row(
                   mainAxisSize: MainAxisSize.max,
@@ -206,12 +249,12 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
 
               //选择结束日期
               Container(
-                padding: EdgeInsets.only(left: 16, right: 10),
-                margin: EdgeInsets.only(top: 10),
+                padding: const EdgeInsets.only(left: 16, right: 10),
+                margin: const EdgeInsets.only(top: 10),
                 height: 45,
-                decoration: BoxDecoration(
+                decoration: const BoxDecoration(
                   color: ColorConstants.grayECECEC,
-                  borderRadius: const BorderRadius.all(Radius.circular(5)),
+                  borderRadius: BorderRadius.all(Radius.circular(5)),
                 ),
                 child: Row(
                   mainAxisSize: MainAxisSize.max,
@@ -243,13 +286,18 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
                       widget.selectedEndDate = null;
                       widget.selectedStatusId = null;
                       widget.selectedDepartmentId = null;
+                      widget.selectedAgencyId = null;
 
                       setState(() {
                         selectedStartDate = null;
                         selectedEndDate = null;
                         selectedStatusId = null;
                         selectedDepartmentId = null;
+                        selectedAgencyId = null;
                       });
+
+                      onCancel();
+                      widget.onFilterAction?.call(null, null, null, null,null);
                     },
                     text: "Reset".tr,
                     textColor: ColorConstants.white,
@@ -258,11 +306,11 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
                     minWidth: 60,
                     minHeight: 36,
                   ).expanded(),
-                  SizedBox(width: 15),
+                  const SizedBox(width: 15),
                   MyButton(
                     onPressed: () {
                       onCancel();
-                      widget.onFilterAction?.call(selectedStartDate, selectedEndDate, selectedStatusId, selectedDepartmentId);
+                      widget.onFilterAction?.call(selectedStartDate, selectedEndDate, selectedStatusId, selectedDepartmentId,selectedAgencyId);
                     },
                     text: "Filter".tr,
                     textColor: ColorConstants.white,
@@ -276,7 +324,7 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
             ],
           ),
         ),
-        Center(child: MyAssetImage(Assets.baseServiceDialogDeleteIcon, width: 26.5, height: 26.5).marginOnly(top: 35)).onTap(() {
+        Center(child: const MyAssetImage(Assets.baseServiceDialogDeleteIcon, width: 26.5, height: 26.5).marginOnly(top: 35)).onTap(() {
           onCancel();
         }),
       ],
@@ -314,13 +362,38 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
     );
   }
 
+  /// 筛选中介
+  void pickerAgency() {
+    int selectedIndex;
+    if (selectedAgencyId == null) {
+      selectedIndex = 0;
+    } else {
+      selectedIndex = (widget.optionResult.agencyList.isEmpty == true ? widget.optionResult.agencyList : widget.optionResult.agencyList)
+          .indexWhere((department) => department.value.toString() == selectedAgencyId);
+    }
+
+    if (selectedIndex < 0) {
+      selectedIndex = 0;
+    }
+
+    OptionPickerUtil.showCupertinoOptionPicker(
+      items: (widget.optionResult.agencyList.isEmpty == true ? widget.optionResult.agencyList : widget.optionResult.agencyList).map((e) => e.txt!).toList(growable: false),
+      initialSelectIndex: selectedIndex,
+      onPickerChanged: (_, index) {
+        setState(() {
+          selectedAgencyId = (widget.optionResult.agencyList.isEmpty == true ? widget.optionResult.agencyList : widget.optionResult.agencyList)[index].value!.toString();
+        });
+      },
+    );
+  }
+
   /// 筛选部门
   void pickerOutlet() {
     int selectedDepartmentIndex;
     if (selectedDepartmentId == null) {
       selectedDepartmentIndex = 0;
     } else {
-      selectedDepartmentIndex = (widget.optionResult.departmentList?.isEmpty == true ? widget.optionResult.outletList : widget.optionResult.departmentList)!
+      selectedDepartmentIndex = (widget.optionResult.outletList.isEmpty == true ? widget.optionResult.outletList : widget.optionResult.outletList)
           .indexWhere((department) => department.value.toString() == selectedDepartmentId);
     }
 
@@ -329,11 +402,11 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
     }
 
     OptionPickerUtil.showCupertinoOptionPicker(
-      items: (widget.optionResult.departmentList?.isEmpty == true ? widget.optionResult.outletList : widget.optionResult.departmentList)!.map((e) => e.txt!).toList(growable: false),
+      items: (widget.optionResult.outletList?.isEmpty == true ? widget.optionResult.outletList : widget.optionResult.outletList).map((e) => e.txt!).toList(growable: false),
       initialSelectIndex: selectedDepartmentIndex,
       onPickerChanged: (_, index) {
         setState(() {
-          selectedDepartmentId = (widget.optionResult.departmentList?.isEmpty == true ? widget.optionResult.outletList : widget.optionResult.departmentList)![index].value!.toString();
+          selectedDepartmentId = (widget.optionResult.outletList.isEmpty == true ? widget.optionResult.outletList : widget.optionResult.outletList)[index].value!.toString();
         });
       },
     );
@@ -362,4 +435,5 @@ class _LabourRequestFilterState extends State<LabourRequestFilter> {
       },
     );
   }
+
 }

+ 122 - 42
packages/cpt_sg/lib/modules/labour/labour_request_list/labour_request_item.dart

@@ -1,6 +1,5 @@
 import 'package:cs_resources/constants/color_constants.dart';
-import 'package:domain/entity/response/labour_request_list_entity.dart';
-import 'package:domain/entity/response/labour_request_s_g_list_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_table_entity.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/widgets.dart';
@@ -14,10 +13,12 @@ import 'package:widgets/my_text_view.dart';
  */
 class LabourRequestItem extends StatelessWidget {
   final int index;
-  final LabourRequestSGListRows item;
+  final SGLabourRequestTableRows item;
   final VoidCallback? onDeleteAction;
   final VoidCallback? onDetailAction;
   final VoidCallback? onEditAction;
+  final VoidCallback? onRecallAction;
+  final VoidCallback? onStatusAction;
 
   LabourRequestItem({
     required this.index,
@@ -25,6 +26,8 @@ class LabourRequestItem extends StatelessWidget {
     this.onDeleteAction,
     this.onDetailAction,
     this.onEditAction,
+    this.onRecallAction,
+    this.onStatusAction,
   });
 
   @override
@@ -42,7 +45,7 @@ class LabourRequestItem extends StatelessWidget {
         children: [
           //工作标题
           MyTextView(
-            item.jobTitle ?? "-",
+            item.source ?? "-",
             isFontMedium: true,
             textColor: ColorConstants.textYellowFFBB1B,
             fontSize: 14,
@@ -66,7 +69,7 @@ class LabourRequestItem extends StatelessWidget {
                 fontSize: 14,
               ),
 
-              //部门
+              //文本
               MyTextView(
                 item.outletName ?? "-",
                 marginLeft: 5,
@@ -75,7 +78,7 @@ class LabourRequestItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top: 10),
 
           // 工作日期时间
           Row(
@@ -83,7 +86,7 @@ class LabourRequestItem extends StatelessWidget {
             crossAxisAlignment: CrossAxisAlignment.center,
             children: [
               MyTextView(
-                "Datetime:".tr,
+                "${"Job Date".tr}:",
                 isFontRegular: true,
                 textColor: ColorConstants.textGrayAECAE5,
                 fontSize: 14,
@@ -91,14 +94,83 @@ class LabourRequestItem extends StatelessWidget {
 
               //日期时间
               MyTextView(
-                 "${item.jobDate} (${item.startTime} - ${item.endTime})",
+                "${item.jobDate}",
                 marginLeft: 5,
                 isFontRegular: true,
                 textColor: Colors.white,
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top: 10),
+
+          // 工作标题
+          Row(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              MyTextView(
+                "${"Job Title".tr}:",
+                isFontRegular: true,
+                textColor: ColorConstants.textGrayAECAE5,
+                fontSize: 14,
+              ),
+
+              //文本
+              MyTextView(
+                item.jobTitle ?? "-",
+                marginLeft: 5,
+                isFontRegular: true,
+                textColor: Colors.white,
+                fontSize: 14,
+              ).expanded(),
+            ],
+          ).marginOnly(top: 10),
+
+          // 开始时间
+          Row(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              MyTextView(
+                "${"Start Time".tr}:",
+                isFontRegular: true,
+                textColor: ColorConstants.textGrayAECAE5,
+                fontSize: 14,
+              ),
+
+              //文本
+              MyTextView(
+                item.startTime ?? "-",
+                marginLeft: 5,
+                isFontRegular: true,
+                textColor: Colors.white,
+                fontSize: 14,
+              ).expanded(),
+            ],
+          ).marginOnly(top: 10),
+
+          // 结束时间
+          Row(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              MyTextView(
+                "${"End Time".tr}:",
+                isFontRegular: true,
+                textColor: ColorConstants.textGrayAECAE5,
+                fontSize: 14,
+              ),
+
+              //文本
+              MyTextView(
+                item.endTime ?? "-",
+                marginLeft: 5,
+                isFontRegular: true,
+                textColor: Colors.white,
+                fontSize: 14,
+              ).expanded(),
+            ],
+          ).marginOnly(top: 10),
 
           // 人数
           Row(
@@ -114,14 +186,14 @@ class LabourRequestItem extends StatelessWidget {
 
               //人数
               MyTextView(
-                item.needNum.toString(),
+                item.hiringNum ?? "0",
                 marginLeft: 5,
                 isFontRegular: true,
                 textColor: Colors.white,
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top: 10),
 
           // 状态
           Row(
@@ -150,30 +222,7 @@ class LabourRequestItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
-
-          // // 发布状态
-          // Row(
-          //   mainAxisSize: MainAxisSize.max,
-          //   crossAxisAlignment: CrossAxisAlignment.center,
-          //   children: [
-          //     MyTextView(
-          //       "Publish Status:".tr,
-          //       isFontRegular: true,
-          //       textColor: ColorConstants.textGrayAECAE5,
-          //       fontSize: 14,
-          //     ),
-          //
-          //     //发布状态
-          //     MyTextView(
-          //       item.publishStatus ? "Published".tr : "Unpublished".tr,
-          //       marginLeft: 5,
-          //       isFontRegular: true,
-          //       textColor: Colors.white,
-          //       fontSize: 14,
-          //     ).expanded(),
-          //   ],
-          // ).marginOnly(top: 15),
+          ).marginOnly(top: 10),
 
           // 创建时间
           Row(
@@ -196,7 +245,7 @@ class LabourRequestItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top: 10),
 
           //按钮组
           Visibility(
@@ -208,7 +257,7 @@ class LabourRequestItem extends StatelessWidget {
               children: [
                 //详情按钮
                 Visibility(
-                  visible: item.actionList?.contains("detail") ?? false,
+                  visible: item.actionList.contains("detail"),
                   child: MyButton(
                     onPressed: () {
                       FocusScope.of(context).unfocus();
@@ -216,9 +265,7 @@ class LabourRequestItem extends StatelessWidget {
                     },
                     text: "Detail".tr,
                     textColor: ColorConstants.white,
-                    backgroundColor: hexToColor(
-                      "#56AAFF",
-                    ),
+                    backgroundColor: ColorConstants.textBlue56AAFF,
                     radius: 17.25,
                     minWidth: 60,
                     minHeight: 35,
@@ -227,7 +274,7 @@ class LabourRequestItem extends StatelessWidget {
 
                 //Delete按钮
                 Visibility(
-                  visible: item.actionList?.contains("delete") ?? false,
+                  visible: item.actionList.contains("delete"),
                   child: MyButton(
                     onPressed: () {
                       FocusScope.of(context).unfocus();
@@ -242,9 +289,26 @@ class LabourRequestItem extends StatelessWidget {
                   ).marginOnly(left: 12),
                 ),
 
+                //Recall按钮
+                Visibility(
+                  visible: item.actionList.contains("recall"),
+                  child: MyButton(
+                    onPressed: () {
+                      FocusScope.of(context).unfocus();
+                      onRecallAction?.call();
+                    },
+                    text: "Recall".tr,
+                    textColor: ColorConstants.white,
+                    backgroundColor: ColorConstants.textRedFF6262,
+                    radius: 17.25,
+                    minWidth: 60,
+                    minHeight: 35,
+                  ).marginOnly(left: 12),
+                ),
+
                 //Edit按钮
                 Visibility(
-                  visible: item.actionList?.contains("edit") ?? false,
+                  visible: item.actionList.contains("edit"),
                   child: MyButton(
                     onPressed: () {
                       FocusScope.of(context).unfocus();
@@ -259,6 +323,22 @@ class LabourRequestItem extends StatelessWidget {
                   ).marginOnly(left: 12),
                 ),
 
+                //工作流
+                Visibility(
+                  visible: item.actionList.contains("status"),
+                  child: MyButton(
+                    onPressed: () {
+                      FocusScope.of(context).unfocus();
+                      onStatusAction?.call();
+                    },
+                    text: "Status".tr,
+                    textColor: ColorConstants.white,
+                    backgroundColor: ColorConstants.textBlue56AAFF,
+                    radius: 17.25,
+                    minWidth: 60,
+                    minHeight: 35,
+                  ).marginOnly(left: 12),
+                ),
               ],
             ).marginOnly(top: 18, bottom: 2),
           ),

+ 47 - 33
packages/cpt_sg/lib/modules/labour/labour_request_list/labour_request_list_controller.dart

@@ -1,4 +1,5 @@
-import 'package:domain/entity/response/labour_request_s_g_list_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_option_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_table_entity.dart';
 import 'package:domain/repository/labour_sg_repository.dart';
 
 import '../labour_request_add/labour_request_add_page.dart';
@@ -18,6 +19,7 @@ import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../labour_request_edit/labour_request_edit_page.dart';
+import '../labour_review_workflow/labour_request_workflow_page.dart';
 import 'labour_request_filter.dart';
 import 'labour_request_list_state.dart';
 
@@ -71,17 +73,17 @@ class LabourRequestListController extends GetxController with DioCancelableMixin
 
     // 并发执行两个请求
     var futures = [
-      _labourRepository.fetchLabourRequestSGList(
-        state.keyword,
-        DateTimeUtils.formatDate(state.selectedStartDate, format: "yyyy-MM-dd"),
-        DateTimeUtils.formatDate(state.selectedEndDate, format: "yyyy-MM-dd"),
-        state.selectedStatusId,
-        state.selectedDepartmentId,
+      _labourRepository.fetchLabourRequestTable(
+        agencyId: state.selectedAgencyId,
+        startDate: DateTimeUtils.formatDate(state.selectedStartDate, format: "yyyy-MM-dd"),
+        endDate: DateTimeUtils.formatDate(state.selectedEndDate, format: "yyyy-MM-dd"),
+        status: state.selectedStatusId,
+        outletId: state.selectedDepartmentId,
         curPage: _curPage,
         cancelToken: cancelToken,
       ),
       state.indexOptions == null
-          ? _labourRepository.fetchLabourRequestSGIndex(
+          ? _labourRepository.fetchLabourRequestOption(
               cancelToken: cancelToken,
             )
           : Future(() => HttpResult(isSuccess: true).convert(data: state.indexOptions!)),
@@ -89,8 +91,8 @@ class LabourRequestListController extends GetxController with DioCancelableMixin
 
     //拿到结果
     var results = await Future.wait(futures);
-    var listResult = results[0] as HttpResult<LabourRequestSGListEntity>;
-    var optionResult = results[1] as HttpResult<LabourRequestIndexEntity>;
+    var listResult = results[0] as HttpResult<SGLabourRequestTableEntity>;
+    var optionResult = results[1] as HttpResult<SGLabourRequestOptionEntity>;
 
     //选项数据
     if (state.indexOptions == null && optionResult.isSuccess) {
@@ -110,7 +112,7 @@ class LabourRequestListController extends GetxController with DioCancelableMixin
   }
 
   // 处理数据与展示的逻辑
-  void handleList(List<LabourRequestSGListRows>? list) {
+  void handleList(List<SGLabourRequestTableRows>? list) {
     if (list != null && list.isNotEmpty) {
       //有数据,判断是刷新还是加载更多的数据
       if (_curPage == 1) {
@@ -140,18 +142,9 @@ class LabourRequestListController extends GetxController with DioCancelableMixin
     }
   }
 
-  // 执行搜索
-  void doSearch(String keyword) {
-    state.keyword = keyword;
-    //赋值之后刷新
-    refreshController.callRefresh();
-  }
-
   // 清空搜索条件
   void resetFiltering() {
-    state.keyword = "";
-    state.searchController.text = "";
-
+    state.selectedAgencyId = null;
     state.selectedStartDate = null;
     state.selectedEndDate = null;
     state.selectedStatusId = null;
@@ -167,15 +160,17 @@ class LabourRequestListController extends GetxController with DioCancelableMixin
       DialogEngine.show(
         widget: LabourRequestFilter(
           optionResult: state.indexOptions!,
+          selectedAgencyId: state.selectedAgencyId,
           selectedStartDate: state.selectedStartDate,
           selectedEndDate: state.selectedEndDate,
           selectedStatusId: state.selectedStatusId,
           selectedDepartmentId: state.selectedDepartmentId,
-          onFilterAction: (startDate, endDate, statusId, departmentId) {
+          onFilterAction: (startDate, endDate, statusId, departmentId, agencyId) {
             state.selectedStartDate = startDate;
             state.selectedEndDate = endDate;
             state.selectedStatusId = statusId;
             state.selectedDepartmentId = departmentId;
+            state.selectedAgencyId = agencyId;
 
             //赋值之后刷新
             refreshController.callRefresh();
@@ -188,20 +183,21 @@ class LabourRequestListController extends GetxController with DioCancelableMixin
   }
 
   /// 根据ID获取Item对象,用于刷新
-  void fetchItemByIdAndRefreshItem(String requestId) async {
-    var result = await _labourRepository.fetchItemByRequestId(
-      requestId,
+  void fetchItemByIdAndRefreshItem(String? requestId) async {
+    var result = await _labourRepository.fetchLabourRequestTable(
+      requestId: requestId,
       cancelToken: cancelToken,
+      curPage: 1,
     );
 
     //处理数据
     if (result.isSuccess) {
       var data = result.data;
-      if (data != null && data.rows != null && data.rows!.isNotEmpty) {
-        final requestItem = data.rows![0];
+      if (data != null && data.rows.isNotEmpty) {
+        final requestItem = data.rows[0];
 
         //找到当前数据中的此 requestId,并替换对象,再刷新
-        var index = state.datas.indexWhere((element) => element.requestId == requestItem.requestId);
+        var index = state.datas.indexWhere((element) => element.id == requestItem.id);
         if (index >= 0) {
           state.datas[index] = requestItem;
           update();
@@ -256,19 +252,24 @@ class LabourRequestListController extends GetxController with DioCancelableMixin
   }
 
   //去详情页面
-  void gotoDetailPage(LabourRequestSGListRows data) {
-    LabourRequestEditPage.startInstance(2, data.requestId, null);
+  void gotoDetailPage(SGLabourRequestTableRows data) {
+    LabourRequestEditPage.startInstance(2, data.id, null);
   }
 
   //去编辑页面
-  void gotoEditPage(LabourRequestSGListRows data) {
-    LabourRequestEditPage.startInstance(1, data.requestId, (result) {
+  void gotoEditPage(SGLabourRequestTableRows data) {
+    LabourRequestEditPage.startInstance(1, data.id, (result) {
       if (result != null) {
-        fetchItemByIdAndRefreshItem(data.requestId.toString());
+        fetchItemByIdAndRefreshItem(data.id.toString());
       }
     });
   }
 
+  //去 status 的工作流页面
+  void gotoWorkflowPage(SGLabourRequestTableRows data) {
+    SGLabourRequestWorkflowPage.startInstance(data.id.toString());
+  }
+
   //删除labourRequest
   void doDelete(String? requestId, int index) {
     DialogEngine.show(
@@ -281,6 +282,18 @@ class LabourRequestListController extends GetxController with DioCancelableMixin
     ));
   }
 
+  // 执行 Recall
+  void doRecall(String? requestId, int index) async {
+    var result = await _labourRepository.recallLabourRequestSG(requestId, cancelToken: cancelToken);
+
+    if (result.isSuccess) {
+      //刷新Item
+      fetchItemByIdAndRefreshItem(requestId);
+    } else {
+      ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
+    }
+  }
+
   void _submitDeleteRequest(String? requestId, int index) async {
     var result = await _labourRepository.deleteLabourRequestSG(requestId, cancelToken: cancelToken);
 
@@ -297,4 +310,5 @@ class LabourRequestListController extends GetxController with DioCancelableMixin
       ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
     }
   }
+
 }

+ 9 - 23
packages/cpt_sg/lib/modules/labour/labour_request_list/labour_request_list_page.dart

@@ -70,29 +70,10 @@ class _LabourRequestListState extends BaseState<LabourRequestListPage, LabourReq
           ),
           child: Column(
             children: [
-              MyAppBar.searchTitleBar(
+              MyAppBar.titleBar(
                 context,
-                value: state.keyword,
-                hintText: 'Title'.tr,
-                controller: state.searchController,
-                onSearch: (keyword) {
-                  controller.doSearch(keyword);
-                },
+                "Labour Request".tr,
                 actions: [
-                  //重置按钮
-                  MyButton(
-                    onPressed: () {
-                      FocusScope.of(context).unfocus();
-                      controller.resetFiltering();
-                    },
-                    text: "Reset".tr,
-                    textColor: ColorConstants.white,
-                    backgroundColor: hexToColor("#2BA9F9", opacity: 0.5),
-                    radius: 17.25,
-                    minWidth: 60,
-                    minHeight: 35,
-                  ).marginOnly(right: 15),
-
                   //筛选图标
                   const MyAssetImage(
                     Assets.baseServiceTitleBarFilterIcon,
@@ -142,12 +123,17 @@ class _LabourRequestListState extends BaseState<LabourRequestListPage, LabourReq
                             controller.gotoDetailPage(state.datas[index]);
                           },
                           onDeleteAction: () {
-                            controller.doDelete(state.datas[index].requestId,index);
+                            controller.doDelete(state.datas[index].id, index);
                           },
                           onEditAction: () {
                             controller.gotoEditPage(state.datas[index]);
                           },
-
+                          onRecallAction: (){
+                            controller.doRecall(state.datas[index].id, index);
+                          },
+                          onStatusAction: (){
+                            controller.gotoWorkflowPage(state.datas[index]);
+                          },
                         );
                       },
                       childCount: state.datas.length,

+ 6 - 8
packages/cpt_sg/lib/modules/labour/labour_request_list/labour_request_list_state.dart

@@ -1,18 +1,16 @@
-import 'package:domain/entity/response/labour_request_index_entity.dart';
-import 'package:domain/entity/response/labour_request_list_entity.dart';
-import 'package:domain/entity/response/labour_request_s_g_list_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_option_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_table_entity.dart';
 import 'package:flutter/material.dart';
 
 class LabourRequestListState {
-  //筛选条件
-  final TextEditingController searchController = TextEditingController();
-  String keyword = "";
+
+  String? selectedAgencyId;  //Agency Id
   DateTime? selectedStartDate;
   DateTime? selectedEndDate;
   String? selectedStatusId;
   String? selectedDepartmentId;
 
   //页面的列表数据
-  List<LabourRequestSGListRows> datas = [];
-  LabourRequestIndexEntity? indexOptions;
+  List<SGLabourRequestTableRows> datas = [];
+  SGLabourRequestOptionEntity? indexOptions;
 }

+ 98 - 0
packages/cpt_sg/lib/modules/labour/labour_review_workflow/labour_request_workflow_controller.dart

@@ -0,0 +1,98 @@
+import 'package:domain/entity/response/labour_request_work_flow_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_worl_flow_entity.dart';
+
+import 'package:domain/repository/labour_sg_repository.dart';
+import 'package:get/get.dart';
+import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
+import 'package:widgets/load_state_layout.dart';
+import 'package:widgets/widget_export.dart';
+
+import 'labour_request_workflow_state.dart';
+
+
+class LabourRequestWorkflowController extends GetxController with DioCancelableMixin{
+  final LabourSGRepository _labourRepository = Get.find();
+  final LabourRequestWorkflowState state = LabourRequestWorkflowState();
+
+  var _needShowPlaceholder = true;
+
+  //页面PlaceHolder的展示
+  LoadState loadingState = LoadState.State_Success;
+  String? errorMessage;
+
+  //刷新页面状态
+  void changeLoadingState(LoadState state) {
+    loadingState = state;
+    update();
+  }
+
+  // Refresh 控制器
+  final EasyRefreshController refreshController = EasyRefreshController(
+    controlFinishRefresh: true,
+    controlFinishLoad: false,
+  );
+
+  // Refresh 刷新事件
+  Future onRefresh() async {
+    fetchWorkFlowList();
+  }
+
+  // 重试请求
+  Future retryRequest() async {
+    _needShowPlaceholder = true;
+    fetchWorkFlowList();
+  }
+
+  /// 获取服务器数据,成员考勤列表
+  Future fetchWorkFlowList() async {
+    if (_needShowPlaceholder) {
+      changeLoadingState(LoadState.State_Loading);
+    }
+
+    //获取到数据
+    var result = await _labourRepository.fetchLabourRequestWorkFlow(
+      state.requestId,
+      cancelToken: cancelToken,
+    );
+
+    //处理数据
+    if (result.isSuccess) {
+      handleList(result.data?.records);
+      refreshController.finishRefresh(IndicatorResult.success);
+    } else {
+      errorMessage = result.errorMsg;
+      changeLoadingState(LoadState.State_Error);
+      refreshController.finishRefresh(IndicatorResult.fail);
+    }
+
+    //最后赋值
+    _needShowPlaceholder = false;
+  }
+
+  // 处理数据与展示的逻辑
+  void handleList(List<SGLabourRequestWorlFlowRecords>? list) {
+    if (list != null && list.isNotEmpty) {
+      //有数据,判断是刷新还是加载更多的数据
+      state.datas.clear();
+      state.datas.addAll(list);
+      //更新状态
+      changeLoadingState(LoadState.State_Success);
+    } else {
+      //展示无数据的布局
+      state.datas.clear();
+      changeLoadingState(LoadState.State_Empty);
+    }
+  }
+
+  @override
+  void onReady() async {
+    super.onReady();
+    fetchWorkFlowList();
+  }
+
+  @override
+  void onClose() {
+    super.onClose();
+    state.datas.clear();
+  }
+}

+ 228 - 0
packages/cpt_sg/lib/modules/labour/labour_review_workflow/labour_request_workflow_item.dart

@@ -0,0 +1,228 @@
+import 'package:cs_resources/constants/color_constants.dart';
+import 'package:domain/entity/response/s_g_labour_request_worl_flow_entity.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/widgets.dart';
+import 'package:plugin_basic/basic_export.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_text_view.dart';
+
+/*
+ * 用请求的审核工作流Item
+ */
+class LabourRequestWorkflowItem extends StatelessWidget {
+  final int index;
+  final SGLabourRequestWorlFlowRecords item;
+
+  LabourRequestWorkflowItem({
+    required this.index,
+    required this.item,
+  });
+
+  @override
+  Widget build(BuildContext context) {
+    return Container(
+      padding: const EdgeInsets.symmetric(vertical: 23, horizontal: 21),
+      margin: const EdgeInsets.only(left: 15, right: 15, top: 5, bottom: 5),
+      decoration: BoxDecoration(
+        color: const Color(0xFF4DCFF6).withOpacity(0.2), // 设置背景颜色和不透明度
+        borderRadius: BorderRadius.circular(5), // 设置圆角
+      ),
+      child: Column(
+        mainAxisSize: MainAxisSize.max,
+        crossAxisAlignment: CrossAxisAlignment.start,
+        children: [
+          //Node
+          Row(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              MyTextView(
+                "Node:".tr,
+                isFontRegular: true,
+                textColor: ColorConstants.textGrayAECAE5,
+                fontSize: 14,
+              ),
+
+              MyTextView(
+                item.nodeName ?? "-",
+                marginLeft: 5,
+                isFontRegular: true,
+                textColor: Colors.white,
+                fontSize: 14,
+              ).expanded(),
+            ],
+          ),
+
+          // assigneeType
+          Row(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              MyTextView(
+                "Type:".tr,
+                isFontRegular: true,
+                textColor: ColorConstants.textGrayAECAE5,
+                fontSize: 14,
+              ),
+
+              //日期时间
+              MyTextView(
+                item.assigneeTypeShow ?? "-",
+                marginLeft: 5,
+                isFontRegular: true,
+                textColor: Colors.white,
+                fontSize: 14,
+              ).expanded(),
+            ],
+          ).marginOnly(top: 15),
+
+          // Designation
+          Row(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              MyTextView(
+                "Designation:".tr,
+                isFontRegular: true,
+                textColor: ColorConstants.textGrayAECAE5,
+                fontSize: 14,
+              ),
+
+              //人数
+              MyTextView(
+                item.designationShow ?? "-",
+                marginLeft: 5,
+                isFontRegular: true,
+                textColor: Colors.white,
+                fontSize: 14,
+              ).expanded(),
+            ],
+          ).marginOnly(top: 15),
+
+          // 状态
+          Row(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              MyTextView(
+                "Status:".tr,
+                isFontRegular: true,
+                textColor: ColorConstants.textGrayAECAE5,
+                fontSize: 14,
+              ),
+
+              //状态
+              MyTextView(
+                item.statusShow == null ? "" : item.statusShow!.tr,
+                marginLeft: 5,
+                isFontRegular: true,
+                textColor: "Approved" == item.statusShow
+                    ? ColorConstants.textGreen05DC82
+                    : "Rejected" == item.statusShow
+                    ? ColorConstants.textRedFF6262
+                    : "Recall" == item.statusShow
+                    ? ColorConstants.textYellowFFBB1B
+                    : ColorConstants.textBlue06D9FF,
+                fontSize: 14,
+              ).expanded(),
+            ],
+          ).marginOnly(top: 15),
+
+          // Operator
+          Row(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              MyTextView(
+                "Operator:".tr,
+                isFontRegular: true,
+                textColor: ColorConstants.textGrayAECAE5,
+                fontSize: 14,
+              ),
+
+              //发布状态
+              MyTextView(
+                item.auditName ?? "-",
+                marginLeft: 5,
+                isFontRegular: true,
+                textColor: Colors.white,
+                fontSize: 14,
+              ).expanded(),
+            ],
+          ).marginOnly(top: 15),
+
+          // 操作时间
+          Row(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              MyTextView(
+                "Audit Time:".tr,
+                isFontRegular: true,
+                textColor: ColorConstants.textGrayAECAE5,
+                fontSize: 14,
+              ),
+
+              //时间
+              MyTextView(
+                item.auditTime ?? "-",
+                marginLeft: 5,
+                isFontRegular: true,
+                textColor: Colors.white,
+                fontSize: 14,
+              ).expanded(),
+            ],
+          ).marginOnly(top: 15),
+
+          // 创建时间
+          Row(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              MyTextView(
+                "Created At:".tr,
+                isFontRegular: true,
+                textColor: ColorConstants.textGrayAECAE5,
+                fontSize: 14,
+              ),
+
+              //时间
+              MyTextView(
+                item.createdAt ?? "-",
+                marginLeft: 5,
+                isFontRegular: true,
+                textColor: Colors.white,
+                fontSize: 14,
+              ).expanded(),
+            ],
+          ).marginOnly(top: 15),
+
+          // Remark
+          Row(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              MyTextView(
+                "Remark:".tr,
+                isFontRegular: true,
+                textColor: ColorConstants.textGrayAECAE5,
+                fontSize: 14,
+              ),
+
+              //时间
+              MyTextView(
+                item.auditMark ?? "-",
+                marginLeft: 5,
+                isFontRegular: true,
+                textColor: Colors.white,
+                fontSize: 14,
+              ).expanded(),
+            ],
+          ).marginOnly(top: 15),
+
+        ],
+      ),
+    );
+  }
+}

+ 102 - 0
packages/cpt_sg/lib/modules/labour/labour_review_workflow/labour_request_workflow_page.dart

@@ -0,0 +1,102 @@
+
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'package:plugin_basic/base/base_state.dart';
+import 'package:plugin_basic/base/base_stateful_page.dart';
+import 'package:plugin_basic/utils/ext_get_nav.dart';
+import 'package:router/path/router_path.dart';
+import 'package:shared/utils/screen_util.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/load_state_layout.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/widget_export.dart';
+
+import 'labour_request_workflow_controller.dart';
+import 'labour_request_workflow_state.dart';
+import 'labour_request_workflow_item.dart';
+
+/*
+ * 用工请求-状态工作流列表
+ */
+class SGLabourRequestWorkflowPage extends BaseStatefulPage<LabourRequestWorkflowController> {
+  SGLabourRequestWorkflowPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance(String? requestId) {
+    return Get.start(RouterPath.labourRequestWorkflowSG,arguments: {'requestId': requestId});
+  }
+
+  @override
+  LabourRequestWorkflowController createRawController() {
+    return LabourRequestWorkflowController();
+  }
+
+  @override
+  State<SGLabourRequestWorkflowPage> createState() => _LabourReviewWorkflowState();
+
+}
+
+class _LabourReviewWorkflowState extends BaseState<SGLabourRequestWorkflowPage, LabourRequestWorkflowController> {
+
+  late LabourRequestWorkflowState state;
+
+  @override
+  void initState() {
+    super.initState();
+    state = controller.state;
+    state.requestId = Get.arguments['requestId'];
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return autoCtlGetBuilder(builder: (controller) {
+      return  SafeArea(
+          bottom: true,
+          top: false,
+          child: Container(
+            width: double.infinity,
+            height: double.infinity,
+            padding: EdgeInsets.only(top: ScreenUtil.getStatusBarH(context)),
+            decoration: const BoxDecoration(
+              gradient: LinearGradient(
+                colors: [
+                  Color(0xFF091D44),
+                  Color(0xFF245A8A),
+                  Color(0xFF7F7CEC),
+                ],
+                begin: Alignment.topCenter,
+                end: Alignment.bottomCenter,
+              ),
+            ),
+            child: Column(
+              children: [
+                MyAppBar.titleBar(context, "Workflow".tr),
+
+                EasyRefresh(
+                  controller: controller.refreshController,
+                  onRefresh: controller.onRefresh,
+                  child: LoadStateLayout(
+                    state: controller.loadingState,
+                    errorMessage: controller.errorMessage,
+                    errorRetry: () {
+                      controller.retryRequest();
+                    },
+                    successSliverWidget: [
+                      SliverList(
+                          delegate: SliverChildBuilderDelegate((context, index) {
+                              return LabourRequestWorkflowItem(index: index,item: state.datas[index]);
+                            },
+                            childCount: state.datas.length,
+                          ))
+                    ],
+                  ),
+                ).expanded(),
+              ],
+            ).marginOnly(top: 10),
+          ),
+        );
+    });
+  }
+}
+
+

+ 10 - 0
packages/cpt_sg/lib/modules/labour/labour_review_workflow/labour_request_workflow_state.dart

@@ -0,0 +1,10 @@
+import 'package:domain/entity/response/s_g_labour_request_worl_flow_entity.dart';
+
+class LabourRequestWorkflowState {
+
+  String? requestId;
+
+  //页面的列表数据
+  List<SGLabourRequestWorlFlowRecords> datas = [];
+
+}

+ 1 - 1
packages/cpt_sg/lib/modules/main/main_controller.dart

@@ -1,5 +1,5 @@
 import 'package:cpt_sg/modules/job/revise_list/revise_list_page.dart';
-import 'package:cpt_sg/modules/labour/job_list/job_list_page.dart';
+import 'package:cpt_sg/modules/job/job_list/job_list_page.dart';
 import 'package:cpt_sg/modules/labour/job_template_list/job_template_list_page.dart';
 import 'package:cpt_sg/modules/labour/job_title_list/job_title_list_page.dart';
 import 'package:cpt_sg/modules/labour/labour_request_list/labour_request_list_page.dart';

+ 1 - 1
packages/cpt_sg/lib/modules/review/labour_review_list/labour_review_controller.dart

@@ -14,7 +14,7 @@ import 'package:widgets/dialog/app_default_dialog.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
 import '../labour_review_edit/labour_review_edit_page.dart';
-import '../labour_review_workflow/labour_request_workflow_page.dart';
+import '../labour_review_workflow/labour_review_workflow_page.dart';
 import 'labour_review_filter.dart';
 import 'labour_review_reject_dialog.dart';
 import 'labour_review_state.dart';

+ 1 - 1
packages/cpt_sg/lib/modules/review/labour_review_workflow/labour_review_workflow_controller.dart

@@ -5,7 +5,7 @@ import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
 
-import 'labour_request_workflow_state.dart';
+import 'labour_review_workflow_state.dart';
 
 
 class LabourReviewWorkflowController extends GetxController with DioCancelableMixin{

+ 2 - 2
packages/cpt_sg/lib/modules/review/labour_review_workflow/labour_request_workflow_page.dart

@@ -12,7 +12,7 @@ import 'package:widgets/my_appbar.dart';
 import 'package:widgets/widget_export.dart';
 
 import 'labour_review_workflow_controller.dart';
-import 'labour_request_workflow_state.dart';
+import 'labour_review_workflow_state.dart';
 import 'labour_review_workflow_item.dart';
 
 /*
@@ -23,7 +23,7 @@ class SGLabourReviewWorkflowPage extends BaseStatefulPage<LabourReviewWorkflowCo
 
   //启动当前页面
   static void startInstance(String? requestId) {
-    return Get.start(RouterPath.SGLabourReviewWorkflow,arguments: {'requestId': requestId});
+    return Get.start(RouterPath.labourRequestWorkflowSG,arguments: {'requestId': requestId});
   }
 
   @override

packages/cpt_sg/lib/modules/review/labour_review_workflow/labour_request_workflow_state.dart → packages/cpt_sg/lib/modules/review/labour_review_workflow/labour_review_workflow_state.dart


+ 10 - 3
packages/cpt_sg/lib/router/sg_router.dart

@@ -17,18 +17,19 @@ import '../modules/job/applied_staff/applied_staff_page.dart';
 import '../modules/job/applied_staff_detail/applied_staff_detail_page.dart';
 import '../modules/job/applied_staff_reviews/applied_staff_reviews_page.dart';
 import '../modules/job/job_applied/job_applied_page.dart';
+import '../modules/job/job_list_edit/job_list_edit_page.dart';
 import '../modules/job/revise_add_edit/revise_add_edit_page.dart';
 import '../modules/job/revise_applied/revise_applied_page.dart';
 import '../modules/job/revise_list/revise_list_page.dart';
 import '../modules/job/revise_log/revise_log_page.dart';
-import '../modules/labour/job_list/job_list_page.dart';
-import '../modules/labour/job_list_edit/job_list_edit_page.dart';
+import '../modules/job/job_list/job_list_page.dart';
 import '../modules/labour/job_template_add/job_template_add_page.dart';
 import '../modules/labour/job_template_list/job_template_list_page.dart';
 import '../modules/labour/job_title_list/job_title_list_page.dart';
 import '../modules/labour/labour_request_add/labour_request_add_page.dart';
 import '../modules/labour/labour_request_edit/labour_request_edit_page.dart';
 import '../modules/labour/labour_request_list/labour_request_list_page.dart';
+import '../modules/labour/labour_review_workflow/labour_request_workflow_page.dart';
 import '../modules/report/device_list/device_list_page.dart';
 import '../modules/report/report_finance/report_finance_page.dart';
 import '../modules/report/report_labour/report_labour_page.dart';
@@ -37,7 +38,7 @@ import '../modules/report/report_staff_request/report_staff_request_page.dart';
 import '../modules/review/attendance_review_list/attendance_review_page.dart';
 import '../modules/review/labour_review_edit/labour_review_edit_page.dart';
 import '../modules/review/labour_review_list/labour_review_page.dart';
-import '../modules/review/labour_review_workflow/labour_request_workflow_page.dart';
+import '../modules/review/labour_review_workflow/labour_review_workflow_page.dart';
 
 /// SG模块路由配置
 class SGPageRouter {
@@ -124,6 +125,12 @@ class SGPageRouter {
       page: () => LabourRequestAddPage(),
     ),
 
+    // 用工请求的工作流
+    GetPage(
+      name: RouterPath.labourRequestWorkflowSG,
+      page: () => SGLabourRequestWorkflowPage(),
+    ),
+
     // 新加坡工作列表
     GetPage(
       name: RouterPath.jobListSG,

+ 22 - 6
packages/cs_domain/lib/constants/api_constants.dart

@@ -158,14 +158,32 @@ class ApiConstants {
   // 删除工作模板
   static const apiJobTemplateDeleteSG = "/index.php/api/v1/hotel/temp/delete";
 
-  //用工请求首页数据
-  static const apiLabourRequestMainSG = "/index.php/api/v1/hotel/lab-req/index";
+  //用工请求的列表 Option
+  static const apiLabourRequestOptionSG = "/index.php/api/v2/hotel/lab-req/index";
+
+  //用工请求的列表 Table
+  static const apiLabourRequestTableSG = "/index.php/api/v2/hotel/lab-req/table";
 
   //用工请求的添加页面选项数据
-  static const apiLabourRequestAddIndexSG = "/index.php/api/v1/hotel/lab-req/add-view";
+  static const apiLabourRequestAddOptionSG = "/index.php/api/v2/hotel/lab-req/add-view";
 
   //用工请求的添加提交
-  static const apiLabourRequestAddSubmitSG = "/index.php/api/v1/hotel/lab-req/add-submit";
+  static const apiLabourRequestAddSubmitSG = "/index.php/api/v2/hotel/lab-req/add-submit";
+
+  //用工请求的编辑页面详情数据
+  static const apiLabourRequestEditDetailSG = "/index.php/api/v2/hotel/lab-req/edit-view";
+
+  //用工请求的编辑页面提交
+  static const apiLabourRequestEditSubmitSG = "/index.php/api/v2/hotel/lab-req/edit-submit";
+
+  //用工请求的撤回
+  static const apiLabourRequestRecallSG = "/index.php/api/v2/hotel/lab-req/recall";
+
+  //新加坡的用工请求删除
+  static const apiLabourRequestDelete = "/index.php/api/v2/hotel/lab-req/destroy";
+
+  //新加坡工作详情的审核流列表
+  static const apiLabourRequestWorkflowSG = "/index.php/api/v2/hotel/lab-req/status-view";
 
   //用工请求的查询选项(Job List)
   static const apiJobListIndexSG = "/index.php/api/v1/hotel/job/index";
@@ -188,8 +206,6 @@ class ApiConstants {
   //用工请求的考勤确认(Job List)
   static const apiJobListConfirmSG = "/index.php/api/v1/hotel/job/confirm";
 
-  //新加坡的用工请求删除
-  static const apiLabourRequestDelete = "/index.php/api/v1/hotel/lab-req/destroy";
 
   // =========================== 新加坡工作相关 ↓=========================================
 

+ 17 - 0
packages/cs_domain/lib/entity/agency_need_number.dart

@@ -0,0 +1,17 @@
+/// 指定一个中介需要的人数的封装对象
+class AgencyNeedNumberEntity {
+  bool isInHouse = false;  //是否是 InHour 的特殊类型
+  String? agencyId;
+  String? agencyName;
+  int sexLimit = 0; //是否限制性别 0不限制  1限制
+  int needNum = 0; // 不限制性别的总人数
+  int maleLimit = 0; //限制性别的男性人数
+  int femaleLimit = 0;
+
+
+  @override
+  String toString() {
+    return 'AgencyNeedNumberEntity{isInHouse: $isInHouse, agencyId: $agencyId, agencyName: $agencyName, sexLimit: $sexLimit, needNum: $needNum, maleLimit: $maleLimit, femaleLimit: $femaleLimit}';
+  } //限制性别的女性人数
+
+}

+ 0 - 45
packages/cs_domain/lib/entity/response/labour_request_s_g_add_index_entity.dart

@@ -1,45 +0,0 @@
-import 'package:domain/generated/json/base/json_field.dart';
-import 'package:domain/generated/json/labour_request_s_g_add_index_entity.g.dart';
-import 'dart:convert';
-export 'package:domain/generated/json/labour_request_s_g_add_index_entity.g.dart';
-
-@JsonSerializable()
-class LabourRequestSGAddIndexEntity {
-	@JSONField(name: "title_list")
-	List<LabourRequestSGAddIndexOption> titleList = [];
-	@JSONField(name: "outlet_list")
-	List<LabourRequestSGAddIndexOption> outletList = [];
-	@JSONField(name: "request_type")
-	List<LabourRequestSGAddIndexOption> requestType = [];
-	@JSONField(name: "position_list")
-	List<LabourRequestSGAddIndexOption> positionList = [];
-
-	LabourRequestSGAddIndexEntity();
-
-	factory LabourRequestSGAddIndexEntity.fromJson(Map<String, dynamic> json) => $LabourRequestSGAddIndexEntityFromJson(json);
-
-	Map<String, dynamic> toJson() => $LabourRequestSGAddIndexEntityToJson(this);
-
-	@override
-	String toString() {
-		return jsonEncode(this);
-	}
-}
-
-@JsonSerializable()
-class LabourRequestSGAddIndexOption {
-	String? value = null;
-	String? txt = null;
-	String? selected = null;
-
-	LabourRequestSGAddIndexOption();
-
-	factory LabourRequestSGAddIndexOption.fromJson(Map<String, dynamic> json) => $LabourRequestSGAddIndexOptionFromJson(json);
-
-	Map<String, dynamic> toJson() => $LabourRequestSGAddIndexOptionToJson(this);
-
-	@override
-	String toString() {
-		return jsonEncode(this);
-	}
-}

+ 0 - 142
packages/cs_domain/lib/entity/response/labour_request_s_g_edit_index_entity.dart

@@ -1,142 +0,0 @@
-import 'package:domain/generated/json/base/json_field.dart';
-import 'package:domain/generated/json/labour_request_s_g_edit_index_entity.g.dart';
-import 'dart:convert';
-export 'package:domain/generated/json/labour_request_s_g_edit_index_entity.g.dart';
-
-@JsonSerializable()
-class LabourRequestSGEditIndexEntity {
-	LabourRequestSGEditIndexJob? job;
-	@JSONField(name: "request_id")
-	String? requestId;
-	@JSONField(name: "job_title")
-	String? jobTitle;
-	@JSONField(name: "outlet_id")
-	int? outletId;
-	@JSONField(name: "req_type")
-	int? reqType;
-	@JSONField(name: "start_time")
-	String? startTime;
-	String? remark;
-	@JSONField(name: "end_time")
-	String? endTime;
-	@JSONField(name: "outlet_list")
-	List<LabourRequestSGEditIndexJob> outletList = [];
-	@JSONField(name: "request_type")
-	List<LabourRequestSGEditIndexChecked> requestType = [];
-	@JSONField(name: "limit_list")
-	List<LabourRequestSGEditIndexJob> limitList = [];
-	@JSONField(name: "look_remark")
-	bool? lookRemark;
-
-	LabourRequestSGEditIndexEntity();
-
-	factory LabourRequestSGEditIndexEntity.fromJson(Map<String, dynamic> json) => $LabourRequestSGEditIndexEntityFromJson(json);
-
-	Map<String, dynamic> toJson() => $LabourRequestSGEditIndexEntityToJson(this);
-
-	@override
-	String toString() {
-		return jsonEncode(this);
-	}
-}
-
-@JsonSerializable()
-class LabourRequestSGEditIndexJob {
-	String? id;
-	@JSONField(name: "employer_admin_id")
-	String? employerAdminId;
-	@JSONField(name: "job_title")
-	String? jobTitle;
-	@JSONField(name: "need_num")
-	int? needNum;
-	@JSONField(name: "gender_number_limit")
-	int? genderNumberLimit;
-	@JSONField(name: "male_number_limit")
-	int? maleNumberLimit;
-	@JSONField(name: "female_number_limit")
-	int? femaleNumberLimit;
-	@JSONField(name: "job_start")
-	String? jobStart;
-	@JSONField(name: "job_end")
-	String? jobEnd;
-	@JSONField(name: "job_id")
-	int? jobId;
-	@JSONField(name: "remark_id")
-	int? remarkId;
-	String? status;
-	@JSONField(name: "add_time")
-	String? addTime;
-	String? from;
-	@JSONField(name: "reject_reason")
-	dynamic rejectReason;
-	dynamic banquet;
-	@JSONField(name: "hotel_job_id")
-	int? hotelJobId;
-	@JSONField(name: "work_content")
-	String? workContent;
-	@JSONField(name: "crm_contract_position_id")
-	int? crmContractPositionId;
-	@JSONField(name: "rate_type")
-	int? rateType;
-	@JSONField(name: "is_send")
-	int? isSend;
-	@JSONField(name: "request_type")
-	int? requestType;
-	@JSONField(name: "outlet_id")
-	int? outletId;
-	@JSONField(name: "outlet_name")
-	String? outletName;
-	@JSONField(name: "job_title_id")
-	int? jobTitleId;
-	@JSONField(name: "agency_rate")
-	String? agencyRate;
-	@JSONField(name: "hotel_remark")
-	dynamic hotelRemark;
-
-	LabourRequestSGEditIndexJob();
-
-	factory LabourRequestSGEditIndexJob.fromJson(Map<String, dynamic> json) => $LabourRequestSGEditIndexJobFromJson(json);
-
-	Map<String, dynamic> toJson() => $LabourRequestSGEditIndexJobToJson(this);
-
-	@override
-	String toString() {
-		return jsonEncode(this);
-	}
-}
-
-@JsonSerializable()
-class LabourRequestSGEditSelected {
-	String? value;
-	String? txt;
-	String? selected;
-
-	LabourRequestSGEditSelected();
-
-	factory LabourRequestSGEditSelected.fromJson(Map<String, dynamic> json) => $LabourRequestSGEditSelectedFromJson(json);
-
-	Map<String, dynamic> toJson() => $LabourRequestSGEditSelectedToJson(this);
-
-	@override
-	String toString() {
-		return jsonEncode(this);
-	}
-}
-
-@JsonSerializable()
-class LabourRequestSGEditIndexChecked {
-	String? value;
-	String? txt;
-	String? checked;
-
-	LabourRequestSGEditIndexChecked();
-
-	factory LabourRequestSGEditIndexChecked.fromJson(Map<String, dynamic> json) => $LabourRequestSGEditIndexCheckedFromJson(json);
-
-	Map<String, dynamic> toJson() => $LabourRequestSGEditIndexCheckedToJson(this);
-
-	@override
-	String toString() {
-		return jsonEncode(this);
-	}
-}

+ 0 - 43
packages/cs_domain/lib/entity/response/labour_request_s_g_entity.dart

@@ -1,43 +0,0 @@
-import 'package:domain/generated/json/base/json_field.dart';
-import 'package:domain/generated/json/labour_request_s_g_entity.g.dart';
-import 'dart:convert';
-export 'package:domain/generated/json/labour_request_s_g_entity.g.dart';
-
-@JsonSerializable()
-class LabourRequestSGEntity {
-	@JSONField(name: "count_list")
-	List<LabourRequestSGCountList> countList = [];
-
-	LabourRequestSGEntity();
-
-	factory LabourRequestSGEntity.fromJson(Map<String, dynamic> json) => $LabourRequestSGEntityFromJson(json);
-
-	Map<String, dynamic> toJson() => $LabourRequestSGEntityToJson(this);
-
-	@override
-	String toString() {
-		return jsonEncode(this);
-	}
-}
-
-@JsonSerializable()
-class LabourRequestSGCountList {
-	String? date = null;
-	String? week = null;
-	bool today = false;
-	@JSONField(name: "real_num")
-	int realNum = 0;
-	@JSONField(name: "hiring_num")
-	int hiringNum = 0;
-
-	LabourRequestSGCountList();
-
-	factory LabourRequestSGCountList.fromJson(Map<String, dynamic> json) => $LabourRequestSGCountListFromJson(json);
-
-	Map<String, dynamic> toJson() => $LabourRequestSGCountListToJson(this);
-
-	@override
-	String toString() {
-		return jsonEncode(this);
-	}
-}

+ 0 - 57
packages/cs_domain/lib/entity/response/labour_request_s_g_list_entity.dart

@@ -1,57 +0,0 @@
-import 'package:domain/generated/json/base/json_field.dart';
-import 'package:domain/generated/json/labour_request_s_g_list_entity.g.dart';
-import 'dart:convert';
-export 'package:domain/generated/json/labour_request_s_g_list_entity.g.dart';
-
-@JsonSerializable()
-class LabourRequestSGListEntity {
-	int? total;
-	List<LabourRequestSGListRows>? rows = [];
-
-	LabourRequestSGListEntity();
-
-	factory LabourRequestSGListEntity.fromJson(Map<String, dynamic> json) => $LabourRequestSGListEntityFromJson(json);
-
-	Map<String, dynamic> toJson() => $LabourRequestSGListEntityToJson(this);
-
-	@override
-	String toString() {
-		return jsonEncode(this);
-	}
-}
-
-@JsonSerializable()
-class LabourRequestSGListRows {
-	@JSONField(name: "request_id")
-	String? requestId;
-	@JSONField(name: "outlet_name")
-	String? outletName;
-	@JSONField(name: "job_title")
-	String? jobTitle;
-	@JSONField(name: "need_num")
-	int? needNum;
-	@JSONField(name: "job_date")
-	String? jobDate;
-	@JSONField(name: "start_time")
-	String? startTime;
-	@JSONField(name: "end_time")
-	String? endTime;
-	String? status;
-	@JSONField(name: "status_show")
-	String? statusShow;
-	@JSONField(name: "created_at")
-	String? createdAt;
-	@JSONField(name: "action_list")
-	List<String> actionList = [];
-
-	LabourRequestSGListRows();
-
-	factory LabourRequestSGListRows.fromJson(Map<String, dynamic> json) => $LabourRequestSGListRowsFromJson(json);
-
-	Map<String, dynamic> toJson() => $LabourRequestSGListRowsToJson(this);
-
-	@override
-	String toString() {
-		return jsonEncode(this);
-	}
-}

+ 51 - 0
packages/cs_domain/lib/entity/response/s_g_labour_request_add_option_entity.dart

@@ -0,0 +1,51 @@
+import 'package:domain/entity/response/index_option_entity.dart';
+import 'package:domain/generated/json/base/json_field.dart';
+import 'package:domain/generated/json/s_g_labour_request_add_option_entity.g.dart';
+import 'dart:convert';
+export 'package:domain/generated/json/s_g_labour_request_add_option_entity.g.dart';
+
+@JsonSerializable()
+class SGLabourRequestAddOptionEntity {
+  @JSONField(name: "agency_list")
+  List<LabourRequestAgencyEntity> agencyList = [];
+  @JSONField(name: "title_list")
+  List<IndexOptionEntity> titleList = [];
+  @JSONField(name: "outlet_list")
+  List<IndexOptionEntity> outletList = [];
+  @JSONField(name: "limit_list")
+  List<IndexOptionEntity> limitList = [];
+  @JSONField(name: "request_type")
+  List<IndexOptionEntity> requestType = [];
+  @JSONField(name: "position_list")
+  List<IndexOptionEntity> positionList = [];
+
+  SGLabourRequestAddOptionEntity();
+
+  factory SGLabourRequestAddOptionEntity.fromJson(Map<String, dynamic> json) => $SGLabourRequestAddOptionEntityFromJson(json);
+
+  Map<String, dynamic> toJson() => $SGLabourRequestAddOptionEntityToJson(this);
+
+  @override
+  String toString() {
+    return jsonEncode(this);
+  }
+}
+
+@JsonSerializable()
+class LabourRequestAgencyEntity {
+  @JSONField(name: "agency_id")
+  String? agencyId;
+  @JSONField(name: "agency_name")
+  String? agencyName;
+
+  LabourRequestAgencyEntity();
+
+  factory LabourRequestAgencyEntity.fromJson(Map<String, dynamic> json) => $LabourRequestAgencyEntityFromJson(json);
+
+  Map<String, dynamic> toJson() => $LabourRequestAgencyEntityToJson(this);
+
+  @override
+  String toString() {
+    return jsonEncode(this);
+  }
+}

+ 114 - 0
packages/cs_domain/lib/entity/response/s_g_labour_request_detail_entity.dart

@@ -0,0 +1,114 @@
+import 'package:domain/entity/response/index_option_entity.dart';
+import 'package:domain/generated/json/base/json_field.dart';
+import 'package:domain/generated/json/s_g_labour_request_detail_entity.g.dart';
+import 'dart:convert';
+export 'package:domain/generated/json/s_g_labour_request_detail_entity.g.dart';
+
+@JsonSerializable()
+class SGLabourRequestDetailEntity {
+	@JSONField(name: "lab_req")
+	SGLabourRequestDetailLabReq? labReq;
+	@JSONField(name: "from_view")
+	String? fromView;
+	@JSONField(name: "start_time")
+	String? startTime;
+	@JSONField(name: "end_time")
+	String? endTime;
+	@JSONField(name: "is_yy")
+	bool? isYY;
+	@JSONField(name: "outlet_list")
+	List<IndexOptionEntity> outletList = [];
+	@JSONField(name: "limit_list")
+	List<IndexOptionEntity> limitList = [];
+	@JSONField(name: "request_type")
+	List<IndexOptionEntity> requestType = [];
+	@JSONField(name: "position_list")
+	List<IndexOptionEntity> positionList = [];
+
+	SGLabourRequestDetailEntity();
+
+	factory SGLabourRequestDetailEntity.fromJson(Map<String, dynamic> json) => $SGLabourRequestDetailEntityFromJson(json);
+
+	Map<String, dynamic> toJson() => $SGLabourRequestDetailEntityToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}
+
+@JsonSerializable()
+class SGLabourRequestDetailLabReq {
+	int? id;
+	@JSONField(name: "employer_id")
+	int? employerId;
+	@JSONField(name: "employer_name")
+	String? employerName;
+	@JSONField(name: "e_admin_id")
+	int? eAdminId;
+	@JSONField(name: "source_type")
+	int? sourceType;
+	@JSONField(name: "agency_id")
+	int? agencyId;
+	@JSONField(name: "agency_name")
+	String? agencyName;
+	@JSONField(name: "job_title")
+	String? jobTitle;
+	@JSONField(name: "outlet_id")
+	int? outletId;
+	@JSONField(name: "outlet_name")
+	String? outletName;
+	@JSONField(name: "job_date")
+	String? jobDate;
+	@JSONField(name: "start_time")
+	int? startTime;
+	@JSONField(name: "end_time")
+	int? endTime;
+	@JSONField(name: "working_hours")
+	String? workingHours;
+	@JSONField(name: "hourly_rate")
+	String? hourlyRate;
+	@JSONField(name: "hiring_num")
+	int? hiringNum;
+	@JSONField(name: "agency_rate")
+	String? agencyRate;
+	@JSONField(name: "job_title_id")
+	int? jobTitleId;
+	@JSONField(name: "with_food_cert")
+	int? withFoodCert;
+	@JSONField(name: "request_type")
+	int? requestType;
+	@JSONField(name: "sex_limit")
+	int? sexLimit;
+	@JSONField(name: "male_limit")
+	int? maleLimit;
+	@JSONField(name: "female_limit")
+	int? femaleLimit;
+	@JSONField(name: "position_id")
+	int? positionId;
+	@JSONField(name: "position_name")
+	String? positionName;
+	int? status;
+	String? description;
+	@JSONField(name: "created_at")
+	String? createdAt;
+	@JSONField(name: "updated_at")
+	String? updatedAt;
+	@JSONField(name: "deleted_at")
+	dynamic deletedAt;
+	@JSONField(name: "post_id")
+	int? postId;
+	@JSONField(name: "post_name")
+	String? postName;
+
+	SGLabourRequestDetailLabReq();
+
+	factory SGLabourRequestDetailLabReq.fromJson(Map<String, dynamic> json) => $SGLabourRequestDetailLabReqFromJson(json);
+
+	Map<String, dynamic> toJson() => $SGLabourRequestDetailLabReqToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}

+ 33 - 0
packages/cs_domain/lib/entity/response/s_g_labour_request_option_entity.dart

@@ -0,0 +1,33 @@
+import 'package:domain/entity/response/index_option_entity.dart';
+import 'package:domain/generated/json/base/json_field.dart';
+import 'package:domain/generated/json/s_g_labour_request_option_entity.g.dart';
+import 'dart:convert';
+export 'package:domain/generated/json/s_g_labour_request_option_entity.g.dart';
+
+@JsonSerializable()
+class SGLabourRequestOptionEntity {
+	@JSONField(name: "outlet_id")
+	String? outletId;
+	@JSONField(name: "start_date")
+	String? startDate;
+	@JSONField(name: "end_date")
+	String? endDate;
+	@JSONField(name: "agency_list")
+	List<IndexOptionEntity> agencyList = [];
+	@JSONField(name: "outlet_list")
+	List<IndexOptionEntity> outletList = [];
+	@JSONField(name: "status_list")
+	List<IndexOptionEntity> statusList = [];
+
+	SGLabourRequestOptionEntity();
+
+	factory SGLabourRequestOptionEntity.fromJson(Map<String, dynamic> json) => $SGLabourRequestOptionEntityFromJson(json);
+
+	Map<String, dynamic> toJson() => $SGLabourRequestOptionEntityToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+
+}

+ 57 - 0
packages/cs_domain/lib/entity/response/s_g_labour_request_table_entity.dart

@@ -0,0 +1,57 @@
+import 'package:domain/generated/json/base/json_field.dart';
+import 'package:domain/generated/json/s_g_labour_request_table_entity.g.dart';
+import 'dart:convert';
+export 'package:domain/generated/json/s_g_labour_request_table_entity.g.dart';
+
+@JsonSerializable()
+class SGLabourRequestTableEntity {
+	int total = 0;
+	List<SGLabourRequestTableRows> rows = [];
+
+	SGLabourRequestTableEntity();
+
+	factory SGLabourRequestTableEntity.fromJson(Map<String, dynamic> json) => $SGLabourRequestTableEntityFromJson(json);
+
+	Map<String, dynamic> toJson() => $SGLabourRequestTableEntityToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}
+
+@JsonSerializable()
+class SGLabourRequestTableRows {
+	String? id;
+	String? source;
+	@JSONField(name: "job_date")
+	String? jobDate;
+	@JSONField(name: "outlet_name")
+	String? outletName;
+	@JSONField(name: "job_title")
+	String? jobTitle;
+	@JSONField(name: "start_time")
+	String? startTime;
+	@JSONField(name: "end_time")
+	String? endTime;
+	int status = 0;
+	@JSONField(name: "status_show")
+	String? statusShow;
+	@JSONField(name: "hiring_num")
+	String? hiringNum;
+	@JSONField(name: "created_at")
+	String? createdAt;
+	@JSONField(name: "action_list")
+	List<String> actionList = [];
+
+	SGLabourRequestTableRows();
+
+	factory SGLabourRequestTableRows.fromJson(Map<String, dynamic> json) => $SGLabourRequestTableRowsFromJson(json);
+
+	Map<String, dynamic> toJson() => $SGLabourRequestTableRowsToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}

+ 132 - 0
packages/cs_domain/lib/entity/response/s_g_labour_request_worl_flow_entity.dart

@@ -0,0 +1,132 @@
+import 'package:domain/generated/json/base/json_field.dart';
+import 'package:domain/generated/json/s_g_labour_request_worl_flow_entity.g.dart';
+import 'dart:convert';
+export 'package:domain/generated/json/s_g_labour_request_worl_flow_entity.g.dart';
+
+@JsonSerializable()
+class SGLabourRequestWorlFlowEntity {
+	SGLabourRequestWorlFlowRow? row;
+	@JSONField(name: "outlet_id")
+	String? outletId;
+	List<SGLabourRequestWorlFlowRecords> records = [];
+
+	SGLabourRequestWorlFlowEntity();
+
+	factory SGLabourRequestWorlFlowEntity.fromJson(Map<String, dynamic> json) => $SGLabourRequestWorlFlowEntityFromJson(json);
+
+	Map<String, dynamic> toJson() => $SGLabourRequestWorlFlowEntityToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}
+
+@JsonSerializable()
+class SGLabourRequestWorlFlowRow {
+	String? id;
+	@JSONField(name: "employer_id")
+	String? employerId;
+	@JSONField(name: "employer_name")
+	String? employerName;
+	@JSONField(name: "e_admin_id")
+	String? eAdminId;
+	@JSONField(name: "source_type")
+	int? sourceType;
+	@JSONField(name: "agency_id")
+	String? agencyId;
+	@JSONField(name: "agency_name")
+	String? agencyName;
+	@JSONField(name: "job_title")
+	String? jobTitle;
+	@JSONField(name: "outlet_id")
+	String? outletId;
+	@JSONField(name: "outlet_name")
+	String? outletName;
+	@JSONField(name: "job_date")
+	String? jobDate;
+	@JSONField(name: "start_time")
+	int? startTime;
+	@JSONField(name: "end_time")
+	int? endTime;
+	@JSONField(name: "working_hours")
+	String? workingHours;
+	@JSONField(name: "hourly_rate")
+	String? hourlyRate;
+	@JSONField(name: "hiring_num")
+	int? hiringNum;
+	@JSONField(name: "agency_rate")
+	String? agencyRate;
+	@JSONField(name: "job_title_id")
+	int? jobTitleId;
+	@JSONField(name: "with_food_cert")
+	int? withFoodCert;
+	@JSONField(name: "request_type")
+	int? requestType;
+	@JSONField(name: "sex_limit")
+	int? sexLimit;
+	@JSONField(name: "male_limit")
+	int? maleLimit;
+	@JSONField(name: "female_limit")
+	int? femaleLimit;
+	@JSONField(name: "position_id")
+	int? positionId;
+	@JSONField(name: "position_name")
+	String? positionName;
+	int status = 0;
+	String? description;
+	@JSONField(name: "created_at")
+	String? createdAt;
+	@JSONField(name: "updated_at")
+	String? updatedAt;
+	@JSONField(name: "deleted_at")
+	String? deletedAt;
+	@JSONField(name: "post_id")
+	int? postId;
+	@JSONField(name: "post_name")
+	String? postName;
+
+	SGLabourRequestWorlFlowRow();
+
+	factory SGLabourRequestWorlFlowRow.fromJson(Map<String, dynamic> json) => $SGLabourRequestWorlFlowRowFromJson(json);
+
+	Map<String, dynamic> toJson() => $SGLabourRequestWorlFlowRowToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}
+
+@JsonSerializable()
+class SGLabourRequestWorlFlowRecords {
+	@JSONField(name: "serial_number")
+	int? serialNumber;
+	@JSONField(name: "node_name")
+	String? nodeName;
+	@JSONField(name: "status_show")
+	String? statusShow;
+	@JSONField(name: "audit_name")
+	String? auditName;
+	@JSONField(name: "audit_time")
+	String? auditTime;
+	@JSONField(name: "audit_mark")
+	String? auditMark;
+	@JSONField(name: "created_at")
+	String? createdAt;
+	@JSONField(name: "assignee_type_show")
+	String? assigneeTypeShow;
+	@JSONField(name: "designation_show")
+	String? designationShow;
+
+	SGLabourRequestWorlFlowRecords();
+
+	factory SGLabourRequestWorlFlowRecords.fromJson(Map<String, dynamic> json) => $SGLabourRequestWorlFlowRecordsFromJson(json);
+
+	Map<String, dynamic> toJson() => $SGLabourRequestWorlFlowRecordsToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}

+ 45 - 44
packages/cs_domain/lib/generated/json/base/json_convert_content.dart

@@ -52,10 +52,6 @@ import 'package:domain/entity/response/labour_report_v_n_entity.dart';
 import 'package:domain/entity/response/labour_request_edit_index_entity.dart';
 import 'package:domain/entity/response/labour_request_index_entity.dart';
 import 'package:domain/entity/response/labour_request_list_entity.dart';
-import 'package:domain/entity/response/labour_request_s_g_add_index_entity.dart';
-import 'package:domain/entity/response/labour_request_s_g_edit_index_entity.dart';
-import 'package:domain/entity/response/labour_request_s_g_entity.dart';
-import 'package:domain/entity/response/labour_request_s_g_list_entity.dart';
 import 'package:domain/entity/response/labour_request_work_flow_entity.dart';
 import 'package:domain/entity/response/labour_review_list_entity.dart';
 import 'package:domain/entity/response/labour_review_status_entity.dart';
@@ -63,6 +59,11 @@ import 'package:domain/entity/response/position_table_entity.dart';
 import 'package:domain/entity/response/revise_index_s_g_entity.dart';
 import 'package:domain/entity/response/revise_list_s_g_entity.dart';
 import 'package:domain/entity/response/revise_log_s_g_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_add_option_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_detail_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_option_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_table_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_worl_flow_entity.dart';
 import 'package:domain/entity/response/staff_detail_entity.dart';
 import 'package:domain/entity/response/staff_detail_s_g_entity.dart';
 import 'package:domain/entity/response/staff_job_history_s_g_entity.dart';
@@ -495,36 +496,6 @@ class JsonConvert {
     if (<LabourRequestListRows>[] is M) {
       return data.map<LabourRequestListRows>((Map<String, dynamic> e) => LabourRequestListRows.fromJson(e)).toList() as M;
     }
-    if (<LabourRequestSGAddIndexEntity>[] is M) {
-      return data.map<LabourRequestSGAddIndexEntity>((Map<String, dynamic> e) => LabourRequestSGAddIndexEntity.fromJson(e)).toList() as M;
-    }
-    if (<LabourRequestSGAddIndexOption>[] is M) {
-      return data.map<LabourRequestSGAddIndexOption>((Map<String, dynamic> e) => LabourRequestSGAddIndexOption.fromJson(e)).toList() as M;
-    }
-    if (<LabourRequestSGEditIndexEntity>[] is M) {
-      return data.map<LabourRequestSGEditIndexEntity>((Map<String, dynamic> e) => LabourRequestSGEditIndexEntity.fromJson(e)).toList() as M;
-    }
-    if (<LabourRequestSGEditIndexJob>[] is M) {
-      return data.map<LabourRequestSGEditIndexJob>((Map<String, dynamic> e) => LabourRequestSGEditIndexJob.fromJson(e)).toList() as M;
-    }
-    if (<LabourRequestSGEditSelected>[] is M) {
-      return data.map<LabourRequestSGEditSelected>((Map<String, dynamic> e) => LabourRequestSGEditSelected.fromJson(e)).toList() as M;
-    }
-    if (<LabourRequestSGEditIndexChecked>[] is M) {
-      return data.map<LabourRequestSGEditIndexChecked>((Map<String, dynamic> e) => LabourRequestSGEditIndexChecked.fromJson(e)).toList() as M;
-    }
-    if (<LabourRequestSGEntity>[] is M) {
-      return data.map<LabourRequestSGEntity>((Map<String, dynamic> e) => LabourRequestSGEntity.fromJson(e)).toList() as M;
-    }
-    if (<LabourRequestSGCountList>[] is M) {
-      return data.map<LabourRequestSGCountList>((Map<String, dynamic> e) => LabourRequestSGCountList.fromJson(e)).toList() as M;
-    }
-    if (<LabourRequestSGListEntity>[] is M) {
-      return data.map<LabourRequestSGListEntity>((Map<String, dynamic> e) => LabourRequestSGListEntity.fromJson(e)).toList() as M;
-    }
-    if (<LabourRequestSGListRows>[] is M) {
-      return data.map<LabourRequestSGListRows>((Map<String, dynamic> e) => LabourRequestSGListRows.fromJson(e)).toList() as M;
-    }
     if (<LabourRequestWorkFlowEntity>[] is M) {
       return data.map<LabourRequestWorkFlowEntity>((Map<String, dynamic> e) => LabourRequestWorkFlowEntity.fromJson(e)).toList() as M;
     }
@@ -573,6 +544,36 @@ class JsonConvert {
     if (<ReviseLogSGRecordsOption>[] is M) {
       return data.map<ReviseLogSGRecordsOption>((Map<String, dynamic> e) => ReviseLogSGRecordsOption.fromJson(e)).toList() as M;
     }
+    if (<SGLabourRequestAddOptionEntity>[] is M) {
+      return data.map<SGLabourRequestAddOptionEntity>((Map<String, dynamic> e) => SGLabourRequestAddOptionEntity.fromJson(e)).toList() as M;
+    }
+    if (<LabourRequestAgencyEntity>[] is M) {
+      return data.map<LabourRequestAgencyEntity>((Map<String, dynamic> e) => LabourRequestAgencyEntity.fromJson(e)).toList() as M;
+    }
+    if (<SGLabourRequestDetailEntity>[] is M) {
+      return data.map<SGLabourRequestDetailEntity>((Map<String, dynamic> e) => SGLabourRequestDetailEntity.fromJson(e)).toList() as M;
+    }
+    if (<SGLabourRequestDetailLabReq>[] is M) {
+      return data.map<SGLabourRequestDetailLabReq>((Map<String, dynamic> e) => SGLabourRequestDetailLabReq.fromJson(e)).toList() as M;
+    }
+    if (<SGLabourRequestOptionEntity>[] is M) {
+      return data.map<SGLabourRequestOptionEntity>((Map<String, dynamic> e) => SGLabourRequestOptionEntity.fromJson(e)).toList() as M;
+    }
+    if (<SGLabourRequestTableEntity>[] is M) {
+      return data.map<SGLabourRequestTableEntity>((Map<String, dynamic> e) => SGLabourRequestTableEntity.fromJson(e)).toList() as M;
+    }
+    if (<SGLabourRequestTableRows>[] is M) {
+      return data.map<SGLabourRequestTableRows>((Map<String, dynamic> e) => SGLabourRequestTableRows.fromJson(e)).toList() as M;
+    }
+    if (<SGLabourRequestWorlFlowEntity>[] is M) {
+      return data.map<SGLabourRequestWorlFlowEntity>((Map<String, dynamic> e) => SGLabourRequestWorlFlowEntity.fromJson(e)).toList() as M;
+    }
+    if (<SGLabourRequestWorlFlowRow>[] is M) {
+      return data.map<SGLabourRequestWorlFlowRow>((Map<String, dynamic> e) => SGLabourRequestWorlFlowRow.fromJson(e)).toList() as M;
+    }
+    if (<SGLabourRequestWorlFlowRecords>[] is M) {
+      return data.map<SGLabourRequestWorlFlowRecords>((Map<String, dynamic> e) => SGLabourRequestWorlFlowRecords.fromJson(e)).toList() as M;
+    }
     if (<StaffDetailEntity>[] is M) {
       return data.map<StaffDetailEntity>((Map<String, dynamic> e) => StaffDetailEntity.fromJson(e)).toList() as M;
     }
@@ -747,16 +748,6 @@ class JsonConvertClassCollection {
     (LabourRequestIndexStatusList).toString(): LabourRequestIndexStatusList.fromJson,
     (LabourRequestListEntity).toString(): LabourRequestListEntity.fromJson,
     (LabourRequestListRows).toString(): LabourRequestListRows.fromJson,
-    (LabourRequestSGAddIndexEntity).toString(): LabourRequestSGAddIndexEntity.fromJson,
-    (LabourRequestSGAddIndexOption).toString(): LabourRequestSGAddIndexOption.fromJson,
-    (LabourRequestSGEditIndexEntity).toString(): LabourRequestSGEditIndexEntity.fromJson,
-    (LabourRequestSGEditIndexJob).toString(): LabourRequestSGEditIndexJob.fromJson,
-    (LabourRequestSGEditSelected).toString(): LabourRequestSGEditSelected.fromJson,
-    (LabourRequestSGEditIndexChecked).toString(): LabourRequestSGEditIndexChecked.fromJson,
-    (LabourRequestSGEntity).toString(): LabourRequestSGEntity.fromJson,
-    (LabourRequestSGCountList).toString(): LabourRequestSGCountList.fromJson,
-    (LabourRequestSGListEntity).toString(): LabourRequestSGListEntity.fromJson,
-    (LabourRequestSGListRows).toString(): LabourRequestSGListRows.fromJson,
     (LabourRequestWorkFlowEntity).toString(): LabourRequestWorkFlowEntity.fromJson,
     (LabourRequestWorkFlowRecords).toString(): LabourRequestWorkFlowRecords.fromJson,
     (LabourReviewListEntity).toString(): LabourReviewListEntity.fromJson,
@@ -773,6 +764,16 @@ class JsonConvertClassCollection {
     (ReviseLogSGRecords).toString(): ReviseLogSGRecords.fromJson,
     (ReviseLogSGRecordsContent).toString(): ReviseLogSGRecordsContent.fromJson,
     (ReviseLogSGRecordsOption).toString(): ReviseLogSGRecordsOption.fromJson,
+    (SGLabourRequestAddOptionEntity).toString(): SGLabourRequestAddOptionEntity.fromJson,
+    (LabourRequestAgencyEntity).toString(): LabourRequestAgencyEntity.fromJson,
+    (SGLabourRequestDetailEntity).toString(): SGLabourRequestDetailEntity.fromJson,
+    (SGLabourRequestDetailLabReq).toString(): SGLabourRequestDetailLabReq.fromJson,
+    (SGLabourRequestOptionEntity).toString(): SGLabourRequestOptionEntity.fromJson,
+    (SGLabourRequestTableEntity).toString(): SGLabourRequestTableEntity.fromJson,
+    (SGLabourRequestTableRows).toString(): SGLabourRequestTableRows.fromJson,
+    (SGLabourRequestWorlFlowEntity).toString(): SGLabourRequestWorlFlowEntity.fromJson,
+    (SGLabourRequestWorlFlowRow).toString(): SGLabourRequestWorlFlowRow.fromJson,
+    (SGLabourRequestWorlFlowRecords).toString(): SGLabourRequestWorlFlowRecords.fromJson,
     (StaffDetailEntity).toString(): StaffDetailEntity.fromJson,
     (StaffDetailSGEntity).toString(): StaffDetailSGEntity.fromJson,
     (StaffDetailSGReviews).toString(): StaffDetailSGReviews.fromJson,

+ 0 - 89
packages/cs_domain/lib/generated/json/labour_request_s_g_add_index_entity.g.dart

@@ -1,89 +0,0 @@
-import 'package:domain/generated/json/base/json_convert_content.dart';
-import 'package:domain/entity/response/labour_request_s_g_add_index_entity.dart';
-
-LabourRequestSGAddIndexEntity $LabourRequestSGAddIndexEntityFromJson(Map<String, dynamic> json) {
-  final LabourRequestSGAddIndexEntity labourRequestSGAddIndexEntity = LabourRequestSGAddIndexEntity();
-  final List<LabourRequestSGAddIndexOption>? titleList = (json['title_list'] as List<dynamic>?)?.map(
-          (e) => jsonConvert.convert<LabourRequestSGAddIndexOption>(e) as LabourRequestSGAddIndexOption).toList();
-  if (titleList != null) {
-    labourRequestSGAddIndexEntity.titleList = titleList;
-  }
-  final List<LabourRequestSGAddIndexOption>? outletList = (json['outlet_list'] as List<dynamic>?)?.map(
-          (e) => jsonConvert.convert<LabourRequestSGAddIndexOption>(e) as LabourRequestSGAddIndexOption).toList();
-  if (outletList != null) {
-    labourRequestSGAddIndexEntity.outletList = outletList;
-  }
-  final List<LabourRequestSGAddIndexOption>? requestType = (json['request_type'] as List<dynamic>?)?.map(
-          (e) => jsonConvert.convert<LabourRequestSGAddIndexOption>(e) as LabourRequestSGAddIndexOption).toList();
-  if (requestType != null) {
-    labourRequestSGAddIndexEntity.requestType = requestType;
-  }
-  final List<LabourRequestSGAddIndexOption>? positionList = (json['position_list'] as List<dynamic>?)?.map(
-          (e) => jsonConvert.convert<LabourRequestSGAddIndexOption>(e) as LabourRequestSGAddIndexOption).toList();
-  if (positionList != null) {
-    labourRequestSGAddIndexEntity.positionList = positionList;
-  }
-  return labourRequestSGAddIndexEntity;
-}
-
-Map<String, dynamic> $LabourRequestSGAddIndexEntityToJson(LabourRequestSGAddIndexEntity entity) {
-  final Map<String, dynamic> data = <String, dynamic>{};
-  data['title_list'] = entity.titleList.map((v) => v.toJson()).toList();
-  data['outlet_list'] = entity.outletList.map((v) => v.toJson()).toList();
-  data['request_type'] = entity.requestType.map((v) => v.toJson()).toList();
-  data['position_list'] = entity.positionList.map((v) => v.toJson()).toList();
-  return data;
-}
-
-extension LabourRequestSGAddIndexEntityExtension on LabourRequestSGAddIndexEntity {
-  LabourRequestSGAddIndexEntity copyWith({
-    List<LabourRequestSGAddIndexOption>? titleList,
-    List<LabourRequestSGAddIndexOption>? outletList,
-    List<LabourRequestSGAddIndexOption>? requestType,
-    List<LabourRequestSGAddIndexOption>? positionList,
-  }) {
-    return LabourRequestSGAddIndexEntity()
-      ..titleList = titleList ?? this.titleList
-      ..outletList = outletList ?? this.outletList
-      ..requestType = requestType ?? this.requestType
-      ..positionList = positionList ?? this.positionList;
-  }
-}
-
-LabourRequestSGAddIndexOption $LabourRequestSGAddIndexOptionFromJson(Map<String, dynamic> json) {
-  final LabourRequestSGAddIndexOption labourRequestSGAddIndexOption = LabourRequestSGAddIndexOption();
-  final String? value = jsonConvert.convert<String>(json['value']);
-  if (value != null) {
-    labourRequestSGAddIndexOption.value = value;
-  }
-  final String? txt = jsonConvert.convert<String>(json['txt']);
-  if (txt != null) {
-    labourRequestSGAddIndexOption.txt = txt;
-  }
-  final String? selected = jsonConvert.convert<String>(json['selected']);
-  if (selected != null) {
-    labourRequestSGAddIndexOption.selected = selected;
-  }
-  return labourRequestSGAddIndexOption;
-}
-
-Map<String, dynamic> $LabourRequestSGAddIndexOptionToJson(LabourRequestSGAddIndexOption entity) {
-  final Map<String, dynamic> data = <String, dynamic>{};
-  data['value'] = entity.value;
-  data['txt'] = entity.txt;
-  data['selected'] = entity.selected;
-  return data;
-}
-
-extension LabourRequestSGAddIndexOptionExtension on LabourRequestSGAddIndexOption {
-  LabourRequestSGAddIndexOption copyWith({
-    String? value,
-    String? txt,
-    String? selected,
-  }) {
-    return LabourRequestSGAddIndexOption()
-      ..value = value ?? this.value
-      ..txt = txt ?? this.txt
-      ..selected = selected ?? this.selected;
-  }
-}

+ 0 - 388
packages/cs_domain/lib/generated/json/labour_request_s_g_edit_index_entity.g.dart

@@ -1,388 +0,0 @@
-import 'package:domain/generated/json/base/json_convert_content.dart';
-import 'package:domain/entity/response/labour_request_s_g_edit_index_entity.dart';
-
-LabourRequestSGEditIndexEntity $LabourRequestSGEditIndexEntityFromJson(Map<String, dynamic> json) {
-  final LabourRequestSGEditIndexEntity labourRequestSGEditIndexEntity = LabourRequestSGEditIndexEntity();
-  final LabourRequestSGEditIndexJob? job = jsonConvert.convert<LabourRequestSGEditIndexJob>(json['job']);
-  if (job != null) {
-    labourRequestSGEditIndexEntity.job = job;
-  }
-  final String? requestId = jsonConvert.convert<String>(json['request_id']);
-  if (requestId != null) {
-    labourRequestSGEditIndexEntity.requestId = requestId;
-  }
-  final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
-  if (jobTitle != null) {
-    labourRequestSGEditIndexEntity.jobTitle = jobTitle;
-  }
-  final int? outletId = jsonConvert.convert<int>(json['outlet_id']);
-  if (outletId != null) {
-    labourRequestSGEditIndexEntity.outletId = outletId;
-  }
-  final int? reqType = jsonConvert.convert<int>(json['req_type']);
-  if (reqType != null) {
-    labourRequestSGEditIndexEntity.reqType = reqType;
-  }
-  final String? startTime = jsonConvert.convert<String>(json['start_time']);
-  if (startTime != null) {
-    labourRequestSGEditIndexEntity.startTime = startTime;
-  }
-  final String? remark = jsonConvert.convert<String>(json['remark']);
-  if (remark != null) {
-    labourRequestSGEditIndexEntity.remark = remark;
-  }
-  final String? endTime = jsonConvert.convert<String>(json['end_time']);
-  if (endTime != null) {
-    labourRequestSGEditIndexEntity.endTime = endTime;
-  }
-  final List<LabourRequestSGEditIndexJob>? outletList = (json['outlet_list'] as List<dynamic>?)?.map(
-          (e) => jsonConvert.convert<LabourRequestSGEditIndexJob>(e) as LabourRequestSGEditIndexJob).toList();
-  if (outletList != null) {
-    labourRequestSGEditIndexEntity.outletList = outletList;
-  }
-  final List<LabourRequestSGEditIndexChecked>? requestType = (json['request_type'] as List<dynamic>?)?.map(
-          (e) => jsonConvert.convert<LabourRequestSGEditIndexChecked>(e) as LabourRequestSGEditIndexChecked).toList();
-  if (requestType != null) {
-    labourRequestSGEditIndexEntity.requestType = requestType;
-  }
-  final List<LabourRequestSGEditIndexJob>? limitList = (json['limit_list'] as List<dynamic>?)?.map(
-          (e) => jsonConvert.convert<LabourRequestSGEditIndexJob>(e) as LabourRequestSGEditIndexJob).toList();
-  if (limitList != null) {
-    labourRequestSGEditIndexEntity.limitList = limitList;
-  }
-  final bool? lookRemark = jsonConvert.convert<bool>(json['look_remark']);
-  if (lookRemark != null) {
-    labourRequestSGEditIndexEntity.lookRemark = lookRemark;
-  }
-  return labourRequestSGEditIndexEntity;
-}
-
-Map<String, dynamic> $LabourRequestSGEditIndexEntityToJson(LabourRequestSGEditIndexEntity entity) {
-  final Map<String, dynamic> data = <String, dynamic>{};
-  data['job'] = entity.job?.toJson();
-  data['request_id'] = entity.requestId;
-  data['job_title'] = entity.jobTitle;
-  data['outlet_id'] = entity.outletId;
-  data['req_type'] = entity.reqType;
-  data['start_time'] = entity.startTime;
-  data['remark'] = entity.remark;
-  data['end_time'] = entity.endTime;
-  data['outlet_list'] = entity.outletList.map((v) => v.toJson()).toList();
-  data['request_type'] = entity.requestType.map((v) => v.toJson()).toList();
-  data['limit_list'] = entity.limitList.map((v) => v.toJson()).toList();
-  data['look_remark'] = entity.lookRemark;
-  return data;
-}
-
-extension LabourRequestSGEditIndexEntityExtension on LabourRequestSGEditIndexEntity {
-  LabourRequestSGEditIndexEntity copyWith({
-    LabourRequestSGEditIndexJob? job,
-    String? requestId,
-    String? jobTitle,
-    int? outletId,
-    int? reqType,
-    String? startTime,
-    String? remark,
-    String? endTime,
-    List<LabourRequestSGEditIndexJob>? outletList,
-    List<LabourRequestSGEditIndexChecked>? requestType,
-    List<LabourRequestSGEditIndexJob>? limitList,
-    bool? lookRemark,
-  }) {
-    return LabourRequestSGEditIndexEntity()
-      ..job = job ?? this.job
-      ..requestId = requestId ?? this.requestId
-      ..jobTitle = jobTitle ?? this.jobTitle
-      ..outletId = outletId ?? this.outletId
-      ..reqType = reqType ?? this.reqType
-      ..startTime = startTime ?? this.startTime
-      ..remark = remark ?? this.remark
-      ..endTime = endTime ?? this.endTime
-      ..outletList = outletList ?? this.outletList
-      ..requestType = requestType ?? this.requestType
-      ..limitList = limitList ?? this.limitList
-      ..lookRemark = lookRemark ?? this.lookRemark;
-  }
-}
-
-LabourRequestSGEditIndexJob $LabourRequestSGEditIndexJobFromJson(Map<String, dynamic> json) {
-  final LabourRequestSGEditIndexJob labourRequestSGEditIndexJob = LabourRequestSGEditIndexJob();
-  final String? id = jsonConvert.convert<String>(json['id']);
-  if (id != null) {
-    labourRequestSGEditIndexJob.id = id;
-  }
-  final String? employerAdminId = jsonConvert.convert<String>(json['employer_admin_id']);
-  if (employerAdminId != null) {
-    labourRequestSGEditIndexJob.employerAdminId = employerAdminId;
-  }
-  final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
-  if (jobTitle != null) {
-    labourRequestSGEditIndexJob.jobTitle = jobTitle;
-  }
-  final int? needNum = jsonConvert.convert<int>(json['need_num']);
-  if (needNum != null) {
-    labourRequestSGEditIndexJob.needNum = needNum;
-  }
-  final int? genderNumberLimit = jsonConvert.convert<int>(json['gender_number_limit']);
-  if (genderNumberLimit != null) {
-    labourRequestSGEditIndexJob.genderNumberLimit = genderNumberLimit;
-  }
-  final int? maleNumberLimit = jsonConvert.convert<int>(json['male_number_limit']);
-  if (maleNumberLimit != null) {
-    labourRequestSGEditIndexJob.maleNumberLimit = maleNumberLimit;
-  }
-  final int? femaleNumberLimit = jsonConvert.convert<int>(json['female_number_limit']);
-  if (femaleNumberLimit != null) {
-    labourRequestSGEditIndexJob.femaleNumberLimit = femaleNumberLimit;
-  }
-  final String? jobStart = jsonConvert.convert<String>(json['job_start']);
-  if (jobStart != null) {
-    labourRequestSGEditIndexJob.jobStart = jobStart;
-  }
-  final String? jobEnd = jsonConvert.convert<String>(json['job_end']);
-  if (jobEnd != null) {
-    labourRequestSGEditIndexJob.jobEnd = jobEnd;
-  }
-  final int? jobId = jsonConvert.convert<int>(json['job_id']);
-  if (jobId != null) {
-    labourRequestSGEditIndexJob.jobId = jobId;
-  }
-  final int? remarkId = jsonConvert.convert<int>(json['remark_id']);
-  if (remarkId != null) {
-    labourRequestSGEditIndexJob.remarkId = remarkId;
-  }
-  final String? status = jsonConvert.convert<String>(json['status']);
-  if (status != null) {
-    labourRequestSGEditIndexJob.status = status;
-  }
-  final String? addTime = jsonConvert.convert<String>(json['add_time']);
-  if (addTime != null) {
-    labourRequestSGEditIndexJob.addTime = addTime;
-  }
-  final String? from = jsonConvert.convert<String>(json['from']);
-  if (from != null) {
-    labourRequestSGEditIndexJob.from = from;
-  }
-  final dynamic rejectReason = json['reject_reason'];
-  if (rejectReason != null) {
-    labourRequestSGEditIndexJob.rejectReason = rejectReason;
-  }
-  final dynamic banquet = json['banquet'];
-  if (banquet != null) {
-    labourRequestSGEditIndexJob.banquet = banquet;
-  }
-  final int? hotelJobId = jsonConvert.convert<int>(json['hotel_job_id']);
-  if (hotelJobId != null) {
-    labourRequestSGEditIndexJob.hotelJobId = hotelJobId;
-  }
-  final String? workContent = jsonConvert.convert<String>(json['work_content']);
-  if (workContent != null) {
-    labourRequestSGEditIndexJob.workContent = workContent;
-  }
-  final int? crmContractPositionId = jsonConvert.convert<int>(json['crm_contract_position_id']);
-  if (crmContractPositionId != null) {
-    labourRequestSGEditIndexJob.crmContractPositionId = crmContractPositionId;
-  }
-  final int? rateType = jsonConvert.convert<int>(json['rate_type']);
-  if (rateType != null) {
-    labourRequestSGEditIndexJob.rateType = rateType;
-  }
-  final int? isSend = jsonConvert.convert<int>(json['is_send']);
-  if (isSend != null) {
-    labourRequestSGEditIndexJob.isSend = isSend;
-  }
-  final int? requestType = jsonConvert.convert<int>(json['request_type']);
-  if (requestType != null) {
-    labourRequestSGEditIndexJob.requestType = requestType;
-  }
-  final int? outletId = jsonConvert.convert<int>(json['outlet_id']);
-  if (outletId != null) {
-    labourRequestSGEditIndexJob.outletId = outletId;
-  }
-  final String? outletName = jsonConvert.convert<String>(json['outlet_name']);
-  if (outletName != null) {
-    labourRequestSGEditIndexJob.outletName = outletName;
-  }
-  final int? jobTitleId = jsonConvert.convert<int>(json['job_title_id']);
-  if (jobTitleId != null) {
-    labourRequestSGEditIndexJob.jobTitleId = jobTitleId;
-  }
-  final String? agencyRate = jsonConvert.convert<String>(json['agency_rate']);
-  if (agencyRate != null) {
-    labourRequestSGEditIndexJob.agencyRate = agencyRate;
-  }
-  final dynamic hotelRemark = json['hotel_remark'];
-  if (hotelRemark != null) {
-    labourRequestSGEditIndexJob.hotelRemark = hotelRemark;
-  }
-  return labourRequestSGEditIndexJob;
-}
-
-Map<String, dynamic> $LabourRequestSGEditIndexJobToJson(LabourRequestSGEditIndexJob entity) {
-  final Map<String, dynamic> data = <String, dynamic>{};
-  data['id'] = entity.id;
-  data['employer_admin_id'] = entity.employerAdminId;
-  data['job_title'] = entity.jobTitle;
-  data['need_num'] = entity.needNum;
-  data['gender_number_limit'] = entity.genderNumberLimit;
-  data['male_number_limit'] = entity.maleNumberLimit;
-  data['female_number_limit'] = entity.femaleNumberLimit;
-  data['job_start'] = entity.jobStart;
-  data['job_end'] = entity.jobEnd;
-  data['job_id'] = entity.jobId;
-  data['remark_id'] = entity.remarkId;
-  data['status'] = entity.status;
-  data['add_time'] = entity.addTime;
-  data['from'] = entity.from;
-  data['reject_reason'] = entity.rejectReason;
-  data['banquet'] = entity.banquet;
-  data['hotel_job_id'] = entity.hotelJobId;
-  data['work_content'] = entity.workContent;
-  data['crm_contract_position_id'] = entity.crmContractPositionId;
-  data['rate_type'] = entity.rateType;
-  data['is_send'] = entity.isSend;
-  data['request_type'] = entity.requestType;
-  data['outlet_id'] = entity.outletId;
-  data['outlet_name'] = entity.outletName;
-  data['job_title_id'] = entity.jobTitleId;
-  data['agency_rate'] = entity.agencyRate;
-  data['hotel_remark'] = entity.hotelRemark;
-  return data;
-}
-
-extension LabourRequestSGEditIndexJobExtension on LabourRequestSGEditIndexJob {
-  LabourRequestSGEditIndexJob copyWith({
-    String? id,
-    String? employerAdminId,
-    String? jobTitle,
-    int? needNum,
-    int? genderNumberLimit,
-    int? maleNumberLimit,
-    int? femaleNumberLimit,
-    String? jobStart,
-    String? jobEnd,
-    int? jobId,
-    int? remarkId,
-    String? status,
-    String? addTime,
-    String? from,
-    dynamic rejectReason,
-    dynamic banquet,
-    int? hotelJobId,
-    String? workContent,
-    int? crmContractPositionId,
-    int? rateType,
-    int? isSend,
-    int? requestType,
-    int? outletId,
-    String? outletName,
-    int? jobTitleId,
-    String? agencyRate,
-    dynamic hotelRemark,
-  }) {
-    return LabourRequestSGEditIndexJob()
-      ..id = id ?? this.id
-      ..employerAdminId = employerAdminId ?? this.employerAdminId
-      ..jobTitle = jobTitle ?? this.jobTitle
-      ..needNum = needNum ?? this.needNum
-      ..genderNumberLimit = genderNumberLimit ?? this.genderNumberLimit
-      ..maleNumberLimit = maleNumberLimit ?? this.maleNumberLimit
-      ..femaleNumberLimit = femaleNumberLimit ?? this.femaleNumberLimit
-      ..jobStart = jobStart ?? this.jobStart
-      ..jobEnd = jobEnd ?? this.jobEnd
-      ..jobId = jobId ?? this.jobId
-      ..remarkId = remarkId ?? this.remarkId
-      ..status = status ?? this.status
-      ..addTime = addTime ?? this.addTime
-      ..from = from ?? this.from
-      ..rejectReason = rejectReason ?? this.rejectReason
-      ..banquet = banquet ?? this.banquet
-      ..hotelJobId = hotelJobId ?? this.hotelJobId
-      ..workContent = workContent ?? this.workContent
-      ..crmContractPositionId = crmContractPositionId ?? this.crmContractPositionId
-      ..rateType = rateType ?? this.rateType
-      ..isSend = isSend ?? this.isSend
-      ..requestType = requestType ?? this.requestType
-      ..outletId = outletId ?? this.outletId
-      ..outletName = outletName ?? this.outletName
-      ..jobTitleId = jobTitleId ?? this.jobTitleId
-      ..agencyRate = agencyRate ?? this.agencyRate
-      ..hotelRemark = hotelRemark ?? this.hotelRemark;
-  }
-}
-
-LabourRequestSGEditSelected $LabourRequestSGEditSelectedFromJson(Map<String, dynamic> json) {
-  final LabourRequestSGEditSelected labourRequestSGEditSelected = LabourRequestSGEditSelected();
-  final String? value = jsonConvert.convert<String>(json['value']);
-  if (value != null) {
-    labourRequestSGEditSelected.value = value;
-  }
-  final String? txt = jsonConvert.convert<String>(json['txt']);
-  if (txt != null) {
-    labourRequestSGEditSelected.txt = txt;
-  }
-  final String? selected = jsonConvert.convert<String>(json['selected']);
-  if (selected != null) {
-    labourRequestSGEditSelected.selected = selected;
-  }
-  return labourRequestSGEditSelected;
-}
-
-Map<String, dynamic> $LabourRequestSGEditSelectedToJson(LabourRequestSGEditSelected entity) {
-  final Map<String, dynamic> data = <String, dynamic>{};
-  data['value'] = entity.value;
-  data['txt'] = entity.txt;
-  data['selected'] = entity.selected;
-  return data;
-}
-
-extension LabourRequestSGEditSelectedExtension on LabourRequestSGEditSelected {
-  LabourRequestSGEditSelected copyWith({
-    String? value,
-    String? txt,
-    String? selected,
-  }) {
-    return LabourRequestSGEditSelected()
-      ..value = value ?? this.value
-      ..txt = txt ?? this.txt
-      ..selected = selected ?? this.selected;
-  }
-}
-
-LabourRequestSGEditIndexChecked $LabourRequestSGEditIndexCheckedFromJson(Map<String, dynamic> json) {
-  final LabourRequestSGEditIndexChecked labourRequestSGEditIndexChecked = LabourRequestSGEditIndexChecked();
-  final String? value = jsonConvert.convert<String>(json['value']);
-  if (value != null) {
-    labourRequestSGEditIndexChecked.value = value;
-  }
-  final String? txt = jsonConvert.convert<String>(json['txt']);
-  if (txt != null) {
-    labourRequestSGEditIndexChecked.txt = txt;
-  }
-  final String? checked = jsonConvert.convert<String>(json['checked']);
-  if (checked != null) {
-    labourRequestSGEditIndexChecked.checked = checked;
-  }
-  return labourRequestSGEditIndexChecked;
-}
-
-Map<String, dynamic> $LabourRequestSGEditIndexCheckedToJson(LabourRequestSGEditIndexChecked entity) {
-  final Map<String, dynamic> data = <String, dynamic>{};
-  data['value'] = entity.value;
-  data['txt'] = entity.txt;
-  data['checked'] = entity.checked;
-  return data;
-}
-
-extension LabourRequestSGEditIndexCheckedExtension on LabourRequestSGEditIndexChecked {
-  LabourRequestSGEditIndexChecked copyWith({
-    String? value,
-    String? txt,
-    String? checked,
-  }) {
-    return LabourRequestSGEditIndexChecked()
-      ..value = value ?? this.value
-      ..txt = txt ?? this.txt
-      ..checked = checked ?? this.checked;
-  }
-}

+ 0 - 79
packages/cs_domain/lib/generated/json/labour_request_s_g_entity.g.dart

@@ -1,79 +0,0 @@
-import 'package:domain/generated/json/base/json_convert_content.dart';
-import 'package:domain/entity/response/labour_request_s_g_entity.dart';
-
-LabourRequestSGEntity $LabourRequestSGEntityFromJson(Map<String, dynamic> json) {
-  final LabourRequestSGEntity labourRequestSGEntity = LabourRequestSGEntity();
-  final List<LabourRequestSGCountList>? countList = (json['count_list'] as List<dynamic>?)?.map(
-          (e) => jsonConvert.convert<LabourRequestSGCountList>(e) as LabourRequestSGCountList).toList();
-  if (countList != null) {
-    labourRequestSGEntity.countList = countList;
-  }
-  return labourRequestSGEntity;
-}
-
-Map<String, dynamic> $LabourRequestSGEntityToJson(LabourRequestSGEntity entity) {
-  final Map<String, dynamic> data = <String, dynamic>{};
-  data['count_list'] = entity.countList.map((v) => v.toJson()).toList();
-  return data;
-}
-
-extension LabourRequestSGEntityExtension on LabourRequestSGEntity {
-  LabourRequestSGEntity copyWith({
-    List<LabourRequestSGCountList>? countList,
-  }) {
-    return LabourRequestSGEntity()
-      ..countList = countList ?? this.countList;
-  }
-}
-
-LabourRequestSGCountList $LabourRequestSGCountListFromJson(Map<String, dynamic> json) {
-  final LabourRequestSGCountList labourRequestSGCountList = LabourRequestSGCountList();
-  final String? date = jsonConvert.convert<String>(json['date']);
-  if (date != null) {
-    labourRequestSGCountList.date = date;
-  }
-  final String? week = jsonConvert.convert<String>(json['week']);
-  if (week != null) {
-    labourRequestSGCountList.week = week;
-  }
-  final bool? today = jsonConvert.convert<bool>(json['today']);
-  if (today != null) {
-    labourRequestSGCountList.today = today;
-  }
-  final int? realNum = jsonConvert.convert<int>(json['real_num']);
-  if (realNum != null) {
-    labourRequestSGCountList.realNum = realNum;
-  }
-  final int? hiringNum = jsonConvert.convert<int>(json['hiring_num']);
-  if (hiringNum != null) {
-    labourRequestSGCountList.hiringNum = hiringNum;
-  }
-  return labourRequestSGCountList;
-}
-
-Map<String, dynamic> $LabourRequestSGCountListToJson(LabourRequestSGCountList entity) {
-  final Map<String, dynamic> data = <String, dynamic>{};
-  data['date'] = entity.date;
-  data['week'] = entity.week;
-  data['today'] = entity.today;
-  data['real_num'] = entity.realNum;
-  data['hiring_num'] = entity.hiringNum;
-  return data;
-}
-
-extension LabourRequestSGCountListExtension on LabourRequestSGCountList {
-  LabourRequestSGCountList copyWith({
-    String? date,
-    String? week,
-    bool? today,
-    int? realNum,
-    int? hiringNum,
-  }) {
-    return LabourRequestSGCountList()
-      ..date = date ?? this.date
-      ..week = week ?? this.week
-      ..today = today ?? this.today
-      ..realNum = realNum ?? this.realNum
-      ..hiringNum = hiringNum ?? this.hiringNum;
-  }
-}

+ 0 - 129
packages/cs_domain/lib/generated/json/labour_request_s_g_list_entity.g.dart

@@ -1,129 +0,0 @@
-import 'package:domain/generated/json/base/json_convert_content.dart';
-import 'package:domain/entity/response/labour_request_s_g_list_entity.dart';
-
-LabourRequestSGListEntity $LabourRequestSGListEntityFromJson(Map<String, dynamic> json) {
-  final LabourRequestSGListEntity labourRequestSGListEntity = LabourRequestSGListEntity();
-  final int? total = jsonConvert.convert<int>(json['total']);
-  if (total != null) {
-    labourRequestSGListEntity.total = total;
-  }
-  final List<LabourRequestSGListRows>? rows = (json['rows'] as List<dynamic>?)?.map(
-          (e) => jsonConvert.convert<LabourRequestSGListRows>(e) as LabourRequestSGListRows).toList();
-  if (rows != null) {
-    labourRequestSGListEntity.rows = rows;
-  }
-  return labourRequestSGListEntity;
-}
-
-Map<String, dynamic> $LabourRequestSGListEntityToJson(LabourRequestSGListEntity entity) {
-  final Map<String, dynamic> data = <String, dynamic>{};
-  data['total'] = entity.total;
-  data['rows'] = entity.rows?.map((v) => v.toJson()).toList();
-  return data;
-}
-
-extension LabourRequestSGListEntityExtension on LabourRequestSGListEntity {
-  LabourRequestSGListEntity copyWith({
-    int? total,
-    List<LabourRequestSGListRows>? rows,
-  }) {
-    return LabourRequestSGListEntity()
-      ..total = total ?? this.total
-      ..rows = rows ?? this.rows;
-  }
-}
-
-LabourRequestSGListRows $LabourRequestSGListRowsFromJson(Map<String, dynamic> json) {
-  final LabourRequestSGListRows labourRequestSGListRows = LabourRequestSGListRows();
-  final String? requestId = jsonConvert.convert<String>(json['request_id']);
-  if (requestId != null) {
-    labourRequestSGListRows.requestId = requestId;
-  }
-  final String? outletName = jsonConvert.convert<String>(json['outlet_name']);
-  if (outletName != null) {
-    labourRequestSGListRows.outletName = outletName;
-  }
-  final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
-  if (jobTitle != null) {
-    labourRequestSGListRows.jobTitle = jobTitle;
-  }
-  final int? needNum = jsonConvert.convert<int>(json['need_num']);
-  if (needNum != null) {
-    labourRequestSGListRows.needNum = needNum;
-  }
-  final String? jobDate = jsonConvert.convert<String>(json['job_date']);
-  if (jobDate != null) {
-    labourRequestSGListRows.jobDate = jobDate;
-  }
-  final String? startTime = jsonConvert.convert<String>(json['start_time']);
-  if (startTime != null) {
-    labourRequestSGListRows.startTime = startTime;
-  }
-  final String? endTime = jsonConvert.convert<String>(json['end_time']);
-  if (endTime != null) {
-    labourRequestSGListRows.endTime = endTime;
-  }
-  final String? status = jsonConvert.convert<String>(json['status']);
-  if (status != null) {
-    labourRequestSGListRows.status = status;
-  }
-  final String? statusShow = jsonConvert.convert<String>(json['status_show']);
-  if (statusShow != null) {
-    labourRequestSGListRows.statusShow = statusShow;
-  }
-  final String? createdAt = jsonConvert.convert<String>(json['created_at']);
-  if (createdAt != null) {
-    labourRequestSGListRows.createdAt = createdAt;
-  }
-  final List<String>? actionList = (json['action_list'] as List<dynamic>?)?.map(
-          (e) => jsonConvert.convert<String>(e) as String).toList();
-  if (actionList != null) {
-    labourRequestSGListRows.actionList = actionList;
-  }
-  return labourRequestSGListRows;
-}
-
-Map<String, dynamic> $LabourRequestSGListRowsToJson(LabourRequestSGListRows entity) {
-  final Map<String, dynamic> data = <String, dynamic>{};
-  data['request_id'] = entity.requestId;
-  data['outlet_name'] = entity.outletName;
-  data['job_title'] = entity.jobTitle;
-  data['need_num'] = entity.needNum;
-  data['job_date'] = entity.jobDate;
-  data['start_time'] = entity.startTime;
-  data['end_time'] = entity.endTime;
-  data['status'] = entity.status;
-  data['status_show'] = entity.statusShow;
-  data['created_at'] = entity.createdAt;
-  data['action_list'] = entity.actionList;
-  return data;
-}
-
-extension LabourRequestSGListRowsExtension on LabourRequestSGListRows {
-  LabourRequestSGListRows copyWith({
-    String? requestId,
-    String? outletName,
-    String? jobTitle,
-    int? needNum,
-    String? jobDate,
-    String? startTime,
-    String? endTime,
-    String? status,
-    String? statusShow,
-    String? createdAt,
-    List<String>? actionList,
-  }) {
-    return LabourRequestSGListRows()
-      ..requestId = requestId ?? this.requestId
-      ..outletName = outletName ?? this.outletName
-      ..jobTitle = jobTitle ?? this.jobTitle
-      ..needNum = needNum ?? this.needNum
-      ..jobDate = jobDate ?? this.jobDate
-      ..startTime = startTime ?? this.startTime
-      ..endTime = endTime ?? this.endTime
-      ..status = status ?? this.status
-      ..statusShow = statusShow ?? this.statusShow
-      ..createdAt = createdAt ?? this.createdAt
-      ..actionList = actionList ?? this.actionList;
-  }
-}

+ 100 - 0
packages/cs_domain/lib/generated/json/s_g_labour_request_add_option_entity.g.dart

@@ -0,0 +1,100 @@
+import 'package:domain/generated/json/base/json_convert_content.dart';
+import 'package:domain/entity/response/s_g_labour_request_add_option_entity.dart';
+import 'package:domain/entity/response/index_option_entity.dart';
+
+
+SGLabourRequestAddOptionEntity $SGLabourRequestAddOptionEntityFromJson(Map<String, dynamic> json) {
+  final SGLabourRequestAddOptionEntity sGLabourRequestAddOptionEntity = SGLabourRequestAddOptionEntity();
+  final List<LabourRequestAgencyEntity>? agencyList = (json['agency_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<LabourRequestAgencyEntity>(e) as LabourRequestAgencyEntity).toList();
+  if (agencyList != null) {
+    sGLabourRequestAddOptionEntity.agencyList = agencyList;
+  }
+  final List<IndexOptionEntity>? titleList = (json['title_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (titleList != null) {
+    sGLabourRequestAddOptionEntity.titleList = titleList;
+  }
+  final List<IndexOptionEntity>? outletList = (json['outlet_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (outletList != null) {
+    sGLabourRequestAddOptionEntity.outletList = outletList;
+  }
+  final List<IndexOptionEntity>? limitList = (json['limit_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (limitList != null) {
+    sGLabourRequestAddOptionEntity.limitList = limitList;
+  }
+  final List<IndexOptionEntity>? requestType = (json['request_type'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (requestType != null) {
+    sGLabourRequestAddOptionEntity.requestType = requestType;
+  }
+  final List<IndexOptionEntity>? positionList = (json['position_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (positionList != null) {
+    sGLabourRequestAddOptionEntity.positionList = positionList;
+  }
+  return sGLabourRequestAddOptionEntity;
+}
+
+Map<String, dynamic> $SGLabourRequestAddOptionEntityToJson(SGLabourRequestAddOptionEntity entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['agency_list'] = entity.agencyList.map((v) => v.toJson()).toList();
+  data['title_list'] = entity.titleList.map((v) => v.toJson()).toList();
+  data['outlet_list'] = entity.outletList.map((v) => v.toJson()).toList();
+  data['limit_list'] = entity.limitList.map((v) => v.toJson()).toList();
+  data['request_type'] = entity.requestType.map((v) => v.toJson()).toList();
+  data['position_list'] = entity.positionList.map((v) => v.toJson()).toList();
+  return data;
+}
+
+extension SGLabourRequestAddOptionEntityExtension on SGLabourRequestAddOptionEntity {
+  SGLabourRequestAddOptionEntity copyWith({
+    List<LabourRequestAgencyEntity>? agencyList,
+    List<IndexOptionEntity>? titleList,
+    List<IndexOptionEntity>? outletList,
+    List<IndexOptionEntity>? limitList,
+    List<IndexOptionEntity>? requestType,
+    List<IndexOptionEntity>? positionList,
+  }) {
+    return SGLabourRequestAddOptionEntity()
+      ..agencyList = agencyList ?? this.agencyList
+      ..titleList = titleList ?? this.titleList
+      ..outletList = outletList ?? this.outletList
+      ..limitList = limitList ?? this.limitList
+      ..requestType = requestType ?? this.requestType
+      ..positionList = positionList ?? this.positionList;
+  }
+}
+
+LabourRequestAgencyEntity $LabourRequestAgencyEntityFromJson(Map<String, dynamic> json) {
+  final LabourRequestAgencyEntity labourRequestAgencyEntity = LabourRequestAgencyEntity();
+  final String? agencyId = jsonConvert.convert<String>(json['agency_id']);
+  if (agencyId != null) {
+    labourRequestAgencyEntity.agencyId = agencyId;
+  }
+  final String? agencyName = jsonConvert.convert<String>(json['agency_name']);
+  if (agencyName != null) {
+    labourRequestAgencyEntity.agencyName = agencyName;
+  }
+  return labourRequestAgencyEntity;
+}
+
+Map<String, dynamic> $LabourRequestAgencyEntityToJson(LabourRequestAgencyEntity entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['agency_id'] = entity.agencyId;
+  data['agency_name'] = entity.agencyName;
+  return data;
+}
+
+extension LabourRequestAgencyEntityExtension on LabourRequestAgencyEntity {
+  LabourRequestAgencyEntity copyWith({
+    String? agencyId,
+    String? agencyName,
+  }) {
+    return LabourRequestAgencyEntity()
+      ..agencyId = agencyId ?? this.agencyId
+      ..agencyName = agencyName ?? this.agencyName;
+  }
+}

+ 329 - 0
packages/cs_domain/lib/generated/json/s_g_labour_request_detail_entity.g.dart

@@ -0,0 +1,329 @@
+import 'package:domain/generated/json/base/json_convert_content.dart';
+import 'package:domain/entity/response/s_g_labour_request_detail_entity.dart';
+import 'package:domain/entity/response/index_option_entity.dart';
+
+
+SGLabourRequestDetailEntity $SGLabourRequestDetailEntityFromJson(Map<String, dynamic> json) {
+  final SGLabourRequestDetailEntity sGLabourRequestDetailEntity = SGLabourRequestDetailEntity();
+  final SGLabourRequestDetailLabReq? labReq = jsonConvert.convert<SGLabourRequestDetailLabReq>(json['lab_req']);
+  if (labReq != null) {
+    sGLabourRequestDetailEntity.labReq = labReq;
+  }
+  final String? fromView = jsonConvert.convert<String>(json['from_view']);
+  if (fromView != null) {
+    sGLabourRequestDetailEntity.fromView = fromView;
+  }
+  final String? startTime = jsonConvert.convert<String>(json['start_time']);
+  if (startTime != null) {
+    sGLabourRequestDetailEntity.startTime = startTime;
+  }
+  final String? endTime = jsonConvert.convert<String>(json['end_time']);
+  if (endTime != null) {
+    sGLabourRequestDetailEntity.endTime = endTime;
+  }
+  final bool? isYY = jsonConvert.convert<bool>(json['is_yy']);
+  if (isYY != null) {
+    sGLabourRequestDetailEntity.isYY = isYY;
+  }
+  final List<IndexOptionEntity>? outletList = (json['outlet_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (outletList != null) {
+    sGLabourRequestDetailEntity.outletList = outletList;
+  }
+  final List<IndexOptionEntity>? limitList = (json['limit_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (limitList != null) {
+    sGLabourRequestDetailEntity.limitList = limitList;
+  }
+  final List<IndexOptionEntity>? requestType = (json['request_type'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (requestType != null) {
+    sGLabourRequestDetailEntity.requestType = requestType;
+  }
+  final List<IndexOptionEntity>? positionList = (json['position_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (positionList != null) {
+    sGLabourRequestDetailEntity.positionList = positionList;
+  }
+  return sGLabourRequestDetailEntity;
+}
+
+Map<String, dynamic> $SGLabourRequestDetailEntityToJson(SGLabourRequestDetailEntity entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['lab_req'] = entity.labReq?.toJson();
+  data['from_view'] = entity.fromView;
+  data['start_time'] = entity.startTime;
+  data['end_time'] = entity.endTime;
+  data['is_yy'] = entity.isYY;
+  data['outlet_list'] = entity.outletList.map((v) => v.toJson()).toList();
+  data['limit_list'] = entity.limitList.map((v) => v.toJson()).toList();
+  data['request_type'] = entity.requestType.map((v) => v.toJson()).toList();
+  data['position_list'] = entity.positionList.map((v) => v.toJson()).toList();
+  return data;
+}
+
+extension SGLabourRequestDetailEntityExtension on SGLabourRequestDetailEntity {
+  SGLabourRequestDetailEntity copyWith({
+    SGLabourRequestDetailLabReq? labReq,
+    String? fromView,
+    String? startTime,
+    String? endTime,
+    bool? isYY,
+    List<IndexOptionEntity>? outletList,
+    List<IndexOptionEntity>? limitList,
+    List<IndexOptionEntity>? requestType,
+    List<IndexOptionEntity>? positionList,
+  }) {
+    return SGLabourRequestDetailEntity()
+      ..labReq = labReq ?? this.labReq
+      ..fromView = fromView ?? this.fromView
+      ..startTime = startTime ?? this.startTime
+      ..endTime = endTime ?? this.endTime
+      ..isYY = isYY ?? this.isYY
+      ..outletList = outletList ?? this.outletList
+      ..limitList = limitList ?? this.limitList
+      ..requestType = requestType ?? this.requestType
+      ..positionList = positionList ?? this.positionList;
+  }
+}
+
+SGLabourRequestDetailLabReq $SGLabourRequestDetailLabReqFromJson(Map<String, dynamic> json) {
+  final SGLabourRequestDetailLabReq sGLabourRequestDetailLabReq = SGLabourRequestDetailLabReq();
+  final int? id = jsonConvert.convert<int>(json['id']);
+  if (id != null) {
+    sGLabourRequestDetailLabReq.id = id;
+  }
+  final int? employerId = jsonConvert.convert<int>(json['employer_id']);
+  if (employerId != null) {
+    sGLabourRequestDetailLabReq.employerId = employerId;
+  }
+  final String? employerName = jsonConvert.convert<String>(json['employer_name']);
+  if (employerName != null) {
+    sGLabourRequestDetailLabReq.employerName = employerName;
+  }
+  final int? eAdminId = jsonConvert.convert<int>(json['e_admin_id']);
+  if (eAdminId != null) {
+    sGLabourRequestDetailLabReq.eAdminId = eAdminId;
+  }
+  final int? sourceType = jsonConvert.convert<int>(json['source_type']);
+  if (sourceType != null) {
+    sGLabourRequestDetailLabReq.sourceType = sourceType;
+  }
+  final int? agencyId = jsonConvert.convert<int>(json['agency_id']);
+  if (agencyId != null) {
+    sGLabourRequestDetailLabReq.agencyId = agencyId;
+  }
+  final String? agencyName = jsonConvert.convert<String>(json['agency_name']);
+  if (agencyName != null) {
+    sGLabourRequestDetailLabReq.agencyName = agencyName;
+  }
+  final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
+  if (jobTitle != null) {
+    sGLabourRequestDetailLabReq.jobTitle = jobTitle;
+  }
+  final int? outletId = jsonConvert.convert<int>(json['outlet_id']);
+  if (outletId != null) {
+    sGLabourRequestDetailLabReq.outletId = outletId;
+  }
+  final String? outletName = jsonConvert.convert<String>(json['outlet_name']);
+  if (outletName != null) {
+    sGLabourRequestDetailLabReq.outletName = outletName;
+  }
+  final String? jobDate = jsonConvert.convert<String>(json['job_date']);
+  if (jobDate != null) {
+    sGLabourRequestDetailLabReq.jobDate = jobDate;
+  }
+  final int? startTime = jsonConvert.convert<int>(json['start_time']);
+  if (startTime != null) {
+    sGLabourRequestDetailLabReq.startTime = startTime;
+  }
+  final int? endTime = jsonConvert.convert<int>(json['end_time']);
+  if (endTime != null) {
+    sGLabourRequestDetailLabReq.endTime = endTime;
+  }
+  final String? workingHours = jsonConvert.convert<String>(json['working_hours']);
+  if (workingHours != null) {
+    sGLabourRequestDetailLabReq.workingHours = workingHours;
+  }
+  final String? hourlyRate = jsonConvert.convert<String>(json['hourly_rate']);
+  if (hourlyRate != null) {
+    sGLabourRequestDetailLabReq.hourlyRate = hourlyRate;
+  }
+  final int? hiringNum = jsonConvert.convert<int>(json['hiring_num']);
+  if (hiringNum != null) {
+    sGLabourRequestDetailLabReq.hiringNum = hiringNum;
+  }
+  final String? agencyRate = jsonConvert.convert<String>(json['agency_rate']);
+  if (agencyRate != null) {
+    sGLabourRequestDetailLabReq.agencyRate = agencyRate;
+  }
+  final int? jobTitleId = jsonConvert.convert<int>(json['job_title_id']);
+  if (jobTitleId != null) {
+    sGLabourRequestDetailLabReq.jobTitleId = jobTitleId;
+  }
+  final int? withFoodCert = jsonConvert.convert<int>(json['with_food_cert']);
+  if (withFoodCert != null) {
+    sGLabourRequestDetailLabReq.withFoodCert = withFoodCert;
+  }
+  final int? requestType = jsonConvert.convert<int>(json['request_type']);
+  if (requestType != null) {
+    sGLabourRequestDetailLabReq.requestType = requestType;
+  }
+  final int? sexLimit = jsonConvert.convert<int>(json['sex_limit']);
+  if (sexLimit != null) {
+    sGLabourRequestDetailLabReq.sexLimit = sexLimit;
+  }
+  final int? maleLimit = jsonConvert.convert<int>(json['male_limit']);
+  if (maleLimit != null) {
+    sGLabourRequestDetailLabReq.maleLimit = maleLimit;
+  }
+  final int? femaleLimit = jsonConvert.convert<int>(json['female_limit']);
+  if (femaleLimit != null) {
+    sGLabourRequestDetailLabReq.femaleLimit = femaleLimit;
+  }
+  final int? positionId = jsonConvert.convert<int>(json['position_id']);
+  if (positionId != null) {
+    sGLabourRequestDetailLabReq.positionId = positionId;
+  }
+  final String? positionName = jsonConvert.convert<String>(json['position_name']);
+  if (positionName != null) {
+    sGLabourRequestDetailLabReq.positionName = positionName;
+  }
+  final int? status = jsonConvert.convert<int>(json['status']);
+  if (status != null) {
+    sGLabourRequestDetailLabReq.status = status;
+  }
+  final String? description = jsonConvert.convert<String>(json['description']);
+  if (description != null) {
+    sGLabourRequestDetailLabReq.description = description;
+  }
+  final String? createdAt = jsonConvert.convert<String>(json['created_at']);
+  if (createdAt != null) {
+    sGLabourRequestDetailLabReq.createdAt = createdAt;
+  }
+  final String? updatedAt = jsonConvert.convert<String>(json['updated_at']);
+  if (updatedAt != null) {
+    sGLabourRequestDetailLabReq.updatedAt = updatedAt;
+  }
+  final dynamic deletedAt = json['deleted_at'];
+  if (deletedAt != null) {
+    sGLabourRequestDetailLabReq.deletedAt = deletedAt;
+  }
+  final int? postId = jsonConvert.convert<int>(json['post_id']);
+  if (postId != null) {
+    sGLabourRequestDetailLabReq.postId = postId;
+  }
+  final String? postName = jsonConvert.convert<String>(json['post_name']);
+  if (postName != null) {
+    sGLabourRequestDetailLabReq.postName = postName;
+  }
+  return sGLabourRequestDetailLabReq;
+}
+
+Map<String, dynamic> $SGLabourRequestDetailLabReqToJson(SGLabourRequestDetailLabReq entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['id'] = entity.id;
+  data['employer_id'] = entity.employerId;
+  data['employer_name'] = entity.employerName;
+  data['e_admin_id'] = entity.eAdminId;
+  data['source_type'] = entity.sourceType;
+  data['agency_id'] = entity.agencyId;
+  data['agency_name'] = entity.agencyName;
+  data['job_title'] = entity.jobTitle;
+  data['outlet_id'] = entity.outletId;
+  data['outlet_name'] = entity.outletName;
+  data['job_date'] = entity.jobDate;
+  data['start_time'] = entity.startTime;
+  data['end_time'] = entity.endTime;
+  data['working_hours'] = entity.workingHours;
+  data['hourly_rate'] = entity.hourlyRate;
+  data['hiring_num'] = entity.hiringNum;
+  data['agency_rate'] = entity.agencyRate;
+  data['job_title_id'] = entity.jobTitleId;
+  data['with_food_cert'] = entity.withFoodCert;
+  data['request_type'] = entity.requestType;
+  data['sex_limit'] = entity.sexLimit;
+  data['male_limit'] = entity.maleLimit;
+  data['female_limit'] = entity.femaleLimit;
+  data['position_id'] = entity.positionId;
+  data['position_name'] = entity.positionName;
+  data['status'] = entity.status;
+  data['description'] = entity.description;
+  data['created_at'] = entity.createdAt;
+  data['updated_at'] = entity.updatedAt;
+  data['deleted_at'] = entity.deletedAt;
+  data['post_id'] = entity.postId;
+  data['post_name'] = entity.postName;
+  return data;
+}
+
+extension SGLabourRequestDetailLabReqExtension on SGLabourRequestDetailLabReq {
+  SGLabourRequestDetailLabReq copyWith({
+    int? id,
+    int? employerId,
+    String? employerName,
+    int? eAdminId,
+    int? sourceType,
+    int? agencyId,
+    String? agencyName,
+    String? jobTitle,
+    int? outletId,
+    String? outletName,
+    String? jobDate,
+    int? startTime,
+    int? endTime,
+    String? workingHours,
+    String? hourlyRate,
+    int? hiringNum,
+    String? agencyRate,
+    int? jobTitleId,
+    int? withFoodCert,
+    int? requestType,
+    int? sexLimit,
+    int? maleLimit,
+    int? femaleLimit,
+    int? positionId,
+    String? positionName,
+    int? status,
+    String? description,
+    String? createdAt,
+    String? updatedAt,
+    dynamic deletedAt,
+    int? postId,
+    String? postName,
+  }) {
+    return SGLabourRequestDetailLabReq()
+      ..id = id ?? this.id
+      ..employerId = employerId ?? this.employerId
+      ..employerName = employerName ?? this.employerName
+      ..eAdminId = eAdminId ?? this.eAdminId
+      ..sourceType = sourceType ?? this.sourceType
+      ..agencyId = agencyId ?? this.agencyId
+      ..agencyName = agencyName ?? this.agencyName
+      ..jobTitle = jobTitle ?? this.jobTitle
+      ..outletId = outletId ?? this.outletId
+      ..outletName = outletName ?? this.outletName
+      ..jobDate = jobDate ?? this.jobDate
+      ..startTime = startTime ?? this.startTime
+      ..endTime = endTime ?? this.endTime
+      ..workingHours = workingHours ?? this.workingHours
+      ..hourlyRate = hourlyRate ?? this.hourlyRate
+      ..hiringNum = hiringNum ?? this.hiringNum
+      ..agencyRate = agencyRate ?? this.agencyRate
+      ..jobTitleId = jobTitleId ?? this.jobTitleId
+      ..withFoodCert = withFoodCert ?? this.withFoodCert
+      ..requestType = requestType ?? this.requestType
+      ..sexLimit = sexLimit ?? this.sexLimit
+      ..maleLimit = maleLimit ?? this.maleLimit
+      ..femaleLimit = femaleLimit ?? this.femaleLimit
+      ..positionId = positionId ?? this.positionId
+      ..positionName = positionName ?? this.positionName
+      ..status = status ?? this.status
+      ..description = description ?? this.description
+      ..createdAt = createdAt ?? this.createdAt
+      ..updatedAt = updatedAt ?? this.updatedAt
+      ..deletedAt = deletedAt ?? this.deletedAt
+      ..postId = postId ?? this.postId
+      ..postName = postName ?? this.postName;
+  }
+}

+ 66 - 0
packages/cs_domain/lib/generated/json/s_g_labour_request_option_entity.g.dart

@@ -0,0 +1,66 @@
+import 'package:domain/generated/json/base/json_convert_content.dart';
+import 'package:domain/entity/response/s_g_labour_request_option_entity.dart';
+import 'package:domain/entity/response/index_option_entity.dart';
+
+
+SGLabourRequestOptionEntity $SGLabourRequestOptionEntityFromJson(Map<String, dynamic> json) {
+  final SGLabourRequestOptionEntity sGLabourRequestOptionEntity = SGLabourRequestOptionEntity();
+  final String? outletId = jsonConvert.convert<String>(json['outlet_id']);
+  if (outletId != null) {
+    sGLabourRequestOptionEntity.outletId = outletId;
+  }
+  final String? startDate = jsonConvert.convert<String>(json['start_date']);
+  if (startDate != null) {
+    sGLabourRequestOptionEntity.startDate = startDate;
+  }
+  final String? endDate = jsonConvert.convert<String>(json['end_date']);
+  if (endDate != null) {
+    sGLabourRequestOptionEntity.endDate = endDate;
+  }
+  final List<IndexOptionEntity>? agencyList = (json['agency_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (agencyList != null) {
+    sGLabourRequestOptionEntity.agencyList = agencyList;
+  }
+  final List<IndexOptionEntity>? outletList = (json['outlet_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (outletList != null) {
+    sGLabourRequestOptionEntity.outletList = outletList;
+  }
+  final List<IndexOptionEntity>? statusList = (json['status_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (statusList != null) {
+    sGLabourRequestOptionEntity.statusList = statusList;
+  }
+  return sGLabourRequestOptionEntity;
+}
+
+Map<String, dynamic> $SGLabourRequestOptionEntityToJson(SGLabourRequestOptionEntity entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['outlet_id'] = entity.outletId;
+  data['start_date'] = entity.startDate;
+  data['end_date'] = entity.endDate;
+  data['agency_list'] = entity.agencyList.map((v) => v.toJson()).toList();
+  data['outlet_list'] = entity.outletList.map((v) => v.toJson()).toList();
+  data['status_list'] = entity.statusList.map((v) => v.toJson()).toList();
+  return data;
+}
+
+extension SGLabourRequestOptionEntityExtension on SGLabourRequestOptionEntity {
+  SGLabourRequestOptionEntity copyWith({
+    String? outletId,
+    String? startDate,
+    String? endDate,
+    List<IndexOptionEntity>? agencyList,
+    List<IndexOptionEntity>? outletList,
+    List<IndexOptionEntity>? statusList,
+  }) {
+    return SGLabourRequestOptionEntity()
+      ..outletId = outletId ?? this.outletId
+      ..startDate = startDate ?? this.startDate
+      ..endDate = endDate ?? this.endDate
+      ..agencyList = agencyList ?? this.agencyList
+      ..outletList = outletList ?? this.outletList
+      ..statusList = statusList ?? this.statusList;
+  }
+}

+ 136 - 0
packages/cs_domain/lib/generated/json/s_g_labour_request_table_entity.g.dart

@@ -0,0 +1,136 @@
+import 'package:domain/generated/json/base/json_convert_content.dart';
+import 'package:domain/entity/response/s_g_labour_request_table_entity.dart';
+
+SGLabourRequestTableEntity $SGLabourRequestTableEntityFromJson(Map<String, dynamic> json) {
+  final SGLabourRequestTableEntity sGLabourRequestTableEntity = SGLabourRequestTableEntity();
+  final int? total = jsonConvert.convert<int>(json['total']);
+  if (total != null) {
+    sGLabourRequestTableEntity.total = total;
+  }
+  final List<SGLabourRequestTableRows>? rows = (json['rows'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<SGLabourRequestTableRows>(e) as SGLabourRequestTableRows).toList();
+  if (rows != null) {
+    sGLabourRequestTableEntity.rows = rows;
+  }
+  return sGLabourRequestTableEntity;
+}
+
+Map<String, dynamic> $SGLabourRequestTableEntityToJson(SGLabourRequestTableEntity entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['total'] = entity.total;
+  data['rows'] = entity.rows.map((v) => v.toJson()).toList();
+  return data;
+}
+
+extension SGLabourRequestTableEntityExtension on SGLabourRequestTableEntity {
+  SGLabourRequestTableEntity copyWith({
+    int? total,
+    List<SGLabourRequestTableRows>? rows,
+  }) {
+    return SGLabourRequestTableEntity()
+      ..total = total ?? this.total
+      ..rows = rows ?? this.rows;
+  }
+}
+
+SGLabourRequestTableRows $SGLabourRequestTableRowsFromJson(Map<String, dynamic> json) {
+  final SGLabourRequestTableRows sGLabourRequestTableRows = SGLabourRequestTableRows();
+  final String? id = jsonConvert.convert<String>(json['id']);
+  if (id != null) {
+    sGLabourRequestTableRows.id = id;
+  }
+  final String? source = jsonConvert.convert<String>(json['source']);
+  if (source != null) {
+    sGLabourRequestTableRows.source = source;
+  }
+  final String? jobDate = jsonConvert.convert<String>(json['job_date']);
+  if (jobDate != null) {
+    sGLabourRequestTableRows.jobDate = jobDate;
+  }
+  final String? outletName = jsonConvert.convert<String>(json['outlet_name']);
+  if (outletName != null) {
+    sGLabourRequestTableRows.outletName = outletName;
+  }
+  final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
+  if (jobTitle != null) {
+    sGLabourRequestTableRows.jobTitle = jobTitle;
+  }
+  final String? startTime = jsonConvert.convert<String>(json['start_time']);
+  if (startTime != null) {
+    sGLabourRequestTableRows.startTime = startTime;
+  }
+  final String? endTime = jsonConvert.convert<String>(json['end_time']);
+  if (endTime != null) {
+    sGLabourRequestTableRows.endTime = endTime;
+  }
+  final int? status = jsonConvert.convert<int>(json['status']);
+  if (status != null) {
+    sGLabourRequestTableRows.status = status;
+  }
+  final String? statusShow = jsonConvert.convert<String>(json['status_show']);
+  if (statusShow != null) {
+    sGLabourRequestTableRows.statusShow = statusShow;
+  }
+  final String? hiringNum = jsonConvert.convert<String>(json['hiring_num']);
+  if (hiringNum != null) {
+    sGLabourRequestTableRows.hiringNum = hiringNum;
+  }
+  final String? createdAt = jsonConvert.convert<String>(json['created_at']);
+  if (createdAt != null) {
+    sGLabourRequestTableRows.createdAt = createdAt;
+  }
+  final List<String>? actionList = (json['action_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<String>(e) as String).toList();
+  if (actionList != null) {
+    sGLabourRequestTableRows.actionList = actionList;
+  }
+  return sGLabourRequestTableRows;
+}
+
+Map<String, dynamic> $SGLabourRequestTableRowsToJson(SGLabourRequestTableRows entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['id'] = entity.id;
+  data['source'] = entity.source;
+  data['job_date'] = entity.jobDate;
+  data['outlet_name'] = entity.outletName;
+  data['job_title'] = entity.jobTitle;
+  data['start_time'] = entity.startTime;
+  data['end_time'] = entity.endTime;
+  data['status'] = entity.status;
+  data['status_show'] = entity.statusShow;
+  data['hiring_num'] = entity.hiringNum;
+  data['created_at'] = entity.createdAt;
+  data['action_list'] = entity.actionList;
+  return data;
+}
+
+extension SGLabourRequestTableRowsExtension on SGLabourRequestTableRows {
+  SGLabourRequestTableRows copyWith({
+    String? id,
+    String? source,
+    String? jobDate,
+    String? outletName,
+    String? jobTitle,
+    String? startTime,
+    String? endTime,
+    int? status,
+    String? statusShow,
+    String? hiringNum,
+    String? createdAt,
+    List<String>? actionList,
+  }) {
+    return SGLabourRequestTableRows()
+      ..id = id ?? this.id
+      ..source = source ?? this.source
+      ..jobDate = jobDate ?? this.jobDate
+      ..outletName = outletName ?? this.outletName
+      ..jobTitle = jobTitle ?? this.jobTitle
+      ..startTime = startTime ?? this.startTime
+      ..endTime = endTime ?? this.endTime
+      ..status = status ?? this.status
+      ..statusShow = statusShow ?? this.statusShow
+      ..hiringNum = hiringNum ?? this.hiringNum
+      ..createdAt = createdAt ?? this.createdAt
+      ..actionList = actionList ?? this.actionList;
+  }
+}

+ 362 - 0
packages/cs_domain/lib/generated/json/s_g_labour_request_worl_flow_entity.g.dart

@@ -0,0 +1,362 @@
+import 'package:domain/generated/json/base/json_convert_content.dart';
+import 'package:domain/entity/response/s_g_labour_request_worl_flow_entity.dart';
+
+SGLabourRequestWorlFlowEntity $SGLabourRequestWorlFlowEntityFromJson(Map<String, dynamic> json) {
+  final SGLabourRequestWorlFlowEntity sGLabourRequestWorlFlowEntity = SGLabourRequestWorlFlowEntity();
+  final SGLabourRequestWorlFlowRow? row = jsonConvert.convert<SGLabourRequestWorlFlowRow>(json['row']);
+  if (row != null) {
+    sGLabourRequestWorlFlowEntity.row = row;
+  }
+  final String? outletId = jsonConvert.convert<String>(json['outlet_id']);
+  if (outletId != null) {
+    sGLabourRequestWorlFlowEntity.outletId = outletId;
+  }
+  final List<SGLabourRequestWorlFlowRecords>? records = (json['records'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<SGLabourRequestWorlFlowRecords>(e) as SGLabourRequestWorlFlowRecords).toList();
+  if (records != null) {
+    sGLabourRequestWorlFlowEntity.records = records;
+  }
+  return sGLabourRequestWorlFlowEntity;
+}
+
+Map<String, dynamic> $SGLabourRequestWorlFlowEntityToJson(SGLabourRequestWorlFlowEntity entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['row'] = entity.row?.toJson();
+  data['outlet_id'] = entity.outletId;
+  data['records'] = entity.records.map((v) => v.toJson()).toList();
+  return data;
+}
+
+extension SGLabourRequestWorlFlowEntityExtension on SGLabourRequestWorlFlowEntity {
+  SGLabourRequestWorlFlowEntity copyWith({
+    SGLabourRequestWorlFlowRow? row,
+    String? outletId,
+    List<SGLabourRequestWorlFlowRecords>? records,
+  }) {
+    return SGLabourRequestWorlFlowEntity()
+      ..row = row ?? this.row
+      ..outletId = outletId ?? this.outletId
+      ..records = records ?? this.records;
+  }
+}
+
+SGLabourRequestWorlFlowRow $SGLabourRequestWorlFlowRowFromJson(Map<String, dynamic> json) {
+  final SGLabourRequestWorlFlowRow sGLabourRequestWorlFlowRow = SGLabourRequestWorlFlowRow();
+  final String? id = jsonConvert.convert<String>(json['id']);
+  if (id != null) {
+    sGLabourRequestWorlFlowRow.id = id;
+  }
+  final String? employerId = jsonConvert.convert<String>(json['employer_id']);
+  if (employerId != null) {
+    sGLabourRequestWorlFlowRow.employerId = employerId;
+  }
+  final String? employerName = jsonConvert.convert<String>(json['employer_name']);
+  if (employerName != null) {
+    sGLabourRequestWorlFlowRow.employerName = employerName;
+  }
+  final String? eAdminId = jsonConvert.convert<String>(json['e_admin_id']);
+  if (eAdminId != null) {
+    sGLabourRequestWorlFlowRow.eAdminId = eAdminId;
+  }
+  final int? sourceType = jsonConvert.convert<int>(json['source_type']);
+  if (sourceType != null) {
+    sGLabourRequestWorlFlowRow.sourceType = sourceType;
+  }
+  final String? agencyId = jsonConvert.convert<String>(json['agency_id']);
+  if (agencyId != null) {
+    sGLabourRequestWorlFlowRow.agencyId = agencyId;
+  }
+  final String? agencyName = jsonConvert.convert<String>(json['agency_name']);
+  if (agencyName != null) {
+    sGLabourRequestWorlFlowRow.agencyName = agencyName;
+  }
+  final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
+  if (jobTitle != null) {
+    sGLabourRequestWorlFlowRow.jobTitle = jobTitle;
+  }
+  final String? outletId = jsonConvert.convert<String>(json['outlet_id']);
+  if (outletId != null) {
+    sGLabourRequestWorlFlowRow.outletId = outletId;
+  }
+  final String? outletName = jsonConvert.convert<String>(json['outlet_name']);
+  if (outletName != null) {
+    sGLabourRequestWorlFlowRow.outletName = outletName;
+  }
+  final String? jobDate = jsonConvert.convert<String>(json['job_date']);
+  if (jobDate != null) {
+    sGLabourRequestWorlFlowRow.jobDate = jobDate;
+  }
+  final int? startTime = jsonConvert.convert<int>(json['start_time']);
+  if (startTime != null) {
+    sGLabourRequestWorlFlowRow.startTime = startTime;
+  }
+  final int? endTime = jsonConvert.convert<int>(json['end_time']);
+  if (endTime != null) {
+    sGLabourRequestWorlFlowRow.endTime = endTime;
+  }
+  final String? workingHours = jsonConvert.convert<String>(json['working_hours']);
+  if (workingHours != null) {
+    sGLabourRequestWorlFlowRow.workingHours = workingHours;
+  }
+  final String? hourlyRate = jsonConvert.convert<String>(json['hourly_rate']);
+  if (hourlyRate != null) {
+    sGLabourRequestWorlFlowRow.hourlyRate = hourlyRate;
+  }
+  final int? hiringNum = jsonConvert.convert<int>(json['hiring_num']);
+  if (hiringNum != null) {
+    sGLabourRequestWorlFlowRow.hiringNum = hiringNum;
+  }
+  final String? agencyRate = jsonConvert.convert<String>(json['agency_rate']);
+  if (agencyRate != null) {
+    sGLabourRequestWorlFlowRow.agencyRate = agencyRate;
+  }
+  final int? jobTitleId = jsonConvert.convert<int>(json['job_title_id']);
+  if (jobTitleId != null) {
+    sGLabourRequestWorlFlowRow.jobTitleId = jobTitleId;
+  }
+  final int? withFoodCert = jsonConvert.convert<int>(json['with_food_cert']);
+  if (withFoodCert != null) {
+    sGLabourRequestWorlFlowRow.withFoodCert = withFoodCert;
+  }
+  final int? requestType = jsonConvert.convert<int>(json['request_type']);
+  if (requestType != null) {
+    sGLabourRequestWorlFlowRow.requestType = requestType;
+  }
+  final int? sexLimit = jsonConvert.convert<int>(json['sex_limit']);
+  if (sexLimit != null) {
+    sGLabourRequestWorlFlowRow.sexLimit = sexLimit;
+  }
+  final int? maleLimit = jsonConvert.convert<int>(json['male_limit']);
+  if (maleLimit != null) {
+    sGLabourRequestWorlFlowRow.maleLimit = maleLimit;
+  }
+  final int? femaleLimit = jsonConvert.convert<int>(json['female_limit']);
+  if (femaleLimit != null) {
+    sGLabourRequestWorlFlowRow.femaleLimit = femaleLimit;
+  }
+  final int? positionId = jsonConvert.convert<int>(json['position_id']);
+  if (positionId != null) {
+    sGLabourRequestWorlFlowRow.positionId = positionId;
+  }
+  final String? positionName = jsonConvert.convert<String>(json['position_name']);
+  if (positionName != null) {
+    sGLabourRequestWorlFlowRow.positionName = positionName;
+  }
+  final int? status = jsonConvert.convert<int>(json['status']);
+  if (status != null) {
+    sGLabourRequestWorlFlowRow.status = status;
+  }
+  final String? description = jsonConvert.convert<String>(json['description']);
+  if (description != null) {
+    sGLabourRequestWorlFlowRow.description = description;
+  }
+  final String? createdAt = jsonConvert.convert<String>(json['created_at']);
+  if (createdAt != null) {
+    sGLabourRequestWorlFlowRow.createdAt = createdAt;
+  }
+  final String? updatedAt = jsonConvert.convert<String>(json['updated_at']);
+  if (updatedAt != null) {
+    sGLabourRequestWorlFlowRow.updatedAt = updatedAt;
+  }
+  final String? deletedAt = jsonConvert.convert<String>(json['deleted_at']);
+  if (deletedAt != null) {
+    sGLabourRequestWorlFlowRow.deletedAt = deletedAt;
+  }
+  final int? postId = jsonConvert.convert<int>(json['post_id']);
+  if (postId != null) {
+    sGLabourRequestWorlFlowRow.postId = postId;
+  }
+  final String? postName = jsonConvert.convert<String>(json['post_name']);
+  if (postName != null) {
+    sGLabourRequestWorlFlowRow.postName = postName;
+  }
+  return sGLabourRequestWorlFlowRow;
+}
+
+Map<String, dynamic> $SGLabourRequestWorlFlowRowToJson(SGLabourRequestWorlFlowRow entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['id'] = entity.id;
+  data['employer_id'] = entity.employerId;
+  data['employer_name'] = entity.employerName;
+  data['e_admin_id'] = entity.eAdminId;
+  data['source_type'] = entity.sourceType;
+  data['agency_id'] = entity.agencyId;
+  data['agency_name'] = entity.agencyName;
+  data['job_title'] = entity.jobTitle;
+  data['outlet_id'] = entity.outletId;
+  data['outlet_name'] = entity.outletName;
+  data['job_date'] = entity.jobDate;
+  data['start_time'] = entity.startTime;
+  data['end_time'] = entity.endTime;
+  data['working_hours'] = entity.workingHours;
+  data['hourly_rate'] = entity.hourlyRate;
+  data['hiring_num'] = entity.hiringNum;
+  data['agency_rate'] = entity.agencyRate;
+  data['job_title_id'] = entity.jobTitleId;
+  data['with_food_cert'] = entity.withFoodCert;
+  data['request_type'] = entity.requestType;
+  data['sex_limit'] = entity.sexLimit;
+  data['male_limit'] = entity.maleLimit;
+  data['female_limit'] = entity.femaleLimit;
+  data['position_id'] = entity.positionId;
+  data['position_name'] = entity.positionName;
+  data['status'] = entity.status;
+  data['description'] = entity.description;
+  data['created_at'] = entity.createdAt;
+  data['updated_at'] = entity.updatedAt;
+  data['deleted_at'] = entity.deletedAt;
+  data['post_id'] = entity.postId;
+  data['post_name'] = entity.postName;
+  return data;
+}
+
+extension SGLabourRequestWorlFlowRowExtension on SGLabourRequestWorlFlowRow {
+  SGLabourRequestWorlFlowRow copyWith({
+    String? id,
+    String? employerId,
+    String? employerName,
+    String? eAdminId,
+    int? sourceType,
+    String? agencyId,
+    String? agencyName,
+    String? jobTitle,
+    String? outletId,
+    String? outletName,
+    String? jobDate,
+    int? startTime,
+    int? endTime,
+    String? workingHours,
+    String? hourlyRate,
+    int? hiringNum,
+    String? agencyRate,
+    int? jobTitleId,
+    int? withFoodCert,
+    int? requestType,
+    int? sexLimit,
+    int? maleLimit,
+    int? femaleLimit,
+    int? positionId,
+    String? positionName,
+    int? status,
+    String? description,
+    String? createdAt,
+    String? updatedAt,
+    String? deletedAt,
+    int? postId,
+    String? postName,
+  }) {
+    return SGLabourRequestWorlFlowRow()
+      ..id = id ?? this.id
+      ..employerId = employerId ?? this.employerId
+      ..employerName = employerName ?? this.employerName
+      ..eAdminId = eAdminId ?? this.eAdminId
+      ..sourceType = sourceType ?? this.sourceType
+      ..agencyId = agencyId ?? this.agencyId
+      ..agencyName = agencyName ?? this.agencyName
+      ..jobTitle = jobTitle ?? this.jobTitle
+      ..outletId = outletId ?? this.outletId
+      ..outletName = outletName ?? this.outletName
+      ..jobDate = jobDate ?? this.jobDate
+      ..startTime = startTime ?? this.startTime
+      ..endTime = endTime ?? this.endTime
+      ..workingHours = workingHours ?? this.workingHours
+      ..hourlyRate = hourlyRate ?? this.hourlyRate
+      ..hiringNum = hiringNum ?? this.hiringNum
+      ..agencyRate = agencyRate ?? this.agencyRate
+      ..jobTitleId = jobTitleId ?? this.jobTitleId
+      ..withFoodCert = withFoodCert ?? this.withFoodCert
+      ..requestType = requestType ?? this.requestType
+      ..sexLimit = sexLimit ?? this.sexLimit
+      ..maleLimit = maleLimit ?? this.maleLimit
+      ..femaleLimit = femaleLimit ?? this.femaleLimit
+      ..positionId = positionId ?? this.positionId
+      ..positionName = positionName ?? this.positionName
+      ..status = status ?? this.status
+      ..description = description ?? this.description
+      ..createdAt = createdAt ?? this.createdAt
+      ..updatedAt = updatedAt ?? this.updatedAt
+      ..deletedAt = deletedAt ?? this.deletedAt
+      ..postId = postId ?? this.postId
+      ..postName = postName ?? this.postName;
+  }
+}
+
+SGLabourRequestWorlFlowRecords $SGLabourRequestWorlFlowRecordsFromJson(Map<String, dynamic> json) {
+  final SGLabourRequestWorlFlowRecords sGLabourRequestWorlFlowRecords = SGLabourRequestWorlFlowRecords();
+  final int? serialNumber = jsonConvert.convert<int>(json['serial_number']);
+  if (serialNumber != null) {
+    sGLabourRequestWorlFlowRecords.serialNumber = serialNumber;
+  }
+  final String? nodeName = jsonConvert.convert<String>(json['node_name']);
+  if (nodeName != null) {
+    sGLabourRequestWorlFlowRecords.nodeName = nodeName;
+  }
+  final String? statusShow = jsonConvert.convert<String>(json['status_show']);
+  if (statusShow != null) {
+    sGLabourRequestWorlFlowRecords.statusShow = statusShow;
+  }
+  final String? auditName = jsonConvert.convert<String>(json['audit_name']);
+  if (auditName != null) {
+    sGLabourRequestWorlFlowRecords.auditName = auditName;
+  }
+  final String? auditTime = jsonConvert.convert<String>(json['audit_time']);
+  if (auditTime != null) {
+    sGLabourRequestWorlFlowRecords.auditTime = auditTime;
+  }
+  final String? auditMark = jsonConvert.convert<String>(json['audit_mark']);
+  if (auditMark != null) {
+    sGLabourRequestWorlFlowRecords.auditMark = auditMark;
+  }
+  final String? createdAt = jsonConvert.convert<String>(json['created_at']);
+  if (createdAt != null) {
+    sGLabourRequestWorlFlowRecords.createdAt = createdAt;
+  }
+  final String? assigneeTypeShow = jsonConvert.convert<String>(json['assignee_type_show']);
+  if (assigneeTypeShow != null) {
+    sGLabourRequestWorlFlowRecords.assigneeTypeShow = assigneeTypeShow;
+  }
+  final String? designationShow = jsonConvert.convert<String>(json['designation_show']);
+  if (designationShow != null) {
+    sGLabourRequestWorlFlowRecords.designationShow = designationShow;
+  }
+  return sGLabourRequestWorlFlowRecords;
+}
+
+Map<String, dynamic> $SGLabourRequestWorlFlowRecordsToJson(SGLabourRequestWorlFlowRecords entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['serial_number'] = entity.serialNumber;
+  data['node_name'] = entity.nodeName;
+  data['status_show'] = entity.statusShow;
+  data['audit_name'] = entity.auditName;
+  data['audit_time'] = entity.auditTime;
+  data['audit_mark'] = entity.auditMark;
+  data['created_at'] = entity.createdAt;
+  data['assignee_type_show'] = entity.assigneeTypeShow;
+  data['designation_show'] = entity.designationShow;
+  return data;
+}
+
+extension SGLabourRequestWorlFlowRecordsExtension on SGLabourRequestWorlFlowRecords {
+  SGLabourRequestWorlFlowRecords copyWith({
+    int? serialNumber,
+    String? nodeName,
+    String? statusShow,
+    String? auditName,
+    String? auditTime,
+    String? auditMark,
+    String? createdAt,
+    String? assigneeTypeShow,
+    String? designationShow,
+  }) {
+    return SGLabourRequestWorlFlowRecords()
+      ..serialNumber = serialNumber ?? this.serialNumber
+      ..nodeName = nodeName ?? this.nodeName
+      ..statusShow = statusShow ?? this.statusShow
+      ..auditName = auditName ?? this.auditName
+      ..auditTime = auditTime ?? this.auditTime
+      ..auditMark = auditMark ?? this.auditMark
+      ..createdAt = createdAt ?? this.createdAt
+      ..assigneeTypeShow = assigneeTypeShow ?? this.assigneeTypeShow
+      ..designationShow = designationShow ?? this.designationShow;
+  }
+}

+ 254 - 334
packages/cs_domain/lib/repository/labour_sg_repository.dart

@@ -6,8 +6,7 @@ import 'package:domain/entity/response/job_template_edit_index_entity.dart';
 import 'package:domain/entity/response/job_template_s_g_entity.dart';
 import 'package:domain/entity/response/job_title_edit_index_entity.dart';
 import 'package:domain/entity/response/job_title_s_g_entity.dart';
-import 'package:domain/entity/response/labour_request_s_g_add_index_entity.dart';
-import 'package:domain/entity/response/labour_request_s_g_entity.dart';
+import 'package:domain/entity/response/s_g_labour_request_worl_flow_entity.dart';
 import 'package:get/get.dart';
 import 'package:plugin_platform/platform_export.dart';
 import 'package:plugin_platform/http/http_provider.dart';
@@ -15,10 +14,12 @@ import 'package:plugin_platform/http/http_result.dart';
 import 'package:shared/utils/util.dart';
 
 import '../constants/api_constants.dart';
+import '../entity/agency_need_number.dart';
 import '../entity/response/job_list_s_g_entity.dart';
-import '../entity/response/labour_request_index_entity.dart';
-import '../entity/response/labour_request_s_g_edit_index_entity.dart';
-import '../entity/response/labour_request_s_g_list_entity.dart';
+import '../entity/response/s_g_labour_request_add_option_entity.dart';
+import '../entity/response/s_g_labour_request_detail_entity.dart';
+import '../entity/response/s_g_labour_request_option_entity.dart';
+import '../entity/response/s_g_labour_request_table_entity.dart';
 
 /// 用工相关(新加坡)
 class LabourSGRepository extends GetxService {
@@ -516,58 +517,66 @@ class LabourSGRepository extends GetxService {
     return result.convert();
   }
 
-  /// 用工请求的首页数据
-  Future<HttpResult<LabourRequestSGCountList?>> fetchLabourRequestMain(
-    String? date, {
+  // ===================================  LabourRequest  ↓  ===================================
+
+  /// 用工请求列表的选项数据
+  Future<HttpResult<SGLabourRequestOptionEntity>> fetchLabourRequestOption({
     CancelToken? cancelToken,
   }) async {
-    Map<String, String> params = {};
-
-    if (Utils.isNotEmpty(date)) {
-      params["date"] = date ?? "";
-    }
-
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiLabourRequestMainSG,
-      params: params,
+      ApiConstants.apiLabourRequestOptionSG,
       cancelToken: cancelToken,
     );
 
-    // //根据返回的结果,封装原始数据为Bean/Entity对象
-    // if (result.isSuccess) {
-    //   //重新赋值data或list
-    //   final json = result.getDataJson();
-    //   var data = LabourRequestSGEntity.fromJson(json!);
-    //   //重新赋值data或list
-    //   return result.convert<LabourRequestSGEntity>(data: data);
-    // }
-    // return result.convert();
-
+    //根据返回的结果,封装原始数据为Bean/Entity对象
     if (result.isSuccess) {
-      var jsonList = result.getListJson();
-
-      var list = jsonList?.map((e) {
-        if (e is Map<String, dynamic>) {
-          return LabourRequestSGCountList.fromJson(e);
-        } else {
-          return null;
-        }
-      }).toList();
-
-      return result.convert<LabourRequestSGCountList?>(list: list);
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = SGLabourRequestOptionEntity.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<SGLabourRequestOptionEntity>(data: data);
     }
-
-    return result.convert<LabourRequestSGCountList>();
+    return result.convert();
   }
 
-  /// 添加用工请求的选项数据
-  Future<HttpResult<LabourRequestSGAddIndexEntity>> fetchLabourRequestAddIndex({
-    bool isShowLoadingDialog = true,
+  /// 用工请求列表 Table
+  Future<HttpResult<SGLabourRequestTableEntity>> fetchLabourRequestTable({
+    String? requestId,
+    String? agencyId,
+    String? startDate,
+    String? endDate,
+    String? outletId,
+    String? status,
+    required int curPage,
     CancelToken? cancelToken,
   }) async {
+    Map<String, String> params = {};
+
+    if (Utils.isNotEmpty(requestId)) {
+      params['request_id'] = requestId ?? "";
+    }
+    if (Utils.isNotEmpty(agencyId)) {
+      params['agency_id'] = agencyId ?? "";
+    }
+    if (Utils.isNotEmpty(startDate)) {
+      params['start_date'] = startDate ?? "";
+    }
+    if (Utils.isNotEmpty(endDate)) {
+      params['end_date'] = endDate ?? "";
+    }
+    if (Utils.isNotEmpty(status)) {
+      params['status'] = status ?? "";
+    }
+    if (Utils.isNotEmpty(outletId)) {
+      params['outlet_id'] = outletId ?? "";
+    }
+
+    params['cur_page'] = curPage.toString();
+    params['page_size'] = "10";
+
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiLabourRequestAddIndexSG,
-      isShowLoadingDialog: isShowLoadingDialog,
+      ApiConstants.apiLabourRequestTableSG,
+      params: params,
       cancelToken: cancelToken,
     );
 
@@ -575,28 +584,25 @@ class LabourSGRepository extends GetxService {
     if (result.isSuccess) {
       //重新赋值data或list
       final json = result.getDataJson();
-      var data = LabourRequestSGAddIndexEntity.fromJson(json!);
+      var data = SGLabourRequestTableEntity.fromJson(json!);
       //重新赋值data或list
-      return result.convert<LabourRequestSGAddIndexEntity>(data: data);
+      return result.convert<SGLabourRequestTableEntity>(data: data);
     }
     return result.convert();
   }
 
-  /// 删除工作标题的提交
-  Future<HttpResult> submitLabourRequestAdd(
-    String? jobTitleId,
-    String? startTime,
-    String? endTime,
+  /// 用工请求 Add submit
+  Future<HttpResult> addLabourRequestSubmit({
+    required String? jobTitleId,
+    required String? startTime,
+    required String? endTime,
+    required String? outletId,
     String? repeatStart,
     String? repeatEnd,
-    String? outletId,
-    int sexLimit,
-    String? maleLimit,
-    String? femaleLimit,
-    String? needNum,
     String? requestType,
     String? positionId,
-    String? remark, {
+    List<AgencyNeedNumberEntity>? list,
+    String? remark,
     CancelToken? cancelToken,
   }) async {
     //参数
@@ -607,36 +613,44 @@ class LabourSGRepository extends GetxService {
     params['end_time'] = endTime ?? "";
     params['outlet_id'] = outletId ?? "";
 
-    params['sex_limit'] = sexLimit.toString();
-
-    if (sexLimit == 1) {
-      params['male_limit'] = maleLimit ?? "0";
-      params['female_limit'] = femaleLimit ?? "0";
-      // params['need_num'] = (int.parse(maleLimit ?? "0") + int.parse(femaleLimit ?? "0")).toString();  //不传 need_num 字段
-    } else {
-      params['need_num'] = needNum ?? "0";
-    }
-
     if (Utils.isNotEmpty(repeatStart)) {
       params['repeat_start'] = repeatStart ?? "";
     }
-
     if (Utils.isNotEmpty(repeatEnd)) {
       params['repeat_end'] = repeatEnd ?? "";
     }
-
     if (Utils.isNotEmpty(requestType)) {
       params['request_type'] = requestType ?? "";
     }
-
     if (Utils.isNotEmpty(positionId) && requestType == "1") {
       params['position_id'] = positionId ?? "";
     }
-
     if (Utils.isNotEmpty(remark)) {
       params['remark'] = remark ?? "";
     }
 
+    if (list != null && list.isNotEmpty) {
+      for (var item in list) {
+        if (item.isInHouse) {
+          params['sex_limit_0'] = item.sexLimit.toString();
+          if (item.sexLimit == 1) {
+            params['male_limit_0'] = item.maleLimit.toString();
+            params['female_limit_0'] = item.femaleLimit.toString();
+          } else {
+            params['need_num_0'] = item.needNum.toString();
+          }
+        } else {
+          params['sex_limit_${item.agencyId}'] = item.sexLimit.toString();
+          if (item.sexLimit == 1) {
+            params['male_limit_${item.agencyId}'] = item.maleLimit.toString();
+            params['female_limit_${item.agencyId}'] = item.femaleLimit.toString();
+          } else {
+            params['need_num_${item.agencyId}'] = item.needNum.toString();
+          }
+        }
+      }
+    }
+
     final result = await httpProvider.requestNetResult(
       ApiConstants.apiLabourRequestAddSubmitSG,
       method: HttpMethod.POST,
@@ -654,12 +668,13 @@ class LabourSGRepository extends GetxService {
     return result.convert();
   }
 
-  //用工请求的查询选项(Job List)
-  Future<HttpResult<JobListIndexSGEntity>> fetchJobListIndex({
+  /// 用工请求 Add Option
+  Future<HttpResult<SGLabourRequestAddOptionEntity>> fetchLabourRequestAddOption({
     CancelToken? cancelToken,
   }) async {
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiJobListIndexSG,
+      ApiConstants.apiLabourRequestAddOptionSG,
+      isShowLoadingDialog: true,
       cancelToken: cancelToken,
     );
 
@@ -667,46 +682,26 @@ class LabourSGRepository extends GetxService {
     if (result.isSuccess) {
       //重新赋值data或list
       final json = result.getDataJson();
-      var data = JobListIndexSGEntity.fromJson(json!);
+      var data = SGLabourRequestAddOptionEntity.fromJson(json!);
       //重新赋值data或list
-      return result.convert<JobListIndexSGEntity>(data: data);
+      return result.convert<SGLabourRequestAddOptionEntity>(data: data);
     }
     return result.convert();
   }
 
-  //用工请求的查询列表(Job List)
-  Future<HttpResult<JobListSGEntity>> fetchJobListTable(
-    String? startDate,
-    String? endDate,
-    String? status,
-    String? outletId, {
-    required int curPage,
+  /// 用工请求 Edit Detail
+  Future<HttpResult<SGLabourRequestDetailEntity>> fetchLabourRequestEditDetail(
+    String? requestId, {
     CancelToken? cancelToken,
   }) async {
+    //参数
     Map<String, String> params = {};
-
-    if (Utils.isNotEmpty(startDate)) {
-      params['start_date'] = startDate ?? "";
-    }
-
-    if (Utils.isNotEmpty(endDate)) {
-      params['end_date'] = endDate ?? "";
-    }
-
-    if (Utils.isNotEmpty(status)) {
-      params['status'] = status ?? "";
-    }
-
-    if (Utils.isNotEmpty(outletId)) {
-      params['outlet_id'] = outletId ?? "";
-    }
-
-    params['cur_page'] = curPage.toString();
-    params['page_size'] = "10";
+    params['request_id'] = requestId ?? "";
 
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiJobListTableSG,
+      ApiConstants.apiLabourRequestEditDetailSG,
       params: params,
+      isShowLoadingDialog: true,
       cancelToken: cancelToken,
     );
 
@@ -714,55 +709,53 @@ class LabourSGRepository extends GetxService {
     if (result.isSuccess) {
       //重新赋值data或list
       final json = result.getDataJson();
-      var data = JobListSGEntity.fromJson(json!);
+      var data = SGLabourRequestDetailEntity.fromJson(json!);
       //重新赋值data或list
-      return result.convert<JobListSGEntity>(data: data);
+      return result.convert<SGLabourRequestDetailEntity>(data: data);
     }
     return result.convert();
   }
 
-  /// 根据ID获取主列表的Item数据,用于刷新Item
-  Future<HttpResult<JobListSGEntity>> fetchJobListByIds(
-    String? jobId, {
+  /// 新加坡的用工请求 Recall操作
+  Future<HttpResult> recallLabourRequestSG(
+    String? requestId, {
     CancelToken? cancelToken,
   }) async {
     //参数
     Map<String, String> params = {};
-    params["cur_page"] = "1";
-    params["page_size"] = "9999";
-
-    if (!Utils.isEmpty(jobId)) {
-      params["job_id"] = jobId!;
-    }
+    params['request_id'] = requestId ?? "";
 
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiJobListTableSG,
+      ApiConstants.apiLabourRequestRecallSG,
+      method: HttpMethod.POST,
       params: params,
+      networkDebounce: true,
+      isShowLoadingDialog: true,
       cancelToken: cancelToken,
     );
 
     //根据返回的结果,封装原始数据为Bean/Entity对象
     if (result.isSuccess) {
       //重新赋值data或list
-      final json = result.getDataJson();
-      var data = JobListSGEntity.fromJson(json!);
-      //重新赋值data或list
-      return result.convert<JobListSGEntity>(data: data);
+      return result.convert();
     }
     return result.convert();
   }
 
-  //用工请求的编辑详情(Job List)
-  Future<HttpResult<JobListEditIndexSGEntity>> fetchJobListEditIndex(
-    String? jobId, {
+  /// 删除新加坡的用工请求
+  Future<HttpResult> deleteLabourRequestSG(
+    String? requestId, {
     CancelToken? cancelToken,
   }) async {
+    //参数
     Map<String, String> params = {};
-    params['job_id'] = jobId ?? "";
+    params['request_id'] = requestId ?? "";
 
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiJobListEditIndexSG,
+      ApiConstants.apiLabourRequestDelete,
+      method: HttpMethod.POST,
       params: params,
+      networkDebounce: true,
       isShowLoadingDialog: true,
       cancelToken: cancelToken,
     );
@@ -770,87 +763,54 @@ class LabourSGRepository extends GetxService {
     //根据返回的结果,封装原始数据为Bean/Entity对象
     if (result.isSuccess) {
       //重新赋值data或list
-      final json = result.getDataJson();
-      var data = JobListEditIndexSGEntity.fromJson(json!);
-      //重新赋值data或list
-      return result.convert<JobListEditIndexSGEntity>(data: data);
+      return result.convert();
     }
     return result.convert();
   }
 
-  //用工请求的编辑提交(Job List)
-  Future<HttpResult> editJobListSubmit(
-    String? jobId,
-    String? startTime,
-    String? endTime,
-    String? outletId,
-    int sexLimit,
+  /// 用工请求 Edit submit
+  Future<HttpResult> editLabourRequestSubmit({
+    required String? requestId,
+    required String? startTime,
+    required String? endTime,
+    required String? outletId,
+    int sexLimit = 0,
     String? maleLimit,
     String? femaleLimit,
     String? needNum,
     String? requestType,
     String? positionId,
-    String? remark, {
+    String? remark,
     CancelToken? cancelToken,
   }) async {
     //参数
     Map<String, String> params = {};
 
-    params['job_id'] = jobId ?? "";
+    params['request_id'] = requestId ?? "";
     params['start_time'] = startTime ?? "";
     params['end_time'] = endTime ?? "";
     params['outlet_id'] = outletId ?? "";
 
-    params['sex_limit'] = sexLimit.toString();
-
-    if (sexLimit == 1) {
-      params['male_limit'] = maleLimit ?? "0";
-      params['female_limit'] = femaleLimit ?? "0";
-      // params['need_num'] = (int.parse(maleLimit ?? "0") + int.parse(femaleLimit ?? "0")).toString();
-    } else {
-      params['need_num'] = needNum ?? "0";
-    }
-
     if (Utils.isNotEmpty(requestType)) {
       params['request_type'] = requestType ?? "";
     }
-
     if (Utils.isNotEmpty(positionId) && requestType == "1") {
       params['position_id'] = positionId ?? "";
     }
-
     if (Utils.isNotEmpty(remark)) {
       params['remark'] = remark ?? "";
     }
 
-    final result = await httpProvider.requestNetResult(
-      ApiConstants.apiJobListEditSubmitSG,
-      method: HttpMethod.POST,
-      params: params,
-      networkDebounce: true,
-      isShowLoadingDialog: true,
-      cancelToken: cancelToken,
-    );
-
-    //根据返回的结果,封装原始数据为Bean/Entity对象
-    if (result.isSuccess) {
-      //重新赋值data或list
-      return result.convert();
+    params['sex_limit'] = sexLimit.toString();
+    if (sexLimit == 1) {
+      params['male_limit'] = maleLimit.toString();
+      params['female_limit'] = femaleLimit.toString();
+    } else {
+      params['need_num'] = needNum.toString();
     }
-    return result.convert();
-  }
-
-  //用工请求的取消(Job List)
-  Future<HttpResult> cancelJobList(
-    String? jobId, {
-    CancelToken? cancelToken,
-  }) async {
-    //参数
-    Map<String, String> params = {};
-    params['job_id'] = jobId ?? "";
 
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiJobListCancelSG,
+      ApiConstants.apiLabourRequestEditSubmitSG,
       method: HttpMethod.POST,
       params: params,
       networkDebounce: true,
@@ -866,20 +826,18 @@ class LabourSGRepository extends GetxService {
     return result.convert();
   }
 
-  //用工请求的删除(Job List)
-  Future<HttpResult> deleteJobList(
-    String? jobId, {
-    CancelToken? cancelToken,
-  }) async {
+  /// 用工请求的工作流列表
+  Future<HttpResult<SGLabourRequestWorlFlowEntity>> fetchLabourRequestWorkFlow(
+      String? requestId, {
+        CancelToken? cancelToken,
+      }) async {
     //参数
     Map<String, String> params = {};
-    params['job_id'] = jobId ?? "";
+    params['request_id'] = requestId ?? "";
 
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiJobListDeleteSG,
-      method: HttpMethod.POST,
+      ApiConstants.apiLabourRequestWorkflowSG,
       params: params,
-      networkDebounce: true,
       isShowLoadingDialog: true,
       cancelToken: cancelToken,
     );
@@ -887,45 +845,22 @@ class LabourSGRepository extends GetxService {
     //根据返回的结果,封装原始数据为Bean/Entity对象
     if (result.isSuccess) {
       //重新赋值data或list
-      return result.convert();
-    }
-    return result.convert();
-  }
-
-  //用工请求的考勤确认(Job List)
-  Future<HttpResult> confirmJobList(
-    String? jobId, {
-    CancelToken? cancelToken,
-  }) async {
-    //参数
-    Map<String, String> params = {};
-    params['job_id'] = jobId ?? "";
-
-    final result = await httpProvider.requestNetResult(
-      ApiConstants.apiJobListConfirmSG,
-      method: HttpMethod.POST,
-      params: params,
-      networkDebounce: true,
-      isShowLoadingDialog: true,
-      cancelToken: cancelToken,
-    );
-
-    //根据返回的结果,封装原始数据为Bean/Entity对象
-    if (result.isSuccess) {
+      final json = result.getDataJson();
+      var data = SGLabourRequestWorlFlowEntity.fromJson(json!);
       //重新赋值data或list
-      return result.convert();
+      return result.convert<SGLabourRequestWorlFlowEntity>(data: data);
     }
     return result.convert();
   }
 
-  // V2 - 新版的LabourRequest 改动
+  // ===================================  Job List  ↓  ===================================
 
-  /// 获取用工请求的筛选选项
-  Future<HttpResult<LabourRequestIndexEntity>> fetchLabourRequestSGIndex({
+  //用工请求的查询选项(Job List)
+  Future<HttpResult<JobListIndexSGEntity>> fetchJobListIndex({
     CancelToken? cancelToken,
   }) async {
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiLabourRequestIndex,
+      ApiConstants.apiJobListIndexSG,
       cancelToken: cancelToken,
     );
 
@@ -933,46 +868,45 @@ class LabourSGRepository extends GetxService {
     if (result.isSuccess) {
       //重新赋值data或list
       final json = result.getDataJson();
-      var data = LabourRequestIndexEntity.fromJson(json!);
+      var data = JobListIndexSGEntity.fromJson(json!);
       //重新赋值data或list
-      return result.convert<LabourRequestIndexEntity>(data: data);
+      return result.convert<JobListIndexSGEntity>(data: data);
     }
     return result.convert();
   }
 
-  /// 获取用工请求的主列表
-  Future<HttpResult<LabourRequestSGListEntity>> fetchLabourRequestSGList(
-    String? keyword,
+  //用工请求的查询列表(Job List)
+  Future<HttpResult<JobListSGEntity>> fetchJobListTable(
     String? startDate,
     String? endDate,
-    String? statusId,
-    String? departmentId, {
+    String? status,
+    String? outletId, {
     required int curPage,
     CancelToken? cancelToken,
   }) async {
-    //参数
     Map<String, String> params = {};
-    params["cur_page"] = curPage.toString();
-    params["page_size"] = "20";
 
-    if (!Utils.isEmpty(keyword)) {
-      params["job_title"] = keyword!;
-    }
-    if (!Utils.isEmpty(startDate)) {
-      params["job_start"] = startDate!;
+    if (Utils.isNotEmpty(startDate)) {
+      params['start_date'] = startDate ?? "";
     }
-    if (!Utils.isEmpty(endDate)) {
-      params["job_end"] = endDate!;
+
+    if (Utils.isNotEmpty(endDate)) {
+      params['end_date'] = endDate ?? "";
     }
-    if (!Utils.isEmpty(statusId)) {
-      params["status"] = statusId!;
+
+    if (Utils.isNotEmpty(status)) {
+      params['status'] = status ?? "";
     }
-    if (!Utils.isEmpty(departmentId)) {
-      params["outlet_id"] = departmentId!;
+
+    if (Utils.isNotEmpty(outletId)) {
+      params['outlet_id'] = outletId ?? "";
     }
 
+    params['cur_page'] = curPage.toString();
+    params['page_size'] = "10";
+
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiLabourRequestList,
+      ApiConstants.apiJobListTableSG,
       params: params,
       cancelToken: cancelToken,
     );
@@ -981,31 +915,30 @@ class LabourSGRepository extends GetxService {
     if (result.isSuccess) {
       //重新赋值data或list
       final json = result.getDataJson();
-      var data = LabourRequestSGListEntity.fromJson(json!);
+      var data = JobListSGEntity.fromJson(json!);
       //重新赋值data或list
-      return result.convert<LabourRequestSGListEntity>(data: data);
+      return result.convert<JobListSGEntity>(data: data);
     }
     return result.convert();
   }
 
   /// 根据ID获取主列表的Item数据,用于刷新Item
-  Future<HttpResult<LabourRequestSGListEntity>> fetchItemByRequestId(
-    String? requestId, {
+  Future<HttpResult<JobListSGEntity>> fetchJobListByIds(
+    String? jobId, {
     CancelToken? cancelToken,
   }) async {
     //参数
     Map<String, String> params = {};
     params["cur_page"] = "1";
-    params["page_size"] = "1";
+    params["page_size"] = "9999";
 
-    if (!Utils.isEmpty(requestId)) {
-      params["request_id"] = requestId!;
+    if (!Utils.isEmpty(jobId)) {
+      params["job_id"] = jobId!;
     }
 
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiLabourRequestList,
+      ApiConstants.apiJobListTableSG,
       params: params,
-      isShowLoadingDialog: true,
       cancelToken: cancelToken,
     );
 
@@ -1013,94 +946,25 @@ class LabourSGRepository extends GetxService {
     if (result.isSuccess) {
       //重新赋值data或list
       final json = result.getDataJson();
-      var data = LabourRequestSGListEntity.fromJson(json!);
+      var data = JobListSGEntity.fromJson(json!);
       //重新赋值data或list
-      return result.convert<LabourRequestSGListEntity>(data: data);
+      return result.convert<JobListSGEntity>(data: data);
     }
     return result.convert();
   }
 
-  /// 删除工作标题的提交
-  // Future<HttpResult> submitLabourRequestAdd(
-  //   String? jobTitleId,
-  //   String? startTime,
-  //   String? endTime,
-  //   String? repeatStart,
-  //   String? repeatEnd,
-  //   String? outletId,
-  //   int sexLimit,
-  //   String? maleLimit,
-  //   String? femaleLimit,
-  //   String? needNum,
-  //   String? requestType,
-  //   String? remark, {
-  //   CancelToken? cancelToken,
-  // }) async {
-  //   //参数
-  //   Map<String, String> params = {};
-  //
-  //   params['job_title_id'] = jobTitleId ?? "";
-  //   params['start_time'] = startTime ?? "";
-  //   params['end_time'] = endTime ?? "";
-  //   params['outlet_id'] = outletId ?? "";
-  //
-  //   params['sex_limit'] = sexLimit.toString();
-  //
-  //   if (sexLimit == 1) {
-  //     params['male_limit'] = maleLimit ?? "0";
-  //     params['female_limit'] = femaleLimit ?? "0";
-  //     // params['need_num'] = (int.parse(maleLimit ?? "0") + int.parse(femaleLimit ?? "0")).toString();  //不传 need_num 字段
-  //   } else {
-  //     params['need_num'] = needNum ?? "0";
-  //   }
-  //
-  //   if (Utils.isNotEmpty(repeatStart)) {
-  //     params['repeat_start'] = repeatStart ?? "";
-  //   }
-  //
-  //   if (Utils.isNotEmpty(repeatEnd)) {
-  //     params['repeat_end'] = repeatEnd ?? "";
-  //   }
-  //
-  //   if (Utils.isNotEmpty(requestType)) {
-  //     params['request_type'] = requestType ?? "";
-  //   }
-  //
-  //   if (Utils.isNotEmpty(remark)) {
-  //     params['remark'] = remark ?? "";
-  //   }
-  //
-  //   final result = await httpProvider.requestNetResult(
-  //     ApiConstants.apiLabourRequestAddSubmitSG,
-  //     method: HttpMethod.POST,
-  //     params: params,
-  //     networkDebounce: true,
-  //     isShowLoadingDialog: true,
-  //     cancelToken: cancelToken,
-  //   );
-  //
-  //   //根据返回的结果,封装原始数据为Bean/Entity对象
-  //   if (result.isSuccess) {
-  //     //重新赋值data或list
-  //     return result.convert();
-  //   }
-  //   return result.convert();
-  // }
-
-  /// 用工的编辑详情
-  Future<HttpResult<LabourRequestSGEditIndexEntity>> fetchLabourRequestEditDetail(
-    String? requestId, {
-    bool isShowLoadingDialog = true,
+  //用工请求的编辑详情(Job List)
+  Future<HttpResult<JobListEditIndexSGEntity>> fetchJobListEditIndex(
+    String? jobId, {
     CancelToken? cancelToken,
   }) async {
-    //参数
     Map<String, String> params = {};
-    params['request_id'] = requestId ?? "";
+    params['job_id'] = jobId ?? "";
 
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiLabourRequestEditDetail,
+      ApiConstants.apiJobListEditIndexSG,
       params: params,
-      isShowLoadingDialog: isShowLoadingDialog,
+      isShowLoadingDialog: true,
       cancelToken: cancelToken,
     );
 
@@ -1108,16 +972,16 @@ class LabourSGRepository extends GetxService {
     if (result.isSuccess) {
       //重新赋值data或list
       final json = result.getDataJson();
-      var data = LabourRequestSGEditIndexEntity.fromJson(json!);
+      var data = JobListEditIndexSGEntity.fromJson(json!);
       //重新赋值data或list
-      return result.convert<LabourRequestSGEditIndexEntity>(data: data);
+      return result.convert<JobListEditIndexSGEntity>(data: data);
     }
     return result.convert();
   }
 
-  /// 编辑工作标题的提交
-  Future<HttpResult> submitLabourRequestEdit(
-    String? requestId,
+  //用工请求的编辑提交(Job List)
+  Future<HttpResult> editJobListSubmit(
+    String? jobId,
     String? startTime,
     String? endTime,
     String? outletId,
@@ -1126,13 +990,14 @@ class LabourSGRepository extends GetxService {
     String? femaleLimit,
     String? needNum,
     String? requestType,
+    String? positionId,
     String? remark, {
     CancelToken? cancelToken,
   }) async {
     //参数
     Map<String, String> params = {};
 
-    params['request_id'] = requestId ?? "";
+    params['job_id'] = jobId ?? "";
     params['start_time'] = startTime ?? "";
     params['end_time'] = endTime ?? "";
     params['outlet_id'] = outletId ?? "";
@@ -1142,7 +1007,7 @@ class LabourSGRepository extends GetxService {
     if (sexLimit == 1) {
       params['male_limit'] = maleLimit ?? "0";
       params['female_limit'] = femaleLimit ?? "0";
-      // params['need_num'] = (int.parse(maleLimit ?? "0") + int.parse(femaleLimit ?? "0")).toString();  //不传 need_num 字段
+      // params['need_num'] = (int.parse(maleLimit ?? "0") + int.parse(femaleLimit ?? "0")).toString();
     } else {
       params['need_num'] = needNum ?? "0";
     }
@@ -1151,12 +1016,16 @@ class LabourSGRepository extends GetxService {
       params['request_type'] = requestType ?? "";
     }
 
+    if (Utils.isNotEmpty(positionId) && requestType == "1") {
+      params['position_id'] = positionId ?? "";
+    }
+
     if (Utils.isNotEmpty(remark)) {
       params['remark'] = remark ?? "";
     }
 
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiLabourRequestEditSubmit,
+      ApiConstants.apiJobListEditSubmitSG,
       method: HttpMethod.POST,
       params: params,
       networkDebounce: true,
@@ -1172,18 +1041,69 @@ class LabourSGRepository extends GetxService {
     return result.convert();
   }
 
-  /// 删除新加坡的用工请求
-  Future<HttpResult> deleteLabourRequestSG(
-    String? requestId, {
+  //用工请求的取消(Job List)
+  Future<HttpResult> cancelJobList(
+    String? jobId, {
     CancelToken? cancelToken,
   }) async {
     //参数
     Map<String, String> params = {};
+    params['job_id'] = jobId ?? "";
 
-    params['request_id'] = requestId ?? "";
+    final result = await httpProvider.requestNetResult(
+      ApiConstants.apiJobListCancelSG,
+      method: HttpMethod.POST,
+      params: params,
+      networkDebounce: true,
+      isShowLoadingDialog: true,
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      return result.convert();
+    }
+    return result.convert();
+  }
+
+  //用工请求的删除(Job List)
+  Future<HttpResult> deleteJobList(
+    String? jobId, {
+    CancelToken? cancelToken,
+  }) async {
+    //参数
+    Map<String, String> params = {};
+    params['job_id'] = jobId ?? "";
 
     final result = await httpProvider.requestNetResult(
-      ApiConstants.apiLabourRequestDelete,
+      ApiConstants.apiJobListDeleteSG,
+      method: HttpMethod.POST,
+      params: params,
+      networkDebounce: true,
+      isShowLoadingDialog: true,
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      return result.convert();
+    }
+    return result.convert();
+  }
+
+  //用工请求的考勤确认(Job List)
+  Future<HttpResult> confirmJobList(
+    String? jobId, {
+    CancelToken? cancelToken,
+  }) async {
+    //参数
+    Map<String, String> params = {};
+    params['job_id'] = jobId ?? "";
+
+    final result = await httpProvider.requestNetResult(
+      ApiConstants.apiJobListConfirmSG,
       method: HttpMethod.POST,
       params: params,
       networkDebounce: true,

+ 2 - 1
packages/cs_router/lib/path/router_path.dart

@@ -92,7 +92,8 @@ class RouterPath {
   static const jobTemplateAddSG = '/job/template/add/sg'; //模板添加
   static const labourRequestSG = '/labour/request/sg'; //用工首页
   static const labourRequestAddSG = '/labour/request/add/sg'; //用工请求添加
-  static const labourRequestEditSG = '/job/template/edit/sg'; //模板编辑与详情
+  static const labourRequestEditSG = '/labour/request/edit/sg'; //用工请求编辑与详情
+  static const labourRequestWorkflowSG = '/labour/request/workflow/sg'; //用工请求工作流
 
   //新加坡的工作列表
   static const jobListSG = '/job/list/sg'; //工作列表(新加坡)

+ 3 - 1
packages/cs_widgets/lib/shatter/round_my_text_field.dart

@@ -21,6 +21,7 @@ class CustomTextField extends StatelessWidget {
   final double paddingBottom;
   final double height;
   final double fontSize;
+  final double cornerRadius;
   final TextInputType textInputType;
   final String? errorText;
   final TextInputAction textInputAction;
@@ -45,6 +46,7 @@ class CustomTextField extends StatelessWidget {
     this.errorText,
     this.fontSize = 15.0,
     this.height = 50.0,
+    this.cornerRadius = 5.0,
     this.textInputAction = TextInputAction.next,
     this.inputFormatters,
     this.enabled,
@@ -68,7 +70,7 @@ class CustomTextField extends StatelessWidget {
         margin: EdgeInsets.only(left: marginLeft, right: marginRight, top: marginTop),
         showDivider: false,
         fillBackgroundColor: fillBackgroundColor,
-        fillCornerRadius: 5,
+        fillCornerRadius: cornerRadius,
         padding: EdgeInsets.only(left: paddingLeft, right: paddingRight, top: paddingTop, bottom: paddingBottom),
         height: height,
         style: TextStyle(