From e1bf287e75943bcb5463c004c8333ed28cfd789a Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Tue, 24 Jun 2025 15:17:38 +0800
Subject: [PATCH 1/9] =?UTF-8?q?feat:=E7=94=A8=E6=88=B7=E5=AF=BC=E5=87=BA?=
=?UTF-8?q?=E9=87=8D=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
db/800pjcloudx_wallet.sql | 1 +
.../src/main/resources/mapper/SysUserMapper.xml | 2 +-
.../api/entity/recharge/WalletRechargeInvoiceEntity.java | 6 ++++++
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/db/800pjcloudx_wallet.sql b/db/800pjcloudx_wallet.sql
index 659672437..82cb4e569 100644
--- a/db/800pjcloudx_wallet.sql
+++ b/db/800pjcloudx_wallet.sql
@@ -402,6 +402,7 @@ CREATE TABLE wallet_recharge_invoice
item_json varchar(2048) DEFAULT NULL COMMENT '备注',
remark varchar(1024) DEFAULT NULL COMMENT '备注',
status varchar(32) DEFAULT NULL COMMENT '状态',
+ pic_url varchar(1024) DEFAULT NULL COMMENT '发票图片地址',
create_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
create_time datetime DEFAULT NULL COMMENT '创建时间',
update_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人',
diff --git a/pjcloud-upms/pjcloud-upms-biz/src/main/resources/mapper/SysUserMapper.xml b/pjcloud-upms/pjcloud-upms-biz/src/main/resources/mapper/SysUserMapper.xml
index 49847405f..889ba6d9b 100644
--- a/pjcloud-upms/pjcloud-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+++ b/pjcloud-upms/pjcloud-upms-biz/src/main/resources/mapper/SysUserMapper.xml
@@ -306,7 +306,7 @@
-
+ group by u.user_id
ORDER BY u.create_time DESC
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeInvoiceEntity.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeInvoiceEntity.java
index d01cde87a..40550790c 100644
--- a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeInvoiceEntity.java
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeInvoiceEntity.java
@@ -87,6 +87,12 @@ public class WalletRechargeInvoiceEntity extends Model
Date: Wed, 25 Jun 2025 14:25:30 +0800
Subject: [PATCH 2/9] =?UTF-8?q?feat:=E6=9C=80=E5=A4=9A=E6=8F=90=E4=BA=A410?=
=?UTF-8?q?=E6=AC=A1=E7=94=B3=E8=AF=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/bsd/pjcloud/admin/PayTest.java | 4 +-
.../api/constant/WalletBizRechargeEnum.java | 2 +-
.../WalletRechargeBindInvoiceDto.java | 17 +++++++
.../recharge/WalletRechargeApplyEntity.java | 6 +++
.../recharge/WalletRechargeInvoiceEntity.java | 4 +-
.../WalletRechargeApplyController.java | 1 -
.../WalletRechargeInvoiceController.java | 10 +++-
.../service/WalletRechargeInvoiceService.java | 7 +++
.../WalletRechargeApplyServiceImpl.java | 4 +-
.../WalletRechargeInvoiceServiceImpl.java | 49 ++++++++++++++++---
.../wallet/utils/ConvertCnPriceUtil.java | 11 +++++
11 files changed, 100 insertions(+), 15 deletions(-)
create mode 100644 pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/dto/recharge/WalletRechargeBindInvoiceDto.java
diff --git a/pjcloud-thirdparty/pjcloud-thirdparty-biz/src/test/java/com/bsd/pjcloud/admin/PayTest.java b/pjcloud-thirdparty/pjcloud-thirdparty-biz/src/test/java/com/bsd/pjcloud/admin/PayTest.java
index 13a93d091..6a8fd2dd7 100644
--- a/pjcloud-thirdparty/pjcloud-thirdparty-biz/src/test/java/com/bsd/pjcloud/admin/PayTest.java
+++ b/pjcloud-thirdparty/pjcloud-thirdparty-biz/src/test/java/com/bsd/pjcloud/admin/PayTest.java
@@ -29,7 +29,7 @@ import java.util.Map;
@SpringBootTest(classes = ThirdPartyApp.class)
public class PayTest {
- // private final String baseUrl = "http://123.156.230.15:8089/api";
+ // private final String baseUrl = "http://59.202.170.152:81/api";
// private final String baseUrl = "http://127.0.0.1:9999";
private final String baseUrl = "https://stgl.pj.gov.cn/api";
@@ -67,7 +67,7 @@ public class PayTest {
Map paramsMap = new HashMap<>();
paramsMap.put("signPhone", LbRetailSignUtils.sm4Encrypt("17683843144", appM4KeyProd));
// paramsMap.put("signPhone", "8KKubCKESDN5TlUl3i0HaQ==");
- paramsMap.put("userId", 1875049673022279681L);
+ // paramsMap.put("userId", 1875049673022279681L);
String body = JSONUtil.toJsonStr(paramsMap);
// 发送请求
String res = HttpRequest.post(baseUrl + walletInfoUrl).contentType("application/json").header(apiCountersignProd(body)).body(body).execute().body();
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletBizRechargeEnum.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletBizRechargeEnum.java
index 6fdfe731b..907ac832d 100644
--- a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletBizRechargeEnum.java
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletBizRechargeEnum.java
@@ -10,7 +10,7 @@ import java.util.List;
@Getter
@AllArgsConstructor
public enum WalletBizRechargeEnum {
- ADD("1", "添加"),
+ ADD("1", "充值"),
REDUCTION("2", "记账扣款"),
RETURN_CANTEEN("3", "退还各自食堂"),
;
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/dto/recharge/WalletRechargeBindInvoiceDto.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/dto/recharge/WalletRechargeBindInvoiceDto.java
new file mode 100644
index 000000000..e7903a352
--- /dev/null
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/dto/recharge/WalletRechargeBindInvoiceDto.java
@@ -0,0 +1,17 @@
+package com.bsd.pjcloud.wallet.api.dto.recharge;
+
+import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceEntityVo;
+import lombok.Data;
+
+/**
+ * 充值记录绑定发票
+ */
+@Data
+public class WalletRechargeBindInvoiceDto extends WalletRechargeInvoiceEntityVo {
+
+ /**
+ * 充值/扣款申请id
+ */
+ private Long applyId;
+
+}
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeApplyEntity.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeApplyEntity.java
index 74718a078..b42e97e22 100644
--- a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeApplyEntity.java
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeApplyEntity.java
@@ -40,6 +40,12 @@ public class WalletRechargeApplyEntity extends Model
@Schema(description = "流程id")
private String processId;
+ /**
+ * 绑定发票id
+ */
+ @Schema(description = "绑定发票id")
+ private Long invoiceId;
+
/**
* 流程状态
*/
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeInvoiceEntity.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeInvoiceEntity.java
index 40550790c..fd5a7404c 100644
--- a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeInvoiceEntity.java
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeInvoiceEntity.java
@@ -88,9 +88,9 @@ public class WalletRechargeInvoiceEntity extends Model {
@@ -15,4 +17,9 @@ public interface WalletRechargeInvoiceService extends IService().eq(WalletRechargeApplyEntity::getUserId, walletId).eq(WalletRechargeApplyEntity::getProcessStatus, NodeStatusEnum.JXZ.getCode()));
- return count >= 3;
+ return count >= 10;
}
/**
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java
index 9a09413b8..2a374da7d 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java
@@ -1,15 +1,19 @@
package com.bsd.pjcloud.wallet.service.impl.recharge;
+import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bsd.pjcloud.admin.api.dto.UserInfo;
import com.bsd.pjcloud.admin.api.feign.RemoteUserService;
import com.bsd.pjcloud.flow.task.constant.TaskCheckStatusEnum;
+import com.bsd.pjcloud.wallet.api.constant.WalletBizRechargeEnum;
import com.bsd.pjcloud.wallet.api.constant.WalletRechargeInvoiceStatusEnum;
+import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeBindInvoiceDto;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeApplyEntity;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeImportEntity;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeInvoiceEntity;
@@ -17,6 +21,7 @@ import com.bsd.pjcloud.wallet.api.feign.RemoteWalletSettingService;
import com.bsd.pjcloud.wallet.api.vo.WalletSettingVo;
import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceEntityItemVo;
import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceEntityVo;
+import com.bsd.pjcloud.wallet.mapper.recharge.WalletRechargeApplyMapper;
import com.bsd.pjcloud.wallet.mapper.recharge.WalletRechargeImportMapper;
import com.bsd.pjcloud.wallet.mapper.recharge.WalletRechargeInvoiceMapper;
import com.bsd.pjcloud.wallet.service.WalletRechargeApplyService;
@@ -24,8 +29,10 @@ import com.bsd.pjcloud.wallet.service.WalletRechargeInvoiceService;
import com.bsd.pjcloud.wallet.utils.ConvertCnPriceUtil;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
+import java.math.RoundingMode;
import java.util.List;
/**
@@ -36,6 +43,7 @@ import java.util.List;
public class WalletRechargeInvoiceServiceImpl extends ServiceImpl implements WalletRechargeInvoiceService {
private final WalletRechargeImportMapper importMapper;
+ private final WalletRechargeApplyMapper applyMapper;
private final WalletRechargeApplyService applyService;
@@ -49,8 +57,9 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl()
+ .eq(WalletRechargeInvoiceEntity::getApplyId, id)
+ .eq(WalletRechargeInvoiceEntity::getStatus, WalletRechargeInvoiceStatusEnum.DEFAULT.getCode())
+ );
+ if (ObjectUtil.isNotEmpty(InvoiceEntity)) {
+ result = BeanUtil.copyProperties(InvoiceEntity, WalletRechargeInvoiceEntityVo.class);
+ Double price = BigDecimal.valueOf(result.getTotalPrice()).divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP).doubleValue();
+ result.setTotalPriceCnStr(ConvertCnPriceUtil.convert(String.valueOf(price)));
+ return result;
+ }
+
// 获取配置
WalletSettingVo walletSetting = remoteWalletSettingService.get().getData();
// 查询申请人
@@ -79,13 +102,13 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl importList = importMapper.selectList(new LambdaQueryWrapper().eq(WalletRechargeImportEntity::getApplyId, id));
Integer totalPrice = importList.stream().map(WalletRechargeImportEntity::getPrice).reduce(Integer::sum).orElse(0);
// 转换为元
- double price = BigDecimal.valueOf(totalPrice).divide(BigDecimal.valueOf(100)).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+ Double price = BigDecimal.valueOf(totalPrice).divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP).doubleValue();
// 生成款项
WalletRechargeInvoiceEntityItemVo item = new WalletRechargeInvoiceEntityItemVo();
- item.setName(LocalDateTimeUtil.format(applyDetail.getImportTime(), DatePattern.NORM_MONTH_PATTERN));
+ String itemName = LocalDateTimeUtil.format(applyDetail.getImportTime(), DatePattern.NORM_DATE_PATTERN) + "," + bizEnum.getDesc() + price + "元";
+ item.setName(itemName);
item.setPrice(price);
- WalletRechargeInvoiceEntityVo result = new WalletRechargeInvoiceEntityVo();
result.setApplyId(applyDetail.getId());
result.setCode(getInvoiceCode());
result.setTime(applyDetail.getApplyTime());
@@ -95,9 +118,9 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl updateWrapper = new LambdaUpdateWrapper()
+ .set(WalletRechargeApplyEntity::getInvoiceId, entity.getId())
+ .eq(WalletRechargeApplyEntity::getId, entity.getApplyId());
+ applyMapper.update(updateWrapper);
+ }
}
\ No newline at end of file
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/utils/ConvertCnPriceUtil.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/utils/ConvertCnPriceUtil.java
index 50e58ada3..83bdfcc7a 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/utils/ConvertCnPriceUtil.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/utils/ConvertCnPriceUtil.java
@@ -24,6 +24,13 @@ public class ConvertCnPriceUtil {
// 去掉分隔符
amount = amount.replace(",", "");
+ String[] split = amount.split("\\.");
+ if (split.length > 1) {
+ if (split[1].length() == 1) {
+ amount = amount + "0";
+ }
+ }
+
// 验证金额正确性
if (amount.equals("0.00")) {
throw new IllegalArgumentException("金额不能为零.");
@@ -89,4 +96,8 @@ public class ConvertCnPriceUtil {
}
return buffer.reverse().toString();
}
+
+ public static void main(String[] args) {
+ System.out.println(convert("55.00"));
+ }
}
From 6ac12d8d4477869d11be35222159345fb4309371 Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Wed, 25 Jun 2025 16:43:12 +0800
Subject: [PATCH 3/9] =?UTF-8?q?feat:=E5=8F=91=E7=A5=A8=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
db/800pjcloudx_wallet.sql | 38 ++++---
.../WalletRechargeInvoiceStatusEnum.java | 9 +-
.../WalletRechargeBindInvoiceDto.java | 18 ++-
.../recharge/WalletRechargeImportEntity.java | 6 +
.../recharge/WalletRechargeInvoiceEntity.java | 16 ++-
....java => WalletRechargeInvoiceItemVo.java} | 2 +-
...tyVo.java => WalletRechargeInvoiceVo.java} | 2 +-
.../WalletRechargeApplyController.java | 5 +
.../WalletRechargeInvoiceController.java | 21 ++--
.../recharge/WalletRechargeInvoiceMapper.java | 14 +++
.../service/WalletRechargeApplyService.java | 7 +-
.../service/WalletRechargeInvoiceService.java | 28 ++++-
.../WalletRechargeApplyServiceImpl.java | 68 +++++++++---
.../WalletRechargeInvoiceServiceImpl.java | 104 +++++++++++++++---
.../recharge/WalletRechargeInvoiceMapper.xml | 72 ++++++++----
15 files changed, 320 insertions(+), 90 deletions(-)
rename pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/vo/recharge/{WalletRechargeInvoiceEntityItemVo.java => WalletRechargeInvoiceItemVo.java} (83%)
rename pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/vo/recharge/{WalletRechargeInvoiceEntityVo.java => WalletRechargeInvoiceVo.java} (70%)
diff --git a/db/800pjcloudx_wallet.sql b/db/800pjcloudx_wallet.sql
index 82cb4e569..8322e62a9 100644
--- a/db/800pjcloudx_wallet.sql
+++ b/db/800pjcloudx_wallet.sql
@@ -391,24 +391,26 @@ CREATE INDEX idx_dept_id ON wallet_recharge_apply (user_id);
DROP TABLE IF EXISTS wallet_recharge_invoice;
CREATE TABLE wallet_recharge_invoice
(
- id bigint NOT NULL COMMENT '主键ID',
- apply_id bigint NOT NULL COMMENT '申请id',
- code varchar(32) NOT NULL COMMENT '发票代码(七位数)',
- time datetime DEFAULT NULL COMMENT '发票日期',
- dept_or_user varchar(64) DEFAULT NULL COMMENT '交款单位或个人',
- total_price int DEFAULT NULL COMMENT '合计人民币',
- payee_dept varchar(64) DEFAULT NULL COMMENT '收款单位',
- payee_user varchar(64) DEFAULT NULL COMMENT '收款人',
- item_json varchar(2048) DEFAULT NULL COMMENT '备注',
- remark varchar(1024) DEFAULT NULL COMMENT '备注',
- status varchar(32) DEFAULT NULL COMMENT '状态',
- pic_url varchar(1024) DEFAULT NULL COMMENT '发票图片地址',
- create_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
- create_time datetime DEFAULT NULL COMMENT '创建时间',
- update_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人',
- update_time datetime DEFAULT NULL COMMENT '修改时间',
- del_flag char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标记',
- tenant_id bigint DEFAULT NULL COMMENT '租户ID',
+ id bigint NOT NULL COMMENT '主键ID',
+ apply_user_id bigint DEFAULT NULL COMMENT '申请用户id',
+ apply_dept_id bigint DEFAULT NULL COMMENT '申请用户部门id',
+ apply_id bigint DEFAULT NULL COMMENT '申请id',
+ code varchar(32) NOT NULL COMMENT '发票代码(七位数)',
+ time datetime DEFAULT NULL COMMENT '发票日期',
+ dept_or_user varchar(64) DEFAULT NULL COMMENT '交款单位或个人',
+ total_price int DEFAULT NULL COMMENT '合计人民币',
+ payee_dept varchar(64) DEFAULT NULL COMMENT '收款单位',
+ payee_user varchar(64) DEFAULT NULL COMMENT '收款人',
+ item_json varchar(2048) DEFAULT NULL COMMENT '备注',
+ remark varchar(1024) DEFAULT NULL COMMENT '备注',
+ status varchar(32) DEFAULT NULL COMMENT '状态',
+ pic_url varchar(1024) DEFAULT NULL COMMENT '发票图片地址',
+ create_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
+ create_time datetime DEFAULT NULL COMMENT '创建时间',
+ update_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人',
+ update_time datetime DEFAULT NULL COMMENT '修改时间',
+ del_flag char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标记',
+ tenant_id bigint DEFAULT NULL COMMENT '租户ID',
PRIMARY KEY (id)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletRechargeInvoiceStatusEnum.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletRechargeInvoiceStatusEnum.java
index 9f8322276..a16dc6739 100644
--- a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletRechargeInvoiceStatusEnum.java
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletRechargeInvoiceStatusEnum.java
@@ -6,13 +6,16 @@ import lombok.Getter;
import java.util.Arrays;
-// cancellation
+/**
+ * 充值/申请发票状态
+ */
@Getter
@AllArgsConstructor
public enum WalletRechargeInvoiceStatusEnum {
- DEFAULT("1", "默认"),
- CANCELLATION("2", "作废"),
+ UNCHECKED("1", "未审核"),
+ CHECKED("2", "审核通过"),
+ CANCELLATION("3", "作废"),
;
private final String code;
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/dto/recharge/WalletRechargeBindInvoiceDto.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/dto/recharge/WalletRechargeBindInvoiceDto.java
index e7903a352..f2b35c5b9 100644
--- a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/dto/recharge/WalletRechargeBindInvoiceDto.java
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/dto/recharge/WalletRechargeBindInvoiceDto.java
@@ -1,17 +1,31 @@
package com.bsd.pjcloud.wallet.api.dto.recharge;
-import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceEntityVo;
+import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceVo;
import lombok.Data;
+import org.apache.commons.math3.optim.nonlinear.scalar.LineSearch;
+
+import java.time.LocalDateTime;
+import java.util.List;
/**
* 充值记录绑定发票
*/
@Data
-public class WalletRechargeBindInvoiceDto extends WalletRechargeInvoiceEntityVo {
+public class WalletRechargeBindInvoiceDto extends WalletRechargeInvoiceVo {
/**
* 充值/扣款申请id
*/
private Long applyId;
+ /**
+ * 申请人
+ */
+ private List userIds;
+
+ /**
+ * 创建时间
+ */
+ private LocalDateTime[] createTimeList;
+
}
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeImportEntity.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeImportEntity.java
index 74c8715a5..fc35e52fc 100644
--- a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeImportEntity.java
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeImportEntity.java
@@ -49,6 +49,12 @@ public class WalletRechargeImportEntity extends Model excelVOList, BindingResult bindingResult) {
+ return walletRechargeApplyService.readTopupExcel(excelVOList, bindingResult);
+ }
+
/* ************************************* start excel start ************************************* */
}
\ No newline at end of file
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeInvoiceController.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeInvoiceController.java
index e3324d934..444d45f9c 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeInvoiceController.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeInvoiceController.java
@@ -2,14 +2,13 @@ package com.bsd.pjcloud.wallet.controller.recharge;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.common.core.util.R;
import com.bsd.pjcloud.common.log.annotation.SysLog;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeBindInvoiceDto;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeInvoiceEntity;
-import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceEntityVo;
+import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceVo;
import com.bsd.pjcloud.wallet.service.WalletRechargeInvoiceService;
import jakarta.validation.Valid;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -38,7 +37,7 @@ public class WalletRechargeInvoiceController {
@GetMapping("/get-invoice")
@Operation(summary = "批量充值/扣款发票信息")
- public R getInvoice(@RequestParam Long id) {
+ public R getInvoice(@RequestParam Long id) {
return R.ok(walletRechargeInvoiceService.getInvoice(id));
}
@@ -49,19 +48,24 @@ public class WalletRechargeInvoiceController {
return R.ok();
}
+ @Operation(summary = "下拉", description = "下拉")
+ @GetMapping("/select")
+ public R select(@ParameterObject Page page, @ParameterObject WalletRechargeBindInvoiceDto dto) {
+ return R.ok(walletRechargeInvoiceService.scopePageList(page, dto));
+ }
+
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page")
@PreAuthorize("@pms.hasPermission('wallet_walletRechargeInvoice_view')")
- public R getWalletRechargeInvoicePage(@ParameterObject Page page, @ParameterObject WalletRechargeInvoiceEntity walletRechargeInvoice) {
- LambdaQueryWrapper wrapper = Wrappers.lambdaQuery();
- return R.ok(walletRechargeInvoiceService.page(page, wrapper));
+ public R getWalletRechargeInvoicePage(@ParameterObject Page page, @ParameterObject WalletRechargeBindInvoiceDto dto) {
+ return R.ok(walletRechargeInvoiceService.scopePageList(page, dto));
}
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('wallet_walletRechargeInvoice_view')")
public R getById(@PathVariable("id") Long id) {
- return R.ok(walletRechargeInvoiceService.getById(id));
+ return R.ok(walletRechargeInvoiceService.joinById(id));
}
@Operation(summary = "新增充值/扣款申请发票记录", description = "新增充值/扣款申请发票记录")
@@ -85,7 +89,8 @@ public class WalletRechargeInvoiceController {
@DeleteMapping
@PreAuthorize("@pms.hasPermission('wallet_walletRechargeInvoice_del')")
public R removeById(@RequestBody Long[] ids) {
- return R.ok(walletRechargeInvoiceService.removeBatchByIds(CollUtil.toList(ids)));
+ walletRechargeInvoiceService.delByIds(CollUtil.toList(ids));
+ return R.ok();
}
@ResponseExcel
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeInvoiceMapper.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeInvoiceMapper.java
index 2f7b3440d..dc1fe3f60 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeInvoiceMapper.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeInvoiceMapper.java
@@ -1,8 +1,12 @@
package com.bsd.pjcloud.wallet.mapper.recharge;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
+import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeBindInvoiceDto;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeInvoiceEntity;
+import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceVo;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
@Mapper
public interface WalletRechargeInvoiceMapper extends PjcloudBaseMapper {
@@ -11,4 +15,14 @@ public interface WalletRechargeInvoiceMapper extends PjcloudBaseMapper scopePageList(Page page, @Param("dto") WalletRechargeBindInvoiceDto dto);
+
+ /**
+ * 查询详情
+ */
+ WalletRechargeInvoiceVo joinById(@Param("id") Long id);
}
\ No newline at end of file
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeApplyService.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeApplyService.java
index b4628cfb2..6e806a8cf 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeApplyService.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeApplyService.java
@@ -41,10 +41,15 @@ public interface WalletRechargeApplyService extends IService excelVOList, BindingResult bindingResult);
+ /**
+ * 读取充值excel内容
+ */
+ R readTopupExcel(List excelVOList, BindingResult bindingResult);
+
/**
* 审批回调
*/
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeInvoiceService.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeInvoiceService.java
index 0ec849280..5f694272a 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeInvoiceService.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeInvoiceService.java
@@ -1,17 +1,31 @@
package com.bsd.pjcloud.wallet.service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.bsd.pjcloud.common.security.service.PjcloudUser;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeBindInvoiceDto;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeInvoiceEntity;
-import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceEntityVo;
+import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceVo;
import jakarta.validation.Valid;
+import java.util.ArrayList;
+
public interface WalletRechargeInvoiceService extends IService {
+ /**
+ * 分页查询
+ */
+ Page scopePageList(Page page, WalletRechargeBindInvoiceDto dto);
+
+ /**
+ * 查询详情
+ */
+ WalletRechargeInvoiceVo joinById(Long id);
+
/**
* 批量充值/扣款发票信息
*/
- WalletRechargeInvoiceEntityVo getInvoice(Long id);
+ WalletRechargeInvoiceVo getInvoice(Long id);
/**
* 获取发票代码
@@ -22,4 +36,14 @@ public interface WalletRechargeInvoiceService extends IService list);
}
\ No newline at end of file
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeApplyServiceImpl.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeApplyServiceImpl.java
index 71c3d72f3..b8ffffa64 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeApplyServiceImpl.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeApplyServiceImpl.java
@@ -43,6 +43,7 @@ import com.bsd.pjcloud.wallet.api.entity.WalletManageEntity;
import com.bsd.pjcloud.wallet.api.entity.WalletTypeEntity;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeApplyEntity;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeImportEntity;
+import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeInvoiceEntity;
import com.bsd.pjcloud.wallet.api.utils.WalletDataUtil;
import com.bsd.pjcloud.wallet.api.vo.WalletManageVo;
import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeApplyVo;
@@ -52,6 +53,7 @@ import com.bsd.pjcloud.wallet.mapper.WalletManageMapper;
import com.bsd.pjcloud.wallet.mapper.WalletTransactionMapper;
import com.bsd.pjcloud.wallet.mapper.WalletTypeMapper;
import com.bsd.pjcloud.wallet.mapper.recharge.WalletRechargeApplyMapper;
+import com.bsd.pjcloud.wallet.mapper.recharge.WalletRechargeInvoiceMapper;
import com.bsd.pjcloud.wallet.service.*;
import com.bsd.pjcloud.wallet.utils.flow.FlowUtil;
import com.bsd.pjcloud.wallet.utils.flow.dto.WalletRechargeApplyFlowDto;
@@ -59,6 +61,7 @@ import com.bsd.pjcloud.wallet.utils.flow.dto.WalletRechargeApplyFlowDto;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.tuple.ImmutablePair;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.BindingResult;
@@ -92,6 +95,7 @@ public class WalletRechargeApplyServiceImpl extends ServiceImpl list, BindingResult bindingResult) {
+ public R readExcel(List excelVOList, BindingResult bindingResult) {
+ ImmutablePair, List> pair = validateExcelData(excelVOList, bindingResult);
+ List errorMessages = pair.getLeft();
+ List list = pair.getRight();
+ if (ObjectUtil.isNotEmpty(errorMessages)) return R.failed(errorMessages);
+ PjcloudUser loginUser = SecurityUtils.getUser();
+ WalletRechargeApplyEntity insertObj = new WalletRechargeApplyEntity();
+ insertObj.setDeptId(loginUser.getDeptId());
+ insertObj.setUserId(loginUser.getId());
+ int i = baseMapper.insert(insertObj);
+ if (i <= 0) {
+ throw new RuntimeException("导入失败");
+ }
+ List batchSaveList = list.stream().map(v -> WalletRechargeImportEntity.builder().price(v.getPriceNumber()).userId(v.getUserId()).userDeptId(v.getUserDeptId()).build()).toList();
+ batchSaveList.forEach(v -> v.setApplyId(insertObj.getId()));
+ rechargeImportService.saveBatch(batchSaveList);
+ return R.ok(null, "导入成功");
+ }
+
+ /**
+ * 读取充值excel内容
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public R readTopupExcel(List excelVOList, BindingResult bindingResult) {
+ ImmutablePair, List> pair = validateExcelData(excelVOList, bindingResult);
+ List errorMessages = pair.getLeft();
+ List list = pair.getRight();
+ if (ObjectUtil.isNotEmpty(errorMessages)) return R.failed(errorMessages);
+ PjcloudUser loginUser = SecurityUtils.getUser();
+ // 先创建发票
+ Integer totalPrice = list.stream().map(WalletRechargeExcelDto::getPriceNumber).reduce(Integer::sum).orElse(0);
+ WalletRechargeInvoiceEntity invoice = walletRechargeInvoiceService.createBaseInvoice(loginUser, totalPrice);
+ if (ObjectUtil.isEmpty(invoice)) throw new RuntimeException("导入失败");
+ // 导入数据
+ List batchSaveList = list.stream().map(v -> WalletRechargeImportEntity.builder().price(v.getPriceNumber()).userId(v.getUserId()).userDeptId(v.getUserDeptId()).invoiceId(invoice.getId()).build()).toList();
+ rechargeImportService.saveBatch(batchSaveList);
+ return R.ok(null, "导入成功");
+ }
+
+ /**
+ * 校验充值/扣款excel的数据
+ */
+ public ImmutablePair, List> validateExcelData(List list, BindingResult bindingResult) {
if (ObjectUtil.isEmpty(list)) {
- return R.failed();
+ throw new RuntimeException("读取excel数据错误");
}
list = list.stream().filter(v -> !ObjectUtil.isAllEmpty(v.getUsername(), v.getUserMobile(), v.getPrice())).toList();
if (ObjectUtil.isEmpty(list)) {
- return R.failed();
+ throw new RuntimeException("读取excel数据错误");
}
List errorMessageList = (List) bindingResult.getTarget();
List usernameList = list.stream().map(WalletRechargeExcelDto::getUsername).toList();
@@ -306,20 +353,9 @@ public class WalletRechargeApplyServiceImpl extends ServiceImpl batchSaveList = list.stream().map(v -> WalletRechargeImportEntity.builder().price(v.getPriceNumber()).userId(v.getUserId()).userDeptId(v.getUserDeptId()).build()).toList();
- batchSaveList.forEach(v -> v.setApplyId(insertObj.getId()));
- rechargeImportService.saveBatch(batchSaveList);
- return R.ok(null, "导入成功");
+ return ImmutablePair.of(null, list);
}
/* ************************************* end excel end ************************************* */
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java
index 2a374da7d..7d61ad10e 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java
@@ -1,15 +1,15 @@
package com.bsd.pjcloud.wallet.service.impl.recharge;
import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.date.DatePattern;
-import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bsd.pjcloud.admin.api.dto.UserInfo;
import com.bsd.pjcloud.admin.api.feign.RemoteUserService;
+import com.bsd.pjcloud.common.security.service.PjcloudUser;
import com.bsd.pjcloud.flow.task.constant.TaskCheckStatusEnum;
import com.bsd.pjcloud.wallet.api.constant.WalletBizRechargeEnum;
import com.bsd.pjcloud.wallet.api.constant.WalletRechargeInvoiceStatusEnum;
@@ -19,12 +19,11 @@ import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeImportEntity;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeInvoiceEntity;
import com.bsd.pjcloud.wallet.api.feign.RemoteWalletSettingService;
import com.bsd.pjcloud.wallet.api.vo.WalletSettingVo;
-import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceEntityItemVo;
-import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceEntityVo;
+import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceItemVo;
+import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeInvoiceVo;
import com.bsd.pjcloud.wallet.mapper.recharge.WalletRechargeApplyMapper;
import com.bsd.pjcloud.wallet.mapper.recharge.WalletRechargeImportMapper;
import com.bsd.pjcloud.wallet.mapper.recharge.WalletRechargeInvoiceMapper;
-import com.bsd.pjcloud.wallet.service.WalletRechargeApplyService;
import com.bsd.pjcloud.wallet.service.WalletRechargeInvoiceService;
import com.bsd.pjcloud.wallet.utils.ConvertCnPriceUtil;
import lombok.AllArgsConstructor;
@@ -33,6 +32,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.math.RoundingMode;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -45,18 +46,37 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl scopePageList(Page page, WalletRechargeBindInvoiceDto dto) {
+ return baseMapper.scopePageList(page, dto);
+ }
+
+ /**
+ * 查询详情
+ */
+ @Override
+ public WalletRechargeInvoiceVo joinById(Long id) {
+ WalletRechargeInvoiceVo detail = baseMapper.joinById(id);
+ if (ObjectUtil.isEmpty(detail)) return detail;
+ // 转换为元
+ Double price = BigDecimal.valueOf(detail.getTotalPrice()).divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP).doubleValue();
+ detail.setTotalPriceCnStr(ConvertCnPriceUtil.convert(String.valueOf(price)));
+ return detail;
+ }
+
/**
* 批量充值/扣款发票信息
*/
@Override
- public WalletRechargeInvoiceEntityVo getInvoice(Long id) {
+ public WalletRechargeInvoiceVo getInvoice(Long id) {
// 查询申请记录
- WalletRechargeApplyEntity applyDetail = applyService.getById(id);
+ WalletRechargeApplyEntity applyDetail = applyMapper.selectById(id);
WalletBizRechargeEnum bizEnum = WalletBizRechargeEnum.valueOfByType(applyDetail.getBizType());
if (ObjectUtil.isEmpty(applyDetail)) {
throw new RuntimeException("批量充值/扣款申请不存在");
@@ -71,13 +91,13 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl()
.eq(WalletRechargeInvoiceEntity::getApplyId, id)
- .eq(WalletRechargeInvoiceEntity::getStatus, WalletRechargeInvoiceStatusEnum.DEFAULT.getCode())
+ .eq(WalletRechargeInvoiceEntity::getStatus, WalletRechargeInvoiceStatusEnum.UNCHECKED.getCode())
);
if (ObjectUtil.isNotEmpty(InvoiceEntity)) {
- result = BeanUtil.copyProperties(InvoiceEntity, WalletRechargeInvoiceEntityVo.class);
+ result = BeanUtil.copyProperties(InvoiceEntity, WalletRechargeInvoiceVo.class);
Double price = BigDecimal.valueOf(result.getTotalPrice()).divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP).doubleValue();
result.setTotalPriceCnStr(ConvertCnPriceUtil.convert(String.valueOf(price)));
return result;
@@ -104,9 +124,8 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl list) {
+ if (ObjectUtil.isEmpty(list)) return;
+ for (Long v : list) {
+ WalletRechargeInvoiceEntity detail = baseMapper.selectById(v);
+ if (ObjectUtil.isEmpty(detail)) continue;
+ if (ObjectUtil.isNotEmpty(detail.getStatus()) && ObjectUtil.notEqual(detail.getStatus(), WalletRechargeInvoiceStatusEnum.UNCHECKED.getCode())) {
+ UserInfo userInfo = remoteUserService.getByUserId(detail.getApplyId()).getData();
+ throw new RuntimeException("用户<" + userInfo.getSysUser().getName() + ">发起的审批不能删除");
+ }
+ }
+ }
+
/**
* 获取发票代码
*/
@@ -139,7 +209,7 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl updateWrapper = new LambdaUpdateWrapper()
.set(WalletRechargeApplyEntity::getInvoiceId, entity.getId())
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeInvoiceMapper.xml b/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeInvoiceMapper.xml
index 3efcf8530..de44b763f 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeInvoiceMapper.xml
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeInvoiceMapper.xml
@@ -2,29 +2,63 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ select a.id,
+ a.apply_user_id,
+ a.apply_dept_id,
+ a.apply_id,
+ a.code,
+ a.time,
+ a.dept_or_user,
+ a.total_price,
+ a.payee_dept,
+ a.payee_user,
+ a.item_json,
+ a.remark,
+ a.status,
+ a.pic_url,
+ a.create_by,
+ a.create_time,
+ a.update_by,
+ a.update_time,
+ a.del_flag,
+ a.tenant_id,
+
+
+
+
+ and a.status = #{dto.status}
+
+
+ and a.apply_user_id in
+
+ #{v}
+
+
+
+ and a.create_time between #{dto.createTimeList[0]} and #{dto.createTimeList[1]}
+
+
+
+
+
\ No newline at end of file
From 5cc25a197bab58a2c7685528b68b568d17b66052 Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Wed, 25 Jun 2025 20:45:31 +0800
Subject: [PATCH 4/9] =?UTF-8?q?feat:=E5=8F=91=E7=A5=A8=E6=B5=81=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../WalletRechargeInvoiceStatusEnum.java | 14 +++-
.../recharge/WalletRechargeSaveTopupDto.java | 18 +++++
.../WalletRechargeApplyController.java | 12 +++-
.../recharge/WalletRechargeApplyMapper.java | 5 +-
.../WalletRechargeApplyComposeService.java | 1 +
.../service/WalletRechargeApplyService.java | 8 ++-
.../WalletRechargeApplyServiceImpl.java | 66 ++++++++++++++++++-
.../WalletRechargeInvoiceServiceImpl.java | 25 +++++--
.../recharge/WalletRechargeInvoiceMapper.xml | 1 +
9 files changed, 134 insertions(+), 16 deletions(-)
create mode 100644 pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/dto/recharge/WalletRechargeSaveTopupDto.java
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletRechargeInvoiceStatusEnum.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletRechargeInvoiceStatusEnum.java
index a16dc6739..ae6548b24 100644
--- a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletRechargeInvoiceStatusEnum.java
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletRechargeInvoiceStatusEnum.java
@@ -13,9 +13,11 @@ import java.util.Arrays;
@AllArgsConstructor
public enum WalletRechargeInvoiceStatusEnum {
- UNCHECKED("1", "未审核"),
- CHECKED("2", "审核通过"),
- CANCELLATION("3", "作废"),
+ UNBIND("1", "未绑定充值"),
+ BINDED("2", "已绑定充值"),
+ UNCHECKED("3", "未审核"),
+ CHECKED("4", "审核成功"),
+ CANCELLATION("5", "作废"),
;
private final String code;
@@ -27,4 +29,10 @@ public enum WalletRechargeInvoiceStatusEnum {
.findFirst().get();
}
+ public static WalletRechargeInvoiceStatusEnum codeOf(String code) {
+ return Arrays.stream(WalletRechargeInvoiceStatusEnum.values())
+ .filter(v -> ObjectUtil.equal(v.getCode(), code))
+ .findFirst().get();
+ }
+
}
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/dto/recharge/WalletRechargeSaveTopupDto.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/dto/recharge/WalletRechargeSaveTopupDto.java
new file mode 100644
index 000000000..30e26fe50
--- /dev/null
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/dto/recharge/WalletRechargeSaveTopupDto.java
@@ -0,0 +1,18 @@
+package com.bsd.pjcloud.wallet.api.dto.recharge;
+
+import lombok.Data;
+
+@Data
+public class WalletRechargeSaveTopupDto {
+
+ /**
+ * 充值类型
+ */
+ private String bizType;
+
+ /**
+ * 发票id
+ */
+ private Long invoiceId;
+
+}
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeApplyController.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeApplyController.java
index b45d7bedc..c7691b201 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeApplyController.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeApplyController.java
@@ -12,6 +12,7 @@ import com.bsd.pjcloud.common.security.annotation.Inner;
import com.bsd.pjcloud.flow.task.dto.ProcessNodeRecordAssignUserParamDto;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeApplyDto;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeImportDto;
+import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeSaveTopupDto;
import com.bsd.pjcloud.wallet.api.dto.recharge.excel.WalletRechargeExcelDto;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeApplyEntity;
import com.bsd.pjcloud.wallet.api.vo.recharge.excel.WalletRechargeByApplyExcelVo;
@@ -48,6 +49,13 @@ public class WalletRechargeApplyController {
}
/* ************************************* start callback start ************************************* */
+ @PostMapping("/save-topup")
+ @Operation(summary = "新增充值")
+ public R comparePageJoin(@RequestBody WalletRechargeSaveTopupDto dto) {
+ walletRechargeApplyService.saveTopup(dto);
+ return R.ok();
+ }
+
@GetMapping("/compare-page-join")
@Operation(summary = "批量充值/扣款记录")
public R comparePageJoin(@ParameterObject Page page, @ParameterObject WalletRechargeApplyDto dto) {
@@ -140,8 +148,8 @@ public class WalletRechargeApplyController {
}
@PostMapping("/read-excel")
- public R readExcel(@RequestExcel List excelVOList, BindingResult bindingResult) {
- return walletRechargeApplyService.readExcel(excelVOList, bindingResult);
+ public R readExcel(@RequestExcel List excelVOList, BindingResult bindingResult, @RequestParam(required = false) String bizType) {
+ return walletRechargeApplyService.readExcel(excelVOList, bindingResult, bizType);
}
@PostMapping("/read-topup-excel")
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeApplyMapper.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeApplyMapper.java
index 667bf45bf..888bc4908 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeApplyMapper.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeApplyMapper.java
@@ -71,8 +71,9 @@ public interface WalletRechargeApplyMapper extends PjcloudBaseMapper {
+ /**
+ * 新增充值
+ */
+ void saveTopup(WalletRechargeSaveTopupDto dto);
+
void create(WalletRechargeApplyEntity dto);
Boolean edit(WalletRechargeApplyDto dto);
@@ -43,7 +49,7 @@ public interface WalletRechargeApplyService extends IService excelVOList, BindingResult bindingResult);
+ R readExcel(List excelVOList, BindingResult bindingResult, String bizType);
/**
* 读取充值excel内容
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeApplyServiceImpl.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeApplyServiceImpl.java
index b8ffffa64..c27572fb6 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeApplyServiceImpl.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeApplyServiceImpl.java
@@ -33,11 +33,13 @@ import com.bsd.pjcloud.flow.task.dto.TaskDto;
import com.bsd.pjcloud.flow.task.dto.TaskParamDto;
import com.bsd.pjcloud.wallet.api.constant.WalletBizEnum;
import com.bsd.pjcloud.wallet.api.constant.WalletBizRechargeEnum;
+import com.bsd.pjcloud.wallet.api.constant.WalletRechargeInvoiceStatusEnum;
import com.bsd.pjcloud.wallet.api.constant.WalletTypeEnum;
import com.bsd.pjcloud.wallet.api.dto.WalletManageDto;
import com.bsd.pjcloud.wallet.api.dto.WalletTypeDto;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeApplyDto;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeImportDto;
+import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeSaveTopupDto;
import com.bsd.pjcloud.wallet.api.dto.recharge.excel.WalletRechargeExcelDto;
import com.bsd.pjcloud.wallet.api.entity.WalletManageEntity;
import com.bsd.pjcloud.wallet.api.entity.WalletTypeEntity;
@@ -62,6 +64,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.BindingResult;
@@ -103,6 +106,46 @@ public class WalletRechargeApplyServiceImpl extends ServiceImpl list = rechargeImportService.list(new LambdaQueryWrapper().eq(WalletRechargeImportEntity::getInvoiceId, invoice.getId()).isNull(WalletRechargeImportEntity::getApplyId));
+ if (ObjectUtil.isNotEmpty(list)) {
+ List updateObjList = list.stream().map(v -> {
+ WalletRechargeImportEntity item = new WalletRechargeImportEntity();
+ item.setId(v.getId());
+ item.setApplyId(apply.getId());
+ return item;
+ }).toList();
+ rechargeImportService.updateBatchById(updateObjList);
+ }
+ // 更新发票状态
+ WalletRechargeInvoiceEntity updateObj = new WalletRechargeInvoiceEntity();
+ updateObj.setId(invoice.getId());
+ updateObj.setStatus(WalletRechargeInvoiceStatusEnum.BINDED.getCode());
+ updateObj.setApplyId(apply.getId());
+ walletRechargeInvoiceService.updateById(updateObj);
+ }
+
@Override
public void create(WalletRechargeApplyEntity dto) {
PjcloudUser loginUser = SecurityUtils.getUser();
@@ -149,6 +192,10 @@ public class WalletRechargeApplyServiceImpl extends ServiceImpl excelVOList, BindingResult bindingResult) {
+ public R readExcel(List excelVOList, BindingResult bindingResult, String bizType) {
ImmutablePair, List> pair = validateExcelData(excelVOList, bindingResult);
List errorMessages = pair.getLeft();
List list = pair.getRight();
@@ -263,6 +317,7 @@ public class WalletRechargeApplyServiceImpl extends ServiceImpl importList = rechargeImportService.list(new LambdaQueryWrapper().eq(WalletRechargeImportEntity::getApplyId, detail.getId()));
if (ObjectUtil.isEmpty(importList)) {
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java
index 7d61ad10e..2f5dc1cbf 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java
@@ -67,6 +67,11 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl()
.eq(WalletRechargeInvoiceEntity::getApplyId, id)
- .eq(WalletRechargeInvoiceEntity::getStatus, WalletRechargeInvoiceStatusEnum.UNCHECKED.getCode())
+ .eq(WalletRechargeInvoiceEntity::getStatus, WalletRechargeInvoiceStatusEnum.UNBIND.getCode())
);
if (ObjectUtil.isNotEmpty(InvoiceEntity)) {
result = BeanUtil.copyProperties(InvoiceEntity, WalletRechargeInvoiceVo.class);
@@ -136,7 +141,7 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl list) {
if (ObjectUtil.isEmpty(list)) return;
for (Long v : list) {
WalletRechargeInvoiceEntity detail = baseMapper.selectById(v);
- if (ObjectUtil.isEmpty(detail)) continue;
- if (ObjectUtil.isNotEmpty(detail.getStatus()) && ObjectUtil.notEqual(detail.getStatus(), WalletRechargeInvoiceStatusEnum.UNCHECKED.getCode())) {
- UserInfo userInfo = remoteUserService.getByUserId(detail.getApplyId()).getData();
- throw new RuntimeException("用户<" + userInfo.getSysUser().getName() + ">发起的审批不能删除");
+ if (ObjectUtil.isEmpty(detail) || ObjectUtil.isEmpty(detail.getApplyId())) continue;
+ if (ObjectUtil.isNotEmpty(detail.getStatus()) && ObjectUtil.notEqual(detail.getStatus(), WalletRechargeInvoiceStatusEnum.UNBIND.getCode())) {
+ UserInfo userInfo = remoteUserService.getByUserId(detail.getApplyUserId()).getData();
+ throw new RuntimeException("用户<" + userInfo.getSysUser().getName() + ">创建的发票已经" + WalletRechargeInvoiceStatusEnum.codeOf(detail.getStatus()).getDesc() + "不能删除");
}
+ // 删除申请记录
+ baseMapper.deleteById(v);
+ // 删除申请记录条目
+ importMapper.delete(new LambdaQueryWrapper().eq(WalletRechargeImportEntity::getApplyId, v));
}
}
@@ -210,6 +220,7 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl updateWrapper = new LambdaUpdateWrapper()
.set(WalletRechargeApplyEntity::getInvoiceId, entity.getId())
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeInvoiceMapper.xml b/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeInvoiceMapper.xml
index de44b763f..0ca287a8e 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeInvoiceMapper.xml
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeInvoiceMapper.xml
@@ -26,6 +26,7 @@
+ a.del_flag = '0'
and a.status = #{dto.status}
From 203047f71369fab2fa85aad9f7c401e3e5a9348e Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Wed, 25 Jun 2025 20:58:35 +0800
Subject: [PATCH 5/9] 11
---
.../recharge/WalletRechargeInvoiceController.java | 8 ++++++--
.../wallet/mapper/recharge/WalletRechargeApplyMapper.java | 6 +++---
.../mapper/recharge/WalletRechargeInvoiceMapper.java | 3 ++-
.../wallet/service/WalletRechargeInvoiceService.java | 3 ++-
.../impl/recharge/WalletRechargeInvoiceServiceImpl.java | 5 +++--
5 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeInvoiceController.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeInvoiceController.java
index 444d45f9c..8bc5e6919 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeInvoiceController.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeInvoiceController.java
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.common.core.util.R;
+import com.bsd.pjcloud.common.data.datascope.DataScope;
import com.bsd.pjcloud.common.log.annotation.SysLog;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeBindInvoiceDto;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeInvoiceEntity;
@@ -51,14 +52,17 @@ public class WalletRechargeInvoiceController {
@Operation(summary = "下拉", description = "下拉")
@GetMapping("/select")
public R select(@ParameterObject Page page, @ParameterObject WalletRechargeBindInvoiceDto dto) {
- return R.ok(walletRechargeInvoiceService.scopePageList(page, dto));
+ DataScope dataScope = null;
+ return R.ok(walletRechargeInvoiceService.scopePageList(page, dto, dataScope));
}
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page")
@PreAuthorize("@pms.hasPermission('wallet_walletRechargeInvoice_view')")
public R getWalletRechargeInvoicePage(@ParameterObject Page page, @ParameterObject WalletRechargeBindInvoiceDto dto) {
- return R.ok(walletRechargeInvoiceService.scopePageList(page, dto));
+ DataScope dataScope = DataScope.of();
+ dataScope.setScopeDeptName("apply_dept_id");
+ return R.ok(walletRechargeInvoiceService.scopePageList(page, dto, dataScope));
}
@Operation(summary = "通过id查询", description = "通过id查询")
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeApplyMapper.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeApplyMapper.java
index 888bc4908..0ee32bda5 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeApplyMapper.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeApplyMapper.java
@@ -71,9 +71,9 @@ public interface WalletRechargeApplyMapper extends PjcloudBaseMapper scopePageList(Page page, @Param("dto") WalletRechargeBindInvoiceDto dto);
+ Page scopePageList(Page page, @Param("dto") WalletRechargeBindInvoiceDto dto, DataScope dataScope);
/**
* 查询详情
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeInvoiceService.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeInvoiceService.java
index 5f694272a..c87133ce2 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeInvoiceService.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeInvoiceService.java
@@ -2,6 +2,7 @@ package com.bsd.pjcloud.wallet.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.bsd.pjcloud.common.data.datascope.DataScope;
import com.bsd.pjcloud.common.security.service.PjcloudUser;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeBindInvoiceDto;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeInvoiceEntity;
@@ -15,7 +16,7 @@ public interface WalletRechargeInvoiceService extends IService scopePageList(Page page, WalletRechargeBindInvoiceDto dto);
+ Page scopePageList(Page page, WalletRechargeBindInvoiceDto dto, DataScope dataScope);
/**
* 查询详情
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java
index 2f5dc1cbf..25299de01 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeInvoiceServiceImpl.java
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bsd.pjcloud.admin.api.dto.UserInfo;
import com.bsd.pjcloud.admin.api.feign.RemoteUserService;
+import com.bsd.pjcloud.common.data.datascope.DataScope;
import com.bsd.pjcloud.common.security.service.PjcloudUser;
import com.bsd.pjcloud.flow.task.constant.TaskCheckStatusEnum;
import com.bsd.pjcloud.wallet.api.constant.WalletBizRechargeEnum;
@@ -53,8 +54,8 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl scopePageList(Page page, WalletRechargeBindInvoiceDto dto) {
- return baseMapper.scopePageList(page, dto);
+ public Page scopePageList(Page page, WalletRechargeBindInvoiceDto dto, DataScope dataScope) {
+ return baseMapper.scopePageList(page, dto, dataScope);
}
/**
From f1e7de96169f0650313d3c9ada744fb1f979196e Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Thu, 26 Jun 2025 10:28:05 +0800
Subject: [PATCH 6/9] =?UTF-8?q?feat:=E5=85=85=E5=80=BC=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E6=80=BB=E9=87=91=E9=A2=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../vo/recharge/WalletRechargeApplyVo.java | 5 +
.../WalletRechargeApplyController.java | 4 +-
.../recharge/WalletRechargeApplyMapper.java | 30 +-----
.../service/WalletRechargeApplyService.java | 5 +-
.../WalletRechargeApplyServiceImpl.java | 9 +-
.../recharge/WalletRechargeApplyMapper.xml | 97 ++++++++++++++++---
6 files changed, 103 insertions(+), 47 deletions(-)
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/vo/recharge/WalletRechargeApplyVo.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/vo/recharge/WalletRechargeApplyVo.java
index 929716217..76197174a 100644
--- a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/vo/recharge/WalletRechargeApplyVo.java
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/vo/recharge/WalletRechargeApplyVo.java
@@ -40,4 +40,9 @@ public class WalletRechargeApplyVo extends WalletRechargeApplyEntity implements
*/
private Boolean isCheckUser = false;
+ /**
+ * 总金额
+ */
+ private Integer totalPrice;
+
}
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeApplyController.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeApplyController.java
index c7691b201..7c71bab5b 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeApplyController.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/controller/recharge/WalletRechargeApplyController.java
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.common.core.util.R;
+import com.bsd.pjcloud.common.data.datascope.DataScope;
import com.bsd.pjcloud.common.excel.annotation.RequestExcel;
import com.bsd.pjcloud.common.log.annotation.SysLog;
import com.bsd.pjcloud.common.security.annotation.Inner;
@@ -93,7 +94,8 @@ public class WalletRechargeApplyController {
@PreAuthorize("@pms.hasPermission('wallet_walletRechargeApply_view')")
public R getWalletRechargeApplyPage(@ParameterObject Page page, @ParameterObject WalletRechargeApplyDto dto) {
dto.setIsFindCheckUser(true);
- return R.ok(walletRechargeApplyService.scopePageList(page, dto));
+ DataScope dataScope = new DataScope();
+ return R.ok(walletRechargeApplyService.scopePageList(page, dto, dataScope));
}
@Operation(summary = "通过id查询", description = "通过id查询")
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeApplyMapper.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeApplyMapper.java
index 0ee32bda5..555fe42d0 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeApplyMapper.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/recharge/WalletRechargeApplyMapper.java
@@ -16,37 +16,17 @@ import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeApplyVo;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface WalletRechargeApplyMapper extends PjcloudBaseMapper {
- default Page pageJoin(Page page, WalletRechargeApplyDto dto) {
- MPJLambdaWrapper wrapper = new MPJLambdaWrapper()
- .selectAll(WalletRechargeApplyEntity.class)
- .selectAs(WalletTypeEntity::getName, WalletRechargeApplyVo::getWalletTypeName)
- .selectAs(WalletTypeEntity::getUniqueCode, WalletRechargeApplyVo::getWalletTypeUniqueCode)
- .leftJoin(WalletTypeEntity.class, WalletTypeEntity::getId, WalletRechargeApplyEntity::getWalletTypeId)
- .eqIfExists(WalletRechargeApplyEntity::getWalletTypeId, dto.getWalletTypeId())
- .in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletManageEntity::getUserId, dto.getUserIds())
- .in(ObjectUtil.isNotEmpty(dto.getWalletTypeIds()), WalletManageEntity::getWalletTypeId, dto.getWalletTypeIds())
- .between(
- ObjectUtil.isNotEmpty(dto.getCreateTimeList()),
- WalletRechargeApplyEntity::getCreateTime,
- ObjectUtil.isNotEmpty(dto.getCreateTimeList()) ? dto.getCreateTimeList()[0] : null,
- ObjectUtil.isNotEmpty(dto.getCreateTimeList()) ? dto.getCreateTimeList()[1] : null
- )
- .between(
- ObjectUtil.isNotEmpty(dto.getProcessTimeList()),
- WalletRechargeApplyEntity::getProcessTime,
- ObjectUtil.isNotEmpty(dto.getProcessTimeList()) ? dto.getProcessTimeList()[0] : null,
- ObjectUtil.isNotEmpty(dto.getProcessTimeList()) ? dto.getProcessTimeList()[1] : null
- )
- .orderByDesc(WalletRechargeApplyEntity::getCreateTime)
- .orderByDesc(WalletRechargeApplyEntity::getId);
- return selectJoinPage(page, WalletRechargeApplyVo.class, wrapper);
- }
+
+ Page scopePageList(Page page, @Param("dto") WalletRechargeApplyDto dto, DataScope dataScope);
+
+ Page pageJoin(Page page, @Param("dto") WalletRechargeApplyDto dto, DataScope dataScope);
default Page scopePageList(Page page, WalletRechargeApplyDto dto) {
LambdaQueryWrapper wrapper = new LambdaQueryWrapper()
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeApplyService.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeApplyService.java
index 6b4c0c59d..580910a24 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeApplyService.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeApplyService.java
@@ -3,6 +3,7 @@ package com.bsd.pjcloud.wallet.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bsd.pjcloud.common.core.util.R;
+import com.bsd.pjcloud.common.data.datascope.DataScope;
import com.bsd.pjcloud.flow.task.dto.ProcessNodeRecordAssignUserParamDto;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeApplyDto;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeImportDto;
@@ -32,9 +33,9 @@ public interface WalletRechargeApplyService extends IService list);
- Page pageJoin(Page page, WalletRechargeApplyDto dto);
+ Page pageJoin(Page page, WalletRechargeApplyDto dto, DataScope dataScope);
- Page scopePageList(Page page, WalletRechargeApplyDto dto);
+ Page scopePageList(Page page, WalletRechargeApplyDto dto, DataScope dataScope);
/**
* 提交申请
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeApplyServiceImpl.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeApplyServiceImpl.java
index c27572fb6..cd4140ef7 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeApplyServiceImpl.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/recharge/WalletRechargeApplyServiceImpl.java
@@ -21,6 +21,7 @@ import com.bsd.pjcloud.common.core.constant.enums.YesNoEnum;
import com.bsd.pjcloud.common.core.util.BeanUtils;
import com.bsd.pjcloud.common.core.util.CollectionUtils;
import com.bsd.pjcloud.common.core.util.R;
+import com.bsd.pjcloud.common.data.datascope.DataScope;
import com.bsd.pjcloud.common.data.tenant.TenantContextHolder;
import com.bsd.pjcloud.common.excel.vo.ErrorMessage;
import com.bsd.pjcloud.common.security.service.PjcloudUser;
@@ -204,8 +205,8 @@ public class WalletRechargeApplyServiceImpl extends ServiceImpl pageJoin(Page page, WalletRechargeApplyDto dto) {
- Page list = baseMapper.pageJoin(page, dto);
+ public Page pageJoin(Page page, WalletRechargeApplyDto dto, DataScope dataScope) {
+ Page list = baseMapper.pageJoin(page, dto, dataScope);
if (ObjectUtil.isNotEmpty(list.getRecords())) {
// 用户
List userIds = list.getRecords().stream().map(WalletRechargeApplyVo::getUserId).distinct().toList();
@@ -229,8 +230,8 @@ public class WalletRechargeApplyServiceImpl extends ServiceImpl scopePageList(Page page, WalletRechargeApplyDto dto) {
- Page list = baseMapper.scopePageList(page, dto);
+ public Page scopePageList(Page page, WalletRechargeApplyDto dto, DataScope dataScope) {
+ Page list = baseMapper.scopePageList(page, dto, dataScope);
disposeList(list.getRecords(), dto);
return list;
}
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeApplyMapper.xml b/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeApplyMapper.xml
index 87afb2acf..279373f5b 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeApplyMapper.xml
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeApplyMapper.xml
@@ -3,19 +3,86 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ select a.id,
+ a.user_id,
+ a.invoice_id,
+ a.process_id,
+ a.process_status,
+ a.process_time,
+ a.biz_type,
+ a.wallet_type_id,
+ a.dept_id,
+ a.import_time,
+ a.remark,
+ a.create_by,
+ a.create_time,
+ a.update_by,
+ a.update_time,
+ a.del_flag,
+ a.tenant_id,
+ a.apply_time,
+ a.is_authorization,
+
+
+
+ a.del_flag = '0'
+
+ and a.user_id = #{dto.userId}
+
+
+ and a.biz_type = #{dto.bizType}
+
+
+ and a.user_id in
+
+ #{v}
+
+
+
+ and a.wallet_type_id in
+
+ #{v}
+
+
+
+ and a.create_time between #{dto.createTimeList[0]} and #{dto.createTimeList[1]}
+
+
+ and a.create_time between #{dto.processTimeList[0]} and #{dto.processTimeList[1]}
+
+
+
+
+
+ t.name as walletTypeName,
+ t.unique_code as walletTypeUniqueCode,
+ t.icon as walletTypeIcon,
+ t.is_rule as isRule,
+ (select sum(i.price)
+ from wallet_recharge_import i
+ where i.del_flag = '0'
+ and i.apply_id = a.id) as totalPrice
+ from wallet_recharge_apply a
+ left join wallet_type t on a.wallet_type_id = t.id and t.del_flag = '0'
+
+
+
+ group by a.id
+
+ order by a.process_time desc , a.id desc
+
+
+ order by a.apply_time desc , a.create_time desc
+
+
+
+
+
+
+
\ No newline at end of file
From 0a59a6d1055dee4b4a2575406f86f3bda4b0554c Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Thu, 26 Jun 2025 11:07:07 +0800
Subject: [PATCH 7/9] 111
---
.../mapper/recharge/WalletRechargeApplyMapper.xml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeApplyMapper.xml b/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeApplyMapper.xml
index 279373f5b..fd90c60bc 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeApplyMapper.xml
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeApplyMapper.xml
@@ -72,8 +72,14 @@
order by a.process_time desc , a.id desc
-
- order by a.apply_time desc , a.create_time desc
+
+ ORDER BY
+ CASE
+ WHEN a.apply_time IS NULL THEN 1
+ ELSE 0
+ END ASC,
+ a.apply_time DESC,
+ a.create_time DESC
From 2aa0a9bca62b4af544173a67203f9c6b4a991862 Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Thu, 26 Jun 2025 14:22:19 +0800
Subject: [PATCH 8/9] =?UTF-8?q?=E8=B7=A8=E5=8D=95=E4=BD=8D=EF=BC=8C?=
=?UTF-8?q?=E8=B7=A8=E9=83=A8=E9=97=A8=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/application.yml | 17 ++++++---
.../WalletInvoiceStatusCheckEnum.java | 35 +++++++++++++++++++
.../WalletRechargeInvoiceStatusEnum.java | 2 +-
.../recharge/WalletRechargeInvoiceEntity.java | 6 ++++
.../WalletRechargeInvoiceController.java | 4 +--
.../wallet/mapper/WalletForeignMapper.java | 1 +
.../wallet/mapper/WalletStrideMapper.java | 1 +
.../service/WalletRechargeInvoiceService.java | 5 +++
.../WalletRechargeInvoiceServiceImpl.java | 12 +++++++
9 files changed, 75 insertions(+), 8 deletions(-)
create mode 100644 pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletInvoiceStatusCheckEnum.java
diff --git a/pjcloud-thirdparty/pjcloud-thirdparty-biz/src/main/resources/application.yml b/pjcloud-thirdparty/pjcloud-thirdparty-biz/src/main/resources/application.yml
index 33a15cab9..01e7c9341 100644
--- a/pjcloud-thirdparty/pjcloud-thirdparty-biz/src/main/resources/application.yml
+++ b/pjcloud-thirdparty/pjcloud-thirdparty-biz/src/main/resources/application.yml
@@ -89,12 +89,19 @@ zy:
# callback-recognition-url: /third/third-ks/callback/recognition
# callback-sku-url: /third/third-ks/callback/sku
lb:
- base-url: https://elss-sit.nbcb.com.cn
- # base-url: https://elss-sit.nbcb.com.cn/h5/thirdApp
- app-id: 7da62b1a9ade473c917f573c5748081e
- app-secret: 8ffI6b+OKTmdVAt9Qo+2F/HQQMdt/d8GFia0zlJOt9I=
+ # 测试环境
+ # base-url: https://elss-sit.nbcb.com.cn
+ # app-id: 7da62b1a9ade473c917f573c5748081e
+ # app-secret: 8ffI6b+OKTmdVAt9Qo+2F/HQQMdt/d8GFia0zlJOt9I=
+ # company-number: 202504673472
+ # sm4-key: S67157e8aQs2tFSX
+
+ # 正式环境
+ base-url: https://elss.nbcb.com.cn
+ app-id: 528e3ca76ec34f5c9b3255ba18aee774
+ app-secret: tIhDZDXWhtP6bvd0J9Q0zjIZxSkmyX+uUc87xnDTgfc=
company-number: 202504673472
- sm4-key: S67157e8aQs2tFSX
+ sm4-key: 63P839eg0uxE5aoG
sms:
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletInvoiceStatusCheckEnum.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletInvoiceStatusCheckEnum.java
new file mode 100644
index 000000000..d2db17c81
--- /dev/null
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletInvoiceStatusCheckEnum.java
@@ -0,0 +1,35 @@
+package com.bsd.pjcloud.wallet.api.constant;
+
+import cn.hutool.core.util.ObjectUtil;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Arrays;
+
+/**
+ * 发票审核状态
+ */
+@Getter
+@AllArgsConstructor
+public enum WalletInvoiceStatusCheckEnum {
+ UNCHECK("1", "未审核"),
+ FOREIGN("2", "审核成功"),
+ REFUND("3", "撤回"),
+ ;
+ private final String code;
+
+ private final String desc;
+
+
+ public static WalletInvoiceStatusCheckEnum descOf(String description) {
+ return Arrays.stream(WalletInvoiceStatusCheckEnum.values())
+ .filter(v -> ObjectUtil.equal(v.getDesc(), description))
+ .findFirst().get();
+ }
+
+ public static WalletInvoiceStatusCheckEnum codeOf(String code) {
+ return Arrays.stream(WalletInvoiceStatusCheckEnum.values())
+ .filter(v -> ObjectUtil.equal(v.getCode(), code))
+ .findFirst().get();
+ }
+}
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletRechargeInvoiceStatusEnum.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletRechargeInvoiceStatusEnum.java
index ae6548b24..943e10f07 100644
--- a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletRechargeInvoiceStatusEnum.java
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/constant/WalletRechargeInvoiceStatusEnum.java
@@ -29,7 +29,7 @@ public enum WalletRechargeInvoiceStatusEnum {
.findFirst().get();
}
- public static WalletRechargeInvoiceStatusEnum codeOf(String code) {
+ public static WalletRechargeInvoiceStatusEnum codeOf(String code) {
return Arrays.stream(WalletRechargeInvoiceStatusEnum.values())
.filter(v -> ObjectUtil.equal(v.getCode(), code))
.findFirst().get();
diff --git a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeInvoiceEntity.java b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeInvoiceEntity.java
index 5f40881e6..4d0fefd53 100644
--- a/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeInvoiceEntity.java
+++ b/pjcloud-wallet/pjcloud-wallet-api/src/main/java/com/bsd/pjcloud/wallet/api/entity/recharge/WalletRechargeInvoiceEntity.java
@@ -99,6 +99,12 @@ public class WalletRechargeInvoiceEntity extends Model wrapper = new MPJLambdaWrapper()
.selectAll(WalletForeignEntity.class)
.eqIfExists(WalletForeignEntity::getProcessStatus, dto.getProcessStatus())
+ .eqIfExists(WalletForeignEntity::getUserId, dto.getUserId())
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletForeignEntity::getDeptId, dto.getDeptIds())
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletForeignEntity::getUserId, dto.getUserIds())
.ne(!dto.getIsFindUsed(), WalletForeignEntity::getCount, WalletForeignEntity::getUseCount)
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/WalletStrideMapper.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/WalletStrideMapper.java
index 097909fac..5697fed3d 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/WalletStrideMapper.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/mapper/WalletStrideMapper.java
@@ -22,6 +22,7 @@ public interface WalletStrideMapper extends PjcloudBaseMapper wrapper = new MPJLambdaWrapper()
.selectAll(WalletStrideEntity.class)
.eqIfExists(WalletStrideEntity::getProcessStatus, dto.getProcessStatus())
+ .eqIfExists(WalletStrideEntity::getUserId, dto.getUserId())
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), WalletStrideEntity::getDeptId, dto.getDeptIds())
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), WalletStrideEntity::getUserId, dto.getUserIds())
.ne(!dto.getIsFindUsed(), WalletForeignEntity::getCount, WalletForeignEntity::getUseCount)
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeInvoiceService.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeInvoiceService.java
index c87133ce2..e8451e46d 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeInvoiceService.java
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/WalletRechargeInvoiceService.java
@@ -43,6 +43,11 @@ public interface WalletRechargeInvoiceService extends IService
Date: Thu, 26 Jun 2025 14:25:34 +0800
Subject: [PATCH 9/9] =?UTF-8?q?fix:=E5=85=85=E5=80=BC=E5=AE=A1=E6=89=B9?=
=?UTF-8?q?=E6=90=9C=E7=B4=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/mapper/recharge/WalletRechargeApplyMapper.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeApplyMapper.xml b/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeApplyMapper.xml
index fd90c60bc..ecf85e886 100644
--- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeApplyMapper.xml
+++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/resources/mapper/recharge/WalletRechargeApplyMapper.xml
@@ -27,6 +27,9 @@
a.del_flag = '0'
+
+ and a.process_status = #{dto.processStatus}
+
and a.user_id = #{dto.userId}