Browse Source

fix: 添加行政区划检索逻辑

master_tdsql
hxh 9 months ago
parent
commit
732909bf83
  1. 4
      shuili-system/src/main/java/com/kms/yg/df/mapper/BsSgcDfSafeJbxxMapper.java
  2. 5
      shuili-system/src/main/java/com/kms/yxgh/df/dto/DfPlanSearchDto.java
  3. 3
      shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfPlanMapper.java

4
shuili-system/src/main/java/com/kms/yg/df/mapper/BsSgcDfSafeJbxxMapper.java

@ -170,8 +170,8 @@ public interface BsSgcDfSafeJbxxMapper extends BaseMapper<BsSgcDfSafeJbxx> {
"<if test='dto.dikeType != null and dto.dikeType != \"\"'>",
"and df.dike_type = #{dto.dikeType} ",
"</if>",
"<if test='dto.adcd != null and dto.adcd != \"\"'>",
"and df.adcd like concat(#{dto.adcd}, '%') ",
"<if test='dto.adcdQx != null and dto.adcdQx != \"\"'>",
"and df.adcd like concat(#{dto.adcdQx}, '%') ",
"</if>",
"and EXISTS (SELECT 1 FROM bs_sgc_df_xslx line WHERE line.dike_code = df.dike_code ",
"<if test='dto.lineName != null and dto.lineName != \"\"'>",

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

@ -1,5 +1,6 @@
package com.kms.yxgh.df.dto;
import com.kms.yxgh.common.dto.IAdcd;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -9,7 +10,7 @@ import java.util.List;
@Data
@ApiModel(value = "堤防巡视检查计划查询")
public class DfPlanSearchDto {
public class DfPlanSearchDto implements IAdcd {
@ApiModelProperty(value = "堤防编号")
private String dikeCode;
@ -26,4 +27,6 @@ public class DfPlanSearchDto {
private Date startTime;
@ApiModelProperty(value = "结束时间")
private Date endTime;
@ApiModelProperty(value = "行政区划")
private String adcd;
}

3
shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfPlanMapper.java

@ -53,6 +53,9 @@ public interface DfPlanMapper extends BaseMapper<DfPlan> {
"<if test='dto != null and dto.endTime != null'>" +
"AND p.end_date &lt;= #{dto.endTime} " +
"</if>" +
"<if test='dto != null and dto.adcdQx != null and dto.adcdQx != \"\"'>" +
"AND df.adcd like concat(#{dto.adcdQx}, '%') " +
"</if>" +
"<if test='dto != null and dto.recordStatus != null and dto.recordStatus == \"0\"'>" +
" and NOT EXISTS (" +
" SELECT plan_id FROM bs_sgc_df_xsjhjl od WHERE p.id = od.plan_id and od.create_uid = #{dto.user} and od.status = '1'" +

Loading…
Cancel
Save