diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventAddEditFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventAddEditFormDTO.java deleted file mode 100644 index d31d57b3d1..0000000000 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventAddEditFormDTO.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.epmet.dto.form; - -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - - -@Data -public class EventAddEditFormDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 事件编号 - */ - private String code; - /** - * 事件状态 - */ - private String status; - /** - * 上报人员 - */ - private String reporter; - /** - * 联系电话 - */ - private String phone; - /** - * 上报事件 - */ - private Date reportDate; - /** - * 紧急程度 - */ - private String urgency; - /** - * 所属网格 - */ - private String grid; - /** - * 事件类型 - */ - private String eventType; - /** - * 即办类型 - */ - private String type; - /** - * 办理期限 - */ - private Date lastDate; - - /** - * 满意度 - */ - private String satisficing; - - /** - * 页码 - */ - private Integer pageNo = 1; - /** - * 每页显示数量 - */ - private Integer pageSize = 20; - - private Boolean isPage = true; - - - private String customerId; - - private String agencyId; - - private String staffId; - - private String userId; - - private String app; - - private String client; -} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventFormsDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventFormsDTO.java deleted file mode 100644 index a9c4c2baa5..0000000000 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventFormsDTO.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.epmet.dto.form; - -import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - -/** - * 灵山项目事件 formDTO - */ - -@Data -public class EventFormsDTO implements Serializable { - private static final long serialVersionUID = 1; - - public interface Detail extends CustomerClientShowGroup { - } - - public interface GovRedDot extends CustomerClientShowGroup { - } - - /** - * 事件编号 - */ - private String code; - /** - * 事件状态 - */ - private String status; - /** - * 上报人员 - */ - private String reporter; - /** - * 联系电话 - */ - private String phone; - /** - * 上报事件 - */ - private Date reportDate; - /** - * 紧急程度 - */ - private String urgency; - /** - * 所属网格 - */ - private String grid; - /** - * 事件类型 - */ - private String eventType; - /** - * 即办类型 - */ - private String type; - /** - * 办理期限 - */ - private Date lastDate; - - /** - * 满意度 - */ - private String satisficing; - - /** - * 页码 - */ - private Integer pageNo = 1; - /** - * 每页显示数量 - */ - private Integer pageSize = 20; - - private Boolean isPage = true; - - - private String customerId; - - private String agencyId; - - private String staffId; -} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventResultDTO.java deleted file mode 100644 index 059905086a..0000000000 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventResultDTO.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.epmet.dto.result; - -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - -/** - * 即墨灵山项目 - */ - -@Data -public class EventResultDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - private String id; - - /** - * 事件编号 - */ - private String code; - - /** - * 事件状态 - */ - private String status; - - /** - * 事件明细ID - */ - private String detailId; - /** - * 上报人员 - */ - private String reporter; - /** - * 联系电话 - */ - private String phone; - /** - * 上报事件事件 - */ - private Date reportDate; - /** - * 紧急程度 - */ - private String urgency; - /** - * 所属网格 - */ - private String grid; - /** - * 事件类型 - */ - private String eventType; - /** - * 即办类型 - */ - private String type; - /** - * 办理期限 - */ - private Date lastDate; - /** - * 事件地址 - */ - private String eventAddr; - - /** - * 坐标经度 - */ - private String longitude; - /** - * 坐标纬度 - */ - private String latitude; - /** - * 音频 - */ - private String voice; - /** - * 视频 - */ - private String video; - /** - * 满意度 - */ - private String satisficing; - /** - * 解决情况 - */ - private String remark; - /** - * 事件描述 - */ - private String conetnt; - -} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/EventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/EventController.java deleted file mode 100644 index 2a85af367f..0000000000 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/EventController.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.epmet.controller; - -import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.aop.NoRepeatSubmit; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.form.EventAddEditFormDTO; -import com.epmet.dto.form.EventFormsDTO; -import com.epmet.dto.result.EventResultDTO; -import com.epmet.service.EventService; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -/** - * @author yan Lu - * @date 2023-04-14 19:07 - * @deprecated 社会治理--事件处理 - */ -@Slf4j -@RestController -@RequestMapping("event") -public class EventController { - - @Autowired - private EventService eventService; - - /** - * 社会治理 事件列表 - * @param tokenDto - * @param formDTO - * @return - */ - @PostMapping("list") - public Result> getList(@LoginUser TokenDto tokenDto, @RequestBody EventFormsDTO formDTO) { - formDTO.setCustomerId(tokenDto.getCustomerId()); - formDTO.setStaffId(tokenDto.getUserId()); - return new Result>().ok(eventService.getList(formDTO)); - } - - /** - * @deprecated 根据ID获取事件 - * @param id - * @return - */ - @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ - EventResultDTO data = eventService.getById(id); - return new Result().ok(data); - } - - - @NoRepeatSubmit - @PostMapping("add") - public Result save(@LoginUser TokenDto tokenDto, @RequestBody EventAddEditFormDTO formDTO){ - ValidatorUtils.validateEntity(formDTO, AddGroup.class, DefaultGroup.class); - formDTO.setCustomerId(tokenDto.getCustomerId()); - formDTO.setUserId(tokenDto.getUserId()); - formDTO.setApp(tokenDto.getApp()); - formDTO.setClient(tokenDto.getClient()); - eventService.save(formDTO); - return new Result(); - } - - @NoRepeatSubmit - @PostMapping("update") - public Result update(@RequestBody EventResultDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - eventService.update(dto); - return new Result(); - } - - @PostMapping("delete") - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - eventService.delete(ids); - return new Result(); - } - -} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/EventEntityDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/EventEntityDao.java deleted file mode 100644 index fe05484677..0000000000 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/EventEntityDao.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.epmet.dao; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.form.EventFormsDTO; -import com.epmet.dto.result.EventResultDTO; -import com.epmet.entity.EventEntity; -import org.apache.ibatis.annotations.Mapper; - -import java.util.List; - -/** - * 灵山项目 - */ - -@Mapper -public interface EventEntityDao extends BaseDao { - - List getList(EventFormsDTO formDTO); -} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/EventDetailEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/EventDetailEntity.java deleted file mode 100644 index 84d4c2e0c8..0000000000 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/EventDetailEntity.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.epmet.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -@Data -@EqualsAndHashCode(callSuper = false) -@TableName("event_detail") -public class EventDetailEntity extends BaseEpmetEntity { - - /** - * 事件ID - */ - private String eventId; - /** - * 上报人 - */ - private String reporter; - /** - * 接收人 - */ - private String recipient; - /** - * 上报事件 - */ - private Date reportDate; - /** - * 事件附件地址 - */ - private String atts; - /** - * 事件处理耗时 - */ - private String timeSpent; - /** - * 反馈内容 - */ - private String content; -} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/EventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/EventEntity.java deleted file mode 100644 index 1d6212adcf..0000000000 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/EventEntity.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.epmet.entity; - - -import com.baomidou.mybatisplus.annotation.TableName; -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -/** - * 灵山项目事件 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@TableName("event_entity") -public class EventEntity extends BaseEpmetEntity { - - /** - * 事件编号 - */ - private String code; - /** - * 事件状态 - */ - private String status; - /** - * 事件明细ID - */ - private String detailId; - /** - * 上报人员 - */ - private String reporter; - /** - * 联系电话 - */ - private String phone; - /** - * 上报事件事件 - */ - private Date reportDate; - /** - * 紧急程度 - */ - private String urgency; - /** - * 所属网格 - */ - private String grid; - /** - * 事件类型 - */ - private String eventType; - /** - * 即办类型 - */ - private String type; - /** - * 办理期限 - */ - private Date lastDate; - /** - * 事件地址 - */ - private String eventAddr; - - /** - * 坐标经度 - */ - private String longitude; - /** - * 坐标纬度 - */ - private String latitude; - /** - * 音频 - */ - private String voice; - /** - * 视频 - */ - private String video; - /** - * 满意度 - */ - private String satisficing; - /** - * 解决情况 - */ - private String remark; - /** - * 事件描述 - */ - private String conetnt; - -} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/EventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/EventService.java deleted file mode 100644 index 07371f7f4f..0000000000 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/EventService.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.epmet.service; - - -import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.form.EventAddEditFormDTO; -import com.epmet.dto.form.EventFormsDTO; -import com.epmet.dto.result.EventResultDTO; - -public interface EventService { - PageData getList(EventFormsDTO formDTO); - - EventResultDTO getById(String id); - - void update(EventResultDTO dto); - - void delete(String[] ids); - - void save(EventAddEditFormDTO dto); -} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/EventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/EventServiceImpl.java deleted file mode 100644 index 7567d05e6d..0000000000 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/EventServiceImpl.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.epmet.service.impl; - -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.baomidou.mybatisplus.core.toolkit.IdWorker; -import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; -import com.epmet.commons.tools.exception.EpmetException; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.redis.common.CustomerStaffRedis; -import com.epmet.commons.tools.security.user.LoginUserUtil; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.dao.EventEntityDao; -import com.epmet.dto.form.EventAddEditFormDTO; -import com.epmet.dto.form.EventFormsDTO; -import com.epmet.dto.result.EventResultDTO; -import com.epmet.entity.EventEntity; -import com.epmet.entity.IcEventOperationLogEntity; -import com.epmet.service.EventService; -import com.epmet.service.IcEventOperationLogService; -import com.github.pagehelper.PageHelper; -import com.github.pagehelper.PageInfo; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Date; -import java.util.List; - -@Service -public class EventServiceImpl extends BaseServiceImpl implements EventService { - - @Autowired - private LoginUserUtil loginUserUtil; - - @Autowired - private IcEventOperationLogService icEventOperationLogService; - - /** - * @param formDTO - * @return - * @deprecated 查询事件列表 - */ - @Override - public PageData getList(EventFormsDTO formDTO) { - if (StringUtils.isBlank(formDTO.getAgencyId())) { - //获取当前工作人员缓存信息 - CustomerStaffInfoCacheResult staffInfo = getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); - formDTO.setAgencyId(staffInfo.getAgencyId()); - } - //分页查询当前组织下网格内事件数据 - PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); - List list = baseDao.getList(formDTO); - PageInfo pageInfo = new PageInfo<>(list); - return new PageData<>(list, pageInfo.getTotal()); - } - - /** - * @param id - * @return - * @deprecated 获取事件详情 - */ - @Override - public EventResultDTO getById(String id) { - EventEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, EventResultDTO.class); - } - - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(EventResultDTO dto) { - EventEntity entity = ConvertUtils.sourceToTarget(dto, EventEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - for (String id : ids) { - EventEntity entity = baseDao.selectById(id); - if (null == entity) { - continue; - } - LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper(); - wrapper.eq(EventEntity::getId, id).set(EventEntity::getUpdatedTime, new Date()) - .set(EventEntity::getUpdatedBy, loginUserUtil.getLoginUserId()) - .set(EventEntity::getDelFlag, NumConstant.ONE_STR); - baseDao.update(null, wrapper); -// icEventCategoryService.delInsert(id,null); - } - } - - @Override - public void save(EventAddEditFormDTO formDTO) { - EventEntity entity = ConvertUtils.sourceToTarget(formDTO, EventEntity.class); - entity.setId(IdWorker.getIdStr()); -// List logList = new ArrayList<>(); -// logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), new Date(), "add", "publish")); -// icEventOperationLogService.insertBatch(logList); - insert(entity); - } - - /** - * @param customerId - * @param staffId - * @return - * @deprecated 获取当前登陆人员信息 - */ - - public CustomerStaffInfoCacheResult getStaffInfo(String customerId, String staffId) { - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, staffId); - if (null == staffInfo) { - throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", staffId)); - } - return staffInfo; - } - - /** - * 事件管理操作日志记录 - * - * @return - */ - private IcEventOperationLogEntity logEntity(String customerId, String icEventId, String userId, Date operateTime, String actionCode, String actionDesc) { - IcEventOperationLogEntity logEntity = new IcEventOperationLogEntity(); - logEntity.setCustomerId(customerId); - logEntity.setIcEventId(icEventId); - logEntity.setUserId(userId); - logEntity.setUserIdentity("staff"); - logEntity.setActionCode(actionCode); - logEntity.setActionDesc(actionDesc); - logEntity.setOperateTime(operateTime); - return logEntity; - } -} diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/EventEntityDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/EventEntityDao.xml deleted file mode 100644 index 722e76a38f..0000000000 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/EventEntityDao.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - \ No newline at end of file