修饰代码优化
This commit is contained in:
parent
c1348ed43d
commit
385dbab69f
|
|
@ -318,7 +318,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectRepairQuestList" resultType="com.bonus.material.repair.domain.vo.ScrapApplyDetailsVO">
|
<select id="selectRepairQuestList" resultType="com.bonus.material.repair.domain.vo.ScrapApplyDetailsVO">
|
||||||
SELECT * FROM (
|
SELECT * FROM (
|
||||||
-- 第一个查询(时间条件:小于 2025-07-19)
|
-- 第一个查询(时间条件:小于 2025-08-20)
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
tk.task_id AS taskId,
|
tk.task_id AS taskId,
|
||||||
tk.CODE AS scrapNum,
|
tk.CODE AS scrapNum,
|
||||||
|
|
@ -350,7 +350,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
WHERE
|
WHERE
|
||||||
tk.task_type = #{taskType}
|
tk.task_type = #{taskType}
|
||||||
AND tk.create_time < '2025-08-06 00:00:00'
|
AND tk.create_time < '2025-08-20 00:00:00'
|
||||||
<if test="backUnit != null and backUnit != ''">
|
<if test="backUnit != null and backUnit != ''">
|
||||||
AND bui.unit_id = #{backUnit}
|
AND bui.unit_id = #{backUnit}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -380,7 +380,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
-- 第二个查询(时间条件:>= 2025-07-19)
|
-- 第二个查询(时间条件:>= 2025-08-20)
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
tk.task_id AS taskId,
|
tk.task_id AS taskId,
|
||||||
tk.CODE AS scrapNum,
|
tk.CODE AS scrapNum,
|
||||||
|
|
@ -411,7 +411,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
WHERE
|
WHERE
|
||||||
tk.task_type = #{taskType}
|
tk.task_type = #{taskType}
|
||||||
AND tk.create_time >= '2025-08-06 00:00:00'
|
AND tk.create_time >= '2025-08-20 00:00:00'
|
||||||
<if test="backUnit != null and backUnit != ''">
|
<if test="backUnit != null and backUnit != ''">
|
||||||
AND bui.unit_id = #{backUnit}
|
AND bui.unit_id = #{backUnit}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
JOIN ma_type_repair mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
|
JOIN ma_type_repair mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
<where>
|
<where>
|
||||||
rd.create_time < '2025-08-06 00:00:00'
|
rd.create_time < '2025-08-20 00:00:00'
|
||||||
<if test="inputCode != null and inputCode != ''">
|
<if test="inputCode != null and inputCode != ''">
|
||||||
AND tt.CODE = #{inputCode}
|
AND tt.CODE = #{inputCode}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -123,7 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
JOIN ma_type_keeper mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
|
JOIN ma_type_keeper mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
<where>
|
<where>
|
||||||
rd.create_time >= '2025-08-06 00:00:00'
|
rd.create_time >= '2025-08-20 00:00:00'
|
||||||
<if test="inputCode != null and inputCode != ''">
|
<if test="inputCode != null and inputCode != ''">
|
||||||
AND tt.CODE = #{inputCode}
|
AND tt.CODE = #{inputCode}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue