LAPTOP-FO2T5SIU\35838 hai 7 meses
pai
achega
2f5ba0b792

+ 29 - 0
pro-wx/src/main/java/com/idea/pro/wx/controller/buildManage/WxHouseTypeController.java

@@ -0,0 +1,29 @@
+package com.idea.pro.wx.controller.buildManage;
+
+import com.idea.buildManage.model.HouseType;
+import com.idea.buildManage.service.HouseTypeService;
+import com.rockstar.common.base.BaseController;
+import com.rockstar.frame.model.extend.DateTrans;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+@Controller
+@RequestMapping(value = "/wx/HouseTypeController")
+@Api(tags = "户型库管理")
+public class WxHouseTypeController extends BaseController {
+
+    @Autowired
+    private HouseTypeService modelService;
+
+    @PostMapping(value = "listAll", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object listAll(HouseType model, DateTrans dt) {
+        return modelService.listAll(model, dt);
+    }
+
+
+}

+ 155 - 0
pro-wx/src/main/java/com/idea/pro/wx/controller/buildManage/WxMnpBuildingController.java

@@ -0,0 +1,155 @@
+package com.idea.pro.wx.controller.buildManage;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.PageInfo;
+import com.idea.buildManage.dto.MnpBuildingDto;
+import com.idea.buildManage.excel.MnpBuildingExcel;
+import com.idea.buildManage.excel.MnpBuildingListener;
+import com.idea.buildManage.model.MnpBuilding;
+import com.idea.buildManage.service.MnpBuildingService;
+import com.idea.buildManage.service.ParkFloorDiscService;
+import com.idea.buildManage.service.ParkInfoService;
+import com.idea.util.ExcelUtils;
+import com.rockstar.common.base.BaseController;
+import com.rockstar.common.domain.AjaxResult;
+import com.rockstar.frame.model.extend.DateTrans;
+import com.rockstar.frame.model.extend.TableSplitResult;
+import com.rockstar.frame.model.extend.Tablepar;
+import com.rockstar.system.service.SysDictService;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Created by pengyq on 2020.
+ */
+@Controller
+@RequestMapping(value = "/wx/MnpBuildingController")
+@Api(tags = "载体管理")
+public class WxMnpBuildingController extends BaseController {
+
+    //主表
+    @Autowired
+    private MnpBuildingService modelService;
+    @Autowired
+    private ParkFloorDiscService floorDiscService;
+    @Autowired
+    private ParkInfoService parkInfoService;
+    @Autowired
+    private SysDictService sysDictService;
+
+
+    @PostMapping(value = "list", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object list(Tablepar tablepar, MnpBuildingDto model, DateTrans dt) {
+        PageInfo<MnpBuildingDto> page = modelService.list(tablepar, model, dt);
+        TableSplitResult<MnpBuildingDto> result = new TableSplitResult<MnpBuildingDto>(page.getPageNum(), page.getTotal(), page.getList());
+        return result;
+    }
+
+
+    @PostMapping(value = "listAll", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object listAll(MnpBuilding model, DateTrans dt) {
+        return modelService.listAll(model, dt);
+    }
+
+    @PostMapping(value = "add", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult add(MnpBuilding record) {
+
+        int result = modelService.add(record);
+        return result(result);
+    }
+
+    @PostMapping(value = "remove/{id}", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult remove(@PathVariable("id") String id) {
+        int result = modelService.deleteByPrimaryKey(id);
+        return result(result);
+    }
+
+    @PostMapping(value = "edit", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult editSave(MnpBuilding model) {
+        int result = modelService.edit(model);
+        return result(result);
+    }
+
+    @PostMapping(value = "getById", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public MnpBuilding getById(String id) {
+        return modelService.selectByPrimaryKey(id);
+    }
+
+
+    @PostMapping(value = "excelListAll", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object excelListAll(MnpBuildingDto model) {
+
+        return modelService.excelListAll(model);
+    }
+
+    /**
+     * 楼栋导入
+     *
+     * @param file
+     * @return
+     */
+    @PostMapping(value = "handleImport", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult handleImport(@RequestParam("file") MultipartFile file) {
+        JSONObject jsonObject = new JSONObject();
+        MnpBuildingListener listener = new MnpBuildingListener(modelService, floorDiscService, parkInfoService, sysDictService,
+                jsonObject);
+        try {
+            ExcelUtils excelUtils = new ExcelUtils();
+            File excel = excelUtils.multipartFileToFile(file);
+            if (null == excel) {
+                return AjaxResult.error("导入失败");
+            }
+            EasyExcel.read(excel, MnpBuildingExcel.class, listener).headRowNumber(1).sheet().doRead();
+            excel.delete();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return AjaxResult.error(e.getMessage());
+        }
+        return AjaxResult.success(jsonObject);
+    }
+
+    /**
+     * 楼栋删除
+     *
+     * @param id
+     * @return
+     */
+    @PostMapping(value = "delete", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult delete(String id) {
+        int result = modelService.delete(id);
+        return result(result);
+    }
+
+    /**
+     * 导出
+     *
+     * @param list
+     * @param response
+     * @throws IOException
+     */
+    @PostMapping(value = "errorListExport")
+    @ResponseBody
+    public void errorListExport(@RequestBody List<MnpBuildingExcel> list, HttpServletResponse response) throws IOException {
+        modelService.errorListExport(list, response);
+    }
+
+
+}

+ 155 - 0
pro-wx/src/main/java/com/idea/pro/wx/controller/buildManage/WxParkFloorDiscController.java

@@ -0,0 +1,155 @@
+package com.idea.pro.wx.controller.buildManage;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.PageInfo;
+import com.idea.buildManage.dto.ParkFloorDiscDto;
+import com.idea.buildManage.excel.ParkFloorDiscExcel;
+import com.idea.buildManage.excel.ParkFloorDiscListener;
+import com.idea.buildManage.model.ParkFloorDisc;
+import com.idea.buildManage.response.ParkFloorDiscRespson;
+import com.idea.buildManage.service.ParkFloorDiscService;
+import com.idea.buildManage.service.ParkInfoService;
+import com.idea.util.ExcelUtils;
+import com.rockstar.common.base.BaseController;
+import com.rockstar.common.domain.AjaxResult;
+import com.rockstar.frame.model.extend.DateTrans;
+import com.rockstar.frame.model.extend.TableSplitResult;
+import com.rockstar.frame.model.extend.Tablepar;
+import com.rockstar.system.service.SysDictService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by pengyq on 2020.
+ */
+@Controller
+@RequestMapping(value = "/wx/ParkFloorDiscController")
+@Api(value="楼盘分期管理")
+public class WxParkFloorDiscController extends BaseController {
+
+    //主表
+    @Autowired
+    private ParkFloorDiscService modelService;
+    @Autowired
+    private ParkInfoService parkInfoService;
+    @Autowired
+    private SysDictService sysDictService;
+
+    @PostMapping(value = "list",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object list(Tablepar tablepar, ParkFloorDiscDto model, DateTrans dt){
+        PageInfo<ParkFloorDisc> page= modelService.list(tablepar,model,dt);
+        TableSplitResult<ParkFloorDisc> result = new TableSplitResult<ParkFloorDisc>(page.getPageNum(), page.getTotal(), page.getList());
+        return  result;
+    }
+
+    @ApiOperation(value = "楼盘分期列表")
+    @PostMapping(value = "listAll",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object listAll(ParkFloorDiscDto model, DateTrans dt){
+        return  modelService.listAll(model,dt);
+    }
+
+    @ApiOperation(value = "新增楼盘分期")
+    @PostMapping(value = "add",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult add(ParkFloorDiscRespson record){
+        record.setCreatedAt(new Date());
+        int result = modelService.add(record);
+        return result(result);
+    }
+
+    @ApiOperation(value = "删除楼盘分期")
+    @PostMapping(value = "remove/{id}",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult remove(@PathVariable("id") String id){
+        int result = modelService.deleteByPrimaryKey(id);
+        return result(result);
+    }
+
+    @ApiOperation(value = "编辑楼盘分期")
+    @PostMapping(value = "edit",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult editSave(ParkFloorDiscRespson model){
+        model.setUpdatedAt(new Date());
+        int result = modelService.edit(model);
+        return result(result);
+    }
+
+    @ApiOperation(value = "根据id查询楼盘分期")
+    @PostMapping(value = "getById",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public ParkFloorDiscRespson getById(String id) {
+        return modelService.getById(id);
+    }
+
+    @ApiOperation(value = "楼盘分期分页")
+    @PostMapping(value = "listByModel",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object listByModel(Tablepar tablepar, ParkFloorDiscRespson model, DateTrans dt){
+        PageInfo<ParkFloorDiscRespson> page= modelService.listByModel(tablepar,model,dt);
+        TableSplitResult<ParkFloorDiscRespson> result = new TableSplitResult<ParkFloorDiscRespson>(page.getPageNum(), page.getTotal(), page.getList());
+        return  result;
+    }
+
+    /**
+     * 分期导入
+     * @param file
+     * @return
+     */
+    @PostMapping(value = "handleImport", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult handleImport(@RequestParam("file") MultipartFile file) {
+        JSONObject jsonObject = new JSONObject();
+        ParkFloorDiscListener listener = new ParkFloorDiscListener(modelService,parkInfoService,sysDictService,jsonObject);
+        try {
+            ExcelUtils excelUtils = new ExcelUtils();
+            File excel = excelUtils.multipartFileToFile(file);
+            if (null == excel) {
+                return AjaxResult.error("导入失败");
+            }
+            EasyExcel.read(excel, ParkFloorDiscExcel.class, listener).headRowNumber(1).sheet().doRead();
+            excel.delete();
+//            List<ParkFloorDiscExcel> errorList = (List<ParkFloorDiscExcel>) jsonObject.get("errorList");
+//            modelService.errorListExport(errorList,response);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return AjaxResult.error(e.getMessage());
+        }
+        return AjaxResult.success(jsonObject);
+    }
+
+    /**
+     * 导出
+     * @param list
+     * @param response
+     * @throws IOException
+     */
+    @PostMapping(value = "errorListExport")
+    @ResponseBody
+    public void errorListExport(@RequestBody List<ParkFloorDiscExcel> list, HttpServletResponse response) throws IOException {
+        modelService.errorListExport(list,response);
+    }
+
+
+    @ApiOperation(value = "分期删除")
+    @PostMapping(value = "delete",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult delete(String id) {
+        int result = modelService.delete(id);
+        return result(result);
+    }
+
+
+}

+ 183 - 0
pro-wx/src/main/java/com/idea/pro/wx/controller/buildManage/WxParkInfoController.java

@@ -0,0 +1,183 @@
+package com.idea.pro.wx.controller.buildManage;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.PageInfo;
+import com.idea.buildManage.excel.ParkInfoExcel;
+import com.idea.buildManage.excel.ParkInfoListener;
+import com.idea.buildManage.model.ParkInfo;
+import com.idea.buildManage.service.ParkInfoService;
+import com.idea.util.ExcelUtils;
+import com.rockstar.common.base.BaseController;
+import com.rockstar.common.domain.AjaxResult;
+import com.rockstar.frame.model.extend.DateTrans;
+import com.rockstar.frame.model.extend.TableSplitResult;
+import com.rockstar.frame.model.extend.Tablepar;
+import com.rockstar.system.service.SysDictService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by pengyq on 2020.
+ */
+@Controller
+@RequestMapping(value = "/wx/ParkInfoController")
+@Api(value="园区管理")
+public class WxParkInfoController extends BaseController {
+
+    //主表
+    @Autowired
+    private ParkInfoService modelService;
+    @Autowired
+    private SysDictService sysDictService;
+
+
+    @PostMapping(value = "list",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object list(Tablepar tablepar, ParkInfo model, DateTrans dt){
+        PageInfo<ParkInfo> page= modelService.list(tablepar,model,dt);
+        TableSplitResult<ParkInfo> result = new TableSplitResult<ParkInfo>(page.getPageNum(), page.getTotal(), page.getList());
+        return  result;
+    }
+
+    @PostMapping(value = "listAll",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object listAll(ParkInfo model, DateTrans dt){
+        return  modelService.listAll(model,dt);
+    }
+
+    @PostMapping(value = "add",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult add(ParkInfo record){
+        record.setCreatedAt(new Date());
+        int result = modelService.insert(record);
+        return result(result);
+    }
+
+    @PostMapping(value = "remove/{id}",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult remove(@PathVariable("id") String id){
+        int result = modelService.deleteByPrimaryKey(id);
+        return result(result);
+    }
+
+    @PostMapping(value = "edit",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult editSave(ParkInfo model){
+        model.setUpdatedAt(new Date());
+        int result = modelService.updateByPrimaryKeySelective(model);
+        return result(result);
+    }
+
+    @PostMapping(value = "getById",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public ParkInfo getById(String id) {
+        return modelService.selectByPrimaryKey(id);
+    }
+
+    @PostMapping(value = "addModel",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult addModel(ParkInfo record){
+        record.setCreatedAt(new Date());
+        int result = modelService.insertModel(record);
+        return result(result);
+    }
+
+//    @PostMapping(value = "delete/{id}",produces = {"application/json;charset=UTF-8"})
+//    @ResponseBody
+//    public AjaxResult delete(@PathVariable("id") String id){
+//        int result = modelService.deleteByKey(id);
+//        return result(result);
+//    }
+
+    //获取属性结构1
+    @PostMapping(value = "getTreeData1",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult getTreeData1(){
+        return success(modelService.getTreeData_1());
+    }
+
+    //获取属性结构2
+    @PostMapping(value = "getTreeData2",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult getTreeData2(){
+        return success(modelService.getTreeData_2());
+    }
+
+    //获取属性结构3
+    @PostMapping(value = "getTreeData3",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult getTreeData3(){
+        return success(modelService.getTreeData_3());
+    }
+
+    //获取楼盘信息3
+    @PostMapping(value = "getlouDetial",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult getlouDetial(String ids){
+        return success(modelService.getLouDetial(ids));
+    }
+
+    @PostMapping(value = "getByIds",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult getByIds(String ids) {
+        return success(modelService.selectByIds(ids));
+    }
+
+    /**
+     * 楼盘导入
+     * @param file
+     * @return
+     */
+    @PostMapping(value = "handleImport", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult handleImport(@RequestParam("file") MultipartFile file) {
+        JSONObject jsonObject = new JSONObject();
+        ParkInfoListener listener = new ParkInfoListener(modelService,sysDictService,jsonObject);
+        try {
+            ExcelUtils excelUtils = new ExcelUtils();
+            File excel = excelUtils.multipartFileToFile(file);
+            if (null == excel) {
+                return AjaxResult.error("导入失败");
+            }
+            EasyExcel.read(excel, ParkInfoExcel.class, listener).headRowNumber(1).sheet().doRead();
+            excel.delete();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return AjaxResult.error(e.getMessage());
+        }
+        return AjaxResult.success(jsonObject);
+    }
+
+    @ApiOperation(value = "园区删除")
+    @PostMapping(value = "delete",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult delete(String id) {
+        int result = modelService.delete(id);
+        return result(result);
+    }
+
+    /**
+     * 导出
+     * @param list
+     * @param response
+     * @throws IOException
+     */
+    @PostMapping(value = "errorListExport")
+    @ResponseBody
+    public void errorListExport(@RequestBody List<ParkInfoExcel> list, HttpServletResponse response) throws IOException {
+        modelService.errorListExport(list,response);
+    }
+
+
+}

+ 180 - 0
pro-wx/src/main/java/com/idea/pro/wx/controller/buildManage/WxParkRoomController.java

@@ -0,0 +1,180 @@
+package com.idea.pro.wx.controller.buildManage;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.PageInfo;
+import com.idea.buildManage.excel.ParkRoomExcel;
+import com.idea.buildManage.excel.ParkRoomListener;
+import com.idea.buildManage.model.ParkRoom;
+import com.idea.buildManage.response.ParkRoomResponse;
+import com.idea.buildManage.service.MnpBuildingService;
+import com.idea.buildManage.service.ParkFloorDiscService;
+import com.idea.buildManage.service.ParkInfoService;
+import com.idea.buildManage.service.ParkRoomService;
+import com.idea.util.ExcelUtils;
+import com.rockstar.common.base.BaseController;
+import com.rockstar.common.domain.AjaxResult;
+import com.rockstar.frame.model.extend.DateTrans;
+import com.rockstar.frame.model.extend.TableSplitResult;
+import com.rockstar.frame.model.extend.Tablepar;
+import com.rockstar.system.service.SysDictService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Created by pengyq on 2020.
+ */
+@Slf4j
+@Controller
+@RequestMapping(value = "/wx/ParkRoomController")
+@Api(value = "房间管理")
+public class WxParkRoomController extends BaseController {
+
+    //主表
+    @Autowired
+    private ParkRoomService modelService;
+    @Autowired
+    private MnpBuildingService buildingService;
+    @Autowired
+    private ParkFloorDiscService floorDiscService;
+    @Autowired
+    private ParkInfoService parkInfoService;
+    @Autowired
+    private SysDictService sysDictService;
+
+
+    @PostMapping(value = "list", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object list(Tablepar tablepar, ParkRoom model, DateTrans dt) {
+        PageInfo<ParkRoom> page = modelService.list(tablepar, model, dt);
+        TableSplitResult<ParkRoom> result = new TableSplitResult<ParkRoom>(page.getPageNum(), page.getTotal(), page.getList());
+        return result;
+    }
+
+    @ApiOperation(value = "房间列表")
+    @PostMapping(value = "listAll", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object listAll(ParkRoom model, DateTrans dt) {
+        return modelService.listAll(model, dt);
+    }
+
+    @ApiOperation(value = "新增房间")
+    @PostMapping(value = "add", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult add(ParkRoom record) {
+
+        int result = modelService.add(record);
+        return result(result);
+    }
+
+    @ApiOperation(value = "删除房间")
+    @PostMapping(value = "remove/{id}", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult remove(@PathVariable("id") String id) {
+        int result = modelService.deleteByPrimaryKey(id);
+        return result(result);
+    }
+
+    @ApiOperation(value = "编辑房间")
+    @PostMapping(value = "edit", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult editSave(ParkRoom model) {
+        int result = modelService.edit(model);
+        return result(result);
+    }
+
+    @ApiOperation(value = "查询房间")
+    @PostMapping(value = "getById", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public ParkRoom getById(String id) {
+        return modelService.selectByPrimaryKey(id);
+    }
+
+    @ApiOperation(value = "房间列表分页")
+    @PostMapping(value = "listByModel", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object listByModel(Tablepar tablepar, ParkRoomResponse model, DateTrans dt) {
+        PageInfo<ParkRoomResponse> page = modelService.listByModel(tablepar, model, dt);
+        TableSplitResult<ParkRoomResponse> result = new TableSplitResult<ParkRoomResponse>(page.getPageNum(), page.getTotal(), page.getList());
+        return result;
+    }
+
+    @ApiOperation(value = "全房间列表")
+    @PostMapping(value = "excelList", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object excelList(ParkRoomResponse model) {
+        return success(modelService.excelList(model, null));
+    }
+
+
+    /**
+     * 获取房屋面积
+     *
+     * @param ids
+     * @return
+     */
+    @PostMapping(value = "getAreaByIds", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Double getAreaByIds(String ids) {
+
+        return modelService.getAreaByIds(ids);
+    }
+
+    /**
+     * 房间导入
+     *
+     * @param file
+     * @return
+     */
+    @PostMapping(value = "handleImport", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult handleImport(@RequestParam("file") MultipartFile file) {
+        JSONObject jsonObject = new JSONObject();
+        ParkRoomListener listener = new ParkRoomListener(modelService, buildingService, floorDiscService, parkInfoService, sysDictService, jsonObject);
+        try {
+            ExcelUtils excelUtils = new ExcelUtils();
+            File excel = excelUtils.multipartFileToFile(file);
+            if (null == excel) {
+                return AjaxResult.error("导入失败");
+            }
+            EasyExcel.read(excel, ParkRoomExcel.class, listener).headRowNumber(1).sheet().doRead();
+            excel.delete();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return AjaxResult.error(e.getMessage());
+        }
+        return AjaxResult.success(jsonObject);
+    }
+
+    @ApiOperation(value = "房间删除")
+    @PostMapping(value = "delete", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult delete(String id) {
+        int result = modelService.delete(id);
+        return result(result);
+    }
+
+    /**
+     * 导出
+     *
+     * @param list
+     * @param response
+     * @throws IOException
+     */
+    @PostMapping(value = "errorListExport")
+    @ResponseBody
+    public void errorListExport(@RequestBody List<ParkRoomExcel> list, HttpServletResponse response) throws IOException {
+        modelService.errorListExport(list, response);
+    }
+
+}