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
c257b21e
You need to sign in or sign up before continuing.
Commit
c257b21e
authored
Jun 29, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
68eed82f
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
29 additions
and
20 deletions
+29
-20
EmpCertificateExcelVO.java
...cloud/plus/v1/yifu/archives/vo/EmpCertificateExcelVO.java
+5
-5
EmpFamilyExcelVO.java
...yifu/cloud/plus/v1/yifu/archives/vo/EmpFamilyExcelVO.java
+3
-3
EmpWorkRecordExcelVO.java
.../cloud/plus/v1/yifu/archives/vo/EmpWorkRecordExcelVO.java
+1
-1
TEmpFamilyController.java
...lus/v1/yifu/archives/controller/TEmpFamilyController.java
+1
-1
TEmpDisabilityInfoServiceImpl.java
.../archives/service/impl/TEmpDisabilityInfoServiceImpl.java
+2
-1
TEmpFamilyServiceImpl.java
.../v1/yifu/archives/service/impl/TEmpFamilyServiceImpl.java
+1
-0
TEmpProfessionalQualificationServiceImpl.java
...ervice/impl/TEmpProfessionalQualificationServiceImpl.java
+1
-0
TEmpWorkRecordingServiceImpl.java
...u/archives/service/impl/TEmpWorkRecordingServiceImpl.java
+1
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+2
-2
RoleController.java
...u.cloud.plus.v1/yifu/admin/controller/RoleController.java
+1
-1
SysRoleService.java
...yifu.cloud.plus.v1/yifu/admin/service/SysRoleService.java
+1
-1
SysRoleServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysRoleServiceImpl.java
+10
-5
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpCertificateExcelVO.java
View file @
c257b21e
...
...
@@ -22,14 +22,14 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@ExcelAttribute
(
name
=
"员工姓名"
,
errorInfo
=
"员工姓名不可为空"
,
maxLength
=
20
)
@ExcelAttribute
(
name
=
"员工姓名"
,
isNotEmpty
=
true
,
errorInfo
=
"员工姓名不可为空"
,
maxLength
=
20
)
@NotNull
(
message
=
"员工姓名不可为空"
)
@ExcelProperty
(
value
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证
*/
@ExcelAttribute
(
name
=
"身份证号"
,
errorInfo
=
"员工身份证不可为空"
,
maxLength
=
20
)
@ExcelAttribute
(
name
=
"身份证号"
,
isNotEmpty
=
true
,
errorInfo
=
"员工身份证不可为空"
,
maxLength
=
20
)
@NotNull
(
message
=
"员工身份证不可为空"
)
@ExcelProperty
(
value
=
"身份证号"
)
private
String
empIdcard
;
...
...
@@ -37,7 +37,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/**
* 资格类型
*/
@ExcelAttribute
(
name
=
"资格类型"
,
errorInfo
=
"资格类型不可为空"
,
isDataId
=
true
,
dataType
=
"qualification_type"
)
@ExcelAttribute
(
name
=
"资格类型"
,
isNotEmpty
=
true
,
errorInfo
=
"资格类型不可为空"
,
isDataId
=
true
,
dataType
=
"qualification_type"
)
@NotNull
(
message
=
"资格类型不可为空"
)
@ExcelProperty
(
value
=
"资格类型"
)
private
String
qualificationType
;
...
...
@@ -45,7 +45,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/**
* 资格等级
*/
@ExcelAttribute
(
name
=
"资格等级"
,
errorInfo
=
"资格等级不可为空"
,
isDataId
=
true
,
dataType
=
"qualification_level"
)
@ExcelAttribute
(
name
=
"资格等级"
,
isNotEmpty
=
true
,
errorInfo
=
"资格等级不可为空"
,
isDataId
=
true
,
dataType
=
"qualification_level"
)
@NotNull
(
message
=
"资格等级不可为空"
)
@ExcelProperty
(
value
=
"资格等级"
)
private
String
qualificationLevel
;
...
...
@@ -81,7 +81,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/**
* 是否最高资格0是/1否
*/
@ExcelAttribute
(
name
=
"是否最高资格"
,
errorInfo
=
"是否最高资格不可为空"
,
readConverterExp
=
"0=是,1=否"
)
@ExcelAttribute
(
name
=
"是否最高资格"
,
isNotEmpty
=
true
,
errorInfo
=
"是否最高资格不可为空"
,
readConverterExp
=
"0=是,1=否"
)
@NotNull
(
message
=
"是否最高资格不可为空"
)
@ExcelProperty
(
value
=
"是否最高资格"
)
private
String
heightIdentification
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpFamilyExcelVO.java
View file @
c257b21e
...
...
@@ -24,7 +24,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@ExcelAttribute
(
name
=
"员工姓名"
,
errorInfo
=
"员工姓名不可为空"
,
maxLength
=
20
)
@ExcelAttribute
(
name
=
"员工姓名"
,
isNotEmpty
=
true
,
errorInfo
=
"员工姓名不可为空"
,
maxLength
=
20
)
@NotNull
(
message
=
"员工姓名不可为空"
)
@ExcelProperty
(
value
=
"员工姓名"
)
private
String
empName
;
...
...
@@ -32,7 +32,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable {
/**
* 员工身份证
*/
@ExcelAttribute
(
name
=
"身份证号"
,
errorInfo
=
"身份证号不可为空"
,
maxLength
=
20
)
@ExcelAttribute
(
name
=
"身份证号"
,
isNotEmpty
=
true
,
errorInfo
=
"身份证号不可为空"
,
maxLength
=
20
)
@NotNull
(
message
=
"员工身份证不可为空"
)
@ExcelProperty
(
value
=
"身份证号"
)
private
String
empIdcard
;
...
...
@@ -40,7 +40,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable {
/**
* 家庭成员姓名
*/
@ExcelAttribute
(
name
=
"成员姓名"
,
errorInfo
=
"成员姓名不可为空"
,
maxLength
=
20
)
@ExcelAttribute
(
name
=
"成员姓名"
,
isNotEmpty
=
true
,
errorInfo
=
"成员姓名不可为空"
,
maxLength
=
20
)
@NotNull
(
message
=
"家庭成员姓名不可为空"
)
@ExcelProperty
(
value
=
"成员姓名"
)
private
String
familyName
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpWorkRecordExcelVO.java
View file @
c257b21e
...
...
@@ -78,7 +78,7 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable {
/**
* 开始工作日期
*/
@ExcelAttribute
(
name
=
"开始工作日期"
,
errorInfo
=
"开始工作日期不可为空"
,
isDate
=
true
)
@ExcelAttribute
(
name
=
"开始工作日期"
,
isNotEmpty
=
true
,
errorInfo
=
"开始工作日期不可为空"
,
isDate
=
true
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
@NotNull
(
message
=
"开始工作日期不可为空"
)
@ExcelProperty
(
value
=
"开始工作日期"
)
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpFamilyController.java
View file @
c257b21e
...
...
@@ -72,7 +72,7 @@ public class TEmpFamilyController {
*/
@Operation
(
description
=
"不分页查询"
)
@GetMapping
(
"/noPage"
)
public
R
<
List
<
TEmpFamily
>>
getTEmpFamilyNoPage
(
FamilySearchVO
family
)
{
public
R
<
List
<
TEmpFamily
>>
getTEmpFamilyNoPage
(
@RequestBody
FamilySearchVO
family
)
{
return
R
.
ok
(
tEmpFamilyService
.
getTEmpFamilyNoPage
(
family
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpDisabilityInfoServiceImpl.java
View file @
c257b21e
...
...
@@ -89,6 +89,7 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
errorMessageList
.
add
(
errorMsg
);
continue
;
}
excel
.
setEmpName
(
emp
.
getEmpName
());
exist
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmpDisabilityInfo
>
query
().
lambda
()
.
eq
(
TEmpDisabilityInfo:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmpDisabilityInfo:
:
getDisabilityName
,
excel
.
getDisabilityName
())
...
...
@@ -170,7 +171,7 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
.
eq
(
TEmpDisabilityInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
exist
)){
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_DISABILITY_NAME_EXISTING
));
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_DISABILITY_NAME_EXISTING
));
}
baseMapper
.
updateById
(
tEmpDisabilityInfo
);
return
R
.
ok
();
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpFamilyServiceImpl.java
View file @
c257b21e
...
...
@@ -91,6 +91,7 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
errorMessageList
.
add
(
errorMsg
);
continue
;
}
excel
.
setEmpName
(
emp
.
getEmpName
());
exist
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmpFamily
>
query
().
lambda
()
.
eq
(
TEmpFamily:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmpFamily:
:
getFamilyName
,
excel
.
getFamilyName
())
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpProfessionalQualificationServiceImpl.java
View file @
c257b21e
...
...
@@ -115,6 +115,7 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
errorMessageList
.
add
(
errorMsg
);
continue
;
}
excel
.
setEmpName
(
emp
.
getEmpName
());
exist
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmpProfessionalQualification
>
query
().
lambda
()
.
eq
(
TEmpProfessionalQualification:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmpProfessionalQualification:
:
getQualificationLevel
,
excel
.
getQualificationLevel
())
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpWorkRecordingServiceImpl.java
View file @
c257b21e
...
...
@@ -84,6 +84,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
errorMessageList
.
add
(
errorMsg
);
continue
;
}
excel
.
setEmpName
(
emp
.
getEmpName
());
exist
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmpWorkRecording
>
query
().
lambda
()
.
eq
(
TEmpWorkRecording:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmpWorkRecording:
:
getWorkUnit
,
excel
.
getWorkUnit
())
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
c257b21e
...
...
@@ -61,8 +61,8 @@ checks.reduce.project.error=\u5B58\u5728\u5DF2\u51CF\u9879\u7684\u9879\u76EE\uFF
checks.emp.exit.error
=
\u
4EBA
\u5458\u
4E0D
\u5728\u
8BE5
\u9879\u
76EE
\u
FF0C
\u
65E0
\u
6CD5
\u
66F4
\u
65B0
checks.project.delete.error
=
\u9879\u
76EE
\u6863\u6848\u
72B6
\u6001\u
4E3A
\u
5DF2
\u
5BA1
\u6838\u
FF0C
\u7981\u
6B62
\u5220\u9664
archives.emp.certificate.name.existing
=
\u
8BE5
\u5458\u
5DE5
\u
5DF2
\u
5B58
\u5728\u
5BF9
\u
5E94
\u
8
EAB
\u
4EFD
\u
8BC1
\u7684\u
8BC1
\u
4E66
\u
4FE1
\u
606F
archives.emp.certificate.declare.year.error
=
\u7533\u
8BF7
\u
5E74
\u
4EFD
\u
4E0D
\u
53EF
\u
4E3A
\u
672A
\u6765\u
5E74
\u
4EFD
archives.emp.certificate.name.existing
=
\u
8BE5
\u5458\u
5DE5
\u
5DF2
\u
5B58
\u5728\u
5BF9
\u
5E94
\u
8
D44
\u
683C
\u
7C7B
\u
578B
\u
548C
\u
8D44
\u
683C
\u
7B49
\u
7EA7
\u7684\u
8BC1
\u
4E66
archives.emp.certificate.declare.year.error
=
\u7533\u
62A5
\u
5E74
\u
5EA6
\u
4E0D
\u
53EF
\u
4E3A
\u
672A
\u6765\u
5E74
\u
4EFD
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
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/RoleController.java
View file @
c257b21e
...
...
@@ -107,7 +107,7 @@ public class RoleController {
@DeleteMapping
(
"/{id:\\d+}"
)
@PreAuthorize
(
"@pms.hasPermission('sys_role_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
Long
id
)
{
return
R
.
ok
(
sysRoleService
.
removeRoleById
(
id
)
);
return
sysRoleService
.
removeRoleById
(
id
);
}
/**
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/SysRoleService.java
View file @
c257b21e
...
...
@@ -40,7 +40,7 @@ public interface SysRoleService extends IService<SysRole> {
* @param id
* @return
*/
Boolean
removeRoleById
(
Long
id
);
R
<
Boolean
>
removeRoleById
(
Long
id
);
/**
* 导入角色
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysRoleServiceImpl.java
View file @
c257b21e
...
...
@@ -75,19 +75,24 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@CacheEvict
(
value
=
CacheConstants
.
MENU_DETAILS
,
allEntries
=
true
)
public
Boolean
removeRoleById
(
Long
id
)
{
public
R
<
Boolean
>
removeRoleById
(
Long
id
)
{
SysRole
sysRole
=
this
.
getById
(
id
);
if
(
Common
.
isEmpty
(
sysRole
)){
return
false
;
return
R
.
failed
()
;
}
SysUserRole
userRole
=
sysUserRoleMapper
.
selectOne
(
Wrappers
.<
SysUserRole
>
query
().
lambda
()
.
eq
(
SysUserRole:
:
getRoleId
,
sysRole
.
getRoleId
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
//已存在用户
Assert
.
state
(
Common
.
isEmpty
(
userRole
),
MsgUtils
.
getMessage
(
ErrorCodes
.
SYS_ROLE_DELETE_EXIST_USER
));
if
(!
Common
.
isEmpty
(
userRole
)){
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
SYS_ROLE_DELETE_EXIST_USER
));
}
//系统内置
Assert
.
state
(!
CommonConstants
.
ZERO_STRING
.
equals
(
sysRole
.
getSystemFlag
()),
MsgUtils
.
getMessage
(
ErrorCodes
.
SYS_ROLE_DELETE_SYSTEM
));
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
sysRole
.
getSystemFlag
())){
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
SYS_ROLE_DELETE_SYSTEM
));
}
sysRoleMenuMapper
.
delete
(
Wrappers
.<
SysRoleMenu
>
update
().
lambda
().
eq
(
SysRoleMenu:
:
getRoleId
,
id
));
return
this
.
removeById
(
id
);
this
.
removeById
(
id
);
return
R
.
ok
();
}
/**
...
...
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