tangxiaobao
2021-07-14 d52693e2ab44a49de4fdc0d8b1bac4bd0d3f58b6
社区管理基础数据库特殊人群标签管理、车辆导出改动
2个文件已修改
281 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java 220 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO;
import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDTO;
import com.panzhihua.common.model.dtos.grid.PageComMngPopulationDTO;
import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO;
import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationExportDTO;
@@ -448,45 +449,52 @@
            " label like concat('%',#{label},'%')")
    Integer getSpecialStatisticsByLabel(@Param("label") String label);
    @Select("SELECT " +
    @Select("<script> " +
            "SELECT " +
            " count( egd.id ) AS gridTotal, " +
            " ( SELECT count( user_id ) FROM sys_user WHERE community_id = egd.grid_community_id AND type = 6 ) AS gridMemberTotal, " +
            " ( " +
            " SELECT " +
            "  count( e.id )  " +
            " FROM " +
            "  `event` AS e " +
            "  LEFT JOIN event_grid_data AS egd1 ON e.grid_id = egd1.id  " +
            " WHERE " +
            "  egd1.grid_community_id = egd.grid_community_id  " +
            "  AND event_status = 2  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            " ) AS eventTotal, " +
            " ( " +
            " SELECT " +
            "  count( e1.id )  " +
            " FROM " +
            "  `event` AS e1 " +
            "  LEFT JOIN event_grid_data AS egd2 ON e1.grid_id = egd2.id  " +
            " WHERE " +
            "  egd2.grid_community_id = egd.grid_community_id  " +
            "  AND event_status = 2  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e1.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e1.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            " AND event_deal_status IN ( 1, 2, 3 )) AS noSolveEventTotal, " +
            " ( " +
            " SELECT " +
            "  count( e1.id )  " +
            " FROM " +
            "  `event` AS e1 " +
            "  LEFT JOIN event_grid_data AS egd2 ON e1.grid_id = egd2.id  " +
            " WHERE " +
            "  egd2.grid_community_id = egd.grid_community_id  " +
            "  AND event_status = 2  " +
            "  AND event_deal_status = 4  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e1.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e1.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            " ) AS solveEventTotal  " +
            "FROM " +
            " event_grid_data AS egd  " +
            "WHERE " +
            " egd.grid_community_id = #{communityId}")
    EventLeftTopStatisticsVO getEventScreenLeftTop(@Param("communityId") Long communityId);
            " egd.grid_community_id = #{screenEventDTO.communityId} " +
            " </script>")
    EventLeftTopStatisticsVO getEventScreenLeftTop(@Param("screenEventDTO") BigScreenEventDTO screenEventDTO);
    @Select("SELECT " +
            " DATE_FORMAT( e.create_at, '%m' ) months  " +
@@ -504,173 +512,234 @@
            " LIMIT 3")
    List<Integer> getFrequentlyEventMonth(@Param("communityId") Long communityId);
    @Select("SELECT " +
    @Select("<script> " +
            "SELECT " +
            " count( e.id ) AS eventZATotal, " +
            " IFNULL(( " +
            "  SELECT " +
            "   count( e1.id )  " +
            "  FROM " +
            "   `event` AS e1 " +
            "   LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id  " +
            "  WHERE " +
            "   egd1.grid_community_id = #{screenEventDTO.communityId}  " +
            "   egd1.grid_community_id = #{communityId}  " +
            "   AND event_category = 1  " +
            "   AND event_type = 1  " +
            "   AND event_deal_status = 4  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e1.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e1.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "   ), " +
            "  0  " +
            " ) AS yesEventZATotal, " +
            " IFNULL(( " +
            "  SELECT " +
            "   count( e2.id )  " +
            "  FROM " +
            "   `event` AS e2 " +
            "   LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id  " +
            "  WHERE " +
            "   egd2.grid_community_id = #{screenEventDTO.communityId}  " +
            "   egd2.grid_community_id = #{communityId}  " +
            "   AND event_category = 1  " +
            "   AND event_type = 5  " +
            "   AND event_status = 2  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e2.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e2.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "   ), " +
            "  0  " +
            " ) AS eventTFTotal, " +
            " IFNULL(( " +
            "  SELECT " +
            "   count( e3.id )  " +
            "  FROM " +
            "   `event` AS e3 " +
            "   LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id  " +
            "  WHERE " +
            "   egd3.grid_community_id = #{screenEventDTO.communityId}  " +
            "   egd3.grid_community_id = #{communityId}  " +
            "   AND event_category = 1  " +
            "   AND event_type = 5  " +
            "   AND event_deal_status = 4  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e3.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e3.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "   ), " +
            "  0  " +
            " ) AS yesEventTFTotal, " +
            " IFNULL(( " +
            "  SELECT " +
            "   count( e4.id )  " +
            "  FROM " +
            "   `event` AS e4 " +
            "   LEFT JOIN event_grid_data AS egd4 ON egd4.id = e4.grid_id  " +
            "  WHERE " +
            "   egd4.grid_community_id = #{screenEventDTO.communityId}  " +
            "   egd4.grid_community_id = #{communityId}  " +
            "   AND event_category = 1  " +
            "   AND event_type = 6  " +
            "   AND event_status = 2  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e4.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e4.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "   ), " +
            "  0  " +
            " ) AS eventTSTotal, " +
            " IFNULL(( " +
            "  SELECT " +
            "   count( e5.id )  " +
            "  FROM " +
            "   `event` AS e5 " +
            "   LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id  " +
            "  WHERE " +
            "   egd5.grid_community_id = #{screenEventDTO.communityId}  " +
            "   egd5.grid_community_id = #{communityId}  " +
            "   AND event_category = 1  " +
            "   AND event_type = 6  " +
            "   AND event_deal_status = 4  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e5.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e5.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "   ), " +
            "  0  " +
            " ) AS yesEventTSTotal, " +
            " IFNULL(( " +
            "  SELECT " +
            "   count( e6.id )  " +
            "  FROM " +
            "   `event` AS e6 " +
            "   LEFT JOIN event_grid_data AS egd6 ON egd6.id = e6.grid_id  " +
            "  WHERE " +
            "   egd6.grid_community_id = #{screenEventDTO.communityId}  " +
            "   egd6.grid_community_id = #{communityId}  " +
            "   AND event_category = 1  " +
            "   AND event_type = 3  " +
            "   AND event_status = 2  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e6.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e6.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "   ), " +
            "  0  " +
            " ) AS eventMDTotal, " +
            " IFNULL(( " +
            "  SELECT " +
            "   count( e7.id )  " +
            "  FROM " +
            "   `event` AS e7 " +
            "   LEFT JOIN event_grid_data AS egd7 ON egd7.id = e7.grid_id  " +
            "  WHERE " +
            "   egd7.grid_community_id = #{screenEventDTO.communityId}  " +
            "   egd7.grid_community_id = #{communityId}  " +
            "   AND event_category = 1  " +
            "   AND event_type = 3  " +
            "   AND event_deal_status = 4  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e7.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e7.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "   ), " +
            "  0  " +
            " ) AS yesEventMDTotal, " +
            " IFNULL(( " +
            "  SELECT " +
            "   count( e8.id )  " +
            "  FROM " +
            "   `event` AS e8 " +
            "   LEFT JOIN event_grid_data AS egd8 ON egd8.id = e8.grid_id  " +
            "  WHERE " +
            "   egd8.grid_community_id = #{screenEventDTO.communityId}  " +
            "   egd8.grid_community_id = #{communityId}  " +
            "   AND event_category = 1  " +
            "   AND event_type = 4  " +
            "   AND event_status = 2  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e8.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e8.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "   ), " +
            "  0  " +
            " ) AS eventBWDTotal, " +
            " IFNULL(( " +
            "  SELECT " +
            "   count( e9.id )  " +
            "  FROM " +
            "   `event` AS e9 " +
            "   LEFT JOIN event_grid_data AS egd9 ON egd9.id = e9.grid_id  " +
            "  WHERE " +
            "   egd9.grid_community_id = #{screenEventDTO.communityId}  " +
            "   egd9.grid_community_id = #{communityId}  " +
            "   AND event_category = 1  " +
            "   AND event_type = 4  " +
            "   AND event_deal_status = 4  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e9.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e9.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "   ), " +
            "  0  " +
            " ) AS yesEventBWDTotal, " +
            " IFNULL(( " +
            "  SELECT " +
            "   count( e10.id )  " +
            "  FROM " +
            "   `event` AS e10 " +
            "   LEFT JOIN event_grid_data AS egd10 ON egd10.id = e10.grid_id  " +
            "  WHERE " +
            "   egd10.grid_community_id = #{screenEventDTO.communityId}  " +
            "   egd10.grid_community_id = #{communityId}  " +
            "   AND event_category = 1  " +
            "   AND event_type = 2  " +
            "   AND event_status = 2  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e10.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e10.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "   ), " +
            "  0  " +
            " ) AS eventGGTotal, " +
            " IFNULL(( " +
            "  SELECT " +
            "   count( e11.id )  " +
            "  FROM " +
            "   `event` AS e11 " +
            "   LEFT JOIN event_grid_data AS egd11 ON egd11.id = e11.grid_id  " +
            "  WHERE " +
            "   egd11.grid_community_id = #{screenEventDTO.communityId}  " +
            "   egd11.grid_community_id = #{communityId}  " +
            "   AND event_category = 1  " +
            "   AND event_type = 2  " +
            "   AND event_deal_status = 4  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e11.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e11.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "   ), " +
            "  0  " +
            " ) AS yesEventGGTotal, " +
            " IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE del_tag = 0 AND handle_status IS NOT NULL AND community_id = #{screenEventDTO.communityId} " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "), 0 ) AS eventSSPTotal, " +
            " IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE del_tag = 0 AND handle_status = 2 AND community_id = #{screenEventDTO.communityId} " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "), 0 ) AS yesEventSSPTotal  " +
            " IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE del_tag = 0 AND handle_status IS NOT NULL AND community_id = #{communityId} ), 0 ) AS eventSSPTotal, " +
            " IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE del_tag = 0 AND handle_status = 2 AND community_id = #{communityId} ), 0 ) AS yesEventSSPTotal  " +
            "FROM " +
            " `event` AS e " +
            " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id  " +
            "WHERE " +
            " egd.grid_community_id = #{screenEventDTO.communityId}  " +
            " egd.grid_community_id = #{communityId}  " +
            " AND event_category = 1  " +
            " AND event_type = 1  " +
            " AND event_status = 2")
    EventLeftDownStatisticsVO getEventScreenLeftDown(@Param("communityId") Long communityId);
            " AND event_status = 2 " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            " </script>")
    EventLeftDownStatisticsVO getEventScreenLeftDown(@Param("screenEventDTO") BigScreenEventDTO screenEventDTO);
    @Select("SELECT " +
            " su.nick_name AS userName, " +
@@ -712,17 +781,22 @@
            " egd.grid_community_id = #{communityId}")
    List<EventGridStatisticsVO> getEventScreenGridData(@Param("communityId") Long communityId);
    @Select("SELECT " +
    @Select("<script> " +
            "SELECT " +
            " event_type AS type, " +
            " e.id AS eventId, " +
            " happent_lat_lng AS latLng  " +
            "FROM " +
            " `event` AS e " +
            " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id  " +
            "WHERE " +
            " e.event_category = 1  " +
            " AND e.event_type IN ( 1, 2, 3, 4, 5, 6 )  " +
            " AND e.event_status = 2  " +
            " AND egd.grid_community_id = #{screenEventDTO.communityId}  " +
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND e.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND e.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            "UNION ALL SELECT " +
            " AND egd.grid_community_id = #{communityId}  " +
            " AND e.create_at >= DATE_SUB(CURDATE(),INTERVAL 30 DAY) UNION ALL " +
            "SELECT " +
@@ -732,11 +806,19 @@
            "FROM " +
            " com_act_easy_photo  " +
            "WHERE " +
            " community_id = #{screenEventDTO.communityId}  " +
            " community_id = #{communityId}  " +
            " AND del_tag = 0  " +
            " AND lng_lat IS NOT NULL  " +
            " AND create_at >= DATE_SUB(CURDATE(),INTERVAL 30 DAY)")
    List<EventGridIncidentStatisticsVO> getEventScreenEventList(@Param("communityId") Long communityId);
            "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>" +
            " AND create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " +
            " </if> " +
            "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>" +
            " AND create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " +
            " </if> " +
            " </script>")
    List<EventGridIncidentStatisticsVO> getEventScreenEventList(@Param("screenEventDTO") BigScreenEventDTO screenEventDTO);
    @Select("SELECT " +
            " count( id ) AS specialTotal, " +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -42,6 +43,7 @@
import com.panzhihua.common.model.vos.screen.ComActPopulationScreenVO;
import com.panzhihua.common.model.vos.screen.ComMngPopulationAgeVO;
import com.panzhihua.common.model.vos.user.*;
import com.panzhihua.common.model.vos.user.ComMngUserTagVO;
import com.panzhihua.common.utlis.AgeUtils;
import com.panzhihua.common.utlis.DateUtils;
import com.panzhihua.common.utlis.Snowflake;
@@ -91,8 +93,11 @@
    private EventResourceService eventResourceService;
    @Resource
    private BigScreenDAO bigScreenDAO;
    @Resource
    private ComMngUserTagDAO comMngUserTagDAO;
    @Value("${domain.aesKey:}")
    private String aesKey;
    /**
@@ -776,6 +781,62 @@
        }
    }
    @Override
    public R specialInputUserTags(PageInputUserDTO comMngUserTagDTO) {
        IPage<ComMngTagVO> iPage = populationDAO.specialInputUserTags(new Page<>(comMngUserTagDTO.getPageNum()
                , comMngUserTagDTO.getPageSize()), comMngUserTagDTO);
        return R.ok(iPage);
    }
    @Override
    public R saveSpecialInputUserTags(ComMngTagVO comMngTagVO) {
        if (null != comMngTagVO.getId() && comMngTagVO.getId() != 0) {
            //修改
            ComMngUserTagDO comMngUserTagDO = comMngUserTagDAO.selectById(comMngTagVO.getId());
            if (null == comMngUserTagDO) {
                return R.fail("该标签不存在");
            }
            ComMngUserTagDO checkCreditCode = comMngUserTagDAO.selectOne(new QueryWrapper<ComMngUserTagDO>().lambda().eq(ComMngUserTagDO::getTagName, comMngTagVO.getTagName()));
            if (null != checkCreditCode && comMngUserTagDO.getId() != checkCreditCode.getId()) {
                return R.fail("该标签已存在,标签名称重复");
            }
            BeanUtils.copyProperties(comMngTagVO, comMngUserTagDO);
            int update = comMngUserTagDAO.updateById(comMngUserTagDO);
            if (update > 0) {
                return R.ok();
            }
        } else {
            //新增
            Integer count = comMngUserTagDAO.selectCount(new QueryWrapper<ComMngUserTagDO>().lambda().eq(ComMngUserTagDO::getTagName, comMngTagVO.getTagName()));
            if (count > 0) {
                return R.fail("该标签已存在,标签名称重复");
            }
            ComMngUserTagDO comMngUserTagDO = new ComMngUserTagDO();
            BeanUtils.copyProperties(comMngTagVO, comMngUserTagDO);
            int insert = comMngUserTagDAO.insert(comMngUserTagDO);
            if (insert > 0) {
                return R.ok();
            }
        }
        return R.fail("添加失败");
    }
    @Override
    public R deleteSpecialInputUserTags(Long id) {
        //查询特殊群体人员
        ComMngUserTagDO comMngUserTagDO = comMngUserTagDAO.selectById(id);
        if (comMngUserTagDO == null) {
            return R.fail("该标签不存在");
        }
        int delete = comMngUserTagDAO.deleteById(id);
        if (delete > 0) {
            return R.ok();
        }
        return R.fail("删除失败");
    }
    /**
     * 查询实有人口电子档信息
     *