OOAttandanceModels.swift 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. //
  2. // OOAttandanceModels.swift
  3. // O2Platform
  4. //
  5. // Created by 刘振兴 on 2018/5/16.
  6. // Copyright © 2018年 zoneland. All rights reserved.
  7. //
  8. import Foundation
  9. import HandyJSON
  10. // MARK:- 移动端获到打卡记录Bean
  11. class OOAttandanceMobileQueryBean:NSObject,DataModel {
  12. @objc var empNo:String? //员工号,根据员工号查询记录
  13. @objc var empName:String? //员工姓名,根据员工姓名查询记录.
  14. @objc var startDate:String? //开始日期:yyyy-mm-dd.
  15. @objc var endDate:String? //结束日期:yyyy-mm-dd,如果开始日期填写,结束日期不填写就是只查询开始日期那一天
  16. @objc var signDescription:String? //打卡说明:上班打卡,下班打卡.
  17. override required init() {
  18. }
  19. }
  20. // MARK:- 移动端打卡数据
  21. class OOAttandanceMobileDetail:NSObject,DataModel {
  22. @objc var id:String? //数据库主键,自动生成.
  23. @objc var createTime:String? //创建时间,自动生成.
  24. @objc var updateTime:String? //修改时间,自动生成.
  25. @objc var empNo:String? //员工号
  26. @objc var empName:String? //员工姓名
  27. @objc var recordDateString:String? //打卡记录日期字符串
  28. @objc var recordDate:String? //打卡记录日期
  29. @objc var signTime:String? //打卡时间
  30. @objc var signDescription:String? //打卡说明
  31. @objc var desc:String? //其他说明备注
  32. @objc var recordAddress:String? //打卡地点描述
  33. @objc var longitude:String? //经度
  34. @objc var latitude:String? //纬度
  35. @objc var optMachineType:String? // 操作设备类别:手机品牌|PAD|PC|其他
  36. @objc var optSystemName:String? // 操作设备类别:Mac|Windows|IOS|Android|其他
  37. var recordStatus:Int? //记录状态:0-未分析 1-已分析
  38. @objc var checkin_type: String? // 打卡类型 上午上班打卡 下午下班打卡
  39. required override init() {
  40. }
  41. func mapping(mapper: HelpingMapper) {
  42. mapper <<< self.desc <-- "description"
  43. }
  44. }
  45. // MARK: - 打卡班次对象
  46. class OOAttandanceScheduleSetting: NSObject, DataModel {
  47. /**
  48. "id": "7c89ddfe-7e69-40ce-9908-d699081aa660",
  49. "topUnitName": "浙江兰德纵横网络技术股份有限公司@1@U",
  50. "unitName": "移动开发组@320494093@U",
  51. "unitOu": "移动开发组@320494093@U",
  52. "onDutyTime": "09:00",
  53. "offDutyTime": "17:00",
  54. "signProxy": 0,
  55. "lateStartTime": "9:05",
  56. "createTime": "2020-05-27 09:19:16",
  57. "updateTime": "2020-05-27 09:19:16"
  58. */
  59. @objc var id: String?
  60. @objc var topUnitName: String?
  61. @objc var unitName: String?
  62. @objc var unitOu: String?
  63. @objc var onDutyTime: String?
  64. @objc var offDutyTime: String?
  65. var signProxy: Int?
  66. @objc var lateStartTime: String?
  67. @objc var createTime: String?
  68. @objc var updateTime: String?
  69. required override init() {
  70. }
  71. }
  72. // MARK: - 当前用户当天打卡功能
  73. class OOAttandanceFeature: NSObject, DataModel {
  74. /**
  75. "signSeq": 1,
  76. "signDate": "2020-06-02",
  77. "signTime": "09:00",
  78. "checkinType": "上午上班打卡"
  79. */
  80. @objc var signDate: String?
  81. @objc var signTime: String?
  82. @objc var checkinType: String?
  83. var signSeq: Int? //第几次打卡 -1就不能打卡了
  84. required override init() {
  85. }
  86. }
  87. // MARK: - 打卡班次对象 和 打卡结果拼接的结果
  88. class OOAttandanceMobileScheduleInfo: NSObject, DataModel {
  89. @objc var signDate: String?
  90. @objc var signTime: String?
  91. @objc var checkinType: String?
  92. var signSeq: Int?
  93. @objc var checkinStatus: String? // 未打卡 已打卡
  94. @objc var checkinTime: String? //打卡时间
  95. @objc var recordId: String? //打卡结果的id 更新打卡用
  96. required override init() {
  97. }
  98. }
  99. // MARK: - MyRecords 登录者当天的所有移动打卡信息记录 排版情况等
  100. class OOMyAttandanceRecords: NSObject, DataModel {
  101. @objc var records:[OOAttandanceMobileDetail]?
  102. @objc var scheduleSetting:OOAttandanceScheduleSetting?
  103. @objc var feature: OOAttandanceFeature?
  104. //2020-07-21 新添加的
  105. @objc var scheduleInfos: [OOAttandanceFeature]?
  106. required override init() {
  107. }
  108. }
  109. // MARK:- 提交打卡数据FormBean
  110. class OOAttandanceMobileCheckinForm:NSObject,DataModel {
  111. @objc var id:String? //id 为空就是新增 有id就是更新
  112. @objc var empNo:String? //员工号, 可以为空.
  113. @objc var empName:String? //员工姓名, 必须填写.
  114. @objc var recordDateString:String? //打卡记录日期字符串:yyyy-mm-dd, 必须填写.
  115. @objc var signTime:String? //打卡时间: hh24:mi:ss, 必须填写.
  116. @objc var signDescription:String? //打卡说明:上班打卡,下班打卡, 可以为空.
  117. @objc var desc:String? //其他说明备注, 可以为空.
  118. @objc var recordAddress:String? //打卡地点描述, 可以为空.
  119. @objc var longitude:String? //经度, 可以为空.
  120. @objc var latitude:String? //纬度, 可以为空.
  121. @objc var optMachineType:String? //操作设备类别:手机品牌|PAD|PC|其他, 可以为空.
  122. @objc var optSystemName:String? //操作设备类别:Mac|Windows|IOS|Android|其他, 可以为空
  123. @objc var checkin_type: String? //上午上班打卡 下午下班打卡 。。。。 对应OOAttandanceFeature里面的checkinType
  124. required override init() {
  125. }
  126. func mapping(mapper: HelpingMapper) {
  127. mapper <<< self.desc <-- "description"
  128. }
  129. }
  130. // MARK:- 打卡地点配置
  131. class OOAttandanceWorkPlace:NSObject,DataModel{
  132. @objc var desc: String?
  133. @objc var id:String? // 数据库主键,自动生成.
  134. @objc var createTime:String? // 创建时间,自动生成.
  135. @objc var updateTime:String? // 修改时间,自动生成.
  136. @objc var placeName:String? // 场所名称
  137. @objc var placeAlias:String? // 场所别名
  138. @objc var creator:String? // 创建人
  139. @objc var longitude:String? // 经度
  140. @objc var latitude:String? // 纬度
  141. var errorRange:Int? // 误差范围
  142. required override init() {
  143. }
  144. func mapping(mapper: HelpingMapper) {
  145. mapper <<< self.desc <-- "description"
  146. }
  147. }
  148. // MARK:- 提交新的打卡地点
  149. class OOAttandanceNewWorkPlace:NSObject,DataModel {
  150. @objc var placeName:String? //场所名称
  151. @objc var placeAlias:String? //场所别名
  152. @objc var creator:String? //创建人
  153. @objc var longitude:String? //经度
  154. @objc var latitude:String? //纬度
  155. @objc var errorRange:String? //误差范围
  156. @objc var desc:String? //说明备注
  157. required override init() {
  158. }
  159. func mapping(mapper: HelpingMapper) {
  160. mapper <<< self.desc <-- "description"
  161. }
  162. }
  163. // MARK:- 考勤配置管理员
  164. class OOAttandanceAdmin:NSObject,DataModel {
  165. @objc var desc: String?
  166. @objc var id:String? // 数据库主键,自动生成.
  167. @objc var createTime:String? // 创建时间,自动生成.
  168. @objc var updateTime:String? // 修改时间,自动生成.
  169. @objc var unitName:String? // 组织名称
  170. @objc var unitOu:String? // 组织编号
  171. @objc var adminName:String? // 管理员姓名
  172. @objc var adminLevel:String? // 管理级别:UNIT|TOPUNIT
  173. required override init() {
  174. }
  175. func mapping(mapper: HelpingMapper) {
  176. mapper <<< self.desc <-- "description"
  177. }
  178. }
  179. class OOAttandanceTotalBean:NSObject,DataModel {
  180. @objc var q_year:String? // : 打卡年份
  181. @objc var q_month:String? // : 打卡月份
  182. @objc var cycleYear:String? // : 考勤周期年份
  183. @objc var cycleMonth:String? // : 考勤周期月份
  184. @objc var q_empName:String? //:人员全名
  185. required override init() {
  186. }
  187. }
  188. // MARK:- cycleDetail
  189. class OOAttandanceCycleDetail:NSObject,DataModel {
  190. @objc var id:String? //: "ea55970a-bd18-4388-a40b-b0cc7d6cc576",
  191. @objc var createTime:String? //: "2018-04-12 12:49:37",
  192. @objc var updateTime:String? //: "2018-04-12 12:49:37",
  193. @objc var topUnitName:String? //": "*",
  194. @objc var unitName:String? //: "*",
  195. @objc var cycleYear:String? //: "2018",
  196. @objc var cycleMonth:String? //: "04",
  197. @objc var cycleStartDateString:String? //: "2018-04-01",
  198. @objc var cycleEndDateString:String? //: "2018-05-01",
  199. @objc var cycleStartDate:String? //: "2018-04-01",
  200. @objc var cycleEndDate:String? //: "2018-05-01",
  201. @objc var desc:String? //: "系统自动创建"
  202. required override init() {
  203. }
  204. func mapping(mapper: HelpingMapper) {
  205. mapper <<< self.desc <-- "description"
  206. }
  207. }
  208. // MARK:- OOAttandanceCheckinTotal
  209. class OOAttandanceCheckinTotal:NSObject,DataModel {
  210. @objc var abnormalDutyDayTime : String?
  211. var absence : Int?
  212. @objc var absentDayTime : String?
  213. @objc var appealDescription : String?
  214. @objc var appealProcessor : String?
  215. @objc var appealReason : String?
  216. var appealStatus : Int?
  217. var attendance : Int?
  218. @objc var batchName : String?
  219. @objc var createTime : String?
  220. @objc var cycleMonth : String?
  221. @objc var cycleYear : String?
  222. @objc var descriptionField : String?
  223. @objc var empName : String?
  224. @objc var empNo : String?
  225. var getSelfHolidayDays : Int?
  226. @objc var id : String?
  227. var isAbnormalDuty : Bool?
  228. var isAbsent : Bool?
  229. var isGetSelfHolidays : Bool?
  230. var isHoliday : Bool?
  231. var isLackOfTime : Bool?
  232. var isLate : Bool?
  233. var isLeaveEarlier : Bool?
  234. var isWeekend : Bool?
  235. var isWorkOvertime : Bool?
  236. var isWorkday : Bool?
  237. var lateTimeDuration : Int?
  238. var leaveEarlierTimeDuration : Int?
  239. @objc var monthString : String?
  240. @objc var offDutyTime : String?
  241. @objc var offWorkTime : String?
  242. @objc var onDutyTime : String?
  243. @objc var onWorkTime : String?
  244. @objc var recordDate : String?
  245. @objc var recordDateString : String?
  246. var recordStatus : Int?
  247. @objc var selfHolidayDayTime : String?
  248. @objc var topUnitName : String?
  249. @objc var unitName : String?
  250. @objc var updateTime : String?
  251. var workOvertimeTimeDuration : Int?
  252. var workTimeDuration : Int?
  253. @objc var yearString : String?
  254. required override init() {
  255. }
  256. }
  257. // MARK:- 考勤统计分析model
  258. class OOAttandanceAnalyze:NSObject,DataModel {
  259. var abNormalDutyCount : Int?
  260. var absenceDayCount : Int?
  261. @objc var createTime : String?
  262. @objc var employeeName : String?
  263. @objc var id : String?
  264. var lackOfTimeCount : Int?
  265. var lateTimes : Int?
  266. var leaveEarlyTimes : Int?
  267. var offDutyTimes : Int?
  268. var onDutyDayCount : Int?
  269. var onDutyTimes : Int?
  270. var onSelfHolidayCount : Int?
  271. @objc var statisticMonth : String?
  272. @objc var statisticYear : String?
  273. @objc var topUnitName : String?
  274. @objc var unitName : String?
  275. @objc var updateTime : String?
  276. var workDayCount : Int?
  277. required override init() {
  278. }
  279. }