Răsfoiți Sursa

新增销售看板统计

donglang 1 lună în urmă
părinte
comite
d1cbc58377

+ 11 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/repository/KwtWaybillOrderSubtaskRepository.java

@@ -10,6 +10,7 @@ import com.sckw.transport.model.KwtWaybillOrderSubtask;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.stereotype.Repository;
 
+import java.time.LocalDateTime;
 import java.util.List;
 import java.util.Objects;
 import java.util.Set;
@@ -95,4 +96,14 @@ public class KwtWaybillOrderSubtaskRepository extends ServiceImpl<KwtWaybillOrde
                 .in(CollectionUtils.isNotEmpty(billOrderIds),KwtWaybillOrderSubtask::getWOrderId, billOrderIds)
         );
     }
+
+    public List<KwtWaybillOrderSubtask> queryWaybillOrderSubByEntIdAndStatus(Long entId, Integer status, LocalDateTime startTime, LocalDateTime endTime) {
+        return list(Wrappers.<KwtWaybillOrderSubtask>lambdaQuery()
+                .eq(KwtWaybillOrderSubtask::getDelFlag,0)
+                .eq(Objects.nonNull(entId),KwtWaybillOrderSubtask::getEntId,entId)
+                .eq(Objects.nonNull(status),KwtWaybillOrderSubtask::getStatus,status)
+                .ge(Objects.nonNull(startTime), KwtWaybillOrderSubtask::getUpdateTime, startTime)
+                .le(Objects.nonNull(endTime), KwtWaybillOrderSubtask::getUpdateTime, endTime)
+                .orderByDesc(KwtWaybillOrderSubtask::getId));
+    }
 }