|
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -41,17 +42,16 @@ public class AppRoomController extends BaseController {
|
|
|
*/
|
|
|
@GetMapping("/comprehensiveroom/list")
|
|
|
public AjaxResult list(ComprehensiveRoom comprehensiveroom) {
|
|
|
- System.out.println("start --> " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));
|
|
|
PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
- TableDataInfo tableDataInfo = remoteRoomService.selectComprehensiveRoomList(
|
|
|
+ AjaxResult tableDataInfo = remoteRoomService.selectComprehensiveRoomList(
|
|
|
pageDomain.getPageNum(),
|
|
|
pageDomain.getPageSize(),
|
|
|
comprehensiveroom.getName(),
|
|
|
comprehensiveroom.getEstateId(),
|
|
|
comprehensiveroom.getTotal()
|
|
|
);
|
|
|
- if (HttpStatus.SUCCESS == tableDataInfo.getCode()) {
|
|
|
- List<ComprehensiveRoom> rows = (List<ComprehensiveRoom>) tableDataInfo.getRows();
|
|
|
+ if (HttpStatus.SUCCESS == Integer.parseInt(tableDataInfo.get("code").toString())) {
|
|
|
+ List<ComprehensiveRoom> rows = (List<ComprehensiveRoom>) tableDataInfo.get("data");
|
|
|
String[] dictArray = new String[]{RFH_FJ_GLFS, RFH_FJ_WYH, RFH_FJ_FJXZ, RFH_FJ_SHLX};
|
|
|
Map<String, Map<String, Object>> dictMaps = DictUtils.getDictCacheToMapByArray(dictArray);
|
|
|
String s = JSON.toJSONString(rows);
|
|
@@ -61,10 +61,9 @@ public class AppRoomController extends BaseController {
|
|
|
setDictValue(data, dictMaps);
|
|
|
}
|
|
|
}
|
|
|
- System.out.println("end --> " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));
|
|
|
return AjaxResult.success(rows);
|
|
|
} else {
|
|
|
- return AjaxResult.error(tableDataInfo.getCode(), tableDataInfo.getMsg());
|
|
|
+ return AjaxResult.error(tableDataInfo.get("code").toString(), tableDataInfo.get("msg"));
|
|
|
}
|
|
|
}
|
|
|
|