浏览代码

成绩列表 up 完成。

openlockPPP 1 年之前
父节点
当前提交
9feff3964b

+ 36 - 0
.gitignore

@@ -363,3 +363,39 @@ Pods/Target Support Files/SDWebImageWebPCoder/SDWebImageWebPCoder-prefix.pch
 Pods/Target Support Files/SDWebImageWebPCoder/SDWebImageWebPCoder.debug.xcconfig
 Pods/Target Support Files/SDWebImageWebPCoder/SDWebImageWebPCoder.modulemap
 Pods/Target Support Files/SDWebImageWebPCoder/SDWebImageWebPCoder.release.xcconfig
+JiaPeiManage.xcworkspace/xcuserdata/mimasigeling.xcuserdatad/IDEFindNavigatorScopes.plist
+Pods/Target Support Files/Pods-JiaPeiManage/Pods-JiaPeiManage-resources-Debug-input-files.xcfilelist
+Pods/Target Support Files/Pods-JiaPeiManage/Pods-JiaPeiManage-resources-Debug-output-files.xcfilelist
+Pods/Target Support Files/Pods-JiaPeiManage/Pods-JiaPeiManage-resources-Release-input-files.xcfilelist
+Pods/Target Support Files/Pods-JiaPeiManage/Pods-JiaPeiManage-resources-Release-output-files.xcfilelist
+Pods/Target Support Files/Pods-JiaPeiManage/Pods-JiaPeiManage-resources.sh
+Pods/Target Support Files/UMCCommonLog/UMCCommonLog.debug.xcconfig
+Pods/Target Support Files/UMCCommonLog/UMCCommonLog.release.xcconfig
+Pods/Target Support Files/UMCommon/UMCommon.debug.xcconfig
+Pods/Target Support Files/UMCommon/UMCommon.release.xcconfig
+Pods/Target Support Files/UMDevice/UMDevice.debug.xcconfig
+Pods/Target Support Files/UMDevice/UMDevice.release.xcconfig
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.bundle/en.lproj/UMAnalyticsGameLog.strings
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.bundle/en.lproj/UMCommonLog.strings
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.bundle/en.lproj/UMPushLog.strings
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.bundle/en.lproj/UMSocialPromptLocalizable.strings
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.bundle/zh-Hans.lproj/UMAnalyticsGameLog.strings
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.bundle/zh-Hans.lproj/UMCommonLog.strings
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.bundle/zh-Hans.lproj/UMPushLog.strings
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.bundle/zh-Hans.lproj/UMSocialPromptLocalizable.strings
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.framework/1.0.0_2b57438b90_20171227114643
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.framework/Info.plist
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.framework/UMCommonLog
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.framework/Headers/UMCommonLogHeaders.h
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.framework/Headers/UMCommonLogManager.h
+Pods/UMCCommonLog/UMCommonLog/UMCommonLog.framework/Modules/module.modulemap
+Pods/UMCommon/UMCommon_7.4.1/UMCommon.framework/7.4.1_bba3db1af9_20230510163445
+Pods/UMCommon/UMCommon_7.4.1/UMCommon.framework/Headers
+Pods/UMCommon/UMCommon_7.4.1/UMCommon.framework/UMCommon
+Pods/UMCommon/UMCommon_7.4.1/UMCommon.framework/Versions/Current
+Pods/UMCommon/UMCommon_7.4.1/UMCommon.framework/Versions/A/UMCommon
+Pods/UMCommon/UMCommon_7.4.1/UMCommon.framework/Versions/A/Headers/MobClick.h
+Pods/UMCommon/UMCommon_7.4.1/UMCommon.framework/Versions/A/Headers/UMCommon.h
+Pods/UMCommon/UMCommon_7.4.1/UMCommon.framework/Versions/A/Headers/UMConfigure.h
+Pods/UMDevice/UMDevice_3.1.0/UMDevice.framework/UMDevice
+Pods/UMDevice/UMDevice_3.1.0/UMDevice.framework/Headers/UMZid.h

+ 20 - 0
JiaPeiManage.xcodeproj/project.pbxproj

@@ -16,9 +16,14 @@
 		903628C82A417B2D00F0AA6C /* MeTraineeDetails01Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 903628C72A417B2D00F0AA6C /* MeTraineeDetails01Cell.xib */; };
 		903628CA2A417BA800F0AA6C /* MeTraineeDetails01HeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 903628C92A417BA800F0AA6C /* MeTraineeDetails01HeaderView.swift */; };
 		903628CC2A417BE700F0AA6C /* MeTraineeDetails01HeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 903628CB2A417BE700F0AA6C /* MeTraineeDetails01HeaderView.xib */; };
+		903628CE2A41AF1500F0AA6C /* MeTraineeDetails02HeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 903628CD2A41AF1500F0AA6C /* MeTraineeDetails02HeaderView.swift */; };
+		903628D02A41AF3100F0AA6C /* MeTraineeDetails02HeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 903628CF2A41AF3100F0AA6C /* MeTraineeDetails02HeaderView.xib */; };
+		903628D22A41AFA400F0AA6C /* MeTraineeDetails02Cell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 903628D12A41AFA400F0AA6C /* MeTraineeDetails02Cell.swift */; };
+		903628D42A41AFD700F0AA6C /* MeTraineeDetails02Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 903628D32A41AFD700F0AA6C /* MeTraineeDetails02Cell.xib */; };
 		9076C5DA2A386B2300E5E33F /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9076C5D92A386B2300E5E33F /* MineViewController.swift */; };
 		9076C5DC2A386B2F00E5E33F /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9076C5DB2A386B2F00E5E33F /* MineViewController.xib */; };
 		9076C5DF2A387CBC00E5E33F /* MeTraineeListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9076C5DE2A387CBC00E5E33F /* MeTraineeListViewController.swift */; };
