mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
优化
This commit is contained in:
@@ -11,7 +11,6 @@ import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -37,14 +36,7 @@ public class CreateCoalBlendDto extends OrgCommonDto {
|
||||
@Comment("煤类型")
|
||||
private String coalType;
|
||||
|
||||
@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 = 'coalBlend.coalType'\n"
|
||||
+ " and i.code = coal_type)")
|
||||
private String coalTypeName;
|
||||
|
||||
|
||||
@Comment("结果个数")
|
||||
private Integer count = 20;
|
||||
|
||||
@@ -11,7 +11,6 @@ import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -37,14 +36,6 @@ public class UpdateCoalBlendDto extends OrgCommonDto {
|
||||
@Comment("煤类型")
|
||||
private String coalType;
|
||||
|
||||
@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 = 'coalBlend.coalType'\n"
|
||||
+ " and i.code = coal_type)")
|
||||
private String coalTypeName;
|
||||
@Comment("结果个数")
|
||||
private Integer count = 20;
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ import cn.lihongjie.coal.base.dto.CommonDto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@@ -21,7 +19,6 @@ public class CreateCronJobLogDto extends CommonDto {
|
||||
private LocalDateTime startTime;
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Formula("(EXTRACT(EPOCH FROM (endTime - startTime)) * 1000)")
|
||||
private long time;
|
||||
|
||||
private String logs;
|
||||
|
||||
@@ -4,8 +4,6 @@ import cn.lihongjie.coal.base.dto.CommonDto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@@ -21,7 +19,6 @@ public class UpdateCronJobLogDto extends CommonDto {
|
||||
private LocalDateTime startTime;
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Formula("(EXTRACT(EPOCH FROM (endTime - startTime)) * 1000)")
|
||||
private long time;
|
||||
|
||||
private String logs;
|
||||
|
||||
@@ -5,7 +5,6 @@ import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
|
||||
@@ -24,28 +23,12 @@ public class CreateEmpSalaryItemDto extends OrgCommonDto {
|
||||
@Comment("工资项目类型")
|
||||
private String itemType;
|
||||
|
||||
@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 = 'salaryItem.type'\n"
|
||||
+ " and i.code = item_type)")
|
||||
// @Comment("工资项目类型-名称")
|
||||
private String itemTypeName;
|
||||
|
||||
|
||||
@Comment("工资项目录入方式")
|
||||
private String inputType;
|
||||
|
||||
@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 = 'salaryItem.inputType'\n"
|
||||
+ " and i.code = input_type)")
|
||||
// @Comment("工资项目录入方式-名称")
|
||||
private String inputTypeName;
|
||||
|
||||
|
||||
@Comment("公式-显示")
|
||||
private String formulaShow;
|
||||
|
||||
@@ -33,15 +33,7 @@ public class UpdateEmpSalaryItemDto extends OrgCommonDto {
|
||||
@Comment("工资项目类型")
|
||||
private String itemType;
|
||||
|
||||
@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 = 'salaryItem.type'\n"
|
||||
+ " and i.code = item_type)")
|
||||
// @Comment("工资项目类型-名称")
|
||||
private String itemTypeName;
|
||||
|
||||
|
||||
@Comment("工资项目录入方式")
|
||||
private String inputType;
|
||||
|
||||
@@ -6,21 +6,13 @@ import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
public class CreateEmpSalaryItemConfigDto extends OrgCommonDto {
|
||||
@Comment("类别")
|
||||
private String itemType;
|
||||
|
||||
@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 = 'emp.salary.item.config.type'\n"
|
||||
+ " and i.code = item_type)")
|
||||
private String itemTypeName;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
public class UpdateEmpSalaryItemConfigDto extends OrgCommonDto {
|
||||
@@ -14,14 +13,7 @@ public class UpdateEmpSalaryItemConfigDto extends OrgCommonDto {
|
||||
@Comment("类别")
|
||||
private String itemType;
|
||||
|
||||
@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 = 'emp.salary.item.config.type'\n"
|
||||
+ " and i.code = item_type)")
|
||||
private String itemTypeName;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import jakarta.persistence.ElementCollection;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
@@ -129,12 +128,5 @@ public class CreateEmployeeDto extends OrgCommonDto {
|
||||
@Comment("员工状态")
|
||||
private String empStatus;
|
||||
|
||||
@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 = 'emp.status'\n"
|
||||
+ " and i.code = emp_status)")
|
||||
private String empStatusName;
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import jakarta.persistence.ManyToOne;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
@@ -133,13 +132,6 @@ public class UpdateEmployeeDto extends OrgCommonDto {
|
||||
@Comment("员工状态")
|
||||
private String empStatus;
|
||||
|
||||
@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 = 'emp.status'\n"
|
||||
+ " and i.code = emp_status)")
|
||||
private String empStatusName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import jakarta.persistence.ManyToOne;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
public class UpdateEmployeeRecordDto extends OrgCommonDto {
|
||||
@@ -21,14 +20,6 @@ public class UpdateEmployeeRecordDto extends OrgCommonDto {
|
||||
@Comment("记录类型")
|
||||
private String recordType;
|
||||
|
||||
@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 = 'emp.record.type'\n"
|
||||
+ " and i.code = record_type)")
|
||||
private String recordTypeName;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,14 +23,7 @@ public class CreateLoginUserHisDto extends CommonDto {
|
||||
private String status;
|
||||
|
||||
|
||||
@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 = 'loginUserHis.status'\n"
|
||||
+ " and i.code = status)")
|
||||
private String statusName;
|
||||
|
||||
|
||||
@Comment("session id")
|
||||
private String sessionId;
|
||||
|
||||
@@ -22,14 +22,7 @@ public class UpdateLoginUserHisDto extends CommonDto {
|
||||
private String status;
|
||||
|
||||
|
||||
@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 = 'loginUserHis.status'\n"
|
||||
+ " and i.code = status)")
|
||||
private String statusName;
|
||||
|
||||
|
||||
@Comment("session id")
|
||||
private String sessionId;
|
||||
|
||||
@@ -5,7 +5,6 @@ import cn.lihongjie.coal.base.dto.CommonDto;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
public class CreateNoteBookChapterDto extends CommonDto {
|
||||
@@ -16,14 +15,6 @@ public class CreateNoteBookChapterDto extends CommonDto {
|
||||
@Comment("内容类型 0 html 1 markdown")
|
||||
private String contentType;
|
||||
|
||||
@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 = 'notebook.contentType'\n"
|
||||
+ " and i.code = content_type)")
|
||||
private String contentTypeName;
|
||||
|
||||
@Comment("内容")
|
||||
private String content;
|
||||
|
||||
@@ -5,7 +5,6 @@ import cn.lihongjie.coal.base.dto.CommonDto;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
public class UpdateNoteBookChapterDto extends CommonDto {
|
||||
@@ -16,14 +15,6 @@ public class UpdateNoteBookChapterDto extends CommonDto {
|
||||
@Comment("内容类型 0 html 1 markdown")
|
||||
private String contentType;
|
||||
|
||||
@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 = 'notebook.contentType'\n"
|
||||
+ " and i.code = content_type)")
|
||||
private String contentTypeName;
|
||||
|
||||
@Comment("内容")
|
||||
private String content;
|
||||
|
||||
@@ -7,7 +7,6 @@ import jakarta.persistence.ManyToOne;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@@ -35,10 +34,8 @@ public class CreatePurchaseOrderDto extends OrgCommonDto {
|
||||
private LocalDate estimateDeliveryDate;
|
||||
|
||||
|
||||
@Formula("(select min(d.delivery_date) from t_delivery_information d where d.purchase_order_id = id)")
|
||||
private LocalDate firstDeliveryDate;
|
||||
|
||||
@Formula("(select max(d.delivery_date) from t_delivery_information d where d.purchase_order_id = id)")
|
||||
private LocalDate lastDeliveryDate;
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
public class CreateThirdAccountDto extends OrgCommonDto {
|
||||
@@ -13,14 +12,6 @@ public class CreateThirdAccountDto extends OrgCommonDto {
|
||||
@Comment("账号类型")
|
||||
private String accountType;
|
||||
|
||||
@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 = 'thirdAccount.type'\n"
|
||||
+ " and i.code = account_type)")
|
||||
private String accountTypeName;
|
||||
|
||||
@Comment("用户名")
|
||||
private String username;
|
||||
|
||||
@@ -5,21 +5,13 @@ import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
public class UpdateThirdAccountDto extends OrgCommonDto {
|
||||
@Comment("账号类型")
|
||||
private String accountType;
|
||||
|
||||
@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 = 'thirdAccount.type'\n"
|
||||
+ " and i.code = account_type)")
|
||||
private String accountTypeName;
|
||||
|
||||
|
||||
@Comment("用户名")
|
||||
private String username;
|
||||
|
||||
Reference in New Issue
Block a user