From a6d8cfbf89fae62167c99dab7ffddaeb6f2b7de5 Mon Sep 17 00:00:00 2001
From: yangkang <yangkang@xalxzn.com>
Date: 星期二, 12 九月 2023 09:25:41 +0800
Subject: [PATCH] 预测性维护

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java
index 1e7c08a..6dc727a 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java
@@ -348,6 +348,8 @@
         inspectionCycle.setCreateTime(new Date());
         inspectionCycle.setUpdateBy(null);
         inspectionCycle.setUpdateTime(null);
+        inspectionCycle.setLoseEfficacyTime(null);
+        inspectionCycle.setTakeEffectTime(null);
         boolean b = inspectionCycleService.save(inspectionCycle);
         if(b){
             return Result.OK("鐗堟湰鍗囩骇鎴愬姛锛�");
@@ -382,8 +384,10 @@
         List<InspectionCycle> list = inspectionCycleService.lambdaQuery().eq(InspectionCycle::getCode, inspectionCycle.getCode()).eq(InspectionCycle::getVersionStatus, "2").list();
         for (InspectionCycle cycle : list) {
             cycle.setVersionStatus("3");
+            cycle.setLoseEfficacyTime(new Date());
             inspectionCycleService.updateById(cycle);
         }
+        inspectionCycle.setTakeEffectTime(new Date());
         boolean b = inspectionCycleService.updateById(inspectionCycle);
         if (b){
             return Result.OK("缂栬緫鎴愬姛!");

--
Gitblit v1.9.3