|
|
|
@ -174,13 +174,15 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public EpdcEventsEntity saveEvent(EpdcEventSubmitFormDTO dto) { |
|
|
|
//内容审核
|
|
|
|
Boolean isConReview = dto.getIsConReview(); |
|
|
|
List<String> textList = new ArrayList<>(); |
|
|
|
textList.add(dto.getEventContent()); |
|
|
|
// 获取所有上级机构名称和ID拼接
|
|
|
|
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(SecurityUser.getDeptId()).getData(); |
|
|
|
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList); |
|
|
|
CheckResultDTO imgResult = CheckDataUtils.checkImgs(dto.getImages()); |
|
|
|
if((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass())){ |
|
|
|
if(!isConReview && |
|
|
|
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){ |
|
|
|
//组装要保存的信息
|
|
|
|
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getUserId(), |
|
|
|
dto.getNickName(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.ISSUE_SUBMIT.getCode(), textList, |
|
|
|
@ -202,7 +204,7 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv |
|
|
|
issueOverseeResultsTask.getSysGridLeaderPhone(dto.getGridId()); |
|
|
|
|
|
|
|
//接口异常,保存至待审核信息
|
|
|
|
if(contentResult == null || imgResult == null) { |
|
|
|
if((contentResult == null || imgResult == null) && !isConReview) { |
|
|
|
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getUserId(), |
|
|
|
dto.getNickName(), CheckDataUtils.cate_two, null,ModuleName.ISSUE_SUBMIT.getCode(), textList, |
|
|
|
dto.getImages(), entity.getId(),null,null, null,dto.getMobile(),"1",deptDto); |
|
|
|
@ -211,7 +213,12 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv |
|
|
|
|
|
|
|
//保存待审核记录
|
|
|
|
if (contentResult != null && imgResult != null) { |
|
|
|
CheckResultMessageDTO twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult); |
|
|
|
CheckResultMessageDTO twoTypes = null; |
|
|
|
if(isConReview){ |
|
|
|
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult); |
|
|
|
}else{ |
|
|
|
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult); |
|
|
|
} |
|
|
|
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) { |
|
|
|
//组装要保存的信息
|
|
|
|
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getUserId(), |
|
|
|
@ -221,6 +228,7 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv |
|
|
|
} |
|
|
|
} |
|
|
|
return entity; |
|
|
|
// return new Result<EpdcEventsEntity>().ok(entity);
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
|