90 lines
3.9 KiB
XML
90 lines
3.9 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.slrs.sarStandardComplianceAssessResult.dao.SarInterpretationNationalStandardDao">
|
|
|
|
<select id="getStandardItem"
|
|
resultType="com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarBaseStandardInfo">
|
|
select distinct STAND_ID as standard_id, STAND_NUMBER as standard_number, STAND_NAME as standard_name, STAND_TYPE as standard_type, INTERPRETATION_TIME from sar_interpretation_national_standard
|
|
</select>
|
|
|
|
<update id="updateData">
|
|
update sar_interpretation_national_standard set risk_degree = #{find.riskDegree}
|
|
where sar_interpretation_national_standard.STAND_ID = #{find.standId}
|
|
and sar_interpretation_national_standard.STAND_NUMBER =#{find.standNumber}
|
|
and sar_interpretation_national_standard.STAND_NAME=#{find.standName}
|
|
and sar_interpretation_national_standard.INTERPRETATION_TIME = #{find.interpretationTime}
|
|
</update>
|
|
|
|
<select id="getAllDatas"
|
|
resultType="com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarInterpretationNationalStandard">
|
|
|
|
SELECT c.* FROM (
|
|
SELECT
|
|
(@i:=@i+1) as rows,
|
|
id,
|
|
INTERPRETATION_TIME,
|
|
STAND_NUMBER,
|
|
specific_item,
|
|
compared_with_previous,
|
|
CREATION_USER,
|
|
CREATION_TIME,
|
|
VALID_FLAG,
|
|
LAST_VERSION_NUMBER,
|
|
risk_degree,
|
|
compliance_state,
|
|
INTERPRETATION_STATE,
|
|
STAND_TYPE,
|
|
MODIFY_TIME,
|
|
STAND_SORT,
|
|
STAND_ID,
|
|
STAND_NAME,
|
|
core_technical_requirement
|
|
FROM
|
|
sar_interpretation_national_standard ,(SELECT @i:=0)j
|
|
WHERE
|
|
1=1
|
|
<if test="interpretationTime!=null ">
|
|
and INTERPRETATION_TIME = #{interpretationTime}
|
|
</if>
|
|
<if test="standId!=null and standId!=''">
|
|
AND STAND_ID = #{standId}
|
|
</if>
|
|
<if test="standNumber!=null and standNumber!=''">
|
|
AND STAND_NUMBER like concat(concat('%',#{standNumber}),'%')
|
|
</if>
|
|
<if test="standName!=null and standName!=''">
|
|
AND STAND_NAME like concat(concat('%',#{standName}),'%')
|
|
</if>
|
|
<if test="specificItem!=null and specificItem!=''">
|
|
AND specific_item like concat(concat('%',#{specificItem}),'%')
|
|
</if>
|
|
ORDER BY STAND_ID, specific_item
|
|
|
|
) c ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.specific_item,1,(SELECT LOCATE('.',CONCAT(c.specific_item,'.')))),SIGNED) ,rows
|
|
LIMIT ${(current-1)*size},${size}
|
|
</select>
|
|
<select id="getAllDatasCout" resultType="java.lang.Integer">
|
|
SELECT
|
|
count(id)
|
|
FROM
|
|
sar_interpretation_national_standard
|
|
WHERE
|
|
1=1
|
|
<if test="interpretationTime!=null ">
|
|
and INTERPRETATION_TIME = #{interpretationTime}
|
|
</if>
|
|
<if test="standId!=null and standId!=''">
|
|
AND STAND_ID = #{standId}
|
|
</if>
|
|
<if test="standNumber!=null and standNumber!=''">
|
|
AND STAND_NUMBER like concat(concat('%',#{standNumber}),'%')
|
|
</if>
|
|
<if test="standName!=null and standName!=''">
|
|
AND STAND_NAME like concat(concat('%',#{standName}),'%')
|
|
</if>
|
|
<if test="specificItem!=null and specificItem!=''">
|
|
AND specific_item like concat(concat('%',#{specificItem}),'%')
|
|
</if>
|
|
</select>
|
|
</mapper>
|