+		908FEE992A42A1D300BEB81C /* StuResultDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 908FEE982A42A1D300BEB81C /* StuResultDataModel.swift */; };
 		909DA5C12A3999B30034501F /* NYTips.swift in Sources */ = {isa = PBXBuildFile; fileRef = 909DA5C02A3999B30034501F /* NYTips.swift */; };
 		909DA5C32A3A01220034501F /* CoachcityModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 909DA5C22A3A01220034501F /* CoachcityModel.swift */; };
 		909DA5C52A3AA1E60034501F /* MeTraineeNavBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 909DA5C42A3AA1E60034501F /* MeTraineeNavBar.swift */; };
@@ -145,9 +150,14 @@
 		903628C72A417B2D00F0AA6C /* MeTraineeDetails01Cell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MeTraineeDetails01Cell.xib; sourceTree = "<group>"; };
 		903628C92A417BA800F0AA6C /* MeTraineeDetails01HeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeTraineeDetails01HeaderView.swift; sourceTree = "<group>"; };
 		903628CB2A417BE700F0AA6C /* MeTraineeDetails01HeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MeTraineeDetails01HeaderView.xib; sourceTree = "<group>"; };
+		903628CD2A41AF1500F0AA6C /* MeTraineeDetails02HeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeTraineeDetails02HeaderView.swift; sourceTree = "<group>"; };
+		903628CF2A41AF3100F0AA6C /* MeTraineeDetails02HeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MeTraineeDetails02HeaderView.xib; sourceTree = "<group>"; };
+		903628D12A41AFA400F0AA6C /* MeTraineeDetails02Cell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeTraineeDetails02Cell.swift; sourceTree = "<group>"; };
+		903628D32A41AFD700F0AA6C /* MeTraineeDetails02Cell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MeTraineeDetails02Cell.xib; sourceTree = "<group>"; };
 		9076C5D92A386B2300E5E33F /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = "<group>"; };
 		9076C5DB2A386B2F00E5E33F /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = "<group>"; };
 		9076C5DE2A387CBC00E5E33F /* MeTraineeListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeTraineeListViewController.swift; sourceTree = "<group>"; };
+		908FEE982A42A1D300BEB81C /* StuResultDataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StuResultDataModel.swift; sourceTree = "<group>"; };
 		909DA5C02A3999B30034501F /* NYTips.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NYTips.swift; sourceTree = "<group>"; };
 		909DA5C22A3A01220034501F /* CoachcityModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoachcityModel.swift; sourceTree = "<group>"; };
 		909DA5C42A3AA1E60034501F /* MeTraineeNavBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeTraineeNavBar.swift; sourceTree = "<group>"; };
@@ -346,6 +356,10 @@
 				903628C72A417B2D00F0AA6C /* MeTraineeDetails01Cell.xib */,
 				903628C92A417BA800F0AA6C /* MeTraineeDetails01HeaderView.swift */,
 				903628CB2A417BE700F0AA6C /* MeTraineeDetails01HeaderView.xib */,
+				903628CD2A41AF1500F0AA6C /* MeTraineeDetails02HeaderView.swift */,
+				903628CF2A41AF3100F0AA6C /* MeTraineeDetails02HeaderView.xib */,
+				903628D12A41AFA400F0AA6C /* MeTraineeDetails02Cell.swift */,
+				903628D32A41AFD700F0AA6C /* MeTraineeDetails02Cell.xib */,
 			);
 			path = Views;
 			sourceTree = "<group>";
@@ -463,6 +477,7 @@
 				909DA5C22A3A01220034501F /* CoachcityModel.swift */,
 				90BC4BD82A3B0F98006FD683 /* TraineeDataModel.swift */,
 				903628BA2A40431800F0AA6C /* TraineeInfoModel.swift */,
+				908FEE982A42A1D300BEB81C /* StuResultDataModel.swift */,
 			);
 			path = Models;
 			sourceTree = "<group>";
@@ -852,6 +867,7 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				903628D02A41AF3100F0AA6C /* MeTraineeDetails02HeaderView.xib in Resources */,
 				90CE52842A36E5460033BD06 /* SearchBarView.xib in Resources */,
 				90CE52F52A36EDCF0033BD06 /* NYArticleNavBar.xib in Resources */,
 				90CE52252A36C0720033BD06 /* LaunchScreen.storyboard in Resources */,
@@ -868,6 +884,7 @@
 				90CE53002A36F7110033BD06 /* HomeViewController.xib in Resources */,
 				90BC4BE72A3DDF44006FD683 /* MeTraineeSubjectHeaderView.xib in Resources */,
 				909DA5CD2A3AC00D0034501F /* MeTraineeSearchPageViewController.xib in Resources */,
