| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | 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.excel.HouseAndHoldExcel; |
| | | import org.springblade.modules.house.excel.HouseAndHoldImporter; |
| | | import org.springblade.modules.place.excel.PlaceAndRelExcel; |
| | | import org.springblade.modules.place.excel.PlaceAndRelImporter; |
| | | import org.springblade.modules.place.excel.PlaceExcel; |
| | | import org.springblade.modules.place.excel.PlaceImporter; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springblade.modules.place.excel.*; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.place.entity.PlaceEntity; |
| | |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入place") |
| | | @ApiOperation(value = "分页LIST", notes = "传入place") |
| | | public R<IPage<PlaceVO>> list(PlaceEntity place, Query query) { |
| | | IPage<PlaceEntity> pages = placeService.page(Condition.getPage(query), Condition.getQueryWrapper(place)); |
| | | return R.data(PlaceWrapper.build().pageVO(pages)); |
| | |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入place") |
| | | @ApiOperation(value = "分页page", notes = "传入place") |
| | | public R<IPage<PlaceVO>> page(PlaceVO place, Query query) { |
| | | IPage<PlaceVO> pages = placeService.selectPlacePage(Condition.getPage(query), place); |
| | | return R.data(pages); |
| | |
| | | */ |
| | | @GetMapping("/ninePage") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入place") |
| | | @ApiOperation(value = "九小场所档案", notes = "传入place") |
| | | public R<IPage<PlaceVO>> ninePage(PlaceVO place, Query query) { |
| | | IPage<PlaceVO> pages = placeService.selectNinePlacePage(Condition.getPage(query), place); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 企业商超列表查询 |
| | | */ |
| | | @GetMapping("/mallPage") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "企业商超列表查询", notes = "传入place") |
| | | public R<IPage<PlaceVO>> mallPage(PlaceVO place, Query query) { |
| | | IPage<PlaceVO> pages = placeService.selectMallPage(Condition.getPage(query), place); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 自定义新增/修改 |
| | | * 自定义新增 |
| | | * @param placeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "自定义新增", notes = "传入place") |
| | | public R add(@RequestBody PlaceVO placeVO){ |
| | | return R.status(placeService.addOrUpdate(placeVO)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/addOrUpdate") |
| | | @ApiOperation(value = "自定义新增/修改", notes = "传入place") |
| | | public R addOrUpdate(@RequestBody PlaceVO placeVO){ |
| | | return R.status(placeService.addOrUpdate(placeVO)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/updatePlace") |
| | | @ApiOperation(value = "自定义修改", notes = "传入place") |
| | | public R updatePlace(@RequestBody PlaceVO placeVO){ |
| | | return R.status(placeService.updatePlace(placeVO)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/getDetail") |
| | | @ApiOperation(value = "场所表 自定义详情查询", notes = "传入ids") |
| | | public R<PlaceVO> getDetail(PlaceVO place) { |
| | | return R.data(placeService.getDetail(place)); |
| | | } |
| | |
| | | public R placeLabelHandle() { |
| | | return R.data(placeService.placeLabelHandle()); |
| | | } |
| | | |
| | | /** |
| | | * 导出九小统计 |
| | | */ |
| | | @GetMapping("exportNineType") |
| | | @ApiOperationSupport(order = 13) |
| | | @ApiOperation(value = "导出九小统计", notes = "传入place") |
| | | public void exportNineType(PlaceVO place, HttpServletResponse response) { |
| | | List<NinePlaceExcel> list = placeService.export(place); |
| | | ExcelUtil.export(response, "档案管理" + DateUtil.time(), "场所数据表", list, NinePlaceExcel.class); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 场所警务网格处理 |
| | | */ |
| | | @GetMapping("/placeJwGridCodeHandle") |
| | | public R placeJwGridCodeHandle() { |
| | | return R.data(placeService.placeJwGridCodeHandle()); |
| | | } |
| | | |
| | | /** |
| | | * 场所综治网格处理 |
| | | */ |
| | | @GetMapping("/placeGridCodeHandle") |
| | | public R placeGridCodeHandle() { |
| | | return R.data(placeService.placeGridCodeHandle()); |
| | | } |
| | | |
| | | /** |
| | | * 场所二维码绑定处理 |
| | | */ |
| | | @GetMapping("/placeDoorBindHandle") |
| | | public R placeDoorBindHandle() { |
| | | return R.data(placeService.placeDoorBindHandle()); |
| | | } |
| | | } |