add 项目新增税率,税额,未税金额

收入新增税率
This commit is contained in:
lijiarao
2022-11-08 11:10:58 +08:00
parent 348891896b
commit 5fbb3ce850
11 changed files with 183 additions and 1 deletions
+73 -1
View File
@@ -636,4 +636,76 @@ group by pcp.id,pcpr.id
) pp
where pp.allMoney is not null
and pp.allMoney != 0
order by pp.createTime;
order by pp.createTime;
-- 新增税率
alter table pay_payment_record
add column tax_rate varchar(10) null comment '税率' ;
alter table pay_mail_bill_project
add column tax_rate varchar(10) null comment '税率';
alter table pay_confirm_payment_record
add column tax_rate varchar(10) null comment '税率';
-- 处理历史数据
update pay_payment_record
set tax_rate = ROUND(tax / no_tax_amount, 2);
update pay_mail_bill_project
set tax_rate = ROUND(tax / no_tax_amount, 2);
update pay_confirm_payment_record
set tax_rate = ROUND(tax / no_tax_amount, 2);
-- 新增税率,税额,未税金额
alter table pay_common_project
add column tax_rate varchar(10) null comment '税率',
add column tax decimal(12, 2) default 0 comment '税额',
add column no_tax_amount decimal(12, 2) default 0 comment '未税金额';
alter table pay_working_group_subitem
add column tax_rate varchar(10) null comment '税率',
add column tax decimal(12, 2) default 0 comment '税额',
add column no_tax_amount decimal(12, 2) default 0 comment '未税金额';
alter table pay_member_project_subitem
add column tax_rate varchar(10) null comment '税率',
add column tax decimal(12, 2) default 0 comment '税额',
add column no_tax_amount decimal(12, 2) default 0 comment '未税金额';
alter table pay_meeting_situation
add column tax_rate varchar(10) null comment '税率',
add column tax decimal(12, 2) default 0 comment '税额',
add column no_tax_amount decimal(12, 2) default 0 comment '未税金额';
alter table tb_member_project_subitem
add column tax_rate varchar(10) null comment '税率',
add column tax decimal(12, 2) default 0 comment '税额',
add column no_tax_amount decimal(12, 2) default 0 comment '未税金额';
alter table tb_certificate_payment
add column tax_rate varchar(10) null comment '税率',
add column tax decimal(12, 2) default 0 comment '税额',
add column no_tax_amount decimal(12, 2) default 0 comment '未税金额';
-- 六个项目处理历史数据
update pay_common_project
set tax_rate = 0.06,
no_tax_amount = receivable_amount / 1.06,
tax = receivable_amount - no_tax_amount;
update pay_working_group_subitem
set tax_rate = 0.06,
no_tax_amount = receivable_amount / 1.06,
tax = receivable_amount - no_tax_amount;
update pay_member_project_subitem
set tax_rate = 0.06,
no_tax_amount = amount_receivable / 1.06,
tax = amount_receivable - no_tax_amount;
update pay_meeting_situation
set tax_rate = 0.06,
no_tax_amount = amount_receivable / 1.06,
tax = amount_receivable - no_tax_amount;
update tb_member_project_subitem
set tax_rate = 0.06,
no_tax_amount = amount_receivable / 1.06,
tax = amount_receivable - no_tax_amount;
update tb_certificate_payment
set tax_rate = 0.06,
no_tax_amount = amount_receivable / 1.06,
tax = amount_receivable - no_tax_amount;
@@ -31,6 +31,11 @@ public class PayMailBillVO extends PayMailBill {
@ApiModelProperty(value = "bmpId")
private java.lang.String bmpId;
/**税率*/
@ApiModelProperty(value = "税率")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal taxRate;
/**税额*/
@Excel(name = "税额", width = 15)
@ApiModelProperty(value = "税额")
@@ -52,6 +52,12 @@ public class PayMailBillProject implements Serializable {
@DecimalMax(value = "9999999999.99",message = "开票金额格式错误")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal invoiceAmount;
/**税率*/
@ApiModelProperty(value = "税率")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal taxRate;
/**税额*/
@Excel(name = "税额", width = 15)
@ApiModelProperty(value = "税额")
@@ -498,4 +498,19 @@ public class PayMeetingSituation implements Serializable {
@DecimalMax(value = "9999999999.99",message = "开票金额未税")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal invoiceNoTaxAmount;
/**税率*/
@ApiModelProperty(value = "税率")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal taxRate;
/**税额*/
@ApiModelProperty(value = "税额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal tax;
/**未税金额*/
@ApiModelProperty(value = "未税金额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal noTaxAmount;
}
@@ -335,4 +335,19 @@ public class PayMemberProjectSubitem implements Serializable {
@DecimalMax(value = "9999999999.99",message = "开票金额未税")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal invoiceNoTaxAmount;
/**税率*/
@ApiModelProperty(value = "税率")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal taxRate;
/**税额*/
@ApiModelProperty(value = "税额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal tax;
/**未税金额*/
@ApiModelProperty(value = "未税金额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal noTaxAmount;
}
@@ -329,6 +329,21 @@ public class TbCertificatePayment implements Serializable {
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal invoiceNoTaxAmount;
/**税率*/
@ApiModelProperty(value = "税率")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal taxRate;
/**税额*/
@ApiModelProperty(value = "税额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal tax;
/**未税金额*/
@ApiModelProperty(value = "未税金额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal noTaxAmount;
/**会员缴费金额*/
@ApiModelProperty(value = "会员缴费金额")
private BigDecimal memberPaymentAmount;
@@ -311,4 +311,19 @@ public class TbMemberProjectSubitem implements Serializable {
/**其他缴费金额*/
@ApiModelProperty(value = "其他缴费金额")
private BigDecimal otherPaymentAmount;
/**税率*/
@ApiModelProperty(value = "税率")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal taxRate;
/**税额*/
@ApiModelProperty(value = "税额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal tax;
/**未税金额*/
@ApiModelProperty(value = "未税金额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal noTaxAmount;
}
@@ -105,6 +105,10 @@ public class PayConfirmPaymentRecord implements Serializable {
@ApiModelProperty(value="备注")
private String remark;
/**税率*/
@ApiModelProperty(value = "税率")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal taxRate;
/**税额*/
@ApiModelProperty(value = "税额")
@@ -116,6 +116,11 @@ public class PayPaymentRecord implements Serializable {
@TableField(exist = false)
private Integer paymentMethod;
/**税率*/
@ApiModelProperty(value = "税率")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal taxRate;
/**税额*/
@ApiModelProperty(value = "税额")
@DecimalMax(value = "9999999999.99",message = "税额")
@@ -302,4 +302,19 @@ public class PayCommonProject implements Serializable {
@DecimalMax(value = "9999999999.99",message = "开票金额未税")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal invoiceNoTaxAmount;
/**税率*/
@ApiModelProperty(value = "税率")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal taxRate;
/**税额*/
@ApiModelProperty(value = "税额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal tax;
/**未税金额*/
@ApiModelProperty(value = "未税金额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal noTaxAmount;
}
@@ -438,4 +438,19 @@ public class PayWorkingGroupSubItem implements Serializable {
@DecimalMax(value = "9999999999.99",message = "开票金额未税")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal invoiceNoTaxAmount;
/**税率*/
@ApiModelProperty(value = "税率")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal taxRate;
/**税额*/
@ApiModelProperty(value = "税额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal tax;
/**未税金额*/
@ApiModelProperty(value = "未税金额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal noTaxAmount;
}