Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
cceba6d2
Commit
cceba6d2
authored
Jun 22, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员档案-批量导入
parent
f3237aa3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1216 additions
and
32 deletions
+1216
-32
TEmployeeInfo.java
...ifu/cloud/plus/v1/yifu/archives/entity/TEmployeeInfo.java
+18
-0
EmployeeVO.java
...a/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeVO.java
+206
-0
TEmployeeInfoController.java
.../v1/yifu/archives/controller/TEmployeeInfoController.java
+22
-0
TEmployeeInfoMapper.java
...oud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
+6
-0
TEmployeeInfoService.java
...d/plus/v1/yifu/archives/service/TEmployeeInfoService.java
+12
-1
TEmployeeProjectService.java
...lus/v1/yifu/archives/service/TEmployeeProjectService.java
+10
-0
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+466
-31
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+9
-0
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+24
-0
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+4
-0
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+31
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+14
-0
SysArea.java
...com/yifu.cloud.plus.v1/yifu/admin/api/entity/SysArea.java
+36
-0
AreaController.java
...u.cloud.plus.v1/yifu/admin/controller/AreaController.java
+71
-0
DictController.java
...u.cloud.plus.v1/yifu/admin/controller/DictController.java
+25
-0
SysAreaMapper.java
...m/yifu.cloud.plus.v1/yifu/admin/mapper/SysAreaMapper.java
+34
-0
SysAreaService.java
...yifu.cloud.plus.v1/yifu/admin/service/SysAreaService.java
+49
-0
SysDictItemService.java
....cloud.plus.v1/yifu/admin/service/SysDictItemService.java
+16
-0
SysAreaServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysAreaServiceImpl.java
+79
-0
SysDictItemServiceImpl.java
...us.v1/yifu/admin/service/impl/SysDictItemServiceImpl.java
+47
-0
SysAreaMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysAreaMapper.xml
+37
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeInfo.java
View file @
cceba6d2
...
...
@@ -17,6 +17,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
...
...
@@ -342,5 +343,22 @@ public class TEmployeeInfo extends BaseEntity {
@Schema
(
description
=
"通信地址"
)
private
String
contactAddress
;
// 以下是项目档案信息
@TableField
(
exist
=
false
)
@Schema
(
description
=
"项目id"
)
private
String
deptId
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"项目名称"
)
private
String
deptName
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"项目编码"
)
private
String
deptNo
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"就职岗位"
)
private
String
post
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeVO.java
0 → 100644
View file @
cceba6d2
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
lombok.Data
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* 项目档案表excel对应的实体
*
* @author huyc
* @date 2022-06-20 17:54:40
*/
@Data
@ColumnWidth
(
30
)
public
class
EmployeeVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
@NotNull
(
message
=
"员工类型不能为空"
)
@ExcelProperty
(
value
=
"员工类型"
)
private
String
empNatrue
;
/**
* 姓名
*/
@ExcelProperty
(
value
=
"姓名"
)
@Max
(
value
=
20
,
message
=
"姓名不可超过20位"
)
private
String
empName
;
/**
* 身份证号
*/
@ExcelProperty
(
value
=
"身份证号"
)
@Max
(
value
=
20
,
message
=
"身份证号不可超过20位"
)
private
String
empIdcard
;
/**
* 项目编码
*/
@ExcelProperty
(
value
=
"项目编码"
)
@Max
(
value
=
32
,
message
=
"项目编码不可超过32位"
)
private
String
deptNo
;
/**
* 就职岗位
*/
@ExcelProperty
(
value
=
"就职岗位"
)
@Max
(
value
=
50
,
message
=
"就职岗位不可超过50位"
)
private
String
post
;
/**
* 身份证有效期起
*/
@ExcelProperty
(
value
=
"身份证开始日期"
)
private
LocalDateTime
validityStart
;
/**
* 身份证有效期止
*/
@ExcelProperty
(
value
=
"身份证截止日期"
)
private
LocalDateTime
validityEnd
;
/**
* 婚姻状况
*/
@ExcelProperty
(
value
=
"婚姻状况"
)
@Max
(
value
=
32
,
message
=
"婚姻状况不可超过32位"
)
private
String
empMarriStatus
;
/**
* 民族
*/
@ExcelProperty
(
value
=
"民族"
)
@Max
(
value
=
32
,
message
=
"民族不可超过32位"
)
private
String
empNational
;
/**
* 政治面貌
*/
@ExcelProperty
(
value
=
"政治面貌"
)
@Max
(
value
=
32
,
message
=
"政治面貌不可超过32位"
)
private
String
politicalStatus
;
/**
* 手机号码
*/
@ExcelProperty
(
value
=
"手机号码"
)
@Max
(
value
=
11
,
message
=
"手机号码不可超过11位"
)
private
String
empPhone
;
/**
* 邮箱
*/
@ExcelProperty
(
value
=
"邮箱"
)
@Max
(
value
=
32
,
message
=
"邮箱不可超过32位"
)
private
String
empEmail
;
/**
* 身份证-省
*/
@ExcelProperty
(
value
=
"户籍所在省"
)
private
String
idProvince
;
/**
* 身份证-市
*/
@ExcelProperty
(
value
=
"户籍所在市"
)
private
String
idCity
;
/**
* 身份证-县
*/
@ExcelProperty
(
value
=
"户籍所在县"
)
private
String
idTown
;
/**
* 户口性质
*/
@ExcelProperty
(
value
=
"户口性质"
)
private
String
empRegisType
;
/**
* 档案-省
*/
@ExcelProperty
(
value
=
"档案所在省"
)
private
String
fileProvince
;
/**
* 档案-市
*/
@ExcelProperty
(
value
=
"档案所在市"
)
private
String
fileCity
;
/**
* 档案-县
*/
@ExcelProperty
(
value
=
"档案所在县"
)
private
String
fileTown
;
/**
* 是否大专及以上(0否1是)
*/
@ExcelProperty
(
value
=
"是否大专及以上"
)
private
String
isCollege
;
/**
* 最高学历(字典值)
*/
@ExcelProperty
(
value
=
"最高学历"
)
private
String
hignEducation
;
/**
* 学校
*/
@ExcelProperty
(
value
=
"学校"
)
private
String
school
;
/**
* 专业
*/
@ExcelProperty
(
value
=
"专业"
)
private
String
major
;
/**
* 入学时间
*/
@ExcelProperty
(
value
=
"入学时间"
)
private
LocalDateTime
admissionDate
;
/**
* 毕业时间
*/
@ExcelProperty
(
value
=
"毕业时间"
)
private
LocalDateTime
gradutionDate
;
/**
* 备注
*/
@ExcelProperty
(
value
=
"备注"
)
private
String
remark
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeInfoController.java
View file @
cceba6d2
...
...
@@ -19,9 +19,14 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.pig4cloud.plugin.excel.annotation.RequestExcel
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDataAuth
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
...
...
@@ -39,6 +44,7 @@ import org.springframework.cache.Cache;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.support.SimpleValueWrapper
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
...
...
@@ -229,4 +235,20 @@ public class TEmployeeInfoController {
return
tEmployeeInfoService
.
minusEmployee
(
id
);
}
/**
* @param excelList
* @param bindingResult
* @Description: 批量导入人员档案
* @Author: hgw
* @Date: 2022/6/22 11:57
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.pig4cloud.plugin.excel.vo.ErrorMessage>>
**/
@Operation
(
description
=
"批量导入人员档案 hasPermission('employee_batch_import') 额外属性:isCanAdd:0不可以复档复项;1允许复档复项"
)
@SysLog
(
"批量导入人员档案"
)
@PostMapping
(
"/batchImportEmployee"
)
@PreAuthorize
(
"@pms.hasPermission('employee_batch_import')"
)
public
R
<
List
<
ErrorMessage
>>
batchImportEmployee
(
@RequestExcel
List
<
EmployeeVO
>
excelList
,
BindingResult
bindingResult
,
@RequestParam
Integer
isCanAdd
)
{
return
tEmployeeInfoService
.
batchImportEmployee
(
excelList
,
bindingResult
,
isCanAdd
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
View file @
cceba6d2
...
...
@@ -40,6 +40,12 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
List
<
TEmployeeInfo
>
getList
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
// hgw 2022-6-22 15:32:39 根据身份证查询一批档案
List
<
TEmployeeInfo
>
getListByIdCard
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
);
// hgw 2022-6-22 15:32:39 根据手机号查询一批档案
List
<
TEmployeeInfo
>
getListByPhone
(
@Param
(
"phoneList"
)
List
<
String
>
phoneList
);
int
updateEducationOfEmp
(
@Param
(
"education"
)
EmpEducationUpdateVo
education
);
void
updateExcelEmployeeInfo
(
@Param
(
"list"
)
List
<
TEmployeeInfo
>
list
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeInfoService.java
View file @
cceba6d2
...
...
@@ -20,9 +20,12 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.validation.BindingResult
;
import
java.util.List
;
...
...
@@ -101,7 +104,7 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
/**
* @param employeeInfo 档案信息
* @param fileSource 人员档案来源(4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬)
* @param fileSource
人员档案来源(4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬)
* @Description: 新增人员档案,其他服务新增时调用
* @Author: hgw
* @Date: 2022/6/21 19:03
...
...
@@ -109,5 +112,13 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
**/
R
<
TEmployeeInfo
>
saveNewEmpLoyee
(
TEmployeeInfo
employeeInfo
,
String
fileSource
);
/**
* @Description: 批量导入人员档案
* @Author: hgw
* @Date: 2022/6/22 11:58
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.pig4cloud.plugin.excel.vo.ErrorMessage>>
**/
R
<
List
<
ErrorMessage
>>
batchImportEmployee
(
List
<
EmployeeVO
>
excelVOList
,
BindingResult
bindingResult
,
int
isCanAdd
);
void
updateEducationOfEmp
(
EmpEducationUpdateVo
education
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeProjectService.java
View file @
cceba6d2
...
...
@@ -53,6 +53,16 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
**/
List
<
TEmployeeProject
>
getListByEmpId
(
String
empId
,
int
projectStatus
);
/**
* @param empId
* @param deptNo
* @Description: 获取档案下的项目信息
* @Author: hgw
* @Date: 2022/6/22 17:48
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject>
**/
List
<
TEmployeeProject
>
getListByEmpIdAndDeptNo
(
String
empId
,
String
deptNo
);
R
<
List
<
ErrorMessage
>>
importEmpProjectUpdate
(
List
<
EmployeeProjectVO
>
excelVOList
,
BindingResult
bindingResult
);
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
cceba6d2
This diff is collapsed.
Click to expand it.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
cceba6d2
...
...
@@ -471,4 +471,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
project
.
setDeleteFlag
(
CommonConstants
.
STATUS_NORMAL
);
return
this
.
list
(
Wrappers
.
query
(
project
));
}
@Override
public
List
<
TEmployeeProject
>
getListByEmpIdAndDeptNo
(
String
empId
,
String
deptNo
)
{
TEmployeeProject
project
=
new
TEmployeeProject
();
project
.
setEmpId
(
empId
);
project
.
setDeptNo
(
deptNo
);
project
.
setDeleteFlag
(
CommonConstants
.
STATUS_NORMAL
);
return
this
.
list
(
Wrappers
.
query
(
project
));
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
cceba6d2
...
...
@@ -313,6 +313,30 @@
order by a.CREATE_TIME desc
</select>
<!-- hgw 根据身份证查询 -->
<select
id=
"getListByIdCard"
resultMap=
"tEmployeeInfoMap"
>
select
<include
refid=
"baseParam"
/>
from t_employee_info a
where
a.DELETE_FLAG = '0' and a.EMP_IDCARD in
<foreach
item=
"item"
index=
"index"
collection=
"idCardList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
<!-- hgw 根据手机号查询 -->
<select
id=
"getListByPhone"
resultMap=
"tEmployeeInfoMap"
>
select
<include
refid=
"baseParam"
/>
from t_employee_info a
where
a.DELETE_FLAG = '0' and a.EMP_PHONE in
<foreach
item=
"item"
index=
"index"
collection=
"phoneList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
<update
id=
"updateExcelEmployeeInfo"
parameterType=
"java.util.List"
>
update t_employee_info
<trim
prefix=
"set"
suffixOverrides=
","
>
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
cceba6d2
...
...
@@ -232,4 +232,8 @@ public interface CommonConstants {
String
SAVE_SUCCESS
=
"保存成功!"
;
String
PARAM_IS_NOT_EMPTY
=
"参数不可为空"
;
// 是否
String
IS_FALSE
=
"否"
;
String
IS_TRUE
=
"是"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
cceba6d2
...
...
@@ -221,6 +221,37 @@ public interface ErrorCodes {
* 人员不在该项目,无法更新
*/
String
CHECKS_EMP_EXIT_ERROR
=
"checks.emp.exit.error"
;
// 该人员已存在,禁止重复添加
String
ARCHIVES_IMPORT_EMP_IDCARD_EXISTING
=
"archives.import.emp.idCard.existing"
;
// 该人员已减档,禁止导入
String
ARCHIVES_IMPORT_EMP_IDCARD_LEAVE_EXISTING
=
"archives.import.emp.idCard.leave.existing"
;
// 手机号校验错误
String
ARCHIVES_IMPORT_EMP_PHONE_CHECK_ERROR
=
"archives.import.emp.phone.check.error"
;
// 手机号已被其他身份证使用
String
ARCHIVES_IMPORT_EMP_PHONE_EXIST_ERROR
=
"archives.import.emp.phone.exist.error"
;
// 婚姻状况在字典中未找到
String
ARCHIVES_IMPORT_EMP_MARRIED_ERROR
=
"archives.import.emp.married.error"
;
// 民族在字典中未找到
String
ARCHIVES_IMPORT_EMP_NATIONAL_ERROR
=
"archives.import.emp.national.error"
;
// 政治面貌在字典中未找到
String
ARCHIVES_IMPORT_EMP_POLITICAL_ERROR
=
"archives.import.emp.political.error"
;
// 户口性质在字典中未找到
String
ARCHIVES_IMPORT_EMP_REGISTYPE_ERROR
=
"archives.import.emp.registype.error"
;
// 最高学历在字典中未找到
String
ARCHIVES_IMPORT_EMP_EDUCATION_ERROR
=
"archives.import.emp.education.error"
;
// 员工类型在字典中未找到
String
ARCHIVES_IMPORT_EMP_NATRUE_ERROR
=
"archives.import.emp.natrue.error"
;
// 户籍所在地未找到区域
String
ARCHIVES_IMPORT_EMP_AREA_ERROR
=
"archives.import.emp.area.error"
;
// 档案所在地未找到区域
String
ARCHIVES_IMPORT_EMP_FILE_AREA_ERROR
=
"archives.import.emp.file.area.error"
;
// 大专及以上,最高学历必填
String
ARCHIVES_IMPORT_EMP_HIGH_EDUCATION_ERROR
=
"archives.import.emp.high.education.error"
;
/**
* 项目档案状态为已审核,禁止删除
*/
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
cceba6d2
...
...
@@ -65,6 +65,20 @@ archives.emp.certificate.name.existing=\u5DF2\u5B58\u5728\u5BF9\u5E94\u8EAB\u4EF
checks.change.emp.project
=
\u
5F85
\u5212\u
8F6C
\u5458\u
5DE5
\u
5DF2
\u5728\u
76EE
\u6807\u9879\u
76EE
\u
4E0B
\u
4E0D
\u
53EF
\u5212\u
8F6C
archives.import.emp.idCard.existing
=
\u
8BE5
\u
4EBA
\u5458\u
5DF2
\u
5B58
\u5728\u
FF0C
\u7981\u
6B62
\u
91CD
\u
590D
\u
6DFB
\u
52A0
archives.import.emp.idCard.leave.existing
=
\u
8BE5
\u
4EBA
\u5458\u
5DF2
\u
51CF
\u6863\u
FF0C
\u7981\u
6B62
\u
5BFC
\u5165
archives.import.emp.phone.check.error
=
\u
624B
\u
673A
\u
53F7
\u6821\u
9A8C
\u9519\u
8BEF
archives.import.emp.phone.exist.error
=
\u
624B
\u
673A
\u
53F7
\u
5DF2
\u
88AB
\u5176\u
4ED6
\u
8EAB
\u
4EFD
\u
8BC1
\u
4F7F
\u7528
archives.import.emp.married.error
=
\u
5A5A
\u
59FB
\u
72B6
\u
51B5
\u5728\u
5B57
\u5178\u
4E2D
\u
672A
\u
627E
\u5230
archives.import.emp.national.error
=
\u
6C11
\u
65CF
\u5728\u
5B57
\u5178\u
4E2D
\u
672A
\u
627E
\u5230
archives.import.emp.political.error
=
\u
653F
\u
6CBB
\u9762\u
8C8C
\u5728\u
5B57
\u5178\u
4E2D
\u
672A
\u
627E
\u5230
archives.import.emp.registype.error
=
\u6237\u
53E3
\u6027\u
8D28
\u5728\u
5B57
\u5178\u
4E2D
\u
672A
\u
627E
\u5230
archives.import.emp.education.error
=
\u6700\u
9AD8
\u
5B66
\u5386\u5728\u
5B57
\u5178\u
4E2D
\u
672A
\u
627E
\u5230
archives.import.emp.natrue.error
=
\u5458\u
5DE5
\u
7C7B
\u
578B
\u5728\u
5B57
\u5178\u
4E2D
\u
672A
\u
627E
\u5230
archives.import.emp.area.error
=
\u6237\u
7C4D
\u6240\u5728\u5730\u
672A
\u
627E
\u5230\u
533A
\u
57DF
archives.import.emp.file.area.error
=
\u6863\u6848\u6240\u5728\u5730\u
672A
\u
627E
\u5230\u
533A
\u
57DF
archives.import.emp.file.area.error
=
\u5927\u
4E13
\u
53CA
\u
4EE5
\u
4E0A
\u
FF0C
\u6700\u
9AD8
\u
5B66
\u5386\u
5FC5
\u
586B
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/entity/SysArea.java
0 → 100644
View file @
cceba6d2
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
entity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* 区划实体
* @author hgw
* @date 2022-6-22 19:30:59
*/
@Data
@Schema
(
description
=
"区域"
)
public
class
SysArea
{
private
Integer
id
;
private
String
areaName
;
private
String
areaCode
;
private
Integer
parentId
;
private
LocalDateTime
updateDate
;
private
Integer
status
;
private
Integer
createUser
;
/**
*车牌简称
*/
private
String
areaShort
;
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/AreaController.java
0 → 100644
View file @
cceba6d2
/*
* Copyright (c) 2020 yifu4cloud Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysAreaService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Map
;
/**
* <p>
* 字典表 前端控制器
* </p>
*
* @author lengleng
* @since 2019-03-19
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/area"
)
@Tag
(
name
=
"区域管理模块"
)
public
class
AreaController
{
private
final
SysAreaService
sysAreaService
;
/**
* @Description: 获取所有区域(id,名称)
* @Author: hgw
* @Date: 2022/6/22 19:33
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.Integer, java.lang.String>>
**/
@Inner
@GetMapping
(
"/inner/getAreaToId"
)
public
R
<
Map
<
String
,
String
>>
getAreaToId
()
{
return
sysAreaService
.
getAreaToId
();
}
/**
* @param
* @Description: 获取所有区域(名称,id)
* @Author: hgw
* @Date: 2022/6/22 19:34
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.String, java.util.Map < java.lang.String, java.lang.String>>>
**/
@Inner
@GetMapping
(
"/inner/getAreaToName"
)
public
R
<
Map
<
String
,
String
>>
getAreaToName
()
{
return
sysAreaService
.
getAreaToName
();
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/DictController.java
View file @
cceba6d2
...
...
@@ -32,6 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.cache.annotation.CacheEvict
;
...
...
@@ -303,4 +304,28 @@ public class DictController {
return
R
.
ok
(
sysDictItemService
.
treeMenu
(
lazy
,
parentId
));
}
/**
* @Description: 获取所有字典数据:用做导入:type,<lable,value>
* @Author: hgw
* @Date: 2022/6/22 18:19
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.String, java.util.Map < java.lang.String, java.lang.String>>>
**/
@Inner
@GetMapping
(
"/inner/getDictToLable"
)
public
R
<
Map
<
String
,
Map
<
String
,
String
>>>
getDictToLable
()
{
return
sysDictItemService
.
getDictToLable
();
}
/**
* @Description: 获取所有字典数据:用做导出:type,<value,lable>
* @Author: hgw
* @Date: 2022/6/22 18:20
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.String, java.util.Map < java.lang.String, java.lang.String>>>
**/
@Inner
@GetMapping
(
"/inner/getDictToLable"
)
public
R
<
Map
<
String
,
Map
<
String
,
String
>>>
getDictToValue
()
{
return
sysDictItemService
.
getDictToValue
();
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/mapper/SysAreaMapper.java
0 → 100644
View file @
cceba6d2
/*
* Copyright (c) 2020 yifu4cloud Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* <p>
* 区域表 Mapper 接口
* </p>
*
* @author hgw
* @since 2022-6-22 19:41:44
*/
@Mapper
public
interface
SysAreaMapper
extends
BaseMapper
<
SysArea
>
{
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/SysAreaService.java
0 → 100644
View file @
cceba6d2
/*
* Copyright (c) 2020 yifu4cloud Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
java.util.Map
;
/**
* 区域
*
* @author hgw
* @date 2022-6-22 19:35:06
*/
public
interface
SysAreaService
extends
IService
<
SysArea
>
{
/**
* @Description: 获取所有区域数据:用做导出:<id,name>
* @Author: hgw
* @Date: 2022/6/22 18:04
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.String, java.util.Map < java.lang.String, java.lang.String>>>
**/
R
<
Map
<
String
,
String
>>
getAreaToId
();
/**
* @Description: 获取所有区域数据:用做导入:<name,id>
* @Author: hgw
* @Date: 2022/6/22 18:04
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.String, java.util.Map < java.lang.String, java.lang.String>>>
**/
R
<
Map
<
String
,
String
>>
getAreaToName
();
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/SysDictItemService.java
View file @
cceba6d2
...
...
@@ -63,5 +63,21 @@ public interface SysDictItemService extends IService<SysDictItem> {
R
<
Map
<
String
,
Object
>>
getAllDictItem
();
/**
* @Description: 获取所有字典数据:用做导入:type,<lable,value>
* @Author: hgw
* @Date: 2022/6/22 18:04
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.String, java.util.Map < java.lang.String, java.lang.String>>>
**/
R
<
Map
<
String
,
Map
<
String
,
String
>>>
getDictToLable
();
/**
* @Description: 获取所有字典数据:用做导出:type,<value,lable>
* @Author: hgw
* @Date: 2022/6/22 18:04
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.String, java.util.Map < java.lang.String, java.lang.String>>>
**/
R
<
Map
<
String
,
Map
<
String
,
String
>>>
getDictToValue
();
void
clearDictItemCache
();
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysAreaServiceImpl.java
0 → 100644
View file @
cceba6d2
/*
* Copyright (c) 2020 yifu4cloud Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea
;
import
com.yifu.cloud.plus.v1.yifu.admin.mapper.SysAreaMapper
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysAreaService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 字典项
*
* @author hgw
* @date 2022-6-22 19:40:43
*/
@Service
public
class
SysAreaServiceImpl
extends
ServiceImpl
<
SysAreaMapper
,
SysArea
>
implements
SysAreaService
{
@Override
public
R
<
Map
<
String
,
String
>>
getAreaToId
()
{
Map
<
String
,
String
>
resultMap
=
this
.
getStringMapMap
(
true
);
return
R
.
ok
(
resultMap
);
}
@Override
public
R
<
Map
<
String
,
String
>>
getAreaToName
()
{
Map
<
String
,
String
>
resultMap
=
this
.
getStringMapMap
(
false
);
return
R
.
ok
(
resultMap
);
}
private
Map
<
String
,
String
>
getStringMapMap
(
boolean
type
)
{
List
<
SysArea
>
allList
=
baseMapper
.
selectList
(
Wrappers
.<
SysArea
>
query
().
lambda
()
.
eq
(
SysArea:
:
getStatus
,
CommonConstants
.
ZERO_INT
));
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
doAssemble
(
allList
,
resultMap
,
type
);
return
resultMap
;
}
/**
* @Description: 组装
* @Author: hgw
* @Date: 2022/6/22 18:12
* @return: void
**/
private
void
doAssemble
(
List
<
SysArea
>
allList
,
Map
<
String
,
String
>
resultMap
,
boolean
type
)
{
if
(
Common
.
isNotNull
(
allList
))
{
for
(
SysArea
item
:
allList
)
{
if
(
type
)
{
resultMap
.
put
(
String
.
valueOf
(
item
.
getId
()),
item
.
getAreaName
());
}
else
{
resultMap
.
put
(
item
.
getAreaName
(),
String
.
valueOf
(
item
.
getId
()));
}
}
}
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDictItemServiceImpl.java
View file @
cceba6d2
...
...
@@ -200,6 +200,53 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
}
}
}
@Override
public
R
<
Map
<
String
,
Map
<
String
,
String
>>>
getDictToLable
()
{
Map
<
String
,
Map
<
String
,
String
>>
resultMap
=
this
.
getStringMapMap
(
false
);
return
R
.
ok
(
resultMap
);
}
@Override
public
R
<
Map
<
String
,
Map
<
String
,
String
>>>
getDictToValue
()
{
Map
<
String
,
Map
<
String
,
String
>>
resultMap
=
this
.
getStringMapMap
(
true
);
return
R
.
ok
(
resultMap
);
}
private
Map
<
String
,
Map
<
String
,
String
>>
getStringMapMap
(
boolean
type
)
{
List
<
SysDictItem
>
allList
=
baseMapper
.
selectList
(
Wrappers
.<
SysDictItem
>
query
().
lambda
()
.
eq
(
SysDictItem:
:
getDelFlag
,
CommonConstants
.
STATUS_NORMAL
));
Map
<
String
,
Map
<
String
,
String
>>
resultMap
=
new
HashMap
<>();
doAssemble
(
allList
,
resultMap
,
type
);
return
resultMap
;
}
/**
* @Description: 组装
* @Author: hgw
* @Date: 2022/6/22 18:12
* @return: void
**/
private
void
doAssemble
(
List
<
SysDictItem
>
allList
,
Map
<
String
,
Map
<
String
,
String
>>
resultMap
,
boolean
type
)
{
if
(
Common
.
isNotNull
(
allList
)){
String
dictCode
;
Map
<
String
,
String
>
dictMap
;
for
(
SysDictItem
item
:
allList
)
{
dictCode
=
item
.
getType
();
dictMap
=
resultMap
.
get
(
dictCode
);
if
(
dictMap
==
null
)
{
dictMap
=
new
HashMap
<>();
}
if
(
type
)
{
dictMap
.
put
(
item
.
getValue
(),
item
.
getLabel
());
}
else
{
dictMap
.
put
(
item
.
getLabel
(),
item
.
getValue
());
}
resultMap
.
put
(
dictCode
,
dictMap
);
}
}
}
/**
* 构建查询的 wrapper
* @param sysDictItem 查询条件
...
...
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysAreaMapper.xml
0 → 100644
View file @
cceba6d2
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.admin.mapper.SysAreaMapper"
>
<resultMap
id=
"sysDictMap"
type=
"com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"areaName"
column=
"AREA_NAME"
/>
<result
property=
"areaCode"
column=
"AREA_CODE"
/>
<result
property=
"parentId"
column=
"PARENT_ID"
/>
<result
property=
"updateDate"
column=
"UPDATE_DATE"
/>
<result
property=
"status"
column=
"STATUS"
/>
<result
property=
"createUser"
column=
"CREATE_USER"
/>
<result
property=
"areaShort"
column=
"AREA_SHORT"
/>
</resultMap>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment