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
c8ba7ef0
You need to sign in or sign up before continuing.
Commit
c8ba7ef0
authored
Aug 23, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.6.9' into MVP1.6.9
parents
6e21cc82
a229403c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
136 additions
and
7 deletions
+136
-7
TPreEmpMainSearchVo.java
...u/cloud/plus/v1/yifu/archives/vo/TPreEmpMainSearchVo.java
+6
-2
TEmployeeInfoController.java
.../v1/yifu/archives/controller/TEmployeeInfoController.java
+26
-0
TEmployeeInfoMapper.java
...oud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
+3
-0
TEmployeeInfoService.java
...d/plus/v1/yifu/archives/service/TEmployeeInfoService.java
+3
-0
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+14
-0
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+29
-0
TPreEmpMainMapper.xml
...hives-biz/src/main/resources/mapper/TPreEmpMainMapper.xml
+6
-0
DateUtil.java
...om/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
+2
-1
TDispatchImportVo.java
.../yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
+1
-2
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+46
-2
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TPreEmpMainSearchVo.java
View file @
c8ba7ef0
...
@@ -20,8 +20,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpMain;
...
@@ -20,8 +20,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpMain;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
/**
* 预入职-主表
* 预入职-主表
*
*
...
@@ -49,4 +47,10 @@ public class TPreEmpMainSearchVo extends TPreEmpMain {
...
@@ -49,4 +47,10 @@ public class TPreEmpMainSearchVo extends TPreEmpMain {
@Schema
(
description
=
"查询limit 数据条数"
)
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
private
int
limitEnd
;
/**
* 状态多选
*/
@Schema
(
description
=
"状态"
)
private
String
[]
statusList
;
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeInfoController.java
View file @
c8ba7ef0
...
@@ -91,6 +91,20 @@ public class TEmployeeInfoController {
...
@@ -91,6 +91,20 @@ public class TEmployeeInfoController {
return
R
.
ok
(
tEmployeeInfoService
.
getPage
(
page
,
tEmployeeInfo
));
return
R
.
ok
(
tEmployeeInfoService
.
getPage
(
page
,
tEmployeeInfo
));
}
}
/**
* 分页查询
*
* @param page 分页对象
* @param tEmployeeInfo 人员档案表
* @return
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/pageAsso"
)
public
R
<
IPage
<
TEmployeeInfo
>>
getTEmployeeInfoPagepageAsso
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
tEmployeeInfo
)
{
return
R
.
ok
(
tEmployeeInfoService
.
getPageAsso
(
page
,
tEmployeeInfo
));
}
/**
/**
* 分页查询
* 分页查询
*
*
...
@@ -505,4 +519,16 @@ public class TEmployeeInfoController {
...
@@ -505,4 +519,16 @@ public class TEmployeeInfoController {
return
tEmployeeInfoService
.
getHcmEmpInfoList
(
idCardList
);
return
tEmployeeInfoService
.
getHcmEmpInfoList
(
idCardList
);
}
}
/**
* @Author fxj
* @Description 每年1月1号刷新在职和离职人员的年龄信息 公式:当前年-出生年
* @Date 17:29 2024/8/21
**/
@Operation
(
summary
=
"每年1月1号刷新在职和离职人员的年龄信息"
,
description
=
"每年1月1号刷新在职和离职人员的年龄信息"
)
@Inner
@PostMapping
(
"/inner/updateEmployeeAgeTask"
)
public
void
updateEmployeeAgeTask
()
{
tEmployeeInfoService
.
updateEmployeeAgeTask
();
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
View file @
c8ba7ef0
...
@@ -38,6 +38,8 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
...
@@ -38,6 +38,8 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
IPage
<
TEmployeeInfo
>
getPageAsso
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
long
getLeavePageCount
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
long
getLeavePageCount
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
List
<
TEmployeeInfo
>
getLeavePage
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
,
@Param
(
"page"
)
Long
page
,
@Param
(
"size"
)
Long
size
);
List
<
TEmployeeInfo
>
getLeavePage
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
,
@Param
(
"page"
)
Long
page
,
@Param
(
"size"
)
Long
size
);
...
@@ -134,4 +136,5 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
...
@@ -134,4 +136,5 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
// hgw 2023-11-23 11:38:00 HCM获取人员信息列表
// hgw 2023-11-23 11:38:00 HCM获取人员信息列表
List
<
HcmEmployeeInfoVO
>
getHcmEmpInfoList
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
);
List
<
HcmEmployeeInfoVO
>
getHcmEmpInfoList
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
);
void
updateEmployeeAgeTask
();
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeInfoService.java
View file @
c8ba7ef0
...
@@ -253,4 +253,7 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
...
@@ -253,4 +253,7 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
**/
**/
R
<
List
<
HcmEmployeeInfoVO
>>
getHcmEmpInfoList
(
List
<
String
>
idCardList
);
R
<
List
<
HcmEmployeeInfoVO
>>
getHcmEmpInfoList
(
List
<
String
>
idCardList
);
void
updateEmployeeAgeTask
();
IPage
<
TEmployeeInfo
>
getPageAsso
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
tEmployeeInfo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
c8ba7ef0
...
@@ -2603,4 +2603,18 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
...
@@ -2603,4 +2603,18 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
vo
.
setContract
(
baseMapper
.
getHcmContractVo
(
idCard
));
vo
.
setContract
(
baseMapper
.
getHcmContractVo
(
idCard
));
return
vo
;
return
vo
;
}
}
/**
* @Author fxj
* @Description 每年1月1号刷新在职和离职人员的年龄信息 公式:当前年-出生年
* @Date 17:30 2024/8/21
**/
@Override
public
void
updateEmployeeAgeTask
()
{
baseMapper
.
updateEmployeeAgeTask
();
}
@Override
public
IPage
<
TEmployeeInfo
>
getPageAsso
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
)
{
return
baseMapper
.
getPageAsso
(
page
,
employeeInfo
);
}
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
c8ba7ef0
...
@@ -562,6 +562,30 @@
...
@@ -562,6 +562,30 @@
</if>
</if>
order by a.CREATE_TIME desc
order by a.CREATE_TIME desc
</select>
</select>
<!-- fxj 2024-08-23 身份证/姓名 下拉选择 查询 在职和离职数据 -->
<select
id=
"getPageAsso"
resultMap=
"tEmployeeInfoMap"
>
select
a.EMP_NAME,
a.EMP_IDCARD
from t_employee_info a
where 1=1
<if
test=
"tEmployeeInfo != null"
>
<if
test=
"tEmployeeInfo.empName != null and tEmployeeInfo.empName.trim() != ''"
>
AND a.EMP_NAME like concat('%',#{tEmployeeInfo.empName},'%')
</if>
<if
test=
"tEmployeeInfo.empIdcard != null and tEmployeeInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD like concat('%',#{tEmployeeInfo.empIdcard},'%')
</if>
</if>
<if
test=
"tEmployeeInfo.nameOrIdcard != null and tEmployeeInfo.nameOrIdcard.trim() != ''"
>
AND (
a.EMP_NAME like concat(#{tEmployeeInfo.nameOrIdcard},'%')
or
a.EMP_IDCARD like concat(#{tEmployeeInfo.nameOrIdcard},'%')
)
</if>
order by a.CREATE_TIME desc
</select>
<!-- hgw 分页查询 -->
<!-- hgw 分页查询 -->
<select
id=
"getLeavePage"
resultMap=
"tEmployeeExportMap"
>
<select
id=
"getLeavePage"
resultMap=
"tEmployeeExportMap"
>
...
@@ -1330,4 +1354,9 @@
...
@@ -1330,4 +1354,9 @@
</foreach>
</foreach>
</select>
</select>
<!-- 员工年龄+1 定时任务方法 专用 -->
<update
id=
"updateEmployeeAgeTask"
>
update t_employee_info set EMP_AGE = YEAR(CURRENT_DATE())-YEAR(STR_TO_DATE(SUBSTRING(EMP_IDCARD,7,4),'%Y')) where EMP_IDCARD is not null and DELETE_FLAG='0' and SUBSTRING(EMP_IDCARD,7,1) in ('1','2')
</update>
</mapper>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TPreEmpMainMapper.xml
View file @
c8ba7ef0
...
@@ -85,6 +85,12 @@
...
@@ -85,6 +85,12 @@
</sql>
</sql>
<sql
id=
"tPreEmpMain_where"
>
<sql
id=
"tPreEmpMain_where"
>
<if
test=
"tPreEmpMain != null"
>
<if
test=
"tPreEmpMain != null"
>
<if
test=
"tPreEmpMain.statusList != null and tPreEmpMain.statusList.length>0"
>
AND a.STATUS IN
<foreach
collection=
"tPreEmpMain.statusList"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"tPreEmpMain.id != null and tPreEmpMain.id.trim() != ''"
>
<if
test=
"tPreEmpMain.id != null and tPreEmpMain.id.trim() != ''"
>
AND a.ID = #{tPreEmpMain.id}
AND a.ID = #{tPreEmpMain.id}
</if>
</if>
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
View file @
c8ba7ef0
...
@@ -1538,12 +1538,13 @@ public class DateUtil {
...
@@ -1538,12 +1538,13 @@ public class DateUtil {
* @Author: hgw
* @Author: hgw
* @Date: 2022/6/24 16:49
* @Date: 2022/6/24 16:49
* @return: int
* @return: int
* update 2024-08-21 fxj thisYear - years +1 调整为 thisYear - years
**/
**/
public
static
int
getAge
(
int
years
){
public
static
int
getAge
(
int
years
){
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
DateUtil
.
DATETIME_YYYY
);
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
DateUtil
.
DATETIME_YYYY
);
Date
nowDate
=
new
Date
();
Date
nowDate
=
new
Date
();
int
thisYear
=
Integer
.
parseInt
(
sf
.
format
(
nowDate
));
int
thisYear
=
Integer
.
parseInt
(
sf
.
format
(
nowDate
));
return
thisYear
-
years
+
1
;
return
thisYear
-
years
;
}
}
/**
/**
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
View file @
c8ba7ef0
...
@@ -273,8 +273,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
...
@@ -273,8 +273,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
/**
/**
* 学历名称
* 学历名称
*/
*/
@ExcelAttribute
(
name
=
"学历"
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"学历"
,
isNotEmpty
=
false
)
@NotNull
(
message
=
"学历不可为空"
)
@Schema
(
description
=
"学历:派增只做记录"
)
@Schema
(
description
=
"学历:派增只做记录"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"学历"
)
@ExcelProperty
(
value
=
"学历"
)
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
c8ba7ef0
...
@@ -2315,7 +2315,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -2315,7 +2315,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
||
Common
.
isEmpty
(
excel
.
getEmpMobile
())
||
Common
.
isEmpty
(
excel
.
getEmpMobile
())
||
Common
.
isEmpty
(
excel
.
getEmpType
())
||
Common
.
isEmpty
(
excel
.
getEmpType
())
||
Common
.
isEmpty
(
excel
.
getPost
())
||
Common
.
isEmpty
(
excel
.
getPost
())
//|| Common.isEmpty(excel.getEducationName())
||
Common
.
isEmpty
(
excel
.
getEmpRegisType
())
//无档案必填2024-08-21 fxj
||
Common
.
isEmpty
(
excel
.
getEducationName
())
//无档案必填2024-08-21 fxj
||
Common
.
isEmpty
(
excel
.
getContractName
())){
||
Common
.
isEmpty
(
excel
.
getContractName
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_NOT_EMPTY
)));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_NOT_EMPTY
)));
return
true
;
return
true
;
...
@@ -2403,7 +2404,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -2403,7 +2404,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excel
.
setIdCardCity
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
excel
.
setIdCardCity
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
excel
.
setIdCardTown
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
excel
.
setIdCardTown
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
excel
.
setEmpNational
(
empVo
.
getEmpNational
());
excel
.
setEmpNational
(
empVo
.
getEmpNational
());
excel
.
setEmpRegisType
(
empVo
.
getEmpRegisType
());
if
(
Common
.
isNotNull
(
empVo
.
getEmpRegisType
())){
//如果档案有值直接取值档案 2024-08-21 fxj
excel
.
setEmpRegisType
(
empVo
.
getEmpRegisType
());
}
//派单学历无值时,如果档案有值直接取值档案 2024-08-21 fxj
initEducation
(
excel
,
empVo
);
if
(
Common
.
isEmpty
(
excel
.
getPost
())){
if
(
Common
.
isEmpty
(
excel
.
getPost
())){
excel
.
setPost
(
empVo
.
getPost
());
excel
.
setPost
(
empVo
.
getPost
());
}
}
...
@@ -2553,6 +2559,44 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -2553,6 +2559,44 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
false
;
return
false
;
}
}
private
void
initEducation
(
TDispatchImportVo
excel
,
DispatchEmpVo
empVo
)
{
if
(
Common
.
isNotNull
(
empVo
.
getHignEducation
())){
if
(
empVo
.
getHignEducation
().
equals
(
"1"
))
{
excel
.
setEducationName
(
"文盲"
);
}
if
(
empVo
.
getHignEducation
().
equals
(
"2"
))
{
excel
.
setEducationName
(
"小学"
);
}
if
(
empVo
.
getHignEducation
().
equals
(
"3"
))
{
excel
.
setEducationName
(
"初中"
);
}
if
(
empVo
.
getHignEducation
().
equals
(
"4"
))
{
excel
.
setEducationName
(
"高中"
);
}
if
(
empVo
.
getHignEducation
().
equals
(
"5"
))
{
excel
.
setEducationName
(
"大专"
);
}
if
(
empVo
.
getHignEducation
().
equals
(
"6"
))
{
excel
.
setEducationName
(
"本科"
);
}
if
(
empVo
.
getHignEducation
().
equals
(
"7"
))
{
excel
.
setEducationName
(
"硕士"
);
}
if
(
excel
.
getEducationName
().
equals
(
"8"
))
{
excel
.
setEducationName
(
"博士"
);
}
if
(
empVo
.
getHignEducation
().
equals
(
"9"
))
{
excel
.
setEducationName
(
"技工"
);
}
if
(
empVo
.
getHignEducation
().
equals
(
"10"
))
{
excel
.
setEducationName
(
"职高"
);
}
if
(
empVo
.
getHignEducation
().
equals
(
"11"
))
{
excel
.
setEducationName
(
"中专"
);
}
}
}
/**
/**
* @param errorMessageList
* @param errorMessageList
* @param excel
* @param excel
...
...
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