yxm
2024-06-28 512af7b847a2b64a5a84e5448c964f28c349c099
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/mapper/TbResGeneralInvestigationMapper.xml
@@ -570,7 +570,30 @@
    </select>
    <select id="getIamgeAndVideoUrl" resultType="cn.gistack.sm.sjztmd.vo.ImageAndVideoVO">
        select "image_urls" as imagesUrl ,"video_urls" as videosUrl from sjzt_md."tb_res_general_investigation"
        select "res_name","image_urls" as imagesUrl ,"video_urls" as videosUrl from sjzt_md."tb_res_general_investigation"
    </select>
    <select id="getIamgeAndVideoUrlcopy" resultType="cn.gistack.sm.sjztmd.vo.ResGentionVO">
        select resgi."res_name" resname,resgi."part_place" ppname ,regis."tb_year" years,LPAD(CAST(ROW_NUMBER() OVER (PARTITION BY regis."res_guid"
           ORDER BY
              regis."create_time" DESC)AS VARCHAR(3)),3,'0') AS rn,resgi."image_urls" imagesUrls,resgi."video_urls" videoUrls,
           CASE   WHEN town."ad_grad" = '3' THEN
               town."ad_name"
               WHEN county."ad_grad" = '3' THEN
               county."ad_name"
            END AS countyName,
           CASE    WHEN town."ad_grad" = '2' THEN
               town."ad_name"
               WHEN county."ad_grad" = '2' THEN
               county."ad_name" ELSE city."ad_name"
            END AS cityName
            from SJZT_MD."tb_res_general_investigation" resgi
                left join SJZT_MD."tb_res_general_investigation_state"  regis on resgi."res_guid" = regis."res_guid"
                left join SJZT_MD."att_res_base"  a on resgi."res_guid" = a."code"
                left join ywxt."att_ad_base" town ON town."guid" = a."interior_ad_guid"
            left join ywxt."att_ad_base" county ON town."p_ad_code" = county."ad_code"
            left join ywxt."att_ad_base" city ON county."p_ad_code" = city."ad_code"
            left join ywxt."att_ad_base" province ON city."p_ad_code" = province."ad_code"
            where regis."check_state" ='3'
    </select>
</mapper>