添加安全环保检查分页查询功能

main
zhangyue 2026-03-23 13:52:51 +08:00
parent c5a655e5f7
commit 35ab16db4e
3 changed files with 58 additions and 4 deletions

View File

@ -1,6 +1,6 @@
sdk:
server:
app-key: 722091ff53dd4abba078c2a00efd4a42
app-key: 0fde29723e51420d82b7047feaad98c9
client:
gateway:
url: ${common.gateway.network.http.external}
@ -14,7 +14,7 @@ sdk:
name: ${application.cn-name}-后端
group-code: public_api
strip-prefix: 0
uri: lb://${application.name}
uri: http://${application.name}
path: /${application.gateway}/**
- client:
system-code: ${application.name}-container
@ -25,7 +25,7 @@ sdk:
name: ${application.cn-name}-前端
group-code: public_api
strip-prefix: 0
uri: lb://jjb-saas-base
uri: http://jjb-saas-base
path: /${application.gateway}/container/**
order: -2
openapi:

View File

@ -1,8 +1,13 @@
package com.zcloud.key.project.persistence.mapper.inspection;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zcloud.key.project.persistence.dataobject.inspection.SafetyEnvironmentalInspectionDO;
import com.zcloud.key.project.persistence.dataobject.project.KeyProjectDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
/**
* web-infrastructure
@ -12,6 +17,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface SafetyEnvironmentalInspectionMapper extends BaseMapper<SafetyEnvironmentalInspectionDO> {
IPage<SafetyEnvironmentalInspectionDO> selectListPage(IPage<SafetyEnvironmentalInspectionDO> page, @Param("params") Map<String, Object> params, String menuPerms);
}

View File

@ -3,6 +3,55 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.key.project.persistence.mapper.inspection.SafetyEnvironmentalInspectionMapper">
<select id="selectListPage" resultType="com.zcloud.key.project.persistence.dataobject.inspection.SafetyEnvironmentalInspectionDO">
select
i.*,
kp.project_name,
creu.name create_name,
GROUP_CONCAT(DISTINCT iuu.name) inspection_user_name,
indc.corp_name inspected_corpinfo_name,
xmu.name xgf_master_user_name
FROM
safety_environmental_inspection i
left join key_project kp on kp.key_project_id = i.key_project_id
left join user creu on creu.id = i.create_id
left join safety_environmental_inspection_user iu on iu.inspection_id = i.inspection_id and iu.type = 1 and iu.delete_enum = 'FALSE'
left join user iuu on iuu.id = iu.user_id
left join corp_info indc on indc.id = i.inspected_corpinfo_id
left join user xmu on xmu.id = i.xgf_master_user_id
where i.delete_enum = 'FALSE'
<if test="params.place != null and params.place != ''">
and i.place = #{params.place}
</if>
<if test="params.createName != null and params.createName != ''">
and creu.name LIKE CONCAT('%', #{params.createName}, '%')
</if>
<if test="params.inspectionDepartmentId != null and params.inspectionDepartmentId != ''">
and iu.department_id = #{params.inspectionDepartmentId}
</if>
<if test="params.timeStart != null and params.timeStart != ''">
and i.time_end >= #{params.timeStart}
</if>
<if test="params.timeEnd != null and params.timeEnd != ''">
and i.time_start &lt;= #{params.timeEnd}
</if>
<if test="params.timeEnd != null and params.timeEnd != ''">
and i.time_start &lt;= #{params.timeEnd}
</if>
<if test="params.inspectedCorpinfoName != null and params.inspectedCorpinfoName != ''">
and indc.corp_name LIKE CONCAT('%', #{params.inspectedCorpinfoName}, '%')
</if>
<if test="params.projectName != null and params.projectName != ''">
and kp.project_name LIKE CONCAT('%', #{params.projectName}, '%')
</if>
<if test="params.inspectionUserName != null and params.inspectionUserName != ''">
HAVING inspection_user_name LIKE CONCAT('%', #{params.inspectionUserName}, '%')
</if>
GROUP BY i.id
ORDER BY
CASE WHEN i.status = 6 THEN 0 ELSE 1 END,
i.create_time desc
</select>
</mapper>