bihuisong 7 hónapja
szülő
commit
06ff9c0314

+ 18 - 31
songhua-admin/src/main/java/com/songhua/web/controller/system/PzTicketTypeManagementController.java

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

+ 85 - 0
songhua-admin/src/main/java/com/songhua/web/controller/system/ShhTicketRulesController.java

@@ -0,0 +1,85 @@
+package com.songhua.web.controller.system;
+
+import com.songhua.common.annotation.Log;
+import com.songhua.common.core.controller.BaseController;
+import com.songhua.common.core.domain.AjaxResult;
+import com.songhua.common.core.page.TableDataInfo;
+import com.songhua.common.enums.BusinessType;
+import com.songhua.common.utils.poi.ExcelUtil;
+import com.songhua.system.domain.ShhTicketRules;
+import com.songhua.system.service.IShhTicketRulesService;
+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
+ *
+ * @author ruoyi
+ * @date 2024-11-04
+ */
+@RestController
+@RequestMapping("/ticket/rules")
+public class ShhTicketRulesController extends BaseController {
+    @Autowired
+    private IShhTicketRulesService shhTicketRulesService;
+
+    /**
+     * 查询票种规则列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(ShhTicketRules shhTicketRules) {
+        startPage();
+        List<ShhTicketRules> list = shhTicketRulesService.selectShhTicketRulesList(shhTicketRules);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出票种规则列表
+     */
+    @Log(title = "票种规则", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ShhTicketRules shhTicketRules) {
+        List<ShhTicketRules> list = shhTicketRulesService.selectShhTicketRulesList(shhTicketRules);
+        ExcelUtil<ShhTicketRules> util = new ExcelUtil<ShhTicketRules>(ShhTicketRules.class);
+        util.exportExcel(response, list, "票种规则数据");
+    }
+
+    /**
+     * 获取票种规则详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(shhTicketRulesService.selectShhTicketRulesById(id));
+    }
+
+    /**
+     * 新增票种规则
+     */
+    @Log(title = "票种规则", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ShhTicketRules shhTicketRules) {
+        return toAjax(shhTicketRulesService.insertShhTicketRules(shhTicketRules));
+    }
+
+    /**
+     * 修改票种规则
+     */
+    @Log(title = "票种规则", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ShhTicketRules shhTicketRules) {
+        return toAjax(shhTicketRulesService.updateShhTicketRules(shhTicketRules));
+    }
+
+    /**
+     * 删除票种规则
+     */
+    @Log(title = "票种规则", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(shhTicketRulesService.deleteShhTicketRulesByIds(ids));
+    }
+}

+ 85 - 0
songhua-admin/src/main/java/com/songhua/web/controller/system/ShhTicketRulesDataController.java

@@ -0,0 +1,85 @@
+package com.songhua.web.controller.system;
+
+import com.songhua.common.annotation.Log;
+import com.songhua.common.core.controller.BaseController;
+import com.songhua.common.core.domain.AjaxResult;
+import com.songhua.common.core.page.TableDataInfo;
+import com.songhua.common.enums.BusinessType;
+import com.songhua.common.utils.poi.ExcelUtil;
+import com.songhua.system.domain.ShhTicketRulesData;
+import com.songhua.system.service.IShhTicketRulesDataService;
+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
+ *
+ * @author ruoyi
+ * @date 2024-11-04
+ */
+@RestController
+@RequestMapping("/ticket/rules/data")
+public class ShhTicketRulesDataController extends BaseController {
+    @Autowired
+    private IShhTicketRulesDataService shhTicketRulesDataService;
+
+    /**
+     * 查询票种规则子列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(ShhTicketRulesData shhTicketRulesData) {
+        startPage();
+        List<ShhTicketRulesData> list = shhTicketRulesDataService.selectShhTicketRulesDataList(shhTicketRulesData);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出票种规则子列表
+     */
+    @Log(title = "票种规则子", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ShhTicketRulesData shhTicketRulesData) {
+        List<ShhTicketRulesData> list = shhTicketRulesDataService.selectShhTicketRulesDataList(shhTicketRulesData);
+        ExcelUtil<ShhTicketRulesData> util = new ExcelUtil<ShhTicketRulesData>(ShhTicketRulesData.class);
+        util.exportExcel(response, list, "票种规则子数据");
+    }
+
+    /**
+     * 获取票种规则子详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(shhTicketRulesDataService.selectShhTicketRulesDataById(id));
+    }
+
+    /**
+     * 新增票种规则子
+     */
+    @Log(title = "票种规则子", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ShhTicketRulesData shhTicketRulesData) {
+        return toAjax(shhTicketRulesDataService.insertShhTicketRulesData(shhTicketRulesData));
+    }
+
+    /**
+     * 修改票种规则子
+     */
+    @Log(title = "票种规则子", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ShhTicketRulesData shhTicketRulesData) {
+        return toAjax(shhTicketRulesDataService.updateShhTicketRulesData(shhTicketRulesData));
+    }
+
+    /**
+     * 删除票种规则子
+     */
+    @Log(title = "票种规则子", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(shhTicketRulesDataService.deleteShhTicketRulesDataByIds(ids));
+    }
+}

