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
2e410ae3
Commit
2e410ae3
authored
Feb 16, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.5-薪资导入优化(社保基数)
parent
332bba9f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
46 deletions
+65
-46
SysBaseSetInfoMapper.java
...loud/plus/v1/yifu/social/mapper/SysBaseSetInfoMapper.java
+9
-0
SysBaseSetInfoServiceImpl.java
...1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
+5
-46
SysBaseSetInfoMapper.xml
...al-biz/src/main/resources/mapper/SysBaseSetInfoMapper.xml
+51
-0
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/SysBaseSetInfoMapper.java
View file @
2e410ae3
...
...
@@ -62,4 +62,13 @@ public interface SysBaseSetInfoMapper extends BaseMapper<SysBaseSetInfo> {
* @return
**/
List
<
SysBaseSetInfo
>
getFundBaseSet
(
@Param
(
"fundHolds"
)
List
<
String
>
fundHolds
);
/**
* @param sysBaseSetInfo
* @Description: 编辑时查询有没有已存在的配置
* @Author: hgw
* @Date: 2023/2/15 18:15
* @return: int
**/
int
getCountByEdit
(
@Param
(
"sysBaseSetInfo"
)
SysBaseSetInfo
sysBaseSetInfo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
View file @
2e410ae3
...
...
@@ -161,52 +161,11 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
List
<
SysPayProportion
>
payProportionList
=
sysPayProportionService
.
getSysPayProportionByBaseId
(
sysBaseSetInfo
.
getId
());
old
.
setFundProList
(
payProportionList
);
}
SysBaseSetInfo
baseSetInfo
=
null
;
// where (b.apply_start_date < '2023-01' and ( b.apply_end_date > '2023-01' or b.apply_end_date is null) ) or b.apply_start_date > '2023-01'
if
(
null
!=
sysBaseSetInfo
.
getTown
())
{
baseSetInfo
=
this
.
getOne
(
Wrappers
.<
SysBaseSetInfo
>
query
().
lambda
()
.
eq
(
SysBaseSetInfo:
:
getBaseType
,
sysBaseSetInfo
.
getBaseType
())
.
eq
(
SysBaseSetInfo:
:
getDepartId
,
sysBaseSetInfo
.
getDepartId
())
.
eq
(
SysBaseSetInfo:
:
getTown
,
sysBaseSetInfo
.
getTown
())
.
ne
(
SysBaseSetInfo:
:
getId
,
sysBaseSetInfo
.
getId
())
.
eq
(
SysBaseSetInfo:
:
getStatus
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
ge
(
SysBaseSetInfo:
:
getApplyStartDate
,
sysBaseSetInfo
.
getApplyStartDate
())
.
or
()
.
ge
(
SysBaseSetInfo:
:
getApplyEndDate
,
sysBaseSetInfo
.
getApplyStartDate
()))
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
}
if
(
null
!=
sysBaseSetInfo
.
getCity
()
&&
null
==
sysBaseSetInfo
.
getTown
())
{
baseSetInfo
=
this
.
getOne
(
Wrappers
.<
SysBaseSetInfo
>
query
().
lambda
()
.
eq
(
SysBaseSetInfo:
:
getBaseType
,
sysBaseSetInfo
.
getBaseType
())
.
eq
(
SysBaseSetInfo:
:
getDepartId
,
sysBaseSetInfo
.
getDepartId
())
.
eq
(
SysBaseSetInfo:
:
getCity
,
sysBaseSetInfo
.
getCity
())
.
isNull
(
SysBaseSetInfo:
:
getTown
)
.
and
(
obj
->
obj
.
ge
(
SysBaseSetInfo:
:
getApplyStartDate
,
sysBaseSetInfo
.
getApplyStartDate
())
.
or
()
.
ge
(
SysBaseSetInfo:
:
getApplyEndDate
,
sysBaseSetInfo
.
getApplyStartDate
()))
.
ne
(
SysBaseSetInfo:
:
getId
,
sysBaseSetInfo
.
getId
())
.
eq
(
SysBaseSetInfo:
:
getStatus
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
}
if
(
null
!=
sysBaseSetInfo
.
getProvince
()
&&
null
==
sysBaseSetInfo
.
getCity
())
{
baseSetInfo
=
this
.
getOne
(
Wrappers
.<
SysBaseSetInfo
>
query
().
lambda
()
.
eq
(
SysBaseSetInfo:
:
getBaseType
,
sysBaseSetInfo
.
getBaseType
())
.
eq
(
SysBaseSetInfo:
:
getDepartId
,
sysBaseSetInfo
.
getDepartId
())
.
eq
(
SysBaseSetInfo:
:
getProvince
,
sysBaseSetInfo
.
getProvince
())
.
isNull
(
SysBaseSetInfo:
:
getCity
)
.
and
(
obj
->
obj
.
ge
(
SysBaseSetInfo:
:
getApplyStartDate
,
sysBaseSetInfo
.
getApplyStartDate
())
.
or
()
.
ge
(
SysBaseSetInfo:
:
getApplyEndDate
,
sysBaseSetInfo
.
getApplyStartDate
()))
.
ne
(
SysBaseSetInfo:
:
getId
,
sysBaseSetInfo
.
getId
())
.
eq
(
SysBaseSetInfo:
:
getStatus
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
}
if
(
null
!=
baseSetInfo
)
{
return
R
.
failed
(
"对应户、地市、有效期的基数配置已存在!"
);
}
// 2023-2-16 09:38:24 晨会上产品经理倩倩确认,编辑时,时间日期不可编辑。
/*int count = baseMapper.getCountByEdit(sysBaseSetInfo)
if count > CommonConstants.ZERO_INT)
return R.failed("对应户、地市、有效期的基数配置已存在!")
*/
this
.
saveOrUpdateBaseAndFundPro
(
sysBaseSetInfo
,
old
);
int
type
=
CommonConstants
.
ONE_INT
;
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/SysBaseSetInfoMapper.xml
View file @
2e410ae3
...
...
@@ -387,4 +387,55 @@
</where>
ORDER BY a.apply_start_date desc
</select>
<!-- 获取条数-->
<select
id=
"getCountByEdit"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM sys_base_set_info a
<where>
a.STATUS = 0 and a.ID != #{sysBaseSetInfo.id}
<if
test=
"sysBaseSetInfo.baseType != null and sysBaseSetInfo.baseType.trim() != ''"
>
AND a.BASE_TYPE = #{sysBaseSetInfo.baseType}
</if>
<if
test=
"sysBaseSetInfo.departId != null and sysBaseSetInfo.departId.trim() != ''"
>
AND a.DEPART_ID = #{sysBaseSetInfo.departId}
</if>
<if
test=
"sysBaseSetInfo.province != null"
>
AND a.PROVINCE = #{sysBaseSetInfo.province}
</if>
<if
test=
"sysBaseSetInfo.city != null"
>
AND a.CITY = #{sysBaseSetInfo.city}
</if>
<if
test=
"sysBaseSetInfo.city == null"
>
AND a.CITY is null
</if>
<if
test=
"sysBaseSetInfo.town != null"
>
AND a.TOWN = #{sysBaseSetInfo.town}
</if>
<if
test=
"sysBaseSetInfo.town == null"
>
AND a.TOWN is null
</if>
<if
test=
"sysBaseSetInfo.applyEndDate == null"
>
AND a.APPLY_END_DATE
<![CDATA[ >= ]]>
#{sysBaseSetInfo.applyStartDate}
</if>
<if
test=
"sysBaseSetInfo.applyEndDate != null"
>
AND (
(apply_end_date is not null and (
(
apply_start_date
<![CDATA[ <= ]]>
#{sysBaseSetInfo.applyEndDate}
and apply_end_date >= #{sysBaseSetInfo.applyEndDate}
) or (
apply_start_date
<![CDATA[ <= ]]>
#{sysBaseSetInfo.applyStartDate}
and apply_end_date >= #{sysBaseSetInfo.applyStartDate}
) or (
apply_start_date >= #{sysBaseSetInfo.applyStartDate}
and apply_end_date
<![CDATA[ <= ]]>
#{sysBaseSetInfo.applyEndDate}
)
)) or (apply_end_date is null and apply_start_date
<![CDATA[ <= ]]>
#{sysBaseSetInfo.applyEndDate})
)
</if>
</where>
limit 1
</select>
</mapper>
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