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
416a4d96
Commit
416a4d96
authored
May 31, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.4' into MVP1.5.4
parents
8149abb9
05a06b5f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
118 additions
and
215 deletions
+118
-215
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+0
-5
TMinSalaryServiceImpl.java
...us/v1/yifu/salary/service/impl/TMinSalaryServiceImpl.java
+118
-210
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
416a4d96
...
@@ -483,11 +483,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
...
@@ -483,11 +483,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
}
else
{
}
else
{
baseMapper
.
updateById
(
tEmployeeContractInfo
);
baseMapper
.
updateById
(
tEmployeeContractInfo
);
if
(
CommonConstants
.
TWO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
()))
{
tEmployeeContractInfo
.
setContractEnd
(
null
);
baseMapper
.
updateContractEnd
(
tEmployeeContractInfo
);
}
}
}
// 不是待提交,记录审核记录
// 不是待提交,记录审核记录
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TMinSalaryServiceImpl.java
View file @
416a4d96
...
@@ -163,7 +163,6 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
...
@@ -163,7 +163,6 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
data
.
setErrorFlag
(
true
);
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"ID为空;"
);
errorMessage
.
append
(
"ID为空;"
);
}
else
{
}
else
{
TMinSalary
ll
=
baseMapper
.
selectById
(
data
.
getId
());
if
(
Common
.
isEmpty
(
baseMapper
.
selectById
(
data
.
getId
())))
{
if
(
Common
.
isEmpty
(
baseMapper
.
selectById
(
data
.
getId
())))
{
data
.
setErrorFlag
(
true
);
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"ID不存在无法更新,请核实后再操作!;"
);
errorMessage
.
append
(
"ID不存在无法更新,请核实后再操作!;"
);
...
@@ -171,10 +170,12 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
...
@@ -171,10 +170,12 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
if
(
Common
.
isEmpty
(
data
.
getLocation
())
&&
Common
.
isEmpty
(
data
.
getSalaryBase
())
&&
Common
.
isEmpty
(
data
.
getStatus
()))
{
if
(
Common
.
isEmpty
(
data
.
getLocation
())
&&
Common
.
isEmpty
(
data
.
getSalaryBase
())
&&
Common
.
isEmpty
(
data
.
getStatus
()))
{
data
.
setErrorFlag
(
true
);
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"所在地、最低工资(元)、状态为空;"
);
errorMessage
.
append
(
"所在地、最低工资(元)、状态为空;"
);
}
if
(
data
.
getLocation
().
contains
(
"-"
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"所在地格式与列表保持一致;"
);
}
else
{
if
(
null
!=
data
.
getLocation
())
{
if
(
null
!=
data
.
getLocation
())
{
if
(
data
.
getLocation
().
contains
(
"/"
))
{
String
location
[]
=
data
.
getLocation
().
split
(
"/"
);
String
location
[]
=
data
.
getLocation
().
split
(
"/"
);
if
(!
data
.
getLocation
().
isEmpty
())
{
if
(!
data
.
getLocation
().
isEmpty
())
{
if
(
location
.
length
==
1
)
{
if
(
location
.
length
==
1
)
{
...
@@ -198,7 +199,7 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
...
@@ -198,7 +199,7 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
data
.
setErrorFlag
(
true
);
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
}
else
{
TMinSalary
entity
=
baseMapper
.
selectById
(
data
.
getId
());
TMinSalary
entity
=
baseMapper
.
selectById
(
data
.
getId
());
if
(
Common
.
isNotNull
(
entity
))
{
if
(
Common
.
isNotNull
(
entity
))
{
LambdaQueryWrapper
<
TMinSalary
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TMinSalary
>
query
=
new
LambdaQueryWrapper
<>();
...
@@ -219,6 +220,7 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
...
@@ -219,6 +220,7 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
}
}
}
}
}
}
}
if
(
location
.
length
>
2
)
{
if
(
location
.
length
>
2
)
{
String
redisProvinceName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ZERO_INT
]);
String
redisProvinceName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
...
@@ -236,11 +238,12 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
...
@@ -236,11 +238,12 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
data
.
setErrorFlag
(
true
);
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
}
else
{
TMinSalary
entity
=
baseMapper
.
selectById
(
data
.
getId
());
TMinSalary
entity
=
baseMapper
.
selectById
(
data
.
getId
());
if
(
Common
.
isNotNull
(
entity
))
{
if
(
Common
.
isNotNull
(
entity
))
{
LambdaQueryWrapper
<
TMinSalary
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TMinSalary
>
query
=
new
LambdaQueryWrapper
<>();
if
(
Common
.
isNotNull
(
redis
City
Name
))
{
if
(
Common
.
isNotNull
(
redis
Province
Name
))
{
query
.
eq
(
TMinSalary:
:
getProvince
,
redis
City
Name
);
query
.
eq
(
TMinSalary:
:
getProvince
,
redis
Province
Name
);
}
}
if
(
Common
.
isNotNull
(
redisCityName
))
{
if
(
Common
.
isNotNull
(
redisCityName
))
{
query
.
eq
(
TMinSalary:
:
getCity
,
redisCityName
);
query
.
eq
(
TMinSalary:
:
getCity
,
redisCityName
);
...
@@ -260,104 +263,6 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
...
@@ -260,104 +263,6 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
}
}
}
}
}
}
if
(
null
!=
data
.
getSalaryBase
())
{
if
(!
ValidityUtil
.
validateStandard
(
data
.
getSalaryBase
()))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"最低工资,请填写>0的两位小数;"
);
}
}
if
(!
data
.
getStatus
().
isEmpty
())
{
if
(!(
CommonConstants
.
START
.
equals
(
data
.
getStatus
())
||
CommonConstants
.
STOP
.
equals
(
data
.
getStatus
())))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"填写的状态不是启用或停用"
);
}
}
}
if
(
data
.
getLocation
().
contains
(
"-"
))
{
String
location
[]
=
data
.
getLocation
().
split
(
"-"
);
if
(!
data
.
getLocation
().
isEmpty
())
{
if
(
location
.
length
==
1
)
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"所在地”请精确到市或县/区;"
);
}
String
redisProvinceName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
}
if
(
location
.
length
==
2
)
{
String
redisProvinceName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
String
redisCityName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ONE_INT
]
+
"_"
+
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisCityName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
TMinSalary
entity
=
baseMapper
.
selectById
(
data
.
getId
());
if
(
Common
.
isNotNull
(
entity
))
{
LambdaQueryWrapper
<
TMinSalary
>
query
=
new
LambdaQueryWrapper
<>();
if
(
Common
.
isNotNull
(
redisProvinceName
))
{
query
.
eq
(
TMinSalary:
:
getProvince
,
redisProvinceName
);
}
if
(
Common
.
isNotNull
(
redisCityName
))
{
query
.
eq
(
TMinSalary:
:
getCity
,
redisCityName
);
}
query
.
ne
(
TMinSalary:
:
getId
,
data
.
getId
());
long
res
=
baseMapper
.
selectCount
(
query
);
if
(
res
>
CommonConstants
.
ZERO_INT
)
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"已存在对应区域在用的配置信息;"
);
}
}
}
if
(
location
.
length
>
2
)
{
String
redisProvinceName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
String
redisCityName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ONE_INT
]
+
"_"
+
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisCityName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
String
redisTownName
=
getRedisAreaValue
(
location
[
CommonConstants
.
TWO_INT
]
+
"_"
+
location
[
CommonConstants
.
ONE_INT
]);
if
(
Common
.
isEmpty
(
redisTownName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
TMinSalary
entity
=
baseMapper
.
selectById
(
data
.
getId
());
if
(
Common
.
isNotNull
(
entity
))
{
LambdaQueryWrapper
<
TMinSalary
>
query
=
new
LambdaQueryWrapper
<>();
if
(
Common
.
isNotNull
(
redisCityName
))
{
query
.
eq
(
TMinSalary:
:
getProvince
,
redisCityName
);
}
if
(
Common
.
isNotNull
(
redisCityName
))
{
query
.
eq
(
TMinSalary:
:
getCity
,
redisCityName
);
}
if
(
Common
.
isNotNull
(
redisTownName
))
{
query
.
eq
(
TMinSalary:
:
getTown
,
redisTownName
);
}
if
(
Common
.
isEmpty
(
location
[
2
]))
{
query
.
isNull
(
TMinSalary:
:
getTown
);
}
query
.
ne
(
TMinSalary:
:
getId
,
data
.
getId
());
long
res
=
baseMapper
.
selectCount
(
query
);
if
(
res
>
CommonConstants
.
ZERO_INT
)
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"已存在对应区域在用的配置信息;"
);
}
}
}
}
}
}
...
@@ -374,23 +279,23 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
...
@@ -374,23 +279,23 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
}
}
}
}
}
}
}
}
}
if
(
data
.
isErrorFlag
())
if
(
data
.
isErrorFlag
())
{
{
data
.
setErrorMessage
(
errorMessage
.
toString
());
data
.
setErrorMessage
(
errorMessage
.
toString
());
}
}
tMinSalaryImportVoList
.
add
(
data
);
tMinSalaryImportVoList
.
add
(
data
);
}
}
@Override
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
saveData
();
saveData
();
}
}
private
void
saveData
()
{
private
void
saveData
()
{
List
<
TMinSalaryImportVo
>
salaryImportsSuccessList
=
tMinSalaryImportVoList
.
stream
().
filter
(
e
->
e
.
isErrorFlag
()
!=
true
).
collect
(
Collectors
.
toList
());
List
<
TMinSalaryImportVo
>
salaryImportsSuccessList
=
tMinSalaryImportVoList
.
stream
().
filter
(
e
->
e
.
isErrorFlag
()
!=
true
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
salaryImportsSuccessList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
salaryImportsSuccessList
))
{
...
@@ -398,10 +303,10 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
...
@@ -398,10 +303,10 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
salaryImportsSuccessList
.
stream
().
forEach
(
e
->
{
salaryImportsSuccessList
.
stream
().
forEach
(
e
->
{
TMinSalary
selectOne
=
new
TMinSalary
();
TMinSalary
selectOne
=
new
TMinSalary
();
selectOne
.
setId
(
e
.
getId
());
selectOne
.
setId
(
e
.
getId
());
if
(
null
!=
e
.
getLocation
())
{
if
(
null
!=
e
.
getLocation
())
{
if
(
e
.
getLocation
().
contains
(
"/"
))
{
if
(
e
.
getLocation
().
contains
(
"/"
))
{
String
location
[]
=
e
.
getLocation
().
split
(
"/"
);
String
location
[]
=
e
.
getLocation
().
split
(
"/"
);
if
(
location
.
length
>
1
)
{
if
(
location
.
length
>
1
)
{
for
(
int
i
=
0
;
i
<
location
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
location
.
length
;
i
++)
{
if
(
i
==
CommonConstants
.
ZERO_INT
)
{
if
(
i
==
CommonConstants
.
ZERO_INT
)
{
int
province
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
int
province
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
...
@@ -454,7 +359,10 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
...
@@ -454,7 +359,10 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
}
}
}).
sheet
().
doRead
();
}).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
}
...
@@ -463,7 +371,7 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
...
@@ -463,7 +371,7 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
List
<
TMinSalaryImportVo
>
errorImportErrorList
=
tMinSalaryImportVoList
.
stream
().
filter
(
e
->
e
.
isErrorFlag
()
==
true
).
collect
(
Collectors
.
toList
());
List
<
TMinSalaryImportVo
>
errorImportErrorList
=
tMinSalaryImportVoList
.
stream
().
filter
(
e
->
e
.
isErrorFlag
()
==
true
).
collect
(
Collectors
.
toList
());
return
R
.
ok
(
errorImportErrorList
);
return
R
.
ok
(
errorImportErrorList
);
}
}
private
String
getRedisAreaValue
(
String
areaString
)
{
private
String
getRedisAreaValue
(
String
areaString
)
{
...
...
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