From a7941cb7796741fc763a5c2833e00ca46235596a Mon Sep 17 00:00:00 2001 From: Cao yang Date: Wed, 18 Apr 2018 16:21:53 +0800 Subject: [PATCH] 添加考勤接口 --- ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj | 4 ++++ ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate | Bin 274605 -> 0 bytes ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist | 16 ++++++++++++++++ ParentAssistant/ParentAssistant/Classes/controllers/Grow/Model/StudentCardModel.swift | 18 ++++++++++++++++++ ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCheckViewController.swift | 12 ++++++++++++ ParentAssistant/ParentAssistant/Classes/util/Macro.swift | 1 + ParentAssistant/ParentAssistant/Classes/util/network.swift | 6 +++++- ParentAssistant/Podfile | 1 + 8 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 ParentAssistant/ParentAssistant/Classes/controllers/Grow/Model/StudentCardModel.swift diff --git a/ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj b/ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj index ecdd2fa..79aa1b5 100644 --- a/ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj +++ b/ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj @@ -54,6 +54,7 @@ AD4BA4A920819AB000F83F13 /* ReportHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD4BA4A820819AB000F83F13 /* ReportHeaderView.swift */; }; AD4BA4AC20819CAD00F83F13 /* ReportHeaderCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD4BA4AA20819CAD00F83F13 /* ReportHeaderCollectionViewCell.swift */; }; AD4BA4AD20819CAD00F83F13 /* ReportHeaderCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD4BA4AB20819CAD00F83F13 /* ReportHeaderCollectionViewCell.xib */; }; + AD51475B208735FB00EEABDC /* StudentCardModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD51475A208735FB00EEABDC /* StudentCardModel.swift */; }; AD5681CA208044860034A948 /* GrowCheckUpTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD5681C8208044860034A948 /* GrowCheckUpTableViewCell.swift */; }; AD5681CB208044860034A948 /* GrowCheckUpTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD5681C9208044860034A948 /* GrowCheckUpTableViewCell.xib */; }; AD5681CE2080449A0034A948 /* GrowCheckDownTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD5681CC2080449A0034A948 /* GrowCheckDownTableViewCell.swift */; }; @@ -231,6 +232,7 @@ AD4BA4A820819AB000F83F13 /* ReportHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportHeaderView.swift; sourceTree = ""; }; AD4BA4AA20819CAD00F83F13 /* ReportHeaderCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportHeaderCollectionViewCell.swift; sourceTree = ""; }; AD4BA4AB20819CAD00F83F13 /* ReportHeaderCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ReportHeaderCollectionViewCell.xib; sourceTree = ""; }; + AD51475A208735FB00EEABDC /* StudentCardModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudentCardModel.swift; sourceTree = ""; }; AD5681C8208044860034A948 /* GrowCheckUpTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GrowCheckUpTableViewCell.swift; sourceTree = ""; }; AD5681C9208044860034A948 /* GrowCheckUpTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GrowCheckUpTableViewCell.xib; sourceTree = ""; }; AD5681CC2080449A0034A948 /* GrowCheckDownTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GrowCheckDownTableViewCell.swift; sourceTree = ""; }; @@ -605,6 +607,7 @@ ADC9AB70207C558600348EF1 /* Model */ = { isa = PBXGroup; children = ( + AD51475A208735FB00EEABDC /* StudentCardModel.swift */, ); path = Model; sourceTree = ""; @@ -1177,6 +1180,7 @@ AD122AC8208448E900C7D0AD /* ProgramVacateAddViewController.swift in Sources */, AD122AB8208436F100C7D0AD /* ProgramVacateDetailView.swift in Sources */, BFBC06C82063AE8900CCFAFF /* ZLaunchAdCache.swift in Sources */, + AD51475B208735FB00EEABDC /* StudentCardModel.swift in Sources */, BFF9B7F62057A4C900F39B3E /* ChildrenDetailViewController.swift in Sources */, 599364FF204E945600C8B371 /* BindingViewController.swift in Sources */, 590944E020579CFA004478B5 /* InvitationCodeVerificationViewController.swift in Sources */, diff --git a/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate b/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate index 24f8631..09f4b00 100644 Binary files a/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate and b/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index e2573a5..0f5b836 100644 --- a/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -13,5 +13,21 @@ stopOnStyle = "0"> + + + + diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Model/StudentCardModel.swift b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Model/StudentCardModel.swift new file mode 100644 index 0000000..b8907c8 --- /dev/null +++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Model/StudentCardModel.swift @@ -0,0 +1,18 @@ +// +// StudentCardModel.swift +// ParentAssistant +// +// Created by Cao yang on 2018/4/18. +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. +// + +import UIKit + +class StudentCardModel: NSObject { + + var user_id = String() + var school_id = String() + var head_image = String() + var situation = String() + +} diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCheckViewController.swift b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCheckViewController.swift index 766fa03..d8a9fc2 100644 --- a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCheckViewController.swift +++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCheckViewController.swift @@ -28,6 +28,18 @@ class ProgramCheckViewController: UIViewController,UITableViewDelegate,UITableVi super.viewDidLoad() self.view.addSubview(self.tableView) // Do any additional setup after loading the view. + downLoadDataFromNet() + } + + /// 获取数据 + private func downLoadDataFromNet(){ + let params = ["studentid":185,"schoolid":1,"starttime":"2017-07-19"] as [String : Any] + HTTPServer.shared.getStudentCheckList(parameters: params as [String : AnyObject]) { (backData, error) in + print(backData!) + if error == nil && JSON.fromString(backData)!["status"].intValue == 1 { + + } + } } diff --git a/ParentAssistant/ParentAssistant/Classes/util/Macro.swift b/ParentAssistant/ParentAssistant/Classes/util/Macro.swift index c19cee5..91bdb79 100644 --- a/ParentAssistant/ParentAssistant/Classes/util/Macro.swift +++ b/ParentAssistant/ParentAssistant/Classes/util/Macro.swift @@ -75,6 +75,7 @@ let URL_PARENTSERVICE_GETADS="/api/ParentService/GetAds" //获取广告位 //MARK: - 成长 //MARK: 应用 let URL_POST_MEND_CARD = "/api/OneCard/AddStuCard" //补卡 +let URL_GET_ATTENDANCE_LIST = "/api/ParentService/GetAttendanceList" //考勤 //MARK: 量规评价 diff --git a/ParentAssistant/ParentAssistant/Classes/util/network.swift b/ParentAssistant/ParentAssistant/Classes/util/network.swift index a49121a..e239137 100644 --- a/ParentAssistant/ParentAssistant/Classes/util/network.swift +++ b/ParentAssistant/ParentAssistant/Classes/util/network.swift @@ -228,10 +228,14 @@ final class HTTPServer{ //MARK: - 成长 //MARK: 应用 + ///补卡 func postStudentMendCard(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ KHttp.POST(url: URL_POST_MEND_CARD, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) } - + ///考勤 + func getStudentCheckList(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ + KHttp.GET(url: URL_GET_ATTENDANCE_LIST, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) + } //MARK:量规评价 //获取报告详情 func workReportDetails(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ diff --git a/ParentAssistant/Podfile b/ParentAssistant/Podfile index f0cdde5..3d48316 100644 --- a/ParentAssistant/Podfile +++ b/ParentAssistant/Podfile @@ -19,5 +19,6 @@ pod 'SwiftHash' end target 'ParentAssistant' do + pod 'HandyJSON', '~> 4.0.0-beta.1' pods end -- libgit2 0.21.0