|
@@ -279,4 +279,95 @@
|
|
and ibg.marketer_status in ('TO_PREDICTING','NOT_PAYMENT')
|
|
and ibg.marketer_status in ('TO_PREDICTING','NOT_PAYMENT')
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="xList" resultType="com.dayou.vo.ItemVO">
|
|
|
|
+ <include refid="Common_query_item"/>
|
|
|
|
+ <if test="item!=null and item.name!=null and item.name!='' ">
|
|
|
|
+ and i.name like concat ('%',#{item.name},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.cate!=null and item.cate!='' ">
|
|
|
|
+ and i.cate =#{item.cate}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.businessNo!=null and item.businessNo!='' ">
|
|
|
|
+ and i.business_no like concat (#{item.businessNo},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.clientManager!=null and item.clientManager!='' ">
|
|
|
|
+ and i.client_manager like concat ('%',#{item.clientManager},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.userIds!=null and item.userIds.size!=0 and item!=null and item.departmentIds!=null and item.departmentIds.size==0">
|
|
|
|
+ <if test="item!=null and item.userIds!=null and item.userIds.size!=0">
|
|
|
|
+ and EXISTS ( SELECT item_id FROM item_user iu WHERE iu.item_id = i.id AND iu.user_id in
|
|
|
|
+ <foreach collection="item.userIds" open="(" close=")" separator="," item="userId">
|
|
|
|
+ #{userId}
|
|
|
|
+ </foreach>
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.userIds!=null and item.userIds.size==0 and item!=null and item.departmentIds!=null and item.departmentIds.size!=0">
|
|
|
|
+ <if test="item!=null and item.departmentIds!=null and item.departmentIds.size!=0">
|
|
|
|
+ and i.department_id in
|
|
|
|
+ <foreach collection="item.departmentIds" open="(" close=")" separator="," item="departmentId">
|
|
|
|
+ #{departmentId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.userIds!=null and item.userIds.size!=0 and item!=null and item.departmentIds!=null and item.departmentIds.size!=0">
|
|
|
|
+ and (
|
|
|
|
+ <if test="item!=null and item.userIds!=null and item.userIds.size!=0">
|
|
|
|
+ EXISTS ( SELECT item_id FROM item_user iu WHERE iu.item_id = i.id AND iu.user_id in
|
|
|
|
+ <foreach collection="item.userIds" open="(" close=")" separator="," item="userId">
|
|
|
|
+ #{userId}
|
|
|
|
+ </foreach>
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.departmentIds!=null and item.departmentIds.size!=0">
|
|
|
|
+ or i.department_id in
|
|
|
|
+ <foreach collection="item.departmentIds" open="(" close=")" separator="," item="departmentId">
|
|
|
|
+ #{departmentId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.state!=null and item.state!='' ">
|
|
|
|
+ GROUP BY i.id
|
|
|
|
+ HAVING itemStatus =#{item.state}
|
|
|
|
+ </if>
|
|
|
|
+ order by i.id DESC
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="xMineList" resultType="com.dayou.vo.ItemVO">
|
|
|
|
+ <include refid="Common_query_item"/>
|
|
|
|
+ <if test="item!=null and item.name!=null and item.name!='' ">
|
|
|
|
+ and i.name like concat ('%',#{item.name},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.cate!=null and item.cate!='' ">
|
|
|
|
+ and i.cate =#{item.cate}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.businessNo!=null and item.businessNo!='' ">
|
|
|
|
+ and i.business_no like concat (#{item.businessNo},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.isCurYear!=null and item.isCurYear==true">
|
|
|
|
+ AND i.sign_date >= concat( YEAR ( now())- 1, '-12-23' )
|
|
|
|
+ AND i.sign_date <= concat( YEAR ( now()), '-12-22' )
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.clientManager!=null and item.clientManager!='' ">
|
|
|
|
+ and i.client_manager like concat ('%',#{item.clientManager},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.userIds!=null and item.userIds.size!=0">
|
|
|
|
+ and i.user_id in
|
|
|
|
+ <foreach collection="item.userIds" open="(" close=")" separator="," item="userId">
|
|
|
|
+ #{userId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.departmentIds!=null and item.departmentIds.size!=0">
|
|
|
|
+ and i.department_id in
|
|
|
|
+ <foreach collection="item.departmentIds" open="(" close=")" separator="," item="departmentId">
|
|
|
|
+ #{departmentId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="item!=null and item.state!=null and item.state!='' ">
|
|
|
|
+ GROUP BY i.id
|
|
|
|
+ HAVING itemStatus =#{item.state}
|
|
|
|
+ </if>
|
|
|
|
+ order by i.id DESC
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|