初始版本

This commit is contained in:
suncz
2024-04-29 17:04:35 +08:00
commit b174c04733
1701 changed files with 349852 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.*;
/**地址*/
@Entity
@Table(name = "t_address")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_address")
@Module(generate = false)
public class Address extends BaseEntity<Long> {
private Area area;
private String address;
private String fullAddress;
@ManyToOne(fetch = FetchType.LAZY)
public Area getArea() {
return area;
}
public void setArea(Area area) {
this.area = area;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getFullAddress() {
return fullAddress;
}
public void setFullAddress(String fullAddress) {
this.fullAddress = fullAddress;
}
}

View File

@@ -0,0 +1,636 @@
/*
* Copyright 2013-2017 vverp.com. All rights reserved.
* Support: http://www.vverp.com
* License: http://www.vverp.com/license
*/
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import cn.hutool.core.util.ArrayUtil;
import com.vverp.annotation.Module;
import com.vverp.enums.Education;
import com.vverp.enums.NationalityType;
import com.vverp.enums.Reservoir;
import com.vverp.enums.WorkingState;
import org.hibernate.validator.constraints.NotEmpty;
import javax.persistence.*;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* Entity - 管理员
*
* @author
* @version 1.0
*/
@Entity
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_admin")
@ExcelTarget("admin")
@Module(name = "管理员", generate = false)
public class Admin extends BaseEntity<Long> implements java.io.Serializable {
/**
* 性别
*/
public enum Sex {
/**
* 未知
*/
unknown("未知"),
/**
* 男
*/
Male(""),
/**
* 女
*/
female("");
private String message;
Sex(String message) {
this.message = message;
}
public String getMessage() {
return message;
}
}
public enum Type{
supplier,
admin
}
/**账号类型*/
private Type type = Type.admin;
/**
* 账号
*/
@Excel(name = "账号", orderNum = "1", needMerge = true)
private String username;
/**
* 密码
*/
private String password;
/**
* 姓名
*/
@Excel(name = "姓名", orderNum = "2", needMerge = true)
private String name;
/**
* 手机号
*/
@Excel(name = "手机号", orderNum = "3", needMerge = true)
private String phone;
/**
* 性别
*/
@Excel(name = "性别", orderNum = "4", needMerge = true, replace = {"未知_unknown", "男_Male", "女_female"})
private Sex sex;
/**
* 是否可用
*/
@Excel(name = "是否可用", orderNum = "5", needMerge = true, replace = {"是_true", "是_false"})
private Boolean isEnabled;
/**
* 角色
*/
@ExcelCollection(name = "角色", orderNum = "6")
private Set<Role> roles = new HashSet<>();
/**
* 部门
*/
@ExcelEntity
private Department department;
/**
* 公司
*/
private Company company;
/**
* 员工编号
*/
private String code;
/**
* 民族
*/
private NationalityType nationalityType;
/**
* 学历
*/
private Education education;
/**
* 身份证号
*/
private String idCard;
/**
* 在职状态
*/
private WorkingState workingState;
/**
* 户籍地址
*/
private String censusRegister;
/**
* 现在所居地
*/
private String presentAddress;
/**
* 入职时间
*/
private Date hireDate;
/**
* 离职时间
*/
private Date departureDate;
/**
* 是否为临时工
*/
private Boolean casualWorker;
/**
* Token
*/
private String token;
/**
* 消息通知列表
*/
private List<NoticeEntity> noticeEntityList = new ArrayList<>();
/**
* 管理的部门列表
*/
private List<Department> departmentList = new ArrayList<>();
/**
* 总经办
*/
private Boolean generalManagerFlag = Boolean.FALSE;
/**
* 公众号openid
*/
private String mpOpenid;
/**
* 公众号绑定码
*/
@Excel(name = "公众号绑定码", orderNum = "7", needMerge = true)
private String mpBindingCode;
/**
* 库区
*/
private Reservoir reservoir;
/**
* 可见公司id
* -1: 全可见
*/
private String visibleCompanyIdsStr;
/**
* 可见部门id
* -1: 全可见
*/
private String visibleDepartmentIdsStr;
/**
* 是否只能看到自己所创建的内容
*/
private Boolean onlySeeSelfFlag = Boolean.FALSE;
/**
* 邮箱密码
*/
private String emailPassword;
/**
* 设备clientId, 个推推送用
*/
private String cid;
/**
* 是否需要考勤
*/
private Boolean attendanceFlag;
/**当前使用的项目*/
private Long nowProgress;
private List<Supplier> supplierList = new ArrayList<>();
/**邮箱*/
private String email;
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
// private List<Long> productTypeIds = new ArrayList<>();
private List<AdminPurchase> adminPurchaseList = new ArrayList<>();
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "admin")
@JsonIgnore
public List<AdminPurchase> getAdminPurchaseList() {
return adminPurchaseList;
}
public void setAdminPurchaseList(List<AdminPurchase> adminPurchaseList) {
this.adminPurchaseList = adminPurchaseList;
}
// @NotEmpty
// @Column(nullable = false, length = 4000)
// @Convert(converter = CommonBulkApply.AttachFileConverter.class)
// public List<Long> getProductTypeIds() {
// return productTypeIds;
// }
//
// public void setProductTypeIds(List<Long> productTypeIds) {
// this.productTypeIds = productTypeIds;
// }
public Long getNowProgress() {
return nowProgress;
}
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "admin")
@JsonIgnore
public List<Supplier> getSupplierList() {
return supplierList;
}
public void setSupplierList(List<Supplier> supplierList) {
this.supplierList = supplierList;
}
public void setNowProgress(Long nowProgress) {
this.nowProgress = nowProgress;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public Sex getSex() {
return sex;
}
public void setSex(Sex sex) {
this.sex = sex;
}
public Boolean getIsEnabled() {
return isEnabled != null ? isEnabled : true;
}
public void setIsEnabled(Boolean isEnabled) {
this.isEnabled = isEnabled;
}
@NotEmpty
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "t_admin_role")
@JsonIgnore
public Set<Role> getRoles() {
return roles;
}
public void setRoles(Set<Role> roles) {
this.roles = roles;
}
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
public Department getDepartment() {
return department;
}
public void setDepartment(Department department) {
this.department = department;
}
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
public Company getCompany() {
return company;
}
public void setCompany(Company company) {
this.company = company;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public NationalityType getNationalityType() {
return nationalityType;
}
public void setNationalityType(NationalityType nationalityType) {
this.nationalityType = nationalityType;
}
public Education getEducation() {
return education;
}
public void setEducation(Education education) {
this.education = education;
}
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard;
}
public WorkingState getWorkingState() {
return workingState;
}
public void setWorkingState(WorkingState workingState) {
this.workingState = workingState;
}
public String getCensusRegister() {
return censusRegister;
}
public void setCensusRegister(String censusRegister) {
this.censusRegister = censusRegister;
}
public String getPresentAddress() {
return presentAddress;
}
public void setPresentAddress(String presentAddress) {
this.presentAddress = presentAddress;
}
public Date getHireDate() {
return hireDate;
}
public void setHireDate(Date hireDate) {
this.hireDate = hireDate;
}
public Date getDepartureDate() {
return departureDate;
}
public void setDepartureDate(Date departureDate) {
this.departureDate = departureDate;
}
@Column(name = "is_casual_worker")
public Boolean getCasualWorker() {
return casualWorker != null ? casualWorker : false;
}
public void setCasualWorker(Boolean casualWorker) {
this.casualWorker = casualWorker;
}
@Column(unique = true, nullable = false, length = 32)
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
@JsonIgnore
@OneToMany(mappedBy = "admin", cascade = CascadeType.REMOVE)
public List<NoticeEntity> getNoticeEntityList() {
return noticeEntityList;
}
public void setNoticeEntityList(List<NoticeEntity> noticeEntityList) {
this.noticeEntityList = noticeEntityList;
}
@JsonIgnore
@OneToMany(mappedBy = "directorEntity")
public List<Department> getDepartmentList() {
return departmentList;
}
public void setDepartmentList(List<Department> departmentList) {
this.departmentList = departmentList;
}
public Boolean getGeneralManagerFlag() {
return generalManagerFlag != null ? generalManagerFlag : false;
}
public void setGeneralManagerFlag(Boolean generalManagerFlag) {
this.generalManagerFlag = generalManagerFlag;
}
public String getMpOpenid() {
return mpOpenid;
}
public void setMpOpenid(String mpOpenid) {
this.mpOpenid = mpOpenid;
}
public String getMpBindingCode() {
return mpBindingCode;
}
public void setMpBindingCode(String mpBindingCode) {
this.mpBindingCode = mpBindingCode;
}
@PreRemove
public void preRemove() {
for (Department department : getDepartmentList()) {
if (department != null) {
department.setDirectorEntity(null);
}
}
}
public Reservoir getReservoir() {
return reservoir;
}
public void setReservoir(Reservoir reservoir) {
this.reservoir = reservoir;
}
public String getVisibleCompanyIdsStr() {
return visibleCompanyIdsStr != null ? visibleCompanyIdsStr : "-1";
}
public void setVisibleCompanyIdsStr(String visibleCompanyIdsStr) {
this.visibleCompanyIdsStr = visibleCompanyIdsStr;
}
public String getVisibleDepartmentIdsStr() {
return visibleDepartmentIdsStr != null ? visibleDepartmentIdsStr : "-1";
}
public void setVisibleDepartmentIdsStr(String visibleDepartmentIdsStr) {
this.visibleDepartmentIdsStr = visibleDepartmentIdsStr;
}
public Boolean getOnlySeeSelfFlag() {
return onlySeeSelfFlag != null ? onlySeeSelfFlag : Boolean.FALSE;
}
public void setOnlySeeSelfFlag(Boolean onlySeeSelfFlag) {
this.onlySeeSelfFlag = onlySeeSelfFlag;
}
public String getEmailPassword() {
return emailPassword;
}
public void setEmailPassword(String emailPassword) {
this.emailPassword = emailPassword;
}
public String getCid() {
return cid;
}
public void setCid(String cid) {
this.cid = cid;
}
public Boolean getAttendanceFlag() {
return attendanceFlag != null ? attendanceFlag : true;
}
public void setAttendanceFlag(Boolean attendanceFlag) {
this.attendanceFlag = attendanceFlag;
}
public void setVisibleCompanyIdsStrByArr(Long[] visibleCompanyId) {
if (visibleCompanyId == null || visibleCompanyId.length == 0) {
setVisibleCompanyIdsStr("-1");
} else {
if (ArrayUtil.contains(visibleCompanyId, -1L)) {
setVisibleCompanyIdsStr("-1");
} else {
setVisibleCompanyIdsStr(ArrayUtil.join(visibleCompanyId, ","));
}
}
}
public void setVisibleDepartmentIdsStrByArr(Long[] visibleDepartmentId) {
if (visibleDepartmentId == null || visibleDepartmentId.length == 0) {
setVisibleDepartmentIdsStr("-1");
} else {
if (ArrayUtil.contains(visibleDepartmentId, -1L)) {
setVisibleDepartmentIdsStr("-1");
} else {
setVisibleDepartmentIdsStr(ArrayUtil.join(visibleDepartmentId, ","));
}
}
}
@Transient
public boolean containsRole(String name) {
for (Role role : getRoles()) {
if (role.getChineseName().equals(name)) {
return true;
}
}
return false;
}
@Transient
public String getEwoEmail() {
return getUsername() + "@runyimail.vverp.com";
}
}

View File

@@ -0,0 +1,82 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "t_admin_purchase")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_admin_purchase")
@Module(name = "管理员采购权限", generate = false)
public class AdminPurchase extends BaseEntity<Long>{
private Admin admin;
// private ProductType productType;
private Long progressId;
private String progressName;
private String progressCode;
private List<AdminPurchaseProductType> adminPurchaseProductTypeList = new ArrayList<>();
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "adminPurchase")
@JsonIgnore
public List<AdminPurchaseProductType> getAdminPurchaseProductTypeList() {
return adminPurchaseProductTypeList;
}
public void setAdminPurchaseProductTypeList(List<AdminPurchaseProductType> adminPurchaseProductTypeList) {
this.adminPurchaseProductTypeList = adminPurchaseProductTypeList;
}
public Long getProgressId() {
return progressId;
}
public void setProgressId(Long progressId) {
this.progressId = progressId;
}
public String getProgressName() {
return progressName;
}
public void setProgressName(String progressName) {
this.progressName = progressName;
}
public String getProgressCode() {
return progressCode;
}
public void setProgressCode(String progressCode) {
this.progressCode = progressCode;
}
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public Admin getAdmin() {
return admin;
}
public void setAdmin(Admin admin) {
this.admin = admin;
}
// @ManyToOne(fetch = FetchType.LAZY)
// @JsonIgnore
// public ProductType getProductType() {
// return productType;
// }
//
// public void setProductType(ProductType productType) {
// this.productType = productType;
// }
}

View File

@@ -0,0 +1,37 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
@Entity
@Table(name = "t_admin_purchase_productType")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_admin_purchase_productType")
@Module(name = "管理员采购产品权限", generate = false)
public class AdminPurchaseProductType extends BaseEntity<Long>{
private ProductType productType;
private AdminPurchase adminPurchase;
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public ProductType getProductType() {
return productType;
}
public void setProductType(ProductType productType) {
this.productType = productType;
}
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public AdminPurchase getAdminPurchase() {
return adminPurchase;
}
public void setAdminPurchase(AdminPurchase adminPurchase) {
this.adminPurchase = adminPurchase;
}
}

View File

