This commit is contained in:
2024-04-18 16:00:31 +08:00
parent 4daa801281
commit 3b5ab94ea1
10 changed files with 11 additions and 37 deletions

View File

@@ -1,6 +1,8 @@
package cn.lihongjie.coal.acDeviceSupplier.dto;
import cn.lihongjie.coal.base.dto.OrgCommonDto;
import cn.lihongjie.coal.common.DictCode;
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
import lombok.Data;
@@ -14,5 +16,6 @@ public class AcDeviceSupplierDto extends OrgCommonDto {
private String address;
private String archiveStatus;
@DictTranslate(dictKey = DictCode.ARCHIVESTATUS)
private String archiveStatusName;
}

View File

@@ -8,7 +8,6 @@ import lombok.Data;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;
@Data
@Entity
@@ -23,12 +22,4 @@ public class AcDeviceSupplierEntity extends OrgCommonEntity {
@ColumnDefault("'0'")
private String archiveStatus = "0";
@Formula(
"(select i.name\n"
+ "from t_dictionary d,\n"
+ " t_dictionary_item i\n"
+ "where d.id = i.dictionary_id\n"
+ " and d.code = 'archiveStatus'\n"
+ " and i.code = archive_status)")
private String archiveStatusName;
}

View File

@@ -29,8 +29,6 @@ public class BaseEntity {
@Column(updatable = false)
private String createUserId;
// @Formula("(select tu.name from t_user tu where tu.id = create_user_id)")
// private String createUserName;
@Comment("创建时间")
@CreationTimestamp(source = SourceType.VM)
@@ -40,8 +38,6 @@ public class BaseEntity {
@Comment("更新用户ID")
private String updateUserId;
// @Formula("((select tu.name from t_user tu where tu.id = create_user_id))")
// private String updateUserName;
@Comment("更新时间")
@UpdateTimestamp(source = SourceType.VM)

View File

@@ -23,8 +23,6 @@ public class EmpSalaryItemEntity extends OrgCommonEntity {
@Comment("上级名称")
private String parentName;
// @Formula("(CONCAT(parentName,'-' ,name))")
// private String fullName;
@Comment("工资项目类型")
private String itemType;

View File

@@ -41,7 +41,6 @@ public class NetDiskEntity extends OrgCommonEntity {
private Long size;
// @Formula("(pg_size_pretty(size))")
@Transient private String sizeHumanReadable;
public void setSize(Long size) {

View File

@@ -1,6 +1,8 @@
package cn.lihongjie.coal.permission.dto;
import cn.lihongjie.coal.base.dto.OrgCommonDto;
import cn.lihongjie.coal.common.DictCode;
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
import lombok.Data;
@@ -16,6 +18,7 @@ public class PermissionDto extends OrgCommonDto {
private String permissionType;
@DictTranslate(dictKey = DictCode.PERMISSION_TYPE)
private String permissionTypeName;
@Data

View File

@@ -12,7 +12,6 @@ import lombok.Data;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;
import java.util.List;
@@ -25,15 +24,7 @@ public class PermissionEntity extends CommonEntity {
@Comment("权限类型")
private String permissionType;
@Formula(
"(select i.name\n"
+ "from t_dictionary d,\n"
+ " t_dictionary_item i\n"
+ "where d.id = i.dictionary_id\n"
+ " and d.code = 'permission.type'\n"
+ " and i.code = permission_type)")
// @Comment("权限类型-名称")
private String permissionTypeName;
@ManyToMany()
@JoinTable(

View File

@@ -1,6 +1,7 @@
package cn.lihongjie.coal.user.dto;
import cn.lihongjie.coal.base.dto.OrgCommonDto;
import cn.lihongjie.coal.pojoProcessor.OrganizationName;
import lombok.Data;
@@ -28,6 +29,7 @@ public class UserDto extends OrgCommonDto {
@Comment("系统管理员标识")
private Boolean sysAdmin;
@OrganizationName
private String organizationName;
private List<RoleDto> roles;

View File

@@ -9,7 +9,6 @@ import lombok.Data;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;
import java.util.ArrayList;
import java.util.List;
@@ -52,8 +51,7 @@ public class UserEntity extends OrgCommonEntity {
@Comment("系统管理员标识")
private Boolean sysAdmin;
@Formula("(select tu.name from t_organization tu where tu.id = organization_id)")
private String organizationName;
public List<RoleEntity> allRoles() {

View File

@@ -459,12 +459,5 @@ public class WeightDeviceDataEntity extends OrgCommonEntity {
@ColumnDefault("'0'")
private String archiveStatus = "0";
// @Formula(
// "(select i.name\n"
// + "from t_dictionary d,\n"
// + " t_dictionary_item i\n"
// + "where d.id = i.dictionary_id\n"
// + " and d.code = 'archiveStatus'\n"
// + " and i.code = archive_status)")
// private String archiveStatusName;
}