xiangpei
2025-02-14 12f73bafbe361f78d68a35de83ca3b3b4d4e0224
business/src/main/resources/mapper/ProjectProcessMapper.xml
@@ -14,11 +14,10 @@
        <result column="invest_type" property="investType" />
        <result column="project_phase" property="projectPhase" />
        <result column="tag" property="tag" />
        <result column="competent_department" property="competentDepartment" />
<!--        <result column="competent_department" property="competentDepartment" />-->
        <result column="area_code" property="areaCode" />
        <result column="management_centralization" property="managementCentralization" />
<!--        <result column="management_centralization" property="managementCentralization" />-->
        <result column="project_approval_type" property="projectApprovalType" />
        <result column="investment_catalogue" property="investmentCatalogue" />
        <result column="importance_type" property="importanceType" />
        <result column="year" property="year" />
        <result column="year_invest_amount" property="yearInvestAmount" />
@@ -32,18 +31,17 @@
        <result column="longitude" property="longitude" />
        <result column="latitude" property="latitude" />
        <result column="project_owner_unit" property="projectOwnerUnit" />
        <result column="project_owner_unit_name" property="projectOwnerUnitName" />
        <result column="project_contact_person" property="projectContactPerson" />
        <result column="contact" property="contact" />
        <result column="gmt_create_time" property="gmtCreateTime" />
        <result column="gmt_update_time" property="gmtUpdateTime" />
        <result column="update_by" property="updateBy" />
        <result column="create_by" property="createBy" />
        <result column="flowable_process_id" property="flowableProcessId" />
        <result column="process_def_id" property="processDefId" />
        <result column="process_ins_id" property="processInsId" />
<!--        <association property="id" column=""-->
    </resultMap>
@@ -51,7 +49,7 @@
    <select id="getById" resultMap="BaseResultMap">
        SELECT
            TPP.project_id,
            TPP.flowable_process_id,
            TPP.process_def_id,
            TPP.id
        FROM
            t_project_process TPP
@@ -63,19 +61,33 @@
    <select id="getPage" resultMap="BaseResultMap">
        SELECT
            PI.*,
            TPP.flowable_process_id
            TPP.process_def_id,
            TPP.process_ins_id,
            d.dept_name as project_owner_unit_name
        FROM
            t_project_info PI
                LEFT JOIN t_project_process TPP ON TPP.project_id = PI.id AND TPP.deleted = 0 AND PI.deleted = 0
                LEFT JOIN t_project_process TPP ON TPP.project_id = PI.id AND TPP.deleted = 0
                LEFT JOIN sys_dept d ON d.dept_id = PI.project_owner_unit
        <where>
            AND PI.used_status = 2 AND PI.deleted = 0
            <if test="query.projectName != null and query.projectName != ''">
                AND PI.project_name like concat('%', #{query.projectName}, '%')
            </if>
            <if test="query.projectCode != null and query.projectCode != ''">
                AND PI.project_code like concat('%', #{query.projectCode}, '%')
            </if>
            ${query.params.dataScope}
        </where>
    </select>
    <select id="getProjectInfo" parameterType="string" resultType="com.ycl.domain.entity.ProjectInfo">
        SELECT
               PI.id, PI.project_name
        FROM
             t_project_process PP
                 INNER JOIN t_project_info PI ON PP.project_id = PI.id AND PI.deleted = 0 AND PP.process_ins_id = #{processInsId}
    </select>
</mapper>