+ 51 - 0
songhua-system/src/main/java/com/songhua/system/domain/ShhTicketRules.java

@@ -0,0 +1,51 @@
+package com.songhua.system.domain;
+
+import com.songhua.common.annotation.Excel;
+import com.songhua.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 票种规则对象 shh_ticket_rules
+ *
+ * @author ruoyi
+ * @date 2024-11-04
+ */
+public class ShhTicketRules extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private Long id;
+
+    /**
+     * 票务规则名称
+     */
+    @Excel(name = "票务规则名称")
+    private String ticketRules;
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setTicketRules(String ticketRules) {
+        this.ticketRules = ticketRules;
+    }
+
+    public String getTicketRules() {
+        return ticketRules;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("ticketRules", getTicketRules())
+                .toString();
+    }
+}

+ 66 - 0
songhua-system/src/main/java/com/songhua/system/domain/ShhTicketRulesData.java

@@ -0,0 +1,66 @@
+package com.songhua.system.domain;
+
+import com.songhua.common.annotation.Excel;
+import com.songhua.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 票种规则子对象 shh_ticket_rules_data
+ *
+ * @author ruoyi
+ * @date 2024-11-04
+ */
+public class ShhTicketRulesData extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private Long id;
+
+    /**
+     * 票务规则id
+     */
+    @Excel(name = "票务规则id")
+    private Long rulesId;
+
+    /**
+     * 票种id
+     */
+    @Excel(name = "票种id")
+    private Long ticketId;
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setRulesId(Long rulesId) {
+        this.rulesId = rulesId;
+    }
+
+    public Long getRulesId() {
+        return rulesId;
+    }
+
+    public void setTicketId(Long ticketId) {
+        this.ticketId = ticketId;
+    }
+
+    public Long getTicketId() {
+        return ticketId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("rulesId", getRulesId())
+                .append("ticketId", getTicketId())
+                .toString();
+    }
+}

+ 61 - 0
songhua-system/src/main/java/com/songhua/system/mapper/ShhTicketRulesDataMapper.java

