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. 7
      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
*/
@NotBlank(message = "排序类型不能为空",groups = {DifficultyRankInternalGroup.class})
@NotBlank(message = "排序类型不能为空", groups = {DifficultyRankInternalGroup.class})
private String type;
/**
* 获取数据个数 默认前10
@ -35,4 +35,9 @@ public class DifficultyRankFormDTO implements Serializable {
@Min(value = 1, groups = {DifficultyRankInternalGroup.class})
private Integer pageNo;
/**
* 组织类型: 网格grid 组织agency
*/
private String orgType;
}

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

@ -249,7 +249,14 @@
screen_difficulty_data diff
WHERE
diff.DEL_FLAG = '0'
<choose>
<when test="orgType != null and orgType == 'grid'">
AND diff.ORG_ID = #{agencyId,jdbcType=VARCHAR}
</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>

Loading…
Cancel
Save