From 1f95d9a630f4333710d92b6563a8cceed2b199f4 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 21 九月 2023 14:30:25 +0800
Subject: [PATCH] 现场问题修改

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java  |   11 ++++++++++-
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java     |    4 ++--
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceCycleController.java |    8 ++++++++
 3 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
index 8418ba5..6eb37cb 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
@@ -185,8 +185,8 @@
 												   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 												   HttpServletRequest req) {
 		 QueryWrapper<Equipment> queryWrapper = QueryGenerator.initQueryWrapper(equipment, req.getParameterMap());
-		 queryWrapper.eq("status","1");
-		 queryWrapper.eq("del_flag",0);
+//		 queryWrapper.eq("status","1");
+//		 queryWrapper.eq("del_flag",0);
 		 Page<Equipment> page = new Page<Equipment>(pageNo, pageSize);
 		 IPage<Equipment> pageList = equipmentService.page(page, queryWrapper);
 		 return Result.OK(pageList);
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 6dc727a..7f69705 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
@@ -25,7 +25,9 @@
 import org.jeecg.modules.eam.service.IInspectionCycleService;
 import org.jeecg.modules.eam.service.IInspectionProjectService;
 
+import org.jeecg.modules.eam.service.IdentityService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
@@ -59,6 +61,12 @@
 
     @Autowired
     private InspectionCycleMapper inspectionCycleMapper;
+
+    @Autowired
+    @Lazy
+    private IdentityService sysIdentityService;
+
+
 //
 //
 //    @Autowired
@@ -129,7 +137,8 @@
     public Result<String> addNew(@RequestBody InspectionCycle inspectionCycle) {
         String cycleUnit = sysBaseApi.queryDictTextByKey("cycle_unit", String.valueOf(inspectionCycle.getCycleUnit()));
         inspectionCycle.setName(String.valueOf(inspectionCycle.getCycle()).concat(cycleUnit));
-        String num = "DJ" + DateUtils.date2Str(DateUtils.yyyyMMdd.get()) + inspectionCycleMapper.getInspectionCycleNum();
+//        String num = "DJ" + DateUtils.date2Str(DateUtils.yyyyMMdd.get()) + inspectionCycleMapper.getInspectionCycleNum();
+        String num = sysIdentityService.getNumByTypeAndLength("InspectionCycle", 4);
         inspectionCycle.setCode(num);
         inspectionCycleService.save(inspectionCycle);
         return Result.OK("娣诲姞鎴愬姛锛�");
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceCycleController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceCycleController.java
index d8e8e12..ce7a756 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceCycleController.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceCycleController.java
@@ -20,7 +20,9 @@
 import org.jeecg.modules.eam.entity.InspectionCycle;
 import org.jeecg.modules.eam.entity.MaintenanceCycle;
 import org.jeecg.modules.eam.service.IMaintenanceCycleService;
+import org.jeecg.modules.eam.service.IdentityService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
@@ -62,6 +64,10 @@
 
     @Autowired
     private ISysBaseAPI sysBaseApi;
+
+    @Autowired
+    @Lazy
+    private IdentityService sysIdentityService;
 
     /**
      * 鍒嗛〉鍒楄〃鏌ヨ
@@ -130,6 +136,8 @@
     public Result<String> addNew(@RequestBody MaintenanceCycle maintenanceCycle) {
         String cycleUnit = sysBaseApi.queryDictTextByKey("maintenance_cycle_unit", String.valueOf(maintenanceCycle.getCycleUnit()));
         maintenanceCycle.setName(String.valueOf(maintenanceCycle.getCycle()).concat(cycleUnit));
+        String num = sysIdentityService.getNumByTypeAndLength("MaintenanceCycle", 4);
+        maintenanceCycle.setCode(num);
         maintenanceCycleService.save(maintenanceCycle);
         return Result.OK("娣诲姞鎴愬姛锛�");
     }

--
Gitblit v1.9.3