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
e9839286
Commit
e9839286
authored
Aug 29, 2019
by
wuzhilong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
制证量统计图
parent
c668099a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
164 additions
and
23 deletions
+164
-23
CartogramApi.java
src/main/java/com/yxproject/start/api/CartogramApi.java
+67
-0
CartogramMapper.java
...main/java/com/yxproject/start/mapper/CartogramMapper.java
+31
-0
CartogramService.java
...in/java/com/yxproject/start/service/CartogramService.java
+10
-0
CartogramServiceImpl.java
...om/yxproject/start/service/impl/CartogramServiceImpl.java
+21
-0
service.js
src/main/resources/static/js/service.js
+5
-3
utils.js
src/main/resources/static/js/utils.js
+0
-0
blank.html
src/main/resources/static/views/blank/blank.html
+21
-18
blank.js
src/main/resources/static/views/blank/blank.js
+9
-2
No files found.
src/main/java/com/yxproject/start/api/CartogramApi.java
0 → 100644
View file @
e9839286
package
com
.
yxproject
.
start
.
api
;
import
com.yxproject.start.service.CartogramService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author ad
*/
@RestController
@RequestMapping
(
"Cartogram"
)
public
class
CartogramApi
{
@Autowired
private
CartogramService
cartogramService
;
/**
* 查询制证统计图数据
* @param json 查询条件
*/
@PostMapping
(
"findCardDetailedList"
)
public
Map
<
String
,
Object
>
findNanufacturingQuantity
(
@RequestBody
String
json
)
{
List
<
Integer
>
list_pz
=
new
ArrayList
<>();
List
<
Integer
>
list_jr
=
new
ArrayList
<>();
List
<
Integer
>
list_yj
=
new
ArrayList
<>();
List
<
Integer
>
list_fz
=
new
ArrayList
<>();
Map
map
;
List
<
Map
<
String
,
Integer
>>
str
;
Map
strMap
=
new
HashMap
<
String
,
Object
>();
for
(
int
i
=
0
;
i
<
12
;
i
++){
list_pz
.
add
(
0
);
list_jr
.
add
(
0
);
list_yj
.
add
(
0
);
list_fz
.
add
(
0
);
}
String
date
=
json
.
toString
();
str
=
cartogramService
.
findNanufacturingQuantity
(
date
);
for
(
int
i
=
0
;
i
<
str
.
size
();
i
++)
{
map
=
str
.
get
(
i
);
if
(
map
.
get
(
"CODE"
).
toString
().
equals
(
"0"
)){
list_pz
.
set
(
Integer
.
parseInt
(
map
.
get
(
"DD"
).
toString
())
-
1
,
Integer
.
parseInt
(
map
.
get
(
"NUM"
).
toString
()));
}
if
(
map
.
get
(
"CODE"
).
toString
().
equals
(
"5"
)){
list_jr
.
set
(
Integer
.
parseInt
(
map
.
get
(
"DD"
).
toString
())
-
1
,
Integer
.
parseInt
(
map
.
get
(
"NUM"
).
toString
()));
}
if
(
map
.
get
(
"CODE"
).
toString
().
equals
(
"7"
)){
list_yj
.
set
(
Integer
.
parseInt
(
map
.
get
(
"DD"
).
toString
())
-
1
,
Integer
.
parseInt
(
map
.
get
(
"NUM"
).
toString
()));
}
if
(
map
.
get
(
"CODE"
).
toString
().
equals
(
"99"
)){
list_fz
.
set
(
Integer
.
parseInt
(
map
.
get
(
"DD"
).
toString
())
-
1
,
Integer
.
parseInt
(
map
.
get
(
"NUM"
).
toString
()));
}
}
strMap
.
put
(
"pz"
,
list_pz
);
strMap
.
put
(
"ga"
,
list_jr
);
strMap
.
put
(
"tw"
,
list_yj
);
strMap
.
put
(
"fz"
,
list_fz
);
strMap
.
put
(
"date"
,
date
);
return
strMap
;
}
}
src/main/java/com/yxproject/start/mapper/CartogramMapper.java
0 → 100644
View file @
e9839286
package
com
.
yxproject
.
start
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
public
interface
CartogramMapper
{
/**
*制证量统计图
*/
@Select
(
"select task.CARD_TYPE code,dic.CARD_TYPE,to_char(task.ISSUED_DATE,'MM') dd,sum(gro.VALID_COUNT) num\n"
+
" from TASK task \n"
+
" LEFT join GROUP_NO gro\n"
+
" on task.TASK_ID=gro.TASK_ID\n"
+
" LEFT join CARD_TYPE_DIC dic \n"
+
" on task.CARD_TYPE=dic.CARD_TYPE_ID\n"
+
" where to_char(task.ISSUED_DATE,'yyyy')=#{date} \n"
+
" group by task.CARD_TYPE,dic.CARD_TYPE,to_char(task.ISSUED_DATE,'MM')\n"
+
" union all\n"
+
" select 99 as code,'废证',to_char(fa.SUBMIT_DATE,'MM') dd ,count(ACCEPT_NO) num\n"
+
" from FAILED_CARD fa\n"
+
" WHERE to_char(fa.SUBMIT_DATE,'yyyy')=#{date} \n"
+
" group by to_char(fa.SUBMIT_DATE,'MM')"
)
public
List
<
Map
<
String
,
Integer
>>
findNanufacturingQuantity
(
@Param
(
"date"
)
String
date
);
}
src/main/java/com/yxproject/start/service/CartogramService.java
0 → 100644
View file @
e9839286
package
com
.
yxproject
.
start
.
service
;
import
java.util.List
;
import
java.util.Map
;
public
interface
CartogramService
{
public
List
<
Map
<
String
,
Integer
>>
findNanufacturingQuantity
(
String
date
);
}
src/main/java/com/yxproject/start/service/impl/CartogramServiceImpl.java
0 → 100644
View file @
e9839286
package
com
.
yxproject
.
start
.
service
.
impl
;
import
com.yxproject.start.mapper.CartogramMapper
;
import
com.yxproject.start.service.CartogramService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
@Service
public
class
CartogramServiceImpl
implements
CartogramService
{
@Autowired
private
CartogramMapper
cartogramMapper
;
@Override
public
List
<
Map
<
String
,
Integer
>>
findNanufacturingQuantity
(
String
date
)
{
List
<
Map
<
String
,
Integer
>>
list
=
cartogramMapper
.
findNanufacturingQuantity
(
date
);
return
list
;
}
}
src/main/resources/static/js/service.js
View file @
e9839286
...
...
@@ -1711,9 +1711,11 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success
(
response
.
data
)
})
},
loadCertificationDiagram
:
function
(
success
,
failed
)
{
$http
({
method
:
'GET'
,
url
:
"../Cartogram/findCardDetailedList"
+
urlTimeStamp
()
loadCertificationDiagram
:
function
(
date
,
success
,
failed
)
{
console
.
log
(
date
);
$http
({
method
:
'post'
,
url
:
"../Cartogram/findCardDetailedList"
+
urlTimeStamp
(),
data
:
date
}).
then
(
function
(
resp
)
{
return
success
(
resp
.
data
);
},
...
...
src/main/resources/static/js/utils.js
View file @
e9839286
This diff is collapsed.
Click to expand it.
src/main/resources/static/views/blank/blank.html
View file @
e9839286
<section
class=
"content row"
>
<div
class=
"col-md-12"
style=
"margin-top:20px;"
>
<div
class=
"box "
>
<div
class=
"box-header"
>
<strong>
制证统计
</strong>
<div
class=
"pull-right"
>
<select
class=
"form-control select2"
>
<option
value=
"2019"
>
2019年
</option>
</select>
</div>
</div>
<div
class=
"box box-primary"
>
<div
class=
"box "
>
<div
class=
"box-header"
>
<strong>
制证统计
</strong>
<div
class=
"pull-right col-md-2"
>
<input
class=
"form-control col-md-1"
style=
"width: 70px;height: 20px;"
ng-model=
"year"
ng-change=
"changeYear()"
>
<span
class=
"col-md-1"
>
年
</span>
</div>
</div>
<div
class=
"box box-primary"
>
<div
style=
"text-align: center;"
>
<!--通过率统计图-->
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"yx-div-header"
></div>
<div
id=
"diagram_item_ratio_certification"
style=
"height:500px;"
></div>
</div>
<div
style=
"text-align: center;"
>
<!--通过率统计图-->
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"yx-div-header"
></div>
<div
id=
"diagram_item_ratio_certification"
style=
"height:500px;"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
\ No newline at end of file
src/main/resources/static/views/blank/blank.js
View file @
e9839286
...
...
@@ -14,11 +14,13 @@ angular.module('AvatarCheck.blank', ['ngRoute', 'AvatarCheck.http', 'tm.paginati
if
(
$rootScope
.
loginData
.
login
==
false
){
$location
.
path
(
"/login"
)
}
$scope
.
loadCertificationDiagram
=
function
(){
$scope
.
loadCertificationDiagram
=
function
(
date
){
HttpService
.
loadCertificationDiagram
(
date
,
function
(
data
)
{
console
.
log
(
"统计图:"
,
data
)
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
'diagram_item_ratio_certification'
));
console
.
log
(
"统计图:"
,
data
)
myChart
.
setOption
(
buildDiagramDataCheckItemRatioProv
(
'制证生产'
,
data
));
},
...
...
@@ -27,6 +29,10 @@ angular.module('AvatarCheck.blank', ['ngRoute', 'AvatarCheck.http', 'tm.paginati
}
)
};
$scope
.
loadCertificationDiagram
();
$scope
.
year
=
new
Date
().
getFullYear
();
$scope
.
loadCertificationDiagram
(
$scope
.
year
);
$scope
.
changeYear
=
function
()
{
$scope
.
loadCertificationDiagram
(
$scope
.
year
);
}
});
\ No newline at end of file
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