| | |
| | | <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"> |
| | |
| | | <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"> |
| | |
| | | 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"> |
| | |
| | | <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"> |