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
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}
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
and INTERPRETATION_TIME = #{interpretationTime}
AND STAND_ID = #{standId}
AND STAND_NUMBER like concat(concat('%',#{standNumber}),'%')
AND STAND_NAME like concat(concat('%',#{standName}),'%')
AND specific_item like concat(concat('%',#{specificItem}),'%')
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
count(id)
FROM
sar_interpretation_national_standard
WHERE
1=1
and INTERPRETATION_TIME = #{interpretationTime}
AND STAND_ID = #{standId}
AND STAND_NUMBER like concat(concat('%',#{standNumber}),'%')
AND STAND_NAME like concat(concat('%',#{standName}),'%')
AND specific_item like concat(concat('%',#{specificItem}),'%')