| | |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.house.vo.HouseholdVO; |
| | | import org.springblade.modules.system.excel.HouseExcel; |
| | | import org.springblade.modules.system.excel.HouseHoldExcel; |
| | | import org.springblade.modules.house.excel.HouseImporter; |
| | | import org.springblade.modules.house.vo.HouseParam; |
| | | import org.springblade.modules.house.excel.HouseExcel; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.excel.UserImporter; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.house.entity.HouseEntity; |
| | |
| | | import org.springblade.modules.house.wrapper.HouseWrapper; |
| | | import org.springblade.modules.house.service.IHouseService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 导出用户 |
| | | * 导出房屋 |
| | | */ |
| | | @GetMapping("export-house") |
| | | @ApiOperationSupport(order = 13) |
| | | @ApiOperation(value = "导出房屋", notes = "传入user") |
| | | public void exportUser(HouseVO household, HttpServletResponse response) { |
| | | public void exportHouse(HouseVO household, HttpServletResponse response) { |
| | | List<HouseExcel> list = houseService.export(household); |
| | | ExcelUtil.export(response, "房屋数据" + DateUtil.time(), "房屋数据表", list, HouseExcel.class); |
| | | } |
| | | |
| | | /** |
| | | * 导入房屋 |
| | | */ |
| | | @GetMapping("import-house") |
| | | public R importHouse(MultipartFile file, Integer isCovered) { |
| | | HouseImporter houseImporter = new HouseImporter(houseService, isCovered == 1); |
| | | ExcelUtil.save(file, houseImporter, HouseExcel.class); |
| | | return R.success("操作成功"); |
| | | } |
| | | |
| | | /** |
| | | * 查询房屋树 |
| | | * @param houseParam |
| | | * @return |
| | | */ |
| | | @GetMapping("/getHouseTree") |
| | | public R getHouseTree(HouseParam houseParam) { |
| | | return R.data(houseService.getHouseTree(houseParam)); |
| | | } |
| | | |
| | | |
| | | } |