Browse Source

订单报表统计
导出订单报表

limin 7 years ago
parent
commit
f9c3f9402b

+ 13 - 12
src/main/java/com/goafanti/common/dao/TOrderBonusMapper.java

@@ -12,72 +12,73 @@ public interface TOrderBonusMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	int countByExample(TOrderBonusExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	int deleteByExample(TOrderBonusExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	int deleteByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	int insert(TOrderBonus record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	int insertSelective(TOrderBonus record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	List<TOrderBonus> selectByExample(TOrderBonusExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	TOrderBonus selectByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	int updateByExampleSelective(@Param("record") TOrderBonus record,
 			@Param("example") TOrderBonusExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	int updateByExample(@Param("record") TOrderBonus record,
 			@Param("example") TOrderBonusExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	int updateByPrimaryKeySelective(TOrderBonus record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	int updateByPrimaryKey(TOrderBonus record);
-	
+
 	List<TOrderBonusBo> getDeptBySome(TOrderBonusBo bonusBo);
 	List<TOrderBonusBo> getBonusData(TOrderBonusBo bonusBo);
+	
 }

+ 83 - 0
src/main/java/com/goafanti/common/dao/TOrderMonthReportMapper.java

@@ -0,0 +1,83 @@
+package com.goafanti.common.dao;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.goafanti.common.model.TOrderMonthReport;
+import com.goafanti.common.model.TOrderMonthReportExample;
+import com.goafanti.order.bo.OrderReportBo;
+
+public interface TOrderMonthReportMapper {
+    /**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	int countByExample(TOrderMonthReportExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	int deleteByExample(TOrderMonthReportExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	int insert(TOrderMonthReport record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	int insertSelective(TOrderMonthReport record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	List<TOrderMonthReport> selectByExample(TOrderMonthReportExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	TOrderMonthReport selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	int updateByExampleSelective(@Param("record") TOrderMonthReport record,
+			@Param("example") TOrderMonthReportExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	int updateByExample(@Param("record") TOrderMonthReport record,
+			@Param("example") TOrderMonthReportExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	int updateByPrimaryKeySelective(TOrderMonthReport record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	int updateByPrimaryKey(TOrderMonthReport record);
+
+	int insertLastMonthOrderData();
+	
+	List<OrderReportBo> exportMonthData(OrderReportBo orderReportBo);
+}

+ 44 - 27
src/main/java/com/goafanti/common/mapper/TOrderBonusMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
@@ -15,12 +15,13 @@
     <result column="grant_target" jdbcType="VARCHAR" property="grantTarget" />
     <result column="grant_by" jdbcType="VARCHAR" property="grantBy" />
     <result column="grant_time" jdbcType="DATE" property="grantTime" />
+    <result column="grant_type" jdbcType="INTEGER" property="grantType" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -54,7 +55,7 @@
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -88,15 +89,16 @@
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
-    id, create_time, order_no, bonus_subject, grant_status, grant_target, grant_by, grant_time
+    id, create_time, order_no, bonus_subject, grant_status, grant_target, grant_by, grant_time, 
+    grant_type
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderBonusExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     select
     <if test="distinct">
@@ -115,7 +117,7 @@
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -126,7 +128,7 @@
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     delete from t_order_bonus
     where id = #{id,jdbcType=VARCHAR}
@@ -135,7 +137,7 @@
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     delete from t_order_bonus
     <if test="_parameter != null">
@@ -146,20 +148,22 @@
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     insert into t_order_bonus (id, create_time, order_no, 
       bonus_subject, grant_status, grant_target, 
-      grant_by, grant_time)
+      grant_by, grant_time, grant_type
+      )
     values (#{id,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{orderNo,jdbcType=VARCHAR}, 
       #{bonusSubject,jdbcType=INTEGER}, #{grantStatus,jdbcType=INTEGER}, #{grantTarget,jdbcType=VARCHAR}, 
-      #{grantBy,jdbcType=VARCHAR}, #{grantTime,jdbcType=DATE})
+      #{grantBy,jdbcType=VARCHAR}, #{grantTime,jdbcType=DATE}, #{grantType,jdbcType=INTEGER}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderBonus">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     insert into t_order_bonus
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -187,6 +191,9 @@
       <if test="grantTime != null">
         grant_time,
       </if>
+      <if test="grantType != null">
+        grant_type,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -213,13 +220,16 @@
       <if test="grantTime != null">
         #{grantTime,jdbcType=DATE},
       </if>
+      <if test="grantType != null">
+        #{grantType,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.TOrderBonusExample" resultType="java.lang.Integer">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     select count(*) from t_order_bonus
     <if test="_parameter != null">
@@ -230,7 +240,7 @@
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     update t_order_bonus
     <set>
@@ -258,6 +268,9 @@
       <if test="record.grantTime != null">
         grant_time = #{record.grantTime,jdbcType=DATE},
       </if>
+      <if test="record.grantType != null">
+        grant_type = #{record.grantType,jdbcType=INTEGER},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -267,7 +280,7 @@
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     update t_order_bonus
     set id = #{record.id,jdbcType=VARCHAR},
@@ -277,7 +290,8 @@
       grant_status = #{record.grantStatus,jdbcType=INTEGER},
       grant_target = #{record.grantTarget,jdbcType=VARCHAR},
       grant_by = #{record.grantBy,jdbcType=VARCHAR},
-      grant_time = #{record.grantTime,jdbcType=DATE}
+      grant_time = #{record.grantTime,jdbcType=DATE},
+      grant_type = #{record.grantType,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -286,7 +300,7 @@
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     update t_order_bonus
     <set>
@@ -311,6 +325,9 @@
       <if test="grantTime != null">
         grant_time = #{grantTime,jdbcType=DATE},
       </if>
+      <if test="grantType != null">
+        grant_type = #{grantType,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -318,7 +335,7 @@
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 23 16:33:27 CST 2018.
+      This element was generated on Tue Nov 27 10:35:55 CST 2018.
     -->
     update t_order_bonus
     set create_time = #{createTime,jdbcType=TIMESTAMP},
@@ -327,7 +344,8 @@
       grant_status = #{grantStatus,jdbcType=INTEGER},
       grant_target = #{grantTarget,jdbcType=VARCHAR},
       grant_by = #{grantBy,jdbcType=VARCHAR},
-      grant_time = #{grantTime,jdbcType=DATE}
+      grant_time = #{grantTime,jdbcType=DATE},
+      grant_type = #{grantType,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   <!-- 财务专员统计技术员的奖金 -->
@@ -343,7 +361,7 @@
   		left join admin a on a.id = t.task_receiver 
   		left join admin oa on oa.id = o.salesman_id
   		left join admin ga on ga.id = b.grant_by 
-  		where b.bonus_subject &gt;= 20
+  		where b.grant_status = 1
   		<if test="b.grantBy != null">
   		and b.grant_by = #{b.grantBy,jdbcType=VARCHAR}
   		</if>
@@ -375,7 +393,7 @@
   		left join t_order_task t on t.order_no = b.order_no and t.main=1
   		left join admin a on a.id = t.task_receiver 
   		left join admin oa on oa.id = o.salesman_id
-  		where b.bonus_subject &gt;= 20
+  		where b.grant_status = 1
   		<if test="b.grantBy != null">
   		and b.grant_by = #{b.grantBy,jdbcType=VARCHAR}
   		</if>
@@ -408,7 +426,7 @@
 	left join t_order_new o on o.order_no = b.order_no
 	left join admin a on o.salesman_id = a.id
 	left join `user` u on o.buyer_id = u.id
-	where b.bonus_subject &lt;20
+	where b.grant_status = 0
 	
 	<if test="b.grantBy != null">
 	and b.grant_by = #{b.grantBy,jdbcType=VARCHAR}
@@ -437,7 +455,7 @@
 	left join t_order_new o on o.order_no = b.order_no
 	left join admin a on o.salesman_id = a.id
 	left join `user` u on o.buyer_id = u.id
-	where b.bonus_subject &lt;20
+	where b.grant_status = 0
 	<if test="b.grantBy != null">
 	and b.grant_by = #{b.grantBy,jdbcType=VARCHAR}
 	</if>
@@ -463,7 +481,7 @@
 	left join admin a on b.grant_target = a.id
 	left join `user` u on o.buyer_id = u.id
 	left join department d on d.id = a.department_id
-	where b.bonus_subject &lt;20
+	where b.grant_status = 0
 	<if test="grantBy != null">
 	and b.grant_by = #{grantBy,jdbcType=VARCHAR}
 	</if>
@@ -493,7 +511,7 @@
   		left join admin a on a.id = t.task_receiver 
   		left join admin oa on oa.id = o.salesman_id
   		left join admin ga on ga.id = b.grant_by 
-  		where b.bonus_subject &gt;= 20
+  		where b.grant_status = 0
   		<if test="grantBy != null">
   		and b.grant_by = #{grantBy,jdbcType=VARCHAR}
   		</if>
@@ -515,5 +533,4 @@
   		</if>
   		order by b.grant_status ,b.create_time 
   </select>
-  
 </mapper>

+ 400 - 0
src/main/java/com/goafanti/common/mapper/TOrderMonthReportMapper.xml

@@ -0,0 +1,400 @@
+<?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.goafanti.common.dao.TOrderMonthReportMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderMonthReport">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="month" jdbcType="INTEGER" property="month" />
+    <result column="amount" jdbcType="DECIMAL" property="amount" />
+    <result column="proof_count" jdbcType="REAL" property="proofCount" />
+    <result column="salemans_id" jdbcType="VARCHAR" property="salemansId" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    id, type, month, amount, proof_count, salemans_id, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderMonthReportExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from t_order_month_report
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from t_order_month_report
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    delete from t_order_month_report
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderMonthReportExample">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    delete from t_order_month_report
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.TOrderMonthReport">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    insert into t_order_month_report (id, type, month, 
+      amount, proof_count, salemans_id, 
+      update_time)
+    values (#{id,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{month,jdbcType=INTEGER}, 
+      #{amount,jdbcType=DECIMAL}, #{proofCount,jdbcType=REAL}, #{salemansId,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderMonthReport">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    insert into t_order_month_report
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="type != null">
+        type,
+      </if>
+      <if test="month != null">
+        month,
+      </if>
+      <if test="amount != null">
+        amount,
+      </if>
+      <if test="proofCount != null">
+        proof_count,
+      </if>
+      <if test="salemansId != null">
+        salemans_id,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="month != null">
+        #{month,jdbcType=INTEGER},
+      </if>
+      <if test="amount != null">
+        #{amount,jdbcType=DECIMAL},
+      </if>
+      <if test="proofCount != null">
+        #{proofCount,jdbcType=REAL},
+      </if>
+      <if test="salemansId != null">
+        #{salemansId,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.TOrderMonthReportExample" resultType="java.lang.Integer">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    select count(*) from t_order_month_report
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    update t_order_month_report
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.type != null">
+        type = #{record.type,jdbcType=INTEGER},
+      </if>
+      <if test="record.month != null">
+        month = #{record.month,jdbcType=INTEGER},
+      </if>
+      <if test="record.amount != null">
+        amount = #{record.amount,jdbcType=DECIMAL},
+      </if>
+      <if test="record.proofCount != null">
+        proof_count = #{record.proofCount,jdbcType=REAL},
+      </if>
+      <if test="record.salemansId != null">
+        salemans_id = #{record.salemansId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    update t_order_month_report
+    set id = #{record.id,jdbcType=INTEGER},
+      type = #{record.type,jdbcType=INTEGER},
+      month = #{record.month,jdbcType=INTEGER},
+      amount = #{record.amount,jdbcType=DECIMAL},
+      proof_count = #{record.proofCount,jdbcType=REAL},
+      salemans_id = #{record.salemansId,jdbcType=VARCHAR},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderMonthReport">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    update t_order_month_report
+    <set>
+      <if test="type != null">
+        type = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="month != null">
+        month = #{month,jdbcType=INTEGER},
+      </if>
+      <if test="amount != null">
+        amount = #{amount,jdbcType=DECIMAL},
+      </if>
+      <if test="proofCount != null">
+        proof_count = #{proofCount,jdbcType=REAL},
+      </if>
+      <if test="salemansId != null">
+        salemans_id = #{salemansId,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderMonthReport">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 14:53:14 CST 2018.
+    -->
+    update t_order_month_report
+    set type = #{type,jdbcType=INTEGER},
+      month = #{month,jdbcType=INTEGER},
+      amount = #{amount,jdbcType=DECIMAL},
+      proof_count = #{proofCount,jdbcType=REAL},
+      salemans_id = #{salemansId,jdbcType=VARCHAR},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+   <!-- 定时插入上月的签单数据 -->
+  <insert id="insertLastMonthOrderData" parameterType="java.lang.String">
+  	INSERT INTO t_order_month_report(`type`,`month`,amount,proof_count,salemans_id) 
+	select o.order_type, date_format(DATE_ADD(NOW(),INTERVAL -1 MONTH),'%Y%m'),sum(o.total_amount), sum(o.proof_count), o.salesman_id 
+	from t_order_new o
+	where 1 = 1
+	  and o.proof_status = 1
+	  and PERIOD_DIFF( date_format( now( ) , '%Y%m' ) , date_format( o.sign_time, '%Y%m' ) ) = 1
+	group by o.salesman_id , o.order_type
+  </insert>
+  <!-- 定时插入上一年的数据 -->
+  <insert id="insertLastYearOrderData" parameterType="java.lang.String">
+  	INSERT INTO t_order_year_report(`type`,`year`,amount,proof_count,salemans_id) 
+	select m.`type`, m.`year`, sum(amount), sum(proof_count), salemans_id from t_order_month_report m
+	where m.`year` = year(date_sub(now(),interval 1 year))
+	group by m.salemans_id , m.`type`
+  </insert>
+  <!-- 查看订单统计数据 -->
+  <select id="getOrderReportDataList" parameterType="Map" resultType="com.goafanti.order.bo.OrderReportBo">
+  	select @rowno:= @rowno+1 as id, d.name as deptName, a.name as saleName, m.`type`, sum(proof_count) as proofCount, sum(amount) as amount
+	from t_order_month_report m
+	left join admin a on m.salemans_id = a.id
+	left join department d on d.id = a.department_id
+	,(select @rowno:=0)c
+	where 
+	`month` between #{r.month,jdbcType=INTEGER} and  #{r.month1,jdbcType=INTEGER}
+	<if test='r.departmentId != null and r.departmentId != ""'>
+	 and a.department_id = #{r.departmentId,jdbcType=VARCHAR}
+	</if>
+	<if test='r.type != null and r.type != ""'><!-- 装数据是0变成null 加一处理后减一 -->
+	 and m.type= #{r.type,jdbcType=INTEGER} -1
+	</if>
+	<if test='r.saleName != null and r.saleName != ""'>
+	<bind name="n" value=" '%' + r.saleName + '%'"/>
+	 and a.name like #{n,jdbcType=VARCHAR}
+	</if>
+	group by
+	a.department_id, a.id, m.`type`
+	<if test="page_sql != null">
+		${page_sql}
+	</if>
+  </select>
+  <select id="getOrderReportDataCount" parameterType="Map" resultType="java.lang.Integer">
+  	select count(*)
+	from t_order_month_report m
+	left join admin a on m.salemans_id = a.id
+	left join department d on d.id = a.department_id
+	where 
+	`month` between #{r.month,jdbcType=INTEGER} and  #{r.month1,jdbcType=INTEGER}
+	<if test='r.departmentId != null and r.departmentId != ""'>
+	 and a.department_id = #{r.departmentId,jdbcType=VARCHAR}
+	</if>
+	<if test='r.type != null and r.type != ""'>
+	 and m.type= #{r.type,jdbcType=INTEGER} -1
+	</if>
+	<if test='r.saleName != null and r.saleName != ""'>
+	<bind name="n" value=" '%' + r.saleName + '%'"/>
+	 and a.name like #{n,jdbcType=VARCHAR}
+	</if>
+  </select>
+ <!-- 导出月统计 -->
+ <select id="exportMonthData" parameterType="com.goafanti.order.bo.OrderReportBo" resultType="com.goafanti.order.bo.OrderReportBo">
+ 	select  @rowno:= @rowno+1 as id, d.name as deptName, a.name as saleName, m.`type`, sum(proof_count) as proofCount, sum(amount) as amount
+	from t_order_month_report m
+	left join admin a on m.salemans_id = a.id
+	left join department d on d.id = a.department_id
+	,(select @rowno:=0)c
+	where 
+	`month` between #{month,jdbcType=INTEGER} and  #{month1,jdbcType=INTEGER}
+	<if test='departmentId != null and departmentId != ""'>
+	 and a.department_id = #{departmentId,jdbcType=VARCHAR}
+	</if>
+	<if test='type != null and type != ""'>
+	 and m.type= #{type,jdbcType=INTEGER}
+	</if>
+	<if test='saleName != null and saleName != ""'>
+	<bind name="n" value=" '%' + saleName + '%'"/>
+	 and a.name like #{n,jdbcType=VARCHAR}
+	</if>
+	group by
+	a.department_id, a.id, m.`type`
+ </select>
+</mapper>

+ 47 - 24
src/main/java/com/goafanti/common/model/TOrderBonus.java

@@ -6,49 +6,54 @@ public class TOrderBonus {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.id
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	private String id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.create_time
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.order_no
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	private String orderNo;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.bonus_subject
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	private Integer bonusSubject;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.grant_status
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	private Integer grantStatus;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.grant_target
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	private String grantTarget;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.grant_by
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	private String grantBy;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.grant_time
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	private Date grantTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.grant_type
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+	 */
+	private Integer grantType;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_bonus.id
 	 * @return  the value of t_order_bonus.id
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public String getId() {
 		return id;
@@ -57,7 +62,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_bonus.id
 	 * @param id  the value for t_order_bonus.id
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public void setId(String id) {
 		this.id = id;
@@ -66,7 +71,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_bonus.create_time
 	 * @return  the value of t_order_bonus.create_time
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -75,7 +80,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_bonus.create_time
 	 * @param createTime  the value for t_order_bonus.create_time
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -84,7 +89,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_bonus.order_no
 	 * @return  the value of t_order_bonus.order_no
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public String getOrderNo() {
 		return orderNo;
@@ -93,7 +98,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_bonus.order_no
 	 * @param orderNo  the value for t_order_bonus.order_no
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public void setOrderNo(String orderNo) {
 		this.orderNo = orderNo;
@@ -102,7 +107,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_bonus.bonus_subject
 	 * @return  the value of t_order_bonus.bonus_subject
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public Integer getBonusSubject() {
 		return bonusSubject;
@@ -111,7 +116,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_bonus.bonus_subject
 	 * @param bonusSubject  the value for t_order_bonus.bonus_subject
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public void setBonusSubject(Integer bonusSubject) {
 		this.bonusSubject = bonusSubject;
@@ -120,7 +125,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_bonus.grant_status
 	 * @return  the value of t_order_bonus.grant_status
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public Integer getGrantStatus() {
 		return grantStatus;
@@ -129,7 +134,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_bonus.grant_status
 	 * @param grantStatus  the value for t_order_bonus.grant_status
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public void setGrantStatus(Integer grantStatus) {
 		this.grantStatus = grantStatus;
@@ -138,7 +143,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_bonus.grant_target
 	 * @return  the value of t_order_bonus.grant_target
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public String getGrantTarget() {
 		return grantTarget;
@@ -147,7 +152,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_bonus.grant_target
 	 * @param grantTarget  the value for t_order_bonus.grant_target
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public void setGrantTarget(String grantTarget) {
 		this.grantTarget = grantTarget;
@@ -156,7 +161,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_bonus.grant_by
 	 * @return  the value of t_order_bonus.grant_by
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public String getGrantBy() {
 		return grantBy;
@@ -165,7 +170,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_bonus.grant_by
 	 * @param grantBy  the value for t_order_bonus.grant_by
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public void setGrantBy(String grantBy) {
 		this.grantBy = grantBy;
@@ -174,7 +179,7 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_bonus.grant_time
 	 * @return  the value of t_order_bonus.grant_time
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public Date getGrantTime() {
 		return grantTime;
@@ -183,9 +188,27 @@ public class TOrderBonus {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_bonus.grant_time
 	 * @param grantTime  the value for t_order_bonus.grant_time
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public void setGrantTime(Date grantTime) {
 		this.grantTime = grantTime;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_bonus.grant_type
+	 * @return  the value of t_order_bonus.grant_type
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+	 */
+	public Integer getGrantType() {
+		return grantType;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_bonus.grant_type
+	 * @param grantType  the value for t_order_bonus.grant_type
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+	 */
+	public void setGrantType(Integer grantType) {
+		this.grantType = grantType;
+	}
 }

+ 76 - 16
src/main/java/com/goafanti/common/model/TOrderBonusExample.java

@@ -8,23 +8,23 @@ import java.util.Iterator;
 public class TOrderBonusExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public TOrderBonusExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -32,7 +32,7 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -40,7 +40,7 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -48,7 +48,7 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -56,7 +56,7 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -64,7 +64,7 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -72,7 +72,7 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -80,7 +80,7 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -90,7 +90,7 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -102,7 +102,7 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -111,7 +111,7 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -121,7 +121,7 @@ public class TOrderBonusExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -728,11 +728,71 @@ public class TOrderBonusExample {
 					"grantTime");
 			return (Criteria) this;
 		}
+
+		public Criteria andGrantTypeIsNull() {
+			addCriterion("grant_type is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andGrantTypeIsNotNull() {
+			addCriterion("grant_type is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andGrantTypeEqualTo(Integer value) {
+			addCriterion("grant_type =", value, "grantType");
+			return (Criteria) this;
+		}
+
+		public Criteria andGrantTypeNotEqualTo(Integer value) {
+			addCriterion("grant_type <>", value, "grantType");
+			return (Criteria) this;
+		}
+
+		public Criteria andGrantTypeGreaterThan(Integer value) {
+			addCriterion("grant_type >", value, "grantType");
+			return (Criteria) this;
+		}
+
+		public Criteria andGrantTypeGreaterThanOrEqualTo(Integer value) {
+			addCriterion("grant_type >=", value, "grantType");
+			return (Criteria) this;
+		}
+
+		public Criteria andGrantTypeLessThan(Integer value) {
+			addCriterion("grant_type <", value, "grantType");
+			return (Criteria) this;
+		}
+
+		public Criteria andGrantTypeLessThanOrEqualTo(Integer value) {
+			addCriterion("grant_type <=", value, "grantType");
+			return (Criteria) this;
+		}
+
+		public Criteria andGrantTypeIn(List<Integer> values) {
+			addCriterion("grant_type in", values, "grantType");
+			return (Criteria) this;
+		}
+
+		public Criteria andGrantTypeNotIn(List<Integer> values) {
+			addCriterion("grant_type not in", values, "grantType");
+			return (Criteria) this;
+		}
+
+		public Criteria andGrantTypeBetween(Integer value1, Integer value2) {
+			addCriterion("grant_type between", value1, value2, "grantType");
+			return (Criteria) this;
+		}
+
+		public Criteria andGrantTypeNotBetween(Integer value1, Integer value2) {
+			addCriterion("grant_type not between", value1, value2, "grantType");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_bonus
-	 * @mbggenerated  Fri Nov 23 16:33:27 CST 2018
+	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public static class Criterion {
 		private String condition;

+ 169 - 0
src/main/java/com/goafanti/common/model/TOrderMonthReport.java

@@ -0,0 +1,169 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class TOrderMonthReport {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_month_report.id
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_month_report.type
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	private Integer type;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_month_report.month
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	private Integer month;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_month_report.amount
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	private BigDecimal amount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_month_report.proof_count
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	private Float proofCount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_month_report.salemans_id
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	private String salemansId;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_month_report.update_time
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	private Date updateTime;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_month_report.id
+	 * @return  the value of t_order_month_report.id
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_month_report.id
+	 * @param id  the value for t_order_month_report.id
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_month_report.type
+	 * @return  the value of t_order_month_report.type
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public Integer getType() {
+		return type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_month_report.type
+	 * @param type  the value for t_order_month_report.type
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public void setType(Integer type) {
+		this.type = type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_month_report.month
+	 * @return  the value of t_order_month_report.month
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public Integer getMonth() {
+		return month;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_month_report.month
+	 * @param month  the value for t_order_month_report.month
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public void setMonth(Integer month) {
+		this.month = month;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_month_report.amount
+	 * @return  the value of t_order_month_report.amount
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public BigDecimal getAmount() {
+		return amount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_month_report.amount
+	 * @param amount  the value for t_order_month_report.amount
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public void setAmount(BigDecimal amount) {
+		this.amount = amount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_month_report.proof_count
+	 * @return  the value of t_order_month_report.proof_count
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public Float getProofCount() {
+		return proofCount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_month_report.proof_count
+	 * @param proofCount  the value for t_order_month_report.proof_count
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public void setProofCount(Float proofCount) {
+		this.proofCount = proofCount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_month_report.salemans_id
+	 * @return  the value of t_order_month_report.salemans_id
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public String getSalemansId() {
+		return salemansId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_month_report.salemans_id
+	 * @param salemansId  the value for t_order_month_report.salemans_id
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public void setSalemansId(String salemansId) {
+		this.salemansId = salemansId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_month_report.update_time
+	 * @return  the value of t_order_month_report.update_time
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_month_report.update_time
+	 * @param updateTime  the value for t_order_month_report.update_time
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+}

+ 701 - 0
src/main/java/com/goafanti/common/model/TOrderMonthReportExample.java

@@ -0,0 +1,701 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class TOrderMonthReportExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public TOrderMonthReportExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public Criteria or() {
+		Criteria criteria = createCriteriaInternal();
+		oredCriteria.add(criteria);
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public Criteria createCriteria() {
+		Criteria criteria = createCriteriaInternal();
+		if (oredCriteria.size() == 0) {
+			oredCriteria.add(criteria);
+		}
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	protected abstract static class GeneratedCriteria {
+		protected List<Criterion> criteria;
+
+		protected GeneratedCriteria() {
+			super();
+			criteria = new ArrayList<Criterion>();
+		}
+
+		public boolean isValid() {
+			return criteria.size() > 0;
+		}
+
+		public List<Criterion> getAllCriteria() {
+			return criteria;
+		}
+
+		public List<Criterion> getCriteria() {
+			return criteria;
+		}
+
+		protected void addCriterion(String condition) {
+			if (condition == null) {
+				throw new RuntimeException("Value for condition cannot be null");
+			}
+			criteria.add(new Criterion(condition));
+		}
+
+		protected void addCriterion(String condition, Object value,
+				String property) {
+			if (value == null) {
+				throw new RuntimeException("Value for " + property
+						+ " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value));
+		}
+
+		protected void addCriterion(String condition, Object value1,
+				Object value2, String property) {
+			if (value1 == null || value2 == null) {
+				throw new RuntimeException("Between values for " + property
+						+ " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value1, value2));
+		}
+
+		public Criteria andIdIsNull() {
+			addCriterion("id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIsNotNull() {
+			addCriterion("id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdEqualTo(Integer value) {
+			addCriterion("id =", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotEqualTo(Integer value) {
+			addCriterion("id <>", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThan(Integer value) {
+			addCriterion("id >", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+			addCriterion("id >=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThan(Integer value) {
+			addCriterion("id <", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThanOrEqualTo(Integer value) {
+			addCriterion("id <=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIn(List<Integer> values) {
+			addCriterion("id in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotIn(List<Integer> values) {
+			addCriterion("id not in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdBetween(Integer value1, Integer value2) {
+			addCriterion("id between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotBetween(Integer value1, Integer value2) {
+			addCriterion("id not between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeIsNull() {
+			addCriterion("type is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeIsNotNull() {
+			addCriterion("type is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeEqualTo(Integer value) {
+			addCriterion("type =", value, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeNotEqualTo(Integer value) {
+			addCriterion("type <>", value, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeGreaterThan(Integer value) {
+			addCriterion("type >", value, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
+			addCriterion("type >=", value, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeLessThan(Integer value) {
+			addCriterion("type <", value, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeLessThanOrEqualTo(Integer value) {
+			addCriterion("type <=", value, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeIn(List<Integer> values) {
+			addCriterion("type in", values, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeNotIn(List<Integer> values) {
+			addCriterion("type not in", values, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeBetween(Integer value1, Integer value2) {
+			addCriterion("type between", value1, value2, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeNotBetween(Integer value1, Integer value2) {
+			addCriterion("type not between", value1, value2, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andMonthIsNull() {
+			addCriterion("month is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andMonthIsNotNull() {
+			addCriterion("month is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andMonthEqualTo(Integer value) {
+			addCriterion("month =", value, "month");
+			return (Criteria) this;
+		}
+
+		public Criteria andMonthNotEqualTo(Integer value) {
+			addCriterion("month <>", value, "month");
+			return (Criteria) this;
+		}
+
+		public Criteria andMonthGreaterThan(Integer value) {
+			addCriterion("month >", value, "month");
+			return (Criteria) this;
+		}
+
+		public Criteria andMonthGreaterThanOrEqualTo(Integer value) {
+			addCriterion("month >=", value, "month");
+			return (Criteria) this;
+		}
+
+		public Criteria andMonthLessThan(Integer value) {
+			addCriterion("month <", value, "month");
+			return (Criteria) this;
+		}
+
+		public Criteria andMonthLessThanOrEqualTo(Integer value) {
+			addCriterion("month <=", value, "month");
+			return (Criteria) this;
+		}
+
+		public Criteria andMonthIn(List<Integer> values) {
+			addCriterion("month in", values, "month");
+			return (Criteria) this;
+		}
+
+		public Criteria andMonthNotIn(List<Integer> values) {
+			addCriterion("month not in", values, "month");
+			return (Criteria) this;
+		}
+
+		public Criteria andMonthBetween(Integer value1, Integer value2) {
+			addCriterion("month between", value1, value2, "month");
+			return (Criteria) this;
+		}
+
+		public Criteria andMonthNotBetween(Integer value1, Integer value2) {
+			addCriterion("month not between", value1, value2, "month");
+			return (Criteria) this;
+		}
+
+		public Criteria andAmountIsNull() {
+			addCriterion("amount is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAmountIsNotNull() {
+			addCriterion("amount is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAmountEqualTo(BigDecimal value) {
+			addCriterion("amount =", value, "amount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAmountNotEqualTo(BigDecimal value) {
+			addCriterion("amount <>", value, "amount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAmountGreaterThan(BigDecimal value) {
+			addCriterion("amount >", value, "amount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAmountGreaterThanOrEqualTo(BigDecimal value) {
+			addCriterion("amount >=", value, "amount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAmountLessThan(BigDecimal value) {
+			addCriterion("amount <", value, "amount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAmountLessThanOrEqualTo(BigDecimal value) {
+			addCriterion("amount <=", value, "amount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAmountIn(List<BigDecimal> values) {
+			addCriterion("amount in", values, "amount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAmountNotIn(List<BigDecimal> values) {
+			addCriterion("amount not in", values, "amount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAmountBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("amount between", value1, value2, "amount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAmountNotBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("amount not between", value1, value2, "amount");
+			return (Criteria) this;
+		}
+
+		public Criteria andProofCountIsNull() {
+			addCriterion("proof_count is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andProofCountIsNotNull() {
+			addCriterion("proof_count is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andProofCountEqualTo(Float value) {
+			addCriterion("proof_count =", value, "proofCount");
+			return (Criteria) this;
+		}
+
+		public Criteria andProofCountNotEqualTo(Float value) {
+			addCriterion("proof_count <>", value, "proofCount");
+			return (Criteria) this;
+		}
+
+		public Criteria andProofCountGreaterThan(Float value) {
+			addCriterion("proof_count >", value, "proofCount");
+			return (Criteria) this;
+		}
+
+		public Criteria andProofCountGreaterThanOrEqualTo(Float value) {
+			addCriterion("proof_count >=", value, "proofCount");
+			return (Criteria) this;
+		}
+
+		public Criteria andProofCountLessThan(Float value) {
+			addCriterion("proof_count <", value, "proofCount");
+			return (Criteria) this;
+		}
+
+		public Criteria andProofCountLessThanOrEqualTo(Float value) {
+			addCriterion("proof_count <=", value, "proofCount");
+			return (Criteria) this;
+		}
+
+		public Criteria andProofCountIn(List<Float> values) {
+			addCriterion("proof_count in", values, "proofCount");
+			return (Criteria) this;
+		}
+
+		public Criteria andProofCountNotIn(List<Float> values) {
+			addCriterion("proof_count not in", values, "proofCount");
+			return (Criteria) this;
+		}
+
+		public Criteria andProofCountBetween(Float value1, Float value2) {
+			addCriterion("proof_count between", value1, value2, "proofCount");
+			return (Criteria) this;
+		}
+
+		public Criteria andProofCountNotBetween(Float value1, Float value2) {
+			addCriterion("proof_count not between", value1, value2,
+					"proofCount");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdIsNull() {
+			addCriterion("salemans_id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdIsNotNull() {
+			addCriterion("salemans_id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdEqualTo(String value) {
+			addCriterion("salemans_id =", value, "salemansId");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdNotEqualTo(String value) {
+			addCriterion("salemans_id <>", value, "salemansId");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdGreaterThan(String value) {
+			addCriterion("salemans_id >", value, "salemansId");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdGreaterThanOrEqualTo(String value) {
+			addCriterion("salemans_id >=", value, "salemansId");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdLessThan(String value) {
+			addCriterion("salemans_id <", value, "salemansId");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdLessThanOrEqualTo(String value) {
+			addCriterion("salemans_id <=", value, "salemansId");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdLike(String value) {
+			addCriterion("salemans_id like", value, "salemansId");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdNotLike(String value) {
+			addCriterion("salemans_id not like", value, "salemansId");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdIn(List<String> values) {
+			addCriterion("salemans_id in", values, "salemansId");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdNotIn(List<String> values) {
+			addCriterion("salemans_id not in", values, "salemansId");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdBetween(String value1, String value2) {
+			addCriterion("salemans_id between", value1, value2, "salemansId");
+			return (Criteria) this;
+		}
+
+		public Criteria andSalemansIdNotBetween(String value1, String value2) {
+			addCriterion("salemans_id not between", value1, value2,
+					"salemansId");
+			return (Criteria) this;
+		}
+
+		public Criteria andUpdateTimeIsNull() {
+			addCriterion("update_time is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andUpdateTimeIsNotNull() {
+			addCriterion("update_time is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andUpdateTimeEqualTo(Date value) {
+			addCriterion("update_time =", value, "updateTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andUpdateTimeNotEqualTo(Date value) {
+			addCriterion("update_time <>", value, "updateTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andUpdateTimeGreaterThan(Date value) {
+			addCriterion("update_time >", value, "updateTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+			addCriterion("update_time >=", value, "updateTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andUpdateTimeLessThan(Date value) {
+			addCriterion("update_time <", value, "updateTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+			addCriterion("update_time <=", value, "updateTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andUpdateTimeIn(List<Date> values) {
+			addCriterion("update_time in", values, "updateTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andUpdateTimeNotIn(List<Date> values) {
+			addCriterion("update_time not in", values, "updateTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+			addCriterion("update_time between", value1, value2, "updateTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+			addCriterion("update_time not between", value1, value2,
+					"updateTime");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_month_report
+	 * @mbggenerated  Tue Nov 27 14:53:14 CST 2018
+	 */
+	public static class Criterion {
+		private String condition;
+		private Object value;
+		private Object secondValue;
+		private boolean noValue;
+		private boolean singleValue;
+		private boolean betweenValue;
+		private boolean listValue;
+		private String typeHandler;
+
+		public String getCondition() {
+			return condition;
+		}
+
+		public Object getValue() {
+			return value;
+		}
+
+		public Object getSecondValue() {
+			return secondValue;
+		}
+
+		public boolean isNoValue() {
+			return noValue;
+		}
+
+		public boolean isSingleValue() {
+			return singleValue;
+		}
+
+		public boolean isBetweenValue() {
+			return betweenValue;
+		}
+
+		public boolean isListValue() {
+			return listValue;
+		}
+
+		public String getTypeHandler() {
+			return typeHandler;
+		}
+
+		protected Criterion(String condition) {
+			super();
+			this.condition = condition;
+			this.typeHandler = null;
+			this.noValue = true;
+		}
+
+		protected Criterion(String condition, Object value, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.typeHandler = typeHandler;
+			if (value instanceof List<?>) {
+				this.listValue = true;
+			} else {
+				this.singleValue = true;
+			}
+		}
+
+		protected Criterion(String condition, Object value) {
+			this(condition, value, null);
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue,
+				String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.secondValue = secondValue;
+			this.typeHandler = typeHandler;
+			this.betweenValue = true;
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue) {
+			this(condition, value, secondValue, null);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_order_month_report
+     *
+     * @mbggenerated do_not_delete_during_merge Tue Nov 27 11:37:50 CST 2018
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

+ 28 - 0
src/main/java/com/goafanti/common/task/MonthReportTask.java

@@ -0,0 +1,28 @@
+package com.goafanti.common.task;
+
+import javax.annotation.Resource;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import com.goafanti.common.utils.LoggerUtils;
+import com.goafanti.order.service.OrderReportService;
+
+@Component
+public class MonthReportTask {
+	@Resource
+	private  OrderReportService	orderReportServiceImpl;
+	
+	Logger	logger	= LoggerFactory.getLogger(MonthReportTask.class);
+	/**
+     * 每月1号7点15分钟执行任务
+     */
+    @Scheduled(cron = "0 0 7 1 * ?")
+   //@Scheduled(cron = "0 3 18 * * ?")
+    public void testTask(){
+    	int count = orderReportServiceImpl.insertOrderStatisticsByMonthTask();
+    	LoggerUtils.debug(logger, "统计上月订单【%s】条。", count);
+    }
+}

+ 73 - 0
src/main/java/com/goafanti/common/utils/ExportExcelUtil.java

@@ -22,6 +22,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.util.CellRangeAddress;
 
 import com.goafanti.common.model.TOrderBillNew;
+import com.goafanti.order.bo.OrderReportBo;
 import com.goafanti.order.bo.TOrderBonusBo;
 import com.goafanti.order.enums.BonusSubject;
 import com.goafanti.order.enums.LiquidationNewState;
@@ -301,6 +302,78 @@ public class ExportExcelUtil {
 			e.printStackTrace();
 		}*/
 	}
+	/**
+	 * 导出订单数据
+	 * @param list
+	 * @param date
+	 * @return
+	 */
+	public static HSSFWorkbook exportOrderInfo(List<OrderReportBo> list,String date){
+		//list 数据 ,comment表头 (列名称)
+		String[] comment = {"序号","订单部门","订单类型","签单人员","签单数量","累计签单金额(万元)"};
+		//1,创建一个workbook,对应的是一个excel文件
+		HSSFWorkbook wb = new HSSFWorkbook();
+		//遍历map
+		//2.创建一个sheet
+		HSSFSheet sheet = wb.createSheet(date + "订单统计");
+		//3。创建一个row
+		HSSFRow row = sheet.createRow(0);
+		//4.创建一个cell
+		HSSFCell cell = row.createCell(0);
+		cell.setCellValue(date + "订单统计");
+		HSSFCellStyle style1 = setCellStyle1(wb);
+		cell.setCellStyle(style1);
+		//合并列
+		sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, comment.length-1));//合并单元格
+		//创建表头
+		HSSFRow row2 = sheet.createRow(1);
+		for(int i = 0; i < comment.length; i++){
+			sheet.setColumnWidth(i, 3000);//设置列宽
+			HSSFCell c = row2.createCell(i);
+			c.setCellValue(comment[i]);
+			c.setCellStyle(style1);
+		}
+		//填充表格数据
+		//int rowmnum = sheet.getLastRowNum();//获得当前行数据
+		for (OrderReportBo ob : list) {
+			//新增一行
+			HSSFRow r = sheet.createRow(sheet.getLastRowNum()+1);
+			for (int i = 0; i < comment.length; i++) {
+				//当前列的只
+				String o = "";
+				switch (comment[i]) {
+				case "序号": o = ob.getId().toString(); break;
+				case "订单部门": o = ob.getDeptName(); break;
+				case "订单类型": o = (ob.getType() == 1 ? "科技项目" : "认证项目"); break;
+				case "签单人员": o = ob.getSaleName(); break;
+				case "签单数量": o = ob.getProofCount().toString(); break;
+				case "累计签单金额(万元)": o =ob.getAmount().toString(); break;
+				
+				default: o = ""; break;
+				}
+				HSSFCell c = r.createCell(i);
+				c.setCellValue(o);
+			}
+		}
+		return wb;
+		/*OutputStream os = new ByteArrayOutputStream();
+		try {
+			wb.write(os);
+		} catch (IOException e1) {
+			// TODO Auto-generated catch block
+			e1.printStackTrace();
+		}
+		//将表格数据放入文件中
+		try {
+			FileOutputStream fos = new FileOutputStream(filePath);
+			wb.write(fos);
+			fos.close();
+			System.out.println("已经创建文件");
+		} catch (Exception e) {
+			System.out.println("发生了异常");
+			e.printStackTrace();
+		}*/
+	}
 	
 	
 }

+ 36 - 0
src/main/java/com/goafanti/order/bo/OrderReportBo.java

@@ -0,0 +1,36 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.model.TOrderMonthReport;
+
+public class OrderReportBo  extends TOrderMonthReport{
+	private String saleName;
+	private String deptName;
+	private String departmentId;
+	private Integer month1;
+	
+	public String getSaleName() {
+		return saleName;
+	}
+	public void setSaleName(String saleName) {
+		this.saleName = saleName;
+	}
+	public String getDeptName() {
+		return deptName;
+	}
+	public void setDeptName(String deptName) {
+		this.deptName = deptName;
+	}
+	public Integer getMonth1() {
+		return month1;
+	}
+	public void setMonth1(Integer month1) {
+		this.month1 = month1;
+	}
+	public String getDepartmentId() {
+		return departmentId;
+	}
+	public void setDepartmentId(String departmentId) {
+		this.departmentId = departmentId;
+	}
+	
+}

+ 61 - 1
src/main/java/com/goafanti/order/controller/OrderBonusStatisticsApiController.java

@@ -20,17 +20,21 @@ import com.goafanti.common.bo.Result;
 import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.order.bo.OrderReportBo;
 import com.goafanti.order.bo.TOrderBonusBo;
 import com.goafanti.order.service.FundManageOrderService;
 import com.goafanti.order.service.OrderBonusService;
+import com.goafanti.order.service.OrderReportService;
 
 @RestController
-@RequestMapping(value = "/open/api/admin/bonus")
+@RequestMapping(value = "/api/admin/bonus")
 public class OrderBonusStatisticsApiController extends CertifyApiController {
 	@Resource
 	private FundManageOrderService fundManageOrderServiceImpl;
 	@Resource
 	private OrderBonusService orderBonusServiceImpl;
+	@Resource
+	private OrderReportService orderReportServiceImpl;
 	
 	 /**
 	  * 财务专员校对单量
@@ -141,5 +145,61 @@ public class OrderBonusStatisticsApiController extends CertifyApiController {
 		 return res;
 	 }
 	 
+	 /**
+	  * 订单报表统计数据
+	  * @param reportBo
+	  * @param pageNo
+	  * @param pageSize
+	  * @return
+	  * @throws IOException
+	  */
+	 @RequestMapping(value="/orderReportList", method = RequestMethod.GET)
+	 public Result orderReportList(OrderReportBo reportBo, Integer pageNo, Integer pageSize) throws IOException{
+		Result res = new Result();
+		if(null == reportBo.getMonth() || null == reportBo.getMonth1()){
+			res.getError().add(buildError("", "没有指定订单日期"));
+			return res;
+		}
+		res.setData(orderReportServiceImpl.getOrderReportData(reportBo, pageNo, pageSize));
+		return res;
+	 }
 	 
+	 /**
+	  * 导出订单数据
+	  * @param orderReportBo
+	  * @param response
+	  * @return
+	  * @throws IOException
+	  */
+	 @RequestMapping(value="/exportOrderData", method = RequestMethod.GET)
+	 public Result exportOrderData(OrderReportBo orderReportBo,HttpServletResponse response) throws IOException{
+		 Result res = new Result();
+		 if(null == orderReportBo.getMonth() || null == orderReportBo.getMonth1()){
+			res.getError().add(buildError("", "没有指定订单日期"));
+			return res;
+		 }
+		 String date = orderReportBo.getMonth() == orderReportBo.getMonth1() ? orderReportBo.getMonth().toString() : orderReportBo.getMonth() + "-" + orderReportBo.getMonth1(); 
+		 OutputStream out = response.getOutputStream();
+		 HSSFWorkbook wb = orderReportServiceImpl.exportMonthData(orderReportBo, date);
+		 if(null == wb){
+			 wb = new HSSFWorkbook();
+			 HSSFSheet sheet = wb.createSheet("没有订单统计记录");
+			 HSSFRow row = sheet.createRow(0);
+			 HSSFCell cell = row.createCell(0);
+			 cell.setCellValue("没有订单统计记录");
+		 }
+		 String fileName = "订单统计" + date + ".xls";
+		 response.addHeader("Content-Disposition", "attachment;filename="  + new String(fileName.getBytes(),"iso-8859-1"));  
+		 response.setContentType("application/octet-stream;charset=utf-8");  
+		 try {
+			 // 返回数据流
+			 wb.write(out); 
+			 out.flush();
+			 out.close();
+		 } finally {
+			 out.flush(); 
+			 out.close(); 
+		 }
+		 return res;
+	 }
 }

+ 28 - 0
src/main/java/com/goafanti/order/service/OrderReportService.java

@@ -0,0 +1,28 @@
+package com.goafanti.order.service;
+
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.order.bo.OrderReportBo;
+
+public interface OrderReportService {
+	/**
+	 * 每月定时统计订单
+	 * @return
+	 */
+	int insertOrderStatisticsByMonthTask();
+	
+	/**
+	 * 获得订单数据统计
+	 * @param orderReportBo
+	 * @return
+	 */
+	Pagination<OrderReportBo> getOrderReportData(OrderReportBo orderReportBo, Integer pageNo, Integer pageSize);
+	/**
+	 * 导出订单数据
+	 * @param orderReportBo
+	 * @return
+	 */
+	HSSFWorkbook exportMonthData(OrderReportBo orderReportBo,String date);
+	
+}

+ 10 - 1
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -10,6 +10,7 @@ import java.util.UUID;
 
 import javax.mail.MessagingException;
 
+import org.apache.commons.io.input.BOMInputStream;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -170,7 +171,6 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 		bonus.setId(UUID.randomUUID().toString());
 		bonus.setOrderNo(billNew.getOrderNo());
 		bonus.setGrantBy(TokenManager.getAdminId());
-		bonus.setGrantTarget(o.getSalesmanId());
 		int lstaus = 0;//如果订单流水小于首付 lstaus 0
 		
 		// 0 相等
@@ -181,6 +181,11 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 		}else if(bd.compareTo(o.getTotalAmount()) == 0){//付完款//如果订单流水等于于总金额 lstaus 2
 			lstaus = 2;
 			bonus.setBonusSubject(12);
+			//发放给技术员
+			bonus.setGrantTarget(o.getTechnicianId());
+			bonus.setGrantType(1);
+			bonusMapper.insertSelective(bonus);
+			
 		}else if(bd.compareTo(o.getTotalAmount()) == -1){//如果订单流水小于总金额
 			if(bd.compareTo(o.getFirstAmount()) == 0){//首付完成
 				bonus.setBonusSubject(11);
@@ -207,6 +212,10 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 			result = tOrderNewMapper.updateByPrimaryKeySelective(orderNew);
 			//如果达到奖金发放要求新增奖金信息
 			if(null != bonus.getBonusSubject()){
+				bonus.setId(UUID.randomUUID().toString());
+				bonus.setGrantTarget(o.getSalesmanId());
+				//设置发放人类型
+				bonus.setGrantType(0);
 				bonusMapper.insertSelective(bonus);
 			}
 		}

+ 49 - 0
src/main/java/com/goafanti/order/service/impl/OrderReportServiceImpl.java

@@ -0,0 +1,49 @@
+package com.goafanti.order.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.TOrderMonthReportMapper;
+import com.goafanti.common.utils.ExportExcelUtil;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.order.bo.OrderReportBo;
+import com.goafanti.order.service.OrderReportService;
+
+@Service
+public class OrderReportServiceImpl extends BaseMybatisDao<TOrderMonthReportMapper> implements OrderReportService {
+	
+	@Autowired
+	private TOrderMonthReportMapper	monthReportMapper;
+	
+	@Override
+	public int insertOrderStatisticsByMonthTask() {
+		return monthReportMapper.insertLastMonthOrderData();
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OrderReportBo> getOrderReportData(
+			OrderReportBo orderReportBo, Integer pageNo, Integer pageSize) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		params.put("r", orderReportBo);
+		Pagination<OrderReportBo> data = (Pagination<OrderReportBo>)findPage("getOrderReportDataList", "getOrderReportDataCount", params, pageNo, pageSize);
+		return data;
+	}
+
+	@Override
+	public HSSFWorkbook exportMonthData(OrderReportBo orderReportBo, String date) {
+		List<OrderReportBo> list = monthReportMapper.exportMonthData(orderReportBo);
+		if(null == list || list.size() == 0){
+			return null;
+		}
+		return ExportExcelUtil.exportOrderInfo(list, date);
+	}
+	
+	
+}