Selaa lähdekoodia

外协检查时间范围

wangxin 6 kuukautta sitten
vanhempi
commit
233436c8d2

+ 7 - 1
src/main/java/cn/ezhizao/project/business/product/controller/BizProcessInspecionController.java

@@ -239,10 +239,16 @@ public class BizProcessInspecionController extends BaseController {
             // 使用 SimpleDateFormat 格式化 Date 对象为特定格式的字符串
             SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault());
             String time = dateFormat.format(startTimeDate);
-
             bizProcessInspecion.setStartTimeString(time + " 00:00:00");
             bizProcessInspecion.setEndTimeString(time + " 23:59:59");
         }
+        if (bizProcessInspecion.getEndTime() != null) {
+            Date endTimeDate = bizProcessInspecion.getEndTime();
+            // 使用 SimpleDateFormat 格式化 Date 对象为特定格式的字符串
+            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault());
+            String time = dateFormat.format(endTimeDate);
+            bizProcessInspecion.setEndTimeString(time + " 23:59:59");
+        }
         startPage();
         List<BizProcessInspecion> list = bizProcessInspecionService.getOutsourcedlist(bizProcessInspecion);
         return getDataTable(list);