Commit e288d8cb authored by 史志龙's avatar 史志龙

Merge branch 'dev-szl' into 'dev'

解决bug--shizhilong

See merge request !30
parents 8c78a6b2 bd8ec01d
...@@ -23,6 +23,8 @@ import java.util.Date; ...@@ -23,6 +23,8 @@ import java.util.Date;
public class UseTurnoutRecordCheckDTO { public class UseTurnoutRecordCheckDTO {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("批次编码")
private String ekCode;
@ApiModelProperty("道岔编码") @ApiModelProperty("道岔编码")
private String turnoutCode; private String turnoutCode;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
FROM FROM
t_ek_curve_wear_record t1 t_ek_curve_wear_record t1
LEFT JOIN t_ek_records_master_check t2 ON t1.records_master_check_id = t2.id LEFT JOIN t_ek_records_master_check t2 ON t1.records_master_check_id = t2.id
left join t_sn_light_rail t3 on t2.light_rail_id = t3.id
WHERE t1.del_flag = '0' WHERE t1.del_flag = '0'
<if test="dto.ekCode != null and dto.ekCode != ''"> <if test="dto.ekCode != null and dto.ekCode != ''">
AND t2.ek_code like concat('%',#{dto.ekCode},'%') AND t2.ek_code like concat('%',#{dto.ekCode},'%')
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
<if test="dto.endTime != null"> <if test="dto.endTime != null">
AND t2.check_time <![CDATA[ <= ]]> #{dto.endTime} AND t2.check_time <![CDATA[ <= ]]> #{dto.endTime}
</if> </if>
AND t3.status = 1
GROUP BY t1.curve_code GROUP BY t1.curve_code
</select> </select>
<select id="getDetail" <select id="getDetail"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
FROM FROM
t_ek_rail_wear_record t1 t_ek_rail_wear_record t1
LEFT JOIN t_ek_records_master_check t2 ON t1.records_master_check_id = t2.id and t2.del_flag = '0' LEFT JOIN t_ek_records_master_check t2 ON t1.records_master_check_id = t2.id and t2.del_flag = '0'
left join t_sn_light_rail t3 on t2.light_rail_id = t3.id
WHERE t1.del_flag = '0' WHERE t1.del_flag = '0'
<if test="dto.ekCode != null and dto.ekCode != ''"> <if test="dto.ekCode != null and dto.ekCode != ''">
AND t2.ek_code like concat('%',#{dto.ekCode},'%') AND t2.ek_code like concat('%',#{dto.ekCode},'%')
...@@ -35,6 +36,7 @@ ...@@ -35,6 +36,7 @@
<if test="dto.endTime != null"> <if test="dto.endTime != null">
AND t2.check_time <![CDATA[ <= ]]> #{dto.endTime} AND t2.check_time <![CDATA[ <= ]]> #{dto.endTime}
</if> </if>
AND t3.status = 1
</select> </select>
<select id="getDetail" <select id="getDetail"
resultType="org.jeecg.modules.checkData.equipmentCheckData.vo.RailWearRecordDetailVO"> resultType="org.jeecg.modules.checkData.equipmentCheckData.vo.RailWearRecordDetailVO">
......
...@@ -5,12 +5,18 @@ ...@@ -5,12 +5,18 @@
SELECT SELECT
t1.* t1.*
FROM FROM
t_xd_record_patrol_master t1 t_xd_record_patrol_master t1 left join t_sn_light_rail t2 on t1.light_rail_id = t2.id
<where> <where>
1=1 1=1
<if test="dto.ekCode != null and dto.ekCode != ''"> <if test="dto.ekCode != null and dto.ekCode != ''">
AND t1.ek_code like concat('%',#{dto.ekCode},'%') AND t1.ek_code like concat('%',#{dto.ekCode},'%')
</if> </if>
<if test="dto.workCode != null and dto.workCode != ''">
AND t1.work_code like concat('%',#{dto.workCode},'%')
</if>
<if test="dto.checkBy != null and dto.checkBy != ''">
AND t1.check_by like concat('%',#{dto.checkBy},'%')
</if>
<if test="dto.lightRailId != null and dto.lightRailId != ''"> <if test="dto.lightRailId != null and dto.lightRailId != ''">
AND t1.light_rail_id = #{dto.lightRailId} AND t1.light_rail_id = #{dto.lightRailId}
</if> </if>
...@@ -18,6 +24,7 @@ ...@@ -18,6 +24,7 @@
AND t1.line_alias_id = #{dto.lineAliasId} AND t1.line_alias_id = #{dto.lineAliasId}
</if> </if>
AND t1.del_flag = '0' AND t1.del_flag = '0'
AND t2.status = 1
order by t1.create_time desc order by t1.create_time desc
</where> </where>
</select> </select>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
SELECT SELECT
t1.* t1.*
FROM FROM
t_ek_records_master_check t1 t_ek_records_master_check t1 left join t_sn_light_rail t2 on t1.light_rail_id = t2.id
<where> <where>
AND t1.del_flag = '0' AND t1.del_flag = '0'
<if test="dto.ekCode != null and dto.ekCode != ''"> <if test="dto.ekCode != null and dto.ekCode != ''">
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<if test="dto.endTime != null"> <if test="dto.endTime != null">
AND t1.check_time <![CDATA[ <= ]]> #{dto.endTime} AND t1.check_time <![CDATA[ <= ]]> #{dto.endTime}
</if> </if>
AND t2.status = 1
order by t1.create_time desc order by t1.create_time desc
</where> </where>
</select> </select>
......
...@@ -28,16 +28,22 @@ ...@@ -28,16 +28,22 @@
t_ek_use_turnout_record_check t1 t_ek_use_turnout_record_check t1
LEFT JOIN t_ek_records_master_check t2 ON t1.records_master_check_id = t2.id and t2.del_flag = '0' LEFT JOIN t_ek_records_master_check t2 ON t1.records_master_check_id = t2.id and t2.del_flag = '0'
LEFT JOIN t_sn_train_station t3 ON t1.station_id = t3.id LEFT JOIN t_sn_train_station t3 ON t1.station_id = t3.id
LEFT JOIN t_sn_light_rail t4 on t2.light_rail_id = t4.id
AND t3.light_rail_id = t4.id
WHERE t1.del_flag = '0' WHERE t1.del_flag = '0'
<if test="dto.turnoutCode != null and dto.turnoutCode != ''"> <if test="dto.turnoutCode != null and dto.turnoutCode != ''">
AND t1.gauge_code like concat('%',#{dto.turnoutCode},'%') AND t1.gauge_code like concat('%',#{dto.turnoutCode},'%')
</if> </if>
<if test="dto.ekCode != null and dto.ekCode != ''">
AND t2.ek_code like concat('%',#{dto.ekCode},'%')
</if>
<if test="dto.startTime != null"> <if test="dto.startTime != null">
AND t2.check_time >= #{dto.startTime} AND t2.check_time >= #{dto.startTime}
</if> </if>
<if test="dto.endTime != null"> <if test="dto.endTime != null">
AND t2.check_time <![CDATA[ <= ]]> #{dto.endTime} AND t2.check_time <![CDATA[ <= ]]> #{dto.endTime}
</if> </if>
AND t4.status = 1
GROUP BY t1.gauge_code GROUP BY t1.gauge_code
</select> </select>
<select id="getDetail" <select id="getDetail"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment