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
6e3ba2a0
Commit
6e3ba2a0
authored
Jul 18, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同优化-待提交
parent
522f6ff2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
21 deletions
+56
-21
TEmployeeContractInfo.java
...d/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
+6
-6
EmployeeContractVO.java
...fu/cloud/plus/v1/yifu/archives/vo/EmployeeContractVO.java
+6
-6
EmployeeConstants.java
...ud/plus/v1/yifu/archives/constants/EmployeeConstants.java
+7
-0
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+37
-9
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
View file @
6e3ba2a0
...
...
@@ -90,7 +90,7 @@ public class TEmployeeContractInfo extends BaseEntity {
*/
@NotBlank
(
message
=
"合同类型不能为空"
)
@Length
(
max
=
32
,
message
=
"合同类型不能超过32个字符"
)
@ExcelAttribute
(
name
=
"合同类型"
,
isNotEmpty
=
true
,
errorInfo
=
"合同类型不能为空"
,
maxLength
=
32
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"合同类型"
,
maxLength
=
32
,
needExport
=
true
)
@Schema
(
description
=
"合同类型"
,
name
=
"contractName"
)
private
String
contractName
;
/**
...
...
@@ -101,14 +101,14 @@ public class TEmployeeContractInfo extends BaseEntity {
*/
@NotBlank
(
message
=
"签订期限不能为空"
)
@Length
(
max
=
32
,
message
=
"签订期限不能超过32个字符"
)
@ExcelAttribute
(
name
=
"签订期限"
,
isNotEmpty
=
true
,
errorInfo
=
"签订期限不能为空"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMPLOYEE_CONTRACT_TYPE
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"签订期限"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMPLOYEE_CONTRACT_TYPE
,
needExport
=
true
)
@Schema
(
description
=
"签订期限"
,
name
=
"contractType"
)
private
String
contractType
;
/**
* 合同起始时间
*/
@NotBlank
(
message
=
"合同起始时间不能为空"
)
@ExcelAttribute
(
name
=
"合同起始时间"
,
isNotEmpty
=
true
,
errorInfo
=
"合同起始时间不能为空"
)
@ExcelAttribute
(
name
=
"合同起始时间"
,
needExport
=
true
)
@Schema
(
description
=
"合同起始时间"
,
name
=
"contractStart"
)
private
Date
contractStart
;
/**
...
...
@@ -210,14 +210,14 @@ public class TEmployeeContractInfo extends BaseEntity {
* 合同岗位
*/
@Length
(
max
=
32
,
message
=
"合同岗位不能超过32个字符"
)
@ExcelAttribute
(
name
=
"合同岗位"
,
isNotEmpty
=
true
,
errorInfo
=
"合同岗位不能为空"
,
maxLength
=
32
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"合同岗位"
,
maxLength
=
32
,
needExport
=
true
)
@Schema
(
description
=
"合同岗位"
,
name
=
"post"
)
private
String
post
;
/**
* 工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制
*/
@Length
(
max
=
32
,
message
=
"工时制不能超过32个字符"
)
@ExcelAttribute
(
name
=
"工时制"
,
isNotEmpty
=
true
,
errorInfo
=
"工时制不能为空"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
WORKING_HOURS
)
@ExcelAttribute
(
name
=
"工时制"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
WORKING_HOURS
)
@Schema
(
description
=
"工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制"
,
name
=
"workingHours"
)
private
String
workingHours
;
/**
...
...
@@ -413,7 +413,7 @@ public class TEmployeeContractInfo extends BaseEntity {
*/
@NotBlank
(
message
=
"合同甲方不能为空"
)
@Length
(
max
=
50
,
message
=
"合同甲方不能超过50个字符"
)
@ExcelAttribute
(
name
=
"合同甲方"
,
isNotEmpty
=
true
,
errorInfo
=
"合同甲方不能为空"
,
maxLength
=
50
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"合同甲方"
,
maxLength
=
50
,
needExport
=
true
)
@Schema
(
description
=
"合同甲方"
)
@Size
(
max
=
50
,
message
=
"合同甲方不可超过50位"
)
private
String
contractParty
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeContractVO.java
View file @
6e3ba2a0
...
...
@@ -76,7 +76,7 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
*/
@NotBlank
(
message
=
"合同类型不能为空"
)
@Length
(
max
=
32
,
message
=
"合同类型不能超过32个字符"
)
@ExcelAttribute
(
name
=
"合同类型"
,
isNotEmpty
=
true
,
errorInfo
=
"合同类型不能为空"
,
maxLength
=
32
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"合同类型"
,
maxLength
=
32
,
needExport
=
true
)
@Schema
(
description
=
"合同类型"
,
name
=
"contractName"
)
private
String
contractName
;
...
...
@@ -101,7 +101,7 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
* 合同甲方
*/
@Length
(
max
=
50
,
message
=
"原因说明不能超过200个字符"
)
@ExcelAttribute
(
name
=
"合同甲方"
,
isNotEmpty
=
true
,
errorInfo
=
"合同甲方不能为空"
,
maxLength
=
50
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"合同甲方"
,
maxLength
=
50
,
needExport
=
true
)
@Schema
(
description
=
"合同甲方"
)
@Size
(
max
=
50
,
message
=
"合同甲方不可超过50位"
)
private
String
contractParty
;
...
...
@@ -114,7 +114,7 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
*/
@NotBlank
(
message
=
"签订期限不能为空"
)
@Length
(
max
=
32
,
message
=
"签订期限不能超过32个字符"
)
@ExcelAttribute
(
name
=
"签订期限"
,
isNotEmpty
=
true
,
errorInfo
=
"签订期限不能为空"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMPLOYEE_CONTRACT_TYPE
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"签订期限"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMPLOYEE_CONTRACT_TYPE
,
needExport
=
true
)
@Schema
(
description
=
"签订期限"
,
name
=
"contractType"
)
private
String
contractType
;
...
...
@@ -123,7 +123,7 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
*/
@NotBlank
(
message
=
"起始日期不能为空"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
@ExcelAttribute
(
name
=
"起始日期"
,
is
NotEmpty
=
true
,
errorInfo
=
"起始日期不能为空"
,
is
Date
=
true
)
@ExcelAttribute
(
name
=
"起始日期"
,
isDate
=
true
)
@Schema
(
description
=
"起始日期"
,
name
=
"contractStart"
)
private
Date
contractStart
;
/**
...
...
@@ -138,7 +138,7 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
* 合同岗位
*/
@Length
(
max
=
32
,
message
=
"合同岗位不能超过32个字符"
)
@ExcelAttribute
(
name
=
"合同岗位"
,
isNotEmpty
=
true
,
errorInfo
=
"合同岗位不能为空"
,
maxLength
=
32
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"合同岗位"
,
maxLength
=
32
,
needExport
=
true
)
@Schema
(
description
=
"合同岗位"
,
name
=
"post"
)
private
String
post
;
...
...
@@ -146,7 +146,7 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
* 工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制
*/
@Length
(
max
=
32
,
message
=
"工时制不能超过32个字符"
)
@ExcelAttribute
(
name
=
"工时制"
,
isNotEmpty
=
true
,
errorInfo
=
"工时制不能为空"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
WORKING_HOURS
)
@ExcelAttribute
(
name
=
"工时制"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
WORKING_HOURS
)
@Schema
(
description
=
"工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制"
,
name
=
"workingHours"
)
private
String
workingHours
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/EmployeeConstants.java
View file @
6e3ba2a0
...
...
@@ -41,6 +41,13 @@ public class EmployeeConstants {
public
static
final
String
CONTRACT_TYPE_TWO
=
"2"
;
public
static
final
String
CONTRACT_NO_IN_USE
=
"暂无可操作的合同"
;
public
static
final
String
CONTRACT_NAME_EMPTY
=
"合同类型不能为空"
;
public
static
final
String
CONTRACT_PARTY_EMPTY
=
"合同甲方不能为空"
;
public
static
final
String
CONTRACT_TYPE_EMPTY
=
"签订期限不能为空"
;
public
static
final
String
CONTRACT_START_EMPTY
=
"起始日期不能为空"
;
public
static
final
String
POST_EMPTY
=
"合同岗位不能为空"
;
public
static
final
String
WORKING_HOURS_EMPTY
=
"工时制不能为空"
;
/**
* 无数据可更新
**/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
6e3ba2a0
...
...
@@ -709,15 +709,43 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
if
(
Common
.
isEmpty
(
insert
.
getEmpIdcard
())
||
Common
.
isEmpty
(
insert
.
getDeptNo
()))
{
errorInfo
.
append
(
EmployeeConstants
.
EMPID_NOT_EMPTY
);
}
else
if
(
EmployeeConstants
.
SITUATION_SIX
.
equals
(
insert
.
getSituation
())
||
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
insert
.
getSituation
()))
{
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
insert
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getDeptNo
,
insert
.
getDeptNo
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_STRING
).
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
==
null
)
{
errorInfo
.
append
(
EmployeeConstants
.
CONTRACT_NO_IN_USE
);
}
else
{
if
(
EmployeeConstants
.
SITUATION_SIX
.
equals
(
insert
.
getSituation
())
||
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
insert
.
getSituation
()))
{
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
insert
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getDeptNo
,
insert
.
getDeptNo
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_STRING
).
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
==
null
)
{
errorInfo
.
append
(
EmployeeConstants
.
CONTRACT_NO_IN_USE
);
}
else
{
insert
.
setContractName
(
contractInfo
.
getContractName
());
insert
.
setSubjectUnit
(
contractInfo
.
getSubjectUnit
());
insert
.
setContractParty
(
contractInfo
.
getContractParty
());
insert
.
setContractType
(
contractInfo
.
getContractType
());
insert
.
setContractStart
(
contractInfo
.
getContractStart
());
insert
.
setContractEnd
(
contractInfo
.
getContractEnd
());
}
}
else
{
if
(
Common
.
isEmpty
(
insert
.
getContractName
()))
{
errorInfo
.
append
(
EmployeeConstants
.
CONTRACT_NAME_EMPTY
);
}
if
(
Common
.
isEmpty
(
insert
.
getContractParty
()))
{
errorInfo
.
append
(
EmployeeConstants
.
CONTRACT_PARTY_EMPTY
);
}
if
(
Common
.
isEmpty
(
insert
.
getContractType
()))
{
errorInfo
.
append
(
EmployeeConstants
.
CONTRACT_TYPE_EMPTY
);
}
if
(
Common
.
isEmpty
(
insert
.
getContractStart
()))
{
errorInfo
.
append
(
EmployeeConstants
.
CONTRACT_START_EMPTY
);
}
if
(
Common
.
isEmpty
(
insert
.
getPost
()))
{
errorInfo
.
append
(
EmployeeConstants
.
POST_EMPTY
);
}
if
(
Common
.
isEmpty
(
insert
.
getWorkingHours
()))
{
errorInfo
.
append
(
EmployeeConstants
.
WORKING_HOURS_EMPTY
);
}
}
}
if
(
Common
.
isEmpty
(
errorInfo
.
toString
()))
{
...
...
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