|
|
|
@ -36,10 +36,7 @@ import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.DateUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.GPSUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.constant.EventIssueItemState; |
|
|
|
import com.elink.esua.epdc.constant.EventsNoticeConstant; |
|
|
|
import com.elink.esua.epdc.constant.ImageConstant; |
|
|
|
import com.elink.esua.epdc.constant.ItemInformationConstant; |
|
|
|
import com.elink.esua.epdc.constant.*; |
|
|
|
import com.elink.esua.epdc.constants.MenuCodeConstant; |
|
|
|
import com.elink.esua.epdc.dto.CompleteDeptDTO; |
|
|
|
import com.elink.esua.epdc.dto.DeptGridPlatformDTO; |
|
|
|
@ -177,10 +174,10 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) { |
|
|
|
if (params.get("streetId") != null && !"".equals(params.get("streetId"))) { |
|
|
|
Result<SysDeptDTO> resultdept = adminFeignClient.getSysDeptInfo(Long.parseLong(params.get("streetId").toString())); |
|
|
|
SysDeptDTO dept =resultdept.getData(); |
|
|
|
SysDeptDTO dept = resultdept.getData(); |
|
|
|
Object deptId = params.get("streetId"); |
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(dept.getTypeKey())) { |
|
|
|
params.put("districtDeptId",deptId); |
|
|
|
params.put("districtDeptId", deptId); |
|
|
|
params.remove("streetId"); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -629,10 +626,10 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
// 发送菜单消息-待处理项目-吹哨部门
|
|
|
|
this.sendWhistlingDeptItemHandleMenuNotice(deptIds, null); |
|
|
|
} else if (ItemHandleCategoryEnum.HANDLE_REPORT.getValue() == dto.getHandleCategory()) { |
|
|
|
boolean reportFlag = this.checkReport(dto.getId()); |
|
|
|
if (reportFlag) { |
|
|
|
return new Result().error("当前项目已上报网格化平台"); |
|
|
|
} |
|
|
|
boolean reportFlag = this.checkReport(dto.getId()); |
|
|
|
if (reportFlag) { |
|
|
|
return new Result().error("当前项目已上报网格化平台"); |
|
|
|
} |
|
|
|
handleProcessEntity.setState(dto.getHandleCategory()); |
|
|
|
informationFormDTO.setTitle(EventsNoticeConstant.NOTICE_REPORT); |
|
|
|
GridDto gridDto = null; |
|
|
|
@ -952,6 +949,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
List<KpiEvaluationAmountResultDTO> list = baseDao.selectListGridEvaluationMetaData(metaDataFormDto); |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param dto |
|
|
|
* @return void |
|
|
|
@ -977,11 +975,10 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* 保存接口调用日志 |
|
|
|
* |
|
|
|
* @params [referenceId, businessType, interfaceName, successFlag, callMsgBody, returnMsgBody] |
|
|
|
* @return void |
|
|
|
* @params [referenceId, businessType, interfaceName, successFlag, callMsgBody, returnMsgBody] |
|
|
|
* @author liuchuang |
|
|
|
* @since 2019/12/26 11:08 |
|
|
|
*/ |
|
|
|
@ -997,101 +994,101 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
interfaceLogService.insert(interfaceLogEntity); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param itemEntity |
|
|
|
* @return com.elink.esua.gird.shibei.dto.form.SendInputInfoFormDto |
|
|
|
* @Author yinzuomei |
|
|
|
* @Description 组装案件信息上报接口入参 |
|
|
|
* @Date 2019/12/25 13:14 |
|
|
|
**/ |
|
|
|
private SendInputInfoFormDto packageReportEntity(ItemEntity itemEntity) throws Exception { |
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
|
SendInputInfoFormDto formDto = new SendInputInfoFormDto(); |
|
|
|
// 案件来源
|
|
|
|
formDto.setInfoSourceID(CommonConstants.INFO_SOURCE_ID); |
|
|
|
// 渠道来源
|
|
|
|
formDto.setReportDept(CommonConstants.REPORT_DEPT); |
|
|
|
// 案件属性
|
|
|
|
formDto.setInfoTypeID(CommonConstants.INFO_TYPE_ID); |
|
|
|
// 案件大类
|
|
|
|
formDto.setInfoBC(CommonConstants.INFO_BC); |
|
|
|
// 案件小类
|
|
|
|
formDto.setInfoSC(CommonConstants.INFO_SC); |
|
|
|
// 案件子类
|
|
|
|
formDto.setInfoZC(CommonConstants.INFO_ZC); |
|
|
|
// 发生地址
|
|
|
|
formDto.setStandardAddress(itemEntity.getIssueAddress()); |
|
|
|
// 问题描述
|
|
|
|
/** |
|
|
|
* @param itemEntity |
|
|
|
* @return com.elink.esua.gird.shibei.dto.form.SendInputInfoFormDto |
|
|
|
* @Author yinzuomei |
|
|
|
* @Description 组装案件信息上报接口入参 |
|
|
|
* @Date 2019/12/25 13:14 |
|
|
|
**/ |
|
|
|
private SendInputInfoFormDto packageReportEntity(ItemEntity itemEntity) throws Exception { |
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
|
SendInputInfoFormDto formDto = new SendInputInfoFormDto(); |
|
|
|
// 案件来源
|
|
|
|
formDto.setInfoSourceID(CommonConstants.INFO_SOURCE_ID); |
|
|
|
// 渠道来源
|
|
|
|
formDto.setReportDept(CommonConstants.REPORT_DEPT); |
|
|
|
// 案件属性
|
|
|
|
formDto.setInfoTypeID(CommonConstants.INFO_TYPE_ID); |
|
|
|
// 案件大类
|
|
|
|
formDto.setInfoBC(CommonConstants.INFO_BC); |
|
|
|
// 案件小类
|
|
|
|
formDto.setInfoSC(CommonConstants.INFO_SC); |
|
|
|
// 案件子类
|
|
|
|
formDto.setInfoZC(CommonConstants.INFO_ZC); |
|
|
|
// 发生地址
|
|
|
|
formDto.setStandardAddress(itemEntity.getIssueAddress()); |
|
|
|
// 问题描述
|
|
|
|
formDto.setDescription(itemEntity.getItemContent());// 测试999勿删谢谢
|
|
|
|
// 反映人
|
|
|
|
formDto.setReportPerson(itemEntity.getNickName());// itemEntity.getNickName()测试人员
|
|
|
|
// 联系方式
|
|
|
|
formDto.setContactMode(itemEntity.getMobile()); |
|
|
|
double[] gps= GPSUtils.gcj02_To_Gps84(itemEntity.getIssueLatitude(),itemEntity.getIssueLongitude()); |
|
|
|
// 坐标X
|
|
|
|
// 反映人
|
|
|
|
formDto.setReportPerson(itemEntity.getNickName());// itemEntity.getNickName()测试人员
|
|
|
|
// 联系方式
|
|
|
|
formDto.setContactMode(itemEntity.getMobile()); |
|
|
|
double[] gps = GPSUtils.gcj02_To_Gps84(itemEntity.getIssueLatitude(), itemEntity.getIssueLongitude()); |
|
|
|
// 坐标X
|
|
|
|
formDto.setCoordX(new BigDecimal(gps[1]).setScale(15, BigDecimal.ROUND_HALF_UP)); |
|
|
|
// 坐标Y
|
|
|
|
// 坐标Y
|
|
|
|
formDto.setCoordY(new BigDecimal(gps[0]).setScale(15, BigDecimal.ROUND_HALF_UP)); |
|
|
|
// 监督员编号
|
|
|
|
formDto.setKeepersn(""); |
|
|
|
// 操作时间
|
|
|
|
formDto.setInsertTime(new Date()); |
|
|
|
// 操作人
|
|
|
|
formDto.setInsertUser(user.getRealName());//
|
|
|
|
// 外系统编号
|
|
|
|
formDto.setHotLinesn(itemEntity.getId()); |
|
|
|
// 先查询网格对应街道id
|
|
|
|
Result<CompleteDeptDTO> completeDeptDTOResult = adminFeignClient.getCompleteDept(itemEntity.getGridId()); |
|
|
|
if (!completeDeptDTOResult.success()) { |
|
|
|
throw new Exception("根据网格ID获取所有上级机构信息失败" + completeDeptDTOResult.getMsg()); |
|
|
|
} |
|
|
|
// 根据街道id查询对应平台的deptCode、streetCode
|
|
|
|
Result<DeptGridPlatformDTO> deptGridPlatformDTOResult = adminFeignClient.getDeptGridPlatformDTO(completeDeptDTOResult.getData().getStreetId().toString()); |
|
|
|
if (!deptGridPlatformDTOResult.success() || null == deptGridPlatformDTOResult.getData()) { |
|
|
|
throw new Exception("根据街道查询平台部门信息失败" + deptGridPlatformDTOResult.getMsg()); |
|
|
|
} |
|
|
|
//外系统编码 必填!!!!!!!
|
|
|
|
formDto.setDeptCode(deptGridPlatformDTOResult.getData().getDeptCode());// 130099
|
|
|
|
// 街道编码!!!!!!!!!!!!
|
|
|
|
formDto.setStreetCode(deptGridPlatformDTOResult.getData().getStreetCode()); |
|
|
|
// 网格编码
|
|
|
|
formDto.setGridCode(null); |
|
|
|
|
|
|
|
//查询图片列表
|
|
|
|
QueryWrapper<ImgEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.eq(StringUtils.isNotBlank(itemEntity.getEventId()), "REFERENCE_ID", itemEntity.getEventId()); |
|
|
|
List<ImgEntity> imageList = imgDao.selectList(wrapper); |
|
|
|
if (null != imageList && !imageList.isEmpty()) { |
|
|
|
String url = null; |
|
|
|
String filename = null; |
|
|
|
ReportFile reportFile = null; |
|
|
|
List<ReportFile> reportFiles = new ArrayList<>(); |
|
|
|
for (ImgEntity image : imageList) { |
|
|
|
url = image.getImgUrl(); |
|
|
|
if (org.apache.commons.lang.StringUtils.isNotBlank(url)) { |
|
|
|
filename = url.substring(url.lastIndexOf(CommonConstants.CHAR_ASCII_47) + CommonConstants.NUMBER_ONE); |
|
|
|
reportFile = new ReportFile(); |
|
|
|
reportFile.setName(filename); |
|
|
|
reportFile.setUrl(url); |
|
|
|
reportFile.setBase64string(""); |
|
|
|
reportFiles.add(reportFile); |
|
|
|
} |
|
|
|
} |
|
|
|
ImageFile imageFile = new ImageFile(); |
|
|
|
imageFile.setReportFileList(reportFiles); |
|
|
|
formDto.setImageFile(imageFile); |
|
|
|
} |
|
|
|
return formDto; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param gridDto |
|
|
|
* @param handleProcessEntity |
|
|
|
* @return void |
|
|
|
* @Author yinzuomei |
|
|
|
* @Description |
|
|
|
* @Date 2019/12/25 15:29 |
|
|
|
**/ |
|
|
|
// 监督员编号
|
|
|
|
formDto.setKeepersn(""); |
|
|
|
// 操作时间
|
|
|
|
formDto.setInsertTime(new Date()); |
|
|
|
// 操作人
|
|
|
|
formDto.setInsertUser(user.getRealName());//
|
|
|
|
// 外系统编号
|
|
|
|
formDto.setHotLinesn(itemEntity.getId()); |
|
|
|
// 先查询网格对应街道id
|
|
|
|
Result<CompleteDeptDTO> completeDeptDTOResult = adminFeignClient.getCompleteDept(itemEntity.getGridId()); |
|
|
|
if (!completeDeptDTOResult.success()) { |
|
|
|
throw new Exception("根据网格ID获取所有上级机构信息失败" + completeDeptDTOResult.getMsg()); |
|
|
|
} |
|
|
|
// 根据街道id查询对应平台的deptCode、streetCode
|
|
|
|
Result<DeptGridPlatformDTO> deptGridPlatformDTOResult = adminFeignClient.getDeptGridPlatformDTO(completeDeptDTOResult.getData().getStreetId().toString()); |
|
|
|
if (!deptGridPlatformDTOResult.success() || null == deptGridPlatformDTOResult.getData()) { |
|
|
|
throw new Exception("根据街道查询平台部门信息失败" + deptGridPlatformDTOResult.getMsg()); |
|
|
|
} |
|
|
|
//外系统编码 必填!!!!!!!
|
|
|
|
formDto.setDeptCode(deptGridPlatformDTOResult.getData().getDeptCode());// 130099
|
|
|
|
// 街道编码!!!!!!!!!!!!
|
|
|
|
formDto.setStreetCode(deptGridPlatformDTOResult.getData().getStreetCode()); |
|
|
|
// 网格编码
|
|
|
|
formDto.setGridCode(null); |
|
|
|
|
|
|
|
//查询图片列表
|
|
|
|
QueryWrapper<ImgEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.eq(StringUtils.isNotBlank(itemEntity.getEventId()), "REFERENCE_ID", itemEntity.getEventId()); |
|
|
|
List<ImgEntity> imageList = imgDao.selectList(wrapper); |
|
|
|
if (null != imageList && !imageList.isEmpty()) { |
|
|
|
String url = null; |
|
|
|
String filename = null; |
|
|
|
ReportFile reportFile = null; |
|
|
|
List<ReportFile> reportFiles = new ArrayList<>(); |
|
|
|
for (ImgEntity image : imageList) { |
|
|
|
url = image.getImgUrl(); |
|
|
|
if (org.apache.commons.lang.StringUtils.isNotBlank(url)) { |
|
|
|
filename = url.substring(url.lastIndexOf(CommonConstants.CHAR_ASCII_47) + CommonConstants.NUMBER_ONE); |
|
|
|
reportFile = new ReportFile(); |
|
|
|
reportFile.setName(filename); |
|
|
|
reportFile.setUrl(url); |
|
|
|
reportFile.setBase64string(""); |
|
|
|
reportFiles.add(reportFile); |
|
|
|
} |
|
|
|
} |
|
|
|
ImageFile imageFile = new ImageFile(); |
|
|
|
imageFile.setReportFileList(reportFiles); |
|
|
|
formDto.setImageFile(imageFile); |
|
|
|
} |
|
|
|
return formDto; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param gridDto |
|
|
|
* @param handleProcessEntity |
|
|
|
* @return void |
|
|
|
* @Author yinzuomei |
|
|
|
* @Description |
|
|
|
* @Date 2019/12/25 15:29 |
|
|
|
**/ |
|
|
|
private void saveItemGridPlatformInfo(GridDto gridDto, ItemHandleProcessEntity handleProcessEntity) { |
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
|
ItemGridPlatformEntity itemGridPlatformEntity = new ItemGridPlatformEntity(); |
|
|
|
@ -1119,7 +1116,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
// 获取已上报网格平台未结案的项目
|
|
|
|
List<ItemGridPlatformDTO> gridPlatformDTOList = itemGridPlatformService.listOfGridPlatformItemNotEnd(); |
|
|
|
// 拉取处理情况
|
|
|
|
for (ItemGridPlatformDTO dto: |
|
|
|
for (ItemGridPlatformDTO dto : |
|
|
|
gridPlatformDTOList) { |
|
|
|
SearchCaseProcessByTaskIdDto searchResultDot = shiBeiCityGridApi.searchCaseProcessByTaskId(dto.getTaskid()); |
|
|
|
String successFlag = YesOrNoEnum.NO.value(); |
|
|
|
@ -1153,11 +1150,10 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* 删除历史网格化平台处理记录 |
|
|
|
* |
|
|
|
* @params [id] |
|
|
|
* @return void |
|
|
|
* @params [id] |
|
|
|
* @author liuchuang |
|
|
|
* @since 2019/12/25 19:08 |
|
|
|
*/ |
|
|
|
@ -1173,18 +1169,17 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* 保存新的网格化平台处理记录 |
|
|
|
* |
|
|
|
* @params [progressList] |
|
|
|
* @return void |
|
|
|
* @params [progressList] |
|
|
|
* @author liuchuang |
|
|
|
* @since 2019/12/25 19:27 |
|
|
|
*/ |
|
|
|
private void insertNewHandleProcess(List<SearchCaseProcessByTaskIdItemDto> progressList, String itemId, String itemGridPlatformId) { |
|
|
|
|
|
|
|
try { |
|
|
|
for (SearchCaseProcessByTaskIdItemDto dto: |
|
|
|
for (SearchCaseProcessByTaskIdItemDto dto : |
|
|
|
progressList) { |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
|
|
|
Date insertTime = sdf.parse(dto.getInserttime()); |
|
|
|
|