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
8f9cf296
Commit
8f9cf296
authored
Mar 06, 2019
by
liboyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
f7b9d3ef
d313a095
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
13 deletions
+78
-13
ExportXMLApi.java
src/main/java/com/yxproject/start/api/ExportXMLApi.java
+1
-1
ReadExcelApi.java
src/main/java/com/yxproject/start/api/ReadExcelApi.java
+14
-2
ReadXmlApi.java
src/main/java/com/yxproject/start/api/ReadXmlApi.java
+10
-0
FileNameDicMapper.java
...in/java/com/yxproject/start/mapper/FileNameDicMapper.java
+3
-3
FilesMapper.java
src/main/java/com/yxproject/start/mapper/FilesMapper.java
+2
-2
FileNameDicServiceImpl.java
.../yxproject/start/service/impl/FileNameDicServiceImpl.java
+1
-1
TaskListServiceImpl.java
...com/yxproject/start/service/impl/TaskListServiceImpl.java
+47
-4
No files found.
src/main/java/com/yxproject/start/api/ExportXMLApi.java
View file @
8f9cf296
...
...
@@ -194,7 +194,7 @@ public class ExportXMLApi {
* @param str 原始字符串
* @return 返回新的字符串
*/
p
ublic
static
String
replaceNullString
(
String
str
)
{
p
rivate
String
replaceNullString
(
String
str
)
{
if
(
str
==
null
)
return
""
;
else
return
str
;
}
...
...
src/main/java/com/yxproject/start/api/ReadExcelApi.java
View file @
8f9cf296
...
...
@@ -175,7 +175,7 @@ public class ReadExcelApi {
*/
@RequestMapping
(
"queryPersonPost"
)
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
(
uploadDate
,
fileName
,
Long
.
valueOf
(
analysisState
),
Long
.
valueOf
(
currPage
),
Long
.
valueOf
(
pageSize
));
List
<
FileNameDicEntity
>
fileNameDicEntities
=
fileNameDicService
.
queryFileNameDic
(
uploadDate
,
replaceNullString
(
fileName
)
,
Long
.
valueOf
(
analysisState
),
Long
.
valueOf
(
currPage
),
Long
.
valueOf
(
pageSize
));
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
yxjsonResponse
.
outPutSuccess
(
fileNameDicEntities
);
...
...
@@ -191,7 +191,7 @@ public class ReadExcelApi {
*/
@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
));
int
i
=
fileNameDicService
.
queryFileNameDicCount
(
uploadDate
,
replaceNullString
(
fileName
)
,
Long
.
valueOf
(
analysisState
));
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
yxjsonResponse
.
outPutSuccess
(
i
+
""
);
...
...
@@ -202,4 +202,15 @@ public class ReadExcelApi {
return
str
.
replace
(
"-"
,
""
);
}
/**
* 字符串去除空格
* @param str 原始字符串
* @return 返回新的字符串
*/
private
String
replaceNullString
(
String
str
)
{
if
(
str
==
""
){
return
null
;
}
else
return
str
;
}
}
\ No newline at end of file
src/main/java/com/yxproject/start/api/ReadXmlApi.java
View file @
8f9cf296
...
...
@@ -158,4 +158,14 @@ public class ReadXmlApi {
return
str
.
replace
(
"-"
,
""
);
}
/**
* 字符串去除空格
* @param str 原始字符串
* @return 返回新的字符串
*/
private
String
replaceNullString
(
String
str
)
{
if
(
str
==
""
){
return
null
;
}
else
return
str
;
}
}
src/main/java/com/yxproject/start/mapper/FileNameDicMapper.java
View file @
8f9cf296
...
...
@@ -50,7 +50,7 @@ public interface FileNameDicMapper {
" and FILE_NAME =#{fileName}"
+
"</if>"
+
" </where>"
+
"
and ROWNUM less then #{maxNum} ) where rn more then #{min
Num} "
+
"
) where rn BETWEEN #{minNum} and #{max
Num} "
+
"</script>"
)
public
List
<
FileNameDicEntity
>
queryFileNameDic
(
@Param
(
"uploadDate"
)
String
uploadDate
,
@Param
(
"fileName"
)
String
fileName
,
@Param
(
"analysisState"
)
long
analysisState
,
@Param
(
"maxNum"
)
long
maxNum
,
@Param
(
"minNum"
)
long
minNum
);
...
...
@@ -66,10 +66,10 @@ public interface FileNameDicMapper {
" and STATE =#{analysisState}"
+
"</if>"
+
"<if test='uploadDate !=null' >"
+
" and to_char(UPLOAD_DATE,'yyyyMMdd') =#{uploadDate}"
+
" and to_char(UPLOAD_DATE,'yyyyMMdd') =
#{uploadDate}"
+
"</if>"
+
"<if test='fileName != null ' >"
+
" and FILE_NAME =#{fileName}"
+
" and FILE_NAME =
#{fileName}"
+
"</if> </where> </script>"
)
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 @
8f9cf296
...
...
@@ -25,8 +25,8 @@ public interface FilesMapper {
"<if test=\"importDate !=null\">"
+
" and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate}"
+
"</if> "
+
"group by FILES.upload_date,FILES.ID)
where ROWNUM less then #{maxNum}
group by upload_date"
+
") where rn
more then #{min
Num} </script>"
)
"group by FILES.upload_date,FILES.ID) group by upload_date"
+
") where rn
BETWEEN #{minNum} and #{max
Num} </script>"
)
public
List
<
CountDataEntity
>
selectFiles
(
@Param
(
"importDate"
)
String
importDate
,
@Param
(
"maxNum"
)
long
maxNum
,
@Param
(
"minNum"
)
long
minNum
);
@Select
({
"<script>"
+
...
...
src/main/java/com/yxproject/start/service/impl/FileNameDicServiceImpl.java
View file @
8f9cf296
...
...
@@ -25,12 +25,12 @@ public class FileNameDicServiceImpl implements FileNameDicService {
@Override
public
List
<
FileNameDicEntity
>
queryFileNameDic
(
String
uploadDate
,
String
fileName
,
long
analysisState
,
long
currPage
,
long
pageSize
)
{
fileNameDicMapper
.
queryFileNameDic
(
uploadDate
,
fileName
,
analysisState
,
currPage
*
pageSize
,
(
currPage
-
1
)
*
pageSize
+
1
);
return
fileNameDicMapper
.
queryFileNameDic
(
uploadDate
,
fileName
,
analysisState
,
currPage
*
pageSize
,(
currPage
-
1
)*
pageSize
+
1
);
// return null;
}
@Override
public
int
queryFileNameDicCount
(
String
uploadDate
,
String
fileName
,
long
analysisState
)
{
// return 2;
return
fileNameDicMapper
.
queryFileNameDicCount
(
uploadDate
,
fileName
,
analysisState
).
size
();
}
...
...
src/main/java/com/yxproject/start/service/impl/TaskListServiceImpl.java
View file @
8f9cf296
...
...
@@ -53,15 +53,58 @@ public class TaskListServiceImpl implements TaskListService {
@Override
public
List
<
Object
>
selectByCountyAtACCU
(
String
date
)
{
List
<
Map
<
String
,
Object
>>
maps
=
taskListMapper
.
selectByCountyAtACCU
(
date
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>
();
List
list
=
new
ArrayList
();
Map
<
String
,
Object
>
typeMap
=
new
LinkedHashMap
<>();
for
(
Map
o
:
maps
){
//TODO 组合JSON
Map
<
String
,
Object
>
countyMap
=
new
LinkedHashMap
<>();
countyMap
.
containsKey
((
Map
<
String
,
Object
>)
o
);
if
(
typeMap
.
containsKey
(
o
.
get
(
"CARD_TYPE"
)+
""
)){
List
<
Map
<
String
,
Object
>>
mapList
=
(
List
<
Map
<
String
,
Object
>>)
typeMap
.
get
(
"CARD_TYPE"
);
mapList
.
add
(
o
);
typeMap
.
put
(
o
.
get
(
"CARD_TYPE"
)+
""
,
mapList
);
}
else
{
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
mapList
.
add
(
o
);
typeMap
.
put
(
o
.
get
(
"CARD_TYPE"
)+
""
,
mapList
);
}
}
for
(
String
type:
typeMap
.
keySet
()){
Map
<
String
,
Object
>
typeMapList
=
new
LinkedHashMap
<>();
List
<
Map
<
String
,
Object
>>
typeList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
mapList
=
(
List
<
Map
<
String
,
Object
>>)
typeMap
.
get
(
type
);
int
typeSum
=
0
;
for
(
Map
o:
mapList
)
{
typeSum
+=
Integer
.
valueOf
(
o
.
get
(
"VALID_COUNT"
)
+
""
);
Map
<
String
,
Object
>
countyMap
=
new
LinkedHashMap
<>();
if
(
countyMap
.
containsKey
(
o
.
get
(
"COUNTYNAME"
)+
""
)){
List
<
Map
<
String
,
Object
>>
countyList
=
(
List
<
Map
<
String
,
Object
>>)
countyMap
.
get
(
"CARD_TYPE"
);
countyList
.
add
(
o
);
Integer
valid_count
=
Integer
.
valueOf
(
o
.
get
(
"VALID_COUNT"
)
+
""
);
valid_count
+=
Integer
.
valueOf
(
countyMap
.
get
(
"countyValidCount"
).
toString
());
Integer
invalid_count
=
Integer
.
valueOf
(
o
.
get
(
"INVALID_COUNT"
)
+
""
);
invalid_count
+=
Integer
.
valueOf
(
countyMap
.
get
(
"countyInvalidCount"
).
toString
());
countyMap
.
put
(
o
.
get
(
"COUNTYNAME"
)+
""
,
countyList
);
countyMap
.
put
(
"countyValidCount"
,
valid_count
);
countyMap
.
put
(
"countyInvalidCount"
,
invalid_count
);
}
else
{
List
<
Map
<
String
,
Object
>>
countyList
=
new
ArrayList
<>();
countyList
.
add
(
o
);
countyMap
.
put
(
o
.
get
(
"COUNTYNAME"
)+
""
,
countyList
);
countyMap
.
put
(
"countyValidCount"
,
Integer
.
valueOf
(
o
.
get
(
"VALID_COUNT"
)+
""
));
countyMap
.
put
(
"countyInvalidCount"
,
Integer
.
valueOf
(
o
.
get
(
"INVALID_COUNT"
)+
""
));
}
countyMap
.
put
(
"countyList"
,
o
);
typeList
.
add
(
countyMap
);
}
typeMapList
.
put
(
"typeName"
,
type
);
typeMapList
.
put
(
"typeSum"
,
typeSum
);
typeMapList
.
put
(
"typeList"
,
typeList
);
list
.
add
(
typeMapList
);
}
System
.
out
.
println
(
maps
.
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