From fcfb12de737e5e24542d991dc38d2731a3a21b83 Mon Sep 17 00:00:00 2001 From: dx <1242347652@qq.com> Date: Mon, 10 Feb 2025 15:48:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A7=E6=B3=95=E8=AE=B0=E5=BD=95=E8=BD=AC?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/taskinfo/vo/TaskInfoRespVO.java | 1 + .../dal/mysql/enterprise/EnterpriseMapper.java | 5 ++++- .../EnterpriseInspectionsServiceImpl.java | 15 ++++++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java index 8201a65..c3d687b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java @@ -21,6 +21,7 @@ public class TaskInfoRespVO { @ExcelProperty("任务ID,主键") private Long id; + private Integer reverseStauts; //任务编号 @Schema(description = "任务编号", example = "你猜") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprise/EnterpriseMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprise/EnterpriseMapper.java index d252e46..ef24f4e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprise/EnterpriseMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprise/EnterpriseMapper.java @@ -9,6 +9,9 @@ import cn.iocoder.yudao.module.system.dal.dataobject.enterprise.EnterpriseDO; import org.apache.ibatis.annotations.Mapper; import cn.iocoder.yudao.module.system.controller.admin.enterprise.vo.*; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUser; +import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId; + /** * 企业 Mapper * @@ -33,7 +36,7 @@ public interface EnterpriseMapper extends BaseMapperX { .eqIfPresent(EnterpriseDO::getGpsLocation, reqVO.getGpsLocation()) .betweenIfPresent(EnterpriseDO::getCreateTime, reqVO.getCreateTime()) .eqIfPresent(EnterpriseDO::getUpdater, reqVO.getUpdater()) - .or(w->w.eq(EnterpriseDO::getCreator, reqVO.getCreate())) +// .or(w->w.eq( EnterpriseDO::getCreator, getLoginUserId())) .orderByDesc(EnterpriseDO::getId)); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterpriseinspections/EnterpriseInspectionsServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterpriseinspections/EnterpriseInspectionsServiceImpl.java index 2574d13..3a739c2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterpriseinspections/EnterpriseInspectionsServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterpriseinspections/EnterpriseInspectionsServiceImpl.java @@ -217,7 +217,20 @@ public class EnterpriseInspectionsServiceImpl implements EnterpriseInspectionsSe LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(EnterpriseInspectionsDO::getUserId, userId); wrapper.eq(EnterpriseInspectionsDO::getTaskName, taskName); - return enterpriseInspectionsMapper.selectList(wrapper); + + final List enterpriseInspectionsDOS = enterpriseInspectionsMapper.selectList(wrapper); + //筛选出可以转交的检查记录 + List list = new ArrayList<>(); + if (enterpriseInspectionsDOS != null && enterpriseInspectionsDOS.size() > 0) { + enterpriseInspectionsDOS.forEach(item->{ + final InspectionsLogDO inspectionsLogNew = this.getInspectionsLogNew(item.getId()); + if (inspectionsLogNew == null || inspectionsLogNew.getStatus() == 3) { + //已经开始 就要判断是否是整改状态 整改状态才能转 + list.add(item); + } + }); + } + return list; } //获得检测记录最新一条