Browse Source

大屏满意度饼图调用列表接口单独写

feature/dangjian
sunyuchao 3 years ago
parent
commit
b599b2807f
  1. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDao.java
  2. 8
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
  3. 40
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

2
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDao.java

@ -522,4 +522,6 @@ public interface ItemDao extends BaseDao<ItemEntity> {
void updateBatchBySerialNum(@Param("updateList") List<String> updateList); void updateBatchBySerialNum(@Param("updateList") List<String> updateList);
List<ItemListByAddressResultDTO> getItemListByAddress(Map<String, Object> params); List<ItemListByAddressResultDTO> getItemListByAddress(Map<String, Object> params);
List<ItemStatisListPageResultDTO> getevaluationList(Map<String, Object> params);
} }

8
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java

@ -4097,7 +4097,13 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
params.put("statDate", df.format(d)); params.put("statDate", df.format(d));
} }
List<ItemStatisListPageResultDTO> list = baseDao.getItemStatisListPage(params); List<ItemStatisListPageResultDTO> list = new ArrayList<>();
if(!params.isEmpty() && params.containsKey("evaluationScore") && null != params.get("evaluationScore")){
list = baseDao.getevaluationList(params);
}else {
list = baseDao.getItemStatisListPage(params);
}
return new PageData<>(list, page.getTotal()); return new PageData<>(list, page.getTotal());
} }

40
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

@ -2881,6 +2881,46 @@
a.all_dept_ids ASC a.all_dept_ids ASC
</select> </select>
<select id="getevaluationList" resultType="com.elink.esua.epdc.dto.item.result.ItemStatisListPageResultDTO">
SELECT
item.id,
item.item_content,
item.item_state,
item.nick_name,
item.mobile,
item.created_time,
item.serial_num,
item.grid AS gridName,
SUBSTRING_INDEX(REPLACE (item.parent_dept_names, '市北区委-', ''), '-', 1) AS streetName,
SUBSTRING_INDEX(REPLACE (item.parent_dept_names, '市北区委-', ''), '-' ,- 1) AS communityName,
item.people_flag
FROM
epdc_item item
WHERE
item.del_flag = '0'
and item.IS_PEOPLE = '1'
and item.EVENT_ID is null
and item.ISSUE_ID is null
and SUBSTRING_INDEX(item.CATEGORY_FULL_NAME,'-',1) != '其他'
<choose>
<when test="startTime != null and startTime != '' and endTime != null and endTime != '">
AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
</when>
<otherwise>
AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) <![CDATA[ <= ]]> DATE_FORMAT(date_sub(now(),interval 1 day),'%Y-%m-%d')
</otherwise>
</choose>
<if test="deptId != null and deptId != ''">
AND find_in_set(#{deptId},item.ALL_DEPT_IDS)
</if>
<if test="peopleFlag != null and peopleFlag != ''">
AND item.PEOPLE_FLAG = #{peopleFlag}
</if>
and item.EVALUATION_SCORE is not null
group by item.EVALUATION_SCORE
ORDER BY count(item.ID) desc
</select>
<update id="updateBatchBySerialNum"> <update id="updateBatchBySerialNum">
UPDATE UPDATE
epdc_item epdc_item

Loading…
Cancel
Save