From b85a7f932b9d789a2e9bdb36e366c36c2e1eb3cc Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期四, 17 四月 2025 11:31:53 +0800 Subject: [PATCH] 查询考核成绩为null,为前端添加数据默认为0 --- ycl-server/src/main/resources/mapper/zgyw/ImageResourceSecurityMapper.xml | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/ycl-server/src/main/resources/mapper/zgyw/ImageResourceSecurityMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/ImageResourceSecurityMapper.xml index 58327b0..550bc1a 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/ImageResourceSecurityMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/ImageResourceSecurityMapper.xml @@ -28,7 +28,7 @@ </sql> <select id="selectImageResourceSecurityList" resultType="com.ycl.platform.domain.entity.ImageResourceSecurity"> - select id, a.dept_id, dept_name, platform_online, property_accuracy, weak_password, risk_property, boundary_integrity from t_image_resource_security a + select id, a.dept_id, area AS deptName, platform_online, property_accuracy, weak_password, risk_property, boundary_integrity from t_image_resource_security a LEFT JOIN sys_dept b ON a.dept_id = b.dept_id AND b.del_flag = 0 <where> <if test="platformOnline != null ">and platform_online = #{platformOnline}</if> @@ -101,4 +101,11 @@ #{id} </foreach> </delete> + <select id="getLatest" resultType="com.ycl.platform.domain.entity.ImageResourceSecurity"> + select * from t_image_resource_security + where dept_id = #{deptId} + and date_format(create_time,'%Y-%m') = date_format(#{date}, '%Y-%m') + order by create_time desc + limit 1 + </select> </mapper> -- Gitblit v1.8.0