5 changed files with 205 additions and 15 deletions
@ -0,0 +1,128 @@ |
|||||
|
package com.qs.serve.modules.tbs.entity; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 申请费率 实体类 |
||||
|
* @author YenHex |
||||
|
* @since 2023-07-02 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("tbs_cost_percent") |
||||
|
public class TbsCostPercent implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
@TableId(type = IdType.AUTO) |
||||
|
private Long id; |
||||
|
|
||||
|
/** 费用申请id */ |
||||
|
@NotNull(message = "费用申请id不能为空") |
||||
|
private Long costApplyId; |
||||
|
|
||||
|
/** 客户费率(年) */ |
||||
|
private BigDecimal ytdCustomerPercent; |
||||
|
|
||||
|
/** 申请人费率(年) */ |
||||
|
private BigDecimal ytdUserPercent; |
||||
|
|
||||
|
/** 行政区域费率(年) */ |
||||
|
private BigDecimal ytdRegion2Percent; |
||||
|
|
||||
|
/** 销售区域费率(年) */ |
||||
|
private BigDecimal ytdRegionPercent; |
||||
|
|
||||
|
/** 预算费率(年) */ |
||||
|
private BigDecimal ytdBudgetPercent; |
||||
|
|
||||
|
/** 客户费率 */ |
||||
|
private BigDecimal qtdCustomerPercent; |
||||
|
|
||||
|
/** 申请人费率 */ |
||||
|
private BigDecimal qtdUserPercent; |
||||
|
|
||||
|
/** 行政区域费率 */ |
||||
|
private BigDecimal qtdRegion2Percent; |
||||
|
|
||||
|
/** 销售区域费率 */ |
||||
|
private BigDecimal qtdRegionPercent; |
||||
|
|
||||
|
/** 预算费率 */ |
||||
|
private BigDecimal qtdBudgetPercent; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
@Length(max = 255,message = "备注长度不能超过255字") |
||||
|
private String remark; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
/** 最后更新时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private LocalDateTime updateTime; |
||||
|
|
||||
|
/** 所属租户 */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String tenantId; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private String createBy; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private String updateBy; |
||||
|
|
||||
|
/** 逻辑删除标记(0:显示;1:隐藏) */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String delFlag; |
||||
|
|
||||
|
|
||||
|
public static TbsCostPercent toNewObject(TbsCostPercent source){ |
||||
|
TbsCostPercent costPercent = new TbsCostPercent(); |
||||
|
costPercent.setId(source.getId()); |
||||
|
costPercent.setCostApplyId(source.getCostApplyId()); |
||||
|
costPercent.setYtdCustomerPercent(source.getYtdCustomerPercent()); |
||||
|
costPercent.setYtdUserPercent(source.getYtdUserPercent()); |
||||
|
costPercent.setYtdRegion2Percent(source.getYtdRegion2Percent()); |
||||
|
costPercent.setYtdRegionPercent(source.getYtdRegionPercent()); |
||||
|
costPercent.setYtdBudgetPercent(source.getYtdBudgetPercent()); |
||||
|
costPercent.setQtdCustomerPercent(source.getQtdCustomerPercent()); |
||||
|
costPercent.setQtdUserPercent(source.getQtdUserPercent()); |
||||
|
costPercent.setQtdRegion2Percent(source.getQtdRegion2Percent()); |
||||
|
costPercent.setQtdRegionPercent(source.getQtdRegionPercent()); |
||||
|
costPercent.setQtdBudgetPercent(source.getQtdBudgetPercent()); |
||||
|
costPercent.setRemark(source.getRemark()); |
||||
|
costPercent.setCreateTime(source.getCreateTime()); |
||||
|
costPercent.setUpdateTime(source.getUpdateTime()); |
||||
|
costPercent.setTenantId(source.getTenantId()); |
||||
|
costPercent.setCreateBy(source.getCreateBy()); |
||||
|
costPercent.setUpdateBy(source.getUpdateBy()); |
||||
|
costPercent.setDelFlag(source.getDelFlag()); |
||||
|
return costPercent; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,19 @@ |
|||||
|
package com.qs.serve.modules.tbs.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qs.serve.modules.tbs.entity.TbsCostPercent; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.apache.ibatis.annotations.Update; |
||||
|
|
||||
|
/** |
||||
|
* 申请费率 Mapper |
||||
|
* @author YenHex |
||||
|
* @date 2023-07-02 |
||||
|
*/ |
||||
|
public interface TbsCostPercentMapper extends BaseMapper<TbsCostPercent> { |
||||
|
|
||||
|
@Update("update tbs_cost_percent set del_flag = 1 where id = #{costId}}") |
||||
|
void delByCostApplyId(@Param("costId")Long costApplyId); |
||||
|
|
||||
|
} |
||||
|
|
Loading…
Reference in new issue