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
537285e5
Commit
537285e5
authored
May 14, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加异地证数据核验报表
parent
eb776136
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
112 additions
and
49 deletions
+112
-49
ReportApi.java
src/main/java/com/yxproject/start/api/ReportApi.java
+5
-4
TaskListApi.java
src/main/java/com/yxproject/start/api/TaskListApi.java
+1
-11
DataAuditingEntity.java
...n/java/com/yxproject/start/entity/DataAuditingEntity.java
+42
-18
DataAuditingMapper.java
...n/java/com/yxproject/start/mapper/DataAuditingMapper.java
+32
-9
DataAuditingService.java
...java/com/yxproject/start/service/DataAuditingService.java
+1
-1
TaskListService.java
...ain/java/com/yxproject/start/service/TaskListService.java
+1
-1
DataAuditingServiceImpl.java
...yxproject/start/service/impl/DataAuditingServiceImpl.java
+16
-2
TaskListServiceImpl.java
...com/yxproject/start/service/impl/TaskListServiceImpl.java
+14
-3
No files found.
src/main/java/com/yxproject/start/api/ReportApi.java
View file @
537285e5
...
...
@@ -34,8 +34,8 @@ public class ReportApi {
* @return
*/
@RequestMapping
(
"queryDataAuditingReport"
)
public
List
<
Map
<
String
,
Object
>>
queryDataAuditingReport
(
@RequestParam
(
value
=
"startDate"
)
String
startDate
,
@RequestParam
(
value
=
"endDate"
)
String
endDate
)
{
List
<
Map
<
String
,
Object
>>
mapList
=
dataAuditingService
.
selectDataAuditingReport
(
replaceDate
(
startDate
),
replaceDate
(
endDate
));
public
List
<
Map
<
String
,
Object
>>
queryDataAuditingReport
(
@RequestParam
(
value
=
"startDate"
)
String
startDate
,
@RequestParam
(
value
=
"endDate"
)
String
endDate
,
@RequestParam
(
value
=
"policeName"
)
String
policeName
,
@RequestParam
(
value
=
"policeCode"
)
String
policeCode
)
{
List
<
Map
<
String
,
Object
>>
mapList
=
dataAuditingService
.
selectDataAuditingReport
(
replaceDate
(
startDate
),
replaceDate
(
endDate
)
,
policeName
,
policeCode
);
return
mapList
;
}
...
...
@@ -90,8 +90,9 @@ public class ReportApi {
@RequestMapping
(
"queryQualityCheckReport"
)
public
List
<
Map
<
String
,
Object
>>
queryQualityCheckReport
(
@RequestParam
(
value
=
"startDate"
)
String
startDate
,
@RequestParam
(
value
=
"endDate"
)
String
endDate
)
{
//todo
List
<
Map
<
String
,
Object
>>
mapList
=
dataAuditingService
.
selectDataAuditingReport
(
startDate
,
endDate
);
return
mapList
;
// List<Map<String, Object>> mapList = dataAuditingService.selectDataAuditingReport(startDate, endDate);
// return mapList;
return
null
;
}
/**
...
...
src/main/java/com/yxproject/start/api/TaskListApi.java
View file @
537285e5
...
...
@@ -257,17 +257,7 @@ public class TaskListApi {
}
List
<
Map
<
String
,
Object
>>
objects
=
taskListService
.
selectGroupAtACCU
(
groupNo
);
// 查询数据核验报表信息 并保存数据核验报表
List
<
Map
<
String
,
Object
>>
mapList
=
dataAuditingService
.
selectDataAuditingList
(
groupNo
);
List
<
DataAuditingEntity
>
dataAuditingEntities
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
map
:
mapList
){
DataAuditingEntity
dataAuditingEntity
=
new
DataAuditingEntity
();
dataAuditingEntity
.
setCount
(
Long
.
valueOf
(
map
.
get
(
"COUNT"
)+
""
));
dataAuditingEntity
.
setPoliceSubstation
(
map
.
get
(
"POLICE_SUBSTATION"
)+
""
);
dataAuditingEntities
.
add
(
dataAuditingEntity
);
}
dataAuditingService
.
saveDataAuditingList
(
dataAuditingEntities
);
boolean
b
=
taskListService
.
saveTask
(
objects
,
name
,
0
+
""
);
boolean
b
=
taskListService
.
saveTask
(
objects
,
name
,
0
+
""
,
groupNo
);
}
}
...
...
src/main/java/com/yxproject/start/entity/DataAuditingEntity.java
View file @
537285e5
package
com
.
yxproject
.
start
.
entity
;
import
javax.persistence.*
;
import
java.
sql.Tim
e
;
import
java.
util.Dat
e
;
import
java.util.Objects
;
/**
* @auther zhangyusheng
* 2019/
4/11 11:54
* 2019/
5/14 13:36
*/
@Entity
@Table
(
name
=
"DATA_AUDITING"
,
schema
=
"YINGXIN"
,
catalog
=
""
)
public
class
DataAuditingEntity
{
private
L
ong
id
;
private
l
ong
id
;
private
String
policeSubstation
;
private
Long
count
;
private
Time
submitDate
;
private
Long
validCount
;
private
Date
submitDate
;
private
Long
invalidCount
;
private
Long
taskId
;
@Id
@Column
(
name
=
"ID"
)
public
L
ong
getId
()
{
public
l
ong
getId
()
{
return
id
;
}
public
void
setId
(
L
ong
id
)
{
public
void
setId
(
l
ong
id
)
{
this
.
id
=
id
;
}
...
...
@@ -37,38 +39,60 @@ public class DataAuditingEntity {
}
@Basic
@Column
(
name
=
"COUNT"
)
public
Long
getCount
()
{
return
c
ount
;
@Column
(
name
=
"
VALID_
COUNT"
)
public
Long
get
Valid
Count
()
{
return
validC
ount
;
}
public
void
set
Count
(
Long
c
ount
)
{
this
.
count
=
c
ount
;
public
void
set
ValidCount
(
Long
validC
ount
)
{
this
.
validCount
=
validC
ount
;
}
@Basic
@Column
(
name
=
"SUBMIT_DATE"
)
public
Tim
e
getSubmitDate
()
{
public
Dat
e
getSubmitDate
()
{
return
submitDate
;
}
public
void
setSubmitDate
(
Tim
e
submitDate
)
{
public
void
setSubmitDate
(
Dat
e
submitDate
)
{
this
.
submitDate
=
submitDate
;
}
@Basic
@Column
(
name
=
"INVALID_COUNT"
)
public
Long
getInvalidCount
()
{
return
invalidCount
;
}
public
void
setInvalidCount
(
Long
invalidCount
)
{
this
.
invalidCount
=
invalidCount
;
}
@Basic
@Column
(
name
=
"TASK_ID"
)
public
Long
getTaskId
()
{
return
taskId
;
}
public
void
setTaskId
(
Long
taskId
)
{
this
.
taskId
=
taskId
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
DataAuditingEntity
that
=
(
DataAuditingEntity
)
o
;
return
Objects
.
equals
(
id
,
that
.
id
)
&&
return
id
==
that
.
id
&&
Objects
.
equals
(
policeSubstation
,
that
.
policeSubstation
)
&&
Objects
.
equals
(
count
,
that
.
count
)
&&
Objects
.
equals
(
submitDate
,
that
.
submitDate
);
Objects
.
equals
(
validCount
,
that
.
validCount
)
&&
Objects
.
equals
(
submitDate
,
that
.
submitDate
)
&&
Objects
.
equals
(
taskId
,
that
.
taskId
)
&&
Objects
.
equals
(
invalidCount
,
that
.
invalidCount
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
id
,
policeSubstation
,
count
,
submitDate
);
return
Objects
.
hash
(
id
,
policeSubstation
,
validCount
,
submitDate
,
invalidCount
,
taskId
);
}
}
src/main/java/com/yxproject/start/mapper/DataAuditingMapper.java
View file @
537285e5
...
...
@@ -13,19 +13,42 @@ import java.util.Map;
@Mapper
public
interface
DataAuditingMapper
{
@Insert
(
"insert into Data_Auditing (POLICE_SUBSTATION,
count,submit_date) values (#{policeSubstation},#{c
ount},sysdate) "
)
@Insert
(
"insert into Data_Auditing (POLICE_SUBSTATION,
VALID_COUNT,inVALID_COUNT,submit_date) values (#{policeSubstation},#{validCount},#{invalidC
ount},sysdate) "
)
@Options
(
useGeneratedKeys
=
true
,
keyProperty
=
"id"
,
keyColumn
=
"ID"
)
public
boolean
saveDataAuditingEntity
(
DataAuditingEntity
dataAuditingEntity
);
@Select
(
"select substr(UPLOAD_NO,0,9) POLICE_SUBSTATION ,count(UPLOAD_NO) count from ACC_CARD_T@ACCUYD_LINK \n"
+
"where ACCEPT_NO not in (select ACCEPT_NO from ACC_ERROR_INFO_T@ACCUYD_LINK) and substr(ACCEPT_NO,0,8) in (#{groupNo})\n"
+
"group by substr(UPLOAD_NO,0,9)"
)
@Select
(
"select a.POLICE_SUBSTATION,a.VALID_COUNT,B.INVALID_COUNT from (select substr(UPLOAD_NO,0,9) POLICE_SUBSTATION ,count(UPLOAD_NO) VALID_COUNT \n"
+
" from ACC_CARD_T@ACCUYD_LINK\n"
+
" where ACCEPT_NO not in (\n"
+
" select ACCEPT_NO from ACC_ERROR_INFO_T@ACCUYD_LINK)\n"
+
" and substr(ACCEPT_NO,0,8) in (#{groupNo})\n"
+
" group by substr(UPLOAD_NO,0,9)) a \n"
+
"left join (select substr(UPLOAD_NO,0,9) POLICE_SUBSTATION ,count(UPLOAD_NO) INVALID_COUNT \n"
+
"from ACC_CARD_T@ACCUYD_LINK\n"
+
"where ACCEPT_NO in (\n"
+
" select ACCEPT_NO from ACC_ERROR_INFO_T@ACCUYD_LINK)\n"
+
" and substr(ACCEPT_NO,0,8) in (#{groupNo})\n"
+
" group by substr(UPLOAD_NO,0,9)) b on a.POLICE_SUBSTATION = b.POLICE_SUBSTATION "
)
public
List
<
Map
<
String
,
Object
>>
selectDataAuditingEntity
(
@Param
(
"groupNo"
)
String
groupNo
);
@Select
(
"select DATA_AUDITING.POLICE_SUBSTATION,sum(count),GAJG_DM.GAJG_MC from DATA_AUDITING \n"
+
"left join GAJG_DM on GAJG_DM.GAJG_DM = DATA_AUDITING.POLICE_SUBSTATION \n"
+
"where to_char(SUBMIT_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate}\n"
+
"group by DATA_AUDITING.POLICE_SUBSTATION,GAJG_DM.GAJG_MC"
)
public
List
<
Map
<
String
,
Object
>>
selectDataAuditingReport
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
@Select
(
"<script>"
+
"select nvl(GAJG_DM.GAJG_MC,'000000000') GAJG_MC,DATA_AUDITING.POLICE_SUBSTATION,sum(DATA_AUDITING.VALID_COUNT) VALID_COUNT,\n"
+
"sum(DATA_AUDITING.INVALID_COUNT) inVALID_COUNT,to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd') SUBMIT_DATE,CARD_TYPE_DIC.CARD_TYPE,\n"
+
"CARD_TYPE_DIC.CARD_TYPE_ID from DATA_AUDITING \n"
+
"left join TASK on TASK.TASK_ID = DATA_AUDITING.TASK_ID\n"
+
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE "
+
"left join GAJG_DM on GAJG_DM.GAJG_DM = DATA_AUDITING.POLICE_SUBSTATION\n"
+
"where 1=1 "
+
" <if test = 'policeName != null' >"
+
" and GAJG_DM.GAJG_MC like ${policeName}"
+
"</if>\n"
+
" <if test = 'policeCode != null' >"
+
" and DATA_AUDITING.POLICE_SUBSTATION like ${policeCode}"
+
"</if> "
+
" and to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd') BETWEEN ${startDate} and ${endDate} \n"
+
"group by nvl(GAJG_DM.GAJG_MC,'000000000'),DATA_AUDITING.POLICE_SUBSTATION, to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd'), CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID\n"
+
"order by DATA_AUDITING.POLICE_SUBSTATION"
+
"</script>"
)
public
List
<
Map
<
String
,
Object
>>
selectDataAuditingReport
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"policeName"
)
String
policeName
,
@Param
(
"policeCode"
)
String
policeCode
);
}
src/main/java/com/yxproject/start/service/DataAuditingService.java
View file @
537285e5
...
...
@@ -13,5 +13,5 @@ import java.util.Map;
public
interface
DataAuditingService
{
public
boolean
saveDataAuditingList
(
List
<
DataAuditingEntity
>
dataAuditingEntityList
);
public
List
<
Map
<
String
,
Object
>>
selectDataAuditingList
(
String
groupNo
);
public
List
<
Map
<
String
,
Object
>>
selectDataAuditingReport
(
String
startDate
,
String
endDate
);
public
List
<
Map
<
String
,
Object
>>
selectDataAuditingReport
(
String
startDate
,
String
endDate
,
String
policeName
,
String
policeCode
);
}
src/main/java/com/yxproject/start/service/TaskListService.java
View file @
537285e5
...
...
@@ -43,7 +43,7 @@ public interface TaskListService {
public
boolean
saveTask
(
TaskEntity
taskEntity
);
public
boolean
saveTask
(
List
<
Map
<
String
,
Object
>>
list
,
String
submitName
,
String
process
);
public
boolean
saveTask
(
List
<
Map
<
String
,
Object
>>
list
,
String
submitName
,
String
process
,
String
groupNo
);
public
List
<
Map
<
String
,
Object
>>
selectFastCardAtACCU
(
String
groupNo
);
...
...
src/main/java/com/yxproject/start/service/impl/DataAuditingServiceImpl.java
View file @
537285e5
...
...
@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
javax.transaction.Transactional
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -34,7 +35,20 @@ public class DataAuditingServiceImpl implements DataAuditingService {
return
dataAuditingMapper
.
selectDataAuditingEntity
(
groupNo
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
selectDataAuditingReport
(
String
startDate
,
String
endDate
)
{
return
dataAuditingMapper
.
selectDataAuditingReport
(
startDate
,
endDate
);
public
List
<
Map
<
String
,
Object
>>
selectDataAuditingReport
(
String
startDate
,
String
endDate
,
String
policeName
,
String
policeCode
)
{
List
<
Map
<
String
,
Object
>>
maps
=
dataAuditingMapper
.
selectDataAuditingReport
(
"'"
+
startDate
+
"'"
,
"'"
+
endDate
+
"'"
,
"'"
+
policeName
+
"%'"
,
"'"
+
policeCode
+
"%'"
);
Map
<
String
,
Object
>
sumMap
=
new
LinkedHashMap
<>();
int
validCount
=
0
;
int
invalidCount
=
0
;
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
validCount
+=
Integer
.
valueOf
(
map
.
get
(
"VALID_COUNT"
).
toString
());
invalidCount
+=
Integer
.
valueOf
(
map
.
get
(
"INVALID_COUNT"
).
toString
());
}
sumMap
.
put
(
"VALID_COUNT"
,
validCount
);
sumMap
.
put
(
"INVALID_COUNT"
,
invalidCount
);
sumMap
.
put
(
"GAJG_MC"
,
"北京制证中心"
);
sumMap
.
put
(
"POLICE_SUBSTATION"
,
"合计"
);
maps
.
add
(
sumMap
);
return
maps
;
}
}
src/main/java/com/yxproject/start/service/impl/TaskListServiceImpl.java
View file @
537285e5
...
...
@@ -2,6 +2,7 @@ package com.yxproject.start.service.impl;
import
com.yxproject.start.entity.*
;
import
com.yxproject.start.entity.TaskList.TaskListEntity
;
import
com.yxproject.start.mapper.DataAuditingMapper
;
import
com.yxproject.start.mapper.GroupNoMapper
;
import
com.yxproject.start.mapper.SpecialCardMapper
;
import
com.yxproject.start.mapper.TaskListMapper
;
...
...
@@ -27,6 +28,8 @@ public class TaskListServiceImpl implements TaskListService {
private
SpecialCardMapper
specialCardMapper
;
@Autowired
private
FailedCardService
failedCardService
;
@Autowired
private
DataAuditingMapper
dataAuditingMapper
;
@Override
...
...
@@ -593,7 +596,7 @@ public class TaskListServiceImpl implements TaskListService {
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
saveTask
(
List
<
Map
<
String
,
Object
>>
list
,
String
submitName
,
String
process
)
{
public
boolean
saveTask
(
List
<
Map
<
String
,
Object
>>
list
,
String
submitName
,
String
process
,
String
groupNo
)
{
if
(
list
.
size
()>
0
){
Map
<
String
,
Object
>
stringObjectMap
=
list
.
get
(
0
);
TaskEntity
taskEntity
=
new
TaskEntity
();
...
...
@@ -612,6 +615,16 @@ public class TaskListServiceImpl implements TaskListService {
groupNoEntity
.
setTaskId
(
taskEntity
.
getTaskId
());
groupNoMapper
.
saveGroupNo
(
groupNoEntity
);
}
// 查询数据核验报表信息 并保存数据核验报表
List
<
Map
<
String
,
Object
>>
mapList
=
dataAuditingMapper
.
selectDataAuditingEntity
(
groupNo
);
for
(
Map
<
String
,
Object
>
map
:
mapList
){
DataAuditingEntity
dataAuditingEntity
=
new
DataAuditingEntity
();
dataAuditingEntity
.
setValidCount
(
Long
.
valueOf
(
map
.
get
(
"INVALID_COUNT"
)+
""
));
dataAuditingEntity
.
setValidCount
(
Long
.
valueOf
(
map
.
get
(
"VALID_COUNT"
)+
""
));
dataAuditingEntity
.
setPoliceSubstation
(
map
.
get
(
"POLICE_SUBSTATION"
)+
""
);
dataAuditingEntity
.
setTaskId
(
taskEntity
.
getTaskId
());
dataAuditingMapper
.
saveDataAuditingEntity
(
dataAuditingEntity
);
}
}
return
true
;
...
...
@@ -953,7 +966,6 @@ public class TaskListServiceImpl implements TaskListService {
@Override
public
List
<
Map
<
String
,
Object
>>
getPrintOutCount
()
{
return
taskListMapper
.
getPrintOutCount
();
}
...
...
@@ -969,7 +981,6 @@ public class TaskListServiceImpl implements TaskListService {
@Override
public
List
<
Map
<
String
,
Object
>>
selectRemainderCardInfo
(
String
date
,
String
name
)
{
return
taskListMapper
.
selectRemainderCardInfo
(
date
,
name
);
}
...
...
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