From c557836de5be6a7de591a7cdea6b400ff75b8213 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期四, 17 七月 2025 16:47:02 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java | 42 +++++++++++++++++++++ db/LS/dict_ls.sql | 13 +++--- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamInspectionOrderController.java | 10 ++-- 3 files changed, 53 insertions(+), 12 deletions(-) diff --git a/db/LS/dict_ls.sql b/db/LS/dict_ls.sql index 3df815d..f33727c 100644 --- a/db/LS/dict_ls.sql +++ b/db/LS/dict_ls.sql @@ -56,15 +56,14 @@ INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1945421898058391553', N'1945421792382902274', N'寮傚父', N'ANOMALY', '', 2, 1, N'admin', '2025-07-16 17:54:59.3460000', NULL, NULL); ---璁惧鍔熻兘鏄惁 -delete from [dbo].[sys_dict_item] where dict_id in (select id from [dbo].[sys_dict] where dict_code='equipment_function_yn'); -delete from [dbo].[sys_dict] where dict_code='equipment_function_yn'; +--楠屾敹鐘舵�� +delete from [dbo].[sys_dict_item] where dict_id in (select id from [dbo].[sys_dict] where dict_code='check_status'); +delete from [dbo].[sys_dict] where dict_code='check_status';銆� -INSERT INTO [dbo].[sys_dict] ([id], [dict_name], [dict_code], [description], [del_flag], [create_by], [create_time], [update_by], [update_time], [type]) VALUES (N'1945027073496698882', N'璁惧鍔熻兘鏄惁', N'equipment_function_yn', N'璁惧绠$悊浣跨敤', 0, N'admin', '2025-07-15 15:46:05.8310000', NULL, NULL, NULL); +INSERT INTO [dbo].[sys_dict] ([id], [dict_name], [dict_code], [description], [del_flag], [create_by], [create_time], [update_by], [update_time], [type]) VALUES (N'1717074172248702977', N'涓変繚楠屾敹鐘舵��', N'check_status', '', 0, N'admin', '2023-10-25 15:02:39.0090000', NULL, NULL, NULL); -INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1945027150818693122', N'1945027073496698882', N'鏄�', N'Y', '', 1, 1, N'admin', '2025-07-15 15:46:24.2780000', NULL, NULL); -INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1945027186277339138', N'1945027073496698882', N'鍚�', N'N', '', 2, 1, N'admin', '2025-07-15 15:46:32.7290000', NULL, NULL); - +INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1717074234504757249', N'1717074172248702977', N'閫氳繃', N'1', '', 1, 1, N'admin', '2023-10-25 15:02:53.8610000', NULL, NULL); +INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1717074268809969665', N'1717074172248702977', N'鏈�氳繃', N'2', '', 1, 1, N'admin', '2023-10-25 15:03:02.0350000', NULL, NULL); diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamInspectionOrderController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamInspectionOrderController.java index c0ff072..7fd0901 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamInspectionOrderController.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamInspectionOrderController.java @@ -337,7 +337,7 @@ */ @GetMapping("/exportInsOrderBaseInfo") public JSONObject exportInspectionOrderBaseInfo(@RequestParam(name = "equipmentCode", required = true) String equipmentCode, - @RequestParam(name = "inspectionDate", required = true) String inspectionDate) { + @RequestParam(name = "inspectionDate", required = false) String inspectionDate) { return eamInspectionOrderService.exportInspectionOrderBaseInfo(equipmentCode, inspectionDate); } @@ -349,7 +349,7 @@ */ @GetMapping("/exportInsOrderDetailList") public JSONObject exportInspectionOrderDetailList(@RequestParam(name = "equipmentCode", required = true) String equipmentCode, - @RequestParam(name = "inspectionDate", required = true) String inspectionDate) { + @RequestParam(name = "inspectionDate", required = false) String inspectionDate) { return eamInspectionOrderService.exportInspectionOrderDetailList(equipmentCode, inspectionDate); } @@ -361,7 +361,7 @@ */ @GetMapping("/exportInsOrderDetailUserList") public JSONObject exportInspectionOrderDetailUserList(@RequestParam(name = "equipmentCode", required = true) String equipmentCode, - @RequestParam(name = "inspectionDate", required = true) String inspectionDate) { + @RequestParam(name = "inspectionDate", required = false) String inspectionDate) { return eamInspectionOrderService.exportInspectionOrderDetailUserList(equipmentCode, inspectionDate); } @@ -373,7 +373,7 @@ */ @GetMapping("/exportWeekInsDetailList") public JSONObject exportWeekInsDetailList(@RequestParam(name = "equipmentCode", required = true) String equipmentCode, - @RequestParam(name = "inspectionDate", required = true) String inspectionDate) { + @RequestParam(name = "inspectionDate", required = false) String inspectionDate) { return eamInspectionOrderService.exportWeekInsDetailList(equipmentCode, inspectionDate); } @@ -385,7 +385,7 @@ */ @GetMapping("/exportWeekInsOrderDetailUserList") public JSONObject exportInspectionOrder(@RequestParam(name = "equipmentCode", required = true) String equipmentCode, - @RequestParam(name = "inspectionDate", required = true) String inspectionDate) { + @RequestParam(name = "inspectionDate", required = false) String inspectionDate) { return eamInspectionOrderService.exportWeekInsOrderDetailUserList(equipmentCode, inspectionDate); } diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java index ebddfb4..487d9fc 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java @@ -19,6 +19,7 @@ import org.jeecg.common.constant.DataBaseConstant; import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.common.util.StrUtils; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.eam.aspect.annotation.EquipmentHistoryLog; import org.jeecg.modules.eam.constant.*; @@ -47,6 +48,7 @@ import javax.annotation.Resource; import java.time.LocalDate; import java.time.ZoneId; +import java.time.format.DateTimeFormatter; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -172,6 +174,14 @@ */ @Override public JSONObject exportInspectionOrderBaseInfo(String equipmentCode, String inspectionDate) { + if (StrUtils.isEmpty(inspectionDate)) { + // 鑾峰彇褰撳墠鏃ユ湡 + LocalDate currentDate = LocalDate.now(); + // 瀹氫箟鏃ユ湡鏍煎紡 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); + // 鏍煎紡鍖栧綋鍓嶆湀浠� + inspectionDate = currentDate.format(formatter); + } // 鍒涘缓缁撴灉瀵硅薄 JSONObject result = new JSONObject(); EamInspectionOrderBaseResponse eamInspectionOrderBaseResponse = eamInspectionOrderMapper.findInsOrderBaseInfo(equipmentCode, inspectionDate); @@ -191,6 +201,14 @@ */ @Override public JSONObject exportInspectionOrderDetailList(String equipmentCode, String inspectionDate) { + if (StrUtils.isEmpty(inspectionDate)) { + // 鑾峰彇褰撳墠鏃ユ湡 + LocalDate currentDate = LocalDate.now(); + // 瀹氫箟鏃ユ湡鏍煎紡 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); + // 鏍煎紡鍖栧綋鍓嶆湀浠� + inspectionDate = currentDate.format(formatter); + } // 鍒涘缓缁撴灉瀵硅薄 JSONObject result = new JSONObject(); List<EamInsOrderDetailResultResponse> eamInsOrderDetailResultResponseList = eamInspectionOrderMapper.findInsOrderDetailList(equipmentCode, inspectionDate); @@ -267,6 +285,14 @@ */ @Override public JSONObject exportInspectionOrderDetailUserList(String equipmentCode, String inspectionDate) { + if (StrUtils.isEmpty(inspectionDate)) { + // 鑾峰彇褰撳墠鏃ユ湡 + LocalDate currentDate = LocalDate.now(); + // 瀹氫箟鏃ユ湡鏍煎紡 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); + // 鏍煎紡鍖栧綋鍓嶆湀浠� + inspectionDate = currentDate.format(formatter); + } // 鍒涘缓缁撴灉瀵硅薄 JSONObject result = new JSONObject(); List<EamInsOrderDetailUserResponse> eamInsOrderDetailUserResponseList = eamInspectionOrderMapper.findInspectionOrderDetailUserList(equipmentCode, inspectionDate); @@ -310,6 +336,14 @@ */ @Override public JSONObject exportWeekInsDetailList(String equipmentCode, String inspectionDate) { + if (StrUtils.isEmpty(inspectionDate)) { + // 鑾峰彇褰撳墠鏃ユ湡 + LocalDate currentDate = LocalDate.now(); + // 瀹氫箟鏃ユ湡鏍煎紡 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); + // 鏍煎紡鍖栧綋鍓嶆湀浠� + inspectionDate = currentDate.format(formatter); + } // 鍒涘缓缁撴灉瀵硅薄 JSONObject result = new JSONObject(); List<EamWeekInsDetailResultResponse> eamWeekInsDetailResultResponseList = eamInspectionOrderMapper.findWeekInsDetailList(equipmentCode, inspectionDate); @@ -385,6 +419,14 @@ */ @Override public JSONObject exportWeekInsOrderDetailUserList(String equipmentCode, String inspectionDate) { + if (StrUtils.isEmpty(inspectionDate)) { + // 鑾峰彇褰撳墠鏃ユ湡 + LocalDate currentDate = LocalDate.now(); + // 瀹氫箟鏃ユ湡鏍煎紡 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); + // 鏍煎紡鍖栧綋鍓嶆湀浠� + inspectionDate = currentDate.format(formatter); + } // 鍒涘缓缁撴灉瀵硅薄 JSONObject result = new JSONObject(); List<EamWeekInsDetailUserResponse> eamWeekInsDetailUserResponseList = eamInspectionOrderMapper.findWeekInsOrderDetailUserList(equipmentCode, inspectionDate); -- Gitblit v1.9.3