+				903628D42A41AFD700F0AA6C /* MeTraineeDetails02Cell.xib in Resources */,
 				903628CC2A417BE700F0AA6C /* MeTraineeDetails01HeaderView.xib in Resources */,
 				909DA5C72A3AA1FF0034501F /* MeTraineeNavBar.xib in Resources */,
 			);
@@ -947,6 +964,7 @@
 				90CE53022A3834060033BD06 /* CoachAPI.swift in Sources */,
 				90CE52D82A36E6000033BD06 /* URLNavigationMap.swift in Sources */,
 				903628BB2A40431800F0AA6C /* TraineeInfoModel.swift in Sources */,
+				908FEE992A42A1D300BEB81C /* StuResultDataModel.swift in Sources */,
 				90CE52752A36E5460033BD06 /* LWPlayerControlView.swift in Sources */,
 				90CE52A92A36E59A0033BD06 /* UIBarButtonItem+Init.swift in Sources */,
 				90CE528C2A36E5460033BD06 /* Action.swift in Sources */,
@@ -1012,6 +1030,7 @@
 				90CE52832A36E5460033BD06 /* SearchBarView.swift in Sources */,
 				9076C5DA2A386B2300E5E33F /* MineViewController.swift in Sources */,
 				903628CA2A417BA800F0AA6C /* MeTraineeDetails01HeaderView.swift in Sources */,
+				903628D22A41AFA400F0AA6C /* MeTraineeDetails02Cell.swift in Sources */,
 				90CE52AC2A36E59A0033BD06 /* Array+SectionModel.swift in Sources */,
 				90CE52762A36E5460033BD06 /* LWPlayerSlider.swift in Sources */,
 				90BC4BD92A3B0F98006FD683 /* TraineeDataModel.swift in Sources */,
@@ -1043,6 +1062,7 @@
 				90CE52802A36E5460033BD06 /* NYSwToaster.swift in Sources */,
 				90CE52DC2A36E6250033BD06 /* NYAppCongfigure.swift in Sources */,
 				90CE52322A36E4600033BD06 /* BaseCollectionViewController.swift in Sources */,
+				903628CE2A41AF1500F0AA6C /* MeTraineeDetails02HeaderView.swift in Sources */,
 				90CE52872A36E5460033BD06 /* NetAnimationView.swift in Sources */,
 				903628BE2A41766B00F0AA6C /* MeTraineeDetails01Controller.swift in Sources */,
 			);

+ 6 - 0
JiaPeiManage/Sources/Constants/NYMacros.swift

@@ -46,3 +46,9 @@ struct NYMacros {
 //    }
 
 }
+
+//存放-常用-源
+struct NYSource {
+    
+    static let statedicts:[String:String] = ["1":"一","2":"二","3":"三","4":"四","5":"五"]
+}

+ 48 - 0
JiaPeiManage/Sources/Models/StuResultDataModel.swift

@@ -0,0 +1,48 @@
+//
+//  StuResultDataModel.swift
+//  JiaPeiManage
+//
+//  Created by Ning.ge on 2023/6/21.
+//
+
+import ObjectMapper
+
+
+struct StuResultInfoModel : ImmutableMappable{
+    
+    var crdate : String!
+    var endDate : String!
+    var kskm : String!
+    var score : Int!
+    var startDate : String!
+    var userId : Int!
+    var userName : String!
+
+    init(map: Map) throws {
+        crdate = try map.value("crdate") ?? ""
+        endDate = try map.value("endDate") ?? ""
+        kskm = try map.value("kskm") ?? ""
+        score = try map.value("score") ?? 0
+        startDate = try map.value("startDate") ?? ""
+        userId = try map.value("userId") ?? 0
+        userName = try map.value("userName") ?? ""
+    }
+    
+}
+
+
+struct StuResultDataModel : ImmutableMappable{
+    
+    var code : Int!
+    var msg : String!
+    var rows : [StuResultInfoModel]!
+    var total : Int!
+    
+    init(map: Map) throws {
+        code = try map.value("code")
+        msg = try map.value("msg") ?? ""
+        rows = try map.value("rows")
+        total = try map.value("total") ?? 0
+    }
+    
+}

+ 2 - 2
JiaPeiManage/Sources/Models/TraineeInfoModel.swift

