Browse Source

feat:监督检查-添加堤防查询条件及返回工程对象名称

master_tdsql
huangrenya 1 year ago
parent
commit
a7d8f8cd8d
  1. 11
      shuili-system/src/main/java/com/kms/yxgh/df/dto/DfSuperviseProblemListDto.java
  2. 5
      shuili-system/src/main/java/com/kms/yxgh/df/dto/DfSuperviseTaskDto.java
  3. 12
      shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfSuperviseProblemMapper.java
  4. 2
      shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfSuperviseTaskMapper.java
  5. 7
      shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfSuperviseWayProjectItemMapper.java
  6. 10
      shuili-system/src/main/java/com/kms/yxgh/df/service/DfSuperviseWayService.java

11
shuili-system/src/main/java/com/kms/yxgh/df/dto/DfSuperviseProblemListDto.java

@ -71,4 +71,15 @@ public class DfSuperviseProblemListDto {
@ApiModelProperty(value = "操作状态")
private String status;
/**
* 所属流域
*/
@ApiModelProperty(value = "所属流域")
private String riverLocation;
/**
* 堤防类型
*/
@ApiModelProperty(value = "堤防类型")
private String dikeType;
}

5
shuili-system/src/main/java/com/kms/yxgh/df/dto/DfSuperviseTaskDto.java

