|
|
@ -82,8 +82,10 @@ import com.elink.esua.epdc.modules.category.dao.CategoryDao; |
|
|
|
import com.elink.esua.epdc.modules.category.entity.CategoryEntity; |
|
|
|
import com.elink.esua.epdc.modules.category.service.CategoryService; |
|
|
|
import com.elink.esua.epdc.modules.events.dao.ImgDao; |
|
|
|
import com.elink.esua.epdc.modules.events.dao.ItemHotlineDao; |
|
|
|
import com.elink.esua.epdc.modules.events.dao.XxxdEventDao; |
|
|
|
import com.elink.esua.epdc.modules.events.entity.ImgEntity; |
|
|
|
import com.elink.esua.epdc.modules.events.entity.ItemHotlineEntity; |
|
|
|
import com.elink.esua.epdc.modules.events.entity.XxxdEventEntity; |
|
|
|
import com.elink.esua.epdc.modules.events.service.EpdcEventsService; |
|
|
|
import com.elink.esua.epdc.modules.events.service.ImgService; |
|
|
@ -250,6 +252,10 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
private XxxdEventDao xxxdEventDao; |
|
|
|
@Autowired |
|
|
|
private ItemReportInterfaceLogAgainDao itemReportInterfaceLogAgainDao; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ItemHotlineDao itemHotlineDao; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<ItemDTO> page(Map<String, Object> params) { |
|
|
|
IPage<ItemEntity> page = baseDao.selectPage( |
|
|
@ -6333,6 +6339,320 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<ItemHotlineEntity> getHotLineFromList(Map<String, Object> params){ |
|
|
|
try { |
|
|
|
/* UserDetail userDetail = SecurityUser.getUser(); |
|
|
|
Long deptId = userDetail.getDeptId(); |
|
|
|
|
|
|
|
MetaSysDeptEntity deptEntity = metaSysDeptDao.selectById(deptId); |
|
|
|
|
|
|
|
if (deptEntity == null){ |
|
|
|
throw new Exception("没有匹配到部门,请完善:"+deptId); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
result = itemHotlineDao.selectList(new LambdaQueryWrapper<ItemHotlineEntity>().eq( |
|
|
|
ItemHotlineEntity::getCode,deptEntity.getDisCenterZoningCode()).and(wrapp->wrapp.eq(ItemHotlineEntity::getYqyFlag,"0").or().isNull(ItemHotlineEntity::getYqyFlag)) |
|
|
|
.groupBy(ItemHotlineEntity::getSqid) |
|
|
|
);*/ |
|
|
|
IPage<ItemHotlineEntity> page = getPage(params); |
|
|
|
IPage<ItemHotlineEntity> itemHotlineEntityIPage = itemHotlineDao.selectPage(page, new LambdaQueryWrapper<ItemHotlineEntity>().eq(ItemHotlineEntity::getYqyFlag, "0").or().isNull(ItemHotlineEntity::getYqyFlag).groupBy(ItemHotlineEntity::getSqid)); |
|
|
|
return new PageData<>(itemHotlineEntityIPage.getRecords(), itemHotlineEntityIPage.getTotal()); |
|
|
|
|
|
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
} |
|
|
|
return new PageData<>(null, 0); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Boolean changeHotLineToMSItem(ItemHotlineDTO dto) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
ItemHotlineEntity itemHotlineEntity = itemHotlineDao.selectById(dto.getId()); |
|
|
|
if (itemHotlineEntity == null){ |
|
|
|
throw new Exception("此id找不到12345热线数据"+dto.getId()); |
|
|
|
} |
|
|
|
|
|
|
|
ItemEntity itemEntity = new ItemEntity(); |
|
|
|
|
|
|
|
itemEntity.setSerialNum(itemHotlineEntity.getCode()); |
|
|
|
|
|
|
|
// 青诉即办诉求唯一标识
|
|
|
|
itemEntity.setSqid(itemHotlineEntity.getSqid()); |
|
|
|
// sjly String 诉求来源 01:12345热线
|
|
|
|
|
|
|
|
// orgId String 所属机构编码
|
|
|
|
//orgName String 所属机构名称
|
|
|
|
// 这边变成了deptid
|
|
|
|
itemEntity.setGridId(dto.getGridId()); |
|
|
|
itemEntity.setGrid(dto.getGridName()); |
|
|
|
|
|
|
|
// sjzt String 诉求状态 字典3.5
|
|
|
|
/** |
|
|
|
* 01 待派遣 06 待结案 |
|
|
|
* 02 待审核 07 已结案 |
|
|
|
* 03 待处理 08 废弃 |
|
|
|
* 04 待评价 09 待接收 |
|
|
|
* 05 待验收 |
|
|
|
*/ |
|
|
|
// sjzt String 诉求状态 字典3.5
|
|
|
|
|
|
|
|
itemEntity.setItemState(0); |
|
|
|
|
|
|
|
//isBm String 是否保密 (1:是;0:否)
|
|
|
|
|
|
|
|
//isPublic String 是否公开 (1:是;0:否)
|
|
|
|
|
|
|
|
// sqbt String 诉求标题
|
|
|
|
|
|
|
|
// sjnr String 诉求内容 2000个字符
|
|
|
|
itemEntity.setItemContent(itemHotlineEntity.getSjnr()); |
|
|
|
|
|
|
|
// sszt String 所属专题 01:民生诉求 02:发展诉求 03:执法诉求 字典3.11
|
|
|
|
itemEntity.setPeopleFlag("0");// 转换
|
|
|
|
itemEntity.setAppealSource(NumConstant.THREE_STR); |
|
|
|
|
|
|
|
//djr String 登记人ID
|
|
|
|
itemEntity.setUserId(itemHotlineEntity.getDjr()); |
|
|
|
//djrxm String 登记人姓名
|
|
|
|
itemEntity.setNickName(itemHotlineEntity.getDjrxm()); |
|
|
|
//djsj String 登记时间 年-月-日 时:分:秒
|
|
|
|
itemEntity.setDistributeTime(itemHotlineEntity.getDjsj()); |
|
|
|
|
|
|
|
//lxfs String 登记人联系方式
|
|
|
|
itemEntity.setMobile(itemHotlineEntity.getLxfs()); |
|
|
|
//ldLb String 来电类别
|
|
|
|
|
|
|
|
//dlwzmc String 地理位置
|
|
|
|
itemEntity.setIssueAddress(itemHotlineEntity.getDlwzmc()); |
|
|
|
|
|
|
|
// 党员标识 0:否,1:是 必填字段
|
|
|
|
itemEntity.setIsPartyMember("0"); |
|
|
|
|
|
|
|
|
|
|
|
Result<SysDeptDTO> dtoResult = adminFeignClient.getSysDeptInfo(itemEntity.getGridId()); |
|
|
|
if (dtoResult.success()) { |
|
|
|
Long pids = dtoResult.getData().getPid(); |
|
|
|
String pnames = dtoResult.getData().getParentName(); |
|
|
|
itemEntity.setParentDeptIds(pids + ""); |
|
|
|
itemEntity.setParentDeptNames(pnames); |
|
|
|
itemEntity.setAllDeptIds(pids + "," + itemEntity.getGridId()); |
|
|
|
itemEntity.setAllDeptNames(pnames + "-" + itemEntity.getGroupName()); |
|
|
|
} |
|
|
|
|
|
|
|
baseDao.insert(itemEntity); |
|
|
|
|
|
|
|
List<ImgEntity> imgEntities = imgDao.selectListByRefeId(dto.getId()); |
|
|
|
imgEntities.forEach(imgEntity -> { |
|
|
|
imgEntity.setReferenceId(itemEntity.getId()); |
|
|
|
imgEntity.setId(""); |
|
|
|
imgDao.insert(imgEntity); |
|
|
|
}); |
|
|
|
|
|
|
|
// 如果是
|
|
|
|
itemHotlineEntity.setYqyFlag("1"); |
|
|
|
itemHotlineDao.updateById(itemHotlineEntity); |
|
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
} |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Boolean changeHotLineToFZItem(ItemHotlineDTO hotlineDTO) { |
|
|
|
|
|
|
|
try { |
|
|
|
ItemHotlineEntity itemHotlineEntity = itemHotlineDao.selectById(hotlineDTO.getId()); |
|
|
|
if (itemHotlineEntity == null){ |
|
|
|
throw new Exception("此id找不到12345热线数据"+hotlineDTO.getId()); |
|
|
|
} |
|
|
|
|
|
|
|
MetaSysDeptEntity metaSysDeptEntity = new MetaSysDeptEntity(); |
|
|
|
|
|
|
|
List<MetaSysDeptEntity> deptEntityList = metaSysDeptDao.selectList( |
|
|
|
new LambdaQueryWrapper<MetaSysDeptEntity>().eq(MetaSysDeptEntity::getDisCenterZoningCode,itemHotlineEntity.getOrgId()) |
|
|
|
); |
|
|
|
if (deptEntityList.size()>0){ |
|
|
|
metaSysDeptEntity = deptEntityList.get(0); |
|
|
|
}else{ |
|
|
|
throw new Exception("此数据匹配不到部门"+itemHotlineEntity.getOrgId()); |
|
|
|
} |
|
|
|
|
|
|
|
ItemEntity entity = new ItemEntity(); |
|
|
|
entity.setSerialNum(itemHotlineEntity.getCode()); |
|
|
|
entity.setSqid(itemHotlineEntity.getSqid()); |
|
|
|
entity.setGridId(metaSysDeptEntity.getId()); |
|
|
|
entity.setGrid(metaSysDeptEntity.getName()); |
|
|
|
entity.setItemContent(itemHotlineEntity.getSjnr()); |
|
|
|
entity.setAppealSource(NumConstant.THREE_STR); |
|
|
|
entity.setUserId(itemHotlineEntity.getDjr()); |
|
|
|
entity.setNickName(itemHotlineEntity.getDjrxm()); |
|
|
|
entity.setDistributeTime(itemHotlineEntity.getDjsj()); |
|
|
|
entity.setMobile(itemHotlineEntity.getLxfs()); |
|
|
|
entity.setIssueAddress(itemHotlineEntity.getDlwzmc()); |
|
|
|
entity.setIsPartyMember("0"); |
|
|
|
entity.setItemState(0);//处理中
|
|
|
|
entity.setLastHandleTime(new Date()); |
|
|
|
entity.setCategoryCode("13"); |
|
|
|
entity.setCategoryFullName("其他"); |
|
|
|
entity.setFirstCategoryCode("13"); |
|
|
|
entity.setItemCode("PT" + System.currentTimeMillis());//项目编号
|
|
|
|
entity.setIsPeople("1");//诉求上报
|
|
|
|
entity.setPeopleFlag("1");// 发展
|
|
|
|
entity.setAppealSource(NumConstant.THREE_STR); |
|
|
|
//执法诉求所属街道的市中心编码
|
|
|
|
Result<SysDeptDTO> dtoResult = adminFeignClient.getSysDeptInfo(entity.getGridId()); |
|
|
|
if (dtoResult.success()) { |
|
|
|
// 因为是街道账号,所以上级一定是市北区委
|
|
|
|
Long pids = dtoResult.getData().getPid(); |
|
|
|
String pnames = dtoResult.getData().getParentName(); |
|
|
|
entity.setParentDeptIds(pids + ""); |
|
|
|
entity.setParentDeptNames(pnames); |
|
|
|
entity.setAllDeptIds(pids + "," + entity.getGridId()); |
|
|
|
entity.setAllDeptNames(pnames + "-" + metaSysDeptEntity.getName()); |
|
|
|
} |
|
|
|
baseDao.insert(entity); |
|
|
|
//插入项目部门关联表
|
|
|
|
itemDeptService.savePeopleSubmitInfo(entity); |
|
|
|
// 插入项目处理流程表
|
|
|
|
ItemHandleProcessEntity itemHandleProcessEntity = new ItemHandleProcessEntity(); |
|
|
|
itemHandleProcessEntity.setItemId(entity.getId()); |
|
|
|
itemHandleProcessEntity.setState(ItemHandleCategoryEnum.HANDLE_I_HANDLE_GRID_TOP.getValue()); |
|
|
|
itemHandleProcessEntity.setHandleAdvice("诉求已查收,正在办理。"); |
|
|
|
itemHandleProcessEntity.setOutHandleAdvice("诉求已查收,正在办理。"); |
|
|
|
itemHandleProcessEntity.setHandlerDeptId(entity.getGridId()); |
|
|
|
itemHandleProcessEntity.setHandlerDept(entity.getGrid()); |
|
|
|
itemHandleProcessService.insert(itemHandleProcessEntity); |
|
|
|
//发送事件至区中心
|
|
|
|
if ("1".equals(entity.getPeopleFlag())) { |
|
|
|
//保存至企业表
|
|
|
|
// itemEnterpriseService.savaZfInfo(entity, formDto);
|
|
|
|
ItemHandleSubmitFormDTO dto = new ItemHandleSubmitFormDTO(); |
|
|
|
dto.setId(entity.getId()); |
|
|
|
dto.setOutHandleAdvice(itemHandleProcessEntity.getOutHandleAdvice()); |
|
|
|
dto.setHandleCategory(ItemHandleCategoryEnum.HANDLE_CLOSING_CASE_APPLY.getValue()); |
|
|
|
sendItemToDsf(dto, itemHandleProcessEntity); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
StringBuffer str = new StringBuffer(); |
|
|
|
str.append("12345数据发展"); |
|
|
|
str.append("诉求上报,发送事件数据到市中心错误,12345数据Id->").append(hotlineDTO.getId()); |
|
|
|
log.error(str.toString()); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Boolean changeHotLineToZFItem(ItemHotlineDTO hotlineDTO) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
ItemHotlineEntity itemHotlineEntity = itemHotlineDao.selectById(hotlineDTO.getId()); |
|
|
|
if (itemHotlineEntity == null){ |
|
|
|
throw new Exception("此id找不到12345热线数据"+hotlineDTO.getId()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*UserDetail userDetail = SecurityUser.getUser(); |
|
|
|
if (null == userDetail) { |
|
|
|
throw new RenException("获取用户信息失败"); |
|
|
|
} |
|
|
|
if (!(StringUtils.isNotBlank(userDetail.getTypeKey()) |
|
|
|
&& OrganizationTypeConstant.ORG_TYPE_STREET_PARTY.equals(userDetail.getTypeKey()))) { |
|
|
|
throw new RenException("请用街道账号进行上报"); |
|
|
|
}*/ |
|
|
|
ItemEntity itemEntity = new ItemEntity(); |
|
|
|
/* |
|
|
|
userID:zfsq+当前账户ID。 |
|
|
|
is_party_member:统一填0。 |
|
|
|
grid:"执法诉求"+街道名称 |
|
|
|
grid_ID:街道ID |
|
|
|
*/ |
|
|
|
MetaSysDeptEntity metaSysDeptEntity = new MetaSysDeptEntity(); |
|
|
|
|
|
|
|
List<MetaSysDeptEntity> deptEntityList = metaSysDeptDao.selectList( |
|
|
|
new LambdaQueryWrapper<MetaSysDeptEntity>().eq(MetaSysDeptEntity::getDisCenterZoningCode,itemHotlineEntity.getOrgId()) |
|
|
|
); |
|
|
|
if (deptEntityList.size()>0){ |
|
|
|
metaSysDeptEntity = deptEntityList.get(0); |
|
|
|
}else{ |
|
|
|
throw new Exception("此数据匹配不到部门"+itemHotlineEntity.getOrgId()); |
|
|
|
} |
|
|
|
|
|
|
|
itemEntity.setSerialNum(itemHotlineEntity.getCode()); |
|
|
|
itemEntity.setSqid(itemHotlineEntity.getSqid()); |
|
|
|
itemEntity.setItemState(0); |
|
|
|
itemEntity.setItemContent(itemHotlineEntity.getSjnr()); |
|
|
|
itemEntity.setPeopleFlag("2");// 转换
|
|
|
|
itemEntity.setAppealSource(NumConstant.THREE_STR); |
|
|
|
itemEntity.setUserId(itemHotlineEntity.getDjr()); |
|
|
|
itemEntity.setNickName(itemHotlineEntity.getDjrxm()); |
|
|
|
itemEntity.setDistributeTime(itemHotlineEntity.getDjsj()); |
|
|
|
itemEntity.setMobile(itemHotlineEntity.getLxfs()); |
|
|
|
itemEntity.setIssueAddress(itemHotlineEntity.getDlwzmc()); |
|
|
|
itemEntity.setIsPartyMember("0"); |
|
|
|
|
|
|
|
itemEntity.setGrid("执法诉求" + metaSysDeptEntity.getName()); |
|
|
|
itemEntity.setGridId(metaSysDeptEntity.getId()); |
|
|
|
|
|
|
|
itemEntity.setLastHandleTime(new Date()); |
|
|
|
itemEntity.setCategoryCode("13"); |
|
|
|
itemEntity.setCategoryFullName("其他"); |
|
|
|
itemEntity.setFirstCategoryCode("13"); |
|
|
|
itemEntity.setItemCode("PT" + System.currentTimeMillis());//项目编号
|
|
|
|
itemEntity.setIsPeople("1");//诉求上报
|
|
|
|
//执法诉求所属街道的市中心编码
|
|
|
|
Result<SysDeptDTO> dtoResult = adminFeignClient.getSysDeptInfo(itemEntity.getGridId()); |
|
|
|
if (!dtoResult.success()) { |
|
|
|
throw new RenException(dtoResult.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
// 因为是街道账号,所以上级一定是市北区委
|
|
|
|
Long pids = dtoResult.getData().getPid(); |
|
|
|
String pnames = dtoResult.getData().getParentName(); |
|
|
|
itemEntity.setParentDeptIds(pids + ""); |
|
|
|
itemEntity.setParentDeptNames(pnames); |
|
|
|
itemEntity.setAllDeptIds(pids + "," + itemEntity.getGridId()); |
|
|
|
itemEntity.setAllDeptNames(pnames + "-" + metaSysDeptEntity.getName()); |
|
|
|
|
|
|
|
// 流水号
|
|
|
|
String code = dtoResult.getData().getDisCenterZoningCode(); |
|
|
|
itemEntity.setSerialNum(getSerialNum("ZF" + code)); |
|
|
|
baseDao.insert(itemEntity); |
|
|
|
//插入项目部门关联表
|
|
|
|
itemDeptService.savePeopleSubmitInfo(itemEntity); |
|
|
|
// 保存图片
|
|
|
|
// 插入项目处理流程表
|
|
|
|
ItemHandleProcessEntity itemHandleProcessEntity = new ItemHandleProcessEntity(); |
|
|
|
itemHandleProcessEntity.setItemId(itemEntity.getId()); |
|
|
|
itemHandleProcessEntity.setState(ItemHandleCategoryEnum.HANDLE_I_HANDLE_GRID_TOP.getValue()); |
|
|
|
itemHandleProcessEntity.setHandleAdvice("诉求已查收,正在办理。"); |
|
|
|
itemHandleProcessEntity.setOutHandleAdvice("诉求已查收,正在办理。"); |
|
|
|
itemHandleProcessEntity.setHandlerDeptId(itemEntity.getGridId()); |
|
|
|
itemHandleProcessEntity.setHandlerDept(itemEntity.getGrid()); |
|
|
|
itemHandleProcessService.insert(itemHandleProcessEntity); |
|
|
|
//发送事件至区中心
|
|
|
|
ItemHandleSubmitFormDTO dto = new ItemHandleSubmitFormDTO(); |
|
|
|
dto.setId(itemEntity.getId()); |
|
|
|
dto.setOutHandleAdvice(itemHandleProcessEntity.getOutHandleAdvice()); |
|
|
|
dto.setHandleCategory(ItemHandleCategoryEnum.HANDLE_CLOSING_CASE_APPLY.getValue()); |
|
|
|
|
|
|
|
sendItemToDsf(dto, itemHandleProcessEntity); |
|
|
|
|
|
|
|
// 23-6-28执法诉求响应
|
|
|
|
itemAutoProcessRedis.produce(itemHandleProcessEntity.getId().concat(":8"), System.currentTimeMillis() + (59 * 1000)); |
|
|
|
|
|
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
} |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result pushToCityAgain() { |
|
|
|
|
|
|
|