From 222eef13f74146bece02acd53d8393f7fdd3ec7e Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Fri, 31 May 2024 15:30:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E8=A6=81=E4=BA=8B=E4=BB=B6=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=9F=A5=E8=AF=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zc/business/mapper/DcEventImportantFileMapper.java | 8 ++++++++ .../service/impl/DcEventImportantFileServiceImpl.java | 9 +++++++++ .../mapper/business/DcEventImportantFileMapper.xml | 3 +++ 3 files changed, 20 insertions(+) diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcEventImportantFileMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcEventImportantFileMapper.java index 56e388eb..b0a4af04 100644 --- a/zc-business/src/main/java/com/zc/business/mapper/DcEventImportantFileMapper.java +++ b/zc-business/src/main/java/com/zc/business/mapper/DcEventImportantFileMapper.java @@ -68,4 +68,12 @@ public interface DcEventImportantFileMapper * @return 结果 */ int getImportantFileStatus(String eventId); + + /** + * 获取重要事件的上报状态 + * + * @param dcEventImportantFile 事件 + * @return 结果 + */ + int selectStatus(DcEventImportantFile dcEventImportantFile); } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java index 799dadea..dffd4471 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java @@ -62,6 +62,15 @@ public class DcEventImportantFileServiceImpl implements IDcEventImportantFileSer @Override public List selectDcEventImportantFileList(DcEventImportantFile dcEventImportantFile) { + int type = dcEventImportantFileMapper.getImportantFileStatus(dcEventImportantFile.getEventId()); + + //已初报待续报的, 如果查初报只能查上报了的 + if ((type == 1 || type == 2) && dcEventImportantFile.getType().equals("1")){ + dcEventImportantFile.setStatus("1"); + } else if (type == 3){ + //已终报的, 不管查什么类型的都只能查已上报状态的 + dcEventImportantFile.setStatus("1"); + } return dcEventImportantFileMapper.selectDcEventImportantFileList(dcEventImportantFile); } diff --git a/zc-business/src/main/resources/mapper/business/DcEventImportantFileMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventImportantFileMapper.xml index 1aed6148..f292981c 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventImportantFileMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventImportantFileMapper.xml @@ -48,6 +48,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" FROM `dc_event_important_file` where event_id = #{eventId} and status = '1' + insert into dc_event_important_file