123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="org.springblade.manager.mapper.RoutingInspectionMapper">
- <select id="page" resultType="org.springblade.manager.vo.RoutingInspectionVO">
- select mri.*,
- (select project_name from m_project_info where id = mri.project_id) as projectName,
- (select dict_value from blade_dict where code = 'inspect_type' and dict_key = mri.inspect_type) as inspectTypeName,
- (select dict_value from blade_dict where code = 'review_inspect_status' and dict_key = mri.review_inspect_status) as reviewInspectStatusName,
- case mri.is_rectify
- when 1 then '需要'
- when 2 then '不需要'
- when 3 then '已整改'
- end as isRectifyName
- from m_routing_inspection mri
- where mri.is_deleted = 0 and mri.project_id = #{inspection.projectId} and contract_id = #{inspection.contractId}
- <if test="inspection.isRectify != null and inspection.isRectify != ''">
- and mri.is_rectify = #{inspection.isRectify}
- </if>
- order by mri.create_time desc
- </select>
- <select id="getAllBuildId" resultType="java.lang.Long">
- select contract_id_sg from m_contract_relation_jlyz WHERE contract_id_jlyz = #{id}
- </select>
- <select id="page2" resultType="org.springblade.manager.vo.RoutingInspectionVO">
- select mri.*,
- (select project_name from m_project_info where id = mri.project_id) as projectName,
- (select dict_value from blade_dict where code = 'inspect_type' and dict_key = mri.inspect_type) as inspectTypeName,
- (select dict_value from blade_dict where code = 'review_inspect_status' and dict_key = mri.review_inspect_status) as reviewInspectStatusName,
- case mri.is_rectify
- when 1 then '需要'
- when 2 then '不需要'
- when 3 then '已整改'
- end as isRectifyName
- from m_routing_inspection mri
- where mri.is_deleted = 0 and mri.project_id = #{inspection.projectId} and contract_id in
- <foreach collection="ids" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- <if test="inspection.isRectify != null and inspection.isRectify != ''">
- and mri.is_rectify = #{inspection.isRectify}
- </if>
- order by mri.create_time desc
- </select>
- </mapper>
|