Browse Source

Merge remote-tracking branch 'origin/dev_zhili' into dev_zhili

dev
jianjun 3 years ago
parent
commit
a95f4aca9e
  1. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java
  2. 43
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java
  3. 17
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java
  4. 5
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java
  5. 10
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java
  6. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java
  7. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java
  8. 5
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java
  9. 70
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java
  10. 15
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml

4
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java

@ -20,9 +20,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.dto.form.PointRecordFormDTO; import com.epmet.dto.form.PointRecordFormDTO;
import com.epmet.dto.form.demand.IcResiUserDemandFromDTO; import com.epmet.dto.form.demand.*;
import com.epmet.dto.form.demand.PageListAnalysisFormDTO;
import com.epmet.dto.form.demand.UserDemandPageFormDTO;
import com.epmet.dto.result.PointRecordDTO; import com.epmet.dto.result.PointRecordDTO;
import com.epmet.dto.result.ServicePointDTO; import com.epmet.dto.result.ServicePointDTO;
import com.epmet.dto.result.demand.*; import com.epmet.dto.result.demand.*;

43
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java

@ -0,0 +1,43 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 事件管理_回复
* @Author sun
*/
@Data
public class IcEventReplyFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 事件ID
*/
@NotBlank(message = "事件ID不能为空", groups = {UpdateGroup.class})
private String icEventId;
/**
* 二类分类Id
*/
private String categoryId;
/**
* 回复内容
*/
private String content;
/**
* 处理方式[0:已回复 1:已转项目 1:已转需求]
*/
private String operationType;
/**
* 处理中processing已办结closed_case
*/
private String status;
private String customerId;
private String userId;
}

17
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java

@ -13,10 +13,7 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcEventDTO; import com.epmet.dto.IcEventDTO;
import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; import com.epmet.dto.form.*;
import com.epmet.dto.form.IcEventAddEditFormDTO;
import com.epmet.dto.form.IcEventListFormDTO;
import com.epmet.dto.form.ProcessAnalysisEventListFormDTO;
import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.dto.result.IcEventListResultDTO;
import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO;
import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.IcEventResultDTO;
@ -143,6 +140,18 @@ public class IcEventController {
return new Result<List<IcEventMonthlyIncrementResultDTO>>().ok(page); return new Result<List<IcEventMonthlyIncrementResultDTO>>().ok(page);
} }
/**
* @Author sun
* @Description 事件管理-回复
**/
@PostMapping("reply")
public Result reply(@LoginUser TokenDto tokenDto, @RequestBody IcEventReplyFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, UpdateGroup.class, DefaultGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
icEventService.reply(formDTO);
return new Result();
}

5
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java

@ -3,6 +3,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcEventCategoryEntity; import com.epmet.entity.IcEventCategoryEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* 事件所属分类表 * 事件所属分类表
@ -12,5 +13,7 @@ import org.apache.ibatis.annotations.Mapper;
*/ */
@Mapper @Mapper
public interface IcEventCategoryDao extends BaseDao<IcEventCategoryEntity> { public interface IcEventCategoryDao extends BaseDao<IcEventCategoryEntity> {
IcEventCategoryEntity selectByEventId(@Param("icEventId") String icEventId);
} }

10
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java

@ -153,11 +153,11 @@ public class IcEventEntity extends BaseEpmetEntity {
/** /**
* 事件审核状态[涉及附件审核需要加的状态]审核中auditing * 事件审核状态[涉及附件审核需要加的状态]审核中auditing
auto_passed: 自动通过 auto_passed: 自动通过
review结果不确定需要人工审核 review结果不确定需要人工审核
block: 结果违规 block: 结果违规
rejected人工审核驳回; rejected人工审核驳回;
approved人工审核通过 approved人工审核通过
*/ */
private String auditStatus; private String auditStatus;

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java

@ -75,4 +75,6 @@ public interface IcEventCategoryService extends BaseService<IcEventCategoryEntit
* @date 2022-05-17 * @date 2022-05-17
*/ */
void delete(String[] ids); void delete(String[] ids);
IcEventCategoryEntity getByEventId(String icEventId);
} }

7
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java

@ -5,6 +5,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcEventDTO; import com.epmet.dto.IcEventDTO;
import com.epmet.dto.form.IcEventAddEditFormDTO; import com.epmet.dto.form.IcEventAddEditFormDTO;
import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.form.IcEventListFormDTO;
import com.epmet.dto.form.IcEventReplyFormDTO;
import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.dto.result.IcEventListResultDTO;
import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO;
import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.IcEventResultDTO;
@ -99,4 +100,10 @@ public interface IcEventService extends BaseService<IcEventEntity> {
* @return * @return
*/ */
List<IcEventMonthlyIncrementResultDTO> listMonthlyIncrement(String orgType, String orgId, Date queryStartTime, Date queryEndTime); List<IcEventMonthlyIncrementResultDTO> listMonthlyIncrement(String orgType, String orgId, Date queryStartTime, Date queryEndTime);
/**
* @Author sun
* @Description 事件管理-回复
**/
void reply(IcEventReplyFormDTO formDTO);
} }

