CeDo
2021-06-09 f7d354a6bfa2b184858de1b2edef8f52e3d92d27
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
@@ -515,6 +515,8 @@
        eventDO.setUpdateBy(eventRevokeDTO.getUserId());
        eventDO.setProcessType(1);//网格员处理
        eventDO.setCommunityProcess(0);//非 社区处理
        eventDO.setRevokeType(eventRevokeDTO.getRevokeType());
        eventDO.setRevokeID(eventRevokeDTO.getRevokeId());
        int updated = this.getBaseMapper().updateById(eventDO);
        if (updated == 1) {
            addTransferRecord(eventDO.getId(), eventRevokeDTO.getUserId(), eventRevokeDTO.getUserName(),
@@ -1262,12 +1264,12 @@
            if (eventDO.getEventCategory() == 1) {
                boolean canRevoke = eventDO.getEventDealStatus() == 3; //上报状态
                if (!canRevoke) {
                    return R.fail("当前事件不是上报状态,不允许标为无效");
                    return R.fail("当前事件不是上报状态,不允许撤销");
                }
            } else if (eventDO.getEventCategory() == 2) {
                boolean canRevoke = eventDO.getEventDealStatus() == 8; //发布状态
                if (!canRevoke) {
                    return R.fail("当前事件不是发布状态,不允许标为无效");
                    return R.fail("当前事件不是发布状态,不允许撤销");
                }
            } else {
                return R.fail("");
@@ -1281,6 +1283,8 @@
        eventDO.setEventStatus(4);//4、撤销
        eventDO.setProcessType(1);//网格员处理
        eventDO.setCommunityProcess(0);//非 社区处理
        eventDO.setRevokeID(eventRevokeDTO.getRevokeId());
        eventDO.setRevokeType(eventRevokeDTO.getRevokeType());
        int updated = this.getBaseMapper().updateById(eventDO);
        if (updated == 1) {
            addTransferRecord(eventDO.getId(), eventRevokeDTO.getUserId(), eventRevokeDTO.getUserName(), 1, "标为无效", eventRevokeDTO.getCommunityId(), eventRevokeDTO.getCommunityName(), 4);
@@ -1777,15 +1781,15 @@
                    throw new ServiceException("id为" + id + "的事件不存在");
                }
                if (eventDO.getEventCategory() != null) {
                    if (eventDO.getEventCategory() == 1) {
                    if (eventDO.getEventCategory() == 1) {//
                        boolean canRevoke = eventDO.getEventDealStatus() == 3; //上报状态
                        if (!canRevoke) {
                            throw new ServiceException("当前事件不是上报状态,不允许标为无效");
                            throw new ServiceException("当前事件不是上报状态,不允许撤销");
                        }
                    } else if (eventDO.getEventCategory() == 2) {
                    } else if (eventDO.getEventCategory() == 2) {//宣传教育
                        boolean canRevoke = eventDO.getEventDealStatus() == 8; //发布状态
                        if (!canRevoke) {
                            throw new ServiceException("当前事件不是发布状态,不允许标为无效");
                            throw new ServiceException("当前事件不是发布状态,不允许撤销");
                        }
                    } else {
                        throw new ServiceException("事件分类错误");