gonglilong
2024-11-11 e610dbf131729194519ae1ebb63f4c4d613c41a0
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">
@@ -509,7 +509,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 +562,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 limit 1
    </select>
    <select id="queryDept" resultType="cn.gistack.sm.sg.VO.SgAllDeptOrUser">
@@ -597,7 +605,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">