变更项目缩写

This commit is contained in:
wkc
2026-01-30 14:15:21 +08:00
parent e99b05acc2
commit 29a2e60ee1
107 changed files with 1134 additions and 990 deletions

View File

@@ -51,7 +51,7 @@ import com.ruoyi.common.annotation.DictDropdown;
import lombok.Data;
@Data
public class DpcEmployeeExcel {
public class CcdiEmployeeExcel {
@ExcelProperty(value = "姓名", index = 0)
@ColumnWidth(15)
@@ -64,7 +64,7 @@ public class DpcEmployeeExcel {
// 添加字典下拉框注解
@ExcelProperty(value = "状态", index = 6)
@ColumnWidth(10)
@DictDropdown(dictType = "dpc_employee_status")
@DictDropdown(dictType = "ccdi_employee_status")
private String status;
}
```
@@ -73,8 +73,8 @@ public class DpcEmployeeExcel {
```java
@RestController
@RequestMapping("/dpc/employee")
public class DpcEmployeeController {
@RequestMapping("/ccdi/employee")
public class CcdiEmployeeController {
/**
* 下载带字典下拉框的导入模板
@@ -83,7 +83,7 @@ public class DpcEmployeeController {
public void importTemplateWithDropdown(HttpServletResponse response) {
EasyExcelUtil.importTemplateWithDictDropdown(
response,
DpcEmployeeExcel.class,
CcdiEmployeeExcel.class,
"员工信息"
);
}
@@ -93,11 +93,11 @@ public class DpcEmployeeController {
*/
@PostMapping("/exportWithDropdown")
public void exportWithDropdown(HttpServletResponse response) {
List<DpcEmployeeExcel> list = employeeService.selectEmployeeList();
List<CcdiEmployeeExcel> list = employeeService.selectEmployeeList();
EasyExcelUtil.exportExcelWithDictDropdown(
response,
list,
DpcEmployeeExcel.class,
CcdiEmployeeExcel.class,
"员工信息"
);
}
@@ -109,21 +109,21 @@ public class DpcEmployeeController {
### 1. 显示字典键值而非标签
```java
@DictDropdown(dictType = "dpc_employee_status", displayType = DisplayType.VALUE)
@DictDropdown(dictType = "ccdi_employee_status", displayType = DisplayType.VALUE)
private String status;
```
### 2. 允许手动输入(非严格模式)
```java
@DictDropdown(dictType = "dpc_employee_status", strict = false)
@DictDropdown(dictType = "ccdi_employee_status", strict = false)
private String status;
```
### 3. 自定义隐藏Sheet名称
```java
@DictDropdown(dictType = "dpc_employee_status", hiddenSheetName = "employee_status_dict")
@DictDropdown(dictType = "ccdi_employee_status", hiddenSheetName = "employee_status_dict")
private String status;
```
@@ -150,7 +150,7 @@ private String status;
1. 启动项目后访问Swagger UI`http://localhost:8080/swagger-ui/index.html`
2. 找到员工信息管理相关接口:
- `POST /dpc/employee/importTemplateWithDropdown` - 下载带字典下拉框的模板
- `POST /ccdi/employee/importTemplateWithDropdown` - 下载带字典下拉框的模板
3. 调用接口下载模板检查Excel中的下拉框是否正常