add 证书缴费表

This commit is contained in:
lijiarao
2021-12-14 20:35:02 +08:00
parent 3d0ba038c4
commit f1f9610c3d
7 changed files with 610 additions and 1 deletions
+38 -1
View File
@@ -16,4 +16,41 @@ UPDATE sys_dict_item SET dict_id='1465203901006192642', item_text='待签到', i
INSERT INTO sys_dict_item ( id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time ) VALUES ( '1470604504423297026', '1465203901006192642', '已签到', '7', '', 7, 1, 'LKGLZ', '2021-12-14 12:00:11' );
ALTER TABLE `pay_meeting_situation`
ADD COLUMN `register_process` tinyint(2) NULL COMMENT '报名流程' AFTER `contract_id`;
ADD COLUMN `register_process` tinyint(2) NULL COMMENT '报名流程' AFTER `contract_id`;
-- auto-generated definition
create table tb_certificate_payment
(
id varchar(36) not null comment '主键',
create_by varchar(50) null comment '创建人',
create_time datetime null comment '创建日期',
update_by varchar(50) null comment '更新人',
update_time datetime null comment '更新日期',
project_id varchar(36) charset utf8mb4 null comment '项目id',
bill_number varchar(32) null comment '缴费单号',
company_name varchar(100) null comment '单位全称',
payment_type int null comment '缴费类型',
payment_amount double(50, 2) null comment '缴费金额',
payment_time int null comment '缴费时长',
submission_time datetime null comment '缴费时间',
check_time datetime null comment '核对时间',
payment_status int null comment '缴费状态',
payment_method int null comment '缴费方式',
payment_record varchar(100) null comment '缴费记录',
member_id varchar(32) null comment '会员id',
check_result int null comment '审核结果',
check_mark varchar(1000) null comment '备注',
bind int(10) null comment '绑定vin证书',
amount_receivable decimal(12, 2) null comment '应收金额',
paid_amount decimal(12, 2) null comment '实收金额',
certificate_id varchar(32) null comment '证书id',
pack tinyint(1) null comment '打包',
invoice_requirements tinyint(1) null comment '需要发票',
in_account tinyint(1) null comment '到账',
make_invoice tinyint(1) null comment '开票',
mail tinyint(1) null comment '邮寄',
charge_use tinyint(1) default 3 null comment '来款用途(字典表)',
invoice_amount decimal(12, 2) null comment '开票金额'
)
comment '标协会员证书缴费表' charset = utf8;
@@ -0,0 +1,171 @@
package com.jero.member.controller;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.member.entity.TbCertificatePayment;
import com.jero.member.service.ITbCertificatePaymentService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
/**
* @Description: 证书缴费表
* @Author: jero-boot
* @Date: 2021-12-14
* @Version: V1.0
*/
@Api(tags="证书缴费表")
@RestController
@RequestMapping("/member/tbCertificatePayment")
@Slf4j
public class TbCertificatePaymentController extends JeroController<TbCertificatePayment, ITbCertificatePaymentService> {
@Autowired
private ITbCertificatePaymentService tbCertificatePaymentService;
/**
* 分页列表查询
*
* @param tbCertificatePayment
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "证书缴费表-分页列表查询")
@ApiOperation(value="证书缴费表-分页列表查询", notes="证书缴费表-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(TbCertificatePayment tbCertificatePayment,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TbCertificatePayment> queryWrapper = QueryGenerator.initQueryWrapper(tbCertificatePayment, req.getParameterMap());
Page<TbCertificatePayment> page = new Page<TbCertificatePayment>(pageNo, pageSize);
IPage<TbCertificatePayment> pageList = tbCertificatePaymentService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "证书缴费表-列表查询")
@ApiOperation(value="证书缴费表-列表查询", notes="证书缴费表-列表查询")
@GetMapping(value = "/list")
public Result<List<TbCertificatePayment>> queryList() {
List<TbCertificatePayment> list = tbCertificatePaymentService.queryList();
return Result.OK(list);
}
/**
* 添加
*
* @param tbCertificatePayment
* @return
*/
@AutoLog(value = "证书缴费表-添加")
@ApiOperation(value="证书缴费表-添加", notes="证书缴费表-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody TbCertificatePayment tbCertificatePayment) {
tbCertificatePaymentService.add(tbCertificatePayment);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param tbCertificatePayment
* @return
*/
@AutoLog(value = "证书缴费表-编辑")
@ApiOperation(value="证书缴费表-编辑", notes="证书缴费表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody TbCertificatePayment tbCertificatePayment) {
tbCertificatePaymentService.editById(tbCertificatePayment);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "证书缴费表-通过id删除")
@ApiOperation(value="证书缴费表-通过id删除", notes="证书缴费表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
tbCertificatePaymentService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "证书缴费表-批量删除")
@ApiOperation(value="证书缴费表-批量删除", notes="证书缴费表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.tbCertificatePaymentService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "证书缴费表-通过id查询")
@ApiOperation(value="证书缴费表-通过id查询", notes="证书缴费表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
TbCertificatePayment tbCertificatePayment = tbCertificatePaymentService.queryById(id);
if(tbCertificatePayment==null) {
return Result.error("未找到对应数据");
}
return Result.OK(tbCertificatePayment);
}
/**
* 导出excel
*
* @param request
* @param tbCertificatePayment
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TbCertificatePayment tbCertificatePayment) {
return super.exportXls(request, tbCertificatePayment, TbCertificatePayment.class, "证书缴费表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TbCertificatePayment.class);
}
}
@@ -0,0 +1,230 @@
package com.jero.member.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.NotNull;
/**
* @Description: 证书缴费表
* @Author: jero-boot
* @Date: 2021-12-14
* @Version: V1.0
*/
@Data
@TableName("tb_certificate_payment")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tb_certificate_payment对象", description="证书缴费表")
public class TbCertificatePayment implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**项目id*/
@Excel(name = "项目名称", width = 15 ,dictTable = "tb_member_project", dicText = "project_name", dicCode = "id")
@ApiModelProperty(value = "项目id")
private String projectId;
/**缴费单号*/
@Excel(name = "缴费单号", width = 15)
@ApiModelProperty(value = "缴费单号")
private String billNumber;
/**单位全称*/
@Excel(name = "单位全称", width = 15)
@ApiModelProperty(value = "单位全称")
private String companyName;
/**缴费类型*/
@Excel(name = "缴费类型", width = 15)
@ApiModelProperty(value = "缴费类型")
private Integer paymentType;
/**缴费金额*/
@Excel(name = "缴费金额", width = 15)
@ApiModelProperty(value = "缴费金额")
private Double paymentAmount;
/**缴费时长*/
@Excel(name = "缴费时长", width = 15)
@ApiModelProperty(value = "缴费时长")
private Integer paymentTime;
/**缴费时间*/
@Excel(name = "缴费时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "缴费时间")
private java.util.Date submissionTime;
/**核对时间*/
@Excel(name = "核对时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "核对时间")
private java.util.Date checkTime;
/**缴费状态*/
@Excel(name = "缴费状态", width = 15)
@ApiModelProperty(value = "缴费状态")
private Integer paymentStatus;
/**缴费记录*/
@Excel(name = "缴费记录", width = 15)
@ApiModelProperty(value = "缴费记录")
private String paymentRecord;
/**会员id*/
@Excel(name = "会员id", width = 15)
@ApiModelProperty(value = "会员id")
private String memberId;
/**审核结果*/
@Excel(name = "审核结果", width = 15)
@ApiModelProperty(value = "审核结果")
private Integer checkResult;
/**备注*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
private String checkMark;
/**绑定vin证书*/
@Excel(name = "绑定vin证书", width = 15)
@ApiModelProperty(value = "绑定vin证书")
private Integer bind;
/**证书id*/
@Excel(name = "证书id", width = 15)
@ApiModelProperty(value = "证书id")
private String certificateId;
/**
* 应收金额
*/
@Excel(name = "应收金额", width = 15)
@ApiModelProperty(value = "应收金额")
@NotNull(message = "应收金额不能为空")
@DecimalMax(value = "9999999999.99", message = "应收金额格式错误")
private BigDecimal amountReceivable;
/**
* 实收金额
*/
@Excel(name = "实收金额", width = 15)
@ApiModelProperty(value = "实收金额")
@DecimalMax(value = "9999999999.99", message = "实收金额格式错误")
private BigDecimal paidAmount;
/**打包*/
@Excel(name = "打包", width = 15,dicCode = "yn")
@ApiModelProperty(value = "打包")
private Integer pack;
/**需要发票*/
@Excel(name = "需要发票", width = 15,dicCode = "invoice_type")
@ApiModelProperty(value = "需要发票")
private Integer invoiceRequirements;
/**到账*/
@Excel(name = "到账", width = 15,dicCode = "account_type")
@ApiModelProperty(value = "到账")
private Integer inAccount;
/**开票*/
@Excel(name = "开票", width = 15,dicCode = "make_invoice_type")
@ApiModelProperty(value = "开票")
private Integer makeInvoice;
/**邮寄*/
@Excel(name = "邮寄", width = 15,dicCode = "mail_type")
@ApiModelProperty(value = "邮寄")
private Integer mail;
/**来款用途(字典表)*/
@ApiModelProperty(value = "来款用途(字典表)")
private String chargeUse;
/**缴费方式*/
@Excel(name = "缴费方式", width = 15,dicCode = "meeting_pay_type")
@Dict(dicCode = "meeting_pay_type")
private Integer paymentMethod;
/**开票金额*/
@Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额")
@DecimalMax(value = "9999999999.99",message = "开票金额格式错误")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal invoiceAmount;
/**项目名称*/
@ApiModelProperty(value = "项目名称")
@TableField(exist = false)
private String projectName;
/**
* 项目类型
*/
@TableField(exist = false)
@ApiModelProperty(value = "项目类型")
private Integer projectType;
}
@@ -0,0 +1,17 @@
package com.jero.member.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.jero.member.entity.TbCertificatePayment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 证书缴费表
* @Author: jero-boot
* @Date: 2021-12-14
* @Version: V1.0
*/
public interface TbCertificatePaymentMapper extends BaseMapper<TbCertificatePayment> {
}
@@ -0,0 +1,26 @@
<?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.jero.member.mapper.TbCertificatePaymentMapper">
<resultMap id="TbCertificatePaymentResultMap" type="com.jero.member.entity.TbCertificatePayment">
<id column="id" property="id" />
<result column="create_by" property="createBy" />
<result column="create_time" property="createTime" />
<result column="update_by" property="updateBy" />
<result column="update_time" property="updateTime" />
<result column="bill_number" property="billNumber" />
<result column="company_name" property="companyName" />
<result column="payment_type" property="paymentType" />
<result column="payment_amount" property="paymentAmount" />
<result column="payment_time" property="paymentTime" />
<result column="submission_time" property="submissionTime" />
<result column="check_time" property="checkTime" />
<result column="payment_status" property="paymentStatus" />
<result column="payment_method" property="paymentMethod" />
<result column="payment_record" property="paymentRecord" />
<result column="member_id" property="memberId" />
<result column="check_result" property="checkResult" />
<result column="check_mark" property="checkMark" />
<result column="bind" property="bind" />
<result column="certificate_id" property="certificateId" />
</resultMap>
</mapper>
@@ -0,0 +1,44 @@
package com.jero.member.service;
import com.jero.member.entity.TbCertificatePayment;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 证书缴费表
* @Author: jero-boot
* @Date: 2021-12-14
* @Version: V1.0
*/
public interface ITbCertificatePaymentService extends IService<TbCertificatePayment> {
/**
* 保存
*/
void add(TbCertificatePayment tbCertificatePayment);
/**
* 更新
*/
void editById(TbCertificatePayment tbCertificatePayment);
/**
* 通过id删除
*/
void deleteById(String id);
/**
* 批量删除
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*/
TbCertificatePayment queryById(String id);
/**
* 列表查询
*/
List<TbCertificatePayment> queryList();
}
@@ -0,0 +1,84 @@
package com.jero.member.service.impl;
import com.jero.member.entity.TbCertificatePayment;
import com.jero.member.mapper.TbCertificatePaymentMapper;
import com.jero.member.service.ITbCertificatePaymentService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 证书缴费表
* @Author: jero-boot
* @Date: 2021-12-14
* @Version: V1.0
*/
@Service
public class TbCertificatePaymentServiceImpl extends ServiceImpl<TbCertificatePaymentMapper, TbCertificatePayment> implements ITbCertificatePaymentService {
/**
* 保存
*
* @param tbCertificatePayment
* @return
*/
@Override
public void add(TbCertificatePayment tbCertificatePayment) {
save(tbCertificatePayment);
}
/**
* 更新
*
* @param tbCertificatePayment
* @return
*/
@Override
public void editById(TbCertificatePayment tbCertificatePayment) {
saveOrUpdate(tbCertificatePayment);
}
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
public void deleteById(String id) {
removeById(id);
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
public TbCertificatePayment queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<TbCertificatePayment> queryList() {
return list();
}
}