From 0a19d4923b0a048aee0cda91c37f25bc6e140d54 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期三, 16 七月 2025 21:01:24 +0800 Subject: [PATCH] 修改接收字段 --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamWeekInspectionDetailController.java | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamWeekInspectionDetailController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamWeekInspectionDetailController.java index 688836a..d98e0b9 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamWeekInspectionDetailController.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamWeekInspectionDetailController.java @@ -6,15 +6,16 @@ import lombok.extern.slf4j.Slf4j; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.base.controller.JeecgController; -import org.jeecg.modules.eam.constant.InspectionItemCategroyEnum; -import org.jeecg.modules.eam.entity.EamMaintenanceStandardDetail; +import org.jeecg.common.util.StrUtils; import org.jeecg.modules.eam.entity.EamWeekInspectionDetail; import org.jeecg.modules.eam.service.IEamWeekInspectionDetailService; import org.jeecg.modules.eam.util.DateUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * @Description: 鍛ㄧ偣妫�宸ュ崟鏄庣粏 @@ -39,13 +40,23 @@ */ @ApiOperation(value = "鍛ㄧ偣妫�宸ュ崟鏄庣粏-鏃ョ偣妫�瑙勮寖鍒楄〃鏌ヨ", notes = "鍛ㄧ偣妫�宸ュ崟鏄庣粏-鏃ョ偣妫�瑙勮寖鍒楄〃鏌ヨ") @GetMapping(value = "/queryStandardList") - public Result<?> queryStandardList(@RequestParam("standardId") String standardId) { + public Result<?> queryStandardList(@RequestParam("standardId") String standardId, @RequestParam("inspectionDate") String inspectionDate) { LambdaQueryWrapper<EamWeekInspectionDetail> queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(EamWeekInspectionDetail::getStandardId, standardId); - queryWrapper.between(EamWeekInspectionDetail::getPlanInspectionDate, DateUtils.getFirstDayOfWeek(), DateUtils.getLastDayOfWeek()); + queryWrapper.between(EamWeekInspectionDetail::getPlanInspectionDate, DateUtils.getFirstDayOfWeek(inspectionDate), DateUtils.getLastDayOfWeek(inspectionDate)); queryWrapper.orderByAsc(EamWeekInspectionDetail::getItemCode); List<EamWeekInspectionDetail> list = eamWeekInspectionDetailService.list(queryWrapper); - return Result.OK(list); + //娣诲姞鐐规鍛ㄧ偣妫�鏄惁宸插畬鎴愭爣璇� + Map<String, Object> result = new HashMap<>(); + result.put("list", list); + if (list != null && !list.isEmpty()) { + if (!StrUtils.isEmpty(list.get(0).getInspector())) { + result.put("weekInsFlag", true); + } else { + result.put("weekInsFlag", false); + } + } + return Result.OK(result); } } -- Gitblit v1.9.3