修改企业新表list

zhangtao
dongdingding 1 year ago
parent 82bd5630ad
commit d193209d79

@ -67,9 +67,11 @@
a.remark, a.remark,
a.user_id, a.user_id,
a.dept_id, a.dept_id,
c.status,
CASE WHEN b.ent_code IS NOT NULL THEN 1 ELSE 2 END AS isPoint 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_key_enterprise b ON a.enterprise_id = b.ent_code LEFT JOIN b_key_enterprise b ON a.enterprise_id = b.ent_code
LEFT JOIN b_plan_enterprise c ON a.enterprise_id = c.enterprise_id
) s ) 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>
@ -100,6 +102,7 @@
<if test="userId != null ">and s.user_id = #{userId}</if> <if test="userId != null ">and s.user_id = #{userId}</if>
<if test="deptId != null ">and s.dept_id = #{deptId}</if> <if test="deptId != null ">and s.dept_id = #{deptId}</if>
<if test="isPoint != null ">and s.isPoint = #{isPoint}</if> <if test="isPoint != null ">and s.isPoint = #{isPoint}</if>
and s.status = 0
</where> </where>
</select> </select>
@ -108,6 +111,7 @@
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertBEnterpriseNew" parameterType="BEnterpriseNew" useGeneratedKeys="true" keyProperty="id"> <insert id="insertBEnterpriseNew" parameterType="BEnterpriseNew" useGeneratedKeys="true" keyProperty="id">
insert into b_enterprise_new insert into b_enterprise_new
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -183,4 +187,20 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<delete id="deletAll">
delete from b_enterprise_new
</delete>
<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,
COALESCE(e.MAX_EXAMINE_END_TIME, null) AS EXAMINE_END_TIME
FROM b_enterprise_new a
LEFT JOIN b_standardization b ON a.enterprise_name = b.enterprise_name
LEFT JOIN (
SELECT USC_CODE, MAX(EXAMINE_END_TIME) AS MAX_EXAMINE_END_TIME
FROM sz_enfor_examine
WHERE YEAR(EXAMINE_END_TIME) = YEAR(CURDATE())
GROUP BY USC_CODE
) e ON a.enterprise_id = e.USC_CODE;
</select>
</mapper> </mapper>
Loading…
Cancel
Save