@ -30,6 +30,11 @@ public class DfSuperviseTaskDto {
@ApiModelProperty("堤防代码")
private String dikeCode;
/**
* 工程对象
*/
@ApiModelProperty("工程对象")
private String dikeName;
/**
* 管理单位

12
shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfSuperviseProblemMapper.java

@ -59,7 +59,7 @@ public interface DfSuperviseProblemMapper extends BaseMapper<DfSuperviseProblem>
LEFT_OUTER_JOIN("bs_sgc_df_jdjcbfxmnr nr on wt.project_item_id = nr.id");
LEFT_OUTER_JOIN("bs_sgc_df_jdjcrw rw on wt.TASK_ID = rw.id");
LEFT_OUTER_JOIN("(SELECT DISTINCT xx.ID,xx.DIKE_CODE AS dikeCode,xx.DIKE_NAME AS dikeName,xx.adcd,gl.engineering_management_unit as engineeringManagementUnit\n" +
"\tFROM bs_sgc_df_jbxx xx LEFT OUTER JOIN bs_sgc_df_gcgl gl ON xx.dike_code = gl.dike_code \n" +
"\tFROM bs_sgc_df_gcda xx LEFT OUTER JOIN bs_sgc_df_gcgl gl ON xx.dike_code = gl.dike_code \n" +
"\tWHERE xx.EXPR_DATE IS NULL AND gl.EXPR_DATE IS NULL) xx ON rw.dike_code = xx.dike_code");
WHERE("1=1");
WHERE("wt.status is not null");
@ -112,14 +112,18 @@ public interface DfSuperviseProblemMapper extends BaseMapper<DfSuperviseProblem>
"sum(IF(wt.level='0', 1, 0)) as same,sum(IF(wt.level='1', 1, 0)) as heavy,sum(IF(wt.level='2', 1, 0)) as serious ");
FROM("bs_sgc_df_jdjcgcwt wt");
LEFT_OUTER_JOIN("bs_sgc_df_jdjcrw rw on wt.TASK_ID = rw.id");
LEFT_OUTER_JOIN("bs_sgc_df_jbxx xx on xx.dike_code = rw.dike_code");
LEFT_OUTER_JOIN("bs_sgc_df_gcda xx on xx.dike_code = rw.dike_code");
LEFT_OUTER_JOIN("bs_sgc_df_gcgl gl on xx.dike_code = gl.dike_code");
WHERE("xx.EXPR_DATE IS NULL AND gl.EXPR_DATE IS NULL");
DfSuperviseProblemListDto dto = (DfSuperviseProblemListDto) param.get("dto");
if (dto != null) {
// todo 所属流域
// todo 工程类型
if (StringUtils.isNotBlank(dto.getRiverLocation())) {
WHERE("xx.river_location = #{dto.riverLocation}");
}
if (StringUtils.isNotBlank(dto.getDikeType())) {
WHERE("xx.dike_type = #{dto.dikeType}");
}
// 行政区划
if (StringUtils.isNotBlank(dto.getAdcd())) {
WHERE("xx.adcd = #{dto.adcd}");

2
shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfSuperviseTaskMapper.java

@ -57,7 +57,7 @@ public interface DfSuperviseTaskMapper extends BaseMapper<DfSuperviseTask> {
class DfSuperviseTaskDetailProvider {
public String selectTaskInfo(final Map<String, Object> param) {
return new SQL() {{
SELECT("rw.id, rw.name, rw.CREATE_TIME as createTime,rw.weather,rw.inspectors,gl.ENGINEERING_MANAGEMENT_UNIT as engineeringManagementUnit, " +
SELECT("rw.id, rw.name, rw.CREATE_TIME as createTime,rw.weather,rw.inspectors,xx.DIKE_NAME as dikeName,gl.ENGINEERING_MANAGEMENT_UNIT as engineeringManagementUnit, " +
"xx.DIKE_NAME as dikeName, xx.DIKE_CODE as dikeCode, xx.DIKE_TYPE as dikeType");
FROM("bs_sgc_df_jdjcrw rw");
LEFT_OUTER_JOIN("bs_sgc_df_gcda xx ON xx.dike_code = rw.dike_code");

7
shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfSuperviseWayProjectItemMapper.java

@ -25,8 +25,8 @@ public interface DfSuperviseWayProjectItemMapper extends BaseMapper<DfSuperviseW
*/
@Select("<script>" +
"SELECT xm.name as projectName, nr.project_id as projectId, nr.id, nr.content, nr.same_grade as sameGrade, nr.heavy_grade as heavyGrade, nr.serious_grade as seriousGrade " +
"FROM bs_sgc_df_jdjcbfxm xm " +
"LEFT JOIN bs_sgc_df_jdjcbfxmnr nr ON xm.id = nr.project_id" +
"FROM bs_sgc_df_jdjcbfxmnr nr " +
"LEFT JOIN bs_sgc_df_jdjcbfxm xm ON xm.id = nr.project_id " +
"WHERE 1=1 " +
"<if test='dto.projectId != null and dto.projectId != \"\"'>" +
"AND xm.id = #{dto.projectId} " +
@ -34,6 +34,9 @@ public interface DfSuperviseWayProjectItemMapper extends BaseMapper<DfSuperviseW
"<if test='dto.id != null and dto.id != \"\"'>" +
"AND nr.id = #{dto.id} " +
"</if>" +
"<if test='dto.content != null and dto.content != \"\"'>" +
"AND nr.content like concat('%', #{dto.content}, '%') " +
"</if>" +
"ORDER BY xm.create_time DESC" +
"</script>")
List<DfSuperviseWayProjectItemDto> selectItemList(@Param("dto") DfSuperviseWayProjectItemDto dto);

10
shuili-system/src/main/java/com/kms/yxgh/df/service/DfSuperviseWayService.java

@ -182,15 +182,7 @@ public class DfSuperviseWayService extends BaseService<DfSuperviseWayMapper, DfS
public List<DfSuperviseWayProjectItemDto> getDataItemList(DfSuperviseWayProjectItemDto dto) {
// 条件查询监督检查项目内容信息
LambdaQueryWrapper<DfSuperviseWayProjectItem> queryWrapper = new LambdaQueryWrapper<>();
if (StringUtils.isNotBlank(dto.getProjectId())) {
queryWrapper.eq(DfSuperviseWayProjectItem::getProjectId, dto.getProjectId());
}
if (StringUtils.isNotBlank(dto.getContent())) {
queryWrapper.like(DfSuperviseWayProjectItem::getContent, dto.getContent());
}
List<DfSuperviseWayProjectItem> listData = projectItemMapper.selectList(queryWrapper);
return listData.stream().map(item -> BeanCopyUtils.copy(item, DfSuperviseWayProjectItemDto.class)).collect(Collectors.toList());
return projectItemMapper.selectItemList(dto);
}
public DfSuperviseWayProjectItemDto getDataItemById(String id) {

Loading…
Cancel
Save