|
@@ -2,6 +2,7 @@ package com.sooka.sponest.mobile.comprehensive.organizationAndInstitutionControl
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.ruoyi.common.core.constant.HttpStatus;
|
|
|
+import com.ruoyi.common.core.domain.DictKeys;
|
|
|
import com.ruoyi.common.core.domain.R;
|
|
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
|
import com.ruoyi.common.core.web.controller.BaseController;
|
|
@@ -9,12 +10,14 @@ import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.web.page.PageDomain;
|
|
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
|
|
import com.ruoyi.common.core.web.page.TableSupport;
|
|
|
+import com.ruoyi.common.security.utils.DictUtils;
|
|
|
import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.domain.ComprehensiveRoom;
|
|
|
import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.service.RemoteRoomService;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 房间管理
|
|
@@ -40,6 +43,10 @@ public class AppRoomController extends BaseController {
|
|
|
TableDataInfo tableDataInfo = remoteRoomService.selectComprehensiveRoomList(pageNum, pageSize,comprehensiveroom.getName(),comprehensiveroom.getEstateId(),comprehensiveroom.getDeptId());
|
|
|
if(HttpStatus.SUCCESS == tableDataInfo.getCode()){
|
|
|
List<ComprehensiveRoom> rows = (List<ComprehensiveRoom>) tableDataInfo.getRows();
|
|
|
+ Map<String, Object> dictCacheToMap = DictUtils.getDictCacheToMap(DictKeys.RFH_FJ_GLFS);
|
|
|
+ Map<String, Object> dictCacheToMap1 = DictUtils.getDictCacheToMap(DictKeys.RFH_FJ_WYH);
|
|
|
+ Map<String, Object> dictCacheToMap2 = DictUtils.getDictCacheToMap(DictKeys.RFH_FJ_FJXZ);
|
|
|
+ Map<String, Object> dictCacheToMap3 = DictUtils.getDictCacheToMap(DictKeys.RFH_FJ_SHLX);
|
|
|
String s = JSON.toJSONString(rows);
|
|
|
rows = JSON.parseArray(s, ComprehensiveRoom.class);
|
|
|
if(StringUtils.isNotEmpty(rows)) {
|
|
@@ -55,6 +62,10 @@ public class AppRoomController extends BaseController {
|
|
|
data.setRoomSfgkpyLabel("1".equals(data.getRoomSfgkpy()) ? "是" : "否");
|
|
|
data.setRoomSfjhqLabel("1".equals(data.getRoomSfjhq()) ? "是" : "否");
|
|
|
data.setRoomSfslzLabel("1".equals(data.getRoomSfslz()) ? "是" : "否");
|
|
|
+ data.setRoomGlfsLabel(dictCacheToMap.get(data.getRoomGlfs()).toString());
|
|
|
+ data.setRoomWyhLabel(dictCacheToMap1.get(data.getRoomWyh()).toString());
|
|
|
+ data.setRoomTypeLabel(dictCacheToMap2.get(data.getRoomType()).toString());
|
|
|
+ data.setRoomShlxLabel(dictCacheToMap3.get(data.getRoomShlx()).toString());
|
|
|
}
|
|
|
}
|
|
|
return AjaxResult.success(rows);
|
|
@@ -68,8 +79,6 @@ public class AppRoomController extends BaseController {
|
|
|
*/
|
|
|
@GetMapping("/comprehensiveroom/edit")
|
|
|
public AjaxResult getInfo(String id) {
|
|
|
-
|
|
|
-
|
|
|
R<ComprehensiveRoom> edit = remoteRoomService.selectComprehensiveRoomById(id);
|
|
|
ComprehensiveRoom data = edit.getData();
|
|
|
data.setRoomSfpfLabel("1".equals(data.getRoomSfpf())? "是":"否");
|
|
@@ -84,6 +93,10 @@ public class AppRoomController extends BaseController {
|
|
|
data.setRoomSfjhqLabel("1".equals(data.getRoomSfjhq())? "是":"否");
|
|
|
data.setRoomSfslzLabel("1".equals(data.getRoomSfslz())? "是":"否");
|
|
|
if (HttpStatus.SUCCESS == edit.getCode()){
|
|
|
+ data.setRoomGlfsLabel(DictUtils.getDictDataByValue(DictKeys.RFH_FJ_GLFS,data.getRoomGlfs()));
|
|
|
+ data.setRoomWyhLabel(DictUtils.getDictDataByValue(DictKeys.RFH_FJ_WYH,data.getRoomWyh()));
|
|
|
+ data.setRoomTypeLabel(DictUtils.getDictDataByValue(DictKeys.RFH_FJ_FJXZ,data.getRoomType()));
|
|
|
+ data.setRoomShlxLabel(DictUtils.getDictDataByValue(DictKeys.RFH_FJ_SHLX,data.getRoomShlx()));
|
|
|
data.setIsEdit(true);
|
|
|
}else if (HttpStatus.ERROR == edit.getCode() && null != edit.getData()) {
|
|
|
data.setIsEdit(false);
|