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
53c1411c
Commit
53c1411c
authored
Nov 09, 2021
by
wuzhilong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
库房生产量报表
parent
d5decbf2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
105 deletions
+101
-105
TaskListMapper.java
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
+42
-9
TaskListServiceImpl.java
...com/yxproject/start/service/impl/TaskListServiceImpl.java
+32
-70
queryQualityCheckReport.html
...iews/queryQualityCheckReport/queryQualityCheckReport.html
+27
-26
No files found.
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
View file @
53c1411c
...
@@ -1610,21 +1610,54 @@ public interface TaskListMapper {
...
@@ -1610,21 +1610,54 @@ public interface TaskListMapper {
@Delete
(
"delete task where task_id = ${taskId}"
)
@Delete
(
"delete task where task_id = ${taskId}"
)
public
boolean
deleteTaskByTaskId
(
@Param
(
"taskId"
)
long
taskId
);
public
boolean
deleteTaskByTaskId
(
@Param
(
"taskId"
)
long
taskId
);
@Select
(
"select a.card_type,a.finish_date,sum(a.valid_count) valid_count,sum(decode(a.failed_count,null,0,a.failed_count)) failed_count from (\n"
+
@Select
(
"select * from (\n"
+
" select task.TASK_ID,card_type,to_char(punching_date,'yyyyMMdd') finish_date ,FAILED_CARD.failed_count,\n"
+
" select \n"
+
" a.finish_date,\n"
+
" sum(decode(card_type,5,a.valid_count)) \"ga\",\n"
+
" sum(decode(card_type,7,a.valid_count)) \"tw\",\n"
+
" sum(decode(card_type,8,a.valid_count)) \"yd\",\n"
+
" sum(decode(card_type,9,a.valid_count)) \"yj\"\n"
+
" from \n"
+
" ( select task.TASK_ID,card_type,to_char(punching_date,'yyyyMMdd') finish_date,\n"
+
" sum(decode(group_no.VALID_COUNT,null,1,group_no.VALID_COUNT-group_no.SPECIAL_CARD_COUNT)) valid_count\n"
+
" sum(decode(group_no.VALID_COUNT,null,1,group_no.VALID_COUNT-group_no.SPECIAL_CARD_COUNT)) valid_count\n"
+
" from task \n"
+
" from task \n"
+
" left join group_no on task.TASK_ID = group_no.TASK_ID\n"
+
" left join group_no on task.TASK_ID = group_no.TASK_ID\n"
+
" left join SPECIAL_CARD on task.TASK_ID = SPECIAL_CARD.TASK_ID\n"
+
" left join SPECIAL_CARD on task.TASK_ID = SPECIAL_CARD.TASK_ID \n"
+
" left join (select TASK_ID,count(FAILED_CARD.accept_no) failed_count \n"
+
" where to_char(punching_date,'yyyyMMdd') BETWEEN #{startDate} and #{endDate}\n"
+
" group by task.TASK_ID, card_type, to_char(punching_date,'yyyyMMdd') ) a\n"
+
" group by a.finish_date ) a\n"
+
" left join (\n"
+
" select to_char(punching_date,'yyyyMMdd') finish_date,\n"
+
" count(decode(card_type,5,card_type)) \"gaf\",\n"
+
" count(decode(card_type,7,card_type)) \"twf\",\n"
+
" count(decode(card_type,8,card_type)) \"ydf\",\n"
+
" count(decode(card_type,9,card_type)) \"yjf\"\n"
+
" from task\n"
+
"left join (\n"
+
" select TASK_ID,count(FAILED_CARD.accept_no) failed_count\n"
+
" from FAILED_CARD group by TASK_ID\n"
+
" ) FAILED_CARD on FAILED_CARD.TASK_ID = task.TASK_ID \n"
+
" where to_char(punching_date,'yyyyMMdd') BETWEEN #{startDate} and #{endDate}\n"
+
" group by to_char(punching_date,'yyyyMMdd')\n"
+
" ) b\n"
+
" on a.finish_date=b.finish_date\n"
+
" left join (\n"
+
" select to_char(FINISH_DATE,'yyyyMMdd') finish_date,\n"
+
" count(decode(card_type,5,card_type)) \"gab\",\n"
+
" count(decode(card_type,7,card_type)) \"twb\",\n"
+
" count(decode(card_type,8,card_type)) \"ydb\",\n"
+
" count(decode(card_type,9,card_type)) \"yjb\"\n"
+
" from FAILED_CARD \n"
+
" from FAILED_CARD \n"
+
" group by TASK_ID\n"
+
" left join task\n"
+
" ) FAILED_CARD on FAILED_CARD.TASK_ID = task.TASK_ID\n"
+
" on task.TASK_ID=FAILED_CARD.TASK_ID\n"
+
" where to_char(punching_date,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} \n"
+
" where to_char(FINISH_DATE,'yyyyMMdd') \n"
+
" group by task.TASK_ID, card_type, to_char(punching_date,'yyyyMMdd'), FAILED_CARD.failed_count\n"
+
" BETWEEN #{startDate} and #{endDate} \n"
+
" ) a group by a.card_type, a.finish_date"
)
" group by to_char(FINISH_DATE,'yyyyMMdd') ) c\n"
+
" on a.finish_date=c.finish_date"
+
" order by a.finish_date"
)
public
List
<
Map
<
String
,
Object
>>
selectQualityCheckReport
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
public
List
<
Map
<
String
,
Object
>>
selectQualityCheckReport
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
@Select
(
"select to_char(FINISH_DATE,'yyyyMMdd')FINISH_DATE,count(FAILED_CARD.accept_no) failed_count \n"
+
@Select
(
"select to_char(FINISH_DATE,'yyyyMMdd')FINISH_DATE,count(FAILED_CARD.accept_no) failed_count \n"
+
"from FAILED_CARD \n"
+
"from FAILED_CARD \n"
+
"where to_char(FINISH_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} \n"
+
"where to_char(FINISH_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} \n"
+
...
...
src/main/java/com/yxproject/start/service/impl/TaskListServiceImpl.java
View file @
53c1411c
...
@@ -13,10 +13,7 @@ import org.springframework.stereotype.Service;
...
@@ -13,10 +13,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
@Service
public
class
TaskListServiceImpl
implements
TaskListService
{
public
class
TaskListServiceImpl
implements
TaskListService
{
...
@@ -1253,72 +1250,37 @@ public class TaskListServiceImpl implements TaskListService {
...
@@ -1253,72 +1250,37 @@ public class TaskListServiceImpl implements TaskListService {
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
selectQualityCheckReport
(
String
startDate
,
String
endDate
)
{
public
List
<
Map
<
String
,
Object
>>
selectQualityCheckReport
(
String
startDate
,
String
endDate
)
{
List
<
Map
<
String
,
Object
>>
mapList
=
taskListMapper
.
selectQualityCheckReport
(
startDate
,
endDate
);
List
<
Map
<
String
,
Object
>>
mapList
=
taskListMapper
.
selectQualityCheckReport
(
startDate
,
endDate
);
List
<
Map
<
String
,
Object
>>
maps
=
taskListMapper
.
selectQualityCheckReportBu
(
startDate
,
endDate
);
int
[]
type_count
=
new
int
[
12
];
Map
<
String
,
Object
>
dateMap
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
countMap
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
stringObjectMap
=
new
LinkedHashMap
<>();
for
(
Map
<
String
,
Object
>
map
:
mapList
)
{
stringObjectMap
.
put
(
"VALID_COUNT"
,
0
);
type_count
[
0
]
=
type_count
[
0
]+(
map
.
get
(
"ga"
)==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"ga"
)+
""
));
stringObjectMap
.
put
(
"FAILED_COUNT"
,
0
);
type_count
[
1
]
=
type_count
[
1
]+(
map
.
get
(
"gaf"
)==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"gaf"
)+
""
));
int
count
=
0
;
type_count
[
2
]
=
type_count
[
2
]+(
map
.
get
(
"gab"
)==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"gab"
)+
""
));
int
failedCount
=
0
;
type_count
[
3
]
=
type_count
[
3
]+(
map
.
get
(
"tw"
)==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"tw"
)+
""
));
int
buCount
=
0
;
type_count
[
4
]
=
type_count
[
4
]+(
map
.
get
(
"twf"
)==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"twf"
)+
""
));
type_count
[
5
]
=
type_count
[
5
]+(
map
.
get
(
"twb"
)==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"twb"
)+
""
));
for
(
Map
<
String
,
Object
>
map
:
mapList
){
type_count
[
6
]
=
type_count
[
6
]+(
map
.
get
(
"yd"
)==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"yd"
)+
""
));;
count
+=
Integer
.
valueOf
(
map
.
get
(
"VALID_COUNT"
)+
""
);
type_count
[
7
]
=
type_count
[
7
]+(
map
.
get
(
"ydf"
)==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"ydf"
)+
""
));
;
failedCount
+=
Integer
.
valueOf
(
map
.
get
(
"FAILED_COUNT"
)+
""
);
type_count
[
8
]
=
type_count
[
8
]+(
map
.
get
(
"ydb"
)==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"ydb"
)+
""
));
;
if
(
dateMap
.
containsKey
(
map
.
get
(
"FINISH_DATE"
).
toString
())){
type_count
[
9
]
=
type_count
[
9
]+(
map
.
get
(
"yj"
)==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"yj"
)+
""
));;
Map
<
String
,
Object
>
objectMap
=(
Map
<
String
,
Object
>)
dateMap
.
get
(
map
.
get
(
"FINISH_DATE"
).
toString
());
type_count
[
10
]
=
type_count
[
10
]+(
map
.
get
(
"yjf"
)==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"yjf"
)+
""
));
;
objectMap
.
put
(
map
.
get
(
"CARD_TYPE"
).
toString
(),
map
);
type_count
[
11
]
=
type_count
[
11
]+(
map
.
get
(
"yjb"
)==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"yjb"
)+
""
));
;
dateMap
.
put
(
map
.
get
(
"FINISH_DATE"
).
toString
(),
objectMap
);
}
}
else
{
countMap
.
put
(
"ga"
,
type_count
[
0
]);
Map
<
String
,
Object
>
objectMap
=
new
LinkedHashMap
<>();
countMap
.
put
(
"gaf"
,
type_count
[
1
]);
objectMap
.
put
(
"0"
,
stringObjectMap
);
countMap
.
put
(
"gab"
,
type_count
[
2
]);
objectMap
.
put
(
"1"
,
stringObjectMap
);
countMap
.
put
(
"tw"
,
type_count
[
3
]);
objectMap
.
put
(
"2"
,
stringObjectMap
);
countMap
.
put
(
"twf"
,
type_count
[
4
]);
objectMap
.
put
(
"5"
,
stringObjectMap
);
countMap
.
put
(
"twb"
,
type_count
[
5
]);
objectMap
.
put
(
"6"
,
stringObjectMap
);
countMap
.
put
(
"yd"
,
type_count
[
6
]);
objectMap
.
put
(
"7"
,
stringObjectMap
);
countMap
.
put
(
"ydf"
,
type_count
[
7
]);
objectMap
.
put
(
"8"
,
stringObjectMap
);
countMap
.
put
(
"ydb"
,
type_count
[
8
]);
objectMap
.
put
(
"9"
,
stringObjectMap
);
countMap
.
put
(
"yj"
,
type_count
[
9
]);
objectMap
.
put
(
"bu"
,
stringObjectMap
);
countMap
.
put
(
"yjf"
,
type_count
[
10
]);
objectMap
.
put
(
map
.
get
(
"CARD_TYPE"
).
toString
(),
map
);
countMap
.
put
(
"yjb"
,
type_count
[
11
]);
dateMap
.
put
(
map
.
get
(
"FINISH_DATE"
).
toString
(),
objectMap
);
countMap
.
put
(
"FINISH_DATE"
,
"合计"
);
}
mapList
.
add
(
countMap
);
}
return
mapList
;
for
(
Map
<
String
,
Object
>
map
:
maps
){
buCount
+=
Integer
.
valueOf
(
map
.
get
(
"FAILED_COUNT"
)+
""
);
}
for
(
String
date
:
dateMap
.
keySet
()){
for
(
Map
<
String
,
Object
>
map
:
maps
){
if
(
date
.
equals
(
map
.
get
(
"FINISH_DATE"
).
toString
())){
Map
<
String
,
Object
>
objectMap
=(
Map
<
String
,
Object
>)
dateMap
.
get
(
date
);
objectMap
.
put
(
"bu"
,
map
);
dateMap
.
put
(
map
.
get
(
"FINISH_DATE"
).
toString
(),
objectMap
);
}
}
}
for
(
String
date
:
dateMap
.
keySet
()){
Map
<
String
,
Object
>
objectMap
=(
Map
<
String
,
Object
>)
dateMap
.
get
(
date
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
String
cardType:
objectMap
.
keySet
()){
list
.
add
((
Map
<
String
,
Object
>)
objectMap
.
get
(
cardType
));
}
dateMap
.
put
(
date
,
list
);
}
Map
<
String
,
Object
>
objectMap
=
new
LinkedHashMap
<>();
objectMap
.
put
(
"validCount"
,
count
);
objectMap
.
put
(
"failedCount"
,
failedCount
);
objectMap
.
put
(
"buCount"
,
buCount
);
dateMap
.
put
(
"合计"
,
objectMap
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
String
date:
dateMap
.
keySet
()){
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"date"
,
date
);
map
.
put
(
"list"
,
dateMap
.
get
(
date
));
list
.
add
(
map
);
}
return
list
;
}
}
@Override
@Override
...
...
src/main/resources/static/views/queryQualityCheckReport/queryQualityCheckReport.html
View file @
53c1411c
...
@@ -27,48 +27,49 @@
...
@@ -27,48 +27,49 @@
<thead>
<thead>
<tr>
<tr>
<th
style=
"text-align: center;"
>
日期
</th>
<th
style=
"text-align: center;"
>
日期
</th>
<th
style=
"text-align: center;"
colspan=
"2"
>
快证
</th>
<th
style=
"text-align: center;"
colspan=
"3"
>
港澳证
</th>
<th
style=
"text-align: center;"
colspan=
"2"
>
重做登记
</th>
<th
style=
"text-align: center;"
colspan=
"3"
>
台湾证
</th>
<th
style=
"text-align: center;"
colspan=
"2"
>
港澳证
</th>
<th
style=
"text-align: center;"
colspan=
"3"
>
异地证
</th>
<th
style=
"text-align: center;"
colspan=
"2"
>
台湾证
</th>
<th
style=
"text-align: center;"
colspan=
"3"
>
异地证邮寄
</th>
<th
style=
"text-align: center;"
colspan=
"2"
>
异地证
</th>
<th
style=
"text-align: center;"
colspan=
"2"
>
补证
</th>
</tr>
</tr>
<tr
class=
"tr"
>
<tr
class=
"tr"
>
<td></td>
<td></td>
<td>
成品
</td>
<td>
成品
</td>
<td
class=
"text-danger"
>
废品
</td>
<td
class=
"text-danger"
>
废品
</td>
<td
class=
"text-success"
>
补证
</td>
<td>
成品
</td>
<td>
成品
</td>
<td
class=
"text-danger"
>
废品
</td>
<td
class=
"text-danger"
>
废品
</td>
<td
class=
"text-success"
>
补证
</td>
<td>
成品
</td>
<td>
成品
</td>
<td
class=
"text-danger"
>
废品
</td>
<td
class=
"text-danger"
>
废品
</td>
<td
class=
"text-success"
>
补证
</td>
<td>
成品
</td>
<td>
成品
</td>
<td
class=
"text-danger"
>
废品
</td>
<td
class=
"text-danger"
>
废品
</td>
<td>
成品
</td>
<td
class=
"text-success"
>
补证
</td>
<td
class=
"text-danger"
>
废品
</td>
<td>
数量
</td>
</tr>
</tr>
</thead>
</thead>
<tbody
ng-repeat=
"item in qualityCheckReportList | orderBy:date"
style=
"border-top: 1px solid #f4f4f4;"
>
<tbody
ng-repeat=
"item in qualityCheckReportList"
style=
"border-top: 1px solid #f4f4f4;"
>
<tr
ng-if=
"item.date!='合计'"
>
<tr>
<td>
{{item.date | myDateFilter}}
</td>
<td>
{{item.FINISH_DATE}}
</td>
<td>
{{item.list[1].VALID_COUNT}}
</td>
<td>
{{item.ga}}
</td>
<td>
{{item.list[1].FAILED_COUNT}}
</td>
<td>
{{item.gaf}}
</td>
<td>
{{item.list[2].VALID_COUNT}}
</td>
<td>
{{item.gab}}
</td>
<td>
{{item.list[2].FAILED_COUNT}}
</td>
<td>
{{item.tw}}
</td>
<td>
{{item.list[3].VALID_COUNT}}
</td>
<td>
{{item.twf}}
</td>
<td>
{{item.list[3].FAILED_COUNT}}
</td>
<td>
{{item.twb}}
</td>
<td>
{{item.list[5].VALID_COUNT}}
</td>
<td>
{{item.yd}}
</td>
<td>
{{item.list[5].FAILED_COUNT}}
</td>
<td>
{{item.ydf}}
</td>
<td>
{{item.list[6].VALID_COUNT}}
</td>
<td>
{{item.ydb}}
</td>
<td>
{{item.list[6].FAILED_COUNT}}
</td>
<td>
{{item.yj}}
</td>
<td>
{{item.list[8].FAILED_COUNT}}
</td>
<td>
{{item.yjf}}
</td>
<td>
{{item.yjb}}
</td>
</tr>
</tr>
<tr
ng-if=
"item.date=='
合计
'"
class=
"bg-gray"
>
<tr
ng-if=
"item.date=='
total
'"
class=
"bg-gray"
>
<td>
{{item.date}}:
</td>
<td>
合计
</td>
<td
colspan=
"4"
>
成品证:{{item.list.validCount}}
</td>
<td
colspan=
"4"
>
成品证:{{item.list.validCount}}
</td>
<td
colspan=
"4"
>
废品证:{{item.list.failedCount}}
</td>
<td
colspan=
"4"
>
废品证:{{item.list.failedCount}}
</td>
<td
colspan=
"
3
"
>
补证:{{item.list.buCount}}
</td>
<td
colspan=
"
5
"
>
补证:{{item.list.buCount}}
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
...
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