feat(oa): 新增月度记账、采购计划明细和供应商信息功能
- 添加了月度记账、采购计划明细和供应商信息的实体类、BO类、控制器、Mapper接口和XML文件- 实现了基本的CRUD操作,包括列表查询、导出、详情获取、新增、修改和删除 - 为采购计划明细和供应商信息添加了关联查询
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
package com.gear.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 月度记账对象 gear_monthly_account
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("gear_monthly_account")
|
||||
public class GearMonthlyAccount extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 月记账ID
|
||||
*/
|
||||
@TableId(value = "account_id")
|
||||
private Long accountId;
|
||||
/**
|
||||
* 月份 (YYYY-MM)
|
||||
*/
|
||||
private String monthYear;
|
||||
/**
|
||||
* 该月采购总金额
|
||||
*/
|
||||
private BigDecimal totalAmount;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.gear.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 采购计划明细对象 gear_purchase_plan_detail
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("gear_purchase_plan_detail")
|
||||
public class GearPurchasePlanDetail extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
@TableId(value = "detail_id")
|
||||
private Long detailId;
|
||||
/**
|
||||
* 详情编码
|
||||
*/
|
||||
private String detailCode;
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
private Long supplierId;
|
||||
/**
|
||||
* 原材料名称
|
||||
*/
|
||||
private String rawMaterialName;
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String owner;
|
||||
/**
|
||||
* 计划采购数量
|
||||
*/
|
||||
private Long quantity;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal unitPrice;
|
||||
/**
|
||||
* 总金额
|
||||
*/
|
||||
private BigDecimal totalAmount;
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
private String annex;
|
||||
/**
|
||||
* 状态(0=新建,1=在途
|
||||
,2=到货
|
||||
,3=待审核,4=采购完成)
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
}
|
||||
60
gear-oa/src/main/java/com/gear/oa/domain/GearSupplier.java
Normal file
60
gear-oa/src/main/java/com/gear/oa/domain/GearSupplier.java
Normal file
@@ -0,0 +1,60 @@
|
||||
package com.gear.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 供应商信息对象 gear_supplier
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("gear_supplier")
|
||||
public class GearSupplier extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 供应商ID(主键)
|
||||
*/
|
||||
@TableId(value = "supplier_id")
|
||||
private Long supplierId;
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contactPerson;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 供货商类型id
|
||||
*/
|
||||
private Long typeId;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
}
|
||||
48
gear-oa/src/main/java/com/gear/oa/domain/GearSupplyType.java
Normal file
48
gear-oa/src/main/java/com/gear/oa/domain/GearSupplyType.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package com.gear.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 供货类型管理对象 gear_supply_type
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("gear_supply_type")
|
||||
public class GearSupplyType extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 供货类型ID
|
||||
*/
|
||||
@TableId(value = "type_id")
|
||||
private Long typeId;
|
||||
/**
|
||||
* 供货类型名称
|
||||
*/
|
||||
private String typeName;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.gear.oa.domain.bo;
|
||||
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 月度记账业务对象 gear_monthly_account
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-30
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GearMonthlyAccountBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 月记账ID
|
||||
*/
|
||||
private Long accountId;
|
||||
|
||||
/**
|
||||
* 月份 (YYYY-MM)
|
||||
*/
|
||||
private String monthYear;
|
||||
|
||||
/**
|
||||
* 该月采购总金额
|
||||
*/
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.gear.oa.domain.bo;
|
||||
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 采购计划明细业务对象 gear_purchase_plan_detail
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-30
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GearPurchasePlanDetailBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
private Long detailId;
|
||||
|
||||
/**
|
||||
* 详情编码
|
||||
*/
|
||||
private String detailCode;
|
||||
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 原材料名称
|
||||
*/
|
||||
private String rawMaterialName;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String owner;
|
||||
|
||||
/**
|
||||
* 计划采购数量
|
||||
*/
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 总金额
|
||||
*/
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
private String annex;
|
||||
|
||||
/**
|
||||
* 状态(0=新建,1=在途
|
||||
,2=到货
|
||||
,3=待审核,4=采购完成)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.gear.oa.domain.bo;
|
||||
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 供应商信息业务对象 gear_supplier
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-30
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GearSupplierBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 供应商ID(主键)
|
||||
*/
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contactPerson;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 供货商类型id
|
||||
*/
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.gear.oa.domain.bo;
|
||||
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 供货类型管理业务对象 gear_supply_type
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-30
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GearSupplyTypeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 供货类型ID
|
||||
*/
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 供货类型名称
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.gear.oa.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.gear.common.annotation.ExcelDictFormat;
|
||||
import com.gear.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 月度记账视图对象 gear_monthly_account
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class GearMonthlyAccountVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 月记账ID
|
||||
*/
|
||||
@ExcelProperty(value = "月记账ID")
|
||||
private Long accountId;
|
||||
|
||||
/**
|
||||
* 月份 (YYYY-MM)
|
||||
*/
|
||||
@ExcelProperty(value = "月份 (YYYY-MM)")
|
||||
private String monthYear;
|
||||
|
||||
/**
|
||||
* 该月采购总金额
|
||||
*/
|
||||
@ExcelProperty(value = "该月采购总金额")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.gear.oa.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.gear.common.annotation.ExcelDictFormat;
|
||||
import com.gear.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 采购计划明细视图对象 gear_purchase_plan_detail
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class GearPurchasePlanDetailVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
@ExcelProperty(value = "明细ID")
|
||||
private Long detailId;
|
||||
|
||||
/**
|
||||
* 详情编码
|
||||
*/
|
||||
@ExcelProperty(value = "详情编码")
|
||||
private String detailCode;
|
||||
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
@ExcelProperty(value = "供应商ID")
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 原材料名称
|
||||
*/
|
||||
@ExcelProperty(value = "原材料名称")
|
||||
private String rawMaterialName;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
@ExcelProperty(value = "负责人")
|
||||
private String owner;
|
||||
|
||||
/**
|
||||
* 计划采购数量
|
||||
*/
|
||||
@ExcelProperty(value = "计划采购数量")
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@ExcelProperty(value = "单位")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@ExcelProperty(value = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 总金额
|
||||
*/
|
||||
@ExcelProperty(value = "总金额")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
@ExcelProperty(value = "附件")
|
||||
private String annex;
|
||||
|
||||
/**
|
||||
* 状态(0=新建,1=在途,2=到货,3=待审核,4=采购完成)
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0==新建,1=在途,2=到货,3=待审核,4=采购完成")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
//供应商名称
|
||||
private String supplierName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.gear.oa.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.gear.common.annotation.ExcelDictFormat;
|
||||
import com.gear.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 供应商信息视图对象 gear_supplier
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class GearSupplierVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 供应商ID(主键)
|
||||
*/
|
||||
@ExcelProperty(value = "供应商ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "主=键")
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@ExcelProperty(value = "供应商名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@ExcelProperty(value = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@ExcelProperty(value = "联系电话")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@ExcelProperty(value = "地址")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 供货商类型id
|
||||
*/
|
||||
@ExcelProperty(value = "供货商类型id")
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
//类型名称
|
||||
@ExcelProperty(value = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.gear.oa.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.gear.common.annotation.ExcelDictFormat;
|
||||
import com.gear.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 供货类型管理视图对象 gear_supply_type
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class GearSupplyTypeVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 供货类型ID
|
||||
*/
|
||||
@ExcelProperty(value = "供货类型ID")
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 供货类型名称
|
||||
*/
|
||||
@ExcelProperty(value = "供货类型名称")
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ExcelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user