Browse Source

【BUG】修改发现的问题。

fenghao 4 years ago
parent
commit
bb7e05fae5

+ 6 - 0
railway-business/src/main/java/com/railway/business/catenary/domain/BusJlgz.java

@@ -63,6 +63,12 @@ public class BusJlgz extends BaseEntity{
     @Length(min = 1, max = 1, message = "【del_flag】长度必须介于 {min} 和 {max} 之间")
     private String delFlag;
 
+    @ApiModelProperty(value = "要排序的列")
+    private String orderBy;
+
+    @ApiModelProperty(value = "1-ASC 正序排序,0-DESC 倒序排序")
+    private String isAsc;
+
     private List<BusJlgzPic> pics;
 
 }

+ 6 - 1
railway-business/src/main/resources/mapper/baseinfo/BusFjxgmdMapper.xml

@@ -153,7 +153,10 @@
     LEFT JOIN v_station v ON t.station_id = v.station_id
     LEFT JOIN sys_dict_data dict1 ON (t.xingbie = dict1.dict_value AND dict1.dict_type = 'xingbie')
     LEFT JOIN sys_dict_data dict2 ON (t.fjlx = dict2.dict_value AND dict2.dict_type = 'fjlx')
-    WHERE t.del_flag = '0' AND t.id = #{id}
+    WHERE t.del_flag = '0'
+      and dict1.status =  '0'
+      and dict2.status =  '0'
+      and t.id = #{id}
   </select>
 
   <select id="getList" resultMap="BaseResultMap">
@@ -173,6 +176,8 @@
     LEFT JOIN sys_dict_data dict2 ON (t.fjlx = dict2.dict_value AND dict2.dict_type = 'fjlx')
     <where>
       t.del_flag = '0'
+      and dict1.status =  '0'
+      and dict2.status =  '0'
       <if test="deptId!=null and deptId!=''">
         and v.dept_id=#{deptId}
       </if>

+ 9 - 7
railway-business/src/main/resources/mapper/catenary/BusJcbGlkgMapper.xml

@@ -938,22 +938,24 @@
 
   <select id="getLastOne" resultMap="BaseResultMap">
     SELECT
-    <include refid="Base_Column_List"/>
+      s.station_name,
+      a.*
     FROM
-    bus_jcb_glkg
+        bus_jcb_glkg a
+    LEFT JOIN base_station s ON a.station_id = s.station_id
     WHERE
-    del_flag = '0' and submit_state in ('1','9')
+        a.del_flag = '0' and a.submit_state in ('1','9')
     <if test="stationId!=null and stationId!=''">
-      and station_id=#{stationId}
+      and a.station_id=#{stationId}
     </if>
     <if test="pillarCode!=null and pillarCode!=''">
-      and pillar_code=#{pillarCode}
+      and a.pillar_code=#{pillarCode}
     </if>
     <if test="kgh!=null and kgh!=''">
-      and kgh=#{kgh}
+      and a.kgh=#{kgh}
     </if>
     ORDER BY
-    update_time DESC
+        a.update_time DESC
     LIMIT 1
   </select>
 

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

@@ -186,6 +186,8 @@
       t.del_flag = '0'
       AND line.del_flag = '0'
       AND sub.del_flag = '0'
+      AND dict1.status =  '0'
+      AND dict2.status =  '0'
       <if test="lineId!=null and lineId!=''">
         and t.line_id=#{lineId}
       </if>
@@ -223,7 +225,7 @@
         and t.del_flag=#{delFlag}
       </if>
     </where>
-<!--    <if test="orderBy!=null and orderBy!=''">
+    <if test="orderBy!=null and orderBy!=''">
       order by t.${orderBy}
     </if>
     <if test="isAsc!=null and isAsc!=''">
@@ -234,7 +236,6 @@
         desc
       </if>
     </if>
--->
   </select>
 
   <select id="getListByZz" resultType="com.railway.business.catenary.domain.vo.BusJlgzListByZzVo">