xiangpei
2025-02-22 9703dd782af4d87af8a944a054aa133a699030a4
business/src/main/resources/mapper/ProjectInfoMapper.xml
@@ -187,7 +187,7 @@
        LEFT JOIN t_project_process TPP ON TPI.id = TPP.project_id and TPP.deleted = 0
        LEFT JOIN sys_dept d ON TPI.project_owner_unit = d.dept_id
        <where>
            TPI.deleted = 0
            TPI.deleted = 0 AND TPI.used_status = 2
            ${params.dataScope}
        </where>
@@ -239,11 +239,10 @@
        <id column="id" property="id"/>
    </resultMap>
    <select id="checkProjectNameAndIdIsUnique" resultMap="pInfo">
        select p.id from t_project_info p where  p.project_name =#{name}
        select p.id from t_project_info p where  p.project_name =#{name} and p.id != #{id}
        <if test="code !=null and code !=''">
            or p.project_code =#{code}
            and p.project_code =#{code}
        </if>
        having p.id != #{id}
    </select>