教育训练处考试制证系统后端
heheng
2025-01-17 98c94b182ebbd0b17c82926a90cd042f37760e65
特种作业缴费版本
已修改8个文件
已添加8个文件
830 ■■■■■ 文件已修改
exam-system/src/main/java/com/gkhy/exam/pay/controller/NonCoalCategoryController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/controller/NonCoalPayController.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/dto/rep/NonCoalPayCategoryRepDto.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/dto/rep/NonCoalPayRepDto.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/dto/req/NonCoalPayCategoryReqDto.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/dto/req/NonCoalPayReqDto.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/entity/NonCoalPay.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/entity/NonCoalPayCategory.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/entity/NonCoalPayStudent.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/NonCoalPayCategoryService.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/NonCoalPayService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/NonCoalPayStudentService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayCategoryServiceImpl.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayServiceImpl.java 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayStudentServiceImpl.java 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/resources/mapper/pay/NonCoalPayCategoryMapper.xml 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/controller/NonCoalCategoryController.java
@@ -32,6 +32,7 @@
     * 查询非煤工种类别列表
     */
    @GetMapping("/list")
    @ApiOperation(value = "查询非煤工种类别列表")
    public TableDataInfo list(NonCoalCategory nonCoalCategory) {
        startPage();
        List<NonCoalCategory> list = nonCoalCategoryService.selectNonCoalCategoryList(nonCoalCategory);
exam-system/src/main/java/com/gkhy/exam/pay/controller/NonCoalPayController.java
@@ -1,32 +1,39 @@
package com.gkhy.exam.pay.controller;
import com.gkhy.exam.pay.dto.req.NonCoalPayReqDto;
import com.gkhy.exam.pay.entity.NonCoalPay;
import com.gkhy.exam.pay.service.NonCoalPayService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * 【请填写功能名称】Controller
 * 非煤缴费管理Controller
 *
 * @author hh
 * @date 2025-01-16
 */
@RestController
@RequestMapping("/exam/pay")
@Api(tags = "非煤缴费管理")
@RequestMapping("/pay/nonCoalPay")
public class NonCoalPayController extends BaseController {
    @Autowired
    private NonCoalPayService nonCoalPayService;
    /**
     * 查询【请填写功能名称】列表
     * 查询非煤缴费管理列表
     */
    @GetMapping("/list")
    @ApiOperation(value = "查询非煤缴费管理列表")
    public TableDataInfo list(NonCoalPay nonCoalPay) {
        startPage();
        List<NonCoalPay> list = nonCoalPayService.selectNonCoalPayList(nonCoalPay);
@@ -34,47 +41,51 @@
    }
    /**
     * 导出【请填写功能名称】列表
     * 导出非煤缴费管理列表
     */
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, NonCoalPay nonCoalPay) {
//        List<NonCoalPay> list = nonCoalPayService.selectNonCoalPayList(nonCoalPay);
//        ExcelUtil<NonCoalPay> util = new ExcelUtil<NonCoalPay>(NonCoalPay.class);
//        util.exportExcel(response, list, "【请填写功能名称】数据");
//        util.exportExcel(response, list, "非煤缴费管理数据");
//    }
    /**
     * 获取【请填写功能名称】详细信息
     * 获取非煤缴费管理详细信息
     */
    @GetMapping(value = "/{id}")
    @ApiOperation(value = "获取非煤缴费管理详细信息", httpMethod = "GET")
    @ApiImplicitParam(name = "id", dataTypeClass = Long.class, value = "id", required = true)
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(nonCoalPayService.selectNonCoalPayById(id));
    }
    /**
     * 新增【请填写功能名称】
     * 新增非煤缴费管理
     */
    @PostMapping
    public AjaxResult add(@RequestBody NonCoalPay nonCoalPay) {
    @PostMapping("/add")
    @ApiOperation(value = "新增非煤缴费管理")
    public AjaxResult add(@Validated @RequestBody NonCoalPayReqDto nonCoalPay) {
        return toAjax(nonCoalPayService.insertNonCoalPay(nonCoalPay));
    }
    /**
     * 修改【请填写功能名称】
     * 修改非煤缴费管理
     */
    @PutMapping
    public AjaxResult edit(@RequestBody NonCoalPay nonCoalPay) {
    @PostMapping("/edit")
    @ApiOperation(value = "修改非煤缴费管理")
    public AjaxResult edit(@Validated @RequestBody NonCoalPayReqDto nonCoalPay) {
        return toAjax(nonCoalPayService.updateNonCoalPay(nonCoalPay));
    }
    /**
     * 删除【请填写功能名称】
     * 删除非煤缴费管理
     */
    @DeleteMapping("/{ids}")
    @ApiOperation(value = "删除非煤缴费管理")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(nonCoalPayService.deleteNonCoalPayByIds(ids));
    }
exam-system/src/main/java/com/gkhy/exam/pay/dto/rep/NonCoalPayCategoryRepDto.java
对比新文件
@@ -0,0 +1,49 @@
package com.gkhy.exam.pay.dto.rep;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
 * 非煤缴费种类关联对象 non_coal_pay_category
 *
 * @author hh
 * @date 2025-01-16
 */
@Data
@ApiModel(value = "非煤缴费种类关联对象返回", description = "非煤缴费种类关联对象返回")
public class NonCoalPayCategoryRepDto implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * $column.columnComment
     */
    private Long id;
    /**
     * $column.columnComment
     */
    @ApiModelProperty("非煤管理id")
    private Long nonCoalPayId;
    /**
     * 类别id
     */
    @ApiModelProperty("类别id")
    private Long categoryId;
    @ApiModelProperty("类别名称")
    private String categoryName;
    /**
     * 类别1理论2实操
     */
    @ApiModelProperty("类别类型id")
    private Long categoryType;
}
exam-system/src/main/java/com/gkhy/exam/pay/dto/rep/NonCoalPayRepDto.java
对比新文件
@@ -0,0 +1,97 @@
package com.gkhy.exam.pay.dto.rep;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
 * 【请填写功能名称】对象 non_coal_pay
 *
 * @author hh
 * @date 2025-01-16
 */
@ApiModel(value = "非煤缴费管理对象详情", description = "非煤缴费管理对象详情")
@Data
public class NonCoalPayRepDto implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * $column.columnComment
     */
    private Long id;
    /**
     * 批次名称
     */
    @ApiModelProperty("批次名称")
    private String batchName;
    /**
     * 考试点
     */
    @ApiModelProperty("考试点")
    private Long deptId;
    @ApiModelProperty("考试点名称")
    private String deptName;
    /**
     * 地州code
     */
    @ApiModelProperty("地州")
    private String districtCode;
    @ApiModelProperty("地州名称")
    private String districtName;
    /**
     * 缴费类型1初训理论2初训实操3初训理论与实操4复训理论
     */
    @ApiModelProperty("缴费类型1初训理论2初训实操3初训理论与实操4复训理论")
    private Long payType;
    /**
     * 金额
     */
    @ApiModelProperty("金额")
    private BigDecimal amount;
    /**
     * 年份
     */
    @ApiModelProperty("年份")
    private String year;
    /**
     * 季度1一季度2二季度3三季度4四季度
     */
    @ApiModelProperty("季度")
    private Long quarter;
//
//    /**
//     * 交款人类型1个人2团体
//     */
//    @ApiModelProperty("交款人类型")
//    private Integer payPersonType;
//
//    /**
//     * 缴款单位名称
//     */
//    @ApiModelProperty("缴款单位证件号")
//    private String payCompanyName;
//
//    /**
//     * 缴款单位证件号
//     */
//    @ApiModelProperty("缴款单位证件号")
//    private String payCompanyCard;
    @ApiModelProperty("非煤类别种类")
    private List<NonCoalPayCategoryRepDto> nonCoalPayCategoryList;
}
exam-system/src/main/java/com/gkhy/exam/pay/dto/req/NonCoalPayCategoryReqDto.java
对比新文件
@@ -0,0 +1,50 @@
package com.gkhy.exam.pay.dto.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
 * 非煤缴费种类关联对象 non_coal_pay_category
 *
 * @author hh
 * @date 2025-01-16
 */
