v3.21.0 【新增】修改部门名称字段;【新增】修改系统版本version字段;【新增】优化代码生成前端代码;【优化】SQL

This commit is contained in:
zhuoda 2025-05-13 20:04:12 +08:00
parent 3fb4dfad09
commit 8d2d8f2846
110 changed files with 488 additions and 411 deletions

View File

@ -230,7 +230,7 @@ public class NoticeService {
noticeVisibleRange.setDataName(employeeEntity == null ? StringConst.EMPTY : employeeEntity.getActualName());
} else {
DepartmentVO departmentVO = departmentService.getDepartmentById(noticeVisibleRange.getDataId());
noticeVisibleRange.setDataName(departmentVO == null ? StringConst.EMPTY : departmentVO.getName());
noticeVisibleRange.setDataName(departmentVO == null ? StringConst.EMPTY : departmentVO.getDepartmentName());
}
}
updateFormVO.setVisibleRangeList(noticeVisibleRangeList);

View File

@ -31,7 +31,7 @@ public class DepartmentEntity {
/**
* 部门名称
*/
private String name;
private String departmentName;
/**
* 负责人员工 id

View File

@ -20,7 +20,7 @@ public class DepartmentAddForm {
@Schema(description = "部门名称")
@Length(min = 1, max = 50, message = "请输入正确的部门名称(1-50个字符)")
@NotNull(message = "请输入正确的部门名称(1-50个字符)")
private String name;
private String departmentName;
@Schema(description = "排序")
@NotNull(message = "排序值")

View File

@ -24,7 +24,7 @@ public class DepartmentVO implements Serializable {
private Long departmentId;
@Schema(description = "部门名称")
private String name;
private String departmentName;
@Schema(description = "部门负责人姓名")
private String managerName;

View File

@ -97,15 +97,15 @@ public class DepartmentCacheManager {
*/
private String buildDepartmentPath(DepartmentVO departmentVO, Map<Long, DepartmentVO> departmentMap) {
if (Objects.equals(departmentVO.getParentId(), NumberUtils.LONG_ZERO)) {
return departmentVO.getName();
return departmentVO.getDepartmentName();
}
//父节点
DepartmentVO parentDepartment = departmentMap.get(departmentVO.getParentId());
if (parentDepartment == null) {
return departmentVO.getName();
return departmentVO.getDepartmentName();
}
String pathName = buildDepartmentPath(parentDepartment, departmentMap);
return pathName + "/" + departmentVO.getName();
return pathName + "/" + departmentVO.getDepartmentName();
}
// ---------------------- 构造树的一些方法 ------------------------------

View File

@ -14,10 +14,7 @@ import net.lab1024.sa.base.common.domain.ResponseDTO;
import net.lab1024.sa.base.common.util.SmartBeanUtil;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* 部门 service

View File

@ -242,8 +242,6 @@ public class EmployeeService {
/**
* 更新登录人头像
*
* @param employeeUpdateAvatarForm
* @return
*/
public ResponseDTO<String> updateAvatar(EmployeeUpdateAvatarForm employeeUpdateAvatarForm) {
Long employeeId = employeeUpdateAvatarForm.getEmployeeId();
@ -395,7 +393,7 @@ public class EmployeeService {
List<EmployeeVO> voList = employeeEntityList.stream().map(e -> {
EmployeeVO employeeVO = SmartBeanUtil.copy(e, EmployeeVO.class);
if (department != null) {
employeeVO.setDepartmentName(department.getName());
employeeVO.setDepartmentName(department.getDepartmentName());
}
return employeeVO;
}).collect(Collectors.toList());

View File

@ -7,6 +7,8 @@ import net.lab1024.sa.base.common.enumeration.GenderEnum;
import net.lab1024.sa.base.common.enumeration.UserTypeEnum;
import net.lab1024.sa.base.common.swagger.SchemaEnum;
import java.io.Serializable;
/**
* 请求员工登录信息
*
@ -17,7 +19,7 @@ import net.lab1024.sa.base.common.swagger.SchemaEnum;
* @Copyright <a href="https://1024lab.net">1024创新实验室</a>
*/
@Data
public class RequestEmployee implements RequestUser {
public class RequestEmployee implements RequestUser, Serializable {
@Schema(description = "员工id")
private Long employeeId;

View File

@ -88,7 +88,7 @@ public class LoginManager {
// 部门信息
DepartmentVO department = departmentService.getDepartmentById(employeeEntity.getDepartmentId());
requestEmployee.setDepartmentName(null == department ? StringConst.EMPTY : department.getName());
requestEmployee.setDepartmentName(null == department ? StringConst.EMPTY : department.getDepartmentName());
// 头像信息
String avatar = employeeEntity.getAvatar();

View File

@ -15,6 +15,7 @@ import net.lab1024.sa.base.common.code.SystemErrorCode;
import net.lab1024.sa.base.common.domain.RequestUrlVO;
import net.lab1024.sa.base.common.domain.ResponseDTO;
import net.lab1024.sa.base.common.util.SmartBeanUtil;
import net.lab1024.sa.base.common.util.SmartStringUtil;
import org.apache.commons.lang3.math.NumberUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@ -134,6 +135,10 @@ public class MenuService {
* @return true 重复 false 未重复
*/
public <T extends MenuBaseForm> Boolean validateWebPerms(T menuDTO) {
if(SmartStringUtil.isEmpty(menuDTO.getWebPerms())){
return false;
}
MenuEntity menu = menuDao.getByWebPerms(menuDTO.getWebPerms(), Boolean.FALSE);
if (menuDTO instanceof MenuAddForm) {
return menu != null;

View File

@ -5,7 +5,6 @@ import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import java.util.List;
import java.util.Set;
/**

View File

@ -73,7 +73,7 @@ public class RoleEmployeeService {
List<Long> departmentIdList = employeeList.stream().filter(e -> e != null && e.getDepartmentId() != null).map(EmployeeVO::getDepartmentId).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(departmentIdList)) {
List<DepartmentEntity> departmentEntities = departmentDao.selectBatchIds(departmentIdList);
Map<Long, String> departmentIdNameMap = departmentEntities.stream().collect(Collectors.toMap(DepartmentEntity::getDepartmentId, DepartmentEntity::getName));
Map<Long, String> departmentIdNameMap = departmentEntities.stream().collect(Collectors.toMap(DepartmentEntity::getDepartmentId, DepartmentEntity::getDepartmentName));
employeeList.forEach(e -> {
e.setDepartmentName(departmentIdNameMap.getOrDefault(e.getDepartmentId(), StringConst.EMPTY));
});

View File

@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
/**
*
* 网络安全
*
* @Author 1024创新实验室-主任:卓大

View File

@ -70,7 +70,7 @@
<select id="queryPageEmployeeList"
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEmployeeVO">
select
t_oa_enterprise_employee.*,
t_oa_enterprise_employee.enterprise_id,
t_oa_enterprise.enterprise_name,
t_employee.*,
t_employee.actual_name as employeeName

View File

@ -219,7 +219,7 @@
<select id="queryNoticeViewRecordList" resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeViewRecordVO">
select t_notice_view_record.*,
t_employee.actual_name as employeeName,
t_department.name as departmentName
t_department.department_name
from t_notice_view_record
left join t_employee on t_employee.employee_id = t_notice_view_record.employee_id
left join t_department on t_department.department_id = t_employee.department_id

View File

@ -6,7 +6,7 @@
<select id="listAll" resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
SELECT t_department.*,
t_employee.actual_name as managerName,
parent_department.`name` as parentName
parent_department.department_name as parentName
FROM t_department
left join t_employee on t_department.manager_id = t_employee.employee_id
left join t_department parent_department on t_department.parent_id = parent_department.department_id
@ -23,7 +23,7 @@
resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
SELECT t_department.*,
t_employee.actual_name as managerName,
parent_department.`name` as parentName
parent_department.department_name as parentName
FROM t_department
left join t_employee on t_department.manager_id = t_employee.employee_id
left join t_department parent_department on t_department.parent_id = parent_department.department_id

View File

@ -5,7 +5,7 @@
<select id="queryEmployee" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
SELECT
t_employee.*,
t_department.name AS departmentName
t_department.department_name
FROM t_employee
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
<where>
@ -169,7 +169,7 @@
<select id="getEmployeeById" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
SELECT t_employee.*,
t_department.name AS departmentName
t_department.department_name
FROM t_employee
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
where t_employee.employee_id = #{employeeId}
@ -178,7 +178,7 @@
<select id="selectEmployeeByDisabledAndDeleted" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
SELECT
t_employee.*,
t_department.name AS departmentName
t_department.department_name
FROM t_employee
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
<where>

View File

@ -3,6 +3,7 @@ package net.lab1024.sa.base.common.controller;
import net.lab1024.sa.base.constant.SwaggerTagConst;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* 支撑类业务路由基类
*

View File

@ -28,7 +28,8 @@ public class CacheConfig {
return RedisCacheConfiguration.defaultCacheConfig()
.disableCachingNullValues()
.computePrefixWith(name -> "cache:" + name + ":")
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer()));
// .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer()));
;
}
@Bean

View File

@ -28,7 +28,7 @@ public class ChangeLogEntity {
/**
* 版本
*/
private String version;
private String updateVersion;
/**
* 更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]

View File

@ -23,7 +23,7 @@ public class ChangeLogAddForm {
@Schema(description = "版本", required = true)
@NotBlank(message = "版本 不能为空")
private String version;
private String updateVersion;
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
@CheckEnum(value = ChangeLogTypeEnum.class, message = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 错误", required = true)

View File

@ -27,7 +27,7 @@ public class ChangeLogUpdateForm {
@Schema(description = "版本", required = true)
@NotBlank(message = "版本 不能为空")
private String version;
private String updateVersion;
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
@CheckEnum(value = ChangeLogTypeEnum.class, message = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 错误", required = true)

View File

@ -23,7 +23,7 @@ public class ChangeLogVO {
private Long changeLogId;
@Schema(description = "版本")
private String version;
private String updateVersion;
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
private Integer type;

View File

@ -44,7 +44,7 @@ public class ChangeLogService {
* 添加
*/
public synchronized ResponseDTO<String> add(ChangeLogAddForm addForm) {
ChangeLogEntity existVersion = changeLogDao.selectByVersion(addForm.getVersion());
ChangeLogEntity existVersion = changeLogDao.selectByVersion(addForm.getUpdateVersion());
if (existVersion != null) {
return ResponseDTO.userErrorParam("此版本已经存在");
}
@ -58,7 +58,7 @@ public class ChangeLogService {
* 更新
*/
public synchronized ResponseDTO<String> update(ChangeLogUpdateForm updateForm) {
ChangeLogEntity existVersion = changeLogDao.selectByVersion(updateForm.getVersion());
ChangeLogEntity existVersion = changeLogDao.selectByVersion(updateForm.getUpdateVersion());
if (existVersion != null && !updateForm.getChangeLogId().equals(existVersion.getChangeLogId())) {
return ResponseDTO.userErrorParam("此版本已经存在");
}

View File

@ -11,16 +11,6 @@ package net.lab1024.sa.base.module.support.codegenerator.constant;
*/
public class CodeGeneratorConstant {
/**
* 主键
*/
public final static String PRIMARY_KEY = "PRI";
/**
* 自增
*/
public final static String AUTO_INCREMENT = "auto_increment";
/**
* 默认逻辑删除字段名称
*/

View File

@ -23,20 +23,26 @@ public class TableColumnVO {
@Schema(description = "列描述")
private String columnComment;
@Schema(description = "columnKey")
private String columnKey;
@Schema(description = "extra")
private String extra;
@Schema(description = "是否为空")
private String isNullable;
@Schema(description = "数据类型varchar")
private String dataType;
@Schema(description = "列类型varchar(50)")
private String columnType;
@Schema(description = "是否为空")
private Boolean nullableFlag;
@Schema(description = "是否为主键")
private Boolean primaryKeyFlag;
@Schema(description = "是否递增")
private Boolean autoIncreaseFlag;
// --------------- 临时字段 -------------------
@Schema(hidden = true)
private String columnKey;
@Schema(hidden = true)
private String extra;
@Schema(hidden = true)
private String isNullable;
}

View File

@ -160,6 +160,16 @@ public class DataTracerChangeContentService {
return "【原数据】:<br/>" + oldContent + "<br/>" + "【新数据】:<br/>" + newContent;
}
/**
* 解析批量bean的内容
*
* @param objectList 对象列表
* @return 单个内容
*/
public <T> String getChangeContent(List<T> objectList) {
return this.getObjectListContent(objectList);
}
/**
* 获取一个对象的内容信息
*

View File

@ -43,7 +43,6 @@ public class HelpDocCatalogEntity {
/**
* 排序
*/
@TableField("`sort`")
private Integer sort;

View File

@ -53,7 +53,6 @@ public class HelpDocEntity {
/**
* 排序
*/
@TableField("`sort`")
private Integer sort;
/**

View File

@ -47,7 +47,7 @@ import java.util.Map;
@Component
public class MailService {
@Autowired
@Resource
private JavaMailSender javaMailSender;
@Resource

View File

@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import net.lab1024.sa.base.common.domain.ResponseDTO;
import net.lab1024.sa.base.module.support.config.ConfigKeyEnum;
@ -28,17 +29,29 @@ public class Level3ProtectConfigService {
/**
* 开启双因子登录默认开启
* -- GETTER --
* 开启双因子登录默认开启
*/
@Getter
private boolean twoFactorLoginEnabled = false;
/**
* 连续登录失败次数则锁定-1表示不受限制可以一直尝试登录
* -- GETTER --
* 连续登录失败次数则锁定-1表示不受限制可以一直尝试登录
*/
@Getter
private int loginFailMaxTimes = -1;
/**
* 连续登录失败锁定时间单位-1表示不锁定建议锁定30分钟
* -- GETTER --
* 连续登录失败锁定时间单位-1表示不锁定建议锁定30分钟
*/
@Getter
private int loginFailLockSeconds = 1800;
/**
@ -48,61 +61,53 @@ public class Level3ProtectConfigService {
/**
* 密码复杂度 是否开启默认开启
* -- GETTER --
* 密码复杂度 是否开启默认开启
*/
@Getter
private boolean passwordComplexityEnabled = true;
/**
* 定期修改密码时间间隔默认默认建议90天更换密码
* -- GETTER --
* 定期修改密码时间间隔默认默认建议90天更换密码
*/
@Getter
private int regularChangePasswordDays = 90;
/**
* 定期修改密码不允许相同次数默认3次以内密码不能相同
* -- GETTER --
* 定期修改密码不允许相同次数默认3次以内密码不能相同
*/
@Getter
private int regularChangePasswordNotAllowRepeatTimes = 3;
/**
* 文件大小限制单位 mb (默认50 mb)
* -- GETTER --
* 文件大小限制单位 mb (默认50 mb)
*/
@Getter
private long maxUploadFileSizeMb = 50;
/**
* 文件检测默认不开启
* -- GETTER --
* 文件检测默认不开启
*/
@Getter
private boolean fileDetectFlag = false;
@Resource
private ConfigService configService;
/**
* 文件检测默认不开启
*/
public boolean isFileDetectFlag() {
return fileDetectFlag;
}
/**
* 文件大小限制单位 mb (默认50 mb)
*/
public long getMaxUploadFileSizeMb() {
return maxUploadFileSizeMb;
}
/**
* 连续登录失败次数则锁定-1表示不受限制可以一直尝试登录
*/
public int getLoginFailMaxTimes() {
return loginFailMaxTimes;
}
/**
* 连续登录失败锁定时间单位-1表示不锁定建议锁定30分钟
*/
public int getLoginFailLockSeconds() {
return loginFailLockSeconds;
}
/**
* 最低活跃时间单位超过此时间没有操作系统就会被冻结默认-1 代表不限制永不冻结; 默认 30分钟
*/
@ -110,34 +115,6 @@ public class Level3ProtectConfigService {
return loginActiveTimeoutSeconds > 0 ? loginActiveTimeoutSeconds : -1;
}
/**
* 定期修改密码时间间隔默认默认建议90天更换密码
*/
public int getRegularChangePasswordDays() {
return regularChangePasswordDays;
}
/**
* 开启双因子登录默认开启
*/
public boolean isTwoFactorLoginEnabled() {
return twoFactorLoginEnabled;
}
/**
* 密码复杂度 是否开启默认开启
*/
public boolean isPasswordComplexityEnabled() {
return passwordComplexityEnabled;
}
/**
* 定期修改密码不允许相同次数默认3次以内密码不能相同
*/
public int getRegularChangePasswordNotAllowRepeatTimes() {
return regularChangePasswordNotAllowRepeatTimes;
}
@PostConstruct
void init() {
String configValue = configService.getConfigValue(ConfigKeyEnum.LEVEL3_PROTECT_CONFIG);

View File

@ -6,7 +6,6 @@ import net.lab1024.sa.base.common.domain.ResponseDTO;
import net.lab1024.sa.base.common.util.SmartStringUtil;
import net.lab1024.sa.base.module.support.securityprotect.dao.PasswordLogDao;
import net.lab1024.sa.base.module.support.securityprotect.domain.PasswordLogEntity;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.security.crypto.argon2.Argon2PasswordEncoder;
import org.springframework.stereotype.Service;

View File

@ -11,6 +11,8 @@ import net.lab1024.sa.base.module.support.serialnumber.dao.SerialNumberDao;
import net.lab1024.sa.base.module.support.serialnumber.dao.SerialNumberRecordDao;
import net.lab1024.sa.base.module.support.serialnumber.domain.*;
import org.apache.commons.lang3.RandomUtils;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDate;
import java.time.LocalDateTime;
@ -92,6 +94,7 @@ public abstract class SerialNumberBaseService implements SerialNumberService {
public abstract void initLastGenerateData(List<SerialNumberEntity> serialNumberEntityList);
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public String generate(SerialNumberIdEnum serialNumberIdEnum) {
List<String> generateList = this.generate(serialNumberIdEnum, 1);
if (generateList == null || generateList.isEmpty()) {
@ -101,6 +104,7 @@ public abstract class SerialNumberBaseService implements SerialNumberService {
}
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public List<String> generate(SerialNumberIdEnum serialNumberIdEnum, int count) {
SerialNumberInfoBO serialNumberInfoBO = serialNumberMap.get(serialNumberIdEnum.getSerialNumberId());
if (serialNumberInfoBO == null) {

View File

@ -60,7 +60,7 @@ public class SerialNumberRedisService extends SerialNumberBaseService {
public List<String> generateSerialNumberList(SerialNumberInfoBO serialNumberInfo, int count) {
SerialNumberGenerateResultBO serialNumberGenerateResult = null;
String lockKey = RedisKeyConst.Support.SERIAL_NUMBER + serialNumberInfo.getSerialNumberId();
try {
boolean lock = false;
for (int i = 0; i < MAX_GET_LOCK_COUNT; i++) {
try {
@ -76,6 +76,8 @@ public class SerialNumberRedisService extends SerialNumberBaseService {
if (!lock) {
throw new BusinessException("SerialNumber 尝试5次未能生成单号");
}
try {
// 获取上次的生成结果
SerialNumberLastGenerateBO lastGenerateBO = (SerialNumberLastGenerateBO) redisService.mget(
RedisKeyConst.Support.SERIAL_NUMBER_LAST_INFO,

View File

@ -67,7 +67,7 @@ spring:
# 缓存实现类型
cache:
type: caffeine
type: redis
# tomcat 配置,主要用于 配置 访问日志(便于将来排查错误)
server:

View File

@ -14,7 +14,7 @@
</if>
<!--关键字-->
<if test="queryForm.keyword != null and queryForm.keyword != ''">
AND ( INSTR(t_change_log.version,#{queryForm.keyword})
AND ( INSTR(t_change_log.update_version,#{queryForm.keyword})
OR INSTR(t_change_log.publish_author,#{queryForm.keyword})
OR INSTR(t_change_log.content,#{queryForm.keyword})
)
@ -35,12 +35,12 @@
AND t_change_log.link = #{queryForm.link}
</if>
</where>
order by t_change_log.version desc
order by t_change_log.update_version desc
</select>
<select id="selectByVersion"
resultType="net.lab1024.sa.base.module.support.changelog.domain.entity.ChangeLogEntity">
select * from t_change_log where `version` = #{version}
select * from t_change_log where update_version = #{version}
</select>

View File

@ -13,7 +13,7 @@
<if test="query.userType != null">
AND user_type = #{query.userType}
</if>
<if test="query.ip != null">
<if test="query.ip != null and query.ip != ''">
AND INSTR(login_ip,#{query.ip})
</if>
<if test="query.startDate != null and query.startDate != ''">
@ -25,9 +25,6 @@
<if test="query.userName != null and query.userName != ''">
AND INSTR(user_name,#{query.userName})
</if>
<if test="query.ip != null">
AND INSTR(login_ip,#{query.ip})
</if>
</where>
order by create_time desc
</select>

View File

@ -23,10 +23,10 @@
AND INSTR(operate_user_name,#{query.userName})
</if>
<if test="query.keywords != null and query.keywords != ''">
AND (INSTR(`module`,#{query.keywords}) OR INSTR(content,#{query.keywords}))
AND (INSTR(module,#{query.keywords}) OR INSTR(content,#{query.keywords}))
</if>
<if test="query.requestKeywords != null and query.requestKeywords != ''">
AND (INSTR(`url`,#{query.requestKeywords}) OR INSTR(`method`,#{query.requestKeywords}) OR INSTR(`param`,#{query.requestKeywords}))
AND (INSTR(url,#{query.requestKeywords}) OR INSTR(method,#{query.requestKeywords}) OR INSTR(param,#{query.requestKeywords}))
</if>
<if test="query.successFlag != null">
AND success_flag = #{query.successFlag}

View File

@ -134,7 +134,7 @@ reload:
sa-token:
# token 名称(同时也是 cookie 名称)
token-name: Authorization
# token 前缀 例如:Bear
# token 前缀 例如:Bearer
token-prefix: Bearer
# token 有效期(单位:秒) 默认30天2592000秒-1 代表永久有效
timeout: 2592000

View File

@ -34,6 +34,7 @@ spring:
min-idle: 10
max-idle: 50
max-wait: 30000ms
# 邮件置以SSL的方式发送, 这个需要使用这种方式并且端口是465
mail:
host: smtp.163.com
@ -106,7 +107,7 @@ springdoc:
knife4j:
enable: true
basic:
enable: true
enable: false
username: api # Basic认证用户名
password: 1024 # Basic认证密码
@ -131,7 +132,7 @@ reload:
sa-token:
# token 名称(同时也是 cookie 名称)
token-name: Authorization
# token 前缀 例如:Bear
# token 前缀 例如:Bearer
token-prefix: Bearer
# token 有效期(单位:秒) 默认30天2592000秒-1 代表永久有效
timeout: 2592000

View File

@ -134,7 +134,7 @@ reload:
sa-token:
# token 名称(同时也是 cookie 名称)
token-name: Authorization
# token 前缀 例如:Bear
# token 前缀 例如:Bearer
token-prefix: Bearer
# token 有效期(单位:秒) 默认30天2592000秒-1 代表永久有效
timeout: 2592000

View File

@ -230,7 +230,7 @@ public class NoticeService {
noticeVisibleRange.setDataName(employeeEntity == null ? StringConst.EMPTY : employeeEntity.getActualName());
} else {
DepartmentVO departmentVO = departmentService.getDepartmentById(noticeVisibleRange.getDataId());
noticeVisibleRange.setDataName(departmentVO == null ? StringConst.EMPTY : departmentVO.getName());
noticeVisibleRange.setDataName(departmentVO == null ? StringConst.EMPTY : departmentVO.getDepartmentName());
}
}
updateFormVO.setVisibleRangeList(noticeVisibleRangeList);

View File

@ -31,7 +31,7 @@ public class DepartmentEntity {
/**
* 部门名称
*/
private String name;
private String departmentName;
/**
* 负责人员工 id

View File

@ -21,7 +21,7 @@ public class DepartmentAddForm {
@Schema(description = "部门名称")
@Length(min = 1, max = 50, message = "请输入正确的部门名称(1-50个字符)")
@NotNull(message = "请输入正确的部门名称(1-50个字符)")
private String name;
private String departmentName;
@Schema(description = "排序")
@NotNull(message = "排序值")

View File

@ -24,7 +24,7 @@ public class DepartmentVO implements Serializable {
private Long departmentId;
@Schema(description = "部门名称")
private String name;
private String departmentName;
@Schema(description = "部门负责人姓名")
private String managerName;

View File

@ -97,15 +97,15 @@ public class DepartmentCacheManager {
*/
private String buildDepartmentPath(DepartmentVO departmentVO, Map<Long, DepartmentVO> departmentMap) {
if (Objects.equals(departmentVO.getParentId(), NumberUtils.LONG_ZERO)) {
return departmentVO.getName();
return departmentVO.getDepartmentName();
}
//父节点
DepartmentVO parentDepartment = departmentMap.get(departmentVO.getParentId());
if (parentDepartment == null) {
return departmentVO.getName();
return departmentVO.getDepartmentName();
}
String pathName = buildDepartmentPath(parentDepartment, departmentMap);
return pathName + "/" + departmentVO.getName();
return pathName + "/" + departmentVO.getDepartmentName();
}
// ---------------------- 构造树的一些方法 ------------------------------

View File

@ -242,8 +242,6 @@ public class EmployeeService {
/**
* 更新登录人头像
*
* @param employeeUpdateAvatarForm
* @return
*/
public ResponseDTO<String> updateAvatar(EmployeeUpdateAvatarForm employeeUpdateAvatarForm) {
Long employeeId = employeeUpdateAvatarForm.getEmployeeId();
@ -395,7 +393,7 @@ public class EmployeeService {
List<EmployeeVO> voList = employeeEntityList.stream().map(e -> {
EmployeeVO employeeVO = SmartBeanUtil.copy(e, EmployeeVO.class);
if (department != null) {
employeeVO.setDepartmentName(department.getName());
employeeVO.setDepartmentName(department.getDepartmentName());
}
return employeeVO;
}).collect(Collectors.toList());

View File

@ -88,7 +88,7 @@ public class LoginManager {
// 部门信息
DepartmentVO department = departmentService.getDepartmentById(employeeEntity.getDepartmentId());
requestEmployee.setDepartmentName(null == department ? StringConst.EMPTY : department.getName());
requestEmployee.setDepartmentName(null == department ? StringConst.EMPTY : department.getDepartmentName());
// 头像信息
String avatar = employeeEntity.getAvatar();

View File

@ -14,6 +14,7 @@ import net.lab1024.sa.base.common.code.SystemErrorCode;
import net.lab1024.sa.base.common.domain.RequestUrlVO;
import net.lab1024.sa.base.common.domain.ResponseDTO;
import net.lab1024.sa.base.common.util.SmartBeanUtil;
import net.lab1024.sa.base.common.util.SmartStringUtil;
import org.apache.commons.lang3.math.NumberUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@ -134,6 +135,10 @@ public class MenuService {
* @return true 重复 false 未重复
*/
public <T extends MenuBaseForm> Boolean validateWebPerms(T menuDTO) {
if(SmartStringUtil.isEmpty(menuDTO.getWebPerms())){
return false;
}
MenuEntity menu = menuDao.getByWebPerms(menuDTO.getWebPerms(), Boolean.FALSE);
if (menuDTO instanceof MenuAddForm) {
return menu != null;

View File

@ -72,7 +72,7 @@ public class RoleEmployeeService {
List<Long> departmentIdList = employeeList.stream().filter(e -> e != null && e.getDepartmentId() != null).map(EmployeeVO::getDepartmentId).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(departmentIdList)) {
List<DepartmentEntity> departmentEntities = departmentDao.selectBatchIds(departmentIdList);
Map<Long, String> departmentIdNameMap = departmentEntities.stream().collect(Collectors.toMap(DepartmentEntity::getDepartmentId, DepartmentEntity::getName));
Map<Long, String> departmentIdNameMap = departmentEntities.stream().collect(Collectors.toMap(DepartmentEntity::getDepartmentId, DepartmentEntity::getDepartmentName));
employeeList.forEach(e -> {
e.setDepartmentName(departmentIdNameMap.getOrDefault(e.getDepartmentId(), StringConst.EMPTY));
});

View File

@ -70,7 +70,7 @@
<select id="queryPageEmployeeList"
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEmployeeVO">
select
t_oa_enterprise_employee.*,
t_oa_enterprise_employee.enterprise_id,
t_oa_enterprise.enterprise_name,
t_employee.*,
t_employee.actual_name as employeeName

View File

@ -219,7 +219,7 @@
<select id="queryNoticeViewRecordList" resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeViewRecordVO">
select t_notice_view_record.*,
t_employee.actual_name as employeeName,
t_department.name as departmentName
t_department.department_name
from t_notice_view_record
left join t_employee on t_employee.employee_id = t_notice_view_record.employee_id
left join t_department on t_department.department_id = t_employee.department_id

View File

@ -6,7 +6,7 @@
<select id="listAll" resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
SELECT t_department.*,
t_employee.actual_name as managerName,
parent_department.`name` as parentName
parent_department.department_name as parentName
FROM t_department
left join t_employee on t_department.manager_id = t_employee.employee_id
left join t_department parent_department on t_department.parent_id = parent_department.department_id
@ -23,7 +23,7 @@
resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
SELECT t_department.*,
t_employee.actual_name as managerName,
parent_department.`name` as parentName
parent_department.department_name as parentName
FROM t_department
left join t_employee on t_department.manager_id = t_employee.employee_id
left join t_department parent_department on t_department.parent_id = parent_department.department_id

View File

@ -5,7 +5,7 @@
<select id="queryEmployee" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
SELECT
t_employee.*,
t_department.name AS departmentName
t_department.department_name
FROM t_employee
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
<where>
@ -169,7 +169,7 @@
<select id="getEmployeeById" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
SELECT t_employee.*,
t_department.name AS departmentName
t_department.department_name
FROM t_employee
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
where t_employee.employee_id = #{employeeId}
@ -178,7 +178,7 @@
<select id="selectEmployeeByDisabledAndDeleted" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
SELECT
t_employee.*,
t_department.name AS departmentName
t_department.department_name
FROM t_employee
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
<where>

View File

@ -35,7 +35,8 @@ public class CacheConfig {
return RedisCacheConfiguration.defaultCacheConfig()
.disableCachingNullValues()
.computePrefixWith(name -> "cache:" + name + ":")
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer()));
// .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer()));
;
}
@Bean

View File

@ -7,6 +7,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* mp 插件
*

View File

@ -28,7 +28,7 @@ public class ChangeLogEntity {
/**
* 版本
*/
private String version;
private String updateVersion;
/**
* 更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]

View File

@ -22,7 +22,7 @@ public class ChangeLogAddForm {
@Schema(description = "版本", required = true)
@NotBlank(message = "版本 不能为空")
private String version;
private String updateVersion;
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
@CheckEnum(value = ChangeLogTypeEnum.class, message = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 错误", required = true)

View File

@ -26,7 +26,7 @@ public class ChangeLogUpdateForm {
@Schema(description = "版本", required = true)
@NotBlank(message = "版本 不能为空")
private String version;
private String updateVersion;
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
@CheckEnum(value = ChangeLogTypeEnum.class, message = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 错误", required = true)

View File

@ -23,7 +23,7 @@ public class ChangeLogVO {
private Long changeLogId;
@Schema(description = "版本")
private String version;
private String updateVersion;
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
private Integer type;

View File

@ -44,7 +44,7 @@ public class ChangeLogService {
* 添加
*/
public synchronized ResponseDTO<String> add(ChangeLogAddForm addForm) {
ChangeLogEntity existVersion = changeLogDao.selectByVersion(addForm.getVersion());
ChangeLogEntity existVersion = changeLogDao.selectByVersion(addForm.getUpdateVersion());
if (existVersion != null) {
return ResponseDTO.userErrorParam("此版本已经存在");
}
@ -58,7 +58,7 @@ public class ChangeLogService {
* 更新
*/
public synchronized ResponseDTO<String> update(ChangeLogUpdateForm updateForm) {
ChangeLogEntity existVersion = changeLogDao.selectByVersion(updateForm.getVersion());
ChangeLogEntity existVersion = changeLogDao.selectByVersion(updateForm.getUpdateVersion());
if (existVersion != null && !updateForm.getChangeLogId().equals(existVersion.getChangeLogId())) {
return ResponseDTO.userErrorParam("此版本已经存在");
}

View File

@ -11,16 +11,6 @@ package net.lab1024.sa.base.module.support.codegenerator.constant;
*/
public class CodeGeneratorConstant {
/**
* 主键
*/
public final static String PRIMARY_KEY = "PRI";
/**
* 自增
*/
public final static String AUTO_INCREMENT = "auto_increment";
/**
* 默认逻辑删除字段名称
*/

View File

@ -23,20 +23,26 @@ public class TableColumnVO {
@Schema(description = "列描述")
private String columnComment;
@Schema(description = "columnKey")
private String columnKey;
@Schema(description = "extra")
private String extra;
@Schema(description = "是否为空")
private String isNullable;
@Schema(description = "数据类型varchar")
private String dataType;
@Schema(description = "列类型varchar(50)")
private String columnType;
@Schema(description = "是否为空")
private Boolean nullableFlag;
@Schema(description = "是否为主键")
private Boolean primaryKeyFlag;
@Schema(description = "是否递增")
private Boolean autoIncreaseFlag;
// --------------- 临时字段 -------------------
@Schema(hidden = true)
private String columnKey;
@Schema(hidden = true)
private String extra;
@Schema(hidden = true)
private String isNullable;
}

View File

@ -160,6 +160,16 @@ public class DataTracerChangeContentService {
return "【原数据】:<br/>" + oldContent + "<br/>" + "【新数据】:<br/>" + newContent;
}
/**
* 解析批量bean的内容
*
* @param objectList 对象列表
* @return 单个内容
*/
public <T> String getChangeContent(List<T> objectList) {
return this.getObjectListContent(objectList);
}
/**
* 获取一个对象的内容信息
*

View File

@ -43,7 +43,6 @@ public class HelpDocCatalogEntity {
/**
* 排序
*/
@TableField("`sort`")
private Integer sort;

View File

@ -53,7 +53,6 @@ public class HelpDocEntity {
/**
* 排序
*/
@TableField("`sort`")
private Integer sort;
/**

View File

@ -47,7 +47,7 @@ import java.util.Map;
@Component
public class MailService {
@Autowired
@Resource
private JavaMailSender javaMailSender;
@Resource

View File

@ -3,6 +3,7 @@ package net.lab1024.sa.base.module.support.securityprotect.service;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import net.lab1024.sa.base.common.domain.ResponseDTO;
import net.lab1024.sa.base.module.support.config.ConfigKeyEnum;
@ -29,17 +30,29 @@ public class Level3ProtectConfigService {
/**
* 开启双因子登录默认开启
* -- GETTER --
* 开启双因子登录默认开启
*/
@Getter
private boolean twoFactorLoginEnabled = false;
/**
* 连续登录失败次数则锁定-1表示不受限制可以一直尝试登录
* -- GETTER --
* 连续登录失败次数则锁定-1表示不受限制可以一直尝试登录
*/
@Getter
private int loginFailMaxTimes = -1;
/**
* 连续登录失败锁定时间单位-1表示不锁定建议锁定30分钟
* -- GETTER --
* 连续登录失败锁定时间单位-1表示不锁定建议锁定30分钟
*/
@Getter
private int loginFailLockSeconds = 1800;
/**
@ -49,61 +62,53 @@ public class Level3ProtectConfigService {
/**
* 密码复杂度 是否开启默认开启
* -- GETTER --
* 密码复杂度 是否开启默认开启
*/
@Getter
private boolean passwordComplexityEnabled = true;
/**
* 定期修改密码时间间隔默认默认建议90天更换密码
* -- GETTER --
* 定期修改密码时间间隔默认默认建议90天更换密码
*/
@Getter
private int regularChangePasswordDays = 90;
/**
* 定期修改密码不允许相同次数默认3次以内密码不能相同
* -- GETTER --
* 定期修改密码不允许相同次数默认3次以内密码不能相同
*/
@Getter
private int regularChangePasswordNotAllowRepeatTimes = 3;
/**
* 文件大小限制单位 mb (默认50 mb)
* -- GETTER --
* 文件大小限制单位 mb (默认50 mb)
*/
@Getter
private long maxUploadFileSizeMb = 50;
/**
* 文件检测默认不开启
* -- GETTER --
* 文件检测默认不开启
*/
@Getter
private boolean fileDetectFlag = false;
@Resource
private ConfigService configService;
/**
* 文件检测默认不开启
*/
public boolean isFileDetectFlag() {
return fileDetectFlag;
}
/**
* 文件大小限制单位 mb (默认50 mb)
*/
public long getMaxUploadFileSizeMb() {
return maxUploadFileSizeMb;
}
/**
* 连续登录失败次数则锁定-1表示不受限制可以一直尝试登录
*/
public int getLoginFailMaxTimes() {
return loginFailMaxTimes;
}
/**
* 连续登录失败锁定时间单位-1表示不锁定建议锁定30分钟
*/
public int getLoginFailLockSeconds() {
return loginFailLockSeconds;
}
/**
* 最低活跃时间单位超过此时间没有操作系统就会被冻结默认-1 代表不限制永不冻结; 默认 30分钟
*/
@ -111,34 +116,6 @@ public class Level3ProtectConfigService {
return loginActiveTimeoutSeconds > 0 ? loginActiveTimeoutSeconds : -1;
}
/**
* 定期修改密码时间间隔默认默认建议90天更换密码
*/
public int getRegularChangePasswordDays() {
return regularChangePasswordDays;
}
/**
* 开启双因子登录默认开启
*/
public boolean isTwoFactorLoginEnabled() {
return twoFactorLoginEnabled;
}
/**
* 密码复杂度 是否开启默认开启
*/
public boolean isPasswordComplexityEnabled() {
return passwordComplexityEnabled;
}
/**
* 定期修改密码不允许相同次数默认3次以内密码不能相同
*/
public int getRegularChangePasswordNotAllowRepeatTimes() {
return regularChangePasswordNotAllowRepeatTimes;
}
@PostConstruct
void init() {
String configValue = configService.getConfigValue(ConfigKeyEnum.LEVEL3_PROTECT_CONFIG);

View File

@ -9,6 +9,8 @@ import net.lab1024.sa.base.module.support.serialnumber.dao.SerialNumberDao;
import net.lab1024.sa.base.module.support.serialnumber.dao.SerialNumberRecordDao;
import net.lab1024.sa.base.module.support.serialnumber.domain.*;
import org.apache.commons.lang3.RandomUtils;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
@ -92,6 +94,7 @@ public abstract class SerialNumberBaseService implements SerialNumberService {
public abstract void initLastGenerateData(List<SerialNumberEntity> serialNumberEntityList);
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public String generate(SerialNumberIdEnum serialNumberIdEnum) {
List<String> generateList = this.generate(serialNumberIdEnum, 1);
if (generateList == null || generateList.isEmpty()) {
@ -101,6 +104,7 @@ public abstract class SerialNumberBaseService implements SerialNumberService {
}
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public List<String> generate(SerialNumberIdEnum serialNumberIdEnum, int count) {
SerialNumberInfoBO serialNumberInfoBO = serialNumberMap.get(serialNumberIdEnum.getSerialNumberId());
if (serialNumberInfoBO == null) {

View File

@ -9,7 +9,6 @@ import net.lab1024.sa.base.module.support.serialnumber.domain.SerialNumberGenera
import net.lab1024.sa.base.module.support.serialnumber.domain.SerialNumberInfoBO;
import net.lab1024.sa.base.module.support.serialnumber.domain.SerialNumberLastGenerateBO;
import net.lab1024.sa.base.module.support.serialnumber.service.SerialNumberBaseService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@ -61,7 +60,7 @@ public class SerialNumberRedisService extends SerialNumberBaseService {
public List<String> generateSerialNumberList(SerialNumberInfoBO serialNumberInfo, int count) {
SerialNumberGenerateResultBO serialNumberGenerateResult = null;
String lockKey = RedisKeyConst.Support.SERIAL_NUMBER + serialNumberInfo.getSerialNumberId();
try {
boolean lock = false;
for (int i = 0; i < MAX_GET_LOCK_COUNT; i++) {
try {
@ -77,6 +76,8 @@ public class SerialNumberRedisService extends SerialNumberBaseService {
if (!lock) {
throw new BusinessException("SerialNumber 尝试5次未能生成单号");
}
try {
// 获取上次的生成结果
SerialNumberLastGenerateBO lastGenerateBO = (SerialNumberLastGenerateBO) redisService.mget(
RedisKeyConst.Support.SERIAL_NUMBER_LAST_INFO,

View File

@ -14,7 +14,7 @@
</if>
<!--关键字-->
<if test="queryForm.keyword != null and queryForm.keyword != ''">
AND ( INSTR(t_change_log.version,#{queryForm.keyword})
AND ( INSTR(t_change_log.update_version,#{queryForm.keyword})
OR INSTR(t_change_log.publish_author,#{queryForm.keyword})
OR INSTR(t_change_log.content,#{queryForm.keyword})
)
@ -35,12 +35,12 @@
AND t_change_log.link = #{queryForm.link}
</if>
</where>
order by t_change_log.version desc
order by t_change_log.update_version desc
</select>
<select id="selectByVersion"
resultType="net.lab1024.sa.base.module.support.changelog.domain.entity.ChangeLogEntity">
select * from t_change_log where `version` = #{version}
select * from t_change_log where update_version = #{version}
</select>

View File

@ -13,7 +13,7 @@
<if test="query.userType != null">
AND user_type = #{query.userType}
</if>
<if test="query.ip != null">
<if test="query.ip != null and query.ip != ''">
AND INSTR(login_ip,#{query.ip})
</if>
<if test="query.startDate != null and query.startDate != ''">
@ -25,9 +25,6 @@
<if test="query.userName != null and query.userName != ''">
AND INSTR(user_name,#{query.userName})
</if>
<if test="query.ip != null">
AND INSTR(login_ip,#{query.ip})
</if>
</where>
order by create_time desc
</select>

View File

@ -23,10 +23,10 @@
AND INSTR(operate_user_name,#{query.userName})
</if>
<if test="query.keywords != null and query.keywords != ''">
AND (INSTR(`module`,#{query.keywords}) OR INSTR(content,#{query.keywords}))
AND (INSTR(module,#{query.keywords}) OR INSTR(content,#{query.keywords}))
</if>
<if test="query.requestKeywords != null and query.requestKeywords != ''">
AND (INSTR(`url`,#{query.requestKeywords}) OR INSTR(`method`,#{query.requestKeywords}) OR INSTR(`param`,#{query.requestKeywords}))
AND (INSTR(url,#{query.requestKeywords}) OR INSTR(method,#{query.requestKeywords}) OR INSTR(param,#{query.requestKeywords}))
</if>
<if test="query.successFlag != null">
AND success_flag = #{query.successFlag}

View File

View File

View File

@ -12,7 +12,7 @@
<a-tree-select
:value="props.value"
:treeData="treeData"
:fieldNames="{ label: 'name', key: 'departmentId', value: 'departmentId' }"
:fieldNames="{ label: 'departmentName', key: 'departmentId', value: 'departmentId' }"
show-search
style="width: 100%"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"

View File

@ -29,7 +29,7 @@ export const appDefaultConfig = {
// 标签页
pageTagFlag: true,
// 标签页样式: default、 antd、chrome
pageTagStyle: 'default',
pageTagStyle: 'chrome',
// 面包屑
breadCrumbFlag: true,
// 页脚

View File

@ -17,8 +17,8 @@
:destroyOnClose="true"
>
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }">
<a-form-item label="版本" name="version">
<a-input style="width: 100%" v-model:value="form.version" placeholder="版本" />
<a-form-item label="版本" name="updateVersion">
<a-input style="width: 100%" v-model:value="form.updateVersion" placeholder="版本" />
</a-form-item>
<a-form-item label="更新类型" name="type">
<SmartEnumSelect width="100%" v-model:value="form.type" enumName="CHANGE_LOG_TYPE_ENUM" placeholder="更新类型" />
@ -85,7 +85,7 @@
const formDefault = {
changeLogId: undefined,
version: undefined, //
updateVersion: undefined, //
type: undefined, //:[1:;2:;3:bug]
publishAuthor: undefined, //
publicDate: undefined, //
@ -96,7 +96,7 @@
let form = reactive({ ...formDefault });
const rules = {
version: [{ required: true, message: '版本 必填' }],
updateVersion: [{ required: true, message: '版本 必填' }],
type: [{ required: true, message: '更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 必填' }],
publishAuthor: [{ required: true, message: '发布人 必填' }],
publicDate: [{ required: true, message: '发布日期 必填' }],

View File

@ -75,7 +75,7 @@
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
>
<template #bodyCell="{ text, record, column }">
<template v-if="column.dataIndex === 'version'">
<template v-if="column.dataIndex === 'updateVersion'">
<a-button @click="showModal(record)" type="link">{{ text }}</a-button>
</template>
<template v-if="column.dataIndex === 'type'">
@ -135,7 +135,7 @@
const columns = ref([
{
title: '版本',
dataIndex: 'version',
dataIndex: 'updateVersion',
ellipsis: true,
},
{

View File

@ -176,9 +176,9 @@
columnName: column.columnName,
columnComment: column.columnComment,
dataType: column.dataType,
nullableFlag: column.isNullable === 'NO',
primaryKeyFlag: column.columnKey === 'PRI',
autoIncreaseFlag: column.extra === 'auto_increment',
nullableFlag: column.nullableFlag,
primaryKeyFlag: column.primaryKeyFlag,
autoIncreaseFlag: column.autoIncreaseFlag,
//
fieldName: configField ? configField.fieldName : convertLowerCamel(column.columnName),
label: configField ? configField.label : column.columnComment,

View File

@ -216,9 +216,9 @@
columnName: column.columnName,
columnComment: column.columnComment,
dataType: column.dataType,
nullableFlag: column.isNullable === 'NO',
primaryKeyFlag: column.columnKey === 'PRI',
autoIncreaseFlag: column.extra === 'auto_increment',
nullableFlag: column.nullableFlag,
primaryKeyFlag: column.primaryKeyFlag,
autoIncreaseFlag: column.autoIncreaseFlag,
};
//

View File

@ -102,6 +102,7 @@
const visibleFlag = ref(false);
function showModal(table) {
Object.assign(tableInfo, table);
tableInfo.createTime = table.createTime ? table.createTime : new Date();
activeKey.value = '1';
visibleFlag.value = true;
nextTick(() => {

View File

@ -14,8 +14,8 @@
<DepartmentTreeSelect ref="departmentTreeSelect" v-model:value="formState.parentId" :defaultValueFlag="false"
width="100%" />
</a-form-item>
<a-form-item label="部门名称" name="name">
<a-input v-model:value.trim="formState.name" placeholder="请输入部门名称" />
<a-form-item label="部门名称" name="departmentName">
<a-input v-model:value.trim="formState.departmentName" placeholder="请输入部门名称" />
</a-form-item>
<a-form-item label="部门负责人" name="managerId">
<EmployeeSelect ref="employeeSelect" placeholder="请选择部门负责人" width="100%" v-model:value="formState.managerId"
@ -76,7 +76,7 @@ const emits = defineEmits(['refresh']);
const defaultDepartmentForm = {
id: undefined,
managerId: undefined, //
name: undefined,
departmentName: undefined,
parentId: undefined,
sort: 0,
};
@ -88,7 +88,7 @@ let formState = reactive({
//
const rules = {
parentId: [{ required: true, message: '上级部门不能为空' }],
name: [
departmentName: [
{ required: true, message: '部门名称不能为空' },
{ max: 50, message: '部门名称不能大于20个字符', trigger: 'blur' },
],

View File

@ -95,8 +95,8 @@
const columns = ref([
{
title: '部门名称',
dataIndex: 'name',
key: 'name',
dataIndex: 'departmentName',
key: 'departmentName',
},
{
title: '负责人',
@ -189,7 +189,7 @@
return;
}
//
let filterDepartment = originData.filter((e) => e.name.indexOf(keywords.value) > -1);
let filterDepartment = originData.filter((e) => e.departmentName.indexOf(keywords.value) > -1);
let filterDepartmentList = [];
//
filterDepartment.forEach((e) => {
@ -220,7 +220,7 @@
function addDepartment(e) {
let data = {
departmentId: 0,
name: '',
departmentName: '',
parentId: e.departmentId || null,
};
departmentFormModal.value.showModal(data);

View File

@ -19,7 +19,7 @@
<template #renderItem="{ item }">
<a-list-item>
<div class="department-item" @click="selectTree(item.departmentId)">
{{ item.name }}
{{ item.departmentName }}
<RightOutlined />
</div>
</a-list-item>

View File

@ -18,7 +18,7 @@
v-model:checkedKeys="checkedKeys"
class="tree"
:treeData="departmentTreeData"
:fieldNames="{ title: 'name', key: 'departmentId', value: 'departmentId' }"
:fieldNames="{ title: 'departmentName', key: 'departmentId', value: 'departmentId' }"
style="width: 100%; overflow-x: auto"
:style="[!height ? '' : { height: `${height}px`, overflowY: 'auto' }]"
:checkable="props.checkable"
@ -28,7 +28,7 @@
@select="treeSelectChange"
>
<template #title="item">
<div>{{ item.name }}</div>
<div>{{ item.departmentName }}</div>
</template>
</a-tree>
<div class="no-data" v-else>暂无结果</div>
@ -158,7 +158,7 @@
selectedDepartmentChildren.value = departmentList.value.filter((e) => e.parentId == id);
let filterDepartmentList = [];
recursionFilterDepartment(filterDepartmentList, id, true);
breadcrumb.value = filterDepartmentList.map((e) => e.name);
breadcrumb.value = filterDepartmentList.map((e) => e.departmentName);
}
// ----------------------- ---------------------
@ -181,7 +181,7 @@
return;
}
//
let filterDepartment = originData.filter((e) => e.name.indexOf(keywords.value) > -1);
let filterDepartment = originData.filter((e) => e.departmentName.indexOf(keywords.value) > -1);
let filterDepartmentList = [];
//
filterDepartment.forEach((e) => {

View File

View File

@ -43,15 +43,16 @@
</template>
<script setup lang="ts">
import dayjs from 'dayjs';
import {computed, h} from 'vue';
import {messages} from '/@/i18n';
import {useAppConfigStore} from '/@/store/modules/system/app-config';
import {useSpinStore} from '/@/store/modules/system/spin';
import {Popover, theme} from 'ant-design-vue';
import {themeColors} from '/@/theme/color.js';
import SmartCopyIcon from '/@/components/framework/smart-copy-icon/index.vue';
import dayjs from 'dayjs';
import { computed, h, useSlots } from 'vue';
import { messages } from '/@/i18n';
import { useAppConfigStore } from '/@/store/modules/system/app-config';
import { useSpinStore } from '/@/store/modules/system/spin';
import { Popover, theme } from 'ant-design-vue';
import { themeColors } from '/@/theme/color.js';
import SmartCopyIcon from '/@/components/framework/smart-copy-icon/index.vue';
const slots = useSlots();
const antdLocale = computed(() => messages[useAppConfigStore().language].antdLocale);
const dayjsLocale = computed(() => messages[useAppConfigStore().language].dayjsLocale);
dayjs.locale(dayjsLocale);
@ -88,7 +89,6 @@ import SmartCopyIcon from '/@/components/framework/smart-copy-icon/index.vue';
return text;
}
}
</script>
<style scoped lang="less">
:deep(.ant-table-column-sorters) {

View File

@ -12,7 +12,7 @@
<a-tree-select
:value="props.value"
:treeData="treeData"
:fieldNames="{ label: 'name', key: 'departmentId', value: 'departmentId' }"
:fieldNames="{ label: 'departmentName', key: 'departmentId', value: 'departmentId' }"
show-search
style="width: 100%"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"

View File

@ -29,7 +29,7 @@ export const appDefaultConfig = {
// 标签页
pageTagFlag: true,
// 标签页样式: default、 antd、chrome
pageTagStyle: 'default',
pageTagStyle: 'chrome',
// 面包屑
breadCrumbFlag: true,
// 页脚

View File

@ -36,7 +36,7 @@
</a-button>
</a-button-group>
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20">
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20" v-if="$privilege('oa:bank:add')">
<template #icon>
<PlusOutlined />
</template>
@ -60,8 +60,8 @@
</template>
<template v-else-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
<a-button @click="addOrUpdate(record)" type="link">编辑</a-button>
<a-button @click="confirmDelete(record.bankId)" danger type="link">删除</a-button>
<a-button @click="addOrUpdate(record)" type="link" v-if="$privilege('oa:bank:update')">编辑</a-button>
<a-button @click="confirmDelete(record.bankId)" danger type="link" v-if="$privilege('oa:bank:delete')">删除</a-button>
</div>
</template>
</template>

View File

@ -8,8 +8,8 @@
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
-->
<template>
<a-modal :open="visible" :title="form.bankId ? '编辑' : '添加'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 18 }">
<a-modal :open="visible" :title="form.bankId ? '编辑' : '添加'" :width="700" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 4 }" :wrapper-col="{ span: 19 }">
<a-form-item label="开户银行" name="bankName">
<a-input v-model:value="form.bankName" placeholder="请输入开户银行" />
</a-form-item>

View File

@ -16,12 +16,20 @@
<a-button class="button-style" type="primary" @click="onSearch">搜索</a-button>
<a-button class="button-style" type="default" @click="resetQueryEmployee">重置</a-button>
</div>
<div>
<a-button class="button-style" type="primary" @click="addEmployee" v-privilege="'oa:enterprise:addEmployee'"> 添加员工 </a-button>
<a-button class="button-style" type="primary" danger @click="batchDelete" v-privilege="'oa:enterprise:deleteEmployee'"> 批量移除 </a-button>
</div>
</div>
<a-card size="small" :bordered="false" :hoverable="false">
<a-row justify="end">
<TableOperator
class="smart-margin-bottom5"
v-model="columns"
:tableId="TABLE_ID_CONST.BUSINESS.OA.ENTERPRISE_EMPLOYEE"
:refresh="queryEmployee"
/>
</a-row>
<a-table
:loading="tableLoading"
:dataSource="tableData"
@ -32,7 +40,7 @@
size="small"
bordered
>
<template #bodyCell="{ text, record, index, column }">
<template #bodyCell="{ text, record, column }">
<template v-if="column.dataIndex === 'disabledFlag'">
<a-tag :color="text ? 'error' : 'processing'">{{ text ? '禁用' : '启用' }}</a-tag>
</template>
@ -40,7 +48,7 @@
<span>{{ $smartEnumPlugin.getDescByValue('GENDER_ENUM', text) }}</span>
</template>
<template v-if="column.dataIndex === 'operate'">
<a @click="deleteEmployee(record.employeeId)" v-privilege="'oa:enterprise:deleteEmployee'">移除</a>
<a-button type="link" @click="deleteEmployee(record.employeeId)" v-privilege="'oa:enterprise:deleteEmployee'">移除</a-button>
</template>
</template>
</a-table>
@ -60,6 +68,7 @@
/>
</div>
<EmployeeTableSelectModal ref="selectEmployeeModal" @selectData="selectData" />
</a-card>
</div>
</template>
<script setup lang="ts">
@ -72,6 +81,8 @@
import { SmartLoading } from '/@/components/framework/smart-loading';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS, showTableTotal } from '/@/constants/common-const';
import { smartSentry } from '/@/lib/smart-sentry';
import TableOperator from '/@/components/support/table-operator/index.vue';
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
const props = defineProps({
enterpriseId: {
@ -112,7 +123,8 @@
{
title: '操作',
dataIndex: 'operate',
width: 60,
width: 90,
align: 'center',
},
]);
@ -271,7 +283,8 @@
display: flex;
align-items: center;
justify-content: space-between;
margin: 20px 0;
padding: 10px 10px;
margin-bottom: 10px;
}
.button-style {

View File

@ -36,7 +36,7 @@
</a-button>
</a-button-group>
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20">
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20" v-if="$privilege('oa:invoice:add')">
<template #icon>
<PlusOutlined />
</template>
@ -51,14 +51,14 @@
<TableOperator class="smart-margin-bottom5" v-model="columns" :tableId="TABLE_ID_CONST.BUSINESS.OA.ENTERPRISE_INVOICE" :refresh="ajaxQuery" />
</a-row>
<a-table :scroll="{ x: 1300 }" size="small" :dataSource="tableData" :columns="columns" rowKey="invoiceId" :pagination="false" bordered>
<template #bodyCell="{ text, record, index, column }">
<template #bodyCell="{ record, column }">
<template v-if="column.dataIndex === 'disabledFlag'">
{{ record.disabledFlag ? '禁用' : '启用' }}
</template>
<template v-else-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
<a-button @click="addOrUpdate(record)" type="link">编辑</a-button>
<a-button @click="confirmDelete(record.invoiceId)" type="link" danger>删除</a-button>
<a-button @click="addOrUpdate(record)" type="link" v-if="$privilege('oa:invoice:update')">编辑</a-button>
<a-button @click="confirmDelete(record.invoiceId)" type="link" danger v-if="$privilege('oa:invoice:delete')">删除</a-button>
</div>
</template>
</template>

View File

@ -8,8 +8,8 @@
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
-->
<template>
<a-modal :open="visible" :title="form.invoiceId ? '编辑' : '添加'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
<a-modal :open="visible" :title="form.invoiceId ? '编辑' : '添加'" :width="700" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 4 }" :wrapper-col="{ span: 19 }">
<a-form-item label="开票抬头" name="invoiceHeads">
<a-input v-model:value="form.invoiceHeads" placeholder="请输入开票抬头" />
</a-form-item>

View File

@ -1,6 +1,15 @@
<template>
<a-modal :open="visible" title="添加" :width="700" forceRender ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 6 }">
<a-modal
:open="visible"
:title="form.enterpriseId ? '编辑' : '添加'"
:width="700"
forceRender
ok-text="确认"
cancel-text="取消"
@ok="onSubmit"
@cancel="onClose"
>
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 18 }">
<a-form-item label="企业名称" name="enterpriseName">
<a-input v-model:value="form.enterpriseName" placeholder="请输入企业名称" />
</a-form-item>

View File

@ -17,8 +17,8 @@
:destroyOnClose="true"
>
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }">
<a-form-item label="版本" name="version">
<a-input style="width: 100%" v-model:value="form.version" placeholder="版本" />
<a-form-item label="版本" name="updateVersion">
<a-input style="width: 100%" v-model:value="form.updateVersion" placeholder="版本" />
</a-form-item>
<a-form-item label="更新类型" name="type">
<SmartEnumSelect width="100%" v-model:value="form.type" enumName="CHANGE_LOG_TYPE_ENUM" placeholder="更新类型" />
@ -85,7 +85,7 @@
const formDefault = {
changeLogId: undefined,
version: undefined, //
updateVersion: undefined, //
type: undefined, //:[1:;2:;3:bug]
publishAuthor: undefined, //
publicDate: undefined, //
@ -96,7 +96,7 @@
let form = reactive({ ...formDefault });
const rules = {
version: [{ required: true, message: '版本 必填' }],
updateVersion: [{ required: true, message: '版本 必填' }],
type: [{ required: true, message: '更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 必填' }],
publishAuthor: [{ required: true, message: '发布人 必填' }],
publicDate: [{ required: true, message: '发布日期 必填' }],

View File

@ -75,7 +75,7 @@
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
>
<template #bodyCell="{ text, record, column }">
<template v-if="column.dataIndex === 'version'">
<template v-if="column.dataIndex === 'updateVersion'">
<a-button @click="showModal(record)" type="link">{{ text }}</a-button>
</template>
<template v-if="column.dataIndex === 'type'">
@ -135,7 +135,7 @@
const columns = ref([
{
title: '版本',
dataIndex: 'version',
dataIndex: 'updateVersion',
ellipsis: true,
},
{

View File

@ -176,9 +176,9 @@
columnName: column.columnName,
columnComment: column.columnComment,
dataType: column.dataType,
nullableFlag: column.isNullable === 'NO',
primaryKeyFlag: column.columnKey === 'PRI',
autoIncreaseFlag: column.extra === 'auto_increment',
nullableFlag: column.nullableFlag,
primaryKeyFlag: column.primaryKeyFlag,
autoIncreaseFlag: column.autoIncreaseFlag,
//
fieldName: configField ? configField.fieldName : convertLowerCamel(column.columnName),
label: configField ? configField.label : column.columnComment,

View File

@ -216,9 +216,9 @@
columnName: column.columnName,
columnComment: column.columnComment,
dataType: column.dataType,
nullableFlag: column.isNullable === 'NO',
primaryKeyFlag: column.columnKey === 'PRI',
autoIncreaseFlag: column.extra === 'auto_increment',
nullableFlag: column.nullableFlag,
primaryKeyFlag: column.primaryKeyFlag,
autoIncreaseFlag: column.autoIncreaseFlag,
};
//

Some files were not shown because too many files have changed in this diff Show More