|
@@ -7,9 +7,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<resultMap type="com.project.zcustom.domain.addional.LargeProject" id="LargeProjectResult">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="projectName" column="project_name" />
|
|
|
- <result property="unitCode" column="unit_code" />
|
|
|
+ <result property="appOrg" column="app_org" />
|
|
|
+ <result property="appParentOrg" column="app_parent_org" />
|
|
|
<result property="connectFlag" column="connect_flag" />
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
+ <result property="subdivision" column="subdivision" />
|
|
|
<result property="createBy" column="create_by" />
|
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateBy" column="update_by" />
|
|
@@ -17,23 +19,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectLargeProjectVo">
|
|
|
- select id, project_name, unit_code, connect_flag, del_flag, create_by, create_time, update_by, update_time from large_project
|
|
|
+ select id, project_name, app_org, connect_flag, del_flag, create_by, create_time, update_by, update_time from large_plat_project
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectLargeProjectList" parameterType="LargeProject" resultMap="LargeProjectResult">
|
|
|
<include refid="selectLargeProjectVo"/>
|
|
|
<where>
|
|
|
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
|
|
|
- <if test="unitCode != null "> and unit_code = #{unitCode}</if>
|
|
|
+ <if test="appOrg != null "> and app_org = #{appOrg}</if>
|
|
|
<if test="connectFlag != null and connectFlag != ''"> and connect_flag = #{connectFlag}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertLargeProject" parameterType="LargeProject" useGeneratedKeys="true" keyProperty="id">
|
|
|
- insert into large_project
|
|
|
+ insert into large_plat_project
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="projectName != null">project_name,</if>
|
|
|
- <if test="unitCode != null">unit_code,</if>
|
|
|
+ <if test="appOrg != null">app_org,</if>
|
|
|
<if test="connectFlag != null">connect_flag,</if>
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
@@ -43,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="projectName != null">#{projectName},</if>
|
|
|
- <if test="unitCode != null">#{unitCode},</if>
|
|
|
+ <if test="appOrg != null">#{appOrg},</if>
|
|
|
<if test="connectFlag != null">#{connectFlag},</if>
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
@@ -54,10 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateLargeProject" parameterType="LargeProject">
|
|
|
- update large_project
|
|
|
+ update large_plat_project
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="projectName != null">project_name = #{projectName},</if>
|
|
|
- <if test="unitCode != null">unit_code = #{unitCode},</if>
|
|
|
+ <if test="appOrg != null">app_org = #{appOrg},</if>
|
|
|
<if test="connectFlag != null">connect_flag = #{connectFlag},</if>
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
@@ -69,61 +71,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteLargeProjectById" parameterType="Long">
|
|
|
- delete from large_project where id = #{id}
|
|
|
+ delete from large_plat_project where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteLargeProjectByIds" parameterType="String">
|
|
|
- delete from large_project where id in
|
|
|
+ delete from large_plat_project where id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
<delete id="reallyDeleteByWrapper">
|
|
|
- DELETE FROM large_project ${ew.customSqlSegment}
|
|
|
+ DELETE FROM large_plat_project ${ew.customSqlSegment}
|
|
|
</delete>
|
|
|
|
|
|
<select id="getProjectNum" parameterType="String" resultType="Long">
|
|
|
SELECT
|
|
|
- count(*) AS num
|
|
|
+ count(*) AS num
|
|
|
FROM
|
|
|
- large_plat_project a
|
|
|
- LEFT JOIN large_plat_app_org b ON a.app_org = b.app_org
|
|
|
+ large_plat_project a
|
|
|
+ LEFT JOIN large_plat_app_org b ON a.app_org = b.app_org
|
|
|
WHERE
|
|
|
- a.del_flag = '0'
|
|
|
- AND b.del_flag = '0'
|
|
|
+ a.del_flag = '0'
|
|
|
+ AND b.del_flag = '0'
|
|
|
<if test="appOrg != '10001'">AND ( b.app_parent_org = #{appOrg} OR b.app_org = #{appOrg} )</if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getProjectNumX" parameterType="String" resultMap="LargeProjectResult">
|
|
|
SELECT
|
|
|
- count(*) AS num,
|
|
|
- subdivision
|
|
|
+ count(*) AS num,
|
|
|
+ subdivision
|
|
|
FROM
|
|
|
- large_plat_project a
|
|
|
- LEFT JOIN large_plat_app_org b ON a.app_org = b.app_org
|
|
|
+ large_plat_project a
|
|
|
+ LEFT JOIN large_plat_app_org b ON a.app_org = b.app_org
|
|
|
WHERE
|
|
|
- a.del_flag = '0'
|
|
|
- AND b.del_flag = '0'
|
|
|
+ a.del_flag = '0'
|
|
|
+ AND b.del_flag = '0'
|
|
|
<if test="appOrg != '10001'">AND ( b.app_parent_org = #{appOrg} OR b.app_org = #{appOrg} )</if>
|
|
|
- AND subdivision <= 10
|
|
|
+ AND subdivision <= 10
|
|
|
GROUP BY
|
|
|
- subdivision
|
|
|
+ subdivision
|
|
|
</select>
|
|
|
|
|
|
<select id="getProjectNumY" parameterType="String" resultMap="LargeProjectResult">
|
|
|
SELECT
|
|
|
- count(*) AS num,
|
|
|
- subdivision
|
|
|
+ count(*) AS num,
|
|
|
+ subdivision
|
|
|
FROM
|
|
|
- large_plat_project a
|
|
|
- LEFT JOIN large_plat_app_org b ON a.app_org = b.app_org
|
|
|
+ large_plat_project a
|
|
|
+ LEFT JOIN large_plat_app_org b ON a.app_org = b.app_org
|
|
|
WHERE
|
|
|
- a.del_flag = '0'
|
|
|
- AND b.del_flag = '0'
|
|
|
+ a.del_flag = '0'
|
|
|
+ AND b.del_flag = '0'
|
|
|
<if test="appOrg != '10001'">AND ( b.app_parent_org = #{appOrg} OR b.app_org = #{appOrg} )</if>
|
|
|
- AND subdivision >= 10
|
|
|
+ AND subdivision >= 10
|
|
|
GROUP BY
|
|
|
- subdivision
|
|
|
+ subdivision
|
|
|
</select>
|
|
|
|
|
|
<select id="getProjectByAppOrg" parameterType="String" resultMap="LargeProjectResult">
|