修改企业新表不关联新接口

zhangtao
dongdingding 1 year ago
parent 53170a3d6f
commit efa63b1980

@ -189,22 +189,42 @@
</delete> </delete>
<select id="seletAll" resultType="com.ruoyi.programManagement.entity.BEnterpriseNew"> <select id="seletAll" resultType="com.ruoyi.programManagement.entity.BEnterpriseNew">
SELECT a.enterprise_id, a.enterprise_name,a.district,a.SUPERVISION_LARGE,a.RISK_LEVEL, COALESCE(b.standardized_grade, '/') AS STAND_LEVEL, SELECT a.enterprise_id, a.enterprise_name, a.district, a.SUPERVISION_LARGE, a.RISK_LEVEL,
COALESCE(b.standardized_grade, '/') AS STAND_LEVEL,
COALESCE(e.MAX_EXAMINE_END_TIME, null) AS EXAMINE_END_TIME COALESCE(e.MAX_EXAMINE_END_TIME, null) AS EXAMINE_END_TIME
FROM b_enterprise_new a FROM b_enterprise_new a
LEFT JOIN b_standardization b ON a.enterprise_name = b.enterprise_name LEFT JOIN b_standardization b ON a.enterprise_name = b.enterprise_name COLLATE utf8mb4_unicode_ci
LEFT JOIN ( LEFT JOIN (
SELECT USC_CODE, MAX(EXAMINE_END_TIME) AS MAX_EXAMINE_END_TIME SELECT USC_CODE, MAX(EXAMINE_END_TIME) AS MAX_EXAMINE_END_TIME
FROM sz_enfor_examine FROM sz_enfor_examine
WHERE YEAR(EXAMINE_END_TIME) = YEAR(CURDATE()) WHERE YEAR(EXAMINE_END_TIME) = YEAR(CURDATE())
GROUP BY USC_CODE GROUP BY USC_CODE
) e ON a.enterprise_id = e.USC_CODE; ) e ON a.enterprise_id = e.USC_CODE COLLATE utf8mb4_unicode_ci;
</select> </select>
<select id="getList" resultType="com.ruoyi.programManagement.entity.BEnterpriseNew"> <select id="getList" resultType="com.ruoyi.programManagement.entity.BEnterpriseNew">
select s.* from(SELECT a.* select s.* from( SELECT
a.id,
a.enterprise_id,
a.enterprise_name,
a.district,
a.SUPERVISION_LARGE,
a.RISK_LEVEL,
a.STAND_LEVEL,
a.EXAMINE_END_TIME,
a.create_id,
a.create_by,
a.create_time,
a.update_id,
a.update_by,
a.update_time,
a.remark,
a.user_id,
a.dept_id,
CASE WHEN b.ent_code IS NOT NULL THEN 1 ELSE 2 END AS isPoint
FROM b_enterprise_new a FROM b_enterprise_new a
LEFT JOIN b_plan_enterprise b ON a.enterprise_id = b.enterprise_id LEFT JOIN b_key_enterprise b ON a.enterprise_id = b.ent_code
WHERE b.enterprise_id IS NULL)s LEFT JOIN b_plan_enterprise d ON a.enterprise_id = d.enterprise_id
WHERE d.enterprise_id IS NULL)s
<where> <where>
<if test="enterpriseId != null and enterpriseId != ''">and s.enterprise_id = #{enterpriseId}</if> <if test="enterpriseId != null and enterpriseId != ''">and s.enterprise_id = #{enterpriseId}</if>

Loading…
Cancel
Save