فهرست منبع

Merge remote-tracking branch 'origin/master'

lidongyu 1 سال پیش
والد
کامیت
ee7b4ed770

+ 6 - 4
src/main/java/com/sooka/sponest/mobile/comprehensive/organizationAndInstitutioncontroller/AppInstitutionsController.java

@@ -43,11 +43,13 @@ public class AppInstitutionsController extends BaseController {
         Map<String, Object> comprehensiveInstitutionsType = DictUtils.getDictCacheToMap("comprehensive_Institutions_type");
         Map<String, Object> comprehensiveLevels = DictUtils.getDictCacheToMap("comprehensive_levels");
         List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) tableDataInfo.getRows();
-        for (HashMap<String, Object> row : rows) {
-            row.put("institutionTypeLabel", comprehensiveInstitutionsType.get(row.get("institutionType")));
-            row.put("levelLabel", comprehensiveLevels.get(row.get("level")));
-        }
         if (HttpStatus.SUCCESS == tableDataInfo.getCode()) {
+            if (!rows.isEmpty()) {
+                for (HashMap<String, Object> row : rows) {
+                    row.put("institutionTypeLabel", comprehensiveInstitutionsType.get(row.get("institutionType")));
+                    row.put("levelLabel", comprehensiveLevels.get(row.get("level")));
+                }
+            }
             return AjaxResult.success(tableDataInfo.getRows());
         } else {
             return AjaxResult.error(tableDataInfo.getCode(), tableDataInfo.getMsg());