Browse Source

难点堵点 查询 如果查询条件为grid 则查询orgId

master
jianjun 5 years ago
parent
commit
a28bcd4add
  1. 7
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/DifficultyRankFormDTO.java
  2. 15
      epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml

7
epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/DifficultyRankFormDTO.java

@ -26,7 +26,7 @@ public class DifficultyRankFormDTO implements Serializable {
/** /**
* 排序类型 耗时最长timelongest涉及部门最多mostdepts处理次数mosthandled * 排序类型 耗时最长timelongest涉及部门最多mostdepts处理次数mosthandled
*/ */
@NotBlank(message = "排序类型不能为空",groups = {DifficultyRankInternalGroup.class}) @NotBlank(message = "排序类型不能为空", groups = {DifficultyRankInternalGroup.class})
private String type; private String type;
/** /**
* 获取数据个数 默认前10 * 获取数据个数 默认前10
@ -35,4 +35,9 @@ public class DifficultyRankFormDTO implements Serializable {
@Min(value = 1, groups = {DifficultyRankInternalGroup.class}) @Min(value = 1, groups = {DifficultyRankInternalGroup.class})
private Integer pageNo; private Integer pageNo;
/**
* 组织类型: 网格grid 组织agency
*/
private String orgType;
} }

15
epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml

@ -249,10 +249,17 @@
screen_difficulty_data diff screen_difficulty_data diff
WHERE WHERE
diff.DEL_FLAG = '0' diff.DEL_FLAG = '0'
AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%') <choose>
<if test="status!= null and status != ''"> <when test="orgType != null and orgType == 'grid'">
AND diff.EVENT_STATUS_CODE = #{status} AND diff.ORG_ID = #{agencyId,jdbcType=VARCHAR}
</if> </when>
<otherwise>
AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%')
</otherwise>
</choose>
<if test="status!= null and status != ''">
AND diff.EVENT_STATUS_CODE = #{status}
</if>
ORDER BY ORDER BY
CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME
WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT

Loading…
Cancel
Save