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