|
@@ -1,36 +1,29 @@
|
|
-package com.songhua.system.controller;
|
|
|
|
|
|
+package com.songhua.web.controller.system;
|
|
|
|
|
|
-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.annotation.Log;
|
|
import com.songhua.common.core.controller.BaseController;
|
|
import com.songhua.common.core.controller.BaseController;
|
|
import com.songhua.common.core.domain.AjaxResult;
|
|
import com.songhua.common.core.domain.AjaxResult;
|
|
|
|
+import com.songhua.common.core.page.TableDataInfo;
|
|
import com.songhua.common.enums.BusinessType;
|
|
import com.songhua.common.enums.BusinessType;
|
|
|
|
+import com.songhua.common.utils.poi.ExcelUtil;
|
|
import com.songhua.system.domain.PzTicketTypeManagement;
|
|
import com.songhua.system.domain.PzTicketTypeManagement;
|
|
import com.songhua.system.service.IPzTicketTypeManagementService;
|
|
import com.songhua.system.service.IPzTicketTypeManagementService;
|
|
-import com.songhua.common.utils.poi.ExcelUtil;
|
|
|
|
-import com.songhua.common.core.page.TableDataInfo;
|
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
+
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 票种管理Controller
|
|
* 票种管理Controller
|
|
- *
|
|
|
|
|
|
+ *
|
|
* @author ruoyi
|
|
* @author ruoyi
|
|
* @date 2024-11-04
|
|
* @date 2024-11-04
|
|
*/
|
|
*/
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/system/ticket")
|
|
@RequestMapping("/system/ticket")
|
|
-public class PzTicketTypeManagementController extends BaseController
|
|
|
|
-{
|
|
|
|
|
|
+public class PzTicketTypeManagementController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private IPzTicketTypeManagementService pzTicketTypeManagementService;
|
|
private IPzTicketTypeManagementService pzTicketTypeManagementService;
|
|
|
|
|
|
@@ -39,8 +32,7 @@ public class PzTicketTypeManagementController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:management:list')")
|
|
@PreAuthorize("@ss.hasPermi('system:management:list')")
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
- public TableDataInfo list(PzTicketTypeManagement pzTicketTypeManagement)
|
|
|
|
- {
|
|
|
|
|
|
+ public TableDataInfo list(PzTicketTypeManagement pzTicketTypeManagement) {
|
|
startPage();
|
|
startPage();
|
|
List<PzTicketTypeManagement> list = pzTicketTypeManagementService.selectPzTicketTypeManagementList(pzTicketTypeManagement);
|
|
List<PzTicketTypeManagement> list = pzTicketTypeManagementService.selectPzTicketTypeManagementList(pzTicketTypeManagement);
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
@@ -52,8 +44,7 @@ public class PzTicketTypeManagementController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('system:management:export')")
|
|
@PreAuthorize("@ss.hasPermi('system:management:export')")
|
|
@Log(title = "票种管理", businessType = BusinessType.EXPORT)
|
|
@Log(title = "票种管理", businessType = BusinessType.EXPORT)
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
- public void export(HttpServletResponse response, PzTicketTypeManagement pzTicketTypeManagement)
|
|
|
|
- {
|
|
|
|
|
|
+ public void export(HttpServletResponse response, PzTicketTypeManagement pzTicketTypeManagement) {
|
|
List<PzTicketTypeManagement> list = pzTicketTypeManagementService.selectPzTicketTypeManagementList(pzTicketTypeManagement);
|
|
List<PzTicketTypeManagement> list = pzTicketTypeManagementService.selectPzTicketTypeManagementList(pzTicketTypeManagement);
|
|
ExcelUtil<PzTicketTypeManagement> util = new ExcelUtil<PzTicketTypeManagement>(PzTicketTypeManagement.class);
|
|
ExcelUtil<PzTicketTypeManagement> util = new ExcelUtil<PzTicketTypeManagement>(PzTicketTypeManagement.class);
|
|
util.exportExcel(response, list, "票种管理数据");
|
|
util.exportExcel(response, list, "票种管理数据");
|
|
@@ -64,8 +55,7 @@ public class PzTicketTypeManagementController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:management:query')")
|
|
@PreAuthorize("@ss.hasPermi('system:management:query')")
|
|
@GetMapping(value = "/{id}")
|
|
@GetMapping(value = "/{id}")
|
|
- public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
return success(pzTicketTypeManagementService.selectPzTicketTypeManagementById(id));
|
|
return success(pzTicketTypeManagementService.selectPzTicketTypeManagementById(id));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -75,8 +65,7 @@ public class PzTicketTypeManagementController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('system:management:add')")
|
|
@PreAuthorize("@ss.hasPermi('system:management:add')")
|
|
@Log(title = "票种管理", businessType = BusinessType.INSERT)
|
|
@Log(title = "票种管理", businessType = BusinessType.INSERT)
|
|
@PostMapping
|
|
@PostMapping
|
|
- public AjaxResult add(@RequestBody PzTicketTypeManagement pzTicketTypeManagement)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult add(@RequestBody PzTicketTypeManagement pzTicketTypeManagement) {
|
|
return toAjax(pzTicketTypeManagementService.insertPzTicketTypeManagement(pzTicketTypeManagement));
|
|
return toAjax(pzTicketTypeManagementService.insertPzTicketTypeManagement(pzTicketTypeManagement));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -86,8 +75,7 @@ public class PzTicketTypeManagementController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('system:management:edit')")
|
|
@PreAuthorize("@ss.hasPermi('system:management:edit')")
|
|
@Log(title = "票种管理", businessType = BusinessType.UPDATE)
|
|
@Log(title = "票种管理", businessType = BusinessType.UPDATE)
|
|
@PutMapping
|
|
@PutMapping
|
|
- public AjaxResult edit(@RequestBody PzTicketTypeManagement pzTicketTypeManagement)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult edit(@RequestBody PzTicketTypeManagement pzTicketTypeManagement) {
|
|
return toAjax(pzTicketTypeManagementService.updatePzTicketTypeManagement(pzTicketTypeManagement));
|
|
return toAjax(pzTicketTypeManagementService.updatePzTicketTypeManagement(pzTicketTypeManagement));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -96,9 +84,8 @@ public class PzTicketTypeManagementController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:management:remove')")
|
|
@PreAuthorize("@ss.hasPermi('system:management:remove')")
|
|
@Log(title = "票种管理", businessType = BusinessType.DELETE)
|
|
@Log(title = "票种管理", businessType = BusinessType.DELETE)
|
|
- @DeleteMapping("/{ids}")
|
|
|
|
- public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
|
- {
|
|
|
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids) {
|
|
return toAjax(pzTicketTypeManagementService.deletePzTicketTypeManagementByIds(ids));
|
|
return toAjax(pzTicketTypeManagementService.deletePzTicketTypeManagementByIds(ids));
|
|
}
|
|
}
|
|
}
|
|
}
|