Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
isoft_psa
Project
Project
Details
Activity
Releases
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
王飞
isoft_psa
Commits
8f91165c
Commit
8f91165c
authored
Apr 21, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了日常报销的分页问题
parent
877a7ab6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
25 deletions
+72
-25
FyglTravelOnBusinessController.java
.../com/ruoyi/controller/FyglTravelOnBusinessController.java
+11
-6
FyglDailyReimbursementDTO.java
.../java/com/ruoyi/domain/dto/FyglDailyReimbursementDTO.java
+7
-0
FyglDailyReimbursementVo.java
...in/java/com/ruoyi/domain/vo/FyglDailyReimbursementVo.java
+5
-2
FyglDailyReimbursementServiceImpl.java
...ruoyi/service/impl/FyglDailyReimbursementServiceImpl.java
+45
-13
FyglDailyReimbursementMapper.xml
...apper/dailyReimbursement/FyglDailyReimbursementMapper.xml
+4
-4
No files found.
ruoyi-psa/src/main/java/com/ruoyi/controller/FyglTravelOnBusinessController.java
View file @
8f91165c
...
...
@@ -13,7 +13,12 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 差旅Controller
*
* @author ruoyi
* @date 2025-02-28
*/
@RestController
@RequestMapping
(
"/FyglTravelOnBusiness"
)
public
class
FyglTravelOnBusinessController
extends
BaseController
{
...
...
ruoyi-psa/src/main/java/com/ruoyi/domain/dto/FyglDailyReimbursementDTO.java
View file @
8f91165c
...
...
@@ -26,6 +26,13 @@ public class FyglDailyReimbursementDTO {
//总数量
private
Integer
totalMoney
;
//项目的每个月的报销数组
private
List
<
FyglDailyReimbursementTableItemDTO
>
tableItemList
;
// 页码
private
Integer
pageNum
;
// 每页条数
private
Integer
pageSize
;
// 总条数
private
Integer
total
;
}
ruoyi-psa/src/main/java/com/ruoyi/domain/vo/FyglDailyReimbursementVo.java
View file @
8f91165c
...
...
@@ -4,6 +4,9 @@ import com.ruoyi.common.core.domain.BaseEntity;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.List
;
import
java.util.Map
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
FyglDailyReimbursementVo
extends
BaseEntity
{
...
...
@@ -52,6 +55,6 @@ public class FyglDailyReimbursementVo extends BaseEntity {
//审批状态0保存1未通过2审批中3已通过
private
Integer
reimbursmentApproveStatus
;
// 分页参数
private
String
projectPageParams
;
}
ruoyi-psa/src/main/java/com/ruoyi/service/impl/FyglDailyReimbursementServiceImpl.java
View file @
8f91165c
package
com
.
ruoyi
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
...
...
@@ -15,6 +20,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.Map
;
/**
* 日常报销Service业务层处理
...
...
@@ -187,12 +193,38 @@ public class FyglDailyReimbursementServiceImpl implements IFyglDailyReimbursemen
//获取每个人关联的项目
fyglDailyReimbursementVO
.
setCurrentUserId
(
SecurityUtils
.
getUserId
());
List
<
FyglDailyReimbursementDTO
>
projectListByUserId
=
fyglDailyReimbursementMapper
.
getProjectListByUserId
(
fyglDailyReimbursementVO
);
// 将projectPageParams转成map集合
String
projectPageParams
=
fyglDailyReimbursementVO
.
getProjectPageParams
();
if
(
projectPageParams
!=
null
){
Map
<
String
,
Object
>
projectPageMap
=
JSON
.
parseObject
(
projectPageParams
);
for
(
FyglDailyReimbursementDTO
item:
projectListByUserId
){
Object
obj
=
projectPageMap
.
get
(
item
.
getProjectId
());
// 将obj转成map
Map
<
String
,
Integer
>
map
=
(
Map
<
String
,
Integer
>)
obj
;
Integer
pageNum
=
map
.
get
(
"pageNum"
);
Integer
pageSize
=
map
.
get
(
"pageSize"
);
PageHelper
.
startPage
(
pageNum
,
pageSize
);
fyglDailyReimbursementVO
.
setCardItemProjectId
(
item
.
getProjectId
());
List
<
FyglDailyReimbursementTableItemDTO
>
itemList
=
fyglDailyReimbursementMapper
.
getItemList
(
fyglDailyReimbursementVO
);
item
.
setTableItemList
(
itemList
);
PageInfo
<
FyglDailyReimbursementTableItemDTO
>
tbUserPageInfo
=
new
PageInfo
<>(
itemList
);
item
.
setTableItemList
(
tbUserPageInfo
.
getList
());
item
.
setPageNum
(
pageNum
);
item
.
setPageSize
(
pageSize
);
item
.
setTotal
(
Math
.
toIntExact
(
tbUserPageInfo
.
getTotal
()));
}
}
else
{
// 初始化执行 默认每页3条数据
PageHelper
.
startPage
(
1
,
3
);
for
(
FyglDailyReimbursementDTO
item:
projectListByUserId
){
// 将obj转成map
fyglDailyReimbursementVO
.
setCardItemProjectId
(
item
.
getProjectId
());
List
<
FyglDailyReimbursementTableItemDTO
>
itemList
=
fyglDailyReimbursementMapper
.
getItemList
(
fyglDailyReimbursementVO
);
PageInfo
<
FyglDailyReimbursementTableItemDTO
>
tbUserPageInfo
=
new
PageInfo
<>(
itemList
);
item
.
setTableItemList
(
tbUserPageInfo
.
getList
());
item
.
setPageNum
(
1
);
item
.
setPageSize
(
3
);
item
.
setTotal
(
Math
.
toIntExact
(
tbUserPageInfo
.
getTotal
()));
}
}
System
.
out
.
println
(
"参数 = "
+
fyglDailyReimbursementVO
);
return
projectListByUserId
;
...
...
ruoyi-psa/src/main/resources/mapper/dailyReimbursement/FyglDailyReimbursementMapper.xml
View file @
8f91165c
...
...
@@ -130,7 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY
r.id,
r.registration_time,
r.`status`
;
r.`status`
</select>
<select
id=
"selectFyglDailyReimbursementItemListById"
resultMap=
"FyglDailyReimbursementDetailItemResult"
>
...
...
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