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
d9542189
Commit
d9542189
authored
Jul 12, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
9d988c9b
be583855
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
116 additions
and
13 deletions
+116
-13
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+0
-6
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+1
-1
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+2
-2
SysBaseSetInfoController.java
...s/v1/yifu/social/controller/SysBaseSetInfoController.java
+4
-4
SysBaseSetInfoService.java
...ud/plus/v1/yifu/social/service/SysBaseSetInfoService.java
+20
-0
TSocialLogService.java
.../cloud/plus/v1/yifu/social/service/TSocialLogService.java
+14
-0
SysBaseSetInfoServiceImpl.java
...1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
+29
-0
TSocialLogServiceImpl.java
...us/v1/yifu/social/service/impl/TSocialLogServiceImpl.java
+46
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
d9542189
...
...
@@ -1231,9 +1231,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if
(
Common
.
isNotNull
(
excel
.
getIsCollege
()))
{
if
(
CommonConstants
.
IS_TRUE
.
equals
(
excel
.
getIsCollege
()))
{
saveEmp
.
setIsCollege
(
CommonConstants
.
ONE_INT
);
if
(
Common
.
isEmpty
(
excel
.
getHignEducation
()))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_HIGH_EDUCATION_ERROR
,
excel
.
getEmpIdcard
()));
}
}
else
if
(
CommonConstants
.
IS_FALSE
.
equals
(
excel
.
getIsCollege
()))
{
saveEmp
.
setIsCollege
(
CommonConstants
.
ZERO_INT
);
}
else
{
...
...
@@ -1745,9 +1742,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if
(
Common
.
isNotNull
(
excel
.
getIsCollege
()))
{
if
(
CommonConstants
.
IS_TRUE
.
equals
(
excel
.
getIsCollege
()))
{
saveEmp
.
setIsCollege
(
CommonConstants
.
ONE_INT
);
if
(
Common
.
isEmpty
(
excel
.
getHignEducation
()))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_HIGH_EDUCATION_ERROR
,
excel
.
getEmpIdcard
()));
}
}
else
if
(
CommonConstants
.
IS_FALSE
.
equals
(
excel
.
getIsCollege
()))
{
saveEmp
.
setIsCollege
(
CommonConstants
.
ZERO_INT
);
}
else
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
d9542189
...
...
@@ -306,7 +306,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
tEmployeeInfo
))
{
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
empId
);
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeInfo
.
getId
()
);
//查询该人员所有的的项目档案
List
<
TEmployeeProject
>
list
=
this
.
list
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmployeeProject
.
getEmpIdcard
())
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
d9542189
...
...
@@ -243,7 +243,7 @@
AND a.EMP_CODE = #{tEmployeeProject.empCode}
</if>
<if
test=
"tEmployeeProject.empNatrue != null and tEmployeeProject.empNatrue.trim() != ''"
>
AND a.EMP_NATRUE
= #{tEmployeeProject.empNatrue}
AND a.EMP_NATRUE
in (${tEmployeeProject.empNatrue})
</if>
<if
test=
"tEmployeeProject.empName != null and tEmployeeProject.empName.trim() != ''"
>
AND a.EMP_NAME = #{tEmployeeProject.empName}
...
...
@@ -392,7 +392,7 @@
AND a.EMP_CODE = #{tEmployeeProject.empCode}
</if>
<if
test=
"tEmployeeProject.empNatrue != null and tEmployeeProject.empNatrue.trim() != ''"
>
AND a.EMP_NATRUE
= #{tEmployeeProject.empNatrue}
AND a.EMP_NATRUE
in (${tEmployeeProject.empNatrue})
</if>
<if
test=
"tEmployeeProject.empName != null and tEmployeeProject.empName.trim() != ''"
>
AND a.EMP_NAME = #{tEmployeeProject.empName}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/SysBaseSetInfoController.java
View file @
d9542189
...
...
@@ -101,8 +101,8 @@ public class SysBaseSetInfoController {
@SysLog
(
"新增基数设置表"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('social_sysbasesetinfo_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
SysBaseSetInfo
sysBaseSetInfo
)
{
return
R
.
ok
(
sysBaseSetInfoService
.
save
(
sysBaseSetInfo
)
);
public
R
<
String
>
save
(
@RequestBody
SysBaseSetInfo
sysBaseSetInfo
)
{
return
sysBaseSetInfoService
.
saveSysBase
(
sysBaseSetInfo
);
}
/**
...
...
@@ -115,8 +115,8 @@ public class SysBaseSetInfoController {
@SysLog
(
"修改基数设置表"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('social_sysbasesetinfo_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
SysBaseSetInfo
sysBaseSetInfo
)
{
return
R
.
ok
(
sysBaseSetInfoService
.
updateById
(
sysBaseSetInfo
)
);
public
R
<
String
>
updateById
(
@RequestBody
SysBaseSetInfo
sysBaseSetInfo
)
{
return
sysBaseSetInfoService
.
updateSysBase
(
sysBaseSetInfo
);
}
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/SysBaseSetInfoService.java
View file @
d9542189
...
...
@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.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.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
/**
...
...
@@ -36,4 +37,23 @@ public interface SysBaseSetInfoService extends IService<SysBaseSetInfo> {
* @return
*/
IPage
<
SysBaseSetInfo
>
getSysBaseSetInfoPage
(
Page
<
SysBaseSetInfo
>
page
,
SysBaseSetInfo
sysBaseSetInfo
);
/**
* @param sysBaseSetInfo
* @Description: 新增
* @Author: hgw
* @Date: 2022/7/12 10:00
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
saveSysBase
(
SysBaseSetInfo
sysBaseSetInfo
);
/**
* @param sysBaseSetInfo
* @Description: 修改
* @Author: hgw
* @Date: 2022/7/12 10:00
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
updateSysBase
(
SysBaseSetInfo
sysBaseSetInfo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TSocialLogService.java
View file @
d9542189
...
...
@@ -36,4 +36,18 @@ public interface TSocialLogService extends IService<TSocialLog> {
* @return
*/
IPage
<
TSocialLog
>
getTSocialLogPage
(
Page
<
TSocialLog
>
page
,
TSocialLog
tSocialLog
);
/**
* 生成修改记录
*
* @param type 类型:1社保基数配置;2公积金基数配置
* @param mainId 关联表id
* @param oldInfo
* @param newInfo
* @return
* @Author pwang
* @Date 2022-06-22 11:32
**/
<
T
>
TSocialLog
saveModificationRecord
(
Integer
type
,
String
mainId
,
T
oldInfo
,
T
newInfo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
View file @
d9542189
...
...
@@ -19,9 +19,15 @@ package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
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.social.entity.SysBaseSetInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.SysBaseSetInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.SysBaseSetInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSocialLogService
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
/**
...
...
@@ -30,8 +36,11 @@ import org.springframework.stereotype.Service;
* @author hgw
* @date 2022-07-11 18:21:23
*/
@RequiredArgsConstructor
@Service
public
class
SysBaseSetInfoServiceImpl
extends
ServiceImpl
<
SysBaseSetInfoMapper
,
SysBaseSetInfo
>
implements
SysBaseSetInfoService
{
private
final
TSocialLogService
tSocialLogService
;
/**
* 基数设置表简单分页查询
*
...
...
@@ -42,4 +51,24 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
public
IPage
<
SysBaseSetInfo
>
getSysBaseSetInfoPage
(
Page
<
SysBaseSetInfo
>
page
,
SysBaseSetInfo
sysBaseSetInfo
)
{
return
baseMapper
.
getSysBaseSetInfoPage
(
page
,
sysBaseSetInfo
);
}
@Override
public
R
<
String
>
saveSysBase
(
SysBaseSetInfo
sysBaseSetInfo
)
{
this
.
save
(
sysBaseSetInfo
);
return
R
.
ok
();
}
@Override
public
R
<
String
>
updateSysBase
(
SysBaseSetInfo
sysBaseSetInfo
)
{
SysBaseSetInfo
old
=
this
.
getById
(
sysBaseSetInfo
.
getId
());
if
(
old
==
null
||
Common
.
isEmpty
(
old
.
getId
()))
{
return
R
.
failed
(
"根据id未找到基数配置!"
+
sysBaseSetInfo
.
getId
());
}
this
.
updateById
(
sysBaseSetInfo
);
// 记录变更日志
tSocialLogService
.
saveModificationRecord
(
CommonConstants
.
ONE_INT
,
old
.
getId
(),
old
,
sysBaseSetInfo
);
return
R
.
ok
();
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialLogServiceImpl.java
View file @
d9542189
...
...
@@ -16,14 +16,22 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialLog
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialLogMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSocialLogService
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
static
com
.
alibaba
.
fastjson
.
serializer
.
SerializerFeature
.*;
/**
* 社保变更记录表
*
...
...
@@ -42,4 +50,42 @@ public class TSocialLogServiceImpl extends ServiceImpl<TSocialLogMapper, TSocial
public
IPage
<
TSocialLog
>
getTSocialLogPage
(
Page
<
TSocialLog
>
page
,
TSocialLog
tSocialLog
)
{
return
baseMapper
.
getTSocialLogPage
(
page
,
tSocialLog
);
}
/**
* @param type 类型:1社保基数配置;2公积金基数配置
* @param mainId
* @Description:
* @Author: hgw
* @Date: 2022/7/12 9:52
* @return: com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeLog
**/
@Override
public
<
T
>
TSocialLog
saveModificationRecord
(
Integer
type
,
String
mainId
,
T
oldInfo
,
T
newInfo
)
{
try
{
//比较记录不影响业务逻辑,用try套住
//比较差异
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
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
JSON
.
toJSON
(
oldInfo
)
+
"【新增社保变更记录】报错>>>"
,
e
);
}
return
null
;
}
private
SerializerFeature
[]
features
=
new
SerializerFeature
[]{
WriteMapNullValue
,
WriteNullNumberAsZero
,
WriteNullListAsEmpty
,
WriteNullStringAsEmpty
,
WriteDateUseDateFormat
};
}
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