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
63dc7349
Commit
63dc7349
authored
Jun 12, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.4' into MVP1.5.4
parents
31ad81c7
01ca4e16
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
179 additions
and
138 deletions
+179
-138
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+27
-0
TSettleDomainMapper.xml
...ves-biz/src/main/resources/mapper/TSettleDomainMapper.xml
+8
-6
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+6
-4
TMinSalaryServiceImpl.java
...us/v1/yifu/salary/service/impl/TMinSalaryServiceImpl.java
+133
-123
TMinSalaryMapper.xml
...salary-biz/src/main/resources/mapper/TMinSalaryMapper.xml
+5
-5
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
63dc7349
...
...
@@ -35,6 +35,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoNewVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
...
...
@@ -341,9 +342,35 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
public
IPage
<
TSettleDomain
>
getAllDeptPagePermission
(
Page
page
,
String
departName
,
String
nameOrNo
,
String
customerId
,
String
flag
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
String
userId
=
user
.
getId
();
// SSC开发组-1668092146875969537L 超管1
long
roleId
=
1668092146875969537L
;
boolean
isSsc
=
this
.
haveRole
(
user
,
roleId
);
if
(!
isSsc
)
{
isSsc
=
this
.
haveRole
(
user
,
1L
);
}
if
(
isSsc
)
{
userId
=
"-999"
;
}
return
tSettleDomainMapper
.
getPagePerMission
(
page
,
userId
,
departName
,
nameOrNo
,
customerId
,
flag
);
}
/**
* @Description: 检测是否有某个角色权限
* @Author: hgw
* @Date: 2023/6/12 11:09
* @return: boolean
**/
private
boolean
haveRole
(
YifuUser
user
,
long
roleId
)
{
List
<
Long
>
roleList
=
user
.
getClientRoleMap
().
get
(
ClientNameConstants
.
CLIENT_MVP
);
for
(
Long
role
:
roleList
)
{
if
(
role
==
roleId
)
{
return
true
;
}
}
return
false
;
}
/**
* 分页获取所有项目名称
* @return R
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TSettleDomainMapper.xml
View file @
63dc7349
...
...
@@ -271,10 +271,14 @@
<include
refid=
"Base_Column_List"
/>
FROM
t_settle_domain a
<if
test=
"userId != null and userId.trim() != '-999'"
>
LEFT JOIN t_cutsomer_data_permisson b ON b.SETTLE_DOMAIN_NO = a.DEPART_NO
WHERE
b.USER_ID = #{userId}
AND a.DELETE_FLAG = '0'
</if>
WHERE a.DELETE_FLAG = '0'
/* 2023-6-12 11:12:15 hgw根据 */
<if
test=
"userId != null and userId.trim() != '-999'"
>
AND b.USER_ID = #{userId}
</if>
<if
test=
"departName != null and departName.trim() != ''"
>
and a.DEPART_NAME like concat("%",#{departName},"%")
</if>
...
...
@@ -287,9 +291,7 @@
<if
test=
"flag != null"
>
and a.STOP_FLAG='0'
</if>
GROUP BY
b.USER_ID,
b.SETTLE_DOMAIN_NO
GROUP BY a.id
</select>
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
63dc7349
...
...
@@ -225,7 +225,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
.
eq
(
TOrderEnclosure:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
List
<
TOrderEnclosure
>
listOld
=
list
.
stream
().
filter
(
e
->
CommonConstants
.
ZERO_INTEGER
.
equals
(
e
.
getEnclosureFlag
())).
collect
(
Collectors
.
toList
());
List
<
TOrderEnclosure
>
fileList
=
list
.
stream
().
filter
(
e
->
CommonConstants
.
ZERO_INTEGER
.
equals
(
e
.
getEnclosureFlag
())).
collect
(
Collectors
.
toList
());
List
<
TOrderEnclosure
>
wageList
=
list
.
stream
().
filter
(
e
->
CommonConstants
.
TWO_INTEGER
.
equals
(
e
.
getEnclosureFlag
())).
collect
(
Collectors
.
toList
());
List
<
TOrderEnclosure
>
salaryList
=
list
.
stream
().
filter
(
e
->
CommonConstants
.
THREE_INTEGER
.
equals
(
e
.
getEnclosureFlag
())).
collect
(
Collectors
.
toList
());
List
<
TOrderEnclosure
>
socialList
=
list
.
stream
().
filter
(
e
->
CommonConstants
.
FOUR_INTEGER
.
equals
(
e
.
getEnclosureFlag
())).
collect
(
Collectors
.
toList
());
...
...
@@ -237,8 +237,8 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
List
<
TOrderEnclosure
>
otherList
=
list
.
stream
().
filter
(
e
->
CommonConstants
.
TEN_INTEGER
.
equals
(
e
.
getEnclosureFlag
())).
collect
(
Collectors
.
toList
());
List
<
TOrderEnclosure
>
salaryHandoverList
=
list
.
stream
().
filter
(
e
->
CommonConstants
.
ELEVEN_INTEGER
.
equals
(
e
.
getEnclosureFlag
())).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
listOld
))
{
orderDetailVO
.
setOrderEnclosure
(
listOld
);
if
(
CollectionUtils
.
isNotEmpty
(
fileList
))
{
orderDetailVO
.
setOrderEnclosure
(
fileList
);
}
else
{
orderDetailVO
.
setOrderEnclosure
(
Lists
.
newArrayList
());
}
...
...
@@ -508,7 +508,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(!
Common
.
isEmpty
(
vo
.
getOrderContent
())
&&
!
ValidityUtil
.
validate2048
(
vo
.
getOrderContent
())){
return
R
.
failed
(
OrderConstants
.
ORDER_CONTENT_MORE_THAN_2048
);
}
TSettleDomain
settleDomain
=
new
TSettleDomain
();
if
(
CollectionUtils
.
isEmpty
(
vo
.
getHandleUserList
())){
return
R
.
failed
(
OrderConstants
.
HANDLE_USER_IS_EMPTY
);
}
TSettleDomain
settleDomain
=
new
TSettleDomain
();
List
<
TSettleDomainSelectVo
>
settleDomainR
;
R
<
TSettleDomainListVo
>
listVo
;
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TMinSalaryServiceImpl.java
View file @
63dc7349
...
...
@@ -159,35 +159,125 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
data
.
setRowIndex
(
rowIndex
+
1
);
StringBuilder
errorMessage
=
new
StringBuilder
(
""
);
extracted
(
data
,
errorMessage
);
if
(
data
.
isErrorFlag
()){
data
.
setErrorMessage
(
errorMessage
.
toString
());
}
tMinSalaryImportVoList
.
add
(
data
);
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
){
saveData
();
}
private
void
saveData
()
{
List
<
TMinSalaryImportVo
>
salaryImportsSuccessList
=
tMinSalaryImportVoList
.
stream
().
filter
(
e
->
e
.
isErrorFlag
()
!=
true
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
salaryImportsSuccessList
))
{
//将成功的数据转换成需要入库的格式
salaryImportsSuccessList
.
stream
().
forEach
(
e
->
{
TMinSalary
selectOne
=
new
TMinSalary
();
selectOne
.
setId
(
e
.
getId
());
if
(
null
!=
e
.
getLocation
())
{
String
location
[]
=
e
.
getLocation
().
split
(
"/"
);
if
(
location
.
length
>
1
)
{
for
(
int
i
=
0
;
i
<
location
.
length
;
i
++)
{
if
(
i
==
CommonConstants
.
ZERO_INT
)
{
int
province
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setProvince
(
province
);
}
if
(
i
==
CommonConstants
.
ONE_INT
)
{
int
city
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setCity
(
city
);
}
if
(
i
==
CommonConstants
.
TWO_INT
)
{
int
town
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setTown
(
town
);
}
}
}
}
if
(
null
==
e
.
getLocation
()){
TMinSalary
tMinSalary
=
baseMapper
.
selectById
(
e
.
getId
());
selectOne
.
setProvince
(
tMinSalary
.
getProvince
());
selectOne
.
setCity
(
tMinSalary
.
getCity
());
selectOne
.
setTown
(
tMinSalary
.
getTown
());
}
if
(
null
!=
e
.
getStatus
())
{
if
(
CommonConstants
.
START
.
equals
(
e
.
getStatus
()))
{
selectOne
.
setStatus
(
CommonConstants
.
ONE_INT
);
}
if
(
CommonConstants
.
STOP
.
equals
(
e
.
getStatus
()))
{
selectOne
.
setStatus
(
CommonConstants
.
TWO_INT
);
}
}
if
(
null
!=
e
.
getSalaryBase
())
{
selectOne
.
setSalaryBase
(
e
.
getSalaryBase
());
}
selectOne
.
setUpdateTime
(
LocalDateTime
.
now
());
baseMapper
.
updateById
(
selectOne
);
}
);
}
}
}).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
//返回给前端的错误数据
List
<
TMinSalaryImportVo
>
errorImportErrorList
=
tMinSalaryImportVoList
.
stream
().
filter
(
e
->
e
.
isErrorFlag
()
==
true
).
collect
(
Collectors
.
toList
());
return
R
.
ok
(
errorImportErrorList
);
}
private
void
extracted
(
TMinSalaryImportVo
data
,
StringBuilder
errorMessage
)
{
if
(
Common
.
isEmpty
(
data
.
getId
()))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"ID为空;"
);
return
;
}
else
{
if
(
Common
.
isEmpty
(
baseMapper
.
selectById
(
data
.
getId
())))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"ID不存在无法更新,请核实后再操作!;"
);
return
;
}
if
(
Common
.
isEmpty
(
data
.
getLocation
())
&&
Common
.
isEmpty
(
data
.
getSalaryBase
())
&&
Common
.
isEmpty
(
data
.
getStatus
()))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"所在地、最低工资(元)、状态为空;"
);
return
;
}
if
(
null
!=
data
.
getLocation
())
{
if
(
null
!=
data
.
getLocation
())
{
if
(
data
.
getLocation
().
contains
(
"-"
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"所在地格式与列表保持一致;"
);
return
;
}
}
}
else
{
if
(
null
!=
data
.
getLocation
())
{
String
location
[]
=
data
.
getLocation
().
split
(
"/"
);
if
(!
data
.
getLocation
().
isEmpty
())
{
if
(
location
.
length
==
1
)
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"所在地”请精确到市或县/区;"
);
return
;
}
String
redisProvinceName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
return
;
}
}
if
(
location
.
length
==
2
)
{
...
...
@@ -195,12 +285,13 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
return
;
}
String
redisCityName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ONE_INT
]
+
"_"
+
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisCityName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
return
;
}
else
{
TMinSalary
entity
=
baseMapper
.
selectById
(
data
.
getId
());
if
(
Common
.
isNotNull
(
entity
))
{
...
...
@@ -212,13 +303,14 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
if
(
Common
.
isNotNull
(
redisCityName
))
{
query
.
eq
(
TMinSalary:
:
getCity
,
redisCityName
);
}
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
(
"已存在对应区域在用的配置信息;"
);
return
;
}
}
}
...
...
@@ -229,12 +321,13 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
if
(
Common
.
isEmpty
(
redisCityName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
return
;
}
String
redisTownName
=
getRedisAreaValue
(
location
[
CommonConstants
.
TWO_INT
]
+
"_"
+
location
[
CommonConstants
.
ONE_INT
]);
if
(
Common
.
isEmpty
(
redisTownName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
return
;
}
else
{
TMinSalary
entity
=
baseMapper
.
selectById
(
data
.
getId
());
...
...
@@ -249,22 +342,20 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
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
(
"已存在对应区域在用的配置信息;"
);
}
return
;
}
}
}
}
}
}
if
(
Common
.
isNotNull
(
data
)){
if
(
null
!=
data
.
getSalaryBase
())
{
if
(!
ValidityUtil
.
validateStandard
(
data
.
getSalaryBase
()))
{
data
.
setErrorFlag
(
true
);
...
...
@@ -277,89 +368,8 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
errorMessage
.
append
(
"填写的状态不是启用或停用"
);
}
}
if
(
data
.
isErrorFlag
())
{
data
.
setErrorMessage
(
errorMessage
.
toString
());
}
tMinSalaryImportVoList
.
add
(
data
);
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
){
saveData
();
}
private
void
saveData
()
{
List
<
TMinSalaryImportVo
>
salaryImportsSuccessList
=
tMinSalaryImportVoList
.
stream
().
filter
(
e
->
e
.
isErrorFlag
()
!=
true
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
salaryImportsSuccessList
))
{
//将成功的数据转换成需要入库的格式
salaryImportsSuccessList
.
stream
().
forEach
(
e
->
{
TMinSalary
selectOne
=
new
TMinSalary
();
selectOne
.
setId
(
e
.
getId
());
if
(
null
!=
e
.
getLocation
())
{
String
location
[]
=
e
.
getLocation
().
split
(
"/"
);
if
(
location
.
length
>
1
)
{
for
(
int
i
=
0
;
i
<
location
.
length
;
i
++)
{
if
(
i
==
CommonConstants
.
ZERO_INT
)
{
int
province
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setProvince
(
province
);
}
if
(
i
==
CommonConstants
.
ONE_INT
)
{
int
city
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setCity
(
city
);
}
if
(
i
==
CommonConstants
.
TWO_INT
)
{
int
town
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setTown
(
town
);
}
}
}
}
if
(
null
==
e
.
getLocation
()){
TMinSalary
tMinSalary
=
baseMapper
.
selectById
(
e
.
getId
());
selectOne
.
setProvince
(
tMinSalary
.
getProvince
());
selectOne
.
setCity
(
tMinSalary
.
getCity
());
selectOne
.
setTown
(
tMinSalary
.
getTown
());
}
if
(
null
!=
e
.
getStatus
())
{
if
(
CommonConstants
.
START
.
equals
(
e
.
getStatus
()))
{
selectOne
.
setStatus
(
CommonConstants
.
ONE_INT
);
}
if
(
CommonConstants
.
STOP
.
equals
(
e
.
getStatus
()))
{
selectOne
.
setStatus
(
CommonConstants
.
TWO_INT
);
}
}
if
(
null
!=
e
.
getSalaryBase
())
{
selectOne
.
setSalaryBase
(
e
.
getSalaryBase
());
}
selectOne
.
setUpdateTime
(
LocalDateTime
.
now
());
baseMapper
.
updateById
(
selectOne
);
}
);
}
}
}).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
//返回给前端的错误数据
List
<
TMinSalaryImportVo
>
errorImportErrorList
=
tMinSalaryImportVoList
.
stream
().
filter
(
e
->
e
.
isErrorFlag
()
==
true
).
collect
(
Collectors
.
toList
());
return
R
.
ok
(
errorImportErrorList
);
}
private
String
getRedisAreaValue
(
String
areaString
)
{
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TMinSalaryMapper.xml
View file @
63dc7349
...
...
@@ -117,7 +117,7 @@
</if>
</if>
</if>
<if
test=
"tMinSalary.town != null
and tMinSalary.town.trim() != ''
"
>
<if
test=
"tMinSalary.town != null"
>
AND TOWN = '${tMinSalary.town}'
</if>
</if>
...
...
@@ -184,20 +184,20 @@
</if>
</if>
</if>
<if
test=
"tMinSalary.town != null
and tMinSalary.town.trim() != ''
"
>
<if
test=
"tMinSalary.town != null "
>
AND (TOWN = '${tMinSalary.town}' = '${tMinSalary.town}')
</if>
</if>
<if
test=
'tMinSalary.areaFlag == "0"'
>
<if
test=
"tMinSalary.province != null and tMinSalary.
province.trim() != '' and tMinSalary.
city == null"
>
<if
test=
"tMinSalary.province != null and tMinSalary.city == null"
>
AND (
(PROVINCE = '${tMinSalary.province}' and (a.CITY is null or a.CITY =''))
</if>
<if
test=
"tMinSalary.city != null and tMinSalary.
city.trim() != '' and tMinSalary.
town == null"
>
<if
test=
"tMinSalary.city != null and tMinSalary.town == null"
>
AND (
(CITY = '${tMinSalary.city}' and (TOWN is null or TOWN =''))
</if>
<if
test=
"tMinSalary.town != null
and tMinSalary.town.trim() != ''
"
>
<if
test=
"tMinSalary.town != null "
>
AND (TOWN = '${tMinSalary.town}' or TOWN = '${tMinSalary.town}')
</if>
</if>
...
...
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