@Data
@ApiModel(value = "非煤缴费种类关联对象Dto", description = "非煤缴费种类关联对象Dto")
public class NonCoalPayCategoryReqDto implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * $column.columnComment
     */
    private Long id;
    /**
     * $column.columnComment
     */
    @NotNull(message = "参数不能为空")
    @ApiModelProperty("非煤管理id")
    private Long nonCoalPayId;
    /**
     * 类别id
     */
    @NotNull(message = "类别不能为空")
    @ApiModelProperty("类别id")
    private Long categoryId;
    /**
     * 类别1理论2实操
     */
    @NotNull(message = "类别类型不能为空")
    @ApiModelProperty("类别类型id")
    private Long categoryType;
}
exam-system/src/main/java/com/gkhy/exam/pay/dto/req/NonCoalPayReqDto.java
对比新文件
@@ -0,0 +1,101 @@
package com.gkhy.exam.pay.dto.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
 * 【请填写功能名称】对象 non_coal_pay
 *
 * @author hh
 * @date 2025-01-16
 */
@ApiModel(value = "非煤缴费管理对象dto", description = "非煤缴费管理对象dto")
@Data
public class NonCoalPayReqDto implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * $column.columnComment
     */
    private Long id;
    /**
     * 批次名称
     */
    @NotBlank(message = "批次名称不能为空")
    @ApiModelProperty("批次名称")
    private String batchName;
    /**
     * 考试点
     */
    @NotNull(message = "考试点不能为空")
    @ApiModelProperty("考试点")
    private Long deptId;
    /**
     * 地州code
     */
    @NotBlank(message = "地州不能为空")
    @ApiModelProperty("地州")
    private String districtCode;
    /**
     * 缴费类型1初训理论2初训实操3初训理论与实操4复训理论
     */
    @NotNull(message = "缴费类型不能为空")
    @ApiModelProperty("缴费类型1初训理论2初训实操3初训理论与实操4复训理论")
    private Long payType;
    /**
     * 金额
     */
    @NotNull(message = "金额不能为空")
    @ApiModelProperty("金额")
    private BigDecimal amount;
    /**
     * 年份
     */
    @NotBlank(message = "年份不能为空")
    @ApiModelProperty("年份")
    private String year;
    /**
     * 季度1一季度2二季度3三季度4四季度
     */
    @NotNull(message = "季度不能为空")
    @ApiModelProperty("季度")
    private Long quarter;
    /**
     * 交款人类型1个人2团体
     */
    @NotNull(message = "交款人类型不能为空")
    @ApiModelProperty("交款人类型")
    private Integer payPersonType;
    /**
     * 缴款单位名称
     */
    @ApiModelProperty("缴款单位证件号")
    private String payCompanyName;
    /**
     * 缴款单位证件号
     */
    @ApiModelProperty("缴款单位证件号")
    private String payCompanyCard;
    @ApiModelProperty("非煤类别种类")
    private List<NonCoalPayCategoryReqDto> nonCoalPayCategoryList;
}
exam-system/src/main/java/com/gkhy/exam/pay/entity/NonCoalPay.java
@@ -5,9 +5,13 @@
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
@@ -18,6 +22,7 @@
 * @date 2025-01-16
 */
