소스 검색

【TODO】屏蔽新增检测表

ZhaoMn 3 년 전
부모
커밋
e520c30d8b

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

@@ -264,7 +264,7 @@ public class BusJcebController extends BaseController {
           jcebRecordVo = lbjghjlService.getCountByType(query);
           break;
         case Fzswjfxc:
-          jcebRecordVo = fzswjfxcService.getCountByType(query);
+          // jcebRecordVo = fzswjfxcService.getCountByType(query);
           break;
         case Blq:
           jcebRecordVo = blqService.getCountByType(query);

+ 30 - 10
railway-business/src/main/resources/mapper/catenary/BusJcebFzswjfxcMapper.xml

@@ -327,7 +327,7 @@
         and cxzxdzxlcz=#{cxzxdzxlcz}
       </if>
       <if test="operator!=null and operator!=''">
-        and operator=#{operator}
+        and t.operator like concat('%', #{operator}, '%')
       </if>
       <if test="remark!=null and remark!=''">
         and remark=#{remark}
@@ -335,20 +335,40 @@
       <if test="submitState!=null and submitState!=''">
         and submit_state=#{submitState}
       </if>
-      <if test="delFlag!=null and delFlag!=''">
-        and del_flag=#{delFlag}
-      </if>
       <if test="createBy!=null and createBy!=''">
         and create_by=#{createBy}
       </if>
-      <if test="createTime!=null and createTime!=''">
-        and create_time=#{createTime}
+    </where>
+  </select>
+
+  <resultMap id="JcebCountResultMap" type="com.railway.business.catenary.domain.vo.JcebCountVo">
+    <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_fzswjfxc t
+    LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
+    <where>
+      t.del_flag='0'
+      <if test="submitState!=null and submitState!=''">
+        and t.submit_state <![CDATA[ >= ]]> #{submitState}
+      </if>
+      <if test="deptId!=null and deptId!=''">
+        and v.dept_id=#{deptId}
       </if>
-      <if test="updateBy!=null and updateBy!=''">
-        and update_by=#{updateBy}
+      <if test="stationId!=null and stationId!=''">
+        and v.station_id=#{stationId}
+      </if>
+      <if test="pillarCode!=null and pillarCode!=''">
+        and t.pillar_start=#{pillarCode}
       </if>
-      <if test="updateTime!=null and updateTime!=''">
-        and update_time=#{updateTime}
+      <if test="operator!=null and operator!=''">
+        and t.operator like concat('%', #{operator}, '%')
+      </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
       </if>
     </where>
   </select>