From 114460f91550ad2b1c8d8b84d9fde203873f5d16 Mon Sep 17 00:00:00 2001
From: wangw <1594593906@qq.com>
Date: Mon, 8 Jul 2024 09:20:47 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=95=86=E5=93=81=20?=
=?UTF-8?q?=E4=B8=8A=E6=9E=B6=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=BA=93=E5=AD=98?=
=?UTF-8?q?=E5=8F=AF=E4=B8=BA0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 3 ++-
.../impl/productimpl/TbProductServiceImpl.java | 14 +++++++-------
.../TbShopPurveyorTransactServiceImpl.java | 13 +------------
eladmin-system/src/main/resources/logback.xml | 4 ++--
4 files changed, 12 insertions(+), 22 deletions(-)
diff --git a/.gitignore b/.gitignore
index 9acb04ae..28fb35fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,5 @@
*/target/*
*/*.iml
/.gradle/
-/application.pid
\ No newline at end of file
+/application.pid
+*.log
\ No newline at end of file
diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/productimpl/TbProductServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/productimpl/TbProductServiceImpl.java
index 677c0db5..1f5c4dc5 100644
--- a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/productimpl/TbProductServiceImpl.java
+++ b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/productimpl/TbProductServiceImpl.java
@@ -332,13 +332,13 @@ public class TbProductServiceImpl implements TbProductService {
if (resources.getCategoryId() == null) {
throw new BadRequestException("必填内容未填写");
}
- if (resources.getIsShowMall() == 1) {
- for (TbProductSku sku : resources.getSkuList()) {
- if (sku.getStockNumber() <= 0) {
- throw new BadRequestException("上架区域包括小程序时,库存数量必须大于0。");
- }
- }
- }
+// if (resources.getIsShowMall() == 1) {
+// for (TbProductSku sku : resources.getSkuList()) {
+// if (sku.getStockNumber() <= 0) {
+// throw new BadRequestException("上架区域包括小程序时,库存数量必须大于0。");
+// }
+// }
+// }
product.setCategoryId(String.valueOf(resources.getCategoryId()));
}
if (!CollectionUtils.isEmpty(resources.getImages())) {
diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopPurveyorTransactServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopPurveyorTransactServiceImpl.java
index 75cce193..b9cb0253 100644
--- a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopPurveyorTransactServiceImpl.java
+++ b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopPurveyorTransactServiceImpl.java
@@ -112,19 +112,8 @@ public class TbShopPurveyorTransactServiceImpl implements TbShopPurveyorTransact
ValidationUtil.isNull(tbShopPurveyorTransact.getId(), "TbShopPurveyorTransact", "id", resources.getId());
tbShopPurveyorTransact.setPaidAmount(tbShopPurveyorTransact.getPaidAmount().add(resources.getPaidAmount()));
tbShopPurveyorTransact.setWaitAmount(tbShopPurveyorTransact.getTotalAmount().subtract(tbShopPurveyorTransact.getPaidAmount()));
-// if (resources.getPaidAmount().compareTo(BigDecimal.ZERO) == 0) {
-// throw new BadRequestException("付款金额不能为 0");
-// } else {
-// if (tbShopPurveyorTransact.getWaitAmount().compareTo(BigDecimal.ZERO) > 0 && resources.getPaidAmount().compareTo(BigDecimal.ZERO) > 0) {//待付款金额大于0
-// tbShopPurveyorTransact.setWaitAmount(tbShopPurveyorTransact.getWaitAmount().subtract(resources.getPaidAmount()));
-// } else if (tbShopPurveyorTransact.getWaitAmount().compareTo(BigDecimal.ZERO) < 0 && resources.getPaidAmount().compareTo(BigDecimal.ZERO) < 0) {
-// tbShopPurveyorTransact.setWaitAmount(tbShopPurveyorTransact.getWaitAmount().subtract(resources.getPaidAmount()));
-// } else {
-// tbShopPurveyorTransact.setWaitAmount(tbShopPurveyorTransact.getWaitAmount().add(resources.getPaidAmount()));
-// }
-// }
tbShopPurveyorTransact.setPaidAt(System.currentTimeMillis());
- if (tbShopPurveyorTransact.getWaitAmount().compareTo(tbShopPurveyorTransact.getPaidAmount()) <= 0) {
+ if (tbShopPurveyorTransact.getPaidAmount().compareTo(tbShopPurveyorTransact.getTotalAmount()) >= 0) {
tbShopPurveyorTransact.setStatus(1);
}else {
tbShopPurveyorTransact.setStatus(0);
diff --git a/eladmin-system/src/main/resources/logback.xml b/eladmin-system/src/main/resources/logback.xml
index c959995d..ddd11093 100644
--- a/eladmin-system/src/main/resources/logback.xml
+++ b/eladmin-system/src/main/resources/logback.xml
@@ -38,8 +38,8 @@
-
-
+
+
From 9ce0db167e65bce08f3f734eae38acb732667f83 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=9F=A9=E9=B9=8F=E8=BE=89?= <18322780655@163.com>
Date: Mon, 8 Jul 2024 10:26:50 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=B9=E9=87=8F?=
=?UTF-8?q?=E5=87=BA=E5=85=A5=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../cn/ysk/cashier/cons/domain/SuppFlow.java | 40 ++++
.../cons/rest/TbConsInfoController.java | 3 +-
.../cons/service/TbConsInfoService.java | 3 +-
.../service/impl/TbConsInfoServiceImpl.java | 199 +++++++++---------
4 files changed, 143 insertions(+), 102 deletions(-)
create mode 100644 eladmin-system/src/main/java/cn/ysk/cashier/cons/domain/SuppFlow.java
diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/cons/domain/SuppFlow.java b/eladmin-system/src/main/java/cn/ysk/cashier/cons/domain/SuppFlow.java
new file mode 100644
index 00000000..e7f333fb
--- /dev/null
+++ b/eladmin-system/src/main/java/cn/ysk/cashier/cons/domain/SuppFlow.java
@@ -0,0 +1,40 @@
+package cn.ysk.cashier.cons.domain;
+
+import lombok.Data;
+import org.springframework.security.core.parameters.P;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class SuppFlow implements Serializable {
+
+ private BigDecimal accountsPayable;
+
+ private BigDecimal actualPayment;
+
+ private Date paymentTime;
+
+ private Integer supplierId;
+
+ private String type;
+
+ private Integer shopId;
+
+ private List list;
+
+
+
+ @Data
+ public static class ConInfos{
+ private Integer conInfold;
+
+ private BigDecimal price;
+
+ private BigDecimal stockNumber;
+ }
+
+
+}
diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/cons/rest/TbConsInfoController.java b/eladmin-system/src/main/java/cn/ysk/cashier/cons/rest/TbConsInfoController.java
index cab95f24..4a03577c 100644
--- a/eladmin-system/src/main/java/cn/ysk/cashier/cons/rest/TbConsInfoController.java
+++ b/eladmin-system/src/main/java/cn/ysk/cashier/cons/rest/TbConsInfoController.java
@@ -1,6 +1,7 @@
package cn.ysk.cashier.cons.rest;
import cn.ysk.cashier.annotation.Log;
+import cn.ysk.cashier.cons.domain.SuppFlow;
import cn.ysk.cashier.cons.domain.TbConsInfo;
import cn.ysk.cashier.cons.domain.TbConsSuppFlow;
import cn.ysk.cashier.cons.service.TbConsInfoService;
@@ -68,7 +69,7 @@ public class TbConsInfoController {
@PostMapping(value = "stockInOut")
@Log("耗材出入库")
@ApiOperation("耗材出入库")
- public ResponseEntity