Bladeren bron

代码提交

yangyang 2 jaren geleden
bovenliggende
commit
63d1493b43
41 gewijzigde bestanden met toevoegingen van 4250 en 699 verwijderingen
  1. 17 3
      lib/PhotoTool.dart
  2. 3 0
      lib/common/event/RefreshPatrolEdit.dart
  3. 8 0
      lib/common/event/multiple_choice.dart
  4. 1 1
      lib/common/style/TitleBar.dart
  5. 6 0
      lib/common/style/gsy_style.dart
  6. 14 3
      lib/common/utils/ConstantString.dart
  7. 254 0
      lib/generated/json/base/json_convert_content.dart
  8. 191 0
      lib/generated/json/maint_job_list_response_entity_helper.dart
  9. 2 18
      lib/generated/json/patrol_job_detail_response_entity_helper.dart
  10. 63 0
      lib/generated/json/patrol_job_edit_emtity_entity_helper.dart
  11. 168 0
      lib/generated/json/patrol_job_list_entity_entity_helper.dart
  12. 179 0
      lib/generated/json/patrol_job_select_entity_entity_helper.dart
  13. 363 0
      lib/generated/json/repair_bill_list_response_entity_helper.dart
  14. 245 0
      lib/generated/json/repair_query_device_response_entity_helper.dart
  15. 26 0
      lib/generated/json/upload_list_entity_entity_helper.dart
  16. 3 0
      lib/main.dart
  17. 112 227
      lib/model/maint_job_detail_response.dart
  18. 47 0
      lib/model/maint_job_list_response_entity.dart
  19. 2 2
      lib/model/patrol_job_detail_response_entity.dart
  20. 17 0
      lib/model/patrol_job_edit_emtity_entity.dart
  21. 41 0
      lib/model/patrol_job_list_entity_entity.dart
  22. 43 0
      lib/model/patrol_job_select_entity_entity.dart
  23. 86 0
      lib/model/repair_bill_list_response_entity.dart
  24. 60 0
      lib/model/repair_query_device_response_entity.dart
  25. 7 0
      lib/model/upload_list_entity_entity.dart
  26. 1 1
      lib/page/device/device_manage_detail_page.dart
  27. 1 1
      lib/page/device/device_manage_update_page.dart
  28. 273 296
      lib/page/maint/maint_job_detail.dart
  29. 0 0
      lib/page/maint/maint_job_edit.dart
  30. 175 0
      lib/page/maint/maint_job_list.dart
  31. 14 6
      lib/page/maint/maint_job_page.dart
  32. 261 0
      lib/page/patrol/patrol_job_add.dart
  33. 29 15
      lib/page/patrol/patrol_job_detail.dart
  34. 368 0
      lib/page/patrol/patrol_job_edit.dart
  35. 97 73
      lib/page/patrol/patrol_job_list.dart
  36. 7 4
      lib/page/patrol/patrol_job_page.dart
  37. 203 0
      lib/page/patrol/patrol_job_select.dart
  38. 325 0
      lib/page/repair/repair_add_page.dart
  39. 127 0
      lib/page/repair/repair_job_device_list.dart
  40. 175 49
      lib/page/repair/repair_page.dart
  41. 236 0
      lib/widget/RepairJobDrawer.dart

+ 17 - 3
lib/PhotoTool.dart

@@ -8,8 +8,12 @@ import 'package:wechat_assets_picker/wechat_assets_picker.dart';
 class PhotoTool extends StatefulWidget {
   @required final int imageCount;//最多几张
   @required  final int lineCount;//一行几个
+
+  final _AddCall addCall;
+  final _RemoveCall removeCall;
   //注:最好把图片和文字这些都拿出来,方便更改,这里就不搞了
-  const PhotoTool({required this.imageCount,required this.lineCount});
+  const PhotoTool({required this.imageCount,required this.lineCount
+    ,required this.addCall,required this.removeCall});
   @override
   _PhotoToolState createState() => _PhotoToolState();
 }
