|
@@ -41,20 +41,27 @@
|
|
|
|
|
|
<!-- 根据省,市,区,区域,区域主管,项目名称、项目编号、甲方名称、项目地址查询项目管理列表-->
|
|
|
<select id="findByCondition" resultType="cn.com.ty.lift.business.project.dao.entity.model.ProjectResponse" parameterType="cn.com.ty.lift.business.project.dao.entity.model.ProjectRequest" >
|
|
|
- SELECT
|
|
|
- id as projectId,
|
|
|
- project_code as projectCode,
|
|
|
- project_name as projectName,
|
|
|
- province as province,
|
|
|
- city as city,
|
|
|
- district as district,
|
|
|
- num as num,
|
|
|
- actual_num as actualNum,
|
|
|
- address as address,
|
|
|
- start_date as startDate,
|
|
|
- end_date as endDate
|
|
|
- FROM project
|
|
|
- WHERE 1=1
|
|
|
+ SELECT
|
|
|
+ p.id as projectId,
|
|
|
+ p.project_code as projectCode,
|
|
|
+ p.project_name as projectName,
|
|
|
+ p.project_usage as projectUsage,
|
|
|
+ p.province as province,
|
|
|
+ p.city as city,
|
|
|
+ p.district as district,
|
|
|
+ p.num as num,
|
|
|
+ p.actual_num as actualNum,
|
|
|
+ p.address as address,
|
|
|
+ p.start_date as startDate,
|
|
|
+ p.end_date as endDate,
|
|
|
+ r.area_name as regionName,
|
|
|
+ ui.name as userName,
|
|
|
+ pc.name as companyName
|
|
|
+ FROM project p
|
|
|
+ LEFT JOIN region r ON p.region_id = r.id
|
|
|
+ LEFT JOIN user_info ui ON r.user_id = ui.user_id
|
|
|
+ LEFT JOIN property_company pc ON p.pp_company_id = pc.id
|
|
|
+ WHERE 1 = 1
|
|
|
<if test="request.provinceCode!=null and request.provinceCode!=''">
|
|
|
and province_code= #{request.provinceCode,jdbcType=VARCHAR}
|
|
|
</if>
|
|
@@ -65,8 +72,11 @@
|
|
|
and district_code = #{request.districtCode,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="request.regionId!=null and request.regionId!=''">
|
|
|
- and region_id = #{request.regionId,jdbcType=VARCHAR}
|
|
|
+ and region_id = #{request.regionId,jdbcType=BIGINT}
|
|
|
</if>
|
|
|
+ <if test="request.userId!=null and request.userId!=''">
|
|
|
+ and r.user_id = #{request.userId,jdbcType=BIGINT}
|
|
|
+ </if>
|
|
|
<if test="request.condition!=null and request.condition!=''">
|
|
|
and (project_name like #{request.condition,jdbcType=VARCHAR}
|
|
|
or project_code like #{request.condition,jdbcType=VARCHAR}
|