@@ -0,0 +1,213 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import org.apache.commons.lang.StringUtils;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
import javax.persistence.*;
import javax.validation.constraints.Min;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**省市区*/
@Entity
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_area")
@Module(generate = false)
public class Area extends BaseEntity<Long> {
/** 树路径分隔符 */
public static final String TREE_PATH_SEPARATOR = ",";
/** 名称 */
private String name;
/** 全称 */
private String fullName;
/** 树路径 */
private String treePath;
/** 层级 */
private Integer grade;
/** 上级地区 */
private Area parent;
/** 排序 */
private Integer order;
/** 下级地区 */
private Set<Area> children = new HashSet<Area>();
private List<Address> addresses = new ArrayList<>();
/**
* 获取名称
*
* @return 名称
*/
@NotEmpty
@Length(max = 200)
@Column(nullable = false)
public String getName() {
return name;
}
/**
* 设置名称
*
* @param name
* 名称
*/
public void setName(String name) {
this.name = name;
}
/**
* 获取全称
*
* @return 全称
*/
@Column(nullable = false, length = 4000)
public String getFullName() {
return fullName;
}
/**
* 设置全称
*
* @param fullName
* 全称
*/
public void setFullName(String fullName) {
this.fullName = fullName;
}
/**
* 获取树路径
*
* @return 树路径
*/
@Column(nullable = false)
public String getTreePath() {
return treePath;
}
/**
* 设置树路径
*
* @param treePath
* 树路径
*/
public void setTreePath(String treePath) {
this.treePath = treePath;
}
/**
* 获取层级
*
* @return 层级
*/
@Column(nullable = false)
public Integer getGrade() {
return grade;
}
/**
* 设置层级
*
* @param grade
* 层级
*/
public void setGrade(Integer grade) {
this.grade = grade;
}
/**
* 获取上级地区
*
* @return 上级地区
*/
@ManyToOne(fetch = FetchType.EAGER)
@JsonIgnore
public Area getParent() {
return parent;
}
/**
* 设置上级地区
*
* @param parent
* 上级地区
*/
public void setParent(Area parent) {
this.parent = parent;
}
/**
* 获取下级地区
*
* @return 下级地区
*/
@OneToMany(mappedBy = "parent", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
@OrderBy("order asc")
@JsonIgnore
public Set<Area> getChildren() {
return children;
}
/**
* 设置下级地区
*
* @param children
* 下级地区
*/
public void setChildren(Set<Area> children) {
this.children = children;
}
@Min(0)
@Column(name = "orders")
public Integer getOrder() {
return order;
}
/**
* 设置排序
*
* @param order
* 排序
*/
public void setOrder(Integer order) {
this.order = order;
}
@JsonIgnore
@OneToMany(mappedBy = "area", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
public List<Address> getAddresses() {
return addresses;
}
public void setAddresses(List<Address> addresses) {
this.addresses = addresses;
}
/**
* 获取所有上级地区ID
*
* @return 所有上级地区ID
*/
@Transient
public Long[] getParentIds() {
String[] parentIds = StringUtils.split(getTreePath(), TREE_PATH_SEPARATOR);
Long[] result = new Long[parentIds.length];
for (int i = 0; i < parentIds.length; i++) {
result[i] = Long.valueOf(parentIds[i]);
}
return result;
}
}

View File

@@ -0,0 +1,136 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.vverp.annotation.Module;
import com.vverp.enums.OrderAttachFileType;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Transient;
import java.util.Date;
/**
* 附件
*/
@Entity
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_attach_file")
@Module(generate = false)
public class AttachFile extends BaseEntity<Long> {
private String name;
private Long size;
private Date date;
private String path;
/**
* 合同附件类型
*/
private OrderAttachFileType orderAttachFileType;
public AttachFile() {
}
public AttachFile(String name,
Long size,
Date date,
String path) {
this.name = name;
this.size = size;
this.date = date;
this.path = path;
}
private Long progressId;
public enum Type{
supplier("供应商"),
payment("支付记录"),
purchaseOrder("采购合同"),
other("其他");
Type(String message){
this.message= message;
}
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
public Type type;
public Long getProgressId() {
return progressId;
}
public void setProgressId(Long progressId) {
this.progressId = progressId;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getSize() {
return size;
}
public void setSize(Long size) {
this.size = size;
}
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public OrderAttachFileType getOrderAttachFileType() {
return orderAttachFileType != null ? orderAttachFileType : OrderAttachFileType.normal;
}
public void setOrderAttachFileType(OrderAttachFileType orderAttachFileType) {
this.orderAttachFileType = orderAttachFileType;
}
@Transient
public String getFormatSize() {
if (size >= 1024 * 1024) {
return String.format("%.2fMB", (double) size / 1024 / 1024);
} else {
return String.format("%.2fKB", (double) size / 1024);
}
}
}

View File

@@ -0,0 +1,71 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Field;
import com.vverp.annotation.Module;
import javax.persistence.*;
/**
* Entity - 银行账号
*
* @author dealsky
* @date 2020/3/27 3:08 下午
*/
@Entity
@Table(name = "t_bank_account")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_bank_account")
@Module(generate = false)
public class BankAccount extends BaseEntity<Long> {
@Field(name = "银行账号")
@Excel(name = "银行账号", orderNum = "1")
private String account;
@Field(name = "开户银行")
@Excel(name = "开户银行", orderNum = "2")
private String bank;
@Field(name = "收款人")
@Excel(name = "收款人", orderNum = "3")
private String receiver;
private Supplier supplier;
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getBank() {
return bank;
}
public void setBank(String bank) {
this.bank = bank;
}
public String getReceiver() {
return receiver;
}
public void setReceiver(String receiver) {
this.receiver = receiver;
}
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
public Supplier getSupplier() {
return supplier;
}
public void setSupplier(Supplier supplier) {
this.supplier = supplier;
}
}

View File

@@ -0,0 +1,335 @@
/*
* Copyright 2013-2017 vverp.com. All rights reserved.
* Support: http://www.vverp.com
* License: http://www.vverp.com/license
*/
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.hibernate.search.annotations.*;
import javax.persistence.*;
import javax.validation.groups.Default;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.Date;
import com.vverp.base.EntityListener;
/**
* Entity - 基类
*
* @author
* @version 1.0
*/
@EntityListeners(EntityListener.class)
@MappedSuperclass
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public abstract class BaseEntity<ID extends Serializable> implements Serializable {
private static final long serialVersionUID = -7103197793672462521L;
/** "ID"属性名称 */
public static final String ID_PROPERTY_NAME = "id";
/** "创建日期"属性名称 */
public static final String CREATE_DATE_PROPERTY_NAME = "createDate";
/** "修改日期"属性名称 */
public static final String MODIFY_DATE_PROPERTY_NAME = "modifyDate";
/** "版本"属性名称 */
public static final String VERSION_PROPERTY_NAME = "version";
/**
* 保存验证组
*/
public interface Save extends Default {
}
/**
* 更新验证组
*/
public interface Update extends Default {
}
/** ID */
private ID id;
/** 创建日期 */
// @Excel(name = "", orderNum = "1000", format = "yyyy-MM-dd HH:mm:ss", needMerge = true)
private Date createDate;
/** 修改日期 */
private Date modifyDate;
/** 版本 */
private Long version;
/**
* 创建人id
*/
private Long creatorId;
/**
* 获取ID
*
* @return ID
*/
@DocumentId
@Id
@GeneratedValue(strategy = GenerationType.AUTO, generator = "sequenceGenerator")
public ID getId() {
return id;
}
/**
* 设置ID
*
* @param id
* ID
*/
public void setId(ID id) {
this.id = id;
}
/**
* 获取创建日期
*
* @return 创建日期
*/
@DateBridge(resolution = Resolution.SECOND)
@Column(nullable = false, updatable = false)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
public Date getCreateDate() {
return createDate;
}
/**
* 设置创建日期
*
* @param createDate
* 创建日期
*/
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
/**
* 获取修改日期
*
* @return 修改日期
*/
@DateBridge(resolution = Resolution.SECOND)
@Column(nullable = false)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
public Date getModifyDate() {
return modifyDate;
}
/**
* 设置修改日期
*
* @param modifyDate
* 修改日期
*/
public void setModifyDate(Date modifyDate) {
this.modifyDate = modifyDate;
}
/**
* 获取版本
*
* @return 版本
*/
@Version
@Column(nullable = false)
public Long getVersion() {
return version;
}
/**
* 设置版本
*
* @param version
* 版本
*/
public void setVersion(Long version) {
this.version = version;
}
public Long getCreatorId() {
return creatorId;
}
public void setCreatorId(Long creatorId) {
this.creatorId = creatorId;
}
/**
* 判断是否为新建对象
*
* @return 是否为新建对象
*/
@Transient
public boolean isNew() {
return getId() == null;
}
/**
* 重写toString方法
*
* @return 字符串
*/
@Override
public String toString() {
return String.format("Entity of type %s with id: %s", getClass().getName(), getId());
}
/**
* 重写equals方法
*
* @param obj
* 对象
* @return 是否相等
*/
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (!BaseEntity.class.isAssignableFrom(obj.getClass())) {
return false;
}
BaseEntity<?> other = (BaseEntity<?>) obj;
return getId() != null ? getId().equals(other.getId()) : false;
}
/**
* 重写hashCode方法
*
* @return HashCode
*/
@Override
public int hashCode() {
int hashCode = 17;
hashCode += getId() != null ? getId().hashCode() * 31 : 0;
return hashCode;
}
@Excel(name = "", orderNum = "101", needMerge = true)
private String extraField1;
@Excel(name = "", orderNum = "102", needMerge = true)
private String extraField2;
@Excel(name = "", orderNum = "103", needMerge = true)
private String extraField3;
@Excel(name = "", orderNum = "104", needMerge = true)
private String extraField4;
@Excel(name = "", orderNum = "105", needMerge = true)
private String extraField5;
@Excel(name = "", orderNum = "106", needMerge = true)
private String extraField6;
@Excel(name = "", orderNum = "107", needMerge = true)
private String extraField7;
@Excel(name = "", orderNum = "108", needMerge = true)
private String extraField8;
public String getExtraField1() {
return extraField1;
}
public void setExtraField1(String extraField1) {
this.extraField1 = extraField1;
}
public String getExtraField2() {
return extraField2;
}
public void setExtraField2(String extraField2) {
this.extraField2 = extraField2;
}
public String getExtraField3() {
return extraField3;
}
public void setExtraField3(String extraField3) {
this.extraField3 = extraField3;
}
public String getExtraField4() {
return extraField4;
}
public void setExtraField4(String extraField4) {
this.extraField4 = extraField4;
}
public String getExtraField5() {
return extraField5;
}
public void setExtraField5(String extraField5) {
this.extraField5 = extraField5;
}
public String getExtraField6() {
return extraField6;
}
public void setExtraField6(String extraField6) {
this.extraField6 = extraField6;
}
public String getExtraField7() {
return extraField7;
}
public void setExtraField7(String extraField7) {
this.extraField7 = extraField7;
}
public String getExtraField8() {
return extraField8;
}
public void setExtraField8(String extraField8) {
this.extraField8 = extraField8;
}
public String extraField(String fieldName) throws Exception {
Class clazz = this.getClass().getSuperclass();
String methodName = "get" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
Method method = clazz.getMethod(methodName);
return (String) method.invoke(this);
}
public void setExtraField(BaseEntity entity) {
setExtraField1(entity.getExtraField1());
setExtraField2(entity.getExtraField2());
setExtraField3(entity.getExtraField3());
setExtraField4(entity.getExtraField4());
setExtraField5(entity.getExtraField5());
setExtraField6(entity.getExtraField6());
setExtraField7(entity.getExtraField7());
setExtraField8(entity.getExtraField8());
}
}

View File

@@ -0,0 +1,253 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.math.BigDecimal;
@Entity
@Table(name = "t_bid_area")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_bid_area")
@Module(name = "评标范围")
public class BidArea extends BaseEntity<Long>{
/**公称直径起始*/
private BigDecimal diameterL;
private String diameterLName;
private Long diameterLId;
/**公称直径结束*/
private BigDecimal diameterS;
private String diameterSName;
private Long diameterSId;
/**壁厚开始*/
private String wallThicknessLName;
private Long wallThicknessLId;
/**壁厚结束*/
private String wallThicknessSName;
private Long wallThicknessSId;
/**压力等级*/
private String pressureLevel;
/**材质*/
private String material;
private String materialType;
/**尺寸标准*/
private String size;
/**端面*/
private String endFace;
/**大类*/
private Long bigTypeId;
private String bigTypeName;
private String bigTypeDes;
/**小类*/
private Long smallTypeId;
private String smallTypeName;
private String smallTypeDes;
/**制造形式*/
private String makeCode;
private String makeName;
private Long progressId;
public Long getProgressId() {
return progressId;
}
public void setProgressId(Long progressId) {
this.progressId = progressId;
}
public String getBigTypeDes() {
return bigTypeDes;
}
public void setBigTypeDes(String bigTypeDes) {
this.bigTypeDes = bigTypeDes;
}
public String getSmallTypeDes() {
return smallTypeDes;
}
public void setSmallTypeDes(String smallTypeDes) {
this.smallTypeDes = smallTypeDes;
}
public String getMaterialType() {
return materialType;
}
public void setMaterialType(String materialType) {
this.materialType = materialType;
}
public String getMakeCode() {
return makeCode;
}
public void setMakeCode(String makeCode) {
this.makeCode = makeCode;
}
public String getMakeName() {
return makeName;
}
public void setMakeName(String makeName) {
this.makeName = makeName;
}
public Long getDiameterLId() {
return diameterLId;
}
public void setDiameterLId(Long diameterLId) {
this.diameterLId = diameterLId;
}
public Long getDiameterSId() {
return diameterSId;
}
public void setDiameterSId(Long diameterSId) {
this.diameterSId = diameterSId;
}
public Long getWallThicknessLId() {
return wallThicknessLId;
}
public void setWallThicknessLId(Long wallThicknessLId) {
this.wallThicknessLId = wallThicknessLId;
}
public Long getWallThicknessSId() {
return wallThicknessSId;
}
public void setWallThicknessSId(Long wallThicknessSId) {
this.wallThicknessSId = wallThicknessSId;
}
public String getDiameterLName() {
return diameterLName;
}
public void setDiameterLName(String diameterLName) {
this.diameterLName = diameterLName;
}
public String getDiameterSName() {
return diameterSName;
}
public void setDiameterSName(String diameterSName) {
this.diameterSName = diameterSName;
}
public String getWallThicknessLName() {
return wallThicknessLName;
}
public void setWallThicknessLName(String wallThicknessLName) {
this.wallThicknessLName = wallThicknessLName;
}
public String getWallThicknessSName() {
return wallThicknessSName;
}
public void setWallThicknessSName(String wallThicknessSName) {
this.wallThicknessSName = wallThicknessSName;
}
public String getBigTypeName() {
return bigTypeName;
}
public void setBigTypeName(String bigTypeName) {
this.bigTypeName = bigTypeName;
}
public String getSmallTypeName() {
return smallTypeName;
}
public void setSmallTypeName(String smallTypeName) {
this.smallTypeName = smallTypeName;
}
public Long getBigTypeId() {
return bigTypeId;
}
public void setBigTypeId(Long bigTypeId) {
this.bigTypeId = bigTypeId;
}
public Long getSmallTypeId() {
return smallTypeId;
}
public void setSmallTypeId(Long smallTypeId) {
this.smallTypeId = smallTypeId;
}
public String getSize() {
return size;
}
public void setSize(String size) {
this.size = size;
}
public String getEndFace() {
return endFace;
}
public void setEndFace(String endFace) {
this.endFace = endFace;
}
public BigDecimal getDiameterL() {
return diameterL;
}
public void setDiameterL(BigDecimal diameterL) {
this.diameterL = diameterL;
}
public BigDecimal getDiameterS() {
return diameterS;
}
public void setDiameterS(BigDecimal diameterS) {
this.diameterS = diameterS;
}
public String getPressureLevel() {
return pressureLevel;
}
public void setPressureLevel(String pressureLevel) {
this.pressureLevel = pressureLevel;
}
public String getMaterial() {
return material;
}
public void setMaterial(String material) {
this.material = material;
}
}

View File

@@ -0,0 +1,89 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
/**
* Entity - 收货/提货地址
*
* @author dealsky
* @date 2020/4/28 1:22 下午
*/
@Entity
@Table(name = "t_cargo_address")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_cargo_address")
@Module(generate = false)
@ExcelTarget("cargoAddress")
public class CargoAddress extends BaseEntity<Long> {
/**
* 省id
*/
private Long provinceId;
/**
* 市id
*/
private Long cityId;
/**
* 区/县id
*/
private Long countyId;
/**
* 详细地址
*/
private String address;
/**
* 供应商
*/
private Supplier supplier;
public Long getProvinceId() {
return provinceId;
}
public void setProvinceId(Long provinceId) {
this.provinceId = provinceId;
}
public Long getCityId() {
return cityId;
}
public void setCityId(Long cityId) {
this.cityId = cityId;
}
public Long getCountyId() {
return countyId;
}
public void setCountyId(Long countyId) {
this.countyId = countyId;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
public Supplier getSupplier() {
return supplier;
}
public void setSupplier(Supplier supplier) {
this.supplier = supplier;
}
}

View File

@@ -0,0 +1,198 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import com.vverp.base.Setting;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* Entity - 公司---------未在用
*
* @author dealsky
* @date 2020/8/6 11:47 上午
*/
@Entity
@Table(name = "t_company")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_company")
@Module(generate = false)
public class Company extends BaseEntity<Long> {
/**
* 名称
*/
private String name;
/**
* 地址
*/
private String address;
/**
* 纬度
*/
private BigDecimal lat;
/**
* 经度
*/
private BigDecimal lng;
/**
* 签到范围(km)
*/
private BigDecimal scope;
/**
* 管理员列表
*/
private List<Admin> adminList;
/**
* 传真
*/
private String fax;
/**
* 电话
*/
private String phone;
/**
* 税务登记号
*/
private String taxpayerSn;
/**
* 简称
*/
private String shortName;
/**
* 简称编码
*/
private String shortNameCode;
/**
* 上班时间
*/
private String onWorkDateStr;
/**
* 下班时间
*/
private String offWorkDateStr;
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@Column(precision = 19, scale = 6)
public BigDecimal getLat() {
return lat;
}
public void setLat(BigDecimal lat) {
this.lat = lat;
}
@Column(precision = 19, scale = 6)
public BigDecimal getLng() {
return lng;
}
public void setLng(BigDecimal lng) {
this.lng = lng;
}
@Column(precision = 19, scale = 6)
public BigDecimal getScope() {
return Setting.setScale(scope);
}
public void setScope(BigDecimal scope) {
this.scope = scope;
}
@JsonIgnore
@OneToMany(mappedBy = "company", cascade = CascadeType.REMOVE)
public List<Admin> getAdminList() {
return adminList;
}
public void setAdminList(List<Admin> adminList) {
this.adminList = adminList;
}
public String getTaxpayerSn() {
return taxpayerSn;
}
public void setTaxpayerSn(String taxpayerSn) {
this.taxpayerSn = taxpayerSn;
}
public String getShortName() {
return shortName;
}
public void setShortName(String shortName) {
this.shortName = shortName;
}
public String getShortNameCode() {
return shortNameCode;
}
public void setShortNameCode(String shortNameCode) {
this.shortNameCode = shortNameCode;
}
public String getOnWorkDateStr() {
return onWorkDateStr != null ? onWorkDateStr : "08:30";
}
public void setOnWorkDateStr(String onWorkDateStr) {
this.onWorkDateStr = onWorkDateStr;
}
public String getOffWorkDateStr() {
return offWorkDateStr != null ? offWorkDateStr : "17:30";
}
public void setOffWorkDateStr(String offWorkDateStr) {
this.offWorkDateStr = offWorkDateStr;
}
}

View File

@@ -0,0 +1,107 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Field;
import com.vverp.annotation.Module;
import javax.persistence.*;
/**
* Entity - 供应商联系人
*
* @author dealsky
* @date 2020/3/27 2:58 下午
*/
@Entity
@Table(name = "t_contact")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_contact")
@Module(generate = false)
public class Contact extends BaseEntity<Long> {
@Field(name = "名称")
@Excel(name = "名称", orderNum = "1")
private String name;
@Field(name = "联系电话")
@Excel(name = "联系电话", orderNum = "2")
private String phone;
@Field(name = "电子邮件")
@Excel(name = "电子邮件", orderNum = "3")
private String email;
@Field(name = "职位")
@Excel(name = "职位", orderNum = "4")
private String position;
@Field(name = "传真")
@Excel(name = "传真", orderNum = "5")
private String fax;
@Field(name = "备注")
@Excel(name = "备注", orderNum = "6")
private String memo;
private Supplier supplier;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
public Supplier getSupplier() {
return supplier;
}
public void setSupplier(Supplier supplier) {
this.supplier = supplier;
}
}

View File

@@ -0,0 +1,232 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import com.vverp.base.Setting;
import com.vverp.moli.util.SpringUtils;
import com.vverp.service.DepartmentService;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.List;
/**
* Entity - 部门
*
* @author dealsky
* @date 2020/3/11 9:28 上午
*/
@Entity
@Table(name = "t_department")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_department")
@Module(generate = false, name = "部门")
public class Department extends BaseEntity<Long> {
/**
* 名称
*/
@Excel(name = "部门名称_admin", orderNum = "7_admin", needMerge = true)
private String name;
/**
* 父级id
*/
private Long parentId;
/**
* 部门级数
*/
private Integer level;
/**
* 排序因子
*/
private Integer sortFactor;
/**
* 链
*/
private String chain;
/**
* 管理员列表
*/
private List<Admin> adminList;
/**
* 主管
*/
private String director;
/**
* 主管实体
*/
private Admin directorEntity;
/**
* 是否为公司
*/
private Boolean companyFlag = Boolean.FALSE;
/**
* 地址
*/
private String address;
/**
* 纬度
*/
private BigDecimal lat;
/**
* 经度
*/
private BigDecimal lng;
/**
* 签到范围(km)
*/
private BigDecimal scope;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Transient
@JsonIgnore
public String getFullName() {
Long parentId = this.parentId;
StringBuilder stringBuilder = new StringBuilder(name);
while (parentId != null) {
Department department = SpringUtils.getBean(DepartmentService.class).find(parentId);
stringBuilder.insert(0, department.getName() + " - ");
parentId = department.getParentId();
}
return stringBuilder.toString();
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public Integer getSortFactor() {
return sortFactor;
}
public void setSortFactor(Integer sortFactor) {
this.sortFactor = sortFactor;
}
public String getChain() {
return chain;
}
public void setChain(String chain) {
this.chain = chain;
}
@JsonIgnore
@OneToMany(mappedBy = "department", cascade = CascadeType.REMOVE)
public List<Admin> getAdminList() {
return adminList;
}
public void setAdminList(List<Admin> adminList) {
this.adminList = adminList;
}
public String getDirector() {
return director;
}
public void setDirector(String director) {
this.director = director;
}
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
public Admin getDirectorEntity() {
return directorEntity;
}
public void setDirectorEntity(Admin directorEntity) {
this.directorEntity = directorEntity;
}
public Boolean getCompanyFlag() {
return companyFlag != null ? companyFlag : Boolean.FALSE;
}
public void setCompanyFlag(Boolean companyFlag) {
this.companyFlag = companyFlag;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@Column(precision = 19, scale = 6)
public BigDecimal getLat() {
return lat;
}
public void setLat(BigDecimal lat) {
this.lat = lat;
}
@Column(precision = 19, scale = 6)
public BigDecimal getLng() {
return lng;
}
public void setLng(BigDecimal lng) {
this.lng = lng;
}
@Column(precision = 19, scale = 6)
public BigDecimal getScope() {
return Setting.setScale(scope);
}
public void setScope(BigDecimal scope) {
this.scope = scope;
}
@Transient
@JsonIgnore
public Admin getDirectorEntityLatest() {
Admin admin = getDirectorEntity();
while (admin == null) {
if (parentId != null) {
Department department = SpringUtils.getBean(DepartmentService.class).find(parentId);
admin = department.getDirectorEntity();
} else {
return null;
}
}
return admin;
}
}

View File

@@ -0,0 +1,40 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.math.BigDecimal;
/**公称直径*/
@Entity
@Table(name = "t_diameter")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_diameter")
@Module(generate = false)
@ExcelTarget("diameter")
public class Diameter extends BaseEntity<Long>{
@Excel(name = "名称", orderNum = "1")
private String name;
@Excel(name = "", orderNum = "2")
private BigDecimal value;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public BigDecimal getValue() {
return value;
}
public void setValue(BigDecimal value) {
this.value = value;
}
}

View File

@@ -0,0 +1,41 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**端面*/
@Entity
@Table(name = "t_end_face")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_end_face")
@Module(generate = false)
@ExcelTarget("endFace")
public class EndFace extends BaseEntity<Long>{
@Excel(name = "名称", orderNum = "1")
private String name;
@Excel(name = "代号", orderNum = "2")
private String code;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@@ -0,0 +1,48 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
* Excel模板
*
* @author dealsky
* @date 2020/4/8 1:04 下午
*/
@Entity
@Table(name = "t_excel_template")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_excel_template")
@Module(generate = false)
public class ExcelTemplate extends BaseEntity<Long> {
/**
* 名称
*/
private String name;
/**
* 路径
*/
private String path;
@Column(unique = true, nullable = false)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
}

View File

@@ -0,0 +1,102 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
* Entity - 额外的字段
*
* @author dealsky
*/
@Entity
@Table(name = "t_extra_field")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_extra_field")
@Module(generate = false)
public class ExtraField extends BaseEntity<Long> {
/**
* 类型
*/
public enum Type {
string
}
/**
* 名称
*/
private String name;
/**
* 空间
*/
private String space;
/**
* 字段名
*/
private String fieldName;
/**
* 是否可用
*/
private Boolean available;
/**
* 类型
*/
private Type type = Type.string;
/**对应项目*/
private Long progressId;
public Long getProgressId() {
return progressId;
}
public void setProgressId(Long progressId) {
this.progressId = progressId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSpace() {
return space;
}
public void setSpace(String space) {
this.space = space;
}
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
public Boolean getAvailable() {
return available;
}
public void setAvailable(Boolean available) {
this.available = available;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
}

View File

@@ -0,0 +1,66 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@Entity
@Table(name = "t_flow_sn")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_flow_sn")
@Module(name = "流水号")
public class FlowSn extends BaseEntity<Long>{
private Integer lastValue;
public enum Type{
material("综合材料明细表"),
applyOrder("请购单"),
purchaseOrder("采购合同"),
goodOrder("订货单");
Type(String message){
this.message= message;
}
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
private Type type;
/**项目id*/
private Long progressId;
public Long getProgressId() {
return progressId;
}
public void setProgressId(Long progressId) {
this.progressId = progressId;
}
public Integer getLastValue() {
return lastValue;
}
public void setLastValue(Integer lastValue) {
this.lastValue = lastValue;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
}

View File

@@ -0,0 +1,38 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.*;
/**
* Entity - 存储与 form 相关的键值对
*
* @author dealsky
*/
@Entity
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_form_storage")
@Module(generate = false)
public class FormStorage extends BaseEntity<Long> {
private String name;
private String content;
@Column(unique = true, nullable = false)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Lob
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}

View File

@@ -0,0 +1,297 @@
package com.vverp.entity;
import com.vverp.util.DateUtil;
import com.vverp.annotation.Module;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.util.Date;
/**
* @author dealsky
* @date 2021/6/30 下午2:28
*/
@Entity
@Table(name = "t_generate_setting")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_generate_setting")
@Module(generate = false)
public class GenerateSetting extends BaseEntity<Long> {
/**
* 主包
*/
private String basePackage;
/**
* 作者
*/
private String author;
/**
* 创建日期
*/
private String date;
/**
* 实体类类名
*/
private String entity;
/**
* 中文名
*/
private String name;
/**
* 实体类类名首字母小写
*/
private String lcEntity;
/**
* 是否创建系列
*/
private Boolean dao;
private Boolean service;
private Boolean controller;
private Boolean list;
private Boolean add;
private Boolean edit;
private Boolean dialogList;
private Boolean dialogAdd;
private Boolean dialogEdit;
public GenerateSetting() {
date = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm");
}
public String getBasePackage() {
return basePackage;
}
public void setBasePackage(String basePackage) {
this.basePackage = basePackage;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getEntity() {
return entity;
}
public void setEntity(String entity) {
this.entity = entity;
setLcEntity(entity.substring(0, 1).toLowerCase() + entity.substring(1));
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLcEntity() {
return lcEntity;
}
public void setLcEntity(String lcEntity) {
this.lcEntity = lcEntity;
}
public Boolean getDao() {
return dao;
}
public void setDao(Boolean dao) {
this.dao = dao;
}
public Boolean getService() {
return service;
}
public void setService(Boolean service) {
this.service = service;
}
public Boolean getController() {
return controller;
}
public void setController(Boolean controller) {
this.controller = controller;
}
public Boolean getList() {
return list;
}
public void setList(Boolean list) {
this.list = list;
}
@Column(name = "x_add")
public Boolean getAdd() {
return add;
}
public void setAdd(Boolean add) {
this.add = add;
}
public Boolean getEdit() {
return edit;
}
public void setEdit(Boolean edit) {
this.edit = edit;
}
public Boolean getDialogList() {
return dialogList;
}
public void setDialogList(Boolean dialogList) {
this.dialogList = dialogList;
}
public Boolean getDialogAdd() {
return dialogAdd;
}
public void setDialogAdd(Boolean dialogAdd) {
this.dialogAdd = dialogAdd;
}
public Boolean getDialogEdit() {
return dialogEdit;
}
public void setDialogEdit(Boolean dialogEdit) {
this.dialogEdit = dialogEdit;
}
public static final class GenerateSettingBuilder {
private String basePackage;
private String author;
private String entity;
private String name;
private Boolean dao;
private Boolean service;
private Boolean controller;
private Boolean list;
private Boolean add;
private Boolean edit;
private Boolean dialogList;
private Boolean dialogAdd;
private Boolean dialogEdit;
private GenerateSettingBuilder() {
}
public static GenerateSettingBuilder aGenerateSetting() {
return new GenerateSettingBuilder();
}
public GenerateSettingBuilder basePackage(String basePackage) {
this.basePackage = basePackage;
return this;
}
public GenerateSettingBuilder author(String author) {
this.author = author;
return this;
}
public GenerateSettingBuilder entity(String entity) {
this.entity = entity;
return this;
}
public GenerateSettingBuilder name(String name) {
this.name = name;
return this;
}
public GenerateSettingBuilder dao(Boolean dao) {
this.dao = dao;
return this;
}
public GenerateSettingBuilder service(Boolean service) {
this.service = service;
return this;
}
public GenerateSettingBuilder controller(Boolean controller) {
this.controller = controller;
return this;
}
public GenerateSettingBuilder list(Boolean list) {
this.list = list;
return this;
}
public GenerateSettingBuilder add(Boolean add) {
this.add = add;
return this;
}
public GenerateSettingBuilder edit(Boolean edit) {
this.edit = edit;
return this;
}
public GenerateSettingBuilder dialogList(Boolean dialogList) {
this.dialogList = dialogList;
return this;
}
public GenerateSettingBuilder dialogAdd(Boolean dialogAdd) {
this.dialogAdd = dialogAdd;
return this;
}
public GenerateSettingBuilder dialogEdit(Boolean dialogEdit) {
this.dialogEdit = dialogEdit;
return this;
}
public GenerateSetting build() {
GenerateSetting generateSetting = new GenerateSetting();
generateSetting.setBasePackage(basePackage);
generateSetting.setAuthor(author);
generateSetting.setEntity(entity);
generateSetting.setName(name);
generateSetting.setDao(dao);
generateSetting.setService(service);
generateSetting.setController(controller);
generateSetting.setList(list);
generateSetting.setAdd(add);
generateSetting.setEdit(edit);
generateSetting.setDialogList(dialogList);
generateSetting.setDialogAdd(dialogAdd);
generateSetting.setDialogEdit(dialogEdit);
return generateSetting;
}
}
}

View File

@@ -0,0 +1,37 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**首页-帮助中心*/
@Entity
@Table(name = "t_help_information")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_help_information")
@Module(generate = false)
public class HelpInformation extends BaseEntity<Long>{
private String content;
private String title;
@Lob
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}

View File

@@ -0,0 +1,71 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@Entity
@Table(name = "t_information")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_information")
@Module(generate = false)
public class Information extends BaseEntity<Long> {
/**
* 关于我们
*/
private String about;
/**
* 用户手册
*/
private String userManual;
/**
* 隐私政策
*/
private String privacyPolicy;
/**
* 版本信息
*/
private String appVersion;
@Lob
public String getAbout() {
return about;
}
public void setAbout(String about) {
this.about = about;
}
@Lob
public String getUserManual() {
return userManual;
}
public void setUserManual(String userManual) {
this.userManual = userManual;
}
@Lob
public String getPrivacyPolicy() {
return privacyPolicy;
}
public void setPrivacyPolicy(String privacyPolicy) {
this.privacyPolicy = privacyPolicy;
}
@Lob
public String getAppVersion() {
return appVersion;
}
public void setAppVersion(String appVersion) {
this.appVersion = appVersion;
}
}

View File

@@ -0,0 +1,152 @@
/*
* Copyright 2013-2017 vverp.com. All rights reserved.
* Support: http://www.vverp.com
* License: http://www.vverp.com/license
*/
package com.vverp.entity;
import javax.persistence.*;
/**
* Entity - 日志
*
* @author
* @version 1.0
*/
@Entity
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_log")
public class Log extends BaseEntity<Long> {
private static final long serialVersionUID = -8705047121509437098L;
/** "日志内容"属性名称 */
public static final String LOG_CONTENT_ATTRIBUTE_NAME = Log.class.getName() + ".CONTENT";
/** 操作 */
private String operation;
/** 操作员 */
private String operator;
/** 内容 */
private String content;
/** 请求参数 */
private String parameter;
/** IP */
private String ip;
/**
* 获取操作
*
* @return 操作
*/
@Column(nullable = false, updatable = false)
public String getOperation() {
return operation;
}
/**
* 设置操作
*
* @param operation
* 操作
*/
public void setOperation(String operation) {
this.operation = operation;
}
/**
* 获取操作员
*
* @return 操作员
*/
@Column(updatable = false)
public String getOperator() {
return operator;
}
/**
* 设置操作员
*
* @param operator
* 操作员
*/
public void setOperator(String operator) {
this.operator = operator;
}
/**
* 获取内容
*
* @return 内容
*/
@Column(updatable = false, length = 4000)
public String getContent() {
return content;
}
/**
* 设置内容
*
* @param content
* 内容
*/
public void setContent(String content) {
this.content = content;
}
/**
* 获取请求参数
*
* @return 请求参数
*/
@Lob
@Column(updatable = false)
public String getParameter() {
return parameter;
}
/**
* 设置请求参数
*
* @param parameter
* 请求参数
*/
public void setParameter(String parameter) {
this.parameter = parameter;
}
/**
* 获取IP
*
* @return IP
*/
@Column(nullable = false, updatable = false)
public String getIp() {
return ip;
}
/**
* 设置IP
*
* @param ip
* IP
*/
public void setIp(String ip) {
this.ip = ip;
}
/**
* 设置操作员
*
* @param operator
* 操作员
*/
@Transient
public void setOperator(Admin operator) {
setOperator(operator != null ? operator.getUsername() : null);
}
}

View File

@@ -0,0 +1,50 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.util.Date;
/**
* Entity - 登录记录
*
* @author dealsky
* @date 2021/2/23 下午5:27
*/
@Entity
@Table(name = "t_login_log")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_login_lo")
public class LoginLog extends BaseEntity<Long> {
private Long adminId;
private String adminName;
private Date date;
public Long getAdminId() {
return adminId;
}
public void setAdminId(Long adminId) {
this.adminId = adminId;
}
public String getAdminName() {
return adminName;
}
public void setAdminName(String adminName) {
this.adminName = adminName;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
}

View File

@@ -0,0 +1,49 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**材质*/
@Entity
@Table(name = "t_material")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_material")
@Module(generate = false)
@ExcelTarget("material")
public class Material extends BaseEntity<Long>{
@Excel(name = "名称", orderNum = "1")
private String name;
@Excel(name = "代号", orderNum = "2")
private String code;
@Excel(name = "类型", orderNum = "3")
private String materialType;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMaterialType() {
return materialType;
}
public void setMaterialType(String materialType) {
this.materialType = materialType;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@@ -0,0 +1,288 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import org.hibernate.validator.constraints.NotEmpty;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "t_material_order")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_material_order")
@Module(generate = false, name = "综合材料明细表")
public class MaterialOrder extends OrderBase{
public enum Type{
device("设备综合材料明细表"),
conduit("管道综合材料明细表");
Type(String message){
this.message = message;
}
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
private Type type;
private List<MaterialOrderItem> materialOrderItemList = new ArrayList<>();
/**创建的采购单*/
private Long purchaseOrderId;
/**版本号*/
private Integer versionNum;
/**项目*/
private Long progressId;
private String progressName;
private String progressCode;
private String preSn;
/**是否创建合同*/
private Boolean createContract;
// public enum Stage{
// JC("基础设计"),
// FT("附塔管线"),
// DH50("50%订货"),
// DH70("70%订货"),
// XX("详细设计"),
// L1("联系单1"),
// L2("联系单2");
// Stage(String message){
// this.message = message;
// }
// private String message;
//
// public String getMessage() {
// return message;
// }
//
// public void setMessage(String message) {
// this.message = message;
// }
// }
//
// private Stage stage;
//
// public Stage getStage() {
// return stage;
// }
//
// public void setStage(Stage stage) {
// this.stage = stage;
// }
private String stageName;
private String stageCode;
/**评标完成状态*/
public enum BidStatus{
wait("待评标"),
half("部分评标"),
finish("完成评标");
BidStatus(String message){
this.message = message;
}
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
private BidStatus bidStatus = BidStatus.wait;
/**前缀*/
private String preTitle;
/**阶段等级*/
private Integer stageNum;
/**流水号*/
private Integer flowNum;
/**升版原因*/
private List<String> upReason = new ArrayList<>();
/**料单名称*/
private String name;
/** 是否请购 */
private Boolean hasPurchaseApply;
/** 是否创建订货单 */
private Boolean hasPurchaseOrder;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@NotEmpty
@Column(nullable = false, length = 4000)
@Convert(converter = Role.AuthorityConverter.class)
public List<String> getUpReason() {
return upReason;
}
public void setUpReason(List<String> upReason) {
this.upReason = upReason;
}
public Integer getFlowNum() {
return flowNum;
}
public void setFlowNum(Integer flowNum) {
this.flowNum = flowNum;
}
public String getProgressCode() {
return progressCode;
}
public void setProgressCode(String progressCode) {
this.progressCode = progressCode;
}
public String getProgressName() {
return progressName;
}
public void setProgressName(String progressName) {
this.progressName = progressName;
}
public Integer getStageNum() {
return stageNum;
}
public void setStageNum(Integer stageNum) {
this.stageNum = stageNum;
}
public String getPreTitle() {
return preTitle;
}
public void setPreTitle(String preTitle) {
this.preTitle = preTitle;
}
public BidStatus getBidStatus() {
return bidStatus;
}
public void setBidStatus(BidStatus bidStatus) {
this.bidStatus = bidStatus;
}
public String getStageName() {
return stageName;
}
public void setStageName(String stageName) {
this.stageName = stageName;
}
public String getStageCode() {
return stageCode;
}
public void setStageCode(String stageCode) {
this.stageCode = stageCode;
}
public Boolean getCreateContract() {
return createContract;
}
public void setCreateContract(Boolean createContract) {
this.createContract = createContract;
}
public String getPreSn() {
return preSn;
}
public void setPreSn(String preSn) {
this.preSn = preSn;
}
public Long getProgressId() {
return progressId;
}
public void setProgressId(Long progressId) {
this.progressId = progressId;
}
public Integer getVersionNum() {
return versionNum;
}
public void setVersionNum(Integer versionNum) {
this.versionNum = versionNum;
}
public Long getPurchaseOrderId() {
return purchaseOrderId;
}
public void setPurchaseOrderId(Long purchaseOrderId) {
this.purchaseOrderId = purchaseOrderId;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "materialOrder")
@JsonIgnore
public List<MaterialOrderItem> getMaterialOrderItemList() {
return materialOrderItemList;
}
public void setMaterialOrderItemList(List<MaterialOrderItem> materialOrderItemList) {
this.materialOrderItemList = materialOrderItemList;
}
public Boolean getHasPurchaseApply() {
return hasPurchaseApply;
}
public void setHasPurchaseApply(Boolean hasPurchaseApply) {
this.hasPurchaseApply = hasPurchaseApply;
}
public Boolean getHasPurchaseOrder() {
return hasPurchaseOrder;
}
public void setHasPurchaseOrder(Boolean hasPurchaseOrder) {
this.hasPurchaseOrder = hasPurchaseOrder;
}
}

View File

@@ -0,0 +1,647 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import com.vverp.base.Setting;
import org.hibernate.validator.constraints.NotEmpty;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Entity
@Table(name = "t_material_order_item")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_material_order_item")
@Module(generate = false, name = "综合材料明细单项")
public class MaterialOrderItem extends OrderItemBase{
private Long productId;
private String name;
private String productCode;
private MaterialOrder materialOrder;
private BigDecimal price;
/**产品类别大类*/
private String bigProductType;
private String bigProductDes;
/**产品类别小类*/
private String smallProductType;
private String smallProductDes;
private Long bigProductTypeId;
private Long smallTypeId;
/**版本*/
private Integer versionNum;
/**签完合同的版本,默认为最新版本*/
private Integer contractVersion = -1;
/**特殊要求*/
private String specialRequest;
/**采购码*/
private String purchaseCode;
/**主项号*/
private String areaAccount;
/**单元号*/
private String unitAccount;
/**分区号*/
private String siteAccount;
/**管线号*/
private String lineAccount;
/**短描述*/
private String shortDescription;
/**长描述*/
private String longDescription;
/**单位*/
private String unit;
/**公称直径(L)*/
private BigDecimal diameterL;
/**公称直径(S)*/
private BigDecimal diameterS;
/** 夹套规格 */
private String jacketSpec;
/**壁厚L*/
private String wallThicknessL;
/**壁厚S*/
private String wallThicknessS;
/**压力等级*/
private String pressureLevel;
/**材质*/
private String material;
private String materialType;
/**隔热代号*/
private String insulationCode;
/**单重*/
private BigDecimal gWeight;
/**总重*/
private BigDecimal totalWeight;
private String makeCode;
private String makeName;
/**尺寸标准*/
private String size;
/**端面*/
private String endFace;
/**编号类型*/
private String codeType;
/**设备专有字段*/
/**设备图号*/
private String picNo;
/**采购类型*/
private String purchaseType;
private String memo;
/**报价人*/
private Long supplierId;
private String supplierName;
/**报价单*/
private List<MaterialOrderItemPrice> materialOrderItemPriceList = new ArrayList<>();
/**旧版本不显示*/
private Boolean oldVersion = false;
/**序号*/
private Integer ind;
/**请购单号*/
private String itemCode;
/**供应商列表*/
private List<Long> supplierIds = new ArrayList<>();
private String supplierNameList;
/** 是否确认供应商 */
private Boolean confirmSuppliers;
/** 供应商确认人,时间 */
private Long confirmSuppliersAdminId;
private String confirmSuppliersAdminName;
private Date confirmSuppliersTime;
/**手动确认价格*/
private Boolean handConfirm = false;
/**创建合同*/
private Long orderItemId;
private Long orderId;
/**筛选是否显示,临时数据*/
private Boolean noShow = false;
/**实际所需*/
private BigDecimal needCount;
/**使用库存量*/
private BigDecimal useStockCount;
public enum StockType{
all,
half,
none;
}
private StockType stockType;
public StockType getStockType() {
return stockType == null?StockType.none:stockType;
}
public void setStockType(StockType stockType) {
this.stockType = stockType;
}
@Column(precision = 19, scale = 6)
public BigDecimal getUseStockCount() {
return Setting.setScale(useStockCount != null ? useStockCount : BigDecimal.ZERO, 3);
}
public void setUseStockCount(BigDecimal useStockCount) {
this.useStockCount = useStockCount;
}
public Long getBigProductTypeId() {
return bigProductTypeId;
}
public void setBigProductTypeId(Long bigProductTypeId) {
this.bigProductTypeId = bigProductTypeId;
}
public Long getSmallTypeId() {
return smallTypeId;
}
public void setSmallTypeId(Long smallTypeId) {
this.smallTypeId = smallTypeId;
}
@Column(precision = 19, scale = 6)
public BigDecimal getNeedCount() {
return Setting.setScale(needCount != null ? needCount : BigDecimal.ZERO, 3);
}
public void setNeedCount(BigDecimal needCount) {
this.needCount = needCount;
}
public String getBigProductDes() {
return bigProductDes;
}
public void setBigProductDes(String bigProductDes) {
this.bigProductDes = bigProductDes;
}
public String getSmallProductDes() {
return smallProductDes;
}
public void setSmallProductDes(String smallProductDes) {
this.smallProductDes = smallProductDes;
}
public String getMaterialType() {
return materialType;
}
public void setMaterialType(String materialType) {
this.materialType = materialType;
}
public String getMakeCode() {
return makeCode;
}
public void setMakeCode(String makeCode) {
this.makeCode = makeCode;
}
public String getMakeName() {
return makeName;
}
public void setMakeName(String makeName) {
this.makeName = makeName;
}
public Boolean getNoShow() {
return noShow;
}
public void setNoShow(Boolean noShow) {
this.noShow = noShow;
}
public Integer getContractVersion() {
return contractVersion;
}
public void setContractVersion(Integer contractVersion) {
this.contractVersion = contractVersion;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public Long getOrderItemId() {
return orderItemId;
}
public void setOrderItemId(Long orderItemId) {
this.orderItemId = orderItemId;
}
public Boolean getHandConfirm() {
return handConfirm;
}
public void setHandConfirm(Boolean handConfirm) {
this.handConfirm = handConfirm;
}
public String getSupplierNameList() {
return supplierNameList;
}
public void setSupplierNameList(String supplierNameList) {
this.supplierNameList = supplierNameList;
}
public Boolean getConfirmSuppliers() {
return confirmSuppliers;
}
public void setConfirmSuppliers(Boolean confirmSuppliers) {
this.confirmSuppliers = confirmSuppliers;
}
public Long getConfirmSuppliersAdminId() {
return confirmSuppliersAdminId;
}
public void setConfirmSuppliersAdminId(Long confirmSuppliersAdminId) {
this.confirmSuppliersAdminId = confirmSuppliersAdminId;
}
public String getConfirmSuppliersAdminName() {
return confirmSuppliersAdminName;
}
public void setConfirmSuppliersAdminName(String confirmSuppliersAdminName) {
this.confirmSuppliersAdminName = confirmSuppliersAdminName;
}
public Date getConfirmSuppliersTime() {
return confirmSuppliersTime;
}
public void setConfirmSuppliersTime(Date confirmSuppliersTime) {
this.confirmSuppliersTime = confirmSuppliersTime;
}
@NotEmpty
@Column(nullable = false, length = 4000)
@Convert(converter = OrderBase.AttachFileConverter.class)
public List<Long> getSupplierIds() {
return supplierIds;
}
public void setSupplierIds(List<Long> supplierIds) {
this.supplierIds = supplierIds;
}
public String getSize() {
return size;
}
public void setSize(String size) {
this.size = size;
}
public String getEndFace() {
return endFace;
}
public void setEndFace(String endFace) {
this.endFace = endFace;
}
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public Integer getInd() {
return ind;
}
public void setInd(Integer ind) {
this.ind = ind;
}
public Boolean getOldVersion() {
return oldVersion;
}
public void setOldVersion(Boolean oldVersion) {
this.oldVersion = oldVersion;
}
public Long getSupplierId() {
return supplierId;
}
public void setSupplierId(Long supplierId) {
this.supplierId = supplierId;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "materialOrderItem")
@JsonIgnore
public List<MaterialOrderItemPrice> getMaterialOrderItemPriceList() {
return materialOrderItemPriceList;
}
public void setMaterialOrderItemPriceList(List<MaterialOrderItemPrice> materialOrderItemPriceList) {
this.materialOrderItemPriceList = materialOrderItemPriceList;
}
public String getCodeType() {
return codeType;
}
public void setCodeType(String codeType) {
this.codeType = codeType;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public BigDecimal getPrice() {
return price == null?BigDecimal.ZERO:price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public String getPurchaseType() {
return purchaseType;
}
public void setPurchaseType(String purchaseType) {
this.purchaseType = purchaseType;
}
public String getBigProductType() {
return bigProductType;
}
public void setBigProductType(String bigProductType) {
this.bigProductType = bigProductType;
}
public String getSmallProductType() {
return smallProductType;
}
public void setSmallProductType(String smallProductType) {
this.smallProductType = smallProductType;
}
public Integer getVersionNum() {
return versionNum;
}
public void setVersionNum(Integer versionNum) {
this.versionNum = versionNum;
}
public String getSpecialRequest() {
return specialRequest;
}
public void setSpecialRequest(String specialRequest) {
this.specialRequest = specialRequest;
}
public String getPurchaseCode() {
return purchaseCode;
}
public void setPurchaseCode(String purchaseCode) {
this.purchaseCode = purchaseCode;
}
public BigDecimal getgWeight() {
return gWeight;
}
public void setgWeight(BigDecimal gWeight) {
this.gWeight = gWeight;
}
public BigDecimal getTotalWeight() {
return totalWeight;
}
public void setTotalWeight(BigDecimal totalWeight) {
this.totalWeight = totalWeight;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public MaterialOrder getMaterialOrder() {
return materialOrder;
}
public void setMaterialOrder(MaterialOrder materialOrder) {
this.materialOrder = materialOrder;
}
public String getAreaAccount() {
return areaAccount;
}
public void setAreaAccount(String areaAccount) {
this.areaAccount = areaAccount;
}
public String getUnitAccount() {
return unitAccount;
}
public void setUnitAccount(String unitAccount) {
this.unitAccount = unitAccount;
}
public String getSiteAccount() {
return siteAccount;
}
public void setSiteAccount(String siteAccount) {
this.siteAccount = siteAccount;
}
public String getLineAccount() {
return lineAccount;
}
public void setLineAccount(String lineAccount) {
this.lineAccount = lineAccount;
}
public String getShortDescription() {
return shortDescription;
}
public void setShortDescription(String shortDescription) {
this.shortDescription = shortDescription;
}
public String getLongDescription() {
return longDescription;
}
public void setLongDescription(String longDescription) {
this.longDescription = longDescription;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public BigDecimal getDiameterL() {
return diameterL;
}
public void setDiameterL(BigDecimal diameterL) {
this.diameterL = diameterL;
}
public BigDecimal getDiameterS() {
return diameterS;
}
public void setDiameterS(BigDecimal diameterS) {
this.diameterS = diameterS;
}
public String getJacketSpec() {
return jacketSpec;
}
public void setJacketSpec(String jacketSpec) {
this.jacketSpec = jacketSpec;
}
public String getWallThicknessL() {
return wallThicknessL;
}
public void setWallThicknessL(String wallThicknessL) {
this.wallThicknessL = wallThicknessL;
}
public String getWallThicknessS() {
return wallThicknessS;
}
public void setWallThicknessS(String wallThicknessS) {
this.wallThicknessS = wallThicknessS;
}
public String getPressureLevel() {
return pressureLevel;
}
public void setPressureLevel(String pressureLevel) {
this.pressureLevel = pressureLevel;
}
public String getMaterial() {
return material;
}
public void setMaterial(String material) {
this.material = material;
}
public String getInsulationCode() {
return insulationCode;
}
public void setInsulationCode(String insulationCode) {
this.insulationCode = insulationCode;
}
public String getPicNo() {
return picNo;
}
public void setPicNo(String picNo) {
this.picNo = picNo;
}
}

View File

@@ -0,0 +1,36 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.math.BigDecimal;
@Entity
@Table(name = "t_material_order_item_old_price")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_material_order_item_old_price")
@Module(generate = false, name = "历史价格")
public class MaterialOrderItemOldPrice extends BaseEntity<Long>{
private MaterialOrderItemPrice materialOrderItemPrice;
private BigDecimal price;
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public MaterialOrderItemPrice getMaterialOrderItemPrice() {
return materialOrderItemPrice;
}
public void setMaterialOrderItemPrice(MaterialOrderItemPrice materialOrderItemPrice) {
this.materialOrderItemPrice = materialOrderItemPrice;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
}

View File

@@ -0,0 +1,105 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "t_material_order_item_price")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_material_order_item_price")
@Module(generate = false, name = "单项价格")
public class MaterialOrderItemPrice extends BaseEntity<Long>{
/**供应商信息*/
private Long supplierId;
private String supplierName;
/**供应商报价*/
private BigDecimal price;
private MaterialOrderItem materialOrderItem;
/**是否被采用*/
private Boolean haveUse = false;
/**供应商评分*/
private BigDecimal supplierEvaluate;
/**供应商优先级*/
private Integer ind;
private List<MaterialOrderItemOldPrice> materialOrderItemOldPriceList = new ArrayList<>();
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "materialOrderItemPrice")
@JsonIgnore
public List<MaterialOrderItemOldPrice> getMaterialOrderItemOldPriceList() {
return materialOrderItemOldPriceList;
}
public void setMaterialOrderItemOldPriceList(List<MaterialOrderItemOldPrice> materialOrderItemOldPriceList) {
this.materialOrderItemOldPriceList = materialOrderItemOldPriceList;
}
public Integer getInd() {
return ind ==null?100:ind;
}
public void setInd(Integer ind) {
this.ind = ind;
}
public BigDecimal getSupplierEvaluate() {
return supplierEvaluate;
}
public void setSupplierEvaluate(BigDecimal supplierEvaluate) {
this.supplierEvaluate = supplierEvaluate;
}
public Long getSupplierId() {
return supplierId;
}
public void setSupplierId(Long supplierId) {
this.supplierId = supplierId;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public MaterialOrderItem getMaterialOrderItem() {
return materialOrderItem;
}
public void setMaterialOrderItem(MaterialOrderItem materialOrderItem) {
this.materialOrderItem = materialOrderItem;
}
public Boolean getHaveUse() {
return haveUse;
}
public void setHaveUse(Boolean haveUse) {
this.haveUse = haveUse;
}
}

View File

@@ -0,0 +1,94 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.math.BigDecimal;
@Entity
@Table(name = "t_material_order_stage")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_material_order_stage")
@Module(generate = false, name = "明细表阶段")
public class MaterialOrderStage extends BaseEntity<Long> {
private String name;
private String code;
private Long progressId;
/**阶段等级*/
private Integer stageNum;
/**供应商评分权重*/
private BigDecimal speedWeight;
private BigDecimal qualityWeight;
private BigDecimal warrantyWeight;
private BigDecimal priceWeight;
public Integer getStageNum() {
return stageNum;
}
public void setStageNum(Integer stageNum) {
this.stageNum = stageNum;
}
public BigDecimal getPriceWeight() {
return priceWeight;
}
public void setPriceWeight(BigDecimal priceWeight) {
this.priceWeight = priceWeight;
}
public BigDecimal getSpeedWeight() {
return speedWeight;
}
public void setSpeedWeight(BigDecimal speedWeight) {
this.speedWeight = speedWeight;
}
public BigDecimal getQualityWeight() {
return qualityWeight;
}
public void setQualityWeight(BigDecimal qualityWeight) {
this.qualityWeight = qualityWeight;
}
public BigDecimal getWarrantyWeight() {
return warrantyWeight;
}
public void setWarrantyWeight(BigDecimal warrantyWeight) {
this.warrantyWeight = warrantyWeight;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Long getProgressId() {
return progressId;
}
public void setProgressId(Long progressId) {
this.progressId = progressId;
}
}

View File

@@ -0,0 +1,138 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
* Entity - 目录
*
* @author dealsky
* @date 2019/9/24 5:28 下午
*/
@Entity
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_menu")
@Module(generate = false)
public class Menu extends BaseEntity<Long> {
/**
* 名称
*/
private String name;
/**
* 图片图标
*/
private String icon;
/**
* 字体图标
*/
private String iconFont;
/**
* 地址
*/
private String url;
/**
* 是否显示
*/
private Boolean show;
/**
* 排序因子
*/
private Integer sortFactor;
/**
* 父级id
*/
private Long parentId;
/**
* 菜单级数
*/
private Integer level;
/**
* 权限
*/
private String permission;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getIconFont() {
return iconFont;
}
public void setIconFont(String iconFont) {
this.iconFont = iconFont;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Column(name = "is_show")
public Boolean getShow() {
return show != null ? show : false;
}
public void setShow(Boolean show) {
this.show = show;
}
public Integer getSortFactor() {
return sortFactor;
}
public void setSortFactor(Integer sortFactor) {
this.sortFactor = sortFactor;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public String getPermission() {
return permission;
}
public void setPermission(String permission) {
this.permission = permission;
}
}

View File

@@ -0,0 +1,111 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
/**
* 消息通知
*/
@Entity
@Table(name = "t_notice")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_notice")
@Module(generate = false)
public class Notice extends BaseEntity<Long> {
public enum Type {
system("系统");
String message;
Type(String message) {
this.message = message;
}
public String getMessage() {
return message;
}
}
/**
* 类型
*/
private Type type;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 精简内容
*/
private String simplifyContent;
/**
* 发布人
*/
private String publisher;
/**
* 消息通知列表
*/
private List<NoticeEntity> noticeEntityList = new ArrayList<>();
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Lob
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getSimplifyContent() {
return simplifyContent;
}
public void setSimplifyContent(String simplifyContent) {
this.simplifyContent = simplifyContent;
}
public String getPublisher() {
return publisher;
}
public void setPublisher(String publisher) {
this.publisher = publisher;
}
@OneToMany(mappedBy = "notice", cascade = CascadeType.REMOVE)
public List<NoticeEntity> getNoticeEntityList() {
return noticeEntityList;
}
public void setNoticeEntityList(List<NoticeEntity> noticeEntityList) {
this.noticeEntityList = noticeEntityList;
}
}

View File

@@ -0,0 +1,91 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
/**
* 消息通知实例
*
* @author dealsky
* @date 2020/1/15 10:09 上午
*/
@Entity
@Table(name = "t_notice_entity")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_notice_entity")
@Module(generate = false)
public class NoticeEntity extends BaseEntity<Long> {
/**
* 通知
*/
private Notice notice;
/**
* 员工
*/
private Admin admin;
/**
* 是否已读
*/
private Boolean read;
private String content;
private String title;
public String getTitle() {
if(getNotice() != null){
return getNotice().getTitle();
}else {
return title;
}
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
if(getNotice() != null){
return getNotice().getContent();
}else {
return content;
}
}
public void setContent(String content) {
this.content = content;
}
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
public Notice getNotice() {
return notice;
}
public void setNotice(Notice notice) {
this.notice = notice;
}
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
public Admin getAdmin() {
return admin;
}
public void setAdmin(Admin admin) {
this.admin = admin;
}
@Column(name = "is_read", nullable = false)
public Boolean getRead() {
return read;
}
public void setRead(Boolean read) {
this.read = read;
}
}

View File

@@ -0,0 +1,512 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.vverp.annotation.Delay;
import com.vverp.annotation.Module;
import com.vverp.base.Setting;
import com.vverp.enums.ContractType;
import com.vverp.enums.DeliveryType;
import com.vverp.enums.LossType;
import com.vverp.enums.OrderStatus;
import com.vverp.moli.util.BaseAttributeConverter;
import org.hibernate.validator.constraints.NotEmpty;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author dealsky
* @date 2020/4/26 3:50 下午
*/
@MappedSuperclass
@Module(generate = false)
public class OrderBase extends BaseEntity<Long> {
/**
* 编号
*/
@Excel(name = "订单编号", orderNum = "0", needMerge = true)
private String sn;
/**
* 状态
*/
private OrderStatus status;
/**
* 总金额
*/
private BigDecimal totalAmount;
/**
* 总数量
*/
protected BigDecimal totalCount;
/**
* 合计重量
*/
private BigDecimal totalWeight;
/**
* 已收金额
*/
private BigDecimal payedAmount = BigDecimal.ZERO;
/**
* 制单时间
*/
@Excel(name = "制单时间", orderNum = "1", needMerge = true, format = "yyyy-MM-dd")
private Date orderDate;
/**
* 管理员id
*/
private Long adminId;
/**
* 管理员名称
*/
@Excel(name = "管理员", orderNum = "2", needMerge = true)
private String adminName;
/**
* 部门id
*/
private Long departmentId;
/**
* 部门名称
*/
private String departmentName;
/**
* 客户id
*/
private Long ownerId;
/**
* 客户名称
*/
@Excel(name = "客户_salesOrder,供应商_purchaseOrder", orderNum = "3", needMerge = true)
private String ownerName;
/**
* 付款方式id
*/
private Long paymentMethodId;
/**
* 付款方式名称
*/
private String paymentMethodName;
/**
* 附件id列表
*/
private List<Long> attachFileIds = new ArrayList<>();
/**
* 交货方式
*/
private DeliveryType deliveryType;
/**
* 备注
*/
private String remark;
/**
* 导出的相关数据
*/
private String ownerAddress;
private String ownerFax;
private String ownerPhone;
private Long companyId;
private String companyName;
private String companyAddress;
private String companyPhone;
private String companyFax;
/**
* 总金额(大写)
*/
private String totalAmountCn;
/**
* 结算量
*/
private BigDecimal settlement;
/**
* 结算金额
*/
private BigDecimal settlementAmount;
/**
* 合同类型
*/
private ContractType contractType;
/**
* 是否为内部合同
*/
private Boolean internalFlag;
/**
* 损耗类别
*/
protected LossType lossType;
/**
* 是否挂账
*/
private Boolean guaZhangFlag;
/**
* 是否编辑过
*/
private Boolean editFlag;
/**
* 变更原因
*/
private String editRemark;
/**
* 是否为导入的
*/
private Boolean importFlag = Boolean.FALSE;
private String productIdStr;
/**
* 是否完成
* 不同类型的合同完成的判定条件不同
* 销售合同,采购合同,物流合同: 有付款记录 && 已开发票
*/
@Delay
private Boolean completeFlag = Boolean.FALSE;
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public String getOwnerAddress() {
return ownerAddress;
}
public void setOwnerAddress(String ownerAddress) {
this.ownerAddress = ownerAddress;
}
public String getOwnerFax() {
return ownerFax;
}
public void setOwnerFax(String ownerFax) {
this.ownerFax = ownerFax;
}
public String getOwnerPhone() {
return ownerPhone;
}
public void setOwnerPhone(String ownerPhone) {
this.ownerPhone = ownerPhone;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getCompanyAddress() {
return companyAddress;
}
public void setCompanyAddress(String companyAddress) {
this.companyAddress = companyAddress;
}
public String getCompanyPhone() {
return companyPhone;
}
public void setCompanyPhone(String companyPhone) {
this.companyPhone = companyPhone;
}
public String getCompanyFax() {
return companyFax;
}
public void setCompanyFax(String companyFax) {
this.companyFax = companyFax;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public OrderStatus getStatus() {
return status;
}
public void setStatus(OrderStatus status) {
this.status = status;
}
@Column(precision = 19, scale = 6)
public BigDecimal getTotalAmount() {
return Setting.setScale(totalAmount != null ? totalAmount : BigDecimal.ZERO);
}
public void setTotalAmount(BigDecimal totalAmount) {
this.totalAmount = totalAmount;
}
@Column(precision = 19, scale = 6)
public BigDecimal getTotalCount() {
return Setting.setScale(totalCount, 3);
}
public void setTotalCount(BigDecimal totalCount) {
this.totalCount = totalCount;
}
@Column(precision = 19, scale = 6)
public BigDecimal getTotalWeight() {
return Setting.setScale(totalWeight);
}
public void setTotalWeight(BigDecimal totalWeight) {
this.totalWeight = totalWeight;
}
@Column(precision = 19, scale = 6)
public BigDecimal getPayedAmount() {
return Setting.setScale(payedAmount);
}
public void setPayedAmount(BigDecimal payedAmount) {
this.payedAmount = payedAmount;
}
public Date getOrderDate() {
return orderDate;
}
public void setOrderDate(Date orderDate) {
this.orderDate = orderDate;
}
public Long getAdminId() {
return adminId;
}
public void setAdminId(Long adminId) {
this.adminId = adminId;
}
public String getAdminName() {
return adminName;
}
public void setAdminName(String adminName) {
this.adminName = adminName;
}
public Long getDepartmentId() {
return departmentId;
}
public void setDepartmentId(Long departmentId) {
this.departmentId = departmentId;
}
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
public Long getOwnerId() {
return ownerId;
}
public void setOwnerId(Long ownerId) {
this.ownerId = ownerId;
}
public String getOwnerName() {
return ownerName;
}
public void setOwnerName(String ownerName) {
this.ownerName = ownerName;
}
public Long getPaymentMethodId() {
return paymentMethodId;
}
public void setPaymentMethodId(Long paymentMethodId) {
this.paymentMethodId = paymentMethodId;
}
public String getPaymentMethodName() {
return paymentMethodName;
}
public void setPaymentMethodName(String paymentMethodName) {
this.paymentMethodName = paymentMethodName;
}
@NotEmpty
@Column(nullable = false, length = 4000)
@Convert(converter = AttachFileConverter.class)
public List<Long> getAttachFileIds() {
return attachFileIds;
}
public void setAttachFileIds(List<Long> attachFileIds) {
this.attachFileIds = attachFileIds;
}
public DeliveryType getDeliveryType() {
return deliveryType;
}
public void setDeliveryType(DeliveryType deliveryType) {
this.deliveryType = deliveryType;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getTotalAmountCn() {
return totalAmountCn;
}
public void setTotalAmountCn(String totalAmountCn) {
this.totalAmountCn = totalAmountCn;
}
@Column(precision = 19, scale = 6)
public BigDecimal getSettlement() {
return Setting.setScale(settlement, 3);
}
public void setSettlement(BigDecimal settlement) {
this.settlement = settlement;
}
@Column(precision = 19, scale = 6)
public BigDecimal getSettlementAmount() {
return Setting.setScale(settlementAmount != null ? settlementAmount : BigDecimal.ZERO);
}
public void setSettlementAmount(BigDecimal settlementAmount) {
this.settlementAmount = settlementAmount;
}
public ContractType getContractType() {
return contractType != null ? contractType : ContractType.normal;
}
public void setContractType(ContractType contractType) {
this.contractType = contractType;
}
public Boolean getInternalFlag() {
return internalFlag;
}
public void setInternalFlag(Boolean internalFlag) {
this.internalFlag = internalFlag;
}
public LossType getLossType() {
return lossType;
}
public void setLossType(LossType lossType) {
this.lossType = lossType;
}
public Boolean getGuaZhangFlag() {
return guaZhangFlag != null ? guaZhangFlag : false;
}
public void setGuaZhangFlag(Boolean guaZhangFlag) {
this.guaZhangFlag = guaZhangFlag;
}
public Boolean getEditFlag() {
return editFlag != null ? editFlag : false;
}
public void setEditFlag(Boolean editFlag) {
this.editFlag = editFlag;
}
public String getEditRemark() {
return editRemark;
}
public void setEditRemark(String editRemark) {
this.editRemark = editRemark;
}
public Boolean getImportFlag() {
return importFlag != null ? importFlag : false;
}
public void setImportFlag(Boolean importFlag) {
this.importFlag = importFlag;
}
@Column(length = 1000)
public String getProductIdStr() {
return productIdStr;
}
public void setProductIdStr(String productIdStr) {
this.productIdStr = productIdStr;
}
public Boolean getCompleteFlag() {
return completeFlag != null ? completeFlag : false;
}
public void setCompleteFlag(Boolean completeFlag) {
this.completeFlag = completeFlag;
}
@Converter
public static class AttachFileConverter extends BaseAttributeConverter<List<Long>> implements AttributeConverter<Object, String> {
}
}

View File

@@ -0,0 +1,183 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import com.vverp.base.Setting;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* @author dealsky
* @date 2020/3/17 4:38 下午
*/
@MappedSuperclass
@Module(generate = false)
public class OrderItemBase extends BaseEntity<Long> {
/**
* 数量
*/
private BigDecimal count;
/**
* 含税价
*/
private BigDecimal taxPrice;
/**
* 小计
*/
private BigDecimal subtotal;
/**
* 不含税价
*/
private BigDecimal priceExcludingTax;
/**
* 税金
*/
private BigDecimal taxes;
private String productField1;
private String productField2;
private String productField3;
private String productField4;
private String productField5;
private String productField6;
private String productField7;
private String productField8;
@Column(precision = 19, scale = 6)
public BigDecimal getCount() {
return Setting.setScale(count, 3);
}
public void setCount(BigDecimal count) {
this.count = count;
}
@Column(precision = 19, scale = 6)
public BigDecimal getTaxPrice() {
return Setting.setScale(taxPrice != null ? taxPrice : BigDecimal.ZERO);
}
public void setTaxPrice(BigDecimal taxPrice) {
this.taxPrice = taxPrice;
}
@Column(name = "sub_total", precision = 19, scale = 6)
public BigDecimal getSubtotal() {
if (subtotal != null) {
return Setting.setScale(subtotal);
} else {
return count.multiply(getTaxPrice()).setScale(2, RoundingMode.HALF_UP);
}
}
public void setSubtotal(BigDecimal subtotal) {
this.subtotal = subtotal;
}
@Column(precision = 19, scale = 6)
public BigDecimal getPriceExcludingTax() {
if (priceExcludingTax != null) {
return Setting.setScale(priceExcludingTax);
} else {
return count.multiply(getTaxPrice()).divide(new BigDecimal("1.13"), 2, RoundingMode.HALF_UP);
}
}
public void setPriceExcludingTax(BigDecimal priceExcludingTax) {
this.priceExcludingTax = priceExcludingTax;
}
@Column(precision = 19, scale = 6)
public BigDecimal getTaxes() {
if (taxes != null) {
return Setting.setScale(taxes);
} else {
return count.multiply(getTaxPrice()).multiply(BigDecimal.valueOf(0.13 / 1.13)).setScale(2, RoundingMode.HALF_UP);
}
}
public void setTaxes(BigDecimal taxes) {
this.taxes = taxes;
}
public String getProductField1() {
return productField1;
}
public void setProductField1(String productField1) {
this.productField1 = productField1;
}
public String getProductField2() {
return productField2;
}
public void setProductField2(String productField2) {
this.productField2 = productField2;
}
public String getProductField3() {
return productField3;
}
public void setProductField3(String productField3) {
this.productField3 = productField3;
}
public String getProductField4() {
return productField4;
}
public void setProductField4(String productField4) {
this.productField4 = productField4;
}
public String getProductField5() {
return productField5;
}
public void setProductField5(String productField5) {
this.productField5 = productField5;
}
public String getProductField6() {
return productField6;
}
public void setProductField6(String productField6) {
this.productField6 = productField6;
}
public String getProductField7() {
return productField7;
}
public void setProductField7(String productField7) {
this.productField7 = productField7;
}
public String getProductField8() {
return productField8;
}
public void setProductField8(String productField8) {
this.productField8 = productField8;
}
}

View File

@@ -0,0 +1,78 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
* 订单记录
* @author dealsky
* @date 2020/4/13 9:08 上午
*/
@Entity
@Table(name = "t_order_log")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_order_log")
@Module(generate = false)
public class OrderLog extends BaseEntity<Long> {
public enum Type {
create("创建"),
approve("审批"),
invalid("作废");
String name;
Type(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
/**
* 订单id
*/
private String sn;
private Type type;
private Long adminId;
private String adminName;
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
public Long getAdminId() {
return adminId;
}
public void setAdminId(Long adminId) {
this.adminId = adminId;
}
public String getAdminName() {
return adminName;
}
public void setAdminName(String adminName) {
this.adminName = adminName;
}
}

View File

@@ -0,0 +1,81 @@
package com.vverp.entity;
import com.vverp.annotation.Field;
import com.vverp.annotation.Module;
import com.vverp.base.Setting;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.math.BigDecimal;
/**
* Entity - 收款账户
*
* @author dealsky
* @date 2019-09-21 12:20
*/
@Entity
@Table(name = "t_payment_account")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_payment_account")
@Module(name = "收款账号")
public class PaymentAccount extends BaseEntity<Long> {
/**
* 收款名称
*/
@Field(name = "收款名称")
private String name;
/**
* 收款账号
*/
@Field(name = "收款账号")
private String account;
/**
* 开户行
*/
@Field(name = "开户行")
private String bankName;
/**
* 期末余款
*/
@Field(name = "期末余款")
private BigDecimal balance;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
@Column(precision = 19, scale = 6)
public BigDecimal getBalance() {
return Setting.setScale(balance);
}
public void setBalance(BigDecimal balance) {
this.balance = balance;
}
}

View File

@@ -0,0 +1,529 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import com.vverp.base.Setting;
import com.vverp.enums.Reservoir;
import org.hibernate.validator.constraints.NotEmpty;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* Entity - 付款申请
*
* @author dealsky
* @date 2020/6/14 4:58 下午
*/
@Entity
@Table(name = "t_payment_apply")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_payment_apply")
@Module(generate = false)
public class PaymentApply extends BaseEntity<Long> {
public enum Type {
purchaseOrder("采购合同"),
salesOrder("销售合同"),
transportContract("运输合同"),
inspection("商检"),
warehouseOrder("仓储合同"),
others("其他合同"),
shipInsurance("船运保险");
String name;
Type(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
public enum Status {
wait("审批中"),
complete("已完成"),
create("待审批"),
beConfirmed("待确认");
String name;
Status(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
/**
* 收付款
*/
public enum ReceivePayment {
payment("付款"),
receive("收款");
String name;
ReceivePayment(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
/**
* 类型
*/
private Type type;
/**
* 状态
*/
private Status status;
/**
* 合同id
*/
private Long contentId;
/**
* 合同编号
*/
private String contentSn;
/**合同金额*/
private BigDecimal contentAmount;
/**
* 部门id
*/
private Long departmentId;
/**
* 部门名称
*/
private String departmentName;
/**
* 管理员id
*/
private Long adminId;
/**
* 管理员名称
*/
private String adminName;
/**
* 公司id
*/
private Long companyId;
/**
* 公司名称
*/
private String companyName;
/**
* 客户/供应商id
*/
private Long ownerId;
/**
* 客户/供应商名称
*/
private String ownerName;
/**
* 申请时间
*/
private Date applyDate;
/**
* 付款金额
*/
private BigDecimal amount;
/**
* 付款金额(大写)
*/
private String amountCn;
/**
* 开户银行
*/
private String bankName;
/**
* 银行账号
*/
private String bankAccount;
/**
* 付款说明
*/
private String remark;
/**
* 付款类型
*/
private String paymentType;
/**
* 附件id列表
*/
private List<Long> attachFileIds = new ArrayList<>();
/**
* 付款日期
*/
private Date payDate;
/**
* 是否审批失败
*/
private Boolean approvalFailed = Boolean.FALSE;
/**
* 是否需要合同
*/
private Boolean contractRequired = Boolean.TRUE;
/**
* 付款确认图片
*/
private String confirmImage;
/**
* 附件id列表
*/
private List<Long> confirmAttachFileIds = new ArrayList<>();
/**
* 收/付款
*/
private ReceivePayment receivePayment;
/**
* 库区
*/
private Reservoir reservoir;
/**
* 出纳是否确认
* 收款需要出纳确认
*/
private Boolean cashierConfirmFlag = Boolean.FALSE;
/**阶段*/
public enum Stage{
pre("预付款"),
speed("进度款"),
arrival("到货款"),
debugging("调试款"),
number("数字化款"),
ensure("质保金");
Stage(String message){
this.message= message;
}
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
/**采购方式*/
private String purchaseType;
/**实际交货日期*/
private String arrivalDate;
private Stage stage;
/**概算金额*/
private BigDecimal estimatedAmount;
public BigDecimal getContentAmount() {
return contentAmount;
}
public void setContentAmount(BigDecimal contentAmount) {
this.contentAmount = contentAmount;
}
public String getPurchaseType() {
return purchaseType;
}
public void setPurchaseType(String purchaseType) {
this.purchaseType = purchaseType;
}
public String getArrivalDate() {
return arrivalDate;
}
public void setArrivalDate(String arrivalDate) {
this.arrivalDate = arrivalDate;
}
public BigDecimal getEstimatedAmount() {
return estimatedAmount;
}
public void setEstimatedAmount(BigDecimal estimatedAmount) {
this.estimatedAmount = estimatedAmount;
}
public Stage getStage() {
return stage;
}
public void setStage(Stage stage) {
this.stage = stage;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public Long getContentId() {
return contentId;
}
public void setContentId(Long contentId) {
this.contentId = contentId;
}
public String getContentSn() {
return contentSn;
}
public void setContentSn(String contentSn) {
this.contentSn = contentSn;
}
public Long getDepartmentId() {
return departmentId;
}
public void setDepartmentId(Long departmentId) {
this.departmentId = departmentId;
}
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
public Long getAdminId() {
return adminId;
}
public void setAdminId(Long adminId) {
this.adminId = adminId;
}
public String getAdminName() {
return adminName;
}
public void setAdminName(String adminName) {
this.adminName = adminName;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public Long getOwnerId() {
return ownerId;
}
public void setOwnerId(Long ownerId) {
this.ownerId = ownerId;
}
public String getOwnerName() {
return ownerName;
}
public void setOwnerName(String ownerName) {
this.ownerName = ownerName;
}
public Date getApplyDate() {
return applyDate;
}
public void setApplyDate(Date applyDate) {
this.applyDate = applyDate;
}
@Column(precision = 19, scale = 6)
public BigDecimal getAmount() {
return Setting.setScale(amount);
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public String getAmountCn() {
return amountCn;
}
public void setAmountCn(String amountCn) {
this.amountCn = amountCn;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public String getBankAccount() {
return bankAccount;
}
public void setBankAccount(String bankAccount) {
this.bankAccount = bankAccount;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getPaymentType() {
return paymentType;
}
public void setPaymentType(String paymentType) {
this.paymentType = paymentType;
}
@NotEmpty
@Column(nullable = false, length = 4000)
@Convert(converter = OrderBase.AttachFileConverter.class)
public List<Long> getAttachFileIds() {
return attachFileIds;
}
public void setAttachFileIds(List<Long> attachFileIds) {
this.attachFileIds = attachFileIds;
}
public Date getPayDate() {
return payDate;
}
public void setPayDate(Date payDate) {
this.payDate = payDate;
}
public Boolean getApprovalFailed() {
return approvalFailed != null ? approvalFailed : false;
}
public void setApprovalFailed(Boolean approvalFailed) {
this.approvalFailed = approvalFailed;
}
@Column(nullable = false)
public Boolean getContractRequired() {
return contractRequired;
}
public void setContractRequired(Boolean contractRequired) {
this.contractRequired = contractRequired;
}
public String getConfirmImage() {
return confirmImage;
}
public void setConfirmImage(String confirmImage) {
this.confirmImage = confirmImage;
}
@NotEmpty
@Column(nullable = false, length = 4000)
@Convert(converter = OrderBase.AttachFileConverter.class)
public List<Long> getConfirmAttachFileIds() {
return confirmAttachFileIds;
}
public void setConfirmAttachFileIds(List<Long> confirmAttachFileIds) {
this.confirmAttachFileIds = confirmAttachFileIds;
}
public ReceivePayment getReceivePayment() {
return receivePayment != null ? receivePayment : ReceivePayment.payment;
}
public void setReceivePayment(ReceivePayment receivePayment) {
this.receivePayment = receivePayment;
}
public Reservoir getReservoir() {
return reservoir != null ? reservoir : Reservoir.zs;
}
public void setReservoir(Reservoir reservoir) {
this.reservoir = reservoir;
}
public Boolean getCashierConfirmFlag() {
return cashierConfirmFlag != null ? cashierConfirmFlag : false;
}
public void setCashierConfirmFlag(Boolean cashierConfirmFlag) {
this.cashierConfirmFlag = cashierConfirmFlag;
}
}

View File

@@ -0,0 +1,74 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.util.List;
/**
* Entity - 付款方式
*
* @author dealsky
* @date 2020/4/26 10:42 上午
*/
@Entity
@Table(name = "t_payment_method")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_payment_method")
@Module(generate = false, name = "付款方式")
public class PaymentMethod extends BaseEntity<Long> {
/**
* 名称
*/
private String name;
/**
* 编码
*/
private String code;
/**
* 备注
*/
private String remark;
/**
* 项列表
*/
private List<PaymentMethodItem> paymentMethodItemList;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@JsonIgnore
@OneToMany(mappedBy = "paymentMethod", cascade = CascadeType.REMOVE)
public List<PaymentMethodItem> getPaymentMethodItemList() {
return paymentMethodItemList;
}
public void setPaymentMethodItemList(List<PaymentMethodItem> paymentMethodItemList) {
this.paymentMethodItemList = paymentMethodItemList;
}
}

View File

@@ -0,0 +1,91 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import com.vverp.base.Setting;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
/**
* Entity - 收款方式项
*
* @author dealsky
* @date 2020/4/26 10:54 上午
*/
@Entity
@Table(name = "t_payment_method_item")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_payment_method_item")
@Module(generate = false)
public class PaymentMethodItem extends BaseEntity<Long> {
/**
* 付款日期
*/
private Date date;
/**
* 付款比例
*/
private BigDecimal ratio;
/**
* 付款金额
*/
private BigDecimal amount;
/**
* 备注
*/
private String remark;
/**
* 付款方式
*/
private PaymentMethod paymentMethod;
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
@Column(precision = 19, scale = 6)
public BigDecimal getRatio() {
return Setting.setScale(ratio);
}
public void setRatio(BigDecimal ratio) {
this.ratio = ratio;
}
@Column(precision = 19, scale = 6)
public BigDecimal getAmount() {
return Setting.setScale(amount);
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
public PaymentMethod getPaymentMethod() {
return paymentMethod;
}
public void setPaymentMethod(PaymentMethod paymentMethod) {
this.paymentMethod = paymentMethod;
}
}

View File

@@ -0,0 +1,38 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**压力等级*/
@Entity
@Table(name = "t_pressure_level")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_pressure_level")
@Module(generate = false)
@ExcelTarget("pressureLevel")
public class PressureLevel extends BaseEntity<Long>{
@Excel(name = "名称", orderNum = "1")
private String name;
@Excel(name = "编号", orderNum = "2")
private String code;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@@ -0,0 +1,134 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
* 打印设置
*
* @author dealsky
* @date 2020/4/23 5:17 下午
*/
@Entity
@Table(name = "t_print_setting")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_print_setting")
@Module(name = "打印设置", generate = false)
public class PrintSetting extends BaseEntity<Long> {
/**
* 纸张类型
*/
public enum PaperType {
A4("A4"),
A5("A5");
String name;
PaperType(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
/**
* 打印方向
*/
public enum PrintDirection {
VERTICAL("纵向打印"),
HORIZONTAL("横向打印");
String name;
PrintDirection(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
/**
* 名称
*/
private String name;
/**
* 纸张类型
*/
private PaperType paperType;
/**
* 打印方向
*/
private PrintDirection printDirection;
/**
* 打印份数
*/
private Integer count;
/**
* 表头列数
*/
private Integer headerColCount;
/**
* 标题
*/
private String title;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public PaperType getPaperType() {
return paperType;
}
public void setPaperType(PaperType paperType) {
this.paperType = paperType;
}
public PrintDirection getPrintDirection() {
return printDirection;
}
public void setPrintDirection(PrintDirection printDirection) {
this.printDirection = printDirection;
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public Integer getHeaderColCount() {
return headerColCount;
}
public void setHeaderColCount(Integer headerColCount) {
this.headerColCount = headerColCount;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}

View File

@@ -0,0 +1,467 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Field;
import com.vverp.annotation.Module;
import com.vverp.base.Setting;
import org.hibernate.validator.constraints.NotEmpty;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* @author dealsky
* @date 2020/2/25 1:11 下午
*/
@Entity
@Table(name = "t_product")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_product")
@Module(name = "产品")
@ExcelTarget("product")
public class Product extends BaseEntity<Long> {
@Field(name = "名称")
@Excel(name = "名称_product,产品名称_inventory", orderNum = "1")
private String name;
@Field(name = "编码")
@Excel(name = "编码_product", orderNum = "2")
private String code;
// @Field(name = "零售价")
// @Excel(name = "零售价_product", orderNum = "3")
private BigDecimal retailPrice;
/**
* 含税价
*/
private BigDecimal taxPrice;
// @Field(name = "采购价")
// @Excel(name = "采购价_product", orderNum = "3")
private BigDecimal purchasePrice;
/**
* 参考采购价(含税)
*/
private BigDecimal purchaseTaxPrice;
// @Field(name = "规格")
// @Excel(name = "规格_product", orderNum = "4")
private String format;
// @Field(name = "单重")
// @Excel(name = "单重_product", orderNum = "5")
private BigDecimal gWeight;
// @Field(name = "型号")
// @Excel(name = "型号_product", orderNum = "6")
private String pattern;
// @Field(name = "颜色")
// @Excel(name = "颜色_product", orderNum = "7")
private String colour;
/**
* 产品类别
*/
@ExcelEntity(id = "reference")
private ProductType productType;
/**
* 最低库存
*/
private BigDecimal minInventory;
/**
* 最高库存
*/
private BigDecimal maxInventory;
/**
* 是否为基础物料
*/
private Boolean baseMaterial;
/**
* 参考成本价
*/
private BigDecimal referCostPrice;
/**设备类型(类型不同,字段不同)*/
public enum Type{
tool("备件/工具"),
conduit("管道"),
device("设备");
Type(String message){
this.message = message;
}
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
/**管道的特有字段*/
/**主项号*/
private String areaAccount;
/**单元号*/
private String unitAccount;
/**分区号*/
private String siteAccount;
/**管线号*/
private String lineAccount;
/**短描述*/
@Field(name = "短描述")
@Excel(name = "短描述_product", orderNum = "4")
private String shortDescription;
/**长描述*/
@Field(name = "长描述")
@Excel(name = "长描述_product", orderNum = "5")
private String longDescription;
/**单位*/
private String unit;
/**公称直径(L)*/
private BigDecimal diameterL;
/**公称直径(S)*/
private BigDecimal diameterS;
/**壁厚L*/
private BigDecimal wallThicknessL;
/**壁厚S*/
private BigDecimal wallThicknessS;
/**压力等级*/
private String pressureLevel;
/**材质*/
private String material;
/**隔热代号*/
private String insulationCode;
private String codeType;
/**设备专有字段*/
/**设备图号*/
private String picNo;
/**
* 图纸id列表
*/
private List<Long> attachFileIds = new ArrayList<>();
private Type type;
@Field(name = "库存数量")
@Excel(name = "库存数量_product", orderNum = "3")
private BigDecimal stockCount = BigDecimal.ZERO;
private List<ProgressStock> progressStockList = new ArrayList<>();
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "product")
@JsonIgnore
public List<ProgressStock> getProgressStockList() {
return progressStockList;
}
public void setProgressStockList(List<ProgressStock> progressStockList) {
this.progressStockList = progressStockList;
}
public BigDecimal getStockCount() {
return stockCount == null?BigDecimal.ZERO:stockCount;
}
public void setStockCount(BigDecimal stockCount) {
this.stockCount = stockCount;
}
public String getCodeType() {
return codeType;
}
public void setCodeType(String codeType) {
this.codeType = codeType;
}
public String getPicNo() {
return picNo;
}
public void setPicNo(String picNo) {
this.picNo = picNo;
}
@NotEmpty
@Column(nullable = false, length = 4000)
@Convert(converter = OrderBase.AttachFileConverter.class)
public List<Long> getAttachFileIds() {
return attachFileIds;
}
public void setAttachFileIds(List<Long> attachFileIds) {
this.attachFileIds = attachFileIds;
}
public String getAreaAccount() {
return areaAccount;
}
public void setAreaAccount(String areaAccount) {
this.areaAccount = areaAccount;
}
public String getUnitAccount() {
return unitAccount;
}
public void setUnitAccount(String unitAccount) {
this.unitAccount = unitAccount;
}
public String getSiteAccount() {
return siteAccount;
}
public void setSiteAccount(String siteAccount) {
this.siteAccount = siteAccount;
}
public String getLineAccount() {
return lineAccount;
}
public void setLineAccount(String lineAccount) {
this.lineAccount = lineAccount;
}
public String getShortDescription() {
return shortDescription;
}
public void setShortDescription(String shortDescription) {
this.shortDescription = shortDescription;
}
@Lob
public String getLongDescription() {
return longDescription;
}
public void setLongDescription(String longDescription) {
this.longDescription = longDescription;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public BigDecimal getDiameterL() {
return diameterL;
}
public void setDiameterL(BigDecimal diameterL) {
this.diameterL = diameterL;
}
public BigDecimal getDiameterS() {
return diameterS;
}
public void setDiameterS(BigDecimal diameterS) {
this.diameterS = diameterS;
}
public BigDecimal getWallThicknessL() {
return wallThicknessL;
}
public void setWallThicknessL(BigDecimal wallThicknessL) {
this.wallThicknessL = wallThicknessL;
}
public BigDecimal getWallThicknessS() {
return wallThicknessS;
}
public void setWallThicknessS(BigDecimal wallThicknessS) {
this.wallThicknessS = wallThicknessS;
}
public String getPressureLevel() {
return pressureLevel;
}
public void setPressureLevel(String pressureLevel) {
this.pressureLevel = pressureLevel;
}
public String getMaterial() {
return material;
}
public void setMaterial(String material) {
this.material = material;
}
public String getInsulationCode() {
return insulationCode;
}
public void setInsulationCode(String insulationCode) {
this.insulationCode = insulationCode;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
@Column(precision = 19, scale = 6)
public BigDecimal getRetailPrice() {
return Setting.setScale(retailPrice);
}
public void setRetailPrice(BigDecimal retailPrice) {
this.retailPrice = retailPrice;
}
@Column(precision = 19, scale = 6)
public BigDecimal getTaxPrice() {
return Setting.setScale(taxPrice);
}
public void setTaxPrice(BigDecimal taxPrice) {
this.taxPrice = taxPrice;
}
@Column(precision = 19, scale = 6)
public BigDecimal getPurchasePrice() {
return Setting.setScale(purchasePrice);
}
public void setPurchasePrice(BigDecimal purchasePrice) {
this.purchasePrice = purchasePrice;
}
public BigDecimal getPurchaseTaxPrice() {
return Setting.setScale(purchaseTaxPrice);
}
public void setPurchaseTaxPrice(BigDecimal purchaseTaxPrice) {
this.purchaseTaxPrice = purchaseTaxPrice;
}
public String getFormat() {
return format;
}
public void setFormat(String format) {
this.format = format;
}
@Column(precision = 19, scale = 6)
public BigDecimal getgWeight() {
return Setting.setScale(gWeight);
}
public void setgWeight(BigDecimal gWeight) {
this.gWeight = gWeight;
}
public String getPattern() {
return pattern;
}
public void setPattern(String pattern) {
this.pattern = pattern;
}
public String getColour() {
return colour;
}
public void setColour(String colour) {
this.colour = colour;
}
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
public ProductType getProductType() {
return productType;
}
public void setProductType(ProductType productType) {
this.productType = productType;
}
@Column(precision = 19, scale = 6)
public BigDecimal getMinInventory() {
return Setting.setScale(minInventory);
}
public void setMinInventory(BigDecimal minInventory) {
this.minInventory = minInventory;
}
@Column(precision = 19, scale = 6)
public BigDecimal getMaxInventory() {
return Setting.setScale(maxInventory);
}
public void setMaxInventory(BigDecimal maxInventory) {
this.maxInventory = maxInventory;
}
public Boolean getBaseMaterial() {
return baseMaterial != null ? baseMaterial : false;
}
public void setBaseMaterial(Boolean baseMaterial) {
this.baseMaterial = baseMaterial;
}
@Column(precision = 19, scale = 6)
public BigDecimal getReferCostPrice() {
return Setting.setScale(referCostPrice);
}
public void setReferCostPrice(BigDecimal referCostPrice) {
this.referCostPrice = referCostPrice;
}
}

View File

@@ -0,0 +1,154 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
/**
* Entity - 产品类别
*
* @author dealsky
* @date 2020/3/11 9:28 上午
*/
@Entity
@Table(name = "t_product_type")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_product_type")
@Module(generate = false)
@ExcelTarget("productType")
public class ProductType extends BaseEntity<Long> {
/**
* 名称
*/
@Excel(name = "名称_productType,类别名称_reference", orderNum = "1")
private String name;
/**
* 父级id
*/
private Long parentId;
/**
* 类别级数
*/
private Integer level;
/**
* 排序因子
*/
private Integer sortFactor;
/**
* 链
*/
private String chain;
/**
* 产品列表
*/
private List<Product> productList;
private List<SupplierProduct> supplierProductList = new ArrayList<>();
// private List<AdminPurchase> adminPurchaseList = new ArrayList<>();
/**描述*/
private String typeDescribe;
private List<AdminPurchaseProductType> adminPurchaseProductTypeList = new ArrayList<>();
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "productType")
@JsonIgnore
public List<AdminPurchaseProductType> getAdminPurchaseProductTypeList() {
return adminPurchaseProductTypeList;
}
public void setAdminPurchaseProductTypeList(List<AdminPurchaseProductType> adminPurchaseProductTypeList) {
this.adminPurchaseProductTypeList = adminPurchaseProductTypeList;
}
public String getTypeDescribe() {
return typeDescribe;
}
public void setTypeDescribe(String typeDescribe) {
this.typeDescribe = typeDescribe;
}
// @OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "productType")
// @JsonIgnore
// public List<AdminPurchase> getAdminPurchaseList() {
// return adminPurchaseList;
// }
//
// public void setAdminPurchaseList(List<AdminPurchase> adminPurchaseList) {
// this.adminPurchaseList = adminPurchaseList;
// }
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "productType")
@JsonIgnore
public List<SupplierProduct> getSupplierProductList() {
return supplierProductList;
}
public void setSupplierProductList(List<SupplierProduct> supplierProductList) {
this.supplierProductList = supplierProductList;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public Integer getSortFactor() {
return sortFactor;
}
public void setSortFactor(Integer sortFactor) {
this.sortFactor = sortFactor;
}
public String getChain() {
return chain;
}
public void setChain(String chain) {
this.chain = chain;
}
@JsonIgnore
@OneToMany(mappedBy = "productType", cascade = CascadeType.REMOVE)
public List<Product> getProductList() {
return productList;
}
public void setProductList(List<Product> productList) {
this.productList = productList;
}
}

View File

@@ -0,0 +1,86 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
/**项目*/
@Entity
@Table(name = "t_progress")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_progress")
@Module(generate = false)
public class Progress extends BaseEntity<Long>{
/**项目名称*/
private String name;
/**项目号*/
private String code;
private String information;
/**单位*/
private String unit;
public enum Type{
EPC("总承包(EPC)"),
E("设计(E)");
Type(String message){
this.message =message;
}
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
private Type type;
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getInformation() {
return information;
}
public void setInformation(String information) {
this.information = information;
}
}

View File

@@ -0,0 +1,56 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.math.BigDecimal;
/**项目库存*/
@Entity
@Table(name = "t_progress_stock")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_progress_stock")
@Module(generate = false)
public class ProgressStock extends BaseEntity<Long>{
private Product product;
private BigDecimal stockCount;
private Long progressId;
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public Product getProduct() {
return product;
}
public void setProduct(Product product) {
this.product = product;
}
public BigDecimal getStockCount() {
return stockCount;
}
public void setStockCount(BigDecimal stockCount) {
this.stockCount = stockCount;
}
public Long getProgressId() {
return progressId;
}
public void setProgressId(Long progressId) {
this.progressId = progressId;
}
private String productType;
@Transient
public String getProductType() {
return productType;
}
public void setProductType(String productType) {
this.productType = productType;
}
}

View File

@@ -0,0 +1,25 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**项目单位*/
@Entity
@Table(name = "t_progress_unit")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_progress_unit")
@Module(generate = false)
public class ProgressUnit extends BaseEntity<Long>{
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@@ -0,0 +1,147 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Entity
@Table(name = "t_purchase_apply_order")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_purchase_apply_order")
@Module(generate = false, name = "请购单")
public class PurchaseApplyOrder extends OrderBase{
public enum Type{
device("设备请购单"),
conduit("管道请购单");
Type(String message){
this.message = message;
}
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
private Type type;
private List<PurchaseApplyOrderItem> purchaseApplyOrderItemList = new ArrayList<>();
/**创建的采购单*/
private Long purchaseOrderId;
/**版本号*/
private Integer versionNum;
/**项目*/
private Long progressId;
private String progressName;
private String progressCode;
/**综合材料明细表*/
private Long materialOrderId;
private String materialOrderSn;
private String materialOrderName;
/**流水号*/
private Integer flowNum;
public String getMaterialOrderName() {
return materialOrderName;
}
public void setMaterialOrderName(String materialOrderName) {
this.materialOrderName = materialOrderName;
}
public Integer getFlowNum() {
return flowNum;
}
public void setFlowNum(Integer flowNum) {
this.flowNum = flowNum;
}
public String getMaterialOrderSn() {
return materialOrderSn;
}
public void setMaterialOrderSn(String materialOrderSn) {
this.materialOrderSn = materialOrderSn;
}
public String getProgressName() {
return progressName;
}
public void setProgressName(String progressName) {
this.progressName = progressName;
}
public String getProgressCode() {
return progressCode;
}
public void setProgressCode(String progressCode) {
this.progressCode = progressCode;
}
public Long getMaterialOrderId() {
return materialOrderId;
}
public void setMaterialOrderId(Long materialOrderId) {
this.materialOrderId = materialOrderId;
}
public Long getProgressId() {
return progressId;
}
public void setProgressId(Long progressId) {
this.progressId = progressId;
}
public Integer getVersionNum() {
return versionNum;
}
public void setVersionNum(Integer versionNum) {
this.versionNum = versionNum;
}
public Long getPurchaseOrderId() {
return purchaseOrderId;
}
public void setPurchaseOrderId(Long purchaseOrderId) {
this.purchaseOrderId = purchaseOrderId;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "purchaseApplyOrder")
@JsonIgnore
public List<PurchaseApplyOrderItem> getPurchaseApplyOrderItemList() {
return purchaseApplyOrderItemList;
}
public void setPurchaseApplyOrderItemList(List<PurchaseApplyOrderItem> purchaseApplyOrderItemList) {
this.purchaseApplyOrderItemList = purchaseApplyOrderItemList;
}
}

View File

@@ -0,0 +1,503 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "t_purchase_apply_order_item")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_purchase_apply_order_item")
@Module(generate = false, name = "请购单项")
public class PurchaseApplyOrderItem extends OrderItemBase{
private Long productId;
private String name;
private String productCode;
private PurchaseApplyOrder purchaseApplyOrder;
private BigDecimal price;
/**产品类别大类*/
private String bigProductType;
/**产品类别小类*/
private String smallProductType;
private Long productTypeId;
/**版本*/
private Integer versionNum;
/**特殊要求*/
private String specialRequest;
/**采购码*/
private String purchaseCode;
/**主项号*/
private String areaAccount;
/**单元号*/
private String unitAccount;
/**分区号*/
private String siteAccount;
/**管线号*/
private String lineAccount;
/**短描述*/
private String shortDescription;
/**长描述*/
private String longDescription;
/**单位*/
private String unit;
/**公称直径(L)*/
private BigDecimal diameterL;
/**公称直径(S)*/
private BigDecimal diameterS;
/** 夹套规格 */
private String jacketSpec;
/**壁厚L*/
private String wallThicknessL;
/**壁厚S*/
private String wallThicknessS;
/**压力等级*/
private String pressureLevel;
/**材质*/
private String material;
/**隔热代号*/
private String insulationCode;
/**单重*/
private BigDecimal gWeight;
/**总重*/
private BigDecimal totalWeight;
/**尺寸标准*/
private String size;
/**端面*/
private String endFace;
/**编号类型*/
private String codeType;
/**设备专有字段*/
/**设备图号*/
private String picNo;
/**采购类型*/
private String purchaseType;
private String memo;
/**报价人*/
private Long supplierId;
private String supplierName;
/**报价单*/
private List<PurchaseApplyOrderItemPrice> purchaseApplyOrderItemPriceList = new ArrayList<>();
/**旧版本不显示*/
private Boolean oldVersion = false;
/**序号*/
private Integer ind;
/**请购单号*/
private String itemCode;
/**明细表项id*/
private Long materialOrderItemId;
private Boolean canChangePrice;
private String format;
public String getFormat() {
return format;
}
public void setFormat(String format) {
this.format = format;
}
public Boolean getCanChangePrice() {
return canChangePrice;
}
public void setCanChangePrice(Boolean canChangePrice) {
this.canChangePrice = canChangePrice;
}
public String getSize() {
return size;
}
public void setSize(String size) {
this.size = size;
}
public String getEndFace() {
return endFace;
}
public void setEndFace(String endFace) {
this.endFace = endFace;
}
public Long getMaterialOrderItemId() {
return materialOrderItemId;
}
public void setMaterialOrderItemId(Long materialOrderItemId) {
this.materialOrderItemId = materialOrderItemId;
}
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public Integer getInd() {
return ind;
}
public void setInd(Integer ind) {
this.ind = ind;
}
public Boolean getOldVersion() {
return oldVersion;
}
public void setOldVersion(Boolean oldVersion) {
this.oldVersion = oldVersion;
}
public Long getSupplierId() {
return supplierId;
}
public void setSupplierId(Long supplierId) {
this.supplierId = supplierId;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "purchaseApplyOrderItem")
@JsonIgnore
public List<PurchaseApplyOrderItemPrice> getPurchaseApplyOrderItemPriceList() {
return purchaseApplyOrderItemPriceList;
}
public void setPurchaseApplyOrderItemPriceList(List<PurchaseApplyOrderItemPrice> purchaseApplyOrderItemPriceList) {
this.purchaseApplyOrderItemPriceList = purchaseApplyOrderItemPriceList;
}
public Long getProductTypeId() {
return productTypeId;
}
public void setProductTypeId(Long productTypeId) {
this.productTypeId = productTypeId;
}
public String getCodeType() {
return codeType;
}
public void setCodeType(String codeType) {
this.codeType = codeType;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public String getPurchaseType() {
return purchaseType;
}
public void setPurchaseType(String purchaseType) {
this.purchaseType = purchaseType;
}
public String getBigProductType() {
return bigProductType;
}
public void setBigProductType(String bigProductType) {
this.bigProductType = bigProductType;
}
public String getSmallProductType() {
return smallProductType;
}
public void setSmallProductType(String smallProductType) {
this.smallProductType = smallProductType;
}
public Integer getVersionNum() {
return versionNum;
}
public void setVersionNum(Integer versionNum) {
this.versionNum = versionNum;
}
public String getSpecialRequest() {
return specialRequest;
}
public void setSpecialRequest(String specialRequest) {
this.specialRequest = specialRequest;
}
public String getPurchaseCode() {
return purchaseCode;
}
public void setPurchaseCode(String purchaseCode) {
this.purchaseCode = purchaseCode;
}
public BigDecimal getgWeight() {
return gWeight == null?BigDecimal.ZERO:gWeight;
}
public void setgWeight(BigDecimal gWeight) {
this.gWeight = gWeight;
}
public BigDecimal getTotalWeight() {
return totalWeight;
}
public void setTotalWeight(BigDecimal totalWeight) {
this.totalWeight = totalWeight;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public PurchaseApplyOrder getPurchaseApplyOrder() {
return purchaseApplyOrder;
}
public void setPurchaseApplyOrder(PurchaseApplyOrder purchaseApplyOrder) {
this.purchaseApplyOrder = purchaseApplyOrder;
}
public String getAreaAccount() {
return areaAccount;
}
public void setAreaAccount(String areaAccount) {
this.areaAccount = areaAccount;
}
public String getUnitAccount() {
return unitAccount;
}
public void setUnitAccount(String unitAccount) {
this.unitAccount = unitAccount;
}
public String getSiteAccount() {
return siteAccount;
}
public void setSiteAccount(String siteAccount) {
this.siteAccount = siteAccount;
}
public String getLineAccount() {
return lineAccount;
}
public void setLineAccount(String lineAccount) {
this.lineAccount = lineAccount;
}
public String getShortDescription() {
return shortDescription;
}
public void setShortDescription(String shortDescription) {
this.shortDescription = shortDescription;
}
public String getLongDescription() {
return longDescription;
}
public void setLongDescription(String longDescription) {
this.longDescription = longDescription;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public BigDecimal getDiameterL() {
return diameterL;
}
public void setDiameterL(BigDecimal diameterL) {
this.diameterL = diameterL;
}
public BigDecimal getDiameterS() {
return diameterS;
}
public void setDiameterS(BigDecimal diameterS) {
this.diameterS = diameterS;
}
public String getJacketSpec() {
return jacketSpec;
}
public void setJacketSpec(String jacketSpec) {
this.jacketSpec = jacketSpec;
}
public String getWallThicknessL() {
return wallThicknessL;
}
public void setWallThicknessL(String wallThicknessL) {
this.wallThicknessL = wallThicknessL;
}
public String getWallThicknessS() {
return wallThicknessS;
}
public void setWallThicknessS(String wallThicknessS) {
this.wallThicknessS = wallThicknessS;
}
public String getPressureLevel() {
return pressureLevel;
}
public void setPressureLevel(String pressureLevel) {
this.pressureLevel = pressureLevel;
}
public String getMaterial() {
return material;
}
public void setMaterial(String material) {
this.material = material;
}
public String getInsulationCode() {
return insulationCode;
}
public void setInsulationCode(String insulationCode) {
this.insulationCode = insulationCode;
}
public String getPicNo() {
return picNo;
}
public void setPicNo(String picNo) {
this.picNo = picNo;
}
public void setData(MaterialOrderItem item) {
setProductId(item.getProductId());
setName(item.getName());
setProductCode(item.getProductCode());
setPrice(item.getPrice());
setBigProductType(item.getBigProductType());
setSmallProductType(item.getSmallProductType());
setProductTypeId(item.getSmallTypeId()==null?item.getBigProductTypeId():item.getSmallTypeId());
setSpecialRequest(item.getSpecialRequest());
setPurchaseCode(item.getPurchaseCode());
setAreaAccount(item.getAreaAccount());
setUnitAccount(item.getUnitAccount());
setSiteAccount(item.getSiteAccount());
setLineAccount(item.getLineAccount());
setShortDescription(item.getShortDescription());
setLongDescription(item.getLongDescription());
setUnit(item.getUnit());
setDiameterL(item.getDiameterL());
setDiameterS(item.getDiameterS());
setJacketSpec(item.getJacketSpec());
setWallThicknessL(item.getWallThicknessL());
setWallThicknessS(item.getWallThicknessS());
setPressureLevel(item.getPressureLevel());
setMaterial(item.getMaterial());
setInsulationCode(item.getInsulationCode());
setgWeight(item.getgWeight());
setTotalWeight(item.getTotalWeight());
setSize(item.getSize());
setEndFace(item.getEndFace());
setCodeType(item.getCodeType());
setPicNo(item.getPicNo());
setPurchaseType(item.getPurchaseType());
setMemo(item.getMemo());
setInd(item.getInd());
setMaterialOrderItemId(item.getId());
setCount(item.getCount());
setExtraField(item);
}
}

View File

@@ -0,0 +1,69 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.math.BigDecimal;
@Entity
@Table(name = "t_purchase_apply_order_item_price")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_purchase_apply_order_item_price")
@Module(generate = false, name = "请购单项价格")
public class PurchaseApplyOrderItemPrice extends BaseEntity<Long>{
/**供应商信息*/
private Long supplierId;
private String supplierName;
/**供应商报价*/
private BigDecimal price;
private PurchaseApplyOrderItem purchaseApplyOrderItem;
/**是否被采用*/
private Boolean haveUse = false;
public Long getSupplierId() {
return supplierId;
}
public void setSupplierId(Long supplierId) {
this.supplierId = supplierId;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public PurchaseApplyOrderItem getPurchaseApplyOrderItem() {
return purchaseApplyOrderItem;
}
public void setPurchaseApplyOrderItem(PurchaseApplyOrderItem purchaseApplyOrderItem) {
this.purchaseApplyOrderItem = purchaseApplyOrderItem;
}
public Boolean getHaveUse() {
return haveUse;
}
public void setHaveUse(Boolean haveUse) {
this.haveUse = haveUse;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,889 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Delay;
import com.vverp.annotation.Module;
import com.vverp.base.Setting;
import com.vverp.enums.TransportType;
import org.springframework.core.annotation.Order;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* @author dealsky
* @date 2020-03-25 16:50
*/
@Entity
@Table(name = "t_purchase_order_item")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_purchase_order_item")
@Module(generate = false, name = "采购订单项")
public class PurchaseOrderItem extends OrderItemBase {
private PurchaseOrder purchaseOrder;
/**
* 产品id
*/
private Long productId;
/**
* 名称
*/
@Excel(name = "产品名称", orderNum = "1")
private String name;
/**
* 价格
*/
@Excel(name = "价格", orderNum = "2")
private BigDecimal price;
/**
* 规格
*/
@Excel(name = "规格", orderNum = "4")
private String format;
/**
* 重量
*/
@Excel(name = "重量", orderNum = "5")
private BigDecimal gWeight;
/**
* 型号
*/
@Excel(name = "型号", orderNum = "6")
private String pattern;
/**
* 颜色
*/
@Excel(name = "颜色", orderNum = "7")
private String colour;
/**
* 供应商发货数量
*/
private BigDecimal deliveryCount = BigDecimal.ZERO;
/**
* 入库数量
*/
private BigDecimal inboundCount = BigDecimal.ZERO;
/**
* 销售订单项id(按单采购)
*/
private Long salesOrderItemId;
/**
* 到货时间
*/
private Date arrivalDate;
/**
* 品质最小值id
*/
private Long minProductQualityId;
/**
* 品质最大值id
*/
private Long maxProductQualityId;
/**
* 实际品名
*/
private String realName;
/**
* 实际数量
*/
private BigDecimal actualCount;
/**
* 油罐id
*/
private Long warehouseId;
/**
* 油罐名称
*/
private String warehouseName;
/**
* 油罐多选信息
*/
private String warehouseArr = "";
/**
* 实际到货时间
*/
private Date actualArrivalDate;
/**
* 数量损耗(百分比)
*/
private BigDecimal countLoss;
/**
* 实际品质参数id
*/
private Long actualProductQualityId;
/**
* 结算量
*/
private BigDecimal settlement = BigDecimal.ZERO;
/**
* 已开票数量
*/
@Delay
private BigDecimal invoiceCount = BigDecimal.ZERO;
/**
* 仓库状态
* 物流部主页手动设置出入库状态
*/
private Boolean warehouseState = Boolean.FALSE;
/**
* 动态信息
*/
private String dynamicInfo;
/**
* 调整卸货量
*/
private BigDecimal adjustDischargeQuantity;
/**
* 调整出入库时间
*/
private Date adjustInventoryDate;
/**
* 调整运费
*/
private BigDecimal adjustTransportAmount;
/**
* 调整运输方式
*/
private TransportType adjustTransportType;
/**
* 最晚出/入库时间
*/
@Delay
private Date latestInventoryDate;
/**排序号*/
private Integer ind;
/**编号*/
private String productCode;
/**产品类别大类*/
private String bigProductType;
/**产品类别小类*/
private String smallProductType;
/**版本*/
private String versionNum;
/**特殊要求*/
private String specialRequest;
/**采购码*/
private String purchaseCode;
/**主项号*/
private String areaAccount;
/**单元号*/
private String unitAccount;
/**分区号*/
private String siteAccount;
/**管线号*/
private String lineAccount;
/**短描述*/
private String shortDescription;
/**长描述*/
private String longDescription;
/**单位*/
private String unit;
/**公称直径(L)*/
private BigDecimal diameterL;
/**公称直径(S)*/
private BigDecimal diameterS;
/** 夹套规格 */
private String jacketSpec;
/**壁厚L*/
private String wallThicknessL;
/**壁厚S*/
private String wallThicknessS;
/**压力等级*/
private String pressureLevel;
/**材质*/
private String material;
/**隔热代号*/
private String insulationCode;
/**编号类型*/
private String codeType;
/**备注*/
private String memo;
/**图号*/
private String picNo;
/**采购类型*/
private String purchaseType;
/**请购单号*/
private String applyItemCode;
/**端面*/
private String endFace;
/**尺寸*/
private String size;
private String makeCode;
private String makeName;
private String materialType;
private BigDecimal totalWeight;
/**上次采购数量*/
private BigDecimal prePurchaseCount = BigDecimal.ZERO;
/**订货数量*/
private BigDecimal purchaseCount;
/**已订货数量*/
private BigDecimal havePurchaseCount = BigDecimal.ZERO;
/**代替发货*/
private Long replaceProductId;
private String replaceProductName;
private String replaceProductCode;
private String replaceLong;
private String replaceShort;
/** 料单 */
private Map<String, Object> materialOrderMap = new HashMap<>();
public String getReplaceLong() {
return replaceLong;
}
public void setReplaceLong(String replaceLong) {
this.replaceLong = replaceLong;
}
public String getReplaceShort() {
return replaceShort;
}
public void setReplaceShort(String replaceShort) {
this.replaceShort = replaceShort;
}
public Long getReplaceProductId() {
return replaceProductId;
}
public void setReplaceProductId(Long replaceProductId) {
this.replaceProductId = replaceProductId;
}
public String getReplaceProductName() {
return replaceProductName;
}
public void setReplaceProductName(String replaceProductName) {
this.replaceProductName = replaceProductName;
}
public String getReplaceProductCode() {
return replaceProductCode;
}
public void setReplaceProductCode(String replaceProductCode) {
this.replaceProductCode = replaceProductCode;
}
public BigDecimal getHavePurchaseCount() {
return Setting.setScale(havePurchaseCount != null ? havePurchaseCount : BigDecimal.ZERO, 3);
}
public void setHavePurchaseCount(BigDecimal havePurchaseCount) {
this.havePurchaseCount = havePurchaseCount;
}
public BigDecimal getPrePurchaseCount() {
return Setting.setScale(prePurchaseCount != null ? prePurchaseCount : BigDecimal.ZERO, 3);
}
public void setPrePurchaseCount(BigDecimal prePurchaseCount) {
this.prePurchaseCount = prePurchaseCount;
}
public BigDecimal getPurchaseCount() {
return Setting.setScale(purchaseCount != null ? purchaseCount : BigDecimal.ZERO, 3);
}
public void setPurchaseCount(BigDecimal purchaseCount) {
this.purchaseCount = purchaseCount;
}
public BigDecimal getTotalWeight() {
return totalWeight;
}
public void setTotalWeight(BigDecimal totalWeight) {
this.totalWeight = totalWeight;
}
public String getMakeCode() {
return makeCode;
}
public void setMakeCode(String makeCode) {
this.makeCode = makeCode;
}
public String getMakeName() {
return makeName;
}
public void setMakeName(String makeName) {
this.makeName = makeName;
}
public String getMaterialType() {
return materialType;
}
public void setMaterialType(String materialType) {
this.materialType = materialType;
}
public String getSize() {
return size;
}
public void setSize(String size) {
this.size = size;
}
public String getEndFace() {
return endFace;
}
public void setEndFace(String endFace) {
this.endFace = endFace;
}
public String getApplyItemCode() {
return applyItemCode;
}
public void setApplyItemCode(String applyItemCode) {
this.applyItemCode = applyItemCode;
}
public String getPurchaseType() {
return purchaseType;
}
public void setPurchaseType(String purchaseType) {
this.purchaseType = purchaseType;
}
public String getPicNo() {
return picNo;
}
public void setPicNo(String picNo) {
this.picNo = picNo;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public String getBigProductType() {
return bigProductType;
}
public void setBigProductType(String bigProductType) {
this.bigProductType = bigProductType;
}
public String getSmallProductType() {
return smallProductType;
}
public void setSmallProductType(String smallProductType) {
this.smallProductType = smallProductType;
}
public String getVersionNum() {
return versionNum;
}
public void setVersionNum(String versionNum) {
this.versionNum = versionNum;
}
public String getSpecialRequest() {
return specialRequest;
}
public void setSpecialRequest(String specialRequest) {
this.specialRequest = specialRequest;
}
public String getPurchaseCode() {
return purchaseCode;
}
public void setPurchaseCode(String purchaseCode) {
this.purchaseCode = purchaseCode;
}
public String getAreaAccount() {
return areaAccount;
}
public void setAreaAccount(String areaAccount) {
this.areaAccount = areaAccount;
}
public String getUnitAccount() {
return unitAccount;
}
public void setUnitAccount(String unitAccount) {
this.unitAccount = unitAccount;
}
public String getSiteAccount() {
return siteAccount;
}
public void setSiteAccount(String siteAccount) {
this.siteAccount = siteAccount;
}
public String getLineAccount() {
return lineAccount;
}
public void setLineAccount(String lineAccount) {
this.lineAccount = lineAccount;
}
public String getShortDescription() {
return shortDescription;
}
public void setShortDescription(String shortDescription) {
this.shortDescription = shortDescription;
}
public String getLongDescription() {
return longDescription;
}
public void setLongDescription(String longDescription) {
this.longDescription = longDescription;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public BigDecimal getDiameterL() {
return diameterL;
}
public void setDiameterL(BigDecimal diameterL) {
this.diameterL = diameterL;
}
public BigDecimal getDiameterS() {
return diameterS;
}
public void setDiameterS(BigDecimal diameterS) {
this.diameterS = diameterS;
}
public String getJacketSpec() {
return jacketSpec;
}
public void setJacketSpec(String jacketSpec) {
this.jacketSpec = jacketSpec;
}
public String getWallThicknessL() {
return wallThicknessL;
}
public void setWallThicknessL(String wallThicknessL) {
this.wallThicknessL = wallThicknessL;
}
public String getWallThicknessS() {
return wallThicknessS;
}
public void setWallThicknessS(String wallThicknessS) {
this.wallThicknessS = wallThicknessS;
}
public String getPressureLevel() {
return pressureLevel;
}
public void setPressureLevel(String pressureLevel) {
this.pressureLevel = pressureLevel;
}
public String getMaterial() {
return material;
}
public void setMaterial(String material) {
this.material = material;
}
public String getInsulationCode() {
return insulationCode;
}
public void setInsulationCode(String insulationCode) {
this.insulationCode = insulationCode;
}
public String getCodeType() {
return codeType;
}
public void setCodeType(String codeType) {
this.codeType = codeType;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public Integer getInd() {
return ind;
}
public void setInd(Integer ind) {
this.ind = ind;
}
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
public PurchaseOrder getPurchaseOrder() {
return purchaseOrder;
}
public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
this.purchaseOrder = purchaseOrder;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Column(precision = 19, scale = 6)
public BigDecimal getPrice() {
return Setting.setScale(price != null ? price : BigDecimal.ZERO);
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public String getFormat() {
return format;
}
public void setFormat(String format) {
this.format = format;
}
@Column(precision = 19, scale = 6)
public BigDecimal getgWeight() {
return Setting.setScale(gWeight);
}
public void setgWeight(BigDecimal gWeight) {
this.gWeight = gWeight;
}
public String getPattern() {
return pattern;
}
public void setPattern(String pattern) {
this.pattern = pattern;
}
public String getColour() {
return colour;
}
public void setColour(String colour) {
this.colour = colour;
}
@Column(precision = 19, scale = 6)
public BigDecimal getDeliveryCount() {
return Setting.setScale(deliveryCount, 3);
}
public void setDeliveryCount(BigDecimal deliveryCount) {
this.deliveryCount = deliveryCount;
}
@Column(precision = 19, scale = 6)
public BigDecimal getInboundCount() {
return Setting.setScale(inboundCount, 3);
}
public void setInboundCount(BigDecimal inboundCount) {
this.inboundCount = inboundCount;
}
public Long getSalesOrderItemId() {
return salesOrderItemId;
}
public void setSalesOrderItemId(Long salesOrderItemId) {
this.salesOrderItemId = salesOrderItemId;
}
public Date getArrivalDate() {
return arrivalDate;
}
public void setArrivalDate(Date arrivalDate) {
this.arrivalDate = arrivalDate;
}
public Long getMinProductQualityId() {
return minProductQualityId;
}
public void setMinProductQualityId(Long minProductQualityId) {
this.minProductQualityId = minProductQualityId;
}
public Long getMaxProductQualityId() {
return maxProductQualityId;
}
public void setMaxProductQualityId(Long maxProductQualityId) {
this.maxProductQualityId = maxProductQualityId;
}
@Column(precision = 19, scale = 6)
public BigDecimal getActualCount() {
return Setting.setScale(actualCount, 3);
}
public void setActualCount(BigDecimal actualCount) {
this.actualCount = actualCount;
}
public Long getWarehouseId() {
return warehouseId;
}
public void setWarehouseId(Long warehouseId) {
this.warehouseId = warehouseId;
}
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
@Column(nullable = false, length = 4000)
public String getWarehouseArr() {
return warehouseArr;
}
public void setWarehouseArr(String warehouseArr) {
this.warehouseArr = warehouseArr;
}
public Date getActualArrivalDate() {
return actualArrivalDate;
}
public void setActualArrivalDate(Date actualArrivalDate) {
this.actualArrivalDate = actualArrivalDate;
}
@Column(precision = 19, scale = 6)
public BigDecimal getCountLoss() {
return Setting.setScale(countLoss);
}
public void setCountLoss(BigDecimal countLoss) {
this.countLoss = countLoss;
}
public Long getActualProductQualityId() {
return actualProductQualityId;
}
public void setActualProductQualityId(Long actualProductQualityId) {
this.actualProductQualityId = actualProductQualityId;
}
@Column(precision = 19, scale = 6)
public BigDecimal getSettlement() {
return Setting.setScale(settlement != null ? settlement : BigDecimal.ZERO, 3);
}
public void setSettlement(BigDecimal settlement) {
this.settlement = settlement;
}
@Column(precision = 19, scale = 6)
public BigDecimal getInvoiceCount() {
return Setting.setScale(invoiceCount != null ? invoiceCount : BigDecimal.ZERO, 3);
}
public void setInvoiceCount(BigDecimal invoiceCount) {
this.invoiceCount = invoiceCount;
}
public Boolean getWarehouseState() {
return warehouseState != null ? warehouseState : false;
}
public void setWarehouseState(Boolean warehouseState) {
this.warehouseState = warehouseState;
}
public String getDynamicInfo() {
return dynamicInfo;
}
public void setDynamicInfo(String dynamicInfo) {
this.dynamicInfo = dynamicInfo;
}
@Column(precision = 19, scale = 6)
public BigDecimal getAdjustDischargeQuantity() {
return Setting.setScale(adjustDischargeQuantity, 3);
}
public void setAdjustDischargeQuantity(BigDecimal adjustDischargeQuantity) {
this.adjustDischargeQuantity = adjustDischargeQuantity;
}
public Date getAdjustInventoryDate() {
return adjustInventoryDate;
}
public void setAdjustInventoryDate(Date adjustInventoryDate) {
this.adjustInventoryDate = adjustInventoryDate;
}
@Column(precision = 19, scale = 6)
public BigDecimal getAdjustTransportAmount() {
return Setting.setScale(adjustTransportAmount);
}
public void setAdjustTransportAmount(BigDecimal adjustTransportAmount) {
this.adjustTransportAmount = adjustTransportAmount;
}
public TransportType getAdjustTransportType() {
return adjustTransportType;
}
public void setAdjustTransportType(TransportType adjustTransportType) {
this.adjustTransportType = adjustTransportType;
}
public Date getLatestInventoryDate() {
return latestInventoryDate;
}
public void setLatestInventoryDate(Date latestInventoryDate) {
this.latestInventoryDate = latestInventoryDate;
}
/**
* 待开票数量
*/
@Transient
public BigDecimal getInvoicePayableCount() {
BigDecimal count;
if (getSettlement().compareTo(BigDecimal.ZERO) > 0) {
count = getSettlement();
} else {
count = getCount();
}
return count.subtract(getInvoiceCount());
}
@Transient
public Map<String, Object> getMaterialOrderMap() {
return materialOrderMap;
}
public void setMaterialOrderMap(Map<String, Object> materialOrderMap) {
this.materialOrderMap = materialOrderMap;
}
}

View File

@@ -0,0 +1,243 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import com.vverp.base.Setting;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author dealsky
* @date 2020/2/21 4:09 下午
*/
@Entity
@Table(name = "t_purchase_stock")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_purchase_stock")
@Module(generate = false, name = "采购入库单")
public class PurchaseStock extends OrderBase {
/**
* 订单项
*/
private List<PurchaseStockItem> purchaseStockItemList = new ArrayList<>();
/**
* 采购订单id(按单入库)
*/
private Long purchaseOrderId;
/**
* 采购订单编号(按单入库)
*/
private String purchaseOrderSn;
/**
* 提货地
*/
private String provenance;
/**
* 交货地
*/
private String destination;
/**
* 物流状态
*/
private Boolean logisticsState;
/**
* 仓库状态
*/
private Boolean warehouseState;
/**
* 品质状态
*/
private Boolean qualityState;
/**项目名称*/
private String progressName;
/**供货商联系人*/
private String supplierName;
/**供货商联系方式*/
private String supplierPhone;
/**供货商邮箱*/
private String supplierEmail;
/**发货日期*/
private Date sendDate;
/**预计到货日期*/
private Date preDate;
/**运输车辆车牌号*/
private String carNo;
/**司机姓名或电话*/
private String driverNamePhone;
/** 到货日期:入库核对时设置,导出入库单使用 */
private Date arrivedDate;
private Long progressId;
public Long getProgressId() {
return progressId;
}
public void setProgressId(Long progressId) {
this.progressId = progressId;
}
public String getSupplierEmail() {
return supplierEmail;
}
public void setSupplierEmail(String supplierEmail) {
this.supplierEmail = supplierEmail;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public String getProgressName() {
return progressName;
}
public void setProgressName(String progressName) {
this.progressName = progressName;
}
public String getSupplierPhone() {
return supplierPhone;
}
public void setSupplierPhone(String supplierPhone) {
this.supplierPhone = supplierPhone;
}
public Date getSendDate() {
return sendDate;
}
public void setSendDate(Date sendDate) {
this.sendDate = sendDate;
}
public Date getPreDate() {
return preDate;
}
public void setPreDate(Date preDate) {
this.preDate = preDate;
}
public String getCarNo() {
return carNo;
}
public void setCarNo(String carNo) {
this.carNo = carNo;
}
public String getDriverNamePhone() {
return driverNamePhone;
}
public void setDriverNamePhone(String driverNamePhone) {
this.driverNamePhone = driverNamePhone;
}
@JsonIgnore
@OneToMany(mappedBy = "purchaseStock", cascade = CascadeType.REMOVE)
public List<PurchaseStockItem> getPurchaseStockItemList() {
return purchaseStockItemList;
}
public void setPurchaseStockItemList(List<PurchaseStockItem> purchaseStockItemList) {
this.purchaseStockItemList = purchaseStockItemList;
}
public Long getPurchaseOrderId() {
return purchaseOrderId;
}
public void setPurchaseOrderId(Long purchaseOrderId) {
this.purchaseOrderId = purchaseOrderId;
}
public String getPurchaseOrderSn() {
return purchaseOrderSn;
}
public void setPurchaseOrderSn(String purchaseOrderSn) {
this.purchaseOrderSn = purchaseOrderSn;
}
public String getProvenance() {
return provenance;
}
public void setProvenance(String provenance) {
this.provenance = provenance;
}
public String getDestination() {
return destination;
}
public void setDestination(String destination) {
this.destination = destination;
}
public Boolean getLogisticsState() {
return logisticsState != null ? logisticsState : false;
}
public void setLogisticsState(Boolean logisticsState) {
this.logisticsState = logisticsState;
}
public Boolean getWarehouseState() {
return warehouseState != null ? warehouseState : false;
}
public void setWarehouseState(Boolean warehouseState) {
this.warehouseState = warehouseState;
}
public Boolean getQualityState() {
return qualityState != null ? qualityState : false;
}
public void setQualityState(Boolean qualityState) {
this.qualityState = qualityState;
}
public Date getArrivedDate() {
return arrivedDate;
}
public void setArrivedDate(Date arrivedDate) {
this.arrivedDate = arrivedDate;
}
@Transient
public BigDecimal getTotalCount() {
BigDecimal totalCount = super.getTotalCount();
if (totalCount == null) {
totalCount = BigDecimal.ZERO;
for (PurchaseStockItem item : getPurchaseStockItemList()) {
totalCount = totalCount.add(item.getCount());
}
super.setTotalCount(totalCount);
}
return super.getTotalCount();
}
}

View File

@@ -0,0 +1,492 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import com.vverp.base.Setting;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
/**
* @author dealsky
* @date 2020/3/26 10:44 上午
*/
@Entity
@Table(name = "t_purchase_stock_item")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_purchase_stock_item")
@Module(generate = false, name = "采购入库单项")
public class PurchaseStockItem extends OrderItemBase {
private PurchaseStock purchaseStock;
/**
* 产品id
*/
private Long productId;
/**
* 名称
*/
private String name;
/**
* 价格
*/
private BigDecimal price;
/**
* 规格
*/
private String format;
/**
* 重量
*/
private BigDecimal gWeight;
/**
* 型号
*/
private String pattern;
/**
* 颜色
*/
private String colour;
/**
* 采购订单项id(按单入库)
*/
private Long purchaseOrderItemId;
/**
* 仓库id
*/
private Long warehouseId;
/**
* 仓库名称
*/
private String warehouseName;
/**
* 到货时间
*/
private Date arrivalDate;
/**
* 实际品质参数id
*/
private Long actualProductQualityId;
/**
* 实际数量
*/
private BigDecimal actualCount;
/**
* 实际到货时间
*/
private Date actualArrivalDate;
/**
* 数量损耗(百分比)
*/
private BigDecimal countLoss;
/**
* 品质最小值id
*/
private Long minProductQualityId;
/**
* 品质最大值id
*/
private Long maxProductQualityId;
/**
* 实际品名
*/
private String realName;
/**编号*/
private String productCode;
/**材质*/
private String material;
/**单位*/
private String unit;
/**重量小计*/
private BigDecimal totalWeight;
/**包装形式*/
private String packType;
/**包装箱号*/
private String packNo;
/**图号*/
private String picNo;
/**备注*/
private String memo;
/**采购单序号*/
private Integer purchaseItemInd;
/**主项号*/
private String areaAccount;
/**单元号*/
private String unitAccount;
/**分区号*/
private String siteAccount;
/**管线号*/
private String lineAccount;
/**编码类型*/
private String codeType;
/**长描述*/
private String longDescription;
/**入库数量*/
private BigDecimal inStockNum;
/**公称直径*/
private BigDecimal diameterL;
private BigDecimal diameterS;
/** 夹套规格 */
private String jacketSpec;
/**代替发货*/
private Long replaceProductId;
private String replaceProductName;
private String replaceProductCode;
public Long getReplaceProductId() {
return replaceProductId;
}
public void setReplaceProductId(Long replaceProductId) {
this.replaceProductId = replaceProductId;
}
public String getReplaceProductName() {
return replaceProductName;
}
public void setReplaceProductName(String replaceProductName) {
this.replaceProductName = replaceProductName;
}
public String getReplaceProductCode() {
return replaceProductCode;
}
public void setReplaceProductCode(String replaceProductCode) {
this.replaceProductCode = replaceProductCode;
}
public BigDecimal getDiameterL() {
return diameterL;
}
public void setDiameterL(BigDecimal diameterL) {
this.diameterL = diameterL;
}
public BigDecimal getDiameterS() {
return diameterS;
}
public void setDiameterS(BigDecimal diameterS) {
this.diameterS = diameterS;
}
public String getJacketSpec() {
return jacketSpec;
}
public void setJacketSpec(String jacketSpec) {
this.jacketSpec = jacketSpec;
}
@Column(precision = 19, scale = 6)
public BigDecimal getInStockNum() {
return Setting.setScale(inStockNum != null ? inStockNum : BigDecimal.ZERO, 3);
}
public void setInStockNum(BigDecimal inStockNum) {
this.inStockNum = inStockNum;
}
public String getAreaAccount() {
return areaAccount;
}
public void setAreaAccount(String areaAccount) {
this.areaAccount = areaAccount;
}
public String getUnitAccount() {
return unitAccount;
}
public void setUnitAccount(String unitAccount) {
this.unitAccount = unitAccount;
}
public String getSiteAccount() {
return siteAccount;
}
public void setSiteAccount(String siteAccount) {
this.siteAccount = siteAccount;
}
public String getLineAccount() {
return lineAccount;
}
public void setLineAccount(String lineAccount) {
this.lineAccount = lineAccount;
}
public String getCodeType() {
return codeType;
}
public void setCodeType(String codeType) {
this.codeType = codeType;
}
public String getLongDescription() {
return longDescription;
}
public void setLongDescription(String longDescription) {
this.longDescription = longDescription;
}
public Integer getPurchaseItemInd() {
return purchaseItemInd;
}
public void setPurchaseItemInd(Integer purchaseItemInd) {
this.purchaseItemInd = purchaseItemInd;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public String getPicNo() {
return picNo;
}
public void setPicNo(String picNo) {
this.picNo = picNo;
}
public String getPackType() {
return packType;
}
public void setPackType(String packType) {
this.packType = packType;
}
public String getPackNo() {
return packNo;
}
public void setPackNo(String packNo) {
this.packNo = packNo;
}
public BigDecimal getTotalWeight() {
return totalWeight;
}
public void setTotalWeight(BigDecimal totalWeight) {
this.totalWeight = totalWeight;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getMaterial() {
return material;
}
public void setMaterial(String material) {
this.material = material;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
public PurchaseStock getPurchaseStock() {
return purchaseStock;
}
public void setPurchaseStock(PurchaseStock purchaseStock) {
this.purchaseStock = purchaseStock;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Column(precision = 19, scale = 6)
public BigDecimal getPrice() {
return Setting.setScale(price != null ? price : BigDecimal.ZERO);
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public String getFormat() {
return format;
}
public void setFormat(String format) {
this.format = format;
}
@Column(precision = 19, scale = 6)
public BigDecimal getgWeight() {
return Setting.setScale(gWeight);
}
public void setgWeight(BigDecimal gWeight) {
this.gWeight = gWeight;
}
public String getPattern() {
return pattern;
}
public void setPattern(String pattern) {
this.pattern = pattern;
}
public String getColour() {
return colour;
}
public void setColour(String colour) {
this.colour = colour;
}
public Long getPurchaseOrderItemId() {
return purchaseOrderItemId;
}
public void setPurchaseOrderItemId(Long purchaseOrderItemId) {
this.purchaseOrderItemId = purchaseOrderItemId;
}
public Long getWarehouseId() {
return warehouseId;
}
public void setWarehouseId(Long warehouseId) {
this.warehouseId = warehouseId;
}
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public Date getArrivalDate() {
return arrivalDate;
}
public void setArrivalDate(Date arrivalDate) {
this.arrivalDate = arrivalDate;
}
public Long getActualProductQualityId() {
return actualProductQualityId;
}
public void setActualProductQualityId(Long actualProductQualityId) {
this.actualProductQualityId = actualProductQualityId;
}
@Column(precision = 19, scale = 6)
public BigDecimal getActualCount() {
return Setting.setScale(actualCount);
}
public void setActualCount(BigDecimal actualCount) {
this.actualCount = actualCount;
}
public Date getActualArrivalDate() {
return actualArrivalDate;
}
public void setActualArrivalDate(Date actualArrivalDate) {
this.actualArrivalDate = actualArrivalDate;
}
public BigDecimal getCountLoss() {
return countLoss != null ? countLoss : BigDecimal.ZERO;
}
public void setCountLoss(BigDecimal countLoss) {
this.countLoss = countLoss;
}
public Long getMinProductQualityId() {
return minProductQualityId;
}
public void setMinProductQualityId(Long minProductQualityId) {
this.minProductQualityId = minProductQualityId;
}
public Long getMaxProductQualityId() {
return maxProductQualityId;
}
public void setMaxProductQualityId(Long maxProductQualityId) {
this.maxProductQualityId = maxProductQualityId;
}
}

View File

@@ -0,0 +1,212 @@
/*
* Copyright 2013-2017 vverp.com. All rights reserved.
* Support: http://www.vverp.com
* License: http://www.vverp.com/license
*/
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.vverp.annotation.Module;
import com.vverp.enums.DataRange;
import com.vverp.moli.util.*;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* Entity - 角色
*
* @author
* @version 1.0
*/
@Entity
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_role")
@Module(name = "角色", generate = false)
public class Role extends BaseEntity<Long> {
private static final long serialVersionUID = -5297794640913081563L;
/**
* 名称
*/
private String name;
/**
* 中文名
*/
@Excel(name = "角色名称")
private String chineseName;
/**
* 是否内置
*/
private Boolean isSystem;
/**
* 描述
*/
private String description;
/**
* 权限
*/
private List<String> authorities = new ArrayList<>();
/**
* 表格列权限
*/
private List<String> tableColumnControlAuthorityList = new ArrayList<>();
/**
* 管理员
*/
private Set<Admin> admins = new HashSet<>();
/**
* 数据可见性
*/
private DataRange dataRange = DataRange.all;
/**
* 获取名称
*
* @return 名称
*/
@NotEmpty
@Length(max = 200)
@Column(nullable = false)
public String getName() {
return name;
}
/**
* 设置名称
*
* @param name 名称
*/
public void setName(String name) {
this.name = name;
}
public String getChineseName() {
return chineseName;
}
public void setChineseName(String chineseName) {
this.chineseName = chineseName;
}
/**
* 获取是否内置
*
* @return 是否内置
*/
@Column(nullable = false, updatable = false)
public Boolean getIsSystem() {
return isSystem;
}
/**
* 设置是否内置
*
* @param isSystem 是否内置
*/
public void setIsSystem(Boolean isSystem) {
this.isSystem = isSystem;
}
/**
* 获取描述
*
* @return 描述
*/
@Length(max = 200)
public String getDescription() {
return description;
}
/**
* 设置描述
*
* @param description 描述
*/
public void setDescription(String description) {
this.description = description;
}
/**
* 获取权限
*
* @return 权限
*/
@NotEmpty
@Column(nullable = false, length = 4000)
@Convert(converter = AuthorityConverter.class)
public List<String> getAuthorities() {
return authorities;
}
/**
* 设置权限
*
* @param authorities 权限
*/
public void setAuthorities(List<String> authorities) {
this.authorities = authorities;
}
@NotEmpty
@Column(nullable = false, length = 4000)
@Convert(converter = AuthorityConverter.class)
public List<String> getTableColumnControlAuthorityList() {
return tableColumnControlAuthorityList;
}
public void setTableColumnControlAuthorityList(List<String> tableColumnControlAuthorityList) {
this.tableColumnControlAuthorityList = tableColumnControlAuthorityList;
}
/**
* 获取管理员
*
* @return 管理员
*/
@ManyToMany(mappedBy = "roles", fetch = FetchType.LAZY)
public Set<Admin> getAdmins() {
return admins;
}
/**
* 设置管理员
*
* @param admins 管理员
*/
public void setAdmins(Set<Admin> admins) {
this.admins = admins;
}
public DataRange getDataRange() {
return dataRange != null ? dataRange : DataRange.all;
}
public void setDataRange(DataRange dataRange) {
this.dataRange = dataRange;
}
/**
* 类型转换 - 权限
*
* @author
* @version 1.0
*/
@Converter
public static class AuthorityConverter extends BaseAttributeConverter<List<String>> implements AttributeConverter<Object, String> {
}
}

View File

@@ -0,0 +1,39 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**尺寸标准*/
@Entity
@Table(name = "t_size_standard")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_size_standard")
@Module(generate = false)
@ExcelTarget("sizeStandard")
public class SizeStandard extends BaseEntity<Long>{
@Excel(name = "名称", orderNum = "1")
private String name;
@Excel(name = "代号", orderNum = "2")
private String code;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@@ -0,0 +1,48 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
* Entity - 编号实例
*
* @author dealsky
* @date 2020/4/18 3:09 下午
*/
@Entity
@Table(name = "t_sn_entity")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_sn_entity")
@Module(generate = false)
public class SnEntity extends BaseEntity<Long> {
/**
* 编号
*/
private String sn;
/**
* 指向
*/
private String target;
@Column(nullable = false, unique = true)
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getTarget() {
return target;
}
public void setTarget(String target) {
this.target = target;
}
}

View File

@@ -0,0 +1,79 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
* @author dealsky
* @date 2020/3/30 11:43 上午
*/
@Entity
@Table(name = "t_sn_info")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_sn_info")
@Module(generate = false)
public class SnInfo extends BaseEntity<Long> {
/**
* 类型
*/
public enum Type {
order("订单"),
product("产品");
String name;
Type(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
/**
* 类型
*/
private Type type;
/**
* 末值
*/
private Long lastValue;
/**
* 日期字符串 - yyyyMMdd
*/
private String dateString;
@Column(nullable = false)
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
@Column(nullable = false)
public Long getLastValue() {
return lastValue;
}
public void setLastValue(Long lastValue) {
this.lastValue = lastValue;
}
@Column(nullable = false)
public String getDateString() {
return dateString;
}
public void setDateString(String dateString) {
this.dateString = dateString;
}
}

View File

@@ -0,0 +1,49 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
* Entity - 编号前缀
*
* @author dealsky
* @date 2020/4/18 12:23 下午
*/
@Entity
@Table(name = "t_sn_prefix")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_sn_prefix")
@Module(generate = false)
public class SnPrefix extends BaseEntity<Long> {
/**
* 名称
*/
private String name;
/**
* 前缀
*/
private String prefix;
@Column(nullable = false, unique = true)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Column(nullable = false)
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
}

View File

@@ -0,0 +1,161 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.math.BigDecimal;
/**
* 统计相关
* @author dealsky
* @date 2020/1/13 11:11 上午
*/
@Entity
@Table(name = "t_statistic")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_statistic")
@Module(generate = false)
public class Statistic extends BaseEntity<Long> {
/**
* 周期
*/
public enum Period {
/**
* 年
*/
year,
/**
* 月
*/
month,
/**
* 日
*/
day
}
/**
* 年
*/
private Integer year;
/**
* 月
*/
private Integer month;
/**
* 日
*/
private Integer day;
/**
* 销售金额
*/
private BigDecimal salesAmount;
/**
* 采购金额
*/
private BigDecimal purchaseAmount;
/**
* 销售订单数
*/
private Long salesOrderCount;
/**
* 采购订单数
*/
private Long purchaseOrderCount;
public Statistic() {
}
public Statistic(Integer year, BigDecimal salesAmount, BigDecimal purchaseAmount, Long salesOrderCount, Long purchaseOrderCount) {
this.year = year;
this.salesAmount = salesAmount;
this.purchaseAmount = purchaseAmount;
this.salesOrderCount = salesOrderCount;
this.purchaseOrderCount = purchaseOrderCount;
}
public Statistic(Integer year, Integer month, BigDecimal salesAmount, BigDecimal purchaseAmount, Long salesOrderCount, Long purchaseOrderCount) {
this.year = year;
this.month = month;
this.salesAmount = salesAmount;
this.purchaseAmount = purchaseAmount;
this.salesOrderCount = salesOrderCount;
this.purchaseOrderCount = purchaseOrderCount;
}
public Statistic(Integer year, Integer month, Integer day, BigDecimal salesAmount, BigDecimal purchaseAmount, Long salesOrderCount, Long purchaseOrderCount) {
this.year = year;
this.month = month;
this.day = day;
this.salesAmount = salesAmount;
this.purchaseAmount = purchaseAmount;
this.salesOrderCount = salesOrderCount;
this.purchaseOrderCount = purchaseOrderCount;
}
public Integer getYear() {
return year;
}
public void setYear(Integer year) {
this.year = year;
}
public Integer getMonth() {
return month;
}
public void setMonth(Integer month) {
this.month = month;
}
public Integer getDay() {
return day;
}
public void setDay(Integer day) {
this.day = day;
}
public BigDecimal getSalesAmount() {
return salesAmount;
}
public void setSalesAmount(BigDecimal salesAmount) {
this.salesAmount = salesAmount;
}
public BigDecimal getPurchaseAmount() {
return purchaseAmount;
}
public void setPurchaseAmount(BigDecimal purchaseAmount) {
this.purchaseAmount = purchaseAmount;
}
public Long getSalesOrderCount() {
return salesOrderCount;
}
public void setSalesOrderCount(Long salesOrderCount) {
this.salesOrderCount = salesOrderCount;
}
public Long getPurchaseOrderCount() {
return purchaseOrderCount;
}
public void setPurchaseOrderCount(Long purchaseOrderCount) {
this.purchaseOrderCount = purchaseOrderCount;
}
}

View File

@@ -0,0 +1,468 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Field;
import com.vverp.annotation.Module;
import org.hibernate.validator.constraints.NotEmpty;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* 供应商
* @author dealsky
* @date 2020/2/25 1:18 下午
*/
@Entity
@Table(name = "t_supplier")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_supplier")
@Module(name = "供应商")
@ExcelTarget("supplier")
public class Supplier extends BaseEntity<Long> {
@Field(name = "编号")
@Excel(name = "编号", orderNum = "1")
private String sn;
@Field(name = "名称")
@Excel(name = "名称", orderNum = "2", needMerge = true)
private String name;
// @Field(name = "简称")
// @Excel(name = "简称", orderNum = "2", needMerge = true)
private String shortName;
@Field(name = "地址")
@Excel(name = "地址", orderNum = "3", needMerge = true)
private String address;
@Field(name = "联系人")
@Excel(name = "联系人", orderNum = "4", needMerge = true)
private String contact;
@Field(name = "联系电话")
@Excel(name = "联系电话", orderNum = "5", needMerge = true)
private String phone;
@Field(name = "固定电话")
@Excel(name = "固定电话", orderNum = "6", needMerge = true)
private String landLinePhone;
// @Field(name = "运货方式")
// @Excel(name = "运货方式", orderNum = "7", needMerge = true)
private String deliveryWay;
@Field(name = "登陆账号")
@Excel(name = "登陆账号", orderNum = "7", needMerge = true)
private String username;
@Field(name = "备注")
@Excel(name = "备注", orderNum = "8", needMerge = true)
private String memo;
@Field(name = "邮箱")
@Excel(name = "邮箱", orderNum = "9", needMerge = true)
private String email;
// @Field(name = "余额")
// @Excel(name = "余额", orderNum = "10", needMerge = true)
private BigDecimal balance = BigDecimal.ZERO;
// @Field(name = "初期欠款")
// @Excel(name = "初期欠款", orderNum = "11", needMerge = true)
private BigDecimal initialArrears = BigDecimal.ZERO;
/**
* 联系人列表
*/
@ExcelCollection(name = "联系人", orderNum = "12", id = "contact")
private List<Contact> contactList = new ArrayList<>();
/**
* 银行账号列表
*/
@ExcelCollection(name = "银行账号", orderNum = "13", id = "bankAccount")
private List<BankAccount> bankAccountList = new ArrayList<>();
/**
* 提货地址
*/
private List<CargoAddress> cargoAddressList = new ArrayList<>();
/**
* 税务登记号
*/
private String taxpayerSn;
/**质量保证体系*/
private String qualityAssuranceSystem;
/**资质有效期*/
private String validityDate;
/**营业执照*/
private String businessLicense;
/**特殊产品制造许可证*/
private String specialLicence;
/**是否入围大型石化范围供应商*/
private Boolean bigAreaSupplier = false;
/**供货范围*/
private String supplyArea;
/**生产交货能力*/
private String producePower;
/**公称直径起始*/
private String startDiameter;
/**公称直径终止*/
private String endDiameter;
/**供应商评价*/
private String evaluate;
private List<SupplierProduct> supplierProductList = new ArrayList<>();
/**所属项目*/
private Long progressId;
private String progressName;
private String progressCode;
private Admin admin;
/**
* 附件id列表
*/
private List<Long> attachFileIds = new ArrayList<>();
/**供应商总评*/
private BigDecimal allEvaluate;
private List<SupplierEvaluate> supplierEvaluateList = new ArrayList<>();
/**提前几天做发货提醒*/
private Integer warnDay;
/**几点钟提醒*/
private Integer sendHour;
public String getProgressCode() {
return progressCode;
}
public void setProgressCode(String progressCode) {
this.progressCode = progressCode;
}
public Integer getWarnDay() {
return warnDay;
}
public void setWarnDay(Integer warnDay) {
this.warnDay = warnDay;
}
public Integer getSendHour() {
return sendHour;
}
public void setSendHour(Integer sendHour) {
this.sendHour = sendHour;
}
@OneToMany(fetch = FetchType.LAZY,mappedBy = "supplier",cascade = CascadeType.REMOVE)
@JsonIgnore
public List<SupplierEvaluate> getSupplierEvaluateList() {
return supplierEvaluateList;
}
public void setSupplierEvaluateList(List<SupplierEvaluate> supplierEvaluateList) {
this.supplierEvaluateList = supplierEvaluateList;
}
public BigDecimal getAllEvaluate() {
return allEvaluate;
}
public void setAllEvaluate(BigDecimal allEvaluate) {
this.allEvaluate = allEvaluate;
}
@NotEmpty
@Column(nullable = false, length = 4000)
@Convert(converter = OrderBase.AttachFileConverter.class)
public List<Long> getAttachFileIds() {
return attachFileIds;
}
public void setAttachFileIds(List<Long> attachFileIds) {
this.attachFileIds = attachFileIds;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public Admin getAdmin() {
return admin;
}
public void setAdmin(Admin admin) {
this.admin = admin;
}
public Long getProgressId() {
return progressId;
}
public void setProgressId(Long progressId) {
this.progressId = progressId;
}
public String getProgressName() {
return progressName;
}
public void setProgressName(String progressName) {
this.progressName = progressName;
}
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "supplier")
@JsonIgnore
public List<SupplierProduct> getSupplierProductList() {
return supplierProductList;
}
public void setSupplierProductList(List<SupplierProduct> supplierProductList) {
this.supplierProductList = supplierProductList;
}
public String getQualityAssuranceSystem() {
return qualityAssuranceSystem;
}
public void setQualityAssuranceSystem(String qualityAssuranceSystem) {
this.qualityAssuranceSystem = qualityAssuranceSystem;
}
public String getValidityDate() {
return validityDate;
}
public void setValidityDate(String validityDate) {
this.validityDate = validityDate;
}
public String getBusinessLicense() {
return businessLicense;
}
public void setBusinessLicense(String businessLicense) {
this.businessLicense = businessLicense;
}
public String getSpecialLicence() {
return specialLicence;
}
public void setSpecialLicence(String specialLicence) {
this.specialLicence = specialLicence;
}
public Boolean getBigAreaSupplier() {
return bigAreaSupplier;
}
public void setBigAreaSupplier(Boolean bigAreaSupplier) {
this.bigAreaSupplier = bigAreaSupplier;
}
public String getSupplyArea() {
return supplyArea;
}
public void setSupplyArea(String supplyArea) {
this.supplyArea = supplyArea;
}
public String getProducePower() {
return producePower;
}
public void setProducePower(String producePower) {
this.producePower = producePower;
}
public String getStartDiameter() {
return startDiameter;
}
public void setStartDiameter(String startDiameter) {
this.startDiameter = startDiameter;
}
public String getEndDiameter() {
return endDiameter;
}
public void setEndDiameter(String endDiameter) {
this.endDiameter = endDiameter;
}
public String getEvaluate() {
return evaluate;
}
public void setEvaluate(String evaluate) {
this.evaluate = evaluate;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getShortName() {
return shortName;
}
public void setShortName(String shortName) {
this.shortName = shortName;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getContact() {
return contact;
}
public void setContact(String contact) {
this.contact = contact;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getLandLinePhone() {
return landLinePhone;
}
public void setLandLinePhone(String landLinePhone) {
this.landLinePhone = landLinePhone;
}
public String getDeliveryWay() {
return deliveryWay;
}
public void setDeliveryWay(String deliveryWay) {
this.deliveryWay = deliveryWay;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public BigDecimal getBalance() {
return balance;
}
public void setBalance(BigDecimal balance) {
this.balance = balance;
}
public BigDecimal getInitialArrears() {
return initialArrears;
}
public void setInitialArrears(BigDecimal initialArrears) {
this.initialArrears = initialArrears;
}
@JsonIgnore
@OneToMany(mappedBy = "supplier", cascade = CascadeType.REMOVE)
public List<Contact> getContactList() {
return contactList;
}
public void setContactList(List<Contact> contactList) {
this.contactList = contactList;
}
@JsonIgnore
@OneToMany(mappedBy = "supplier", cascade = CascadeType.REMOVE)
public List<BankAccount> getBankAccountList() {
return bankAccountList;
}
public void setBankAccountList(List<BankAccount> bankAccountList) {
this.bankAccountList = bankAccountList;
}
@JsonIgnore
@OneToMany(mappedBy = "supplier", cascade = CascadeType.REMOVE)
public List<CargoAddress> getCargoAddressList() {
return cargoAddressList;
}
public void setCargoAddressList(List<CargoAddress> cargoAddressList) {
this.cargoAddressList = cargoAddressList;
}
public String getTaxpayerSn() {
return taxpayerSn;
}
public void setTaxpayerSn(String taxpayerSn) {
this.taxpayerSn = taxpayerSn;
}
}

View File

@@ -0,0 +1,58 @@
package com.vverp.entity;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
* 供应商 合同编号 参数:创建合同时根据供应商获取已存在的参数
*
*/
@Entity
@Table(name = "t_supplier_csp")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_supplier_csp")
public class SupplierCsp extends BaseEntity<Long> {
private Long supplierId;
// 前缀
private String preTitle;
// 流水号长度
private Integer flowNum;
// 后缀
private String subTitle;
public Long getSupplierId() {
return supplierId;
}
public void setSupplierId(Long supplierId) {
this.supplierId = supplierId;
}
public String getPreTitle() {
return preTitle;
}
public void setPreTitle(String preTitle) {
this.preTitle = preTitle;
}
public Integer getFlowNum() {
return flowNum;
}
public void setFlowNum(Integer flowNum) {
this.flowNum = flowNum;
}
public String getSubTitle() {
return subTitle;
}
public void setSubTitle(String subTitle) {
this.subTitle = subTitle;
}
}

View File

@@ -0,0 +1,57 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.math.BigDecimal;
@Entity
@Table(name = "t_supplier_evaluate")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_supplier_evaluate")
@Module(name = "供应商评价")
public class SupplierEvaluate extends BaseEntity<Long>{
/**进度评分*/
private Integer speedEvaluate;
/**质量评分*/
private Integer qualityEvaluate;
/**质保评分*/
private Integer warrantyEvaluate;
private Supplier supplier;
public Integer getSpeedEvaluate() {
return speedEvaluate;
}
public void setSpeedEvaluate(Integer speedEvaluate) {
this.speedEvaluate = speedEvaluate;
}
public Integer getQualityEvaluate() {
return qualityEvaluate;
}
public void setQualityEvaluate(Integer qualityEvaluate) {
this.qualityEvaluate = qualityEvaluate;
}
public Integer getWarrantyEvaluate() {
return warrantyEvaluate;
}
public void setWarrantyEvaluate(Integer warrantyEvaluate) {
this.warrantyEvaluate = warrantyEvaluate;
}
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public Supplier getSupplier() {
return supplier;
}
public void setSupplier(Supplier supplier) {
this.supplier = supplier;
}
}

View File

@@ -0,0 +1,291 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.math.BigDecimal;
@Entity
@Table(name = "t_supplier_product")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_supplier_product")
@Module(name = "供应商供货")
public class SupplierProduct extends BaseEntity<Long>{
/**产品类别*/
private ProductType productType;
/**公称直径起始*/
private BigDecimal diameterL;
private String diameterLName;
private Long diameterLId;
/**公称直径结束*/
private BigDecimal diameterS;
private String diameterSName;
private Long diameterSId;
/**壁厚开始*/
private String wallThicknessLName;
private Long wallThicknessLId;
/**壁厚结束*/
private String wallThicknessSName;
private Long wallThicknessSId;
/**压力等级*/
private String pressureLevel;
/**材质*/
private String material;
private String materialType;
/**供应商*/
private Supplier supplier;
/**尺寸标准*/
private String size;
/**端面*/
private String endFace;
/**优先级*/
private Integer ind;
/**大类*/
private Long bigTypeId;
private String bigTypeName;
private String bigTypeDes;
/**小类*/
private Long smallTypeId;
private String smallTypeName;
private String smallTypeDes;
/**制造形式*/
private String makeCode;
private String makeName;
/**供货范围规则描述*/
private String memo;
@Lob
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public String getBigTypeDes() {
return bigTypeDes;
}
public void setBigTypeDes(String bigTypeDes) {
this.bigTypeDes = bigTypeDes;
}
public String getSmallTypeDes() {
return smallTypeDes;
}
public void setSmallTypeDes(String smallTypeDes) {
this.smallTypeDes = smallTypeDes;
}
public String getMaterialType() {
return materialType;
}
public void setMaterialType(String materialType) {
this.materialType = materialType;
}
public String getMakeCode() {
return makeCode;
}
public void setMakeCode(String makeCode) {
this.makeCode = makeCode;
}
public String getMakeName() {
return makeName;
}
public void setMakeName(String makeName) {
this.makeName = makeName;
}
public Long getDiameterLId() {
return diameterLId;
}
public void setDiameterLId(Long diameterLId) {
this.diameterLId = diameterLId;
}
public Long getDiameterSId() {
return diameterSId;
}
public void setDiameterSId(Long diameterSId) {
this.diameterSId = diameterSId;
}
public Long getWallThicknessLId() {
return wallThicknessLId;
}
public void setWallThicknessLId(Long wallThicknessLId) {
this.wallThicknessLId = wallThicknessLId;
}
public Long getWallThicknessSId() {
return wallThicknessSId;
}
public void setWallThicknessSId(Long wallThicknessSId) {
this.wallThicknessSId = wallThicknessSId;
}
public String getDiameterLName() {
return diameterLName;
}
public void setDiameterLName(String diameterLName) {
this.diameterLName = diameterLName;
}
public String getDiameterSName() {
return diameterSName;
}
public void setDiameterSName(String diameterSName) {
this.diameterSName = diameterSName;
}
public String getWallThicknessLName() {
return wallThicknessLName;
}
public void setWallThicknessLName(String wallThicknessLName) {
this.wallThicknessLName = wallThicknessLName;
}
public String getWallThicknessSName() {
return wallThicknessSName;
}
public void setWallThicknessSName(String wallThicknessSName) {
this.wallThicknessSName = wallThicknessSName;
}
public String getBigTypeName() {
return bigTypeName;
}
public void setBigTypeName(String bigTypeName) {
this.bigTypeName = bigTypeName;
}
public String getSmallTypeName() {
return smallTypeName;
}
public void setSmallTypeName(String smallTypeName) {
this.smallTypeName = smallTypeName;
}
public Long getBigTypeId() {
return bigTypeId;
}
public void setBigTypeId(Long bigTypeId) {
this.bigTypeId = bigTypeId;
}
public Long getSmallTypeId() {
return smallTypeId;
}
public void setSmallTypeId(Long smallTypeId) {
this.smallTypeId = smallTypeId;
}
public Integer getInd() {
return ind;
}
public void setInd(Integer ind) {
this.ind = ind;
}
public String getSize() {
return size;
}
public void setSize(String size) {
this.size = size;
}
public String getEndFace() {
return endFace;
}
public void setEndFace(String endFace) {
this.endFace = endFace;
}
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public ProductType getProductType() {
return productType;
}
public void setProductType(ProductType productType) {
this.productType = productType;
}
public BigDecimal getDiameterL() {
return diameterL;
}
public void setDiameterL(BigDecimal diameterL) {
this.diameterL = diameterL;
}
public BigDecimal getDiameterS() {
return diameterS;
}
public void setDiameterS(BigDecimal diameterS) {
this.diameterS = diameterS;
}
public String getPressureLevel() {
return pressureLevel;
}
public void setPressureLevel(String pressureLevel) {
this.pressureLevel = pressureLevel;
}
public String getMaterial() {
return material;
}
public void setMaterial(String material) {
this.material = material;
}
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public Supplier getSupplier() {
return supplier;
}
public void setSupplier(Supplier supplier) {
this.supplier = supplier;
}
}

View File

@@ -0,0 +1,750 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* Entity - 系统设置
*
* @author
* @version 1.0
*/
@Entity
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_system_setting")
@Module(generate = false)
public class SystemSetting extends BaseEntity<Long> {
/**
* 小数位精确方式
*/
public enum RoundType {
/**
* 四舍五入
*/
roundHalfUp,
/**
* 向上取整
*/
roundUp,
/**
* 向下取整
*/
roundDown
}
/**
* 导航方式
*/
public enum NavigateMode {
theDefault("经典"),
shrink("简洁"),
separate("传统");
String message;
NavigateMode(String message) {
this.message = message;
}
public String getMessage() {
return message;
}
}
/**
* 主题方案
*/
public enum ThemeScheme {
theDefault("默认", "#ff8000"),
blue("蓝色系", "#409eff");
String message;
String color;
ThemeScheme(String message, String color) {
this.message = message;
this.color = color;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
}
/**
* 收/付款点
*/
public enum ReceiptPoint {
order("订单"),
stock("库存");
private String name;
ReceiptPoint(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
// 基础信息
/**
* 系统名称
*/
private String siteName;
/**
* logo地址
*/
private String logo;
/**
* ico地址
*/
private String ico;
/**
* 小数精度位数
*/
private Integer scale;
/**
* 小数位精确方式
*/
private RoundType roundType;
// 邮箱设置
/**
* 邮箱服务器地址
*/
private String emailHost;
/**
* 邮箱服务器端口
*/
private Integer emailPort;
/**
* 邮箱账号
*/
private String emailUsername;
/**
* 邮箱密码
*/
private String emailPassword;
// 短信设置
/**
* 短信accessKeyId
*/
private String smsAccessKeyId;
/**
* 短信accessKeySecret
*/
private String smsAccessKeySecret;
// 存储设置
/**
* oss endpoint
*/
private String ossEndpoint;
/**
* oss accessKeyId
*/
private String ossAccessKeyId;
/**
* oss secretAccessKey
*/
private String ossSecretAccessKey;
/**
* oss bucketName
*/
private String ossBucketName;
// 支付参数
/**
* 微信appId
*/
private String wxAppId;
/**
* 微信secret
*/
private String wxSecret;
/**
* 微信商户id
*/
private String wxMchId;
/**
* 微信商户key
*/
private String wxMchKey;
/**
* 支付宝appId
*/
private String aliAppId;
/**
* 支付宝应用私钥
*/
private String aliAppPrivateKey;
/**
* 支付宝公钥
*/
private String aliAlipayPublicKey;
// 地图参数
/**
* 腾讯地图key
*/
private String tencentMapKey;
/**
* 百度地图key
*/
private String baiduMapKey;
// 推送参数
/**
* 个推appId
*/
private String getuiAppId;
/**
* 个推appSecret
*/
private String getuiAppSecret;
/**
* 个推appKey
*/
private String getuiAppKey;
/**
* 个推appMasterSecret
*/
private String getuiMasterSecret;
/**
* 导航方式
*/
private NavigateMode navigateMode;
/**
* 主题方案
*/
private ThemeScheme themeScheme;
/**
* 数据库是否已初始化
*/
private Boolean hasInited;
/**
* 产品类别侧边栏
*/
private Boolean productTypeSidebar = Boolean.FALSE;
/**
* 部门侧边栏
*/
private Boolean departmentSidebar = Boolean.FALSE;
/**
* 本地存储地址
*/
private String localStoragePath;
/**
* 订单/详情面的切换
*/
private Boolean showOrderToggle = Boolean.FALSE;
/**
* 产品税率 %
*/
private BigDecimal productRate;
/**
* 收/付款点
*/
private ReceiptPoint receiptPoint;
/**
* 是否库存提醒
*/
private Boolean inventoryAlarm;
/**
* 主页url
*/
private String homeUrl;
/**
* 私户利息手续费
*/
private BigDecimal privateInterestPoundage;
/**
* 美元兑人民币汇率
* 1美元兑多少人民币
*/
private BigDecimal usdToCnyExchange;
/**
* 布伦特原油价
*/
private BigDecimal brentOilPrice;
/**
* apk链接
*/
private String apkUrl;
/**
* app版本号
*/
private String appVersion;
/**
* api地址
*/
private String apiUrl;
/**供应商评分权重*/
private BigDecimal speedWeight;
private BigDecimal qualityWeight;
private BigDecimal warrantyWeight;
/** 公司地址,用于设置默认合同签订地点 */
private String companyAddress;
public BigDecimal getSpeedWeight() {
return speedWeight;
}
public void setSpeedWeight(BigDecimal speedWeight) {
this.speedWeight = speedWeight;
}
public BigDecimal getQualityWeight() {
return qualityWeight;
}
public void setQualityWeight(BigDecimal qualityWeight) {
this.qualityWeight = qualityWeight;
}
public BigDecimal getWarrantyWeight() {
return warrantyWeight;
}
public void setWarrantyWeight(BigDecimal warrantyWeight) {
this.warrantyWeight = warrantyWeight;
}
public String getSiteName() {
return siteName;
}
public void setSiteName(String siteName) {
this.siteName = siteName;
}
public String getLogo() {
return logo != null ? logo : "/admin/common/defaultLogo";
}
public void setLogo(String logo) {
this.logo = logo;
}
public String getIco() {
return ico != null ? ico : "/admin/common/defaultLogo";
}
public void setIco(String ico) {
this.ico = ico;
}
public Integer getScale() {
return scale;
}
public void setScale(Integer scale) {
this.scale = scale;
}
public RoundType getRoundType() {
return roundType;
}
public void setRoundType(RoundType roundType) {
this.roundType = roundType;
}
public String getEmailHost() {
return emailHost;
}
public void setEmailHost(String emailHost) {
this.emailHost = emailHost;
}
public Integer getEmailPort() {
return emailPort;
}
public void setEmailPort(Integer emailPort) {
this.emailPort = emailPort;
}
public String getEmailUsername() {
return emailUsername;
}
public void setEmailUsername(String emailUsername) {
this.emailUsername = emailUsername;
}
public String getEmailPassword() {
return emailPassword;
}
public void setEmailPassword(String emailPassword) {
this.emailPassword = emailPassword;
}
public String getSmsAccessKeyId() {
return smsAccessKeyId;
}
public void setSmsAccessKeyId(String smsAccessKeyId) {
this.smsAccessKeyId = smsAccessKeyId;
}
public String getSmsAccessKeySecret() {
return smsAccessKeySecret;
}
public void setSmsAccessKeySecret(String smsAccessKeySecret) {
this.smsAccessKeySecret = smsAccessKeySecret;
}
public String getOssEndpoint() {
return ossEndpoint;
}
public void setOssEndpoint(String ossEndpoint) {
this.ossEndpoint = ossEndpoint;
}
public String getOssAccessKeyId() {
return ossAccessKeyId;
}
public void setOssAccessKeyId(String ossAccessKeyId) {
this.ossAccessKeyId = ossAccessKeyId;
}
public String getOssSecretAccessKey() {
return ossSecretAccessKey;
}
public void setOssSecretAccessKey(String ossSecretAccessKey) {
this.ossSecretAccessKey = ossSecretAccessKey;
}
public String getOssBucketName() {
return ossBucketName;
}
public void setOssBucketName(String ossBucketName) {
this.ossBucketName = ossBucketName;
}
public String getWxAppId() {
return wxAppId;
}
public void setWxAppId(String wxAppId) {
this.wxAppId = wxAppId;
}
public String getWxSecret() {
return wxSecret;
}
public void setWxSecret(String wxSecret) {
this.wxSecret = wxSecret;
}
public String getWxMchId() {
return wxMchId;
}
public void setWxMchId(String wxMchId) {
this.wxMchId = wxMchId;
}
public String getWxMchKey() {
return wxMchKey;
}
public void setWxMchKey(String wxMchKey) {
this.wxMchKey = wxMchKey;
}
public String getAliAppId() {
return aliAppId;
}
public void setAliAppId(String aliAppId) {
this.aliAppId = aliAppId;
}
public String getAliAppPrivateKey() {
return aliAppPrivateKey;
}
public void setAliAppPrivateKey(String aliAppPrivateKey) {
this.aliAppPrivateKey = aliAppPrivateKey;
}
public String getAliAlipayPublicKey() {
return aliAlipayPublicKey;
}
public void setAliAlipayPublicKey(String aliAlipayPublicKey) {
this.aliAlipayPublicKey = aliAlipayPublicKey;
}
public String getTencentMapKey() {
return tencentMapKey;
}
public void setTencentMapKey(String tencentMapKey) {
this.tencentMapKey = tencentMapKey;
}
public String getBaiduMapKey() {
return baiduMapKey;
}
public void setBaiduMapKey(String baiduMapKey) {
this.baiduMapKey = baiduMapKey;
}
public String getGetuiAppId() {
return getuiAppId;
}
public void setGetuiAppId(String getuiAppId) {
this.getuiAppId = getuiAppId;
}
public String getGetuiAppSecret() {
return getuiAppSecret;
}
public void setGetuiAppSecret(String getuiAppSecret) {
this.getuiAppSecret = getuiAppSecret;
}
public String getGetuiAppKey() {
return getuiAppKey;
}
public void setGetuiAppKey(String getuiAppKey) {
this.getuiAppKey = getuiAppKey;
}
public String getGetuiMasterSecret() {
return getuiMasterSecret;
}
public void setGetuiMasterSecret(String getuiMasterSecret) {
this.getuiMasterSecret = getuiMasterSecret;
}
public NavigateMode getNavigateMode() {
return navigateMode;
}
public void setNavigateMode(NavigateMode navigateMode) {
this.navigateMode = navigateMode;
}
public ThemeScheme getThemeScheme() {
return themeScheme;
}
public void setThemeScheme(ThemeScheme themeScheme) {
this.themeScheme = themeScheme;
}
public Boolean getHasInited() {
return hasInited;
}
public void setHasInited(Boolean hasInited) {
this.hasInited = hasInited;
}
@Column(nullable = false)
public Boolean getProductTypeSidebar() {
return productTypeSidebar;
}
public void setProductTypeSidebar(Boolean productTypeSidebar) {
this.productTypeSidebar = productTypeSidebar;
}
@Column(nullable = false)
public Boolean getDepartmentSidebar() {
return departmentSidebar;
}
public void setDepartmentSidebar(Boolean departmentSidebar) {
this.departmentSidebar = departmentSidebar;
}
public String getLocalStoragePath() {
return localStoragePath;
}
public void setLocalStoragePath(String localStoragePath) {
this.localStoragePath = localStoragePath;
}
public Boolean getShowOrderToggle() {
return showOrderToggle != null ? showOrderToggle : false;
}
public void setShowOrderToggle(Boolean showOrderToggle) {
this.showOrderToggle = showOrderToggle;
}
@Column(precision = 19, scale = 6)
public BigDecimal getProductRate() {
return (productRate != null ? productRate : BigDecimal.ZERO).setScale(2, RoundingMode.HALF_UP);
}
public void setProductRate(BigDecimal productRate) {
this.productRate = productRate;
}
public ReceiptPoint getReceiptPoint() {
return receiptPoint;
}
public void setReceiptPoint(ReceiptPoint receiptPoint) {
this.receiptPoint = receiptPoint;
}
public Boolean getInventoryAlarm() {
return inventoryAlarm != null ? inventoryAlarm : Boolean.TRUE;
}
public void setInventoryAlarm(Boolean inventoryAlarm) {
this.inventoryAlarm = inventoryAlarm;
}
public String getHomeUrl() {
return homeUrl != null ? homeUrl : "/common/index";
}
public void setHomeUrl(String homeUrl) {
this.homeUrl = homeUrl;
}
@Column(precision = 19, scale = 6)
public BigDecimal getPrivateInterestPoundage() {
return (privateInterestPoundage != null ? privateInterestPoundage : new BigDecimal(2)).setScale(2, RoundingMode.HALF_UP);
}
public void setPrivateInterestPoundage(BigDecimal privateInterestPoundage) {
this.privateInterestPoundage = privateInterestPoundage;
}
@Column(precision = 19, scale = 6)
public BigDecimal getUsdToCnyExchange() {
return usdToCnyExchange != null ? usdToCnyExchange : BigDecimal.ZERO;
}
public void setUsdToCnyExchange(BigDecimal usdToCnyExchange) {
this.usdToCnyExchange = usdToCnyExchange;
}
@Column(precision = 19, scale = 6)
public BigDecimal getBrentOilPrice() {
return (brentOilPrice != null ? brentOilPrice : BigDecimal.ZERO).setScale(3, RoundingMode.HALF_UP);
}
public void setBrentOilPrice(BigDecimal brentOilPrice) {
this.brentOilPrice = brentOilPrice;
}
public String getApkUrl() {
return apkUrl;
}
public void setApkUrl(String apkUrl) {
this.apkUrl = apkUrl;
}
public String getAppVersion() {
return appVersion != null ? appVersion : "";
}
public void setAppVersion(String appVersion) {
this.appVersion = appVersion;
}
public String getApiUrl() {
return apiUrl;
}
public void setApiUrl(String apiUrl) {
this.apiUrl = apiUrl;
}
public String getCompanyAddress() {
return companyAddress;
}
public void setCompanyAddress(String companyAddress) {
this.companyAddress = companyAddress;
}
}

View File

@@ -0,0 +1,38 @@
package com.vverp.entity;
import com.vverp.annotation.Module;
import javax.persistence.*;
/**
* Entity - 存储与 table 相关的键值对
*
* @author dealsky
*/
@Entity
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_table_storage")
@Module(generate = false)
public class TableStorage extends BaseEntity<Long> {
private String name;
private String content;
@Column(unique = true, nullable = false)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Lob
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}

View File

@@ -0,0 +1,79 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
/**领用单*/
@Entity
@Table(name = "t_use_order")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_use_order")
@Module(generate = false)
public class UseOrder extends BaseEntity<Long>{
private String sn;
private Long adminId;
private String adminName;
private List<UseOrderItem> useOrderItemList = new ArrayList<>();
/**领用确认*/
private Boolean stockConfirm;
private Long progressId;
public Long getProgressId() {
return progressId;
}
public void setProgressId(Long progressId) {
this.progressId = progressId;
}
public Boolean getStockConfirm() {
return stockConfirm != null && stockConfirm;
}
public void setStockConfirm(Boolean stockConfirm) {
this.stockConfirm = stockConfirm;
}
public Long getAdminId() {
return adminId;
}
public void setAdminId(Long adminId) {
this.adminId = adminId;
}
public String getAdminName() {
return adminName;
}
public void setAdminName(String adminName) {
this.adminName = adminName;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
@OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.REMOVE,mappedBy = "useOrder")
@JsonIgnore
public List<UseOrderItem> getUseOrderItemList() {
return useOrderItemList;
}
public void setUseOrderItemList(List<UseOrderItem> useOrderItemList) {
this.useOrderItemList = useOrderItemList;
}
}

View File

@@ -0,0 +1,77 @@
package com.vverp.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.vverp.annotation.Module;
import javax.persistence.*;
import java.math.BigDecimal;
/**领用单项*/
@Entity
@Table(name = "t_use_order_item")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_use_order_item")
@Module(generate = false)
public class UseOrderItem extends BaseEntity<Long>{
private Long productId;
private String productName;
private String productCode;
private BigDecimal count;
private String memo;
private UseOrder useOrder;
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
public UseOrder getUseOrder() {
return useOrder;
}
public void setUseOrder(UseOrder useOrder) {
this.useOrder = useOrder;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public BigDecimal getCount() {
return count;
}
public void setCount(BigDecimal count) {
this.count = count;
}
}

View File

@@ -0,0 +1,40 @@
package com.vverp.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.vverp.annotation.Module;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.math.BigDecimal;
/**壁厚*/
@Entity
@Table(name = "t_wall_thickness")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "seq_wall_thickness")
@Module(generate = false)
@ExcelTarget("wallThickness")
public class WallThickness extends BaseEntity<Long>{
@Excel(name = "名称", orderNum = "1")
private String name;
@Excel(name = "代号", orderNum = "2")
private String code;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}