@@ -22,7 +26,7 @@ class _PhotoToolState extends State<PhotoTool> {
       width: double.infinity,
       color: Colors.white,
       child: Padding(
-        padding: const EdgeInsets.all(16.0),
+        padding: const EdgeInsets.all(12.0),
         child: Column(
           crossAxisAlignment: CrossAxisAlignment.start,
           children: [
@@ -148,6 +152,9 @@ class _PhotoToolState extends State<PhotoTool> {
     if (assets == null || assets.length <= 0) return;
     setState(() {
       _imageFiles.addAll(assets);
+      if (widget.addCall != null) {
+        widget.addCall(_imageFiles);
+      }
     });
   }
   /// 删除图片
@@ -155,6 +162,13 @@ class _PhotoToolState extends State<PhotoTool> {
     if (_imageFiles == null || _imageFiles.length <= index) return;
     setState(() {
       _imageFiles.removeAt(index);
+      if (widget.removeCall != null) {
+        widget.removeCall(index);
+      }
     });
   }
-}
+}
+
+typedef _AddCall = void Function(List<AssetEntity> mList);
+
+typedef _RemoveCall = void Function(int index);

+ 3 - 0
lib/common/event/RefreshPatrolEdit.dart

@@ -0,0 +1,3 @@
+class RefreshPatrolEdit{
+
+}

+ 8 - 0
lib/common/event/multiple_choice.dart

@@ -0,0 +1,8 @@
+class MultipleChoice{
+
+  late String name;
+
+  late bool isCheck;
+
+  MultipleChoice(this.name,this.isCheck);
+}

+ 1 - 1
lib/common/style/TitleBar.dart

@@ -16,7 +16,7 @@ class TitleBar {
    * appBar: TitleBar().backAppbar(context, '个人资料'),
    * appBar: TitleBar().backAppbar(context, '个人资料',(){}),
    */
-  backAppbar(BuildContext context, String title) {
+  backAppbar(String title) {
     return AppBar(
       title: Text(
         title,

+ 6 - 0
lib/common/style/gsy_style.dart

@@ -54,6 +54,7 @@ class GSYConstant {
   static const bigTextSize = 20.0;
   static const normalTextSize = 18.0;
   static const middleTextWhiteSize = 16.0;
+  static const TextSize15 = 15.0;
   static const smallTextSize = 14.0;
   static const minTextSize = 12.0;
 
@@ -179,6 +180,11 @@ class GSYConstant {
     fontSize: smallTextSize,
   );
 
+  static const textLight = TextStyle(
+    color: GSYColors.primaryLightValue,
+    fontSize: TextSize15,
+  );
+
 
   static const normalTextBigWhiteBold = TextStyle(
     color: GSYColors.actionBlue,

+ 14 - 3
lib/common/utils/ConstantString.dart

@@ -15,6 +15,7 @@ class ConstantString {
 
   static const String patrolJobTitle = "巡检任务来自于'巡检计划管理',计划信息请登录pc端查看";
   static const String maintJobTitle = "维保任务来自于'维保计划管理',计划信息请登录pc端查看";
+  static const String repairJobTitle = "巡检任务来自于'巡检计划管理',计划信息请登录pc端查看";
   static const String patrolListTitle = "请针对以下设备进行巡检记录";
 
   static const String loadingText = "努力加载中···";
@@ -37,13 +38,23 @@ class ConstantString {
 
   static const String login_maint = "登记维保";
 
-  static const String close_task="关闭任务";
+  static const String close_task = "关闭任务";
 
-  static const String registration="登记巡检";
+  static const String registration = "登记巡检";
 
-  static const String complete_inspection="完成巡检";
+  static const String complete_inspection = "完成巡检";
 
   static const String notesNull = "请输入备注";
 
   static const String next = "下一步";
+
+  static const String back = "上一步";
+
+  static const String complete = "完成";
+
+  static const String patrolAddNull = "请输入活选择结果";
+
+  static const String newRepair = "新建保修单";
+
+  static const String submit = "提交";
 }

+ 254 - 0
lib/generated/json/base/json_convert_content.dart

@@ -6,17 +6,31 @@ import 'package:deus_app/generated/json/drop_menu_item_helper.dart';
 import 'package:deus_app/generated/json/equipment_info_entity_helper.dart';
 import 'package:deus_app/generated/json/equipment_list_entity_helper.dart';
 import 'package:deus_app/generated/json/login_response_entity_helper.dart';
+import 'package:deus_app/generated/json/maint_job_list_response_entity_helper.dart';
 import 'package:deus_app/generated/json/patrol_job_detail_response_entity_helper.dart';
+import 'package:deus_app/generated/json/patrol_job_edit_emtity_entity_helper.dart';
+import 'package:deus_app/generated/json/patrol_job_list_entity_entity_helper.dart';
+import 'package:deus_app/generated/json/patrol_job_select_entity_entity_helper.dart';
 import 'package:deus_app/generated/json/personal_data_count_entity_helper.dart';
+import 'package:deus_app/generated/json/repair_bill_list_response_entity_helper.dart';
+import 'package:deus_app/generated/json/repair_query_device_response_entity_helper.dart';
+import 'package:deus_app/generated/json/upload_list_entity_entity_helper.dart';
 import 'package:deus_app/generated/json/user_response_entity_helper.dart';
 import 'package:deus_app/model/drop_menu_item.dart';
 import 'package:deus_app/model/equipment_info_entity.dart';
 import 'package:deus_app/model/equipment_list_entity.dart';
 import 'package:deus_app/model/login_response_entity.dart';
+import 'package:deus_app/model/maint_job_list_response_entity.dart';
 import 'package:deus_app/model/patrol_job_detail_response_entity.dart';
+import 'package:deus_app/model/patrol_job_edit_emtity_entity.dart';
+import 'package:deus_app/model/patrol_job_list_entity_entity.dart';
+import 'package:deus_app/model/patrol_job_select_entity_entity.dart';
 // This file is automatically generated. DO NOT EDIT, all your changes would be lost.
 import 'package:deus_app/model/patrol_response_entity.dart';
 import 'package:deus_app/model/personal_data_count_entity.dart';
+import 'package:deus_app/model/repair_bill_list_response_entity.dart';
+import 'package:deus_app/model/repair_query_device_response_entity.dart';
+import 'package:deus_app/model/upload_list_entity_entity.dart';
 import 'package:deus_app/model/user_response_entity.dart';
 
 class JsonConvert<T> {
@@ -30,6 +44,46 @@ class JsonConvert<T> {
 
   static _getFromJson<T>(Type type, data, json) {
 		switch (type) {
+			case RepairBillListResponseEntity:
+				return repairBillListResponseEntityFromJson(data as RepairBillListResponseEntity, json) as T;
+			case RepairBillListResponseData:
+				return repairBillListResponseDataFromJson(data as RepairBillListResponseData, json) as T;
+			case RepairBillListResponseDataList:
+				return repairBillListResponseDataListFromJson(data as RepairBillListResponseDataList, json) as T;
+			case RepairBillListResponseDataListDevice:
+				return repairBillListResponseDataListDeviceFromJson(data as RepairBillListResponseDataListDevice, json) as T;
+			case RepairBillListResponseDataListLogs:
+				return repairBillListResponseDataListLogsFromJson(data as RepairBillListResponseDataListLogs, json) as T;
+			case RepairBillListResponseDataQuery:
+				return repairBillListResponseDataQueryFromJson(data as RepairBillListResponseDataQuery, json) as T;
+			case PatrolJobSelectEntityEntity:
+				return patrolJobSelectEntityEntityFromJson(data as PatrolJobSelectEntityEntity, json) as T;
+			case PatrolJobSelectEntityData:
+				return patrolJobSelectEntityDataFromJson(data as PatrolJobSelectEntityData, json) as T;
+			case PatrolJobSelectEntityDataPatrolItemModelVOS:
+				return patrolJobSelectEntityDataPatrolItemModelVOSFromJson(data as PatrolJobSelectEntityDataPatrolItemModelVOS, json) as T;
+			case PatrolJobSelectEntityDataQuery:
+				return patrolJobSelectEntityDataQueryFromJson(data as PatrolJobSelectEntityDataQuery, json) as T;
+			case UploadListEntityEntity:
+				return uploadListEntityEntityFromJson(data as UploadListEntityEntity, json) as T;
+			case PatrolJobEditEmtityEntity:
+				return patrolJobEditEmtityEntityFromJson(data as PatrolJobEditEmtityEntity, json) as T;
+			case PatrolJobEditEmtityData:
+				return patrolJobEditEmtityDataFromJson(data as PatrolJobEditEmtityData, json) as T;
+			case PatrolJobListEntityEntity:
+				return patrolJobListEntityEntityFromJson(data as PatrolJobListEntityEntity, json) as T;
+			case PatrolJobListEntityList:
+				return patrolJobListEntityListFromJson(data as PatrolJobListEntityList, json) as T;
+			case PatrolJobListEntityQuery:
+				return patrolJobListEntityQueryFromJson(data as PatrolJobListEntityQuery, json) as T;
+			case RepairQueryDeviceResponseEntity:
+				return repairQueryDeviceResponseEntityFromJson(data as RepairQueryDeviceResponseEntity, json) as T;
+			case RepairQueryDeviceResponseData:
+				return repairQueryDeviceResponseDataFromJson(data as RepairQueryDeviceResponseData, json) as T;
+			case RepairQueryDeviceResponseDataList:
+				return repairQueryDeviceResponseDataListFromJson(data as RepairQueryDeviceResponseDataList, json) as T;
+			case RepairQueryDeviceResponseDataQuery:
+				return repairQueryDeviceResponseDataQueryFromJson(data as RepairQueryDeviceResponseDataQuery, json) as T;
 			case UserResponseEntity:
 				return userResponseEntityFromJson(data as UserResponseEntity, json) as T;
 			case UserResponseData:
@@ -52,6 +106,14 @@ class JsonConvert<T> {
 				return equipmentListDataEquipmentVOSFromJson(data as EquipmentListDataEquipmentVOS, json) as T;
 			case EquipmentListDataCountDTO:
 				return equipmentListDataCountDTOFromJson(data as EquipmentListDataCountDTO, json) as T;
+			case MaintJobListResponseEntity:
+				return maintJobListResponseEntityFromJson(data as MaintJobListResponseEntity, json) as T;
+			case MaintJobListResponseData:
+				return maintJobListResponseDataFromJson(data as MaintJobListResponseData, json) as T;
+			case MaintJobListResponseDataList:
+				return maintJobListResponseDataListFromJson(data as MaintJobListResponseDataList, json) as T;
+			case MaintJobListResponseDataQuery:
+				return maintJobListResponseDataQueryFromJson(data as MaintJobListResponseDataQuery, json) as T;
 			case PersonalDataCountEntity:
 				return personalDataCountEntityFromJson(data as PersonalDataCountEntity, json) as T;
 			case PersonalDataCountData:
@@ -73,6 +135,46 @@ class JsonConvert<T> {
 
   static _getToJson<T>(Type type, data) {
 		switch (type) {
+			case RepairBillListResponseEntity:
+				return repairBillListResponseEntityToJson(data as RepairBillListResponseEntity);
+			case RepairBillListResponseData:
+				return repairBillListResponseDataToJson(data as RepairBillListResponseData);
+			case RepairBillListResponseDataList:
+				return repairBillListResponseDataListToJson(data as RepairBillListResponseDataList);
+			case RepairBillListResponseDataListDevice:
+				return repairBillListResponseDataListDeviceToJson(data as RepairBillListResponseDataListDevice);
+			case RepairBillListResponseDataListLogs:
+				return repairBillListResponseDataListLogsToJson(data as RepairBillListResponseDataListLogs);
+			case RepairBillListResponseDataQuery:
+				return repairBillListResponseDataQueryToJson(data as RepairBillListResponseDataQuery);
+			case PatrolJobSelectEntityEntity:
+				return patrolJobSelectEntityEntityToJson(data as PatrolJobSelectEntityEntity);
+			case PatrolJobSelectEntityData:
+				return patrolJobSelectEntityDataToJson(data as PatrolJobSelectEntityData);
+			case PatrolJobSelectEntityDataPatrolItemModelVOS:
+				return patrolJobSelectEntityDataPatrolItemModelVOSToJson(data as PatrolJobSelectEntityDataPatrolItemModelVOS);
+			case PatrolJobSelectEntityDataQuery:
+				return patrolJobSelectEntityDataQueryToJson(data as PatrolJobSelectEntityDataQuery);
+			case UploadListEntityEntity:
+				return uploadListEntityEntityToJson(data as UploadListEntityEntity);
+			case PatrolJobEditEmtityEntity:
+				return patrolJobEditEmtityEntityToJson(data as PatrolJobEditEmtityEntity);
+			case PatrolJobEditEmtityData:
+				return patrolJobEditEmtityDataToJson(data as PatrolJobEditEmtityData);
+			case PatrolJobListEntityEntity:
+				return patrolJobListEntityEntityToJson(data as PatrolJobListEntityEntity);
+			case PatrolJobListEntityList:
+				return patrolJobListEntityListToJson(data as PatrolJobListEntityList);
+			case PatrolJobListEntityQuery:
+				return patrolJobListEntityQueryToJson(data as PatrolJobListEntityQuery);
+			case RepairQueryDeviceResponseEntity:
+				return repairQueryDeviceResponseEntityToJson(data as RepairQueryDeviceResponseEntity);
+			case RepairQueryDeviceResponseData:
+				return repairQueryDeviceResponseDataToJson(data as RepairQueryDeviceResponseData);
+			case RepairQueryDeviceResponseDataList:
+				return repairQueryDeviceResponseDataListToJson(data as RepairQueryDeviceResponseDataList);
+			case RepairQueryDeviceResponseDataQuery:
+				return repairQueryDeviceResponseDataQueryToJson(data as RepairQueryDeviceResponseDataQuery);
 			case UserResponseEntity:
 				return userResponseEntityToJson(data as UserResponseEntity);
 			case UserResponseData:
@@ -95,6 +197,14 @@ class JsonConvert<T> {
 				return equipmentListDataEquipmentVOSToJson(data as EquipmentListDataEquipmentVOS);
 			case EquipmentListDataCountDTO:
 				return equipmentListDataCountDTOToJson(data as EquipmentListDataCountDTO);
+			case MaintJobListResponseEntity:
+				return maintJobListResponseEntityToJson(data as MaintJobListResponseEntity);
+			case MaintJobListResponseData:
+				return maintJobListResponseDataToJson(data as MaintJobListResponseData);
+			case MaintJobListResponseDataList:
+				return maintJobListResponseDataListToJson(data as MaintJobListResponseDataList);
+			case MaintJobListResponseDataQuery:
+				return maintJobListResponseDataQueryToJson(data as MaintJobListResponseDataQuery);
 			case PersonalDataCountEntity:
 				return personalDataCountEntityToJson(data as PersonalDataCountEntity);
 			case PersonalDataCountData:
@@ -129,6 +239,66 @@ class JsonConvert<T> {
 		if(type == (PatrolJobItemResponseData).toString()){
 			return PatrolJobItemResponseData().fromJson(json);
 		}
+		if(type == (RepairBillListResponseEntity).toString()){
+			return RepairBillListResponseEntity().fromJson(json);
+		}
+		if(type == (RepairBillListResponseData).toString()){
+			return RepairBillListResponseData().fromJson(json);
+		}
+		if(type == (RepairBillListResponseDataList).toString()){
+			return RepairBillListResponseDataList().fromJson(json);
+		}
+		if(type == (RepairBillListResponseDataListDevice).toString()){
+			return RepairBillListResponseDataListDevice().fromJson(json);
+		}
+		if(type == (RepairBillListResponseDataListLogs).toString()){
+			return RepairBillListResponseDataListLogs().fromJson(json);
+		}
+		if(type == (RepairBillListResponseDataQuery).toString()){
+			return RepairBillListResponseDataQuery().fromJson(json);
+		}
+		if(type == (PatrolJobSelectEntityEntity).toString()){
+			return PatrolJobSelectEntityEntity().fromJson(json);
+		}
+		if(type == (PatrolJobSelectEntityData).toString()){
+			return PatrolJobSelectEntityData().fromJson(json);
+		}
+		if(type == (PatrolJobSelectEntityDataPatrolItemModelVOS).toString()){
+			return PatrolJobSelectEntityDataPatrolItemModelVOS().fromJson(json);
+		}
+		if(type == (PatrolJobSelectEntityDataQuery).toString()){
+			return PatrolJobSelectEntityDataQuery().fromJson(json);
+		}
+		if(type == (UploadListEntityEntity).toString()){
+			return UploadListEntityEntity().fromJson(json);
+		}
+		if(type == (PatrolJobEditEmtityEntity).toString()){
+			return PatrolJobEditEmtityEntity().fromJson(json);
+		}
+		if(type == (PatrolJobEditEmtityData).toString()){
+			return PatrolJobEditEmtityData().fromJson(json);
+		}
+		if(type == (PatrolJobListEntityEntity).toString()){
+			return PatrolJobListEntityEntity().fromJson(json);
+		}
+		if(type == (PatrolJobListEntityList).toString()){
+			return PatrolJobListEntityList().fromJson(json);
+		}
+		if(type == (PatrolJobListEntityQuery).toString()){
+			return PatrolJobListEntityQuery().fromJson(json);
+		}
+		if(type == (RepairQueryDeviceResponseEntity).toString()){
+			return RepairQueryDeviceResponseEntity().fromJson(json);
+		}
+		if(type == (RepairQueryDeviceResponseData).toString()){
+			return RepairQueryDeviceResponseData().fromJson(json);
+		}
+		if(type == (RepairQueryDeviceResponseDataList).toString()){
+			return RepairQueryDeviceResponseDataList().fromJson(json);
+		}
+		if(type == (RepairQueryDeviceResponseDataQuery).toString()){
+			return RepairQueryDeviceResponseDataQuery().fromJson(json);
+		}
 		if(type == (UserResponseEntity).toString()){
 			return UserResponseEntity().fromJson(json);
 		}
@@ -162,6 +332,18 @@ class JsonConvert<T> {
 		if(type == (EquipmentListDataCountDTO).toString()){
 			return EquipmentListDataCountDTO().fromJson(json);
 		}
+		if(type == (MaintJobListResponseEntity).toString()){
+			return MaintJobListResponseEntity().fromJson(json);
+		}
+		if(type == (MaintJobListResponseData).toString()){
+			return MaintJobListResponseData().fromJson(json);
+		}
+		if(type == (MaintJobListResponseDataList).toString()){
+			return MaintJobListResponseDataList().fromJson(json);
+		}
+		if(type == (MaintJobListResponseDataQuery).toString()){
+			return MaintJobListResponseDataQuery().fromJson(json);
+		}
 		if(type == (PersonalDataCountEntity).toString()){
 			return PersonalDataCountEntity().fromJson(json);
 		}
@@ -195,6 +377,66 @@ class JsonConvert<T> {
 		if(<PatrolJobDataVO>[] is M){
 			return data.map<PatrolJobDataVO>((e) => PatrolJobDataVO().fromJson(e)).toList() as M;
 		}
+		if(<RepairBillListResponseEntity>[] is M){
+			return data.map<RepairBillListResponseEntity>((e) => RepairBillListResponseEntity().fromJson(e)).toList() as M;
+		}
+		if(<RepairBillListResponseData>[] is M){
+			return data.map<RepairBillListResponseData>((e) => RepairBillListResponseData().fromJson(e)).toList() as M;
+		}
+		if(<RepairBillListResponseDataList>[] is M){
+			return data.map<RepairBillListResponseDataList>((e) => RepairBillListResponseDataList().fromJson(e)).toList() as M;
+		}
+		if(<RepairBillListResponseDataListDevice>[] is M){
+			return data.map<RepairBillListResponseDataListDevice>((e) => RepairBillListResponseDataListDevice().fromJson(e)).toList() as M;
+		}
+		if(<RepairBillListResponseDataListLogs>[] is M){
+			return data.map<RepairBillListResponseDataListLogs>((e) => RepairBillListResponseDataListLogs().fromJson(e)).toList() as M;
+		}
+		if(<RepairBillListResponseDataQuery>[] is M){
+			return data.map<RepairBillListResponseDataQuery>((e) => RepairBillListResponseDataQuery().fromJson(e)).toList() as M;
+		}
+		if(<PatrolJobSelectEntityEntity>[] is M){
+			return data.map<PatrolJobSelectEntityEntity>((e) => PatrolJobSelectEntityEntity().fromJson(e)).toList() as M;
+		}
+		if(<PatrolJobSelectEntityData>[] is M){
+			return data.map<PatrolJobSelectEntityData>((e) => PatrolJobSelectEntityData().fromJson(e)).toList() as M;
+		}
+		if(<PatrolJobSelectEntityDataPatrolItemModelVOS>[] is M){
+			return data.map<PatrolJobSelectEntityDataPatrolItemModelVOS>((e) => PatrolJobSelectEntityDataPatrolItemModelVOS().fromJson(e)).toList() as M;
+		}
+		if(<PatrolJobSelectEntityDataQuery>[] is M){
+			return data.map<PatrolJobSelectEntityDataQuery>((e) => PatrolJobSelectEntityDataQuery().fromJson(e)).toList() as M;
+		}
+		if(<UploadListEntityEntity>[] is M){
+			return data.map<UploadListEntityEntity>((e) => UploadListEntityEntity().fromJson(e)).toList() as M;
+		}
+		if(<PatrolJobEditEmtityEntity>[] is M){
+			return data.map<PatrolJobEditEmtityEntity>((e) => PatrolJobEditEmtityEntity().fromJson(e)).toList() as M;
+		}
+		if(<PatrolJobEditEmtityData>[] is M){
+			return data.map<PatrolJobEditEmtityData>((e) => PatrolJobEditEmtityData().fromJson(e)).toList() as M;
+		}
+		if(<PatrolJobListEntityEntity>[] is M){
+			return data.map<PatrolJobListEntityEntity>((e) => PatrolJobListEntityEntity().fromJson(e)).toList() as M;
+		}
+		if(<PatrolJobListEntityList>[] is M){
+			return data.map<PatrolJobListEntityList>((e) => PatrolJobListEntityList().fromJson(e)).toList() as M;
+		}
+		if(<PatrolJobListEntityQuery>[] is M){
+			return data.map<PatrolJobListEntityQuery>((e) => PatrolJobListEntityQuery().fromJson(e)).toList() as M;
+		}
+		if(<RepairQueryDeviceResponseEntity>[] is M){
+			return data.map<RepairQueryDeviceResponseEntity>((e) => RepairQueryDeviceResponseEntity().fromJson(e)).toList() as M;
+		}
+		if(<RepairQueryDeviceResponseData>[] is M){
+			return data.map<RepairQueryDeviceResponseData>((e) => RepairQueryDeviceResponseData().fromJson(e)).toList() as M;
+		}
+		if(<RepairQueryDeviceResponseDataList>[] is M){
+			return data.map<RepairQueryDeviceResponseDataList>((e) => RepairQueryDeviceResponseDataList().fromJson(e)).toList() as M;
+		}
+		if(<RepairQueryDeviceResponseDataQuery>[] is M){
+			return data.map<RepairQueryDeviceResponseDataQuery>((e) => RepairQueryDeviceResponseDataQuery().fromJson(e)).toList() as M;
+		}
 		if(<UserResponseEntity>[] is M){
 			return data.map<UserResponseEntity>((e) => UserResponseEntity().fromJson(e)).toList() as M;
 		}
@@ -228,6 +470,18 @@ class JsonConvert<T> {
 		if(<EquipmentListDataCountDTO>[] is M){
 			return data.map<EquipmentListDataCountDTO>((e) => EquipmentListDataCountDTO().fromJson(e)).toList() as M;
 		}
+		if(<MaintJobListResponseEntity>[] is M){
+			return data.map<MaintJobListResponseEntity>((e) => MaintJobListResponseEntity().fromJson(e)).toList() as M;
+		}
+		if(<MaintJobListResponseData>[] is M){
+			return data.map<MaintJobListResponseData>((e) => MaintJobListResponseData().fromJson(e)).toList() as M;
+		}
+		if(<MaintJobListResponseDataList>[] is M){
+			return data.map<MaintJobListResponseDataList>((e) => MaintJobListResponseDataList().fromJson(e)).toList() as M;
+		}
+		if(<MaintJobListResponseDataQuery>[] is M){
+			return data.map<MaintJobListResponseDataQuery>((e) => MaintJobListResponseDataQuery().fromJson(e)).toList() as M;
+		}
 		if(<PersonalDataCountEntity>[] is M){
 			return data.map<PersonalDataCountEntity>((e) => PersonalDataCountEntity().fromJson(e)).toList() as M;
 		}

+ 191 - 0
lib/generated/json/maint_job_list_response_entity_helper.dart

@@ -0,0 +1,191 @@
+import 'package:deus_app/model/maint_job_list_response_entity.dart';
+
+maintJobListResponseEntityFromJson(MaintJobListResponseEntity data, Map<String, dynamic> json) {
+	if (json['code'] != null) {
+		data.code = json['code'] is String
+				? int.tryParse(json['code'])
+				: json['code'].toInt();
+	}
+	if (json['data'] != null) {
+		data.data = MaintJobListResponseData().fromJson(json['data']);
+	}
+	if (json['msg'] != null) {
+		data.msg = json['msg'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> maintJobListResponseEntityToJson(MaintJobListResponseEntity entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['code'] = entity.code;
+	data['data'] = entity.data.toJson();
+	data['msg'] = entity.msg;
+	return data;
+}
+
+maintJobListResponseDataFromJson(MaintJobListResponseData data, Map<String, dynamic> json) {
+	if (json['index'] != null) {
+		data.index = json['index'] is String
+				? int.tryParse(json['index'])
+				: json['index'].toInt();
+	}
+	if (json['list'] != null) {
+		data.xList = (json['list'] as List).map((v) => MaintJobListResponseDataList().fromJson(v)).toList();
+	}
+	if (json['query'] != null) {
+		data.query = MaintJobListResponseDataQuery().fromJson(json['query']);
+	}
+	if (json['size'] != null) {
+		data.size = json['size'] is String
+				? int.tryParse(json['size'])
+				: json['size'].toInt();
+	}
+	if (json['sort'] != null) {
+		data.sort = json['sort'] is String
+				? int.tryParse(json['sort'])
+				: json['sort'].toInt();
+	}
+	if (json['sortBy'] != null) {
+		data.sortBy = json['sortBy'].toString();
+	}
+	if (json['total'] != null) {
+		data.total = json['total'] is String
+				? int.tryParse(json['total'])
+				: json['total'].toInt();
+	}
+	return data;
+}
+
+Map<String, dynamic> maintJobListResponseDataToJson(MaintJobListResponseData entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['index'] = entity.index;
+	data['list'] =  entity.xList.map((v) => v.toJson()).toList();
+	data['query'] = entity.query.toJson();
+	data['size'] = entity.size;
+	data['sort'] = entity.sort;
+	data['sortBy'] = entity.sortBy;
+	data['total'] = entity.total;
+	return data;
+}
+
+maintJobListResponseDataListFromJson(MaintJobListResponseDataList data, Map<String, dynamic> json) {
+	if (json['deviceId'] != null) {
+		data.deviceId = json['deviceId'] is String
+				? int.tryParse(json['deviceId'])
+				: json['deviceId'].toInt();
+	}
+	if (json['deviceKey'] != null) {
+		data.deviceKey = json['deviceKey'].toString();
+	}
+	if (json['finishTime'] != null) {
+		data.finishTime = json['finishTime'].toString();
+	}
+	if (json['id'] != null) {
+		data.id = json['id'] is String
+				? int.tryParse(json['id'])
+				: json['id'].toInt();
+	}
+	if (json['isMainted'] != null) {
+		data.isMainted = json['isMainted'] is String
+				? int.tryParse(json['isMainted'])
+				: json['isMainted'].toInt();
+	}
+	if (json['maintJobId'] != null) {
+		data.maintJobId = json['maintJobId'] is String
+				? int.tryParse(json['maintJobId'])
+				: json['maintJobId'].toInt();
+	}
+	if (json['maintPerson'] != null) {
+		data.maintPerson = json['maintPerson'].toString();
+	}
+	if (json['name'] != null) {
+		data.name = json['name'].toString();
+	}
+	if (json['productKey'] != null) {
+		data.productKey = json['productKey'].toString();
+	}
+	if (json['productName'] != null) {
+		data.productName = json['productName'].toString();
+	}
+	if (json['showName'] != null) {
+		data.showName = json['showName'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> maintJobListResponseDataListToJson(MaintJobListResponseDataList entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['deviceId'] = entity.deviceId;
+	data['deviceKey'] = entity.deviceKey;
+	data['finishTime'] = entity.finishTime;
+	data['id'] = entity.id;
+	data['isMainted'] = entity.isMainted;
+	data['maintJobId'] = entity.maintJobId;
+	data['maintPerson'] = entity.maintPerson;
+	data['name'] = entity.name;
+	data['productKey'] = entity.productKey;
+	data['productName'] = entity.productName;
+	data['showName'] = entity.showName;
+	return data;
+}
+
+maintJobListResponseDataQueryFromJson(MaintJobListResponseDataQuery data, Map<String, dynamic> json) {
+	if (json['deviceId'] != null) {
+		data.deviceId = json['deviceId'] is String
+				? int.tryParse(json['deviceId'])
+				: json['deviceId'].toInt();
+	}
+	if (json['deviceKey'] != null) {
+		data.deviceKey = json['deviceKey'].toString();
+	}
+	if (json['finishTime'] != null) {
+		data.finishTime = json['finishTime'].toString();
+	}
+	if (json['id'] != null) {
+		data.id = json['id'] is String
+				? int.tryParse(json['id'])
+				: json['id'].toInt();
+	}
+	if (json['isMainted'] != null) {
+		data.isMainted = json['isMainted'] is String
+				? int.tryParse(json['isMainted'])
+				: json['isMainted'].toInt();
+	}
+	if (json['maintJobId'] != null) {
+		data.maintJobId = json['maintJobId'] is String
+				? int.tryParse(json['maintJobId'])
+				: json['maintJobId'].toInt();
+	}
+	if (json['maintPerson'] != null) {
+		data.maintPerson = json['maintPerson'].toString();
+	}
+	if (json['name'] != null) {
+		data.name = json['name'].toString();
+	}
+	if (json['productKey'] != null) {
+		data.productKey = json['productKey'].toString();
+	}
+	if (json['productName'] != null) {
+		data.productName = json['productName'].toString();
+	}
+	if (json['showName'] != null) {
+		data.showName = json['showName'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> maintJobListResponseDataQueryToJson(MaintJobListResponseDataQuery entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['deviceId'] = entity.deviceId;
+	data['deviceKey'] = entity.deviceKey;
+	data['finishTime'] = entity.finishTime;
+	data['id'] = entity.id;
+	data['isMainted'] = entity.isMainted;
+	data['maintJobId'] = entity.maintJobId;
+	data['maintPerson'] = entity.maintPerson;
+	data['name'] = entity.name;
+	data['productKey'] = entity.productKey;
+	data['productName'] = entity.productName;
+	data['showName'] = entity.showName;
+	return data;
+}

+ 2 - 18
lib/generated/json/patrol_job_detail_response_entity_helper.dart

@@ -36,10 +36,10 @@ patrolJobDetailResponseDataFromJson(PatrolJobDetailResponseData data, Map<String
 		data.number = json['number'].toString();
 	}
 	if (json['planName'] != null) {
-		data.planName = json['planName'];
+		data.planName = json['planName'].toString();
 	}
 	if (json['planNumber'] != null) {
-		data.planNumber = json['planNumber'];
+		data.planNumber = json['planNumber'].toString();
 	}
 	if (json['termType'] != null) {
 		data.termType = json['termType'];
@@ -51,33 +51,21 @@ patrolJobDetailResponseDataFromJson(PatrolJobDetailResponseData data, Map<String
 	}
 	if (json['personnel'] != null) {
 		data.personnel = json['personnel'].toString();
-	}else{
-		data.personnel ='';
 	}
 	if (json['remarks'] != null) {
 		data.remarks = json['remarks'].toString();
-	}else{
-		data.remarks ='';
 	}
 	if (json['finishTime'] != null) {
 		data.finishTime = json['finishTime'].toString();
-	}else{
-		data.finishTime ='';
 	}
 	if (json['fileUrls'] != null) {
 		data.fileUrls = (json['fileUrls'] as List).map((v) => v.toString()).toList().cast<String>();
-	}else{
-		data.fileUrls =<String>[];
 	}
 	if (json['startDate'] != null) {
 		data.startDate = json['startDate'].toString();
-	}else{
-		data.startDate ='';
 	}
 	if (json['endDate'] != null) {
 		data.endDate = json['endDate'].toString();
-	}else{
-		data.endDate ='';
 	}
 	if (json['status'] != null) {
 		data.status = json['status'] is String
@@ -207,8 +195,6 @@ patrolJobDetailResponseDataEquipmentVOSFromJson(PatrolJobDetailResponseDataEquip
 	}
 	if (json['showName'] != null) {
 		data.showName = json['showName'].toString();
-	}else{
-		data.showName = json['name'].toString();
 	}
 	if (json['deviceKey'] != null) {
 		data.deviceKey = json['deviceKey'].toString();
@@ -218,8 +204,6 @@ patrolJobDetailResponseDataEquipmentVOSFromJson(PatrolJobDetailResponseDataEquip
 	}
 	if (json['itemCompleteTime'] != null) {
 		data.itemCompleteTime = json['itemCompleteTime'].toString();
-	}else{
-		data.itemCompleteTime = "暂无";
 	}
 	if (json['itemPerson'] != null) {
 		data.itemPerson = json['itemPerson'].toString();

+ 63 - 0
lib/generated/json/patrol_job_edit_emtity_entity_helper.dart

@@ -0,0 +1,63 @@
+import 'package:deus_app/model/patrol_job_edit_emtity_entity.dart';
+
+patrolJobEditEmtityEntityFromJson(PatrolJobEditEmtityEntity data, Map<String, dynamic> json) {
+	if (json['code'] != null) {
+		data.code = json['code'] is String
+				? int.tryParse(json['code'])
+				: json['code'].toInt();
+	}
+	if (json['data'] != null) {
+		data.data = (json['data'] as List).map((v) => PatrolJobEditEmtityData().fromJson(v)).toList();
+	}
+	if (json['msg'] != null) {
+		data.msg = json['msg'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> patrolJobEditEmtityEntityToJson(PatrolJobEditEmtityEntity entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['code'] = entity.code;
+	data['data'] =  entity.data.map((v) => v.toJson()).toList();
+	data['msg'] = entity.msg;
+	return data;
+}
+
+patrolJobEditEmtityDataFromJson(PatrolJobEditEmtityData data, Map<String, dynamic> json) {
+	if (json['id'] != null) {
+		data.id = json['id'].toString();
+	}
+	if (json['number'] != null) {
+		data.number = json['number'].toString();
+	}
+	if (json['name'] != null) {
+		data.name = json['name'].toString();
+	}
+	if (json['requirement'] != null) {
+		data.requirement = json['requirement'].toString();
+	}
+	if (json['result'] != null) {
+		data.result = json['result'].toString();
+	}
+	if (json['patrolJobId'] != null) {
+		data.patrolJobId = json['patrolJobId'] is String
+				? int.tryParse(json['patrolJobId'])
+				: json['patrolJobId'].toInt();
+	}
+	if (json['results'] != null) {
+		data.results = json['results'];
+	}
+	return data;
+}
+
+Map<String, dynamic> patrolJobEditEmtityDataToJson(PatrolJobEditEmtityData entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['id'] = entity.id;
+	data['number'] = entity.number;
+	data['name'] = entity.name;
+	data['requirement'] = entity.requirement;
+	data['result'] = entity.result;
+	data['patrolJobId'] = entity.patrolJobId;
+	data['results'] = entity.results;
+	return data;
+}

+ 168 - 0
lib/generated/json/patrol_job_list_entity_entity_helper.dart

@@ -0,0 +1,168 @@
+import 'package:deus_app/model/patrol_job_list_entity_entity.dart';
+
+patrolJobListEntityEntityFromJson(PatrolJobListEntityEntity data, Map<String, dynamic> json) {
+	if (json['index'] != null) {
+		data.index = json['index'] is String
+				? int.tryParse(json['index'])
+				: json['index'].toInt();
+	}
+	if (json['list'] != null) {
+		data.xList = (json['list'] as List).map((v) => PatrolJobListEntityList().fromJson(v)).toList();
+	}
+	if (json['query'] != null) {
+		data.query = PatrolJobListEntityQuery().fromJson(json['query']);
+	}
+	if (json['size'] != null) {
+		data.size = json['size'] is String
+				? int.tryParse(json['size'])
+				: json['size'].toInt();
+	}
+	if (json['sort'] != null) {
+		data.sort = json['sort'] is String
+				? int.tryParse(json['sort'])
+				: json['sort'].toInt();
+	}
+	if (json['sortBy'] != null) {
+		data.sortBy = json['sortBy'].toString();
+	}
+	if (json['total'] != null) {
+		data.total = json['total'] is String
+				? int.tryParse(json['total'])
+				: json['total'].toInt();
+	}
+	return data;
+}
+
+Map<String, dynamic> patrolJobListEntityEntityToJson(PatrolJobListEntityEntity entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['index'] = entity.index;
+	data['list'] =  entity.xList.map((v) => v.toJson()).toList();
+	data['query'] = entity.query.toJson();
+	data['size'] = entity.size;
+	data['sort'] = entity.sort;
+	data['sortBy'] = entity.sortBy;
+	data['total'] = entity.total;
+	return data;
+}
+
+patrolJobListEntityListFromJson(PatrolJobListEntityList data, Map<String, dynamic> json) {
+	if (json['deviceId'] != null) {
+		data.deviceId = json['deviceId'] is String
+				? int.tryParse(json['deviceId'])
+				: json['deviceId'].toInt();
+	}
+	if (json['deviceKey'] != null) {
+		data.deviceKey = json['deviceKey'].toString();
+	}
+	if (json['finishTime'] != null) {
+		data.finishTime = json['finishTime'].toString();
+	}
+	if (json['id'] != null) {
+		data.id = json['id'] is String
+				? int.tryParse(json['id'])
+				: json['id'].toInt();
+	}
+	if (json['isMainted'] != null) {
+		data.isMainted = json['isMainted'] is String
+				? int.tryParse(json['isMainted'])
+				: json['isMainted'].toInt();
+	}
+	if (json['maintJobId'] != null) {
+		data.maintJobId = json['maintJobId'] is String
+				? int.tryParse(json['maintJobId'])
+				: json['maintJobId'].toInt();
+	}
+	if (json['maintPerson'] != null) {
+		data.maintPerson = json['maintPerson'].toString();
+	}
+	if (json['name'] != null) {
+		data.name = json['name'].toString();
+	}
+	if (json['productKey'] != null) {
+		data.productKey = json['productKey'].toString();
+	}
+	if (json['productName'] != null) {
+		data.productName = json['productName'].toString();
+	}
+	if (json['showName'] != null) {
+		data.showName = json['showName'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> patrolJobListEntityListToJson(PatrolJobListEntityList entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['deviceId'] = entity.deviceId;
+	data['deviceKey'] = entity.deviceKey;
+	data['finishTime'] = entity.finishTime;
+	data['id'] = entity.id;
+	data['isMainted'] = entity.isMainted;
+	data['maintJobId'] = entity.maintJobId;
+	data['maintPerson'] = entity.maintPerson;
+	data['name'] = entity.name;
+	data['productKey'] = entity.productKey;
+	data['productName'] = entity.productName;
+	data['showName'] = entity.showName;
+	return data;
+}
+
+patrolJobListEntityQueryFromJson(PatrolJobListEntityQuery data, Map<String, dynamic> json) {
+	if (json['deviceId'] != null) {
+		data.deviceId = json['deviceId'] is String
+				? int.tryParse(json['deviceId'])
+				: json['deviceId'].toInt();
+	}
+	if (json['deviceKey'] != null) {
+		data.deviceKey = json['deviceKey'].toString();
+	}
+	if (json['finishTime'] != null) {
+		data.finishTime = json['finishTime'].toString();
+	}
+	if (json['id'] != null) {
+		data.id = json['id'] is String
+				? int.tryParse(json['id'])
+				: json['id'].toInt();
+	}
+	if (json['isMainted'] != null) {
+		data.isMainted = json['isMainted'] is String
+				? int.tryParse(json['isMainted'])
+				: json['isMainted'].toInt();
+	}
+	if (json['maintJobId'] != null) {
+		data.maintJobId = json['maintJobId'] is String
+				? int.tryParse(json['maintJobId'])
+				: json['maintJobId'].toInt();
+	}
+	if (json['maintPerson'] != null) {
+		data.maintPerson = json['maintPerson'].toString();
+	}
+	if (json['name'] != null) {
+		data.name = json['name'].toString();
+	}
+	if (json['productKey'] != null) {
+		data.productKey = json['productKey'].toString();
+	}
+	if (json['productName'] != null) {
+		data.productName = json['productName'].toString();
+	}
+	if (json['showName'] != null) {
+		data.showName = json['showName'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> patrolJobListEntityQueryToJson(PatrolJobListEntityQuery entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['deviceId'] = entity.deviceId;
+	data['deviceKey'] = entity.deviceKey;
+	data['finishTime'] = entity.finishTime;
+	data['id'] = entity.id;
+	data['isMainted'] = entity.isMainted;
+	data['maintJobId'] = entity.maintJobId;
+	data['maintPerson'] = entity.maintPerson;
+	data['name'] = entity.name;
+	data['productKey'] = entity.productKey;
+	data['productName'] = entity.productName;
+	data['showName'] = entity.showName;
+	return data;
+}

+ 179 - 0
lib/generated/json/patrol_job_select_entity_entity_helper.dart

@@ -0,0 +1,179 @@
+import 'package:deus_app/model/patrol_job_select_entity_entity.dart';
+
+patrolJobSelectEntityEntityFromJson(PatrolJobSelectEntityEntity data, Map<String, dynamic> json) {
+	if (json['code'] != null) {
+		data.code = json['code'] is String
+				? int.tryParse(json['code'])
+				: json['code'].toInt();
+	}
+	if (json['data'] != null) {
+		data.data = PatrolJobSelectEntityData().fromJson(json['data']);
+	}
+	if (json['msg'] != null) {
+		data.msg = json['msg'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> patrolJobSelectEntityEntityToJson(PatrolJobSelectEntityEntity entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['code'] = entity.code;
+	data['data'] = entity.data.toJson();
+	data['msg'] = entity.msg;
+	return data;
+}
+
+patrolJobSelectEntityDataFromJson(PatrolJobSelectEntityData data, Map<String, dynamic> json) {
+	if (json['index'] != null) {
+		data.index = json['index'] is String
+				? int.tryParse(json['index'])
+				: json['index'].toInt();
+	}
+	if (json['patrolItemModelVOS'] != null) {
+		data.patrolItemModelVOS = (json['patrolItemModelVOS'] as List).map((v) => PatrolJobSelectEntityDataPatrolItemModelVOS().fromJson(v)).toList();
+	}
+	if (json['query'] != null) {
+		data.query = PatrolJobSelectEntityDataQuery().fromJson(json['query']);
+	}
+	if (json['size'] != null) {
+		data.size = json['size'] is String
+				? int.tryParse(json['size'])
+				: json['size'].toInt();
+	}
+	if (json['sort'] != null) {
+		data.sort = json['sort'] is String
+				? int.tryParse(json['sort'])
+				: json['sort'].toInt();
+	}
+	if (json['sortBy'] != null) {
+		data.sortBy = json['sortBy'].toString();
+	}
+	if (json['total'] != null) {
+		data.total = json['total'] is String
+				? int.tryParse(json['total'])
+				: json['total'].toInt();
+	}
+	return data;
+}
+
+Map<String, dynamic> patrolJobSelectEntityDataToJson(PatrolJobSelectEntityData entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['index'] = entity.index;
+	data['patrolItemModelVOS'] =  entity.patrolItemModelVOS.map((v) => v.toJson()).toList();
+	data['query'] = entity.query.toJson();
+	data['size'] = entity.size;
+	data['sort'] = entity.sort;
+	data['sortBy'] = entity.sortBy;
+	data['total'] = entity.total;
+	return data;
+}
+
+patrolJobSelectEntityDataPatrolItemModelVOSFromJson(PatrolJobSelectEntityDataPatrolItemModelVOS data, Map<String, dynamic> json) {
+	if (json['createTime'] != null) {
+		data.createTime = json['createTime'].toString();
+	}
+	if (json['enable'] != null) {
+		data.enable = json['enable'] is String
+				? int.tryParse(json['enable'])
+				: json['enable'].toInt();
+	}
+	if (json['id'] != null) {
+		data.id = json['id'] is String
+				? int.tryParse(json['id'])
+				: json['id'].toInt();
+	}
+	if (json['name'] != null) {
+		data.name = json['name'].toString();
+	}
+	if (json['number'] != null) {
+		data.number = json['number'].toString();
+	}
+	if (json['param'] != null) {
+		data.param = (json['param'] as List).map((v) => v.toString()).toList().cast<String>();
+	}
+	if (json['params'] != null) {
+		data.params = json['params'].toString();
+	}
+	if (json['requirement'] != null) {
+		data.requirement = json['requirement'].toString();
+	}
+	if (json['results'] != null) {
+		data.results = (json['results'] as List).map((v) => v.toString()).toList().cast<String>();
+	}
+	if (json['type'] != null) {
+		data.type = json['type'] is String
+				? int.tryParse(json['type'])
+				: json['type'].toInt();
+	}
+	return data;
+}
+
+Map<String, dynamic> patrolJobSelectEntityDataPatrolItemModelVOSToJson(PatrolJobSelectEntityDataPatrolItemModelVOS entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['createTime'] = entity.createTime;
+	data['enable'] = entity.enable;
+	data['id'] = entity.id;
+	data['name'] = entity.name;
+	data['number'] = entity.number;
+	data['param'] = entity.param;
+	data['params'] = entity.params;
+	data['requirement'] = entity.requirement;
+	data['results'] = entity.results;
+	data['type'] = entity.type;
+	return data;
+}
+
+patrolJobSelectEntityDataQueryFromJson(PatrolJobSelectEntityDataQuery data, Map<String, dynamic> json) {
+	if (json['createTime'] != null) {
+		data.createTime = json['createTime'].toString();
+	}
+	if (json['enable'] != null) {
+		data.enable = json['enable'] is String
+				? int.tryParse(json['enable'])
+				: json['enable'].toInt();
+	}
+	if (json['id'] != null) {
+		data.id = json['id'] is String
+				? int.tryParse(json['id'])
+				: json['id'].toInt();
+	}
+	if (json['name'] != null) {
+		data.name = json['name'].toString();
+	}
+	if (json['number'] != null) {
+		data.number = json['number'].toString();
+	}
+	if (json['param'] != null) {
+		data.param = (json['param'] as List).map((v) => v.toString()).toList().cast<String>();
+	}
+	if (json['params'] != null) {
+		data.params = json['params'].toString();
+	}
+	if (json['requirement'] != null) {
+		data.requirement = json['requirement'].toString();
+	}
+	if (json['results'] != null) {
+		data.results = (json['results'] as List).map((v) => v.toString()).toList().cast<String>();
+	}
+	if (json['type'] != null) {
+		data.type = json['type'] is String
+				? int.tryParse(json['type'])
+				: json['type'].toInt();
+	}
+	return data;
+}
+
+Map<String, dynamic> patrolJobSelectEntityDataQueryToJson(PatrolJobSelectEntityDataQuery entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['createTime'] = entity.createTime;
+	data['enable'] = entity.enable;
+	data['id'] = entity.id;
+	data['name'] = entity.name;
+	data['number'] = entity.number;
+	data['param'] = entity.param;
+	data['params'] = entity.params;
+	data['requirement'] = entity.requirement;
+	data['results'] = entity.results;
+	data['type'] = entity.type;
+	return data;
+}

+ 363 - 0
lib/generated/json/repair_bill_list_response_entity_helper.dart

@@ -0,0 +1,363 @@
+import 'package:deus_app/model/repair_bill_list_response_entity.dart';
+
+repairBillListResponseEntityFromJson(RepairBillListResponseEntity data, Map<String, dynamic> json) {
+	if (json['code'] != null) {
+		data.code = json['code'] is String
+				? int.tryParse(json['code'])
+				: json['code'].toInt();
+	}
+	if (json['data'] != null) {
+		data.data = RepairBillListResponseData().fromJson(json['data']);
+	}
+	if (json['msg'] != null) {
+		data.msg = json['msg'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> repairBillListResponseEntityToJson(RepairBillListResponseEntity entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['code'] = entity.code;
+	data['data'] = entity.data.toJson();
+	data['msg'] = entity.msg;
+	return data;
+}
+
+repairBillListResponseDataFromJson(RepairBillListResponseData data, Map<String, dynamic> json) {
+	if (json['index'] != null) {
+		data.index = json['index'] is String
+				? int.tryParse(json['index'])
+				: json['index'].toInt();
+	}
+	if (json['list'] != null) {
+		data.xList = (json['list'] as List).map((v) => RepairBillListResponseDataList().fromJson(v)).toList();
+	}
+	if (json['query'] != null) {
+		data.query = RepairBillListResponseDataQuery().fromJson(json['query']);
+	}
+	if (json['size'] != null) {
+		data.size = json['size'] is String
+				? int.tryParse(json['size'])
+				: json['size'].toInt();
+	}
+	if (json['sort'] != null) {
+		data.sort = json['sort'] is String
+				? int.tryParse(json['sort'])
+				: json['sort'].toInt();
+	}
+	if (json['sortBy'] != null) {
+		data.sortBy = json['sortBy'].toString();
+	}
+	if (json['total'] != null) {
+		data.total = json['total'] is String
+				? int.tryParse(json['total'])
+				: json['total'].toInt();
+	}
+	return data;
+}
+
+Map<String, dynamic> repairBillListResponseDataToJson(RepairBillListResponseData entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['index'] = entity.index;
+	data['list'] =  entity.xList.map((v) => v.toJson()).toList();
+	data['query'] = entity.query.toJson();
+	data['size'] = entity.size;
+	data['sort'] = entity.sort;
+	data['sortBy'] = entity.sortBy;
+	data['total'] = entity.total;
+	return data;
+}
+
+repairBillListResponseDataListFromJson(RepairBillListResponseDataList data, Map<String, dynamic> json) {
+	if (json['applicant'] != null) {
+		data.applicant = json['applicant'].toString();
+	}
+	if (json['applicationTime'] != null) {
+		data.applicationTime = json['applicationTime'].toString();
+	}
+	if (json['channelName'] != null) {
+		data.channelName = json['channelName'].toString();
+	}
+	if (json['completeTime'] != null) {
+		data.completeTime = json['completeTime'].toString();
+	}
+	if (json['customerName'] != null) {
+		data.customerName = json['customerName'].toString();
+	}
+	if (json['device'] != null) {
+		data.device = RepairBillListResponseDataListDevice().fromJson(json['device']);
+	}
+	if (json['deviceId'] != null) {
+		data.deviceId = json['deviceId'] is String
+				? int.tryParse(json['deviceId'])
+				: json['deviceId'].toInt();
+	}
+	if (json['deviceKey'] != null) {
+		data.deviceKey = json['deviceKey'].toString();
+	}
+	if (json['deviceName'] != null) {
+		data.deviceName = json['deviceName'].toString();
+	}
+	if (json['id'] != null) {
+		data.id = json['id'] is String
+				? int.tryParse(json['id'])
+				: json['id'].toInt();
+	}
+	if (json['instructions'] != null) {
+		data.instructions = json['instructions'].toString();
+	}
+	if (json['logs'] != null) {
+		data.logs = (json['logs'] as List).map((v) => RepairBillListResponseDataListLogs().fromJson(v)).toList();
+	}
+	if (json['maintainer'] != null) {
+		data.maintainer = json['maintainer'].toString();
+	}
+	if (json['orderRecTime'] != null) {
+		data.orderRecTime = json['orderRecTime'].toString();
+	}
+	if (json['receiver'] != null) {
+		data.receiver = json['receiver'].toString();
+	}
+	if (json['repNum'] != null) {
+		data.repNum = json['repNum'].toString();
+	}
+	if (json['repairImgUrl'] != null) {
+		data.repairImgUrl = json['repairImgUrl'].toString();
+	}
+	if (json['repairResUrl'] != null) {
+		data.repairResUrl = json['repairResUrl'].toString();
+	}
+	if (json['status'] != null) {
+		data.status = json['status'] is String
+				? int.tryParse(json['status'])
+				: json['status'].toInt();
+	}
+	if (json['submitter'] != null) {
+		data.submitter = json['submitter'].toString();
+	}
+	if (json['theme'] != null) {
+		data.theme = json['theme'].toString();
+	}
+	if (json['treatment'] != null) {
+		data.treatment = json['treatment'] is String
+				? int.tryParse(json['treatment'])
+				: json['treatment'].toInt();
+	}
+	if (json['urg'] != null) {
+		data.urg = json['urg'] is String
+				? int.tryParse(json['urg'])
+				: json['urg'].toInt();
+	}
+	return data;
+}
+
+Map<String, dynamic> repairBillListResponseDataListToJson(RepairBillListResponseDataList entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['applicant'] = entity.applicant;
+	data['applicationTime'] = entity.applicationTime;
+	data['channelName'] = entity.channelName;
+	data['completeTime'] = entity.completeTime;
+	data['customerName'] = entity.customerName;
+	data['device'] = entity.device.toJson();
+	data['deviceId'] = entity.deviceId;
+	data['deviceKey'] = entity.deviceKey;
+	data['deviceName'] = entity.deviceName;
+	data['id'] = entity.id;
+	data['instructions'] = entity.instructions;
+	data['logs'] =  entity.logs.map((v) => v.toJson()).toList();
+	data['maintainer'] = entity.maintainer;
+	data['orderRecTime'] = entity.orderRecTime;
+	data['receiver'] = entity.receiver;
+	data['repNum'] = entity.repNum;
+	data['repairImgUrl'] = entity.repairImgUrl;
+	data['repairResUrl'] = entity.repairResUrl;
+	data['status'] = entity.status;
+	data['submitter'] = entity.submitter;
+	data['theme'] = entity.theme;
+	data['treatment'] = entity.treatment;
+	data['urg'] = entity.urg;
+	return data;
+}
+
+repairBillListResponseDataListDeviceFromJson(RepairBillListResponseDataListDevice data, Map<String, dynamic> json) {
+	if (json['completeTime'] != null) {
+		data.completeTime = json['completeTime'].toString();
+	}
+	if (json['deviceKey'] != null) {
+		data.deviceKey = json['deviceKey'].toString();
+	}
+	if (json['deviceName'] != null) {
+		data.deviceName = json['deviceName'].toString();
+	}
+	if (json['id'] != null) {
+		data.id = json['id'] is String
+				? int.tryParse(json['id'])
+				: json['id'].toInt();
+	}
+	if (json['isRepaired'] != null) {
+		data.isRepaired = json['isRepaired'] is String
+				? int.tryParse(json['isRepaired'])
+				: json['isRepaired'].toInt();
+	}
+	if (json['prodName'] != null) {
+		data.prodName = json['prodName'].toString();
+	}
+	if (json['repairBillId'] != null) {
+		data.repairBillId = json['repairBillId'].toString();
+	}
+	if (json['showName'] != null) {
+		data.showName = json['showName'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> repairBillListResponseDataListDeviceToJson(RepairBillListResponseDataListDevice entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['completeTime'] = entity.completeTime;
+	data['deviceKey'] = entity.deviceKey;
+	data['deviceName'] = entity.deviceName;
+	data['id'] = entity.id;
+	data['isRepaired'] = entity.isRepaired;
+	data['prodName'] = entity.prodName;
+	data['repairBillId'] = entity.repairBillId;
+	data['showName'] = entity.showName;
+	return data;
+}
+
+repairBillListResponseDataListLogsFromJson(RepairBillListResponseDataListLogs data, Map<String, dynamic> json) {
+	if (json['createTime'] != null) {
+		data.createTime = json['createTime'].toString();
+	}
+	if (json['creator'] != null) {
+		data.creator = json['creator'] is String
+				? int.tryParse(json['creator'])
+				: json['creator'].toInt();
+	}
+	if (json['description'] != null) {
+		data.description = json['description'].toString();
+	}
+	if (json['id'] != null) {
+		data.id = json['id'] is String
+				? int.tryParse(json['id'])
+				: json['id'].toInt();
+	}
+	if (json['repairBillId'] != null) {
+		data.repairBillId = json['repairBillId'] is String
+				? int.tryParse(json['repairBillId'])
+				: json['repairBillId'].toInt();
+	}
+	if (json['updateTime'] != null) {
+		data.updateTime = json['updateTime'].toString();
+	}
+	if (json['updater'] != null) {
+		data.updater = json['updater'] is String
+				? int.tryParse(json['updater'])
+				: json['updater'].toInt();
+	}
+	if (json['userName'] != null) {
+		data.userName = json['userName'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> repairBillListResponseDataListLogsToJson(RepairBillListResponseDataListLogs entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['createTime'] = entity.createTime;
+	data['creator'] = entity.creator;
+	data['description'] = entity.description;
+	data['id'] = entity.id;
+	data['repairBillId'] = entity.repairBillId;
+	data['updateTime'] = entity.updateTime;
+	data['updater'] = entity.updater;
+	data['userName'] = entity.userName;
+	return data;
+}
+
+repairBillListResponseDataQueryFromJson(RepairBillListResponseDataQuery data, Map<String, dynamic> json) {
+	if (json['applicant'] != null) {
+		data.applicant = json['applicant'].toString();
+	}
+	if (json['deviceId'] != null) {
+		data.deviceId = json['deviceId'] is String
+				? int.tryParse(json['deviceId'])
+				: json['deviceId'].toInt();
+	}
+	if (json['deviceKey'] != null) {
+		data.deviceKey = json['deviceKey'].toString();
+	}
+	if (json['deviceName'] != null) {
+		data.deviceName = json['deviceName'].toString();
+	}
+	if (json['equipmentId'] != null) {
+		data.equipmentId = json['equipmentId'] is String
+				? int.tryParse(json['equipmentId'])
+				: json['equipmentId'].toInt();
+	}
+	if (json['id'] != null) {
+		data.id = json['id'] is String
+				? int.tryParse(json['id'])
+				: json['id'].toInt();
+	}
+	if (json['instructions'] != null) {
+		data.instructions = json['instructions'].toString();
+	}
+	if (json['remarks'] != null) {
+		data.remarks = json['remarks'].toString();
+	}
+	if (json['repNum'] != null) {
+		data.repNum = json['repNum'].toString();
+	}
+	if (json['repairImgId'] != null) {
+		data.repairImgId = json['repairImgId'] is String
+				? int.tryParse(json['repairImgId'])
+				: json['repairImgId'].toInt();
+	}
+	if (json['repairResId'] != null) {
+		data.repairResId = json['repairResId'] is String
+				? int.tryParse(json['repairResId'])
+				: json['repairResId'].toInt();
+	}
+	if (json['status'] != null) {
+		data.status = json['status'] is String
+				? int.tryParse(json['status'])
+				: json['status'].toInt();
+	}
+	if (json['theme'] != null) {
+		data.theme = json['theme'].toString();
+	}
+	if (json['treatment'] != null) {
+		data.treatment = json['treatment'] is String
+				? int.tryParse(json['treatment'])
+				: json['treatment'].toInt();
+	}
+	if (json['urg'] != null) {
+		data.urg = json['urg'] is String
+				? int.tryParse(json['urg'])
+				: json['urg'].toInt();
+	}
+	if (json['urls'] != null) {
+		data.urls = (json['urls'] as List).map((v) => v.toString()).toList().cast<String>();
+	}
+	return data;
+}
+
+Map<String, dynamic> repairBillListResponseDataQueryToJson(RepairBillListResponseDataQuery entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['applicant'] = entity.applicant;
+	data['deviceId'] = entity.deviceId;
+	data['deviceKey'] = entity.deviceKey;
+	data['deviceName'] = entity.deviceName;
+	data['equipmentId'] = entity.equipmentId;
+	data['id'] = entity.id;
+	data['instructions'] = entity.instructions;
+	data['remarks'] = entity.remarks;
+	data['repNum'] = entity.repNum;
+	data['repairImgId'] = entity.repairImgId;
+	data['repairResId'] = entity.repairResId;
+	data['status'] = entity.status;
+	data['theme'] = entity.theme;
+	data['treatment'] = entity.treatment;
+	data['urg'] = entity.urg;
+	data['urls'] = entity.urls;
+	return data;
+}

+ 245 - 0
lib/generated/json/repair_query_device_response_entity_helper.dart

@@ -0,0 +1,245 @@
+import 'package:deus_app/model/repair_query_device_response_entity.dart';
+
+repairQueryDeviceResponseEntityFromJson(RepairQueryDeviceResponseEntity data, Map<String, dynamic> json) {
+	if (json['code'] != null) {
+		data.code = json['code'] is String
+				? int.tryParse(json['code'])
+				: json['code'].toInt();
+	}
+	if (json['data'] != null) {
+		data.data = RepairQueryDeviceResponseData().fromJson(json['data']);
+	}
+	if (json['msg'] != null) {
+		data.msg = json['msg'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> repairQueryDeviceResponseEntityToJson(RepairQueryDeviceResponseEntity entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['code'] = entity.code;
+	data['data'] = entity.data.toJson();
+	data['msg'] = entity.msg;
+	return data;
+}
+
+repairQueryDeviceResponseDataFromJson(RepairQueryDeviceResponseData data, Map<String, dynamic> json) {
+	if (json['index'] != null) {
+		data.index = json['index'] is String
+				? int.tryParse(json['index'])
+				: json['index'].toInt();
+	}
+	if (json['list'] != null) {
+		data.xList = (json['list'] as List).map((v) => RepairQueryDeviceResponseDataList().fromJson(v)).toList();
+	}
+	if (json['query'] != null) {
+		data.query = RepairQueryDeviceResponseDataQuery().fromJson(json['query']);
+	}
+	if (json['size'] != null) {
+		data.size = json['size'] is String
+				? int.tryParse(json['size'])
+				: json['size'].toInt();
+	}
+	if (json['sort'] != null) {
+		data.sort = json['sort'] is String
+				? int.tryParse(json['sort'])
+				: json['sort'].toInt();
+	}
+	if (json['sortBy'] != null) {
+		data.sortBy = json['sortBy'].toString();
+	}
+	if (json['total'] != null) {
+		data.total = json['total'] is String
+				? int.tryParse(json['total'])
+				: json['total'].toInt();
+	}
+	return data;
+}
+
+Map<String, dynamic> repairQueryDeviceResponseDataToJson(RepairQueryDeviceResponseData entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['index'] = entity.index;
+	data['list'] =  entity.xList.map((v) => v.toJson()).toList();
+	data['query'] = entity.query.toJson();
+	data['size'] = entity.size;
+	data['sort'] = entity.sort;
+	data['sortBy'] = entity.sortBy;
+	data['total'] = entity.total;
+	return data;
+}
+
+repairQueryDeviceResponseDataListFromJson(RepairQueryDeviceResponseDataList data, Map<String, dynamic> json) {
+	if (json['activationOn'] != null) {
+		data.activationOn = json['activationOn'].toString();
+	}
+	if (json['activePeriod'] != null) {
+		data.activePeriod = json['activePeriod'].toString();
+	}
+	if (json['authType'] != null) {
+		data.authType = json['authType'] is String
+				? int.tryParse(json['authType'])
+				: json['authType'].toInt();
+	}
+	if (json['channelId'] != null) {
+		data.channelId = json['channelId'].toString();
+	}
+	if (json['connectionProtocol'] != null) {
+		data.connectionProtocol = json['connectionProtocol'] is String
+				? int.tryParse(json['connectionProtocol'])
+				: json['connectionProtocol'].toInt();
+	}
+	if (json['createdOn'] != null) {
+		data.createdOn = json['createdOn'].toString();
+	}
+	if (json['customerId'] != null) {
+		data.customerId = json['customerId'].toString();
+	}
+	if (json['description'] != null) {
+		data.description = json['description'].toString();
+	}
+	if (json['deviceId'] != null) {
+		data.deviceId = json['deviceId'].toString();
+	}
+	if (json['deviceKey'] != null) {
+		data.deviceKey = json['deviceKey'].toString();
+	}
+	if (json['deviceSecret'] != null) {
+		data.deviceSecret = json['deviceSecret'].toString();
+	}
+	if (json['finenessA'] != null) {
+		data.finenessA = json['finenessA'].toString();
+	}
+	if (json['finenessB'] != null) {
+		data.finenessB = json['finenessB'].toString();
+	}
+	if (json['holeCountA'] != null) {
+		data.holeCountA = json['holeCountA'].toString();
+	}
+	if (json['holeCountB'] != null) {
+		data.holeCountB = json['holeCountB'].toString();
+	}
+	if (json['id'] != null) {
+		data.id = json['id'] is String
+				? int.tryParse(json['id'])
+				: json['id'].toInt();
+	}
+	if (json['imei'] != null) {
+		data.imei = json['imei'].toString();
+	}
+	if (json['iotId'] != null) {
+		data.iotId = json['iotId'].toString();
+	}
+	if (json['ip'] != null) {
+		data.ip = json['ip'].toString();
+	}
+	if (json['isActive'] != null) {
+		data.isActive = json['isActive'] is String
+				? int.tryParse(json['isActive'])
+				: json['isActive'].toInt();
+	}
+	if (json['isEnable'] != null) {
+		data.isEnable = json['isEnable'] is String
+				? int.tryParse(json['isEnable'])
+				: json['isEnable'].toInt();
+	}
+	if (json['lastOnlineOn'] != null) {
+		data.lastOnlineOn = json['lastOnlineOn'].toString();
+	}
+	if (json['lastUpdateOn'] != null) {
+		data.lastUpdateOn = json['lastUpdateOn'].toString();
+	}
+	if (json['name'] != null) {
+		data.name = json['name'].toString();
+	}
+	if (json['nodeType'] != null) {
+		data.nodeType = json['nodeType'] is String
+				? int.tryParse(json['nodeType'])
+				: json['nodeType'].toInt();
+	}
+	if (json['number'] != null) {
+		data.number = json['number'].toString();
+	}
+	if (json['positionId'] != null) {
+		data.positionId = json['positionId'] is String
+				? int.tryParse(json['positionId'])
+				: json['positionId'].toInt();
+	}
+	if (json['productId'] != null) {
+		data.productId = json['productId'] is String
+				? int.tryParse(json['productId'])
+				: json['productId'].toInt();
+	}
+	if (json['productKey'] != null) {
+		data.productKey = json['productKey'].toString();
+	}
+	if (json['productName'] != null) {
+		data.productName = json['productName'].toString();
+	}
+	if (json['showName'] != null) {
+		data.showName = json['showName'].toString();
+	}
+	if (json['speedA'] != null) {
+		data.speedA = json['speedA'].toString();
+	}
+	if (json['speedB'] != null) {
+		data.speedB = json['speedB'].toString();
+	}
+	if (json['status'] != null) {
+		data.status = json['status'] is String
+				? int.tryParse(json['status'])
+				: json['status'].toInt();
+	}
+	return data;
+}
+
+Map<String, dynamic> repairQueryDeviceResponseDataListToJson(RepairQueryDeviceResponseDataList entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['activationOn'] = entity.activationOn;
+	data['activePeriod'] = entity.activePeriod;
+	data['authType'] = entity.authType;
+	data['channelId'] = entity.channelId;
+	data['connectionProtocol'] = entity.connectionProtocol;
+	data['createdOn'] = entity.createdOn;
+	data['customerId'] = entity.customerId;
+	data['description'] = entity.description;
+	data['deviceId'] = entity.deviceId;
+	data['deviceKey'] = entity.deviceKey;
+	data['deviceSecret'] = entity.deviceSecret;
+	data['finenessA'] = entity.finenessA;
+	data['finenessB'] = entity.finenessB;
+	data['holeCountA'] = entity.holeCountA;
+	data['holeCountB'] = entity.holeCountB;
+	data['id'] = entity.id;
+	data['imei'] = entity.imei;
+	data['iotId'] = entity.iotId;
+	data['ip'] = entity.ip;
+	data['isActive'] = entity.isActive;
+	data['isEnable'] = entity.isEnable;
+	data['lastOnlineOn'] = entity.lastOnlineOn;
+	data['lastUpdateOn'] = entity.lastUpdateOn;
+	data['name'] = entity.name;
+	data['nodeType'] = entity.nodeType;
+	data['number'] = entity.number;
+	data['positionId'] = entity.positionId;
+	data['productId'] = entity.productId;
+	data['productKey'] = entity.productKey;
+	data['productName'] = entity.productName;
+	data['showName'] = entity.showName;
+	data['speedA'] = entity.speedA;
+	data['speedB'] = entity.speedB;
+	data['status'] = entity.status;
+	return data;
+}
+
+repairQueryDeviceResponseDataQueryFromJson(RepairQueryDeviceResponseDataQuery data, Map<String, dynamic> json) {
+	if (json['search'] != null) {
+		data.search = json['search'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> repairQueryDeviceResponseDataQueryToJson(RepairQueryDeviceResponseDataQuery entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['search'] = entity.search;
+	return data;
+}

+ 26 - 0
lib/generated/json/upload_list_entity_entity_helper.dart

@@ -0,0 +1,26 @@
+import 'package:deus_app/model/upload_list_entity_entity.dart';
+
+uploadListEntityEntityFromJson(UploadListEntityEntity data, Map<String, dynamic> json) {
+	if (json['code'] != null) {
+		data.code = json['code'] is String
+				? int.tryParse(json['code'])
+				: json['code'].toInt();
+	}
+	if (json['msg'] != null) {
+		data.msg = json['msg'].toString();
+	}
+	if (json['data'] != null) {
+		data.data = (json['data'] as List).map((v) => v is String
+				? int.tryParse(v)
+				: v.toInt()).toList().cast<int>();
+	}
+	return data;
+}
+
+Map<String, dynamic> uploadListEntityEntityToJson(UploadListEntityEntity entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['code'] = entity.code;
+	data['msg'] = entity.msg;
+	data['data'] = entity.data;
+	return data;
+}

+ 3 - 0
lib/main.dart

@@ -2,6 +2,7 @@ import 'package:deus_app/page/device/device_manage_page.dart';
 import 'package:deus_app/page/home/home_page.dart';
 import 'package:deus_app/page/login/login_page.dart';
 import 'package:deus_app/page/maint/maint_job_page.dart';
+import 'package:deus_app/page/patrol/patrol_job_edit.dart';
 import 'package:deus_app/page/patrol/patrol_job_page.dart';
 import 'package:deus_app/page/repair/repair_page.dart';
 import 'package:event_bus/event_bus.dart';
@@ -51,6 +52,8 @@ class MyApp extends StatelessWidget {
             MaintJobPage(),
         RepairPage.routeName: (BuildContext context) =>
             RepairPage(),
+        PatrolJobEdit.routeName: (BuildContext context) =>
+            PatrolJobEdit(),
       },
     );
   }

File diff suppressed because it is too large
+ 112 - 227
lib/model/maint_job_detail_response.dart


+ 47 - 0
lib/model/maint_job_list_response_entity.dart

@@ -0,0 +1,47 @@
+import 'package:deus_app/generated/json/base/json_convert_content.dart';
+import 'package:deus_app/generated/json/base/json_field.dart';
+
+class MaintJobListResponseEntity with JsonConvert<MaintJobListResponseEntity> {
+	late int code;
+	late MaintJobListResponseData data;
+	late String msg;
+}
+
+class MaintJobListResponseData with JsonConvert<MaintJobListResponseData> {
+	late int index;
+	@JSONField(name: "list")
+	late List<MaintJobListResponseDataList> xList;
+	late MaintJobListResponseDataQuery query;
+	late int size;
+	late int sort;
+	late String sortBy;
+	late int total;
+}
+
+class MaintJobListResponseDataList with JsonConvert<MaintJobListResponseDataList> {
+	late int deviceId;
+	late String deviceKey;
+	late String finishTime;
+	late int id;
+	late int isMainted;
+	late int maintJobId;
+	late String maintPerson;
+	late String name;
+	late String productKey;
+	late String productName;
+	late String showName;
+}
+
+class MaintJobListResponseDataQuery with JsonConvert<MaintJobListResponseDataQuery> {
+	late int deviceId;
+	late String deviceKey;
+	late String finishTime;
+	late int id;
+	late int isMainted;
+	late int maintJobId;
+	late String maintPerson;
+	late String name;
+	late String productKey;
+	late String productName;
+	late String showName;
+}

+ 2 - 2
lib/model/patrol_job_detail_response_entity.dart

@@ -14,7 +14,7 @@ class PatrolJobDetailResponseData with JsonConvert<PatrolJobDetailResponseData>
 	late String planNumber;
 	late dynamic termType;
 	late int personnelId;
-	late String personnel;
+	late String personnel='';
 	late String remarks='';
 	late String finishTime='';
 	late List<String> fileUrls;
@@ -51,7 +51,7 @@ class PatrolJobDetailResponseDataEquipmentVOS with JsonConvert<PatrolJobDetailRe
 	late String showName;
 	late String deviceKey;
 	late String productName;
-	late String itemCompleteTime;
+	late String itemCompleteTime='';
 	late String itemPerson;
 	late int patrolJobId;
 	late int isComplete;

+ 17 - 0
lib/model/patrol_job_edit_emtity_entity.dart

@@ -0,0 +1,17 @@
+import 'package:deus_app/generated/json/base/json_convert_content.dart';
+
+class PatrolJobEditEmtityEntity with JsonConvert<PatrolJobEditEmtityEntity> {
+	late int code;
+	late List<PatrolJobEditEmtityData> data;
+	late String msg;
+}
+
+class PatrolJobEditEmtityData with JsonConvert<PatrolJobEditEmtityData> {
+	late String id;
+	late String number;
+	late String name;
+	late String requirement;
+	late String result;
+	late int patrolJobId;
+	late dynamic results;
+}

+ 41 - 0
lib/model/patrol_job_list_entity_entity.dart

@@ -0,0 +1,41 @@
+import 'package:deus_app/generated/json/base/json_convert_content.dart';
+import 'package:deus_app/generated/json/base/json_field.dart';
+
+class PatrolJobListEntityEntity with JsonConvert<PatrolJobListEntityEntity> {
+	late int index;
+	@JSONField(name: "list")
+	late List<PatrolJobListEntityList> xList;
+	late PatrolJobListEntityQuery query;
+	late int size;
+	late int sort;
+	late String sortBy;
+	late int total;
+}
+
+class PatrolJobListEntityList with JsonConvert<PatrolJobListEntityList> {
+	late int deviceId;
+	late String deviceKey;
+	late String finishTime;
+	late int id;
+	late int isMainted;
+	late int maintJobId;
+	late String maintPerson;
+	late String name;
+	late String productKey;
+	late String productName;
+	late String showName;
+}
+
+class PatrolJobListEntityQuery with JsonConvert<PatrolJobListEntityQuery> {
+	late int deviceId;
+	late String deviceKey;
+	late String finishTime;
+	late int id;
+	late int isMainted;
+	late int maintJobId;
+	late String maintPerson;
+	late String name;
+	late String productKey;
+	late String productName;
+	late String showName;
+}

+ 43 - 0
lib/model/patrol_job_select_entity_entity.dart

@@ -0,0 +1,43 @@
+import 'package:deus_app/generated/json/base/json_convert_content.dart';
+
+class PatrolJobSelectEntityEntity with JsonConvert<PatrolJobSelectEntityEntity> {
+	late int code;
+	late PatrolJobSelectEntityData data;
+	late String msg;
+}
+
+class PatrolJobSelectEntityData with JsonConvert<PatrolJobSelectEntityData> {
+	late int index;
+	late List<PatrolJobSelectEntityDataPatrolItemModelVOS> patrolItemModelVOS;
+	late PatrolJobSelectEntityDataQuery query;
+	late int size;
+	late int sort;
+	late String sortBy;
+	late int total;
+}
+
+class PatrolJobSelectEntityDataPatrolItemModelVOS with JsonConvert<PatrolJobSelectEntityDataPatrolItemModelVOS> {
+	late String createTime;
+	late int enable;
+	late int id;
+	late String name;
+	late String number;
+	late List<String> param;
+	late String params;
+	late String requirement;
+	late List<String> results;
+	late int type;
+}
+
+class PatrolJobSelectEntityDataQuery with JsonConvert<PatrolJobSelectEntityDataQuery> {
+	late String createTime;
+	late int enable;
+	late int id;
+	late String name;
+	late String number;
+	late List<String> param;
+	late String params;
+	late String requirement;
+	late List<String> results;
+	late int type;
+}

+ 86 - 0
lib/model/repair_bill_list_response_entity.dart

@@ -0,0 +1,86 @@
+import 'package:deus_app/generated/json/base/json_convert_content.dart';
+import 'package:deus_app/generated/json/base/json_field.dart';
+
+class RepairBillListResponseEntity with JsonConvert<RepairBillListResponseEntity> {
+	late int code;
+	late RepairBillListResponseData data;
+	late String msg;
+}
+
+class RepairBillListResponseData with JsonConvert<RepairBillListResponseData> {
+	late int index;
+	@JSONField(name: "list")
+	late List<RepairBillListResponseDataList> xList;
+	late RepairBillListResponseDataQuery query;
+	late int size;
+	late int sort;
+	late String sortBy;
+	late int total;
+}
+
+class RepairBillListResponseDataList with JsonConvert<RepairBillListResponseDataList> {
+	late String applicant='';
+	late String applicationTime;
+	late String channelName;
+	late String completeTime;
+	late String customerName;
+	late RepairBillListResponseDataListDevice device;
+	late int deviceId;
+	late String deviceKey;
+	late String deviceName;
+	late int id;
+	late String instructions;
+	late List<RepairBillListResponseDataListLogs> logs;
+	late String maintainer;
+	late String orderRecTime;
+	late String receiver;
+	late String repNum;
+	late String repairImgUrl;
+	late String repairResUrl;
+	late int status;
+	late String submitter;
+	late String theme;
+	late int treatment;
+	late int urg;
+}
+
+class RepairBillListResponseDataListDevice with JsonConvert<RepairBillListResponseDataListDevice> {
+	late String completeTime;
+	late String deviceKey;
+	late String deviceName;
+	late int id;
+	late int isRepaired;
+	late String prodName;
+	late String repairBillId;
+	late String showName;
+}
+
+class RepairBillListResponseDataListLogs with JsonConvert<RepairBillListResponseDataListLogs> {
+	late String createTime;
+	late int creator;
+	late String description;
+	late int id;
+	late int repairBillId;
+	late String updateTime;
+	late int updater;
+	late String userName;
+}
+
+class RepairBillListResponseDataQuery with JsonConvert<RepairBillListResponseDataQuery> {
+	late String applicant;
+	late int deviceId;
+	late String deviceKey;
+	late String deviceName;
+	late int equipmentId;
+	late int id;
+	late String instructions;
+	late String remarks;
+	late String repNum;
+	late int repairImgId;
+	late int repairResId;
+	late int status;
+	late String theme;
+	late int treatment;
+	late int urg;
+	late List<String> urls;
+}

+ 60 - 0
lib/model/repair_query_device_response_entity.dart

@@ -0,0 +1,60 @@
+import 'package:deus_app/generated/json/base/json_convert_content.dart';
+import 'package:deus_app/generated/json/base/json_field.dart';
+
+class RepairQueryDeviceResponseEntity with JsonConvert<RepairQueryDeviceResponseEntity> {
+	late int code;
+	late RepairQueryDeviceResponseData data;
+	late String msg;
+}
+
+class RepairQueryDeviceResponseData with JsonConvert<RepairQueryDeviceResponseData> {
+	late int index;
+	@JSONField(name: "list")
+	late List<RepairQueryDeviceResponseDataList> xList;
+	late RepairQueryDeviceResponseDataQuery query;
+	late int size;
+	late int sort;
+	late String sortBy;
+	late int total;
+}
+
+class RepairQueryDeviceResponseDataList with JsonConvert<RepairQueryDeviceResponseDataList> {
+	late String activationOn;
+	late String activePeriod;
+	late int authType;
+	late String channelId;
+	late int connectionProtocol;
+	late String createdOn;
+	late String customerId;
+	late String description;
+	late String deviceId;
+	late String deviceKey;
+	late String deviceSecret;
+	late String finenessA;
+	late String finenessB;
+	late String holeCountA;
+	late String holeCountB;
+	late int id;
+	late String imei;
+	late String iotId;
+	late String ip;
+	late int isActive;
+	late int isEnable;
+	late String lastOnlineOn;
+	late String lastUpdateOn;
+	late String name;
+	late int nodeType;
+	late String number;
+	late int positionId;
+	late int productId;
+	late String productKey;
+	late String productName;
+	late String showName;
+	late String speedA;
+	late String speedB;
+	late int status;
+}
+
+class RepairQueryDeviceResponseDataQuery with JsonConvert<RepairQueryDeviceResponseDataQuery> {
+	late String search;
+}

+ 7 - 0
lib/model/upload_list_entity_entity.dart

@@ -0,0 +1,7 @@
+import 'package:deus_app/generated/json/base/json_convert_content.dart';
+
+class UploadListEntityEntity with JsonConvert<UploadListEntityEntity> {
+	late int code;
+	late String msg;
+	late List<int> data;
+}

+ 1 - 1
lib/page/device/device_manage_detail_page.dart

@@ -31,7 +31,7 @@ class _DeviceManageDetailPage extends State<DeviceManageDetailPage> {
   Widget build(BuildContext context) {
     // TODO: implement build
     return Scaffold(
-        appBar: TitleBar().backAppbar(context, "设备详情"),
+        appBar: TitleBar().backAppbar("设备详情"),
         backgroundColor: const Color(0xfff2f2f2),
         body: ListView(children: _Ws()));
   }

+ 1 - 1
lib/page/device/device_manage_update_page.dart

@@ -39,7 +39,7 @@ class _DeviceManageUpdatePage extends State<DeviceManageUpdatePage>{
   @override
   Widget build(BuildContext context) {
     return Scaffold(
-      appBar: TitleBar().backAppbar(context, "修改参数"),
+      appBar: TitleBar().backAppbar("修改参数"),
       backgroundColor: const Color(0xfff2f2f2),
       body: SingleChildScrollView (
         child: Column(

File diff suppressed because it is too large
+ 273 - 296
lib/page/maint/maint_job_detail.dart


+ 0 - 0
lib/page/maint/maint_job_edit.dart


+ 175 - 0
lib/page/maint/maint_job_list.dart

@@ -0,0 +1,175 @@
+import 'package:deus_app/common/style/TitleBar.dart';
+import 'package:deus_app/common/style/gsy_style.dart';
+import 'package:deus_app/common/utils/ConstantString.dart';
+import 'package:deus_app/common/utils/DioUtil.dart';
+import 'package:deus_app/common/utils/ToastUtils.dart';
+import 'package:deus_app/model/patrol_job_detail_response_entity.dart';
+import 'package:deus_app/page/patrol/patrol_job_edit.dart';
+import 'package:flutter/material.dart';
+
+class MaintlJobList extends StatefulWidget {
+  final PatrolJobDetailResponseData responseData;
+
+  const MaintlJobList({super.key, required this.responseData});
+
+  @override
+  State createState() {
+    return _MaintlJobList(responseData);
+  }
+}
+
+class _MaintlJobList extends State<MaintlJobList> {
+  PatrolJobDetailResponseData responseData;
+
+  _MaintlJobList(this.responseData);
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+        appBar: TitleBar().backAppbar("巡检设备详情"),
+        backgroundColor: const Color(0xfff2f2f2),
+        body: Stack(
+          children: [
+            Column(
+              children: [
+                SizedBox(
+                  height: 10,
+                ),
+                Row(
+                  mainAxisAlignment: MainAxisAlignment.start,
+                  children: [
+                    SizedBox(
+                      width: 15,
+                    ),
+                    Text(ConstantString.patrolJobTitle,
+                        style: GSYConstant.smallActionLightText),
+                  ],
+                ),
+                Expanded(
+                  child:  Container(
+                      margin: EdgeInsets.only(bottom: 60),
+                      child: ListView.builder(
+                        itemCount: responseData.equipmentVOS.length,
+                        itemBuilder: (context, index) {
+                          return Container(
+                              margin: EdgeInsets.only(top: 12, left: 10, right: 10),
+                              padding: EdgeInsets.only(top: 12, bottom: 10),
+                              color: Colors.white,
+                              child: ListTile(
+                                title: Column(
+                                  children: [
+                                    Container(
+                                      // padding: const EdgeInsets.fromLTRB(30.0, 0.0, 0.0, 0.0),
+                                      alignment: Alignment.centerLeft,
+                                      child: Row(
+                                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                          children: [
+                                            Text(responseData.equipmentVOS[index].showName,
+                                                style: GSYConstant.smallTextBold),
+                                            Text(
+                                              responseData
+                                                  .equipmentVOS[index].isComplete==0?'未完成':'已完成',
+                                              style: TextStyle(
+                                                  fontSize: GSYConstant.smallTextSize,
+                                                  color: responseData.equipmentVOS[index].isComplete==0?Colors.red:Colors.blue),
+                                            ),
+                                          ]),
+                                    ),
+                                    Container(
+                                      margin: const EdgeInsets.only(top: 10),
+                                      // padding: const EdgeInsets.fromLTRB(30.0, 0.0, 0.0, 10.0),
+                                      // alignment: Alignment.centerLeft,
+                                      child: Row(
+                                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                          children: [
+                                            new Text(
+                                              '完成时间:',
+                                              style: GSYConstant.smallTextLight,
+                                            ),
+                                            Container(
+                                              child: Text(
+                                                responseData.equipmentVOS[index].itemCompleteTime,
+                                                style: GSYConstant.smallTextLight,
+                                                textAlign: TextAlign.right,
+                                              ),
+                                            ),
+                                          ]),
+                                    ),
+                                    SizedBox(
+                                      height: 5,
+                                    ),
+                                  ],
+                                ),
+                                onTap: () {
+                                  completeEquipment(index);
+                                },
+                              ));
+                        },
+                      )
+                  ),
+                )
+
+              ],
+            ),
+            Positioned(
+              left: 0,
+              right: 0,
+              bottom:0,
+              // flex: 7,
+              child:SizedBox(
+                height: 50,
+                width: double.infinity,
+                child: TextButton(
+                  onPressed: () {
+                    if(next()){
+                      Navigator.push(
+                          context,
+                          MaterialPageRoute(
+                              builder: (context) =>
+                                  PatrolJobEdit(id: responseData.id)));
+                    }
+                  },
+                  style: ButtonStyle(
+                    backgroundColor: MaterialStateProperty.all<Color>(
+                        Color(0xFF4875EC)),
+                    shape: MaterialStateProperty.all(
+                        BeveledRectangleBorder(
+                            borderRadius: BorderRadius.circular(0))),
+                    foregroundColor:
+                    MaterialStateProperty.all<Color>(Colors.white),
+                    // padding: MaterialStateProperty.all(EdgeInsets.zero)
+                  ),
+                  child: const Text(ConstantString.next),
+                ),
+              ),
+            )
+          ],
+        ));
+  }
+
+  completeEquipment(int index) async {
+    if (responseData.equipmentVOS[index].isComplete == 0) {
+      var result = await DioUtil().request("patrolJob/completeEquipment",
+          method: DioMethod.post,
+          data: {'id': responseData.equipmentVOS[index].id});
+      if (result['code'] == 0) {
+        setState(() {
+          responseData.equipmentVOS[index].isComplete = 1;
+        });
+      } else {
+        showToast(result['msg']);
+      }
+    }
+  }
+
+  bool next(){
+    bool isNext=true;
+    for (var element in responseData.equipmentVOS) {
+      if(element.isComplete==0){
+        isNext=false;
+        break;
+      }
+    }
+    return isNext;
+  }
+}

+ 14 - 6
lib/page/maint/maint_job_page.dart

@@ -1,5 +1,6 @@
 //巡检任务列表
 import 'package:deus_app/common/style/TitleBar.dart';
+import 'package:deus_app/common/utils/ToastUtils.dart';
 import 'package:deus_app/model/maint_pesonse_entity.dart';
 import 'package:deus_app/page/maint/maint_job_detail.dart';
 import 'package:flutter/cupertino.dart';
@@ -43,13 +44,20 @@ class _MaintJobPage extends State<MaintJobPage> {
     _refreshController.loadComplete();
     _refreshController.refreshCompleted();
     MaintJobResponse maintJobResponse = MaintJobResponse.fromJson(result);
-    maintJobList = maintJobResponse.data!;
-    setState(() {
-      if(index==1){
-        maint_job_list.clear();
+    if(maintJobResponse.code==0){
+      maintJobList = maintJobResponse.data!;
+      setState(() {
+        if(index==1){
+          maint_job_list.clear();
+        }
+        maint_job_list.addAll(maintJobList.list!);
+      });
+    }else{
+      if(index>1){
+        index--;
       }
-      maint_job_list.addAll(maintJobList.list!);
-    });
+      showToast(maintJobResponse.msg!);
+    }
   }
 
   void _onRefresh() async {

+ 261 - 0
lib/page/patrol/patrol_job_add.dart

@@ -0,0 +1,261 @@
+import 'package:deus_app/common/event/RefreshPatrolEdit.dart';
+import 'package:deus_app/common/event/multiple_choice.dart';
+import 'package:deus_app/common/style/TitleBar.dart';
+import 'package:deus_app/common/style/gsy_style.dart';
+import 'package:deus_app/common/utils/CommonUtils.dart';
+import 'package:deus_app/common/utils/ConstantString.dart';
+import 'package:deus_app/common/utils/DioUtil.dart';
+import 'package:deus_app/common/utils/ToastUtils.dart';
+import 'package:deus_app/main.dart';
+import 'package:deus_app/model/patrol_job_select_entity_entity.dart';
+import 'package:flutter/material.dart';
+
+class PatrolJobAdd extends StatefulWidget {
+
+  var id;
+
+  final PatrolJobSelectEntityDataPatrolItemModelVOS responseData;
+
+  PatrolJobAdd({super.key,required this.responseData,required this.id});
+
+  @override
+  State createState() {
+    return new _PatrolJobAdd(responseData,id);
+  }
+}
+
+class _PatrolJobAdd extends State<PatrolJobAdd> {
+  PatrolJobSelectEntityDataPatrolItemModelVOS responseData;
+
+  var id;
+
+  _PatrolJobAdd(this.responseData,this.id);
+
+  String groupValue = '';
+
+  List<MultipleChoice>mList=[];
+
+  @override
+  void initState() {
+    super.initState();
+    if(responseData.type==2){
+      groupValue=responseData.param[0];
+    }else if(responseData.type==3){
+      for (var element in responseData.param) {
+        mList.add(MultipleChoice(element, false));
+      }
+    }
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: TitleBar().backAppbar("添加巡检项目"),
+      // backgroundColor: const Color(0xfff2f2f2),
+      body: Stack(
+        children: [
+          Column(
+            children: [
+              Container(
+                padding: const EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 15.0),
+                child: Column(
+                  children: [
+                    Container(
+                      alignment: Alignment.centerLeft,
+                      child: Text(
+                        responseData.name,
+                        style: const TextStyle(
+                          fontSize: GSYConstant.TextSize15,
+                          color: Colors.black,
+                        ),
+                      ),
+                    ),
+                    Container(
+                      margin: const EdgeInsets.only(top: 10),
+                      // padding: const EdgeInsets.fromLTRB(30.0, 0.0, 0.0, 10.0),
+                      // alignment: Alignment.centerLeft,
+                      alignment: Alignment.centerLeft,
+                      child: Text(
+                        responseData.params,
+                        style: GSYConstant.textLight,
+                        textAlign: TextAlign.left,
+                      ),
+                    ),
+                    SizedBox(
+                      height: 10,
+                    ),
+                    Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
+                      Container(
+                        child: Text(
+                          '类型:',
+                          style: TextStyle(
+                            color: GSYColors.primaryLightValue,
+                            fontSize: GSYConstant.TextSize15,
+                          ),
+                        ),
+                      ),
+                      Container(
+                        child: Text(
+                          responseData.type == 0
+                              ? '数值'
+                              : responseData.type == 1
+                              ? '长文本'
+                              : responseData.type == 2
+                              ? '单选'
+                              : '多选',
+                          textAlign: TextAlign.right,
+                          style: TextStyle(
+                            color: GSYColors.primaryLightValue,
+                            fontSize: GSYConstant.TextSize15,
+                          ),
+                        ),
+                      ),
+                    ]),
+                  ],
+                ),
+              ),
+              Divider(
+                height: 0.8,
+                color: Colors.grey,
+              ),
+              SizedBox(
+                height: 10,
+              ),
+              Expanded(
+                child:responseData.type==2||responseData.type==3? Container(
+                  child: ListView.builder(
+                    itemCount: responseData.param.length,
+                    itemBuilder: (context, index) {
+                      return Container(
+                          child: ListTile(
+                              title:responseData.type==2?Row(
+                                children: [
+                                  Radio(
+                                    value: responseData.param[index],
+                                    groupValue: groupValue,
+                                    onChanged: (value) {
+                                      // groupValue = value;
+                                      setState(() {
+                                        groupValue = value!;
+                                      });
+                                    },
+                                    // selected: groupValue == index,
+                                  ),
+                                  Text(responseData.param[index],style: TextStyle(
+                                    color: GSYColors.primaryLightValue,
+                                    fontSize: GSYConstant.TextSize15,
+                                  ),)
+                                ],
+                              ):Row(
+                                children: [
+                                  Checkbox(
+                                    value: mList[index].isCheck,
+                                    activeColor: Colors.blue,
+                                    onChanged: (bool? value) {
+                                      setState(() {
+                                        mList[index].isCheck=value!;
+                                      });
+                                    },
+                                  ),
+                                  Text(responseData.param[index],style: TextStyle(
+                                    color: GSYColors.primaryLightValue,
+                                    fontSize: GSYConstant.TextSize15,
+                                  )),
+                                ],
+                              )
+                          )
+                      );
+                    },
+                  ),
+                ):Container(
+                  padding: EdgeInsets.only(left: 12,right: 12,bottom: 12),
+                  decoration: BoxDecoration(color: Colors.white),
+                  child: Column(
+                    children: [
+                      const SizedBox(
+                        height: 10,
+                      ),
+                      TextField(
+                        maxLines: 5,
+                        decoration: InputDecoration(border: OutlineInputBorder()),
+                        style: TextStyle(fontSize: 14),
+                        onChanged: (value) {
+                          groupValue = value;
+                        },
+                      )
+                    ],
+                  ),
+                )
+              ),
+            ],
+          ),
+          Positioned(
+            left: 0,
+            right: 0,
+            bottom:0,
+            // flex: 7,
+            child:SizedBox(
+              height: 50,
+              width: double.infinity,
+              child: TextButton(
+                onPressed: () {
+                  appAddItem();
+                  // Navigator.push(
+                  //     context,
+                  //     MaterialPageRoute(
+                  //         builder: (context) =>
+                  //             PatrolJobEdit(id: responseData.id)));
+                  // Navigator.pushAndRemoveUntil()
+                },
+                style: ButtonStyle(
+                  backgroundColor: MaterialStateProperty.all<Color>(
+                      Color(0xFF4875EC)),
+                  shape: MaterialStateProperty.all(
+                      BeveledRectangleBorder(
+                          borderRadius: BorderRadius.circular(0))),
+                  foregroundColor:
+                  MaterialStateProperty.all<Color>(Colors.white),
+                  // padding: MaterialStateProperty.all(EdgeInsets.zero)
+                ),
+                child: const Text(ConstantString.complete),
+              ),
+            ),
+          )
+        ],
+      ),
+    );
+  }
+
+  appAddItem() async {
+    // Navigator.pushAndRemoveUntil(context, MaterialPageRoute(
+    //     builder: (context) =>
+    //         PatrolJobEdit(id: responseData.id)), (route) => false);
+    if(responseData.type==3){
+      for (var element in mList) {
+        if(element.isCheck){
+          if(!CommonUtils.validationInput(groupValue)){
+            groupValue=element.name;
+          }else{
+            groupValue='$groupValue,${element.name}';
+          }
+        }
+      }
+    }
+    if(!CommonUtils.validationInput(groupValue)){
+      showToast(ConstantString.patrolAddNull);
+      return;
+    }
+      var result = await DioUtil().request("patrolItem/appAddItem",
+          method: DioMethod.post,
+          data: {'id': responseData.id,'patrolJobId':id,'result':groupValue});
+      if (result['code'] == 0) {
+        setState(() {
+          eventBus.fire(RefreshPatrolEdit());
+          Navigator.of(context)..pop()..pop();
+        });
+      } else {
+        showToast(result['msg']);
+      }
+  }
+
+}

+ 29 - 15
lib/page/patrol/patrol_job_detail.dart

@@ -1,4 +1,5 @@
 import 'package:deus_app/common/event/RefreshPatrol.dart';
+import 'package:deus_app/common/event/RefreshPatrolEdit.dart';
 import 'package:deus_app/common/style/TitleBar.dart';
 import 'package:deus_app/common/style/gsy_style.dart';
 import 'package:deus_app/common/utils/ConstantString.dart';
@@ -16,6 +17,7 @@ import '../../model/patrol_job_detail_response_entity.dart';
  * 巡检任务详情页面
  */
 class PatrolJobDetail extends StatefulWidget {
+
   var id;
 
   PatrolJobDetail({super.key, @required this.id});
@@ -30,7 +32,10 @@ class PatrolJobDetail extends StatefulWidget {
 }
 
 class _PatrolJobDetail extends State<PatrolJobDetail> {
+
+  var _event;
   var id;
+
   bool type = false;
 
   _PatrolJobDetail(this.id);
@@ -79,9 +84,13 @@ class _PatrolJobDetail extends State<PatrolJobDetail> {
 
   @override
   void initState() {
-    // TODO: implement initState
     super.initState();
     _load();
+    _event = eventBus.on<RefreshPatrolEdit>().listen((event) {
+      setState(() {
+        _load();
+      });
+    });
   }
 
   @override
@@ -89,20 +98,12 @@ class _PatrolJobDetail extends State<PatrolJobDetail> {
     return Scaffold(
         resizeToAvoidBottomInset: false,
         appBar: TitleBar()
-            .textAppBar("巡检任务详情", type ? ConstantString.registration : '', () {
-          if (type) {
-            Navigator.push(
-                context,
-                MaterialPageRoute(
-                    builder: (context) =>
-                        PatrolJobList(responseData: responseData)));
-          }
-        }),
+            .backAppbar("巡检任务详情"),
         backgroundColor: const Color(0xfff2f2f2),
         body: Stack(
           children: [
             Container(
-              margin: EdgeInsets.only(bottom: 60),
+              margin: EdgeInsets.only(bottom: type?60:0),
               child: ListView(
                 children: _Ws(),
               ),
@@ -136,8 +137,7 @@ class _PatrolJobDetail extends State<PatrolJobDetail> {
                                   Colors.white),
                               // padding: MaterialStateProperty.all(EdgeInsets.zero)
                             ),
-                            child:
-                                const Text(ConstantString.complete_inspection),
+                            child: const Text(ConstantString.close_task),
                           ),
                         ),
                       ),
@@ -145,8 +145,15 @@ class _PatrolJobDetail extends State<PatrolJobDetail> {
                           child: SizedBox(
                         height: 50,
                         child: TextButton(
-                          onPressed: () {},
-                          child: Text(ConstantString.registration),
+                          onPressed: () {
+                            if (type) {
+                              Navigator.push(
+                                  context,
+                                  MaterialPageRoute(
+                                      builder: (context) =>
+                                          PatrolJobList(responseData: responseData)));
+                            }
+                          },
                           style: ButtonStyle(
                             backgroundColor:
                                 MaterialStateProperty.all<Color>(Colors.blue),
@@ -157,6 +164,7 @@ class _PatrolJobDetail extends State<PatrolJobDetail> {
                                     borderRadius: BorderRadius.circular(0))),
                             // padding: MaterialStateProperty.all(EdgeInsets.zero)
                           ),
+                          child: const Text(ConstantString.registration),
                         ),
                       )),
                     ],
@@ -596,4 +604,10 @@ class _PatrolJobDetail extends State<PatrolJobDetail> {
         decoration: BoxDecoration(color: Colors.white),
         child: Image.network(imageData));
   }
+
+  @override
+  void dispose() {
+    super.dispose();
+    _event.cancel();
+  }
 }

+ 368 - 0
lib/page/patrol/patrol_job_edit.dart

@@ -0,0 +1,368 @@
+import 'dart:io';
+
+import 'package:deus_app/PhotoTool.dart';
+import 'package:deus_app/common/event/RefreshPatrolEdit.dart';
+import 'package:deus_app/common/style/TitleBar.dart';
+import 'package:deus_app/common/style/gsy_style.dart';
+import 'package:deus_app/common/utils/ConstantString.dart';
+import 'package:deus_app/common/utils/DioUtil.dart';
+import 'package:deus_app/common/utils/ToastUtils.dart';
+import 'package:deus_app/generated/json/patrol_job_edit_emtity_entity_helper.dart';
+import 'package:deus_app/generated/json/upload_list_entity_entity_helper.dart';
+import 'package:deus_app/main.dart';
+import 'package:deus_app/model/patrol_job_edit_emtity_entity.dart';
+import 'package:deus_app/model/upload_list_entity_entity.dart';
+import 'package:deus_app/page/patrol/patrol_job_select.dart';
+import 'package:dio/dio.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:wechat_assets_picker/wechat_assets_picker.dart';
+
+
+class PatrolJobEdit extends StatefulWidget {
+
+  static var routeName = "/PatrolJobEdit";
+
+  var id;
+  @override
+  State createState() {
+    return _PatrolJobEdit(id);
+  }
+  PatrolJobEdit({super.key, @required this.id});
+}
+
+class _PatrolJobEdit extends State<PatrolJobEdit> {
+
+  List<PatrolJobEditEmtityData> patrolItemVOS = <PatrolJobEditEmtityData>[];
+
+  List<AssetEntity> imageFiles = [];
+
+  List<int>mList=[];
+
+  var id;
+
+  var _event;
+
+  String note='';
+
+  _PatrolJobEdit(this.id);
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+        resizeToAvoidBottomInset: false,
+        appBar: TitleBar().backAppbar("巡检设备详情"),
+        backgroundColor: const Color(0xfff2f2f2),
+        body: Column(
+          children: [
+            Expanded(
+              // flex: 7,
+              child: ListView(
+                children: _Ws(),
+              ),
+            ),
+            Container(
+              height: 50,
+              // flex: 7,
+              child: Row(
+                children: [
+                  Expanded(
+                    child: SizedBox(
+                      height: 50,
+                      child: TextButton(
+                        onPressed: () {},
+                        child: Text(ConstantString.back),
+                        style: ButtonStyle(
+                          backgroundColor: MaterialStateProperty.all<Color>(
+                              Color(0xFF4875EC)),
+                          shape: MaterialStateProperty.all(
+                              BeveledRectangleBorder(
+                                  borderRadius: BorderRadius.circular(0))),
+                          foregroundColor:
+                          MaterialStateProperty.all<Color>(Colors.white),
+                          // padding: MaterialStateProperty.all(EdgeInsets.zero)
+                        ),
+                      ),
+                    ),
+                  ),
+                  Expanded(
+                      child: SizedBox(
+                        height: 50,
+                        child: TextButton(
+                          onPressed: () {
+                            if(imageFiles.isNotEmpty){
+                              uploadList();
+                            }else{
+                              patrolJobRemark();
+                            }
+                          },
+                          child: Text(ConstantString.complete),
+                          style: ButtonStyle(
+                            backgroundColor:
+                            MaterialStateProperty.all<Color>(Colors.blue),
+                            foregroundColor:
+                            MaterialStateProperty.all<Color>(Colors.white),
+                            shape: MaterialStateProperty.all(BeveledRectangleBorder(
+                                borderRadius: BorderRadius.circular(0))),
+                            // padding: MaterialStateProperty.all(EdgeInsets.zero)
+                          ),
+                        ),
+                      )),
+                ],
+              ),
+            )
+          ],
+        ));
+  }
+
+  List<Widget> _Ws() {
+    List<Widget> ws = [];
+    ws.add(_mainPatrolAdd());
+    ws.addAll(_item());
+    ws.add(_notes());
+    ws.add(_picture());
+    // ws.add(_url());
+    return ws;
+  }
+
+  Widget _picture(){
+    return Container(
+        child: Column(
+          children: [
+            Container(
+              height: 50,
+              padding: EdgeInsets.only(left: 12),
+              alignment: Alignment.centerLeft,
+              child: Text('巡检图片',style: TextStyle(
+                color: Colors.black,
+                fontSize: GSYConstant.TextSize15,
+              )),
+            ),
+            Container(
+              // padding: EdgeInsets.only(left: 12,right: 12),
+              decoration: BoxDecoration(color: Colors.white),
+              child: PhotoTool(imageCount: 5, lineCount: 5, addCall: (List<AssetEntity> _imageFiles){
+                imageFiles.addAll(_imageFiles);
+              }, removeCall:(int index){
+                imageFiles.remove(index);
+              }),
+            )
+          ],
+        )
+    );
+  }
+
+  Widget _notes(){
+    return Container(
+      child: Column(
+        children: <Widget>[
+          Container(
+            height: 50,
+            padding: EdgeInsets.only(left: 12),
+            alignment: Alignment.centerLeft,
+            child: Text('任务结果备注',style: TextStyle(
+              color: Colors.black,
+              fontSize: GSYConstant.TextSize15,
+            )),
+          ),
+          Container(
+            padding: EdgeInsets.only(left: 12,right: 12,bottom: 12),
+            decoration: BoxDecoration(color: Colors.white),
+            child: Column(
+              children: [
+                const SizedBox(
+                  height: 10,
+                ),
+                TextField(
+                  maxLines: 5,
+                  decoration: InputDecoration(border: OutlineInputBorder()),
+                  style: TextStyle(fontSize: 14),
+                  onChanged: (value) {
+                    note = value;
+                  },
+                )
+              ],
+            ),
+          )
+        ],
+      ),
+    );
+  }
+
+  Widget _mainPatrolAdd(){
+    return Column(
+      children: [
+        Container(
+          padding: EdgeInsets.fromLTRB(12,0, 12, 0),
+          height: 50,
+          child: Row(
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            children: [
+              const Text(
+                '巡检项目:',
+                style: TextStyle(
+                  color: Colors.black,
+                  fontSize: GSYConstant.TextSize15,
+                ),
+              ),
+              Container(
+                child: TextButton(
+                  onPressed: () {
+                    Navigator.push(
+                        context,
+                        MaterialPageRoute(
+                            builder: (context) =>
+                            PatrolJobSelect(id: id,)));
+                  },
+                  child: Row(
+                    children: [
+                      new Icon(Icons.add),
+                      new Text(
+                        '添加项目',
+                        style: TextStyle(
+                          color: Colors.blue,
+                          fontSize: GSYConstant.TextSize15,
+                        ),
+                        textAlign: TextAlign.right,
+                      )
+                    ],
+                  ),
+                ),
+              ),
+            ],
+          ),
+        )
+      ],
+    );
+  }
+
+  List<Widget> _item() {
+    return patrolItemVOS.map((e) => _buildItem(e)).toList();
+  }
+
+  Widget _buildItem(PatrolJobEditEmtityData item) {
+    return FractionallySizedBox(
+        widthFactor: 1,
+        child: Container(
+          padding: const EdgeInsets.fromLTRB(12, 0, 15, 5),
+          decoration: BoxDecoration(color: Colors.white),
+          child: Column(
+            children: [
+              Container(
+                child: Row(
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Text(item.name,
+                        style: TextStyle(
+                            fontSize: GSYConstant.middleTextWhiteSize,
+                            fontWeight: FontWeight.bold)),
+                    IconButton(onPressed: (){
+                      deletePatrolItem(item.id);
+                    }, icon: new Icon(Icons.delete))
+                  ],
+                ),
+
+              ),
+              Container(
+                margin: const EdgeInsets.fromLTRB(0, 10.0, 0, 0),
+                alignment: Alignment.centerLeft,
+                child: Text(
+                  item.result,
+                  style: GSYConstant.smallTextLight,
+                ),
+              ),
+              const SizedBox(
+                height: 5,
+              ),
+              Divider(
+                height: 0.8,
+                color: Colors.grey,
+              ),
+            ],
+          ),
+        ));
+  }
+
+  patrolItem() async {
+    var result = await DioUtil().request('patrolItem/list',
+        method: DioMethod.post, data: {'patrolJobId': id});
+    if (0 == result['code']) {
+      PatrolJobEditEmtityEntity jobEdit=patrolJobEditEmtityEntityFromJson(PatrolJobEditEmtityEntity(),result);
+      setState(() {
+        patrolItemVOS.clear();
+        patrolItemVOS.addAll(jobEdit.data);
+      });
+    } else {
+      showToast(result['msg']);
+    }
+  }
+
+  @override
+  void initState() {
+    super.initState();
+    patrolItem();
+    _event = eventBus.on<RefreshPatrolEdit>().listen((event) {
+      setState(() {
+        patrolItem();
+      });
+    });
+  }
+
+  deletePatrolItem(String id) async {
+    var result = await DioUtil().request('patrolItem/deletePatrolItem',
+        method: DioMethod.post, data: {'id': id});
+    if (result['code'] == 0) {
+      setState(() {
+        patrolItem();
+      });
+    } else {
+      showToast(result['msg']);
+    }
+  }
+
+  @override
+  void dispose() {
+    super.dispose();
+    _event.cancel();
+  }
+
+  uploadList() async {
+    List<MultipartFile> files = [];
+    for (var element in imageFiles) {
+      File? imgFile = await element.file;
+      String? s=imgFile?.path;
+      MultipartFile file =MultipartFile.fromFileSync(s!);
+      files.add(file);
+     }
+    var formData =FormData.fromMap({
+      'files': files
+    });
+    var result = await DioUtil().request('uploadImg/uploadList',
+        method: DioMethod.post, data: formData);
+    if (result['code'] == 0) {
+      UploadListEntityEntity data=uploadListEntityEntityFromJson(UploadListEntityEntity(), result);
+      setState(() {
+        mList.clear();
+        mList.addAll(data.data);
+        patrolJobRemark();
+      });
+    } else {
+      showToast(result['msg']);
+    }
+  }
+
+  patrolJobRemark() async {
+    var result = await DioUtil().request('patrolJob/patrolJobRemark',
+        method: DioMethod.post, data: {'id': id,'fileIds':mList,'remarks':note});
+    if (result['code'] == 0) {
+      setState(() {
+        eventBus.fire(RefreshPatrolEdit());
+        Navigator.of(context)..pop()..pop();
+      });
+    } else {
+      showToast(result['msg']);
+    }
+  }
+
+
+}

+ 97 - 73
lib/page/patrol/patrol_job_list.dart

@@ -4,6 +4,7 @@ import 'package:deus_app/common/utils/ConstantString.dart';
 import 'package:deus_app/common/utils/DioUtil.dart';
 import 'package:deus_app/common/utils/ToastUtils.dart';
 import 'package:deus_app/model/patrol_job_detail_response_entity.dart';
+import 'package:deus_app/page/patrol/patrol_job_edit.dart';
 import 'package:flutter/material.dart';
 
 class PatrolJobList extends StatefulWidget {
@@ -24,86 +25,92 @@ class _PatrolJobList extends State<PatrolJobList> {
 
   @override
   Widget build(BuildContext context) {
-    // TODO: implement build
     return Scaffold(
-        appBar: TitleBar().backAppbar(context, "巡检设备详情"),
+        appBar: TitleBar().backAppbar("巡检设备详情"),
         backgroundColor: const Color(0xfff2f2f2),
-        body: Column(
+        body: Stack(
           children: [
-            SizedBox(
-              height: 10,
-            ),
-            Row(
-              mainAxisAlignment: MainAxisAlignment.start,
+            Column(
               children: [
                 SizedBox(
-                  width: 15,
+                  height: 10,
+                ),
+                Row(
+                  mainAxisAlignment: MainAxisAlignment.start,
+                  children: [
+                    SizedBox(
+                      width: 15,
+                    ),
+                    Text(ConstantString.patrolJobTitle,
+                        style: GSYConstant.smallActionLightText),
+                  ],
                 ),
-                Text(ConstantString.patrolJobTitle,
-                    style: GSYConstant.smallActionLightText),
+                Expanded(
+                  child:  Container(
+                      margin: EdgeInsets.only(bottom: 50),
+                      child: ListView.builder(
+                        itemCount: responseData.equipmentVOS.length,
+                        itemBuilder: (context, index) {
+                          return Container(
+                              margin: EdgeInsets.only(top: 12, left: 10, right: 10),
+                              padding: EdgeInsets.only(top: 12, bottom: 10),
+                              color: Colors.white,
+                              child: ListTile(
+                                title: Column(
+                                  children: [
+                                    Container(
+                                      // padding: const EdgeInsets.fromLTRB(30.0, 0.0, 0.0, 0.0),
+                                      alignment: Alignment.centerLeft,
+                                      child: Row(
+                                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                          children: [
+                                            Text(responseData.equipmentVOS[index].showName,
+                                                style: GSYConstant.smallTextBold),
+                                            Text(
+                                              responseData
+                                                  .equipmentVOS[index].isComplete==0?'未完成':'已完成',
+                                              style: TextStyle(
+                                                  fontSize: GSYConstant.smallTextSize,
+                                                  color: responseData.equipmentVOS[index].isComplete==0?Colors.red:Colors.blue),
+                                            ),
+                                          ]),
+                                    ),
+                                    Container(
+                                      margin: const EdgeInsets.only(top: 10),
+                                      // padding: const EdgeInsets.fromLTRB(30.0, 0.0, 0.0, 10.0),
+                                      // alignment: Alignment.centerLeft,
+                                      child: Row(
+                                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                          children: [
+                                            new Text(
+                                              '完成时间:',
+                                              style: GSYConstant.smallTextLight,
+                                            ),
+                                            Container(
+                                              child: Text(
+                                                responseData.equipmentVOS[index].itemCompleteTime,
+                                                style: GSYConstant.smallTextLight,
+                                                textAlign: TextAlign.right,
+                                              ),
+                                            ),
+                                          ]),
+                                    ),
+                                    SizedBox(
+                                      height: 5,
+                                    ),
+                                  ],
+                                ),
+                                onTap: () {
+                                  completeEquipment(index);
+                                },
+                              ));
+                        },
+                      )
+                  ),
+                )
+
               ],
             ),
-            Expanded(child: Container(
-                margin: EdgeInsets.only(bottom: 60),
-                child: ListView.builder(
-                  itemCount: responseData.equipmentVOS.length,
-                  itemBuilder: (context, index) {
-                    return Container(
-                        margin: EdgeInsets.only(top: 12, left: 10, right: 10),
-                        padding: EdgeInsets.only(top: 12, bottom: 10),
-                        color: Colors.white,
-                        child: ListTile(
-                          title: Column(
-                            children: [
-                              Container(
-                                // padding: const EdgeInsets.fromLTRB(30.0, 0.0, 0.0, 0.0),
-                                alignment: Alignment.centerLeft,
-                                child: Row(
-                                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
-                                    children: [
-                                      Text(responseData.equipmentVOS[index].showName,
-                                          style: GSYConstant.smallTextBold),
-                                      Text(
-                                        responseData
-                                            .equipmentVOS[index].isComplete==0?'未完成':'已完成',
-                                        style: TextStyle(
-                                            fontSize: GSYConstant.smallTextSize,
-                                            color: responseData.equipmentVOS[index].isComplete==0?Colors.red:Colors.blue),
-                                      ),
-                                    ]),
-                              ),
-                              Container(
-                                margin: const EdgeInsets.only(top: 10),
-                                // padding: const EdgeInsets.fromLTRB(30.0, 0.0, 0.0, 10.0),
-                                // alignment: Alignment.centerLeft,
-                                child: Row(
-                                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
-                                    children: [
-                                      new Text(
-                                        '完成时间:',
-                                        style: GSYConstant.smallTextLight,
-                                      ),
-                                      Container(
-                                        child: Text(
-                                          responseData.equipmentVOS[index].itemCompleteTime,
-                                          style: GSYConstant.smallTextLight,
-                                          textAlign: TextAlign.right,
-                                        ),
-                                      ),
-                                    ]),
-                              ),
-                              SizedBox(
-                                height: 5,
-                              ),
-                            ],
-                          ),
-                          onTap: () {
-                            completeEquipment(index);
-                          },
-                        ));
-                  },
-                )
-            )),
             Positioned(
               left: 0,
               right: 0,
@@ -114,7 +121,13 @@ class _PatrolJobList extends State<PatrolJobList> {
               width: double.infinity,
               child: TextButton(
                 onPressed: () {
-
+                  if(next()){
+                    Navigator.push(
+                        context,
+                        MaterialPageRoute(
+                            builder: (context) =>
+                                PatrolJobEdit(id: responseData.id)));
+                  }
                 },
                 style: ButtonStyle(
                   backgroundColor: MaterialStateProperty.all<Color>(
@@ -148,4 +161,15 @@ class _PatrolJobList extends State<PatrolJobList> {
       }
     }
   }
+
+  bool next(){
+    bool isNext=true;
+    for (var element in responseData.equipmentVOS) {
+        if(element.isComplete==0){
+          isNext=false;
+          break;
+        }
+    }
+    return isNext;
+  }
 }

+ 7 - 4
lib/page/patrol/patrol_job_page.dart

@@ -39,18 +39,21 @@ class _PatrolJobPage extends State<PatrolJobPage> {
 
   _load() async {
     var result = await DioUtil().request('patrolJob/appPatrolJobList',
-        method: DioMethod.post, data: {'query': query, 'index': 1, 'size': 20});
+        method: DioMethod.post, data: {'query': query, 'index': index, 'size': 20});
     _refreshController.loadComplete();
     _refreshController.refreshCompleted();
     patrolJobResponse = PatrolJobResponse.fromJson(result);
     if(patrolJobResponse.code==0){
       setState(() {
-        if(index==0){
+        if(index==1){
           patrol_job_list.clear();
         }
         patrol_job_list.addAll(patrolJobResponse.data!.patrolJobVOS!);
       });
     }else{
+      if(index>1){
+        index--;
+      }
       showToast(patrolJobResponse.msg!);
     }
     //var patrolJobResponse = PatrolJobResponse.fromJson(result);
@@ -64,7 +67,7 @@ class _PatrolJobPage extends State<PatrolJobPage> {
     _load();
     _event = eventBus.on<RefreshPatrol>().listen((event) {
       setState(() {
-        index=0;
+        index=1;
         _load();
       });
     });
@@ -83,6 +86,7 @@ class _PatrolJobPage extends State<PatrolJobPage> {
             query.number=deviceNo;
             query.status=stase;
             query.termType=termType;
+            index=1;
             _load();
           });
         }),
@@ -326,7 +330,6 @@ class _PatrolJobPage extends State<PatrolJobPage> {
 
   @override
   void dispose() {
-    // TODO: implement dispose
     super.dispose();
     _event.cancel();
   }

+ 203 - 0
lib/page/patrol/patrol_job_select.dart

@@ -0,0 +1,203 @@
+import 'package:deus_app/common/style/TitleBar.dart';
+import 'package:deus_app/common/style/gsy_style.dart';
+import 'package:deus_app/common/utils/DioUtil.dart';
+import 'package:deus_app/common/utils/ToastUtils.dart';
+import 'package:deus_app/generated/json/patrol_job_select_entity_entity_helper.dart';
+import 'package:deus_app/model/patrol_job_select_entity_entity.dart';
+import 'package:deus_app/page/patrol/patrol_job_add.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:pull_to_refresh/pull_to_refresh.dart';
+
+class PatrolJobSelect extends StatefulWidget {
+
+  var id;
+
+  @override
+  State createState() {
+    return _PatrolJobSelect(id);
+  }
+  PatrolJobSelect({super.key, required this.id});
+}
+
+class _PatrolJobSelect extends State<PatrolJobSelect> {
+
+  var id;
+
+  _PatrolJobSelect(this.id);
+
+  final RefreshController _refreshController =
+      RefreshController(initialRefresh: false);
+  int index = 1;
+
+  List<PatrolJobSelectEntityDataPatrolItemModelVOS> patrolItemModelVOS = [];
+
+  PatrolJobSelectEntityEntity jobEdit = PatrolJobSelectEntityEntity();
+
+  @override
+  void initState() {
+    super.initState();
+    patrolItemModel();
+  }
+
+  patrolItemModel() async {
+    var result = await DioUtil().request('patrolItemModel/list',
+        method: DioMethod.post, data: {'index': index, 'size': 20});
+    _refreshController.loadComplete();
+    _refreshController.refreshCompleted();
+    if (0 == result['code']) {
+      setState(() {
+        jobEdit = patrolJobSelectEntityEntityFromJson(
+            PatrolJobSelectEntityEntity(), result);
+        patrolItemModelVOS.clear();
+        patrolItemModelVOS.addAll(jobEdit.data.patrolItemModelVOS);
+      });
+    } else {
+      if (index > 1) {
+        index--;
+      }
+      showToast(result['msg']);
+    }
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+        appBar: TitleBar().backAppbar("选择巡检项目"),
+        backgroundColor: const Color(0xfff2f2f2),
+        body: Stack(
+          children: [
+            Container(
+                    child: SmartRefresher(
+              enablePullDown: true,
+              enablePullUp: true,
+              header: WaterDropHeader(),
+              footer: CustomFooter(
+                builder: (BuildContext context, LoadStatus? mode) {
+                  Widget body;
+                  if (mode == LoadStatus.idle) {
+                    body = Text("上拉加载");
+                  } else if (mode == LoadStatus.loading) {
+                    body = CupertinoActivityIndicator();
+                  } else if (mode == LoadStatus.failed) {
+                    body = Text("加载失败!点击重试!");
+                  } else if (mode == LoadStatus.canLoading) {
+                    body = Text("松手,加载更多!");
+                  } else {
+                    body = Text("没有更多数据了!");
+                  }
+                  return Container(
+                    height: 55.0,
+                    child: Center(child: body),
+                  );
+                },
+              ),
+              controller: _refreshController,
+              onRefresh: _onRefresh,
+              onLoading: _onLoading,
+              child: ListView.builder(
+                itemCount: patrolItemModelVOS.length,
+                itemBuilder: (context, index) {
+                  return _patrol_job_list(index);
+                },
+              ),
+            ))
+          ],
+        ));
+  }
+
+  void _onRefresh() async {
+    if (mounted) {
+      setState(() {
+        index = 0;
+        patrolItemModel();
+      });
+    }
+  }
+
+  void _onLoading() async {
+    if (mounted) {
+      setState(() {
+        if (jobEdit.data.total > patrolItemModelVOS.length) {
+          index++;
+          patrolItemModel();
+        } else {
+          _refreshController.loadNoData();
+        }
+      });
+    }
+  }
+
+  Widget _patrol_job_list(int index) {
+    return Container(
+        margin: EdgeInsets.only(top: 12, left: 10, right: 10),
+        padding: EdgeInsets.only(top: 12, bottom: 10),
+        color: Colors.white,
+        child: ListTile(
+          title: Column(
+            children: [
+              Container(
+                // padding: const EdgeInsets.fromLTRB(30.0, 0.0, 0.0, 0.0),
+                alignment: Alignment.centerLeft,
+                child: Text(
+                  patrolItemModelVOS[index].name,
+                  style: const TextStyle(
+                    fontSize: GSYConstant.smallTextSize,
+                    color: Colors.black,
+                  ),
+                ),
+              ),
+              Container(
+                margin: const EdgeInsets.only(top: 10),
+                // padding: const EdgeInsets.fromLTRB(30.0, 0.0, 0.0, 10.0),
+                // alignment: Alignment.centerLeft,
+                alignment: Alignment.centerLeft,
+                child: Text(
+                  patrolItemModelVOS[index].params,
+                  style: GSYConstant.smallTextLight,
+                  textAlign: TextAlign.left,
+                ),
+              ),
+              SizedBox(
+                height: 10,
+              ),
+              Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
+                Container(
+                  child: Text(
+                    '类型:',
+                    style: TextStyle(
+                      color: GSYColors.primaryLightValue,
+                      fontSize: GSYConstant.smallTextSize,
+                    ),
+                  ),
+                ),
+                Container(
+                  child: Text(
+                    patrolItemModelVOS[index].type == 0
+                        ? '数值'
+                        : patrolItemModelVOS[index].type == 1
+                            ? '长文本'
+                            : patrolItemModelVOS[index].type == 2
+                                ? '单选'
+                                : '多选',
+                    textAlign: TextAlign.right,
+                    style: TextStyle(
+                      color: GSYColors.primaryLightValue,
+                      fontSize: GSYConstant.smallTextSize,
+                    ),
+                  ),
+                ),
+              ]),
+            ],
+          ),
+          onTap: () {
+            Navigator.push(
+                context,
+                MaterialPageRoute(
+                    builder: (context) =>
+                        PatrolJobAdd(responseData: patrolItemModelVOS[index], id: id,)));
+          },
+        ));
+  }
+
+}

+ 325 - 0
lib/page/repair/repair_add_page.dart

@@ -0,0 +1,325 @@
+import 'package:deus_app/PhotoTool.dart';
+import 'package:deus_app/common/style/TitleBar.dart';
+import 'package:deus_app/common/style/gsy_style.dart';
+import 'package:deus_app/common/utils/ConstantString.dart';
+import 'package:deus_app/page/repair/repair_job_device_list.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:wechat_assets_picker/wechat_assets_picker.dart';
+
+class RepairAddPage extends StatefulWidget {
+  const RepairAddPage({super.key});
+
+  @override
+  State<StatefulWidget> createState() {
+    return _RepairAddPage();
+  }
+}
+
+class _RepairAddPage extends State<RepairAddPage> {
+
+  int groupValue = 1;
+  String note='',theme='';
+  List<AssetEntity> imageFiles = [];
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+        appBar: TitleBar().backAppbar("新建报修"),
+        backgroundColor: const Color(0xfff2f2f2),
+        body: Stack(children: [
+          Column(
+            children: [
+              Expanded(
+                // flex: 7,
+                child: ListView(
+                  children: _Ws(),
+                ),
+              ),
+            ],
+          ),
+          Positioned(
+            left: 0,
+            right: 0,
+            bottom:0,
+            // flex: 7,
+            child:SizedBox(
+              height: 50,
+              width: double.infinity,
+              child: TextButton(
+                onPressed: () {
+
+                },
+                style: ButtonStyle(
+                  backgroundColor: MaterialStateProperty.all<Color>(
+                      Color(0xFF4875EC)),
+                  shape: MaterialStateProperty.all(
+                      BeveledRectangleBorder(
+                          borderRadius: BorderRadius.circular(0))),
+                  foregroundColor:
+                  MaterialStateProperty.all<Color>(Colors.white),
+                ),
+                child: const Text(ConstantString.submit),
+              ),
+            ),
+          )
+        ]));
+  }
+
+  List<Widget> _Ws() {
+    List<Widget> ws = [];
+    ws.add(_basicInformation());
+    ws.add(_patrolAddTitle());
+    // ws.add(_patrolAdd());
+    ws.add(_notes());
+    return ws;
+  }
+
+  Widget _notes(){
+    return Container(
+      child: Column(
+        children: <Widget>[
+          Container(
+            height: 50,
+            padding: EdgeInsets.only(left: 12),
+            alignment: Alignment.centerLeft,
+            child: Text('报修说明',style: TextStyle(
+              color: Colors.black,
+              fontSize: GSYConstant.TextSize15,
+            )),
+          ),
+          Container(
+            padding: EdgeInsets.only(left: 12,right: 12,bottom: 12),
+            decoration: BoxDecoration(color: Colors.white),
+            child: Column(
+              children: [
+                const SizedBox(
+                  height: 10,
+                ),
+                TextField(
+                  maxLines: 5,
+                  decoration: InputDecoration(border: OutlineInputBorder()),
+                  style: TextStyle(fontSize: 14),
+                  onChanged: (value) {
+                    note = value;
+                  },
+                )
+              ],
+            ),
+          ),
+          Container(
+            // padding: EdgeInsets.only(left: 12,right: 12),
+            decoration: BoxDecoration(color: Colors.white),
+            child: PhotoTool(imageCount: 5, lineCount: 5, addCall: (List<AssetEntity> _imageFiles){
+              imageFiles.addAll(_imageFiles);
+            }, removeCall:(int index){
+              imageFiles.remove(index);
+            }),
+          )
+        ],
+      ),
+    );
+  }
+
+  Widget _basicInformation() {
+    return Column(children: [
+      Container(
+        height: 50,
+        padding: EdgeInsets.only(left: 12),
+        alignment: Alignment.centerLeft,
+        child: const Text(
+          '基本信息:',
+          style: TextStyle(
+            color: Colors.black,
+            fontSize: GSYConstant.TextSize15,
+          ),
+        ),
+      ),
+      Container(
+        color: Colors.white,
+        padding: EdgeInsets.only(left: 12, right: 12),
+        child: Column(
+          children: [
+            Row(
+              children: [
+                Text(
+                  '紧急程度:',
+                  style: TextStyle(
+                    color: GSYColors.primaryLightValue,
+                    fontSize: GSYConstant.TextSize15,
+                  ),
+                ),
+                Radio(
+                  value: 1,
+                  groupValue: groupValue,
+                  onChanged: (value) {
+                    // groupValue = value;
+                    setState(() {
+                      groupValue = value!;
+                    });
+                  },
+                ),
+                Text("一般",
+                    style: TextStyle(
+                      color: GSYColors.primaryLightValue,
+                      fontSize: GSYConstant.TextSize15,
+                    )),
+                Radio(
+                  value: 2,
+                  groupValue: groupValue,
+                  onChanged: (value) {
+                    // groupValue = value;
+                    setState(() {
+                      groupValue = value!;
+                    });
+                  },
+                ),
+                Text("紧急",
+                    style: TextStyle(
+                      color: GSYColors.primaryLightValue,
+                      fontSize: GSYConstant.smallTextSize,
+                    ))
+              ],
+            ),
+            const SizedBox(
+              height: 10,
+            ),
+            Row(children: [
+              Text(
+                '报修主题:',
+                style: TextStyle(
+                  color: GSYColors.primaryLightValue,
+                  fontSize: GSYConstant.TextSize15,
+                ),
+              ),
+              const SizedBox(
+                width: 15,
+              ),
+              Container(
+                height: 40,
+                width: MediaQuery.of(context).size.width / 2 +
+                    MediaQuery.of(context).size.width / 8,
+                child: TextField(
+                  decoration: InputDecoration(
+                      border: OutlineInputBorder(),
+                      hintText: '请输入报修主题',
+                      contentPadding: EdgeInsets.only(
+                          bottom: 20, left: 10 // HERE THE IMPORTANT PART
+                          )),
+                  style: TextStyle(fontSize: 14),
+                  textAlignVertical: TextAlignVertical.center,
+                  textAlign: TextAlign.left,
+                  onChanged: (value) {
+                    theme=value;
+                  },
+                ),
+              )
+            ]),
+            const SizedBox(
+              height: 10,
+            ),
+          ],
+        ),
+      )
+    ]);
+  }
+
+  Widget _patrolAddTitle() {
+    return Container(
+      padding: EdgeInsets.fromLTRB(12, 0, 12, 0),
+      height: 50,
+      child: Row(
+        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+        children: [
+          const Text(
+            '报修设备:',
+            style: TextStyle(
+              color: Colors.black,
+              fontSize: GSYConstant.TextSize15,
+            ),
+          ),
+          Container(
+            child: TextButton(
+              onPressed: () {
+                Navigator.push(
+                    context,
+                    MaterialPageRoute(
+                        builder: (context) =>
+                        new RepairJobDeviceList()));
+              },
+              child: Row(
+                children: [
+                  new Icon(Icons.add),
+                  new Text(
+                    '选择设备',
+                    style: TextStyle(
+                      color: Colors.blue,
+                      fontSize: GSYConstant.TextSize15,
+                    ),
+                    textAlign: TextAlign.right,
+                  )
+                ],
+              ),
+            ),
+          ),
+        ],
+      ),
+    );
+  }
+
+  Widget _patrolAdd() {
+    return Container(
+      padding: EdgeInsets.only(top: 12, bottom: 12, left: 12, right: 12),
+      color: Colors.white,
+      child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
+        Container(
+          child: Text(
+            '',
+            style: const TextStyle(
+              color: Colors.black,
+              fontSize: GSYConstant.middleTextWhiteSize,
+              fontWeight: FontWeight.bold,
+            ),
+          ),
+        ),
+        Container(
+          padding: EdgeInsets.only(top: 3, bottom: 3, left: 5, right: 5),
+          child: Text(""
+              // equipmentVOS[index].status == 0
+              //     ? '在线'
+              //     : equipmentVOS[index].status == 1
+              //     ? '离线'
+              //     : equipmentVOS[index].status == 2
+              //     ? '未激活'
+              //     : '未知',
+              // textAlign: TextAlign.right,
+              // style: TextStyle(
+              //   color: equipmentVOS[index].status == 0
+              //       ? Colors.blue
+              //       : equipmentVOS[index].status == 1
+              //       ? Colors.orange
+              //       : equipmentVOS[index].status == 2
+              //       ? Colors.red
+              //       : Colors.black,
+              //   fontSize: GSYConstant.minTextSize,
+              // ),
+              ),
+          // decoration: BoxDecoration(
+          //   border: new Border.all(
+          //     color: equipmentVOS[index].status == 0
+          //         ? Colors.blue
+          //         : equipmentVOS[index].status == 1
+          //         ? Colors.orange
+          //         : equipmentVOS[index].status == 2
+          //         ? Colors.red
+          //         : Colors.black, //边框颜色
+          //     width: 1.0, //边框粗细
+          //   ),
+          //   borderRadius: const BorderRadius.all(
+          //       const Radius.circular(3.0)), //边框的弧度
+          // ),
+        )
+      ]),
+    );
+  }
+}

+ 127 - 0
lib/page/repair/repair_job_device_list.dart

@@ -0,0 +1,127 @@
+import 'package:deus_app/common/style/TitleBar.dart';
+import 'package:deus_app/common/style/gsy_style.dart';
+import 'package:deus_app/common/utils/DioUtil.dart';
+import 'package:deus_app/common/utils/ToastUtils.dart';
+import 'package:deus_app/generated/json/repair_query_device_response_entity_helper.dart';
+import 'package:deus_app/model/repair_query_device_response_entity.dart';
+import 'package:flutter/material.dart';
+
+class RepairJobDeviceList extends StatefulWidget {
+
+  @override
+  State createState() {
+    return new _RepairJobDeviceList();
+  }
+
+}
+
+class _RepairJobDeviceList extends State<RepairJobDeviceList> {
+
+  RepairQueryDeviceResponseEntity data=RepairQueryDeviceResponseEntity();
+
+  List<RepairQueryDeviceResponseDataList>mList=[];
+
+  @override
+  void initState() {
+    super.initState();
+    patrolItemModel();
+  }
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: TitleBar().backAppbar("添加巡检项目"),
+        body: Expanded(
+        child: Container(
+          child: ListView.builder(
+            itemCount: mList.length,
+            itemBuilder: (context, index) {
+              return Container(
+                  margin: EdgeInsets.only(top: 12, left: 10, right: 10),
+                  padding: EdgeInsets.only(top: 12, bottom: 10),
+                  color: Colors.white,
+                  child: ListTile(
+                    title: Column(
+                      children: [
+                        Row(
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                            children: [
+                              Container(
+                                child: Text(
+                                  mList[index].showName,
+                                  style: const TextStyle(
+                                    color: Colors.black,
+                                    fontSize: GSYConstant.middleTextWhiteSize,
+                                    fontWeight: FontWeight.bold,
+                                  ),
+                                ),
+                              ),
+                              Container(
+                                padding: EdgeInsets.only(
+                                    top: 3, bottom: 3, left: 5, right: 5),
+                                child: Text(
+                                  mList[index].status == 0
+                                      ? '在线'
+                                      : mList[index].status == 1
+                                      ? '离线'
+                                      : mList[index].status == 2
+                                      ? '未激活'
+                                      : '未知',
+                                  textAlign: TextAlign.right,
+                                  style: TextStyle(
+                                    color: mList[index].status == 0
+                                        ? Colors.blue
+                                        : mList[index].status == 1
+                                        ? Colors.orange
+                                        : mList[index].status == 2
+                                        ? Colors.red
+                                        : Colors.black,
+                                    fontSize: GSYConstant.minTextSize,
+                                  ),
+                                ),
+                                decoration: BoxDecoration(
+                                  border: new Border.all(
+                                    color: mList[index].status == 0
+                                        ? Colors.blue
+                                        : mList[index].status == 1
+                                        ? Colors.orange
+                                        : mList[index].status == 2
+                                        ? Colors.red
+                                        : Colors.black, //边框颜色
+                                    width: 1.0, //边框粗细
+                                  ),
+                                  borderRadius: const BorderRadius.all(
+                                      const Radius.circular(3.0)), //边框的弧度
+                                ),
+                              )
+                            ]),
+                        SizedBox(
+                          height: 5,
+                        ),
+                      ],
+                    ),
+                    onTap: () {
+
+                    },
+                  ));
+            },
+          ),
+        )
+        )
+    );
+  }
+
+  patrolItemModel() async {
+    var result = await DioUtil().request('repair-bill/query-device',
+        method: DioMethod.post, data: {'index': 1, 'size': 50});
+    if (0 == result['code']) {
+      setState(() {
+        data = repairQueryDeviceResponseEntityFromJson(
+            RepairQueryDeviceResponseEntity(), result);
+        mList.clear();
+        mList.addAll(data.data.xList);
+      });
+    } else {
+      showToast(result['msg']);
+    }
+  }
+}

+ 175 - 49
lib/page/repair/repair_page.dart

@@ -1,13 +1,18 @@
 //巡检任务列表
 import 'package:deus_app/common/style/TitleBar.dart';
+import 'package:deus_app/generated/json/repair_bill_list_response_entity_helper.dart';
+import 'package:deus_app/model/repair_bill_list_response_entity.dart';
 import 'package:deus_app/page/patrol/patrol_job_detail.dart';
+import 'package:deus_app/page/repair/repair_add_page.dart';
+import 'package:deus_app/widget/RepairJobDrawer.dart';
+import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
+import 'package:pull_to_refresh/pull_to_refresh.dart';
 
 import '../../common/style/gsy_style.dart';
 import '../../common/utils/ConstantString.dart';
 import '../../common/utils/DioUtil.dart';
 import '../../common/utils/ToastUtils.dart';
-import '../../model/patrol_response_entity.dart';
 
 class RepairPage extends StatefulWidget {
   const RepairPage({super.key});
@@ -20,30 +25,49 @@ class RepairPage extends StatefulWidget {
   }
 }
 
-List<PatrolJobData> patrol_job_list = <PatrolJobData>[];
+List<RepairBillListResponseDataList> patrol_job_list =
+    <RepairBillListResponseDataList>[];
 
 class _RepairPage extends State<RepairPage> {
   final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
+  final RefreshController _refreshController =
+      RefreshController(initialRefresh: false);
+  int index = 1;
+  RepairBillListResponseEntity patrolJobResponse =
+      RepairBillListResponseEntity();
+
+  dynamic _status;
+  String _theme = '';
+  String _repNum = '';
 
   _load() async {
-    var result = await DioUtil().request('patrolJob/appPatrolJobList',
-        method: DioMethod.post, data: {'query': {}, 'index': 1, 'size': 20});
-    PatrolJobResponse patrolJobResponse = PatrolJobResponse.fromJson(result);
+    var result = await DioUtil()
+        .request('repair-bill/list', method: DioMethod.post, data: {
+      'query': {'theme': _theme, 'repNum': _repNum, 'status': _status},
+      'index': index,
+      'size': 20
+    });
+    _refreshController.loadComplete();
+    _refreshController.refreshCompleted();
+    patrolJobResponse = repairBillListResponseEntityFromJson(
+        RepairBillListResponseEntity(), result);
     if (patrolJobResponse.code == 0) {
       setState(() {
-        patrol_job_list.clear();
-        patrol_job_list.addAll(patrolJobResponse.data!.patrolJobVOS!);
+        if (index == 1) {
+          patrol_job_list.clear();
+        }
+        patrol_job_list.addAll(patrolJobResponse.data.xList);
       });
     } else {
+      if (index > 1) {
+        index--;
+      }
       showToast(patrolJobResponse.msg!);
     }
-    //var patrolJobResponse = PatrolJobResponse.fromJson(result);
-    //print(patrolJobResponse);
   }
 
   @override
   void initState() {
-    // TODO: implement initState
     super.initState();
     _load();
   }
@@ -55,29 +79,108 @@ class _RepairPage extends State<RepairPage> {
         appBar: TitleBar().drawAppBar(ConstantString.patrolJobText, () {
           _scaffoldKey.currentState?.openEndDrawer();
         }),
-        // endDrawer: PatrolJobDrawer(
-        //   callback: (index, str) {
-        //     showToast(str);
-        //   },
-        // ),
+        endDrawer: RepairJobDrawer(
+            callback: (String theme, String repNum, dynamic status) {
+          setState(() {
+            _theme = theme;
+            _repNum = repNum;
+            _status = status;
+            index=1;
+            _load();
+          });
+        }),
         //抽屉
         backgroundColor: const Color(0xfff2f2f2),
-        body: Column(
+        body: Stack(
           children: [
-            Expanded(
-                child: Container(
-                    child: ListView.builder(
-              itemCount: patrol_job_list.length,
-              itemBuilder: (context, index) {
-                PatrolJobData patrolJobData = patrol_job_list[index];
-                return _patrol_job_list(patrolJobData);
-              },
-            )))
+            Column(children: [
+              SizedBox(
+                height: 10,
+              ),
+              Row(
+                mainAxisAlignment: MainAxisAlignment.start,
+                children: [
+                  SizedBox(
+                    width: 15,
+                  ),
+                  Text(ConstantString.repairJobTitle,
+                      style: GSYConstant.smallActionLightText),
+                ],
+              ),
+              Expanded(
+                  child: Container(
+                      margin: EdgeInsets.only(bottom: 50),
+                      child: SmartRefresher(
+                        enablePullDown: true,
+                        enablePullUp: true,
+                        header: WaterDropHeader(),
+                        footer: CustomFooter(
+                          builder: (BuildContext context, LoadStatus? mode) {
+                            Widget body;
+                            if (mode == LoadStatus.idle) {
+                              body = Text("上拉加载");
+                            } else if (mode == LoadStatus.loading) {
+                              body = CupertinoActivityIndicator();
+                            } else if (mode == LoadStatus.failed) {
+                              body = Text("加载失败!点击重试!");
+                            } else if (mode == LoadStatus.canLoading) {
+                              body = Text("松手,加载更多!");
+                            } else {
+                              body = Text("没有更多数据了!");
+                            }
+                            return Container(
+                              height: 55.0,
+                              child: Center(child: body),
+                            );
+                          },
+                        ),
+                        controller: _refreshController,
+                        onRefresh: _onRefresh,
+                        onLoading: _onLoading,
+                        child: ListView.builder(
+                          itemCount: patrol_job_list.length,
+                          itemBuilder: (context, index) {
+                            RepairBillListResponseDataList patrolJobData =
+                                patrol_job_list[index];
+                            return _patrol_job_list(patrolJobData);
+                          },
+                        ),
+                      ))),
+            ]),
+            Positioned(
+              left: 0,
+              right: 0,
+              bottom: 0,
+              // flex: 7,
+              child: SizedBox(
+                height: 50,
+                width: double.infinity,
+                child: TextButton(
+                  onPressed: () {
+                    Navigator.push(
+                        context,
+                        MaterialPageRoute(
+                            builder: (context) =>
+                            new RepairAddPage()));
+                  },
+                  style: ButtonStyle(
+                    backgroundColor:
+                        MaterialStateProperty.all<Color>(Color(0xFF4875EC)),
+                    shape: MaterialStateProperty.all(BeveledRectangleBorder(
+                        borderRadius: BorderRadius.circular(0))),
+                    foregroundColor:
+                        MaterialStateProperty.all<Color>(Colors.white),
+                    // padding: MaterialStateProperty.all(EdgeInsets.zero)
+                  ),
+                  child: const Text(ConstantString.newRepair),
+                ),
+              ),
+            )
           ],
         ));
   }
 
-  Widget _patrol_job_list(PatrolJobData patrolJobData) {
+  Widget _patrol_job_list(RepairBillListResponseDataList patrolJobData) {
     return Container(
         margin: EdgeInsets.only(top: 12, left: 10, right: 10),
         padding: EdgeInsets.only(top: 12, bottom: 10),
@@ -88,7 +191,7 @@ class _RepairPage extends State<RepairPage> {
               Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
                 Container(
                   child: Text(
-                    patrolJobData.name!,
+                    patrolJobData.theme,
                     style: TextStyle(
                       color: Colors.black,
                       fontSize: GSYConstant.middleTextWhiteSize,
@@ -100,26 +203,27 @@ class _RepairPage extends State<RepairPage> {
                   padding:
                       EdgeInsets.only(top: 3, bottom: 3, left: 5, right: 5),
                   child: Text(
-                    patrolJobData.status == 0
-                        ? '已关闭'
-                        : patrolJobData.status == 1
-                            ? '执行'
-                            : patrolJobData.status == 2
-                                ? '已完成'
-                                : patrolJobData.status == 3
-                                    ? '待执行'
-                                    : patrolJobData.status == 4
-                                        ? '已逾期'
+                    patrolJobData.status == 1
+                        ? '待接单'
+                        : patrolJobData.status == 2
+                            ? '执行'
+                            : patrolJobData.status == 3
+                                ? '维修中'
+                                : patrolJobData.status == 4
+                                    ? '已关闭'
+                                    : patrolJobData.status == 5
+                                        ? '已完成'
                                         : '未知',
                     textAlign: TextAlign.right,
                     style: TextStyle(
                       color:
-                          patrolJobData.status == 0 || patrolJobData.status == 4
+                          patrolJobData.status == 1 || patrolJobData.status == 2
                               ? Colors.red
-                              : patrolJobData.status == 1
+                              : patrolJobData.status == 3
                                   ? Colors.orange
-                                  : patrolJobData.status == 2
-                                      ? Colors.green
+                                  : patrolJobData.status == 4 ||
+                                          patrolJobData.status == 5
+                                      ? Colors.blue
                                       : Colors.black, //边框颜色
                       fontSize: GSYConstant.minTextSize,
                     ),
@@ -127,12 +231,13 @@ class _RepairPage extends State<RepairPage> {
                   decoration: BoxDecoration(
                     border: new Border.all(
                       color:
-                          patrolJobData.status == 0 || patrolJobData.status == 4
+                          patrolJobData.status == 1 || patrolJobData.status == 2
                               ? Colors.red
-                              : patrolJobData.status == 1
+                              : patrolJobData.status == 3
                                   ? Colors.orange
-                                  : patrolJobData.status == 2
-                                      ? Colors.green
+                                  : patrolJobData.status == 4 ||
+                                          patrolJobData.status == 5
+                                      ? Colors.blue
                                       : Colors.black, //边框颜色
                       width: 1.0, //边框粗细
                     ),
@@ -156,7 +261,7 @@ class _RepairPage extends State<RepairPage> {
                 ),
                 Container(
                   child: Text(
-                    patrolJobData.number!,
+                    patrolJobData.repNum,
                     textAlign: TextAlign.right,
                     style: TextStyle(
                       color: GSYColors.primaryLightValue,
@@ -180,7 +285,7 @@ class _RepairPage extends State<RepairPage> {
                 ),
                 Container(
                   child: Text(
-                    patrolJobData.startDate!,
+                    patrolJobData.deviceName,
                     textAlign: TextAlign.right,
                     style: TextStyle(
                       color: GSYColors.primaryLightValue,
@@ -204,7 +309,7 @@ class _RepairPage extends State<RepairPage> {
                 ),
                 Container(
                   child: Text(
-                    patrolJobData.endDate!,
+                    patrolJobData.applicationTime,
                     textAlign: TextAlign.right,
                     style: TextStyle(
                       color: GSYColors.primaryLightValue,
@@ -228,7 +333,7 @@ class _RepairPage extends State<RepairPage> {
                 ),
                 Container(
                   child: Text(
-                    patrolJobData.endDate!,
+                    patrolJobData.applicant,
                     textAlign: TextAlign.right,
                     style: TextStyle(
                       color: GSYColors.primaryLightValue,
@@ -251,4 +356,25 @@ class _RepairPage extends State<RepairPage> {
           },
         ));
   }
+
+  void _onRefresh() async {
+    if (mounted) {
+      setState(() {
+        index = 1;
+        _load();
+      });
+    }
+  }
+  void _onLoading() async {
+    if (mounted) {
+      setState(() {
+        if (patrolJobResponse.data!.total! > patrol_job_list.length) {
+          index++;
+          _load();
+        } else {
+          _refreshController.loadNoData();
+        }
+      });
+    }
+  }
 }

+ 236 - 0
lib/widget/RepairJobDrawer.dart

@@ -0,0 +1,236 @@
+import 'package:deus_app/common/style/gsy_style.dart';
+import 'package:deus_app/common/utils/ConstantString.dart';
+import 'package:flutter/material.dart';
+
+import '../model/drop_menu_item.dart';
+
+class RepairJobDrawer extends StatefulWidget {
+  final _CallBack callback;
+
+  const RepairJobDrawer({super.key, required this.callback});
+
+  @override
+  State createState() {
+    return _repairJobDrawer();
+  }
+}
+
+DropMenuItem not = DropMenuItem('待接单', 1);
+DropMenuItem close = DropMenuItem('待执行', 2);
+DropMenuItem on = DropMenuItem('维修中', 3);
+DropMenuItem overdue = DropMenuItem('已关闭', 4);
+DropMenuItem complete = DropMenuItem('已完成', 5);
+List<DropMenuItem> sexMenuItems = [not, close, on, overdue, complete];
+
+typedef _CallBack = void Function(String device, String name,dynamic stase);
+
+class _repairJobDrawer extends State<RepairJobDrawer> {
+  @override
+  Widget build(BuildContext context) {
+    return Drawer(
+      child: MediaQuery.removePadding(
+        context: context,
+        //移除抽屉菜单顶部默认留白
+        removeTop: true,
+        child: Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: <Widget>[
+            Padding(
+              padding: const EdgeInsets.only(top: 65.0, left: 10, right: 10),
+              child: Row(children: [
+                Expanded(
+                  flex: 2,
+                  child: Text(
+                    '报修主题',
+                    style: TextStyle(
+                      color: Colors.black,
+                      fontSize: GSYConstant.minTextSize,
+                      fontWeight: FontWeight.bold,
+                    ),
+                  ),
+                ),
+                Expanded(
+                  child: Container(
+                    height: 40,
+                    child: TextField(
+                      decoration: InputDecoration(
+                        border: OutlineInputBorder(),
+                      ),
+                      style: TextStyle(fontSize: 14),
+                      onChanged: (value) {
+                        setState(() {
+                          _theme = value;
+                        });
+                      },
+                    ),
+                  ),
+                  flex: 7,
+                ),
+              ]),
+            ),
+            Padding(
+              padding: const EdgeInsets.only(top: 20.0, left: 10, right: 10),
+              child: Row(children: [
+                Expanded(
+                  flex: 2,
+                  child: Text(
+                    '报修单号',
+                    style: TextStyle(
+                      color: Colors.black,
+                      fontSize: GSYConstant.minTextSize,
+                      fontWeight: FontWeight.bold,
+                    ),
+                  ),
+                ),
+                Expanded(
+                  child: Container(
+                    height: 40,
+                    child: TextField(
+                      decoration: InputDecoration(border: OutlineInputBorder()),
+                      style: TextStyle(fontSize: 14),
+                      onChanged: (value) {
+                        setState(() {
+                          _repNum = value;
+                        });
+                      },
+                    ),
+                  ),
+                  flex: 7,
+                ),
+              ]),
+            ),
+            Padding(
+              padding: const EdgeInsets.only(top: 20.0, left: 10, right: 10),
+              child: Row(children: [
+                Expanded(
+                  flex: 2,
+                  child: Text(
+                    '报修状态',
+                    style: TextStyle(
+                      color: Colors.black,
+                      fontSize: GSYConstant.minTextSize,
+                      fontWeight: FontWeight.bold,
+                    ),
+                  ),
+                ),
+                Expanded(
+                  flex: 7,
+                  child: Container(
+                    child: dropDownButtonsColumn(sexMenuItems, '请选择任务状态'),
+                  ),
+                ),
+              ]),
+            ),
+            SizedBox(
+              height: 80,
+            ),
+            Row(
+              crossAxisAlignment: CrossAxisAlignment.end,
+              mainAxisAlignment: MainAxisAlignment.end,
+              children: [
+                TextButton(
+                  onPressed: () {
+                    Navigator.pop(context);
+                  },
+                  child: Text(ConstantString.cancel),
+                  style: ButtonStyle(
+                      backgroundColor:
+                      MaterialStateProperty.all<Color>(Color(0xFF4875EC)),
+                      foregroundColor:
+                      MaterialStateProperty.all<Color>(Colors.white),
+                      minimumSize: MaterialStateProperty.all(Size(80, 40)),
+                      padding: MaterialStateProperty.all(EdgeInsets.zero)),
+                ),
+                SizedBox(
+                  width: 20,
+                ),
+                TextButton(
+                  onPressed: () {
+                    if (widget.callback != null) {
+                      widget.callback(_theme,_repNum,satus);
+                      Navigator.pop(context);
+                    }
+                  },
+                  child: Text(ConstantString.query),
+                  style: ButtonStyle(
+                      backgroundColor:
+                      MaterialStateProperty.all<Color>(Color(0xFF4875EC)),
+                      foregroundColor:
+                      MaterialStateProperty.all<Color>(Colors.white),
+                      minimumSize: MaterialStateProperty.all(Size(80, 40)),
+                      padding: MaterialStateProperty.all(EdgeInsets.zero)),
+                ),
+                SizedBox(
+                  width: 20,
+                ),
+              ],
+            )
+          ],
+        ),
+      ),
+    );
+  }
+
+  Widget dropDownButtonsColumn(List<DropMenuItem> list, String hint) {
+    return Container(
+      height: 40,
+      //gives the height of the dropdown button
+      width: MediaQuery.of(context).size.width,
+      //gives the width of the dropdown button
+      decoration: BoxDecoration(
+        border: new Border.all(
+          color: Colors.grey, //边框颜色
+          width: 1.0, //边框粗细
+        ),
+        borderRadius:
+            const BorderRadius.all(const Radius.circular(4.0)), //边框的弧度
+      ),
+      // padding: const EdgeInsets.symmetric(horizontal: 13), //you can include padding to control the menu items
+      child: Theme(
+          data: Theme.of(context).copyWith(
+              // canvasColor: Colors.white, // background color for the dropdown items
+              buttonTheme: ButtonTheme.of(context).copyWith(
+            alignedDropdown:
+                true, //If false (the default), then the dropdown's menu will be wider than its button.
+          )),
+          child: DropdownButtonHideUnderline(
+            // to hide the default underline of the dropdown button
+            child: DropdownButton<String>(
+              iconEnabledColor: Color(0xFF595959),
+              // icon color of the dropdown button
+              items: list.map((dropMenuItem) {
+                return DropdownMenuItem<String>(
+                  value: dropMenuItem.label,
+                  child: Text(
+                    dropMenuItem.label,
+                    style: TextStyle(fontSize: 15),
+                  ),
+                );
+              }).toList(),
+              hint: Text(
+                hint,
+                style: TextStyle(fontSize: 15),
+              ),
+              // setting hint
+              onChanged: (String? value) {
+                key = value;
+                setState(() {
+                  for (var element in list) {
+                    if (value == element.label) {
+                      satus = element.value; // saving the selected value
+                    }
+                  }
+                });
+              },
+              value: key, // displaying the selected value
+            ),
+          )),
+    );
+  }
+
+  String _theme = '', _repNum = '';
+
+  dynamic satus = null;
+
+  String? key;
+}