32 changed files with 554 additions and 34 deletions
@ -1,8 +0,0 @@ |
|||||
package com.qs.serve.common; |
|
||||
|
|
||||
/** |
|
||||
* @author YenHex |
|
||||
* @since 2025/4/14 |
|
||||
*/ |
|
||||
public class TestCommon { |
|
||||
} |
|
@ -1,4 +1,4 @@ |
|||||
package com.qs.serve.framework.base.config; |
package com.qs.serve.common.conf; |
||||
|
|
||||
import com.qs.serve.common.exception.Assert; |
import com.qs.serve.common.exception.Assert; |
||||
import lombok.experimental.UtilityClass; |
import lombok.experimental.UtilityClass; |
@ -1,4 +1,4 @@ |
|||||
package com.qs.serve.framework.base.config; |
package com.qs.serve.framework.redis.config; |
||||
|
|
||||
|
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
@ -0,0 +1,39 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<parent> |
||||
|
<artifactId>cms-basic</artifactId> |
||||
|
<groupId>com.qs</groupId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</parent> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
<artifactId>cms-basic-api</artifactId> |
||||
|
|
||||
|
<properties> |
||||
|
<maven.compiler.source>8</maven.compiler.source> |
||||
|
<maven.compiler.target>8</maven.compiler.target> |
||||
|
</properties> |
||||
|
|
||||
|
<dependencies> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>com.qs</groupId> |
||||
|
<artifactId>cms-framework-mybatis-plus</artifactId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>com.qs</groupId> |
||||
|
<artifactId>cms-framework-feign</artifactId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>com.qs</groupId> |
||||
|
<artifactId>cms-common</artifactId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
</project> |
@ -0,0 +1,91 @@ |
|||||
|
package com.qs.serve.modules.basic.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.time.LocalDateTime; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 成本中心 实体类 |
||||
|
* @author YenHex |
||||
|
* @since 2022-11-11 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("bms_cost_center") |
||||
|
public class BmsCostCenter implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
@TableId(type = IdType.AUTO) |
||||
|
private Long id; |
||||
|
|
||||
|
/** 编码 */ |
||||
|
@NotBlank(message = "编码不能为空") |
||||
|
@Length(max = 20,message = "编码长度不能超过20字") |
||||
|
private String code; |
||||
|
|
||||
|
/** 名称 */ |
||||
|
@NotBlank(message = "名称不能为空") |
||||
|
@Length(max = 20,message = "名称长度不能超过20字") |
||||
|
private String name; |
||||
|
|
||||
|
/** 层级 */ |
||||
|
@NotNull(message = "层级不能为空") |
||||
|
private Integer level; |
||||
|
|
||||
|
/** 是否所有人可见 */ |
||||
|
private Integer visibleFlag; |
||||
|
|
||||
|
/** 是否销售费用 */ |
||||
|
private Integer saleCostFlag; |
||||
|
|
||||
|
/** 父级节点 */ |
||||
|
@NotNull(message = "父级节点不能为空") |
||||
|
private Long pid; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
@Length(max = 255,message = "备注长度不能超过255字") |
||||
|
private String remark; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
/** 最后更新时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private LocalDateTime updateTime; |
||||
|
|
||||
|
/** 所属租户 */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String tenantId; |
||||
|
|
||||
|
/** 逻辑删除标记(0:显示;1:隐藏) */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private String createBy; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private String updateBy; |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,271 @@ |
|||||
|
package com.qs.serve.modules.basic.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.qs.serve.common.utils.StringUtils; |
||||
|
import com.qs.serve.mbp.handler.SplitStringTypeHandler; |
||||
|
import lombok.Data; |
||||
|
import org.apache.ibatis.type.JdbcType; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Objects; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 供应商 实体类 |
||||
|
* @author YenHex |
||||
|
* @since 2022-10-11 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName(value = "bms_supplier",autoResultMap = true) |
||||
|
public class BmsSupplier implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
@TableId(type = IdType.AUTO) |
||||
|
private String id; |
||||
|
|
||||
|
/** 一级区域ID */ |
||||
|
private String regionFirst; |
||||
|
|
||||
|
/** 二级区域ID */ |
||||
|
private String regionSecond; |
||||
|
|
||||
|
/** 三级区域ID */ |
||||
|
private String regionThird; |
||||
|
|
||||
|
/** 四级区域ID */ |
||||
|
private String regionFourthly; |
||||
|
|
||||
|
/** 最子级区域ID */ |
||||
|
private String regionLast; |
||||
|
|
||||
|
/** 行政一级区域ID */ |
||||
|
private String region2First; |
||||
|
|
||||
|
/** 行政二级区域ID */ |
||||
|
private String region2Second; |
||||
|
|
||||
|
/** 行政三级区域ID */ |
||||
|
private String region2Third; |
||||
|
|
||||
|
/** 行政四级区域ID */ |
||||
|
private String region2Fourthly; |
||||
|
|
||||
|
/** 行政最子级区域ID */ |
||||
|
private String region2Last; |
||||
|
|
||||
|
/** 详细地址 */ |
||||
|
private String address; |
||||
|
|
||||
|
/** 名称 */ |
||||
|
@NotBlank(message = "名称不能为空") |
||||
|
@TableField(condition = SqlCondition.LIKE) |
||||
|
private String name; |
||||
|
|
||||
|
/** 客户编码 */ |
||||
|
@NotBlank(message = "客户编码不能为空") |
||||
|
@TableField(condition = SqlCondition.LIKE) |
||||
|
private String code; |
||||
|
|
||||
|
/** 父级id */ |
||||
|
private String pid; |
||||
|
|
||||
|
private String pathIds; |
||||
|
|
||||
|
private String parentCode; |
||||
|
|
||||
|
/** 负责人 */ |
||||
|
private String userId; |
||||
|
|
||||
|
/** 负责人 */ |
||||
|
private String userCode; |
||||
|
|
||||
|
/** 负责人 */ |
||||
|
private String userName; |
||||
|
|
||||
|
@TableField(typeHandler = SplitStringTypeHandler.class,jdbcType= JdbcType.VARCHAR) |
||||
|
private String[] otherUserIds; |
||||
|
|
||||
|
private String otherUserNames; |
||||
|
|
||||
|
private String otherUserCodes; |
||||
|
|
||||
|
/** 闭户 */ |
||||
|
private Integer stopFlag; |
||||
|
|
||||
|
/** |
||||
|
* CD订单 |
||||
|
* 0-> 非必填 |
||||
|
* 1-> 下单时必须填写CD订单信息 |
||||
|
*/ |
||||
|
private Integer cdOrderFlag; |
||||
|
|
||||
|
/** 闭户日期 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(updateStrategy = FieldStrategy.IGNORED) |
||||
|
private LocalDateTime stopFlagDate; |
||||
|
|
||||
|
/** 所属账套 */ |
||||
|
private String belong; |
||||
|
|
||||
|
/** 是否供应商 */ |
||||
|
private Integer supplierFlag; |
||||
|
|
||||
|
/** 供应商是否填写信息 */ |
||||
|
@NotNull(message = "供应商是否填写信息不能为空") |
||||
|
private Integer supplierInfoFlag; |
||||
|
|
||||
|
/** 供应商税号 */ |
||||
|
@Length(max = 255,message = "供应商税号长度不能超过255字") |
||||
|
private String supplierTaxNumber; |
||||
|
|
||||
|
/** 供应商联系人 */ |
||||
|
@Length(max = 255,message = "供应商联系人长度不能超过255字") |
||||
|
private String supplierUser; |
||||
|
|
||||
|
/** 营业执照地址 */ |
||||
|
@Length(max = 255,message = "营业执照地址长度不能超过255字") |
||||
|
private String supplierLicenseImg; |
||||
|
|
||||
|
/** 附件列表 */ |
||||
|
@TableField(typeHandler = SplitStringTypeHandler.class,jdbcType= JdbcType.VARCHAR) |
||||
|
private String[] supplierAttachIds; |
||||
|
|
||||
|
private Integer cooperatePauseFlag; |
||||
|
|
||||
|
/** 暂不合作日期 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(updateStrategy = FieldStrategy.IGNORED) |
||||
|
private LocalDateTime cooperatePauseFlagDate; |
||||
|
|
||||
|
/** 开始户时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime openTime; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private String createBy; |
||||
|
|
||||
|
/** 更新时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private LocalDateTime updateTime; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private String updateBy; |
||||
|
|
||||
|
/** 租户id */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String tenantId; |
||||
|
|
||||
|
/** 删除标识 */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private Boolean delFlag; |
||||
|
|
||||
|
private String comRegion; |
||||
|
|
||||
|
private String comRegionCode; |
||||
|
|
||||
|
private String bookCode; |
||||
|
|
||||
|
/** 初始化当前欠费 */ |
||||
|
@NotNull(message = "初始化当前欠费不能为空") |
||||
|
private BigDecimal initCurAmount; |
||||
|
|
||||
|
/** 初始化欠费(历史记录) */ |
||||
|
@NotNull(message = "初始化欠费(历史记录)不能为空") |
||||
|
private BigDecimal initHisAmount; |
||||
|
|
||||
|
/** 可投放费用标识 */ |
||||
|
private Integer costFlag; |
||||
|
|
||||
|
/** 在线下单 */ |
||||
|
private Integer orderOnlineFlag; |
||||
|
|
||||
|
/** 线下下单 */ |
||||
|
private Integer orderOfflineFlag; |
||||
|
|
||||
|
/** 运输方式是否可见 */ |
||||
|
private Integer transportVisible; |
||||
|
|
||||
|
public List<String> listBizRegionIds(){ |
||||
|
List<String> list = new ArrayList<>(); |
||||
|
list.add(this.getRegion2First()); |
||||
|
list.add(this.getRegion2Second()); |
||||
|
list.add(this.getRegion2Third()); |
||||
|
list.add(this.getRegion2Fourthly()); |
||||
|
return list.stream().filter(Objects::nonNull).collect(Collectors.toList()); |
||||
|
} |
||||
|
|
||||
|
public List<String> listSaleRegionIds(){ |
||||
|
List<String> list = new ArrayList<>(); |
||||
|
list.add(this.getRegionFirst()); |
||||
|
list.add(this.getRegionSecond()); |
||||
|
list.add(this.getRegionThird()); |
||||
|
list.add(this.getRegionFourthly()); |
||||
|
return list.stream().filter(Objects::nonNull).collect(Collectors.toList()); |
||||
|
} |
||||
|
|
||||
|
public String handleSaleRegionId(){ |
||||
|
if(isValid(this.getRegionLast())){ |
||||
|
return this.getRegionLast(); |
||||
|
}else if(isValid(this.getRegionFourthly())){ |
||||
|
return this.getRegionFourthly(); |
||||
|
}else if(isValid(this.getRegionThird())){ |
||||
|
return this.getRegionThird(); |
||||
|
}else if(isValid(this.getRegionSecond())){ |
||||
|
return this.getRegionSecond(); |
||||
|
}else if(isValid(this.getRegionFirst())){ |
||||
|
return this.getRegionFirst(); |
||||
|
}else { |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public String handleBizRegionId(){ |
||||
|
if(isValid(this.getRegion2Last())){ |
||||
|
return this.getRegion2Last(); |
||||
|
}else if(isValid(this.getRegion2Fourthly())){ |
||||
|
return this.getRegion2Fourthly(); |
||||
|
}else if(isValid(this.getRegion2Third())){ |
||||
|
return this.getRegion2Third(); |
||||
|
}else if(isValid(this.getRegion2Second())){ |
||||
|
return this.getRegion2Second(); |
||||
|
}else if(isValid(this.getRegion2First())){ |
||||
|
return this.getRegion2First(); |
||||
|
}else { |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private boolean isValid(String region){ |
||||
|
return StringUtils.hasText(region)&&!"0".equals(region); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,42 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<parent> |
||||
|
<artifactId>cms-basic</artifactId> |
||||
|
<groupId>com.qs</groupId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</parent> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
<artifactId>cms-basic-bus</artifactId> |
||||
|
|
||||
|
<properties> |
||||
|
<maven.compiler.source>8</maven.compiler.source> |
||||
|
<maven.compiler.target>8</maven.compiler.target> |
||||
|
</properties> |
||||
|
|
||||
|
<dependencies> |
||||
|
<dependency> |
||||
|
<groupId>com.qs</groupId> |
||||
|
<artifactId>cms-basic-api</artifactId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>com.qs</groupId> |
||||
|
<artifactId>cms-framework-mybatis-plus</artifactId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>com.qs</groupId> |
||||
|
<artifactId>cms-framework-redis</artifactId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>com.qs</groupId> |
||||
|
<artifactId>cms-common</artifactId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
|
||||
|
</project> |
@ -0,0 +1,14 @@ |
|||||
|
package com.qs.serve.modules.basic.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qs.serve.modules.basic.entity.BmsCostCenter; |
||||
|
|
||||
|
/** |
||||
|
* 成本中心 Mapper |
||||
|
* @author YenHex |
||||
|
* @date 2022-10-13 |
||||
|
*/ |
||||
|
public interface BmsCostCenterMapper extends BaseMapper<BmsCostCenter> { |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,15 @@ |
|||||
|
package com.qs.serve.modules.basic.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qs.serve.modules.basic.entity.BmsSupplier; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 供应商 Mapper |
||||
|
* @author YenHex |
||||
|
* @date 2022-10-10 |
||||
|
*/ |
||||
|
public interface BmsSupplierMapper extends BaseMapper<BmsSupplier> { |
||||
|
|
||||
|
} |
||||
|
|
Loading…
Reference in new issue