5
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java

@ -80,4 +80,9 @@ public class IcEventCategoryServiceImpl extends BaseServiceImpl<IcEventCategoryD
baseDao.deleteBatchIds(Arrays.asList(ids)); baseDao.deleteBatchIds(Arrays.asList(ids));
} }
@Override
public IcEventCategoryEntity getByEventId(String icEventId) {
return baseDao.selectByEventId(icEventId);
}
} }

70
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

@ -229,6 +229,9 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
IcEventEntity entity = ConvertUtils.sourceToTarget(formDTO, IcEventEntity.class); IcEventEntity entity = ConvertUtils.sourceToTarget(formDTO, IcEventEntity.class);
entity.setAgencyId(gridInfo.getPid()); entity.setAgencyId(gridInfo.getPid());
entity.setGridPids(gridInfo.getPids()); entity.setGridPids(gridInfo.getPids());
entity.setHappenTime(new Date());
entity.setLatestOperatedTime(new Date());
entity.setAuditStatus(TopicConstant.AUTO_PASSED);
insert(entity); insert(entity);
//3-2.附件数据保存 //3-2.附件数据保存
List<IcEventAttachmentEntity> imageEntityList = new ArrayList<>(); List<IcEventAttachmentEntity> imageEntityList = new ArrayList<>();
@ -511,4 +514,71 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
return resultList; return resultList;
} }
/**
* @Author sun
* @Description 事件管理-回复
**/
@Override
@Transactional(rollbackFor = Exception.class)
public void reply(IcEventReplyFormDTO formDTO) {
//1.查询事件数据 判断是否允许回复
IcEventEntity entity = baseDao.selectById(formDTO.getIcEventId());
if (null == entity || "1".equals(entity.getOperationType()) || "2".equals(entity.getOperationType())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前事件不允许回复");
}
//2.修改事件数据
if (StringUtils.isNotBlank(formDTO.getOperationType()) && "closed_case".equals(formDTO.getStatus())){
entity.setStatus(formDTO.getStatus());
entity.setCloseCaseTime(new Date());
}
entity.setLatestOperatedTime(new Date());
baseDao.updateById(entity);
//3.新增回复数据
//获取当前工作人员缓存信息
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
if (null == staffInfo) {
throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId()));
}
IcEventReplyEntity replyEntity = new IcEventReplyEntity();
replyEntity.setCustomerId(formDTO.getCustomerId());
replyEntity.setIcEventId(formDTO.getIcEventId());
replyEntity.setFromUserId(formDTO.getUserId());
replyEntity.setContent(formDTO.getContent());
replyEntity.setUserShowName(staffInfo.getAgencyName() + "-" + staffInfo.getRealName());
icEventReplyService.insert(replyEntity);
//4.判断新增或修改分类数据
if (StringUtils.isNotBlank(formDTO.getOperationType())) {
//查询分类信息
List<String> categoryList = new ArrayList<>();
categoryList.add(formDTO.getCategoryId());
CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList);
AtomicReference<IcEventCategoryEntity> categoryEntity = null;
category.getCategoryList().forEach(ca -> {
if (ca.getId().equals(formDTO.getCategoryId())) {
categoryEntity.set(new IcEventCategoryEntity());
categoryEntity.get().setCustomerId(formDTO.getCustomerId());
categoryEntity.get().setIcEventId(entity.getId());
categoryEntity.get().setCategoryId(ca.getId());
categoryEntity.get().setCategoryPids(ca.getPids());
categoryEntity.get().setCategoryCode(ca.getCategoryCode());
}
});
IcEventCategoryEntity icEventCategory = icEventCategoryService.getByEventId(formDTO.getIcEventId());
if (null == category) {
icEventCategoryService.insert(categoryEntity.get());
} else {
categoryEntity.get().setId(icEventCategory.getId());
icEventCategoryService.updateById(categoryEntity.get());
}
}
//5.新增操作记录数据
IcEventOperationLogEntity logEntity = logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), new Date(), "reply", "reply");
icEventOperationLogService.insert(logEntity);
}
} }

15
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml

@ -3,6 +3,19 @@
<mapper namespace="com.epmet.dao.IcEventCategoryDao"> <mapper namespace="com.epmet.dao.IcEventCategoryDao">
<select id="selectByEventId" resultType="com.epmet.entity.IcEventCategoryEntity">
SELECT
id,
customer_id,
ic_event_id,
category_id,
category_pids,
category_code
FROM
ic_event_category
WHERE
del_flag = '0'
AND ic_event_id = #{icEventId}
</select>
</mapper> </mapper>
Loading…
Cancel
Save