@@ -15,14 +15,30 @@ public interface FilesMapper {
publiclonginsertFiles(FilesEntityfilesEntity);
// @Select("<script> " +
// "select * from (select upload_date upload_Date,count(FILE_ID) package_Count,sum(sumCount) cardCount,FILE_ID,sum(ordinaryCount) commonCardCount,sum(postCount) postCardCount ,rownum rn from (SELECT FILES.upload_date,FILE_ID,count(prepro_person.JMSFZSLH) as sumCount, sum(decode(PREPRO_PERSON.CARD_TYPE_ID,0,1,0)) as ordinaryCount ,sum(decode(PREPRO_PERSON.CARD_TYPE_ID,9,1,0)) as postCount \n" +
// "FROM PREPRO_PERSON left join FILES on PREPRO_PERSON.FILE_ID = FILES.ID \n" +
// "where 1=1 and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate} \n" +
// "group by FILES.upload_date,FILE_ID) group by upload_date, rownum, FILE_ID" +
// ") where rn BETWEEN #{minNum} and #{maxNum} </script>")
// public List<CountDataEntity> selectFiles(@Param("importDate") String importDate,@Param("maxNum")long maxNum,@Param("minNum")long minNum);
@Select("<script> "+
"select * from (select upload_date upload_Date,count(FILE_ID) package_Count,sum(sumCount) cardCount,FILE_ID,sum(ordinaryCount) commonCardCount,sum(postCount) postCardCount ,rownum rn from (SELECT FILES.upload_date,FILE_ID,count(prepro_person.JMSFZSLH) as sumCount, sum(decode(PREPRO_PERSON.CARD_TYPE_ID,0,1,0)) as ordinaryCount ,sum(decode(PREPRO_PERSON.CARD_TYPE_ID,9,1,0)) as postCount \n"+
"select upload_date upload_Date,count(FILE_ID) package_Count,sum(sumCount) cardCount,FILE_ID,sum(ordinaryCount) commonCardCount,sum(postCount) postCardCount ,rownum rn from (SELECT FILES.upload_date,FILE_ID,count(prepro_person.JMSFZSLH) as sumCount, sum(decode(PREPRO_PERSON.CARD_TYPE_ID,0,1,0)) as ordinaryCount ,sum(decode(PREPRO_PERSON.CARD_TYPE_ID,9,1,0)) as postCount \n"+
"FROM PREPRO_PERSON left join FILES on PREPRO_PERSON.FILE_ID = FILES.ID \n"+
"where 1=1 and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate} \n"+
"group by FILES.upload_date,FILE_ID) group by upload_date, rownum, FILE_ID"+
") where rn BETWEEN #{minNum} and #{maxNum} </script>")