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
389638fd
Commit
389638fd
authored
Mar 10, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加创建、下发、预订位、平压冲切查询历史任务单API
parent
bdbc8f36
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
143 additions
and
15 deletions
+143
-15
TaskListMapper.java
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
+0
-0
TaskListService.java
...ain/java/com/yxproject/start/service/TaskListService.java
+1
-1
TaskListServiceImpl.java
...com/yxproject/start/service/impl/TaskListServiceImpl.java
+142
-14
No files found.
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
View file @
389638fd
This diff is collapsed.
Click to expand it.
src/main/java/com/yxproject/start/service/TaskListService.java
View file @
389638fd
...
@@ -29,7 +29,7 @@ public interface TaskListService {
...
@@ -29,7 +29,7 @@ public interface TaskListService {
public
List
<
Object
>
selectByCountyAtAuxiliary
(
long
process
);
public
List
<
Object
>
selectByCountyAtAuxiliary
(
long
process
);
public
List
<
Object
>
selectHistoryTaskAtAuxiliary
(
long
process
,
String
date
);
public
List
selectHistoryTaskAtAuxiliary
(
long
process
,
String
date
);
public
Map
selectByCountyAtAuxiliary2
(
long
process
);
public
Map
selectByCountyAtAuxiliary2
(
long
process
);
...
...
src/main/java/com/yxproject/start/service/impl/TaskListServiceImpl.java
View file @
389638fd
...
@@ -301,36 +301,66 @@ public class TaskListServiceImpl implements TaskListService {
...
@@ -301,36 +301,66 @@ public class TaskListServiceImpl implements TaskListService {
* @return
* @return
*/
*/
@Override
@Override
public
List
<
Object
>
selectHistoryTaskAtAuxiliary
(
long
process
,
String
date
)
{
public
List
selectHistoryTaskAtAuxiliary
(
long
process
,
String
date
)
{
String
str
=
"
and
"
;
String
str
=
""
;
int
pro
=
(
int
)
process
;
int
pro
=
(
int
)
process
;
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
switch
(
pro
){
switch
(
pro
){
case
0
:
//查询历史任务单 大批证
mapList
=
taskListMapper
.
selectHistoryTaskAtAuxiliary_common0
(
date
);
//查询历史任务单 快证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_fast0
(
str
));
//查询历史任务单 余证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_remaind0
(
str
));
break
;
case
1
:
case
1
:
str
=
str
+
" to_char(ISSUED_DATE,'yyyyMMdd')= '"
+
date
+
"'"
;
//查询历史任务单 大批证
mapList
=
taskListMapper
.
selectHistoryTaskAtAuxiliary_common1
(
date
);
//查询历史任务单 快证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_fast1
(
str
));
//查询历史任务单 余证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_remaind1
(
str
));
break
;
break
;
case
2
:
case
2
:
str
=
str
+
" to_char(PRINT_OUT_DATE,'yyyyMMdd')= '"
+
date
+
"'"
;
//查询历史任务单 大批证
mapList
=
taskListMapper
.
selectHistoryTaskAtAuxiliary_common2
(
date
);
//查询历史任务单 快证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_fast2
(
str
));
//查询历史任务单 余证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_remaind2
(
str
));
break
;
break
;
case
3
:
case
3
:
str
=
str
+
" to_char(POSITION_DATE,'yyyyMMdd')= '"
+
date
+
"'"
;
//查询历史任务单 大批证
mapList
=
taskListMapper
.
selectHistoryTaskAtAuxiliary_common3
(
date
);
//查询历史任务单 快证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_fast3
(
str
));
//查询历史任务单 余证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_remaind3
(
str
));
break
;
break
;
case
4
:
case
4
:
str
=
str
+
" to_char(CONCORA_CRUSH_DATE,'yyyyMMdd')= '"
+
date
+
"'"
;
//查询历史任务单 大批证
mapList
=
taskListMapper
.
selectHistoryTaskAtAuxiliary_common4
(
date
);
//查询历史任务单 快证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_fast4
(
str
));
//查询历史任务单 余证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_remaind4
(
str
));
break
;
break
;
case
5
:
case
5
:
str
=
str
+
" to_char(PUNCHING_DATE,'yyyyMMdd')= '"
+
date
+
"'"
;
//查询历史任务单 大批证
mapList
=
taskListMapper
.
selectHistoryTaskAtAuxiliary_common5
(
date
);
//查询历史任务单 快证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_fast5
(
str
));
//查询历史任务单 余证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_remaind5
(
str
));
break
;
break
;
default
:
default
:
break
;
break
;
}
}
List
<
Map
<
String
,
Object
>>
mapList1
=
formateMap3
(
mapList
);
//查询历史任务单 大批证
List
<
Map
<
String
,
Object
>>
mapList
=
taskListMapper
.
selectHistoryTaskAtAuxiliary_common
(
process
,
str
);
return
mapList1
;
//查询历史任务单 快证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_fast
(
process
,
str
));
//查询历史任务单 余证
mapList
.
addAll
(
taskListMapper
.
selectHistoryTaskAtAuxiliary_remaind
(
process
,
str
));
return
null
;
}
}
/**
/**
...
@@ -717,4 +747,102 @@ public class TaskListServiceImpl implements TaskListService {
...
@@ -717,4 +747,102 @@ public class TaskListServiceImpl implements TaskListService {
return
typeList
;
return
typeList
;
}
}
private
List
<
Map
<
String
,
Object
>>
formateMap3
(
List
<
Map
<
String
,
Object
>>
maplist
){
Map
<
String
,
Object
>
typeMap
=
new
LinkedHashMap
<>();
for
(
Map
o
:
maplist
){
// 组合JSON
if
(
typeMap
!=
null
&
typeMap
.
containsKey
(
o
.
get
(
"CARD_TYPE"
)+
""
)){
List
<
Map
<
String
,
Object
>>
mapList
=
(
List
<
Map
<
String
,
Object
>>)
typeMap
.
get
(
o
.
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
);
}
}
//将已按制证分好的Map 再次细化分为任务单Map
for
(
String
type:
typeMap
.
keySet
()){
List
<
Map
<
String
,
Object
>>
mapList
=
(
List
<
Map
<
String
,
Object
>>)
typeMap
.
get
(
type
);
Map
<
String
,
Object
>
typemap
=
new
LinkedHashMap
<>();
for
(
Map
<
String
,
Object
>
o:
mapList
){
if
(
typemap
!=
null
&&
typemap
.
containsKey
(
o
.
get
(
"TASK_ID"
)+
""
)){
List
<
Map
<
String
,
Object
>>
maplist_county
=
(
List
<
Map
<
String
,
Object
>>)
typemap
.
get
(
o
.
get
(
"TASK_ID"
)+
""
);
maplist_county
.
add
(
o
);
typemap
.
put
(
o
.
get
(
"TASK_ID"
)+
""
,
maplist_county
);
}
else
{
List
<
Map
<
String
,
Object
>>
maplist_county
=
new
ArrayList
<>();
maplist_county
.
add
(
o
);
typemap
.
put
(
o
.
get
(
"TASK_ID"
)+
""
,
maplist_county
);
}
}
typeMap
.
put
(
type
,
typemap
);
}
List
<
Map
<
String
,
Object
>>
typeList
=
new
ArrayList
<>();
for
(
String
type:
typeMap
.
keySet
()){
Map
<
String
,
Object
>
mapType
=
new
LinkedHashMap
<>();
int
typeSum
=
0
;
String
typeName
=
null
;
List
<
Map
<
String
,
Object
>>
countyList
=
new
ArrayList
<>();
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
mapList
=
(
Map
<
String
,
List
<
Map
<
String
,
Object
>>>)
typeMap
.
get
(
type
);
for
(
String
taskId:
mapList
.
keySet
()){
Map
<
String
,
Object
>
countyMapGroup
=
new
LinkedHashMap
<>();
int
validCount
=
0
;
int
invalidCount
=
0
;
int
specialCount
=
0
;
String
countyName
=
null
;
String
countyCode
=
null
;
Object
submitDate
=
null
;
List
<
Map
<
String
,
Object
>>
countyMapList
=
mapList
.
get
(
taskId
);
for
(
Map
<
String
,
Object
>
countyMap:
countyMapList
){
submitDate
=
countyMap
.
get
(
"SUBMIT_DATE"
);
countyCode
=
countyMap
.
get
(
"COUNTY_CODE"
)+
""
;
countyName
=
countyMap
.
get
(
"COUNTYNAME"
)+
""
;
typeName
=
countyMap
.
get
(
"CARD_TYPE_ID"
)
+
""
;
typeSum
+=
Integer
.
valueOf
(
countyMap
.
get
(
"VALID_COUNT"
)
+
""
);
typeSum
-=
Integer
.
valueOf
(
countyMap
.
get
(
"SPECIAL_CARD_COUNT"
)
+
""
);
validCount
+=
Integer
.
valueOf
(
countyMap
.
get
(
"VALID_COUNT"
)
+
""
);
invalidCount
+=
Integer
.
valueOf
(
countyMap
.
get
(
"INVALID_COUNT"
)
+
""
);
specialCount
+=
Integer
.
valueOf
(
countyMap
.
get
(
"SPECIAL_CARD_COUNT"
)
+
""
);
}
if
(
countyMapList
.
size
()==
1
){
countyMapGroup
.
put
(
"groupNum"
,
countyMapList
.
get
(
0
).
get
(
"GROUP_NO"
));
}
else
{
List
<
Integer
>
c
=
new
ArrayList
<>();
List
<
Integer
>
nsList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
countyMapList
.
size
();
i
++)
{
/**
* 判断组号中时候含有历史回迁组
*/
if
((((
countyMapList
.
get
(
i
)).
get
(
"GROUP_NO"
))
+
""
).
contains
(
"L"
))
{
if
((((
countyMapList
.
get
(
i
)).
get
(
"GROUP_NO"
))
+
""
).
length
()
==
8
)
{
nsList
.
add
(
Integer
.
parseInt
((((
countyMapList
.
get
(
i
)).
get
(
"GROUP_NO"
))
+
""
).
substring
(
1
,
(((
countyMapList
.
get
(
i
)).
get
(
"GROUP_NO"
))
+
""
).
length
())));
}
}
else
{
if
((((
countyMapList
.
get
(
i
)).
get
(
"GROUP_NO"
))
+
""
).
length
()
==
8
)
{
nsList
.
add
(
Integer
.
parseInt
((((
countyMapList
.
get
(
i
)).
get
(
"GROUP_NO"
))
+
""
)));
}
}
}
countyMapGroup
.
put
(
"groupNum"
,
createGroupNo
(
c
,
nsList
));
}
countyMapGroup
.
put
(
"specialCount"
,
specialCount
);
countyMapGroup
.
put
(
"countyCode"
,
countyCode
);
countyMapGroup
.
put
(
"taskId"
,
taskId
);
countyMapGroup
.
put
(
"policeList"
,
countyMapList
);
countyMapGroup
.
put
(
"saveDate"
,
submitDate
);
countyMapGroup
.
put
(
"countyName"
,
countyName
);
countyMapGroup
.
put
(
"countyValidCount"
,
validCount
);
countyMapGroup
.
put
(
"countyInvalidCount"
,
invalidCount
);
countyList
.
add
(
countyMapGroup
);
}
mapType
.
put
(
"typeCode"
,
typeName
);
mapType
.
put
(
"typeSum"
,
typeSum
);
mapType
.
put
(
"typeName"
,
type
);
mapType
.
put
(
"countyList"
,
countyList
);
typeList
.
add
(
mapType
);
}
return
typeList
;
}
}
}
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