@TableName("non_coal_pay")
@ApiModel(value = "非煤缴费管理对象", description = "非煤缴费管理对象")
public class NonCoalPay extends BaseEntity {
    private static final long serialVersionUID = 1L;
@@ -31,65 +36,84 @@
     * 批次名称
     */
    @Excel(name = "批次名称")
    @NotBlank(message = "批次名称不能为空")
    @ApiModelProperty("批次名称")
    private String batchName;
    /**
     * 考试点
     */
    @Excel(name = "考试点")
    @NotNull(message = "考试点不能为空")
    @ApiModelProperty("考试点")
    private Long deptId;
    /**
     * 地州code
     */
    @Excel(name = "地州code")
    @NotBlank(message = "地州不能为空")
    @ApiModelProperty("地州")
    private String districtCode;
    /**
     * 缴费类型1初训理论2初训实操3初训理论与实操4复训理论
     */
    @Excel(name = "缴费类型1初训理论2初训实操3初训理论与实操4复训理论")
    @NotNull(message = "缴费类型不能为空")
    @ApiModelProperty("缴费类型")
    private Long payType;
    /**
     * 金额
     */
    @Excel(name = "金额")
    @NotNull(message = "金额不能为空")
    @ApiModelProperty("金额")
    private BigDecimal amount;
    /**
     * 年份
     */
    @Excel(name = "年份")
    @NotBlank(message = "年份不能为空")
    @ApiModelProperty("年份")
    private String year;
    /**
     * 季度1一季度2二季度3三季度4四季度
     */
    @Excel(name = "季度1一季度2二季度3三季度4四季度")
    @NotNull(message = "季度不能为空")
    @ApiModelProperty("季度")
    private Long quarter;
    /**
     * 交款人类型1个人2团体
     */
    @Excel(name = "交款人类型1个人2团体")
    @NotNull(message = "交款人类型不能为空")
    @ApiModelProperty("交款人类型")
    private Integer payPersonType;
    /**
     * 缴款单位名称
     */
    @Excel(name = "缴款单位名称")
    @ApiModelProperty("缴款单位证件号")
    private String payCompanyName;
    /**
     * 缴款单位证件号
     */
    @Excel(name = "缴款单位证件号")
    @ApiModelProperty("缴款单位证件号")
    private String payCompanyCard;
    /**
     * 删除标志(0代表存在2代表删除)
     */
    @ApiModelProperty(value = "删除标志", hidden = true)
    private Integer delFlag;
    public void setId(Long id) {
exam-system/src/main/java/com/gkhy/exam/pay/entity/NonCoalPayCategory.java
@@ -5,8 +5,12 @@
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.NotNull;
/**
@@ -16,6 +20,7 @@
 * @date 2025-01-16
 */
@TableName("non_coal_pay_category")
@ApiModel(value = "非煤缴费种类关联对象", description = "非煤缴费种类关联对象")
public class NonCoalPayCategory extends BaseEntity {
    private static final long serialVersionUID = 1L;
@@ -29,18 +34,24 @@
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    @NotNull(message = "参数不能为空")
    @ApiModelProperty("非煤管理id")
    private Long nonCoalPayId;
    /**
     * 类别id
     */
    @Excel(name = "类别id")
    @NotNull(message = "类别不能为空")
    @ApiModelProperty("类别id")
    private Long categoryId;
    /**
     * 类别1理论2实操
     */
    @Excel(name = "类别1理论2实操")
    @NotNull(message = "类别类型不能为空")
    @ApiModelProperty("类别类型id")
    private Long categoryType;
    /**
exam-system/src/main/java/com/gkhy/exam/pay/entity/NonCoalPayStudent.java
@@ -5,17 +5,23 @@
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
 * 【请填写功能名称】对象 non_coal_pay_student
 * 非煤缴费管理学员对象 non_coal_pay_student
 *
 * @author hh
 * @date 2025-01-16
 */
@TableName("non_coal_pay_student")
@ApiModel(value = "非煤缴费管理学员对象", description = "非煤缴费管理学员对象")
public class NonCoalPayStudent extends BaseEntity {
    private static final long serialVersionUID = 1L;
@@ -29,42 +35,53 @@
     * 缴费id
     */
    @Excel(name = "缴费id")
    @NotNull(message = "参数不能为空")
    @ApiModelProperty("缴费管理id")
    private Long nonCoalPayId;
    /**
     * 姓名
     */
    @Excel(name = "姓名")
    @NotBlank(message = "姓名不能为空")
    @ApiModelProperty("姓名")
    private String name;
    /**
     * 身份证号
     */
    @Excel(name = "身份证号")
    @NotBlank(message = "身份证号不能为空")
    @ApiModelProperty("身份证号")
    private String idCard;
    /**
     * 电话
     */
    @Excel(name = "电话")
    @NotBlank(message = "电话不能为空")
    @ApiModelProperty("电话")
    private String phone;
    /**
     * 0男 1女 2未知
     */
    @Excel(name = "0男 1女 2未知")
    @ApiModelProperty("性别")
    private Long sex;
    /**
     * 财政缴款码
     */
    @Excel(name = "财政缴款码")
    @ApiModelProperty("财政缴款码")
    private String payCode;
    /**
     * 是否缴款0否1是
     */
    @Excel(name = "是否缴款0否1是")
    @ApiModelProperty("是否缴款")
    private Long payStatus;
    /**
exam-system/src/main/java/com/gkhy/exam/pay/service/NonCoalPayCategoryService.java
对比新文件
@@ -0,0 +1,64 @@
package com.gkhy.exam.pay.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gkhy.exam.pay.entity.NonCoalPayCategory;
import java.util.List;
/**
 * 非煤缴费种类关联Service接口
 *
 * @author hh
 * @date 2025-01-16
 */
public interface NonCoalPayCategoryService extends IService<NonCoalPayCategory> {
    /**
     * 查询非煤缴费种类关联
     *
     * @param id 非煤缴费种类关联主键
     * @return 非煤缴费种类关联
     */
    public NonCoalPayCategory selectNonCoalPayCategoryById(Long id);
    int saveBacth(List<NonCoalPayCategory> list);
    /**
     * 查询非煤缴费种类关联列表
     *
     * @param nonCoalPayCategory 非煤缴费种类关联
     * @return 非煤缴费种类关联集合
     */
    public List<NonCoalPayCategory> selectNonCoalPayCategoryList(NonCoalPayCategory nonCoalPayCategory);
    /**
     * 新增非煤缴费种类关联
     *
     * @param nonCoalPayCategory 非煤缴费种类关联
     * @return 结果
     */
    public int insertNonCoalPayCategory(NonCoalPayCategory nonCoalPayCategory);
    /**
     * 修改非煤缴费种类关联
     *
     * @param nonCoalPayCategory 非煤缴费种类关联
     * @return 结果
     */
    public int updateNonCoalPayCategory(NonCoalPayCategory nonCoalPayCategory);
    /**
     * 批量删除非煤缴费种类关联
     *
     * @param ids 需要删除的非煤缴费种类关联主键集合
     * @return 结果
     */
    public int deleteNonCoalPayCategoryByIds(Long[] ids);
    /**
     * 删除非煤缴费种类关联信息
     *
     * @param id 非煤缴费种类关联主键
     * @return 结果
     */
    public int deleteNonCoalPayCategoryByPayId(Long id);
}
exam-system/src/main/java/com/gkhy/exam/pay/service/NonCoalPayService.java
@@ -1,8 +1,10 @@
package com.gkhy.exam.pay.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gkhy.exam.pay.dto.req.NonCoalPayReqDto;
import com.gkhy.exam.pay.entity.NonCoalPay;
import java.util.List;
/**
 * 【请填写功能名称】Service接口
@@ -33,7 +35,7 @@
     * @param nonCoalPay 【请填写功能名称】
     * @return 结果
     */
    public int insertNonCoalPay(NonCoalPay nonCoalPay);
    public int insertNonCoalPay(NonCoalPayReqDto nonCoalPay);
    /**
     * 修改【请填写功能名称】
@@ -41,7 +43,7 @@
     * @param nonCoalPay 【请填写功能名称】
     * @return 结果
     */
    public int updateNonCoalPay(NonCoalPay nonCoalPay);
    public int updateNonCoalPay(NonCoalPayReqDto nonCoalPay);
    /**
     * 批量删除【请填写功能名称】
exam-system/src/main/java/com/gkhy/exam/pay/service/NonCoalPayStudentService.java
对比新文件
@@ -0,0 +1,62 @@
package com.gkhy.exam.pay.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gkhy.exam.pay.entity.NonCoalPayStudent;
import java.util.List;
/**
 * 【请填写功能名称】Service接口
 *
 * @author hh
 * @date 2025-01-16
 */
public interface NonCoalPayStudentService extends IService<NonCoalPayStudent> {
    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    public NonCoalPayStudent selectNonCoalPayStudentById(Long id);
    /**
     * 查询【请填写功能名称】列表
     *
     * @param nonCoalPayStudent 【请填写功能名称】
     * @return 【请填写功能名称】集合
     */
    public List<NonCoalPayStudent> selectNonCoalPayStudentList(NonCoalPayStudent nonCoalPayStudent);
    /**
     * 新增【请填写功能名称】
     *
     * @param nonCoalPayStudent 【请填写功能名称】
     * @return 结果
     */
    public int insertNonCoalPayStudent(NonCoalPayStudent nonCoalPayStudent);
    /**
     * 修改【请填写功能名称】
     *
     * @param nonCoalPayStudent 【请填写功能名称】
     * @return 结果
     */
    public int updateNonCoalPayStudent(NonCoalPayStudent nonCoalPayStudent);
    /**
     * 批量删除【请填写功能名称】
     *
     * @param ids 需要删除的【请填写功能名称】主键集合
     * @return 结果
     */
    public int deleteNonCoalPayStudentByIds(Long[] ids);
    /**
     * 删除【请填写功能名称】信息
     *
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    public int deleteNonCoalPayStudentById(Long id);
}
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayCategoryServiceImpl.java
对比新文件
@@ -0,0 +1,97 @@
package com.gkhy.exam.pay.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.exam.pay.entity.NonCoalPayCategory;
import com.gkhy.exam.pay.mapper.NonCoalPayCategoryMapper;
import com.gkhy.exam.pay.service.NonCoalPayCategoryService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
 * 非煤缴费种类关联Service业务层处理
 *
 * @author hh
 * @date 2025-01-16
 */
@Service
public class NonCoalPayCategoryServiceImpl extends ServiceImpl<NonCoalPayCategoryMapper, NonCoalPayCategory> implements NonCoalPayCategoryService {
    @Resource
    private NonCoalPayCategoryMapper nonCoalPayCategoryMapper;
    /**
     * 查询非煤缴费种类关联
     *
     * @param id 非煤缴费种类关联主键
     * @return 非煤缴费种类关联
     */
    @Override
    public NonCoalPayCategory selectNonCoalPayCategoryById(Long id) {
        return nonCoalPayCategoryMapper.selectNonCoalPayCategoryById(id);
    }
    @Override
    public int saveBacth(List<NonCoalPayCategory> list) {
        return saveBacth(list);
    }
    /**
     * 查询非煤缴费种类关联列表
     *
     * @param nonCoalPayCategory 非煤缴费种类关联
     * @return 非煤缴费种类关联
     */
    @Override
    public List<NonCoalPayCategory> selectNonCoalPayCategoryList(NonCoalPayCategory nonCoalPayCategory) {
        return nonCoalPayCategoryMapper.selectNonCoalPayCategoryList(nonCoalPayCategory);
    }
    /**
     * 新增非煤缴费种类关联
     *
     * @param nonCoalPayCategory 非煤缴费种类关联
     * @return 结果
     */
    @Override
    public int insertNonCoalPayCategory(NonCoalPayCategory nonCoalPayCategory) {
        nonCoalPayCategory.setCreateTime(DateUtils.getNowDate());
        return nonCoalPayCategoryMapper.insertNonCoalPayCategory(nonCoalPayCategory);
    }
    /**
     * 修改非煤缴费种类关联
     *
     * @param nonCoalPayCategory 非煤缴费种类关联
     * @return 结果
     */
    @Override
    public int updateNonCoalPayCategory(NonCoalPayCategory nonCoalPayCategory) {
        nonCoalPayCategory.setUpdateTime(DateUtils.getNowDate());
        return nonCoalPayCategoryMapper.updateNonCoalPayCategory(nonCoalPayCategory);
    }
    /**
     * 批量删除非煤缴费种类关联
     *
     * @param ids 需要删除的非煤缴费种类关联主键
     * @return 结果
     */
    @Override
    public int deleteNonCoalPayCategoryByIds(Long[] ids) {
        return nonCoalPayCategoryMapper.deleteNonCoalPayCategoryByIds(ids);
    }
    /**
     * 删除非煤缴费种类关联信息
     *
     * @param id 非煤缴费种类关联主键
     * @return 结果
     */
    @Override
    public int deleteNonCoalPayCategoryByPayId(Long id) {
        return nonCoalPayCategoryMapper.deleteNonCoalPayCategoryById(id);
    }
}
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayServiceImpl.java
@@ -1,13 +1,21 @@
package com.gkhy.exam.pay.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.exam.pay.dto.req.NonCoalPayCategoryReqDto;
import com.gkhy.exam.pay.dto.req.NonCoalPayReqDto;
import com.gkhy.exam.pay.entity.NonCoalPay;
import com.gkhy.exam.pay.entity.NonCoalPayCategory;
import com.gkhy.exam.pay.mapper.NonCoalPayMapper;
import com.gkhy.exam.pay.service.NonCoalPayCategoryService;
import com.gkhy.exam.pay.service.NonCoalPayService;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@@ -21,6 +29,8 @@
public class NonCoalPayServiceImpl extends ServiceImpl<NonCoalPayMapper, NonCoalPay> implements NonCoalPayService {
    @Resource
    private NonCoalPayMapper nonCoalPayMapper;
    @Resource
    private NonCoalPayCategoryService nonCoalPayCategoryService;
    /**
     * 查询【请填写功能名称】
@@ -32,6 +42,7 @@
    public NonCoalPay selectNonCoalPayById(Long id) {
        return nonCoalPayMapper.selectNonCoalPayById(id);
    }
    /**
     * 查询【请填写功能名称】列表
@@ -51,9 +62,29 @@
     * @return 结果
     */
    @Override
    public int insertNonCoalPay(NonCoalPay nonCoalPay) {
        nonCoalPay.setCreateTime(DateUtils.getNowDate());
        return nonCoalPayMapper.insertNonCoalPay(nonCoalPay);
    @Transactional
    public int insertNonCoalPay(NonCoalPayReqDto nonCoalPay) {
        //todo 校验
        NonCoalPay nonCoalPay1 = new NonCoalPay();
        BeanUtils.copyProperties(nonCoalPay, nonCoalPay1);
        nonCoalPay1.setCreateBy(SecurityUtils.getUsername());
        int i = nonCoalPayMapper.insertNonCoalPay(nonCoalPay1);
        if (i > 0) {
            saveNonCoalPayCategory(nonCoalPay.getNonCoalPayCategoryList());
        }
        return i;
    }
    private void saveNonCoalPayCategory(List<NonCoalPayCategoryReqDto> nonCoalPayCategoryList) {
        List<NonCoalPayCategory> nonCoalPayCategories = new ArrayList<>();
        for (NonCoalPayCategoryReqDto nonCoalPayCategory : nonCoalPayCategoryList) {
            NonCoalPayCategory nonCoalPayCategory1 = new NonCoalPayCategory();
            BeanUtils.copyProperties(nonCoalPayCategory, nonCoalPayCategory1);
            nonCoalPayCategory1.setCreateBy(SecurityUtils.getUsername());
            nonCoalPayCategories.add(nonCoalPayCategory1);
        }
        nonCoalPayCategoryService.saveBacth(nonCoalPayCategories);
    }
    /**
@@ -63,9 +94,21 @@
     * @return 结果
     */
    @Override
    public int updateNonCoalPay(NonCoalPay nonCoalPay) {
        nonCoalPay.setUpdateTime(DateUtils.getNowDate());
        return nonCoalPayMapper.updateNonCoalPay(nonCoalPay);
    @Transactional
    public int updateNonCoalPay(NonCoalPayReqDto nonCoalPay) {
        //todo 校验
        NonCoalPay nonCoalPay1 = new NonCoalPay();
        BeanUtils.copyProperties(nonCoalPay, nonCoalPay1);
        nonCoalPay1.setUpdateBy(SecurityUtils.getUsername());
        int i = nonCoalPayMapper.updateNonCoalPay(nonCoalPay1);
        if (i > 0) {
            int i1 = nonCoalPayCategoryService.deleteNonCoalPayCategoryByPayId(nonCoalPay.getId());
            if (i1 < 1) {
                throw new ServiceException("更新失败");
            }
            saveNonCoalPayCategory(nonCoalPay.getNonCoalPayCategoryList());
        }
        return i;
    }
    /**
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayStudentServiceImpl.java
对比新文件
@@ -0,0 +1,92 @@
package com.gkhy.exam.pay.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.exam.pay.entity.NonCoalPayStudent;
import com.gkhy.exam.pay.mapper.NonCoalPayStudentMapper;
import com.gkhy.exam.pay.service.NonCoalPayStudentService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author hh
 * @date 2025-01-16
 */
@Service
public class NonCoalPayStudentServiceImpl extends ServiceImpl<NonCoalPayStudentMapper, NonCoalPayStudent> implements NonCoalPayStudentService {
    @Resource
    private NonCoalPayStudentMapper nonCoalPayStudentMapper;
    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public NonCoalPayStudent selectNonCoalPayStudentById(Long id) {
        return nonCoalPayStudentMapper.selectNonCoalPayStudentById(id);
    }
    /**
     * 查询【请填写功能名称】列表
     *
     * @param nonCoalPayStudent 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<NonCoalPayStudent> selectNonCoalPayStudentList(NonCoalPayStudent nonCoalPayStudent) {
        return nonCoalPayStudentMapper.selectNonCoalPayStudentList(nonCoalPayStudent);
    }
    /**
     * 新增【请填写功能名称】
     *
     * @param nonCoalPayStudent 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertNonCoalPayStudent(NonCoalPayStudent nonCoalPayStudent) {
        nonCoalPayStudent.setCreateTime(DateUtils.getNowDate());
        return nonCoalPayStudentMapper.insertNonCoalPayStudent(nonCoalPayStudent);
    }
    /**
     * 修改【请填写功能名称】
     *
     * @param nonCoalPayStudent 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateNonCoalPayStudent(NonCoalPayStudent nonCoalPayStudent) {
        nonCoalPayStudent.setUpdateTime(DateUtils.getNowDate());
        return nonCoalPayStudentMapper.updateNonCoalPayStudent(nonCoalPayStudent);
    }
    /**
     * 批量删除【请填写功能名称】
     *
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteNonCoalPayStudentByIds(Long[] ids) {
        return nonCoalPayStudentMapper.deleteNonCoalPayStudentByIds(ids);
    }
    /**
     * 删除【请填写功能名称】信息
     *
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteNonCoalPayStudentById(Long id) {
        return nonCoalPayStudentMapper.deleteNonCoalPayStudentById(id);
    }
}
exam-system/src/main/resources/mapper/pay/NonCoalPayCategoryMapper.xml
@@ -1,34 +1,43 @@
<?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">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gkhy.exam.pay.mapper.NonCoalPayCategoryMapper">
    <resultMap type="NonCoalPayCategory" id="NonCoalPayCategoryResult">
        <result property="id"    column="id"    />
        <result property="nonCoalPayId"    column="non_coal_pay_id"    />
        <result property="categoryId"    column="category_id"    />
        <result property="categoryType"    column="category_type"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="id" column="id"/>
        <result property="nonCoalPayId" column="non_coal_pay_id"/>
        <result property="categoryId" column="category_id"/>
        <result property="categoryType" column="category_type"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="delFlag" column="del_flag"/>
    </resultMap>
    <sql id="selectNonCoalPayCategoryVo">
        select id, non_coal_pay_id, category_id, category_type, update_by, update_time, create_by, create_time, del_flag from non_coal_pay_category
        select id,
               non_coal_pay_id,
               category_id,
               category_type,
               update_by,
               update_time,
               create_by,
               create_time,
               del_flag
        from non_coal_pay_category
    </sql>
    <select id="selectNonCoalPayCategoryList" parameterType="NonCoalPayCategory" resultMap="NonCoalPayCategoryResult">
        <include refid="selectNonCoalPayCategoryVo"/>
        <where>
            <if test="nonCoalPayId != null "> and non_coal_pay_id = #{nonCoalPayId}</if>
            <if test="categoryId != null "> and category_id = #{categoryId}</if>
            <if test="categoryType != null "> and category_type = #{categoryType}</if>
        <where>
            <if test="nonCoalPayId != null ">and non_coal_pay_id = #{nonCoalPayId}</if>
            <if test="categoryId != null ">and category_id = #{categoryId}</if>
            <if test="categoryType != null ">and category_type = #{categoryType}</if>
        </where>
    </select>
    <select id="selectNonCoalPayCategoryById" parameterType="Long" resultMap="NonCoalPayCategoryResult">
        <include refid="selectNonCoalPayCategoryVo"/>
        where id = #{id}
@@ -46,7 +55,7 @@
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="delFlag != null">del_flag,</if>
         </trim>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="nonCoalPayId != null">#{nonCoalPayId},</if>
@@ -57,7 +66,7 @@
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="delFlag != null">#{delFlag},</if>
         </trim>
        </trim>
    </insert>
    <update id="updateNonCoalPayCategory" parameterType="NonCoalPayCategory">
@@ -75,12 +84,14 @@
        where id = #{id}
    </update>
    <delete id="deleteNonCoalPayCategoryById" parameterType="Long">
        delete from non_coal_pay_category where id = #{id}
    </delete>
    <update id="deleteNonCoalPayCategoryById" parameterType="Long">
        update non_coal_pay_category
        set del_flag = 2
        where non_coal_pay_id = #{id}
    </update>
    <delete id="deleteNonCoalPayCategoryByIds" parameterType="String">
        delete from non_coal_pay_category where id in
        delete from non_coal_pay_category where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>