| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <?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.hotent.project.dao.CostProjectApprovalDao">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.hotent.project.model.CostProjectApproval">
- <id column="project_id" property="projectId" />
- <result column="project_name" property="projectName" />
- <result column="audit_group" property="auditGroup" />
- <result column="send_type" property="sendType"/>
- <result column="catalog_id" property="catalogId" />
- <result column="plan_id" property="planId" />
- <result column="area_code" property="areaCode" />
- <result column="area_level" property="areaLevel" />
- <result column="org_id" property="orgId" />
- <result column="project_year" property="projectYear" />
- <result column="source_type" property="sourceType" />
- <result column="audit_type" property="auditType" />
- <result column="audit_period" property="auditPeriod" />
- <result column="need_hearing" property="needHearing" />
- <result column="is_emergency" property="isEmergency" />
- <result column="establishment_reason" property="establishmentReason" />
- <result column="according_file_url" property="accordingFileUrl" />
- <result column="other_file_url" property="otherFileUrl" />
- <result column="status" property="status" />
- <result column="leader_ids" property="leaderIds" />
- <result column="expert_str" property="expertStr" />
- <result column="is_deleted" property="isDeleted" />
- <result column="create_time" property="createTime" />
- <result column="create_by" property="createBy" />
- <result column="update_time" property="updateTime" />
- <result column="update_by" property="updateBy" />
- <result column="project_members" property="projectMembers" />
- <result column="audited_unit_id" property="auditedUnitId"/>
- <result column="audited_unit_name" property="auditedUnitName"/>
- <result column="org_name" property="orgName"/>
- </resultMap>
- <!-- 通用查询结果列 -->
- <sql id="Base_Column_List">
- project_id, project_name,audited_unit_name,audit_group, send_type, audited_unit_id,catalog_id, plan_id, area_code, area_level, org_id,org_name, project_year, source_type, audit_type, audit_period, need_hearing, is_emergency, establishment_reason, according_file_url, other_file_url, status, leader_ids, expert_str, is_deleted, create_time, create_by, update_time, update_by, project_members
- </sql>
- <select id="selectPage" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from
- cost_project_approval
- ${ew.customSqlSegment}
- </select>
-
- <select id="selectList" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from
- cost_project_approval
- ${ew.customSqlSegment}
- </select>
-
- <select id="selectById" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from
- cost_project_approval
- where
- project_id = ${projectId}
- </select>
- <select id="getCostProjectApprovalPage"
- resultMap="BaseResultMap">
- SELECT
- c.*
- FROM
- cost_project_approval c,
- uc_user u
- WHERE
- c.create_by=u.ACCOUNT_
- <if test=" projectYear != null and projectYear != ''">
- and c.project_year=#{projectYear}
- </if>
- <if test="areaCodes != null and !areaCodes.isEmpty()">
- and c.area_code in
- <foreach collection="areaCodes" item="code" open="(" separator="," close=")">
- #{code}
- </foreach>
- </if>
- <if test=" projectName != null and projectName != ''">
- and c.project_name LIKE CONCAT('%', #{projectName}, '%')
- </if>
- <if test=" dataScope != null and dataScope != ''">
- <if test=" dataScope ==1">
- and (u.CITY_CODE=#{ cityCode} or c.area_code=#{ cityCode})
- </if>
- <if test=" dataScope ==2">
- and (u.COUNTY_CODE=#{ countyCode} or c.area_code=#{ countyCode})
- </if>
- </if>
- ORDER BY c.create_time DESC
- </select>
- </mapper>
|