2025-04-10 14:07:11 +08:00
|
|
|
<?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="com.dite.znpt.mapper.ProjectMapper">
|
|
|
|
|
|
|
|
|
2025-05-06 22:29:29 +08:00
|
|
|
|
|
|
|
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ProjectListResp">
|
|
|
|
SELECT
|
|
|
|
prj.project_id, prj.project_name, prj.farm_name, prj.status, prj.cover_url, prj.farm_address, prj.client, prj.client_contact, prj.client_phone, prj.inspection_unit,
|
|
|
|
prj.inspection_contact, prj.inspection_phone, prj.scale, prj.turbine_model, prj.project_manager_id, pm.name AS project_manager_name, prj.construction_person_id, prj.construction_person_name , prj.create_time
|
|
|
|
FROM project prj
|
|
|
|
LEFT JOIN person pm ON pm.person_id = prj.project_manager_id
|
2025-04-10 14:07:11 +08:00
|
|
|
<where>
|
|
|
|
<if test="projectName != null and projectName != ''">
|
2025-05-06 22:29:29 +08:00
|
|
|
AND prj.project_name LIKE concat ('%', #{projectName}, '%')
|
2025-04-10 14:07:11 +08:00
|
|
|
</if>
|
|
|
|
<if test="farmName != null and farmName != ''">
|
2025-05-06 22:29:29 +08:00
|
|
|
AND prj.farm_name LIKE concat ('%', #{farmName}, '%')
|
2025-04-10 14:07:11 +08:00
|
|
|
</if>
|
|
|
|
<if test="farmAddress != null and farmAddress != ''">
|
2025-05-06 22:29:29 +08:00
|
|
|
AND prj.farm_address LIKE concat ('%', #{farmAddress}, '%')
|
2025-04-10 14:07:11 +08:00
|
|
|
</if>
|
2025-05-06 22:29:29 +08:00
|
|
|
<if test="client != null and client != ''">
|
|
|
|
AND prj.client LIKE concat ('%', #{client}, '%')
|
2025-04-10 14:07:11 +08:00
|
|
|
</if>
|
2025-04-11 23:17:53 +08:00
|
|
|
<if test="status != null and status != ''">
|
2025-05-06 22:29:29 +08:00
|
|
|
AND prj.status = #{status}
|
|
|
|
</if>
|
|
|
|
<if test="createDateBegin != null and createDateBegin !='' and createDateEnd != null and createDateEnd != '' ">
|
|
|
|
AND prj.create_time BETWEEN #{createDateBegin} AND #{createDateEnd}
|
2025-04-11 23:17:53 +08:00
|
|
|
</if>
|
2025-04-10 14:07:11 +08:00
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</mapper>
|
|
|
|
|