Commit 4f40fee2 authored by dahai's avatar dahai

修改查询新包日志API

parent 1e3db5e1
......@@ -37,16 +37,16 @@ public class InfoManagementApi {
/**
* 查询制证信息数据条数
* @param beginFileName
* @param endFileName
* @param gajgMc
* @param beginFileId 开始包号
* @param endFileId 结束包号
* @param gajgMc 派出所代码
* @param beginDate
* @param endDate
* @return
*/
@RequestMapping("selectCount")
public long selectCount(@Param("beginFileName")String beginFileName, @Param("endFileName")String endFileName, @Param("gajgMc") String gajgMc, @Param("beginDate")String beginDate, @Param("endDate")String endDate){
long count= infoManagementService.count(beginFileName,endFileName,gajgMc,replaceDate(beginDate),replaceDate(endDate));
public long selectCount(@Param("beginFileId")String beginFileId, @Param("endFileId")String endFileId, @Param("gajgMc") String gajgMc, @Param("beginDate")String beginDate, @Param("endDate")String endDate){
long count= infoManagementService.count(beginFileId,endFileId,gajgMc,replaceDate(beginDate),replaceDate(endDate));
return count;
}
......
......@@ -18,10 +18,10 @@ public interface InfoManagementMapper {
"FROM (select * from new_files \n" +
"where 1=1\n" +
"<if test='beginFileName != \"\" '>" +
"and (NEW_FILE_NAME between(#{beginFileName})and (#{endFileName}))\n" +
"and (id between #{beginFileName} and #{endFileName} )\n" +
"</if>" +
"<if test='gajgMc != \"\" '>" +
"and DWMC=#{gajgMc}\n" +
"and DWMC like #{gajgMc} \n" +
"</if>" +
"<if test='beginDate != \"\" '>" +
"and (subStr(CREATE_DATE,0,8) between(#{beginDate})and(#{endDate}))"+
......@@ -38,10 +38,10 @@ public interface InfoManagementMapper {
"SELECT COUNT(*) FROM NEW_FILES \n" +
"where 1=1\n" +
"<if test='beginFileName != \"\" '>" +
"and (NEW_FILE_NAME between(#{beginFileName})and (#{endFileName}))\n" +
"and (id between #{beginFileName})and #{endFileName}))\n" +
"</if>" +
"<if test='gajgMc != \"\" '>" +
"and DWMC=#{gajgMc}\n" +
"and DWMC like #{gajgMc}\n" +
"</if>" +
"<if test='beginDate != \"\" '>" +
"and (subStr(CREATE_DATE,0,8) between(#{beginDate})and(#{endDate}))"+
......
......@@ -78,7 +78,7 @@ public interface LogMapper {
" FROM (SELECT NEW_FILE_NAME,CREATE_DATE,RECORD_NUMBER,DWDM,DWMC " +
" FROM NEW_FILES " +
" RIGHT JOIN PREPRO_PERSON ON NEW_FILES.ID = PREPRO_PERSON.NEW_FILE_ID" +
" where 1=1 " +
" where 1=1 and PREPRO_PERSON.NEW_FILE_ID is not null " +
" <if test='newFileName !=\"\"' >" +
" and NEW_FILES.NEW_FILE_NAME=#{newFileName} " +
" </if>" +
......@@ -89,7 +89,7 @@ public interface LogMapper {
" and substr(NEW_FILES.CREATE_DATE,0,8)=#{createDate}" +
" </if>" +
" <if test='cardId !=\"\"' >" +
" and PREPRO_PERSON.GMSFHM=#{cardId} " +
" and PREPRO_PERSON.GMSFHM=#{cardId} ORDER by CREATE_DATE " +
" </if>" +
" ) " +
" A" +
......@@ -102,9 +102,7 @@ public interface LogMapper {
public List<CountyDicEntity> getCountyListData();
@Select("<script> " +
"SELECT COUNT(*) FROM NEW_FILES \n" +
"LEFT JOIN PREPRO_PERSON ON NEW_FILES.ID = PREPRO_PERSON.NEW_FILE_ID " +
" where 1=1 " +
"SELECT COUNT(*) fileCount, PREPRO_PERSON.NEW_FILE_ID FROM NEW_FILES LEFT JOIN PREPRO_PERSON ON NEW_FILES.ID = PREPRO_PERSON.NEW_FILE_ID where 1=1 and PREPRO_PERSON.NEW_FILE_ID is not null " +
" <if test='newFileName !=\"\"' >" +
" and NEW_FILES.NEW_FILE_NAME=#{newFileName} " +
" </if>" +
......@@ -117,8 +115,9 @@ public interface LogMapper {
" <if test='cardId !=\"\"' >" +
" and PREPRO_PERSON.GMSFHM=#{cardId} " +
" </if>" +
" group by PREPRO_PERSON.NEW_FILE_ID" +
"</script>")
public int selectNewFileLogCount(@Param("newFileName") String newFileName, @Param("cardId") String cardId, @Param("createDate") String createDate, @Param("uploadCountyCode") String uploadCountyName);
public List<Map<String,Object>> selectNewFileLogCount(@Param("newFileName") String newFileName, @Param("cardId") String cardId, @Param("createDate") String createDate, @Param("uploadCountyCode") String uploadCountyName);
// TODO 解析日志总数
......@@ -126,7 +125,7 @@ public interface LogMapper {
"SELECT COUNT(*) FROM FILES \n" +
"LEFT JOIN ANALYSIS ON ANALYSIS.FILE_ID =FILES.ID "+
"LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=ANALYSIS.FILE_DIC_ID " +
"where 1=1 " +
"where 1=1 and PREPRO_PERSON.NEW_FILE_ID is not null " +
"<if test='fileName !=\"\"' >" +
"and FILES.SOURCE_FILE_NAME=#{fileName} " +
"</if>" +
......
......@@ -15,16 +15,16 @@ public class InfoManagementServiceImpl implements InfoManagementService {
@Override
public List<NewFilesEntity> selectInfoManagement(String beginFileName, String endFileName, String gajgMc, String beginDate, String endDate,long currPage,long pageSize) {
public List<NewFilesEntity> selectInfoManagement(String beginId, String endId, String gajgMc, String beginDate, String endDate,long currPage,long pageSize) {
List<NewFilesEntity> newFilesEntities = infoManagementMapper.selectInfoManagement(beginFileName, endFileName, gajgMc, beginDate, endDate,currPage * pageSize,(currPage - 1) * pageSize + 1);
List<NewFilesEntity> newFilesEntities = infoManagementMapper.selectInfoManagement(beginId, endId, "%"+gajgMc+"%", beginDate, endDate,currPage * pageSize,(currPage - 1) * pageSize + 1);
return newFilesEntities;
}
@Override
public long count(String beginFileName, String endFileName, String gajgMc, String beginDate, String endDate) {
long count= infoManagementMapper.count(beginFileName,endFileName,gajgMc,beginDate,endDate);
public long count(String beginId, String endId, String gajgMc, String beginDate, String endDate) {
long count= infoManagementMapper.count(beginId,endId,"%"+gajgMc+"%",beginDate,endDate);
return count;
}
......
......@@ -24,8 +24,11 @@ public class LogServiceImpl implements LogService {
@Override
public int selectNewFileLogCount(String newFileName, String cardId, String createDate, String uploadCountyCode) {
int count= logMapper.selectNewFileLogCount(newFileName,cardId,createDate,uploadCountyCode);
return count;
List<Map<String, Object>> mapList = logMapper.selectNewFileLogCount(newFileName, cardId, createDate, uploadCountyCode);
if (mapList.size()>0){
return Integer.valueOf(mapList.get(0).get("FILECOUNT")+"");
}
return 0;
}
@Override
......
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