Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
access
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
shaochangbin
access
Commits
9b33e264
Commit
9b33e264
authored
Dec 27, 2017
by
yinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
最终版
parent
243ddd6e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
95 additions
and
16 deletions
+95
-16
.gitignore
WebRoot/WEB-INF/classes/.gitignore
+0
-9
spring-mvc.xml
conf/spring-mvc.xml
+1
-1
CountconditionsController.java
src/com/yx/controller/CountconditionsController.java
+26
-0
CountConditionsMapper.java
src/com/yx/dao/CountConditionsMapper.java
+2
-0
CountConditionsMapper.xml
src/com/yx/dao/CountConditionsMapper.xml
+55
-3
CountConditionsService.java
src/com/yx/service/CountConditionsService.java
+2
-0
CountConditionsServiceImpl.java
src/com/yx/service/CountConditionsServiceImpl.java
+6
-0
StaticVariable.java
src/com/yx/utils/StaticVariable.java
+3
-3
No files found.
WebRoot/WEB-INF/classes/.gitignore
View file @
9b33e264
/123.jpg
/applicationContext.xml
/com/
/cssconfig.properties
/jdbc.properties
/libarcsoft_fsdk_face_detection.dll
/libarcsoft_fsdk_face_recognition.dll
/log4j.properties
/mybatis-config.xml
/spring-mvc.xml
conf/spring-mvc.xml
View file @
9b33e264
...
...
@@ -3,7 +3,7 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:mvc=
"http://www.springframework.org/schema/mvc"
xmlns:tx=
"http://www.springframework.org/schema/tx"
xmlns:aop=
"http://www.springframework.org/schema/aop"
xsi:schemaLocation=
"http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop
-4.1
.xsd
xsi:schemaLocation=
"http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
...
...
src/com/yx/controller/CountconditionsController.java
View file @
9b33e264
...
...
@@ -63,6 +63,32 @@ public class CountconditionsController {
return
"fail"
;
}
}
/**
* 访客查询
*
* @param request
* @param response
* @return
*/
@RequestMapping
(
value
=
"/findAllPerson"
,
method
=
RequestMethod
.
POST
,
produces
=
"text/html;charset=UTF-8"
)
@ResponseBody
public
String
findAllPerson
(
@RequestBody
String
data
)
{
try
{
Gson
gson
=
new
Gson
();
CountConditions
count
=
gson
.
fromJson
(
data
,
CountConditions
.
class
);
List
<
Person
>
person
=
countConditionsService
.
findAllPerson
(
count
);
String
result
=
JsonUtils
.
objectToJson
(
person
);
System
.
out
.
println
(
result
);
if
(
result
!=
null
)
{
return
result
;
}
else
{
return
"fail"
;
}
}
catch
(
Exception
e
)
{
return
"fail"
;
}
}
/**
* 访客总数查询
...
...
src/com/yx/dao/CountConditionsMapper.java
View file @
9b33e264
...
...
@@ -9,6 +9,8 @@ public interface CountConditionsMapper {
List
<
Person
>
countPerson
(
CountConditions
count
);
List
<
Person
>
findAllPerson
(
CountConditions
count
);
int
persontotal
(
CountConditions
countConditions
);
List
<
Person
>
findByPersonName
(
CountConditions
c
);
...
...
src/com/yx/dao/CountConditionsMapper.xml
View file @
9b33e264
...
...
@@ -4,9 +4,17 @@
<select
id=
"countPerson"
parameterType=
"com.yx.entity.CountConditions"
resultType=
"com.yx.entity.Person"
>
select * from Person
select * from Person
<where>
and accessdate>=#{startDate} and #{endDate} >= accessdate and 1=1
and 1=1
<if
test=
"startDate!=null and startDate!=''"
>
and accessdate>=#{startDate}
</if>
<if
test=
"endDate!=null and endDate!=''"
>
and #{endDate} >= accessdate
</if>
<if
test=
"employeeName!=null and employeeName!=''"
>
and employee=#{employeeName}
</if>
...
...
@@ -35,8 +43,52 @@
<select
id=
"persontotal"
parameterType=
"com.yx.entity.CountConditions"
resultType=
"int"
>
select count(*) from Person
<where>
and 1=1
<if
test=
"startDate!=null and startDate!=''"
>
and accessdate>=#{startDate}
</if>
<if
test=
"endDate!=null and endDate!=''"
>
and #{endDate} >= accessdate
</if>
<if
test=
"employeeName!=null and employeeName!=''"
>
and employee=#{employeeName}
</if>
<if
test=
"personName!=null and personName!=''"
>
and username=#{personName}
</if>
<if
test=
"dept!=null and dept!=''"
>
and dept=#{dept}
</if>
<if
test=
"office!=null and office!=''"
>
and office=#{office}
</if>
<if
test=
"unit!=null and unit!=''"
>
and unit=#{unit}
</if>
</where>
</select>
<select
id=
"findAllPerson"
parameterType=
"com.yx.entity.CountConditions"
resultType=
"com.yx.entity.Person"
>
select * from Person
<where>
and accessdate>=#{startDate} and #{endDate} >= accessdate and 1=1
and 1=1
<if
test=
"startDate!=null and startDate!=''"
>
and accessdate>=#{startDate}
</if>
<if
test=
"endDate!=null and endDate!=''"
>
and #{endDate} >= accessdate
</if>
<if
test=
"employeeName!=null and employeeName!=''"
>
and employee=#{employeeName}
</if>
...
...
src/com/yx/service/CountConditionsService.java
View file @
9b33e264
...
...
@@ -13,6 +13,8 @@ public interface CountConditionsService {
int
persontotal
(
CountConditions
countConditions
);
List
<
Person
>
findAllPerson
(
CountConditions
count
);
List
<
Person
>
findByPersonName
(
CountConditions
c
);
List
<
Person
>
findByEmployeeName
(
CountConditions
c
);
...
...
src/com/yx/service/CountConditionsServiceImpl.java
View file @
9b33e264
...
...
@@ -82,4 +82,10 @@ public class CountConditionsServiceImpl implements CountConditionsService {
return
countConditionsMapper
.
persontotal
(
countConditions
);
}
@Override
public
List
<
Person
>
findAllPerson
(
CountConditions
count
)
{
// TODO Auto-generated method stub
return
countConditionsMapper
.
findAllPerson
(
count
);
}
}
src/com/yx/utils/StaticVariable.java
View file @
9b33e264
...
...
@@ -2,9 +2,9 @@ package com.yx.utils;
public
class
StaticVariable
{
private
static
String
personPhotoUrl
=
"
d://readcard
/person/"
;
private
static
String
empPhotoUrl
=
"
d://readcard
/emp/"
;
private
static
String
qrcodePhotoUrl
=
"
d://readcard
/qrcode/"
;
private
static
String
personPhotoUrl
=
"
e://photo
/person/"
;
private
static
String
empPhotoUrl
=
"
e://photo
/emp/"
;
private
static
String
qrcodePhotoUrl
=
"
e://photo
/qrcode/"
;
//注释内容
...
...
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