Browse Source

Merge branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
into test

Conflicts:
src/main/java/com/goafanti/common/dao/TOrderBonusMapper.java
src/main/java/com/goafanti/common/mapper/TOrderBonusMapper.xml
src/main/java/com/goafanti/common/model/TOrderBonus.java
src/main/java/com/goafanti/common/model/TOrderBonusExample.java
src/main/java/com/goafanti/common/utils/ExportExcelUtil.java

limin 7 years ago
parent
commit
ccc386d736
39 changed files with 2597 additions and 172 deletions
  1. 1 1
      GeneratorConfig.xml
  2. 26 0
      src/main/java/com/goafanti/admin/bo/AdminContacts.java
  3. 21 0
      src/main/java/com/goafanti/admin/bo/AdminListBo.java
  4. 35 0
      src/main/java/com/goafanti/admin/controller/AdminApiController.java
  5. 6 0
      src/main/java/com/goafanti/admin/service/AdminService.java
  6. 42 2
      src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java
  7. 7 0
      src/main/java/com/goafanti/common/dao/AdminMapper.java
  8. 51 16
      src/main/java/com/goafanti/common/dao/TOrderBonusMapper.java
  9. 4 0
      src/main/java/com/goafanti/common/dao/TOrderDunMapper.java
  10. 4 0
      src/main/java/com/goafanti/common/dao/TOrderNewMapper.java
  11. 84 0
      src/main/java/com/goafanti/common/dao/TTaskHoursMapper.java
  12. 51 1
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml
  13. 2 2
      src/main/java/com/goafanti/common/mapper/TDunLogMapper.xml
  14. 89 89
      src/main/java/com/goafanti/common/mapper/TOrderBonusMapper.xml
  15. 21 0
      src/main/java/com/goafanti/common/mapper/TOrderDunMapper.xml
  16. 21 6
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml
  17. 44 0
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml
  18. 344 0
      src/main/java/com/goafanti/common/mapper/TTaskHoursMapper.xml
  19. 114 1
      src/main/java/com/goafanti/common/model/TOrderBonus.java
  20. 145 41
      src/main/java/com/goafanti/common/model/TOrderBonusExample.java
  21. 168 0
      src/main/java/com/goafanti/common/model/TTaskHours.java
  22. 722 0
      src/main/java/com/goafanti/common/model/TTaskHoursExample.java
  23. 17 0
      src/main/java/com/goafanti/common/task/OrderTaskDun.java
  24. 104 0
      src/main/java/com/goafanti/common/utils/ExportExcelUtil.java
  25. 2 1
      src/main/java/com/goafanti/common/utils/FileUtils.java
  26. 2 2
      src/main/java/com/goafanti/core/auth/RestClient.java
  27. 71 0
      src/main/java/com/goafanti/order/bo/OrderRefundDetailBo.java
  28. 9 0
      src/main/java/com/goafanti/order/bo/TOrderNewBo.java
  29. 7 0
      src/main/java/com/goafanti/order/bo/TOrderTaskListBo.java
  30. 104 0
      src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java
  31. 86 0
      src/main/java/com/goafanti/order/controller/OrderProjectApiController.java
  32. 1 3
      src/main/java/com/goafanti/order/enums/LiquidationNewState.java
  33. 14 5
      src/main/java/com/goafanti/order/enums/ProjectNewStage.java
  34. 4 0
      src/main/java/com/goafanti/order/enums/TaskState.java
  35. 9 0
      src/main/java/com/goafanti/order/service/OrderNewService.java
  36. 10 1
      src/main/java/com/goafanti/order/service/OrderProjectService.java
  37. 69 0
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  38. 76 1
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  39. 10 0
      src/main/java/com/goafanti/techproject/enums/TaskState.java

+ 1 - 1
GeneratorConfig.xml

@@ -9,6 +9,6 @@
     <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="aft" />
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="aft" />
     <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="aft" type="XMLMAPPER" />
-    <table schema="aft" tableName="t_order_back"/> 
+    <table schema="aft" tableName="t_order_bonus"/> 
   </context>
 </generatorConfiguration>

+ 26 - 0
src/main/java/com/goafanti/admin/bo/AdminContacts.java

@@ -0,0 +1,26 @@
+package com.goafanti.admin.bo;
+
+public class AdminContacts {
+	private String id;
+	private String aid;
+	private String contactsId;
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getAid() {
+		return aid;
+	}
+	public void setAid(String aid) {
+		this.aid = aid;
+	}
+	public String getContactsId() {
+		return contactsId;
+	}
+	public void setContactsId(String contactsId) {
+		this.contactsId = contactsId;
+	}
+	
+}

+ 21 - 0
src/main/java/com/goafanti/admin/bo/AdminListBo.java

@@ -91,6 +91,11 @@ public class AdminListBo {
 	/** 角色 id**/
 	private List<String> rolesId;
 	
+	
+	private String contactMobile;
+	
+	private String contactId;
+	
 	public List<String> getRolesId() {
 		return rolesId;
 	}
@@ -264,4 +269,20 @@ public class AdminListBo {
 		this.password = password;
 	}
 
+	public String getContactMobile() {
+		return contactMobile;
+	}
+
+	public void setContactMobile(String contactMobile) {
+		this.contactMobile = contactMobile;
+	}
+
+	public String getContactId() {
+		return contactId;
+	}
+
+	public void setContactId(String contactId) {
+		this.contactId = contactId;
+	}
+
 }

+ 35 - 0
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -3092,5 +3092,40 @@ public class AdminApiController extends CertifyApiController {
 		res.setData(adminService.updateLockAdmin());
 		return res;
 	}
+	/**
+	 * 新建常用联系人
+	 */
+	@RequestMapping(value = "/addFrequentContacts", method = RequestMethod.POST)
+	public Result addFrequentContacts(String id) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "常用联系人"));
+			return res;
+		}
+		res.setData(adminService.addFrequentContacts(id));
+		return res;
+	}
+	/**
+	 * 常用联系人列表
+	 */
+	@RequestMapping(value = "/frequentContactsList", method = RequestMethod.GET)
+	public Result frequentContactsList(String departmentId,String name,Integer pageSize,Integer pageNo) {
+		Result res = new Result();
+		res.setData(adminService.frequentContactsList(departmentId, name, pageSize, pageNo));
+		return res;
+	}
+	/**
+	 * 删除常用联系人
+	 */
+	@RequestMapping(value = "/deleteFrequentContacts", method = RequestMethod.POST)
+	public Result deleteFrequentContacts(String id) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "常用联系人"));
+			return res;
+		}
+		res.setData(adminService.deleteFrequentContacts(id));
+		return res;
+	}
 	
 }

+ 6 - 0
src/main/java/com/goafanti/admin/service/AdminService.java

@@ -70,4 +70,10 @@ public interface AdminService {
 	List<Admin> getListDefaultPassword(String id);
 
 	List<Admin> getAdminRoleList(String roleName);
+
+	int addFrequentContacts(String id);
+
+	Pagination<AdminListBo>  frequentContactsList(String depId, String name, Integer pageSize, Integer pageNo);
+
+	int deleteFrequentContacts(String id);
 }

+ 42 - 2
src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java

@@ -5,6 +5,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
+import java.util.UUID;
 
 import javax.annotation.Resource;
 
@@ -12,6 +13,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.admin.bo.AdminContacts;
 import com.goafanti.admin.bo.AdminDetail;
 import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.admin.service.AdminService;
