|
|
|
@ -57,6 +57,7 @@
|
|
|
|
|
<if test="planName != null and planName != ''">and plan_name like concat('%', #{planName}, '%')</if>
|
|
|
|
|
<if test="planContent != null and planContent != ''">and plan_content = #{planContent}</if>
|
|
|
|
|
<if test="isPoint != null ">and is_point = #{isPoint}</if>
|
|
|
|
|
<if test="enterpriseName != null and enterpriseName != ''">and enterprise_name like concat('%',#{enterpriseName}, '%')</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPlanId">
|
|
|
|
@ -67,29 +68,29 @@
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<select id="getZhifa" resultType="com.ruoyi.programManagement.entity.response.BPlanEnterpriseZhifaResponse">
|
|
|
|
|
-- SELECT
|
|
|
|
|
-- s.*
|
|
|
|
|
-- FROM
|
|
|
|
|
-- (
|
|
|
|
|
-- SELECT
|
|
|
|
|
-- a.*,
|
|
|
|
|
-- a.planned_year AS plannedYear,
|
|
|
|
|
-- b.id AS longId,
|
|
|
|
|
-- b.EXAMINE_START_TIME,
|
|
|
|
|
-- b.EXAMINE_END_TIME,
|
|
|
|
|
-- b.ENTPR_NAME as entprName,
|
|
|
|
|
-- CASE
|
|
|
|
|
-- WHEN b.USC_CODE IS NOT NULL
|
|
|
|
|
-- AND SUBSTRING( a.planned_year, 1, 7 ) = SUBSTRING( b.EXAMINE_START_TIME, 1, 7 )
|
|
|
|
|
-- THEN 1
|
|
|
|
|
-- ELSE 2
|
|
|
|
|
-- END AS checkStatus
|
|
|
|
|
-- FROM
|
|
|
|
|
-- b_plan_enterprise a
|
|
|
|
|
-- LEFT JOIN sz_enfor_examine b ON a.enterprise_id = b.USC_CODE
|
|
|
|
|
-- WHERE
|
|
|
|
|
-- b.USC_CODE IS NOT NULL
|
|
|
|
|
-- ) s
|
|
|
|
|
-- SELECT
|
|
|
|
|
-- s.*
|
|
|
|
|
-- FROM
|
|
|
|
|
-- (
|
|
|
|
|
-- SELECT
|
|
|
|
|
-- a.*,
|
|
|
|
|
-- a.planned_year AS plannedYear,
|
|
|
|
|
-- b.id AS longId,
|
|
|
|
|
-- b.EXAMINE_START_TIME,
|
|
|
|
|
-- b.EXAMINE_END_TIME,
|
|
|
|
|
-- b.ENTPR_NAME as entprName,
|
|
|
|
|
-- CASE
|
|
|
|
|
-- WHEN b.USC_CODE IS NOT NULL
|
|
|
|
|
-- AND SUBSTRING( a.planned_year, 1, 7 ) = SUBSTRING( b.EXAMINE_START_TIME, 1, 7 )
|
|
|
|
|
-- THEN 1
|
|
|
|
|
-- ELSE 2
|
|
|
|
|
-- END AS checkStatus
|
|
|
|
|
-- FROM
|
|
|
|
|
-- b_plan_enterprise a
|
|
|
|
|
-- LEFT JOIN sz_enfor_examine b ON a.enterprise_id = b.USC_CODE
|
|
|
|
|
-- WHERE
|
|
|
|
|
-- b.USC_CODE IS NOT NULL
|
|
|
|
|
-- ) s
|
|
|
|
|
SELECT s.*
|
|
|
|
|
FROM (
|
|
|
|
|
SELECT
|
|
|
|
@ -98,6 +99,7 @@
|
|
|
|
|
b.id AS longId,
|
|
|
|
|
b.EXAMINE_START_TIME,
|
|
|
|
|
b.EXAMINE_END_TIME,
|
|
|
|
|
a.enterprise_name as enterpriseName,
|
|
|
|
|
|
|
|
|
|
CASE
|
|
|
|
|
WHEN b.USC_CODE IS NOT NULL AND SUBSTRING(a.planned_year, 1, 7) = SUBSTRING(b.EXAMINE_START_TIME, 1, 7) THEN 1
|
|
|
|
@ -119,7 +121,10 @@
|
|
|
|
|
<if test="req.checkStatus !=null and req.checkStatus !=''">
|
|
|
|
|
and s.checkStatus =#{req.checkStatus}
|
|
|
|
|
</if>
|
|
|
|
|
and s.rn = 1
|
|
|
|
|
<if test="req.enterpriseName !=null and req.enterpriseName !=''">
|
|
|
|
|
and s.enterpriseName =#{req.enterpriseName}
|
|
|
|
|
</if>
|
|
|
|
|
and s.rn = 1
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="page" resultType="com.ruoyi.programManagement.entity.BPlanEnterprise">
|
|
|
|
|