Commit d7dc695b authored by suichenguang's avatar suichenguang

新包日志查询

parent ab5b93eb
......@@ -39,5 +39,9 @@ public class LogApi {
List<Map<String,Object>> result = logService.selectNewFilesLog(newFileName,cardId,createDate,uploadCountyCode, Long.valueOf(currPage),Long.valueOf(pageSize));
return result;
}
@RequestMapping("selectNewFileLogCount")
public String selectNewFileLogCount(@RequestParam("newFileName")String newFileName, @RequestParam("cardId")String cardId,@RequestParam("createDate")String createDate,@RequestParam("uploadCountyCode")String uploadCountyCode){
String total = logService.selectNewFileLogCount(newFileName,cardId,createDate,uploadCountyCode);
return total;
}
}
......@@ -45,4 +45,23 @@ public interface LogMapper {
public List<Map<String,Object>> selectNewFilesLog(@Param("newFileName") String newFileName, @Param("cardId") String cardId, @Param("createDate") String createDate,@Param("uploadCountyCode") String uploadCountyName, @Param("begin") long begin, @Param("end") long end);
@Select("<script> " +
"SELECT COUNT(*) FROM NEW_FILES \n" +
"LEFT JOIN PREPRO_PERSON ON NEW_FILES.ID = PREPRO_PERSON.NEW_FILE_ID " +
" where 1=1 " +
" <if test='newFileName !=\"\"' >" +
" and NEW_FILES.NEW_FILE_NAME=#{newFileName} " +
" </if>" +
" <if test='uploadCountyCode != -1' >" +
" and NEW_FILES.DWDM=#{uploadCountyCode}" +
" </if>" +
" <if test='createDate !=\"\"' >" +
" and substr(NEW_FILES.CREATE_DATE,0,8)=#{createDate}" +
" </if>" +
" <if test='cardId !=\"\"' >" +
" and PREPRO_PERSON.GMSFHM=#{cardId} " +
" </if>" +
"</script>")
public String selectNewFileLogCount(@Param("newFileName") String newFileName, @Param("cardId") String cardId, @Param("createDate") String createDate,@Param("uploadCountyCode") String uploadCountyName);
}
......@@ -7,4 +7,8 @@ import java.util.Map;
public interface LogService {
public List<Map<String,Object>> selectNewFilesLog(String newFileName,String cardId,String createDate,String uploadCountyCode,long currPage,long pageSize);
public String selectNewFileLogCount(String newFileName,String cardId,String createDate,String uploadCountyCode);
}
......@@ -17,4 +17,10 @@ public class LogServiceImpl implements LogService {
List<Map<String, Object>> resultMap= logMapper.selectNewFilesLog(newFileName,cardId,createDate,uploadCountyCode,currPage * pageSize, (currPage - 1) * pageSize + 1);
return resultMap;
}
@Override
public String selectNewFileLogCount(String newFileName, String cardId, String createDate, String uploadCountyCode) {
String count= logMapper.selectNewFileLogCount(newFileName,cardId,createDate,uploadCountyCode);
return 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