@@ -15,7 +15,7 @@ struct TraineeInfoModel : ImmutableMappable{
     var dqbh : String!
     var dqmc : String!
     var face : String!
-    var id : String!
+    var id : Int!
     var idcard : String!
     var k1 : String!
     var k2 : String!
@@ -61,7 +61,7 @@ struct TraineeInfoModel : ImmutableMappable{
         dqbh = try map.value("dqbh") ?? ""
         dqmc = try map.value("dqmc") ?? ""
         face = try map.value("face") ?? ""
-        id = try map.value("id") ?? ""
+        id = try map.value("id") ?? 0
         idcard = try map.value("idcard")
         k1 = try map.value("k1") ?? ""
         k2 = try map.value("k2") ?? ""

+ 4 - 4
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeDetails/MeTraineeDetails01Controller.swift

@@ -65,10 +65,10 @@ final class MeTraineeDetails01Controller: BaseTableViewController {
                               "阶段二学时":twotime,
                               "阶段三学时":threetime,
                               "阶段四学时":fourtime,
-                              "科一已打/所需学时":info.k1+"\\"+info.totalKm1,
-                              "科二已打/所需学时":info.k2+"\\"+info.totalKm2,
-                              "科三已打/所需学时":info.k3+"\\"+info.totalKm3,
-                              "科四已打/所需学时":info.k4+"\\"+info.totalKm4,
+                              "科一已打/所需学时":info.k1+"/"+info.totalKm1,
+                              "科二已打/所需学时":info.k2+"/"+info.totalKm2,
+                              "科三已打/所需学时":info.k3+"/"+info.totalKm3,
+                              "科四已打/所需学时":info.k4+"/"+info.totalKm4,
                               "科二总里程":info.k2Mileage,
                               "科三总里程":info.k3Mileage,
                               "总里程":info.mileage,]

+ 62 - 34
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeDetails/MeTraineeDetails02Controller.swift

@@ -12,40 +12,45 @@ import RxCocoa
 
 final class MeTraineeDetails02Controller: BaseTableViewController {
     
-    let cellIdentifier:String = "_MeTraineeSubjectCell"
+    let cellIdentifier:String = "_MeTraineeDetails02Cell"
     // MARK: 服务属性
     private let cocahService: CoachServiceType = CoachService(networking: CoachNetworking())
    
     // MARK: UI属性
-    
+    let header01_view = MeTraineeDetails01HeaderView.loadFromNib().then {
+        $0.title_label.text = "成绩表"
+    }
+    let header02_view = MeTraineeDetails02HeaderView.loadFromNib()
     
     // MARK: 数据
-    var traineeDataModel:TraineeDataModel?
+    var stuResultDataModel:StuResultDataModel?
     
     var page:Int = 1
     var pageSize:Int = 10
-    var state = "1"
-    
+    var stuOutId:Int = 0
     
     override func viewDidLoad() {
         super.viewDidLoad()
-        
-        getCoachInfoList()
         //绑定
         biandView()
     }
     
     // MARK: 私有方法
+    func setStuOutId(stuId:Int){
+        stuOutId = stuId
+        getStuResultList()
+    }
     
-    func getCoachInfoList()
-    {
-        self.cocahService.coachInfoListRequest(city: LocalManager.userInfo.city!, appCoachId: "", coachId: "\(LocalManager.userInfo.id)", field: "", pageNum: page, pageSize: pageSize, schoolId: 0, state: state)
-            .subscribe(onSuccess: { traineeDataModel in
-                self.traineeDataModel = traineeDataModel
-                print("coachInfoListRequest成功")
+    func getStuResultList(){
+        self.cocahService.stuScoreByOutIdRequest(pageNum: page, pageSize: pageSize, stuOutId: stuOutId)
+            .subscribe(onSuccess: {[unowned self] stuResultDataModel in
+                self.stuResultDataModel = stuResultDataModel
+                print("resultInfoModel成功")
                 self.hideLoadAnimation()
                 self.tableView.reloadData()
+                self.stopRefresh()
             }, onError: { error in
+                self.stopRefresh()
             })
             .disposed(by: disposeBag)
     }
@@ -54,47 +59,70 @@ final class MeTraineeDetails02Controller: BaseTableViewController {
         tableView.delegate = self
         tableView.dataSource = self
         tableView.separatorStyle = .none //去除分割线
-        tableView.register(UINib(nibName: "MeTraineeSubjectCell", bundle: nil), forCellReuseIdentifier: cellIdentifier)
-        tableView.rowHeight = 288.f
+        tableView.register(UINib(nibName: "MeTraineeDetails02Cell", bundle: nil), forCellReuseIdentifier: cellIdentifier)
+        tableView.rowHeight = 62.f
         setupRefreshHeader(tableView) {[unowned self] in
-            DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
-                // 在延迟 1 秒后执行的代码
-                self.stopRefresh()
-            }
-            NSLog("AAAAAAA")
+//            DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
+//                // 在延迟 1 秒后执行的代码
+//
+//            }
+            self.getStuResultList()
         }
         self.isEmptyDisplay = false
+        self.hideLoadAnimation()
         
     }
-    
 }
 
 //数据源
 extension MeTraineeDetails02Controller:UITableViewDataSource {
     
+    
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
-        return self.traineeDataModel?.rows?.count ?? 0
+        if (stuResultDataModel != nil){
+            return (stuResultDataModel?.rows.count)!
+        }
+        return 0
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        let header_view = UIView().then {
+            $0.backgroundColor = .db_theme
+        }
+        header_view.addSubview(header01_view)
+        header01_view.snp.makeConstraints { make in
+            make.left.right.top.equalTo(header_view)
+            make.height.equalTo(50.f)
+        }
+        header_view.addSubview(header02_view)
+        header02_view.snp.makeConstraints { make in
+            make.top.equalTo(header01_view.bottom)
+            make.left.right.equalTo(header_view)
+            make.height.equalTo(44.f)
+        }
+        return header_view
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 50.f+44.f
     }
     
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-        let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) as! MeTraineeSubjectCell
-        cell.index_button.setTitle("\(indexPath.row+1)", for: .normal)
-        cell.setRowInfo(rowInfo: (self.traineeDataModel?.rows?[indexPath.row])!)
+        let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) as! MeTraineeDetails02Cell
+        cell.contentView.backgroundColor = ((indexPath.row%2) != 0) ? UIColor("#113357") : UIColor("#0B2B4D")
+        cell.backgroundColor = ((indexPath.row%2) != 0) ? UIColor("#113357") : UIColor("#0B2B4D")
+        let info = (self.stuResultDataModel?.rows[indexPath.row])! as StuResultInfoModel
+        cell.km_label.text = "科目" + NYSource.statedicts[info.kskm]!
+        cell.result_label.text = String(info.score)
+        cell.starttime_label.text = info.startDate
+        cell.endtime_label.text = info.endDate
         return cell
     }
 }
 
 //事件
 extension MeTraineeDetails02Controller:UITableViewDelegate {
-    
-    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
-        tableView.deselectRow(at: indexPath, animated: false)
-        let rowInfo = self.traineeDataModel?.rows![indexPath.row]
-        if rowInfo != nil {
-            let context: Int = rowInfo?.id ?? 0
-            NYSwRouter.push(NYSwPushType.trainee_info,context: context)
-        }
-    }
+
     
 }
 

