|
@@ -22,37 +22,46 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="page" resultType="com.zjugis.business.bean.entity.Project">
|
|
|
- SELECT * FROM PROJECT
|
|
|
+ SELECT * FROM PROJECT P
|
|
|
+ <if test="params != null and params.userId != null and params.userId != ''">
|
|
|
+ LEFT JOIN PROJECT_WORKER_RELATION PW ON PW.PROJECT_ID = P.ID
|
|
|
+ </if>
|
|
|
<where>
|
|
|
- ISVALID = 1 AND FLOW_STATUS = 90
|
|
|
+ P.ISVALID = 1 AND P.FLOW_STATUS = 90
|
|
|
<if test="params != null and params.hyId != null">
|
|
|
- AND HY_ID = #{params.hyId}
|
|
|
+ AND P.HY_ID = #{params.hyId}
|
|
|
</if>
|
|
|
<if test="params != null and params.xzqdm != null and params.xzqdm != ''">
|
|
|
- AND XZQDM = #{params.xzqdm}
|
|
|
+ AND P.XZQDM = #{params.xzqdm}
|
|
|
</if>
|
|
|
<if test="params != null and params.projectTypeId != null and params.projectTypeId != ''">
|
|
|
- AND PROJECT_TYPE_ID = #{params.projectTypeId}
|
|
|
+ AND P.PROJECT_TYPE_ID = #{params.projectTypeId}
|
|
|
</if>
|
|
|
<if test="params != null and params.xmzt != null">
|
|
|
- AND XMZT = #{params.xmzt}
|
|
|
+ AND P.XMZT = #{params.xmzt}
|
|
|
</if>
|
|
|
<if test="params != null and params.lxsjOn != null">
|
|
|
- AND LXSJ >= #{params.lxsjOn}
|
|
|
+ AND P.LXSJ >= #{params.lxsjOn}
|
|
|
</if>
|
|
|
<if test="params != null and params.lxsjOff != null">
|
|
|
- AND LXSJ <= #{params.lxsjOff}
|
|
|
+ AND P.LXSJ <= #{params.lxsjOff}
|
|
|
</if>
|
|
|
<if test="params != null and params.isSign != null">
|
|
|
- AND IS_SIGN = #{params.isSign}
|
|
|
+ AND P.IS_SIGN = #{params.isSign}
|
|
|
</if>
|
|
|
<if test="params != null and params.xmmc != null and params.xmmc != ''">
|
|
|
<bind name="xmmc" value="'%'+params.xmmc+'%'"/>
|
|
|
- AND XMMC LIKE #{xmmc}
|
|
|
+ AND P.XMMC LIKE #{xmmc}
|
|
|
</if>
|
|
|
<if test="params != null and params.xmbh != null and params.xmbh != ''">
|
|
|
<bind name="xmbh" value="'%'+params.xmbh+'%'"/>
|
|
|
- AND XMBH LIKE #{xmbh}
|
|
|
+ AND P.XMBH LIKE #{xmbh}
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.userId != null and params.userId != ''">
|
|
|
+ AND PW.WORKER_ID = #{params.userId}
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.deptId != null and params.deptId != ''">
|
|
|
+ AND P.ZRBM_ID = #{params.deptId}
|
|
|
</if>
|
|
|
</where>
|
|
|
ORDER BY
|