From 3d019781e2c6b8d7dc47eb8344cd6f7ba4b8722b Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Fri, 16 Aug 2024 15:34:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=A3=80=E6=9F=A5=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/check/TdCheckResultController.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/check/TdCheckResultController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/check/TdCheckResultController.java index 035cb18..bbf560d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/check/TdCheckResultController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/check/TdCheckResultController.java @@ -8,8 +8,8 @@ import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.system.domain.check.TdCheckReport; -import com.ruoyi.system.domain.check.TdCheckType; import com.ruoyi.system.domain.check.dto.TdCheckReportDTO; +import com.ruoyi.system.domain.check.dto.TdCheckTypeDTO; import com.ruoyi.system.service.check.TdCheckTypeService; import com.ruoyi.web.controller.manager.CheckReportManager; import com.ruoyi.web.controller.manager.SysAreaManager; @@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; @Controller @RequestMapping("/system/checkresult") @@ -134,11 +135,15 @@ public class TdCheckResultController extends BaseController { @PostMapping("/checkresult") @ResponseBody public AjaxResult selfcheckSave(@RequestBody TdCheckReportDTO checkReportDTO) { - List list = checkTypeService.lambdaQuery() - .eq(TdCheckType::getCheckId, checkReportDTO.getCheckId()) - .eq(TdCheckType::getResultStarts,"1") - .list(); - if (CollUtil.isNotEmpty(list)) { + boolean flag = false; + List checkTypeDtoS = checkReportDTO.getCheckTypeDTOS(); + for (TdCheckTypeDTO tdCheckTypeDTO :checkTypeDtoS){ + if("1".equals(tdCheckTypeDTO.getResultStarts())){ + flag = true; + break; + } + } + if (flag) { checkReportDTO.setCheckState("1"); } else { checkReportDTO.setCheckState("0");