Browse Source

从业计时-UI 95%

openlockPPP 1 year ago
parent
commit
fe3a3b6c71
70 changed files with 1874 additions and 59 deletions
  1. 22 4
      jiaPei.xcodeproj/project.pbxproj
  2. BIN
      jiaPei.xcworkspace/xcuserdata/mimasigeling.xcuserdatad/UserInterfaceState.xcuserstate
  3. 23 0
      jiaPei/Images.xcassets/Modules/TimeModule/开始计时bg.imageset/Contents.json
  4. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/开始计时bg.imageset/开始计时bg.png
  5. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/开始计时bg.imageset/开始计时bg@2x.png
  6. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/开始计时bg.imageset/开始计时bg@3x.png
  7. 23 0
      jiaPei/Images.xcassets/Modules/TimeModule/科一灰.imageset/Contents.json
  8. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科一灰.imageset/科一灰.png
  9. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科一灰.imageset/科一灰@2x.png
  10. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科一灰.imageset/科一灰@3x.png
  11. 23 0
      jiaPei/Images.xcassets/Modules/TimeModule/科一蓝.imageset/Contents.json
  12. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科一蓝.imageset/科一蓝.png
  13. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科一蓝.imageset/科一蓝@2x.png
  14. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科一蓝.imageset/科一蓝@3x.png
  15. 23 0
      jiaPei/Images.xcassets/Modules/TimeModule/科三灰.imageset/Contents.json
  16. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科三灰.imageset/科三灰.png
  17. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科三灰.imageset/科三灰@2x.png
  18. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科三灰.imageset/科三灰@3x.png
  19. 23 0
      jiaPei/Images.xcassets/Modules/TimeModule/科三蓝.imageset/Contents.json
  20. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科三蓝.imageset/科三蓝.png
  21. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科三蓝.imageset/科三蓝@2x.png
  22. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科三蓝.imageset/科三蓝@3x.png
  23. 23 0
      jiaPei/Images.xcassets/Modules/TimeModule/科二灰.imageset/Contents.json
  24. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科二灰.imageset/科二灰.png
  25. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科二灰.imageset/科二灰@2x.png
  26. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科二灰.imageset/科二灰@3x.png
  27. 23 0
      jiaPei/Images.xcassets/Modules/TimeModule/科二蓝.imageset/Contents.json
  28. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科二蓝.imageset/科二蓝.png
  29. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科二蓝.imageset/科二蓝@2x.png
  30. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/科二蓝.imageset/科二蓝@3x.png
  31. 23 0
      jiaPei/Images.xcassets/Modules/TimeModule/考核灰.imageset/Contents.json
  32. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/考核灰.imageset/考核灰.png
  33. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/考核灰.imageset/考核灰@2x.png
  34. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/考核灰.imageset/考核灰@3x.png
  35. 23 0
      jiaPei/Images.xcassets/Modules/TimeModule/考核蓝.imageset/Contents.json
  36. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/考核蓝.imageset/考核蓝.png
  37. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/考核蓝.imageset/考核蓝@2x.png
  38. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/考核蓝.imageset/考核蓝@3x.png
  39. 23 0
      jiaPei/Images.xcassets/Modules/TimeModule/背景bg_bottom.imageset/Contents.json
  40. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/背景bg_bottom.imageset/背景bg_bottom.png
  41. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/背景bg_bottom.imageset/背景bg_bottom@2x.png
  42. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/背景bg_bottom.imageset/背景bg_bottom@3x.png
  43. 23 0
      jiaPei/Images.xcassets/Modules/TimeModule/背景bg_top.imageset/Contents.json
  44. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/背景bg_top.imageset/背景bg_top.png
  45. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/背景bg_top.imageset/背景bg_top@2x.png
  46. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/背景bg_top.imageset/背景bg_top@3x.png
  47. 23 0
      jiaPei/Images.xcassets/Modules/TimeModule/计时bg.imageset/Contents.json
  48. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/计时bg.imageset/计时bg.png
  49. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/计时bg.imageset/计时bg@2x.png
  50. BIN
      jiaPei/Images.xcassets/Modules/TimeModule/计时bg.imageset/计时bg@3x.png
  51. 26 13
      jiaPei/Modules/TimeModule/ViewModel/itemViewModel/RQTimeSingleItemViewModel.m
  52. 7 0
      jiaPei/NewTheory/NYBasetjTimeVC.h
  53. 1045 2
      jiaPei/NewTheory/NYBasetjTimeVC.m
  54. 63 8
      jiaPei/NewTheory/NYGetjobTimeVC.m
  55. 0 22
      jiaPei/NewTheory/NYGetjobTimeVC.xib
  56. 8 1
      jiaPei/NewTheory/NYTheoryTimeVC.m
  57. 30 0
      jiaPei/NewTheory/View/NYGetjobStartRuleCell.h
  58. 52 0
      jiaPei/NewTheory/View/NYGetjobStartRuleCell.m
  59. 183 0
      jiaPei/NewTheory/View/NYGetjobStartRuleCell.xib
  60. 3 0
      jiaPei/NewTheory/View/NYTimeRuleCell.h
  61. 16 1
      jiaPei/NewTheory/View/NYTimeRuleCell.m
  62. 16 7
      jiaPei/NewTheory/View/NYTimeRuleCell.xib
  63. 1 0
      jiaPei/NewTheory/View/NYTimeStartRuleCell.m
  64. 18 0
      jiaPei/NewTheory/ViewModel/NYGetjobStartRuleViewModel.h
  65. 27 0
      jiaPei/NewTheory/ViewModel/NYGetjobStartRuleViewModel.m
  66. 17 0
      jiaPei/NewTheory/ViewModel/NYGetjobTimeViewModel.h
  67. 60 0
      jiaPei/NewTheory/ViewModel/NYGetjobTimeViewModel.m
  68. 2 0
      jiaPei/NewTheory/ViewModel/NYTimeRuleItemViewModel.h
  69. 1 1
      jiaPei/NewTheory/ViewModel/NYTimeRuleItemViewModel.m
  70. 1 0
      jiaPei/Utils/Router/RQRouter.m

+ 22 - 4
jiaPei.xcodeproj/project.pbxproj

@@ -87,7 +87,6 @@
 		90626F402A20540600C8FA05 /* YNYDTJQQuestionModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 90626F3F2A20540600C8FA05 /* YNYDTJQQuestionModule.m */; };
 		90BA2E822A3177B50029A54A /* NYTheoryTimeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2E802A3177B50029A54A /* NYTheoryTimeVC.m */; };
 		90BA2E872A3177DE0029A54A /* NYGetjobTimeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2E852A3177DE0029A54A /* NYGetjobTimeVC.m */; };
-		90BA2E882A3177DE0029A54A /* NYGetjobTimeVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 90BA2E862A3177DE0029A54A /* NYGetjobTimeVC.xib */; };
 		90BA2E8B2A317BEB0029A54A /* NYBasetjTimeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2E8A2A317BEB0029A54A /* NYBasetjTimeVC.m */; };
 		90BA2E8F2A31B2430029A54A /* NYTheoryTimeViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2E8E2A31B2430029A54A /* NYTheoryTimeViewModel.m */; };
 		90BA2E942A31DBFA0029A54A /* NYTimeRuleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2E922A31DBFA0029A54A /* NYTimeRuleCell.m */; };
@@ -96,6 +95,10 @@
 		90BA2E9C2A32CDBE0029A54A /* NYTimeStartRuleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2E9A2A32CDBE0029A54A /* NYTimeStartRuleCell.m */; };
 		90BA2E9D2A32CDBE0029A54A /* NYTimeStartRuleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 90BA2E9B2A32CDBE0029A54A /* NYTimeStartRuleCell.xib */; };
 		90BA2EA02A32D3B20029A54A /* NYTimeStartRuleViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2E9F2A32D3B20029A54A /* NYTimeStartRuleViewModel.m */; };
+		90BA2EA32A330D180029A54A /* NYGetjobTimeViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2EA22A330D180029A54A /* NYGetjobTimeViewModel.m */; };
+		90BA2EA72A3316510029A54A /* NYGetjobStartRuleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2EA52A3316510029A54A /* NYGetjobStartRuleCell.m */; };
+		90BA2EA82A3316510029A54A /* NYGetjobStartRuleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 90BA2EA62A3316510029A54A /* NYGetjobStartRuleCell.xib */; };
+		90BA2EAB2A3317510029A54A /* NYGetjobStartRuleViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2EAA2A3317510029A54A /* NYGetjobStartRuleViewModel.m */; };
 		D00177E22886A6F70078949E /* RQExerciseExplainHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = D00177E12886A6F70078949E /* RQExerciseExplainHeaderView.m */; };
 		D00177E42886A70C0078949E /* RQExerciseExplainHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D00177E32886A70C0078949E /* RQExerciseExplainHeaderView.xib */; };
 		D00177E72886AA650078949E /* RQExciseExplainHeaderGroupViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D00177E62886AA650078949E /* RQExciseExplainHeaderGroupViewModel.m */; };
@@ -1782,7 +1785,6 @@
 		90BA2E802A3177B50029A54A /* NYTheoryTimeVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYTheoryTimeVC.m; sourceTree = "<group>"; };
 		90BA2E842A3177DE0029A54A /* NYGetjobTimeVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYGetjobTimeVC.h; sourceTree = "<group>"; };
 		90BA2E852A3177DE0029A54A /* NYGetjobTimeVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYGetjobTimeVC.m; sourceTree = "<group>"; };
-		90BA2E862A3177DE0029A54A /* NYGetjobTimeVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NYGetjobTimeVC.xib; sourceTree = "<group>"; };
 		90BA2E892A317BEB0029A54A /* NYBasetjTimeVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYBasetjTimeVC.h; sourceTree = "<group>"; };
 		90BA2E8A2A317BEB0029A54A /* NYBasetjTimeVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYBasetjTimeVC.m; sourceTree = "<group>"; };
 		90BA2E8D2A31B2430029A54A /* NYTheoryTimeViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYTheoryTimeViewModel.h; sourceTree = "<group>"; };
@@ -1797,6 +1799,13 @@
 		90BA2E9B2A32CDBE0029A54A /* NYTimeStartRuleCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NYTimeStartRuleCell.xib; sourceTree = "<group>"; };
 		90BA2E9E2A32D3B20029A54A /* NYTimeStartRuleViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYTimeStartRuleViewModel.h; sourceTree = "<group>"; };
 		90BA2E9F2A32D3B20029A54A /* NYTimeStartRuleViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYTimeStartRuleViewModel.m; sourceTree = "<group>"; };
+		90BA2EA12A330D180029A54A /* NYGetjobTimeViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYGetjobTimeViewModel.h; sourceTree = "<group>"; };
+		90BA2EA22A330D180029A54A /* NYGetjobTimeViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYGetjobTimeViewModel.m; sourceTree = "<group>"; };
+		90BA2EA42A3316510029A54A /* NYGetjobStartRuleCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYGetjobStartRuleCell.h; sourceTree = "<group>"; };
+		90BA2EA52A3316510029A54A /* NYGetjobStartRuleCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYGetjobStartRuleCell.m; sourceTree = "<group>"; };
+		90BA2EA62A3316510029A54A /* NYGetjobStartRuleCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NYGetjobStartRuleCell.xib; sourceTree = "<group>"; };
+		90BA2EA92A3317510029A54A /* NYGetjobStartRuleViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYGetjobStartRuleViewModel.h; sourceTree = "<group>"; };
+		90BA2EAA2A3317510029A54A /* NYGetjobStartRuleViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYGetjobStartRuleViewModel.m; sourceTree = "<group>"; };
 		D00177E02886A6F70078949E /* RQExerciseExplainHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RQExerciseExplainHeaderView.h; sourceTree = "<group>"; };
 		D00177E12886A6F70078949E /* RQExerciseExplainHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RQExerciseExplainHeaderView.m; sourceTree = "<group>"; };
 		D00177E32886A70C0078949E /* RQExerciseExplainHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RQExerciseExplainHeaderView.xib; sourceTree = "<group>"; };
@@ -4482,7 +4491,6 @@
 				90BA2E802A3177B50029A54A /* NYTheoryTimeVC.m */,
 				90BA2E842A3177DE0029A54A /* NYGetjobTimeVC.h */,
 				90BA2E852A3177DE0029A54A /* NYGetjobTimeVC.m */,
-				90BA2E862A3177DE0029A54A /* NYGetjobTimeVC.xib */,
 				90BA2E892A317BEB0029A54A /* NYBasetjTimeVC.h */,
 				90BA2E8A2A317BEB0029A54A /* NYBasetjTimeVC.m */,
 			);
@@ -4498,6 +4506,10 @@
 				90BA2E972A32C53A0029A54A /* NYTimeRuleItemViewModel.m */,
 				90BA2E9E2A32D3B20029A54A /* NYTimeStartRuleViewModel.h */,
 				90BA2E9F2A32D3B20029A54A /* NYTimeStartRuleViewModel.m */,
+				90BA2EA12A330D180029A54A /* NYGetjobTimeViewModel.h */,
+				90BA2EA22A330D180029A54A /* NYGetjobTimeViewModel.m */,
+				90BA2EA92A3317510029A54A /* NYGetjobStartRuleViewModel.h */,
+				90BA2EAA2A3317510029A54A /* NYGetjobStartRuleViewModel.m */,
 			);
 			path = ViewModel;
 			sourceTree = "<group>";
