Преглед на файлове

【ADD】检测表汇总接口

ZhaoMn преди 4 години
родител
ревизия
a09d6fc037

+ 29 - 1
railway-admin/src/main/java/com/railway/web/controller/business/catenary/BusJcebController.java

@@ -88,7 +88,35 @@ public class BusJcebController extends BaseController {
   @GetMapping(value = "listAll")
   public TableDataInfo listAll(JcebQueryVo query) {
     startPage();
-    List<JcebRecordVo> list = new ArrayList<>(); //qmjcjlService.getList(query);
+    List<JcebRecordVo> list = new ArrayList<>();
+    for(JcebTypeEnum jcebTypeEnum : JcebTypeEnum.values()){
+      JcebRecordVo jcebRecordVo = null;
+      switch (jcebTypeEnum){
+        case Jddz:
+          jcebRecordVo = jddzService.getCountByType(query);
+          break;
+        case Gjsfx:
+          jcebRecordVo = gjsfxService.getCountByType(query);
+          break;
+        case Qmjcjl:
+          jcebRecordVo = qmjcjlService.getCountByType(query);
+          break;
+        case Xsjcjl:
+          jcebRecordVo = xsjcjlService.getCountByType(query);
+          break;
+        case Jyzqsjl:
+          jcebRecordVo = jyzqsjlService.getCountByType(query);
+          break;
+        case Lbjghjl:
+          jcebRecordVo = lbjghjlService.getCountByType(query);
+          break;
+        default:
+          break;
+      }
+      if(null != jcebRecordVo) {
+        list.add(jcebRecordVo);
+      }
+    }
     return getDataTable(list);
   }
 

+ 3 - 0
railway-business/src/main/java/com/railway/business/catenary/domain/vo/JcebRecordVo.java

@@ -26,6 +26,9 @@ public class JcebRecordVo implements Serializable {
     @ApiModelProperty(value = "记录人/操作人")
     private String operator;
 
+    @ApiModelProperty(value = "记录数")
+    private int count;
+
     @ApiModelProperty(value = "记录日期/操作日期")
     private Date operationDate;
 }

+ 5 - 0
railway-business/src/main/java/com/railway/business/catenary/mapper/BusJcebMapper.java

@@ -32,6 +32,11 @@ public interface BusJcebMapper<T extends BusJceb> {
    */
   Page<JcebRecordVo> getListByType(JcebQueryVo query);
 
+  /**
+   * 查询列表
+   */
+  JcebRecordVo getCountByType(JcebQueryVo query);
+
   /**
    * 新增
    */

+ 5 - 0
railway-business/src/main/java/com/railway/business/catenary/service/IBusJcebService.java

@@ -36,6 +36,11 @@ public interface IBusJcebService<T extends BusJceb> {
      */
     Page<JcebRecordVo> getListByType(JcebQueryVo query);
 
+    /**
+     * 查询列表
+     */
+    JcebRecordVo getCountByType(JcebQueryVo query);
+
     /**
      * 查询列表
      */

+ 8 - 0
railway-business/src/main/java/com/railway/business/catenary/service/impl/BusJcebServiceImpl.java

@@ -49,6 +49,14 @@ public abstract class BusJcebServiceImpl<T extends BusJceb> implements IBusJcebS
 		return busJcebMapper.getListByType(query);
 	}
 
+	/**
+	 * 查询列表
+	 */
+	@Override
+	public JcebRecordVo getCountByType(JcebQueryVo query) {
+		return busJcebMapper.getCountByType(query);
+	}
+
 	/**
 	 * 提交
 	 */

+ 23 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebGjsfxMapper.xml

@@ -383,4 +383,27 @@
     </where>
   </select>
 
+  <resultMap id="JcebCountResultMap" type="com.railway.business.catenary.domain.vo.JcebRecordVo">
+    <result column="c" property="count"/>
+    <result column="operation_date" property="operationDate"/>
+  </resultMap>
+
+  <select id="getCountByType" resultMap="JcebCountResultMap">
+    SELECT count(*) c, max(t.operation_date) as operation_date
+    FROM bus_jceb_gjsfx t
+    LEFT JOIN v_station v on t.station_id = v.station_id
+    <where>
+      t.del_flag='0'
+      <if test="stationId!=null and stationId!=''">
+        and t.station_id=#{stationId}
+      </if>
+      <if test="pillarCode!=null and pillarCode!=''">
+        and t.pillar_start=#{pillarCode}
+      </if>
+      <if test="operator!=null and operator!=''">
+        and t.operator=#{operator}
+      </if>
+    </where>
+  </select>
+
 </mapper>

+ 23 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebJddzMapper.xml

@@ -301,4 +301,27 @@
     </where>
   </select>
 
+  <resultMap id="JcebCountResultMap" type="com.railway.business.catenary.domain.vo.JcebRecordVo">
+    <result column="c" property="count"/>
+    <result column="operation_date" property="operationDate"/>
+  </resultMap>
+
+  <select id="getCountByType" resultMap="JcebCountResultMap">
+    SELECT count(*) c, max(t.operation_date) as operation_date
+    FROM bus_jceb_jddz t
+    LEFT JOIN v_station v on t.station_id = v.station_id
+    <where>
+      t.del_flag='0'
+      <if test="stationId!=null and stationId!=''">
+        and t.station_id=#{stationId}
+      </if>
+      <if test="pillarCode!=null and pillarCode!=''">
+        and t.pillar_start=#{pillarCode}
+      </if>
+      <if test="operator!=null and operator!=''">
+        and t.operator=#{operator}
+      </if>
+    </where>
+  </select>
+
 </mapper>

+ 23 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebJyzqsjlMapper.xml

@@ -270,4 +270,27 @@
     </where>
   </select>
 
+  <resultMap id="JcebCountResultMap" type="com.railway.business.catenary.domain.vo.JcebRecordVo">
+    <result column="c" property="count"/>
+    <result column="operation_date" property="operationDate"/>
+  </resultMap>
+
+  <select id="getCountByType" resultMap="JcebCountResultMap">
+    SELECT count(*) c, max(t.operation_date) as operation_date
+    FROM bus_jceb_jyzqsjl t
+    LEFT JOIN v_station v on t.station_id = v.station_id
+    <where>
+      t.del_flag='0'
+      <if test="stationId!=null and stationId!=''">
+        and t.station_id=#{stationId}
+      </if>
+      <if test="pillarCode!=null and pillarCode!=''">
+        and t.pillar_start=#{pillarCode}
+      </if>
+      <if test="operator!=null and operator!=''">
+        and t.operator=#{operator}
+      </if>
+    </where>
+  </select>
+
 </mapper>

+ 23 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebLbjghjlMapper.xml

@@ -305,4 +305,27 @@
     </where>
   </select>
 
+  <resultMap id="JcebCountResultMap" type="com.railway.business.catenary.domain.vo.JcebRecordVo">
+    <result column="c" property="count"/>
+    <result column="operation_date" property="operationDate"/>
+  </resultMap>
+
+  <select id="getCountByType" resultMap="JcebCountResultMap">
+    SELECT count(*) c, max(t.operation_date) as operation_date
+    FROM bus_jceb_lbjghjl t
+    LEFT JOIN v_station v on t.station_id = v.station_id
+    <where>
+      t.del_flag='0'
+      <if test="stationId!=null and stationId!=''">
+        and t.station_id=#{stationId}
+      </if>
+      <if test="pillarCode!=null and pillarCode!=''">
+        and t.pillar_start=#{pillarCode}
+      </if>
+      <if test="operator!=null and operator!=''">
+        and t.operator=#{operator}
+      </if>
+    </where>
+  </select>
+
 </mapper>

+ 23 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebQmjcjlMapper.xml

@@ -348,4 +348,27 @@
     </where>
   </select>
 
+  <resultMap id="JcebCountResultMap" type="com.railway.business.catenary.domain.vo.JcebRecordVo">
+    <result column="c" property="count"/>
+    <result column="operation_date" property="operationDate"/>
+  </resultMap>
+
+  <select id="getCountByType" resultMap="JcebCountResultMap">
+    SELECT count(*) c, max(t.operation_date) as operation_date
+    FROM bus_jceb_qmjcjl t
+    LEFT JOIN v_station v on t.station_id = v.station_id
+    <where>
+      t.del_flag='0'
+      <if test="stationId!=null and stationId!=''">
+        and t.station_id=#{stationId}
+      </if>
+      <if test="pillarCode!=null and pillarCode!=''">
+        and t.pillar_start=#{pillarCode}
+      </if>
+      <if test="operator!=null and operator!=''">
+        and t.operator=#{operator}
+      </if>
+    </where>
+  </select>
+
 </mapper>

+ 23 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebXsjcjlMapper.xml

@@ -331,4 +331,27 @@
     </where>
   </select>
 
+  <resultMap id="JcebCountResultMap" type="com.railway.business.catenary.domain.vo.JcebRecordVo">
+    <result column="c" property="count"/>
+    <result column="operation_date" property="operationDate"/>
+  </resultMap>
+
+  <select id="getCountByType" resultMap="JcebCountResultMap">
+    SELECT count(*) c, max(t.operation_date) as operation_date
+    FROM bus_jceb_xsjcjl t
+    LEFT JOIN v_station v on t.station_id = v.station_id
+    <where>
+      t.del_flag='0'
+      <if test="stationId!=null and stationId!=''">
+        and t.station_id=#{stationId}
+      </if>
+      <if test="pillarCode!=null and pillarCode!=''">
+        and t.pillar_start=#{pillarCode}
+      </if>
+      <if test="operator!=null and operator!=''">
+        and t.operator=#{operator}
+      </if>
+    </where>
+  </select>
+
 </mapper>