温红权 8 лет назад
Родитель
Сommit
0f8bd6f305

+ 17 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckTaskPeriod.java

@@ -0,0 +1,17 @@
+package com.xintong.visualinspection.bean;
+
+import java.util.Date;
+
+import lombok.Data;
+
+@Data
+public class CheckTaskPeriod {
+	
+	private Integer id;
+	private String name;
+	private Date starttime;
+	private Date endtime;
+	private Integer currentday;
+	
+
+}

+ 24 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CheckTaskPeriodDao.java

@@ -0,0 +1,24 @@
+package com.xintong.visualinspection.dao.master;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.xintong.visualinspection.bean.CheckTaskPeriod;
+
+
+/**
+ * 文件名:UserInfoDao
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Mapper
+public interface CheckTaskPeriodDao  {
+    public void insert(CheckTaskPeriod checkTaskPeriod);
+    public void update(CheckTaskPeriod checkTaskPeriod);
+    public void delete(Long id);
+    public List<CheckTaskPeriod> select(CheckTaskPeriod checkTaskPeriod);
+    public List<CheckTaskPeriod> selectbytime(CheckTaskPeriod checkTaskPeriod);
+    public List<CheckTaskPeriod> selectbydatetime(CheckTaskPeriod checkTaskPeriod);
+
+    
+}

+ 72 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckTaskPeriod.xml

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.dao.master.CheckTaskPeriodDao">
+	<resultMap id="BaseResultMap"
+		type="com.xintong.visualinspection.bean.CheckTaskPeriod">
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="starttime" jdbcType="TIMESTAMP" property="starttime" javaType="java.sql.Timestamp" />  
+		<result column="endtime" jdbcType="TIMESTAMP" property="endtime" javaType="java.sql.Timestamp" />  
+		<result column="currentday" property="currentday" jdbcType="INTEGER" />
+		<result column="name" property="name" jdbcType="VARCHAR" />
+	</resultMap>
+
+	<select id="select" parameterType="com.xintong.visualinspection.bean.CheckTaskPeriod"
+		resultMap="BaseResultMap">
+		select * from check_task_period where 	1=1  
+		<if test="name != null">and name = #{name} </if>
+		<if test="id != null">and id = #{id} </if>
+	
+	</select>
+
+	<select id="selectbytime" parameterType="com.xintong.visualinspection.bean.CheckTaskPeriod"
+		resultMap="BaseResultMap">
+     <![CDATA[
+      select * from  check_task_period where 
+       #{starttime} = starttime
+      and 
+      1=1 
+      ]]>
+	</select>
+
+	<select id="selectbydatetime" parameterType="com.xintong.visualinspection.bean.CheckTaskPeriod"
+			resultMap="BaseResultMap">
+		<![CDATA[
+      select * from  check_task_period where
+       #{starttime} >= starttime and  #{starttime} <= endtime
+      and
+      1=1
+      ]]>
+	</select>
+
+
+	<insert id="insert" parameterType="com.xintong.visualinspection.bean.CheckTaskPeriod">
+		INSERT INTO
+		check_task_period
+		(name,starttime,endtime,currentday)
+		VALUES
+		(#{name},#{starttime},#{endtime},#{currentday})
+	</insert>
+
+	<update id="update" parameterType="com.xintong.visualinspection.bean.CheckTaskPeriod">
+		UPDATE
+		check_task_period
+		SET
+		<if test="name != null">name = #{name},</if>
+		<if test="starttime != null">starttime = #{starttime},</if>
+		<if test="endtime != null">endtime = #{endtime},</if>
+		<if test="currentday != null">currentday = #{currentday},</if>
+		id = #{id}
+		WHERE
+		id = #{id}
+	</update>
+
+	<delete id="delete" parameterType="java.lang.Long">
+		DELETE FROM
+		check_task_period
+		WHERE
+		id =#{id}
+	</delete>
+
+
+
+</mapper>

+ 14 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/pojo/UserRankingData.java

@@ -0,0 +1,14 @@
+package com.xintong.visualinspection.pojo;
+
+import com.xintong.visualinspection.bean.StatisticsBo;
+import lombok.Data;
+
+/**
+ * 文件名:UserRankingData
+ * 版本信息:日期:2017/7/27 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Data
+public class UserRankingData {
+    private StatisticsBo lastP;
+    private StatisticsBo currentP;
+}

+ 20 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/CheckTaskPeriodService.java

@@ -0,0 +1,20 @@
+package com.xintong.visualinspection.service;
+
+import java.util.List;
+
+import com.xintong.visualinspection.bean.CheckTaskPeriod;
+
+/**
+ * 文件名:UserService
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+public interface CheckTaskPeriodService {
+   
+    public void insert(CheckTaskPeriod checkTaskPeriod);
+    public void update(CheckTaskPeriod checkTaskPeriod);
+    public void delete(Integer id);
+    public List<CheckTaskPeriod> select(CheckTaskPeriod checkTaskPeriod);
+    public List<CheckTaskPeriod> selectbytime(CheckTaskPeriod checkTaskPeriod);
+    public List<CheckTaskPeriod> selectbydatetime(CheckTaskPeriod checkTaskPeriod);
+
+}

+ 65 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckTaskPeriodServiceImpl.java

@@ -0,0 +1,65 @@
+package com.xintong.visualinspection.service.impl;
+
+import java.util.List;
+
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.xintong.visualinspection.bean.CheckTaskPeriod;
+import com.xintong.visualinspection.dao.master.CheckTaskPeriodDao;
+import com.xintong.visualinspection.service.BaseService;
+import com.xintong.visualinspection.service.CheckTaskPeriodService;
+
+import lombok.Data;
+
+/**
+ * 文件名:UserServiceImpl
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Service
+@Data
+public class CheckTaskPeriodServiceImpl extends BaseService implements CheckTaskPeriodService {
+
+    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(CheckTaskPeriodService.class);
+
+
+    @Autowired
+    private CheckTaskPeriodDao checkTaskPriodDao;
+
+   
+   
+
+	@Override
+	public void insert(CheckTaskPeriod checkTaskPeriod) {
+		checkTaskPriodDao.insert(checkTaskPeriod);
+	}
+
+	@Override
+	public void update(CheckTaskPeriod checkTaskPeriod) {
+		// TODO Auto-generated method stub
+		checkTaskPriodDao.update(checkTaskPeriod);
+	}
+
+	@Override
+	public void delete(Integer id) {
+		// TODO Auto-generated method stub
+		checkTaskPriodDao.delete((long)id);
+	}
+
+	@Override
+	public List<CheckTaskPeriod> select(CheckTaskPeriod checkTaskPeriod) {
+		// TODO Auto-generated method stub
+		return checkTaskPriodDao.select(checkTaskPeriod);
+	}
+
+	@Override
+	public List<CheckTaskPeriod> selectbytime(CheckTaskPeriod checkTaskPeriod) {
+		return checkTaskPriodDao.selectbytime(checkTaskPeriod);
+	}
+
+	@Override
+	public List<CheckTaskPeriod> selectbydatetime(CheckTaskPeriod checkTaskPeriod) {
+		return checkTaskPriodDao.selectbydatetime(checkTaskPeriod);
+	}
+}