@@ -4511,6 +4523,9 @@
 				90BA2E992A32CDBE0029A54A /* NYTimeStartRuleCell.h */,
 				90BA2E9A2A32CDBE0029A54A /* NYTimeStartRuleCell.m */,
 				90BA2E9B2A32CDBE0029A54A /* NYTimeStartRuleCell.xib */,
+				90BA2EA42A3316510029A54A /* NYGetjobStartRuleCell.h */,
+				90BA2EA52A3316510029A54A /* NYGetjobStartRuleCell.m */,
+				90BA2EA62A3316510029A54A /* NYGetjobStartRuleCell.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -9962,6 +9977,7 @@
 				D0295B9D243F0B8A00B46AB1 /* 1-2-31.jpg in Resources */,
 				D0295C3E243F0B8B00B46AB1 /* 5-15-31.jpg in Resources */,
 				D0295CDD243F0B8C00B46AB1 /* 1-4-62.jpg in Resources */,
+				90BA2EA82A3316510029A54A /* NYGetjobStartRuleCell.xib in Resources */,
 				D0295D2F243F0B8C00B46AB1 /* 1-2-3.jpg in Resources */,
 				D0295B8C243F0B8A00B46AB1 /* 1-4-40.jpg in Resources */,
 				D0295C09243F0B8B00B46AB1 /* 1-3-16.jpg in Resources */,
@@ -10170,7 +10186,6 @@
 				D0295BB9243F0B8B00B46AB1 /* 1-4-90.jpg in Resources */,
 				D0295C38243F0B8B00B46AB1 /* 1-4-123.jpg in Resources */,
 				D0295C0D243F0B8B00B46AB1 /* 1-4-27.jpg in Resources */,
-				90BA2E882A3177DE0029A54A /* NYGetjobTimeVC.xib in Resources */,
 				D0295B67243F0B8A00B46AB1 /* 4-14-5.jpg in Resources */,
 				D0295CC6243F0B8B00B46AB1 /* 1-4-10.jpg in Resources */,
 				D0EF8FEE2888F88A00CC4F96 /* RQExerciseExamAlertView.xib in Resources */,
@@ -11143,6 +11158,7 @@
 				D022FB0528D1E8110081E243 /* RQYDTJSModel.m in Sources */,
 				D074574F29272C680050BE10 /* QMChatRoomGuestBookViewController.m in Sources */,
 				D074576729272C680050BE10 /* QMAudioPlayer.m in Sources */,
+				90BA2EAB2A3317510029A54A /* NYGetjobStartRuleViewModel.m in Sources */,
 				D0354AF5230E322400E1C54D /* ScanPageVC.m in Sources */,
 				D04DF6D627006C57006E3633 /* RQDebugTouchView.m in Sources */,
 				D04DF7A227006F72006E3633 /* UITableView+RQExtension.m in Sources */,
@@ -11310,6 +11326,7 @@
 				D0294804243F07E300B46AB1 /* RGCardViewLayout.m in Sources */,
 				D02010C029373AE8001B9F4D /* SLAvEditExport.m in Sources */,
 				D05CB3B12763216A006895F3 /* RQHomeSubPageViewModel.m in Sources */,
+				90BA2EA32A330D180029A54A /* NYGetjobTimeViewModel.m in Sources */,
 				900A2DE32A1FA89700395C1F /* RQAppDelegate.m in Sources */,
 				D0EA1DAA28C02DAE00C27563 /* RQSynchronizationViewController.m in Sources */,
 				D04A765C24A0AD30009B58BA /* SMSDemoPolicyManager.m in Sources */,
@@ -11332,6 +11349,7 @@
 				D01CF3A928921D48009EEA12 /* RQBDQuestionModel.m in Sources */,
 				D01CF3B92892812F009EEA12 /* QDThemeManager.m in Sources */,
 				D09E5D5225E3AA260099E87C /* BDFaceDetectionViewController.m in Sources */,
+				90BA2EA72A3316510029A54A /* NYGetjobStartRuleCell.m in Sources */,
 				D04DF6CB27006C57006E3633 /* RQCommonItemViewModel.m in Sources */,
 				D02010D429373AE8001B9F4D /* SLShotViewController.m in Sources */,
 				D0870D822701A6B9004EC94E /* UIColor+YYAdd.m in Sources */,

BIN
jiaPei.xcworkspace/xcuserdata/mimasigeling.xcuserdatad/UserInterfaceState.xcuserstate


+ 23 - 0
jiaPei/Images.xcassets/Modules/TimeModule/开始计时bg.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "开始计时bg.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "开始计时bg@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "开始计时bg@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/TimeModule/开始计时bg.imageset/开始计时bg.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/开始计时bg.imageset/开始计时bg@2x.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/开始计时bg.imageset/开始计时bg@3x.png


+ 23 - 0
jiaPei/Images.xcassets/Modules/TimeModule/科一灰.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "科一灰.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "科一灰@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "科一灰@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/TimeModule/科一灰.imageset/科一灰.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/科一灰.imageset/科一灰@2x.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/科一灰.imageset/科一灰@3x.png


+ 23 - 0
jiaPei/Images.xcassets/Modules/TimeModule/科一蓝.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "科一蓝.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "科一蓝@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "科一蓝@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/TimeModule/科一蓝.imageset/科一蓝.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/科一蓝.imageset/科一蓝@2x.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/科一蓝.imageset/科一蓝@3x.png


+ 23 - 0
jiaPei/Images.xcassets/Modules/TimeModule/科三灰.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "科三灰.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "科三灰@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "科三灰@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/TimeModule/科三灰.imageset/科三灰.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/科三灰.imageset/科三灰@2x.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/科三灰.imageset/科三灰@3x.png


+ 23 - 0
jiaPei/Images.xcassets/Modules/TimeModule/科三蓝.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "科三蓝.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "科三蓝@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "科三蓝@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/TimeModule/科三蓝.imageset/科三蓝.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/科三蓝.imageset/科三蓝@2x.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/科三蓝.imageset/科三蓝@3x.png


+ 23 - 0
jiaPei/Images.xcassets/Modules/TimeModule/科二灰.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "科二灰.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "科二灰@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "科二灰@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/TimeModule/科二灰.imageset/科二灰.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/科二灰.imageset/科二灰@2x.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/科二灰.imageset/科二灰@3x.png


+ 23 - 0
jiaPei/Images.xcassets/Modules/TimeModule/科二蓝.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "科二蓝.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "科二蓝@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "科二蓝@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/TimeModule/科二蓝.imageset/科二蓝.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/科二蓝.imageset/科二蓝@2x.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/科二蓝.imageset/科二蓝@3x.png


+ 23 - 0
jiaPei/Images.xcassets/Modules/TimeModule/考核灰.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "考核灰.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "考核灰@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "考核灰@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/TimeModule/考核灰.imageset/考核灰.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/考核灰.imageset/考核灰@2x.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/考核灰.imageset/考核灰@3x.png


+ 23 - 0
jiaPei/Images.xcassets/Modules/TimeModule/考核蓝.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "考核蓝.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "考核蓝@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "考核蓝@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/TimeModule/考核蓝.imageset/考核蓝.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/考核蓝.imageset/考核蓝@2x.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/考核蓝.imageset/考核蓝@3x.png


+ 23 - 0
jiaPei/Images.xcassets/Modules/TimeModule/背景bg_bottom.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "背景bg_bottom.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "背景bg_bottom@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "背景bg_bottom@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/TimeModule/背景bg_bottom.imageset/背景bg_bottom.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/背景bg_bottom.imageset/背景bg_bottom@2x.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/背景bg_bottom.imageset/背景bg_bottom@3x.png


+ 23 - 0
jiaPei/Images.xcassets/Modules/TimeModule/背景bg_top.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "背景bg_top.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "背景bg_top@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "背景bg_top@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/TimeModule/背景bg_top.imageset/背景bg_top.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/背景bg_top.imageset/背景bg_top@2x.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/背景bg_top.imageset/背景bg_top@3x.png


+ 23 - 0
jiaPei/Images.xcassets/Modules/TimeModule/计时bg.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "计时bg.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "计时bg@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "计时bg@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
jiaPei/Images.xcassets/Modules/TimeModule/计时bg.imageset/计时bg.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/计时bg.imageset/计时bg@2x.png


BIN
jiaPei/Images.xcassets/Modules/TimeModule/计时bg.imageset/计时bg@3x.png


+ 26 - 13
jiaPei/Modules/TimeModule/ViewModel/itemViewModel/RQTimeSingleItemViewModel.m

@@ -11,6 +11,7 @@
 #import "RQCustomWebViewViewController.h"
 #import "ScanVC.h"
 #import "NYTheoryTimeViewModel.h"