+ 62 - 42
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeDetails/MeTraineeDetails04Controller.swift

@@ -12,48 +12,45 @@ import RxCocoa
 
 final class MeTraineeDetails04Controller: BaseTableViewController {
     
-    let cellIdentifier:String = "_MeTraineeSubjectCell"
+    let cellIdentifier:String = "_MeTraineeDetails02Cell"
     // MARK: 服务属性
     private let cocahService: CoachServiceType = CoachService(networking: CoachNetworking())
    
     // MARK: UI属性
-    
+    let header01_view = MeTraineeDetails01HeaderView.loadFromNib().then {
+        $0.title_label.text = "成绩表"
+    }
+    let header02_view = MeTraineeDetails02HeaderView.loadFromNib()
     
     // MARK: 数据
-    var traineeDataModel:TraineeDataModel?
+    var stuResultDataModel:StuResultDataModel?
     
     var page:Int = 1
     var pageSize:Int = 10
-    var state = "1"
-    
-    init(state:String) {
-        super.init()
-        self.state = state
-    }
-    
-    required convenience init?(coder aDecoder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
+    var stuOutId:Int = 0
     
     override func viewDidLoad() {
         super.viewDidLoad()
-        
-        getCoachInfoList()
         //绑定
         biandView()
     }
     
     // MARK: 私有方法
+    func setStuOutId(stuId:Int){
+        stuOutId = stuId
+        getStuResultList()
+    }
     
-    func getCoachInfoList()
-    {
-        self.cocahService.coachInfoListRequest(city: LocalManager.userInfo.city!, appCoachId: "", coachId: "\(LocalManager.userInfo.id)", field: "", pageNum: page, pageSize: pageSize, schoolId: 0, state: state)
-            .subscribe(onSuccess: { traineeDataModel in
-                self.traineeDataModel = traineeDataModel
-                print("coachInfoListRequest成功")
+    func getStuResultList(){
+        self.cocahService.stuScoreByOutIdRequest(pageNum: page, pageSize: pageSize, stuOutId: stuOutId)
+            .subscribe(onSuccess: {[unowned self] stuResultDataModel in
+                self.stuResultDataModel = stuResultDataModel
+                print("resultInfoModel成功")
                 self.hideLoadAnimation()
                 self.tableView.reloadData()
+                self.stopRefresh()
             }, onError: { error in
+                self.stopRefresh()
             })
             .disposed(by: disposeBag)
     }
@@ -62,47 +59,70 @@ final class MeTraineeDetails04Controller: BaseTableViewController {
         tableView.delegate = self
         tableView.dataSource = self
         tableView.separatorStyle = .none //去除分割线
-        tableView.register(UINib(nibName: "MeTraineeSubjectCell", bundle: nil), forCellReuseIdentifier: cellIdentifier)
-        tableView.rowHeight = 288.f
+        tableView.register(UINib(nibName: "MeTraineeDetails02Cell", bundle: nil), forCellReuseIdentifier: cellIdentifier)
+        tableView.rowHeight = 62.f
         setupRefreshHeader(tableView) {[unowned self] in
-            DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
-                // 在延迟 1 秒后执行的代码
-                self.stopRefresh()
-            }
-            NSLog("AAAAAAA")
+//            DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
+//                // 在延迟 1 秒后执行的代码
+//
+//            }
+            self.getStuResultList()
         }
         self.isEmptyDisplay = false
+        self.hideLoadAnimation()
         
     }
-    
 }
 
 //数据源
 extension MeTraineeDetails04Controller:UITableViewDataSource {
     
+    
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
-        return self.traineeDataModel?.rows?.count ?? 0
+        if (stuResultDataModel != nil){
+            return (stuResultDataModel?.rows.count)!
+        }
+        return 0
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        let header_view = UIView().then {
+            $0.backgroundColor = .db_theme
+        }
+        header_view.addSubview(header01_view)
+        header01_view.snp.makeConstraints { make in
+            make.left.right.top.equalTo(header_view)
+            make.height.equalTo(50.f)
+        }
+        header_view.addSubview(header02_view)
+        header02_view.snp.makeConstraints { make in
+            make.top.equalTo(header01_view.bottom)
+            make.left.right.equalTo(header_view)
+            make.height.equalTo(44.f)
+        }
+        return header_view
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 50.f+44.f
     }
     
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-        let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) as! MeTraineeSubjectCell
-        cell.index_button.setTitle("\(indexPath.row+1)", for: .normal)
-        cell.setRowInfo(rowInfo: (self.traineeDataModel?.rows?[indexPath.row])!)
+        let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) as! MeTraineeDetails02Cell
+        cell.contentView.backgroundColor = ((indexPath.row%2) != 0) ? UIColor("#113357") : UIColor("#0B2B4D")
+        cell.backgroundColor = ((indexPath.row%2) != 0) ? UIColor("#113357") : UIColor("#0B2B4D")
+        let info = (self.stuResultDataModel?.rows[indexPath.row])! as StuResultInfoModel
+        cell.km_label.text = "科目" + NYSource.statedicts[info.kskm]!
+        cell.result_label.text = String(info.score)
+        cell.starttime_label.text = info.startDate
+        cell.endtime_label.text = info.endDate
         return cell
     }
 }
 
 //事件
 extension MeTraineeDetails04Controller:UITableViewDelegate {
-    
-    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
-        tableView.deselectRow(at: indexPath, animated: false)
-        let rowInfo = self.traineeDataModel?.rows![indexPath.row]
-        if rowInfo != nil {
-            let context: Int = rowInfo?.id ?? 0
-            NYSwRouter.push(NYSwPushType.trainee_info,context: context)
-        }
-    }
+
     
 }
 

