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
03546ea1
Commit
03546ea1
authored
Jul 06, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huyc 项目档案代码提交
parent
7bc9d6db
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
6 deletions
+63
-6
TEmpChangeInfoVO.java
...yifu/cloud/plus/v1/yifu/archives/vo/TEmpChangeInfoVO.java
+10
-2
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+26
-4
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+1
-0
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+3
-0
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+17
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+6
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TEmpChangeInfoVO.java
View file @
03546ea1
...
...
@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
...
...
@@ -38,14 +39,16 @@ public class TEmpChangeInfoVO implements Serializable {
/**
* 员工姓名
*/
@NotNull
(
message
=
"员工姓名不可为空"
)
@NotNull
(
message
=
"员工姓名不能为空"
)
@ExcelAttribute
(
name
=
"员工姓名"
,
isNotEmpty
=
true
,
errorInfo
=
"员工姓名不能为空"
,
maxLength
=
20
)
@ExcelProperty
(
value
=
"员工姓名"
)
private
String
empName
;
/**
* 身份证号
*/
@NotNull
(
message
=
"身份证号不可为空"
)
@NotNull
(
message
=
"身份证号不能为空"
)
@ExcelAttribute
(
name
=
"身份证号"
,
isNotEmpty
=
true
,
errorInfo
=
"身份证号不能为空"
,
maxLength
=
20
)
@ExcelProperty
(
value
=
"身份证号"
)
private
String
empIdcard
;
...
...
@@ -53,18 +56,23 @@ public class TEmpChangeInfoVO implements Serializable {
* 原项目编码
*/
@ExcelProperty
(
value
=
"原项目编码"
)
@NotNull
(
message
=
"原项目编码不能为空"
)
@ExcelAttribute
(
name
=
"原项目编码"
,
isNotEmpty
=
true
,
errorInfo
=
"原项目编码不能为空"
,
maxLength
=
20
)
private
String
oldSettleCode
;
/**
* 新项目编码
*/
@ExcelProperty
(
value
=
"新项目编码"
)
@NotNull
(
message
=
"新项目编码不能为空"
)
@ExcelAttribute
(
name
=
"新项目编码"
,
isNotEmpty
=
true
,
errorInfo
=
"新项目编码不能为空"
,
maxLength
=
20
)
private
String
newSettleCode
;
/**
* 已产生未结算费用 0:划转 1:不划转
*/
@ExcelProperty
(
value
=
"已产生未结算费用"
)
@NotNull
(
message
=
"已产生未结算费用不能为空"
)
private
String
unsettleDeal
;
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
03546ea1
...
...
@@ -115,6 +115,26 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
errorMsg
=
new
HashSet
<>();
TEmpChangeInfoVO
excel
=
excelVOList
.
get
(
i
);
Calendar
calendar
=
Calendar
.
getInstance
();
int
month
=
calendar
.
get
(
Calendar
.
MONTH
)
+
1
;
if
(
excel
.
getUnsettleDeal
().
equals
(
CommonConstants
.
IS_CHANGE
))
{
if
(
Common
.
isEmpty
(
excel
.
getChangeStartMonth
()))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHANGE_START_MONTH_EXIT
,
excel
.
getNewSettleCode
()));
}
else
if
(
Integer
.
parseInt
(
excel
.
getChangeStartMonth
())
>
month
)
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHANGE_LESS_MONTH_EXIT
,
excel
.
getNewSettleCode
()));
}
}
//项目编码校验
TSettleDomain
tSettleDomain
=
tSettleDomainService
.
getOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
excel
.
getNewSettleCode
())
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
Common
.
isEmpty
(
tSettleDomain
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_SEARCH_NOT_EXIST
,
excel
.
getNewSettleCode
()));
}
//待划转员工已在目标结算主体下不可划转
TEmployeeProject
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getNewSettleCode
())
...
...
@@ -129,14 +149,14 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getOldSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
updateTEmployeePro
))
{
TSettleDomain
tSettleDomain
=
tSettleDomainService
.
getOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
updateTEmployeePro
.
getDeptNo
()).
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
updateTEmployeePro
.
getProjectStatus
()))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_DELETE_EXIT
,
excel
.
getOldSettleCode
()
));
}
else
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
updateTEmployeePro
.
setDeptNo
(
tSettleDomain
.
getDepartNo
());
updateTEmployeePro
.
setDeptId
(
tSettleDomain
.
getId
());
updateTEmployeePro
.
setDeptName
(
tSettleDomain
.
getDepartName
());
TCustomerInfo
tCustomerInfo
=
tCustomerInfoService
.
getById
(
tSettleDomain
.
getCustomerId
());
if
(
Common
.
isNotNull
(
tCustomerInfo
))
{;
if
(
Common
.
isNotNull
(
tCustomerInfo
))
{
updateTEmployeePro
.
setUnitId
(
tCustomerInfo
.
getId
());
updateTEmployeePro
.
setUnitNo
(
tCustomerInfo
.
getCustomerCode
());
updateTEmployeePro
.
setUnitName
(
tCustomerInfo
.
getCustomerName
());
...
...
@@ -146,6 +166,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
TEmployeeProject
tEmployeeProjectOld
=
tEmployeeProjectService
.
getById
(
updateTEmployeePro
.
getId
());
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProjectOld
.
getId
(),
tEmployeeProjectOld
,
updateTEmployeePro
);
}
}
else
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_SEARCH_EXIT
,
excel
.
getOldSettleCode
()));
}
}
else
{
// 数据不合法
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
03546ea1
...
...
@@ -275,6 +275,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if
(
Common
.
isNotNull
(
list
))
{
return
R
.
failed
(
"存在草稿/已审核的状态的项目,不允许同步减档"
);
}
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
code
=
CommonConstants
.
ONE_STRING
;
}
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
03546ea1
...
...
@@ -317,4 +317,7 @@ public interface CommonConstants {
* @author fxj
*/
int
THREE_INT_NEGATE
=
-
3
;
// 是否
String
IS_CHANGE
=
"划转"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
03546ea1
...
...
@@ -307,4 +307,21 @@ public interface ErrorCodes {
* 不良记录费用损失和其他损失不可同时为空
*/
String
ARCHIVES_PROJECT_EMP_LOSE_FEE_NOT_EMPTY
=
"archives.project.emp.lose.fee.not.empty"
;
/**
* 划转起始月不能为空
*/
String
CHANGE_START_MONTH_EXIT
=
"change.strat.month.exit"
;
/**
* 划转起始月要小于等于当前月
*/
String
CHANGE_LESS_MONTH_EXIT
=
"change.less.month.exit"
;
/**
* 未找到该人员的项目档案,请核实
*/
String
PROJECT_PERSON_SEARCH_EXIT
=
"project.person.search.exit"
;
/**
* 该人员项目档案已减项,不允许划转
*/
String
PROJECT_PERSON_DELETE_EXIT
=
"project.person.delete.exit"
;
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
03546ea1
...
...
@@ -101,6 +101,12 @@ archives.project.emp.lose.fee.not.empty=\u4E0D\u826F\u8BB0\u5F55\u8D39\u7528\u63
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
change.strat.month.exit
=
\u5212\u
8F6C
\u
8D77
\u
59CB
\u6708\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
change.less.month.exit
=
\u5212\u
8F6C
\u
8D77
\u
59CB
\u6708\u8981\u
5C0F
\u
4E8E
\u
7B49
\u
4E8E
\u
5F53
\u
524D
\u6708
project.person.search.exit
=
\u
672A
\u
627E
\u5230\u
8BE5
\u
4EBA
\u5458\u7684\u9879\u
76EE
\u6863\u6848\u
FF0C
\u
8BF7
\u6838\u
5B9E
project.person.delete.exit
=
\u
8BE5
\u
4EBA
\u5458\u9879\u
76EE
\u6863\u6848\u
5DF2
\u
51CF
\u9879\u
FF0C
\u
4E0D
\u5141\u
8BB8
\u5212\u
8F6C
...
...
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