+#import "NYGetjobTimeViewModel.h"
 
 @interface RQTimeSingleItemViewModel () {
 //    PeriodVC                   *KVOPeriodVC;
@@ -58,9 +59,9 @@
 
 - (void)gotoVCWithStr:(NSString *)str {
     if ([str isEqualToString:@"理论计时"]) {
-        [self gotoPeriod];
+        [self gotoPeriod:0];
     } else if ([str isEqualToString:@"从业考核"]||[str isEqualToString:@"从业计时"]) {
-        [self gotoPeriod];
+        [self gotoPeriod:1];
     } else if ([str isEqualToString:@"我的学时"]) {
         [self gotoTrainInfo];
     } else {
@@ -68,16 +69,25 @@
     }
 }
 
-- (void)gotoPeriod {
+- (void)gotoPeriod:(int)type {
     
     NYBasetjTimeVC *vc = nil;
-    if (myDelegate.tPeriodVC) {
-        vc = myDelegate.tPeriodVC;
-    }else {
-        KVOPeriodVC = RQ_USER_MANAGER.isCykh ? [self getNYTheoryTimeVC] : [self getNYTheoryTimeVC] ;
-        vc = KVOPeriodVC;
+    if(type==0){
+        if ([myDelegate.tPeriodVC isKindOfClass:[NYTheoryTimeVC class]]) {
+            vc = myDelegate.tPeriodVC;
+        }else {
+            KVOPeriodVC = [self getNYTheoryTimeVC] ;
+            vc = KVOPeriodVC;
+        }
+    }else if(type==1){
+        if ([myDelegate.tPeriodVC isKindOfClass:[NYGetjobTimeVC class]]) {
+            vc = myDelegate.tPeriodVC;
+        }else {
+            KVOPeriodVC = [self getNYGetjobTimeVC];
+            vc = KVOPeriodVC;
+        }
     }
-    [self navPushHideTabbarToVC:vc];
+    if(vc)[self navPushHideTabbarToVC:vc];
     
 //    PeriodVC *vc = nil;
 //    if (myDelegate.tPeriodVC) {
@@ -93,11 +103,14 @@
     
     NYTheoryTimeViewModel *viewModel = [[NYTheoryTimeViewModel alloc]  initWithServices:RQ_APPDELEGATE.services params:nil];
     NYTheoryTimeVC *timeViewController = [[NYTheoryTimeVC alloc] initWithViewModel:viewModel];
-//    ///配置
-//    [selfrq_configViewController:timePageViewController imageName:imageNamesArray[tagType] selectedImageName:selectedImageNamesArray[tagType] title:titlesArray[tagType] itemTag:tagType];
-//    ///添加到导航栏的栈底控制器
-//    timePageViewController.hidesBottomBarWhenPushed = NO;
+
+    return timeViewController;
+}
+
+- (NYBasetjTimeVC *)getNYGetjobTimeVC{
     
+    NYGetjobTimeViewModel *viewModel = [[NYGetjobTimeViewModel alloc]  initWithServices:RQ_APPDELEGATE.services params:nil];
+    NYGetjobTimeVC *timeViewController = [[NYGetjobTimeVC alloc] initWithViewModel:viewModel];
     return timeViewController;
 }
 

+ 7 - 0
jiaPei/NewTheory/NYBasetjTimeVC.h

@@ -14,6 +14,13 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, copy) NSString *secondString;
 
+//暴露出去,让子类-赋值
+@property (strong, nonatomic) UILabel         *timeLabel;
+@property (strong, nonatomic) UIButton        *on_offBtn;
+
+//计时事件
+- (void)btnClick:(UIButton *)sender;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 1045 - 2
jiaPei/NewTheory/NYBasetjTimeVC.m

@@ -4,12 +4,30 @@
 //
 //  Created by Ning.ge on 2023/6/8.
 //  Copyright © 2023 JCZ. All rights reserved.
-//
+//  从之前的PeriodVC复制计时逻辑,不做修改。
 
 #import "NYBasetjTimeVC.h"
 
+typedef enum {
+    AlertTypeStopTiming = 1,
+    AlertTypeGotoLogin
+}AlertType;
+
 @interface NYBasetjTimeVC ()
 
+/// 跑马灯
+@property (strong, readwrite, nonatomic) QMUIMarqueeLabel *marqueeLabel;
+@property (strong, readwrite, nonatomic) NSString *classIdStr;
+@property (assign, readwrite, nonatomic) LoginFlagType loginFlagType;
+@property (strong, readwrite, nonatomic) UIView *adView;
+//@property (nonatomic, readwrite, strong) QMUIPopupMenuView *popupAtBarButtonItem;
+//@property (nonatomic, readwrite, strong) UIBarButtonItem *rightBarButtonItem;
+
+@property (assign, readwrite, nonatomic) CGFloat         varY;
+@property (strong, readwrite, nonatomic) NSTimer         *timer;
+@property (strong, readwrite, nonatomic) NSDateFormatter *formatter;
+@property (assign, readwrite, nonatomic) NSInteger       seconds;
+
 @end
 
 @implementation NYBasetjTimeVC
@@ -20,8 +38,1033 @@
     [self.navigationItem setLeftBarButtonItems:@[[UIBarButtonItem rq_backItemWithTitle:@"" imageName:@"back_white" target:self action:@selector(rq_back)]]];
 }
 
-/// 事件处理
+/// rq_back事件处理
 - (void)rq_back {
     [self.navigationController popViewControllerAnimated:YES];
 }
+
+#pragma mark           以下内容为-从之前的PeriodVC复制计时逻辑,不做修改。
+#pragma mark           理论计时
+- (void)myInitTheory {
+    NSString *str = @"根据运管部门要求,为了防止学员在打理论学时的时候挂学时,设定以下规则:\n1、开启理论计时后不允许最小化且不能切换到别的软件,否则计时暂停\n2、每天计时最大有效时间为4学时,单条学时不得超过4学时,否则视为无效学时\n3、手机计时和网站计时同时只能有一种生效,作为惩罚机制,多打的学时将被列入限制学时,会造成当天无法打满4学时,切记\n4、计时完成后,请点击结束计时并立即上传,服务器要与运管系统同步,约30分后才会反馈回手机\n5、福州培训时间 \n 课堂时间:07:00---22:00 \n 模拟时间:05:00---23:00 \n 实操:05:00---23:00 \n 远程:05:00--23:59:59 \n 请学员注意!避免非培训时间导致学时无效。";
+    UILabel *remindLabel = [[UILabel alloc] initWithFrame:CGRectMake(25, self.varY, kSize.width - 50, [str heightForWid:kSize.width - 50 Font:Font17])];
+    remindLabel.numberOfLines = 0;
+    [remindLabel setText:str Font:Font17 TextColor:[UIColor orangeColor] Alignment:NSTextAlignmentLeft];
+    [self.view addSubview:remindLabel];
+    
+}
+
+- (void)startTimingWithResultBlock:(void (^)(BOOL isSuccess))resultBlock {
+    @weakify(self)
+    if (RQ_USER_MANAGER.isCykh) {
+        if (![self checkCykhChooseStr]) {
+            !resultBlock? : resultBlock(NO);
+            return;
+        }
+    }
+    
+    [self getCurrentPXKWithComplete:^(BOOL isSuccess, NSString *pxkm) {
+        @strongify(self)
+        if (!isSuccess) {
+            !resultBlock? : resultBlock(NO);
+            return;
+        }
+        [RQ_USER_MANAGER.currentUser updatePxjdWithPxjd:pxkm];
+
+        /// 理论计时类型二地市编号:null (暂无地市;在科目二可以进行科目四的理论计时,科目三暂无理论计时)
+        if ([RQ_SHARE_FUNCTION.theoryOfTimingTypeTwoCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && [pxkm isEqualToString:@"3"]) {
+            ShowMsg(@"科目三暂无理论计时!");
+            !resultBlock? : resultBlock(NO);
+            return;
+        }
+        /// 理论计时类型三地市编号:3502 (厦门;在科目三可以进行科目四的理论计时,科目二暂无理论计时)
+        else if ([RQ_SHARE_FUNCTION.theoryOfTimingTypeThreeCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && [pxkm isEqualToString:@"2"]) {
+            ShowMsg(@"科目二暂无理论计时!");
+            !resultBlock? : resultBlock(NO);
+            return;
+        } else {
+            NSLog(@"-------------------%@-------------------",[RQ_SHARE_FUNCTION.theoryOfTimingTypeThreeCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city]? @"包含" : @"不包含");
+            
+            if (RQ_USER_MANAGER.isycbd == 1) {
+                [RQ_RemoteTheory_MANAGER getTheoryStatusWithResultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull statusDict) {
+                    @strongify(self)
+                    if (isSuccess) {
+                        NSString *statusStr = statusDict[@"body"];
+                        if (!statusStr && [statusStr isEqualToString:@""]) {
+                            ShowMsg(@"获取学员状态异常!");
+                            !resultBlock? : resultBlock(NO);
+                            return;
+                        }
+                        BOOL statusIsSignIn = [statusStr isEqualToString:@"1"];
+                        NSString *pxkm = RQ_USER_MANAGER.currentUser.pxjd;
+                        if (pxkm.length < 1) {
+                            pxkm = @"1";
+                        }
+                        if (([pxkm isEqualToString:@"2"] || [pxkm isEqualToString:@"3"])) {
+                            pxkm = @"4";
+                        }
+                        
+                        if (RQ_USER_MANAGER.isCykh) {
+                            if (![self checkCykhChooseStr]) {
+                                !resultBlock? : resultBlock(NO);
+                                return;
+                            } else {
+                                pxkm = RQ_USER_MANAGER.cykhPxkmStr;
+                            }
+                        }
+                        
+                        NSArray* array = [DB_Helper quearyTrain:RQStringIsNotEmpty(RQ_USER_MANAGER.currentUser.outId)? RQ_USER_MANAGER.currentUser.outId : @"" Subject:pxkm];
+                        __block NSInteger trainTime = 0;
+                        
+                        [array.rac_sequence.signal subscribeNext:^(TrainRecord *record) {
+                            trainTime = trainTime + record.trainTime.integerValue;
+                        } completed:^{
+                            dispatch_async(dispatch_get_main_queue(), ^{
+                                @strongify(self)
+                                if (trainTime >= 30) {
+                                    [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:statusIsSignIn? @"检测到上次未正常签退,请签退后再开始理论计时" : @"检测到学员已签退!本地存在异常学时,是否删除异常学时?" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"取消" otherButtonTitles:@[statusIsSignIn? @"签退" : @"删除"] otherButtonStyles:nil showInWindow:NO completion:^(NSUInteger selectedOtherButtonIndex) {
+                                        @strongify(self)
+                                        !resultBlock? : resultBlock(NO);
+                                        if (selectedOtherButtonIndex == 0) {
+                                            if (statusIsSignIn) {
+                                                TrainRecord *lastRecord = [array lastObject];
+                                                ///  1.本地活体检测
+                                                [RQ_CHECKBODY_MANAGER beginCheckBodyWithCheckNum:RQ_USER_MANAGER.ycbdFaceCount completeBlock:^(BOOL success, NSDictionary * _Nullable dic) {
+                                                    @strongify(self)
+                                                    if (success) {
+                                                        /// 2.线上活体检测
+                                                        [RQ_RemoteTheory_MANAGER edufaceTofaceWithPhotoStr:dic[@"normalImg"] loginFlagType:LoginFlagType_SignOut resultBlock:^(BOOL isSuccess) {
+                                                            @strongify(self)
+                                                            if (isSuccess) {
+                                                                /// 2.5 温州(3303)上传照片的时间是实时取服务器时间 其他地市采取从开始计时时间+累计计时时长的时间
+                                                                if ([RQ_USER_MANAGER.currentUser.city isEqualToString:@"3303"]) {
+                                                                    [RQ_RemoteTheory_MANAGER getCurrentTimeWithResultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull timeDict) {
+                                                                        @strongify(self)
+                                                                        if (isSuccess) {
+                                                                            /// 3.签退
+                                                                            [RQ_RemoteTheory_MANAGER uploadEduSignOutWithArray:array resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull signOutDict) {
+                                                                                @strongify(self)
+                                                                                if (success) {
+                                                                                    [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:NO completion:nil];
+                                                                                    NSString *timeStr = timeDict[@"body"];
+                                                                                    /// 4.1上传签退照片
+                                                                                    [RQ_RemoteTheory_MANAGER uploadEduPicWithClassidStr:lastRecord.classid timeStr:timeStr actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_SignOut resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull uploadEduPicDict) {
+                                                                                        @strongify(self)
+                                                                                        if (isSuccess) {
+                                                                                            NSLog(@"上传签退照片成功!");
+                                                                                            [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:YES completion:nil];
+                                                                                        } else {
+                                                                                            NSLog(@"上传签退照片失败!");
+                                                                                            [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:NO completion:^{
+                                                                                                @strongify(self)
+                                                                                                [self reUploadPhotoWithClassidStr:self.classIdStr timeStr:timeStr actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_SignOut];
+                                                                                            }];
+                                                                                        }
+                                                                                    }];
+                                                                                }
+                                                                                !resultBlock? : resultBlock(NO);
+                                                                            }];
+                                                                        } else {
+                                                                            !resultBlock? : resultBlock(NO);
+                                                                        }
+                                                                    }];
+                                                                } else {
+                                                                    ///  3.签退
+                                                                    [RQ_RemoteTheory_MANAGER uploadEduSignOutWithArray:array resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull signOutDict) {
+                                                                        @strongify(self)
+                                                                        if (success) {
+                                                                            [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:NO completion:nil];
+                                                                            /// 4.2上传签退照片
+                                                                            [RQ_RemoteTheory_MANAGER uploadEduPicWithClassidStr:lastRecord.classid timeStr:lastRecord.endTime actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_SignOut resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull uploadEduPicDict) {
+                                                                                @strongify(self)
+                                                                                if (isSuccess) {
+                                                                                    NSLog(@"上传签退照片成功!");
+                                                                                    [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:YES completion:nil];
+                                                                                } else {
+                                                                                    NSLog(@"上传签退照片失败!");
+                                                                                    [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:NO completion:^{
+                                                                                        @strongify(self)
+                                                                                        [self reUploadPhotoWithClassidStr:self.classIdStr timeStr:lastRecord.endTime actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_SignOut];
+                                                                                    }];
+                                                                                }
+                                                                            }];
+                                                                        }
+                                                                        !resultBlock? : resultBlock(NO);
+                                                                    }];
+                                                                }
+                                                            } else {
+                                                                !resultBlock? : resultBlock(NO);
+                                                            }
+                                                        }];
+                                                    } else {
+                                                        !resultBlock? : resultBlock(NO);
+                                                    }
+                                                }];
+                                            } else {
+                                                for (TrainRecord *record in array) {
+                                                    [DB_Helper deleteTrainRecord:record];
+                                                }
+                                            }
+                                        }
+                                    }];
+                                } else {
+                                    if (statusIsSignIn) {
+                                        [RQ_RemoteTheory_MANAGER uploadEduSignOutWithArray:@[] resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull signOutDict) {
+                                            @strongify(self)
+                                            if (isSuccess) {
+                                                [self signOutSuccessWithTrainArray:@[] signOutSuccess:YES uploadImageSuccess:NO completion:nil];
+                                            }
+                                            !resultBlock? : resultBlock(isSuccess);
+                                        }];
+                                    } else {
+                                        /// 1.本地活体检测
+                                        [RQ_CHECKBODY_MANAGER beginCheckBodyWithCheckNum:RQ_USER_MANAGER.ycbdFaceCount completeBlock:^(BOOL success, NSDictionary * _Nullable dic) {
+                                            @strongify(self)
+                                            if (success) {
+                                                /// 2.线上活体检测
+                                                [RQ_RemoteTheory_MANAGER edufaceTofaceWithPhotoStr:dic[@"normalImg"] loginFlagType:LoginFlagType_SignIn resultBlock:^(BOOL isSuccess) {
+                                                    @strongify(self)
+//#warning 测试阶段-绕开人脸
+//                                                    isSuccess = true;
+                                                    if (isSuccess) {
+                                                        /// 3.获取线上时间
+                                                        [RQ_RemoteTheory_MANAGER getCurrentTimeWithResultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull timeDict) {
+                                                            @strongify(self)
+                                                            if (isSuccess) {
+//                                                                NSString *timeStr = @"2022-03-13 22:46:59";
+                                                                NSDate *date = [NSDate rq_dateWithTimestamp:timeDict[@"body"]];
+//                                                                NSDate *date = [NSDate rq_dateWithTimestamp:timeStr];
+
+                                                                NSInteger timeStamp = [RQ_SHARE_FUNCTION getTimeStampWithDate:date];
+
+                                                                NSString *timeStampStr = [NSString stringWithFormat:@"%@",[NSNumber numberWithInteger:timeStamp]];
+                                                                
+                                                                self.classIdStr = timeStampStr;
+                                                                if (self.classIdStr.length < 10) {
+                                                                    /// 如果生成时间戳错误 用一个随机十位数代替
+                                                                    self.classIdStr = [NSString stringWithFormat:@"%@",[NSNumber numberWithInteger:[NSString rq_randomNumberWithFrom:1647311377 to:9999999999]]];
+                                                                }
+                                                                
+                                                                NSInteger todayEndTimestamp = [RQ_SHARE_FUNCTION getTimeStampWithHour:23 andMinute:59 andDate:[NSDate rq_dateWithTimestamp:timeDict[@"body"]]];
+                                                                BOOL isShow = (todayEndTimestamp - timeStamp) < 3 * RQ_D_HOUR;
+                                                                self.marqueeLabel.hidden = !isShow;
+                                                                
+                                                                
+                                                                /// 4.签到
+                                                                [RQ_RemoteTheory_MANAGER uploadEduSignInWithClassidStr:self.classIdStr resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull signInDict) {
+                                                                    if (isSuccess) {
+                                                                        @strongify(self)
+                                                                        NSString *timeStr = signInDict[@"body"];
+                                                                        [self signInSuccessWithBeginTime:timeStr];
+                                                                        /// 5.上传照片
+                                                                        [RQ_RemoteTheory_MANAGER uploadEduPicWithClassidStr:self.classIdStr timeStr:timeStr actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_SignIn resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull uploadEduPicDict) {
+//                                                                            @strongify(self)
+                                                                        }];
+                                                                        
+                                                                    }
+                                                                
+                                                                    !resultBlock? : resultBlock(isSuccess);
+                                                                }];
+                                                            } else {
+                                                                !resultBlock? : resultBlock(NO);
+                                                            }
+                                                        }];
+                                                    } else {
+                                                        !resultBlock? : resultBlock(NO);
+                                                    }
+                                                }];
+                                            } else {
+                                                !resultBlock? : resultBlock(NO);
+                                            }
+                                        }];
+                                    }
+                                }
+                            });
+                        }];
+                    } else {
+                        !resultBlock? : resultBlock(NO);
+                    }
+                }];
+            } else {
+                !resultBlock? : resultBlock(YES);
+                [self getWebTime];
+            }
+        }
+    }];
+}
+
+- (void)getCurrentPXKWithComplete:(void(^)(BOOL isSuccess,NSString *pxkm))complete {
+//    @weakify(self)
+    ShowHUD();
+    if (![Util connectedToNetWork]) {
+        ShowMsg(@"请检查网络连接。");
+        RemoveHUD();
+        !complete? : complete(NO, nil);
+        return;
+    }
+    NSMutableArray *arr = [NSMutableArray array];
+    [arr property:RQ_USER_MANAGER.currentUser.outId forKey:@"stuOutId"];
+    [arr property:RQ_USER_MANAGER.currentUser.city  forKey:@"dqbh"];
+    
+    NSString* method = @"getStudentStatusByStuOutId";
+    [jiaPeiManager requestAnythingWithURL:method array:arr data:nil completion:^(NSDictionary *dict) {
+//        @strongify(self)
+        RemoveHUD();
+        if (!dict) {
+            ShowMsgFailed();
+            !complete? : complete(NO, nil);
+            return;
+        }
+        if ([dict[@"code"] isEqualToString:@"0"]) {
+            !complete? : complete(YES, dict[@"body"]);
+        } else {
+            ShowMsg(dict[@"body"]);
+            !complete? : complete(NO, nil);
+        }
+    }];
+}
+
+- (void)getWebTime {
+    @weakify(self)
+    ShowHUD();
+    if (![Util connectedToNetWork])
+    {
+        ShowMsg(@"请检查网络连接。");
+        RemoveHUD();
+        return;
+    }
+    
+    NSMutableArray *arr=[NSMutableArray array];
+    [arr property:RQ_USER_MANAGER.currentUser.outId forKey:@"outId"];
+    [arr property:RQ_USER_MANAGER.currentUser.city  forKey:@"dqbh"];
+
+    
+    NSString* method = @"isUsePhone";
+    [jiaPeiManager requestAnythingWithURL:method array:arr data:nil completion:^(NSDictionary *dict) {
+        @strongify(self)
+        RemoveHUD();
+        //NSLog(@"获取服务器时间--%@---->%@",arr,dict);
+        
+        if (!dict) {
+            ShowMsgFailed();
+            return;
+        }
+        
+        if ( [dict[@"code"] isEqualToString:@"0"]) {
+            myDelegate.begin_Time = dict[@"body"];
+            [Tools playAudioWithString:@"操作成功,开始计时"];
+            
+            self.seconds = 0;
+            [self.on_offBtn setTitle:@"结束计时" forState:UIControlStateNormal];
+            
+            myDelegate.timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timeFireMethod) userInfo:nil repeats:YES];
+            myDelegate.isUseriPhone = YES;
+            self.timer = myDelegate.timer;
+            
+            myDelegate.tPeriodVC = self;
+            
+            ShowMsgSuc();
+        }
+        else
+        {
+            ShowMsg(dict[@"body"]);
+            [Tools playAudioWithString:dict[@"body"]];
+        }
+    }];
+}
+
+
+- (void)setSecondString:(NSString *)secondString {
+    _secondString = secondString;
+}
+
+- (void)timeFireMethod {
+    @weakify(self)
+    self.seconds++;
+    [self setSecondString:[NSString stringWithFormat:@"%d",(int)self.seconds]];
+    int hour = 0;
+    int min = 0;
+    int second = 0;
+    
+    if (RQ_USER_MANAGER.isycbd == 1) {
+        NSString *pxkm = RQ_USER_MANAGER.currentUser.pxjd;
+        if (pxkm.length < 1) {
+            pxkm = @"1";
+        }
+        if (([pxkm isEqualToString:@"2"] || [pxkm isEqualToString:@"3"])) {
+            pxkm = @"4";
+        }
+        int remainder1 = [RQ_USER_MANAGER.currentUser.city isEqualToString:@"3303"]? (int)(self.seconds)%1200 : (int)(self.seconds)%780;
+        if (remainder1 == 0) {
+            [self.timer setFireDate:[NSDate distantFuture]];
+            SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow];
+            alert.backgroundViewColor = backGroundColor;
+            alert.customViewColor = RQ_MAIN_COLOR;
+            [alert addButton:@"立即开始 " actionBlock:^(void) {
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    @strongify(self)
+                    /// 1.本地活体检测
+                    [RQ_CHECKBODY_MANAGER beginCheckBodyWithCheckNum:RQ_USER_MANAGER.ycbdFaceCount completeBlock:^(BOOL success, NSDictionary * _Nullable dic) {
+                        @strongify(self)
+                        if (success) {
+                            /// 2.线上活体检测
+                            [RQ_RemoteTheory_MANAGER edufaceTofaceWithPhotoStr:dic[@"normalImg"] loginFlagType:LoginFlagType_Process resultBlock:^(BOOL isSuccess) {
+                                @strongify(self)
+                                if (isSuccess) {
+                                    /// 2.5 温州(3303)上传照片的时间是实时取服务器时间 其他地市采取从开始计时时间+累计计时时长的时间
+                                    if ([RQ_USER_MANAGER.currentUser.city isEqualToString:@"3303"]) {
+                                        [RQ_RemoteTheory_MANAGER  getCurrentTimeWithResultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull timeDict) {
+                                            @strongify(self)
+                                            if (isSuccess) {
+                                                /// 3.1上传过程照片
+                                                NSString *timeStr = timeDict[@"body"];
+                                                [RQ_RemoteTheory_MANAGER uploadEduPicWithClassidStr:self.classIdStr timeStr:timeStr actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_Process resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull uploadEduPicDict) {
+                                                    @strongify(self)
+                                                    if (isSuccess) {
+                                                        [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:@"过程验证成功" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"确定" otherButtonTitles:nil otherButtonStyles:nil showInWindow:NO completion:^(NSUInteger selectedOtherButtonIndex) {
+                                                            @strongify(self)
+                                                            [self.timer setFireDate:[NSDate distantPast]];
+                                                        }];
+                                                    } else {
+                                                        self.seconds--;
+                                                        [self setSecondString:[NSString stringWithFormat:@"%d",(int)self.seconds]];
+                                                        [self.timer setFireDate:[NSDate distantPast]];
+                                                    }
+                                                }];
+                                            } else {
+                                                self.seconds--;
+                                                [self setSecondString:[NSString stringWithFormat:@"%d",(int)self.seconds]];
+                                                [self.timer setFireDate:[NSDate distantPast]];
+                                            }
+                                        }];
+                                    } else {
+                                        NSString *timeStr = [self getTimes:self.seconds];
+                                        ///  3.2上传过程照片
+                                        [RQ_RemoteTheory_MANAGER uploadEduPicWithClassidStr:self.classIdStr timeStr:timeStr actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_Process resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull uploadEduPicDict) {
+                                            @strongify(self)
+                                            if (isSuccess) {
+                                                [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:@"过程验证成功" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"确定" otherButtonTitles:nil otherButtonStyles:nil showInWindow:NO completion:^(NSUInteger selectedOtherButtonIndex) {
+                                                    @strongify(self)
+                                                    [self.timer setFireDate:[NSDate distantPast]];
+                                                }];
+                                            } else {
+                                                self.seconds--;
+                                                [self setSecondString:[NSString stringWithFormat:@"%d",(int)self.seconds]];
+                                                [self.timer setFireDate:[NSDate distantPast]];
+                                            }
+                                        }];
+                                    }
+                                } else {
+                                    self.seconds--;
+                                    [self setSecondString:[NSString stringWithFormat:@"%d",(int)self.seconds]];
+                                    [self.timer setFireDate:[NSDate distantPast]];
+                                }
+                            }];
+                        } else {
+                            self.seconds--;
+                            [self setSecondString:[NSString stringWithFormat:@"%d",(int)self.seconds]];
+                            [self.timer setFireDate:[NSDate distantPast]];
+                        }
+                    }];
+                });
+            }];
+            [alert addTimerToButtonIndex:0 reverse:YES];
+            [alert showNotice:@"温馨提示" subTitle:@"即将开始活体检测,请做好准备" closeButtonTitle:nil duration:5.0f];
+        }
+    } else {
+        
+    }
+    int remainder;
+    if (RQ_USER_MANAGER.isycbd == 1) {
+        remainder = (int)self.seconds%1800;
+    } else {
+        remainder = (int)self.seconds%300;
+    }
+    
+    if (remainder == 0) {
+        //每5分钟保存一次,温州每30分钟保存一次
+        [self saveTrain];
+    }
+    
+    hour   = (int)self.seconds / 3600;
+    min    = (int)self.seconds % 3600 / 60;
+    second = (int)self.seconds % 3600 % 60;
+    NSString *min_s;
+    NSString *second_s;
+    if (min<10) {
+        min_s=[NSString stringWithFormat:@"0%d",min];
+    }else{
+        min_s=[NSString stringWithFormat:@"%d",min];
+    }
+    if (second<10) {
+        second_s=[NSString stringWithFormat:@"0%d",second];
+    }else{
+        second_s=[NSString stringWithFormat:@"%d",second];
+    }
+    
+    //凌晨重新计时 只是为了防止夜里挂学时 导致一天挂学时超过4小时做的处理 但是这样的话 学员就可以一夜挂8个小时 这样反而不好 应该取消这个 如果连续超过四个小时 判定无效 dansonmark
+    /*
+     NSString *time=[myDelegate.begin_Time substringWithRange:NSMakeRange(0, 10)];
+     time=[NSString stringWithFormat:@"%@ 23:59:59",time];
+     if ([[self getTimes:self.seconds] isEqualToString:time]) {
+     [self saveTrain];
+     
+     //加2就不会连在一起了
+     self.seconds = self.seconds+2;
+     //重置开始时间
+     myDelegate.begin_Time = [self getTimes:self.seconds];
+     self.seconds = 0;
+     }
+     */
+    //更新UI上的时间
+    self.timeLabel.text = [NSString stringWithFormat:@"0%d:%@:%@",hour,min_s,second_s];
+}
+
+- (void)stopTimingWithResultBlock:(void (^)(BOOL isSuccessed))resultBlock {
+    @weakify(self)
+    [self.timer setFireDate:[NSDate distantFuture]];
+    [self saveTrain];
+
+    if (RQ_USER_MANAGER.isycbd == 1) {
+        /// 1.本地活体检测
+        [RQ_CHECKBODY_MANAGER beginCheckBodyWithCheckNum:RQ_USER_MANAGER.ycbdFaceCount completeBlock:^(BOOL success, NSDictionary * _Nullable dic) {
+            @strongify(self)
+            if (success) {
+                /// 2.线上活体检测
+                [RQ_RemoteTheory_MANAGER edufaceTofaceWithPhotoStr:dic[@"normalImg"] loginFlagType:LoginFlagType_SignOut resultBlock:^(BOOL isSuccess) {
+                    @strongify(self)
+                    if (isSuccess) {
+                        /// 2.5 温州(3303)上传照片的时间是实时取服务器时间 其他地市采取从开始计时时间+累计计时时长的时间
+                        if ([RQ_USER_MANAGER.currentUser.city isEqualToString:@"3303"]) {
+                            [RQ_RemoteTheory_MANAGER getCurrentTimeWithResultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull timeDict) {
+                                @strongify(self)
+                                if (isSuccess) {
+                                    /// 4.签退
+                                    NSString *pxkm = RQ_USER_MANAGER.currentUser.pxjd;
+                                    if (pxkm.length < 1) {
+                                        pxkm = @"1";
+                                    }
+                                    if (([pxkm isEqualToString:@"2"] || [pxkm isEqualToString:@"3"])) {
+                                        pxkm = @"4";
+                                    }
+                                    
+                                    NSArray* array = [DB_Helper quearyTrain:RQStringIsNotEmpty(RQ_USER_MANAGER.currentUser.outId)? RQ_USER_MANAGER.currentUser.outId : @"" Subject:pxkm];
+                                    if (array.count < 1) {
+                                        !resultBlock? : resultBlock(YES);
+                                        ShowMsg(@"本地无学时明细!");
+                                        return;
+                                    }
+                                    [RQ_RemoteTheory_MANAGER uploadEduSignOutWithArray:array resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull signOutDict) {
+                                        @strongify(self)
+                                        if (isSuccess) {
+                                            !resultBlock? : resultBlock(YES);
+                                            [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:NO completion:nil];
+                                            ///  4.1上传签退照片
+                                            NSString *timeStr = timeDict[@"body"];
+                                            
+                                            [RQ_RemoteTheory_MANAGER uploadEduPicWithClassidStr:self.classIdStr timeStr:timeStr actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_SignOut resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull uploadEduPicDict) {
+                                                @strongify(self)
+                                                if (isSuccess) {
+                                                    NSLog(@"上传签退照片成功!");
+                                                    [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:YES completion:nil];
+                                                } else {
+                                                    NSLog(@"上传签退照片失败!");
+                                                    [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:NO completion:^{
+                                                        @strongify(self)
+                                                        [self reUploadPhotoWithClassidStr:self.classIdStr timeStr:timeStr actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_SignOut];
+                                                    }];
+                                                }
+                                            }];
+                                        } else {
+                                            !resultBlock? : resultBlock(NO);
+                                            [self.timer setFireDate:[NSDate distantPast]];
+                                        }
+                                    }];
+                                } else {
+                                    !resultBlock? : resultBlock(NO);
+                                    [self.timer setFireDate:[NSDate distantPast]];
+                                }
+                            }];
+                        } else {
+                            /// 3.签退
+                            NSString *pxkm = RQ_USER_MANAGER.currentUser.pxjd;
+                            if (pxkm.length < 1) {
+                                pxkm = @"1";
+                            }
+                            if (([pxkm isEqualToString:@"2"] || [pxkm isEqualToString:@"3"])) {
+                                pxkm = @"4";
+                            }
+                            if (RQ_USER_MANAGER.isCykh) {
+                                if (![self checkCykhChooseStr]) {
+                                    !resultBlock? : resultBlock(YES);
+                                    return;
+                                } else {
+                                    pxkm = RQ_USER_MANAGER.cykhPxkmStr;
+                                }
+                            }
+                            NSArray* array = [DB_Helper quearyTrain:RQStringIsNotEmpty(RQ_USER_MANAGER.currentUser.outId)? RQ_USER_MANAGER.currentUser.outId : @"" Subject:pxkm];
+                            if (array.count < 1) {
+                                !resultBlock? : resultBlock(YES);
+                                ShowMsg(@"本地无学时明细!");
+                                return;
+                            }
+                            [RQ_RemoteTheory_MANAGER uploadEduSignOutWithArray:array resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull signOutDict) {
+                                @strongify(self)
+                                if (isSuccess) {
+                                    !resultBlock? : resultBlock(YES);
+                                    [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:NO completion:nil];
+                                    ///  4.2上传签退照片
+                                    NSString *timeStr = [self getTimes:self.seconds];
+                                    [RQ_RemoteTheory_MANAGER uploadEduPicWithClassidStr:self.classIdStr timeStr:timeStr actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_SignOut resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull uploadEduPicDict) {
+                                        @strongify(self)
+                                        if (isSuccess) {
+                                            NSLog(@"上传签退照片成功!");
+                                            [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:YES completion:nil];
+                                        } else {
+                                            NSLog(@"上传签退照片失败!");
+                                            [self signOutSuccessWithTrainArray:array signOutSuccess:YES uploadImageSuccess:NO completion:^{
+                                                [self reUploadPhotoWithClassidStr:self.classIdStr timeStr:timeStr actionPhotoStr:dic[@"actionImg"] loginFlagType:LoginFlagType_SignOut];
+                                            }];
+                                        }
+                                    }];
+                                } else {
+                                    !resultBlock? : resultBlock(NO);
+                                    [self.timer setFireDate:[NSDate distantPast]];
+                                }
+                            }];
+                        }
+                    } else {
+                        !resultBlock? : resultBlock(NO);
+                        [self.timer setFireDate:[NSDate distantPast]];
+                    }
+                }];
+            } else {
+                !resultBlock? : resultBlock(NO);
+                [self.timer setFireDate:[NSDate distantPast]];
+            }
+        }];
+    } else {
+        !resultBlock? : resultBlock(YES);
+        [self setSecondString:@"0"];
+        
+        [self.timer setFireDate:[NSDate distantFuture]];
+        [self.timer invalidate];
+        self.timer = nil;
+        myDelegate.timer = nil;
+        myDelegate.tPeriodVC = nil;
+        myDelegate.isTrain = NO;
+        self.timeLabel.text = @"00:00:00";
+//        if (self.seconds < 60) {
+//            ShowMsg(@"学时未满一分钟不统计");
+//            return;
+//        }
+        [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:@"结束计时,是否上传学时?" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"暂不上传" otherButtonTitles:@[@"确定"] otherButtonStyles:nil showInWindow:NO completion:^(NSUInteger selectedOtherButtonIndex) {
+            @strongify(self)
+            if (selectedOtherButtonIndex == 0) {
+                [self upLoadTrainRecord];
+            }else if (selectedOtherButtonIndex == NSNotFound){
+                ShowMsg(@"学时已保存在本地");
+            }
+        }];
+    }
+}
+
+-(void)saveTrain {
+    if (!self.formatter) {
+        self.formatter = [NSDateFormatter rq_defaultDateFormatter];
+    }
+    TrainRecord *train = [[TrainRecord alloc]init];
+    
+    train.studentId = RQStringIsNotEmpty(RQ_USER_MANAGER.currentUser.outId)? RQ_USER_MANAGER.currentUser.outId : @"";
+    train.beginTime = myDelegate.begin_Time;
+    
+    NSDate *date = [self.formatter dateFromString:myDelegate.begin_Time];
+    date = [date dateByAddingTimeInterval:self.seconds];
+    train.state = @"0";
+    train.endTime=[self.formatter stringFromDate:date];
+    NSInteger mins = self.seconds / 60;
+    train.trainTime = [NSString stringWithFormat:@"%d",(int)mins];
+    train.classid = (self.classIdStr && ![self.classIdStr isEqualToString:@""])? self.classIdStr : @"0";
+    [DB_Helper saveTrain:train];
+}
+
+- (NSString *)getTimes:(int)second {
+    if (!self.formatter) {
+        self.formatter=[[NSDateFormatter alloc]init];
+        [self.formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
+    }
+    
+    NSString *beginTimeStr = myDelegate.begin_Time;
+    [self.formatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]];
+    NSDate *beginDate = [self.formatter dateFromString:beginTimeStr];
+    NSDate *newDate = [NSDate dateWithTimeInterval:second sinceDate:beginDate];
+    NSString *nowString = [self.formatter stringFromDate:newDate];
+    return nowString;
+}
+
+- (void)upLoadTrainRecord{
+    NSString *pxkm = RQ_USER_MANAGER.currentUser.pxjd;
+    
+//    NSString *crDate = RQ_USER_MANAGER.currentUser.crDate;
+//    if (crDate.length > 10) {
+//        crDate = [crDate substringToIndex:7];
+//    }
+//    NSArray *dateArray = [crDate componentsSeparatedByString:@"-"];
+//    if ([[dateArray firstObject] integerValue] < 2016) {
+//        pxkm = @"1";
+//    }
+//    if ([[dateArray firstObject] integerValue] == 2016) {
+//
+//        if ([[dateArray lastObject] integerValue] < 11) {
+//            pxkm = @"1";
+//        }
+//    }
+    
+    if (pxkm.length < 1) {
+        pxkm = @"1";
+    }
+    
+    /// 理论计时类型一地市编号:3501,3503 (福州,莆田;在科目二,科目三可以进行科目四的理论计时)
+    if ([RQ_SHARE_FUNCTION.theoryOfTimingTypeOneCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && ([pxkm isEqualToString:@"2"] || [pxkm isEqualToString:@"3"])) {
+        pxkm = @"4";
+    }
+    /// 理论计时类型二地市编号:null (暂无地市;在科目二可以进行科目四的理论计时)
+    else if ([RQ_SHARE_FUNCTION.theoryOfTimingTypeTwoCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && [pxkm isEqualToString:@"2"]) {
+        pxkm = @"4";
+    }
+    /// 理论计时类型三地市编号:3502 (厦门;在科目三可以进行科目四的理论计时)
+    else if ([RQ_SHARE_FUNCTION.theoryOfTimingTypeThreeCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && [pxkm isEqualToString:@"3"]) {
+        pxkm = @"4";
+    }
+    /// 新增地市 (新增地市;默认在科目二,科目三可以进行科目四的理论计时)
+    else if (![RQ_SHARE_FUNCTION.theoryOfTimingTypeOneCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && ![RQ_SHARE_FUNCTION.theoryOfTimingTypeTwoCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && ![RQ_SHARE_FUNCTION.theoryOfTimingTypeThreeCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && ([pxkm isEqualToString:@"2"] || [pxkm isEqualToString:@"3"])) {
+        pxkm = @"4";
+    }
+    
+    if (RQ_USER_MANAGER.isCykh) {
+        if (![self checkCykhChooseStr]) {
+            return;
+        } else {
+            pxkm = RQ_USER_MANAGER.cykhPxkmStr;
+        }
+    }
+        
+    NSArray* array =   [DB_Helper quearyTrain:RQStringIsNotEmpty(RQ_USER_MANAGER.currentUser.outId)? RQ_USER_MANAGER.currentUser.outId : @"" Subject:pxkm];
+    if (array.count < 1) {
+        ShowMsg(@"本地无学时明细!");
+        return;
+    }
+    
+    //这里是对分段上传学时做的处理 如果学时上传有问题 查看这里
+    [self uploadMoreTrainRecordWithArray:array];
+}
+
+- (void)uploadMoreTrainRecordWithArray:(NSArray *)trainArray
+{
+    ShowHUD();
+    if (![Util connectedToNetWork]) {
+        showMsgUnconnect();
+        return;
+    }
+    
+    NSString* str = @"";
+    for (TrainRecord *record in trainArray) {
+        
+        str = [str stringByAppendingString:[NSString stringWithFormat:@"%@,%@,%@,%@;",record.studentId,record.beginTime,record.endTime,record.trainTime]];
+    }
+    
+    TrainRecord *record = [trainArray firstObject];
+    /// 理论计时类型一地市编号:3501,3503 (福州,莆田;在科目二,科目三可以进行科目四的理论计时)
+    if ([RQ_SHARE_FUNCTION.theoryOfTimingTypeOneCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && ([record.subject isEqualToString:@"2"] || [record.subject isEqualToString:@"3"])) {
+        record.subject = @"4";
+    }
+    /// 理论计时类型二地市编号:null (暂无地市;在科目二可以进行科目四的理论计时)
+    else if ([RQ_SHARE_FUNCTION.theoryOfTimingTypeTwoCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && [record.subject isEqualToString:@"2"]) {
+        record.subject = @"4";
+    }
+    /// 理论计时类型三地市编号:3502 (厦门;在科目三可以进行科目四的理论计时)
+    else if ([RQ_SHARE_FUNCTION.theoryOfTimingTypeThreeCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && [record.subject isEqualToString:@"3"]) {
+        record.subject = @"4";
+    }
+    /// 新增地市 (新增地市;默认在科目二,科目三可以进行科目四的理论计时)
+    else if (![RQ_SHARE_FUNCTION.theoryOfTimingTypeOneCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && ![RQ_SHARE_FUNCTION.theoryOfTimingTypeTwoCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && ![RQ_SHARE_FUNCTION.theoryOfTimingTypeThreeCityCodeArr containsObject:RQ_USER_MANAGER.currentUser.city] && ([record.subject isEqualToString:@"2"] || [record.subject isEqualToString:@"3"])) {
+        record.subject = @"4";
+    }
+    NSMutableArray *arr = [NSMutableArray array];
+    [arr addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"ios",@"trainType", nil]];
+    [arr addObject:[NSDictionary dictionaryWithObjectsAndKeys:[DES3Util encrypt:str ],@"trainRecord", nil]];
+    [arr addObject:[NSDictionary dictionaryWithObjectsAndKeys:record.subject,@"pxkm", nil]];
+    
+    
+    NSString* method = @"uploadMoreTrainRecord";
+    
+    [jiaPeiManager requestAnythingWithURL:method array:arr data:nil completion:^(NSDictionary *dict) {
+        
+        RemoveHUD();
+        //NSLog(@"---------><>%@----><>%@",arr,dict);
+        
+        if (!dict) {
+            ShowMsg(@"操作失败");
+            return;
+        }
+        if ( [dict[@"code"] isEqualToString:@"1"]) {
+            ShowMsg(dict[@"body"]);
+            return;
+        }
+        if ( [dict[@"code"] isEqualToString:@"0"]) {
+            for (TrainRecord *record in trainArray) {
+                
+                [DB_Helper updateTrainState:record];
+            }
+            [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:@"上传学时成功!" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"确定" otherButtonTitles:nil otherButtonStyles:nil showInWindow:NO completion:nil];
+        }
+    }];
+}
+
+#pragma mark           btn
+- (void)btnClick:(UIButton *)sender {
+    UIButton *btn = sender;
+    @weakify(self, btn)
+    if (btn.enabled) {
+        btn.enabled = NO;
+    }
+    
+    if (myDelegate.isUseriPhone) {
+        //点击事件 如果已经开始计时 调用里边的内容
+        [self stopTimingWithResultBlock:^(BOOL isSuccessed) {
+            @strongify(self, btn)
+            btn.enabled = YES;
+            if (isSuccessed) {
+                [btn setTitle:@"开始计时" forState:UIControlStateNormal];
+                myDelegate.isUseriPhone = NO;
+            }
+        }];
+        
+    }else{
+        
+        if (myDelegate.timer) {
+            ShowMsg(@"请先关闭其他计时");
+            return;
+        }
+        [self startTimingWithResultBlock:^(BOOL isSuccess) {
+            @strongify(btn)
+            btn.enabled = YES;
+        }];
+    }
+}
+
+#pragma mark - 温州远程理论
+//远程理论签到成功
+- (void)signInSuccessWithBeginTime:(NSString *)beginTime {
+    myDelegate.begin_Time = beginTime;
+    [Tools playAudioWithString:@"操作成功,开始计时"];
+
+    self.seconds = 0;
+    [self.on_offBtn setTitle:@"结束计时" forState:UIControlStateNormal];
+
+    myDelegate.timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timeFireMethod) userInfo:nil repeats:YES];
+    myDelegate.isUseriPhone = YES;
+    self.timer = myDelegate.timer;
+
+    myDelegate.tPeriodVC = self;
+
+    ShowMsgSuc();
+    
+    [RQ_COMMON_MANAGER keepIdleTimerDisabledisOpen:YES];
+    
+    if ([RQ_USER_MANAGER.currentUser.city isEqualToString:@"3501"]) {
+        [RQ_ALERTVIEW_MANAGER showAlertWithTitle:@"温馨提示" message: @"福州培训时间 \n 课堂时间:07:00---22:00 \n 模拟时间:05:00---23:00 \n 实操:05:00---23:00 \n 远程:05:00--23:59:59 \n 请学员注意!避免非培训时间导致学时无效。" confirmTitle:@"确认" confirmAction:^(__kindof QMUIDialogViewController * _Nonnull dialogViewController) {
+            
+        }];
+    }
+}
+
+//远程理论签退成功
+- (void)signOutSuccessWithTrainArray:(NSArray *)trainArray signOutSuccess:(BOOL)signOutSuccess uploadImageSuccess:(BOOL)uploadImageSuccess  completion:(void (^)(void))completion {
+    for (TrainRecord *record in trainArray) {
+        [DB_Helper updateTrainState:record];
+    }
+    if (trainArray.count > 0) {
+        if (signOutSuccess) {
+            if (![_secondString isEqualToString:@"0"]) {
+                [self setSecondString:@"0"];
+            }
+            if (self.timer.isValid) {
+                [self.timer invalidate];
+            }
+            if (self.timer) {
+                self.timer = nil;
+            }
+            if (myDelegate.timer) {
+                myDelegate.timer = nil;
+            }
+            if (myDelegate.tPeriodVC) {
+                myDelegate.tPeriodVC = nil;
+            }
+            if (myDelegate.isTrain) {
+                myDelegate.isTrain = NO;
+            }
+            if (![self.timeLabel.text isEqualToString:@"00:00:00"]) {
+                self.timeLabel.text = @"00:00:00";
+            }
+        }
+        
+        if (signOutSuccess && uploadImageSuccess) {
+            [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:@"签退成功!" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"确定" otherButtonTitles:nil otherButtonStyles:nil showInWindow:NO completion:nil];
+        } else if (signOutSuccess && !uploadImageSuccess && completion) {
+            [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:@"上传照片失败!" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"重新上传" otherButtonTitles:nil otherButtonStyles:nil showInWindow:NO completion:^(NSUInteger selectedOtherButtonIndex) {
+                completion();
+            }];
+        }
+        
+        
+    } else {
+        // 强制签退后再去调签到
+        [self startTimingWithResultBlock:nil];
+    }
+    [RQ_COMMON_MANAGER keepIdleTimerDisabledisOpen:NO];
+}
+
+- (void)reUploadPhotoWithClassidStr:(NSString *)classidStr timeStr:(NSString *)timeStr actionPhotoStr:(NSString *)actionPhotoStr loginFlagType:(LoginFlagType)loginFlagType  {
+    __block BOOL reUploadSuccess = YES;
+    __block BOOL isUploading = NO;
+    int i = 0;
+    do {
+        if (i == 0) {
+            if (!isUploading) {
+                isUploading = YES;
+                [RQ_RemoteTheory_MANAGER uploadEduPicWithClassidStr:classidStr timeStr:timeStr actionPhotoStr:actionPhotoStr loginFlagType:loginFlagType resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull uploadEduPicDict) {
+                    if (isSuccess) {
+                        ShowMsg(@"重新上传照片成功!");
+                        reUploadSuccess = YES;
+                    } else {
+                        reUploadSuccess =  NO;
+                    }
+                    isUploading = NO;
+                }];
+            }
+        } else {
+            if (!isUploading) {
+                isUploading = YES;
+                [RQ_SHARE_FUNCTION showAlertWithTitle:@"温馨提示" message:@"上传照片失败!" alertControllerStyle:UIAlertControllerStyleAlert cancelButtonTitle:@"重新上传" otherButtonTitles:nil otherButtonStyles:nil showInWindow:NO completion:^(NSUInteger selectedOtherButtonIndex) {
+                    [RQ_RemoteTheory_MANAGER uploadEduPicWithClassidStr:classidStr timeStr:timeStr actionPhotoStr:actionPhotoStr loginFlagType:loginFlagType resultBlock:^(BOOL isSuccess, NSDictionary * _Nonnull uploadEduPicDict) {
+                        if (isSuccess) {
+                            ShowMsg(@"重新上传照片成功!");
+                            reUploadSuccess = YES;
+                        } else {
+                            reUploadSuccess =  NO;
+                        }
+                        isUploading = NO;
+                    }];
+                }];
+            }
+        }
+        i ++;
+    } while (reUploadSuccess  == NO);
+}
+
+#pragma mark - LazyLoad
+- (QMUIMarqueeLabel *)marqueeLabel {
+    if (!_marqueeLabel) {
+        _marqueeLabel = [[QMUIMarqueeLabel alloc] qmui_initWithFont:[UIFont qmui_systemFontOfSize:17 weight:QMUIFontWeightBold italic:YES] textColor:UIColor.redColor];
+        @weakify(_marqueeLabel)
+        _marqueeLabel.text = @"在深夜时间,进行理论计时,记得在十二点前签退!否则,会丢失部分学时!!!";
+        _marqueeLabel.hidden = YES;
+        [RACObserve(_marqueeLabel, hidden) subscribeNext:^(id  _Nullable x) {
+            @strongify(_marqueeLabel)
+            if (_marqueeLabel.hidden) {
+                [_marqueeLabel requestToStopAnimation];
+            } else {
+                [_marqueeLabel requestToStartAnimation];
+            }
+        }];
+    }
+    return _marqueeLabel;
+}
+
+- (UIView *)adView {
+    if (!_adView) {
+        _adView = [[UIView alloc] initWithFrame:CGRectMake(25, (kSize.height - kNavOffSet - kSafeAreaBottomHeight) - 60, kSize.width - 50, (kSize.width - 50) / (640/100.0))];
+        _adView.layer.cornerRadius = 5;
+        _adView.clipsToBounds = YES;
+    }
+    return _adView;
+}
+
+//- (QMUIPopupMenuView *)popupAtBarButtonItem {
+//    if (!_popupAtBarButtonItem) {
+//        @weakify(self)
+//        _popupAtBarButtonItem = [[QMUIPopupMenuView alloc] init];
+//        _popupAtBarButtonItem.automaticallyHidesWhenUserTap = YES;// 点击空白地方消失浮层
+//        _popupAtBarButtonItem.maximumWidth = RQ_SCREEN_WIDTH / 2.f;
+//        _popupAtBarButtonItem.shouldShowItemSeparator = YES;
+//        _popupAtBarButtonItem.tintColor = RQ_MAIN_COLOR;
+//        _popupAtBarButtonItem.items = @[[QMUIPopupMenuButtonItem itemWithImage:nil title:@"从业科目一" handler:^(QMUIPopupMenuButtonItem * _Nonnull aItem) {
+//            @strongify(self)
+//            self.rightBarButtonItem.title = aItem.title;
+//            RQ_USER_MANAGER.cykhPxkmStr = @"5";
+//            [aItem.menuView hideWithAnimated:YES];
+//        }],
+//                                        [QMUIPopupMenuButtonItem itemWithImage:nil title:@"从业科目二" handler:^(QMUIPopupMenuButtonItem * _Nonnull aItem) {
+//                                            @strongify(self)
+//                                            self.rightBarButtonItem.title = aItem.title;
+//                                            RQ_USER_MANAGER.cykhPxkmStr = @"6";
+//                                            [aItem.menuView hideWithAnimated:YES];
+//                                        }],
+//                                        [QMUIPopupMenuButtonItem itemWithImage:nil title:@"从业科目四" handler:^(QMUIPopupMenuButtonItem * _Nonnull aItem) {
+//                                            @strongify(self)
+//                                            self.rightBarButtonItem.title = aItem.title;
+//                                            RQ_USER_MANAGER.cykhPxkmStr = @"7";
+//                                            [aItem.menuView hideWithAnimated:YES];
+//                                        }],
+//                                        [QMUIPopupMenuButtonItem itemWithImage:nil title:@"从业考核" handler:^(QMUIPopupMenuButtonItem * _Nonnull aItem) {
+//                                            @strongify(self)
+//                                            self.rightBarButtonItem.title = aItem.title;
+//                                            RQ_USER_MANAGER.cykhPxkmStr = @"8";
+//                                            [aItem.menuView hideWithAnimated:YES];
+//                                        }]];
+//    }
+//    return _popupAtBarButtonItem;
+//}
+
+//- (UIBarButtonItem *)rightBarButtonItem {
+//    if (!_rightBarButtonItem) {
+//        _rightBarButtonItem = [UIBarButtonItem rq_systemItemWithTitle:RQStringIsEmpty(RQ_USER_MANAGER.cykhPxkmStr)? @"从业培训" : RQ_USER_MANAGER.cykhPxkmStr titleColor:RQ_MAIN_COLOR imageName:nil target:self selector:@selector(handleRightBarButtonItemEvent) textType:YES];
+//        @weakify(_rightBarButtonItem)
+//        [RACObserve(myDelegate, isUseriPhone) subscribeNext:^(id  _Nullable x) {
+//            @strongify(_rightBarButtonItem)
+//            if (myDelegate.isUseriPhone) {
+//                _rightBarButtonItem.action = nil;
+//            } else {
+//                _rightBarButtonItem.action = @selector(handleRightBarButtonItemEvent);
+//            }
+//        }];
+//    }
+//    return _rightBarButtonItem;
+//}
+
+//- (void)handleRightBarButtonItemEvent {
+//    if (self.popupAtBarButtonItem.isShowing) {
+//        [self.popupAtBarButtonItem hideWithAnimated:YES];
+//    } else {
+//        // 相对于右上角的按钮布局
+//        self.popupAtBarButtonItem.sourceBarItem = self.navigationItem.rightBarButtonItem;
+//        [self.popupAtBarButtonItem showWithAnimated:YES];
+//    }
+//}
+
+//从业计时-切换弹窗
+- (BOOL)checkCykhChooseStr {
+    @weakify(self)
+    if (RQStringIsNotEmpty(RQ_USER_MANAGER.cykhPxkmStr)) {
+        return YES;
+    } else {
+        [NSObject rq_showAlertViewWithTitle:@"温馨提示" message:@"请选择从业计时类型" confirmTitle:@"确定" cancelTitle:@"取消" confirmAction:^{
+            @strongify(self)
+//            [self handleRightBarButtonItemEvent];
+        } cancelAction:nil];
+        return NO;
+    }
+}
+
 @end

+ 63 - 8
jiaPei/NewTheory/NYGetjobTimeVC.m

@@ -7,26 +7,81 @@
 //
 
 #import "NYGetjobTimeVC.h"
+#import "NYGetjobTimeViewModel.h"
+
 
 @interface NYGetjobTimeVC ()
+/// viewModel
+@property (nonatomic, readonly, strong) NYGetjobTimeViewModel *viewModel;
 
 @end
 
 @implementation NYGetjobTimeVC
+@dynamic viewModel;
 
+#pragma mark - SystemMethod
 - (void)viewDidLoad {
     [super viewDidLoad];
-    // Do any additional setup after loading the view from its nib.
+    // Do any additional setup after loading the view.
+    
+    
+    self.view.backgroundColor = UIColor.whiteColor;
+    self.collectionView.backgroundColor = UIColor.clearColor;
+    self.collectionView.backgroundView.backgroundColor = UIColor.clearColor;
+    UIImageView *bgImageView = [[UIImageView alloc] initWithImage: [UIImage imageNamed:@"背景bg_top"]];
+    [self.view insertSubview:bgImageView atIndex:0];
+    [bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.top.right.mas_equalTo(self.view);
+        make.height.mas_equalTo(184.f);
+    }];
+}
+
+- (UIColor *)qmui_titleViewTintColor
+{
+    return UIColor.whiteColor;
+}
+
+- (UIImage *)qmui_navigationBarBackgroundImage
+{
+    return [UIImage qmui_imageWithColor:UIColor.clearColor];
+}
+
+#pragma mark - OverrideMethods
+/// 配置collectionView的区域
+- (UIEdgeInsets)contentInset {
+    return UIEdgeInsetsMake(RQ_APPLICATION_STATUS_BAR_HEIGHT + RQ_APPLICATION_NAV_BAR_HEIGHT, 0, 0, 0);
+}
+
+- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath {
+    RQCommonGroupViewModel *groupViewModel = self.viewModel.dataSource[indexPath.section];
+    RQCommonCollectionItemViewModel *itemViewModel = groupViewModel.itemViewModels[indexPath.row];
+    
+    return [NSClassFromString(itemViewModel.itemClassName) cellWithCollectionView:collectionView forIndexPath:indexPath];
 }
 
-/*
-#pragma mark - Navigation
+- (void)configureCell:(RQCommonCell *)cell atIndexPath:(NSIndexPath *)indexPath withObject:(id)object {
+    [cell bindViewModel:object];
+}
+
+- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
+    switch (section) {
+        case 1: {
+            return UIEdgeInsetsMake(0, 16, 0, 16);
+        }
+        default: {
+            return UIEdgeInsetsZero;
+        }
+    }
+}
 
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue destinationViewController].
-    // Pass the selected object to the new view controller.
+- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section {
+    switch (section) {
+        case 1:
+            return (RQ_SCREEN_WIDTH - 32 - (RQ_FIT_HORIZONTAL(90.f) * 3)) / 2.f;
+            
+        default:
+            return 8;
+    }
 }
-*/
 
 @end

+ 0 - 22
jiaPei/NewTheory/NYGetjobTimeVC.xib

@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="NYGetjobTimeVC">
-            <connections>
-                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
-            </connections>
-        </placeholder>
-        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
-            <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
-            <viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
-        </view>
-    </objects>
-</document>

+ 8 - 1
jiaPei/NewTheory/NYTheoryTimeVC.m

@@ -8,6 +8,7 @@
 
 #import "NYTheoryTimeVC.h"
 #import "NYTheoryTimeViewModel.h"
+#import "NYTimeStartRuleCell.h"
 
 @interface NYTheoryTimeVC ()
 /// viewModel
@@ -42,12 +43,18 @@
 #pragma mark - OverrideMethods
 /// 配置collectionView的区域
 - (UIEdgeInsets)contentInset {
-    return UIEdgeInsetsMake(RQ_APPLICATION_STATUS_BAR_HEIGHT + RQ_APPLICATION_NAV_BAR_HEIGHT, 0, RQ_APPLICATION_TAB_BAR_HEIGHT + RQ_APPLICATION_SAFEAREA_BOTTOM_HEIGHT, 0);
+    return UIEdgeInsetsMake(RQ_APPLICATION_STATUS_BAR_HEIGHT + RQ_APPLICATION_NAV_BAR_HEIGHT, 0, 0 , 0);
 }
 
 - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath {
     RQCommonGroupViewModel *groupViewModel = self.viewModel.dataSource[indexPath.section];
     RQCommonCollectionItemViewModel *itemViewModel = groupViewModel.itemViewModels[indexPath.row];
+    
+    if([itemViewModel.itemClassName isEqualToString:@"NYTimeStartRuleCell"]){
+        NYTimeStartRuleCell *cell = [NSClassFromString(itemViewModel.itemClassName) cellWithCollectionView:collectionView forIndexPath:indexPath];
+        [cell.time_Button addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
+        return cell;
+    }
     return [NSClassFromString(itemViewModel.itemClassName) cellWithCollectionView:collectionView forIndexPath:indexPath];
 }
 

+ 30 - 0
jiaPei/NewTheory/View/NYGetjobStartRuleCell.h

@@ -0,0 +1,30 @@
+//
+//  NYGetjobStartRuleCell.h
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/6/9.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import "RQCommonCollectionViewCell.h"
+#import "NYGetjobStartRuleViewModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NYGetjobStartRuleCell : RQCommonCollectionViewCell
+
+@property (weak, nonatomic) IBOutlet QMUIButton *k1_button;
+
+@property (weak, nonatomic) IBOutlet QMUIButton *k2_button;
+
+@property (weak, nonatomic) IBOutlet QMUIButton *k3_button;
+
+@property (weak, nonatomic) IBOutlet QMUIButton *k4_button;
+
+@property (weak, nonatomic) IBOutlet UILabel *time_Label;
+
+@property (weak, nonatomic) IBOutlet UIButton *time_Button;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 52 - 0
jiaPei/NewTheory/View/NYGetjobStartRuleCell.m

@@ -0,0 +1,52 @@
+//
+//  NYGetjobStartRuleCell.m
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/6/9.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import "NYGetjobStartRuleCell.h"
+
+
+@interface NYGetjobStartRuleCell ()
+@property (nonatomic, readwrite, strong) NYGetjobStartRuleViewModel *viewModel;
+
+@end
+
+@implementation NYGetjobStartRuleCell
+#pragma mark - PublicMethods
++ (instancetype)cellWithCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath {
+    static NSString *ID = @"NYGetjobStartRuleCell";
+    [collectionView registerNib:[UINib nibWithNibName:ID bundle:nil] forCellWithReuseIdentifier:ID];
+    NYGetjobStartRuleCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath];
+    if (!cell) cell = [self rq_viewFromXib];
+    return cell;
+}
+
+- (void)bindViewModel:(NYGetjobStartRuleViewModel *)viewModel {
+    self.viewModel = viewModel;
+}
+
+#pragma mark - SystemMethods
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    self.contentView.backgroundColor = UIColor.clearColor;
+    
+    self.k1_button.imagePosition = QMUIButtonImagePositionTop;
+    self.k1_button.spacingBetweenImageAndTitle = 8;
+    self.k1_button.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
+    self.k2_button.imagePosition = QMUIButtonImagePositionTop;
+    self.k2_button.spacingBetweenImageAndTitle = 8;
+    self.k2_button.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
+    self.k3_button.imagePosition = QMUIButtonImagePositionTop;
+    self.k3_button.spacingBetweenImageAndTitle = 8;
+    self.k3_button.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
+    self.k4_button.imagePosition = QMUIButtonImagePositionTop;
+    self.k4_button.spacingBetweenImageAndTitle = 8;
+    self.k4_button.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
+    
+}
+
+
+@end

+ 183 - 0
jiaPei/NewTheory/View/NYGetjobStartRuleCell.xib

@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="NYGetjobStartRuleCell">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="383"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
+                <rect key="frame" x="0.0" y="0.0" width="320" height="383"/>
+                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                <subviews>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="计时bg" translatesAutoresizingMaskIntoConstraints="NO" id="dk7-zM-f4U">
+                        <rect key="frame" x="67" y="85" width="186" height="186"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="186" id="Gdg-vj-Ps3"/>
+                            <constraint firstAttribute="width" constant="186" id="ZBu-yF-POL"/>
+                        </constraints>
+                    </imageView>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00:00:00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Qd-Bf-6vO">
+                        <rect key="frame" x="67" y="166" width="186" height="24"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="24" id="K6J-90-dKa"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="28"/>
+                        <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="开始计时bg" translatesAutoresizingMaskIntoConstraints="NO" id="kqo-6j-D1E">
+                        <rect key="frame" x="73" y="280" width="174" height="61"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="61" id="BfI-DF-DYB"/>
+                            <constraint firstAttribute="width" constant="174" id="cO0-pe-rWc"/>
+                        </constraints>
+                    </imageView>
+                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vjN-OJ-FBn">
+                        <rect key="frame" x="100" y="285" width="120" height="45"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="45" id="V6X-cl-eiW"/>
+                            <constraint firstAttribute="width" constant="120" id="Ywl-vb-sYS"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
+                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                        <state key="normal" title="开始计时">
+                            <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        </state>
+                    </button>
+                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZTJ-5b-jja" customClass="QMUIButton">
+                        <rect key="frame" x="16" y="20" width="60" height="90"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="60" id="Mpf-Nz-g1N"/>
+                            <constraint firstAttribute="height" constant="90" id="XJs-L8-p92"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="11"/>
+                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                        <state key="normal" title="科目一" image="科一灰">
+                            <color key="titleColor" red="0.19215686274509802" green="0.28235294117647058" blue="0.41568627450980389" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        </state>
+                        <state key="selected" image="科一蓝"/>
+                    </button>
+                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kPx-ke-bH0" customClass="QMUIButton">
+                        <rect key="frame" x="92" y="20" width="60" height="90"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="90" id="FtW-yT-RvR"/>
+                            <constraint firstAttribute="width" constant="60" id="Qyr-xk-zWR"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="11"/>
+                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                        <state key="normal" title="科目二" image="科二灰">
+                            <color key="titleColor" red="0.19215686269999999" green="0.28235294119999998" blue="0.41568627450000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        </state>
+                        <state key="selected" image="科二蓝"/>
+                    </button>
+                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MY0-Z0-eto" customClass="QMUIButton">
+                        <rect key="frame" x="168" y="20" width="60" height="90"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="60" id="ga5-I2-TfQ"/>
+                            <constraint firstAttribute="height" constant="90" id="xkS-H4-MGp"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="11"/>
+                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                        <state key="normal" title="科目三" image="科三灰">
+                            <color key="titleColor" red="0.19215686269999999" green="0.28235294119999998" blue="0.41568627450000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        </state>
+                        <state key="selected" image="科三蓝"/>
+                    </button>
+                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HXn-51-4k3" customClass="QMUIButton">
+                        <rect key="frame" x="244" y="20" width="60" height="90"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="90" id="ZTi-8g-kQW"/>
+                            <constraint firstAttribute="width" constant="60" id="si7-ur-lwM"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="11"/>
+                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                        <state key="normal" title="考核" image="考核灰">
+                            <color key="titleColor" red="0.19215686269999999" green="0.28235294119999998" blue="0.41568627450000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        </state>
+                        <state key="selected" image="考核蓝"/>
+                    </button>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WK3-F0-fHw">
+                        <rect key="frame" x="152" y="20" width="16" height="90"/>
+                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="90" id="tRj-wy-B6I"/>
+                        </constraints>
+                    </view>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P3U-hI-QN2">
+                        <rect key="frame" x="228" y="20" width="16" height="90"/>
+                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="90" id="KfN-te-8G7"/>
+                        </constraints>
+                    </view>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bUZ-G4-6Km">
+                        <rect key="frame" x="76" y="20" width="16" height="90"/>
+                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="90" id="tb2-DG-VCn"/>
+                        </constraints>
+                    </view>
+                </subviews>
+            </view>
+            <viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="bUZ-G4-6Km" firstAttribute="leading" secondItem="ZTJ-5b-jja" secondAttribute="trailing" id="0oE-gD-qhJ"/>
+                <constraint firstItem="kPx-ke-bH0" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="20" id="0zN-4J-xuW"/>
+                <constraint firstItem="vjN-OJ-FBn" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="7DB-oJ-kac"/>
+                <constraint firstItem="HXn-51-4k3" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="20" id="BHA-dg-j4D"/>
+                <constraint firstItem="MY0-Z0-eto" firstAttribute="leading" secondItem="WK3-F0-fHw" secondAttribute="trailing" id="HZe-G3-LzB"/>
+                <constraint firstAttribute="bottom" secondItem="vjN-OJ-FBn" secondAttribute="bottom" constant="53" id="I1h-Pd-fA6"/>
+                <constraint firstItem="kqo-6j-D1E" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="IBr-T8-R18"/>
+                <constraint firstAttribute="trailing" secondItem="HXn-51-4k3" secondAttribute="trailing" constant="16" id="IMW-v7-N7L"/>
+                <constraint firstItem="P3U-hI-QN2" firstAttribute="leading" secondItem="MY0-Z0-eto" secondAttribute="trailing" id="JwY-UA-mJo"/>
+                <constraint firstItem="dk7-zM-f4U" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="Syf-SP-g1K"/>
+                <constraint firstItem="WK3-F0-fHw" firstAttribute="width" secondItem="P3U-hI-QN2" secondAttribute="width" id="TtB-Gp-m1W"/>
+                <constraint firstItem="HXn-51-4k3" firstAttribute="leading" secondItem="P3U-hI-QN2" secondAttribute="trailing" id="YJL-bt-2dF"/>
+                <constraint firstItem="ZTJ-5b-jja" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="20" id="YUM-hA-Zfg"/>
+                <constraint firstItem="5Qd-Bf-6vO" firstAttribute="leading" secondItem="dk7-zM-f4U" secondAttribute="leading" id="ayA-dy-SSA"/>
+                <constraint firstItem="5Qd-Bf-6vO" firstAttribute="trailing" secondItem="dk7-zM-f4U" secondAttribute="trailing" id="dRh-qF-eFu"/>
+                <constraint firstItem="bUZ-G4-6Km" firstAttribute="width" secondItem="WK3-F0-fHw" secondAttribute="width" id="fs2-iv-scw"/>
+                <constraint firstItem="WK3-F0-fHw" firstAttribute="leading" secondItem="kPx-ke-bH0" secondAttribute="trailing" id="hQX-Xj-1cl"/>
+                <constraint firstAttribute="bottom" secondItem="kqo-6j-D1E" secondAttribute="bottom" constant="42" id="l6L-6c-Unb"/>
+                <constraint firstItem="kPx-ke-bH0" firstAttribute="leading" secondItem="bUZ-G4-6Km" secondAttribute="trailing" id="q0s-9y-qLy"/>
+                <constraint firstItem="bUZ-G4-6Km" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="20" id="qzw-bM-fWa"/>
+                <constraint firstItem="WK3-F0-fHw" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="20" id="rOH-AK-X2y"/>
+                <constraint firstItem="ZTJ-5b-jja" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="16" id="rgO-PP-BTf"/>
+                <constraint firstItem="P3U-hI-QN2" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="20" id="sqp-gs-djU"/>
+                <constraint firstItem="5Qd-Bf-6vO" firstAttribute="centerY" secondItem="dk7-zM-f4U" secondAttribute="centerY" id="tXS-2J-Ykq"/>
+                <constraint firstItem="MY0-Z0-eto" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="20" id="wgy-bY-gPp"/>
+                <constraint firstItem="kqo-6j-D1E" firstAttribute="top" secondItem="dk7-zM-f4U" secondAttribute="bottom" constant="9" id="zt5-3J-UdS"/>
+            </constraints>
+            <connections>
+                <outlet property="k1_button" destination="ZTJ-5b-jja" id="IdD-ef-JQi"/>
+                <outlet property="k2_button" destination="kPx-ke-bH0" id="WR5-TR-41z"/>
+                <outlet property="k3_button" destination="MY0-Z0-eto" id="hOF-xb-XF6"/>
+                <outlet property="k4_button" destination="HXn-51-4k3" id="gbH-sz-lWi"/>
+                <outlet property="time_Button" destination="vjN-OJ-FBn" id="ekD-I9-9Et"/>
+                <outlet property="time_Label" destination="5Qd-Bf-6vO" id="pbO-1a-xw7"/>
+            </connections>
+            <point key="canvasLocation" x="36.641221374045799" y="-11.619718309859156"/>
+        </collectionViewCell>
+    </objects>
+    <resources>
+        <image name="开始计时bg" width="136" height="72"/>
+        <image name="科一灰" width="46" height="46"/>
+        <image name="科一蓝" width="46" height="46"/>
+        <image name="科三灰" width="46" height="46"/>
+        <image name="科三蓝" width="46" height="46"/>
+        <image name="科二灰" width="46" height="46"/>
+        <image name="科二蓝" width="46" height="46"/>
+        <image name="考核灰" width="46" height="46"/>
+        <image name="考核蓝" width="46" height="46"/>
+        <image name="计时bg" width="206" height="206"/>
+    </resources>
+</document>

+ 3 - 0
jiaPei/NewTheory/View/NYTimeRuleCell.h

@@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (weak, nonatomic) IBOutlet UIView *ruleMsg;
 
+@property (weak, nonatomic) IBOutlet UIImageView *bgBootomImg;
+
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 16 - 1
jiaPei/NewTheory/View/NYTimeRuleCell.m

@@ -25,12 +25,27 @@
 
 - (void)bindViewModel:(NYTimeRuleItemViewModel *)viewModel {
     self.viewModel = viewModel;
+    [self setIsCykh:viewModel.isCykh];
+}
+
+- (void)setIsCykh:(BOOL)isCykh
+{
+    if(isCykh){
+        self.backgroundColor = UIColor.clearColor;
+        self.contentView.backgroundColor = UIColor.clearColor;
+        self.bgBootomImg.hidden = NO;
+    }
+    else
+    {
+        self.contentView.backgroundColor = UIColorHex(0x498EF5);
+        self.bgBootomImg.hidden = YES;
+    }
 }
 
 #pragma mark - SystemMethods
 - (void)awakeFromNib {
     [super awakeFromNib];
-    self.contentView.backgroundColor = UIColorHex(0x498EF5);
+    
     self.ruleOne.layer.backgroundColor = [UIColor colorWithRed:65025/255.0 green:65025/255.0 blue:65025/255.0 alpha:1.0].CGColor;
     self.ruleOne.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.1600].CGColor;
     

+ 16 - 7
jiaPei/NewTheory/View/NYTimeRuleCell.xib

@@ -17,8 +17,11 @@
                 <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                 <subviews>
+                    <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="背景bg_bottom" translatesAutoresizingMaskIntoConstraints="NO" id="UUy-1x-08o">
+                        <rect key="frame" x="0.0" y="-10" width="320" height="618"/>
+                    </imageView>
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="7V7-r1-Jzk">
-                        <rect key="frame" x="16" y="8" width="288" height="552"/>
+                        <rect key="frame" x="16" y="10" width="288" height="528"/>
                         <color key="backgroundColor" red="0.94901960780000005" green="0.95294117649999999" blue="0.96078431369999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <userDefinedRuntimeAttributes>
                             <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
@@ -247,7 +250,7 @@
                         </constraints>
                     </stackView>
                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ubD-l9-hSx">
-                        <rect key="frame" x="32" y="464" width="256" height="74"/>
+                        <rect key="frame" x="32" y="444" width="256" height="74"/>
                         <subviews>
                             <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="提示" translatesAutoresizingMaskIntoConstraints="NO" id="fxy-oA-qyq">
                                 <rect key="frame" x="8" y="16" width="42" height="42"/>
@@ -292,20 +295,25 @@
             <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
                 <constraint firstItem="zoa-0V-Tl1" firstAttribute="leading" secondItem="2We-PO-gZx" secondAttribute="leading" constant="32" id="04N-9N-jJF"/>
+                <constraint firstItem="7V7-r1-Jzk" firstAttribute="top" secondItem="2We-PO-gZx" secondAttribute="top" constant="10" id="FS3-1K-uHo"/>
+                <constraint firstItem="UUy-1x-08o" firstAttribute="top" secondItem="2We-PO-gZx" secondAttribute="top" constant="-10" id="JOV-pp-PEt"/>
                 <constraint firstAttribute="trailing" secondItem="ubD-l9-hSx" secondAttribute="trailing" constant="32" id="Liz-Bz-azB"/>
-                <constraint firstAttribute="trailing" secondItem="7V7-r1-Jzk" secondAttribute="trailing" constant="16" id="RpR-qG-nys"/>
+                <constraint firstAttribute="trailing" secondItem="UUy-1x-08o" secondAttribute="trailing" id="ONO-fx-gxX"/>
                 <constraint firstAttribute="trailing" secondItem="K7X-6J-fzO" secondAttribute="trailing" constant="32" id="UmU-gX-UI8"/>
-                <constraint firstAttribute="bottom" secondItem="7V7-r1-Jzk" secondAttribute="bottom" constant="8" id="VY2-Ap-Ay2"/>
                 <constraint firstItem="K7X-6J-fzO" firstAttribute="top" secondItem="2We-PO-gZx" secondAttribute="top" constant="25" id="VkD-XG-iFW"/>
-                <constraint firstAttribute="bottom" secondItem="ubD-l9-hSx" secondAttribute="bottom" constant="30" id="XgK-TF-YBH"/>
+                <constraint firstAttribute="bottom" secondItem="ubD-l9-hSx" secondAttribute="bottom" constant="50" id="XgK-TF-YBH"/>
                 <constraint firstItem="ubD-l9-hSx" firstAttribute="leading" secondItem="2We-PO-gZx" secondAttribute="leading" constant="32" id="avO-74-x2F"/>
-                <constraint firstItem="7V7-r1-Jzk" firstAttribute="top" secondItem="2We-PO-gZx" secondAttribute="top" constant="8" id="hZE-gO-fcs"/>
+                <constraint firstItem="7V7-r1-Jzk" firstAttribute="leading" secondItem="2We-PO-gZx" secondAttribute="leading" constant="16" id="eWM-MH-49N"/>
+                <constraint firstAttribute="trailing" secondItem="7V7-r1-Jzk" secondAttribute="trailing" constant="16" id="ezd-Cf-6K1"/>
+                <constraint firstItem="UUy-1x-08o" firstAttribute="leading" secondItem="2We-PO-gZx" secondAttribute="leading" id="fAy-uV-LGE"/>
                 <constraint firstItem="K7X-6J-fzO" firstAttribute="leading" secondItem="2We-PO-gZx" secondAttribute="leading" constant="32" id="jc8-Og-5C1"/>
+                <constraint firstAttribute="bottom" secondItem="UUy-1x-08o" secondAttribute="bottom" constant="-40" id="koB-5x-QNd"/>
                 <constraint firstAttribute="trailing" secondItem="zoa-0V-Tl1" secondAttribute="trailing" constant="32" id="lUb-cT-loz"/>
-                <constraint firstItem="7V7-r1-Jzk" firstAttribute="leading" secondItem="2We-PO-gZx" secondAttribute="leading" constant="16" id="mrq-XU-biE"/>
+                <constraint firstAttribute="bottom" secondItem="7V7-r1-Jzk" secondAttribute="bottom" constant="30" id="pkH-73-g9E"/>
                 <constraint firstItem="zoa-0V-Tl1" firstAttribute="top" secondItem="K7X-6J-fzO" secondAttribute="bottom" constant="20" id="qyP-Ks-rM2"/>
             </constraints>
             <connections>
+                <outlet property="bgBootomImg" destination="UUy-1x-08o" id="Vgp-HI-agB"/>
                 <outlet property="ruleFour" destination="aAP-eb-23N" id="iEJ-G8-5bI"/>
                 <outlet property="ruleMsg" destination="ubD-l9-hSx" id="Qzg-80-9aj"/>
                 <outlet property="ruleOne" destination="Fz0-tB-ZPz" id="Ohv-Cf-5pf"/>
@@ -321,6 +329,7 @@
         <image name="timeRule3" width="25" height="42"/>
         <image name="timeRule4" width="26" height="42"/>
         <image name="提示" width="42" height="42"/>
+        <image name="背景bg_bottom" width="375" height="628"/>
         <systemColor name="systemGray6Color">
             <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>

+ 1 - 0
jiaPei/NewTheory/View/NYTimeStartRuleCell.m

@@ -34,4 +34,5 @@
     
 }
 
+
 @end

+ 18 - 0
jiaPei/NewTheory/ViewModel/NYGetjobStartRuleViewModel.h

@@ -0,0 +1,18 @@
+//
+//  NYGetjobStartRuleViewModel.h
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/6/9.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "RQCommonCollectionItemViewModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NYGetjobStartRuleViewModel : RQCommonCollectionItemViewModel
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 27 - 0
jiaPei/NewTheory/ViewModel/NYGetjobStartRuleViewModel.m

@@ -0,0 +1,27 @@
+//
+//  NYGetjobStartRuleViewModel.m
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/6/9.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import "NYGetjobStartRuleViewModel.h"
+
+
+@interface NYGetjobStartRuleViewModel ()
+
+@end
+
+@implementation NYGetjobStartRuleViewModel
+- (instancetype)init {
+    if (self = [super init]) {
+        self.itemSize = CGSizeMake(RQ_SCREEN_WIDTH, RQ_FIT_HORIZONTAL(383.f));
+    }
+    return self;
+}
+
+- (NSString *)itemClassName {
+    return @"NYGetjobStartRuleCell";
+}
+@end

+ 17 - 0
jiaPei/NewTheory/ViewModel/NYGetjobTimeViewModel.h

@@ -0,0 +1,17 @@
+//
+//  NYGetjobTimeViewModel.h
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/6/9.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NYGetjobTimeViewModel : RQCommonCollectionViewModel
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 60 - 0
jiaPei/NewTheory/ViewModel/NYGetjobTimeViewModel.m

@@ -0,0 +1,60 @@
+//
+//  NYGetjobTimeViewModel.m
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/6/9.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import "NYGetjobTimeViewModel.h"
+#import "NYTimeRuleItemViewModel.h"
+#import "NYGetjobStartRuleViewModel.h"
+
+@interface NYGetjobTimeViewModel ()
+
+@end
+
+
+@implementation NYGetjobTimeViewModel
+#pragma mark - Public Method
+- (instancetype)initWithServices:(id<RQViewModelServices>)services params:(NSDictionary *)params {
+    if (self = [super initWithServices:services params:params]) {
+        
+    }
+    return self;
+}
+
+- (void)initialize {
+    [super initialize];
+    
+    self.title = @"从业资格计时";
+    ///配置数据
+    [self rq_configureData];
+}
+
+#pragma mark - ConfigureData
+- (void)rq_configureData {
+//    @weakify(self)
+    /// 数据源
+    RAC(self, dataSource) = [RACSignal
+                            combineLatest:@[RACObserve(RQ_USER_MANAGER, isCykh)]
+                            reduce:^(NSNumber *isCykh) {
+//        @strongify(self)
+        RQCommonGroupViewModel *group0 = [RQCommonGroupViewModel groupViewModel];
+        RQTimeADItemViewModel *timeADItemViewModel = [[RQTimeADItemViewModel alloc] init];
+        group0.itemViewModels = @[timeADItemViewModel];
+        
+        RQCommonGroupViewModel *group1 = [RQCommonGroupViewModel groupViewModel];
+        NYGetjobStartRuleViewModel *timeStartRuleViewModel = [[NYGetjobStartRuleViewModel alloc] init];
+        group1.itemViewModels = @[timeStartRuleViewModel];
+        
+        RQCommonGroupViewModel *group2 = [RQCommonGroupViewModel groupViewModel];
+        NYTimeRuleItemViewModel *timeRuleItemViewModel = [[NYTimeRuleItemViewModel alloc] init];
+        timeRuleItemViewModel.isCykh = isCykh;
+        group2.itemViewModels = @[timeRuleItemViewModel];
+        
+        return @[group0, group1, group2];
+
+    }];
+}
+@end

+ 2 - 0
jiaPei/NewTheory/ViewModel/NYTimeRuleItemViewModel.h

@@ -12,6 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface NYTimeRuleItemViewModel : RQCommonCollectionItemViewModel
 
+@property (assign, nonatomic) BOOL isCykh;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 1 - 1
jiaPei/NewTheory/ViewModel/NYTimeRuleItemViewModel.m

@@ -16,7 +16,7 @@
 @implementation NYTimeRuleItemViewModel
 - (instancetype)init {
     if (self = [super init]) {
-        self.itemSize = CGSizeMake(RQ_SCREEN_WIDTH, RQ_FIT_HORIZONTAL(568.f) + (10 * 7));
+        self.itemSize = CGSizeMake(RQ_SCREEN_WIDTH, RQ_FIT_HORIZONTAL(568.f) + (10 * 6)+30);
     }
     return self;
 }

+ 1 - 0
jiaPei/Utils/Router/RQRouter.m

@@ -95,6 +95,7 @@ static RQRouter *sharedInstance_ = nil;
 			 /*TimeModule*/
              @"RQTimeViewModel"                     :               @"RQTimeViewController",
              @"NYTheoryTimeViewModel"                     :               @"NYTheoryTimeVC",
+             @"NYGetjobTimeViewModel"                     :               @"NYGetjobTimeVC",
 //             @"RQTimeViewModel"                     :               @"TimingBaseVC",
              /*DiscoverModule*/
 //             @"RQDiscoverViewModel"                 :               @"RQDiscoverViewController",