|
|
@ -229,7 +229,6 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
IcEventEntity entity = ConvertUtils.sourceToTarget(formDTO, IcEventEntity.class); |
|
|
|
entity.setAgencyId(gridInfo.getPid()); |
|
|
|
entity.setGridPids(gridInfo.getPids()); |
|
|
|
entity.setHappenTime(new Date()); |
|
|
|
entity.setLatestOperatedTime(new Date()); |
|
|
|
entity.setAuditStatus(TopicConstant.AUTO_PASSED); |
|
|
|
insert(entity); |
|
|
@ -612,6 +611,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
* @Description 事件管理-转需求 |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void icEventToDemand(IcDemandFormDTO formDTO) { |
|
|
|
//1.查询事件数据
|
|
|
|
IcEventEntity entity = baseDao.selectById(formDTO.getIcEventId()); |
|
|
@ -636,7 +636,6 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 事件分类分析-一级分类下事件数量 |
|
|
|
* |
|
|
@ -664,4 +663,30 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Author sun |
|
|
|
* @Description 事件管理-评价 |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void comment(IcEventReplyFormDTO formDTO) { |
|
|
|
//1.查询事件是否存在
|
|
|
|
IcEventEntity entity = baseDao.selectById(formDTO.getIcEventId()); |
|
|
|
if (null == entity || !"closed_case".equals(entity.getStatus()) || StringUtils.isNotBlank(entity.getSatisfaction())) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "不允许评价,事件不存在或还未办结"); |
|
|
|
} |
|
|
|
|
|
|
|
//2.判断当前评价人是否是事件创建人
|
|
|
|
if (!formDTO.getUserId().equals(entity.getCreatedBy())) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "不允许评价,当前评价人不是事件创建人"); |
|
|
|
} |
|
|
|
|
|
|
|
//3.修改事件数据
|
|
|
|
entity.setCommentUserId(formDTO.getUserId()); |
|
|
|
entity.setSatisfaction(formDTO.getSatisfaction()); |
|
|
|
entity.setCommentTime(new Date()); |
|
|
|
baseDao.updateById(entity); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |