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
25c396b5
Commit
25c396b5
authored
Nov 22, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
0ff98dd3
739a5365
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
109 additions
and
42 deletions
+109
-42
EmployeeConstants.java
...ud/plus/v1/yifu/archives/constants/EmployeeConstants.java
+1
-3
TEmployeeProjectMapper.java
.../plus/v1/yifu/archives/mapper/TEmployeeProjectMapper.java
+2
-0
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+17
-25
DoJointTask.java
...m/yifu/cloud/plus/v1/yifu/archives/utils/DoJointTask.java
+18
-4
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+33
-1
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+38
-9
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/EmployeeConstants.java
View file @
25c396b5
...
...
@@ -48,6 +48,7 @@ public class EmployeeConstants {
public
static
final
String
CONTRACT_START_EMPTY
=
"起始日期不能为空"
;
public
static
final
String
POST_EMPTY
=
"合同岗位不能为空"
;
public
static
final
String
WORKING_HOURS_EMPTY
=
"工时制不能为空"
;
public
static
final
String
EXIT_PRIJECT_STATUS
=
"人员已有该项目信息,禁止重复添加"
;
public
static
final
String
CONTRACT_REDUCE_INFO_NOT_EMPTY
=
"合同终止时离职日期和减少原因必填"
;
...
...
@@ -55,9 +56,6 @@ public class EmployeeConstants {
* 无数据可更新
**/
public
static
final
String
NO_DATA_UPDATE
=
"无数据可更新"
;
public
static
final
String
NO_DATA
=
"无数据"
;
public
static
final
String
FILE_EXPORT_EXCEPTION
=
"档案导出异常"
;
public
static
final
String
CONCART_EXPORT_EXCEPTION
=
"合同导出异常"
;
public
static
final
String
CONCART_ALL_EXPORT_EXCEPTION
=
"合同[合并]导出异常"
;
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeProjectMapper.java
View file @
25c396b5
...
...
@@ -40,6 +40,8 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
void
updateExcelEmpProject
(
@Param
(
"list"
)
List
<
TEmployeeProject
>
list
);
void
updateReduceEmpProject
(
@Param
(
"list"
)
List
<
TEmployeeProject
>
list
);
int
insertExcelEmpProject
(
@Param
(
"list"
)
List
<
TEmployeeProject
>
list
);
void
updateEmpIdById
(
@Param
(
"list"
)
List
<
TEmployeeInfo
>
list
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
25c396b5
...
...
@@ -582,7 +582,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
else
{
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeProject
.
setLeaveReason
(
excel
.
getLeaveReason
());
tEmployeeProject
.
setLeaveRemark
(
excel
.
getLeaveRemark
());
tEmployeeProject
.
setLeaveTime
(
LocalDateTime
.
now
());
...
...
@@ -607,17 +606,17 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return
R
.
failed
(
errorMessageList
);
}
else
{
//更新项目档案
if
(
updProjectList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
]
)
{
this
.
updateBatchById
(
updProjectList
);
if
(
!
updProjectList
.
isEmpty
()
)
{
baseMapper
.
updateReduceEmpProject
(
updProjectList
);
}
//更新人员档案
if
(
updList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
]
)
{
if
(
!
updList
.
isEmpty
()
)
{
List
<
TEmployeeInfo
>
updEmpInfoList
=
updList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
YifuUser
user
=
SecurityUtils
.
getUser
();
doJointTask
.
doUpdateEmployeeInfo
(
updEmpInfoList
,
user
);
}
// 记录变更日志
if
(
updateProjectList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
]
)
{
if
(
!
updateProjectList
.
isEmpty
()
)
{
for
(
EmployeeProjectNewOldVO
newOldVO
:
updateProjectList
)
{
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
]
,
""
,
newOldVO
.
getNewProjectEmployee
().
getId
()
...
...
@@ -727,7 +726,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
}
if
(
idCardMap
.
get
(
idCard
.
concat
(
deptNo
))
!=
null
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"第"
+
(
excel
.
getRowIndex
())
+
"行身份证号+项目编码与第"
+
idCardMap
.
get
(
idCard
)
+
"行重复!"
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"第"
+
(
excel
.
getRowIndex
())
+
"行身份证号+项目编码与第"
+
idCardMap
.
get
(
idCard
)
+
"行重复!"
));
}
else
{
idCardMap
.
put
(
idCard
.
concat
(
deptNo
),
i
+
2
);
}
...
...
@@ -751,11 +751,15 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
//状态为草稿、已审核
if
(
Common
.
isNotNull
(
tEmployeeProject
)
&&
(
CommonConstants
.
dingleDigitIntArray
[
0
]
==
tEmployeeProject
.
getStatus
()
||
CommonConstants
.
dingleDigitIntArray
[
1
]
==
tEmployeeProject
.
getStatus
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeConstants
.
EXIT_PRIJECT_STATUS
));
}
//不存在复档或复项的情况
//档案无(在档人员、离职库皆无),项目无
if
(
Common
.
isEmpty
(
tEmployeeInfo
)
&&
Common
.
isEmpty
(
tEmployeeProject
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_EXIT_EMPPROJECT_ERROR
)));
//档案有(在档人员),项目无
}
else
if
(
Common
.
isNotNull
(
tEmployeeInfo
)
&&
Common
.
isEmpty
(
tEmployeeProject
)
&&
CommonConstants
.
dingleDigitIntArray
[
0
]
==
tEmployeeInfo
.
getFileStatus
())
{
...
...
@@ -845,14 +849,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if
(
CollUtil
.
isEmpty
(
errorMessageList
))
{
try
{
if
(
updateList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
]
)
{
if
(
!
updateList
.
isEmpty
()
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
doJointTask
.
doUpdateEmployeeInfo
(
updateList
,
user
);
}
if
(
proInsList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
]
)
{
baseMapper
.
insertExcelEmpProject
(
proInsList
);
if
(
!
proInsList
.
isEmpty
()
)
{
doJointTask
.
insertExcelEmpProject
(
proInsList
);
}
if
(
proupdateList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
]
)
{
if
(
!
proupdateList
.
isEmpty
()
)
{
baseMapper
.
updateExcelEmpProject
(
proupdateList
);
}
}
catch
(
Exception
e
)
{
...
...
@@ -1103,12 +1107,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if
(
CollUtil
.
isNotEmpty
(
errorList
))
{
return
R
.
failed
(
errorList
);
}
else
{
if
(
updList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
]
)
{
if
(
!
updList
.
isEmpty
()
)
{
for
(
TEmployeeProject
tEmployeeProject
:
updList
)
{
baseMapper
.
updateById
(
tEmployeeProject
);
}
}
if
(
infoUpdList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
]
)
{
if
(
!
infoUpdList
.
isEmpty
()
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
doJointTask
.
doUpdateEmployeeInfo
(
infoUpdList
,
user
);
}
...
...
@@ -1236,18 +1240,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
baseMapper
.
insert
(
tEmployeeProject
);
}
/**
* 获取导出的项目档案列表
*/
private
List
<
EmployeeProjectExportVO
>
gettEmpProInfoExportVos
(
String
idstr
,
EmployeeProjectExportParamVO
projectDTO
)
{
List
<
EmployeeProjectExportVO
>
list
;
if
(!
Common
.
isEmpty
(
idstr
))
{
projectDTO
.
setIdList
(
Common
.
initStrToList
(
idstr
,
CommonConstants
.
COMMA_STRING
));
}
list
=
baseMapper
.
getTEmployeeProjectExportPage
(
projectDTO
);
return
list
;
}
/**
* 更新人员档案
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/utils/DoJointTask.java
View file @
25c396b5
...
...
@@ -4,9 +4,9 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService
;
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.vo.YifuUser
;
...
...
@@ -33,7 +33,7 @@ public class DoJointTask {
private
TEmployeeInfoService
tEmployeeInfoService
;
@Autowired
private
TEmployeeProject
Service
tEmployeeProjectService
;
private
TEmployeeProject
Mapper
tEmployeeProjectMapper
;
@Autowired
private
TEmployeeLogService
tEmployeeLogService
;
...
...
@@ -51,7 +51,7 @@ public class DoJointTask {
for
(
TEmployeeInfo
tEmployeeInfo:
tEmployeeInfoList
)
{
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoService
.
getById
(
tEmployeeInfo
.
getId
());
//查询该人员所有的项目档案
List
<
TEmployeeProject
>
list
=
tEmployeeProject
Service
.
l
ist
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
List
<
TEmployeeProject
>
list
=
tEmployeeProject
Mapper
.
selectL
ist
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmployeeInfo
.
getEmpIdcard
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
...
...
@@ -93,7 +93,7 @@ public class DoJointTask {
for
(
TEmployeeInfo
tEmployeeInfo:
tEmployeeInfoList
)
{
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoService
.
getById
(
tEmployeeInfo
.
getId
());
//查询该人员所有的项目档案
List
<
TEmployeeProject
>
list
=
tEmployeeProject
Service
.
l
ist
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
List
<
TEmployeeProject
>
list
=
tEmployeeProject
Mapper
.
selectL
ist
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmployeeInfo
.
getEmpIdcard
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
...
...
@@ -120,4 +120,18 @@ public class DoJointTask {
log
.
info
(
"法大大档案-批量更新人员档案结束"
);
}
/**
* @Description: 批量插入项目档案
* @Author: huyc
* @Date: 2022-11-22
* @return: void
**/
@Async
public
void
insertExcelEmpProject
(
List
<
TEmployeeProject
>
proInsList
)
{
try
{
tEmployeeProjectMapper
.
insertExcelEmpProject
(
proInsList
);
}
catch
(
Exception
e
)
{
log
.
error
(
"档案-批量插入项目档案错误"
,
e
);
}
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
25c396b5
...
...
@@ -727,7 +727,39 @@
)
</foreach>
</insert>
<update
id=
"updateReduceEmpProject"
parameterType=
"java.util.List"
>
update t_employee_project
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"LEAVE_TIME =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
when ID=#{i.id} then now()
</foreach>
</trim>
<trim
prefix=
"LEAVE_REASON =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.leaveReason!=null"
>
when ID=#{i.id} then #{i.leaveReason}
</if>
</foreach>
</trim>
<trim
prefix=
"LEAVE_REMARK =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.leaveRemark!=null"
>
when ID=#{i.id} then #{i.leaveRemark}
</if>
</foreach>
</trim>
<trim
prefix=
"PROJECT_STATUS =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
when ID=#{i.id} then 1
</foreach>
</trim>
</trim>
where
<foreach
collection=
"list"
separator=
"or"
item=
"i"
index=
"index"
>
ID=#{i.id}
</foreach>
</update>
<!--查询部门编码和最大员工数-->
<select
id=
"findEmployeeMaxOnlyNoByDepId"
resultType=
"java.lang.String"
>
SELECT
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
25c396b5
...
...
@@ -277,7 +277,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
this
.
saveIncome
(
tIncomeDetail
);
}
else
{
// 核心判断
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
);
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
,
null
);
}
}
...
...
@@ -313,7 +313,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
// 核心判断
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
);
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
,
paymentInfo
);
}
}
...
...
@@ -570,10 +570,15 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @Date: 2022/9/2 10:22
* @return: boolean
**/
private
boolean
copyCore
(
TIncomeDetail
tIncomeDetail
,
List
<
TIncome
>
incomeList
,
List
<
TIncomeDetail
>
detailList
)
{
private
boolean
copyCore
(
TIncomeDetail
tIncomeDetail
,
List
<
TIncome
>
incomeList
,
List
<
TIncomeDetail
>
detailList
,
TPaymentInfo
paymentInfo
)
{
// 判断,比例,直接加
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tIncomeDetail
.
getFeeMode
()))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
else
{
Map
<
String
,
Integer
>
numMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
incomeMap
=
new
HashMap
<>();
...
...
@@ -625,11 +630,21 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tIncomeDetail
.
getRedData
()))
{
if
(
incomeMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
==
null
||
incomeMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
<=
CommonConstants
.
ZERO_INT
)
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
else
{
// 红冲判断:当本类型是最大值,才可以红冲
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
);
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
// 商险。收费方式:2金额-人数
...
...
@@ -637,10 +652,20 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tIncomeDetail
.
getRedData
()))
{
if
(
insureMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
==
null
||
insureMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
<=
CommonConstants
.
ZERO_INT
)
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
else
{
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
);
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
}
else
{
// 各个模式累加逻辑:
...
...
@@ -651,8 +676,12 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
CommonConstants
.
TWO_STRING
.
equals
(
tIncomeDetail
.
getFeeMode
()))
{
if
(
incomeMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
==
null
||
incomeMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
<=
CommonConstants
.
ZERO_INT
)
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
else
{
// 3金额-人次
// 各个模式累加逻辑:
...
...
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