|
|
@ -17,7 +17,6 @@ |
|
|
|
|
|
|
|
|
package com.elink.esua.epdc.modules.item.service.impl; |
|
|
package com.elink.esua.epdc.modules.item.service.impl; |
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
import cn.hutool.core.util.StrUtil; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
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.EventProcessResultDto; |
|
|
import com.elink.esua.epdc.gird.shibei.dto.result.EventRejectDoResultDto; |
|
|
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.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.IssueOverseeResultsTask; |
|
|
import com.elink.esua.epdc.modules.async.NewsTask; |
|
|
import com.elink.esua.epdc.modules.async.NewsTask; |
|
|
import com.elink.esua.epdc.modules.category.dao.CategoryDao; |
|
|
import com.elink.esua.epdc.modules.category.dao.CategoryDao; |
|
|
@ -977,15 +975,15 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
// 获取可操作处理和可流转部门
|
|
|
// 获取可操作处理和可流转部门
|
|
|
switch (typeKey) { |
|
|
switch (typeKey) { |
|
|
case OrganizationTypeConstant.ORG_TYPE_GRID_PARTY: |
|
|
case OrganizationTypeConstant.ORG_TYPE_GRID_PARTY: |
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfGrid(resultDTO, itemDeptDTOS, dto.getDeptId()); |
|
|
this.getHandleCategoryAndCirculationDeptOfGrid(resultDTO, itemDeptDTOS, dto.getDeptId()); |
|
|
break; |
|
|
break; |
|
|
case OrganizationTypeConstant.ORG_TYPE_COMMUNITY_PARTY: |
|
|
case OrganizationTypeConstant.ORG_TYPE_COMMUNITY_PARTY: |
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_DEPT: |
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_DEPT: |
|
|
case OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT: |
|
|
case OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT: |
|
|
resultDTO = this.getHandleCategory(resultDTO); |
|
|
this.getHandleCategory(resultDTO); |
|
|
break; |
|
|
break; |
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_PARTY: |
|
|
case OrganizationTypeConstant.ORG_TYPE_STREET_PARTY: |
|
|
resultDTO = this.getHandleCategoryAndCirculationDeptOfStreet(resultDTO, itemDeptDTOS, dto.getDeptId()); |
|
|
this.getHandleCategoryAndCirculationDeptOfStreet(resultDTO, itemDeptDTOS, dto.getDeptId()); |
|
|
} |
|
|
} |
|
|
return resultDTO; |
|
|
return resultDTO; |
|
|
} |
|
|
} |
|
|
@ -1997,7 +1995,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
} |
|
|
} |
|
|
this.saveInterfaceLog(dto.getId(), InterfaceLogBusinessTypeEnum.REPORT_ITEM.getValue(), |
|
|
this.saveInterfaceLog(dto.getId(), InterfaceLogBusinessTypeEnum.REPORT_ITEM.getValue(), |
|
|
ApiConstants.newSendInputInfo, successFlag, sendInputInfoFormDto.toString(), |
|
|
ApiConstants.newSendInputInfo, successFlag, sendInputInfoFormDto.toString(), |
|
|
gridDto == null ? "" : gridDto.toString()); |
|
|
gridDto.toString()); |
|
|
return gridDto; |
|
|
return gridDto; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -2023,7 +2021,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
} |
|
|
} |
|
|
this.saveInterfaceLog(dto.getId(), InterfaceLogBusinessTypeEnum.REPORT_ITEM.getValue(), |
|
|
this.saveInterfaceLog(dto.getId(), InterfaceLogBusinessTypeEnum.REPORT_ITEM.getValue(), |
|
|
ApiConstants.sendEventUrl, successFlag, sendEventFormDto.toString(), |
|
|
ApiConstants.sendEventUrl, successFlag, sendEventFormDto.toString(), |
|
|
sendResult == null ? "" : sendResult.toString()); |
|
|
sendResult.toString()); |
|
|
log.info("处理项目-上报网格化平台-存储日志结束"); |
|
|
log.info("处理项目-上报网格化平台-存储日志结束"); |
|
|
return sendResult; |
|
|
return sendResult; |
|
|
} |
|
|
} |
|
|
@ -2089,7 +2087,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
// 操作时间
|
|
|
// 操作时间
|
|
|
formDto.setInsertTime(new Date()); |
|
|
formDto.setInsertTime(new Date()); |
|
|
// 操作人
|
|
|
// 操作人
|
|
|
formDto.setInsertUser(user.getRealName());//
|
|
|
formDto.setInsertUser(user.getRealName()); |
|
|
// 外系统编号
|
|
|
// 外系统编号
|
|
|
formDto.setHotLinesn(itemEntity.getId()); |
|
|
formDto.setHotLinesn(itemEntity.getId()); |
|
|
// 先查询网格对应街道id
|
|
|
// 先查询网格对应街道id
|
|
|
@ -2490,33 +2488,33 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
return imageFile; |
|
|
return imageFile; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//压缩图片并上传到服务器,得到新的地址
|
|
|
// //压缩图片并上传到服务器,得到新的地址
|
|
|
private List<String> getUploadDTOListNew(List<String> imageList) { |
|
|
// private List<String> getUploadDTOListNew(List<String> imageList) {
|
|
|
List<String> imgUrlList = new ArrayList<>(); |
|
|
// List<String> imgUrlList = new ArrayList<>();
|
|
|
List<String> notNeedCompressImgUrlList = new ArrayList<>(); |
|
|
// List<String> notNeedCompressImgUrlList = new ArrayList<>();
|
|
|
List<String> needCompressImgUrlList = new ArrayList<>(); |
|
|
// List<String> needCompressImgUrlList = new ArrayList<>();
|
|
|
for (String image : imageList) { |
|
|
// for (String image : imageList) {
|
|
|
long imgLength = CompressImgUtils.getFileLength(image); |
|
|
// long imgLength = CompressImgUtils.getFileLength(image);
|
|
|
if (imgLength > 1024 * 1024) { |
|
|
// if (imgLength > 1024 * 1024) {
|
|
|
needCompressImgUrlList.add(image); |
|
|
// needCompressImgUrlList.add(image);
|
|
|
} else { |
|
|
// } else {
|
|
|
notNeedCompressImgUrlList.add(image); |
|
|
// notNeedCompressImgUrlList.add(image);
|
|
|
} |
|
|
// }
|
|
|
} |
|
|
// }
|
|
|
if (null != needCompressImgUrlList && needCompressImgUrlList.size() > 0) { |
|
|
// if (null != needCompressImgUrlList && needCompressImgUrlList.size() > 0) {
|
|
|
//如果图片大于1M则需要压缩
|
|
|
// //如果图片大于1M则需要压缩
|
|
|
Result<List<String>> result = ossFeignClient.compressImg(needCompressImgUrlList); |
|
|
// Result<List<String>> result = ossFeignClient.compressImg(needCompressImgUrlList);
|
|
|
if (!result.success()) { |
|
|
// if (!result.success()) {
|
|
|
throw new RenException("图片压缩异常" + result.getMsg()); |
|
|
// throw new RenException("图片压缩异常" + result.getMsg());
|
|
|
} |
|
|
// }
|
|
|
if (null == result.getData() || result.getData().size() == 0) { |
|
|
// if (null == result.getData() || result.getData().size() == 0) {
|
|
|
throw new RenException("图片压缩失败" + result.getMsg()); |
|
|
// throw new RenException("图片压缩失败" + result.getMsg());
|
|
|
} |
|
|
// }
|
|
|
imgUrlList.addAll(result.getData()); |
|
|
// imgUrlList.addAll(result.getData());
|
|
|
} |
|
|
// }
|
|
|
imgUrlList.addAll(notNeedCompressImgUrlList); |
|
|
// imgUrlList.addAll(notNeedCompressImgUrlList);
|
|
|
return imgUrlList; |
|
|
// return imgUrlList;
|
|
|
} |
|
|
// }
|
|
|
|
|
|
|
|
|
//压缩图片并上传到服务器,得到新的地址
|
|
|
//压缩图片并上传到服务器,得到新的地址
|
|
|
private List<String> getUploadDTOList(List<ImgEntity> imageList) { |
|
|
private List<String> getUploadDTOList(List<ImgEntity> imageList) { |
|
|
@ -2644,24 +2642,24 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
return new Result(); |
|
|
return new Result(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
// /**
|
|
|
* 删除历史网格化平台处理记录 |
|
|
// * 删除历史网格化平台处理记录
|
|
|
* |
|
|
// *
|
|
|
* @return void |
|
|
// * @return void
|
|
|
* @params [id] |
|
|
// * @params [id]
|
|
|
* @author liuchuang |
|
|
// * @author liuchuang
|
|
|
* @since 2019/12/25 19:08 |
|
|
// * @since 2019/12/25 19:08
|
|
|
*/ |
|
|
// */
|
|
|
private void removeOldHandleProcess(String itemGridPlatformId) { |
|
|
// private void removeOldHandleProcess(String itemGridPlatformId) {
|
|
|
// 获取历史处理记录
|
|
|
// // 获取历史处理记录
|
|
|
List<String> oldLogs = gridPlatformHandleLogService.listOfHandleProcessLogByItemGridPlatFormId(itemGridPlatformId); |
|
|
// List<String> oldLogs = gridPlatformHandleLogService.listOfHandleProcessLogByItemGridPlatFormId(itemGridPlatformId);
|
|
|
// 删除项目处理进度表历史记录
|
|
|
// // 删除项目处理进度表历史记录
|
|
|
if (!CollUtil.isEmpty(oldLogs)) { |
|
|
// if (!CollUtil.isEmpty(oldLogs)) {
|
|
|
baseDao.deleteBatchItemHandleIds(oldLogs); |
|
|
// baseDao.deleteBatchItemHandleIds(oldLogs);
|
|
|
} |
|
|
// }
|
|
|
// 删除网格化平台处理记录表记录
|
|
|
// // 删除网格化平台处理记录表记录
|
|
|
gridPlatformHandleLogService.removeHandleProcessByItemGridPlatFormId(itemGridPlatformId); |
|
|
// gridPlatformHandleLogService.removeHandleProcessByItemGridPlatFormId(itemGridPlatformId);
|
|
|
} |
|
|
// }
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 保存新的网格化平台处理记录 |
|
|
* 保存新的网格化平台处理记录 |
|
|
@ -3558,7 +3556,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
ItemGridPlatformEntity gridEntity = this.getReport(dto.getId()); |
|
|
ItemGridPlatformEntity gridEntity = this.getReport(dto.getId()); |
|
|
if (null != gridEntity) { |
|
|
if (null != gridEntity) { |
|
|
//驳回重办
|
|
|
//驳回重办
|
|
|
EventRejectDoResultDto reDoResult = null; |
|
|
EventRejectDoResultDto reDoResult = new EventRejectDoResultDto(); |
|
|
try { |
|
|
try { |
|
|
reDoResult = this.eventsRejectDo(dto, gridEntity.getTaskid()); |
|
|
reDoResult = this.eventsRejectDo(dto, gridEntity.getTaskid()); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
@ -3572,7 +3570,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
this.saveItemRejectReDoInfo(gridEntity, process); |
|
|
this.saveItemRejectReDoInfo(gridEntity, process); |
|
|
} else { |
|
|
} else { |
|
|
//事件第一次上报
|
|
|
//事件第一次上报
|
|
|
SendEventResultDto sendResult = null; |
|
|
SendEventResultDto sendResult = new SendEventResultDto(); |
|
|
try { |
|
|
try { |
|
|
sendResult = this.reportCaseNew(dto); |
|
|
sendResult = this.reportCaseNew(dto); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
@ -3603,7 +3601,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
} |
|
|
} |
|
|
this.saveInterfaceLog(dto.getId(), InterfaceLogBusinessTypeEnum.REJECT_RE_DO.getValue(), |
|
|
this.saveInterfaceLog(dto.getId(), InterfaceLogBusinessTypeEnum.REJECT_RE_DO.getValue(), |
|
|
ApiConstants.sendEventUrl, successFlag, rejectReDoDTO.toString(), |
|
|
ApiConstants.sendEventUrl, successFlag, rejectReDoDTO.toString(), |
|
|
sendResult == null ? "" : sendResult.toString()); |
|
|
sendResult.toString()); |
|
|
log.info("处理项目-进入上报驳回重办-存储日志结束"); |
|
|
log.info("处理项目-进入上报驳回重办-存储日志结束"); |
|
|
return sendResult; |
|
|
return sendResult; |
|
|
} |
|
|
} |
|
|
|