diff --git a/total/AppDelegate/AppDelegate.m b/total/AppDelegate/AppDelegate.m index d32b5a13f71671499426b0879331ea56a0a74367..4051f274448106e3f24269407dcd1e7b4c252e63 100644 --- a/total/AppDelegate/AppDelegate.m +++ b/total/AppDelegate/AppDelegate.m @@ -99,9 +99,8 @@ NSDictionary* content =[NSDictionary dictionaryWithContentsOfFile:path]; NSString *version = [content valueForKey:@"CFBundleShortVersionString"] ; self.version=version; - // èŽ·å–æœåŠ¡å™¨æ›´æ–°ä¿¡æ¯ - [ self getDataFromServer]; + [self getDataFromServer]; } //请求æœåŠ¡å™¨æ›´æ–°ä¿¡æ¯ @@ -114,7 +113,6 @@ NSInteger success = [data[@"success"] integerValue]; NSString *message = data[@"message"] ; if (success == 1) { - NSDictionary *dictData = data[@"data"]; NSString*serverVeision=[dictData objectForKey:@"version"]; NSString*serverUrl=[dictData objectForKey:@"url"]; @@ -137,6 +135,7 @@ [IBTLoadingView showProgressLabel:@"æ£åœ¨åŠ è½½..."]; [[ICRHTTPController sharedController] getVeisionIdWithType:@"ipa" success:succ failure:fail]; } + //比较版本å·åŠæ˜¯å¦ä¸‹è½½ -(void)comperVersion { @@ -154,16 +153,13 @@ NSLog(@"string:%@", [array2 objectAtIndex:i]); } BOOL isNeedUpdate=[self compareVersion]; - if (isNeedUpdate) { if (self.severForceUpdate) { //强制更新 self.alertV = [[UIAlertView alloc]initWithTitle:@"新版本告知" message:@"有新版本å‘布请您下载最新版本" delegate:self cancelButtonTitle:nil otherButtonTitles: @"去下载", nil]; self.alertV.tag = 1001; [self.alertV show]; - - }else - { + }else { self.alertV = [[UIAlertView alloc]initWithTitle:@"新版本告知" message:@"有新版本å‘布请您下载最新版本" delegate:self cancelButtonTitle:@"下次å†è¯´"otherButtonTitles: @"去下载", nil];// self.alertV.tag = 1002; [self.alertV show]; @@ -171,20 +167,19 @@ } } } + -(BOOL)compareVersion { float version=[self.intVersion floatValue]; float severVersion=[self.intSeverVersion floatValue]; if (severVersion >version) { return YES; - }else - { + }else{ return NO; } } -- (void) alertView:(UIAlertView *)alertView -clickedButtonAtIndex:(NSInteger)buttonIndex { +- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (alertView.tag==1001) { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.severUrl]]; }else if (alertView.tag==1002) @@ -193,8 +188,8 @@ clickedButtonAtIndex:(NSInteger)buttonIndex { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.severUrl]]; } } - } + //æ¯”è¾ƒç‰ˆæœ¬å· - (NSComparisonResult)p_compareVersions: (NSString *)version1 betweenVersion2: (NSString *)version2{ NSComparisonResult result = NSOrderedSame; diff --git "a/total/GTOApp/Business/PatroIInspectionResults(VI\345\267\241\346\243\200\347\273\223\346\236\234)/Controller/InspectionDetailTableViewController.m" "b/total/GTOApp/Business/PatroIInspectionResults(VI\345\267\241\346\243\200\347\273\223\346\236\234)/Controller/InspectionDetailTableViewController.m" index 67c73114cbebc60061935e95ee553ff067260781..e5c3e3b84640107cbdb7921eca4ad6e239c48c46 100755 --- "a/total/GTOApp/Business/PatroIInspectionResults(VI\345\267\241\346\243\200\347\273\223\346\236\234)/Controller/InspectionDetailTableViewController.m" +++ "b/total/GTOApp/Business/PatroIInspectionResults(VI\345\267\241\346\243\200\347\273\223\346\236\234)/Controller/InspectionDetailTableViewController.m" @@ -211,6 +211,9 @@ NSString *const CELL = @"CustomInspectionTableViewCell"; [self.categoryArray addObject:answer.questionCategory]; } } + NSArray *sortDesc = @[ [[NSSortDescriptor alloc] initWithKey:@"self" ascending:YES]]; + self.categoryArray = [NSMutableArray arrayWithArray:[self.categoryArray sortedArrayUsingDescriptors:sortDesc]]; + //åˆ’åˆ†æ•°æ® for (NSString *string in self.categoryArray) { NSMutableArray *subArray = [NSMutableArray array]; diff --git "a/total/GTOApp/Business/PatrolOnline(VI\345\267\241\346\243\200)/Patrol_PatrolInspect.storyboard" "b/total/GTOApp/Business/PatrolOnline(VI\345\267\241\346\243\200)/Patrol_PatrolInspect.storyboard" index 999715bcd8260266b376d165919f665269e2be1a..48d5ce02401581f6d3216c0653e46c05a159b625 100755 --- "a/total/GTOApp/Business/PatrolOnline(VI\345\267\241\346\243\200)/Patrol_PatrolInspect.storyboard" +++ "b/total/GTOApp/Business/PatrolOnline(VI\345\267\241\346\243\200)/Patrol_PatrolInspect.storyboard" @@ -180,7 +180,7 @@ <nil key="textColor"/> <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="hth-nU-ISq"> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="---" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hth-nU-ISq"> <rect key="frame" x="275" y="0.0" width="84" height="40"/> <fontDescription key="fontDescription" type="system" pointSize="15"/> <color key="textColor" red="0.63179747500000005" green="0.63179747500000005" blue="0.63179747500000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> @@ -244,7 +244,7 @@ <constraints> <constraint firstAttribute="width" constant="85" id="QCJ-l1-s8b"/> </constraints> - <fontDescription key="fontDescription" type="system" pointSize="15"/> + <fontDescription key="fontDescription" type="system" pointSize="14"/> <inset key="titleEdgeInsets" minX="-16" minY="0.0" maxX="20" maxY="0.0"/> <inset key="imageEdgeInsets" minX="65" minY="0.0" maxX="0.0" maxY="0.0"/> <state key="normal" title="全部展开" image="arrowturnoff"> @@ -750,6 +750,7 @@ </view> <connections> <outlet property="btnSubmit" destination="mHa-66-Myc" id="NST-Nh-EKj"/> + <outlet property="expandButton" destination="hMf-am-3kG" id="nc4-ru-Xbd"/> <outlet property="tableView" destination="gKa-XF-Dts" id="V6d-RQ-tOd"/> <outlet property="topView" destination="T76-CQ-jFE" id="inO-g5-zWE"/> </connections> diff --git "a/total/GTOApp/Business/PatrolOnline(VI\345\267\241\346\243\200)/ViewConstrollers/PatrolExamViewController.m" "b/total/GTOApp/Business/PatrolOnline(VI\345\267\241\346\243\200)/ViewConstrollers/PatrolExamViewController.m" index 31187eb0c7c9bf21040e2869a62112ede42fd615..442d42ee9dac0a09c27301b32336f4a2a8d969a4 100755 --- "a/total/GTOApp/Business/PatrolOnline(VI\345\267\241\346\243\200)/ViewConstrollers/PatrolExamViewController.m" +++ "b/total/GTOApp/Business/PatrolOnline(VI\345\267\241\346\243\200)/ViewConstrollers/PatrolExamViewController.m" @@ -26,6 +26,7 @@ @property (weak, nonatomic) IBOutlet PatrolExamTopView *topView; @property (weak, nonatomic) IBOutlet UITableView *tableView; @property (weak, nonatomic) IBOutlet UIButton *btnSubmit; +@property (weak, nonatomic) IBOutlet UIButton *expandButton; @property (strong, nonatomic) NSTimer *timer; /** @@ -291,7 +292,8 @@ #pragma mark -æäº¤VI检查任务 - (IBAction)actionSubmit:(id)sender { - + [self.viewModel openAll]; + self.expandButton.selected = YES; if (!self.viewModel.detail.temp) { //找到最上é¢ä¸€ä¸ªæ²¡æœ‰å›žç”的问题 if (self.viewModel.detail.questions.count != self.viewModel.dicAnswers.count) { diff --git a/total/Info.plist b/total/Info.plist index 78c67df91e8ca15c059637149dd6cc8f2ce47226..5691e1d18e7427338fe0f0773b7993971d93c9c4 100644 --- a/total/Info.plist +++ b/total/Info.plist @@ -19,11 +19,11 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>1.3.0</string> + <string>1.3.1</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>1.3.0</string> + <string>1.3.1</string> <key>LSRequiresIPhoneOS</key> <true/> <key>NSAppTransportSecurity</key> diff --git a/total/Macro/GTOAppMacro.h b/total/Macro/GTOAppMacro.h index ddc352c6249268aafa5e975da1291257e3ce7194..9903e33132a0c9cd11865ee2964601286245c111 100644 --- a/total/Macro/GTOAppMacro.h +++ b/total/Macro/GTOAppMacro.h @@ -179,12 +179,12 @@ typedef NS_ENUM(NSInteger,ATTACHMENT_LOCATION){ //#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:7080" //测试环境 -//#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest" -//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180" +#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest" +#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180" //å¼€å‘环境 -#define HTTP_LOCAL_BASE_URL @"http://192.168.1.176:8083" -#define HTTP_REST_API_BASE_URL @"http://192.168.1.176:8083/total-server/rest" +//#define HTTP_LOCAL_BASE_URL @"http://192.168.1.176:8083" +//#define HTTP_REST_API_BASE_URL @"http://192.168.1.176:8083/total-server/rest" #define HTTP_WEATHER_URL @"http://apis.baidu.com/heweather/weather/free" //refreshUpdateDate