对比新文件 |
| | |
| | | package com.gkhy.exam.pay.controller; |
| | | |
| | | import com.gkhy.exam.pay.entity.CoalCategory; |
| | | import com.gkhy.exam.pay.entity.CoalTicket; |
| | | import com.gkhy.exam.pay.entity.NonCoalCategory; |
| | | import com.gkhy.exam.pay.service.CoalCategoryService; |
| | | 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; |
| | | |
| | | @RestController |
| | | @Api(tags = "煤矿工种类别管理") |
| | | @RequestMapping("/pay/coalCategory") |
| | | public class CoalCategoryController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CoalCategoryService coalCategoryService; |
| | | |
| | | /** |
| | | * 查询煤矿工种类别列表 |
| | | */ |
| | | @PostMapping("/list") |
| | | @ApiOperation(value = "查询煤矿工种类别列表") |
| | | public TableDataInfo list(@RequestBody CoalCategory coalCategory) { |
| | | startPage(); |
| | | List<CoalCategory> list = coalCategoryService.selectCoalCategoryList(coalCategory); |
| | | return getDataTable(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(coalCategoryService.selectCoalCategoryById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增煤矿工种类别 |
| | | */ |
| | | |
| | | @PostMapping("/insert") |
| | | @ApiOperation(value = "新增煤矿工种类别") |
| | | public AjaxResult add(@Validated @RequestBody CoalCategory coalCategory) { |
| | | return toAjax(coalCategoryService.insertCoalCategory(coalCategory)); |
| | | } |
| | | |
| | | /** |
| | | * 修改煤矿工种类别 |
| | | */ |
| | | |
| | | @PostMapping("/update") |
| | | @ApiOperation(value = "修改煤矿工种类别") |
| | | public AjaxResult edit(@RequestBody CoalCategory coalCategory) { |
| | | return toAjax(coalCategoryService.updateCoalCategory(coalCategory)); |
| | | } |
| | | |
| | | /** |
| | | * 删除煤矿工种类别 |
| | | */ |
| | | @PostMapping("/delete") |
| | | @ApiOperation(value = "删除煤矿工种类别") |
| | | public AjaxResult remove(@RequestBody Long[] ids) { |
| | | return toAjax(coalCategoryService.deleteCoalCategoryByIds(ids)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 开票信息保存 |
| | | */ |
| | | @PostMapping("/saveTicket") |
| | | public AjaxResult save(@Validated @RequestBody CoalTicket coalTicket){ |
| | | return toAjax(coalCategoryService.saveCoalTicket(coalTicket)); |
| | | } |
| | | |
| | | /** |
| | | * 开票信息修改 |
| | | */ |
| | | @PostMapping("/updateTicket") |
| | | public AjaxResult updateTicket(@RequestBody CoalTicket coalTicket){ |
| | | return toAjax(coalCategoryService.updateCoalTicket(coalTicket)); |
| | | } |
| | | |
| | | /** |
| | | * 开票信息查询 |
| | | */ |
| | | @PostMapping("/ticketList") |
| | | public AjaxResult ticketList(){ |
| | | return success(coalCategoryService.ticketList()); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.controller; |
| | | |
| | | import com.gkhy.exam.pay.dto.rep.CoalPayRepDto; |
| | | import com.gkhy.exam.pay.dto.rep.CoalPayStudentRep; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayDto; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayReq; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayStudentReq; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayTypeReq; |
| | | import com.gkhy.exam.pay.entity.CoalPayStudent; |
| | | import com.gkhy.exam.pay.service.CoalPayService; |
| | | 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; |
| | | |
| | | @RestController |
| | | @Api(tags = "煤矿缴费批次管理") |
| | | @RequestMapping("/pay/coalPay") |
| | | public class CoalPayController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CoalPayService coalPayService; |
| | | |
| | | /** |
| | | * 查询煤矿缴费管理列表 |
| | | */ |
| | | @PostMapping("/list") |
| | | @ApiOperation(value = "查询煤矿缴费管理列表") |
| | | public TableDataInfo list(@RequestBody CoalPayReq coalPayReq) { |
| | | startPage(); |
| | | List<CoalPayRepDto> list = coalPayService.selectCoalPayList(coalPayReq); |
| | | return getDataTable(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(coalPayService.selectCoalPayById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增煤矿缴费管理 |
| | | */ |
| | | @PostMapping("/insert") |
| | | @ApiOperation(value = "新增煤矿缴费管理") |
| | | public AjaxResult add(@Validated @RequestBody CoalPayDto coalPayDto) { |
| | | return toAjax(coalPayService.insertCoalPay(coalPayDto)); |
| | | } |
| | | |
| | | /** |
| | | * 修改煤矿缴费管理 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperation(value = "修改煤矿缴费管理") |
| | | public AjaxResult edit(@RequestBody CoalPayDto coalPayDto) { |
| | | return toAjax(coalPayService.updateCoalPay(coalPayDto)); |
| | | } |
| | | |
| | | /** |
| | | * 修改煤矿缴费类型 |
| | | */ |
| | | @PostMapping("/updateType") |
| | | @ApiOperation(value = "修改煤矿缴费类型") |
| | | public AjaxResult updateType(@RequestBody CoalPayTypeReq coalPayTypeReq) { |
| | | return toAjax(coalPayService.updateCoalPayType(coalPayTypeReq)); |
| | | } |
| | | |
| | | // /** |
| | | // * 修改煤矿缴费 |
| | | // */ |
| | | // @PostMapping("/updatePayCompany") |
| | | // public AjaxResult updatePay(@RequestBody ){ |
| | | // return toAjax(coalPayService.updatePay()); |
| | | // } |
| | | /** |
| | | * 删除煤矿缴费管理 |
| | | */ |
| | | @PostMapping("/delete") |
| | | @ApiOperation(value = "删除煤矿缴费管理") |
| | | public AjaxResult remove(@RequestBody Long[] ids) { |
| | | return coalPayService.deleteCoalPayByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * 个人缴费接口 |
| | | */ |
| | | @PostMapping("/findStudent") |
| | | @ApiOperation(value ="H5个人缴费查询") |
| | | public AjaxResult findStudent(@RequestBody CoalPayStudentReq coalPayStudent){ |
| | | List<CoalPayStudentRep> coalPayStudentReps = coalPayService.selectCoalPay(coalPayStudent); |
| | | return success(coalPayStudentReps); |
| | | } |
| | | |
| | | |
| | | |
| | | // @PostMapping("/personPay") |
| | | // @ApiOperation(value = "个人缴费接口") |
| | | // public void payFees(){ |
| | | // |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.controller; |
| | | |
| | | import com.gkhy.exam.pay.entity.CoalPayStudent; |
| | | import com.gkhy.exam.pay.service.CoalPayStudentService; |
| | | 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.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Api(tags = "煤矿缴费批次对应学员管理") |
| | | @RequestMapping("/pay/coalPayStudent") |
| | | public class CoalPayStudentController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CoalPayStudentService coalPayStudentService; |
| | | |
| | | /** |
| | | * 缴费批次对应学生 |
| | | */ |
| | | @GetMapping("/studentList/{coalPayId}") |
| | | @ApiOperation(value = "缴费信息对应学员信息") |
| | | public TableDataInfo list(@PathVariable Long coalPayId) { |
| | | startPage(); |
| | | List<CoalPayStudent> list = coalPayStudentService.selectCoalPayStudentList(coalPayId); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 修改相关学生信息 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperation(value = "修改相关学员信息") |
| | | public AjaxResult updateStudent(@RequestBody CoalPayStudent coalPayStudent){ |
| | | return coalPayStudentService.updateByCoalPayStudent(coalPayStudent); |
| | | } |
| | | |
| | | /** |
| | | * 新增相关学生 |
| | | */ |
| | | @PostMapping("/insert") |
| | | @ApiOperation(value = "新增相关学员") |
| | | public AjaxResult insertStudent(@Validated @RequestBody CoalPayStudent coalPayStudent){ |
| | | return toAjax(coalPayStudentService.insertStudent(coalPayStudent)); |
| | | } |
| | | |
| | | /** |
| | | * 删除相关学生 |
| | | */ |
| | | @PostMapping("/delete") |
| | | @ApiOperation(value = "删除对应学员") |
| | | public AjaxResult deleteStudent(@RequestBody Long[] ids){ |
| | | return toAjax(coalPayStudentService.deleteStudent(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 批量导入学生 |
| | | */ |
| | | @PostMapping("/import") |
| | | public AjaxResult uploadStudent(@RequestParam("file") MultipartFile file, @RequestParam("coalPayId") Long coalPayId) { |
| | | try { |
| | | return coalPayStudentService.uploadStudent(file, coalPayId); |
| | | } catch (IOException e) { |
| | | // 处理异常,返回友好的错误消息 |
| | | return AjaxResult.error("学员信息导入失败: " + e.getMessage()); |
| | | } |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.dto.rep; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.gkhy.exam.pay.entity.CoalCategory; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @ApiModel(value = "煤矿缴费管理对象详情", description = "煤矿缴费管理对象详情") |
| | | @Data |
| | | public class CoalPayRepDto implements Serializable { |
| | | private Long id; |
| | | |
| | | /** |
| | | * 批次名称 |
| | | */ |
| | | private String batchName; |
| | | |
| | | /** |
| | | * 考试点 |
| | | */ |
| | | private Long deptId; |
| | | private String deptName; |
| | | |
| | | /** |
| | | * 缴费类型1初训理论2初训实操3初训理论与实操4复训理论 |
| | | */ |
| | | private Long payType; |
| | | |
| | | /** |
| | | * 金额 |
| | | */ |
| | | private BigDecimal amount; |
| | | |
| | | /** |
| | | * 年份 |
| | | */ |
| | | private String year; |
| | | |
| | | /** |
| | | * 季度1一季度2二季度3三季度4四季度 |
| | | */ |
| | | private Long quarter; |
| | | |
| | | /** |
| | | * 交款人类型1个人2团体 |
| | | */ |
| | | private Integer payPersonType; |
| | | |
| | | /** |
| | | * 缴款单位名称 |
| | | */ |
| | | private String payCompanyName; |
| | | |
| | | /** |
| | | * 缴款单位证件号 |
| | | */ |
| | | private String payCompanyCard; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 总学员数量 |
| | | */ |
| | | private Integer totalNum; |
| | | /** |
| | | * 未交费数量 |
| | | */ |
| | | private Integer havePayNum; |
| | | |
| | | private List<CoalCategory> coalCategoryList; |
| | | |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.dto.rep; |
| | | |
| | | import com.gkhy.exam.pay.entity.CoalPay; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class CoalPayStudentRep { |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 缴费id |
| | | */ |
| | | private Long coalPayId; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | @ApiModelProperty("姓名") |
| | | private String name; |
| | | |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | @ApiModelProperty("身份证号") |
| | | private String idCard; |
| | | |
| | | /** |
| | | * 电话 |
| | | */ |
| | | @ApiModelProperty("电话") |
| | | private String phone; |
| | | |
| | | /** |
| | | * 0男 1女 2未知 |
| | | */ |
| | | @ApiModelProperty("性别") |
| | | private Long sex; |
| | | |
| | | /** |
| | | * 财政缴款码 |
| | | */ |
| | | @ApiModelProperty("财政缴款码") |
| | | private String payCode; |
| | | |
| | | /** |
| | | * 是否缴款0否1是 |
| | | */ |
| | | @ApiModelProperty("是否缴款") |
| | | private Long payStatus; |
| | | |
| | | /** |
| | | * 缴费类型1个人 2团体 |
| | | */ |
| | | private Integer payType; |
| | | |
| | | private CoalPayRepDto coalPays; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.dto.req; |
| | | |
| | | import com.gkhy.exam.pay.entity.CoalPayCategory; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | 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; |
| | | |
| | | @ApiModel(value = "煤矿缴费管理对象dto", description = "煤矿缴费管理对象dto") |
| | | @Data |
| | | public class CoalPayDto implements Serializable { |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 批次名称 |
| | | */ |
| | | @NotBlank(message = "批次名称不能为空") |
| | | @ApiModelProperty("批次名称") |
| | | private String batchName; |
| | | |
| | | /** |
| | | * 考试点 |
| | | */ |
| | | @NotNull(message = "考试点不能为空") |
| | | @ApiModelProperty("考试点") |
| | | private Long deptId; |
| | | |
| | | /** |
| | | * 缴费类型1初训理论2初训实操3初训理论与实操4复训理论 |
| | | */ |
| | | @NotNull(message = "缴费类型不能为空") |
| | | @ApiModelProperty("缴费类型") |
| | | 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; |
| | | |
| | | private List<CoalPayCategory> coalPayCategoryies; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.dto.req; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class CoalPayReq { |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date minDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date maxDate; |
| | | private Long deptId; |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.dto.req; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class CoalPayStudentReq { |
| | | |
| | | private String idCard; |
| | | private String phone; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.dto.req; |
| | | |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class CoalPayTypeReq { |
| | | private Long coalPayId; |
| | | private Integer payPersonType; |
| | | private String payCompanyName; |
| | | private String payCompanyCard; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.math.BigDecimal; |
| | | |
| | | |
| | | @TableName("coal_category") |
| | | @ApiModel(value = "煤矿工种类别对象", description = "煤矿工种类别对象") |
| | | public class CoalCategory extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 类别1理论2实操 |
| | | */ |
| | | @Excel(name = "类别1理论2实操") |
| | | @ApiModelProperty("类别1理论2实操") |
| | | @NotNull(message = "类别不能为空") |
| | | private Long categoryType; |
| | | |
| | | /** |
| | | * 科目名称 |
| | | */ |
| | | @Excel(name = "科目名称") |
| | | @NotBlank(message = "科目名称不能为空") |
| | | @ApiModelProperty("科目名称") |
| | | private String subjectName; |
| | | |
| | | |
| | | /** |
| | | * 金额 |
| | | */ |
| | | @Excel(name = "金额") |
| | | @ApiModelProperty("金额") |
| | | @NotNull(message = "金额不能为空") |
| | | private BigDecimal amount; |
| | | |
| | | /** |
| | | * 业务编码 |
| | | */ |
| | | @NotNull(message = "业务编码不可为空") |
| | | private String businessCode; |
| | | |
| | | /** |
| | | * 描述 |
| | | */ |
| | | @Excel(name = "描述") |
| | | private String describe; |
| | | |
| | | /** |
| | | * 删除标志(0代表存在2代表删除) |
| | | */ |
| | | @ApiModelProperty(value = "删除标志", hidden = true) |
| | | private Integer delFlag; |
| | | |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getCategoryType() { |
| | | return categoryType; |
| | | } |
| | | |
| | | public void setCategoryType(Long categoryType) { |
| | | this.categoryType = categoryType; |
| | | } |
| | | |
| | | public String getSubjectName() { |
| | | return subjectName; |
| | | } |
| | | |
| | | public void setSubjectName(String subjectName) { |
| | | this.subjectName = subjectName; |
| | | } |
| | | |
| | | public BigDecimal getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(BigDecimal amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public String getDescribe() { |
| | | return describe; |
| | | } |
| | | |
| | | public void setDescribe(String describe) { |
| | | this.describe = describe; |
| | | } |
| | | |
| | | public String getBusinessCode() { |
| | | return businessCode; |
| | | } |
| | | |
| | | public void setBusinessCode(String businessCode) { |
| | | this.businessCode = businessCode; |
| | | } |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @TableName("coal_pay") |
| | | @ApiModel(value = "煤矿缴费批次对象", description = "煤矿缴费批次对象") |
| | | public class CoalPay implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 批次名称 |
| | | */ |
| | | @Excel(name = "批次名称") |
| | | @NotBlank(message = "批次名称不能为空") |
| | | @ApiModelProperty("批次名称") |
| | | private String batchName; |
| | | |
| | | /** |
| | | * 考试点 |
| | | */ |
| | | @Excel(name = "考试点") |
| | | @NotNull(message = "考试点不能为空") |
| | | @ApiModelProperty("考试点") |
| | | private Long deptId; |
| | | |
| | | /** |
| | | * 缴费类型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; |
| | | |
| | | |
| | | /** 创建者 */ |
| | | private String createBy; |
| | | |
| | | /** 创建时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** 更新者 */ |
| | | private String updateBy; |
| | | |
| | | /** 更新时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 删除标志(0代表存在2代表删除) |
| | | */ |
| | | @ApiModelProperty(value = "删除标志", hidden = true) |
| | | private Integer delFlag; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getBatchName() { |
| | | return batchName; |
| | | } |
| | | |
| | | public void setBatchName(String batchName) { |
| | | this.batchName = batchName; |
| | | } |
| | | |
| | | public Long getDeptId() { |
| | | return deptId; |
| | | } |
| | | |
| | | public void setDeptId(Long deptId) { |
| | | this.deptId = deptId; |
| | | } |
| | | |
| | | public Long getPayType() { |
| | | return payType; |
| | | } |
| | | |
| | | public void setPayType(Long payType) { |
| | | this.payType = payType; |
| | | } |
| | | |
| | | public BigDecimal getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(BigDecimal amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public String getYear() { |
| | | return year; |
| | | } |
| | | |
| | | public void setYear(String year) { |
| | | this.year = year; |
| | | } |
| | | |
| | | public Long getQuarter() { |
| | | return quarter; |
| | | } |
| | | |
| | | public void setQuarter(Long quarter) { |
| | | this.quarter = quarter; |
| | | } |
| | | |
| | | public Integer getPayPersonType() { |
| | | return payPersonType; |
| | | } |
| | | |
| | | public void setPayPersonType(Integer payPersonType) { |
| | | this.payPersonType = payPersonType; |
| | | } |
| | | |
| | | public String getPayCompanyName() { |
| | | return payCompanyName; |
| | | } |
| | | |
| | | public void setPayCompanyName(String payCompanyName) { |
| | | this.payCompanyName = payCompanyName; |
| | | } |
| | | |
| | | public String getPayCompanyCard() { |
| | | return payCompanyCard; |
| | | } |
| | | |
| | | public void setPayCompanyCard(String payCompanyCard) { |
| | | this.payCompanyCard = payCompanyCard; |
| | | } |
| | | |
| | | public String getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public void setCreateBy(String createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public void setUpdateBy(String updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | 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 javax.validation.constraints.NotNull; |
| | | |
| | | @TableName("coal_pay_category") |
| | | @ApiModel(value = "煤矿缴费批次关联工种",description = "煤矿缴费批次关联工种") |
| | | public class CoalPayCategory extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | // @NotNull(message = "参数不能为空") |
| | | @ApiModelProperty("非煤管理id") |
| | | private Long coalPayId; |
| | | |
| | | /** |
| | | * 类别id |
| | | */ |
| | | @Excel(name = "类别id") |
| | | @NotNull(message = "类别不能为空") |
| | | @ApiModelProperty("类别id") |
| | | private Long coalCategoryId; |
| | | |
| | | /** |
| | | * 类别1理论2实操 |
| | | */ |
| | | @Excel(name = "类型1理论2实操") |
| | | @NotNull(message = "类别类型不能为空") |
| | | @ApiModelProperty("类别类型id") |
| | | private Long categoryType; |
| | | |
| | | /** |
| | | * 删除标志(0代表存在2代表删除) |
| | | */ |
| | | private Integer delFlag; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getCoalPayId() { |
| | | return coalPayId; |
| | | } |
| | | |
| | | public void setCoalPayId(Long coalPayId) { |
| | | this.coalPayId = coalPayId; |
| | | } |
| | | |
| | | public Long getCoalCategoryId() { |
| | | return coalCategoryId; |
| | | } |
| | | |
| | | public void setCoalCategoryId(Long coalCategoryId) { |
| | | this.coalCategoryId = coalCategoryId; |
| | | } |
| | | |
| | | public Long getCategoryType() { |
| | | return categoryType; |
| | | } |
| | | |
| | | public void setCategoryType(Long categoryType) { |
| | | this.categoryType = categoryType; |
| | | } |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @TableName("coal_pay_student") |
| | | @ApiModel(value = "煤矿缴费批次关联学生表", description = "煤矿缴费批次关联学生表") |
| | | public class CoalPayStudent implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 缴费id |
| | | */ |
| | | @Excel(name = "缴费id") |
| | | @NotNull(message = "参数不能为空") |
| | | @ApiModelProperty("缴费管理id") |
| | | private Long coalPayId; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | @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; |
| | | |
| | | /** |
| | | * 缴费类型1个人 2团体 |
| | | */ |
| | | private Integer payType; |
| | | |
| | | /** |
| | | * 订单编号 |
| | | */ |
| | | private String orderId; |
| | | |
| | | /** |
| | | * 票据 |
| | | */ |
| | | private String fileData; |
| | | |
| | | /** |
| | | * 缴费状态 |
| | | */ |
| | | private Integer govPayStatus; |
| | | |
| | | |
| | | /** 创建者 */ |
| | | private String createBy; |
| | | |
| | | /** 创建时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** 更新者 */ |
| | | private String updateBy; |
| | | |
| | | /** 更新时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 删除标志(0代表存在2代表删除) |
| | | */ |
| | | private Integer delFlag; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getCoalPayId() { |
| | | return coalPayId; |
| | | } |
| | | |
| | | public void setCoalPayId(Long coalPayId) { |
| | | this.coalPayId = coalPayId; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getIdCard() { |
| | | return idCard; |
| | | } |
| | | |
| | | public void setIdCard(String idCard) { |
| | | this.idCard = idCard; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public Long getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(Long sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public String getPayCode() { |
| | | return payCode; |
| | | } |
| | | |
| | | public void setPayCode(String payCode) { |
| | | this.payCode = payCode; |
| | | } |
| | | |
| | | public Long getPayStatus() { |
| | | return payStatus; |
| | | } |
| | | |
| | | public void setPayStatus(Long payStatus) { |
| | | this.payStatus = payStatus; |
| | | } |
| | | |
| | | public String getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public void setCreateBy(String createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public void setUpdateBy(String updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public Integer getPayType() { |
| | | return payType; |
| | | } |
| | | |
| | | public void setPayType(Integer payType) { |
| | | this.payType = payType; |
| | | } |
| | | |
| | | public String getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(String orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public String getFileData() { |
| | | return fileData; |
| | | } |
| | | |
| | | public void setFileData(String fileData) { |
| | | this.fileData = fileData; |
| | | } |
| | | |
| | | public Integer getGovPayStatus() { |
| | | return govPayStatus; |
| | | } |
| | | |
| | | public void setGovPayStatus(Integer govPayStatus) { |
| | | this.govPayStatus = govPayStatus; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @Data |
| | | public class CoalTicket { |
| | | |
| | | private Long id; |
| | | @NotNull(message = "开票单位名称不可为空") |
| | | private String ticketCompanyName; |
| | | @NotNull(message = "开票单位社会信用代码不可为空") |
| | | private String ticketCompanyCode; |
| | | @NotNull(message = "开票人不可为空") |
| | | private String drawer; |
| | | @NotNull(message = "复核人不可为空") |
| | | private String check; |
| | | @NotNull(message = "单位编码不可为空") |
| | | private String companyCode; |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class PayReqData { |
| | | //订单编号 |
| | | private String orderNo; |
| | | //订单总金额 |
| | | private BigDecimal money; |
| | | //子订单数目 |
| | | private Integer amount; |
| | | //缴费人姓名 |
| | | private String payerName; |
| | | //缴费人证件号 |
| | | private String certNo; |
| | | //交款人类型 |
| | | private Integer payerType; |
| | | //开票单位社会信用代码 |
| | | private String invoiceSocialCode; |
| | | //开票人 |
| | | private String handlingPerson; |
| | | //复核人 |
| | | private String checker; |
| | | //单位编码 |
| | | private String enterCode; |
| | | //电子邮件 |
| | | private String email; |
| | | //订单描述 |
| | | private String desc; |
| | | //备注 |
| | | private String remark1; |
| | | private String remark2; |
| | | private String remark3; |
| | | //订单明细 |
| | | private List<Feedata> feeDatas; |
| | | |
| | | |
| | | |
| | | @Data |
| | | public static class Feedata{ |
| | | private String busCode; |
| | | private Integer amount; |
| | | private BigDecimal price; |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.pay.entity.CoalCategory; |
| | | import com.gkhy.exam.pay.entity.CoalTicket; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | public interface CoalCategoryMapper extends BaseMapper<CoalCategory> { |
| | | List<CoalCategory> selectCoalCategoryList(CoalCategory coalCategory); |
| | | |
| | | int selectByCoalCategory(CoalCategory coalCategory); |
| | | |
| | | List<CoalCategory> selectByCoalPayId(Long id); |
| | | |
| | | int updateBatchByIds(Long[] ids); |
| | | |
| | | int insertCoalCategory(CoalCategory coalCategory); |
| | | |
| | | int updateCategoryById(CoalCategory coalCategory); |
| | | |
| | | int saveCoalTicket(CoalTicket coalTicket); |
| | | |
| | | int updateCoalTicket(CoalTicket coalTicket); |
| | | |
| | | CoalTicket selectCoalTicket(); |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.pay.entity.CoalCategory; |
| | | import com.gkhy.exam.pay.entity.CoalPayCategory; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface CoalPayCategoryMapper extends BaseMapper<CoalPayCategory> { |
| | | |
| | | int deleteByCoalPayId(Long id); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayDto; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayReq; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayTypeReq; |
| | | import com.gkhy.exam.pay.entity.CoalPay; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface CoalPayMapper extends BaseMapper<CoalPay> { |
| | | List<CoalPay> selectCoalPayList(CoalPayReq coalPay); |
| | | |
| | | int insertBath(CoalPay coalPay); |
| | | |
| | | int updateByIds(Long[] ids); |
| | | |
| | | int updateByPayId(CoalPayTypeReq coalPayDto); |
| | | |
| | | int updateCoalPayById(CoalPay coalPay); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayStudentReq; |
| | | import com.gkhy.exam.pay.entity.CoalPayStudent; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public interface CoalPayStudentMapper extends BaseMapper<CoalPayStudent> { |
| | | List<CoalPayStudent> selectByCoalPayId(Long coalPayId); |
| | | |
| | | int updateByIds(Long[] ids); |
| | | |
| | | List<CoalPayStudent> selectByCoalPayIdAndPayStatus(@Param("id") Long id, @Param("status") int status); |
| | | |
| | | List<CoalPayStudent> selectByIds(Long[] ids); |
| | | |
| | | List<CoalPayStudent> selectByIdcard(CoalPayStudentReq coalPayStudent); |
| | | |
| | | int updateCoalPayStudentById(CoalPayStudent coalPayStudent); |
| | | |
| | | int insertCoalPayStudent(CoalPayStudent coalPayStudent); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.pay.entity.CoalCategory; |
| | | import com.gkhy.exam.pay.entity.CoalTicket; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface CoalCategoryService extends IService<CoalCategory> { |
| | | CoalCategory selectCoalCategoryById(Long id); |
| | | |
| | | List<CoalCategory> selectCoalCategoryList(CoalCategory coalCategory); |
| | | |
| | | int insertCoalCategory(CoalCategory coalCategory); |
| | | |
| | | int updateCoalCategory(CoalCategory coalCategory); |
| | | |
| | | int deleteCoalCategoryByIds(Long[] ids); |
| | | |
| | | int saveCoalTicket(CoalTicket coalTicket); |
| | | |
| | | int updateCoalTicket(CoalTicket coalTicket); |
| | | |
| | | CoalTicket ticketList(); |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.pay.entity.CoalPayCategory; |
| | | |
| | | public interface CoalPayCategoryService extends IService<CoalPayCategory> { |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.pay.dto.rep.CoalPayRepDto; |
| | | import com.gkhy.exam.pay.dto.rep.CoalPayStudentRep; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayDto; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayReq; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayStudentReq; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayTypeReq; |
| | | import com.gkhy.exam.pay.entity.CoalPay; |
| | | import com.gkhy.exam.pay.entity.CoalPayStudent; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface CoalPayService extends IService<CoalPay> { |
| | | List<CoalPayRepDto> selectCoalPayList(CoalPayReq coalPay); |
| | | |
| | | CoalPayRepDto selectCoalPayById(Long id); |
| | | |
| | | int insertCoalPay(CoalPayDto coalPayDto); |
| | | |
| | | int updateCoalPay(CoalPayDto coalPayDto); |
| | | |
| | | AjaxResult deleteCoalPayByIds(Long[] ids); |
| | | |
| | | List<CoalPayStudentRep> selectCoalPay(CoalPayStudentReq coalPayStudent); |
| | | |
| | | int updateCoalPayType(CoalPayTypeReq coalPayDto); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayStudentReq; |
| | | import com.gkhy.exam.pay.entity.CoalPayStudent; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | public interface CoalPayStudentService extends IService<CoalPayStudent> { |
| | | |
| | | List<CoalPayStudent> selectCoalPayStudentList(Long coalPayId); |
| | | |
| | | AjaxResult updateByCoalPayStudent(CoalPayStudent coalPayStudent); |
| | | |
| | | int insertStudent(CoalPayStudent coalPayStudent); |
| | | |
| | | int deleteStudent(Long[] ids); |
| | | |
| | | AjaxResult uploadStudent(MultipartFile file,Long coalPayId) throws IOException; |
| | | |
| | | List<CoalPayStudent> selectByCoalPayId(Long id); |
| | | |
| | | List<CoalPayStudent> selectByCoalPayIdAndPayStatus(Long id, int status); |
| | | |
| | | List<CoalPayStudent> selectbyIdcard(CoalPayStudentReq coalPayStudent); |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.pay.entity.CoalCategory; |
| | | import com.gkhy.exam.pay.entity.CoalTicket; |
| | | import com.gkhy.exam.pay.mapper.CoalCategoryMapper; |
| | | import com.gkhy.exam.pay.service.CoalCategoryService; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.exception.BusinessException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import static com.ruoyi.common.core.domain.AjaxResult.success; |
| | | |
| | | @Service |
| | | public class CoalCategoryServiceImpl extends ServiceImpl<CoalCategoryMapper, CoalCategory> implements CoalCategoryService { |
| | | |
| | | @Resource |
| | | private CoalCategoryMapper coalCategoryMapper; |
| | | |
| | | |
| | | @Override |
| | | public CoalCategory selectCoalCategoryById(Long id) { |
| | | return coalCategoryMapper.selectById(id); |
| | | } |
| | | |
| | | /** |
| | | * 煤矿工种类别列表 |
| | | * @param coalCategory |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<CoalCategory> selectCoalCategoryList(CoalCategory coalCategory) { |
| | | return coalCategoryMapper.selectCoalCategoryList(coalCategory); |
| | | } |
| | | |
| | | /** |
| | | * 新增煤矿工种类别 |
| | | * @param coalCategory |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int insertCoalCategory(CoalCategory coalCategory) { |
| | | checkCoalCategory(coalCategory); |
| | | coalCategory.setCreateBy(SecurityUtils.getUsername()); |
| | | coalCategory.setCreateTime(new Date()); |
| | | return coalCategoryMapper.insertCoalCategory(coalCategory); |
| | | } |
| | | |
| | | private void checkCoalCategory(CoalCategory coalCategory) { |
| | | int i = coalCategoryMapper.selectByCoalCategory(coalCategory); |
| | | if (i>0){ |
| | | throw new RuntimeException("该工种已存在,请勿重复添加"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改煤矿工种类别 |
| | | * @param coalCategory |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int updateCoalCategory(CoalCategory coalCategory) { |
| | | checkCoalCategory(coalCategory); |
| | | coalCategory.setUpdateBy(SecurityUtils.getUsername()); |
| | | coalCategory.setUpdateTime(new Date()); |
| | | return coalCategoryMapper.updateCategoryById(coalCategory); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除煤矿工种类别 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int deleteCoalCategoryByIds(Long[] ids) { |
| | | return coalCategoryMapper.updateBatchByIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public int saveCoalTicket(CoalTicket coalTicket) { |
| | | return coalCategoryMapper.saveCoalTicket(coalTicket); |
| | | } |
| | | |
| | | @Override |
| | | public int updateCoalTicket(CoalTicket coalTicket) { |
| | | return coalCategoryMapper.updateCoalTicket(coalTicket); |
| | | } |
| | | |
| | | @Override |
| | | public CoalTicket ticketList() { |
| | | return coalCategoryMapper.selectCoalTicket(); |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.pay.entity.CoalPayCategory; |
| | | import com.gkhy.exam.pay.mapper.CoalPayCategoryMapper; |
| | | import com.gkhy.exam.pay.service.CoalPayCategoryService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class CoalPayCategoryServiceImpl extends ServiceImpl<CoalPayCategoryMapper, CoalPayCategory> implements CoalPayCategoryService { |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.pay.dto.rep.CoalPayRepDto; |
| | | import com.gkhy.exam.pay.dto.rep.CoalPayStudentRep; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayDto; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayReq; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayStudentReq; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayTypeReq; |
| | | import com.gkhy.exam.pay.entity.CoalCategory; |
| | | import com.gkhy.exam.pay.entity.CoalPay; |
| | | import com.gkhy.exam.pay.entity.CoalPayCategory; |
| | | import com.gkhy.exam.pay.entity.CoalPayStudent; |
| | | import com.gkhy.exam.pay.mapper.CoalCategoryMapper; |
| | | import com.gkhy.exam.pay.mapper.CoalPayCategoryMapper; |
| | | import com.gkhy.exam.pay.mapper.CoalPayMapper; |
| | | import com.gkhy.exam.pay.service.CoalPayService; |
| | | import com.gkhy.exam.pay.service.CoalPayStudentService; |
| | | import com.ruoyi.common.constant.ResultConstants; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.exception.BusinessException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.system.mapper.SysDeptMapper; |
| | | import javafx.print.Collation; |
| | | import org.aspectj.weaver.loadtime.Aj; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class CoalPayServiceImpl extends ServiceImpl<CoalPayMapper, CoalPay> implements CoalPayService { |
| | | |
| | | @Resource |
| | | private CoalPayMapper coalPayMapper; |
| | | @Resource |
| | | private CoalPayCategoryMapper coalPayCategoryMapper; |
| | | @Resource |
| | | private SysDeptMapper sysDeptMapper; |
| | | |
| | | @Resource |
| | | private CoalCategoryMapper coalCategoryMapper; |
| | | @Autowired |
| | | private CoalPayStudentService coalPayStudentService; |
| | | |
| | | |
| | | /** |
| | | * 缴费管理列表 |
| | | * @param coalPay |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<CoalPayRepDto> selectCoalPayList(CoalPayReq coalPay) { |
| | | List<CoalPayRepDto> coalPayRepDtos = new ArrayList<>(); |
| | | List<CoalPay> coalPays = coalPayMapper.selectCoalPayList(coalPay); |
| | | for (CoalPay pay : coalPays) { |
| | | CoalPayRepDto coalPayRepDto = new CoalPayRepDto(); |
| | | BeanUtils.copyProperties(pay,coalPayRepDto); |
| | | //部门数据 |
| | | SysDept sysDept = sysDeptMapper.selectDeptById(pay.getDeptId()); |
| | | coalPayRepDto.setDeptName(sysDept.getDeptName()); |
| | | //工种数据 |
| | | List<CoalCategory> coalCategories = coalCategoryMapper.selectByCoalPayId(pay.getId()); |
| | | coalPayRepDto.setCoalCategoryList(coalCategories); |
| | | //学员数据 |
| | | List<CoalPayStudent> coalPayStudents = coalPayStudentService.selectByCoalPayId(pay.getId()); |
| | | List<CoalPayStudent> havePay = coalPayStudents.stream() |
| | | .filter(stu -> stu.getPayStatus() != null && stu.getPayStatus().equals(1)) |
| | | .collect(Collectors.toList()); |
| | | coalPayRepDto.setTotalNum(coalPayStudents.size()); |
| | | coalPayRepDto.setHavePayNum(havePay.size()); |
| | | coalPayRepDtos.add(coalPayRepDto); |
| | | } |
| | | return coalPayRepDtos; |
| | | } |
| | | |
| | | @Override |
| | | public CoalPayRepDto selectCoalPayById(Long id) { |
| | | |
| | | CoalPayRepDto coalPayRepDto = new CoalPayRepDto(); |
| | | |
| | | //基本数据 |
| | | CoalPay coalPay = coalPayMapper.selectById(id); |
| | | BeanUtils.copyProperties(coalPay,coalPayRepDto); |
| | | //考点名称 |
| | | SysDept sysDept = sysDeptMapper.selectDeptById(coalPay.getDeptId()); |
| | | coalPayRepDto.setDeptName(sysDept.getDeptName()); |
| | | //工种类别 |
| | | List<CoalCategory> coalCategories = coalCategoryMapper.selectByCoalPayId(coalPay.getId()); |
| | | coalPayRepDto.setCoalCategoryList(coalCategories); |
| | | |
| | | //学员数据 |
| | | List<CoalPayStudent> coalPayStudents = coalPayStudentService.selectByCoalPayId(id); |
| | | List<CoalPayStudent> havePay = coalPayStudents.stream() |
| | | .filter(stu -> stu.getPayStatus() != null && stu.getPayStatus().equals(0)) |
| | | .collect(Collectors.toList()); |
| | | coalPayRepDto.setTotalNum(coalPayStudents.size()); |
| | | coalPayRepDto.setHavePayNum(havePay.size()); |
| | | |
| | | return coalPayRepDto; |
| | | } |
| | | |
| | | @Override |
| | | public int insertCoalPay(CoalPayDto coalPayDto) { |
| | | CoalPay coalPay = new CoalPay(); |
| | | BeanUtils.copyProperties(coalPayDto,coalPay); |
| | | coalPay.setCreateBy(SecurityUtils.getUsername()); |
| | | coalPay.setCreateTime(new Date()); |
| | | int insert = coalPayMapper.insertBath(coalPay); |
| | | if (CollectionUtils.isEmpty(coalPayDto.getCoalPayCategoryies())){ |
| | | throw new BusinessException(this.getClass(),ResultConstants.BUSINESS_ERROR,"工种类别不能为空"); |
| | | } |
| | | List<CoalPayCategory> coalPayCategories = coalPayDto.getCoalPayCategoryies(); |
| | | for (CoalPayCategory coalPayCategory : coalPayCategories) { |
| | | coalPayCategory.setCoalPayId(coalPay.getId()); |
| | | coalPayCategoryMapper.insert(coalPayCategory); |
| | | } |
| | | return insert; |
| | | } |
| | | |
| | | /** |
| | | * 修改缴费信息 |
| | | * @param coalPayDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int updateCoalPay(CoalPayDto coalPayDto) { |
| | | CoalPay coalPay = new CoalPay(); |
| | | BeanUtils.copyProperties(coalPayDto,coalPay); |
| | | coalPay.setUpdateBy(SecurityUtils.getUsername()); |
| | | coalPay.setUpdateTime(new Date()); |
| | | int i = coalPayMapper.updateCoalPayById(coalPay); |
| | | int update = coalPayCategoryMapper.deleteByCoalPayId(coalPayDto.getId()); |
| | | if (update>0){ |
| | | List<CoalPayCategory> coalPayCategories = coalPayDto.getCoalPayCategoryies(); |
| | | for (CoalPayCategory coalPayCategory : coalPayCategories) { |
| | | coalPayCategory.setCoalPayId(coalPay.getId()); |
| | | coalPayCategoryMapper.insert(coalPayCategory); |
| | | } |
| | | } |
| | | return i; |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult deleteCoalPayByIds(Long[] ids) { |
| | | for (Long id : ids) { |
| | | List<CoalPayStudent> coalPayStudents = coalPayStudentService.selectByCoalPayIdAndPayStatus(id,1); |
| | | if (!CollectionUtils.isEmpty(coalPayStudents)){ |
| | | throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR,"已有学员完成缴费,请勿删除"); |
| | | } |
| | | } |
| | | int i = coalPayMapper.updateByIds(ids); |
| | | if (i>0){ |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | //个人查询缴费 |
| | | @Override |
| | | public List<CoalPayStudentRep> selectCoalPay(CoalPayStudentReq coalPayStudent) { |
| | | //查询个人需要缴费 |
| | | List<CoalPayStudent> coalPayStudents = coalPayStudentService.selectbyIdcard(coalPayStudent); |
| | | List<CoalPayStudentRep> coalPayStudentReps = new ArrayList<>(); |
| | | for (CoalPayStudent payStudent : coalPayStudents) { |
| | | //封装学生基础信息 |
| | | CoalPayStudentRep coalPayStudentRep = new CoalPayStudentRep(); |
| | | coalPayStudentRep.setName(payStudent.getName()); |
| | | coalPayStudentRep.setIdCard(payStudent.getIdCard()); |
| | | coalPayStudentRep.setPhone(payStudent.getPhone()); |
| | | coalPayStudentRep.setSex(payStudent.getSex()); |
| | | coalPayStudentRep.setPayStatus(payStudent.getPayStatus()); |
| | | |
| | | //查询对应批次以及批次包含工种类别 |
| | | CoalPay coalPay = coalPayMapper.selectById(payStudent.getCoalPayId()); |
| | | CoalPayRepDto coalPayRepDto = new CoalPayRepDto(); |
| | | BeanUtils.copyProperties(coalPay,coalPayRepDto); |
| | | //考点名称 |
| | | SysDept sysDept = sysDeptMapper.selectDeptById(coalPay.getDeptId()); |
| | | coalPayRepDto.setDeptName(sysDept.getDeptName()); |
| | | //查询批次对应工种类别 |
| | | List<CoalCategory> coalCategories = coalCategoryMapper.selectByCoalPayId(payStudent.getCoalPayId()); |
| | | coalPayRepDto.setCoalCategoryList(coalCategories); |
| | | coalPayStudentRep.setCoalPays(coalPayRepDto); |
| | | coalPayStudentReps.add(coalPayStudentRep); |
| | | } |
| | | return coalPayStudentReps; |
| | | } |
| | | |
| | | @Override |
| | | public int updateCoalPayType(CoalPayTypeReq coalPayTypeReq) { |
| | | CoalPay byId = coalPayMapper.selectById(coalPayTypeReq.getCoalPayId()); |
| | | if (coalPayTypeReq.getPayPersonType() != null && byId.getPayPersonType() == 2){ |
| | | throw new BusinessException(this.getClass(),ResultConstants.BUSINESS_ERROR,"已为团体缴费,不可更改"); |
| | | } |
| | | return coalPayMapper.updateByPayId(coalPayTypeReq); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.pay.dto.req.CoalPayStudentReq; |
| | | import com.gkhy.exam.pay.entity.CoalPayStudent; |
| | | import com.gkhy.exam.pay.mapper.CoalPayStudentMapper; |
| | | import com.gkhy.exam.pay.service.CoalPayStudentService; |
| | | import com.ruoyi.common.constant.ResultConstants; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.exception.BusinessException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.ss.usermodel.WorkbookFactory; |
| | | import org.aspectj.weaver.loadtime.Aj; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class CoalPayStudentServiceImpl extends ServiceImpl<CoalPayStudentMapper, CoalPayStudent> implements CoalPayStudentService { |
| | | |
| | | @Resource |
| | | private CoalPayStudentMapper coalPayStudentMapper; |
| | | |
| | | |
| | | @Override |
| | | public List<CoalPayStudent> selectCoalPayStudentList(Long coalPayId) { |
| | | return coalPayStudentMapper.selectByCoalPayId(coalPayId); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult updateByCoalPayStudent(CoalPayStudent coalPayStudent) { |
| | | CoalPayStudent payStudent = coalPayStudentMapper.selectById(coalPayStudent.getId()); |
| | | if(payStudent==null){ |
| | | throw new BusinessException(this.getClass(),ResultConstants.BUSINESS_ERROR,"学生不存在"); |
| | | } |
| | | if (payStudent.getPayStatus()==1){ |
| | | throw new BusinessException(this.getClass(),ResultConstants.BUSINESS_ERROR,"学生已完成缴费,不可修改"); |
| | | } |
| | | coalPayStudent.setUpdateBy(SecurityUtils.getUsername()); |
| | | coalPayStudent.setUpdateTime(new Date()); |
| | | int i = coalPayStudentMapper.updateCoalPayStudentById(coalPayStudent); |
| | | if (i>0){ |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @Override |
| | | public int insertStudent(CoalPayStudent coalPayStudent) { |
| | | coalPayStudent.setCreateBy(SecurityUtils.getUsername()); |
| | | coalPayStudent.setCreateTime(new Date()); |
| | | return coalPayStudentMapper.insertCoalPayStudent(coalPayStudent); |
| | | } |
| | | |
| | | @Override |
| | | public int deleteStudent(Long[] ids) { |
| | | List<CoalPayStudent> coalPayStudents = coalPayStudentMapper.selectByIds(ids); |
| | | List<CoalPayStudent> collect = coalPayStudents.stream().filter(cps -> cps.getPayStatus().equals(1)).collect(Collectors.toList()); |
| | | if (!CollectionUtils.isEmpty(collect)){ |
| | | throw new BusinessException(this.getClass(),ResultConstants.BUSINESS_ERROR,"学生已完成缴费,请勿删除"); |
| | | } |
| | | return coalPayStudentMapper.updateByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * 导入学生 |
| | | * @param file |
| | | * @param coalPayId |
| | | * @return |
| | | * @throws IOException |
| | | */ |
| | | @Override |
| | | public AjaxResult uploadStudent(MultipartFile file,Long coalPayId) throws IOException { |
| | | Workbook workbook = WorkbookFactory.create(file.getInputStream()); |
| | | |
| | | List<CoalPayStudent> coalPayStudents = new ArrayList<>(); |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | try { |
| | | Sheet sheetAt = workbook.getSheetAt(0); |
| | | for (int i = 0; i < sheetAt.getLastRowNum(); i++) { |
| | | Row row = sheetAt.getRow(i + 1); |
| | | CoalPayStudent coalPayStudent = new CoalPayStudent(); |
| | | coalPayStudent.setCoalPayId(coalPayId); |
| | | if (row!=null){ |
| | | coalPayStudent.setName(row.getCell(0).getStringCellValue()); |
| | | coalPayStudent.setIdCard(row.getCell(1).getStringCellValue()); |
| | | coalPayStudent.setPhone(row.getCell(2).getStringCellValue()); |
| | | String stringCellValue = row.getCell(3).getStringCellValue(); |
| | | if (stringCellValue.equals("男")){ |
| | | coalPayStudent.setSex(0L); |
| | | }else if (stringCellValue.equals("女")){ |
| | | coalPayStudent.setSex(1L); |
| | | } |
| | | coalPayStudent.setPayStatus(0L); |
| | | coalPayStudent.setCreateBy(loginUser.getUsername()); |
| | | coalPayStudent.setCreateTime(new Date()); |
| | | coalPayStudents.add(coalPayStudent); |
| | | } |
| | | } |
| | | // 根据身份证号去重 |
| | | List<CoalPayStudent> distinctStudents = coalPayStudents.stream() |
| | | .collect(Collectors.toMap( |
| | | CoalPayStudent::getIdCard, // 使用身份证号作为键 |
| | | student -> student, // 使用学生对象作为值 |
| | | (existing, replacement) -> existing // 如果键重复,选择保留第一个 |
| | | )) |
| | | .values() |
| | | .stream() |
| | | .collect(Collectors.toList()); |
| | | for (CoalPayStudent coalPayStudent : distinctStudents) { |
| | | coalPayStudentMapper.insert(coalPayStudent); |
| | | } |
| | | return AjaxResult.success(); |
| | | }finally { |
| | | workbook.close(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<CoalPayStudent> selectByCoalPayId(Long id) { |
| | | return coalPayStudentMapper.selectByCoalPayId(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<CoalPayStudent> selectByCoalPayIdAndPayStatus(Long id, int status) { |
| | | return coalPayStudentMapper.selectByCoalPayIdAndPayStatus(id,status); |
| | | } |
| | | |
| | | @Override |
| | | public List<CoalPayStudent> selectbyIdcard(CoalPayStudentReq coalPayStudent) { |
| | | return coalPayStudentMapper.selectByIdcard(coalPayStudent); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.utils; |
| | | |
| | | import lombok.Data; |
| | | import org.apache.http.Header; |
| | | |
| | | @Data |
| | | public class HttpResultVo { |
| | | |
| | | |
| | | private Integer statusCode; |
| | | private String contentType; |
| | | private boolean textType; |
| | | private String stringContent; |
| | | private byte[] byteArrayContent; |
| | | private Header[] headers; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.utils; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.gkhy.exam.pay.entity.PayReqData; |
| | | import org.apache.commons.codec.digest.DigestUtils; |
| | | import org.apache.http.HttpEntity; |
| | | import org.apache.http.HttpResponse; |
| | | import org.apache.http.NameValuePair; |
| | | import org.apache.http.StatusLine; |
| | | import org.apache.http.client.ClientProtocolException; |
| | | import org.apache.http.client.HttpClient; |
| | | import org.apache.http.client.HttpResponseException; |
| | | import org.apache.http.client.ResponseHandler; |
| | | import org.apache.http.client.config.AuthSchemes; |
| | | import org.apache.http.client.config.CookieSpecs; |
| | | import org.apache.http.client.config.RequestConfig; |
| | | import org.apache.http.client.entity.UrlEncodedFormEntity; |
| | | import org.apache.http.client.methods.HttpPost; |
| | | import org.apache.http.config.Registry; |
| | | import org.apache.http.config.RegistryBuilder; |
| | | import org.apache.http.conn.socket.ConnectionSocketFactory; |
| | | import org.apache.http.conn.socket.PlainConnectionSocketFactory; |
| | | import org.apache.http.conn.ssl.NoopHostnameVerifier; |
| | | import org.apache.http.conn.ssl.SSLConnectionSocketFactory; |
| | | import org.apache.http.entity.ContentType; |
| | | import org.apache.http.impl.client.CloseableHttpClient; |
| | | import org.apache.http.impl.client.HttpClients; |
| | | import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; |
| | | import org.apache.http.message.BasicNameValuePair; |
| | | import org.apache.http.util.EntityUtils; |
| | | |
| | | import javax.net.ssl.SSLContext; |
| | | import javax.net.ssl.TrustManager; |
| | | import javax.net.ssl.X509TrustManager; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.security.KeyManagementException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.security.cert.X509Certificate; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 缴费相关接口 |
| | | */ |
| | | public class PayUtils { |
| | | |
| | | public static ResultVo sendApiPost(PayReqData payReqData) throws IOException { |
| | | |
| | | //正式 |
| | | String proUrl="http://finpt.xjcz.gov.cn/fs-service/fs-pay/invoice.do"; |
| | | String appid="ED76A5F1703540BE977D34780B371FEB"; |
| | | //测试 |
| | | String testUrl= "http://finpt.xjcz.gov.cn/fs-service-test/fs-pay/invoice.do"; |
| | | |
| | | Map<String, String> param = new HashMap<>(); |
| | | |
| | | HttpPost httpPost = new HttpPost(testUrl); |
| | | |
| | | //请求参数转为json格式base64编码 |
| | | String reqData = Base64.getEncoder().encodeToString(JSONObject.toJSONString(payReqData).getBytes()); |
| | | String mac = appid+"||"+reqData; |
| | | mac = DigestUtils.md5Hex(mac.getBytes()); |
| | | param.put("appid",appid); |
| | | param.put("reqdata",reqData); |
| | | param.put("mac",mac); |
| | | |
| | | httpPost.setEntity(assemblyFormEntity(param,"utf-8")); |
| | | HttpClient httpClient = getHttpClient(testUrl); |
| | | HttpResultVo execute = httpClient.execute(httpPost, getResponseHandler()); |
| | | String stringContent = execute.getStringContent(); |
| | | ResultVo resultVo = JSONObject.parseObject(stringContent, ResultVo.class); |
| | | return resultVo; |
| | | } |
| | | |
| | | private static UrlEncodedFormEntity assemblyFormEntity(Map<String, String> parameters, String charset) { |
| | | List<NameValuePair> formParameters = assemblyParameter(parameters); |
| | | UrlEncodedFormEntity formEntity = null; |
| | | try { |
| | | if (charset != null) { |
| | | formEntity = new UrlEncodedFormEntity(formParameters, charset); |
| | | } else { |
| | | formEntity = new UrlEncodedFormEntity(formParameters); |
| | | } |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return formEntity; |
| | | } |
| | | |
| | | private static List<NameValuePair> assemblyParameter(Map<String, String> parameters) { |
| | | List<NameValuePair> allParameter = new ArrayList<>(); |
| | | if (parameters != null && !parameters.isEmpty()) { |
| | | for (String name : parameters.keySet()) { |
| | | NameValuePair parameter = new BasicNameValuePair(name, parameters.get(name)); |
| | | allParameter.add(parameter); |
| | | } |
| | | } |
| | | return allParameter; |
| | | } |
| | | |
| | | public static HttpClient getHttpClient(String url) { |
| | | // 判断https访问 |
| | | if (url.startsWith("https")) { |
| | | return sslClient(); |
| | | } |
| | | return HttpClients.createDefault(); |
| | | |
| | | } |
| | | |
| | | private static HttpClient sslClient() { |
| | | try { |
| | | // 在调用SSL之前需要重写验证方法,取消检测SSL |
| | | X509TrustManager trustManager = new X509TrustManager() { |
| | | @Override |
| | | public X509Certificate[] getAcceptedIssuers() { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public void checkClientTrusted(X509Certificate[] xcs, String str) {} |
| | | |
| | | @Override |
| | | public void checkServerTrusted(X509Certificate[] xcs, String str) {} |
| | | }; |
| | | SSLContext ctx = SSLContext.getInstance(SSLConnectionSocketFactory.TLS); |
| | | ctx.init(null, new TrustManager[] {trustManager}, null); |
| | | SSLConnectionSocketFactory socketFactory = |
| | | new SSLConnectionSocketFactory(ctx, NoopHostnameVerifier.INSTANCE); |
| | | // 创建Registry |
| | | RequestConfig requestConfig = |
| | | RequestConfig.custom().setCookieSpec(CookieSpecs.STANDARD_STRICT).setExpectContinueEnabled(Boolean.TRUE) |
| | | .setTargetPreferredAuthSchemes(Arrays.asList(AuthSchemes.NTLM, AuthSchemes.DIGEST)) |
| | | .setProxyPreferredAuthSchemes(Arrays.asList(AuthSchemes.BASIC)).build(); |
| | | Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create() |
| | | .register("http", PlainConnectionSocketFactory.INSTANCE).register("https", socketFactory).build(); |
| | | // 创建ConnectionManager,添加Connection配置信息 |
| | | PoolingHttpClientConnectionManager connectionManager = |
| | | new PoolingHttpClientConnectionManager(socketFactoryRegistry); |
| | | CloseableHttpClient closeableHttpClient = HttpClients.custom().setConnectionManager(connectionManager) |
| | | .setDefaultRequestConfig(requestConfig).build(); |
| | | return closeableHttpClient; |
| | | } catch (KeyManagementException ex) { |
| | | throw new RuntimeException(ex); |
| | | } catch (NoSuchAlgorithmException ex) { |
| | | throw new RuntimeException(ex); |
| | | } |
| | | |
| | | } |
| | | |
| | | private static ResponseHandler<HttpResultVo> getResponseHandler() { |
| | | ResponseHandler<HttpResultVo> responseHandler = new ResponseHandler<HttpResultVo>() { |
| | | @Override |
| | | public HttpResultVo handleResponse(HttpResponse httpResponse) throws ClientProtocolException, IOException { |
| | | if (httpResponse == null) { |
| | | throw new ClientProtocolException("HttpResponse is null"); |
| | | } |
| | | |
| | | StatusLine statusLine = httpResponse.getStatusLine(); |
| | | HttpEntity httpEntity = httpResponse.getEntity(); |
| | | if (statusLine == null) { |
| | | throw new ClientProtocolException("HttpResponse contains no StatusLine"); |
| | | } |
| | | if (statusLine.getStatusCode() != 200) { |
| | | throw new HttpResponseException(statusLine.getStatusCode(), statusLine.getReasonPhrase()); |
| | | } |
| | | if (httpEntity == null) { |
| | | throw new ClientProtocolException("HttpResponse contains no HttpEntity"); |
| | | } |
| | | |
| | | HttpResultVo httpResult = new HttpResultVo(); |
| | | httpResult.setStatusCode(statusLine.getStatusCode()); |
| | | ContentType contentType = ContentType.getOrDefault(httpEntity); |
| | | httpResult.setContentType(contentType.toString()); |
| | | boolean isTextType = isTextType(contentType); |
| | | httpResult.setTextType(isTextType); |
| | | if (isTextType) { |
| | | httpResult.setStringContent(EntityUtils.toString(httpEntity)); |
| | | } else { |
| | | httpResult.setByteArrayContent(EntityUtils.toByteArray(httpEntity)); |
| | | } |
| | | |
| | | httpResult.setHeaders(httpResponse.getAllHeaders()); |
| | | |
| | | return httpResult; |
| | | } |
| | | }; |
| | | return responseHandler; |
| | | } |
| | | |
| | | private static boolean isTextType(ContentType contentType) { |
| | | if (contentType == null) { |
| | | throw new RuntimeException("ContentType is null"); |
| | | } |
| | | if (contentType.getMimeType().startsWith("text")) { |
| | | return true; |
| | | } else if (contentType.getMimeType().startsWith("image")) { |
| | | return false; |
| | | } else if (contentType.getMimeType().startsWith("application")) { |
| | | if (contentType.getMimeType().contains("json") || contentType.getMimeType().contains("xml")) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } else if (contentType.getMimeType().startsWith("multipart")) { |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.pay.utils; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ResultVo { |
| | | private String respcode; |
| | | private String respmsg; |
| | | private Respdata respdata; |
| | | |
| | | @Data |
| | | public class Respdata{ |
| | | private String orderNo; |
| | | private String billNo; |
| | | private String orderId; |
| | | private String fileData; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | <?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.gkhy.exam.pay.mapper.CoalCategoryMapper"> |
| | | |
| | | <resultMap type="CoalCategory" id="CoalCategoryResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="categoryType" column="category_type"/> |
| | | <result property="subjectName" column="subject_name"/> |
| | | <result property="amount" column="amount"/> |
| | | <result property="businessCode" column="business_code"/> |
| | | <result property="describe" column="describe"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectCoalCategoryVo"> |
| | | select id, |
| | | category_type, |
| | | subject_name, |
| | | amount, |
| | | business_code, |
| | | `describe`, update_by, update_time, create_by, create_time |
| | | from coal_category |
| | | </sql> |
| | | <insert id="insertCoalCategory"> |
| | | insert into coal_category |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="categoryType != null">category_type,</if> |
| | | <if test="subjectName != null and subjectName != ''">subject_name,</if> |
| | | <if test="amount != null">amount,</if> |
| | | <if test="businessCode!=null">business_code,</if> |
| | | <if test="describe != null">`describe`,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="categoryType != null">#{categoryType},</if> |
| | | <if test="subjectName != null and subjectName != ''">#{subjectName},</if> |
| | | <if test="amount != null">#{amount},</if> |
| | | <if test="businessCode!=null">#{businessCode},</if> |
| | | <if test="describe != null">#{describe},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | <insert id="saveCoalTicket"> |
| | | INSERT INTO `swspkmas`.`coal_ticket` |
| | | ( `ticket_company_name`, `ticket_company_code`, `drawer`, `check`, `company_code` ) |
| | | VALUES |
| | | ( #{ticketCompanyName}, #{ticketCompanyCode}, #{drawer}, #{check}, #{companyCode} ) |
| | | </insert> |
| | | |
| | | <update id="updateBatchByIds"> |
| | | update coal_category set del_flag = 2 where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | <update id="updateCategoryById"> |
| | | update coal_category |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="categoryType != null">category_type = #{categoryType},</if> |
| | | <if test="subjectName != null and subjectName != ''">subject_name = #{subjectName},</if> |
| | | <if test="amount != null">amount = #{amount},</if> |
| | | <if test="businessCode!=null">business_code = #{businessCode},</if> |
| | | <if test="describe != null">`describe` = #{describe},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | <update id="updateCoalTicket"> |
| | | update coal_ticket |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="ticketCompanyName != null">ticket_company_name = #{ticketCompanyName},</if> |
| | | <if test="ticketCompanyCode != null and ticketCompanyCode != ''">ticket_company_code = #{ticketCompanyCode},</if> |
| | | <if test="drawer != null">drawer = #{drawer},</if> |
| | | <if test="check!=null">`check` = #{check},</if> |
| | | <if test="companyCode != null">company_code = #{companyCode},</if> |
| | | </trim> |
| | | </update> |
| | | |
| | | <select id="selectCoalCategoryList" parameterType="CoalCategory" resultMap="CoalCategoryResult"> |
| | | <include refid="selectCoalCategoryVo"/> |
| | | <where> |
| | | <if test="categoryType != null ">and category_type = #{categoryType}</if> |
| | | <if test="subjectName != null and subjectName != ''">and subject_name like concat('%', #{subjectName}, |
| | | '%') |
| | | </if> |
| | | <if test="amount != null ">and amount = #{amount}</if> |
| | | and del_flag = 0 |
| | | order by create_time desc |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByCoalCategory" resultType="java.lang.Integer"> |
| | | select count(id) |
| | | from coal_category |
| | | <where> |
| | | del_flag = 0 |
| | | and category_type = #{categoryType} |
| | | and subject_name = #{subjectName} |
| | | <if test="id!=null and id!=''"> |
| | | and id != #{id} |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | <select id="selectByCoalPayId" resultMap="CoalCategoryResult"> |
| | | SELECT |
| | | cc.id, |
| | | cc.category_type, |
| | | cc.subject_name, |
| | | cc.amount, |
| | | cc.business_code, |
| | | cc.`describe` |
| | | FROM |
| | | coal_category cc |
| | | LEFT JOIN coal_pay_category cpc ON cc.id = cpc.coal_category_id |
| | | WHERE |
| | | cpc.coal_pay_id = #{id} and cpc.del_flag = 0 |
| | | </select> |
| | | <select id="selectCoalTicket" resultType="com.gkhy.exam.pay.entity.CoalTicket"> |
| | | select id , ticket_company_name,ticket_company_code,drawer,`check`,company_code from coal_ticket |
| | | </select> |
| | | |
| | | </mapper> |
对比新文件 |
| | |
| | | <?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.gkhy.exam.pay.mapper.CoalPayCategoryMapper"> |
| | | |
| | | <resultMap type="CoalPayCategory" id="CoalPayCategoryResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="coalPayId" column="coal_pay_id"/> |
| | | <result property="coalCategoryId" column="coal_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="selectCoalPayCategoryVo"> |
| | | select id, |
| | | coal_pay_id, |
| | | coal_category_id, |
| | | category_type, |
| | | update_by, |
| | | update_time, |
| | | create_by, |
| | | create_time, |
| | | del_flag |
| | | from coal_pay_category |
| | | </sql> |
| | | <delete id="deleteByCoalPayId"> |
| | | update coal_pay_category |
| | | set del_flag = 2 |
| | | where coal_pay_id = #{id} |
| | | </delete> |
| | | |
| | | </mapper> |
对比新文件 |
| | |
| | | <?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.gkhy.exam.pay.mapper.CoalPayMapper"> |
| | | |
| | | <resultMap type="CoalPay" id="CoalPayResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="batchName" column="batch_name" /> |
| | | <result property="deptId" column="dept_id" /> |
| | | <result property="payType" column="pay_type" /> |
| | | <result property="amount" column="amount" /> |
| | | <result property="year" column="year" /> |
| | | <result property="quarter" column="quarter" /> |
| | | <result property="payPersonType" column="pay_person_type" /> |
| | | <result property="payCompanyName" column="pay_company_name" /> |
| | | <result property="payCompanyCard" column="pay_company_card" /> |
| | | <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="selectCoalPayVo"> |
| | | select id, |
| | | batch_name, |
| | | dept_id, |
| | | pay_type, |
| | | amount, |
| | | year, |
| | | quarter, |
| | | pay_person_type, pay_company_name, pay_company_card, update_by, update_time, create_by, create_time, del_flag from coal_pay |
| | | </sql> |
| | | |
| | | <insert id="insertBath" parameterType="CoalPay" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into coal_pay |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="batchName != null and batchName != ''">batch_name,</if> |
| | | <if test="deptId != null">dept_id,</if> |
| | | <if test="payType != null">pay_type,</if> |
| | | <if test="amount != null">amount,</if> |
| | | <if test="year != null and year != ''">year,</if> |
| | | <if test="quarter != null">quarter,</if> |
| | | <if test="payPersonType != null">pay_person_type,</if> |
| | | <if test="payCompanyName != null">pay_company_name,</if> |
| | | <if test="payCompanyCard != null">pay_company_card,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="batchName != null and batchName != ''">#{batchName},</if> |
| | | <if test="deptId != null">#{deptId},</if> |
| | | <if test="payType != null">#{payType},</if> |
| | | <if test="amount != null">#{amount},</if> |
| | | <if test="year != null and year != ''">#{year},</if> |
| | | <if test="quarter != null">#{quarter},</if> |
| | | <if test="payPersonType != null">#{payPersonType},</if> |
| | | <if test="payCompanyName != null">#{payCompanyName},</if> |
| | | <if test="payCompanyCard != null">#{payCompanyCard},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null and updateBy != ''">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateByIds"> |
| | | update coal_pay set del_flag=2 where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <update id="updateByPayId"> |
| | | update coal_pay |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="payPersonType != null">pay_person_type = #{payPersonType},</if> |
| | | <if test="payCompanyName != null">pay_company_name = #{payCompanyName},</if> |
| | | <if test="payCompanyCard != null">pay_company_card = #{payCompanyCard},</if> |
| | | </trim> |
| | | where id = #{coalPayId} |
| | | </update> |
| | | <update id="updateCoalPayById"> |
| | | update coal_pay |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="batchName != null and batchName != ''">batch_name = #{batchName},</if> |
| | | <if test="deptId != null">dept_id = #{deptId},</if> |
| | | <if test="payType != null">pay_type = #{payType},</if> |
| | | <if test="amount != null">amount = #{amount},</if> |
| | | <if test="year != null and year != ''">year = #{year},</if> |
| | | <if test="quarter != null">quarter = #{quarter},</if> |
| | | <if test="payPersonType != null">pay_person_type = #{payPersonType},</if> |
| | | <if test="payCompanyName != null">pay_company_name = #{payCompanyName},</if> |
| | | <if test="payCompanyCard != null">pay_company_card = #{payCompanyCard},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | |
| | | <select id="selectCoalPayList" parameterType="CoalPay" resultMap="CoalPayResult"> |
| | | <include refid="selectCoalPayVo"/> |
| | | <where> |
| | | <if test="deptId != null "> |
| | | and dept_id = #{deptId} |
| | | </if> |
| | | <if test="minDate !=null"> |
| | | and create_time >= #{minDate} |
| | | </if> |
| | | <if test="maxDate != null"> |
| | | and create_time <= #{maxDate} |
| | | </if> |
| | | and del_flag = 0 |
| | | order by create_time desc |
| | | </where> |
| | | </select> |
| | | </mapper> |
对比新文件 |
| | |
| | | <?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.gkhy.exam.pay.mapper.CoalPayStudentMapper"> |
| | | <sql id="selectCoalPayStudentVo"> |
| | | select id, coal_pay_id, name, id_card, phone, sex, pay_code, pay_status,pay_type,order_id,file_data,gov_pay_status, update_by, update_time, create_by, create_time, del_flag from coal_pay_student |
| | | </sql> |
| | | <insert id="insertCoalPayStudent"> |
| | | insert into coal_pay_student |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="coalPayId != null">coal_pay_id,</if> |
| | | <if test="name != null and name != ''">name,</if> |
| | | <if test="idCard != null and idCard != ''">id_card,</if> |
| | | <if test="phone != null and phone != ''">phone,</if> |
| | | <if test="sex != null">sex,</if> |
| | | <if test="payCode != null">pay_code,</if> |
| | | <if test="payStatus != null">pay_status,</if> |
| | | <if test="payType != null">pay_type,</if> |
| | | <if test="orderId!=null">order_id,</if> |
| | | <if test="fileData!=null">file_data,</if> |
| | | <if test="govPayStatus!=null">gov_pay_status,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="coalPayId != null">#{coalPayId},</if> |
| | | <if test="name != null and name != ''">#{name},</if> |
| | | <if test="idCard != null and idCard != ''">#{idCard},</if> |
| | | <if test="phone != null and phone != ''">#{phone},</if> |
| | | <if test="sex != null">#{sex},</if> |
| | | <if test="payCode != null">#{payCode},</if> |
| | | <if test="payStatus != null">#{payStatus},</if> |
| | | <if test="payType != null">#{payType},</if> |
| | | <if test="orderId!=null">#{orderId},</if> |
| | | <if test="fileData!=null">#{fileData},</if> |
| | | <if test="govPayStatus!=null">#{govPayStatus},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateByIds"> |
| | | update coal_pay_student set del_flag = 2 where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | <update id="updateCoalPayStudentById"> |
| | | update coal_pay_student |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="coalPayId != null">coal_pay_id = #{coalPayId},</if> |
| | | <if test="name != null and name != ''">name = #{name},</if> |
| | | <if test="idCard != null and idCard != ''">id_card = #{idCard},</if> |
| | | <if test="phone != null and phone != ''">phone = #{phone},</if> |
| | | <if test="sex != null">sex = #{sex},</if> |
| | | <if test="payType != null">pay_type = #{payType},</if> |
| | | <if test="payCode != null">pay_code = #{payCode},</if> |
| | | <if test="payStatus != null">pay_status = #{payStatus},</if> |
| | | <if test="orderId!=null">order_id=#{orderId},</if> |
| | | <if test="fileData!=null">file_data=#{fileData},</if> |
| | | <if test="govPayStatus!=null">gov_pay_status=#{govPayStatus},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <select id="selectByCoalPayId" resultType="com.gkhy.exam.pay.entity.CoalPayStudent"> |
| | | <include refid="selectCoalPayStudentVo"></include> |
| | | where coal_pay_id = #{coalPayId} |
| | | and del_flag =0 |
| | | </select> |
| | | |
| | | <select id="selectByCoalPayIdAndPayStatus" resultType="com.gkhy.exam.pay.entity.CoalPayStudent"> |
| | | <include refid="selectCoalPayStudentVo"></include> |
| | | where coal_pay_id = #{id} and pay_status = #{status} |
| | | and del_flag =0 |
| | | </select> |
| | | |
| | | <select id="selectByIds" resultType="com.gkhy.exam.pay.entity.CoalPayStudent"> |
| | | <include refid="selectCoalPayStudentVo"></include> |
| | | where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <select id="selectByIdcard" resultType="com.gkhy.exam.pay.entity.CoalPayStudent"> |
| | | <include refid="selectCoalPayStudentVo"></include> |
| | | where id_card=#{idCard} and phone=#{phone} and del_flag = 0 |
| | | </select> |
| | | </mapper> |
对比新文件 |
| | |
| | | import com.gkhy.exam.pay.entity.PayReqData; |
| | | import com.gkhy.exam.pay.utils.PayUtils; |
| | | import com.gkhy.exam.pay.utils.ResultVo; |
| | | import com.ruoyi.common.utils.uuid.UUID; |
| | | import lombok.extern.log4j.Log4j2; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.ActiveProfiles; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @SpringBootTest(classes = TextPay.class) |
| | | @ActiveProfiles("dev") |
| | | @Log4j2 |
| | | public class TextPay { |
| | | |
| | | |
| | | @Test |
| | | public void paytext() throws IOException { |
| | | |
| | | |
| | | PayReqData payReqData = new PayReqData(); |
| | | PayReqData.Feedata feedatas = new PayReqData.Feedata(); |
| | | |
| | | payReqData.setDesc("安全技术考试考务费_煤矿安全作业-001504"); |
| | | payReqData.setOrderNo("10000000001"); |
| | | payReqData.setMoney(BigDecimal.valueOf(103)); |
| | | payReqData.setAmount(1); |
| | | payReqData.setPayerName("测试"); |
| | | payReqData.setCertNo("411381199801093991"); |
| | | payReqData.setPayerType(1); |
| | | payReqData.setInvoiceSocialCode("11650000MB1957293J"); |
| | | payReqData.setHandlingPerson("张三"); |
| | | payReqData.setChecker("李四"); |
| | | payReqData.setEnterCode("680534083"); |
| | | |
| | | List<PayReqData.Feedata> feedatas1 = new ArrayList<>(); |
| | | feedatas.setAmount(1); |
| | | feedatas.setBusCode("DZ001504"); |
| | | feedatas.setPrice(BigDecimal.valueOf(103)); |
| | | feedatas1.add(feedatas); |
| | | payReqData.setFeeDatas(feedatas1); |
| | | |
| | | |
| | | ResultVo resultVo = PayUtils.sendApiPost(payReqData); |
| | | System.out.printf("请求结果:"+resultVo); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |