Browse Source

项目进度接口调整

dev
李鹏飞 6 years ago
parent
commit
7d5c300ec9
  1. 9
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java
  2. 20
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java

9
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java

@ -177,12 +177,17 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
@Override
@Transactional(rollbackFor = Exception.class)
public Result eventReview(EpdcEventsReviewFormDTO dto) {
if(EventIssueItemState.EVENT_REVIEW_PASS == dto.getEventState()
&& (dto.getCategoryId() == null
|| "".equals(dto.getCategoryId()))) {
return new Result().error("分类信息不能为空");
}
EpdcEventsEntity entity = new EpdcEventsEntity();
entity.setId(dto.getId());
entity.setEventState(dto.getEventState());
// entity.setCategoryCode(dto.getCategoryId());
//初始化分类
if(dto.getCategoryId() != null && "".equals(dto.getCategoryId())){
if(dto.getCategoryId() != null && !"".equals(dto.getCategoryId())){
CategoryDTO cateDto =categoryService.get(Long.parseLong(dto.getCategoryId()));
entity.setCategoryCode(cateDto.getCategoryCode());
//获取所有父类分类标签
@ -208,8 +213,6 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
entity.setFirstCategoryCode(cateDto.getCategoryCode());
entity.setCategoryFullName(cateDto.getCategoryName());
}
} else {
return new Result().error("分类信息不能为空");
}
entity.setAdvice(dto.getAdvice());

20
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java

@ -60,6 +60,7 @@ import com.elink.esua.epdc.modules.item.entity.ItemHandleProcessEntity;
import com.elink.esua.epdc.modules.item.entity.ItemInformationEntity;
import com.elink.esua.epdc.modules.item.service.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -578,6 +579,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
itemEntity.setLastHandleTime(new Date());
baseDao.updateById(itemEntity);
//业务部门消息处理
ItemInformationEntity itemInfoDto = new ItemInformationEntity();
// 消息类型
@ -611,10 +613,12 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
itemInfoDto.setDeptId(entity.getGridId().toString());
itemInformationService.insert(itemInfoDto);
//修改通知部门Id(街道Id)
ItemInformationEntity itemInfoStreetDto = new ItemInformationEntity();
BeanUtils.copyProperties(itemInfoDto,itemInfoStreetDto);
Result<CompleteDeptDTO> result =adminFeignClient.getCompleteDept(entity.getGridId());
CompleteDeptDTO comDeptDto = result.getData();
itemInfoDto.setDeptId(comDeptDto.getStreetId().toString());
itemInformationService.insert(itemInfoDto);
itemInfoStreetDto.setDeptId(comDeptDto.getStreetId().toString());
itemInformationService.insert(itemInfoStreetDto);
}
// 吹哨处理
}else if (ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue() == dto.getHandleCategory()) {
@ -633,8 +637,10 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
// 遍历被吹哨部门插入项目消息表
for (ItemCirculationDeptResultDTO itemDto : deptList) {
// 通知部门Id(被吹哨部门)
itemInfoDto.setDeptId(itemDto.getDeptId().toString());
itemInformationService.insert(itemInfoDto);
ItemInformationEntity itemInfoEachDto = new ItemInformationEntity();
BeanUtils.copyProperties(itemInfoDto,itemInfoEachDto);
itemInfoEachDto.setDeptId(itemDto.getDeptId().toString());
itemInformationService.insert(itemInfoEachDto);
}
// 关闭和结案处理
} else {
@ -643,8 +649,10 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
// 遍历被吹哨部门插入项目消息表
for (Long itemDeptId : oldDeptIds) {
// 通知部门Id(被吹哨部门)
itemInfoDto.setDeptId(itemDeptId.toString());
itemInformationService.insert(itemInfoDto);
ItemInformationEntity itemInfoEachDto = new ItemInformationEntity();
BeanUtils.copyProperties(itemInfoDto,itemInfoEachDto);
itemInfoEachDto.setDeptId(itemDeptId.toString());
itemInformationService.insert(itemInfoEachDto);
}
}

Loading…
Cancel
Save