<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<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
|
<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>
|
</select>
|
<select id="queryStepByProject" resultType="cn.gistack.sm.sg.VO.SgProjectInfoVO">
|
SELECT
|
pro.id,
|
pro.project_name,
|
gx.id as gxId,
|
gx.gx_name,
|
d.device_name,
|
d.device_type,
|
dict."DICT_VALUE" as typeName,
|
d.id as dId,
|
step.gx_step_name,
|
step.gx_step_num,
|
re.STATUS as reportStatus,
|
d.STATUS as deviceStatus,
|
pro.STATUS as projectStatus,
|
re.id as reportId
|
FROM
|
ywxt.sg_project_info pro
|
LEFT JOIN ywxt.sg_device d ON pro.id = d.program_id
|
left join YWXT."BLADE_DICT_BIZ" as dict on d.device_type=dict.DICT_KEY and dict.CODE='SG_DEVICE_TYPE'
|
LEFT JOIN ywxt.sg_gx gx ON d.device_type = gx.gx_type
|
LEFT JOIN ywxt.sg_gx_step step ON gx.id = step.gx_info_id
|
LEFT JOIN ywxt.sg_progress_report re ON re.gx_step_id = step.id and re.gx_device_id = d.id
|
where 1=1
|
<if test="dto.projectId != null and dto.projectId != ''">
|
and pro.id = #{dto.projectId}
|
</if>
|
<if test="dto.projectName != null and dto.projectName != ''">
|
and pro.project_name like CONCAT(CONCAT('%', #{dto.projectName}), '%')
|
</if>
|
</select>
|
<select id="progressList" resultType="cn.gistack.sm.sg.VO.SgProjectInfoVO">
|
SELECT
|
pro.id,
|
pro.project_name,
|
de.STATUS as deviceStatus
|
FROM
|
ywxt.sg_project_info pro
|
LEFT JOIN ywxt.sg_device de ON pro.id = de.program_id where 1=1
|
<if test="dto.status != null">
|
and pro.status = #{dto.status}
|
</if>
|
<if test="dto.projectName != null and dto.projectName != ''">
|
and pro.project_name like CONCAT(CONCAT('%',#{dto.projectName}),'%')
|
</if>
|
</select>
|
</mapper>
|