From 2012f212e151d8695cfd24a9b8aa5dbd1f771578 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Sat, 8 Oct 2022 10:20:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E9=87=8D=E6=96=B0=E5=88=A4=E6=96=AD=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=80=BC=EF=BC=8C=E9=98=B2=E6=AD=A2=E7=A9=BA=E6=8C=87?= =?UTF-8?q?=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../item/service/impl/ItemServiceImpl.java | 110 +++++++++--------- 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java index b535ec9ab..7599e8842 100755 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java @@ -17,7 +17,6 @@ package com.elink.esua.epdc.modules.item.service.impl; -import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -76,7 +75,6 @@ import com.elink.esua.epdc.gird.shibei.dto.result.EventProcessHisResultDto; import com.elink.esua.epdc.gird.shibei.dto.result.EventProcessResultDto; import com.elink.esua.epdc.gird.shibei.dto.result.EventRejectDoResultDto; import com.elink.esua.epdc.gird.shibei.dto.result.SendEventResultDto; -import com.elink.esua.epdc.gird.shibei.util.XstreamUtil; import com.elink.esua.epdc.modules.async.IssueOverseeResultsTask; import com.elink.esua.epdc.modules.async.NewsTask; import com.elink.esua.epdc.modules.category.dao.CategoryDao; @@ -977,15 +975,15 @@ public class ItemServiceImpl extends BaseServiceImpl implem // 获取可操作处理和可流转部门 switch (typeKey) { case OrganizationTypeConstant.ORG_TYPE_GRID_PARTY: - resultDTO = this.getHandleCategoryAndCirculationDeptOfGrid(resultDTO, itemDeptDTOS, dto.getDeptId()); + this.getHandleCategoryAndCirculationDeptOfGrid(resultDTO, itemDeptDTOS, dto.getDeptId()); break; case OrganizationTypeConstant.ORG_TYPE_COMMUNITY_PARTY: case OrganizationTypeConstant.ORG_TYPE_STREET_DEPT: case OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT: - resultDTO = this.getHandleCategory(resultDTO); + this.getHandleCategory(resultDTO); break; case OrganizationTypeConstant.ORG_TYPE_STREET_PARTY: - resultDTO = this.getHandleCategoryAndCirculationDeptOfStreet(resultDTO, itemDeptDTOS, dto.getDeptId()); + this.getHandleCategoryAndCirculationDeptOfStreet(resultDTO, itemDeptDTOS, dto.getDeptId()); } return resultDTO; } @@ -1997,7 +1995,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem } this.saveInterfaceLog(dto.getId(), InterfaceLogBusinessTypeEnum.REPORT_ITEM.getValue(), ApiConstants.newSendInputInfo, successFlag, sendInputInfoFormDto.toString(), - gridDto == null ? "" : gridDto.toString()); + gridDto.toString()); return gridDto; } @@ -2023,7 +2021,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem } this.saveInterfaceLog(dto.getId(), InterfaceLogBusinessTypeEnum.REPORT_ITEM.getValue(), ApiConstants.sendEventUrl, successFlag, sendEventFormDto.toString(), - sendResult == null ? "" : sendResult.toString()); + sendResult.toString()); log.info("处理项目-上报网格化平台-存储日志结束"); return sendResult; } @@ -2089,7 +2087,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem // 操作时间 formDto.setInsertTime(new Date()); // 操作人 - formDto.setInsertUser(user.getRealName());// + formDto.setInsertUser(user.getRealName()); // 外系统编号 formDto.setHotLinesn(itemEntity.getId()); // 先查询网格对应街道id @@ -2490,33 +2488,33 @@ public class ItemServiceImpl extends BaseServiceImpl implem return imageFile; } - //压缩图片并上传到服务器,得到新的地址 - private List getUploadDTOListNew(List imageList) { - List imgUrlList = new ArrayList<>(); - List notNeedCompressImgUrlList = new ArrayList<>(); - List needCompressImgUrlList = new ArrayList<>(); - for (String image : imageList) { - long imgLength = CompressImgUtils.getFileLength(image); - if (imgLength > 1024 * 1024) { - needCompressImgUrlList.add(image); - } else { - notNeedCompressImgUrlList.add(image); - } - } - if (null != needCompressImgUrlList && needCompressImgUrlList.size() > 0) { - //如果图片大于1M则需要压缩 - Result> result = ossFeignClient.compressImg(needCompressImgUrlList); - if (!result.success()) { - throw new RenException("图片压缩异常" + result.getMsg()); - } - if (null == result.getData() || result.getData().size() == 0) { - throw new RenException("图片压缩失败" + result.getMsg()); - } - imgUrlList.addAll(result.getData()); - } - imgUrlList.addAll(notNeedCompressImgUrlList); - return imgUrlList; - } +// //压缩图片并上传到服务器,得到新的地址 +// private List getUploadDTOListNew(List imageList) { +// List imgUrlList = new ArrayList<>(); +// List notNeedCompressImgUrlList = new ArrayList<>(); +// List needCompressImgUrlList = new ArrayList<>(); +// for (String image : imageList) { +// long imgLength = CompressImgUtils.getFileLength(image); +// if (imgLength > 1024 * 1024) { +// needCompressImgUrlList.add(image); +// } else { +// notNeedCompressImgUrlList.add(image); +// } +// } +// if (null != needCompressImgUrlList && needCompressImgUrlList.size() > 0) { +// //如果图片大于1M则需要压缩 +// Result> result = ossFeignClient.compressImg(needCompressImgUrlList); +// if (!result.success()) { +// throw new RenException("图片压缩异常" + result.getMsg()); +// } +// if (null == result.getData() || result.getData().size() == 0) { +// throw new RenException("图片压缩失败" + result.getMsg()); +// } +// imgUrlList.addAll(result.getData()); +// } +// imgUrlList.addAll(notNeedCompressImgUrlList); +// return imgUrlList; +// } //压缩图片并上传到服务器,得到新的地址 private List getUploadDTOList(List imageList) { @@ -2644,24 +2642,24 @@ public class ItemServiceImpl extends BaseServiceImpl implem return new Result(); } - /** - * 删除历史网格化平台处理记录 - * - * @return void - * @params [id] - * @author liuchuang - * @since 2019/12/25 19:08 - */ - private void removeOldHandleProcess(String itemGridPlatformId) { - // 获取历史处理记录 - List oldLogs = gridPlatformHandleLogService.listOfHandleProcessLogByItemGridPlatFormId(itemGridPlatformId); - // 删除项目处理进度表历史记录 - if (!CollUtil.isEmpty(oldLogs)) { - baseDao.deleteBatchItemHandleIds(oldLogs); - } - // 删除网格化平台处理记录表记录 - gridPlatformHandleLogService.removeHandleProcessByItemGridPlatFormId(itemGridPlatformId); - } +// /** +// * 删除历史网格化平台处理记录 +// * +// * @return void +// * @params [id] +// * @author liuchuang +// * @since 2019/12/25 19:08 +// */ +// private void removeOldHandleProcess(String itemGridPlatformId) { +// // 获取历史处理记录 +// List oldLogs = gridPlatformHandleLogService.listOfHandleProcessLogByItemGridPlatFormId(itemGridPlatformId); +// // 删除项目处理进度表历史记录 +// if (!CollUtil.isEmpty(oldLogs)) { +// baseDao.deleteBatchItemHandleIds(oldLogs); +// } +// // 删除网格化平台处理记录表记录 +// gridPlatformHandleLogService.removeHandleProcessByItemGridPlatFormId(itemGridPlatformId); +// } /** * 保存新的网格化平台处理记录 @@ -3558,7 +3556,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem ItemGridPlatformEntity gridEntity = this.getReport(dto.getId()); if (null != gridEntity) { //驳回重办 - EventRejectDoResultDto reDoResult = null; + EventRejectDoResultDto reDoResult = new EventRejectDoResultDto(); try { reDoResult = this.eventsRejectDo(dto, gridEntity.getTaskid()); } catch (Exception e) { @@ -3572,7 +3570,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem this.saveItemRejectReDoInfo(gridEntity, process); } else { //事件第一次上报 - SendEventResultDto sendResult = null; + SendEventResultDto sendResult = new SendEventResultDto(); try { sendResult = this.reportCaseNew(dto); } catch (Exception e) { @@ -3603,7 +3601,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem } this.saveInterfaceLog(dto.getId(), InterfaceLogBusinessTypeEnum.REJECT_RE_DO.getValue(), ApiConstants.sendEventUrl, successFlag, rejectReDoDTO.toString(), - sendResult == null ? "" : sendResult.toString()); + sendResult.toString()); log.info("处理项目-进入上报驳回重办-存储日志结束"); return sendResult; }