| | |
| | | private final IGdSupplyDemandAuditService gdSupplyDemandAuditService; |
| | | |
| | | /** |
| | | * 供需需求审核记录表 列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "列表", notes = "传入demandId") |
| | | public R<List<GdSupplyDemandAuditVO>> list(@ApiParam(value = "供需需求ID", required = true) @RequestParam Long demandId) { |
| | | return R.data(gdSupplyDemandAuditService.listSupplyDemandAudit(demandId)); |
| | | } |
| | | |
| | | /** |
| | | * 供需需求审核记录表 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入gdSupplyDemandAudit") |
| | | public R<GdSupplyDemandAuditVO> detail(GdSupplyDemandAuditEntity gdSupplyDemandAudit) { |
| | | GdSupplyDemandAuditEntity detail = gdSupplyDemandAuditService.getOne(Condition.getQueryWrapper(gdSupplyDemandAudit)); |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "详情", notes = "传入id") |
| | | public R<GdSupplyDemandAuditVO> detail(@ApiParam(value = "主键ID", required = true) @RequestParam Long id) { |
| | | GdSupplyDemandAuditEntity detail = gdSupplyDemandAuditService.getById(id); |
| | | return R.data(GdSupplyDemandAuditWrapper.build().entityVO(detail)); |
| | | } |
| | | /** |
| | | * 供需需求审核记录表 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入gdSupplyDemandAudit") |
| | | public R<IPage<GdSupplyDemandAuditVO>> list(@ApiIgnore @RequestParam Map<String, Object> gdSupplyDemandAudit, Query query) { |
| | | IPage<GdSupplyDemandAuditEntity> pages = gdSupplyDemandAuditService.page(Condition.getPage(query), Condition.getQueryWrapper(gdSupplyDemandAudit, GdSupplyDemandAuditEntity.class)); |
| | | return R.data(GdSupplyDemandAuditWrapper.build().pageVO(pages)); |
| | | } |
| | | // /** |
| | | // * 供需需求审核记录表 分页 |
| | | // */ |
| | | // @GetMapping("/list") |
| | | // @ApiOperationSupport(order = 2) |
| | | // @ApiOperation(value = "分页", notes = "传入gdSupplyDemandAudit") |
| | | // public R<IPage<GdSupplyDemandAuditVO>> list(@ApiIgnore @RequestParam Map<String, Object> gdSupplyDemandAudit, Query query) { |
| | | // IPage<GdSupplyDemandAuditEntity> pages = gdSupplyDemandAuditService.page(Condition.getPage(query), Condition.getQueryWrapper(gdSupplyDemandAudit, GdSupplyDemandAuditEntity.class)); |
| | | // return R.data(GdSupplyDemandAuditWrapper.build().pageVO(pages)); |
| | | // } |
| | | |
| | | /** |
| | | * 供需需求审核记录表 自定义分页 |
| | |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 供需需求审核记录表 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入gdSupplyDemandAudit") |
| | | public R save(@Valid @RequestBody GdSupplyDemandAuditEntity gdSupplyDemandAudit) { |
| | | return R.status(gdSupplyDemandAuditService.save(gdSupplyDemandAudit)); |
| | | } |
| | | // /** |
| | | // * 供需需求审核记录表 新增 |
| | | // */ |
| | | // @PostMapping("/save") |
| | | // @ApiOperationSupport(order = 4) |
| | | // @ApiOperation(value = "新增", notes = "传入gdSupplyDemandAudit") |
| | | // public R save(@Valid @RequestBody GdSupplyDemandAuditEntity gdSupplyDemandAudit) { |
| | | // return R.status(gdSupplyDemandAuditService.save(gdSupplyDemandAudit)); |
| | | // } |
| | | |
| | | /** |
| | | * 供需需求审核记录表 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入gdSupplyDemandAudit") |
| | | public R update(@Valid @RequestBody GdSupplyDemandAuditEntity gdSupplyDemandAudit) { |
| | | return R.status(gdSupplyDemandAuditService.updateById(gdSupplyDemandAudit)); |
| | | } |
| | | // /** |
| | | // * 供需需求审核记录表 修改 |
| | | // */ |
| | | // @PostMapping("/update") |
| | | // @ApiOperationSupport(order = 5) |
| | | // @ApiOperation(value = "修改", notes = "传入gdSupplyDemandAudit") |
| | | // public R update(@Valid @RequestBody GdSupplyDemandAuditEntity gdSupplyDemandAudit) { |
| | | // return R.status(gdSupplyDemandAuditService.updateById(gdSupplyDemandAudit)); |
| | | // } |
| | | |
| | | /** |
| | | * 供需需求审核记录表 新增或修改 |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出数据 |
| | | */ |
| | | @GetMapping("/export-gdSupplyDemandAudit") |
| | | @ApiOperationSupport(order = 9) |
| | | @ApiOperation(value = "导出数据", notes = "传入gdSupplyDemandAudit") |
| | | public void exportGdSupplyDemandAudit(@ApiIgnore @RequestParam Map<String, Object> gdSupplyDemandAudit, BladeUser bladeUser, HttpServletResponse response) { |
| | | QueryWrapper<GdSupplyDemandAuditEntity> queryWrapper = Condition.getQueryWrapper(gdSupplyDemandAudit, GdSupplyDemandAuditEntity.class); |
| | | // /** |
| | | // * 导出数据 |
| | | // */ |
| | | // @GetMapping("/export-gdSupplyDemandAudit") |
| | | // @ApiOperationSupport(order = 9) |
| | | // @ApiOperation(value = "导出数据", notes = "传入gdSupplyDemandAudit") |
| | | // public void exportGdSupplyDemandAudit(@ApiIgnore @RequestParam Map<String, Object> gdSupplyDemandAudit, BladeUser bladeUser, HttpServletResponse response) { |
| | | // QueryWrapper<GdSupplyDemandAuditEntity> queryWrapper = Condition.getQueryWrapper(gdSupplyDemandAudit, GdSupplyDemandAuditEntity.class); |
| | | //if (!AuthUtil.isAdministrator()) { |
| | | // queryWrapper.lambda().eq(GdSupplyDemandAudit::getTenantId, bladeUser.getTenantId()); |
| | | //} |
| | | queryWrapper.lambda().eq(GdSupplyDemandAuditEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
| | | List<GdSupplyDemandAuditExcel> list = gdSupplyDemandAuditService.exportGdSupplyDemandAudit(queryWrapper); |
| | | ExcelUtil.export(response, "供需需求审核记录表数据" + DateUtil.time(), "供需需求审核记录表数据表", list, GdSupplyDemandAuditExcel.class); |
| | | } |
| | | // queryWrapper.lambda().eq(GdSupplyDemandAuditEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
| | | // List<GdSupplyDemandAuditExcel> list = gdSupplyDemandAuditService.exportGdSupplyDemandAudit(queryWrapper); |
| | | // ExcelUtil.export(response, "供需需求审核记录表数据" + DateUtil.time(), "供需需求审核记录表数据表", list, GdSupplyDemandAuditExcel.class); |
| | | // } |
| | | |
| | | } |