|
|
|
@ -18,6 +18,7 @@ |
|
|
|
package com.elink.esua.epdc.modules.item.service.impl; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
@ -72,6 +73,7 @@ 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; |
|
|
|
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; |
|
|
|
@ -197,6 +199,9 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
@Autowired |
|
|
|
private ItemEnterpriseService itemEnterpriseService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private CategoryDao categoryDao; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<ItemDTO> page(Map<String, Object> params) { |
|
|
|
IPage<ItemEntity> page = baseDao.selectPage( |
|
|
|
@ -2003,8 +2008,10 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
//事件大类
|
|
|
|
// String secondCate = baseDao.selectSecondCateByItemId(itemEntity.getId());
|
|
|
|
// lbHandle(sendDto,secondCate);
|
|
|
|
sendDto.setSJLYU("01"); |
|
|
|
sendDto.setSJDL("0104"); |
|
|
|
// sendDto.setSJLYU("01");
|
|
|
|
// sendDto.setSJDL("0104");
|
|
|
|
//组装事件领域和事件大类
|
|
|
|
setItemCategoryInfo(sendDto,itemEntity); |
|
|
|
|
|
|
|
//诉求联系人及联系方式
|
|
|
|
// Result<UserDTO> userResult = userInfoFeignClient.getUserInfoById(itemEntity.getUserId());
|
|
|
|
@ -2036,6 +2043,64 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
return sendDto; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @describe: 组装事件领域和事件大类 |
|
|
|
* @author wangtong |
|
|
|
* @date 2022/9/23 17:03 |
|
|
|
* @params [sendDto, itemEntity] |
|
|
|
* @return void |
|
|
|
*/ |
|
|
|
private void setItemCategoryInfo(SendEventFormDto sendDto, ItemEntity itemEntity) { |
|
|
|
CategoryEntity cate = categoryDao.selectById(itemEntity.getCategoryCode()); |
|
|
|
if(null == cate){ |
|
|
|
sendDto.setSJLYU("01"); |
|
|
|
sendDto.setSJDL("0104"); |
|
|
|
return; |
|
|
|
} |
|
|
|
//诉求所属分类为领域或者大类
|
|
|
|
if(StringUtils.isNotBlank(cate.getEventCategoryCode())){ |
|
|
|
String sjly = cate.getEventCategoryCode(); |
|
|
|
if(sjly.length()==2){ |
|
|
|
//赋值领域
|
|
|
|
sendDto.setSJLYU("01"); |
|
|
|
sendDto.setSJDL("0104"); |
|
|
|
return; |
|
|
|
} else if(sjly.length()==4){ |
|
|
|
//赋值领域、大类
|
|
|
|
sendDto.setSJLYU(sjly.substring(0,2)); |
|
|
|
sendDto.setSJDL(sjly); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
//诉求所属分类为更低级,或者为领域或者大类但是没有相关编码
|
|
|
|
//(取第二个逗号跟第三个逗号之间的;或者第二个逗号到结束的)
|
|
|
|
String pids = cate.getPids(); |
|
|
|
if(StringUtils.isBlank(pids)){ |
|
|
|
sendDto.setSJLYU("01"); |
|
|
|
sendDto.setSJDL("0104"); |
|
|
|
return; |
|
|
|
} |
|
|
|
//如果有第二个和第三个逗号
|
|
|
|
String thirdId = ""; |
|
|
|
if(StrUtil.ordinalIndexOf(pids,",",2) != -1 && StrUtil.ordinalIndexOf(pids,",",3) != -1){ |
|
|
|
thirdId = pids.substring(StrUtil.ordinalIndexOf(pids,",",2)+1,StrUtil.ordinalIndexOf(pids,",",3)); |
|
|
|
//只有第二个逗号,没有第三个逗号
|
|
|
|
}else if(StrUtil.ordinalIndexOf(pids,",",2) != -1 && StrUtil.ordinalIndexOf(pids,",",3) == -1){ |
|
|
|
thirdId = pids.substring(StrUtil.ordinalIndexOf(pids,",",2)+1); |
|
|
|
} |
|
|
|
//查询所对应的大类
|
|
|
|
CategoryEntity thirdCate = categoryDao.selectById(thirdId); |
|
|
|
if(null == thirdCate){ |
|
|
|
sendDto.setSJLYU("01"); |
|
|
|
sendDto.setSJDL("0104"); |
|
|
|
return; |
|
|
|
}else{ |
|
|
|
sendDto.setSJLYU(thirdCate.getEventCategoryCode().substring(0,2)); |
|
|
|
sendDto.setSJDL(thirdCate.getEventCategoryCode()); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @describe: 组装驳回重办数据 |
|
|
|
* @author wangtong |
|
|
|
|