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
758d59a6
Commit
758d59a6
authored
Oct 08, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询优化
parent
cab7a10d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
1 deletion
+52
-1
TEmployeeContractInfoMapper.xml
...src/main/resources/mapper/TEmployeeContractInfoMapper.xml
+0
-1
TSalaryAccountMapper.java
...loud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
+5
-0
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+14
-0
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+33
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeContractInfoMapper.xml
View file @
758d59a6
...
...
@@ -401,7 +401,6 @@
${tEmployeeContractInfo.authSql}
</if>
</where>
GROUP BY a.id
order by a.CREATE_TIME desc
</select>
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
View file @
758d59a6
...
...
@@ -46,6 +46,11 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
*/
IPage
<
TSalaryAccount
>
getTSalaryAccountPage
(
Page
<
TSalaryAccount
>
page
,
@Param
(
"tSalaryAccount"
)
TSalaryAccount
tSalaryAccount
);
List
<
TSalaryAccount
>
getTSalaryAccountPageDiy
(
@Param
(
"tSalaryAccount"
)
TSalaryAccount
tSalaryAccount
,
@Param
(
"page"
)
Long
page
,
@Param
(
"size"
)
Long
size
);
long
getTSalaryAccountPageCountDiy
(
@Param
(
"tSalaryAccount"
)
TSalaryAccount
tSalaryAccount
);
/**
* @param settleId
* @param settleMonth
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
758d59a6
...
...
@@ -64,6 +64,20 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
*/
@Override
public
IPage
<
TSalaryAccount
>
getTSalaryAccountPage
(
Page
<
TSalaryAccount
>
page
,
TSalaryAccountSearchVo
tSalaryAccount
)
{
long
pageCount
=
baseMapper
.
getTSalaryAccountPageCountDiy
(
tSalaryAccount
);
page
.
setTotal
(
pageCount
);
if
(
pageCount
>
0L
)
{
page
.
setPages
((
long
)
Math
.
ceil
(
pageCount
/
page
.
getSize
()));
}
if
(
page
.
getCurrent
()
<
1
)
{
page
.
setCurrent
(
1L
);
}
if
(
page
.
getSize
()
<
1
)
{
page
.
setSize
(
10L
);
}
if
(
pageCount
>
((
page
.
getCurrent
()
-
1
)
*
page
.
getSize
()))
{
page
.
setRecords
(
baseMapper
.
getTSalaryAccountPageDiy
(
tSalaryAccount
,
(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
(),
page
.
getSize
()));
}
return
baseMapper
.
getTSalaryAccountPage
(
page
,
tSalaryAccount
);
}
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
758d59a6
...
...
@@ -359,6 +359,39 @@
order by a.CREATE_TIME desc
</select>
<!--tSalaryAccount简单分页查询-->
<select
id=
"getTSalaryAccountPageDiy"
resultMap=
"tSalaryAccountMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM (select * from t_salary_account
<if
test=
"null != page and null != size"
>
limit #{page},#{size}
</if>
) a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
<include
refid=
"tSalaryAccount_where"
/>
<if
test=
"tSalaryAccount.authSql != null and tSalaryAccount.authSql.trim() != ''"
>
${tSalaryAccount.authSql}
</if>
</where>
order by a.CREATE_TIME desc
</select>
<select
id=
"getTSalaryAccountPageCountDiy"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM t_salary_account a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
<include
refid=
"tSalaryAccount_where"
/>
<if
test=
"tSalaryAccount.authSql != null and tSalaryAccount.authSql.trim() != ''"
>
${tSalaryAccount.authSql}
</if>
</where>
order by a.CREATE_TIME desc
</select>
<!-- 获取校验的报账明细 ### 格式:身份证号_工资月份_报表类型_应发金额 -->
<select
id=
"getAccountCheckList"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo"
>
select
...
...
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