Browse Source

parentCategoryName

dev
yinzuomei 3 years ago
parent
commit
94d7ca6d94
  1. 18
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml
  2. 13
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java
  3. 23
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java
  4. 7
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml

18
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml

@ -215,19 +215,25 @@
<select id="getCategoryList" resultType="com.epmet.dto.IssueProjectCategoryDictDTO"> <select id="getCategoryList" resultType="com.epmet.dto.IssueProjectCategoryDictDTO">
SELECT SELECT
* c.*,
(
case when p.CATEGORY_NAME is not null and p.CATEGORY_NAME !='' then CATEGORY_NAME
else ''
end
)as parentCategoryName
FROM FROM
issue_project_category_dict issue_project_category_dict c
left join issue_project_category_dict p (c.PID=p.id)
WHERE WHERE
del_flag = '0' c.del_flag = '0'
AND customer_id = #{customerId} AND c.customer_id = #{customerId}
<if test="categoryIdList != null and categoryIdList.size() > 0"> <if test="categoryIdList != null and categoryIdList.size() > 0">
<foreach collection="categoryIdList" item="id" open="AND( " separator=" OR " index="index" close=")"> <foreach collection="categoryIdList" item="id" open="AND( " separator=" OR " index="index" close=")">
id = #{id} c.id = #{id}
</foreach> </foreach>
</if> </if>
ORDER BY ORDER BY
sort ASC c.sort ASC
</select> </select>
<!-- 查询项目分类标签 --> <!-- 查询项目分类标签 -->

13
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java

@ -88,6 +88,19 @@ public class MyReportIcEvResDTO implements Serializable {
* 群众满意度[满意度 - 不满意:bad基本满意:good非常满意:perfect] * 群众满意度[满意度 - 不满意:bad基本满意:good非常满意:perfect]
*/ */
private String satisfactionName; private String satisfactionName;
/**
* 分类Id
*/
// @JsonIgnore
private String categoryId;
/**
* 分类名称
*/
private String categoryName;
/** /**
* 事件附件 * 事件附件
*/ */

23
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

@ -3,10 +3,7 @@ package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.*;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.FileCommonDTO; import com.epmet.commons.tools.dto.form.FileCommonDTO;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.enums.DictTypeEnum;
@ -1215,6 +1212,24 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
dto.setImageList(imageList); dto.setImageList(imageList);
dto.setVoiceList(voiceList); dto.setVoiceList(voiceList);
} }
//分类信息
if(StringUtils.isNotBlank(dto.getCategoryId())){
List<String> categoryList = new ArrayList<>();
categoryList.add(dto.getCategoryId());
CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList);
for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){
if (ca.getId().equals(dto.getCategoryId())) {
if(StringUtils.isNotBlank(ca.getParentCategoryName())){
//大类-子类
dto.setCategoryName(ca.getParentCategoryName().concat(StrConstant.HYPHEN).concat(ca.getCategoryName()));
}else{
dto.setCategoryName(ca.getCategoryName());
}
}
}
}
} }
} }
return new PageData<>(list, pageInfo.getTotal()); return new PageData<>(list, pageInfo.getTotal());

7
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml

@ -295,6 +295,7 @@
<result property="latestOperatedTime" column="latest_operated_time"></result> <result property="latestOperatedTime" column="latest_operated_time"></result>
<result property="satisfaction" column="satisfaction"/> <result property="satisfaction" column="satisfaction"/>
<result property="satisfactionName" column="satisfactionName" /> <result property="satisfactionName" column="satisfactionName" />
<result property="categoryId" column="category_id" />
<collection property="attachmentList" ofType="com.epmet.dto.IcEventAttachmentDTO" <collection property="attachmentList" ofType="com.epmet.dto.IcEventAttachmentDTO"
column="icEventId" select="com.epmet.dao.IcEventAttachmentDao.selectByIcEventId"/> column="icEventId" select="com.epmet.dao.IcEventAttachmentDao.selectByIcEventId"/>
</resultMap> </resultMap>
@ -324,9 +325,13 @@
case when ie.status='processing' and ie.OPERATION_TYPE is not null and ie.OPERATION_TYPE ='0' then 1 case when ie.status='processing' and ie.OPERATION_TYPE is not null and ie.OPERATION_TYPE ='0' then 1
else 0 else 0
end end
)as reply_flag )as reply_flag,
IFNULL(iec.category_id,'') AS category_id
FROM FROM
ic_event ie ic_event ie
LEFT JOIN ic_event_category iec
ON(ie.id = iec.ic_event_id
AND iec.del_flag = '0')
WHERE WHERE
ie.del_flag = '0' ie.del_flag = '0'
and ie.customer_id = #{customerId} and ie.customer_id = #{customerId}

Loading…
Cancel
Save