|
|
|
@ -43,8 +43,18 @@ |
|
|
|
<if test="query.archiveDateEnd != null and query.archiveDateEnd != ''"> |
|
|
|
AND pc.archive_date < DATEADD(day, 1, #{query.archiveDateEnd}) |
|
|
|
</if> |
|
|
|
<if test="query.whetherArchive != null and query.whetherArchive != ''"> |
|
|
|
AND ISNULL(pc.whether_archive, 'N') = #{query.whetherArchive} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
ORDER BY pc.id DESC |
|
|
|
ORDER BY |
|
|
|
<choose> |
|
|
|
<when test="query.sidx == 'contractNo' and query.order == 'asc'">pc.contract_no ASC, pc.id DESC</when> |
|
|
|
<when test="query.sidx == 'contractNo' and query.order == 'desc'">pc.contract_no DESC, pc.id DESC</when> |
|
|
|
<when test="query.sidx == 'contractDate' and query.order == 'asc'">pc.contract_date ASC, pc.id DESC</when> |
|
|
|
<when test="query.sidx == 'contractDate' and query.order == 'desc'">pc.contract_date DESC, pc.id DESC</when> |
|
|
|
<otherwise>pc.id DESC</otherwise> |
|
|
|
</choose> |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |