Commit 0ff8848a authored by suichenguang's avatar suichenguang

余证更改

parent 96be5c0e
......@@ -158,7 +158,7 @@ public class ReadXmlApi {
for (CountDataEntity countDataEntity :list){
dateCount+=countDataEntity.getCardCount();
commonCount+=countDataEntity.getCommonCardCount();
postCount+= countDataEntity.getPostCardCount();
postCount+=countDataEntity.getPostCardCount();
}
dateMap.put("dateCount",dateCount);
dateMap.put("commonCount",commonCount);
......@@ -168,7 +168,29 @@ public class ReadXmlApi {
mapList.add(dateMap);
}
Map<String,Object> resultMap = new HashMap<>();
resultMap.put("mapList",mapList);
if (mapList.size()>=Integer.parseInt(pageSize)){
int max=Integer.parseInt(currPage)*Integer.parseInt(pageSize);
int min = (Integer.parseInt(currPage)-1)*Integer.parseInt(pageSize);
List list = new ArrayList();
if (mapList.size()<max){
for (int i=min-1;i<mapList.size();i++){
list.add(mapList.get(i));
}
}else {
for (int i=min;i<max;i++){
list.add(mapList.get(i));
}
}
resultMap.put("mapList",list);
}else {
resultMap.put("mapList",mapList);
}
resultMap.put("count",mapList.size());
YXJSONResponse yxjsonResponse = new YXJSONResponse();
......
package com.yxproject.start.entity;
import javax.persistence.Entity;
public class CountDataEntity {
private String uploadDate;
......
......@@ -15,14 +15,30 @@ public interface FilesMapper {
public long insertFiles(FilesEntity filesEntity);
// @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>")
"</script> ")
public List<CountDataEntity> selectFiles(@Param("importDate") String importDate,@Param("maxNum")long maxNum,@Param("minNum")long minNum);
@Select({"<script>"+
"select upload_date upload_Date," +
"count(ID) package_Count," +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment