| | |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | ORDER BY info.status desc |
| | | <if test="dto.projectSort == null or dto.projectSort ==0"> |
| | | ORDER BY info.status desc |
| | | </if> |
| | | <if test="dto.projectSort != null and dto.projectSort ==2"> |
| | | ORDER BY info.sk_id asc |
| | | </if> |
| | | </select> |
| | | <select id="queryStepByProject" resultType="cn.gistack.sm.sg.VO.SgProjectInfoVO"> |
| | | |
| | |
| | | 1 = 1 |
| | | <if test="grad == 0"> |
| | | AND |
| | | dria."bas_name" = #{code} |
| | | info.lot = #{code} |
| | | </if> |
| | | <if test="grad == 2"> |
| | | AND |
| | |
| | | FROM |
| | | YWXT.SG_PROJECT_INFO info |
| | | LEFT JOIN SJZT_DW."dim_res_info_a" dria ON dria."res_cd" = info.sk_id |
| | | WHERE |
| | | WHERE |
| | | 1 = 1 |
| | | AND |
| | | dria."bas_name" =#{code} |
| | | <if test="code != null and code != ''"> |
| | | AND info.lot =#{code} |
| | | </if> |
| | | Group By dria."city_cd",dria."city_nm" |
| | | HAVING |
| | | dria."city_cd" IS NOT NULL AND |
| | |
| | | |
| | | <select id="getsgStatisticsOne" resultType="cn.gistack.sm.sg.VO.SgStatisProVO"> |
| | | SELECT |
| | | dria."bas_name" AS code, |
| | | dria."bas_guid" AS name, |
| | | <!-- dria."bas_name" AS code, |
| | | dria."bas_guid" AS name,--> |
| | | info.lot as code, |
| | | info.lot as name, |
| | | sum( CASE WHEN info.STATUS IN ( 1, 2 ) THEN 1 ELSE 0 END ) AS commenceNum, |
| | | count( info.STATUS ) AS projectSum |
| | | FROM |
| | |
| | | WHERE |
| | | 1 = 1 |
| | | GROUP BY |
| | | dria."bas_guid", |
| | | dria."bas_name" |
| | | info.lot |
| | | <!-- dria."bas_guid", dria."bas_name" --> |
| | | HAVING |
| | | dria."bas_guid" IS NOT NULL AND |
| | | dria."bas_name" IS NOT NULL |
| | | <!-- dria."bas_guid" IS NOT NULL AND |
| | | dria."bas_name" IS NOT NULL --> |
| | | info.lot is not null |
| | | </select> |
| | | |
| | | <select id="getProjectId" resultType="java.lang.String"> |
| | |
| | | ( pro.countyCode = a."guid" ) |
| | | OR ( pro.cityCode = a."guid" ) |
| | | OR ( pro.provinceCode = a."guid" )) |
| | | WHERE 1=1 and a."p_ad_code" = #{dto.adCode} |
| | | WHERE 1=1 and (a."p_ad_code" = #{dto.adCode} or a."ad_code" = #{dto.adCode}) |
| | | <if test="dto.status != null"> |
| | | and pro.status = #{dto.status} |
| | | </if> |
| | |
| | | ( pro.countyCode = a."guid" ) |
| | | OR ( pro.cityCode = a."guid" ) |
| | | OR ( pro.provinceCode = a."guid" )) |
| | | WHERE 1=1 and a."p_ad_code" = #{dto.adCode} |
| | | WHERE 1=1 and (a."p_ad_code" = #{dto.adCode} or a."ad_code" = #{dto.adCode}) |
| | | <if test="dto.projectId != null and dto.projectId != ''"> |
| | | and pro.id = #{dto.projectId} |
| | | </if> |