|
|
@ -1,5 +1,6 @@ |
|
|
package com.epmet.service.impl; |
|
|
package com.epmet.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.tools.constant.*; |
|
|
import com.epmet.commons.tools.constant.*; |
|
|
@ -19,6 +20,7 @@ import com.epmet.commons.tools.scan.param.ImgTaskDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextScanParamDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextScanParamDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextTaskDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextTaskDTO; |
|
|
import com.epmet.commons.tools.scan.result.SyncScanResult; |
|
|
import com.epmet.commons.tools.scan.result.SyncScanResult; |
|
|
|
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
import com.epmet.commons.tools.utils.*; |
|
|
import com.epmet.commons.tools.utils.*; |
|
|
import com.epmet.constant.*; |
|
|
import com.epmet.constant.*; |
|
|
import com.epmet.dao.IcEventDao; |
|
|
import com.epmet.dao.IcEventDao; |
|
|
@ -29,6 +31,7 @@ import com.epmet.dto.form.demand.IcEventCommentToDemandFromDTO; |
|
|
import com.epmet.dto.result.*; |
|
|
import com.epmet.dto.result.*; |
|
|
import com.epmet.entity.*; |
|
|
import com.epmet.entity.*; |
|
|
import com.epmet.enums.EcEventProcessStatusEnum; |
|
|
import com.epmet.enums.EcEventProcessStatusEnum; |
|
|
|
|
|
import com.epmet.enums.ProjectOriginEnum; |
|
|
import com.epmet.feign.*; |
|
|
import com.epmet.feign.*; |
|
|
import com.epmet.resi.group.constant.TopicConstant; |
|
|
import com.epmet.resi.group.constant.TopicConstant; |
|
|
import com.epmet.service.*; |
|
|
import com.epmet.service.*; |
|
|
@ -94,6 +97,8 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
private EpmetMessageOpenFeignClient messageOpenFeignClient; |
|
|
private EpmetMessageOpenFeignClient messageOpenFeignClient; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private ProjectSatisfactionDetailService projectSatisfactionDetailService; |
|
|
private ProjectSatisfactionDetailService projectSatisfactionDetailService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private LoginUserUtil loginUserUtil; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public CustomerStaffInfoCacheResult getStaffInfo(String customerId,String staffId){ |
|
|
public CustomerStaffInfoCacheResult getStaffInfo(String customerId,String staffId){ |
|
|
@ -407,8 +412,27 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public void delete(String[] ids) { |
|
|
public void delete(String[] ids) { |
|
|
// 逻辑删除(@TableLogic 注解)
|
|
|
//已立项、已转服务的事件删除时,同时删除关联的服务和项目
|
|
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|
|
for (String id : ids) { |
|
|
|
|
|
IcEventEntity entity = baseDao.selectById(id); |
|
|
|
|
|
if (null == entity){ |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"数据不存在","数据不存在"); |
|
|
|
|
|
} |
|
|
|
|
|
//1:已转项目 2:已转需求
|
|
|
|
|
|
if (NumConstant.ONE_STR.equals(entity.getOperationType())){ |
|
|
|
|
|
ProjectService projectService = SpringContextUtils.getBean(ProjectService.class); |
|
|
|
|
|
Integer effectRow = projectService.deleteByOriginId(entity.getId(), ProjectOriginEnum.IC_EVENT.getCode()); |
|
|
|
|
|
log.info("delete project effectRow:{},eventId:{}", effectRow, id); |
|
|
|
|
|
} else if (NumConstant.TWO_STR.equals(entity.getOperationType())){ |
|
|
|
|
|
Result<Integer> effectRow = epmetHeartOpenFeignClient.deleteUserDemandByOriginId(entity.getId(), ProjectOriginEnum.IC_EVENT.getCode()); |
|
|
|
|
|
log.info("delete userDemand result:{},eventId:{}", effectRow, id); |
|
|
|
|
|
} |
|
|
|
|
|
LambdaUpdateWrapper<IcEventEntity> wrapper = new LambdaUpdateWrapper(); |
|
|
|
|
|
wrapper.eq(IcEventEntity::getId,id).set(IcEventEntity::getUpdatedTime,new Date()) |
|
|
|
|
|
.set(IcEventEntity::getCreatedBy,loginUserUtil.getLoginUserId()) |
|
|
|
|
|
.set(IcEventEntity::getDelFlag,NumConstant.ONE_STR); |
|
|
|
|
|
baseDao.update(null,wrapper); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|