Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
b56faf09
Commit
b56faf09
authored
Mar 05, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改查询XML分页查询总数量
修改查询EXCEL分页查询总数量
parent
71db789a
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
107 additions
and
19 deletions
+107
-19
ReadExcelApi.java
src/main/java/com/yxproject/start/api/ReadExcelApi.java
+18
-2
ReadXmlApi.java
src/main/java/com/yxproject/start/api/ReadXmlApi.java
+17
-3
FileNameDicMapper.java
...in/java/com/yxproject/start/mapper/FileNameDicMapper.java
+24
-4
FilesMapper.java
src/main/java/com/yxproject/start/mapper/FilesMapper.java
+17
-3
FileNameDicService.java
.../java/com/yxproject/start/service/FileNameDicService.java
+8
-1
ImportXmlService.java
...in/java/com/yxproject/start/service/ImportXmlService.java
+2
-1
FileNameDicServiceImpl.java
.../yxproject/start/service/impl/FileNameDicServiceImpl.java
+7
-2
ImportXmlServiceImpl.java
...om/yxproject/start/service/impl/ImportXmlServiceImpl.java
+9
-2
TaskListServiceImpl.java
...com/yxproject/start/service/impl/TaskListServiceImpl.java
+5
-1
No files found.
src/main/java/com/yxproject/start/api/ReadExcelApi.java
View file @
b56faf09
...
@@ -174,14 +174,30 @@ public class ReadExcelApi {
...
@@ -174,14 +174,30 @@ public class ReadExcelApi {
* @return
* @return
*/
*/
@RequestMapping
(
"queryPersonPost"
)
@RequestMapping
(
"queryPersonPost"
)
public
String
queryPersonPost
(
@RequestParam
(
"fileName"
)
String
fileName
,
@RequestParam
(
"analysisState"
)
String
analysisState
,
@RequestParam
(
"currPage"
)
String
currPage
,
@RequestParam
(
"pageSize"
)
String
pageSize
,
HttpServletResponse
resp
)
{
public
String
queryPersonPost
(
@RequestParam
(
"fileName"
)
String
fileName
,
@RequestParam
(
"analysisState"
)
String
analysisState
,
@RequestParam
(
"
uploadDate"
)
String
uploadDate
,
@RequestParam
(
"
currPage"
)
String
currPage
,
@RequestParam
(
"pageSize"
)
String
pageSize
,
HttpServletResponse
resp
)
{
List
<
FileNameDicEntity
>
fileNameDicEntities
=
fileNameDicService
.
queryFileNameDic
(
fileName
,
Long
.
valueOf
(
analysisState
),
Long
.
valueOf
(
currPage
),
Long
.
valueOf
(
pageSize
));
List
<
FileNameDicEntity
>
fileNameDicEntities
=
fileNameDicService
.
queryFileNameDic
(
uploadDate
,
fileName
,
Long
.
valueOf
(
analysisState
),
Long
.
valueOf
(
currPage
),
Long
.
valueOf
(
pageSize
));
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
resp
.
setCharacterEncoding
(
"UTF-8"
);
yxjsonResponse
.
outPutSuccess
(
fileNameDicEntities
);
yxjsonResponse
.
outPutSuccess
(
fileNameDicEntities
);
return
yxjsonResponse
.
toJSONString
();
return
yxjsonResponse
.
toJSONString
();
}
}
/**
* 查询个人邮寄解析信息总数量
* @param fileName 文件名称
* @param analysisState 解析状态
* @param resp
* @return
*/
@RequestMapping
(
"queryPersonPostCount"
)
public
String
queryPersonPostCount
(
@RequestParam
(
"fileName"
)
String
fileName
,
@RequestParam
(
"analysisState"
)
String
analysisState
,
@RequestParam
(
"uploadDate"
)
String
uploadDate
,
HttpServletResponse
resp
)
{
int
i
=
fileNameDicService
.
queryFileNameDicCount
(
uploadDate
,
fileName
,
Long
.
valueOf
(
analysisState
));
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
yxjsonResponse
.
outPutSuccess
(
i
+
""
);
return
yxjsonResponse
.
toJSONString
();
}
private
String
replaceDate
(
String
str
){
private
String
replaceDate
(
String
str
){
return
str
.
replace
(
"-"
,
""
);
return
str
.
replace
(
"-"
,
""
);
}
}
...
...
src/main/java/com/yxproject/start/api/ReadXmlApi.java
View file @
b56faf09
...
@@ -127,16 +127,30 @@ public class ReadXmlApi {
...
@@ -127,16 +127,30 @@ public class ReadXmlApi {
/**
/**
* 查询XML解析信息
* 查询XML解析信息
* @param importDate 上传时间
* @param importDate 上传时间
* @param state 状态
* @param resp
* @return
*/
@RequestMapping
(
"queryPersonXML"
)
public
String
queryPersonXMLCount
(
@RequestParam
(
"importDate"
)
String
importDate
,
@RequestParam
(
"currPage"
)
String
currPage
,
@RequestParam
(
"pageSize"
)
String
pageSize
,
HttpServletResponse
resp
)
{
List
<
CountDataEntity
>
countDataEntities
=
importXmlService
.
queryPersonXml
(
replaceDate
(
importDate
),
Long
.
valueOf
(
currPage
)*
Long
.
valueOf
(
pageSize
)
,(
Long
.
valueOf
(
currPage
)-
1
)*
Long
.
valueOf
(
pageSize
)+
1
);
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
yxjsonResponse
.
outPutSuccess
(
countDataEntities
);
return
yxjsonResponse
.
toJSONString
();
}
/**
* 查询XML解析信息总数量
* @param importDate 上传时间
* @param resp
* @param resp
* @return
* @return
*/
*/
@RequestMapping
(
"queryPersonXMLCount"
)
@RequestMapping
(
"queryPersonXMLCount"
)
public
String
queryPersonXMLCount
(
@RequestParam
(
"importDate"
)
String
importDate
,
HttpServletResponse
resp
)
{
public
String
queryPersonXMLCount
(
@RequestParam
(
"importDate"
)
String
importDate
,
HttpServletResponse
resp
)
{
List
<
CountDataEntity
>
countDataEntities
=
importXmlService
.
queryPersonXmlCount
(
replaceDate
(
importDate
));
int
i
=
importXmlService
.
queryPersonXmlCount
(
replaceDate
(
importDate
));
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
resp
.
setCharacterEncoding
(
"UTF-8"
);
yxjsonResponse
.
outPutSuccess
(
countDataEntities
);
yxjsonResponse
.
outPutSuccess
(
i
+
""
);
return
yxjsonResponse
.
toJSONString
();
return
yxjsonResponse
.
toJSONString
();
}
}
...
...
src/main/java/com/yxproject/start/mapper/FileNameDicMapper.java
View file @
b56faf09
...
@@ -35,8 +35,6 @@ public interface FileNameDicMapper {
...
@@ -35,8 +35,6 @@ public interface FileNameDicMapper {
* 按条件查询个人邮寄字典表
* 按条件查询个人邮寄字典表
* @param fileName 文件名称
* @param fileName 文件名称
* @param analysisState 解析状态
* @param analysisState 解析状态
* @param currPage 当前页
* @param pageSize 每页数量
* @return
* @return
*/
*/
@Select
(
"select * from (select FILE_NAME_DIC.*,rownum rn from FILE_NAME_DIC "
+
@Select
(
"select * from (select FILE_NAME_DIC.*,rownum rn from FILE_NAME_DIC "
+
...
@@ -44,10 +42,32 @@ public interface FileNameDicMapper {
...
@@ -44,10 +42,32 @@ public interface FileNameDicMapper {
"<if test='analysisState != -1' >"
+
"<if test='analysisState != -1' >"
+
" and STATE =#{analysisState}"
+
" and STATE =#{analysisState}"
+
"</if>"
+
"</if>"
+
"<if test='uploadDate !=null' >"
+
" and to_char(UPLOAD_DATE,'yyyyMMdd') =#{uploadDate}"
+
"</if>"
+
"<if test='fileName != null ' >"
+
"<if test='fileName != null ' >"
+
" and FILE_NAME =#{fileName}"
+
" and FILE_NAME =#{fileName}"
+
"</if> </where>"
+
"</if> </where>"
+
"and ROWNUM <= 40 ) where rn>= 21"
)
"and ROWNUM <= #{maxNum} ) where rn>= #{minNum}"
)
public
List
<
FileNameDicEntity
>
queryFileNameDic
(
@Param
(
"fileName"
)
String
fileName
,
@Param
(
"analysisState"
)
long
analysisState
,
@Param
(
"currPage"
)
long
currPage
,
@Param
(
"pageSize"
)
long
pageSize
);
public
List
<
FileNameDicEntity
>
queryFileNameDic
(
@Param
(
"uploadDate"
)
String
uploadDate
,
@Param
(
"fileName"
)
String
fileName
,
@Param
(
"analysisState"
)
long
analysisState
,
@Param
(
"maxNum"
)
long
maxNum
,
@Param
(
"minNum"
)
long
minNum
);
/**
* 按条件查询个人邮寄字典表数量
* @param fileName 文件名称
* @param analysisState 解析状态
* @return
*/
@Select
(
"select FILE_NAME_DIC.*,rownum rn from FILE_NAME_DIC "
+
"<where> 1=1 "
+
"<if test='analysisState != -1' >"
+
" and STATE =#{analysisState}"
+
"</if>"
+
"<if test='uploadDate !=null' >"
+
" and to_char(UPLOAD_DATE,'yyyyMMdd') =#{uploadDate}"
+
"</if>"
+
"<if test='fileName != null ' >"
+
" and FILE_NAME =#{fileName}"
+
"</if> </where>)"
)
public
List
<
FileNameDicEntity
>
queryFileNameDicCount
(
@Param
(
"uploadDate"
)
String
uploadDate
,
@Param
(
"fileName"
)
String
fileName
,
@Param
(
"analysisState"
)
long
analysisState
);
}
}
src/main/java/com/yxproject/start/mapper/FilesMapper.java
View file @
b56faf09
...
@@ -15,13 +15,27 @@ public interface FilesMapper {
...
@@ -15,13 +15,27 @@ public interface FilesMapper {
public
long
insertFiles
(
FilesEntity
filesEntity
);
public
long
insertFiles
(
FilesEntity
filesEntity
);
@Select
(
"SELECT FILES.upload_date,count(PREPRO_PERSON.FILE_ID),count(prepro_person.JMSFZSLH) FROM PREPRO_PERSON\n"
+
@Select
(
"select * from (select upload_date upload_Date ,count(ID) package_Count,sum(sumCount) cardCount,sum(ordinaryCount) commonCardCount,sum(postCount) postCardCount ,rownum rn from (SELECT FILES.upload_date,FILES.ID,count(prepro_person.JMSFZSLH) as sumCount,\n"
+
"left join FILES on PREPRO_PERSON.FILE_ID = FILES.ID\n"
+
"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\n"
+
"left join FILES on PREPRO_PERSON.FILE_ID = FILES.ID "
+
"<where> 1=1"
+
"<where> 1=1"
+
"<if test='importDate !=null'>"
+
"<if test='importDate !=null'>"
+
" and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate}"
+
" and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate}"
+
"</if> </where>"
+
"</if> </where>"
+
"group by FILES.upload_date"
)
"group by FILES.upload_date,FILES.ID) where ROWNUM <= #{maxNum} group by upload_date"
+
") where rn>= #{minNum}"
)
public
List
<
CountDataEntity
>
selectFiles
(
@Param
(
"importDate"
)
String
importDate
,
@Param
(
"maxNum"
)
long
maxNum
,
@Param
(
"minNum"
)
long
minNum
);
@Select
(
"select upload_date upload_Date ,count(ID) package_Count,sum(sumCount) cardCount,sum(ordinaryCount) commonCardCount,sum(postCount) postCardCount from (SELECT FILES.upload_date,FILES.ID,count(prepro_person.JMSFZSLH) as sumCount,\n"
+
"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\n"
+
"left join FILES on PREPRO_PERSON.FILE_ID = FILES.ID "
+
"<where> 1=1"
+
"<if test='importDate !=null'>"
+
" and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate}"
+
"</if> </where>"
+
"group by FILES.upload_date,FILES.ID) group by upload_date"
)
public
List
<
CountDataEntity
>
selectFilesCount
(
@Param
(
"importDate"
)
String
importDate
);
public
List
<
CountDataEntity
>
selectFilesCount
(
@Param
(
"importDate"
)
String
importDate
);
}
}
src/main/java/com/yxproject/start/service/FileNameDicService.java
View file @
b56faf09
...
@@ -24,5 +24,12 @@ public interface FileNameDicService {
...
@@ -24,5 +24,12 @@ public interface FileNameDicService {
* @param pageSize 页面数量
* @param pageSize 页面数量
* @return
* @return
*/
*/
public
List
<
FileNameDicEntity
>
queryFileNameDic
(
String
fileName
,
long
analysisState
,
long
currPage
,
long
pageSize
);
public
List
<
FileNameDicEntity
>
queryFileNameDic
(
String
uploadDate
,
String
fileName
,
long
analysisState
,
long
currPage
,
long
pageSize
);
/**
* 查询个人邮寄信息字典表数量
* @param fileName 文件名称
* @param analysisState 解析状态
* @return
*/
public
int
queryFileNameDicCount
(
String
uploadDate
,
String
fileName
,
long
analysisState
);
}
}
src/main/java/com/yxproject/start/service/ImportXmlService.java
View file @
b56faf09
...
@@ -14,5 +14,6 @@ public interface ImportXmlService {
...
@@ -14,5 +14,6 @@ public interface ImportXmlService {
public
boolean
importPersonXml
(
List
<
PreproPersonEntity
>
preproPersonEntities
,
FilesEntity
filesEntity
);
public
boolean
importPersonXml
(
List
<
PreproPersonEntity
>
preproPersonEntities
,
FilesEntity
filesEntity
);
public
List
<
CountDataEntity
>
queryPersonXmlCount
(
String
importDate
);
public
List
<
CountDataEntity
>
queryPersonXml
(
String
importDate
,
long
maxNum
,
long
minNum
);
public
int
queryPersonXmlCount
(
String
importDate
);
}
}
src/main/java/com/yxproject/start/service/impl/FileNameDicServiceImpl.java
View file @
b56faf09
...
@@ -24,7 +24,12 @@ public class FileNameDicServiceImpl implements FileNameDicService {
...
@@ -24,7 +24,12 @@ public class FileNameDicServiceImpl implements FileNameDicService {
}
}
@Override
@Override
public
List
<
FileNameDicEntity
>
queryFileNameDic
(
String
fileName
,
long
analysisState
,
long
currPage
,
long
pageSize
)
{
public
List
<
FileNameDicEntity
>
queryFileNameDic
(
String
uploadDate
,
String
fileName
,
long
analysisState
,
long
currPage
,
long
pageSize
)
{
return
fileNameDicMapper
.
queryFileNameDic
(
fileName
,
analysisState
,
currPage
,
pageSize
);
return
fileNameDicMapper
.
queryFileNameDic
(
uploadDate
,
fileName
,
analysisState
,
currPage
*
pageSize
,(
currPage
-
1
)*
pageSize
+
1
);
}
}
@Override
public
int
queryFileNameDicCount
(
String
uploadDate
,
String
fileName
,
long
analysisState
)
{
return
fileNameDicMapper
.
queryFileNameDicCount
(
uploadDate
,
fileName
,
analysisState
).
size
();
}
}
}
src/main/java/com/yxproject/start/service/impl/ImportXmlServiceImpl.java
View file @
b56faf09
...
@@ -39,8 +39,15 @@ public class ImportXmlServiceImpl implements ImportXmlService {
...
@@ -39,8 +39,15 @@ public class ImportXmlServiceImpl implements ImportXmlService {
return
true
;
return
true
;
}
}
@Override
@Override
public
List
<
CountDataEntity
>
queryPersonXmlCount
(
String
importDate
)
{
public
List
<
CountDataEntity
>
queryPersonXml
(
String
importDate
,
long
maxNum
,
long
minNum
)
{
return
filesMapper
.
selectFilesCount
(
importDate
);
return
filesMapper
.
selectFiles
(
importDate
,
maxNum
,
minNum
);
}
@Override
public
int
queryPersonXmlCount
(
String
importDate
)
{
return
filesMapper
.
selectFilesCount
(
importDate
).
size
();
}
}
}
}
src/main/java/com/yxproject/start/service/impl/TaskListServiceImpl.java
View file @
b56faf09
...
@@ -8,7 +8,10 @@ import com.yxproject.start.service.TaskListService;
...
@@ -8,7 +8,10 @@ import com.yxproject.start.service.TaskListService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.jws.Oneway
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@Service
@Service
public
class
TaskListServiceImpl
implements
TaskListService
{
public
class
TaskListServiceImpl
implements
TaskListService
{
...
@@ -48,8 +51,9 @@ public class TaskListServiceImpl implements TaskListService {
...
@@ -48,8 +51,9 @@ public class TaskListServiceImpl implements TaskListService {
@Override
@Override
public
List
<
Object
>
selectByCountyAtACCU
(
String
date
)
{
public
List
<
Object
>
selectByCountyAtACCU
(
String
date
)
{
List
<
Object
>
objects
=
taskListMapper
.
selectByCountyAtACCU
(
date
);
List
<
Object
>
objects
=
taskListMapper
.
selectByCountyAtACCU
(
date
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
Object
o
:
objects
){
for
(
Object
o
:
objects
){
//TODO 组合JSON
}
}
System
.
out
.
println
(
objects
.
toString
()+
"---------"
);
System
.
out
.
println
(
objects
.
toString
()+
"---------"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment