Browse Source

值班模板

develop
wangsixiang 11 months ago
parent
commit
97a45da901
  1. 24
      zc-business/src/main/resources/mapper/business/DcWarningMapper.xml

24
zc-business/src/main/resources/mapper/business/DcWarningMapper.xml

@ -77,8 +77,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`, warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`,
warning.`other_config` FROM dc_warning AS warning warning.`other_config` FROM dc_warning AS warning
LEFT JOIN dc_stake_mark AS mark ON mark.stake_mark=warning.stake_mark LEFT JOIN dc_stake_mark AS mark ON mark.stake_mark=warning.stake_mark
where warning.warning_source !=6 <where>
<if test="warningSource == null || warningSource == ''">and warning.warning_source !=6</if>
<if test="warningSource != null and warningSource != ''">and warning.warning_source = #{warningSource}</if>
<if test="warningState != null and warningState != ''">and warning.warning_state = #{warningState}</if>
<if test="warningType != null and warningType != ''">and warning.warning_type = #{warningType}</if>
<if test="warningSubclass != null and warningSubclass != ''">and warning.warning_subclass =
#{warningSubclass}
</if>
<if test="direction != null and direction != ''">and warning.direction = #{direction}</if>
<if test="stakeMark != null and stakeMark != ''">and warning.stake_mark = #{stakeMark}</if>
<if test="startTime != null and completeTime != null ">
and warning.warning_time between #{startTime} and #{completeTime}
</if>
<if test="startStakeMark != null and startStakeMark != ''">
and CAST(SUBSTRING(SUBSTRING_INDEX(warning.stake_mark,'+',1),2)AS UNSIGNED)*1000
+CAST(SUBSTRING_INDEX(warning.stake_mark, '+', -1) AS UNSIGNED)&gt;#{startStakeMark}
</if>
<if test=" endStakeMark != null and endStakeMark != '' ">
and CAST(SUBSTRING(SUBSTRING_INDEX(warning.stake_mark,'+',1),2)AS UNSIGNED)*1000
+CAST(SUBSTRING_INDEX(warning.stake_mark, '+', -1) AS UNSIGNED)&lt;#{endStakeMark}
</if>
</where>
</select> </select>
<insert id="insertDcWarning" parameterType="DcWarning" useGeneratedKeys="true" keyProperty="id"> <insert id="insertDcWarning" parameterType="DcWarning" useGeneratedKeys="true" keyProperty="id">

Loading…
Cancel
Save