+ 3 - 0
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeDetailsPageViewController.swift

@@ -76,6 +76,9 @@ final class MeTraineeDetailsPageViewController: BaseViewController {
                     let vc:MeTraineeDetails01Controller =  self.pageController.currentViewController as! MeTraineeDetails01Controller
                     vc.setInfo(info: traineeInfoModel)
                 }
+                //刷新理论成绩
+                guard let details02vc:MeTraineeDetails02Controller = self.pageController.viewController(atPage: 1) as? MeTraineeDetails02Controller else { return }
+                details02vc.setStuOutId(stuId: traineeInfoModel.id)
                 
             } onError: { error in
                 

+ 25 - 0
JiaPeiManage/Sources/Modulars/学员/Views/MeTraineeDetails02Cell.swift

@@ -0,0 +1,25 @@
+//
+//  MeTraineeDetails02Cell.swift
+//  JiaPeiManage
+//
+//  Created by Ning.ge on 2023/6/20.
+//
+
+import UIKit
+
+final class MeTraineeDetails02Cell: UITableViewCell,NibLoadable {
+    
+    //科目
+    @IBOutlet weak var km_label: UILabel!
+    //成绩
+    @IBOutlet weak var result_label: UILabel!
+    //开始时间
+    @IBOutlet weak var starttime_label: UILabel!
+    //结束时间
+    @IBOutlet weak var endtime_label: UILabel!
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.selectionStyle = .none
+    }
+}

+ 84 - 0
JiaPeiManage/Sources/Modulars/学员/Views/MeTraineeDetails02Cell.xib

@@ -0,0 +1,84 @@
+<?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"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MeTraineeDetails02Cell" customModule="JiaPeiManage" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="62"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="科目n" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xNB-Hf-YKs">
+                    <rect key="frame" x="0.0" y="0.0" width="80" height="62"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="80" id="m0O-nQ-7EN"/>
+                        <constraint firstAttribute="height" constant="62" id="uma-XN-foI"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                    <color key="textColor" red="0.83137254901960778" green="0.8666666666666667" blue="0.90196078431372551" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="85" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dG1-qV-GYq">
+                    <rect key="frame" x="80" y="0.0" width="80" height="62"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="62" id="EgK-7z-Jy5"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                    <color key="textColor" red="0.83137254900000002" green="0.86666666670000003" blue="0.90196078430000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ETj-Nu-l5h" userLabel="2018-09-20 19:38:45">
+                    <rect key="frame" x="160" y="0.0" width="107.66666666666669" height="62"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="62" id="taY-mr-eU4"/>
+                    </constraints>
+                    <string key="text"> 2018-09-20
+19:38:45</string>
+                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                    <color key="textColor" red="0.83137254900000002" green="0.86666666670000003" blue="0.90196078430000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZDP-ka-Vc5" userLabel="2018-09-20 19:38:45">
+                    <rect key="frame" x="267.66666666666669" y="0.0" width="107.33333333333331" height="62"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="62" id="e6X-9o-2lw"/>
+                    </constraints>
+                    <string key="text"> 2018-09-20
+19:38:45</string>
+                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                    <color key="textColor" red="0.83137254900000002" green="0.86666666670000003" blue="0.90196078430000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+            </subviews>
+            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
+            <color key="backgroundColor" red="0.043137254901960784" green="0.16862745098039217" blue="0.30196078431372547" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
+            <constraints>
+                <constraint firstItem="xNB-Hf-YKs" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="2fL-Od-2ZI"/>
+                <constraint firstItem="dG1-qV-GYq" firstAttribute="leading" secondItem="xNB-Hf-YKs" secondAttribute="trailing" id="D34-mO-Y3Y"/>
+                <constraint firstItem="ZDP-ka-Vc5" firstAttribute="leading" secondItem="ETj-Nu-l5h" secondAttribute="trailing" id="DWW-cb-f5I"/>
+                <constraint firstItem="ETj-Nu-l5h" firstAttribute="width" secondItem="ZDP-ka-Vc5" secondAttribute="width" multiplier="1.00311" id="IXb-hY-4fm"/>
+                <constraint firstItem="xNB-Hf-YKs" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="NSb-zb-1Ks"/>
+                <constraint firstItem="dG1-qV-GYq" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="PcF-8B-YDY"/>
+                <constraint firstItem="ETj-Nu-l5h" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Rgf-ZU-pUb"/>
+                <constraint firstItem="ZDP-ka-Vc5" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="aZc-r4-llK"/>
+                <constraint firstItem="ETj-Nu-l5h" firstAttribute="leading" secondItem="dG1-qV-GYq" secondAttribute="trailing" id="dV7-Zf-P6f"/>
+                <constraint firstItem="dG1-qV-GYq" firstAttribute="width" secondItem="xNB-Hf-YKs" secondAttribute="width" id="nrG-jc-3OD"/>
+                <constraint firstAttribute="trailing" secondItem="ZDP-ka-Vc5" secondAttribute="trailing" id="y8f-ef-g1v"/>
+            </constraints>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="endtime_label" destination="ZDP-ka-Vc5" id="gaf-oH-REk"/>
+                <outlet property="km_label" destination="xNB-Hf-YKs" id="L01-VZ-uEB"/>
+                <outlet property="result_label" destination="dG1-qV-GYq" id="Fet-Te-Rle"/>
+                <outlet property="starttime_label" destination="ETj-Nu-l5h" id="Mpk-cd-Ee5"/>
+            </connections>
+            <point key="canvasLocation" x="65" y="-12"/>
+        </view>
+    </objects>
+</document>

