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
e4efc6e6
Commit
e4efc6e6
authored
Mar 05, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传
parent
f5165787
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
30 deletions
+55
-30
FileNameDicMapper.java
...in/java/com/yxproject/start/mapper/FileNameDicMapper.java
+8
-5
FilesMapper.java
src/main/java/com/yxproject/start/mapper/FilesMapper.java
+32
-19
TaskListMapper.java
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
+2
-1
FileNameDicServiceImpl.java
.../yxproject/start/service/impl/FileNameDicServiceImpl.java
+2
-0
ImportXmlServiceImpl.java
...om/yxproject/start/service/impl/ImportXmlServiceImpl.java
+2
-1
TaskListServiceImpl.java
...com/yxproject/start/service/impl/TaskListServiceImpl.java
+8
-3
application.yml
src/main/resources/application.yml
+1
-1
No files found.
src/main/java/com/yxproject/start/mapper/FileNameDicMapper.java
View file @
e4efc6e6
...
...
@@ -37,7 +37,8 @@ public interface FileNameDicMapper {
* @param analysisState 解析状态
* @return
*/
@Select
(
"select * from (select FILE_NAME_DIC.*,rownum rn from FILE_NAME_DIC "
+
@Select
(
"<script> "
+
"select * from (select FILE_NAME_DIC.*,rownum rn from FILE_NAME_DIC "
+
"<where> 1=1 "
+
"<if test='analysisState != -1' >"
+
" and STATE =#{analysisState}"
+
...
...
@@ -47,8 +48,10 @@ public interface FileNameDicMapper {
"</if>"
+
"<if test='fileName != null ' >"
+
" and FILE_NAME =#{fileName}"
+
"</if> </where>"
+
"and ROWNUM <= #{maxNum} ) where rn>= #{minNum}"
)
"</if>"
+
" </where>"
+
"and ROWNUM less then #{maxNum} ) where rn more then #{minNum} "
+
"</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
);
/**
...
...
@@ -57,7 +60,7 @@ public interface FileNameDicMapper {
* @param analysisState 解析状态
* @return
*/
@Select
(
"select FILE_NAME_DIC.*,rownum rn from FILE_NAME_DIC "
+
@Select
(
"
<script>
select FILE_NAME_DIC.*,rownum rn from FILE_NAME_DIC "
+
"<where> 1=1 "
+
"<if test='analysisState != -1' >"
+
" and STATE =#{analysisState}"
+
...
...
@@ -67,7 +70,7 @@ public interface FileNameDicMapper {
"</if>"
+
"<if test='fileName != null ' >"
+
" and FILE_NAME =#{fileName}"
+
"</if> </where>
)
"
)
"</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 @
e4efc6e6
...
...
@@ -15,27 +15,40 @@ public interface FilesMapper {
public
long
insertFiles
(
FilesEntity
filesEntity
);
@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"
+
"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) where ROWNUM <= #{maxNum} group by upload_date"
+
") where rn>= #{minNum}"
)
@Select
(
"<script> "
+
"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, "
+
"sum(decode(PREPRO_PERSON.CARD_TYPE_ID,0,1,0)) as ordinaryCount ,sum(decode(PREPRO_PERSON.CARD_TYPE_ID,9,1,0)) as postCount "
+
" FROM PREPRO_PERSON "
+
"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> "
+
"group by FILES.upload_date,FILES.ID) where ROWNUM less then #{maxNum} group by upload_date"
+
") where rn more then #{minNum} </script>"
)
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"
)
@Select
({
"<script>"
+
"select upload_date upload_Date,"
+
"count(ID) package_Count,"
+
"sum(sumCount) cardCount,"
+
"sum(ordinaryCount) commonCardCount,"
+
"sum(postCount) postCardCount "
+
"FROM (SELECT FILES.upload_date upload_date,FILES.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 "
+
"FROM PREPRO_PERSON "
+
"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>"
+
" group by FILES.upload_date,FILES.ID)a"
+
" group by a.upload_date "
+
"select * from PREPRO_PERSON"
+
"</script>"
})
public
List
<
CountDataEntity
>
selectFilesCount
(
@Param
(
"importDate"
)
String
importDate
);
}
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
View file @
e4efc6e6
...
...
@@ -6,6 +6,7 @@ import com.yxproject.start.entity.TaskList.TaskListEntity;
import
org.apache.ibatis.annotations.*
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author Administrator
...
...
@@ -39,7 +40,7 @@ public interface TaskListMapper {
"left join CARD_TYPE_DIC on PREPRO_PERSON.card_type_id = CARD_TYPE_DIC.CARD_TYPE_ID\n"
+
"left join county_dic on substr(PREPRO_PERSON.JMSFZSLH,0,6)= county_dic.COUNTY_CODE\n"
+
"where county_dic.COUNTY_CODE is not null and to_char(ACC_GROUP_T.IMPORT_TIME,'yyyyMMdd')=#{submitDate}"
)
public
List
<
Object
>
selectByCountyAtACCU
(
@Param
(
"submitDate"
)
String
submitDate
);
public
List
<
Map
<
String
,
Object
>
>
selectByCountyAtACCU
(
@Param
(
"submitDate"
)
String
submitDate
);
/**
...
...
src/main/java/com/yxproject/start/service/impl/FileNameDicServiceImpl.java
View file @
e4efc6e6
...
...
@@ -26,9 +26,11 @@ public class FileNameDicServiceImpl implements FileNameDicService {
@Override
public
List
<
FileNameDicEntity
>
queryFileNameDic
(
String
uploadDate
,
String
fileName
,
long
analysisState
,
long
currPage
,
long
pageSize
)
{
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/ImportXmlServiceImpl.java
View file @
e4efc6e6
...
...
@@ -43,11 +43,12 @@ public class ImportXmlServiceImpl implements ImportXmlService {
@Override
public
List
<
CountDataEntity
>
queryPersonXml
(
String
importDate
,
long
maxNum
,
long
minNum
)
{
return
filesMapper
.
selectFiles
(
importDate
,
maxNum
,
minNum
);
// return null;
}
@Override
public
int
queryPersonXmlCount
(
String
importDate
)
{
// return 2;
return
filesMapper
.
selectFilesCount
(
importDate
).
size
();
}
}
src/main/java/com/yxproject/start/service/impl/TaskListServiceImpl.java
View file @
e4efc6e6
...
...
@@ -5,11 +5,13 @@ import com.yxproject.start.entity.TaskList.CountGajgEntity;
import
com.yxproject.start.entity.TaskList.TaskListEntity
;
import
com.yxproject.start.mapper.TaskListMapper
;
import
com.yxproject.start.service.TaskListService
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.jws.Oneway
;
import
java.util.ArrayList
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -50,14 +52,17 @@ public class TaskListServiceImpl implements TaskListService {
@Override
public
List
<
Object
>
selectByCountyAtACCU
(
String
date
)
{
List
<
Object
>
object
s
=
taskListMapper
.
selectByCountyAtACCU
(
date
);
List
<
Map
<
String
,
Object
>>
map
s
=
taskListMapper
.
selectByCountyAtACCU
(
date
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
Object
o
:
objects
){
for
(
Map
o
:
maps
){
//TODO 组合JSON
Map
<
String
,
Object
>
countyMap
=
new
LinkedHashMap
<>();
countyMap
.
containsKey
((
Map
<
String
,
Object
>)
o
);
}
System
.
out
.
println
(
object
s
.
toString
()+
"---------"
);
System
.
out
.
println
(
map
s
.
toString
()+
"---------"
);
return
null
;
...
...
src/main/resources/application.yml
View file @
e4efc6e6
...
...
@@ -18,6 +18,6 @@ spring:
mybatis
:
type-aliases-package
:
com.yxproject.start.entity
#加载Mybatis配置文件
mapper-locations
:
classpath:mapper/*Mapper.xml
mapper-locations
:
classpath:mapper/
config/
*Mapper.xml
config-location
:
classpath:mapper/config/mybatis-config.xml
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