|
|
|
@ -126,6 +126,29 @@ |
|
|
|
<if test="query.proofingStatus != null and query.proofingStatus != ''"> |
|
|
|
and t.proofing_status = #{query.proofingStatus} |
|
|
|
</if> |
|
|
|
<if test="query.projectPartSyncFlag != null and query.projectPartSyncFlag != ''"> |
|
|
|
<!-- 同步判定规则:ID < 100000 视为已对齐到 NPI 正式数据。 --> |
|
|
|
<choose> |
|
|
|
<when test='query.projectPartSyncFlag == "Y"'> |
|
|
|
and t.project_part_id is not null |
|
|
|
and t.project_part_id < 100000 |
|
|
|
</when> |
|
|
|
<otherwise> |
|
|
|
and t.project_part_id >= 100000 |
|
|
|
</otherwise> |
|
|
|
</choose> |
|
|
|
</if> |
|
|
|
<if test="query.proofSyncFlag != null and query.proofSyncFlag != ''"> |
|
|
|
<!-- 打样同步优先按 proofing_id 判定;为空时回退 tracking id 保持与前端显示一致。 --> |
|
|
|
<choose> |
|
|
|
<when test='query.proofSyncFlag == "Y"'> |
|
|
|
and ISNULL(t.proofing_id, t.id) < 100000 |
|
|
|
</when> |
|
|
|
<otherwise> |
|
|
|
and ISNULL(t.proofing_id, t.id) >= 100000 |
|
|
|
</otherwise> |
|
|
|
</choose> |
|
|
|
</if> |
|
|
|
<if test="query.projectCategory != null and query.projectCategory != ''"> |
|
|
|
and p.project_category = #{query.projectCategory} |
|
|
|
</if> |
|
|
|
|