+ 17 - 0
JiaPeiManage/Sources/Modulars/学员/Views/MeTraineeDetails02HeaderView.swift

@@ -0,0 +1,17 @@
+//
+//  MeTraineeDetails02HeaderView.swift
+//  JiaPeiManage
+//
+//  Created by Ning.ge on 2023/6/20.
+//
+
+final class MeTraineeDetails02HeaderView: UIView,NibLoadable {
+
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        
+        
+    }
+    
+}

+ 75 - 0
JiaPeiManage/Sources/Modulars/学员/Views/MeTraineeDetails02HeaderView.xib

@@ -0,0 +1,75 @@
+<?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"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MeTraineeDetails02HeaderView" customModule="JiaPeiManage" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="科目" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="s7w-wv-EIv">
+                    <rect key="frame" x="0.0" y="0.0" width="80" height="44"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="80" id="VkA-OB-2me"/>
+                        <constraint firstAttribute="height" constant="44" id="miX-h7-tYQ"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                    <color key="textColor" red="0.83137254901960778" green="0.8666666666666667" blue="0.90196078431372551" alpha="0.84705882352941175" colorSpace="calibratedRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="成绩" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LkW-lp-aRb">
+                    <rect key="frame" x="80" y="0.0" width="80" height="44"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="44" id="A0a-Oq-bE7"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                    <color key="textColor" red="0.83137254900000002" green="0.86666666670000003" blue="0.90196078430000004" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="考试开始时间" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zaz-WS-sD5">
+                    <rect key="frame" x="160" y="0.0" width="107" height="44"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="44" id="YM5-34-3Wr"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                    <color key="textColor" red="0.83137254900000002" green="0.86666666670000003" blue="0.90196078430000004" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="考试结束时间" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tCa-RS-1FX">
+                    <rect key="frame" x="267" y="0.0" width="108" height="44"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="44" id="uM0-jq-2et"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                    <color key="textColor" red="0.83137254900000002" green="0.86666666670000003" blue="0.90196078430000004" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+            </subviews>
+            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
+            <color key="backgroundColor" red="0.14901960784313725" green="0.28235294117647058" blue="0.41960784313725491" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <constraints>
+                <constraint firstItem="tCa-RS-1FX" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="FU4-lR-jUH"/>
+                <constraint firstItem="tCa-RS-1FX" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Fm7-cd-IJo"/>
+                <constraint firstItem="LkW-lp-aRb" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="PmQ-mx-Eu5"/>
+                <constraint firstItem="LkW-lp-aRb" firstAttribute="leading" secondItem="s7w-wv-EIv" secondAttribute="trailing" id="XXR-SW-b7k"/>
+                <constraint firstItem="zaz-WS-sD5" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Zwa-PZ-nzO"/>
+                <constraint firstItem="zaz-WS-sD5" firstAttribute="leading" secondItem="LkW-lp-aRb" secondAttribute="trailing" id="cKD-w9-3Wj"/>
+                <constraint firstItem="s7w-wv-EIv" firstAttribute="width" secondItem="LkW-lp-aRb" secondAttribute="width" id="eMO-ey-0ch"/>
+                <constraint firstItem="s7w-wv-EIv" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="fpm-Sw-kYD"/>
+                <constraint firstItem="tCa-RS-1FX" firstAttribute="leading" secondItem="zaz-WS-sD5" secondAttribute="trailing" id="nXT-0e-CFI"/>
+                <constraint firstItem="LkW-lp-aRb" firstAttribute="leading" secondItem="s7w-wv-EIv" secondAttribute="trailing" id="sID-Zz-Wb6"/>
+                <constraint firstItem="zaz-WS-sD5" firstAttribute="width" secondItem="tCa-RS-1FX" secondAttribute="width" multiplier="0.990741" id="tmb-4F-dj5"/>
+                <constraint firstItem="s7w-wv-EIv" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="zRq-dg-LBl"/>
+            </constraints>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <point key="canvasLocation" x="64.885496183206101" y="-12.67605633802817"/>
+        </view>
+    </objects>
+</document>

