|
|
@@ -0,0 +1,106 @@
|
|
|
+package org.springblade.box.tube.declare;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import org.springblade.box.tube.entity.DeclareCustomsFiles;
|
|
|
+import org.springblade.box.tube.service.IDeclareCustomsFilesService;
|
|
|
+import org.springblade.box.tube.vo.DeclareCustomsFilesVO;
|
|
|
+import org.springblade.core.boot.ctrl.BladeController;
|
|
|
+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.Func;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.validation.Valid;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 报关进出口附件控制器
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@AllArgsConstructor
|
|
|
+@RequestMapping("/declareCustomsFiles")
|
|
|
+@Api(value = "报关附件表", tags = "报关附件表")
|
|
|
+public class DeclareCustomsFilesController extends BladeController {
|
|
|
+
|
|
|
+ private final IDeclareCustomsFilesService filesService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 详情
|
|
|
+ */
|
|
|
+ @GetMapping("/detail")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @ApiOperation(value = "详情", notes = "传入tradingBoxFiles")
|
|
|
+ public R<DeclareCustomsFiles> detail(DeclareCustomsFiles declareCustomsFiles) {
|
|
|
+ DeclareCustomsFiles detail = filesService.getOne(Condition.getQueryWrapper(declareCustomsFiles));
|
|
|
+ return R.data(detail);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页 买(卖)箱文件表
|
|
|
+ */
|
|
|
+ @GetMapping("/list")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "分页", notes = "传入tradingBoxFiles")
|
|
|
+ public R<IPage<DeclareCustomsFiles>> list(DeclareCustomsFiles declareCustomsFiles, Query query) {
|
|
|
+ IPage<DeclareCustomsFiles> pages = filesService.page(Condition.getPage(query), Condition.getQueryWrapper(declareCustomsFiles));
|
|
|
+ return R.data(pages);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 自定义分页 买(卖)箱文件表
|
|
|
+ */
|
|
|
+ @GetMapping("/page")
|
|
|
+ @ApiOperationSupport(order = 3)
|
|
|
+ @ApiOperation(value = "分页", notes = "传入tradingBoxFiles")
|
|
|
+ public R<IPage<DeclareCustomsFilesVO>> page(DeclareCustomsFilesVO declareCustomsFiles, Query query) {
|
|
|
+ IPage<DeclareCustomsFilesVO> pages = filesService.selectFilesPage(Condition.getPage(query), declareCustomsFiles);
|
|
|
+ return R.data(pages);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增 买(卖)箱文件表
|
|
|
+ */
|
|
|
+ @PostMapping("/save")
|
|
|
+ @ApiOperationSupport(order = 4)
|
|
|
+ @ApiOperation(value = "新增", notes = "传入tradingBoxFiles")
|
|
|
+ public R save(@Valid @RequestBody DeclareCustomsFiles declareCustomsFiles) {
|
|
|
+ return R.status(filesService.save(declareCustomsFiles));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改 买(卖)箱文件表
|
|
|
+ */
|
|
|
+ @PostMapping("/update")
|
|
|
+ @ApiOperationSupport(order = 5)
|
|
|
+ @ApiOperation(value = "修改", notes = "传入tradingBoxFiles")
|
|
|
+ public R update(@Valid @RequestBody DeclareCustomsFiles declareCustomsFiles) {
|
|
|
+ return R.status(filesService.updateById(declareCustomsFiles));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增或修改 买(卖)箱文件表
|
|
|
+ */
|
|
|
+ @PostMapping("/submit")
|
|
|
+ @ApiOperationSupport(order = 6)
|
|
|
+ @ApiOperation(value = "新增或修改", notes = "传入tradingBoxFiles")
|
|
|
+ public R submit(@Valid @RequestBody DeclareCustomsFiles declareCustomsFiles) {
|
|
|
+ return R.status(filesService.saveOrUpdate(declareCustomsFiles));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除 买(卖)箱文件表
|
|
|
+ */
|
|
|
+ @PostMapping("/remove")
|
|
|
+ @ApiOperationSupport(order = 8)
|
|
|
+ @ApiOperation(value = "删除", notes = "传入ids")
|
|
|
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
|
|
|
+ return R.status(filesService.removeByIds(Func.toLongList(ids)));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|