From 7c856cd8b6a3de4cd97ddcef6e8856e3c1846e82 Mon Sep 17 00:00:00 2001 From: wangpeng Date: Sat, 27 Jan 2024 18:09:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E5=87=86=E6=A3=80=E6=9F=A5=E9=A1=B9?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=8A=B6=E6=80=81=20=E7=B1=BB=E7=9B=AE?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E5=92=8C=E6=A3=80=E6=9F=A5=E9=A1=B9=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E6=98=AF=E5=90=A6=E5=B7=B2=E8=A2=AB=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CommonServiceImpl.java | 1 + .../CommonItemMapper.xml | 13 +++++++++++++ .../CommonMapper.xml | 1 + .../DictionaryMapper.xml | 11 +++++++++++ 4 files changed, 26 insertions(+) diff --git a/src/main/java/com/zcloud/service/hiddenDangerCheckStandardLibrary/impl/CommonServiceImpl.java b/src/main/java/com/zcloud/service/hiddenDangerCheckStandardLibrary/impl/CommonServiceImpl.java index eddd932..a4dfe3e 100644 --- a/src/main/java/com/zcloud/service/hiddenDangerCheckStandardLibrary/impl/CommonServiceImpl.java +++ b/src/main/java/com/zcloud/service/hiddenDangerCheckStandardLibrary/impl/CommonServiceImpl.java @@ -239,6 +239,7 @@ public class CommonServiceImpl implements CommonService { } for (PageData entity : dataList) { entity.put("COMMON_ID",pd.getString("COMMON_ID")); + entity.put("COMMON_ITEM_STATUS",1); Warden.initDate(entity); commonItemService.save(entity); } diff --git a/src/main/resources/mybatis/dsno2/hiddenDangerCheckStandardLibrary/CommonItemMapper.xml b/src/main/resources/mybatis/dsno2/hiddenDangerCheckStandardLibrary/CommonItemMapper.xml index bc11019..ea6f5bc 100644 --- a/src/main/resources/mybatis/dsno2/hiddenDangerCheckStandardLibrary/CommonItemMapper.xml +++ b/src/main/resources/mybatis/dsno2/hiddenDangerCheckStandardLibrary/CommonItemMapper.xml @@ -24,6 +24,7 @@ f.CHECK_UNQUALIFIED, f.OPERATION_TYPE, f.COMMON_ITEM_SORT, + f.COMMON_ITEM_STATUS, f.ISDELETE, f.CREATOR_ID, f.CREATOR_NAME, @@ -49,6 +50,7 @@ CHECK_UNQUALIFIED, OPERATION_TYPE, COMMON_ITEM_SORT, + COMMON_ITEM_STATUS, ISDELETE, CREATOR_ID, CREATOR_NAME, @@ -74,6 +76,7 @@ #{CHECK_UNQUALIFIED}, #{OPERATION_TYPE}, #{COMMON_ITEM_SORT}, + #{COMMON_ITEM_STATUS}, #{ISDELETE}, #{CREATOR_ID}, #{CREATOR_NAME}, @@ -146,6 +149,9 @@ COMMON_ITEM_SORT = #{COMMON_ITEM_SORT}, + + COMMON_ITEM_STATUS = #{COMMON_ITEM_STATUS}, + ISDELETE = #{ISDELETE}, @@ -197,6 +203,7 @@ select dca.DICTIONARY_NAME CHECK_CATEGORY_NAME, di.DICTIONARY_NAME CHECK_ITEM_NAME, + (select count(*) from BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM_ITEM where COMMON_ITEM_ID = f.COMMON_ITEM_ID) COUNT_CUSTOM, from f @@ -215,6 +222,9 @@ and f.CHECK_CONTENT like CONCAT(CONCAT('%', #{pd.CHECK_CONTENT}),'%') + + and f.COMMON_ITEM_STATUS = #{pd.COMMON_ITEM_STATUS} + order by dca.DICTIONARY_SORT asc, di.DICTIONARY_SORT asc, f.COMMON_ITEM_SORT asc @@ -232,6 +242,9 @@ and f.COMMON_ID = #{COMMON_ID} + + and f.COMMON_ITEM_STATUS = #{COMMON_ITEM_STATUS} + order by dca.DICTIONARY_SORT asc, di.DICTIONARY_SORT asc, f.COMMON_ITEM_SORT asc diff --git a/src/main/resources/mybatis/dsno2/hiddenDangerCheckStandardLibrary/CommonMapper.xml b/src/main/resources/mybatis/dsno2/hiddenDangerCheckStandardLibrary/CommonMapper.xml index 0cf2abe..370edf5 100644 --- a/src/main/resources/mybatis/dsno2/hiddenDangerCheckStandardLibrary/CommonMapper.xml +++ b/src/main/resources/mybatis/dsno2/hiddenDangerCheckStandardLibrary/CommonMapper.xml @@ -164,6 +164,7 @@ select + CASE f.DICTIONARY_LEVEL + WHEN 1 THEN + COUNT(cca.COMMON_ITEM_ID)+COUNT(cua.CUSTOM_ITEM_ID) + WHEN 2 THEN + COUNT(cci.COMMON_ITEM_ID)+COUNT(cui.CUSTOM_ITEM_ID) + END COUNT_USE, from f + left join bus_hiddendangercheckstandard_common_item cca on cca.CHECK_CATEGORY = f.DICTIONARY_ID + left join bus_hiddendangercheckstandard_common_item cci on cci.CHECK_ITEM = f.DICTIONARY_ID + left join bus_hiddendangercheckstandard_custom_item cua on cua.CHECK_CATEGORY = f.DICTIONARY_ID + left join bus_hiddendangercheckstandard_custom_item cui on cui.CHECK_ITEM = f.DICTIONARY_ID where f.ISDELETE = '0' + group by f.DICTIONARY_ID order by f.DICTIONARY_LEVEL asc, f.DICTIONARY_SORT asc