// // MinRecordeCell.m // LNManager // // Created by EchoShacolee on 2017/4/14. // Copyright © 2017年 lee. All rights reserved. // #import "MinRecordeCell.h" @implementation MinRecordeCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } -(void)upDataWithDic:(NSDictionary *)dic{ //@RQ-MARK 1.0.5优化“分钟学时记录”列表,新增“异常原因”展示,新增”记录状态“文字颜色(待审核:橘色;审核通过:绿色;异常记录:红色;异常原因:红色),“记录时间”对服务端返回的时间戳进行转换后展示 _speed.text = [NSString stringWithFormat:@"%@km/h",dic[@"MAXSPEED"]? : @"0"]; _time.text = [Tools dateWithTimestamp:dic[@"RECORDTIME"]]? : @"1999-12-31 23:59:59"; _phoneNum.text = dic[@"SIM"]? : @"110"; _mile.text = [NSString stringWithFormat:@"%@m",dic[@"MILEAGE"]? :@"0"]; NSInteger k = [[NSString stringWithFormat:@"%@",dic[@"RECORDSTATUS"]] integerValue]; if (k == 0) { _status.text = @"未审核"; _status.textColor = [UIColor orangeColor]; _reason.hidden = YES; _reasonTitle.hidden = YES; }else if (k == 1) { _status.text = @"异常记录"; _status.textColor = [UIColor redColor]; if ([dic[@"AUDIT_REASON"] isKindOfClass:[NSString class]]) { _reason.text = dic[@"AUDIT_REASON"]; }else { _reason.text = @"未知原因"; } _reason.hidden = NO; _reasonTitle.hidden = NO; }else { _status.text = @"审核通过"; _status.textColor = [UIColor greenColor]; _reason.hidden = YES; _reasonTitle.hidden = YES; } [self updateConstraintsIfNeeded]; } @end