From 611a816801c58abcc81d511a7dfc368f8d8fb24e Mon Sep 17 00:00:00 2001
From: zhangchao <zc857179121@qq.com>
Date: 星期五, 22 十一月 2024 14:16:59 +0800
Subject: [PATCH] 修改定时任务触发方式,不是以固定时间执行,以执行完成任务,间隔多少时间在此执行

---
 src/main/java/com/zy/common/model/OrderDto.java |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/common/model/OrderDto.java b/src/main/java/com/zy/common/model/OrderDto.java
index 362b2b7..e7e38c6 100644
--- a/src/main/java/com/zy/common/model/OrderDto.java
+++ b/src/main/java/com/zy/common/model/OrderDto.java
@@ -15,11 +15,14 @@
 
     private String matnr;
 
+    private String batch;
+
     private Double anfme;
 
-    public OrderDto(String orderNo, String matnr, Double anfme) {
+    public OrderDto(String orderNo, String matnr, String batch, Double anfme) {
         this.orderNo = orderNo;
         this.matnr = matnr;
+        this.batch = batch;
         this.anfme = anfme;
     }
 
@@ -28,7 +31,7 @@
             return false;
         }
         for (OrderDto orderDto : list) {
-            if (dto.getOrderNo().equals(orderDto.getOrderNo()) && dto.getMatnr().equals(orderDto.getMatnr())) {
+            if (dto.getOrderNo().equals(orderDto.getOrderNo()) && dto.getMatnr().equals(orderDto.getMatnr()) && Cools.eq(orderDto.getBatch(), dto.getBatch())) {
                 return true;
             }
         }
@@ -40,7 +43,7 @@
             return null;
         }
         for (OrderDto orderDto : list) {
-            if (dto.getOrderNo().equals(orderDto.getOrderNo()) && dto.getMatnr().equals(orderDto.getMatnr())) {
+            if (dto.getOrderNo().equals(orderDto.getOrderNo()) && dto.getMatnr().equals(orderDto.getMatnr()) && Cools.eq(dto.getBatch(), orderDto.getBatch())) {
                 return orderDto;
             }
         }

--
Gitblit v1.9.1