|
|
|
@ -3781,7 +3781,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
} |
|
|
|
itemHandleProcessDto.setHandleAdvice(formDto.getHandleAdvice()); |
|
|
|
itemHandleProcessDto.setHandlerDept("网格化平台"); |
|
|
|
itemHandleProcessDto.setCreatedTime(new Date()); |
|
|
|
itemHandleProcessDto.setCreatedTime(null == formDto.getCreatedTime() ? new Date() : formDto.getCreatedTime()); |
|
|
|
itemHandleProcessDto.setUpdatedTime(new Date()); |
|
|
|
itemHandleProcessService.saveItemHandleProcess(itemHandleProcessDto); |
|
|
|
try { |
|
|
|
@ -4074,15 +4074,15 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
public void ItemClosed(String itemId) { |
|
|
|
//1.获取项目基础数据
|
|
|
|
ItemEntity entity = baseDao.selectById(itemId); |
|
|
|
if(null == entity){ |
|
|
|
throw new RenException("获取项目数据失败,项目Id->"+itemId); |
|
|
|
if (null == entity) { |
|
|
|
throw new RenException("获取项目数据失败,项目Id->" + itemId); |
|
|
|
} |
|
|
|
//2.判断是否已结案(第二次可以评价了,没超过24小时用户评价了,此时就是已结案了)
|
|
|
|
if("10".equals(entity.getItemState())){ |
|
|
|
if ("10".equals(entity.getItemState())) { |
|
|
|
return; |
|
|
|
} |
|
|
|
//3.判断评价结果,未评价的赋值为满意并且结案给网格化平台推送结果;已评价的结果为满意直接结案给网格化推结果,不满意直接给网格化推结果
|
|
|
|
if(null == entity.getEvaluationScore() || 0 != entity.getEvaluationScore()){ |
|
|
|
if (null == entity.getEvaluationScore() || 0 != entity.getEvaluationScore()) { |
|
|
|
//3-1.未评价的或评价结果不是不满意的则需要结案
|
|
|
|
QueryWrapper<ItemGridPlatformEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.eq("reference_id", itemId); |
|
|
|
@ -4090,8 +4090,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
wrapper.orderByDesc(FieldConstant.CREATED_TIME); |
|
|
|
wrapper.last("limit 1"); |
|
|
|
ItemGridPlatformEntity formEntity = itemGridPlatformDao.selectOne(wrapper); |
|
|
|
if(null == formEntity){ |
|
|
|
throw new RenException("获取项目与网格化平台关系数据失败,项目Id->"+itemId); |
|
|
|
if (null == formEntity) { |
|
|
|
throw new RenException("获取项目与网格化平台关系数据失败,项目Id->" + itemId); |
|
|
|
} |
|
|
|
QueryWrapper<ItemHandleProcessEntity> hWrapper = new QueryWrapper<>(); |
|
|
|
hWrapper.eq("item_id", itemId); |
|
|
|
@ -4100,15 +4100,15 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
hWrapper.orderByDesc(FieldConstant.CREATED_TIME); |
|
|
|
hWrapper.last("limit 1"); |
|
|
|
ItemHandleProcessEntity hEntity = itemHandleProcessDao.selectOne(hWrapper); |
|
|
|
if(null == hEntity){ |
|
|
|
throw new RenException("获取项目流程节点数据失败,项目Id->"+itemId); |
|
|
|
if (null == hEntity) { |
|
|
|
throw new RenException("获取项目流程节点数据失败,项目Id->" + itemId); |
|
|
|
} |
|
|
|
QueryWrapper<ImgEntity> iWrapper = new QueryWrapper<>(); |
|
|
|
iWrapper.eq("reference_id", hEntity.getId()); |
|
|
|
iWrapper.eq("del_flag", "0"); |
|
|
|
List<ImgEntity> iEntityList = imgDao.selectList(iWrapper); |
|
|
|
if(CollUtil.isEmpty(iEntityList)){ |
|
|
|
throw new RenException("获取项目流程节点对应的图片数据失败,节点Id->"+hEntity.getId()); |
|
|
|
if (CollUtil.isEmpty(iEntityList)) { |
|
|
|
throw new RenException("获取项目流程节点对应的图片数据失败,节点Id->" + hEntity.getId()); |
|
|
|
} |
|
|
|
List<String> imgUrlList = iEntityList.stream().map(ImgEntity::getImgUrl).collect(Collectors.toList()); |
|
|
|
AcceptPlantformProcessDTO dto = new AcceptPlantformProcessDTO(); |
|
|
|
@ -4124,10 +4124,10 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
dto.setCreatedTime(hEntity.getCreatedTime()); |
|
|
|
Result result = pushItemProcess(dto); |
|
|
|
if (!result.success()) { |
|
|
|
throw new RenException("结案操作失败,项目id->"+itemId); |
|
|
|
throw new RenException("结案操作失败,项目id->" + itemId); |
|
|
|
} |
|
|
|
//3-2.未评价的赋值默认评价结果为满意
|
|
|
|
if(null == entity.getEvaluationScore()){ |
|
|
|
if (null == entity.getEvaluationScore()) { |
|
|
|
entity.setEvaluationScore(2); |
|
|
|
//entity.setEvaluationContent();
|
|
|
|
entity.setEvaluationTime(hEntity.getCreatedTime()); |
|
|
|
|