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
a48aab16
Commit
a48aab16
authored
Jul 06, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huyc 项目档案代码提交
parent
c82fc54e
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
100 additions
and
46 deletions
+100
-46
EmployeeXProjectVO.java
...fu/cloud/plus/v1/yifu/archives/vo/EmployeeXProjectVO.java
+1
-1
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+78
-35
TElecEmployeeInfoMapper.xml
...biz/src/main/resources/mapper/TElecEmployeeInfoMapper.xml
+1
-4
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+8
-4
application-test.yml
yifu-auth/src/main/resources/application-test.yml
+1
-2
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+8
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+3
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeXProjectVO.java
View file @
a48aab16
...
...
@@ -80,5 +80,5 @@ public class EmployeeXProjectVO extends RowIndex implements Serializable {
@ExcelProperty
(
value
=
"是否同步减档"
)
@NotNull
(
message
=
"是否同步减档不能为空"
)
@ExcelAttribute
(
name
=
"是否同步减档"
,
isNotEmpty
=
true
,
errorInfo
=
"是否同步减档不能为空"
,
maxLength
=
1
)
private
Integer
isLeaveEmployee
;
private
String
isLeaveEmployee
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
a48aab16
...
...
@@ -90,6 +90,15 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
tEmployeeProject
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
//项目编码校验
TSettleDomain
tSettleDomain
=
tSettleDomainService
.
getOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
tEmployeeProject
.
getDeptNo
())
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
Common
.
isEmpty
(
tSettleDomain
))
{
return
R
.
failed
(
"未找到对应的项目,请核实"
);
}
//项目下已有身份证信息
TEmployeeProject
employeeProject
=
this
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmployeeProject
.
getEmpIdcard
())
...
...
@@ -103,14 +112,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return
R
.
failed
(
"姓名和身份证不一致,请确认后再次新增"
);
}
}
//项目编码校验
TSettleDomain
tSettleDomain
=
tSettleDomainService
.
getOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
tEmployeeProject
.
getDeptNo
())
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
Common
.
isEmpty
(
tSettleDomain
))
{
return
R
.
failed
(
"未找到对应的项目,请核实"
);
}
//项目状态为已减项
if
(
CommonConstants
.
dingleDigitIntArray
[
1
]
==
employeeProject
.
getProjectStatus
())
{
...
...
@@ -259,19 +260,39 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
String
code
=
""
;
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
this
.
updateById
(
tEmployeeProject
);
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
//查询该人员其他的项目档案
List
<
TEmployeeProject
>
list
=
this
.
list
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmployeeProject
.
getEmpIdcard
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
if
(
tEmployeeProject
.
getIsLeaveEmployee
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
if
(
Common
.
isNotNull
(
list
))
{
return
R
.
failed
(
"存在草稿/已审核的状态的项目,不允许同步减档"
);
}
code
=
CommonConstants
.
ONE_STRING
;
}
//从剩下的项目档案中查找员工类型并更新
setEmpNature
(
tEmployeeProject
.
getEmpIdcard
(),
tEmployeeInfo
);
if
(
Common
.
isNotNull
(
list
))
{
for
(
TEmployeeProject
t
:
list
)
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
t
.
getEmpNatrue
()))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ZERO_STRING
);
break
;
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
t
.
getEmpNatrue
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
tEmployeeInfo
.
getEmpNatrue
()))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ONE_STRING
);
break
;
}
}
}
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
this
.
updateById
(
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeProjectOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeInfoOld
,
tEmployeeProject
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
code
))
{
...
...
@@ -301,30 +322,45 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
if
(
excel
.
getIsLeaveEmployee
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
Long
count
=
this
.
count
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpId
,
tEmployeeProject
.
getEmpId
())
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
dingleDigitIntArray
[
0
]));
if
(
count
.
compareTo
(
CommonConstants
.
DEPT_TREE_ROOT_ID
)
>
0
)
{
if
(
tEmployeeProject
.
getInsuranceStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getSocialStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getFundStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
])
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
)));
}
}
else
{
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getIsLeaveEmployee
()))
{
//查询该人员其他的项目档案
List
<
TEmployeeProject
>
list
=
this
.
list
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
ne
(
TEmployeeProject:
:
getDeptNo
,
tEmployeeProject
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmployeeProject
.
getEmpIdcard
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
if
(
tEmployeeProject
.
getIsLeaveEmployee
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
if
(
Common
.
isNotNull
(
list
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
QT_PROJECT_CHANGE_NOT_EXIST
)));
}
else
{
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setLeaveReason
(
excel
.
getLeaveReason
());
tEmployeeInfo
.
setLeaveRemark
(
excel
.
getLeaveRemark
());
tEmployeeInfo
.
setLeaveTime
(
LocalDateTime
.
now
());
}
}
}
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeProject
.
setLeaveReason
(
excel
.
getLeaveReason
());
tEmployeeProject
.
setLeaveRemark
(
excel
.
getLeaveRemark
());
tEmployeeProject
.
setLeaveTime
(
LocalDateTime
.
now
());
this
.
updateById
(
tEmployeeProject
);
//从剩下的项目档案中查找员工类型并更新
setEmpNature
(
tEmployeeProject
.
getEmpIdcard
(),
tEmployeeInfo
);
setEmpNature
(
tEmployeeProject
.
getEmpIdcard
(),
tEmployeeInfo
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeProjectOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeInfoOld
,
tEmployeeProject
);
}
}
}
if
(
errorMessageList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
return
R
.
failed
(
errorMessageList
);
}
...
...
@@ -391,7 +427,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
/**
* 新增档案操作记录
*
* @param excelVOList
* @param errorMessageList
* @param
...
...
@@ -435,6 +470,15 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
idCardMap
.
put
(
idCard
.
concat
(
deptNo
),
i
+
2
);
}
//项目编码校验
TSettleDomain
tSettleDomain
=
tSettleDomainService
.
getOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
excel
.
getDeptNo
())
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
Common
.
isEmpty
(
tSettleDomain
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_SEARCH_NOT_EXIST
)));
}
//根据身份证获取人员档案
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
...
...
@@ -662,7 +706,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
insTEmployeePro
.
setDeptName
(
tSettleDomain
.
getDepartName
());
TCustomerInfo
tCustomerInfo
=
tCustomerInfoMapper
.
selectById
(
tSettleDomain
.
getCustomerId
());
if
(
Common
.
isNotNull
(
tCustomerInfo
))
{
;
insTEmployeePro
.
setUnitId
(
tCustomerInfo
.
getId
());
insTEmployeePro
.
setUnitNo
(
tCustomerInfo
.
getCustomerCode
());
insTEmployeePro
.
setUnitName
(
tCustomerInfo
.
getCustomerName
());
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TElecEmployeeInfoMapper.xml
View file @
a48aab16
...
...
@@ -48,7 +48,7 @@
a.EMP_IDCARD,
b.EMP_NO,
b.UNIT_NAME,
b.
deptNo
,
b.
DEPT_NO
,
b.DEPT_NAME,
a.DATA_TYPE,
a.ATTA_INFO,
...
...
@@ -72,9 +72,6 @@
<if
test=
"tElecEmployeeInfo.empIdcard != null and tElecEmployeeInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{tElecEmployeeInfo.empIdcard}
</if>
<if
test=
"tElecEmployeeInfo.empCode != null and tElecEmployeeInfo.empCode.trim() != ''"
>
AND b.EMP_CODE = #{tElecEmployeeInfo.empCode}
</if>
<if
test=
"tElecEmployeeInfo.unitName != null and tElecEmployeeInfo.unitName.trim() != ''"
>
AND b.UNIT_NAME like concat('%',#{tElecEmployeeInfo.unitName},'%')
</if>
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
a48aab16
...
...
@@ -595,12 +595,11 @@
ID=#{i.id}
</foreach>
</update>
<insert
id=
"insertExcelEmpProject"
parameterType=
"java.util.List"
>
insert into t_employee_project
(ID,EMP_ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,PROJECT_STATUS,EMP_CODE,DEPT_NO,CONTRACT_TYPE,POST,
EMP_NO,
TRY_PERIOD,ENJOIN_DATE,BANK_NAME,BANK_NO,BANK_SUB_NAME,DELETE_FLAG,CREATE_BY,CREATE_NAME,CREATE_TIME,INSURANCE_STATUS
,SOCIAL_STATUS,FUND_STATUS)
(ID,EMP_ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,PROJECT_STATUS,EMP_CODE,DEPT_NO,CONTRACT_TYPE,POST,
DEPT_ID,DEPT_NAME,UNIT_ID,UNIT_NAME,UNIT_NO,EMP_NO,TRY_PERIOD,ENJOIN_DATE,BANK_NAME,BANK_NO,BANK_SUB_NAME,
DELETE_FLAG,CREATE_BY,CREATE_NAME,CREATE_TIME,INSURANCE_STATUS
,SOCIAL_STATUS,FUND_STATUS)
VALUES
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
...
...
@@ -615,6 +614,11 @@
#{item.deptNo,jdbcType=VARCHAR},
#{item.contractType,jdbcType=VARCHAR},
#{item.post,jdbcType=VARCHAR},
#{item.deptId,jdbcType=VARCHAR},
#{item.deptName,jdbcType=VARCHAR},
#{item.unitId,jdbcType=VARCHAR},
#{item.unitName,jdbcType=VARCHAR},
#{item.unitNo,jdbcType=VARCHAR},
#{item.empNo,jdbcType=VARCHAR},
#{item.tryPeriod,jdbcType=VARCHAR},
#{item.enjoinDate,jdbcType=DATE},
...
...
yifu-auth/src/main/resources/application-test.yml
View file @
a48aab16
...
...
@@ -8,8 +8,7 @@ spring:
pathmatch
:
matching-strategy
:
ant_path_matcher
redis
:
host
:
192.168.1.65
port
:
22379
host
:
127.0.0.1
password
:
'
@yf_2017'
cloud
:
sentinel
:
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
a48aab16
...
...
@@ -295,6 +295,14 @@ public interface ErrorCodes {
* 人员在该项目下存在进行中/未完结的服务
*/
String
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
=
"archives.project.change.not.exist"
;
/**
* 存在其他草稿/已审核的状态的项目,不允许同步减档
*/
String
QT_PROJECT_CHANGE_NOT_EXIST
=
"qt.project.change.not.exist"
;
/**
* 未找到对应的项目,请核实
*/
String
PROJECT_SEARCH_NOT_EXIST
=
"project.search.not.exist"
;
/**
* 不良记录费用损失和其他损失不可同时为空
*/
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
a48aab16
...
...
@@ -98,6 +98,9 @@ archives.project.change.not.exist=\u4EBA\u5458\u5728\u8BE5\u9879\u76EE\u4E0B\u5B
archives.project.emp.lose.fee.not.empty
=
\u
4E0D
\u
826F
\u
8BB0
\u
5F55
\u
8D39
\u7528\u
635F
\u5931\u
548C
\u5176\u
4ED6
\u
635F
\u5931\u
4E0D
\u
53EF
\u
540C
\u
65F6
\u
4E3A
\u
7A7A
qt.project.change.not.exist
=
\u
5B58
\u5728\u5176\u
4ED6
\u8349\u
7A3F/
\u
5DF2
\u
5BA1
\u6838\u7684\u
72B6
\u6001\u7684\u9879\u
76EE
\u
FF0C
\u
4E0D
\u5141\u
8BB8
\u
540C
\u
6B65
\u
51CF
\u6863
project.search.not.exist
=
\u
672A
\u
627E
\u5230\u
5BF9
\u
5E94
\u7684\u9879\u
76EE
\u
FF0C
\u
8BF7
\u6838\u
5B9E
...
...
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