feat:记录导出增加部门搜索

This commit is contained in:
dzc committed 2025-02-19 15:19:20 +08:00
1 parent 4919d83314
commit 9a8c7d5ace
13 files changed
+208 -43

No files matched your search

@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
@Data
public class HardDeptTotalDto {
@@ -14,4 +15,13 @@ public class HardDeptTotalDto {
@Schema(description = "饭卡类型id")
private LocalDateTime[] createTimeList;
@Schema(description = "部门id")
private Long deptId;
@Schema(description = "是否深度搜索deptId")
private Boolean isDeepDept;
@Schema(description = "部门ids")
private List<Long> deptIds;
}
@@ -45,23 +45,23 @@ public class HardOrderTotalController {
private final HardOrderTotalService HardOrderTotalService;
@GetMapping("/page-list-sb")
@PostMapping("/page-list-sb")
@Operation(summary = "设备交易记录")
public R<Page<HardOrderSbVo>> pageListSb(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
public R<Page<HardOrderSbVo>> pageListSb(@ParameterObject Page page, @RequestBody HardOrderDto dto) {
dto.setOrderStatusCodes(HardOrderStatusEnum.getPaySuccessCodes());
return R.ok(HardOrderTotalService.pageListSb(page, dto));
}
@GetMapping("/page-list-cs")
@PostMapping("/page-list-cs")
@Operation(summary = "商户交易记录")
public R<Page<HardOrderCsVo>> pageListCs(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
public R<Page<HardOrderCsVo>> pageListCs(@ParameterObject Page page, @RequestBody HardOrderDto dto) {
dto.setOrderStatusCodes(HardOrderStatusEnum.getPaySuccessCodes());
return R.ok(HardOrderTotalService.pageListCs(page, dto));
}
@GetMapping("/page-list-dept")
@PostMapping("/page-list-dept")
@Operation(summary = "部门交易记录")
public R<List<HardDeptTotalVo>> pageListDept(@ParameterObject HardDeptTotalDto dto) {
public R<List<HardDeptTotalVo>> pageListDept(@RequestBody HardDeptTotalDto dto) {
return R.ok(HardOrderTotalService.pageListDept(dto));
}
@@ -145,10 +145,10 @@ public class HardOrderTotalController {
}
@Operation(summary = "部门交易记录导出", description = "部门交易记录导出")
@GetMapping("/export-dept")
@PostMapping("/export-dept")
@SysLog("部门交易记录导出")
@PreAuthorize("@pms.hasPermission('hard_hardTotal_export_dept')")
public void exportDept(HttpServletResponse response, HardDeptTotalDto dto) throws IOException {
public void exportDept(HttpServletResponse response, @RequestBody HardDeptTotalDto dto) throws IOException {
List<HardDeptTotalVo> list = HardOrderTotalService.pageListDept(dto);
try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).withTemplate(ResourceUtil.getStream("file/部门交易金额汇总.xlsx")).build()) {
WriteSheet writeSheet = EasyExcel.writerSheet().build();
@@ -160,13 +160,25 @@ public class HardOrderTotalController {
map.put("endTime", LocalDateTimeUtil.format(dto.getCreateTimeList()[0], DatePattern.NORM_DATETIME_PATTERN));
}
if (ObjectUtil.isNotEmpty(list)) {
// 批量充值
BigDecimal walletPriceSum = BigDecimal.ZERO;
BigDecimal walletCountSum = BigDecimal.ZERO;
// 批量扣减
BigDecimal walletReducePriceSum = BigDecimal.ZERO;
BigDecimal walletReduceCountSum = BigDecimal.ZERO;
// 单次充值
BigDecimal walletOncePriceSum = BigDecimal.ZERO;
BigDecimal walletOnceCountSum = BigDecimal.ZERO;
// 单次扣减
BigDecimal walletOnceReducePriceSum = BigDecimal.ZERO;
BigDecimal walletOnceReduceCountSum = BigDecimal.ZERO;
BigDecimal orderPayPriceSum = BigDecimal.ZERO;
BigDecimal orderPayCountSum = BigDecimal.ZERO;
BigDecimal orderRefundPriceSum = BigDecimal.ZERO;
BigDecimal orderRefundContSum = BigDecimal.ZERO;
for (HardDeptTotalVo v : list) {
// 批量充值
if (ObjectUtil.isNotEmpty(v.getWalletPrice())) {
walletPriceSum = walletPriceSum.add(BigDecimal.valueOf(v.getWalletPrice()));
v.setWalletPrice(BigDecimal.valueOf(v.getWalletPrice()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
@@ -175,6 +187,33 @@ public class HardOrderTotalController {
walletCountSum = walletCountSum.add(BigDecimal.valueOf(v.getWalletCount()));
v.setWalletCount(BigDecimal.valueOf(v.getWalletCount()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
}
// 批量扣减
if (ObjectUtil.isNotEmpty(v.getWalletReducePrice())) {
walletReducePriceSum = walletReducePriceSum.add(BigDecimal.valueOf(v.getWalletReducePrice()));
v.setWalletReducePrice(BigDecimal.valueOf(v.getWalletReducePrice()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
}
if (ObjectUtil.isNotEmpty(v.getWalletReduceCount())) {
walletReduceCountSum = walletReduceCountSum.add(BigDecimal.valueOf(v.getWalletReduceCount()));
v.setWalletReduceCount(BigDecimal.valueOf(v.getWalletReduceCount()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
}
// 单次充值
if (ObjectUtil.isNotEmpty(v.getWalletOncePrice())) {
walletOncePriceSum = walletOncePriceSum.add(BigDecimal.valueOf(v.getWalletOncePrice()));
v.setWalletOncePrice(BigDecimal.valueOf(v.getWalletOncePrice()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
}
if (ObjectUtil.isNotEmpty(v.getWalletOnceCount())) {
walletOnceCountSum = walletOnceCountSum.add(BigDecimal.valueOf(v.getWalletOnceCount()));
v.setWalletOnceCount(BigDecimal.valueOf(v.getWalletOnceCount()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
}
// 单次扣减
if (ObjectUtil.isNotEmpty(v.getWalletOnceReducePrice())) {
walletOnceReducePriceSum = walletOnceReducePriceSum.add(BigDecimal.valueOf(v.getWalletOnceReducePrice()));
v.setWalletOncePrice(BigDecimal.valueOf(v.getWalletOnceReducePrice()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
}
if (ObjectUtil.isNotEmpty(v.getWalletOnceReduceCount())) {
walletOnceReduceCountSum = walletOnceReduceCountSum.add(BigDecimal.valueOf(v.getWalletOnceReduceCount()));
v.setWalletOnceReduceCount(BigDecimal.valueOf(v.getWalletOnceReduceCount()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
}
if (ObjectUtil.isNotEmpty(v.getOrderPayPrice())) {
orderPayPriceSum = orderPayPriceSum.add(BigDecimal.valueOf(v.getOrderPayPrice()));
v.setOrderPayPrice(BigDecimal.valueOf(v.getOrderPayPrice()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
@@ -191,8 +230,19 @@ public class HardOrderTotalController {
orderRefundContSum = orderRefundContSum.add(BigDecimal.valueOf(v.getOrderRefundCont()));
v.setOrderRefundCont(BigDecimal.valueOf(v.getOrderRefundCont()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
}
// 批量充值
map.put("walletPriceSum", walletPriceSum.divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).toString());
map.put("walletCountSum", walletCountSum.toString());
// 批量扣减
map.put("walletReducePriceSum", walletReducePriceSum.divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).toString());
map.put("walletReduceCountSum", walletReduceCountSum.toString());
// 单次充值
map.put("walletOncePriceSum", walletOncePriceSum.divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).toString());
map.put("walletOnceCountSum", walletOnceCountSum.toString());
// 单次扣减
map.put("walletOnceReducePriceSum", walletOnceReducePriceSum.divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).toString());
map.put("walletOnceReduceCountSum", walletOnceReduceCountSum.toString());
map.put("orderPayPriceSum", orderPayPriceSum.divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).toString());
map.put("orderPayCountSum", orderPayCountSum.toString());
map.put("orderRefundPriceSum", orderRefundPriceSum.divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).toString());
@@ -3,6 +3,7 @@ package com.bsd.pjcloud.hard.service.impl.order;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.admin.api.dto.DeptAllListDto;
import com.bsd.pjcloud.admin.api.entity.SysDept;
import com.bsd.pjcloud.admin.api.feign.RemoteDeptService;
import com.bsd.pjcloud.common.core.util.CollectionUtils;
@@ -58,6 +59,9 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService {
dto.setDeptIds(deptList.stream().map(SysDept::getDeptId).collect(Collectors.toList()));
}
}
if (ObjectUtil.isNotEmpty(dto.getDeptIds())) {
dto.setDeptId(null);
}
Page<HardOrderSbVo> list = hardOrderMapper.pageListSb(page, dto);
if (ObjectUtil.isNotEmpty(list)) {
// 商户
@@ -84,6 +88,16 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService {
@Override
public List<HardOrderSbVo> listSb(HardOrderDto dto) {
if (ObjectUtil.isNotEmpty(dto.getIsDeepDept()) && dto.getIsDeepDept() && ObjectUtil.isNotEmpty(dto.getDeptId())) {
List<SysDept> deptList = remoteDeptService.getDescendantList(dto.getDeptId()).getData();
dto.setDeptId(null);
if (ObjectUtil.isNotEmpty(deptList)) {
dto.setDeptIds(deptList.stream().map(SysDept::getDeptId).collect(Collectors.toList()));
}
}
if (ObjectUtil.isNotEmpty(dto.getDeptIds())) {
dto.setDeptId(null);
}
List<HardOrderSbVo> list = hardOrderMapper.listSb(dto);
if (ObjectUtil.isNotEmpty(list)) {
// 商户
@@ -110,6 +124,16 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService {
@Override
public Page<HardOrderCsVo> pageListCs(Page page, HardOrderDto dto) {
if (ObjectUtil.isNotEmpty(dto.getIsDeepDept()) && dto.getIsDeepDept() && ObjectUtil.isNotEmpty(dto.getDeptId())) {
List<SysDept> deptList = remoteDeptService.getDescendantList(dto.getDeptId()).getData();
dto.setDeptId(null);
if (ObjectUtil.isNotEmpty(deptList)) {
dto.setDeptIds(deptList.stream().map(SysDept::getDeptId).collect(Collectors.toList()));
}
}
if (ObjectUtil.isNotEmpty(dto.getDeptIds())) {
dto.setDeptId(null);
}
Page<HardOrderCsVo> list = hardOrderMapper.pageListCs(page, dto);
if (ObjectUtil.isNotEmpty(list)) {
// 商户
@@ -126,6 +150,16 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService {
@Override
public List<HardOrderCsVo> listCs(HardOrderDto dto) {
if (ObjectUtil.isNotEmpty(dto.getIsDeepDept()) && dto.getIsDeepDept() && ObjectUtil.isNotEmpty(dto.getDeptId())) {
List<SysDept> deptList = remoteDeptService.getDescendantList(dto.getDeptId()).getData();
dto.setDeptId(null);
if (ObjectUtil.isNotEmpty(deptList)) {
dto.setDeptIds(deptList.stream().map(SysDept::getDeptId).collect(Collectors.toList()));
}
}
if (ObjectUtil.isNotEmpty(dto.getDeptIds())) {
dto.setDeptId(null);
}
List<HardOrderCsVo> list = hardOrderMapper.listCs(dto);
if (ObjectUtil.isNotEmpty(list)) {
// 商户
@@ -143,9 +177,24 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService {
@Override
public List<HardDeptTotalVo> pageListDept(HardDeptTotalDto dto) {
// 查询部门
CompletableFuture<List<SysDept>> deptFuture = CompletableFuture.supplyAsync(() ->
remoteDeptService.getInnerAllDept().getData()
);
if (ObjectUtil.isNotEmpty(dto.getIsDeepDept()) && dto.getIsDeepDept() && ObjectUtil.isNotEmpty(dto.getDeptId())) {
List<SysDept> deptList = remoteDeptService.getDescendantList(dto.getDeptId()).getData();
dto.setDeptId(null);
if (ObjectUtil.isNotEmpty(deptList)) {
dto.setDeptIds(deptList.stream().map(SysDept::getDeptId).collect(Collectors.toList()));
}
}
CompletableFuture<List<SysDept>> deptFuture = CompletableFuture.supplyAsync(() -> {
DeptAllListDto deptDto = new DeptAllListDto();
if (ObjectUtil.isNotEmpty(dto.getDeptId())) {
deptDto.setDeptId(dto.getDeptId());
}
if (ObjectUtil.isNotEmpty(dto.getDeptIds())) {
deptDto.setDeptId(null);
deptDto.setDeptIds(dto.getDeptIds());
}
return remoteDeptService.getInnerAllDept(deptDto).getData();
});
CompletableFuture<List<HardDeptTotalVo>> resultListFuture = deptFuture.thenApply(deptList -> {
if (ObjectUtil.isEmpty(deptList)) return null;
List<Long> deptIds = deptList.stream().map(SysDept::getDeptId).filter(ObjectUtil::isNotEmpty).distinct().toList();
@@ -0,0 +1,14 @@
package com.bsd.pjcloud.admin.api.dto;
import lombok.Data;
import java.util.List;
@Data
public class DeptAllListDto {
private Long deptId;
private List<Long> deptIds;
}
@@ -20,14 +20,13 @@
package com.bsd.pjcloud.admin.api.feign;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.admin.api.dto.DeptAllListDto;
import com.bsd.pjcloud.admin.api.entity.SysDept;
import com.bsd.pjcloud.common.core.constant.ServiceNameConstants;
import com.bsd.pjcloud.common.core.util.R;
import com.bsd.pjcloud.common.feign.annotation.NoToken;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@@ -55,8 +54,8 @@ public interface RemoteDeptService {
* @return
*/
@NoToken
@GetMapping("/dept/inner-all-dept")
R<List<SysDept>> getInnerAllDept();
@PostMapping("/dept/inner-all-dept")
R<List<SysDept>> getInnerAllDept(@RequestBody DeptAllListDto dto);
/**
* 通过部门ID获取负责人列表
@@ -22,6 +22,7 @@ package com.bsd.pjcloud.admin.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.admin.api.dto.DeptAllListDto;
import com.bsd.pjcloud.admin.api.entity.SysDept;
import com.bsd.pjcloud.admin.api.vo.DeptExcelVO;
import com.bsd.pjcloud.admin.mapper.SysDeptMapper;
@@ -227,8 +228,8 @@ public class SysDeptController {
}
@Inner
@GetMapping("/inner-all-dept")
public R<List<SysDept>> getInnerAllDept() {
return R.ok(sysDeptMapper.allList());
@PostMapping("/inner-all-dept")
public R<List<SysDept>> getInnerAllDept(@RequestBody DeptAllListDto dto) {
return R.ok(sysDeptMapper.allList(dto));
}
}
@@ -19,9 +19,11 @@
package com.bsd.pjcloud.admin.mapper;
import com.bsd.pjcloud.admin.api.dto.DeptAllListDto;
import com.bsd.pjcloud.admin.api.entity.SysDept;
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -36,5 +38,6 @@ import java.util.List;
@Mapper
public interface SysDeptMapper extends PjcloudBaseMapper<SysDept> {
List<SysDept> allList();
List<SysDept> allList(@Param("dto") DeptAllListDto dto);
}
@@ -46,18 +46,33 @@
a.tenant_id
</sql>
<sql id="whereA">
<if test="dto.deptId != null">
AND a.dept_id = #{dto.deptId}
</if>
<if test="dto.deptIds != null and dto.deptIds.size() != 0">
and a.dept_id IN
<foreach collection="dto.deptIds" item="v" open="(" close=")" separator=",">
#{v}
</foreach>
</if>
</sql>
<select id="allList" resultType="com.bsd.pjcloud.admin.api.entity.SysDept">
select a.dept_id,
a.hard_group_id,
a.sort_order,
a.create_by,
a.update_by,
a.create_time,
a.update_time,
a.del_flag,
a.parent_id,
a.tenant_id,
if(a.del_flag != 0, CONCAT(a.name, '(已被删除)'), a.name) as name
from sys_dept a;
a.hard_group_id,
a.sort_order,
a.create_by,
a.update_by,
a.create_time,
a.update_time,
a.del_flag,
a.parent_id,
a.tenant_id,
if(a.del_flag != 0, CONCAT(a.name, '(已被删除)'), a.name) as name
from sys_dept a
<where>
<include refid="whereA"/>
</where>
</select>
</mapper>
@@ -40,4 +40,14 @@ public class WalletTransactionDto extends WalletTransactionEntity {
*/
private Boolean isFindOrder = false;
/**
* 是否深度搜索deptId
*/
private Boolean isDeepDept;
/**
* 部门ids
*/
private List<Long> deptIds;
}
@@ -93,8 +93,8 @@ public class WalletTransactionController {
}
@Operation(summary = "后台充值分页", description = "后台充值分页")
@GetMapping("/page-cz")
public R pageCz(@ParameterObject Page page, @ParameterObject WalletTransactionDto dto) {
@PostMapping("/page-cz")
public R pageCz(@ParameterObject Page page, @RequestBody WalletTransactionDto dto) {
dto.setBizTypes(WalletBizEnum.getTopUpCodes());
dto.setType(WalletTransactionDto.TYPE_INCOME);
DataScope dataScope = new DataScope();
@@ -102,8 +102,8 @@ public class WalletTransactionController {
}
@Operation(summary = "后台消费分页", description = "后台消费分页")
@GetMapping("/page-xf")
public R pageXf(@ParameterObject Page page, @ParameterObject WalletTransactionDto dto) {
@PostMapping("/page-xf")
public R pageXf(@ParameterObject Page page, @RequestBody WalletTransactionDto dto) {
dto.setBizTypes(List.of(WalletBizEnum.PAYMENT.getCode()));
dto.setIsFindOrder(true);
DataScope dataScope = new DataScope();
@@ -111,8 +111,8 @@ public class WalletTransactionController {
}
@Operation(summary = "后台退款分页", description = "后台退款分页")
@GetMapping("/page-tk")
public R pageTk(@ParameterObject Page page, @ParameterObject WalletTransactionDto dto) {
@PostMapping("/page-tk")
public R pageTk(@ParameterObject Page page, @RequestBody WalletTransactionDto dto) {
dto.setBizTypes(List.of(WalletBizEnum.REFUND.getCode()));
dto.setIsFindOrder(true);
DataScope dataScope = new DataScope();
@@ -159,27 +159,27 @@ public class WalletTransactionController {
}
@Operation(summary = "充值导出", description = "充值导出")
@GetMapping("/export-cz")
@PostMapping("/export-cz")
@PreAuthorize("@pms.hasPermission('wallet_walletTransaction_export')")
public void exportCz(HttpServletResponse response, @ParameterObject Page page, WalletTransactionDto dto) {
public void exportCz(HttpServletResponse response, @ParameterObject Page page, @RequestBody WalletTransactionDto dto) {
dto.setBizTypes(List.of(WalletBizEnum.RECHARGE.getCode()));
List<WalletTransactionVo> list = walletTransactionService.scopePageList(page, dto, DataScope.of()).getRecords();
walletTransactionService.exportByTemplate(response, dto, "file/个人充值明细.xlsx", list);
}
@Operation(summary = "消费导出", description = "消费导出")
@GetMapping("/export-xf")
@PostMapping("/export-xf")
@PreAuthorize("@pms.hasPermission('wallet_walletTransaction_export')")
public void exportXf(HttpServletResponse response, @ParameterObject Page page, WalletTransactionDto dto) {
public void exportXf(HttpServletResponse response, @ParameterObject Page page, @RequestBody WalletTransactionDto dto) {
dto.setBizTypes(List.of(WalletBizEnum.PAYMENT.getCode()));
List<WalletTransactionVo> list = walletTransactionService.scopePageList(page, dto, DataScope.of()).getRecords();
walletTransactionService.exportByTemplate(response, dto, "file/个人消费明细.xlsx", list);
}
@Operation(summary = "退款导出", description = "退款导出")
@GetMapping("/export-tk")
@PostMapping("/export-tk")
@PreAuthorize("@pms.hasPermission('wallet_walletTransaction_export')")
public void exportTk(HttpServletResponse response, @ParameterObject Page page, WalletTransactionDto dto) {
public void exportTk(HttpServletResponse response, @ParameterObject Page page, @RequestBody WalletTransactionDto dto) {
dto.setBizTypes(List.of(WalletBizEnum.REFUND.getCode()));
dto.setIsFindOrder(true);
List<WalletTransactionVo> list = walletTransactionService.scopePageList(page, dto, DataScope.of()).getRecords();
@@ -51,7 +51,9 @@ public interface WalletTransactionMapper extends PjcloudBaseMapper<WalletTransac
LambdaQueryWrapper<WalletTransactionEntity> wrapper = new LambdaQueryWrapper<WalletTransactionEntity>()
.eq(ObjectUtil.isNotEmpty(dto.getWalletId()), WalletTransactionEntity::getWalletId, dto.getWalletId())
.eq(ObjectUtil.isNotEmpty(dto.getBizType()), WalletTransactionEntity::getBizType, dto.getBizType())
.eq(ObjectUtil.isNotEmpty(dto.getDeptId()), WalletTransactionEntity::getDeptId, dto.getDeptId())
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletTransactionEntity::getUserId, dto.getUserIds())
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletTransactionEntity::getDeptId, dto.getDeptIds())
.in(ObjectUtil.isNotEmpty(dto.getBizTypes()), WalletTransactionEntity::getBizType, dto.getBizTypes())
.between(
ObjectUtil.isNotEmpty(dto.getCreateTimeList()),
@@ -50,6 +50,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 会员钱包流水表
@@ -166,6 +167,17 @@ public class WalletTransactionServiceImpl extends ServiceImpl<WalletTransactionM
@Override
public Page<WalletTransactionVo> scopePageList(Page page, WalletTransactionDto dto, DataScope dataScope) {
// 查询部门
if (ObjectUtil.isNotEmpty(dto.getIsDeepDept()) && dto.getIsDeepDept() && ObjectUtil.isNotEmpty(dto.getDeptId())) {
List<SysDept> deptList = deptService.getDescendantList(dto.getDeptId()).getData();
dto.setDeptId(null);
if (ObjectUtil.isNotEmpty(deptList)) {
dto.setDeptIds(deptList.stream().map(SysDept::getDeptId).collect(Collectors.toList()));
}
}
if (ObjectUtil.isNotEmpty(dto.getDeptIds())) {
dto.setDeptId(null);
}
Page<WalletTransactionVo> list = baseMapper.scopePageList(page, dto, dataScope);
if (ObjectUtil.isNotEmpty(list.getRecords())) {
// 用户