| | |
| | | select id, factory || '##' || material_code || '##' || TO_CHAR(predict_date, 'yyyy-MM') as key |
| | | from aps_gas_pipeline_prediction |
| | | where 1 = 0 |
| | | <if test="!facs.isEmpty()">or factory in |
| | | <foreach collection="facs" item="item" open="(" separator="," close=")"> |
| | | <if test="!keys.isEmpty()">or factory || '##' || material_code || '##' || TO_CHAR(predict_date, 'yyyy-MM') in |
| | | <foreach collection="keys" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="!facs.isEmpty()">or material_code in |
| | | <foreach collection="codes" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </foreach> |
| | | </if> |
| | | </script> |
| | | """) |
| | | List<Map<String, Object>> selectByFacOrMaterial(@NotNull Set<String> facs, @NotNull Set<String> codes); |
| | | List<Map<String, Object>> selectByFacOrMaterial(@NotNull Set<String> keys); |
| | | |
| | | } |