38 changed files with 1809 additions and 2 deletions
@ -0,0 +1,21 @@ |
|||
package com.qs.serve.modules.vtb.common; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Getter; |
|||
|
|||
/** |
|||
* @author YenHex |
|||
* @since 2022/11/24 |
|||
*/ |
|||
@Getter |
|||
@AllArgsConstructor |
|||
public enum VtbVerificationState { |
|||
|
|||
Commit(0), |
|||
Success(1), |
|||
Fail(2), |
|||
Rollback(3); |
|||
|
|||
private Integer code; |
|||
|
|||
} |
@ -0,0 +1,125 @@ |
|||
package com.qs.serve.modules.vtb.controller; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.qs.serve.common.model.annotation.SysLog; |
|||
import com.qs.serve.common.model.dto.PageVo; |
|||
import com.qs.serve.common.model.dto.R; |
|||
import com.qs.serve.common.model.enums.BizType; |
|||
import com.qs.serve.common.model.enums.SystemModule; |
|||
import com.qs.serve.common.util.PageUtil; |
|||
import com.qs.serve.common.util.CopierUtil; |
|||
import com.qs.serve.common.util.StringUtils; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import com.qs.serve.modules.vtb.entity.so.VtbVerificationSo; |
|||
import com.qs.serve.modules.vtb.entity.bo.VtbVerificationBo; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerification; |
|||
import com.qs.serve.modules.vtb.service.VtbVerificationService; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 核销 核销 |
|||
* @author YenHex |
|||
* @since 2022-11-24 |
|||
*/ |
|||
@Slf4j |
|||
@AllArgsConstructor |
|||
@RestController |
|||
@RequestMapping("vtb/verification") |
|||
public class VtbVerificationController { |
|||
|
|||
private VtbVerificationService vtbVerificationService; |
|||
|
|||
/** |
|||
* 列表 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
//@GetMapping("/list")
|
|||
@PreAuthorize("hasRole('vtb:verification:query')") |
|||
public R<List<VtbVerification>> getList(VtbVerificationSo param){ |
|||
VtbVerification entity = CopierUtil.copy(param,new VtbVerification()); |
|||
LambdaQueryWrapper<VtbVerification> lqw = new LambdaQueryWrapper<>(entity); |
|||
PageUtil.startPage(); |
|||
List<VtbVerification> list = vtbVerificationService.list(lqw); |
|||
return R.ok(list); |
|||
} |
|||
|
|||
/** |
|||
* 翻页 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
//@GetMapping("/page")
|
|||
@PreAuthorize("hasRole('vtb:verification:query')") |
|||
public R<PageVo<VtbVerification>> getPage(VtbVerificationSo param){ |
|||
VtbVerification entity = CopierUtil.copy(param,new VtbVerification()); |
|||
LambdaQueryWrapper<VtbVerification> lqw = new LambdaQueryWrapper<>(entity); |
|||
PageUtil.startPage(); |
|||
List<VtbVerification> list = vtbVerificationService.list(lqw); |
|||
return R.byPageHelperList(list); |
|||
} |
|||
|
|||
/** |
|||
* ID查询 |
|||
* @param id |
|||
* @return |
|||
*/ |
|||
//@GetMapping("/getById/{id}")
|
|||
@SysLog(module = SystemModule.Verification, title = "核销", biz = BizType.QUERY) |
|||
@PreAuthorize("hasRole('vtb:verification:query')") |
|||
public R<VtbVerification> getById(@PathVariable("id") String id){ |
|||
VtbVerification vtbVerification = vtbVerificationService.getById(id); |
|||
return R.ok(vtbVerification); |
|||
} |
|||
|
|||
|
|||
|
|||
/** |
|||
* 更新 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
//@PostMapping("/updateById")
|
|||
@SysLog(module = SystemModule.Verification, title = "核销", biz = BizType.UPDATE) |
|||
@PreAuthorize("hasRole('vtb:verification:update')") |
|||
public R<?> updateById(@RequestBody @Valid VtbVerificationBo param){ |
|||
vtbVerificationService.commit(param); |
|||
return R.ok(); |
|||
} |
|||
|
|||
/** |
|||
* 新增 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
//@PostMapping("/save")
|
|||
@SysLog(module = SystemModule.Verification, title = "核销", biz = BizType.INSERT) |
|||
@PreAuthorize("hasRole('vtb:verification:insert')") |
|||
public R<?> save(@RequestBody @Valid VtbVerificationBo param){ |
|||
VtbVerification entity = CopierUtil.copy(param,new VtbVerification()); |
|||
boolean result = vtbVerificationService.save(entity); |
|||
return R.isTrue(result); |
|||
} |
|||
|
|||
/** |
|||
* 删除 |
|||
* @param ids |
|||
* @return |
|||
*/ |
|||
@DeleteMapping("/deleteById/{ids}") |
|||
@SysLog(module = SystemModule.Verification, title = "核销", biz = BizType.DELETE) |
|||
@PreAuthorize("hasRole('vtb:verification:delete')") |
|||
public R<?> deleteById(@PathVariable("ids") String ids){ |
|||
List<Long> idsLong = StringUtils.splitIdLong(ids); |
|||
boolean result = vtbVerificationService.removeByIds(idsLong); |
|||
return R.isTrue(result); |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,81 @@ |
|||
package com.qs.serve.modules.vtb.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 com.qs.serve.common.framework.mybatis.handler.meta.SplitStringTypeHandler; |
|||
import lombok.Data; |
|||
import org.apache.ibatis.type.JdbcType; |
|||
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 2022-11-24 |
|||
*/ |
|||
@Data |
|||
@TableName(value = "vtb_verification",autoResultMap = true) |
|||
public class VtbVerification implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 活动id */ |
|||
private Long activityId; |
|||
|
|||
/** 附件id */ |
|||
@TableField(typeHandler = SplitStringTypeHandler.class,jdbcType= JdbcType.VARCHAR) |
|||
private String[] attachIds; |
|||
|
|||
/** 核销状态 */ |
|||
private Integer verificationState; |
|||
|
|||
/** 备注 */ |
|||
@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; |
|||
|
|||
} |
|||
|
@ -0,0 +1,155 @@ |
|||
package com.qs.serve.modules.vtb.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 2022-11-24 |
|||
*/ |
|||
@Data |
|||
@TableName("vtb_verification_center_goods") |
|||
public class VtbVerificationCenterGoods implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 核销id */ |
|||
@NotNull(message = "核销id不能为空") |
|||
private Long verificationId; |
|||
|
|||
/** 核销状态 */ |
|||
@NotNull(message = "核销状态不能为空") |
|||
private Integer verification_state; |
|||
|
|||
/** 成本明细编码 */ |
|||
@NotBlank(message = "成本明细编码不能为空") |
|||
@Length(max = 30,message = "成本明细编码长度不能超过30字") |
|||
private String centerGoodsCode; |
|||
|
|||
/** 费用申请id */ |
|||
@NotNull(message = "费用申请id不能为空") |
|||
private Long costApplyId; |
|||
|
|||
/** 活动id */ |
|||
@NotNull(message = "活动id不能为空") |
|||
private Long activityId; |
|||
|
|||
/** 科目id */ |
|||
@NotNull(message = "科目id不能为空") |
|||
private Long subjectId; |
|||
|
|||
/** 科目编码 */ |
|||
@NotBlank(message = "科目编码不能为空") |
|||
@Length(max = 50,message = "科目编码长度不能超过50字") |
|||
private String subjectCode; |
|||
|
|||
/** 科目名称 */ |
|||
@NotBlank(message = "科目名称不能为空") |
|||
@Length(max = 50,message = "科目名称长度不能超过50字") |
|||
private String subjectName; |
|||
|
|||
/** 成本中心类型 */ |
|||
@NotBlank(message = "成本中心类型不能为空") |
|||
@Length(max = 50,message = "成本中心类型长度不能超过50字") |
|||
private String centerType; |
|||
|
|||
/** 成本中心id */ |
|||
@NotBlank(message = "成本中心id不能为空") |
|||
@Length(max = 32,message = "成本中心id长度不能超过32字") |
|||
private String centerId; |
|||
|
|||
/** 成本中心编码 */ |
|||
@NotBlank(message = "成本中心编码不能为空") |
|||
@Length(max = 50,message = "成本中心编码长度不能超过50字") |
|||
private String centerCode; |
|||
|
|||
/** 成本中心名称 */ |
|||
@NotBlank(message = "成本中心名称不能为空") |
|||
@Length(max = 50,message = "成本中心名称长度不能超过50字") |
|||
private String centerName; |
|||
|
|||
/** 已用费用 */ |
|||
@NotNull(message = "已用费用不能为空") |
|||
private BigDecimal usedAmount; |
|||
|
|||
/** 目标类型(brand、category、series、spu、sku) */ |
|||
@NotBlank(message = "目标类型(brand、category、series、spu、sku)不能为空") |
|||
@Length(max = 30,message = "目标类型(brand、category、series、spu、sku)长度不能超过30字") |
|||
private String targetType; |
|||
|
|||
/** 目标id */ |
|||
@NotNull(message = "目标id不能为空") |
|||
private Long targetId; |
|||
|
|||
/** 目标编码 */ |
|||
@NotBlank(message = "目标编码不能为空") |
|||
@Length(max = 30,message = "目标编码长度不能超过30字") |
|||
private String targetCode; |
|||
|
|||
/** 目标名称 */ |
|||
@NotBlank(message = "目标名称不能为空") |
|||
@Length(max = 30,message = "目标名称长度不能超过30字") |
|||
private String targetName; |
|||
|
|||
/** 目标等级路径 */ |
|||
@Length(max = 600,message = "目标等级路径长度不能超过600字") |
|||
private String targetLevelPathIds; |
|||
|
|||
/** 目标等级路径 */ |
|||
@Length(max = 600,message = "目标等级路径长度不能超过600字") |
|||
private String targetLevelPathNames; |
|||
|
|||
/** 备注 */ |
|||
@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; |
|||
|
|||
} |
|||
|
@ -0,0 +1,103 @@ |
|||
package com.qs.serve.modules.vtb.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 2022-11-24 |
|||
*/ |
|||
@Data |
|||
@TableName("vtb_verification_channel") |
|||
public class VtbVerificationChannel implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 核算id */ |
|||
@NotNull(message = "核算id不能为空") |
|||
private Long verificationId; |
|||
|
|||
/** 费用申请id */ |
|||
@NotNull(message = "费用申请id不能为空") |
|||
private Long costApplyId; |
|||
|
|||
/** 活动id */ |
|||
@NotNull(message = "活动id不能为空") |
|||
private Long activityId; |
|||
|
|||
/** 渠道id */ |
|||
@NotNull(message = "渠道id不能为空") |
|||
private Long channelId; |
|||
|
|||
/** 渠道编码 */ |
|||
@NotBlank(message = "渠道编码不能为空") |
|||
@Length(max = 50,message = "渠道编码长度不能超过50字") |
|||
private String channelCode; |
|||
|
|||
/** 渠道名称 */ |
|||
@NotBlank(message = "渠道名称不能为空") |
|||
@Length(max = 50,message = "渠道名称长度不能超过50字") |
|||
private String channelName; |
|||
|
|||
/** 渠道费用占比 */ |
|||
@NotNull(message = "渠道费用占比不能为空") |
|||
private BigDecimal channelRate; |
|||
|
|||
/** 预计头发网点数量 */ |
|||
@NotNull(message = "预计头发网点数量不能为空") |
|||
private Integer preCountPoint; |
|||
|
|||
/** 备注 */ |
|||
@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; |
|||
|
|||
} |
|||
|
@ -0,0 +1,113 @@ |
|||
package com.qs.serve.modules.vtb.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 2022-11-24 |
|||
*/ |
|||
@Data |
|||
@TableName("vtb_verification_channel_point") |
|||
public class VtbVerificationChannelPoint implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 核算id */ |
|||
@NotNull(message = "核算id不能为空") |
|||
private Long verificationId; |
|||
|
|||
/** 费用申请id */ |
|||
@NotNull(message = "费用申请id不能为空") |
|||
private Long costApplyId; |
|||
|
|||
/** 活动id */ |
|||
@NotNull(message = "活动id不能为空") |
|||
private Long activityId; |
|||
|
|||
/** 渠道id */ |
|||
@NotNull(message = "渠道id不能为空") |
|||
private Long channelId; |
|||
|
|||
/** 渠道编码 */ |
|||
@NotBlank(message = "渠道编码不能为空") |
|||
@Length(max = 50,message = "渠道编码长度不能超过50字") |
|||
private String channelCode; |
|||
|
|||
/** 渠道名称 */ |
|||
@NotBlank(message = "渠道名称不能为空") |
|||
@Length(max = 50,message = "渠道名称长度不能超过50字") |
|||
private String channelName; |
|||
|
|||
/** 网点id */ |
|||
@NotNull(message = "网点id不能为空") |
|||
private Long pointId; |
|||
|
|||
/** 网点编码 */ |
|||
@NotBlank(message = "网点编码不能为空") |
|||
@Length(max = 50,message = "网点编码长度不能超过50字") |
|||
private String pointCode; |
|||
|
|||
/** 网点名称 */ |
|||
@NotBlank(message = "网点名称不能为空") |
|||
@Length(max = 50,message = "网点名称长度不能超过50字") |
|||
private String pointName; |
|||
|
|||
/** 网点费用占比 */ |
|||
@NotNull(message = "网点费用占比不能为空") |
|||
private BigDecimal pointRate; |
|||
|
|||
/** 备注 */ |
|||
@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; |
|||
|
|||
} |
|||
|
@ -0,0 +1,107 @@ |
|||
package com.qs.serve.modules.vtb.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 2022-11-24 |
|||
*/ |
|||
@Data |
|||
@TableName("vtb_verification_subject") |
|||
public class VtbVerificationSubject implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 核算id */ |
|||
@NotNull(message = "核算id不能为空") |
|||
private Long verificationId; |
|||
|
|||
/** 费用申请id */ |
|||
@NotNull(message = "费用申请id不能为空") |
|||
private Long costApplyId; |
|||
|
|||
/** 活动id */ |
|||
@NotNull(message = "活动id不能为空") |
|||
private Long activityId; |
|||
|
|||
/** 科目id */ |
|||
@NotNull(message = "科目id不能为空") |
|||
private Long subjectId; |
|||
|
|||
/** 科目编码 */ |
|||
@NotBlank(message = "科目编码不能为空") |
|||
@Length(max = 50,message = "科目编码长度不能超过50字") |
|||
private String subjectCode; |
|||
|
|||
/** 科目名称 */ |
|||
@NotBlank(message = "科目名称不能为空") |
|||
@Length(max = 50,message = "科目名称长度不能超过50字") |
|||
private String subjectName; |
|||
|
|||
/** 本次核销额 */ |
|||
@NotNull(message = "本次核销额不能为空") |
|||
private BigDecimal usedAmount; |
|||
|
|||
/** 场次 */ |
|||
@NotNull(message = "场次不能为空") |
|||
private Integer countSession; |
|||
|
|||
/** 人数 */ |
|||
@NotNull(message = "人数不能为空") |
|||
private Integer countPerson; |
|||
|
|||
/** 备注 */ |
|||
@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; |
|||
|
|||
} |
|||
|
@ -0,0 +1,52 @@ |
|||
package com.qs.serve.modules.vtb.entity.bo; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
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; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 核销 Bo |
|||
* @author YenHex |
|||
* @since 2022-11-24 |
|||
*/ |
|||
@Data |
|||
public class VtbVerificationBo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** 活动id */ |
|||
private Long activityId; |
|||
|
|||
/** 附件id */ |
|||
private String[] attachIds; |
|||
|
|||
/** 备注 */ |
|||
private String remark; |
|||
|
|||
/** 渠道 */ |
|||
private List<VtbVerificationChannelBo> channelList; |
|||
|
|||
/** 网点 */ |
|||
private List<VtbVerificationChannelPointBo> pointList; |
|||
|
|||
/** 科目 */ |
|||
private List<VtbVerificationSubjectBo> subjectList; |
|||
|
|||
} |
|||
|
@ -0,0 +1,145 @@ |
|||
package com.qs.serve.modules.vtb.entity.bo; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
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; |
|||
|
|||
/** |
|||
* 核销费用项 Bo |
|||
* @author YenHex |
|||
* @since 2022-11-24 |
|||
*/ |
|||
@Data |
|||
public class VtbVerificationCenterGoodsBo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** 核销id */ |
|||
@NotNull(message = "核销id不能为空") |
|||
private Long verificationId; |
|||
|
|||
/** 核销状态 */ |
|||
private Integer verificationState; |
|||
|
|||
/** 成本明细编码 */ |
|||
@NotBlank(message = "成本明细编码不能为空") |
|||
@Length(max = 30,message = "成本明细编码长度不能超过30字") |
|||
private String centerGoodsCode; |
|||
|
|||
/** 费用申请id */ |
|||
@NotNull(message = "费用申请id不能为空") |
|||
private Long costApplyId; |
|||
|
|||
/** 活动id */ |
|||
@NotNull(message = "活动id不能为空") |
|||
private Long activityId; |
|||
|
|||
/** 科目id */ |
|||
@NotNull(message = "科目id不能为空") |
|||
private Long subjectId; |
|||
|
|||
/** 科目编码 */ |
|||
@NotBlank(message = "科目编码不能为空") |
|||
@Length(max = 50,message = "科目编码长度不能超过50字") |
|||
private String subjectCode; |
|||
|
|||
/** 科目名称 */ |
|||
@NotBlank(message = "科目名称不能为空") |
|||
@Length(max = 50,message = "科目名称长度不能超过50字") |
|||
private String subjectName; |
|||
|
|||
/** 成本中心类型 */ |
|||
@NotBlank(message = "成本中心类型不能为空") |
|||
@Length(max = 50,message = "成本中心类型长度不能超过50字") |
|||
private String centerType; |
|||
|
|||
/** 成本中心id */ |
|||
@NotBlank(message = "成本中心id不能为空") |
|||
@Length(max = 32,message = "成本中心id长度不能超过32字") |
|||
private String centerId; |
|||
|
|||
/** 成本中心编码 */ |
|||
@NotBlank(message = "成本中心编码不能为空") |
|||
@Length(max = 50,message = "成本中心编码长度不能超过50字") |
|||
private String centerCode; |
|||
|
|||
/** 成本中心名称 */ |
|||
@NotBlank(message = "成本中心名称不能为空") |
|||
@Length(max = 50,message = "成本中心名称长度不能超过50字") |
|||
private String centerName; |
|||
|
|||
/** 已用费用 */ |
|||
@NotNull(message = "已用费用不能为空") |
|||
private BigDecimal usedAmount; |
|||
|
|||
/** 目标类型(brand、category、series、spu、sku) */ |
|||
@NotBlank(message = "目标类型(brand、category、series、spu、sku)不能为空") |
|||
@Length(max = 30,message = "目标类型(brand、category、series、spu、sku)长度不能超过30字") |
|||
private String targetType; |
|||
|
|||
/** 目标id */ |
|||
@NotNull(message = "目标id不能为空") |
|||
private Long targetId; |
|||
|
|||
/** 目标编码 */ |
|||
@NotBlank(message = "目标编码不能为空") |
|||
@Length(max = 30,message = "目标编码长度不能超过30字") |
|||
private String targetCode; |
|||
|
|||
/** 目标名称 */ |
|||
@NotBlank(message = "目标名称不能为空") |
|||
@Length(max = 30,message = "目标名称长度不能超过30字") |
|||
private String targetName; |
|||
|
|||
/** 目标等级路径 */ |
|||
@Length(max = 600,message = "目标等级路径长度不能超过600字") |
|||
private String targetLevelPathIds; |
|||
|
|||
/** 目标等级路径 */ |
|||
@Length(max = 600,message = "目标等级路径长度不能超过600字") |
|||
private String targetLevelPathNames; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 255,message = "备注长度不能超过255字") |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 所属租户 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String delFlag; |
|||
|
|||
} |
|||
|
@ -0,0 +1,45 @@ |
|||
package com.qs.serve.modules.vtb.entity.bo; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
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; |
|||
|
|||
/** |
|||
* 核销渠道项 Bo |
|||
* @author YenHex |
|||
* @since 2022-11-24 |
|||
*/ |
|||
@Data |
|||
public class VtbVerificationChannelBo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 渠道id */ |
|||
@NotNull(message = "渠道id不能为空") |
|||
private Long channelId; |
|||
|
|||
/** 渠道费用占比 */ |
|||
@NotNull(message = "渠道费用占比不能为空") |
|||
private BigDecimal channelRate; |
|||
|
|||
/** 预计投放网点数量 */ |
|||
@NotNull(message = "预计投放网点数量不能为空") |
|||
private Integer preCountPoint; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 255,message = "备注长度不能超过255字") |
|||
private String remark; |
|||
|
|||
} |
|||
|
@ -0,0 +1,39 @@ |
|||
package com.qs.serve.modules.vtb.entity.bo; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
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; |
|||
|
|||
/** |
|||
* 核销网点项 Bo |
|||
* @author YenHex |
|||
* @since 2022-11-24 |
|||
*/ |
|||
@Data |
|||
public class VtbVerificationChannelPointBo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 网点id */ |
|||
@NotNull(message = "网点id不能为空") |
|||
private Long pointId; |
|||
|
|||
/** 网点费用占比 */ |
|||
@NotNull(message = "网点费用占比不能为空") |
|||
private BigDecimal pointRate; |
|||
|
|||
private String remark; |
|||
|
|||
} |
|||
|
@ -0,0 +1,48 @@ |
|||
package com.qs.serve.modules.vtb.entity.bo; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
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; |
|||
|
|||
/** |
|||
* 核销科目费用 Bo |
|||
* @author YenHex |
|||
* @since 2022-11-24 |
|||
*/ |
|||
@Data |
|||
public class VtbVerificationSubjectBo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 科目id */ |
|||
private Long subjectId; |
|||
|
|||
/** 场次 */ |
|||
@NotNull(message = "场次不能为空") |
|||
private Integer countSession; |
|||
|
|||
/** 人数 */ |
|||
@NotNull(message = "人数不能为空") |
|||
private Integer countPerson; |
|||
|
|||
/** 费用额 */ |
|||
@NotNull(message = "费用额不能为空") |
|||
private BigDecimal amount; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 255,message = "备注长度不能超过255字") |
|||
private String remark; |
|||
|
|||
} |
|||
|
@ -0,0 +1,116 @@ |
|||
package com.qs.serve.modules.vtb.entity.so; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
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 2022-11-24 |
|||
*/ |
|||
@Data |
|||
public class VtbVerificationCenterGoodsSo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** 核销id */ |
|||
private Long verificationId; |
|||
|
|||
/** 核销状态 */ |
|||
private Integer verficarionState; |
|||
|
|||
/** 成本明细编码 */ |
|||
private String centerGoodsCode; |
|||
|
|||
/** 费用申请id */ |
|||
private Long costApplyId; |
|||
|
|||
/** 活动id */ |
|||
private Long activityId; |
|||
|
|||
/** 科目id */ |
|||
private Long subjectId; |
|||
|
|||
/** 科目编码 */ |
|||
private String subjectCode; |
|||
|
|||
/** 科目名称 */ |
|||
private String subjectName; |
|||
|
|||
/** 成本中心类型 */ |
|||
private String centerType; |
|||
|
|||
/** 成本中心id */ |
|||
private String centerId; |
|||
|
|||
/** 成本中心编码 */ |
|||
private String centerCode; |
|||
|
|||
/** 成本中心名称 */ |
|||
private String centerName; |
|||
|
|||
/** 已用费用 */ |
|||
private BigDecimal usedAmount; |
|||
|
|||
/** 目标类型(brand、category、series、spu、sku) */ |
|||
private String targetType; |
|||
|
|||
/** 目标id */ |
|||
private Long targetId; |
|||
|
|||
/** 目标编码 */ |
|||
private String targetCode; |
|||
|
|||
/** 目标名称 */ |
|||
private String targetName; |
|||
|
|||
/** 目标等级路径 */ |
|||
private String targetLevelPathIds; |
|||
|
|||
/** 目标等级路径 */ |
|||
private String targetLevelPathNames; |
|||
|
|||
/** 备注 */ |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 所属租户 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String delFlag; |
|||
|
|||
} |
|||
|
@ -0,0 +1,86 @@ |
|||
package com.qs.serve.modules.vtb.entity.so; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
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 2022-11-24 |
|||
*/ |
|||
@Data |
|||
public class VtbVerificationChannelPointSo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** 费用申请id */ |
|||
private Long costApplyId; |
|||
|
|||
/** 活动id */ |
|||
private Long activityId; |
|||
|
|||
/** 渠道id */ |
|||
private Long channelId; |
|||
|
|||
/** 渠道编码 */ |
|||
private String channelCode; |
|||
|
|||
/** 渠道名称 */ |
|||
private String channelName; |
|||
|
|||
/** 网点id */ |
|||
private Long pointId; |
|||
|
|||
/** 网点编码 */ |
|||
private String pointCode; |
|||
|
|||
/** 网点名称 */ |
|||
private String pointName; |
|||
|
|||
/** 网点费用占比 */ |
|||
private BigDecimal pointRate; |
|||
|
|||
/** 备注 */ |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 所属租户 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String delFlag; |
|||
|
|||
} |
|||
|
@ -0,0 +1,80 @@ |
|||
package com.qs.serve.modules.vtb.entity.so; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
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 2022-11-24 |
|||
*/ |
|||
@Data |
|||
public class VtbVerificationChannelSo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** 费用申请id */ |
|||
private Long costApplyId; |
|||
|
|||
/** 活动id */ |
|||
private Long activityId; |
|||
|
|||
/** 渠道id */ |
|||
private Long channelId; |
|||
|
|||
/** 渠道编码 */ |
|||
private String channelCode; |
|||
|
|||
/** 渠道名称 */ |
|||
private String channelName; |
|||
|
|||
/** 渠道费用占比 */ |
|||
private BigDecimal channelRate; |
|||
|
|||
/** 预计头发网点数量 */ |
|||
private Integer preCountPoint; |
|||
|
|||
/** 备注 */ |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 所属租户 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String delFlag; |
|||
|
|||
} |
|||
|
@ -0,0 +1,68 @@ |
|||
package com.qs.serve.modules.vtb.entity.so; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
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 2022-11-24 |
|||
*/ |
|||
@Data |
|||
public class VtbVerificationSo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** 活动id */ |
|||
private Long activityId; |
|||
|
|||
/** 附件id */ |
|||
private String attachIds; |
|||
|
|||
/** 核销状态 */ |
|||
private Integer verficarionState; |
|||
|
|||
/** 备注 */ |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 所属租户 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String delFlag; |
|||
|
|||
} |
|||
|
@ -0,0 +1,89 @@ |
|||
package com.qs.serve.modules.vtb.entity.so; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
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 2022-11-24 |
|||
*/ |
|||
@Data |
|||
public class VtbVerificationSubjectSo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** 核算id */ |
|||
private Long verificationId; |
|||
|
|||
/** 费用申请id */ |
|||
private Long costApplyId; |
|||
|
|||
/** 活动id */ |
|||
private Long activityId; |
|||
|
|||
/** 科目id */ |
|||
private Long subjectId; |
|||
|
|||
/** 科目编码 */ |
|||
private String subjectCode; |
|||
|
|||
/** 科目名称 */ |
|||
private String subjectName; |
|||
|
|||
/** 费用额度 */ |
|||
private BigDecimal amount; |
|||
|
|||
/** 本次核销额 */ |
|||
private BigDecimal usedAmount; |
|||
|
|||
/** 场次 */ |
|||
private Integer countSession; |
|||
|
|||
/** 人数 */ |
|||
private Integer countPerson; |
|||
|
|||
/** 备注 */ |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 所属租户 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String delFlag; |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.vtb.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationCenterGoods; |
|||
|
|||
/** |
|||
* 核销费用项 Mapper |
|||
* @author YenHex |
|||
* @date 2022-11-24 |
|||
*/ |
|||
public interface VtbVerificationCenterGoodsMapper extends BaseMapper<VtbVerificationCenterGoods> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.vtb.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationChannel; |
|||
|
|||
/** |
|||
* 核销渠道项 Mapper |
|||
* @author YenHex |
|||
* @date 2022-11-24 |
|||
*/ |
|||
public interface VtbVerificationChannelMapper extends BaseMapper<VtbVerificationChannel> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.vtb.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationChannelPoint; |
|||
|
|||
/** |
|||
* 核销网点项 Mapper |
|||
* @author YenHex |
|||
* @date 2022-11-24 |
|||
*/ |
|||
public interface VtbVerificationChannelPointMapper extends BaseMapper<VtbVerificationChannelPoint> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.vtb.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerification; |
|||
|
|||
/** |
|||
* 核销 Mapper |
|||
* @author YenHex |
|||
* @date 2022-11-24 |
|||
*/ |
|||
public interface VtbVerificationMapper extends BaseMapper<VtbVerification> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.vtb.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationSubject; |
|||
|
|||
/** |
|||
* 核销科目费用 Mapper |
|||
* @author YenHex |
|||
* @date 2022-11-24 |
|||
*/ |
|||
public interface VtbVerificationSubjectMapper extends BaseMapper<VtbVerificationSubject> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.vtb.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationCenterGoods; |
|||
|
|||
/** |
|||
* 核销费用项 服务接口 |
|||
* @author YenHex |
|||
* @date 2022-11-24 |
|||
*/ |
|||
public interface VtbVerificationCenterGoodsService extends IService<VtbVerificationCenterGoods> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.vtb.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationChannelPoint; |
|||
|
|||
/** |
|||
* 核销网点项 服务接口 |
|||
* @author YenHex |
|||
* @date 2022-11-24 |
|||
*/ |
|||
public interface VtbVerificationChannelPointService extends IService<VtbVerificationChannelPoint> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.vtb.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationChannel; |
|||
|
|||
/** |
|||
* 核销渠道项 服务接口 |
|||
* @author YenHex |
|||
* @date 2022-11-24 |
|||
*/ |
|||
public interface VtbVerificationChannelService extends IService<VtbVerificationChannel> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,21 @@ |
|||
package com.qs.serve.modules.vtb.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerification; |
|||
import com.qs.serve.modules.vtb.entity.bo.VtbVerificationBo; |
|||
|
|||
/** |
|||
* 核销 服务接口 |
|||
* @author YenHex |
|||
* @date 2022-11-24 |
|||
*/ |
|||
public interface VtbVerificationService extends IService<VtbVerification> { |
|||
|
|||
/** |
|||
* 提交审批 |
|||
* @param vtbVerificationBo |
|||
*/ |
|||
void commit(VtbVerificationBo vtbVerificationBo); |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.vtb.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationSubject; |
|||
|
|||
/** |
|||
* 核销科目费用 服务接口 |
|||
* @author YenHex |
|||
* @date 2022-11-24 |
|||
*/ |
|||
public interface VtbVerificationSubjectService extends IService<VtbVerificationSubject> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,22 @@ |
|||
package com.qs.serve.modules.vtb.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationCenterGoods; |
|||
import com.qs.serve.modules.vtb.service.VtbVerificationCenterGoodsService; |
|||
import com.qs.serve.modules.vtb.mapper.VtbVerificationCenterGoodsMapper; |
|||
|
|||
/** |
|||
* 核销费用项 服务实现类 |
|||
* @author YenHex |
|||
* @since 2022-11-24 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@AllArgsConstructor |
|||
public class VtbVerificationCenterGoodsServiceImpl extends ServiceImpl<VtbVerificationCenterGoodsMapper,VtbVerificationCenterGoods> implements VtbVerificationCenterGoodsService { |
|||
|
|||
} |
|||
|
@ -0,0 +1,22 @@ |
|||
package com.qs.serve.modules.vtb.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationChannelPoint; |
|||
import com.qs.serve.modules.vtb.service.VtbVerificationChannelPointService; |
|||
import com.qs.serve.modules.vtb.mapper.VtbVerificationChannelPointMapper; |
|||
|
|||
/** |
|||
* 核销网点项 服务实现类 |
|||
* @author YenHex |
|||
* @since 2022-11-24 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@AllArgsConstructor |
|||
public class VtbVerificationChannelPointServiceImpl extends ServiceImpl<VtbVerificationChannelPointMapper,VtbVerificationChannelPoint> implements VtbVerificationChannelPointService { |
|||
|
|||
} |
|||
|
@ -0,0 +1,22 @@ |
|||
package com.qs.serve.modules.vtb.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationChannel; |
|||
import com.qs.serve.modules.vtb.service.VtbVerificationChannelService; |
|||
import com.qs.serve.modules.vtb.mapper.VtbVerificationChannelMapper; |
|||
|
|||
/** |
|||
* 核销渠道项 服务实现类 |
|||
* @author YenHex |
|||
* @since 2022-11-24 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@AllArgsConstructor |
|||
public class VtbVerificationChannelServiceImpl extends ServiceImpl<VtbVerificationChannelMapper,VtbVerificationChannel> implements VtbVerificationChannelService { |
|||
|
|||
} |
|||
|
@ -0,0 +1,81 @@ |
|||
package com.qs.serve.modules.vtb.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.qs.serve.modules.bms.entity.BmsSubject; |
|||
import com.qs.serve.modules.bms.service.BmsSubjectService; |
|||
import com.qs.serve.modules.tbs.entity.TbsActivity; |
|||
import com.qs.serve.modules.tbs.entity.TbsCostApply; |
|||
import com.qs.serve.modules.tbs.service.TbsActivityService; |
|||
import com.qs.serve.modules.tbs.service.TbsCostApplyService; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationSubject; |
|||
import com.qs.serve.modules.vtb.entity.bo.VtbVerificationBo; |
|||
import com.qs.serve.modules.vtb.entity.bo.VtbVerificationChannelBo; |
|||
import com.qs.serve.modules.vtb.entity.bo.VtbVerificationChannelPointBo; |
|||
import com.qs.serve.modules.vtb.entity.bo.VtbVerificationSubjectBo; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerification; |
|||
import com.qs.serve.modules.vtb.service.VtbVerificationService; |
|||
import com.qs.serve.modules.vtb.mapper.VtbVerificationMapper; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 核销 服务实现类 |
|||
* @author YenHex |
|||
* @since 2022-11-24 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@AllArgsConstructor |
|||
public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMapper,VtbVerification> implements VtbVerificationService { |
|||
|
|||
private final TbsActivityService activityService; |
|||
private final TbsCostApplyService costApplyService; |
|||
private final BmsSubjectService subjectService; |
|||
|
|||
@Override |
|||
public void commit(VtbVerificationBo verificationBo) { |
|||
TbsActivity activity = activityService.getById(verificationBo.getActivityId()); |
|||
TbsCostApply costApply = costApplyService.getById(activity.getCostApplyId()); |
|||
//todo 检测是否有拦截
|
|||
VtbVerification verification = new VtbVerification(); |
|||
verification.setId(verification.getId()); |
|||
verification.setActivityId(verificationBo.getActivityId()); |
|||
verification.setAttachIds(verificationBo.getAttachIds()); |
|||
verification.setRemark(verificationBo.getRemark()); |
|||
this.saveOrUpdate(verification); |
|||
|
|||
|
|||
List<VtbVerificationChannelBo> channelBoList = verificationBo.getChannelList(); |
|||
List<VtbVerificationChannelPointBo> pointBoList = verificationBo.getPointList(); |
|||
|
|||
List<VtbVerificationSubjectBo> subjectBoList = verificationBo.getSubjectList(); |
|||
for (VtbVerificationSubjectBo subjectBo : subjectBoList) { |
|||
//忽略金额为0的数据
|
|||
if(subjectBo.getAmount()==null||subjectBo.getAmount().compareTo(BigDecimal.ZERO)<1){ |
|||
continue; |
|||
} |
|||
BmsSubject subject = subjectService.getById(subjectBo.getSubjectId()); |
|||
|
|||
VtbVerificationSubject verificationSubject = new VtbVerificationSubject(); |
|||
verificationSubject.setVerificationId(verification.getId()); |
|||
verificationSubject.setCostApplyId(costApply.getId()); |
|||
verificationSubject.setActivityId(activity.getId()); |
|||
verificationSubject.setSubjectId(subject.getId()); |
|||
verificationSubject.setSubjectCode(subject.getSubjectCode()); |
|||
verificationSubject.setSubjectName(subject.getSubjectName()); |
|||
verificationSubject.setUsedAmount(subjectBo.getAmount()); |
|||
verificationSubject.setCountPerson(subjectBo.getCountPerson()); |
|||
verificationSubject.setCountSession(subjectBo.getCountSession()); |
|||
verificationSubject.setRemark(subjectBo.getRemark()); |
|||
|
|||
//
|
|||
|
|||
} |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,22 @@ |
|||
package com.qs.serve.modules.vtb.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import com.qs.serve.modules.vtb.entity.VtbVerificationSubject; |
|||
import com.qs.serve.modules.vtb.service.VtbVerificationSubjectService; |
|||
import com.qs.serve.modules.vtb.mapper.VtbVerificationSubjectMapper; |
|||
|
|||
/** |
|||
* 核销科目费用 服务实现类 |
|||
* @author YenHex |
|||
* @since 2022-11-24 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@AllArgsConstructor |
|||
public class VtbVerificationSubjectServiceImpl extends ServiceImpl<VtbVerificationSubjectMapper,VtbVerificationSubject> implements VtbVerificationSubjectService { |
|||
|
|||
} |
|||
|
Loading…
Reference in new issue