+ 1 - 2
JiaPeiManage/Sources/Modulars/学员/Views/MeTraineeSubjectCell.swift

@@ -8,7 +8,6 @@ import UIKit
 
 final class MeTraineeSubjectCell: UITableViewCell,NibLoadable {
     
-    private let statedicts:[String:String] = ["1":"一","2":"二","3":"三","4":"四","5":"五"]
     // MARK: UI
     //indexbtn
     @IBOutlet weak var index_button: QMUIButton!
@@ -64,7 +63,7 @@ final class MeTraineeSubjectCell: UITableViewCell,NibLoadable {
         //电话
         self.phone_label.text = rowInfo.phone
         //阶段btn
-        self.state_button.setTitle("阶段\(statedicts[rowInfo.state ?? ""]!)", for: .normal)
+        self.state_button.setTitle("阶段\(NYSource.statedicts[rowInfo.state ?? ""]!)", for: .normal)
         //科目1-4
         var k1Img = "K1_no", k1Txt = "未通过"
         if rowInfo.trainOneExamStatus=="1" {

+ 13 - 3
JiaPeiManage/Sources/Services/CoachAPI.swift

@@ -18,13 +18,15 @@ enum CoachAPI {
     case coachInfoList(city:String,appCoachId:String ,coachId:String ,field:String ,pageNum:Int ,pageSize:Int ,schoolId:Int ,state:String )
     //通过id获取学员详细
     case studentInfoById(city:String,id:Int )
+    //查询成绩
+    case stuScoreByOutId(pageNum:Int ,pageSize:Int ,stuOutId:Int)
 }
 
 extension CoachAPI: TargetType {
     
     var baseURL: URL {
         switch self {
-        case .coachInfo,.coachQrInfo,.coachInfoList,.studentInfoById:
+        case .coachInfo,.coachQrInfo,.coachInfoList,.studentInfoById,.stuScoreByOutId:
             return URL(string: HttpRequest.api.path)!
         }
     }
@@ -39,12 +41,15 @@ extension CoachAPI: TargetType {
             return "/jsjp-admin/open-api/tms/coachInfo/list"
         case .studentInfoById(_,_):
             return "/jsjp-admin/open-api/tms/coachInfo/getTmsStudentInfoById"
+        case .stuScoreByOutId(_,_,_):
+            return "/jsjp-admin/open-api/gzpt/userInfo/getUserScoreByOutId"
         }
+        
     }
     
     var method: Moya.Method {
         switch self {
-        case .coachInfo,.coachQrInfo,.coachInfoList,.studentInfoById:
+        case .coachInfo,.coachQrInfo,.coachInfoList,.studentInfoById,.stuScoreByOutId:
             return .get
         default:
             return .get
@@ -57,7 +62,8 @@ extension CoachAPI: TargetType {
     
     var task: Moya.Task {
         switch self {
-        case .coachInfo(_,_),.coachQrInfo(_,_),.coachInfoList(_,_,_,_,_,_,_,_),.studentInfoById(_,_):
+        case .coachInfo(_,_),.coachQrInfo(_,_),.coachInfoList(_,_,_,_,_,_,_,_),.studentInfoById(_,_)
+            ,.stuScoreByOutId(_,_,_):
             if let parameters = parameters {
                 return .requestParameters(parameters: parameters, encoding: URLEncoding.default)
             }
@@ -90,6 +96,10 @@ extension CoachAPI: TargetType {
         case let .studentInfoById(city,id):
             return ["city": city,
                     "id": id,]
+        case let .stuScoreByOutId(pageNumt, pageSize, stuOutId):
+            return ["pageNum": pageNumt,
+                    "pageSize": pageSize,
+                    "stuOutId": stuOutId,]
         default:
             return nil
         }

+ 7 - 1
JiaPeiManage/Sources/Services/CoachService.swift

@@ -18,7 +18,8 @@ protocol CoachServiceType {
     func coachInfoListRequest(city:String,appCoachId:String ,coachId:String ,field:String ,pageNum:Int ,pageSize:Int ,schoolId:Int ,state:String) -> Single<TraineeDataModel>
     //通过id获取学员详细
     func studentInfoByIdRequest(city:String,id:Int) -> Single<TraineeInfoModel>
-//    case studentInfoById(city:String,id:Int )
+    //通过id获取学员成绩
+    func stuScoreByOutIdRequest(pageNum:Int ,pageSize:Int ,stuOutId:Int) -> Single<StuResultDataModel>
     
 }
 
@@ -49,5 +50,10 @@ final class CoachService: CoachServiceType {
         let api = CoachAPI.studentInfoById(city: city, id: id)
         return networking.request(api).map(TraineeInfoModel.self)
     }
+    
+    func stuScoreByOutIdRequest(pageNum: Int, pageSize: Int, stuOutId: Int) -> RxSwift.Single<StuResultDataModel> {
+        let api = CoachAPI.stuScoreByOutId(pageNum: pageNum, pageSize: pageSize, stuOutId: stuOutId)
+        return networking.request(api).map(StuResultDataModel.self, isModel: true)
+    }
 }