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
88071934
Commit
88071934
authored
Apr 22, 2025
by
‘老张’
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
136d263a
96780c2c
Changes
5
Hide 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 @
88071934
...
...
@@ -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
{
...
...
@@ -27,7 +32,7 @@ public class FyglTravelOnBusinessController extends BaseController {
startPage
();
return
getDataTable
(
travelOnBusinessService
.
getFyglTravelOnBusinessList
(
fyglProjectCostDTO
));
}
/**
* 获取差旅报销详细信息
*/
...
...
@@ -36,7 +41,7 @@ public class FyglTravelOnBusinessController extends BaseController {
{
return
success
(
travelOnBusinessService
.
selectFyglTravelOnBusinessListById
(
id
));
}
//导出列表
@PostMapping
(
"/getList/export"
)
public
void
export
(
HttpServletResponse
response
,
Long
[]
ids
)
...
...
@@ -45,21 +50,21 @@ public class FyglTravelOnBusinessController extends BaseController {
ExcelUtil
<
FyglTravelOnBusinessDTO
>
util
=
new
ExcelUtil
<
FyglTravelOnBusinessDTO
>(
FyglTravelOnBusinessDTO
.
class
);
util
.
exportExcel
(
response
,
travelOnBusinessByIds
,
"差旅报销数据"
);
}
//新增差旅报销
@PostMapping
(
"/getList/insert"
)
public
AjaxResult
insertFyglTravelOnBusiness
(
@RequestBody
FyglTravelOnBusinessDTO
fyglTravelOnBusinessDTO
)
{
return
AjaxResult
.
success
(
travelOnBusinessService
.
insertFyglTravelOnBusiness
(
fyglTravelOnBusinessDTO
));
}
//修改差旅报销
@PutMapping
(
"/getList/update"
)
public
AjaxResult
updateFyglTravelOnBusiness
(
@RequestBody
FyglTravelOnBusinessDTO
fyglTravelOnBusinessDTO
)
{
return
AjaxResult
.
success
(
travelOnBusinessService
.
updateFyglTravelOnBusiness
(
fyglTravelOnBusinessDTO
));
}
//删除差旅报销
@DeleteMapping
(
"/getList/{id}"
)
public
AjaxResult
deleteFyglTravelOnBusinessById
(
@PathVariable
Long
id
)
...
...
ruoyi-psa/src/main/java/com/ruoyi/domain/dto/FyglDailyReimbursementDTO.java
View file @
88071934
...
...
@@ -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 @
88071934
...
...
@@ -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 @
88071934
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,15 +20,16 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.Map
;
/**
* 日常报销Service业务层处理
*
*
* @author ruoyi
* @date 2025-02-28
*/
@Service
public
class
FyglDailyReimbursementServiceImpl
implements
IFyglDailyReimbursementService
public
class
FyglDailyReimbursementServiceImpl
implements
IFyglDailyReimbursementService
{
@Autowired
private
FyglDailyReimbursementMapper
fyglDailyReimbursementMapper
;
...
...
@@ -36,7 +42,7 @@ public class FyglDailyReimbursementServiceImpl implements IFyglDailyReimbursemen
/**
* 查询日常报销
*
*
* @param id 日常报销主键
* @return 日常报销
*/
...
...
@@ -87,7 +93,7 @@ public class FyglDailyReimbursementServiceImpl implements IFyglDailyReimbursemen
/**
* 新增日常报销
*
*
* @param fyglDailyReimbursement 日常报销
* @return 结果
*/
...
...
@@ -128,7 +134,7 @@ public class FyglDailyReimbursementServiceImpl implements IFyglDailyReimbursemen
/**
* 修改日常报销
*
*
* @param fyglDailyReimbursement 日常报销
* @return 结果
*/
...
...
@@ -157,7 +163,7 @@ public class FyglDailyReimbursementServiceImpl implements IFyglDailyReimbursemen
/**
* 批量删除日常报销
*
*
* @param ids 需要删除的日常报销主键
* @return 结果
*/
...
...
@@ -169,7 +175,7 @@ public class FyglDailyReimbursementServiceImpl implements IFyglDailyReimbursemen
/**
* 删除日常报销信息
*
*
* @param id 日常报销主键
* @return 结果
*/
...
...
@@ -187,12 +193,38 @@ public class FyglDailyReimbursementServiceImpl implements IFyglDailyReimbursemen
//获取每个人关联的项目
fyglDailyReimbursementVO
.
setCurrentUserId
(
SecurityUtils
.
getUserId
());
List
<
FyglDailyReimbursementDTO
>
projectListByUserId
=
fyglDailyReimbursementMapper
.
getProjectListByUserId
(
fyglDailyReimbursementVO
);
for
(
FyglDailyReimbursementDTO
item:
projectListByUserId
){
fyglDailyReimbursementVO
.
setCardItemProjectId
(
item
.
getProjectId
());
List
<
FyglDailyReimbursementTableItemDTO
>
itemList
=
fyglDailyReimbursementMapper
.
getItemList
(
fyglDailyReimbursementVO
);
item
.
setTableItemList
(
itemList
);
// 将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
);
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 @
88071934
...
...
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.mapper.FyglDailyReimbursementMapper"
>
<resultMap
type=
"com.ruoyi.domain.FyglDailyReimbursement"
id=
"FyglDailyReimbursementResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"projectId"
column=
"project_id"
/>
...
...
@@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
GROUP BY fd.id
</select>
<select
id=
"selectFyglDailyReimbursementById"
parameterType=
"Long"
resultMap=
"FyglDailyReimbursementDetailDTOResult"
>
SELECT
r1.id,
...
...
@@ -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"
>
...
...
@@ -283,4 +283,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete
id=
"delDataByRid"
>
delete from fygl_daily_reimbursement_relevancy r where r.rid = #{rid}
</delete>
</mapper>
\ No newline at end of file
</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