Bladeren bron

【CHG】减少查询条件

zhaomn 2 jaren geleden
bovenliggende
commit
3197087025

+ 2 - 1
railway-business/src/main/java/com/railway/business/bi/controller/ShowDlycController.java

@@ -1,6 +1,7 @@
 package com.railway.business.bi.controller;
 
 import com.railway.business.bi.domain.ShowDlyc;
+import com.railway.business.bi.domain.vo.DlycQuery;
 import com.railway.business.bi.service.IShowDlycService;
 import com.railway.common.core.controller.BaseController;
 import com.railway.common.core.page.TableDataInfo;
@@ -29,7 +30,7 @@ public class ShowDlycController extends BaseController {
 
   @ApiOperation(value = "列表")
   @GetMapping(value = "/list")
-  public TableDataInfo getList(ShowDlyc showDlyc) {
+  public TableDataInfo getList(DlycQuery showDlyc) {
     startPage();
     List<ShowDlyc> list = showDlycService.getList(showDlyc);
     return getDataTable(list);

+ 32 - 0
railway-business/src/main/java/com/railway/business/bi/domain/vo/DlycQuery.java

@@ -0,0 +1,32 @@
+package com.railway.business.bi.domain.vo;
+
+import com.railway.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.hibernate.validator.constraints.Length;
+
+/**
+ * 大屏展示-电力异常信息详情表
+ *
+ * @author author 2023-01-30
+ */
+@Data
+@ApiModel("大屏展示-电力异常信息查询条件")
+@EqualsAndHashCode(callSuper = false)
+public class DlycQuery implements Serializable {
+
+  private static final long serialVersionUID = 1L;
+
+  @ApiModelProperty(value = "工区")
+  @Length(min = 1, max = 255)
+  private String ssgq;
+
+  @ApiModelProperty(value = "严重性")
+  @Length(min = 1, max = 255)
+  private String gravity;
+
+}

+ 2 - 1
railway-business/src/main/java/com/railway/business/bi/mapper/ShowDlycMapper.java

@@ -2,6 +2,7 @@ package com.railway.business.bi.mapper;
 
 import com.github.pagehelper.Page;
 import com.railway.business.bi.domain.ShowDlyc;
+import com.railway.business.bi.domain.vo.DlycQuery;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
@@ -39,6 +40,6 @@ public interface ShowDlycMapper {
   /**
    * 查询列表
    */
-  Page<ShowDlyc> getList(ShowDlyc showDlyc);
+  Page<ShowDlyc> getList(DlycQuery showDlyc);
 
 }

+ 2 - 1
railway-business/src/main/java/com/railway/business/bi/service/IShowDlycService.java

@@ -1,6 +1,7 @@
 package com.railway.business.bi.service;
 
 import com.railway.business.bi.domain.ShowDlyc;
+import com.railway.business.bi.domain.vo.DlycQuery;
 import java.util.List;
 /**
 * 大屏展示-电力异常信息详情表
@@ -32,6 +33,6 @@ public interface IShowDlycService{
     /**
     * 查询列表
     */
-    List<ShowDlyc> getList(ShowDlyc showDlyc);
+    List<ShowDlyc> getList(DlycQuery showDlyc);
 
 }

+ 2 - 1
railway-business/src/main/java/com/railway/business/bi/service/impl/ShowDlycServiceImpl.java

@@ -1,6 +1,7 @@
 package com.railway.business.bi.service.impl;
 
 import com.railway.business.bi.domain.ShowDlyc;
+import com.railway.business.bi.domain.vo.DlycQuery;
 import com.railway.business.bi.mapper.ShowDlycMapper;
 import com.railway.business.bi.service.IShowDlycService;
 import com.railway.common.utils.SecurityUtils;
@@ -68,7 +69,7 @@ public class ShowDlycServiceImpl implements IShowDlycService {
   /**
    * 查询列表
    */
-  public List<ShowDlyc> getList(ShowDlyc showDlyc) {
+  public List<ShowDlyc> getList(DlycQuery showDlyc) {
     return showDlycMapper.getList(showDlyc);
   }
 }

+ 0 - 36
railway-business/src/main/resources/mapper/bi/ShowDlycMapper.xml

@@ -176,48 +176,12 @@
     FROM show_dlyc
     <where>
       del_flag='0'
-      <if test="qxsbmc!=null and qxsbmc!=''">
-        and qxsbmc=#{qxsbmc}
-      </if>
       <if test="ssgq!=null and ssgq!=''">
         and ssgq=#{ssgq}
       </if>
-      <if test="sdjb!=null and sdjb!=''">
-        and sdjb=#{sdjb}
-      </if>
-      <if test="lineName!=null and lineName!=''">
-        and line_name=#{lineName}
-      </if>
-      <if test="foundDate!=null and foundDate!=''">
-        and found_date=#{foundDate}
-      </if>
-      <if test="qxnr!=null and qxnr!=''">
-        and qxnr=#{qxnr}
-      </if>
-      <if test="gzlb!=null and gzlb!=''">
-        and gzlb=#{gzlb}
-      </if>
-      <if test="reason!=null and reason!=''">
-        and reason=#{reason}
-      </if>
       <if test="gravity!=null and gravity!=''">
         and gravity=#{gravity}
       </if>
-      <if test="rectifyWay!=null and rectifyWay!=''">
-        and rectify_way=#{rectifyWay}
-      </if>
-      <if test="rectifyResult!=null and rectifyResult!=''">
-        and rectify_result=#{rectifyResult}
-      </if>
-      <if test="rectifyUser!=null and rectifyUser!=''">
-        and rectify_user=#{rectifyUser}
-      </if>
-      <if test="rectifyDate!=null and rectifyDate!=''">
-        and rectify_date=#{rectifyDate}
-      </if>
-      <if test="counted!=null and counted!=''">
-        and counted=#{counted}
-      </if>
     </where>
   </select>