|
@@ -0,0 +1,104 @@
|
|
|
+package com.songhua.system.controller;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import com.songhua.common.annotation.Log;
|
|
|
+import com.songhua.common.core.controller.BaseController;
|
|
|
+import com.songhua.common.core.domain.AjaxResult;
|
|
|
+import com.songhua.common.enums.BusinessType;
|
|
|
+import com.songhua.system.domain.PzTicketTypeManagement;
|
|
|
+import com.songhua.system.service.IPzTicketTypeManagementService;
|
|
|
+import com.songhua.common.utils.poi.ExcelUtil;
|
|
|
+import com.songhua.common.core.page.TableDataInfo;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 票种管理Controller
|
|
|
+ *
|
|
|
+ * @author ruoyi
|
|
|
+ * @date 2024-11-04
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/system/ticket")
|
|
|
+public class PzTicketTypeManagementController extends BaseController
|
|
|
+{
|
|
|
+ @Autowired
|
|
|
+ private IPzTicketTypeManagementService pzTicketTypeManagementService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询票种管理列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:management:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(PzTicketTypeManagement pzTicketTypeManagement)
|
|
|
+ {
|
|
|
+ startPage();
|
|
|
+ List<PzTicketTypeManagement> list = pzTicketTypeManagementService.selectPzTicketTypeManagementList(pzTicketTypeManagement);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出票种管理列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:management:export')")
|
|
|
+ @Log(title = "票种管理", businessType = BusinessType.EXPORT)
|
|
|
+ @PostMapping("/export")
|
|
|
+ public void export(HttpServletResponse response, PzTicketTypeManagement pzTicketTypeManagement)
|
|
|
+ {
|
|
|
+ List<PzTicketTypeManagement> list = pzTicketTypeManagementService.selectPzTicketTypeManagementList(pzTicketTypeManagement);
|
|
|
+ ExcelUtil<PzTicketTypeManagement> util = new ExcelUtil<PzTicketTypeManagement>(PzTicketTypeManagement.class);
|
|
|
+ util.exportExcel(response, list, "票种管理数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取票种管理详细信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:management:query')")
|
|
|
+ @GetMapping(value = "/{id}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
+ {
|
|
|
+ return success(pzTicketTypeManagementService.selectPzTicketTypeManagementById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增票种管理
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:management:add')")
|
|
|
+ @Log(title = "票种管理", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping
|
|
|
+ public AjaxResult add(@RequestBody PzTicketTypeManagement pzTicketTypeManagement)
|
|
|
+ {
|
|
|
+ return toAjax(pzTicketTypeManagementService.insertPzTicketTypeManagement(pzTicketTypeManagement));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改票种管理
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:management:edit')")
|
|
|
+ @Log(title = "票种管理", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody PzTicketTypeManagement pzTicketTypeManagement)
|
|
|
+ {
|
|
|
+ return toAjax(pzTicketTypeManagementService.updatePzTicketTypeManagement(pzTicketTypeManagement));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除票种管理
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:management:remove')")
|
|
|
+ @Log(title = "票种管理", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
+ {
|
|
|
+ return toAjax(pzTicketTypeManagementService.deletePzTicketTypeManagementByIds(ids));
|
|
|
+ }
|
|
|
+}
|