@@ -0,0 +1,61 @@
+package com.songhua.system.mapper;
+
+import com.songhua.system.domain.ShhTicketRulesData;
+
+import java.util.List;
+
+/**
+ * 票种规则子Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-11-04
+ */
+public interface ShhTicketRulesDataMapper {
+    /**
+     * 查询票种规则子
+     *
+     * @param id 票种规则子主键
+     * @return 票种规则子
+     */
+    public ShhTicketRulesData selectShhTicketRulesDataById(Long id);
+
+    /**
+     * 查询票种规则子列表
+     *
+     * @param shhTicketRulesData 票种规则子
+     * @return 票种规则子集合
+     */
+    public List<ShhTicketRulesData> selectShhTicketRulesDataList(ShhTicketRulesData shhTicketRulesData);
+
+    /**
+     * 新增票种规则子
+     *
+     * @param shhTicketRulesData 票种规则子
+     * @return 结果
+     */
+    public int insertShhTicketRulesData(ShhTicketRulesData shhTicketRulesData);
+
+    /**
+     * 修改票种规则子
+     *
+     * @param shhTicketRulesData 票种规则子
+     * @return 结果
+     */
+    public int updateShhTicketRulesData(ShhTicketRulesData shhTicketRulesData);
+
+    /**
+     * 删除票种规则子
+     *
+     * @param id 票种规则子主键
+     * @return 结果
+     */
+    public int deleteShhTicketRulesDataById(Long id);
+
+    /**
+     * 批量删除票种规则子
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteShhTicketRulesDataByIds(Long[] ids);
+}

+ 61 - 0
songhua-system/src/main/java/com/songhua/system/mapper/ShhTicketRulesMapper.java

@@ -0,0 +1,61 @@
+package com.songhua.system.mapper;
+
+import com.songhua.system.domain.ShhTicketRules;
+
+import java.util.List;
+
+/**
+ * 票种规则Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-11-04
+ */
+public interface ShhTicketRulesMapper {
+    /**
+     * 查询票种规则
+     *
+     * @param id 票种规则主键
+     * @return 票种规则
+     */
+    public ShhTicketRules selectShhTicketRulesById(Long id);
+
+    /**
+     * 查询票种规则列表
+     *
+     * @param shhTicketRules 票种规则
+     * @return 票种规则集合
+     */
+    public List<ShhTicketRules> selectShhTicketRulesList(ShhTicketRules shhTicketRules);
+
+    /**
+     * 新增票种规则
+     *
+     * @param shhTicketRules 票种规则
+     * @return 结果
+     */
+    public int insertShhTicketRules(ShhTicketRules shhTicketRules);
+
+    /**
+     * 修改票种规则
+     *
+     * @param shhTicketRules 票种规则
+     * @return 结果
+     */
+    public int updateShhTicketRules(ShhTicketRules shhTicketRules);
+
+    /**
+     * 删除票种规则
+     *
+     * @param id 票种规则主键
+     * @return 结果
+     */
+    public int deleteShhTicketRulesById(Long id);
+
+    /**
+     * 批量删除票种规则
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteShhTicketRulesByIds(Long[] ids);
+}

+ 61 - 0
songhua-system/src/main/java/com/songhua/system/service/IShhTicketRulesDataService.java

@@ -0,0 +1,61 @@
+package com.songhua.system.service;
+
+import com.songhua.system.domain.ShhTicketRulesData;
+
+import java.util.List;
+
+/**
+ * 票种规则子Service接口
+ *
+ * @author ruoyi
+ * @date 2024-11-04
+ */
+public interface IShhTicketRulesDataService {
+    /**
+     * 查询票种规则子
+     *
+     * @param id 票种规则子主键
+     * @return 票种规则子
+     */
+    public ShhTicketRulesData selectShhTicketRulesDataById(Long id);
+
+    /**
+     * 查询票种规则子列表
+     *
+     * @param shhTicketRulesData 票种规则子
+     * @return 票种规则子集合
+     */
+    public List<ShhTicketRulesData> selectShhTicketRulesDataList(ShhTicketRulesData shhTicketRulesData);
+
+    /**
+     * 新增票种规则子
+     *
+     * @param shhTicketRulesData 票种规则子
+     * @return 结果
+     */
+    public int insertShhTicketRulesData(ShhTicketRulesData shhTicketRulesData);
+
+    /**
+     * 修改票种规则子
+     *
+     * @param shhTicketRulesData 票种规则子
+     * @return 结果
+     */
+    public int updateShhTicketRulesData(ShhTicketRulesData shhTicketRulesData);
+
+    /**
+     * 批量删除票种规则子
+     *
+     * @param ids 需要删除的票种规则子主键集合
+     * @return 结果
+     */
+    public int deleteShhTicketRulesDataByIds(Long[] ids);
+
+    /**
+     * 删除票种规则子信息
+     *
+     * @param id 票种规则子主键
+     * @return 结果
+     */
+    public int deleteShhTicketRulesDataById(Long id);
+}

+ 61 - 0
songhua-system/src/main/java/com/songhua/system/service/IShhTicketRulesService.java

@@ -0,0 +1,61 @@
+package com.songhua.system.service;
+
+import com.songhua.system.domain.ShhTicketRules;
+
+import java.util.List;
+
+/**
+ * 票种规则Service接口
+ *
+ * @author ruoyi
+ * @date 2024-11-04
+ */
+public interface IShhTicketRulesService {
+    /**
+     * 查询票种规则
+     *
+     * @param id 票种规则主键
+     * @return 票种规则
+     */
+    public ShhTicketRules selectShhTicketRulesById(Long id);
+
+    /**
+     * 查询票种规则列表
+     *
+     * @param shhTicketRules 票种规则
+     * @return 票种规则集合
+     */
+    public List<ShhTicketRules> selectShhTicketRulesList(ShhTicketRules shhTicketRules);
+
+    /**
+     * 新增票种规则
+     *
+     * @param shhTicketRules 票种规则
+     * @return 结果
+     */
+    public int insertShhTicketRules(ShhTicketRules shhTicketRules);
+
+    /**
+     * 修改票种规则
+     *
+     * @param shhTicketRules 票种规则
+     * @return 结果
+     */
+    public int updateShhTicketRules(ShhTicketRules shhTicketRules);
+
+    /**
+     * 批量删除票种规则
+     *
+     * @param ids 需要删除的票种规则主键集合
+     * @return 结果
+     */
+    public int deleteShhTicketRulesByIds(Long[] ids);
+
+    /**
+     * 删除票种规则信息
+     *
+     * @param id 票种规则主键
+     * @return 结果
+     */
+    public int deleteShhTicketRulesById(Long id);
+}

+ 87 - 0
songhua-system/src/main/java/com/songhua/system/service/impl/ShhTicketRulesDataServiceImpl.java

@@ -0,0 +1,87 @@
+package com.songhua.system.service.impl;
+
+import com.songhua.system.domain.ShhTicketRulesData;
+import com.songhua.system.mapper.ShhTicketRulesDataMapper;
+import com.songhua.system.service.IShhTicketRulesDataService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 票种规则子Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-11-04
+ */
+@Service
+public class ShhTicketRulesDataServiceImpl implements IShhTicketRulesDataService {
+    @Autowired
+    private ShhTicketRulesDataMapper shhTicketRulesDataMapper;
+
+    /**
+     * 查询票种规则子
+     *
+     * @param id 票种规则子主键
+     * @return 票种规则子
+     */
+    @Override
+    public ShhTicketRulesData selectShhTicketRulesDataById(Long id) {
+        return shhTicketRulesDataMapper.selectShhTicketRulesDataById(id);
+    }
+
+    /**
+     * 查询票种规则子列表
+     *
+     * @param shhTicketRulesData 票种规则子
+     * @return 票种规则子
+     */
+    @Override
+    public List<ShhTicketRulesData> selectShhTicketRulesDataList(ShhTicketRulesData shhTicketRulesData) {
+        return shhTicketRulesDataMapper.selectShhTicketRulesDataList(shhTicketRulesData);
+    }
+
+    /**
+     * 新增票种规则子
+     *
+     * @param shhTicketRulesData 票种规则子
+     * @return 结果
+     */
+    @Override
+    public int insertShhTicketRulesData(ShhTicketRulesData shhTicketRulesData) {
+        return shhTicketRulesDataMapper.insertShhTicketRulesData(shhTicketRulesData);
+    }
+
+    /**
+     * 修改票种规则子
+     *
+     * @param shhTicketRulesData 票种规则子
+     * @return 结果
+     */
+    @Override
+    public int updateShhTicketRulesData(ShhTicketRulesData shhTicketRulesData) {
+        return shhTicketRulesDataMapper.updateShhTicketRulesData(shhTicketRulesData);
+    }
+
+    /**
+     * 批量删除票种规则子
+     *
+     * @param ids 需要删除的票种规则子主键
+     * @return 结果
+     */
+    @Override
+    public int deleteShhTicketRulesDataByIds(Long[] ids) {
+        return shhTicketRulesDataMapper.deleteShhTicketRulesDataByIds(ids);
+    }
+
+    /**
+     * 删除票种规则子信息
+     *
+     * @param id 票种规则子主键
+     * @return 结果
+     */
+    @Override
+    public int deleteShhTicketRulesDataById(Long id) {
+        return shhTicketRulesDataMapper.deleteShhTicketRulesDataById(id);
+    }
+}

+ 87 - 0
songhua-system/src/main/java/com/songhua/system/service/impl/ShhTicketRulesServiceImpl.java

@@ -0,0 +1,87 @@
+package com.songhua.system.service.impl;
+
+import com.songhua.system.domain.ShhTicketRules;
+import com.songhua.system.mapper.ShhTicketRulesMapper;
+import com.songhua.system.service.IShhTicketRulesService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 票种规则Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-11-04
+ */
+@Service
+public class ShhTicketRulesServiceImpl implements IShhTicketRulesService {
+    @Autowired
+    private ShhTicketRulesMapper shhTicketRulesMapper;
+
+    /**
+     * 查询票种规则
+     *
+     * @param id 票种规则主键
+     * @return 票种规则
+     */
+    @Override
+    public ShhTicketRules selectShhTicketRulesById(Long id) {
+        return shhTicketRulesMapper.selectShhTicketRulesById(id);
+    }
+
+    /**
+     * 查询票种规则列表
+     *
+     * @param shhTicketRules 票种规则
+     * @return 票种规则
+     */
+    @Override
+    public List<ShhTicketRules> selectShhTicketRulesList(ShhTicketRules shhTicketRules) {
+        return shhTicketRulesMapper.selectShhTicketRulesList(shhTicketRules);
+    }
+
+    /**
+     * 新增票种规则
+     *
+     * @param shhTicketRules 票种规则
+     * @return 结果
+     */
+    @Override
+    public int insertShhTicketRules(ShhTicketRules shhTicketRules) {
+        return shhTicketRulesMapper.insertShhTicketRules(shhTicketRules);
+    }
+
+    /**
+     * 修改票种规则
+     *
+     * @param shhTicketRules 票种规则
+     * @return 结果
+     */
+    @Override
+    public int updateShhTicketRules(ShhTicketRules shhTicketRules) {
+        return shhTicketRulesMapper.updateShhTicketRules(shhTicketRules);
+    }
+
+    /**
+     * 批量删除票种规则
+     *
+     * @param ids 需要删除的票种规则主键
+     * @return 结果
+     */
+    @Override
+    public int deleteShhTicketRulesByIds(Long[] ids) {
+        return shhTicketRulesMapper.deleteShhTicketRulesByIds(ids);
+    }
+
+    /**
+     * 删除票种规则信息
+     *
+     * @param id 票种规则主键
+     * @return 结果
+     */
+    @Override
+    public int deleteShhTicketRulesById(Long id) {
+        return shhTicketRulesMapper.deleteShhTicketRulesById(id);
+    }
+}

+ 64 - 0
songhua-system/src/main/resources/mapper/system/ShhTicketRulesDataMapper.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.songhua.system.mapper.ShhTicketRulesDataMapper">
+
+    <resultMap type="ShhTicketRulesData" id="ShhTicketRulesDataResult">
+        <result property="id" column="id"/>
+        <result property="rulesId" column="rules_id"/>
+        <result property="ticketId" column="ticket_id"/>
+    </resultMap>
+
+    <sql id="selectShhTicketRulesDataVo">
+        select id, rules_id, ticket_id
+        from shh_ticket_rules_data
+    </sql>
+
+    <select id="selectShhTicketRulesDataList" parameterType="ShhTicketRulesData" resultMap="ShhTicketRulesDataResult">
+        <include refid="selectShhTicketRulesDataVo"/>
+        <where>
+            <if test="rulesId != null ">and rules_id = #{rulesId}</if>
+            <if test="ticketId != null ">and ticket_id = #{ticketId}</if>
+        </where>
+    </select>
+
+    <select id="selectShhTicketRulesDataById" parameterType="Long" resultMap="ShhTicketRulesDataResult">
+        <include refid="selectShhTicketRulesDataVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertShhTicketRulesData" parameterType="ShhTicketRulesData" useGeneratedKeys="true" keyProperty="id">
+        insert into shh_ticket_rules_data
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="rulesId != null">rules_id,</if>
+            <if test="ticketId != null">ticket_id,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="rulesId != null">#{rulesId},</if>
+            <if test="ticketId != null">#{ticketId},</if>
+        </trim>
+    </insert>
+
+    <update id="updateShhTicketRulesData" parameterType="ShhTicketRulesData">
+        update shh_ticket_rules_data
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="rulesId != null">rules_id = #{rulesId},</if>
+            <if test="ticketId != null">ticket_id = #{ticketId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteShhTicketRulesDataById" parameterType="Long">
+        delete
+        from shh_ticket_rules_data
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteShhTicketRulesDataByIds" parameterType="String">
+        delete from shh_ticket_rules_data where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 57 - 0
songhua-system/src/main/resources/mapper/system/ShhTicketRulesMapper.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.songhua.system.mapper.ShhTicketRulesMapper">
+    
+    <resultMap type="ShhTicketRules" id="ShhTicketRulesResult">
+        <result property="id"    column="id"    />
+        <result property="ticketRules"    column="ticket_rules"    />
+    </resultMap>
+
+    <sql id="selectShhTicketRulesVo">
+        select id, ticket_rules
+        from shh_ticket_rules
+    </sql>
+
+    <select id="selectShhTicketRulesList" parameterType="ShhTicketRules" resultMap="ShhTicketRulesResult">
+        <include refid="selectShhTicketRulesVo"/>
+        <where>  
+            <if test="ticketRules != null  and ticketRules != ''"> and ticket_rules = #{ticketRules}</if>
+        </where>
+    </select>
+    
+    <select id="selectShhTicketRulesById" parameterType="Long" resultMap="ShhTicketRulesResult">
+        <include refid="selectShhTicketRulesVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertShhTicketRules" parameterType="ShhTicketRules" useGeneratedKeys="true" keyProperty="id">
+        insert into shh_ticket_rules
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="ticketRules != null">ticket_rules,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="ticketRules != null">#{ticketRules},</if>
+         </trim>
+    </insert>
+
+    <update id="updateShhTicketRules" parameterType="ShhTicketRules">
+        update shh_ticket_rules
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="ticketRules != null">ticket_rules = #{ticketRules},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteShhTicketRulesById" parameterType="Long">
+        delete from shh_ticket_rules where id = #{id}
+    </delete>
+
+    <delete id="deleteShhTicketRulesByIds" parameterType="String">
+        delete from shh_ticket_rules where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 44 - 0
songhua-ui/src/api/system/ticketRules.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询票种规则列表
+export function listRules(query) {
+  return request({
+    url: '/ticket/rules/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询票种规则详细
+export function getRules(id) {
+  return request({
+    url: '/ticket/rules/' + id,
+    method: 'get'
+  })
+}
+
+// 新增票种规则
+export function addRules(data) {
+  return request({
+    url: '/ticket/rules',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改票种规则
+export function updateRules(data) {
+  return request({
+    url: '/ticket/rules',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除票种规则
+export function delRules(id) {
+  return request({
+    url: '/ticket/rules/' + id,
+    method: 'delete'
+  })
+}

+ 246 - 0
songhua-ui/src/views/system/ticketRules/index.vue

@@ -0,0 +1,246 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="票务规则名称" prop="ticketRules">
+        <el-input
+          v-model="queryParams.ticketRules"
+          placeholder="请输入票务规则名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+        >新增
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+        >修改
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+        >导出
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="rulesList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="序号" align="center" type="index"/>
+      <el-table-column label="票务规则名称" align="center" prop="ticketRules"/>
+      <el-table-column label="票种名称" align="center" prop="ticketRules"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+          >修改
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+          >删除
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改票种规则对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="票务规则名称" prop="ticketRules">
+          <el-input v-model="form.ticketRules" placeholder="请输入票务规则名称"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {listRules, getRules, delRules, addRules, updateRules} from "@/api/system/ticketRules";
+
+export default {
+  name: "Rules",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 票种规则表格数据
+      rulesList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        ticketRules: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {}
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询票种规则列表 */
+    getList() {
+      this.loading = true;
+      listRules(this.queryParams).then(response => {
+        this.rulesList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        ticketRules: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加票种规则";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getRules(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改票种规则";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateRules(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addRules(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除票种规则编号为"' + ids + '"的数据项?').then(function () {
+        return delRules(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/rules/export', {
+        ...this.queryParams
+      }, `rules_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>