<selectid="queryRepetitionReport"parameterType="string"resultMap="QueryRepetitionReportMap"> select rate.code,application.name,rate.check_num,rate.rate,rate.introduce from t_achievement_repetition_rate rate left join t_achievement_application application on rate.code = application.code where rate.code = #{code} </select>
<selectid="queryDetailList"resultMap="QueryRepetitionDetailMap"> select result.code,application.name as contractName,result.contrast_code,result.contrast_introduce as contractIntroduce from t_achievement_repetition_result result left join t_achievement_application application on application.code = result.contrast_code where result.code = #{code} union select result.contrast_code as code,application.name as contractName,result.code as contrast_code,result.introduce as contractIntroduce from t_achievement_repetition_result result left join t_achievement_application application on application.code = result.code where result.contrast_code = #{code} </select>
<selectid="queryContractList"resultType="RepetitionContractVo"> select result.s1,result.s2,result.rate from t_achievement_repetition_result result where result.code = #{code} and result.contrast_code = #{contrastCode} union all select result.s1,result.s2,result.rate from t_achievement_repetition_result result where result.contrast_code = #{code} and result.code = #{contrastCode} </select>