From 64e1759592f3618855ef015b6340cdea54647c35 Mon Sep 17 00:00:00 2001
From: 懒羊羊 <15939171744@163.com>
Date: 星期二, 16 一月 2024 08:17:41 +0800
Subject: [PATCH] 日期调整

---
 jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
index f74c05a..9fd7ff5 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -1,5 +1,8 @@
 package com.jcdm.main.om.productionOrde.controller;
 
+import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.Date;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
@@ -97,6 +100,12 @@
     @PostMapping("/orderSchedulingForBoxCode")
     public AjaxResult addOrderSchedulingForBoxCode(@RequestBody OmProductionOrdeInfo omProductionOrdeInfo)
     {
+        //鑾峰彇褰撳墠鏃堕棿
+        LocalDateTime date= LocalDateTime.now();
+        //鍒涘缓鏃ユ湡鏃堕棿瀵硅薄鏍煎紡鍖栧櫒锛屾棩鏈熸牸寮忕被浼硷細 2023-05-23 22:18:38
+        DateTimeFormatter formatter= DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        //灏嗘椂闂磋浆鍖栦负瀵瑰簲鏍煎紡鐨勫瓧绗︿覆
+        String fomateDate=date.format(formatter).toString();
         Integer startCode = Integer.parseInt(omProductionOrdeInfo.getStartCode());//寮�濮嬬紪鍙�
         Integer planQty = Math.toIntExact(omProductionOrdeInfo.getPlanQty());//璁″垝鏁伴噺
         String dateTimeRule = omProductionOrdeInfo.getDateTimeRule();
@@ -108,7 +117,7 @@
             bsOrderScheduling.setEngineNo(omProductionOrdeInfo.getTypeZ() + " "+dateTimeRule+ StringUtils.leftPad(String.valueOf(startCode),3, "0"));
             bsOrderScheduling.setProductionStatus("1");
             bsOrderScheduling.setOperator(getUserName());
-//            bsOrderScheduling.setOperateTime(String.valueOf(new Date()));
+            bsOrderScheduling.setOperateTime(fomateDate);
             bsOrderSchedulingService.insertBsOrderScheduling(bsOrderScheduling);
             startCode ++;
         }

--
Gitblit v1.9.3