| | |
| | | <mapper namespace="cn.gistack.sm.sg.mapper.SgProjectInfoMapper"> |
| | | |
| | | <select id="queryPageList" resultType="cn.gistack.sm.sg.DO.SgProjectInfoDO"> |
| | | select * from YWXT.SG_PROJECT_INFO info where 1=1 |
| | | SELECT |
| | | info.*, |
| | | dria."city_nm", |
| | | dria."county_nm", |
| | | dria."town_nm", |
| | | dria."eng_scal", |
| | | dria."bas_guid" |
| | | FROM |
| | | YWXT.SG_PROJECT_INFO info |
| | | LEFT JOIN SJZT_DW."dim_res_info_a" dria ON dria."res_cd" = info.sk_id |
| | | WHERE |
| | | 1 =1 |
| | | <if test="dto.projectName != null and dto.projectName != ''"> |
| | | and info.project_name like concat( concat ('%',#{dto.projectName}),'%') |
| | | </if> |
| | | <if test="dto.skName != null and dto.skName != ''"> |
| | | and info.sk_name like concat(concat('%',#{dto.skName}),'%') |
| | | </if> |
| | | <if test="dto.projectIds != null and dto.projectIds.size > 0"> |
| | | and info.id in |
| | | <foreach collection="dto.projectIds" item="id" separator="," open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | <select id="queryStepByProject" resultType="cn.gistack.sm.sg.VO.SgProjectInfoVO"> |
| | |
| | | d.id as dId, |
| | | step.gx_step_name, |
| | | step.gx_step_num, |
| | | step.id as stepId, |
| | | re.STATUS as reportStatus, |
| | | d.STATUS as deviceStatus, |
| | | pro.STATUS as projectStatus, |
| | | re.id as reportId |
| | | re.id as reportId, |
| | | pro.lon_lat |
| | | FROM |
| | | ywxt.sg_project_info pro |
| | | LEFT JOIN ywxt.sg_device d ON pro.id = d.program_id |
| | |
| | | <if test="dto.projectName != null and dto.projectName != ''"> |
| | | and pro.project_name like CONCAT(CONCAT('%', #{dto.projectName}), '%') |
| | | </if> |
| | | <if test="dto.status != null"> |
| | | and pro.status = #{dto.status} |
| | | </if> |
| | | <if test="dto.projectIds != null and dto.projectIds.size > 0"> |
| | | and pro.id in |
| | | <foreach collection="dto.projectIds" item="id" separator="," open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | <select id="progressList" resultType="cn.gistack.sm.sg.VO.SgProjectInfoVO"> |
| | | SELECT |
| | | pro.id, |
| | | pro.project_name, |
| | | de.STATUS as deviceStatus |
| | | pro.lon_lat, |
| | | pro.status |
| | | FROM |
| | | ywxt.sg_project_info pro |
| | | LEFT JOIN ywxt.sg_device de ON pro.id = de.program_id where 1=1 |
| | | ywxt.sg_project_info pro where 1=1 |
| | | <if test="dto.status != null"> |
| | | and pro.status = #{dto.status} |
| | | </if> |