日更新
This commit is contained in:
parent
a114f6cb13
commit
274a72d126
|
|
@ -75,9 +75,18 @@
|
||||||
ma_code = #{maCode}
|
ma_code = #{maCode}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAll" resultMap="BaseResultMap" resultType="com.bonus.material.codeCollection.domain.WsMaInfo">
|
<select id="selectAll" resultType="com.bonus.material.codeCollection.domain.WsMaInfo">
|
||||||
SELECT *
|
SELECT * FROM (
|
||||||
FROM ws_ma_info
|
SELECT
|
||||||
|
id AS id,
|
||||||
|
ma_code AS maCode,
|
||||||
|
ma_name AS maName,
|
||||||
|
next_check_time AS nextCheckTime,
|
||||||
|
this_check_time AS thisCheckTime,
|
||||||
|
ma_model AS maModel,
|
||||||
|
repair_man AS repairMan
|
||||||
|
FROM
|
||||||
|
ws_ma_info
|
||||||
<where>
|
<where>
|
||||||
<if test="maCode != null and maCode != ''">
|
<if test="maCode != null and maCode != ''">
|
||||||
and ma_code like concat('%', #{maCode}, '%')
|
and ma_code like concat('%', #{maCode}, '%')
|
||||||
|
|
@ -86,6 +95,35 @@
|
||||||
and qr_code = #{qrCode}
|
and qr_code = #{qrCode}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
LIMIT 10
|
||||||
|
) AS t1
|
||||||
|
|
||||||
|
UNION ALL
|
||||||
|
|
||||||
|
SELECT * FROM (
|
||||||
|
SELECT
|
||||||
|
mm.ma_id AS id,
|
||||||
|
mm.ma_code AS maCode,
|
||||||
|
mt1.type_name AS maName,
|
||||||
|
mm.next_check_time AS nextCheckTime,
|
||||||
|
mm.this_check_time AS thisCheckTime,
|
||||||
|
mt.type_name AS maModel,
|
||||||
|
mm.check_man AS repairMan
|
||||||
|
FROM
|
||||||
|
ma_machine mm
|
||||||
|
LEFT JOIN ma_type mt ON mm.type_id = mt.type_id
|
||||||
|
LEFT JOIN ma_type mt1 ON mt1.type_id = mt.parent_id
|
||||||
|
<where>
|
||||||
|
<if test="maCode != null and maCode != ''">
|
||||||
|
and mm.ma_code like concat('%', #{maCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="qrCode != null and qrCode != ''">
|
||||||
|
and qr_code = #{qrCode}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
LIMIT 10
|
||||||
|
) AS t2
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue