Files
foton-slrs-system-rest/adc-da-slrs/src/main/resources/mybatis/mapper/sarStandWarning/SarStandardInfo.xml
T

58 lines
1.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.scheduled.dao.SarStandardInfoDao">
<!-- Result Map-->
<resultMap id="resultMap" type="com.adc.da.scheduled.entity.WarningEO" >
<id column="ID" property="standId" />
<result column="STAND_NUMBER" property="standNum" />
<result column="STAND_NAME" property="standName" />
<result column="STAND_SORT" property="standSort"/>
<result column="STAND_YEAR" property="standYear"/>
<result column="XCXSSRQ" property="XCXSSRQ"/>
<result column="ZCCSSRQ" property="ZCCSSRQ"/>
<result column="CLLX" property="applyType" />
<result column="STAND_TYPE" property="standType" />
<result column="ZRGCS" property="dutyEngineer" />
</resultMap>
<!-- 查询条件 -->
<select id="selectWithinTerm" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.DataDTO">
SELECT
info.ID,
info.STAND_SORT,
info.STAND_YEAR,
info.STAND_NUMBER,
info.STAND_NAME,
info.STAND_TYPE,
attrInfo.CLLX,
attrInfo.ZRGCS,
attrInfo.${str}
FROM
sar_standards_info AS info
JOIN sar_stand_attr_info AS attrInfo ON info.id = attrinfo.stand_id
<where>
1=1
<if test="date!=null">
and
attrInfo.${str}
BETWEEN DATE_FORMAT( #{date.startDate},'%Y-%m-%d %H:%i:%s')
and DATE_FORMAT( #{date.endDate},'%Y-%m-%d %H:%i:%s')
</if>
</where>
</select>
<update id="updateStandardInfo">
update sar_standards_info
set TEXT_STATUS=#{textStatus}
where ID=#{id}
</update>
</mapper>