|
|
|
@ -88,15 +88,28 @@
|
|
|
|
|
a.*,
|
|
|
|
|
d.ENTPR_NAME AS entprName,
|
|
|
|
|
a.planned_year AS plannedYear,
|
|
|
|
|
b.id as longId,
|
|
|
|
|
b.id AS longId,
|
|
|
|
|
b.EXAMINE_START_TIME,
|
|
|
|
|
b.EXAMINE_END_TIME,
|
|
|
|
|
CASE
|
|
|
|
|
WHEN b.USC_CODE IS NOT NULL THEN
|
|
|
|
|
1 ELSE 2
|
|
|
|
|
WHEN b.USC_CODE IS NOT NULL 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
|
|
|
|
|
left join sz_ent_basic_info d on a.enterprise_id=d.USC_CODE) s
|
|
|
|
|
LEFT JOIN sz_ent_basic_info d ON a.enterprise_id = d.USC_CODE
|
|
|
|
|
where (
|
|
|
|
|
SUBSTRING(a.planned_year, 1, 4) >= EXTRACT(YEAR FROM b.EXAMINE_START_TIME)
|
|
|
|
|
AND SUBSTRING(a.planned_year, 6, 2) >= EXTRACT(MONTH FROM b.EXAMINE_START_TIME)
|
|
|
|
|
)
|
|
|
|
|
AND
|
|
|
|
|
(
|
|
|
|
|
SUBSTRING(a.planned_year, 1, 4) <= EXTRACT(YEAR FROM b.EXAMINE_END_TIME)
|
|
|
|
|
AND SUBSTRING(a.planned_year, 6, 2) <= EXTRACT(MONTH FROM b.EXAMINE_END_TIME)
|
|
|
|
|
)
|
|
|
|
|
) s
|
|
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
<if test="req.plannedYear !=null and req.plannedYear !=''">
|
|
|
|
|
and s.plannedYear =#{req.plannedYear}
|
|
|
|
|