From 3f3a1ed182e96214e66f6456ee692427bf04d454 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期五, 28 十一月 2025 11:10:23 +0800
Subject: [PATCH] yys 1.库存管理导出修改 2.来票登记分页查询修改
---
src/main/java/com/ruoyi/production/service/impl/SalesLedgerProductionAccountingServiceImpl.java | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/production/service/impl/SalesLedgerProductionAccountingServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/SalesLedgerProductionAccountingServiceImpl.java
index 3d510b8..3fcb8f2 100644
--- a/src/main/java/com/ruoyi/production/service/impl/SalesLedgerProductionAccountingServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/SalesLedgerProductionAccountingServiceImpl.java
@@ -11,6 +11,8 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
+import java.math.BigDecimal;
+
/**
* @author :yys
* @date : 2025/7/21 14:41
@@ -25,6 +27,26 @@
@Override
public IPage<SalesLedgerProductionAccountingDto> listPage(Page page, SalesLedgerProductionAccountingDto salesLedgerProductionAccountingDto) {
IPage<SalesLedgerProductionAccountingDto> list = salesLedgerProductionAccountingMapper.listPage(page, salesLedgerProductionAccountingDto);
+ list.getRecords().forEach(item -> {
+ String[] split = item.getSpecificationModel().split("\\*");
+ if(split.length == 2 && isNumeric(split[1])){
+ // 璁$畻宸ヨ祫 = 宸ユ椂瀹氶 * 鏁伴噺 * 瑙勬牸
+ item.setWages(item.getWages().multiply(new BigDecimal(split[1])));
+ }
+ });
return list;
}
+
+ public static boolean isNumeric(String str) {
+ if (str == null || str.isEmpty()) {
+ return false;
+ }
+ // 閬嶅巻瀛楃涓茬殑姣忎釜瀛楃锛屾鏌ユ槸鍚︿负鏁板瓧
+ for (int i = 0; i < str.length(); i++) {
+ if (!Character.isDigit(str.charAt(i))) {
+ return false;
+ }
+ }
+ return true;
+ }
}
--
Gitblit v1.9.3