|
|
@@ -68,62 +68,64 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectPage" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
from
|
|
|
cost_survey_template
|
|
|
${ew.customSqlSegment}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectList" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
from
|
|
|
cost_survey_template
|
|
|
${ew.customSqlSegment}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectById" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
from
|
|
|
cost_survey_template
|
|
|
- where
|
|
|
+ where
|
|
|
survey_template_id = #{surveyTemplateId}
|
|
|
</select>
|
|
|
|
|
|
<select id="getCostSurveyTemplatePage1"
|
|
|
resultMap="BaseResultMap">
|
|
|
- SELECT
|
|
|
- c.*
|
|
|
- FROM
|
|
|
- cost_survey_template c,
|
|
|
- uc_user u
|
|
|
- WHERE
|
|
|
- c.create_by=u.ACCOUNT_
|
|
|
- <if test=" contentType != null and contentType != ''">
|
|
|
- and c.content_type=#{ contentType}
|
|
|
- </if>
|
|
|
- <if test=" type != null and type != ''">
|
|
|
- and c.type=#{ type}
|
|
|
- </if>
|
|
|
+ SELECT
|
|
|
+ c.*
|
|
|
+ FROM
|
|
|
+ cost_survey_template c
|
|
|
+ <where>
|
|
|
+ <if test=" contentType != null and contentType != ''">
|
|
|
+ and c.content_type=#{ contentType}
|
|
|
+ </if>
|
|
|
+ <if test=" type != null and type != ''">
|
|
|
+ and c.type=#{ type}
|
|
|
+ </if>
|
|
|
|
|
|
- <if test=" keyword != null and keyword != ''">
|
|
|
- and c.survey_template_name LIKE CONCAT('%', #{ keyword}, '%')
|
|
|
- </if>
|
|
|
- <if test=" status != null and status != ''">
|
|
|
- and c.status=#{ status}
|
|
|
- </if>
|
|
|
- <if test=" dataScope != null and dataScope != ''">
|
|
|
- <if test=" dataScope ==1">
|
|
|
- and (u.PROVINCE_CODE=#{ provinceCode} or u.CITY_CODE=#{ cityCode})
|
|
|
+ <if test=" keyword != null and keyword != ''">
|
|
|
+ and c.survey_template_name LIKE CONCAT('%', #{ keyword}, '%')
|
|
|
</if>
|
|
|
- <if test=" dataScope ==2">
|
|
|
- and (u.PROVINCE_CODE=#{ provinceCode} or u.CITY_CODE=#{ cityCode} or u.COUNTY_CODE=#{ countyCode})
|
|
|
+ <if test=" status != null and status != ''">
|
|
|
+ and c.status=#{ status}
|
|
|
</if>
|
|
|
- </if>
|
|
|
- ORDER BY c.create_time DESC
|
|
|
- </select>
|
|
|
+ <if test=" dataScope != null and dataScope != ''">
|
|
|
+ <if test=" dataScope ==0">
|
|
|
+ and c.area_code= #{provinceCode}
|
|
|
+ </if>
|
|
|
+ <if test=" dataScope ==1">
|
|
|
+ and c.area_code=#{cityCode}
|
|
|
+ </if>
|
|
|
+ <if test=" dataScope ==2">
|
|
|
+ and c.area_code= #{countyCode}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY c.create_time DESC
|
|
|
+ </select>
|
|
|
|
|
|
|
|
|
</mapper>
|