BjTrackShipCompanyController.java 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. package com.ruoyi.business.controller;
  2. import com.ruoyi.business.domain.bo.BjTrackShipCompanyBo;
  3. import com.ruoyi.business.domain.bo.BreakBo;
  4. import com.ruoyi.business.domain.bo.ReportFlagBo;
  5. import com.ruoyi.business.service.IBjTrackShipCompanyService;
  6. import com.ruoyi.common.core.web.controller.BaseController;
  7. import com.ruoyi.common.core.web.domain.AjaxResult;
  8. import com.ruoyi.common.core.web.page.TableDataInfo;
  9. import com.ruoyi.common.log.annotation.Log;
  10. import com.ruoyi.common.log.enums.BusinessType;
  11. import io.swagger.v3.oas.annotations.Operation;
  12. import io.swagger.v3.oas.annotations.tags.Tag;
  13. import lombok.RequiredArgsConstructor;
  14. import org.springframework.validation.annotation.Validated;
  15. import org.springframework.web.bind.annotation.*;
  16. import javax.annotation.Resource;
  17. import java.text.ParseException;
  18. import java.util.List;
  19. /**
  20. * 重点跟踪航运公司查询
  21. * 前端访问路由地址为:/business/trackShipCompany
  22. *
  23. * @author libai
  24. * @date 2025-10-28
  25. */
  26. @Tag(name = "重点跟踪航运公司查询")
  27. @Validated
  28. @RequiredArgsConstructor
  29. @RestController
  30. @RequestMapping("/trackShipCompany")
  31. public class BjTrackShipCompanyController extends BaseController {
  32. @Resource
  33. private IBjTrackShipCompanyService bjTrackShipCompanyService;
  34. /**
  35. * 重点跟踪航运公司查询列表
  36. */
  37. @Operation(summary = "查询重点跟踪航运公司查询列表")
  38. // @SaCheckPermission("business:trackShipCompany:list")
  39. @GetMapping("/list")
  40. public TableDataInfo list(BjTrackShipCompanyBo bo) {
  41. return getDataTable(bjTrackShipCompanyService.queryPageList(bo));
  42. }
  43. /**
  44. * 获取重点跟踪航运公司查询详细信息
  45. *
  46. * @param trackShipCompanyId 主键
  47. */
  48. @Operation(summary = "获取重点跟踪航运公司查询详细信息")
  49. // @SaCheckPermission("business:trackShipCompany:query")
  50. @GetMapping("/{trackShipCompanyId}")
  51. public AjaxResult getInfo(@PathVariable("trackShipCompanyId") String trackShipCompanyId) {
  52. return success(bjTrackShipCompanyService.queryById(trackShipCompanyId));
  53. }
  54. /**
  55. * 新增重点跟踪航运公司
  56. */
  57. @Operation(summary = "新增重点跟踪航运公司")
  58. // @RequiresPermissions("business:trackShipCompany:add")
  59. @Log(title = "重点跟踪航运公司", businessType = BusinessType.INSERT)
  60. @PostMapping()
  61. public AjaxResult add(@RequestBody BjTrackShipCompanyBo bo) throws ParseException {
  62. return toAjax(bjTrackShipCompanyService.insertByBo(bo));
  63. }
  64. /**
  65. * 修改重点跟踪航运公司
  66. */
  67. @Operation(summary = "修改重点跟踪航运公司")
  68. // @RequiresPermissions("business:trackShipCompany:edit")
  69. @Log(title = "重点跟踪航运公司", businessType = BusinessType.UPDATE)
  70. @PutMapping()
  71. public AjaxResult edit(@RequestBody BjTrackShipCompanyBo bo) throws ParseException {
  72. return toAjax(bjTrackShipCompanyService.updateByBo(bo));
  73. }
  74. /**
  75. * 不予通报
  76. */
  77. @Operation(summary = "不予通报")
  78. // @RequiresPermissions("business:trackShipCompany:edit")
  79. @Log(title = "不予通报", businessType = BusinessType.UPDATE)
  80. @PutMapping("/updateReportFlag")
  81. public AjaxResult editFlag(@RequestBody ReportFlagBo bo) throws ParseException {
  82. return toAjax(bjTrackShipCompanyService.updateFlag(bo));
  83. }
  84. /**
  85. * 脱离
  86. */
  87. @Operation(summary = "脱离")
  88. // @RequiresPermissions("business:trackShipCompany:edit")
  89. @Log(title = "脱离", businessType = BusinessType.UPDATE)
  90. @PutMapping("/updateBreak")
  91. public AjaxResult updateBreak(@RequestBody BreakBo bo) throws ParseException {
  92. return toAjax(bjTrackShipCompanyService.updateBreak(bo));
  93. }
  94. /**
  95. * 删除重点跟踪航运公司
  96. *
  97. * @param trackShipCompanyId 主键串
  98. */
  99. @Operation(summary = "删除重点跟踪航运公司")
  100. // @RequiresPermissions("business:trackShipCompany:remove")
  101. @Log(title = "重点跟踪航运公司", businessType = BusinessType.DELETE)
  102. @DeleteMapping("/{trackShipCompanyId}")
  103. public AjaxResult remove(@PathVariable("trackShipCompanyId") String[] trackShipCompanyId) {
  104. return toAjax(bjTrackShipCompanyService.deleteWithValidByIds(List.of(trackShipCompanyId), true));
  105. }
  106. }