ke
2024-12-03 bfe4e6e49ea341c8443d7b4b70cb66de0f1aadab
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/mapper/SgProjectInfoMapper.xml
@@ -19,7 +19,7 @@
        <if test="dto.selfUnit != null and dto.selfUnit.size>0 ">
            and
            <foreach collection="dto.selfUnit" item="item" index="index" open="(" separator="or" close=")">
                info.CONSTRUCTION_UNIT Like  CONCAT(CONCAT('%', #{item}), '%')
                info.CONSTRUCTION_UNIT Like  CONCAT(CONCAT('%', #{item}), '%') or   info.SELF_UNIT Like  CONCAT(CONCAT('%', #{item}), '%')
            </foreach>
        </if>
        <if test="dto.userUnit != null and dto.userUnit.size>0">
@@ -90,6 +90,9 @@
        </if>-->
        <if test="dto.adCode != null and dto.adCode !=''">
            and dria."county_cd" = #{dto.adCode}
        </if>
        <if test="dto.othRegCd != null and dto.othRegCd !=''">
            and dria."oth_reg_cd" = #{dto.othRegCd}
        </if>
       <if test="dto.projectSort == null">
            ORDER BY TO_NUMBER(info.project_progress) desc NULLS LAST,info.status desc
@@ -509,7 +512,7 @@
        <if test="dto.selfUnit != null and dto.selfUnit.size>0">
            and
            <foreach collection="dto.selfUnit" item="item" index="index" open="(" separator="or" close=")">
                pro.CONSTRUCTION_UNIT Like  CONCAT(CONCAT('%', #{item}), '%')
                pro.CONSTRUCTION_UNIT Like  CONCAT(CONCAT('%', #{item}), '%') or  pro.SELF_UNIT Like  CONCAT(CONCAT('%', #{item}), '%')
            </foreach>
        </if>
        <if test="dto.userUnit != null and dto.userUnit.size>0">
@@ -562,12 +565,20 @@
            Pdict.DICT_KEY
    </select>
    <select id="getSgCodeByUser" resultType="java.lang.String">
        SELECT
       <!-- SELECT
            dp."SG_CODE"
        FROM
            ywxt.BLADE_USER u
                LEFT JOIN ywxt.blade_dept dp ON u.dept_id = cast( dp.id AS VARCHAR )
        WHERE u.id = #{userId}
        WHERE u.id = #{userId} -->
        SELECT
        distinct dp."SG_CODE"
        FROM
        ywxt.BLADE_USER u
        LEFT JOIN ywxt.blade_dept dp ON   u.dept_id  Like  CONCAT('%',  dp.id , '%')
        WHERE u.id =  #{userId}  and   dp."SG_CODE"  is not null  and <![CDATA[dp."SG_CODE" <>'' ]]>   limit 1
    </select>
    <select id="queryDept" resultType="cn.gistack.sm.sg.VO.SgAllDeptOrUser">
@@ -594,6 +605,18 @@
        <if test="dto.buildStage != null and dto.buildStage != ''">
            and info.build_stage = #{dto.buildStage}
        </if>
        <if test="dto.selfUnit != null and dto.selfUnit.size>0 ">
            and
            <foreach collection="dto.selfUnit" item="item" index="index" open="(" separator="or" close=")">
                info.CONSTRUCTION_UNIT Like  CONCAT(CONCAT('%', #{item}), '%') or info.SELF_UNIT Like  CONCAT(CONCAT('%', #{item}), '%')
            </foreach>
        </if>
        <if test="dto.userUnit != null and dto.userUnit.size>0">
            and
            <foreach collection="dto.userUnit" item="item" index="index" open="(" separator="or" close=")">
                info.CONTROL_UNIT Like  CONCAT(CONCAT('%', #{item}), '%')
            </foreach>
        </if>
        <if test="dto.sgCodeS != null and dto.sgCodeS.size > 0">
            and (dria."province_cd" in
            <foreach collection="dto.sgCodeS" item="id" separator="," open="(" close=")">