@@ -28,6 +30,7 @@ import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.customer.bo.LockingReleaseBo;
+import com.goafanti.order.bo.TOrderNewBo;
 
 @Service
 public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements AdminService {
@@ -321,10 +324,47 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 
 	@Override
 	public List<Admin> getAdminRoleList(String roleName) {
-		
 		return adminMapper.getAdminRoleList(roleName);
 	}
 
-	
+	@Override
+	public int addFrequentContacts(String id) {
+		String []ss=id.split(",");
+		List<String> list=adminMapper.getaidFrequentContacts(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
+		for (String s : ss) {
+			boolean flag=true;
+			for (String s2 : list) {
+				if (s.equals(s2)) {
+					flag=false;
+				}
+			}
+			if (flag) {
+				AdminContacts a=new AdminContacts();
+				a.setId(UUID.randomUUID().toString());
+				a.setAid(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
+				a.setContactsId(s);
+				adminMapper.addAdminContacts(a);
+			}
+		}
+		return 1;
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<AdminListBo> frequentContactsList(String depId, String name, Integer pageSize, Integer pageNo) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		if(pageSize==null||pageSize<0)pageSize=10;
+		if(pageNo==null||pageNo<0)pageNo=1;
+		if (StringUtils.isNotBlank(depId)) params.put("depId", depId);
+		if (StringUtils.isNotBlank(name)) params.put("name", name);
+		params.put("aid", TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
+		Pagination<AdminListBo> p = (Pagination<AdminListBo>)findPage("frequentContactsList", "frequentContactsCount", params, pageNo, pageSize);
+		return p;
+	}
+
+	@Override
+	public int deleteFrequentContacts(String id) {
+		return adminMapper.deleteFrequentContacts(id);
+	}
 
 }

+ 7 - 0
src/main/java/com/goafanti/common/dao/AdminMapper.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import org.apache.ibatis.annotations.Param;
 
+import com.goafanti.admin.bo.AdminContacts;
 import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.app.bo.AppAdminListBo;
 import com.goafanti.common.model.Admin;
@@ -180,4 +181,10 @@ public interface AdminMapper {
 
 	List<Admin> getAdminRoleList(String roleName);
 
+	int addAdminContacts(AdminContacts a);
+
+	int deleteFrequentContacts(String id);
+
+	List<String> getaidFrequentContacts(String id);
+
 }

+ 51 - 16
src/main/java/com/goafanti/common/dao/TOrderBonusMapper.java

@@ -12,73 +12,108 @@ public interface TOrderBonusMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
-	int countByExample(TOrderBonusExample example);
-
+	long countByExample(TOrderBonusExample example);
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	int deleteByExample(TOrderBonusExample example);
-
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	int deleteByPrimaryKey(String id);
-
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	int insert(TOrderBonus record);
-
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	int insertSelective(TOrderBonus record);
-
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	List<TOrderBonus> selectByExample(TOrderBonusExample example);
-
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	TOrderBonus selectByPrimaryKey(String id);
-
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
-	int updateByExampleSelective(@Param("record") TOrderBonus record,
-			@Param("example") TOrderBonusExample example);
-
+	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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
-	int updateByExample(@Param("record") TOrderBonus record,
-			@Param("example") TOrderBonusExample example);
-
+	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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	int updateByPrimaryKeySelective(TOrderBonus record);
-
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	int updateByPrimaryKey(TOrderBonus record);
+<<<<<<< HEAD
 
+=======
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	List<TOrderBonusBo> getDeptBySome(TOrderBonusBo bonusBo);
 	List<TOrderBonusBo> getBonusData(TOrderBonusBo bonusBo);
 	
-}
+}

+ 4 - 0
src/main/java/com/goafanti/common/dao/TOrderDunMapper.java

@@ -2,6 +2,8 @@ package com.goafanti.common.dao;
 
 import com.goafanti.common.model.TOrderDun;
 import com.goafanti.common.model.TOrderDunExample;
+import com.goafanti.order.bo.TOrderNewBo;
+
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
@@ -98,4 +100,6 @@ public interface TOrderDunMapper {
     
 
 	List<TOrderDun> selectByOrderNoDunSubject(String orderNo);
+
+	List<TOrderNewBo> getOrderDunData(@Param("name")String name,@Param("orderNo") String orderNo, @Param("starTime")String starTime, @Param("endTime")String endTime);
 }

+ 4 - 0
src/main/java/com/goafanti/common/dao/TOrderNewMapper.java

@@ -2,6 +2,8 @@ package com.goafanti.common.dao;
 
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderNewExample;
+import com.goafanti.order.bo.OrderRefundBo;
+import com.goafanti.order.bo.OrderRefundDetailBo;
 import com.goafanti.order.bo.TOrderNewBo;
 
 import java.util.List;
@@ -103,4 +105,6 @@ public interface TOrderNewMapper {
     TOrderNewBo getSaleIdByOno(String ono);
     TOrderNewBo agreeEmailData(Integer fid);
 
+    OrderRefundDetailBo orderRefundDetail(String id);
+
 }

+ 84 - 0
src/main/java/com/goafanti/common/dao/TTaskHoursMapper.java

@@ -0,0 +1,84 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TTaskHours;
+import com.goafanti.common.model.TTaskHoursExample;
+import com.goafanti.order.bo.TOrderNewBo;
+import com.goafanti.order.bo.TOrderTaskListBo;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface TTaskHoursMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	long countByExample(TTaskHoursExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	int deleteByExample(TTaskHoursExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	int deleteByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	int insert(TTaskHours record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	int insertSelective(TTaskHours record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	List<TTaskHours> selectByExample(TTaskHoursExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	TTaskHours selectByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	int updateByExampleSelective(@Param("record") TTaskHours record, @Param("example") TTaskHoursExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	int updateByExample(@Param("record") TTaskHours record, @Param("example") TTaskHoursExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	int updateByPrimaryKeySelective(TTaskHours record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	int updateByPrimaryKey(TTaskHours record);
+
+	String getTaskSuperHours(String id);
+
+	List<TOrderTaskListBo> getOrderDunData(String name, String taskId, String starTime, String endTime);
+
+	List<TOrderTaskListBo> getTaskHoursData( @Param("name")String name,  @Param("taskId")String taskId,  @Param("starTime")String starTime,  @Param("endTime")String endTime);
+}

+ 51 - 1
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -728,13 +728,14 @@
    		 a.superior_id as superiorId,
    		 a.department_id as departmentId,
    		 a.last_login_time as lastLoginTime,
+   		 a.contact_mobile as contactMobile,
    		 a.duty,a.status
     from admin a 
     left join admin_location al on a.id = al.admin_id
     left join admin aa on aa.id = a.superior_id
     left join user_role ur on a.id=ur.uid
     where a.id <![CDATA[ <> ]]> '1'
-    and (a.status !='注销' or a.status is null)
+    and a.status ='正常'
     <if test="name != null"> 
     	and a.name like concat('%',#{name,jdbcType=VARCHAR},'%')
     </if>
@@ -971,4 +972,53 @@
   		left join department d on a.department_id = d.id
   		where a.id = #{_parameter,jdbcType=VARCHAR}
   </select>
+  
+    <insert id="addAdminContacts" parameterType="com.goafanti.admin.bo.AdminContacts">
+    insert into admin_contacts (id,aid,contacts_id)values
+    (#{id,jdbcType=VARCHAR},#{aid,jdbcType=VARCHAR},#{contactsId,jdbcType=VARCHAR})
+  </insert>
+  
+   <select id="frequentContactsList" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.AdminListBo">
+  	 select a.id,b.id as contactId,b.name,b.position,b.contact_mobile as contactMobile,c.name as departmentName
+    from admin_contacts a left join admin b 
+    on a.contacts_id=b.id left join department c 
+    on c.id=b.department_id
+    where b.status ='正常'
+    <if test="aid != null"> 
+    and a.aid= #{aid,jdbcType=VARCHAR}
+    </if>
+    <if test="name != null"> 
+    and b.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+    </if>
+    <if test="depId != null"> 
+    and b.department_id= #{depId,jdbcType=VARCHAR}
+    </if>
+    <if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  
+  <select id="frequentContactsCount" parameterType="java.lang.String" resultType="java.lang.Integer">
+   select count(*)
+    from admin_contacts a left join admin b 
+    on a.contacts_id=b.id where b.status ='正常'
+    <if test="aid != null"> 
+    and a.aid= #{aid,jdbcType=VARCHAR}
+    </if>
+    <if test="name != null"> 
+    and b.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+    </if>
+    <if test="depId != null"> 
+    and b.department_id= #{depId,jdbcType=VARCHAR}
+    </if>
+  </select>
+  
+   <delete id="deleteFrequentContacts" parameterType="java.lang.String">
+   delete from admin_contacts
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <select id="getaidFrequentContacts" resultType="java.lang.String">
+  select b.id from admin_contacts a left join admin b on a.contacts_id = b.id 
+     where b.status = '正常' and a.aid= #{id,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 2 - 2
src/main/java/com/goafanti/common/mapper/TDunLogMapper.xml

@@ -285,8 +285,8 @@
   </update>
   <select id="selectByDunId" parameterType="java.lang.String" resultType="com.goafanti.order.bo.TDunLogListBo">
    select 
-    id, dun_id as dunId, dum_by as dumBy, dum_time as dumTime, remarks
-    from t_dun_log
+    a.id, a.dun_id as dunId, b.name as dumBy, a.dum_time as dumTime, a.remarks
+    from t_dun_log a left join admin b on a.dum_by=b.id
     where dun_id = #{dunId,jdbcType=VARCHAR}
   </select>
 </mapper>

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

@@ -3,9 +3,9 @@
 <mapper namespace="com.goafanti.common.dao.TOrderBonusMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderBonus">
     <!--
-      WARNING - @mbggenerated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Nov 27 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
@@ -19,9 +19,9 @@
   </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 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -53,9 +53,9 @@
   </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 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -87,18 +87,18 @@
   </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 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     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 Tue Nov 27 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     select
     <if test="distinct">
@@ -115,9 +115,9 @@
   </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     <!--
-      WARNING - @mbggenerated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Nov 27 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -126,18 +126,18 @@
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
     <!--
-      WARNING - @mbggenerated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Nov 27 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     delete from t_order_bonus
     where id = #{id,jdbcType=VARCHAR}
   </delete>
   <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderBonusExample">
     <!--
-      WARNING - @mbggenerated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Nov 27 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     delete from t_order_bonus
     <if test="_parameter != null">
@@ -146,9 +146,9 @@
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.TOrderBonus">
     <!--
-      WARNING - @mbggenerated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Nov 27 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     insert into t_order_bonus (id, create_time, order_no, 
       bonus_subject, grant_status, grant_target, 
@@ -161,9 +161,9 @@
   </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 Tue Nov 27 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     insert into t_order_bonus
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -225,11 +225,11 @@
       </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.TOrderBonusExample" resultType="java.lang.Integer">
+  <select id="countByExample" parameterType="com.goafanti.common.model.TOrderBonusExample" resultType="java.lang.Long">
     <!--
-      WARNING - @mbggenerated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Nov 27 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     select count(*) from t_order_bonus
     <if test="_parameter != null">
@@ -238,9 +238,9 @@
   </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 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     update t_order_bonus
     <set>
@@ -278,9 +278,9 @@
   </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 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     update t_order_bonus
     set id = #{record.id,jdbcType=VARCHAR},
@@ -298,9 +298,9 @@
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderBonus">
     <!--
-      WARNING - @mbggenerated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Nov 27 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     update t_order_bonus
     <set>
@@ -333,9 +333,9 @@
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderBonus">
     <!--
-      WARNING - @mbggenerated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Nov 27 10:35:55 CST 2018.
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 27 11:15:28 CST 2018.
     -->
     update t_order_bonus
     set create_time = #{createTime,jdbcType=TIMESTAMP},
@@ -365,20 +365,20 @@
   		<if test="b.grantBy != null">
   		and b.grant_by = #{b.grantBy,jdbcType=VARCHAR}
   		</if>
-  		<if test='b.targetName != null and b.targetName != ""'>
-  		<bind name="tn" value="'%' + b.targetName + '%'"/>
+  		<if test="b.targetName != null and b.targetName != &quot;&quot;">
+  		<bind name="tn" value="'%' + b.targetName + '%'" />
   		and a.name like #{tn,jdbcType=VARCHAR}
   		</if>
-  		<if test='b.salesName != null and b.salesName != ""'>
-  		<bind name="sn" value="'%' + b.salesName + '%'"/>
+  		<if test="b.salesName != null and b.salesName != &quot;&quot;">
+  		<bind name="sn" value="'%' + b.salesName + '%'" />
   		and oa.name like #{sn,jdbcType=VARCHAR}
   		</if>
-  		<if test='b.departmentId != null and b.departmentId !=""'>
+  		<if test="b.departmentId != null and b.departmentId !=&quot;&quot;">
   		and a.department_id = #{b.departmentId,jdbcType=VARCHAR}
   		</if>
-  		<if test='b.startTime != null and b.startTime != "" and b.endTime != null and b.endTime != ""'>
-  		<bind name="a" value="b.startTime + ' 00:00:00'"/>
-  		<bind name="e" value="b.endTime + ' 23:59:59'"/>
+  		<if test="b.startTime != null and b.startTime != &quot;&quot; and b.endTime != null and b.endTime != &quot;&quot;">
+  		<bind name="a" value="b.startTime + ' 00:00:00'" />
+  		<bind name="e" value="b.endTime + ' 23:59:59'" />
   		and o.sign_time between #{a,jdbcType=VARCHAR} and #{e,jdbcType=VARCHAR}
   		</if>
   		order by b.grant_status ,b.create_time 
@@ -397,20 +397,20 @@
   		<if test="b.grantBy != null">
   		and b.grant_by = #{b.grantBy,jdbcType=VARCHAR}
   		</if>
-  		<if test='b.targetName != null and b.targetName != ""'>
-  		<bind name="tn" value="'%' + b.targetName + '%'"/>
+  		<if test="b.targetName != null and b.targetName != &quot;&quot;">
+  		<bind name="tn" value="'%' + b.targetName + '%'" />
   		and a.name like #{tn,jdbcType=VARCHAR}
   		</if>
-  		<if test='b.salesName != null and b.salesName != ""'>
-  		<bind name="sn" value="'%' + b.salesName + '%'"/>
+  		<if test="b.salesName != null and b.salesName != &quot;&quot;">
+  		<bind name="sn" value="'%' + b.salesName + '%'" />
   		and oa.name like #{sn,jdbcType=VARCHAR}
   		</if>
-  		<if test='b.departmentId != null and b.departmentId !=""'>
+  		<if test="b.departmentId != null and b.departmentId !=&quot;&quot;">
   		and a.department_id = #{b.departmentId,jdbcType=VARCHAR}
   		</if>
-  		<if test='b.startTime != null and b.startTime != "" and b.endTime != null and b.endTime != ""'>
-  		<bind name="a" value="b.startTime + ' 00:00:00'"/>
-  		<bind name="e" value="b.endTime + ' 23:59:59'"/>
+  		<if test="b.startTime != null and b.startTime != &quot;&quot; and b.endTime != null and b.endTime != &quot;&quot;">
+  		<bind name="a" value="b.startTime + ' 00:00:00'" />
+  		<bind name="e" value="b.endTime + ' 23:59:59'" />
   		and o.sign_time between #{a,jdbcType=VARCHAR} and #{e,jdbcType=VARCHAR}
   		</if>
   </select>
@@ -431,16 +431,16 @@
 	<if test="b.grantBy != null">
 	and b.grant_by = #{b.grantBy,jdbcType=VARCHAR}
 	</if>
-	<if test='b.salesName != null and b.salesName != ""'>
-	<bind name="sn" value="'%' + b.salesName + '%'"/>
+	<if test="b.salesName != null and b.salesName != &quot;&quot;">
+	<bind name="sn" value="'%' + b.salesName + '%'" />
 	and a.name like #{sn,jdbcType=VARCHAR}
 	</if>
-	<if test='b.departmentId != null and b.departmentId !=""'>
+	<if test="b.departmentId != null and b.departmentId !=&quot;&quot;">
 	and a.department_id = #{b.departmentId,jdbcType=VARCHAR}
 	</if>
-	<if test='b.startTime != null and b.startTime != "" and b.endTime != null and b.endTime != ""'>
-	<bind name="a" value="b.startTime + ' 00:00:00'"/>
-	<bind name="e" value="b.endTime + ' 23:59:59'"/>
+	<if test="b.startTime != null and b.startTime != &quot;&quot; and b.endTime != null and b.endTime != &quot;&quot;">
+	<bind name="a" value="b.startTime + ' 00:00:00'" />
+	<bind name="e" value="b.endTime + ' 23:59:59'" />
 	and o.sign_time between #{a,jdbcType=VARCHAR} and #{e,jdbcType=VARCHAR}
 	</if>
 	order by b.grant_status , b.create_time
@@ -459,16 +459,16 @@
 	<if test="b.grantBy != null">
 	and b.grant_by = #{b.grantBy,jdbcType=VARCHAR}
 	</if>
-	<if test='b.salesName != null and b.salesName != ""'>
-	<bind name="sn" value="'%' + b.salesName + '%'"/>
+	<if test="b.salesName != null and b.salesName != &quot;&quot;">
+	<bind name="sn" value="'%' + b.salesName + '%'" />
 	and a.name like #{sn,jdbcType=VARCHAR}
 	</if>
-	<if test='b.departmentId != null and b.departmentId !=""'>
+	<if test="b.departmentId != null and b.departmentId !=&quot;&quot;">
 	and a.department_id = #{b.departmentId,jdbcType=VARCHAR}
 	</if>
-	<if test='b.startTime != null and b.startTime != "" and b.endTime != null and b.endTime != ""'>
-	<bind name="a" value="b.startTime + ' 00:00:00'"/>
-	<bind name="e" value="b.endTime + ' 23:59:59'"/>
+	<if test="b.startTime != null and b.startTime != &quot;&quot; and b.endTime != null and b.endTime != &quot;&quot;">
+	<bind name="a" value="b.startTime + ' 00:00:00'" />
+	<bind name="e" value="b.endTime + ' 23:59:59'" />
 	and o.sign_time between #{a,jdbcType=VARCHAR} and #{e,jdbcType=VARCHAR}
 	</if>
   </select>
@@ -485,16 +485,16 @@
 	<if test="grantBy != null">
 	and b.grant_by = #{grantBy,jdbcType=VARCHAR}
 	</if>
-	<if test='salesName != null and salesName != ""'>
-	<bind name="sn" value="'%' + salesName + '%'"/>
+	<if test="salesName != null and salesName != &quot;&quot;">
+	<bind name="sn" value="'%' + salesName + '%'" />
 	and a.name like #{sn,jdbcType=VARCHAR}
 	</if>
-	<if test='departmentId != null and departmentId !=""'>
+	<if test="departmentId != null and departmentId !=&quot;&quot;">
 	and a.department_id = #{departmentId,jdbcType=VARCHAR}
 	</if>
-	<if test='startTime != null and startTime != "" and endTime != null and endTime != ""'>
-	<bind name="a" value="startTime + ' 00:00:00'"/>
-	<bind name="e" value="endTime + ' 23:59:59'"/>
+	<if test="startTime != null and startTime != &quot;&quot; and endTime != null and endTime != &quot;&quot;">
+	<bind name="a" value="startTime + ' 00:00:00'" />
+	<bind name="e" value="endTime + ' 23:59:59'" />
 	and o.sign_time between #{a,jdbcType=VARCHAR} and #{e,jdbcType=VARCHAR}
 	</if>
   </select>
@@ -515,22 +515,22 @@
   		<if test="grantBy != null">
   		and b.grant_by = #{grantBy,jdbcType=VARCHAR}
   		</if>
-  		<if test='targetName != null and targetName != ""'>
-  		<bind name="tn" value="'%' + targetName + '%'"/>
+  		<if test="targetName != null and targetName != &quot;&quot;">
+  		<bind name="tn" value="'%' + targetName + '%'" />
   		and a.name like #{tn,jdbcType=VARCHAR}
   		</if>
-  		<if test='salesName != null and salesName != ""'>
-  		<bind name="sn" value="'%' + salesName + '%'"/>
+  		<if test="salesName != null and salesName != &quot;&quot;">
+  		<bind name="sn" value="'%' + salesName + '%'" />
   		and oa.name like #{sn,jdbcType=VARCHAR}
   		</if>
-  		<if test='departmentId != null and departmentId !=""'>
+  		<if test="departmentId != null and departmentId !=&quot;&quot;">
   		and a.department_id = #{departmentId,jdbcType=VARCHAR}
   		</if>
-  		<if test='startTime != null and startTime != "" and endTime != null and endTime != ""'>
-  		<bind name="a" value="b.startTime + ' 00:00:00'"/>
-  		<bind name="e" value="b.endTime + ' 23:59:59'"/>
+  		<if test="startTime != null and startTime != &quot;&quot; and endTime != null and endTime != &quot;&quot;">
+  		<bind name="a" value="b.startTime + ' 00:00:00'" />
+  		<bind name="e" value="b.endTime + ' 23:59:59'" />
   		and o.sign_time between #{a,jdbcType=VARCHAR} and #{e,jdbcType=VARCHAR}
   		</if>
   		order by b.grant_status ,b.create_time 
   </select>
-</mapper>
+</mapper>

+ 21 - 0
src/main/java/com/goafanti/common/mapper/TOrderDunMapper.xml

@@ -368,4 +368,25 @@
   <select id="selectByOrderNoDunSubject" resultType="com.goafanti.common.model.TOrderDun">
   	select id,dun_subject as dunSubject,money,order_no as orderNo from t_order_dun where order_no= #{orderNo,jdbcType=VARCHAR}
   </select>
+  <select id="getOrderDunData" resultType="com.goafanti.order.bo.TOrderNewBo">
+  select a.id,a.order_no as orderNo,date_format(b.sign_time,'%Y-%m-%d') as signDate,
+    c.nickname as userName,b.order_status as orderStatus,b.total_amount as totalAmount,
+    b.project_status as projectStatus,b.liquidation_status as liquidationStatus,
+    b.settlement_amount as settlementAmount,d.name as salesmanName,a.dun_subject as dunSubject,
+    date_format(a.start_time, '%Y-%m-%d') as startDate
+    from t_order_dun a left join t_order_new b on a.order_no=b.order_no
+    left join `user` c on b.buyer_id=c.id 
+    left join admin d on b.salesman_id=d.id
+    where a.start_time is not null and b.delete_sign = 0
+    <if test="name != null and name != ''">
+  	and c.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+  	</if>
+  	<if test="orderNo != null and orderNo != ''">
+  	and a.order_no = #{orderNo,jdbcType=VARCHAR}
+  	</if>
+  	<if test="starTime !=null and endTime !=null and starTime !='' and endTime != '' ">
+  	and b.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
+  	</if>
+  	order by b.sign_time desc
+  </select>
 </mapper>

+ 21 - 6
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -1038,14 +1038,21 @@
   <select id="selectOrderNewListByPage" resultType="com.goafanti.order.bo.TOrderNewBo">
   	select 
   		a.order_no as orderNo,a.create_time as createTime, date_format(a.sign_time,'%Y-%m-%d' ) as signDate,
-  		b.nickname as userName ,a.process_status as processStatus,a.total_amount as totalAmount,
+  		b.nickname as userName ,a.process_status as processStatus,a.total_amount as totalAmount,a.order_status as orderStatus,
   		a.liquidation_status as liquidationStatus,a.approval,c.name as salesmanName,d.name as financeName
+  	<if test="specially == 2">
+  	,f.name as initiateName ,e.reason ,date_format(e.create_time,'%Y-%m-%d' ) as backDate,e.id as backId
+  	</if>
   	<if test="specially == 4">
   	,f.name as consultantName
   	</if>
   	from t_order_new a  left join `user` b on a.buyer_id=b.id 
   	left join admin c on a.salesman_id=c.id
   	left join admin d on a.finance_id=d.id
+  	<if test="specially == 2">
+	left join (select * from t_order_back a where back_status=0) e on a.order_no=e.order_no
+  	left join admin f on e.initiate=f.id
+  	</if>
   	<if test="specially == 4">
   	left join (select * from t_order_task where main=1) e on e.order_no=a.order_no
   	left join admin f on e.task_receiver=f.id
@@ -1085,7 +1092,7 @@
   	<if test="starTime !=null and endTime !=null">
   	and a.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
   	</if>
-  	order by a.sign_time desc
+  	order by a.order_status,a.create_time desc
   	<if test="page_sql!=null">
 			${page_sql}
 	</if>
@@ -1133,7 +1140,7 @@
     date_format(a.start_time, '%Y-%m-%d') as startDate
     from t_order_dun a left join t_order_new b on a.order_no=b.order_no
     left join `user` c on b.buyer_id=c.id 
-    left join admin d on b.salesman_id=c.id
+    left join admin d on b.salesman_id=d.id
     where a.start_time is not null and b.delete_sign = 0
     <if test="name != null">
   	and c.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
@@ -1155,7 +1162,7 @@
 		count(*)
     from t_order_dun a left join t_order_new b on a.order_no=b.order_no
     left join `user` c on b.buyer_id=c.id 
-    where b.delete_sign = 0
+    where a.start_time is not null and b.delete_sign = 0
     <if test="name != null">
   	and c.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
@@ -1163,13 +1170,13 @@
   	and a.order_no = #{orderNo,jdbcType=VARCHAR}
   	</if>
   	<if test="starTime !=null and endTime !=null">
-	and b.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
+  	and b.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
   	</if>
   </select>
   
   <select id="getOrderNewDetail" parameterType="java.lang.String" resultType="com.goafanti.order.bo.TOrderNewBo">
      select 
-    a.order_no as orderNo, a.order_type as ordertType, a.creater, a.create_time as createTime,a.update_time as updateTime, a.buyer_id as buyerId, a.first_amount as firstAmount, 
+    a.order_no as orderNo, a.order_type as orderType, a.creater, a.create_time as createTime,a.update_time as updateTime, a.buyer_id as buyerId, a.first_amount as firstAmount, 
     a.total_amount as totalAmount, a.settlement_amount as settlementAmount, order_status as orderStatus, a.liquidation_status as liquidationStatus, a.process_status as processStatus, 
     a.project_status as projectStatus, a.approval, a.order_remarks as orderRemarks, a.delete_sign as deleteSign, a.salesman_id as salesmanId, finance_id as financeId, technician_id as technicianId, 
     a.sign_time as signTime, a.settlement_time as settlementTime, a.contract_no as contractNo, a.contract_type as contractType, a.contacts, a.contact_mobile as contactMobile, 
@@ -1235,4 +1242,12 @@
   		left join `user` u on u.id = o.buyer_id
   		where r.id = #{id,jdbcType=INTEGER}
   </select>
+  <select id="orderRefundDetail" resultType="com.goafanti.order.bo.OrderRefundDetailBo">
+  	select a.id,date_format(a.create_time,'%Y-%m-%d') as createDate ,a.order_no as orderNo,
+     b.order_status as orderStatus,a.refund_status as refundStatus, a.application_url as applicationUrl,
+     a.contract_url as contractUrl,a.reason,b.liquidation_status as liquidationStatus
+     from t_order_refund a 
+     left join t_order_new b  on a.order_no=b.order_no
+     where a.id= #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

+ 44 - 0
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -753,4 +753,48 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
      select super_id as superId,min(task_status) as taskStatus,min(project_status) as projectStatus  from t_order_task
     where super_id = #{superId,jdbcType=VARCHAR} group by super_id
   </select>
+  
+   <select id="selectTaskHoursListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
+  	select  a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
+    a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity
+  	from t_order_task a left join business_project b on a.commodity_id=b.id
+  	left join business_category c on b.cid=c.id
+    left join admin d on a.task_receiver=d.id
+    left join t_order_new e on a.order_no=e.order_no
+    left join user f on e.buyer_id=f.id
+    left join (select task_id,sum(hours) as hours from t_task_hours group by task_id) g on a.id=g.task_id
+    where e.delete_sign=0 and a.super_id is null
+    <if test="name != null">
+  	and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+  	</if>
+  	<if test="taskId != null">
+  	and a.id= #{taskId,jdbcType=VARCHAR}
+  	</if>
+  	<if test="starTime !=null and endTime !=null">
+  	and a.task_start_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
+  	</if>
+  	order by  a.task_start_time desc
+  	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  
+   <select id="selectTaskHoursListCount" resultType="java.lang.Integer">
+  		select  count(*)
+  	from t_order_task a left join business_project b on a.commodity_id=b.id
+  	left join business_category c on b.cid=c.id
+    left join admin d on a.task_receiver=d.id
+    left join t_order_new e on a.order_no=e.order_no
+    left join user f on e.buyer_id=f.id
+    where e.delete_sign=0 and a.super_id is null
+    <if test="name != null">
+  	and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+  	</if>
+  	<if test="taskId != null">
+  	and a.id= #{taskId,jdbcType=VARCHAR}
+  	</if>
+  	<if test="starTime !=null and endTime !=null">
+  	and a.task_start_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
+  	</if>
+  </select>
 </mapper>

+ 344 - 0
src/main/java/com/goafanti/common/mapper/TTaskHoursMapper.xml

@@ -0,0 +1,344 @@
+<?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.TTaskHoursMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TTaskHours">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="task_id" jdbcType="VARCHAR" property="taskId" />
+    <result column="hours" jdbcType="DOUBLE" property="hours" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="task_day" jdbcType="TIMESTAMP" property="taskDay" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 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 - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 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 - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    id, task_id, hours, aid, create_time, remarks, task_day
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.TTaskHoursExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from t_task_hours
+    <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.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from t_task_hours
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    delete from t_task_hours
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TTaskHoursExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    delete from t_task_hours
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.TTaskHours">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    insert into t_task_hours (id, task_id, hours, 
+      aid, create_time, remarks, 
+      task_day)
+    values (#{id,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, #{hours,jdbcType=DOUBLE}, 
+      #{aid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, 
+      #{taskDay,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.TTaskHours">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    insert into t_task_hours
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="taskId != null">
+        task_id,
+      </if>
+      <if test="hours != null">
+        hours,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="taskDay != null">
+        task_day,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="taskId != null">
+        #{taskId,jdbcType=VARCHAR},
+      </if>
+      <if test="hours != null">
+        #{hours,jdbcType=DOUBLE},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="taskDay != null">
+        #{taskDay,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.TTaskHoursExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    select count(*) from t_task_hours
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    update t_task_hours
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.taskId != null">
+        task_id = #{record.taskId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.hours != null">
+        hours = #{record.hours,jdbcType=DOUBLE},
+      </if>
+      <if test="record.aid != null">
+        aid = #{record.aid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.remarks != null">
+        remarks = #{record.remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="record.taskDay != null">
+        task_day = #{record.taskDay,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    update t_task_hours
+    set id = #{record.id,jdbcType=VARCHAR},
+      task_id = #{record.taskId,jdbcType=VARCHAR},
+      hours = #{record.hours,jdbcType=DOUBLE},
+      aid = #{record.aid,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      remarks = #{record.remarks,jdbcType=VARCHAR},
+      task_day = #{record.taskDay,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskHours">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    update t_task_hours
+    <set>
+      <if test="taskId != null">
+        task_id = #{taskId,jdbcType=VARCHAR},
+      </if>
+      <if test="hours != null">
+        hours = #{hours,jdbcType=DOUBLE},
+      </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="taskDay != null">
+        task_day = #{taskDay,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TTaskHours">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 26 10:26:19 CST 2018.
+    -->
+    update t_task_hours
+    set task_id = #{taskId,jdbcType=VARCHAR},
+      hours = #{hours,jdbcType=DOUBLE},
+      aid = #{aid,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      task_day = #{taskDay,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <select id="getTaskSuperHours" resultType="java.lang.String">
+  select ifnull(sum(hours),0)as hours from t_task_hours a
+    left join t_order_task b on a.task_id=b.id
+    where b.super_id=#{id,jdbcType=VARCHAR}
+  </select>
+  <select id="getTaskHoursData" resultType="com.goafanti.order.bo.TOrderTaskListBo">
+  select  a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
+    a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity
+  	from t_order_task a left join business_project b on a.commodity_id=b.id
+  	left join business_category c on b.cid=c.id
+    left join admin d on a.task_receiver=d.id
+    left join t_order_new e on a.order_no=e.order_no
+    left join user f on e.buyer_id=f.id
+    left join (select task_id,sum(hours) as hours from t_task_hours group by task_id) g on a.id=g.task_id
+    where e.delete_sign=0 and a.super_id is null
+    <if test="name != null and name != ''">
+  	and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+  	</if>
+  	<if test="taskId != null and taskId != ''">
+  	and a.id= #{taskId,jdbcType=VARCHAR}
+  	</if>
+  	<if test="starTime !=null and endTime !=null starTime !='' and endTime !=''">
+  	and a.task_start_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
+  	</if>
+  	order by  a.task_start_time desc
+  </select>
+</mapper>

+ 114 - 1
src/main/java/com/goafanti/common/model/TOrderBonus.java

@@ -6,54 +6,94 @@ public class TOrderBonus {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.id
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	private String id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.create_time
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.order_no
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	private String orderNo;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.bonus_subject
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	private Integer bonusSubject;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.grant_status
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	private Integer grantStatus;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.grant_target
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	private String grantTarget;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.grant_by
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	private String grantBy;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.grant_time
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	private Date grantTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_bonus.grant_type
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public String getId() {
 		return id;
@@ -62,7 +102,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void setId(String id) {
 		this.id = id;
@@ -71,7 +115,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -80,7 +128,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -89,7 +141,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public String getOrderNo() {
 		return orderNo;
@@ -98,7 +154,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void setOrderNo(String orderNo) {
 		this.orderNo = orderNo;
@@ -107,7 +167,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public Integer getBonusSubject() {
 		return bonusSubject;
@@ -116,7 +180,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void setBonusSubject(Integer bonusSubject) {
 		this.bonusSubject = bonusSubject;
@@ -125,7 +193,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public Integer getGrantStatus() {
 		return grantStatus;
@@ -134,7 +206,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void setGrantStatus(Integer grantStatus) {
 		this.grantStatus = grantStatus;
@@ -143,7 +219,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public String getGrantTarget() {
 		return grantTarget;
@@ -152,7 +232,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void setGrantTarget(String grantTarget) {
 		this.grantTarget = grantTarget;
@@ -161,7 +245,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public String getGrantBy() {
 		return grantBy;
@@ -170,7 +258,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void setGrantBy(String grantBy) {
 		this.grantBy = grantBy;
@@ -179,7 +271,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public Date getGrantTime() {
 		return grantTime;
@@ -188,7 +284,11 @@ 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void setGrantTime(Date grantTime) {
 		this.grantTime = grantTime;
@@ -197,6 +297,7 @@ public class TOrderBonus {
 	/**
 	 * 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
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
 	 */
 	public Integer getGrantType() {
@@ -207,8 +308,20 @@ public class TOrderBonus {
 	 * 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
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 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
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void setGrantType(Integer grantType) {
 		this.grantType = grantType;
 	}
-}
+}

+ 145 - 41
src/main/java/com/goafanti/common/model/TOrderBonusExample.java

@@ -8,23 +8,39 @@ import java.util.Iterator;
 public class TOrderBonusExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public TOrderBonusExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -32,7 +48,11 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -40,7 +60,11 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -48,7 +72,11 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -56,7 +84,11 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -64,7 +96,11 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -72,7 +108,11 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -80,7 +120,11 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -90,7 +134,11 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -102,7 +150,11 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -111,7 +163,11 @@ public class TOrderBonusExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -121,7 +177,11 @@ public class TOrderBonusExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -150,39 +210,30 @@ public class TOrderBonusExample {
 			criteria.add(new Criterion(condition));
 		}
 
-		protected void addCriterion(String condition, Object value,
-				String property) {
+		protected void addCriterion(String condition, Object value, String property) {
 			if (value == null) {
-				throw new RuntimeException("Value for " + property
-						+ " cannot be 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) {
+		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");
+				throw new RuntimeException("Between values for " + property + " cannot be null");
 			}
 			criteria.add(new Criterion(condition, value1, value2));
 		}
 
-		protected void addCriterionForJDBCDate(String condition, Date value,
-				String property) {
+		protected void addCriterionForJDBCDate(String condition, Date value, String property) {
 			if (value == null) {
-				throw new RuntimeException("Value for " + property
-						+ " cannot be null");
+				throw new RuntimeException("Value for " + property + " cannot be null");
 			}
-			addCriterion(condition, new java.sql.Date(value.getTime()),
-					property);
+			addCriterion(condition, new java.sql.Date(value.getTime()), property);
 		}
 
-		protected void addCriterionForJDBCDate(String condition,
-				List<Date> values, String property) {
+		protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
 			if (values == null || values.size() == 0) {
-				throw new RuntimeException("Value list for " + property
-						+ " cannot be null or empty");
+				throw new RuntimeException("Value list for " + property + " cannot be null or empty");
 			}
 			List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
 			Iterator<Date> iter = values.iterator();
@@ -192,14 +243,11 @@ public class TOrderBonusExample {
 			addCriterion(condition, dateList, property);
 		}
 
-		protected void addCriterionForJDBCDate(String condition, Date value1,
-				Date value2, String property) {
+		protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
 			if (value1 == null || value2 == null) {
-				throw new RuntimeException("Between values for " + property
-						+ " cannot be null");
+				throw new RuntimeException("Between values for " + property + " cannot be null");
 			}
-			addCriterion(condition, new java.sql.Date(value1.getTime()),
-					new java.sql.Date(value2.getTime()), property);
+			addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
 		}
 
 		public Criteria andIdIsNull() {
@@ -328,8 +376,7 @@ public class TOrderBonusExample {
 		}
 
 		public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
-			addCriterion("create_time not between", value1, value2,
-					"createTime");
+			addCriterion("create_time not between", value1, value2, "createTime");
 			return (Criteria) this;
 		}
 
@@ -454,14 +501,12 @@ public class TOrderBonusExample {
 		}
 
 		public Criteria andBonusSubjectBetween(Integer value1, Integer value2) {
-			addCriterion("bonus_subject between", value1, value2,
-					"bonusSubject");
+			addCriterion("bonus_subject between", value1, value2, "bonusSubject");
 			return (Criteria) this;
 		}
 
 		public Criteria andBonusSubjectNotBetween(Integer value1, Integer value2) {
-			addCriterion("bonus_subject not between", value1, value2,
-					"bonusSubject");
+			addCriterion("bonus_subject not between", value1, value2, "bonusSubject");
 			return (Criteria) this;
 		}
 
@@ -521,8 +566,7 @@ public class TOrderBonusExample {
 		}
 
 		public Criteria andGrantStatusNotBetween(Integer value1, Integer value2) {
-			addCriterion("grant_status not between", value1, value2,
-					"grantStatus");
+			addCriterion("grant_status not between", value1, value2, "grantStatus");
 			return (Criteria) this;
 		}
 
@@ -592,8 +636,7 @@ public class TOrderBonusExample {
 		}
 
 		public Criteria andGrantTargetNotBetween(String value1, String value2) {
-			addCriterion("grant_target not between", value1, value2,
-					"grantTarget");
+			addCriterion("grant_target not between", value1, value2, "grantTarget");
 			return (Criteria) this;
 		}
 
@@ -718,14 +761,72 @@ public class TOrderBonusExample {
 		}
 
 		public Criteria andGrantTimeBetween(Date value1, Date value2) {
-			addCriterionForJDBCDate("grant_time between", value1, value2,
-					"grantTime");
+			addCriterionForJDBCDate("grant_time between", value1, value2, "grantTime");
 			return (Criteria) this;
 		}
 
 		public Criteria andGrantTimeNotBetween(Date value1, Date value2) {
-			addCriterionForJDBCDate("grant_time not between", value1, value2,
-					"grantTime");
+			addCriterionForJDBCDate("grant_time not between", value1, value2, "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;
 		}
 
@@ -792,7 +893,11 @@ public class TOrderBonusExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_bonus
+<<<<<<< HEAD
 	 * @mbggenerated  Tue Nov 27 10:35:55 CST 2018
+=======
+	 * @mbg.generated  Tue Nov 27 11:15:28 CST 2018
+>>>>>>> branch 'test' of http://git.jishutao.com/jishutao/kede-server.git
 	 */
 	public static class Criterion {
 		private String condition;
@@ -859,8 +964,7 @@ public class TOrderBonusExample {
 			this(condition, value, null);
 		}
 
-		protected Criterion(String condition, Object value, Object secondValue,
-				String typeHandler) {
+		protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
 			super();
 			this.condition = condition;
 			this.value = value;
@@ -886,4 +990,4 @@ public class TOrderBonusExample {
             super();
         }
     }
-}
+}

+ 168 - 0
src/main/java/com/goafanti/common/model/TTaskHours.java

@@ -0,0 +1,168 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class TTaskHours {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_hours.id
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	private String id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_hours.task_id
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	private String taskId;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_hours.hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	private Double hours;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_hours.aid
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	private String aid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_hours.create_time
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_hours.remarks
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	private String remarks;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_hours.task_day
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	private Date taskDay;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_hours.id
+	 * @return  the value of t_task_hours.id
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public String getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_hours.id
+	 * @param id  the value for t_task_hours.id
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_hours.task_id
+	 * @return  the value of t_task_hours.task_id
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public String getTaskId() {
+		return taskId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_hours.task_id
+	 * @param taskId  the value for t_task_hours.task_id
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public void setTaskId(String taskId) {
+		this.taskId = taskId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_hours.hours
+	 * @return  the value of t_task_hours.hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public Double getHours() {
+		return hours;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_hours.hours
+	 * @param hours  the value for t_task_hours.hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public void setHours(Double hours) {
+		this.hours = hours;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_hours.aid
+	 * @return  the value of t_task_hours.aid
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public String getAid() {
+		return aid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_hours.aid
+	 * @param aid  the value for t_task_hours.aid
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public void setAid(String aid) {
+		this.aid = aid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_hours.create_time
+	 * @return  the value of t_task_hours.create_time
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_hours.create_time
+	 * @param createTime  the value for t_task_hours.create_time
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_hours.remarks
+	 * @return  the value of t_task_hours.remarks
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public String getRemarks() {
+		return remarks;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_hours.remarks
+	 * @param remarks  the value for t_task_hours.remarks
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public void setRemarks(String remarks) {
+		this.remarks = remarks;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_hours.task_day
+	 * @return  the value of t_task_hours.task_day
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public Date getTaskDay() {
+		return taskDay;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_hours.task_day
+	 * @param taskDay  the value for t_task_hours.task_day
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public void setTaskDay(Date taskDay) {
+		this.taskDay = taskDay;
+	}
+}

+ 722 - 0
src/main/java/com/goafanti/common/model/TTaskHoursExample.java

@@ -0,0 +1,722 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class TTaskHoursExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public TTaskHoursExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 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_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 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_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 CST 2018
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 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_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 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_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 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_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 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_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 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_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 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(String value) {
+			addCriterion("id =", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotEqualTo(String value) {
+			addCriterion("id <>", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThan(String value) {
+			addCriterion("id >", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThanOrEqualTo(String value) {
+			addCriterion("id >=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThan(String value) {
+			addCriterion("id <", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThanOrEqualTo(String value) {
+			addCriterion("id <=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLike(String value) {
+			addCriterion("id like", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotLike(String value) {
+			addCriterion("id not like", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIn(List<String> values) {
+			addCriterion("id in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotIn(List<String> values) {
+			addCriterion("id not in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdBetween(String value1, String value2) {
+			addCriterion("id between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotBetween(String value1, String value2) {
+			addCriterion("id not between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdIsNull() {
+			addCriterion("task_id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdIsNotNull() {
+			addCriterion("task_id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdEqualTo(String value) {
+			addCriterion("task_id =", value, "taskId");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdNotEqualTo(String value) {
+			addCriterion("task_id <>", value, "taskId");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdGreaterThan(String value) {
+			addCriterion("task_id >", value, "taskId");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdGreaterThanOrEqualTo(String value) {
+			addCriterion("task_id >=", value, "taskId");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdLessThan(String value) {
+			addCriterion("task_id <", value, "taskId");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdLessThanOrEqualTo(String value) {
+			addCriterion("task_id <=", value, "taskId");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdLike(String value) {
+			addCriterion("task_id like", value, "taskId");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdNotLike(String value) {
+			addCriterion("task_id not like", value, "taskId");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdIn(List<String> values) {
+			addCriterion("task_id in", values, "taskId");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdNotIn(List<String> values) {
+			addCriterion("task_id not in", values, "taskId");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdBetween(String value1, String value2) {
+			addCriterion("task_id between", value1, value2, "taskId");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskIdNotBetween(String value1, String value2) {
+			addCriterion("task_id not between", value1, value2, "taskId");
+			return (Criteria) this;
+		}
+
+		public Criteria andHoursIsNull() {
+			addCriterion("hours is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andHoursIsNotNull() {
+			addCriterion("hours is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andHoursEqualTo(Double value) {
+			addCriterion("hours =", value, "hours");
+			return (Criteria) this;
+		}
+
+		public Criteria andHoursNotEqualTo(Double value) {
+			addCriterion("hours <>", value, "hours");
+			return (Criteria) this;
+		}
+
+		public Criteria andHoursGreaterThan(Double value) {
+			addCriterion("hours >", value, "hours");
+			return (Criteria) this;
+		}
+
+		public Criteria andHoursGreaterThanOrEqualTo(Double value) {
+			addCriterion("hours >=", value, "hours");
+			return (Criteria) this;
+		}
+
+		public Criteria andHoursLessThan(Double value) {
+			addCriterion("hours <", value, "hours");
+			return (Criteria) this;
+		}
+
+		public Criteria andHoursLessThanOrEqualTo(Double value) {
+			addCriterion("hours <=", value, "hours");
+			return (Criteria) this;
+		}
+
+		public Criteria andHoursIn(List<Double> values) {
+			addCriterion("hours in", values, "hours");
+			return (Criteria) this;
+		}
+
+		public Criteria andHoursNotIn(List<Double> values) {
+			addCriterion("hours not in", values, "hours");
+			return (Criteria) this;
+		}
+
+		public Criteria andHoursBetween(Double value1, Double value2) {
+			addCriterion("hours between", value1, value2, "hours");
+			return (Criteria) this;
+		}
+
+		public Criteria andHoursNotBetween(Double value1, Double value2) {
+			addCriterion("hours not between", value1, value2, "hours");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidIsNull() {
+			addCriterion("aid is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidIsNotNull() {
+			addCriterion("aid is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidEqualTo(String value) {
+			addCriterion("aid =", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidNotEqualTo(String value) {
+			addCriterion("aid <>", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidGreaterThan(String value) {
+			addCriterion("aid >", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidGreaterThanOrEqualTo(String value) {
+			addCriterion("aid >=", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidLessThan(String value) {
+			addCriterion("aid <", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidLessThanOrEqualTo(String value) {
+			addCriterion("aid <=", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidLike(String value) {
+			addCriterion("aid like", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidNotLike(String value) {
+			addCriterion("aid not like", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidIn(List<String> values) {
+			addCriterion("aid in", values, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidNotIn(List<String> values) {
+			addCriterion("aid not in", values, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidBetween(String value1, String value2) {
+			addCriterion("aid between", value1, value2, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidNotBetween(String value1, String value2) {
+			addCriterion("aid not between", value1, value2, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIsNull() {
+			addCriterion("create_time is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIsNotNull() {
+			addCriterion("create_time is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeEqualTo(Date value) {
+			addCriterion("create_time =", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotEqualTo(Date value) {
+			addCriterion("create_time <>", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeGreaterThan(Date value) {
+			addCriterion("create_time >", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+			addCriterion("create_time >=", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeLessThan(Date value) {
+			addCriterion("create_time <", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+			addCriterion("create_time <=", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIn(List<Date> values) {
+			addCriterion("create_time in", values, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotIn(List<Date> values) {
+			addCriterion("create_time not in", values, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeBetween(Date value1, Date value2) {
+			addCriterion("create_time between", value1, value2, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+			addCriterion("create_time not between", value1, value2, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksIsNull() {
+			addCriterion("remarks is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksIsNotNull() {
+			addCriterion("remarks is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksEqualTo(String value) {
+			addCriterion("remarks =", value, "remarks");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksNotEqualTo(String value) {
+			addCriterion("remarks <>", value, "remarks");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksGreaterThan(String value) {
+			addCriterion("remarks >", value, "remarks");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksGreaterThanOrEqualTo(String value) {
+			addCriterion("remarks >=", value, "remarks");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksLessThan(String value) {
+			addCriterion("remarks <", value, "remarks");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksLessThanOrEqualTo(String value) {
+			addCriterion("remarks <=", value, "remarks");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksLike(String value) {
+			addCriterion("remarks like", value, "remarks");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksNotLike(String value) {
+			addCriterion("remarks not like", value, "remarks");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksIn(List<String> values) {
+			addCriterion("remarks in", values, "remarks");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksNotIn(List<String> values) {
+			addCriterion("remarks not in", values, "remarks");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksBetween(String value1, String value2) {
+			addCriterion("remarks between", value1, value2, "remarks");
+			return (Criteria) this;
+		}
+
+		public Criteria andRemarksNotBetween(String value1, String value2) {
+			addCriterion("remarks not between", value1, value2, "remarks");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDayIsNull() {
+			addCriterion("task_day is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDayIsNotNull() {
+			addCriterion("task_day is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDayEqualTo(Date value) {
+			addCriterion("task_day =", value, "taskDay");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDayNotEqualTo(Date value) {
+			addCriterion("task_day <>", value, "taskDay");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDayGreaterThan(Date value) {
+			addCriterion("task_day >", value, "taskDay");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDayGreaterThanOrEqualTo(Date value) {
+			addCriterion("task_day >=", value, "taskDay");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDayLessThan(Date value) {
+			addCriterion("task_day <", value, "taskDay");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDayLessThanOrEqualTo(Date value) {
+			addCriterion("task_day <=", value, "taskDay");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDayIn(List<Date> values) {
+			addCriterion("task_day in", values, "taskDay");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDayNotIn(List<Date> values) {
+			addCriterion("task_day not in", values, "taskDay");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDayBetween(Date value1, Date value2) {
+			addCriterion("task_day between", value1, value2, "taskDay");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDayNotBetween(Date value1, Date value2) {
+			addCriterion("task_day not between", value1, value2, "taskDay");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_task_hours
+	 * @mbg.generated  Mon Nov 26 10:26:19 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_task_hours
+     *
+     * @mbg.generated do_not_delete_during_merge Mon Nov 26 09:04:15 CST 2018
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

+ 17 - 0
src/main/java/com/goafanti/common/task/OrderTaskDun.java

@@ -0,0 +1,17 @@
+package com.goafanti.common.task;
+
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+@Component
+//@Controller
+public class OrderTaskDun {
+
+	
+	
+	
+	@Scheduled(cron = "0 0 2  * * ?") 
+	public void updatrTaskDun(){
+		
+	}
+}

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

@@ -24,6 +24,12 @@ 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.bo.TOrderNewBo;
+import com.goafanti.order.bo.TOrderTaskListBo;
+import com.goafanti.order.enums.LiquidationNewState;
+import com.goafanti.order.enums.OrderNewState;
+import com.goafanti.order.enums.ProjectNewStage;
+import com.goafanti.techproject.enums.TaskState;
 import com.goafanti.order.enums.BonusSubject;
 import com.goafanti.order.enums.LiquidationNewState;
 import com.goafanti.order.enums.ProjectNewStage;
@@ -375,5 +381,103 @@ public class ExportExcelUtil {
 		}*/
 	}
 	
+	public static HSSFWorkbook exportOrderDunData(List<TOrderNewBo> list,String[] comment,String filePath){
+		//map 数据 comment表头 (列名称)
+ 		//1,创建一个workbook,对应的是一个excel文件
+		HSSFWorkbook wb = new HSSFWorkbook();
+		//2.创建一个sheet
+			HSSFSheet sheet = wb.createSheet();
+			//创建表头
+			HSSFCellStyle style1 = setCellStyle1(wb);
+			HSSFRow row = sheet.createRow(0);
+			for(int i = 0; i < comment.length; i++){
+				sheet.setColumnWidth(i, 3000);//设置列宽
+				HSSFCell c = row.createCell(i);
+				c.setCellValue(comment[i]);
+				c.setCellStyle(style1);
+			}
+			for (TOrderNewBo 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.getOrderNo(); break;
+					case "签单时间": o = ob.getSignDate(); break;
+					case "客户名称": o = ob.getUserName(); break;
+					case "订单状态": o = OrderNewState.getValueByCode(ob.getOrderStatus());break;
+					case "签单金额": o = ob.getTotalAmount().toString(); break;
+					case "项目状态": o = ProjectNewStage.getValueByCode(ob.getProjectStatus()); break;
+					case "结算状态": o = LiquidationNewState.getValueByCode(ob.getLiquidationStatus()); break;
+					case "已收款": o = ob.getSettlementAmount().toString(); break;
+					case "催收科目": o = getDunSuBubject(ob.getDunSubject()); break;
+					case "催款启动日期": o = ob.getStartDate(); break;
+					default: o = ""; break;
+					}
+					HSSFCell c = r.createCell(i);
+					c.setCellValue(o);
+				}
+			}
+		return wb;
+		
+	}
+
+	private static String getDunSuBubject(String dunSubject) {
+		if ("12".equals(dunSubject)) return "订单审核通过";
+		if ("20".equals(dunSubject)) return "项目待提交";
+		if ("21".equals(dunSubject)) return "项目已提交";
+		if ("22".equals(dunSubject)) return "项目评审";
+		if ("23".equals(dunSubject)) return "项目立项";
+		if ("24".equals(dunSubject)) return "项目公示";
+		if ("25".equals(dunSubject)) return "项目抽查";
+		if ("26".equals(dunSubject)) return "项目备案";
+		if ("27".equals(dunSubject)) return "项目下证";
+		if ("28".equals(dunSubject)) return "项目验收";
+		if ("29".equals(dunSubject)) return "项目拨款";
+		return "";
+	}
+
+	public static HSSFWorkbook exportTaskHoursListData(List<TOrderTaskListBo> list, String[] comment, String filePath) {
+
+		//map 数据 comment表头 (列名称)
+ 		//1,创建一个workbook,对应的是一个excel文件
+		HSSFWorkbook wb = new HSSFWorkbook();
+		//2.创建一个sheet
+			HSSFSheet sheet = wb.createSheet();
+			//创建表头
+			HSSFCellStyle style1 = setCellStyle1(wb);
+			HSSFRow row = sheet.createRow(0);
+			for(int i = 0; i < comment.length; i++){
+				sheet.setColumnWidth(i, 3000);//设置列宽
+				HSSFCell c = row.createCell(i);
+				c.setCellValue(comment[i]);
+				c.setCellStyle(style1);
+			}
+			for (TOrderTaskListBo 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(); break;
+					case "任务名称": o = ob.getTaskName(); break;
+					case "订单编号": o = ob.getOrderNo(); break;
+					case "业务别类": o = ob.getCname();break;
+					case "客户名称": o = ob.getUserName(); break;
+					case "任务负责人": o = ob.getReceiverName(); break;
+					case "任务状态": o = TaskState.getValueByCode(ob.getTaskStatus()); break;
+					case "工时": o = ob.getHours(); break;
+					default: o = ""; break;
+					}
+					HSSFCell c = r.createCell(i);
+					c.setCellValue(o);
+				}
+			}
+		return wb;
+	}
 	
 }

+ 2 - 1
src/main/java/com/goafanti/common/utils/FileUtils.java

@@ -108,7 +108,8 @@ public class FileUtils {
 				|| sign.indexOf("lecture_picture") != -1|| sign.indexOf("cover_picture") != -1 
 				|| sign.indexOf("news") != -1||sign.indexOf("customer_sys_file") != -1 || sign.indexOf("order_refund_file") != -1
 				||sign.indexOf("business_project_max_picture") != -1||sign.indexOf("business_project_min_picture") != -1
-				||sign.indexOf("varieties_picture") != -1  || sign.indexOf("organization_application") != -1) {
+				||sign.indexOf("varieties_picture") != -1  || sign.indexOf("organization_application") != -1
+				||sign.indexOf("order_task_file") != -1) {
 			uniq = true;
 		}
 		String fileName = "";

+ 2 - 2
src/main/java/com/goafanti/core/auth/RestClient.java

@@ -2,7 +2,7 @@ package com.goafanti.core.auth;
 
 import java.util.Base64;
 
-import org.junit.Test;
+
 import org.springframework.http.HttpEntity;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
@@ -36,7 +36,7 @@ public class RestClient {
 		return response.getBody();
 	}
 	
-	@Test
+//	@Test
 	public void testLogin() {
 		System.out.println(sendToBs("login", HttpMethod.GET, null));
 	}

+ 71 - 0
src/main/java/com/goafanti/order/bo/OrderRefundDetailBo.java

@@ -0,0 +1,71 @@
+package com.goafanti.order.bo;
+
+
+public class OrderRefundDetailBo  {
+	private String id;
+	private String createDate;
+	private String orderNo;
+	private Integer orderStatus;
+	private Integer refundStatus;
+	private String applicationUrl;
+	private String contractUrl;
+	private String reason;
+	private Integer liquidationStatus;
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getCreateDate() {
+		return createDate;
+	}
+	public void setCreateDate(String createDate) {
+		this.createDate = createDate;
+	}
+	public String getOrderNo() {
+		return orderNo;
+	}
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+	public Integer getOrderStatus() {
+		return orderStatus;
+	}
+	public void setOrderStatus(Integer orderStatus) {
+		this.orderStatus = orderStatus;
+	}
+	public Integer getRefundStatus() {
+		return refundStatus;
+	}
+	public void setRefundStatus(Integer refundStatus) {
+		this.refundStatus = refundStatus;
+	}
+	public String getApplicationUrl() {
+		return applicationUrl;
+	}
+	public void setApplicationUrl(String applicationUrl) {
+		this.applicationUrl = applicationUrl;
+	}
+	public String getContractUrl() {
+		return contractUrl;
+	}
+	public void setContractUrl(String contractUrl) {
+		this.contractUrl = contractUrl;
+	}
+	public String getReason() {
+		return reason;
+	}
+	public void setReason(String reason) {
+		this.reason = reason;
+	}
+	public Integer getLiquidationStatus() {
+		return liquidationStatus;
+	}
+	public void setLiquidationStatus(Integer liquidationStatus) {
+		this.liquidationStatus = liquidationStatus;
+	}
+	
+	
+	
+	}

+ 9 - 0
src/main/java/com/goafanti/order/bo/TOrderNewBo.java

@@ -21,6 +21,7 @@ public class TOrderNewBo extends TOrderNew{
 	private String initiateName;
 	private String reason;
 	private String backDate;
+	private String backId;
 	private String uid;
 	private String email;
 	
@@ -169,5 +170,13 @@ public class TOrderNewBo extends TOrderNew{
 	public void setConsultantName(String consultantName) {
 		this.consultantName = consultantName;
 	}
+
+	public String getBackId() {
+		return backId;
+	}
+
+	public void setBackId(String backId) {
+		this.backId = backId;
+	}
 	
 }

+ 7 - 0
src/main/java/com/goafanti/order/bo/TOrderTaskListBo.java

@@ -11,6 +11,7 @@ public class TOrderTaskListBo {
 	private Integer taskStatus;
 	private String taskDate;
 	private Integer commodityQuantity;
+	private String hours;
 	public String getId() {
 		return id;
 	}
@@ -71,5 +72,11 @@ public class TOrderTaskListBo {
 	public void setUserName(String userName) {
 		this.userName = userName;
 	}
+	public String getHours() {
+		return hours;
+	}
+	public void setHours(String hours) {
+		this.hours = hours;
+	}
 	
 }

+ 104 - 0
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -2,12 +2,17 @@ package com.goafanti.order.controller;
 
 
 
+import java.io.IOException;
+import java.io.OutputStream;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.util.Date;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -154,6 +159,10 @@ public class AdminNewOrderApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "合同图片"));
 			return res;
 		}
+		if(null==isSubmit){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "提条状态"));
+			return res;
+		}
 		if (isSubmit==1&&orderNewService.checkORderTask(t.getOrderNo())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "主项目"));
 			return res;
@@ -307,6 +316,40 @@ public class AdminNewOrderApiController extends CertifyApiController {
 			return res;
 	}
 	/**
+	 * 退单详情
+	 */
+	@RequestMapping(value="/orderRefundDetail", method = RequestMethod.GET)
+	public Result OrderRefund(String id){
+			Result res=new Result();
+			if (StringUtils.isBlank(id)) {
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "退单编号","退单编号"));
+				return res;
+			}
+			res.data(orderNewService.orderRefundDetail(id));
+			return res;
+	}
+	/**
+	 * 订单退单
+	 */
+	@RequestMapping(value="/updateOrderRefund", method = RequestMethod.POST)
+	public Result updateOrderRefund(TOrderRefundWithBLOBs t){
+			Result res=new Result();
+			if (null==t.getId()) {
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "退单编号","退单编号"));
+				return res;
+			}
+			if(StringUtils.isBlank(t.getContractUrl())||StringUtils.isBlank(t.getApplicationUrl())){
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "合同与申请表","合同与申请表"));
+				return res;
+			}
+			if (StringUtils.isBlank(t.getReason())) {
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "退单原因","退单原因"));
+				return res;
+			}
+			res.data(orderNewService.updateOrderRefund(t));
+			return res;
+	}
+	/**
 	 * 审批特批订单
 	 * @param orderNo
 	 * @return
@@ -338,6 +381,38 @@ public class AdminNewOrderApiController extends CertifyApiController {
 		return res;
 	}
 	
+	/**
+	 * 订单结单
+	 */
+	@RequestMapping(value="/OrderOver", method = RequestMethod.GET)
+	public Result updateOrderOver(String orderNo){
+		Result res=new Result();
+		if (StringUtils.isBlank(orderNo)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "订单编号","订单编号"));
+			return res;
+		}
+		int i=orderNewService.updateOrderOver(orderNo);
+		if (i==-1) {
+			res.getError().add(buildError("不符合结单条件","不符合结单条件"));
+			return res;
+		}
+		res.setData(i);
+		return res;
+	}
+	/**
+	 * 咨询师驳回
+	 */
+	@RequestMapping(value = "/technicianBackOrder", method = RequestMethod.POST)
+	public Result technicianBackOrder(String orderNo){
+		Result res = new Result();
+		int i=orderNewService.technicianBackOrder(orderNo);
+		if (i==-1) {
+			res.getError().add(buildError("不符合驳回条件","不符合驳回条件"));
+			return res;
+		}
+		return res;
+	}
+	
 	/** 退单文件上传 **/
 	@RequestMapping(value = "/uploadRefundOrderFile", method = RequestMethod.POST)
 	public Result uploadRefundOrderFile(HttpServletRequest req,String sign){
@@ -346,4 +421,33 @@ public class AdminNewOrderApiController extends CertifyApiController {
 		res.setData(handleFile(res, "/order_refund_file/", false, req, sign));
 		return res;
 	}
+	/**
+	 * 催款列表下载
+	 * @throws IOException 
+	 */
+	@RequestMapping(value = "/exportOrderDunData", method = RequestMethod.GET)
+	public Result exportOrderDunData(String name,String orderNo,String starTime,String endTime,HttpServletResponse response) throws IOException{
+		 Result res = new Result();
+		 HSSFWorkbook wb = orderNewService.exportOrderDunData( name, orderNo, starTime, endTime);
+		 if(null == wb){
+			 res.getError().add(buildError("", "没有找到数据"));
+			 return res;
+		 }
+		 String fileName = "催款信息表  " + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + ".xls";
+		 OutputStream out = response.getOutputStream();
+		 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;
+	}
+	
 }

+ 86 - 0
src/main/java/com/goafanti/order/controller/OrderProjectApiController.java

@@ -1,6 +1,16 @@
 package com.goafanti.order.controller;
 
 
+import java.io.IOException;
+import java.io.OutputStream;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -9,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.model.TTaskHours;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.order.bo.TOrderTaskDetailBo;
 import com.goafanti.order.service.OrderProjectService;
@@ -62,4 +73,79 @@ public class OrderProjectApiController extends CertifyApiController {
 		res.setData(orderProjectService.updateOrderTask(t));
 		return res;
 	}
+	/**
+	 * 添加工时
+	 */
+	@RequestMapping(value="/addTaskHours" ,method = RequestMethod.POST)
+	public Result addTaskHours(TTaskHours t,String taskDate){
+		Result res=new Result();
+		if (t.getHours()==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "任务时间"));
+			return res;
+		}
+		if (StringUtils.isBlank(taskDate)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "工作日期"));
+			return res;
+		}
+		if (StringUtils.isBlank(t.getRemarks())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "工作内容"));
+			return res;
+		}
+		if (StringUtils.isNotBlank(taskDate)) {
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+			try {
+				t.setTaskDay(sdf.parse(taskDate));
+			} catch (ParseException e) {
+				e.printStackTrace();
+			}
+		}
+		res.setData(orderProjectService.addTaskHours(t));
+		return res;
+	}
+	/**
+	 * 任务工时列表
+	 */
+	@RequestMapping(value="/taskHoursList" ,method = RequestMethod.GET)
+	public Result taskHoursList(String name, String taskId ,String starTime,String endTime ,
+			Integer pageNo, Integer pageSize){
+		Result res=new Result();
+		res.setData(orderProjectService.taskHoursList(name,taskId,  starTime, endTime ,pageNo, pageSize));
+		return res;
+	}
+	/** 任务文件上传 **/
+	@RequestMapping(value = "/uploadOrderTaskFile", method = RequestMethod.POST)
+	public Result uploadOrderTaskFile(HttpServletRequest req,String sign){
+		Result res = new Result();
+		//order_refund_file
+		res.setData(handleFile(res, "/order_task_file/", false, req, sign));
+		return res;
+	}
+	/**
+	 * 任务工时表
+	 * @throws IOException 
+	 */
+	@RequestMapping(value = "/exportTaskHoursListData", method = RequestMethod.GET)
+	public Result exportTaskHoursListData(String name, String taskId ,String starTime,String endTime ,HttpServletResponse response) throws IOException{
+		 Result res = new Result();
+		 HSSFWorkbook wb = orderProjectService.exportTaskHoursListData( name, taskId, starTime, endTime);
+		 if(null == wb){
+			 res.getError().add(buildError("", "没有找到数据"));
+			 return res;
+		 }
+		 String fileName = "任务工时表  " + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + ".xls";
+		 OutputStream out = response.getOutputStream();
+		 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;
+	}
 }

+ 1 - 3
src/main/java/com/goafanti/order/enums/LiquidationNewState.java

@@ -34,7 +34,6 @@ public enum LiquidationNewState {
 		}
 		return INVALID;
 	}
-	
 	public static String getValueByCode(Integer code){
         for(LiquidationNewState liquidationNewState:LiquidationNewState.values()){
             if(code.equals(liquidationNewState.getCode())){
@@ -42,8 +41,7 @@ public enum LiquidationNewState {
             }
         }
         return  null;
-    }
-	
+    }	
 	public static boolean containsType(Integer code) {
 		return status.containsKey(code);
 	}

+ 14 - 5
src/main/java/com/goafanti/order/enums/ProjectNewStage.java

@@ -9,15 +9,25 @@ import java.util.Map;
  *
  */
 public enum ProjectNewStage {
+	/** 项目待提交 **/
 	DTJ(0,"项目待提交"),
+	/** 项目已提交 **/
 	YTJ(1,"项目已提交"),
+	/** 项目评审 **/
 	PS(2,"项目评审"),
-	DGS(3,"项目待公示"),
+	/** 项目立项 **/
+	LS(3,"项目立项"),
+	/** 项目公示 **/
 	GS(4,"项目公示"),
+	/** 项目抽查 **/
 	CC(5,"项目抽查"),
+	/** 项目备案 **/
 	BA(6,"项目备案"),
+	/** 项目下证 **/
 	XZ(7,"项目下证"),
+	/** 项目验收 **/
 	YS(8,"项目验收"),
+	/** 项目拨款 **/
 	BK(9,"项目拨款"),
 	/** 无效 **/
 	INVALID(10, "INVALID");
@@ -40,9 +50,6 @@ public enum ProjectNewStage {
 		}
 		return INVALID;
 	}
-	public static boolean containsType(Integer code) {
-		return status.containsKey(code);
-	}
 	
 	public static String getValueByCode(Integer code){
         for(ProjectNewStage projectNewStage:ProjectNewStage.values()){
@@ -52,7 +59,9 @@ public enum ProjectNewStage {
         }
         return  null;
     }
-	
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
 	private Integer	code;
 	private String	desc;
 	public Integer getCode() {

+ 4 - 0
src/main/java/com/goafanti/order/enums/TaskState.java

@@ -4,9 +4,13 @@ import java.util.HashMap;
 import java.util.Map;
 
 public enum TaskState {
+	/** 未分派**/
 	 WFP(0,"未分派"),
+	 /** 已分派 **/
 	 YFP(1,"已分派"),
+	 /** 材料已启动 **/
 	 CLYQD(2,"材料已启动"),
+	 /** 材料已完成 **/
 	 CLYWC(2,"材料已完成"),
 	/** 无效 **/
 	INVALID(10, "无效");

+ 9 - 0
src/main/java/com/goafanti/order/service/OrderNewService.java

@@ -2,6 +2,8 @@ package com.goafanti.order.service;
 
 import java.util.List;
 
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+
 import com.goafanti.common.model.TDunLog;
 import com.goafanti.common.model.TOrderDun;
 import com.goafanti.common.model.TOrderNew;
@@ -11,6 +13,8 @@ import com.goafanti.common.model.TOrderTask;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.BackOrderListBo;
 import com.goafanti.order.bo.BillListBo;
+import com.goafanti.order.bo.OrderRefundBo;
+import com.goafanti.order.bo.OrderRefundDetailBo;
 import com.goafanti.order.bo.TDunLogListBo;
 import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.order.bo.TOrderRefundBo;
@@ -149,6 +153,11 @@ public interface OrderNewService {
 	int deleteOrderNew(String orderNo);
 	boolean checkOderSettlementAmount(String orderNo);
 	boolean checkORderTask(String orderNo);
+	HSSFWorkbook exportOrderDunData(String name, String orderNo, String starTime, String endTime);
+	int updateOrderOver(String orderNo);
+	OrderRefundDetailBo orderRefundDetail(String id);
+	int updateOrderRefund(TOrderRefundWithBLOBs t);
+	int technicianBackOrder(String orderNo);
 	
 
 	

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

@@ -1,7 +1,9 @@
 package com.goafanti.order.service;
 
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+
+import com.goafanti.common.model.TTaskHours;
 import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.order.bo.TOrderTaskBo;
 import com.goafanti.order.bo.TOrderTaskDetailBo;
 import com.goafanti.order.bo.TOrderTaskListBo;
 
@@ -15,5 +17,12 @@ public interface OrderProjectService {
 	TOrderTaskDetailBo orderTaskDetail(String id);
 
 	int updateOrderTask(TOrderTaskDetailBo t);
+
+	int addTaskHours(TTaskHours t);
+	
+	Pagination<TOrderTaskListBo> taskHoursList(String name, String taskId,String starTime,String endTime ,
+			Integer pageNo, Integer pageSize);
+
+	HSSFWorkbook exportTaskHoursListData(String name, String taskId, String starTime, String endTime);
 	
 }

+ 69 - 0
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -11,6 +11,7 @@ import java.util.Map;
 import java.util.UUID;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -34,11 +35,14 @@ import com.goafanti.common.model.TOrderDun;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderRefundWithBLOBs;
 import com.goafanti.common.model.TOrderTask;
+import com.goafanti.common.utils.ExportExcelUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.JDBCIdGenerator;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.customer.bo.LockingReleaseBo;
+import com.goafanti.order.bo.OrderRefundBo;
+import com.goafanti.order.bo.OrderRefundDetailBo;
 import com.goafanti.order.bo.TDunLogListBo;
 import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.order.bo.TOrderRefundBo;
@@ -75,6 +79,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	private UserLockReleaseMapper	userLockReleaseMapper;
 	@Value(value = "${mobileRemindCodeTemplate}")
 	private String					mobileRemindCodeTemplate	= null;
+	@Value(value = "${upload.path}")
+	private String 					uploadPath 			= null;
 	
 	@Value(value = "${accessKey}")
 	private String					accessKey			= null;
@@ -460,6 +466,69 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 		return true;
 	}
+
+
+	/**
+	 * 获取催款数据
+	 */
+	@SuppressWarnings("null")
+	@Override
+	public HSSFWorkbook exportOrderDunData(String name, String orderNo, String starTime, String endTime) {
+		if(endTime!=null) endTime=endTime+" 23:59:59";
+		List<TOrderNewBo> list=tOrderDunMapper.getOrderDunData(name,orderNo,starTime,endTime);
+		if (list==null && list.size()==0) {
+			return null;
+		}
+		String[] comment = {"订单编号","签单时间","客户名称","订单状态","签单金额","项目状态","结算状态","已收款","订单负责人","催收科目","催款启动日期"};
+		String filePath = uploadPath + "/OrderDun";
+		HSSFWorkbook wb = ExportExcelUtil.exportOrderDunData(list, comment, filePath);
+		return wb;
+	}
+
+
+
+	@Override
+	public int updateOrderOver(String orderNo) {
+		TOrderNew t=tOrderNewMapper.selectByPrimaryKey(orderNo);
+		if (t.getLiquidationStatus()!=LiquidationNewState.ALREADY_PAY.getCode()||
+				t.getProcessStatus()!=ProcessStatus.YQBFPZXSGLY.getCode()) {
+			return -1;
+		}
+		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(orderNo);
+		for (TOrderTaskBo task : list) {
+			if (task.getTaskStatus()!=TaskState.CLYWC.getCode()) {
+				return -1;
+			}
+		}
+		t.setOrderStatus(OrderNewState.YJX.getCode());
+		t.setSettlementTime(new Date());
+		return tOrderNewMapper.updateByPrimaryKeySelective(t);
+	}
+	
+	@Override
+	public OrderRefundDetailBo orderRefundDetail(String id) {
+		return tOrderNewMapper.orderRefundDetail(id);
+	}
+
+
+
+	@Override
+	public int updateOrderRefund(TOrderRefundWithBLOBs t) {
+		return tOrderRefundMapper.updateByPrimaryKeySelective(t);
+	}
+
+
+
+	@Override
+	public int technicianBackOrder(String orderNo) {
+		TOrderNew t=tOrderNewMapper.selectByPrimaryKey(orderNo);
+		if (t.getSettlementAmount().compareTo(new BigDecimal(0))==0) {
+			return -1;
+		}
+		t.setOrderStatus(OrderNewState.YBH.getCode());
+		return tOrderNewMapper.updateByPrimaryKey(t);
+	}
+	
 	
 	
 	

+ 76 - 1
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -7,27 +7,37 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.UUID;
 
 import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.beanutils.ConvertUtils;
 import org.apache.commons.beanutils.converters.DateConverter;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
+import com.goafanti.common.dao.TOrderBonusMapper;
 import com.goafanti.common.dao.TOrderNewMapper;
 import com.goafanti.common.dao.TOrderTaskMapper;
+import com.goafanti.common.dao.TTaskHoursMapper;
+import com.goafanti.common.model.TOrderBonus;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderTask;
+import com.goafanti.common.model.TTaskHours;
+import com.goafanti.common.utils.ExportExcelUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.TOrderNewBo;
-import com.goafanti.order.bo.TOrderRefundBo;
 import com.goafanti.order.bo.TOrderTaskBo;
 import com.goafanti.order.bo.TOrderTaskDetailBo;
 import com.goafanti.order.bo.TOrderTaskListBo;
 import com.goafanti.order.enums.ProcessStatus;
+import com.goafanti.order.enums.ProjectNewStage;
+import com.goafanti.order.service.OrderBillService;
 import com.goafanti.order.service.OrderProjectService;
 import com.goafanti.techproject.enums.TaskState;
 @Service
@@ -36,6 +46,13 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	private TOrderTaskMapper tOrderTaskMapper;
 	@Autowired
 	private TOrderNewMapper	tOrderNewMapper;
+	@Autowired
+	private TTaskHoursMapper	tTaskHoursMapper;
+	@Autowired
+	private TOrderBonusMapper 	tOrderBonusMapper;
+	@Value(value = "${upload.path}")
+	private String 					uploadPath 			= null;
+	
 	
 	@Override
 	public int updateProjectDistribution(Integer taskId, String taskReceiverId,Integer specially) {
@@ -104,6 +121,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	}
 
 	@Override
+	@Transactional
 	public int updateOrderTask(TOrderTaskDetailBo t) {
 		TOrderTask task=new TOrderTask();
 		task.setAttachmentUrl(t.getAttachmentUrl());
@@ -122,6 +140,9 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		} catch (ParseException e) {
 			e.printStackTrace();
 		}
+		if (true) {
+		//处理奖金	
+		}
 		tOrderTaskMapper.updateByPrimaryKeySelective(task);
 		TOrderTask task2=tOrderTaskMapper.selectByPrimaryKey(task.getId());//查询出项目信息
 		if (task2.getSuperId()!=null) {//是否有父项目
@@ -137,11 +158,65 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	private void meanwhileUpdateOrder(TOrderTask task) {
 		if (task.getMain()==1) {//是否是主要项目
+			//更改订单项目状态
 			TOrderNew tNew=new TOrderNew();
 			tNew.setProjectStatus(task.getProjectStatus());
 			tNew.setOrderNo(task.getOrderNo());
 			tOrderNewMapper.updateByPrimaryKeySelective(tNew);
+			//新增奖金信息
+			TOrderBonus tb=new TOrderBonus();
+			tb.setId(UUID.randomUUID().toString());
+			tb.setOrderNo(task.getOrderNo());
+			if (task.getProjectStatus()==ProjectNewStage.YTJ.getCode())tb.setBonusSubject(21);//项目已提交
+			if (task.getProjectStatus()==ProjectNewStage.LS.getCode())tb.setBonusSubject(23);//项目立项
+			if (task.getProjectStatus()==ProjectNewStage.GS.getCode())tb.setBonusSubject(24);//项目公示
+			tb.setGrantTarget(task.getTaskReceiver());
+			tb.setGrantType(1);//技术员
+			tOrderBonusMapper.insertSelective(tb);
+		}
+	}
+
+	@Override
+	public int addTaskHours(TTaskHours t) {
+		t.setAid(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
+		t.setId(UUID.randomUUID().toString());
+		t.setCreateTime(new Date());
+		return tTaskHoursMapper.insertSelective(t);
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<TOrderTaskListBo> taskHoursList(String name, String taskId, String starTime,String endTime , Integer pageNo,
+			Integer pageSize) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		if(pageSize==null||pageSize<0)pageSize=10;
+		if(pageNo==null||pageNo<0)pageNo=1;
+		if (StringUtils.isNotBlank(name)) params.put("name", name);
+		if (StringUtils.isNotBlank(taskId)) params.put("taskId", taskId);
+		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
+		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
+		Pagination<TOrderTaskListBo> p = (Pagination<TOrderTaskListBo>)findPage("selectTaskHoursListByPage", "selectTaskHoursListCount", params, pageNo, pageSize);
+		List<TOrderTaskListBo> list=(List<TOrderTaskListBo>) p.getList();
+		for (TOrderTaskListBo t : list) {
+			if (t.getCommodityQuantity()!=null&&t.getCommodityQuantity()>1) {
+				t.setHours(tTaskHoursMapper.getTaskSuperHours(t.getId()));
+			}
+		}
+		return p;
+	}
+
+	@SuppressWarnings("null")
+	@Override
+	public HSSFWorkbook exportTaskHoursListData(String name, String taskId, String starTime, String endTime) {
+		if(endTime!=null) endTime=endTime+" 23:59:59";
+		List<TOrderTaskListBo> list=tTaskHoursMapper.getTaskHoursData(name,taskId,starTime,endTime);
+		if (list==null && list.size()==0) {
+			return null;
 		}
+		String[] comment = {"任务编号","任务名称","订单编号","业务别类","客户名称","任务负责人","任务状态","工时"};
+		String filePath = uploadPath + "/TaskHours";
+		HSSFWorkbook wb = ExportExcelUtil.exportTaskHoursListData(list, comment, filePath);
+		return wb;
 	}
 	
 	

+ 10 - 0
src/main/java/com/goafanti/techproject/enums/TaskState.java

@@ -3,6 +3,8 @@ package com.goafanti.techproject.enums;
 import java.util.HashMap;
 import java.util.Map;
 
+import com.goafanti.order.enums.LiquidationNewState;
+
 public enum TaskState {
 	/** 未分配 **/
 	UN_DISTRIBUTION(0,"未分配"),
@@ -32,6 +34,14 @@ public enum TaskState {
 		}
 		return INVALID;
 	}
+	public static String getValueByCode(Integer code){
+        for(TaskState taskState:TaskState.values()){
+            if(code.equals(taskState.getCode())){
+                return taskState.getDesc();
+            }
+        }
+        return  null;
+    }
 	public static boolean containsType(Integer code) {
 		return status.containsKey(code);
 	}