Commit 9b33e264 authored by yinxin's avatar yinxin

最终版

parent 243ddd6e
/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
......@@ -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
......
......@@ -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";
}
}
/**
* 访客总数查询
......
......@@ -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);
......
......@@ -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>
......
......@@ -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);
......
......@@ -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);
}
}
......@@ -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/";
//注释内容
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment