xiangpei
2025-02-27 66b258f3e333b2413e3c7c28a8a6794545fc6eb8
business/src/main/resources/mapper/ProjectProcessMapper.xml
@@ -9,17 +9,14 @@
        <result column="project_code" property="projectCode" />
        <result column="content" property="content" />
        <result column="project_type" property="projectType" />
        <result column="investmentAmount" property="investmentAmount" />
        <result column="project_status" property="projectStatus" />
        <result column="fund_type" property="fundType" />
        <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="management_centralization" property="managementCentralization" />-->
        <result column="project_approval_type" property="projectApprovalType" />
        <result column="importance_type" property="importanceType" />
<!--        <result column="year" property="year" />-->
<!--        <result column="year_invest_amount" property="yearInvestAmount" />-->
        <result column="create_project_time" property="createProjectTime" />
        <result column="plan_start_time" property="planStartTime" />
        <result column="plan_complete_time" property="planCompleteTime" />
@@ -34,10 +31,42 @@
        <result column="create_by" property="createBy" />
        <result column="process_def_id" property="processDefId" />
        <result column="process_ins_id" property="processInsId" />
<!--        <association property="id" column=""-->
    </resultMap>
    <resultMap id="PageResultMap" type="com.ycl.domain.vo.ProjectProcessVO">
        <id column="id" property="id"/>
        <result column="project_name" property="projectName" />
        <result column="project_code" property="projectCode" />
        <result column="content" property="content" />
        <result column="project_type" property="projectType" />
        <result column="investmentAmount" property="investmentAmount" />
        <result column="project_status" property="projectStatus" />
        <result column="fund_type" property="fundType" />
        <result column="invest_type" property="investType" />
        <result column="project_phase" property="projectPhase" />
        <result column="tag" property="tag" />
        <result column="project_approval_type" property="projectApprovalType" />
        <result column="importance_type" property="importanceType" />
        <result column="create_project_time" property="createProjectTime" />
        <result column="plan_start_time" property="planStartTime" />
        <result column="plan_complete_time" property="planCompleteTime" />
        <result column="project_address" property="projectAddress" />
        <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="update_by" property="updateBy" />
        <result column="create_by" property="createBy" />
        <result column="process_def_id" property="processDefId" />
        <result column="process_ins_id" property="processInsId" />
        <collection property="children" ofType="com.ycl.domain.vo.ProjectEngineeringVO" select="getProjectEngineering" column="id"></collection>
    </resultMap>
    <select id="getProjectEngineering" parameterType="long" resultMap="com.ycl.mapper.ProjectEngineeringMapper.BaseResultMap">
        SELECT * FROM t_project_engineering WHERE project_info_id = #{id} and deleted = 0 ORDER BY gmt_create
    </select>
    <select id="getById" resultMap="BaseResultMap">
@@ -52,14 +81,16 @@
    </select>
    <select id="getPage" resultMap="BaseResultMap">
    <select id="getPage" resultMap="PageResultMap">
        SELECT
            PI.*,
            TPP.process_def_id,
            TPP.process_ins_id,
            TPIF.total_investment as investmentAmount,
            d.dept_name as project_owner_unit_name
        FROM
            t_project_info PI
                LEFT JOIN t_project_investment_funding TPIF ON TPIF.project_id = PI.id AND TPIF.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>