Parcourir la source

【CHG】改进智能查询历史故障,对锚。

fenghao il y a 4 ans
Parent
commit
6865a412f3

+ 2 - 0
railway-business/src/main/resources/mapper/baseinfo/BusFjxgmdMapper.xml

@@ -160,6 +160,7 @@
 
   <select id="getList" resultMap="BaseResultMap">
     SELECT
+      DISTINCT
       v.dept_name,
       v.line_name,
       v.station_name,
@@ -223,6 +224,7 @@
   <select id="getListByZz" resultMap="BaseResultMap">
 
       SELECT
+        DISTINCT
         a.id,
         v.dept_id,
         v.dept_name,

+ 3 - 2
railway-business/src/main/resources/mapper/catenary/BusJlgzMapper.xml

@@ -159,6 +159,7 @@
 
   <select id="getList" resultMap="BaseResultMap">
     SELECT
+    DISTINCT
     dict1.dict_label as xingbie_text,
     dict2.dict_label as yylx_text,
     <include refid="Base_Column_List"/>
@@ -188,7 +189,7 @@
         and t.yylx=#{yylx}
       </if>
       <if test="operationDate!=null and operationDate!=''">
-        and t.operation_date=#{operationDate}
+        and STR_TO_DATE(t.operation_date,'%Y-%m-%d')=#{operationDate}
       </if>
       <if test="gzms!=null and gzms!=''">
         and t.gzms=#{gzms}
@@ -210,7 +211,7 @@
       </if>
     </where>
     <if test="orderBy!=null and orderBy!=''">
-      order by t.${orderBy}
+      order by STR_TO_DATE(t.${orderBy},'%Y-%m-%d')
     </if>
     <if test="isAsc!=null and isAsc!=''">
       <if test="isAsc == '1'.toString()">