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
695b917d
Commit
695b917d
authored
Jul 12, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基数配置提交2
parent
95702c74
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
92 deletions
+34
-92
TEmployeeLogServiceImpl.java
...1/yifu/archives/service/impl/TEmployeeLogServiceImpl.java
+10
-10
SysBaseSetInfoController.java
...s/v1/yifu/social/controller/SysBaseSetInfoController.java
+1
-5
TSocialLogController.java
.../plus/v1/yifu/social/controller/TSocialLogController.java
+14
-68
TSocialLogServiceImpl.java
...us/v1/yifu/social/service/impl/TSocialLogServiceImpl.java
+9
-9
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeLogServiceImpl.java
View file @
695b917d
...
...
@@ -47,16 +47,16 @@ public class TEmployeeLogServiceImpl extends ServiceImpl<TEmployeeLogMapper, TEm
String
differenceKey
=
HrEquator
.
comparisonValue
(
oldInfo
,
newInfo
);
//如果有差异保存差异
if
(!
Common
.
isEmpty
(
differenceKey
)){
TEmployeeLog
record
=
new
TEmployeeLog
();
record
.
setProjectId
(
projectId
);
record
.
setType
(
type
);
record
.
setEmpId
(
empId
);
record
.
setCreateTime
(
LocalDateTime
.
now
());
record
.
setOldInfo
(
JSON
.
toJSONString
(
oldInfo
,
features
));
record
.
setNewInfo
(
JSON
.
toJSONString
(
newInfo
,
features
));
record
.
setDifferenceInfo
(
differenceKey
);
baseMapper
.
insert
(
record
);
return
record
;
TEmployeeLog
employeeLog
=
new
TEmployeeLog
();
employeeLog
.
setProjectId
(
projectId
);
employeeLog
.
setType
(
type
);
employeeLog
.
setEmpId
(
empId
);
employeeLog
.
setCreateTime
(
LocalDateTime
.
now
());
employeeLog
.
setOldInfo
(
JSON
.
toJSONString
(
oldInfo
,
features
));
employeeLog
.
setNewInfo
(
JSON
.
toJSONString
(
newInfo
,
features
));
employeeLog
.
setDifferenceInfo
(
differenceKey
);
baseMapper
.
insert
(
employeeLog
);
return
employeeLog
;
}
}
catch
(
Exception
e
){
log
.
error
(
JSON
.
toJSON
(
oldInfo
)+
"插入修改记录报错>>>"
,
e
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/SysBaseSetInfoController.java
View file @
695b917d
...
...
@@ -20,7 +20,6 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
...
...
@@ -29,10 +28,8 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion;
import
com.yifu.cloud.plus.v1.yifu.social.service.SysBaseSetInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.SysPayProportionService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -86,9 +83,8 @@ public class SysBaseSetInfoController {
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询
:hasPermission('social_sysbasesetinfo_get')
"
)
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('social_sysbasesetinfo_get')"
)
public
R
<
SysBaseSetInfo
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
SysBaseSetInfo
baseSetInfo
=
sysBaseSetInfoService
.
getById
(
id
);
if
(
null
!=
baseSetInfo
&&
CommonConstants
.
ONE_STRING
.
equals
(
baseSetInfo
.
getBaseType
())){
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TSocialLogController.java
View file @
695b917d
...
...
@@ -22,14 +22,15 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
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.social.entity.TSocialLog
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSocialLogService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
...
...
@@ -63,71 +64,16 @@ public class TSocialLogController {
}
/**
* 不分页查询
*
* @param tSocialLog 社保变更记录表
* @return
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
//@PreAuthorize("@pms.hasPermission('social_tsociallog_get')" )
public
R
<
List
<
TSocialLog
>>
getTSocialLogNoPage
(
@RequestBody
TSocialLog
tSocialLog
)
{
return
R
.
ok
(
tSocialLogService
.
list
(
Wrappers
.
query
(
tSocialLog
).
orderByDesc
(
CommonConstants
.
CREATE_TIME
)));
}
/**
* 通过id查询社保变更记录表
*
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('social_tsociallog_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('social_tsociallog_get')"
)
public
R
<
TSocialLog
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tSocialLogService
.
getById
(
id
));
}
/**
* 新增社保变更记录表
*
* @param tSocialLog 社保变更记录表
* @return R
*/
@Operation
(
summary
=
"新增社保变更记录表"
,
description
=
"新增社保变更记录表:hasPermission('social_tsociallog_add')"
)
@SysLog
(
"新增社保变更记录表"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('social_tsociallog_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TSocialLog
tSocialLog
)
{
return
R
.
ok
(
tSocialLogService
.
save
(
tSocialLog
));
}
/**
* 修改社保变更记录表
*
* @param tSocialLog 社保变更记录表
* @return R
*/
@Operation
(
summary
=
"修改社保变更记录表"
,
description
=
"修改社保变更记录表:hasPermission('social_tsociallog_edit')"
)
@SysLog
(
"修改社保变更记录表"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('social_tsociallog_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TSocialLog
tSocialLog
)
{
return
R
.
ok
(
tSocialLogService
.
updateById
(
tSocialLog
));
}
/**
* 通过id删除社保变更记录表
*
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id删除社保变更记录表"
,
description
=
"通过id删除社保变更记录表:hasPermission('social_tsociallog_del')"
)
@SysLog
(
"通过id删除社保变更记录表"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('social_tsociallog_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tSocialLogService
.
removeById
(
id
));
* @Description: 通过EMP_ID查询人员档案变更日志
* @Author: hgw
* @Date: 2022/6/28 16:45
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeLog>>
**/
@Operation
(
summary
=
"通过mainId、type查询社保变更日志(type类型:1社保基数配置;2公积金基数配置;后续再追加)"
,
description
=
"通过mainId查询社保变更日志"
)
@GetMapping
(
"/getByEmpId"
)
public
R
<
List
<
TSocialLog
>>
getByEmpId
(
@RequestParam
String
mainId
,
@RequestParam
Integer
type
)
{
return
R
.
ok
(
tSocialLogService
.
list
(
Wrappers
.<
TSocialLog
>
query
().
eq
(
"MAIN_ID"
,
mainId
)
.
eq
(
"TYPE"
,
type
).
orderByDesc
(
CommonConstants
.
CREATE_TIME
)));
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialLogServiceImpl.java
View file @
695b917d
...
...
@@ -67,15 +67,15 @@ public class TSocialLogServiceImpl extends ServiceImpl<TSocialLogMapper, TSocial
String
differenceKey
=
HrEquator
.
comparisonValue
(
oldInfo
,
newInfo
);
//如果有差异保存差异
if
(!
Common
.
isEmpty
(
differenceKey
))
{
TSocialLog
record
=
new
TSocialLog
();
record
.
setType
(
type
);
record
.
setMainId
(
mainId
);
record
.
setCreateTime
(
LocalDateTime
.
now
());
record
.
setOldInfo
(
JSON
.
toJSONString
(
oldInfo
,
features
));
record
.
setNewInfo
(
JSON
.
toJSONString
(
newInfo
,
features
));
record
.
setDifferenceInfo
(
differenceKey
);
baseMapper
.
insert
(
record
);
return
record
;
TSocialLog
socialLog
=
new
TSocialLog
();
socialLog
.
setType
(
type
);
socialLog
.
setMainId
(
mainId
);
socialLog
.
setCreateTime
(
LocalDateTime
.
now
());
socialLog
.
setOldInfo
(
JSON
.
toJSONString
(
oldInfo
,
features
));
socialLog
.
setNewInfo
(
JSON
.
toJSONString
(
newInfo
,
features
));
socialLog
.
setDifferenceInfo
(
differenceKey
);
baseMapper
.
insert
(
socialLog
);
return
socialLog
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
JSON
.
toJSON
(
oldInfo
)
+
"【新增社保变更记录】报错>>>"
,
e
);
...
...
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