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
3976dd89
Commit
3976dd89
authored
Sep 14, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据权限
parent
47ce58a4
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
70 additions
and
3 deletions
+70
-3
TCertRecord.java
.../yifu/cloud/plus/v1/yifu/archives/entity/TCertRecord.java
+6
-0
EmployeeProjectExportVO.java
...oud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java
+2
-1
TCertRecordController.java
...us/v1/yifu/archives/controller/TCertRecordController.java
+16
-1
TEmployeeInfoController.java
.../v1/yifu/archives/controller/TEmployeeInfoController.java
+14
-0
TEmployeeProjectController.java
.../yifu/archives/controller/TEmployeeProjectController.java
+15
-0
TCertRecordServiceImpl.java
...v1/yifu/archives/service/impl/TCertRecordServiceImpl.java
+2
-0
TCertRecordMapper.xml
...hives-biz/src/main/resources/mapper/TCertRecordMapper.xml
+1
-0
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+6
-0
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+8
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TCertRecord.java
View file @
3976dd89
...
@@ -70,6 +70,12 @@ public class TCertRecord extends BaseEntity {
...
@@ -70,6 +70,12 @@ public class TCertRecord extends BaseEntity {
private
String
empIdcard
;
private
String
empIdcard
;
/**
/**
* 项目id
*/
@ExcelAttribute
(
name
=
"项目id"
)
@Schema
(
description
=
"项目id"
)
private
String
deptId
;
/**
* 项目名称
* 项目名称
*/
*/
@ExcelAttribute
(
name
=
"项目名称"
)
@ExcelAttribute
(
name
=
"项目名称"
)
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java
View file @
3976dd89
...
@@ -22,6 +22,7 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
...
@@ -22,6 +22,7 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -38,7 +39,7 @@ import java.util.List;
...
@@ -38,7 +39,7 @@ import java.util.List;
*/
*/
@Data
@Data
@ColumnWidth
(
15
)
@ColumnWidth
(
15
)
public
class
EmployeeProjectExportVO
{
public
class
EmployeeProjectExportVO
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TCertRecordController.java
View file @
3976dd89
...
@@ -23,8 +23,13 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TCertRecord;
...
@@ -23,8 +23,13 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TCertRecord;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TCertRecordService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TCertRecordService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.CertRecordSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.CertRecordSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCertRecordVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCertRecordVo
;
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
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
@@ -50,7 +55,7 @@ import java.util.List;
...
@@ -50,7 +55,7 @@ import java.util.List;
public
class
TCertRecordController
{
public
class
TCertRecordController
{
private
final
TCertRecordService
tCertRecordService
;
private
final
TCertRecordService
tCertRecordService
;
private
final
MenuUtil
menuUtil
;
/**
/**
* 分页查询
* 分页查询
* @param page 分页对象
* @param page 分页对象
...
@@ -61,6 +66,11 @@ public class TCertRecordController {
...
@@ -61,6 +66,11 @@ public class TCertRecordController {
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
//@PreAuthorize("@pms.hasPermission('demo_tcertrecord_get')" )
//@PreAuthorize("@pms.hasPermission('demo_tcertrecord_get')" )
public
R
<
IPage
<
TCertRecord
>>
getTCertRecordPage
(
Page
page
,
CertRecordSearchVo
searchVo
)
{
public
R
<
IPage
<
TCertRecord
>>
getTCertRecordPage
(
Page
page
,
CertRecordSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
menuUtil
.
setAuthSql
(
user
,
searchVo
);
return
R
.
ok
(
tCertRecordService
.
pageDiy
(
page
,
searchVo
));
return
R
.
ok
(
tCertRecordService
.
pageDiy
(
page
,
searchVo
));
}
}
/**
/**
...
@@ -72,6 +82,11 @@ public class TCertRecordController {
...
@@ -72,6 +82,11 @@ public class TCertRecordController {
@GetMapping
(
"/noPage"
)
@GetMapping
(
"/noPage"
)
//@PreAuthorize("@pms.hasPermission('demo_tcertrecord_get')" )
//@PreAuthorize("@pms.hasPermission('demo_tcertrecord_get')" )
public
R
<
List
<
TCertRecord
>>
getTCertRecordNoPage
(
CertRecordSearchVo
searchVo
)
{
public
R
<
List
<
TCertRecord
>>
getTCertRecordNoPage
(
CertRecordSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
menuUtil
.
setAuthSql
(
user
,
searchVo
);
return
R
.
ok
(
tCertRecordService
.
getTCertRecordNoPage
(
searchVo
));
return
R
.
ok
(
tCertRecordService
.
getTCertRecordNoPage
(
searchVo
));
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeInfoController.java
View file @
3976dd89
...
@@ -303,6 +303,13 @@ public class TEmployeeInfoController {
...
@@ -303,6 +303,13 @@ public class TEmployeeInfoController {
// @ResponseExcel
// @ResponseExcel
@PostMapping
(
"/exportEmployee"
)
@PostMapping
(
"/exportEmployee"
)
public
void
exportEmployee
(
@RequestBody
(
required
=
false
)
TEmployeeInfo
employeeInfo
,
HttpServletResponse
response
)
{
public
void
exportEmployee
(
@RequestBody
(
required
=
false
)
TEmployeeInfo
employeeInfo
,
HttpServletResponse
response
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
Common
.
isEmpty
(
user
.
getId
()))
{
menuUtil
.
setAuthSql
(
user
,
employeeInfo
);
if
(
Common
.
isNotNull
(
employeeInfo
.
getAuthSql
())
&&
employeeInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
employeeInfo
.
setAuthSql
(
employeeInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"b.id"
));
}
}
tEmployeeInfoService
.
exportEmployee
(
employeeInfo
,
response
);
tEmployeeInfoService
.
exportEmployee
(
employeeInfo
,
response
);
}
}
...
@@ -317,6 +324,13 @@ public class TEmployeeInfoController {
...
@@ -317,6 +324,13 @@ public class TEmployeeInfoController {
// @ResponseExcel
// @ResponseExcel
@PostMapping
(
"/exportLeaveEmployee"
)
@PostMapping
(
"/exportLeaveEmployee"
)
public
void
exportLeaveEmployee
(
@RequestBody
(
required
=
false
)
TEmployeeInfo
employeeInfo
,
HttpServletResponse
response
)
{
public
void
exportLeaveEmployee
(
@RequestBody
(
required
=
false
)
TEmployeeInfo
employeeInfo
,
HttpServletResponse
response
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
Common
.
isEmpty
(
user
.
getId
()))
{
menuUtil
.
setAuthSql
(
user
,
employeeInfo
);
if
(
Common
.
isNotNull
(
employeeInfo
.
getAuthSql
())
&&
employeeInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
employeeInfo
.
setAuthSql
(
employeeInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"b.id"
));
}
}
tEmployeeInfoService
.
exportLeaveEmployee
(
employeeInfo
,
response
);
tEmployeeInfoService
.
exportLeaveEmployee
(
employeeInfo
,
response
);
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeProjectController.java
View file @
3976dd89
...
@@ -25,10 +25,14 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
...
@@ -25,10 +25,14 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
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.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
...
@@ -57,6 +61,8 @@ public class TEmployeeProjectController {
...
@@ -57,6 +61,8 @@ public class TEmployeeProjectController {
private
final
TEmployeeProjectService
tEmployeeProjectService
;
private
final
TEmployeeProjectService
tEmployeeProjectService
;
private
final
MenuUtil
menuUtil
;
/**
/**
* @param empId 人员档案id
* @param empId 人员档案id
* @Description: 根据人员档案id获取项目list
* @Description: 根据人员档案id获取项目list
...
@@ -82,6 +88,11 @@ public class TEmployeeProjectController {
...
@@ -82,6 +88,11 @@ public class TEmployeeProjectController {
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TEmployeeProject
>>
getTEmployeeProjectPage
(
Page
page
,
TEmployeeProject
tEmployeeProject
)
{
public
R
<
IPage
<
TEmployeeProject
>>
getTEmployeeProjectPage
(
Page
page
,
TEmployeeProject
tEmployeeProject
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
menuUtil
.
setAuthSql
(
user
,
tEmployeeProject
);
return
R
.
ok
(
tEmployeeProjectService
.
getTEmployeeProjectInfoPage
(
page
,
tEmployeeProject
));
return
R
.
ok
(
tEmployeeProjectService
.
getTEmployeeProjectInfoPage
(
page
,
tEmployeeProject
));
}
}
...
@@ -252,6 +263,10 @@ public class TEmployeeProjectController {
...
@@ -252,6 +263,10 @@ public class TEmployeeProjectController {
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
@RequestParam
(
name
=
"idstr"
,
required
=
false
)
String
idstr
,
public
void
export
(
HttpServletResponse
response
,
@RequestParam
(
name
=
"idstr"
,
required
=
false
)
String
idstr
,
@RequestBody
List
<
String
>
exportFields
,
EmployeeProjectExportVO
projectDTO
)
{
@RequestBody
List
<
String
>
exportFields
,
EmployeeProjectExportVO
projectDTO
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
Common
.
isEmpty
(
user
.
getId
()))
{
menuUtil
.
setAuthSql
(
user
,
projectDTO
);
}
tEmployeeProjectService
.
listExportProject
(
response
,
projectDTO
,
idstr
,
exportFields
);
tEmployeeProjectService
.
listExportProject
(
response
,
projectDTO
,
idstr
,
exportFields
);
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TCertRecordServiceImpl.java
View file @
3976dd89
...
@@ -121,6 +121,7 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
...
@@ -121,6 +121,7 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
@Override
@Override
public
IPage
<
TCertRecord
>
pageDiy
(
Page
page
,
CertRecordSearchVo
searchVo
)
{
public
IPage
<
TCertRecord
>
pageDiy
(
Page
page
,
CertRecordSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TCertRecord
>
wrapper
=
buildQueryWrapper
(
searchVo
);
LambdaQueryWrapper
<
TCertRecord
>
wrapper
=
buildQueryWrapper
(
searchVo
);
wrapper
.
last
(
searchVo
.
getAuthSql
());
wrapper
.
orderByDesc
(
TCertRecord:
:
getCreateTime
);
wrapper
.
orderByDesc
(
TCertRecord:
:
getCreateTime
);
return
baseMapper
.
selectPage
(
page
,
wrapper
);
return
baseMapper
.
selectPage
(
page
,
wrapper
);
}
}
...
@@ -132,6 +133,7 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
...
@@ -132,6 +133,7 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
if
(
Common
.
isNotNull
(
idList
)){
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
TCertRecord:
:
getId
,
idList
);
wrapper
.
in
(
TCertRecord:
:
getId
,
idList
);
}
}
wrapper
.
last
(
searchVo
.
getAuthSql
());
return
baseMapper
.
selectList
(
wrapper
);
return
baseMapper
.
selectList
(
wrapper
);
}
}
private
LambdaQueryWrapper
buildQueryWrapper
(
CertRecordSearchVo
entity
){
private
LambdaQueryWrapper
buildQueryWrapper
(
CertRecordSearchVo
entity
){
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TCertRecordMapper.xml
View file @
3976dd89
...
@@ -50,5 +50,6 @@
...
@@ -50,5 +50,6 @@
<result
property=
"openTime"
column=
"OPEN_TIME"
/>
<result
property=
"openTime"
column=
"OPEN_TIME"
/>
<result
property=
"introductionUnit"
column=
"INTRODUCTION_UNIT"
/>
<result
property=
"introductionUnit"
column=
"INTRODUCTION_UNIT"
/>
<result
property=
"socialTime"
column=
"SOCIAL_TIME"
/>
<result
property=
"socialTime"
column=
"SOCIAL_TIME"
/>
<result
property=
"deptId"
column=
"DEPT_ID"
/>
</resultMap>
</resultMap>
</mapper>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
3976dd89
...
@@ -633,6 +633,9 @@
...
@@ -633,6 +633,9 @@
<where>
<where>
a.DELETE_FLAG = '0' and b.DELETE_FLAG = '0'
a.DELETE_FLAG = '0' and b.DELETE_FLAG = '0'
<include
refid=
"employeeInfo_where"
/>
<include
refid=
"employeeInfo_where"
/>
<if
test=
"tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"
>
${tEmployeeInfo.authSql}
</if>
</where>
</where>
GROUP BY a.id order by a.CREATE_TIME desc
GROUP BY a.id order by a.CREATE_TIME desc
</select>
</select>
...
@@ -653,6 +656,9 @@
...
@@ -653,6 +656,9 @@
<where>
<where>
a.DELETE_FLAG = '0' and b.DELETE_FLAG = '0'
a.DELETE_FLAG = '0' and b.DELETE_FLAG = '0'
<include
refid=
"employeeInfo_where"
/>
<include
refid=
"employeeInfo_where"
/>
<if
test=
"tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"
>
${tEmployeeInfo.authSql}
</if>
</where>
</where>
GROUP BY a.id order by a.CREATE_TIME desc
GROUP BY a.id order by a.CREATE_TIME desc
) b
) b
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
3976dd89
...
@@ -781,6 +781,9 @@
...
@@ -781,6 +781,9 @@
<where>
<where>
a.DELETE_FLAG = '0'
a.DELETE_FLAG = '0'
<include
refid=
"tEmployeeProject_where"
/>
<include
refid=
"tEmployeeProject_where"
/>
<if
test=
"tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''"
>
${tEmployeeProject.authSql}
</if>
</where>
</where>
order by a.CREATE_TIME desc
order by a.CREATE_TIME desc
</select>
</select>
...
@@ -793,6 +796,10 @@
...
@@ -793,6 +796,10 @@
<where>
<where>
a.DELETE_FLAG = '0'
a.DELETE_FLAG = '0'
<include
refid=
"exportTEmployeeProject_where"
/>
<include
refid=
"exportTEmployeeProject_where"
/>
<if
test=
"tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''"
>
${tEmployeeProject.authSql}
</if>
</where>
</where>
order by a.CREATE_TIME desc
</select>
</select>
</mapper>
</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