|
|
@ -21,12 +21,7 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO; |
|
|
|
import com.epmet.commons.tools.scan.param.TextTaskDTO; |
|
|
|
import com.epmet.commons.tools.scan.result.SyncScanResult; |
|
|
|
import com.epmet.commons.tools.utils.*; |
|
|
|
import com.epmet.constant.ProjectConstant; |
|
|
|
import com.epmet.constant.EventConstant; |
|
|
|
import com.epmet.constant.ReadFlagConstant; |
|
|
|
import com.epmet.constant.UserMessageConstant; |
|
|
|
import com.epmet.constant.ResiEventAction; |
|
|
|
import com.epmet.constant.UserMessageTypeConstant; |
|
|
|
import com.epmet.constant.*; |
|
|
|
import com.epmet.dao.IcEventDao; |
|
|
|
import com.epmet.dto.*; |
|
|
|
import com.epmet.dto.form.*; |
|
|
@ -744,12 +739,11 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
//5.新增操作记录数据
|
|
|
|
Date date = new Date(); |
|
|
|
List<IcEventOperationLogEntity> logList = new ArrayList<>(); |
|
|
|
logList.add(logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), date, ResiEventAction.REPLY.getCode(), ResiEventAction.REPLY.getDesc())); |
|
|
|
logList.add(logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), date, ResiEventAction.REPLY.getCode(), ResiEventAction.REPLY.getCode())); |
|
|
|
//回复时选择了已完成
|
|
|
|
if (StringUtils.isNotBlank(formDTO.getOperationType()) && ResiEventAction.CLOSE_CASE.getCode().equals(formDTO.getStatus())) { |
|
|
|
date.setTime(date.getTime() + 6000 * 1); |
|
|
|
logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, ResiEventAction.CLOSE_CASE.getCode(), ResiEventAction.CLOSE_CASE.getDesc())); |
|
|
|
logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "close_case", "close_case")); |
|
|
|
logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, ResiEventAction.CLOSE_CASE.getCode(), ResiEventAction.CLOSE_CASE.getCode())); |
|
|
|
|
|
|
|
UserMessageFormDTO close = ConvertUtils.sourceToTarget(messageFormDTO, UserMessageFormDTO.class); |
|
|
|
close.setMessageContent(String.format("您上报的事件已完成,请查看。")); |
|
|
@ -785,11 +779,39 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
entity.setLatestOperatedTime(new Date()); |
|
|
|
baseDao.updateById(entity); |
|
|
|
|
|
|
|
//4.新增操作记录
|
|
|
|
//4.判断新增或修改分类数据
|
|
|
|
if (!CollectionUtils.isEmpty(formDTO.getCategoryList())) { |
|
|
|
String categoryId = formDTO.getCategoryList().get(NumConstant.ZERO).getId(); |
|
|
|
//查询分类信息
|
|
|
|
List<String> categoryList = new ArrayList<>(); |
|
|
|
categoryList.add(categoryId); |
|
|
|
CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); |
|
|
|
IcEventCategoryEntity categoryEntity = null; |
|
|
|
for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ |
|
|
|
if (ca.getId().equals(categoryId)) { |
|
|
|
categoryEntity = new IcEventCategoryEntity(); |
|
|
|
categoryEntity.setCustomerId(formDTO.getCustomerId()); |
|
|
|
categoryEntity.setIcEventId(entity.getId()); |
|
|
|
categoryEntity.setCategoryId(ca.getId()); |
|
|
|
categoryEntity.setCategoryPids(ca.getPids()); |
|
|
|
categoryEntity.setCategoryCode(ca.getCategoryCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
IcEventCategoryEntity icEventCategory = icEventCategoryService.getByEventId(formDTO.getIcEventId()); |
|
|
|
if (null == icEventCategory || StringUtils.isEmpty(icEventCategory.getId())) { |
|
|
|
icEventCategoryService.insert(categoryEntity); |
|
|
|
} else { |
|
|
|
categoryEntity.setId(icEventCategory.getId()); |
|
|
|
icEventCategoryService.updateById(categoryEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//5.新增操作记录
|
|
|
|
IcEventOperationLogEntity logEntity = logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), new Date(), "shift_project", "shift_project"); |
|
|
|
icEventOperationLogService.insert(logEntity); |
|
|
|
|
|
|
|
//5.判断来源居民端的事件,转了项目给居民推送站内信
|
|
|
|
//6.判断来源居民端的事件,转了项目给居民推送站内信
|
|
|
|
if ("0".equals(entity.getSourceType())) { |
|
|
|
//通知
|
|
|
|
List<UserMessageFormDTO> msgList = new ArrayList<>(); |
|
|
@ -842,11 +864,38 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
|
entity.setLatestOperatedTime(new Date()); |
|
|
|
baseDao.updateById(entity); |
|
|
|
|
|
|
|
//4.新增操作记录
|
|
|
|
//4.判断新增或修改分类数据
|
|
|
|
if (StringUtils.isNotBlank(formDTO.getCategoryId())) { |
|
|
|
//查询分类信息
|
|
|
|
List<String> categoryList = new ArrayList<>(); |
|
|
|
categoryList.add(formDTO.getCategoryId()); |
|
|
|
CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); |
|
|
|
IcEventCategoryEntity categoryEntity = null; |
|
|
|
for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ |
|
|
|
if (ca.getId().equals(formDTO.getCategoryId())) { |
|
|
|
categoryEntity = new IcEventCategoryEntity(); |
|
|
|
categoryEntity.setCustomerId(formDTO.getCustomerId()); |
|
|
|
categoryEntity.setIcEventId(entity.getId()); |
|
|
|
categoryEntity.setCategoryId(ca.getId()); |
|
|
|
categoryEntity.setCategoryPids(ca.getPids()); |
|
|
|
categoryEntity.setCategoryCode(ca.getCategoryCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
IcEventCategoryEntity icEventCategory = icEventCategoryService.getByEventId(formDTO.getIcEventId()); |
|
|
|
if (null == icEventCategory || StringUtils.isEmpty(icEventCategory.getId())) { |
|
|
|
icEventCategoryService.insert(categoryEntity); |
|
|
|
} else { |
|
|
|
categoryEntity.setId(icEventCategory.getId()); |
|
|
|
icEventCategoryService.updateById(categoryEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//5.新增操作记录
|
|
|
|
IcEventOperationLogEntity logEntity = logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getDemandUserId(), new Date(), "shift_demand", "shift_demand"); |
|
|
|
icEventOperationLogService.insert(logEntity); |
|
|
|
|
|
|
|
//5.判断来源居民端的事件,转了项目给居民推送站内信
|
|
|
|
//6.判断来源居民端的事件,转了项目给居民推送站内信
|
|
|
|
if ("0".equals(entity.getSourceType())) { |
|
|
|
//通知
|
|
|
|
List<UserMessageFormDTO> msgList = new ArrayList<>(); |
|
|
|