From 17c81b57ec33fc692ed1499cda86bb01f1fe65a0 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 17 Nov 2023 16:52:27 +0800
Subject: [PATCH] 房屋数据导出字典翻译修改

---
 src/main/java/org/springblade/modules/house/excel/HouseHoldExcel.java |   97 +++++++++++++++++-------------------------------
 1 files changed, 35 insertions(+), 62 deletions(-)

diff --git a/src/main/java/org/springblade/modules/house/excel/HouseHoldExcel.java b/src/main/java/org/springblade/modules/house/excel/HouseHoldExcel.java
index 99d6ac1..74bfac9 100644
--- a/src/main/java/org/springblade/modules/house/excel/HouseHoldExcel.java
+++ b/src/main/java/org/springblade/modules/house/excel/HouseHoldExcel.java
@@ -1,12 +1,14 @@
 package org.springblade.modules.house.excel;
 
-import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
+import org.springblade.common.excel.ExcelDictConverter;
+import org.springblade.common.excel.ExcelDictItem;
+import org.springblade.common.excel.ExcelDictItemLabel;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -24,17 +26,6 @@
 
 	private static final long serialVersionUID = 2L;
 
-
-	/** 主键id */
-	@ColumnWidth(15)
-	@ExcelProperty( "主键ID")
-	private Long id;
-
-	/** 门牌地址编码 */
-	@ColumnWidth(15)
-	@ExcelProperty( "门牌地址编码")
-	private String houseCode;
-
 	/** 姓名 */
 	@ColumnWidth(15)
 	@ExcelProperty( "姓名")
@@ -45,40 +36,40 @@
 	@ExcelProperty( "手机号")
 	private String phoneNumber;
 
-	/** 绑定用户ID */
+	/** 小区名称 */
 	@ColumnWidth(15)
-	@ExcelProperty( "绑定用户ID")
-	private Long associatedUserId;
+	@ExcelProperty( "小区名称")
+	private String aoiName;
 
 	/** 角色  */
 	@ColumnWidth(15)
-	@ExcelProperty( "角色 ")
-	private Integer roleType;
-
-	/** 绑定用户名称 */
-	@ColumnWidth(15)
-	@ExcelProperty( "绑定用户名称")
-	private String associatedUserName;
+	@ExcelProperty( value = "角色",converter = ExcelDictConverter.class)
+	@ExcelDictItem(type = "roleType")
+	private String roleType;
 
 	/** 与角色关系(业主,父子,其他) */
 	@ColumnWidth(15)
-	@ExcelProperty( "与角色关系(业主,父子,其他)")
-	private Integer relationship;
+	@ExcelProperty( value = "与角色关系",converter = ExcelDictConverter.class)
+	@ExcelDictItem(type = "roleRelation")
+	private String relationship;
 
 	/** 是否主要联系人 1:是  0:否 */
 	@ColumnWidth(15)
-	@ExcelProperty( "是否主要联系人 1:是  0:否")
-	private Integer isPrimaryContact;
+	@ExcelProperty( value = "是否主要联系人",converter = ExcelDictConverter.class)
+	@ExcelDictItem(type = "primaryContactType")
+	private String isPrimaryContact;
 
 	/** 居住状态 1: 是  0:否 */
 	@ColumnWidth(15)
-	@ExcelProperty( "居住状态 1: 是  0:否")
-	private Integer residentialStatus;
+	@ExcelProperty( value = "居住状态",converter = ExcelDictConverter.class)
+	@ExcelDictItem(type = "residentialStatusType")
+	private String residentialStatus;
 
 	/** 性别 1: 男 0:女  2: 未知 */
 	@ColumnWidth(15)
-	@ExcelProperty( "性别 1: 男 0:女  2: 未知")
-	private Short gender;
+	@ExcelProperty( value = "性别",converter = ExcelDictConverter.class)
+	@ExcelDictItem(type = "sex")
+	private String gender;
 
 	/** 生日 */
 	@ColumnWidth(15)
@@ -103,13 +94,15 @@
 
 	/** 民族 */
 	@ColumnWidth(15)
-	@ExcelProperty( "民族")
-	private Integer ethnicity;
+	@ExcelProperty( value = "民族",converter = ExcelDictConverter.class)
+	@ExcelDictItem(type = "nationType")
+	private String ethnicity;
 
 	/** 学历 */
 	@ColumnWidth(15)
-	@ExcelProperty( "学历")
-	private Integer education;
+	@ExcelProperty( value = "学历",converter = ExcelDictConverter.class)
+	@ExcelDictItem(type = "educationType")
+	private String education;
 
 	/** 户籍登记地 */
 	@ColumnWidth(15)
@@ -118,8 +111,9 @@
 
 	/** 工作状态 */
 	@ColumnWidth(15)
-	@ExcelProperty( "工作状态")
-	private Integer workStatus;
+	@ExcelProperty( value = "工作状态",converter = ExcelDictConverter.class)
+	@ExcelDictItem(type = "workStatusType")
+	private String workStatus;
 
 	/** 工作单位 */
 	@ColumnWidth(15)
@@ -128,8 +122,9 @@
 
 	/** 婚姻状态 */
 	@ColumnWidth(15)
-	@ExcelProperty( "婚姻状态")
-	private Integer maritalStatus;
+	@ExcelProperty( value = "婚姻状态",converter = ExcelDictConverter.class)
+	@ExcelDictItem(type = "marriageStatusType")
+	private String maritalStatus;
 
 	/** 车牌号 */
 	@ColumnWidth(15)
@@ -153,31 +148,9 @@
 
 	/** 是否党员  1:党员  2:群众 */
 	@ColumnWidth(15)
-	@ExcelProperty( "是否党员  1:党员  2:群众")
+	@ExcelProperty( value = "是否党员",converter = ExcelDictConverter.class)
+	@ExcelDictItem(type = "partyEmberType")
 	private Integer partyEmber;
-
-	/** 创建人 */
-	@ColumnWidth(15)
-	@ExcelProperty( "创建人")
-	private Long createUser;
-
-	/** 创建时间 */
-	@ColumnWidth(15)
-	@ExcelProperty( "创建时间")
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-	private Date createTime;
-
-	/** 更新人 */
-	@ColumnWidth(15)
-	@ExcelIgnore
-	@ExcelProperty( "更新人")
-	private Long updateUser;
-
-	/** 更新时间 */
-	@ExcelProperty( "更新时间")
-	@ColumnWidth(15)
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-	private Date updateTime;
 
 	/** 备注 */
 	@ColumnWidth(15)

--
Gitblit v1.9.3