11 changed files with 485 additions and 5 deletions
@ -0,0 +1,61 @@ |
|||||
|
package com.qs.serve.modules.tbs.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 lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import com.qs.serve.modules.tbs.entity.so.TbsBudgetLogSo; |
||||
|
import com.qs.serve.modules.tbs.entity.TbsBudgetLog; |
||||
|
import com.qs.serve.modules.tbs.service.TbsBudgetLogService; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 预算 预算日志 |
||||
|
* @author YenHex |
||||
|
* @since 2023-01-05 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@AllArgsConstructor |
||||
|
@RestController |
||||
|
@RequestMapping("tbs/budgetLog") |
||||
|
public class TbsBudgetLogController { |
||||
|
|
||||
|
private TbsBudgetLogService tbsBudgetLogService; |
||||
|
|
||||
|
/** |
||||
|
* 翻页 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/page") |
||||
|
public R<PageVo<TbsBudgetLog>> getPage(TbsBudgetLogSo param){ |
||||
|
TbsBudgetLog entity = CopierUtil.copy(param,new TbsBudgetLog()); |
||||
|
LambdaQueryWrapper<TbsBudgetLog> lqw = new LambdaQueryWrapper<>(entity); |
||||
|
PageUtil.startPage(); |
||||
|
List<TbsBudgetLog> list = tbsBudgetLogService.list(lqw); |
||||
|
return R.byPageHelperList(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* ID查询 |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/getById/{id}") |
||||
|
@SysLog(module = SystemModule.Budget, title = "预算日志", biz = BizType.QUERY) |
||||
|
public R<TbsBudgetLog> getById(@PathVariable("id") String id){ |
||||
|
TbsBudgetLog tbsBudgetLog = tbsBudgetLogService.getById(id); |
||||
|
return R.ok(tbsBudgetLog); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,191 @@ |
|||||
|
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-01-05 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("tbs_budget_log") |
||||
|
public class TbsBudgetLog implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
@TableId(type = IdType.AUTO) |
||||
|
private Long id; |
||||
|
|
||||
|
/** 预算id */ |
||||
|
@NotNull(message = "预算id不能为空") |
||||
|
private Long budgetId; |
||||
|
|
||||
|
/** 预算编码 */ |
||||
|
@NotBlank(message = "预算编码不能为空") |
||||
|
@Length(max = 30,message = "预算编码长度不能超过30字") |
||||
|
private String budgetCode; |
||||
|
|
||||
|
/** 类型:0-预算新增;1-费用申请;2-预算调增;3-预算调减;4-费用释放 */ |
||||
|
@NotNull(message = "类型:0-预算新增;1-费用申请;2-预算调增;3-预算调减;4-费用释放不能为空") |
||||
|
private Integer optType; |
||||
|
|
||||
|
/** 操作人id */ |
||||
|
@NotBlank(message = "操作人id不能为空") |
||||
|
@Length(max = 32,message = "操作人id长度不能超过32字") |
||||
|
private String optUserId; |
||||
|
|
||||
|
/** 操作人名称 */ |
||||
|
@NotBlank(message = "操作人名称不能为空") |
||||
|
@Length(max = 32,message = "操作人名称长度不能超过32字") |
||||
|
private String optUserName; |
||||
|
|
||||
|
/** 操作人编号 */ |
||||
|
@NotBlank(message = "操作人编号不能为空") |
||||
|
@Length(max = 32,message = "操作人编号长度不能超过32字") |
||||
|
private String optUserCode; |
||||
|
|
||||
|
/** 预算金额/调整金额/释放金额 */ |
||||
|
@NotNull(message = "预算金额/调整金额/释放金额不能为空") |
||||
|
private BigDecimal amount; |
||||
|
|
||||
|
/** 考核id */ |
||||
|
@NotNull(message = "考核id不能为空") |
||||
|
private Long scheduleId; |
||||
|
|
||||
|
/** 考核期项id */ |
||||
|
@NotNull(message = "考核期项id不能为空") |
||||
|
private Long scheduleItemId; |
||||
|
|
||||
|
/** 考核编码 */ |
||||
|
@NotBlank(message = "考核编码不能为空") |
||||
|
@Length(max = 30,message = "考核编码长度不能超过30字") |
||||
|
private String itemName; |
||||
|
|
||||
|
/** 开始时间 */ |
||||
|
@NotNull(message = "开始时间不能为空") |
||||
|
@Length(max = 0,message = "开始时间长度不能超过0字") |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime startDate; |
||||
|
|
||||
|
/** 结束时间 */ |
||||
|
@NotNull(message = "结束时间不能为空") |
||||
|
@Length(max = 0,message = "结束时间长度不能超过0字") |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime endDate; |
||||
|
|
||||
|
/** 科目id */ |
||||
|
@NotNull(message = "科目id不能为空") |
||||
|
private Long subjectId; |
||||
|
|
||||
|
/** 科目编码 */ |
||||
|
@NotBlank(message = "科目编码不能为空") |
||||
|
@Length(max = 30,message = "科目编码长度不能超过30字") |
||||
|
private String subjectCode; |
||||
|
|
||||
|
/** 科目名称 */ |
||||
|
@NotBlank(message = "科目名称不能为空") |
||||
|
@Length(max = 30,message = "科目名称长度不能超过30字") |
||||
|
private String subjectName; |
||||
|
|
||||
|
/** 成本中心类型 */ |
||||
|
@NotBlank(message = "成本中心类型不能为空") |
||||
|
@Length(max = 20,message = "成本中心类型长度不能超过20字") |
||||
|
private String centerType; |
||||
|
|
||||
|
/** 成本中心id */ |
||||
|
@NotBlank(message = "成本中心id不能为空") |
||||
|
@Length(max = 32,message = "成本中心id长度不能超过32字") |
||||
|
private String centerId; |
||||
|
|
||||
|
/** 成本中心编码 */ |
||||
|
@NotBlank(message = "成本中心编码不能为空") |
||||
|
@Length(max = 30,message = "成本中心编码长度不能超过30字") |
||||
|
private String centerCode; |
||||
|
|
||||
|
/** 成本中心名称 */ |
||||
|
@NotBlank(message = "成本中心名称不能为空") |
||||
|
@Length(max = 30,message = "成本中心名称长度不能超过30字") |
||||
|
private String centerName; |
||||
|
|
||||
|
/** 客户id */ |
||||
|
private Long supplierId; |
||||
|
|
||||
|
/** 客户编码 */ |
||||
|
@Length(max = 30,message = "客户编码长度不能超过30字") |
||||
|
private String supplierCode; |
||||
|
|
||||
|
/** 客户名称 */ |
||||
|
@Length(max = 30,message = "客户名称长度不能超过30字") |
||||
|
private String supplierName; |
||||
|
|
||||
|
/** 活动id */ |
||||
|
private Long activityId; |
||||
|
|
||||
|
/** 活动编码 */ |
||||
|
@Length(max = 30,message = "活动编码长度不能超过30字") |
||||
|
private String activityCode; |
||||
|
|
||||
|
/** 费用申请id */ |
||||
|
private Long costApplyId; |
||||
|
|
||||
|
/** 费用申请编码 */ |
||||
|
@Length(max = 30,message = "费用申请编码长度不能超过30字") |
||||
|
private String costApplyCode; |
||||
|
|
||||
|
/** 费用申请主题 */ |
||||
|
@Length(max = 150,message = "费用申请主题长度不能超过150字") |
||||
|
private String costApplyTheme; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
@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,139 @@ |
|||||
|
package com.qs.serve.modules.tbs.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 2023-01-05 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class TbsBudgetLogSo implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 类型:0-预算新增;1-费用申请;2-预算调增;3-预算调减;4-费用释放 */ |
||||
|
private Integer optType; |
||||
|
|
||||
|
/** 预算金额/调整金额/释放金额 */ |
||||
|
private BigDecimal amount; |
||||
|
|
||||
|
/** 考核id */ |
||||
|
private Long scheduleId; |
||||
|
|
||||
|
/** 考核期项id */ |
||||
|
private Long scheduleItemId; |
||||
|
|
||||
|
/** 考核编码 */ |
||||
|
private String itemName; |
||||
|
|
||||
|
/** 开始时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
private LocalDateTime startDate; |
||||
|
|
||||
|
/** 结束时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
private LocalDateTime endDate; |
||||
|
|
||||
|
/** 预算id */ |
||||
|
private Long budgetId; |
||||
|
|
||||
|
/** 预算编码 */ |
||||
|
private String budgetCode; |
||||
|
|
||||
|
/** 科目id */ |
||||
|
private Long subjectId; |
||||
|
|
||||
|
/** 科目编码 */ |
||||
|
private String subjectCode; |
||||
|
|
||||
|
/** 科目名称 */ |
||||
|
private String subjectName; |
||||
|
|
||||
|
/** 成本中心类型 */ |
||||
|
private String centerType; |
||||
|
|
||||
|
/** 成本中心id */ |
||||
|
private String centerId; |
||||
|
|
||||
|
/** 成本中心编码 */ |
||||
|
private String centerCode; |
||||
|
|
||||
|
/** 成本中心名称 */ |
||||
|
private String centerName; |
||||
|
|
||||
|
/** 客户id */ |
||||
|
private Long supplierId; |
||||
|
|
||||
|
/** 客户编码 */ |
||||
|
private String supplierCode; |
||||
|
|
||||
|
/** 客户名称 */ |
||||
|
private String supplierName; |
||||
|
|
||||
|
/** 活动id */ |
||||
|
private Long activityId; |
||||
|
|
||||
|
/** 活动编码 */ |
||||
|
private String activityCode; |
||||
|
|
||||
|
/** 费用申请id */ |
||||
|
private Long costApplyId; |
||||
|
|
||||
|
/** 费用申请编码 */ |
||||
|
private String costApplyCode; |
||||
|
|
||||
|
/** 费用申请主题 */ |
||||
|
private String costApplyTheme; |
||||
|
|
||||
|
/** 操作人id */ |
||||
|
private String optUserId; |
||||
|
|
||||
|
/** 操作人名称 */ |
||||
|
private String optUserName; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
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.tbs.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qs.serve.modules.tbs.entity.TbsBudgetLog; |
||||
|
|
||||
|
/** |
||||
|
* 预算日志 Mapper |
||||
|
* @author YenHex |
||||
|
* @date 2023-01-05 |
||||
|
*/ |
||||
|
public interface TbsBudgetLogMapper extends BaseMapper<TbsBudgetLog> { |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,14 @@ |
|||||
|
package com.qs.serve.modules.tbs.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.qs.serve.modules.tbs.entity.TbsBudgetLog; |
||||
|
|
||||
|
/** |
||||
|
* 预算日志 服务接口 |
||||
|
* @author YenHex |
||||
|
* @date 2023-01-05 |
||||
|
*/ |
||||
|
public interface TbsBudgetLogService extends IService<TbsBudgetLog> { |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,22 @@ |
|||||
|
package com.qs.serve.modules.tbs.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.tbs.entity.TbsBudgetLog; |
||||
|
import com.qs.serve.modules.tbs.service.TbsBudgetLogService; |
||||
|
import com.qs.serve.modules.tbs.mapper.TbsBudgetLogMapper; |
||||
|
|
||||
|
/** |
||||
|
* 预算日志 服务实现类 |
||||
|
* @author YenHex |
||||
|
* @since 2023-01-05 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@AllArgsConstructor |
||||
|
public class TbsBudgetLogServiceImpl extends ServiceImpl<TbsBudgetLogMapper,TbsBudgetLog> implements TbsBudgetLogService { |
||||
|
|
||||
|
} |
||||
|
|
Loading…
Reference in new issue