| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.sxkj.gd.orderdata.entity.GdSupplyDemandEntity; |
| | | import org.sxkj.gd.orderdata.param.GdSupplyDemandPageParam; |
| | | import org.sxkj.gd.orderdata.vo.GdSupplyDemandVO; |
| | | import org.sxkj.gd.orderdata.excel.GdSupplyDemandExcel; |
| | | import org.sxkj.gd.orderdata.wrapper.GdSupplyDemandWrapper; |
| | |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入gdSupplyDemand") |
| | | public R<IPage<GdSupplyDemandVO>> page(GdSupplyDemandVO gdSupplyDemand, Query query) { |
| | | public R<IPage<GdSupplyDemandVO>> page(GdSupplyDemandPageParam gdSupplyDemand, Query query) { |
| | | IPage<GdSupplyDemandVO> pages = gdSupplyDemandService.selectGdSupplyDemandPage(Condition.getPage(query), gdSupplyDemand); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 供需需求信息表 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入gdSupplyDemand") |
| | | public R save(@Valid @RequestBody GdSupplyDemandEntity gdSupplyDemand) { |
| | | return R.status(gdSupplyDemandService.save(gdSupplyDemand)); |
| | | } |
| | | // /** |
| | | // * 供需需求信息表 新增 |
| | | // */ |
| | | // @PostMapping("/save") |
| | | // @ApiOperationSupport(order = 4) |
| | | // @ApiOperation(value = "新增", notes = "传入gdSupplyDemand") |
| | | // public R save(@Valid @RequestBody GdSupplyDemandEntity gdSupplyDemand) { |
| | | // return R.status(gdSupplyDemandService.save(gdSupplyDemand)); |
| | | // } |
| | | |
| | | /** |
| | | * 供需需求信息表 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入gdSupplyDemand") |
| | | public R update(@Valid @RequestBody GdSupplyDemandEntity gdSupplyDemand) { |
| | | return R.status(gdSupplyDemandService.updateById(gdSupplyDemand)); |
| | | } |
| | | // /** |
| | | // * 供需需求信息表 修改 |
| | | // */ |
| | | // @PostMapping("/update") |
| | | // @ApiOperationSupport(order = 5) |
| | | // @ApiOperation(value = "修改", notes = "传入gdSupplyDemand") |
| | | // public R update(@Valid @RequestBody GdSupplyDemandEntity gdSupplyDemand) { |
| | | // return R.status(gdSupplyDemandService.updateById(gdSupplyDemand)); |
| | | // } |
| | | |
| | | /** |
| | | * 供需需求信息表 新增或修改 |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出数据 |
| | | */ |
| | | @GetMapping("/export-gdSupplyDemand") |
| | | @ApiOperationSupport(order = 9) |
| | | @ApiOperation(value = "导出数据", notes = "传入gdSupplyDemand") |
| | | public void exportGdSupplyDemand(@ApiIgnore @RequestParam Map<String, Object> gdSupplyDemand, BladeUser bladeUser, HttpServletResponse response) { |
| | | QueryWrapper<GdSupplyDemandEntity> queryWrapper = Condition.getQueryWrapper(gdSupplyDemand, GdSupplyDemandEntity.class); |
| | | // /** |
| | | // * 导出数据 |
| | | // */ |
| | | // @GetMapping("/export-gdSupplyDemand") |
| | | // @ApiOperationSupport(order = 9) |
| | | // @ApiOperation(value = "导出数据", notes = "传入gdSupplyDemand") |
| | | // public void exportGdSupplyDemand(@ApiIgnore @RequestParam Map<String, Object> gdSupplyDemand, BladeUser bladeUser, HttpServletResponse response) { |
| | | // QueryWrapper<GdSupplyDemandEntity> queryWrapper = Condition.getQueryWrapper(gdSupplyDemand, GdSupplyDemandEntity.class); |
| | | //if (!AuthUtil.isAdministrator()) { |
| | | // queryWrapper.lambda().eq(GdSupplyDemand::getTenantId, bladeUser.getTenantId()); |
| | | //} |
| | | queryWrapper.lambda().eq(GdSupplyDemandEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
| | | List<GdSupplyDemandExcel> list = gdSupplyDemandService.exportGdSupplyDemand(queryWrapper); |
| | | ExcelUtil.export(response, "供需需求信息表数据" + DateUtil.time(), "供需需求信息表数据表", list, GdSupplyDemandExcel.class); |
| | | } |
| | | // queryWrapper.lambda().eq(GdSupplyDemandEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
| | | // List<GdSupplyDemandExcel> list = gdSupplyDemandService.exportGdSupplyDemand(queryWrapper); |
| | | // ExcelUtil.export(response, "供需需求信息表数据" + DateUtil.time(), "供需需求信息表数据表", list, GdSupplyDemandExcel.class); |
| | | // } |
| | | |
| | | } |