|
@@ -141,16 +141,19 @@
|
|
|
t1.object_id as objectId
|
|
|
from evaluate_result t
|
|
|
left join evaluate_object t1 on t1.id = t.evaluated_object_id
|
|
|
- where t.evaluate_item_id in
|
|
|
- <foreach item="evaluateManageItemId" index="index" collection="evaluateManageItemIdList" open="(" close=")"
|
|
|
- separator=",">
|
|
|
- #{evaluateManageItemId}
|
|
|
- </foreach>
|
|
|
- and t1.object_id in
|
|
|
- <foreach item="evaluateObjectId" index="index" collection="evaluateObjectIdList" open="(" close=")"
|
|
|
- separator=",">
|
|
|
- #{evaluateObjectId}
|
|
|
- </foreach>
|
|
|
+ where 1 = 1
|
|
|
+ <if test="evaluateObjectIdList != null and evaluateObjectIdList.size() > 0">
|
|
|
+ and t.evaluate_item_id in
|
|
|
+ <foreach item="evaluateManageItemId" index="index" collection="evaluateManageItemIdList" open="(" close=")" separator=",">
|
|
|
+ #{evaluateManageItemId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="evaluateObjectIdList != null and evaluateObjectIdList.size() > 0">
|
|
|
+ and t1.object_id in
|
|
|
+ <foreach item="evaluateObjectId" index="index" collection="evaluateObjectIdList" open="(" close=")" separator=",">
|
|
|
+ #{evaluateObjectId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
group by t1.object_id, t.evaluate_item_id;
|
|
|
</select>
|
|
|
|
|
@@ -161,16 +164,19 @@
|
|
|
from evaluate_result t
|
|
|
left join evaluate_object t1 on t1.id = t.evaluated_object_id
|
|
|
left join evaluate_manage_item t2 on t2.id = t.evaluate_item_id
|
|
|
- where t.evaluate_item_id in
|
|
|
- <foreach item="evaluateManageItemId" index="index" collection="evaluateManageItemIdList" open="(" close=")"
|
|
|
- separator=",">
|
|
|
- #{evaluateManageItemId}
|
|
|
- </foreach>
|
|
|
- and t1.object_id in
|
|
|
- <foreach item="evaluateObjectId" index="index" collection="evaluateObjectIdList" open="(" close=")"
|
|
|
- separator=",">
|
|
|
- #{evaluateObjectId}
|
|
|
- </foreach>
|
|
|
+ where 1 = 1
|
|
|
+ <if test="evaluateObjectIdList != null and evaluateObjectIdList.size() > 0">
|
|
|
+ and t.evaluate_item_id in
|
|
|
+ <foreach item="evaluateManageItemId" index="index" collection="evaluateManageItemIdList" open="(" close=")" separator=",">
|
|
|
+ #{evaluateManageItemId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="evaluateObjectIdList != null and evaluateObjectIdList.size() > 0">
|
|
|
+ and t1.object_id in
|
|
|
+ <foreach item="evaluateObjectId" index="index" collection="evaluateObjectIdList" open="(" close=")" separator=",">
|
|
|
+ #{evaluateObjectId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
group by t1.object_id, t2.topic;
|
|
|
</select>
|
|
|
|
|
@@ -179,16 +185,19 @@
|
|
|
t1.object_id as objectId
|
|
|
from evaluate_result t
|
|
|
left join evaluate_object t1 on t1.id = t.evaluated_object_id
|
|
|
- where t.evaluate_item_id in
|
|
|
- <foreach item="evaluateManageItemId" index="index" collection="evaluateManageItemIdList" open="(" close=")"
|
|
|
- separator=",">
|
|
|
- #{evaluateManageItemId}
|
|
|
- </foreach>
|
|
|
- and t1.object_id in
|
|
|
- <foreach item="evaluateObjectId" index="index" collection="evaluateObjectIdList" open="(" close=")"
|
|
|
- separator=",">
|
|
|
- #{evaluateObjectId}
|
|
|
- </foreach>
|
|
|
+ where 1 = 1
|
|
|
+ <if test="evaluateObjectIdList != null and evaluateObjectIdList.size() > 0">
|
|
|
+ and t.evaluate_item_id in
|
|
|
+ <foreach item="evaluateManageItemId" index="index" collection="evaluateManageItemIdList" open="(" close=")" separator=",">
|
|
|
+ #{evaluateManageItemId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="evaluateObjectIdList != null and evaluateObjectIdList.size() > 0">
|
|
|
+ and t1.object_id in
|
|
|
+ <foreach item="evaluateObjectId" index="index" collection="evaluateObjectIdList" open="(" close=")" separator=",">
|
|
|
+ #{evaluateObjectId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
group by t1.object_id;
|
|
|
</select>
|
|
|
|