Quellcode durchsuchen

周期运行情况

wanglt vor 3 Monaten
Ursprung
Commit
698432a2a8

+ 4 - 4
ygtx-gxt/src/main/java/com/ygtx/gxt/service/impl/GxtMonthRuntimeServiceImpl.java

@@ -86,7 +86,7 @@ public class GxtMonthRuntimeServiceImpl implements IGxtMonthRuntimeService
                     }
                     for (GxtWorkOrder workOrder:workOrders) {
                         // 停运时长计算
-                        if (workOrder.getStopDays()>=fromDays && (toDays==null||workOrder.getStopDays()<toDays)) {
+                        if (workOrder.getStopDays()>=fromDays && (toDays==null||toDays==0||workOrder.getStopDays()<toDays)) {
                             boolean isAdd = true;
                             String runtimeRange = "≥" + fromDays + "天";
                             if (!result.isEmpty()) {
@@ -111,7 +111,7 @@ public class GxtMonthRuntimeServiceImpl implements IGxtMonthRuntimeService
                             }
                         }
                         // 持续运行时长计算
-                        if (workOrder.getRunningDays()>=fromDays && (toDays==null||workOrder.getRunningDays()<toDays)) {
+                        if (workOrder.getRunningDays()>=fromDays && (toDays==null||toDays==0||workOrder.getRunningDays()<toDays)) {
                             boolean isAdd = true;
                             String runtimeRange = "≥" + fromDays + "天";
                             if (!result.isEmpty()) {
@@ -212,11 +212,11 @@ public class GxtMonthRuntimeServiceImpl implements IGxtMonthRuntimeService
         if (!workOrders.isEmpty()) {
             for (GxtWorkOrder order:workOrders) {
                 if (isStop) {
-                    if (order.getStopDays()>=fromDays && (toDays==null || order.getStopDays()<toDays)) {
+                    if (order.getStopDays()>=fromDays && (toDays==null || toDays==0 || order.getStopDays()<toDays)) {
                         result.add(order);
                     }
                 }else {
-                    if (order.getRunningDays()>=fromDays && (toDays==null || order.getRunningDays()<toDays)) {
+                    if (order.getRunningDays()>=fromDays && (toDays==null || toDays==0 || order.getRunningDays()<toDays)) {
                         result.add(order);
                     }
                 }

+ 1 - 1
ygtx-ui/src/views/gxt/monthRuntime/index.vue

@@ -188,7 +188,7 @@ function handleShowOrders(row, type) {
   
   ordersTitle.value = title;
 
-  orderQueryParams.value = { itemNum: 1, itemSize: 10, pid: row.deptId, fromDays: row.fromDays, toDays: row.toDays, isStop: isStop.value };
+  orderQueryParams.value = { itemNum: 1, itemSize: 10, pid: row.deptId, fromDays: row.fromDays, toDays: row.toDays || 0, isStop: isStop.value };
   
   // 调用API获取订单列表
   getOrdersByNextPage()