mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
优化
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package cn.lihongjie.coal.emDeviceSupplier.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 EmDeviceSupplierDto extends OrgCommonDto {
|
||||
private String address;
|
||||
private String archiveStatus;
|
||||
|
||||
@DictTranslate(dictKey = DictCode.ARCHIVESTATUS)
|
||||
private String archiveStatusName;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
@@ -22,12 +21,5 @@ public class EmDeviceSupplierEntity 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;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package cn.lihongjie.coal.empSalary.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.empSalaryBatch.dto.EmpSalaryBatchDto;
|
||||
import cn.lihongjie.coal.employee.dto.EmployeeDto;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
@@ -16,6 +18,7 @@ import java.math.BigDecimal;
|
||||
public class EmpSalaryDto extends OrgCommonDto {
|
||||
private String archiveStatus;
|
||||
|
||||
@DictTranslate(dictKey = DictCode.ARCHIVESTATUS)
|
||||
private String archiveStatusName;
|
||||
|
||||
@ManyToOne
|
||||
|
||||
@@ -11,7 +11,6 @@ import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -92,12 +91,4 @@ public class EmpSalaryEntity 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;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@@ -26,12 +25,5 @@ public class EmpSalaryBatchEntity 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;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package cn.lihongjie.coal.empSalaryItem.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -26,27 +27,14 @@ public class EmpSalaryItemDto 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("工资项目类型-名称")
|
||||
@DictTranslate(dictKey = DictCode.SALARYITEM_TYPE)
|
||||
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("工资项目录入方式-名称")
|
||||
|
||||
@DictTranslate(dictKey = DictCode.SALARYITEM_INPUTTYPE)
|
||||
private String inputTypeName;
|
||||
|
||||
@Comment("公式-显示")
|
||||
|
||||
@@ -7,7 +7,6 @@ import jakarta.persistence.Entity;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -27,28 +26,12 @@ public class EmpSalaryItemEntity extends OrgCommonEntity {
|
||||
@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;
|
||||
|
||||
@@ -2,11 +2,12 @@ package cn.lihongjie.coal.empSalaryItemConfig.dto;
|
||||
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
public class EmpSalaryItemConfigDto extends OrgCommonDto {
|
||||
@@ -14,17 +15,9 @@ public class EmpSalaryItemConfigDto 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)")
|
||||
@DictTranslate(dictKey = DictCode.EMP_SALARY_ITEM_CONFIG_TYPE)
|
||||
private String itemTypeName;
|
||||
|
||||
|
||||
|
||||
@Comment("表达式")
|
||||
private String expression;
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import jakarta.persistence.Entity;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
@@ -17,14 +16,7 @@ public class EmpSalaryItemConfigEntity extends OrgCommonEntity {
|
||||
@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;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package cn.lihongjie.coal.employee.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.department.dto.DepartmentDto;
|
||||
import cn.lihongjie.coal.employee.entity.EmpCarVO;
|
||||
import cn.lihongjie.coal.employee.entity.EmpCertVO;
|
||||
import cn.lihongjie.coal.employee.entity.EmpFamilyMemberVO;
|
||||
import cn.lihongjie.coal.file.entity.FileEntity;
|
||||
import cn.lihongjie.coal.jobPost.dto.JobPostDto;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import jakarta.persistence.ElementCollection;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
@@ -15,7 +17,6 @@ import jakarta.persistence.OneToMany;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
@@ -26,18 +27,21 @@ public class EmployeeDto extends OrgCommonDto {
|
||||
private String sex;
|
||||
|
||||
@Comment("性别-名称")
|
||||
@DictTranslate(dictKey = DictCode.SEX)
|
||||
private String sexName;
|
||||
|
||||
@Comment("民族")
|
||||
private String nation;
|
||||
|
||||
@Comment("民族-名称")
|
||||
@DictTranslate(dictKey = DictCode.NATION)
|
||||
private String nationName;
|
||||
|
||||
@Comment("婚姻状况")
|
||||
private String marriage;
|
||||
|
||||
@Comment("婚姻状况-名称")
|
||||
@DictTranslate(dictKey = DictCode.MARRIAGE)
|
||||
private String marriageName;
|
||||
|
||||
@Comment("入职时间")
|
||||
@@ -50,6 +54,7 @@ public class EmployeeDto extends OrgCommonDto {
|
||||
private String education;
|
||||
|
||||
@Comment("学历-名称")
|
||||
@DictTranslate(dictKey = DictCode.EDUCATION)
|
||||
private String educationName;
|
||||
|
||||
@Comment("毕业学校")
|
||||
@@ -86,6 +91,7 @@ public class EmployeeDto extends OrgCommonDto {
|
||||
@Comment("银行编码")
|
||||
private String bank;
|
||||
|
||||
@DictTranslate(dictKey = DictCode.BANK)
|
||||
private String bankName;
|
||||
|
||||
@Comment("银行卡号")
|
||||
@@ -105,13 +111,7 @@ public class EmployeeDto 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)")
|
||||
@DictTranslate(dictKey = DictCode.EMP_STATUS)
|
||||
private String empStatusName;
|
||||
|
||||
@Comment("家庭成员")
|
||||
|
||||
@@ -10,7 +10,6 @@ import jakarta.persistence.*;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
@@ -22,38 +21,16 @@ public class EmployeeEntity extends OrgCommonEntity {
|
||||
@Comment("性别")
|
||||
private String sex;
|
||||
|
||||
@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 = 'sex'\n"
|
||||
+ " and i.code = sex)")
|
||||
private String sexName;
|
||||
|
||||
|
||||
@Comment("民族")
|
||||
private String nation;
|
||||
|
||||
@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 = 'nation'\n"
|
||||
+ " and i.code = nation)")
|
||||
private String nationName;
|
||||
|
||||
@Comment("婚姻状况")
|
||||
private String marriage;
|
||||
|
||||
@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 = 'marriage'\n"
|
||||
+ " and i.code = marriage)")
|
||||
private String marriageName;
|
||||
|
||||
|
||||
@Comment("入职时间")
|
||||
private LocalDate entryDate;
|
||||
@@ -72,14 +49,7 @@ public class EmployeeEntity extends OrgCommonEntity {
|
||||
@Comment("学历")
|
||||
private String education;
|
||||
|
||||
@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 = 'education'\n"
|
||||
+ " and i.code = education)")
|
||||
private String educationName;
|
||||
|
||||
|
||||
@Comment("毕业学校")
|
||||
private String school;
|
||||
@@ -115,14 +85,7 @@ public class EmployeeEntity extends OrgCommonEntity {
|
||||
@Comment("银行编码")
|
||||
private String bank;
|
||||
|
||||
@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 = 'bank'\n"
|
||||
+ " and i.code = bank)")
|
||||
private String bankName;
|
||||
|
||||
|
||||
@Comment("银行卡号")
|
||||
private String bankCardNumber;
|
||||
@@ -133,14 +96,7 @@ public class EmployeeEntity extends OrgCommonEntity {
|
||||
@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;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package cn.lihongjie.coal.employeeRecord.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.employee.dto.EmployeeDto;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
public class EmployeeRecordDto extends OrgCommonDto {
|
||||
@@ -20,17 +21,9 @@ public class EmployeeRecordDto 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)")
|
||||
@DictTranslate(dictKey = DictCode.EMP_RECORD_TYPE)
|
||||
private String recordTypeName;
|
||||
|
||||
|
||||
|
||||
@Comment("记录内容")
|
||||
private String recordContent;
|
||||
|
||||
@@ -42,5 +35,6 @@ public class EmployeeRecordDto extends OrgCommonDto {
|
||||
private Double money;
|
||||
private String archiveStatus;
|
||||
|
||||
@DictTranslate(dictKey = DictCode.ARCHIVESTATUS)
|
||||
private String archiveStatusName;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
@@ -27,14 +26,7 @@ public class EmployeeRecordEntity extends OrgCommonEntity {
|
||||
@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;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -54,14 +46,7 @@ public class EmployeeRecordEntity 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;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package cn.lihongjie.coal.inventoryCheck.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -17,14 +18,9 @@ public class InventoryCheckDto extends OrgCommonDto {
|
||||
@Comment("盘点类型")
|
||||
private String checkType;
|
||||
|
||||
@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 = 'inventoryCheck.type'\n"
|
||||
+ " and i.code = check_type)")
|
||||
|
||||
@Comment("盘点类型-名称")
|
||||
@DictTranslate(dictKey = DictCode.INVENTORYCHECK_TYPE)
|
||||
private String checkTypeName;
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,14 +20,7 @@ public class InventoryCheckEntity extends OrgCommonEntity {
|
||||
@Comment("盘点类型")
|
||||
private String checkType;
|
||||
|
||||
@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 = 'inventoryCheck.type'\n"
|
||||
+ " and i.code = check_type)")
|
||||
private String checkTypeName;
|
||||
|
||||
|
||||
/** 精煤 合计 */
|
||||
@Formula(
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package cn.lihongjie.coal.notice.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.CommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
public class NoticeDto extends CommonDto {
|
||||
@@ -16,13 +17,7 @@ public class NoticeDto 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)")
|
||||
@DictTranslate(dictKey = DictCode.NOTEBOOK_CONTENTTYPE)
|
||||
private String contentTypeName;
|
||||
|
||||
@Comment("内容")
|
||||
|
||||
@@ -8,7 +8,6 @@ import jakarta.persistence.*;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -22,14 +21,6 @@ public class NoticeEntity extends CommonEntity {
|
||||
@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;
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
package cn.lihongjie.coal.pdfGenerator.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@@ -25,4 +29,9 @@ public class PdfGeneratorDto extends OrgCommonDto {
|
||||
|
||||
private String options;
|
||||
|
||||
@Comment("生成状态")
|
||||
private String execStatus;
|
||||
|
||||
@DictTranslate(dictKey = DictCode.COMMON_EXECSTATUS)
|
||||
private String execStatusName;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import jakarta.persistence.Entity;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -35,12 +34,5 @@ public class PdfGeneratorEntity extends OrgCommonEntity {
|
||||
@Comment("生成状态")
|
||||
private String execStatus;
|
||||
|
||||
@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 = 'common.execStatus'\n"
|
||||
+ " and i.code = exec_status)")
|
||||
private String execStatusName;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,23 +1,18 @@
|
||||
package cn.lihongjie.coal.product.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
public class ProductDto 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 = 'coal.type'\n"
|
||||
+ " and i.code = coal_type)")
|
||||
@DictTranslate(dictKey = DictCode.COAL_TYPE)
|
||||
private String coalTypeName;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import jakarta.persistence.Entity;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
@@ -17,13 +16,6 @@ public class ProductEntity extends OrgCommonEntity {
|
||||
@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 = 'coal.type'\n"
|
||||
+ " and i.code = coal_type)")
|
||||
private String coalTypeName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,14 +2,15 @@ package cn.lihongjie.coal.purchaseOrder.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.coalInfo.dto.CoalInfoDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.deliveryInformation.dto.DeliveryInformationDto;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
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;
|
||||
@@ -25,10 +26,8 @@ public class PurchaseOrderDto 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;
|
||||
|
||||
|
||||
@@ -56,34 +55,24 @@ public class PurchaseOrderDto extends OrgCommonDto {
|
||||
private Double amount;
|
||||
|
||||
|
||||
@Formula("(select sum(d.amount) from t_delivery_information d where d.purchase_order_id = id)")
|
||||
private Double receivedAmount;
|
||||
|
||||
|
||||
@Formula("(select sum(d.car_count) from t_delivery_information d where d.purchase_order_id = id)")
|
||||
private Double totalCarCount;
|
||||
|
||||
|
||||
@Formula("(amount - (select sum(d.amount) from t_delivery_information d where d.purchase_order_id = id))")
|
||||
private Double leftAmount;
|
||||
|
||||
|
||||
@Comment("采购单价")
|
||||
private Double price;
|
||||
|
||||
@Formula("(amount * price)")
|
||||
private Double total;
|
||||
|
||||
@Comment("采购单状态")
|
||||
private String orderStatus;
|
||||
|
||||
@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 = 'purchaseOrder.status'\n"
|
||||
+ " and i.code = order_status)")
|
||||
@DictTranslate(dictKey = DictCode.PURCHASEORDER_STATUS)
|
||||
private String orderStatusName;
|
||||
|
||||
}
|
||||
|
||||
@@ -75,14 +75,7 @@ public class PurchaseOrderEntity extends OrgCommonEntity {
|
||||
@Comment("采购单状态")
|
||||
private String orderStatus;
|
||||
|
||||
@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 = 'purchaseOrder.status'\n"
|
||||
+ " and i.code = order_status)")
|
||||
private String orderStatusName;
|
||||
|
||||
|
||||
@Override
|
||||
public void prePersist() {
|
||||
|
||||
Reference in New Issue
Block a user