pad编排查询sql报错

This commit is contained in:
1378012178@qq.com 2026-03-31 10:23:26 +08:00
parent 5241bb87dd
commit 5453b0171a
1 changed files with 2 additions and 18 deletions

View File

@ -282,11 +282,8 @@
p.positioning,
p.positioning_long,
p.tag_name,
STR_TO_DATE(CONCAT(CURDATE(), ' ', p.start_time), '%Y-%m-%d %H:%i') AS start_time,
DATE_ADD(
STR_TO_DATE(CONCAT(CURDATE(), ' ', p.start_time), '%Y-%m-%d %H:%i'),
INTERVAL CAST(directive.service_duration AS UNSIGNED) MINUTE
) AS end_time,
ADDTIME(CONCAT(CURDATE(), ' ', p.start_time), '00:00:00') AS start_time,
ADDTIME(CONCAT(CURDATE(), ' ', p.start_time), CONCAT('00:', directive.service_duration, ':00')) AS end_time,
p.create_by,
p.create_time,
p.update_by,
@ -315,20 +312,7 @@
</when>
</choose>
</if>
<if test="dto != null and dto.queryDate != null and dto.queryDate != ''">
AND CONCAT(DATE_FORMAT(#{dto.queryDate}, '%Y-%m-%d'), ' ', p.start_time, ':00') >= #{dto.queryDate}
</if>
ORDER BY p.nu_id ASC, p.instruction_tag_id ASC
<if test="dto != null and dto.queryType != null and dto.queryType != ''">
<choose>
<when test="dto.queryType == 'service'">
, start_time ASC
</when>
<when test="dto.queryType == 'instant'">
, directive.directive_name ASC
</when>
</choose>
</if>
</select>