Selaa lähdekoodia

Merge branch 'test' of jishutao/kede-server into prod

anderx 4 vuotta sitten
vanhempi
commit
3d27fc5c63
22 muutettua tiedostoa jossa 728 lisäystä ja 41 poistoa
  1. 1 1
      GeneratorConfig.xml
  2. 90 0
      src/main/java/com/goafanti/admin/controller/AdminDepartmentApiController.java
  3. 19 0
      src/main/java/com/goafanti/admin/service/DepartmentService.java
  4. 60 0
      src/main/java/com/goafanti/admin/service/impl/DepartmentServiceImpl.java
  5. 13 0
      src/main/java/com/goafanti/common/controller/PublicController.java
  6. 54 0
      src/main/java/com/goafanti/common/dao/WorkingHoursMapper.java
  7. 10 10
      src/main/java/com/goafanti/common/mapper/OrganizationManagementMapper.xml
  8. 2 1
      src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml
  9. 191 0
      src/main/java/com/goafanti/common/mapper/WorkingHoursMapper.xml
  10. 10 0
      src/main/java/com/goafanti/common/model/OrganizationManagement.java
  11. 220 0
      src/main/java/com/goafanti/common/model/WorkingHours.java
  12. 3 0
      src/main/java/com/goafanti/common/utils/SendEmailUtil.java
  13. 6 2
      src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java
  14. 0 2
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  15. 0 4
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  16. 14 0
      src/main/java/com/goafanti/organization/bo/OrganizationListOut.java
  17. 9 8
      src/main/java/com/goafanti/organization/controller/AdminOrganizationController.java
  18. 2 2
      src/main/java/com/goafanti/organization/service/OrganizationService.java
  19. 4 2
      src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java
  20. 10 0
      src/main/java/com/goafanti/weChat/bo/OutPublicDtails.java
  21. 8 8
      src/main/resources/props/config_local.properties
  22. 2 1
      src/main/resources/props/config_test.properties

+ 1 - 1
GeneratorConfig.xml

@@ -43,7 +43,7 @@
     <property name="enableSubPackages" value="false"/>
      <property name="nullCatalogMeansCurrent" value="true"/>
     </javaClientGenerator>
-    <table schema="aft" tableName="user_names"
+    <table schema="aft" tableName="working_hours"
 	enableCountByExample="false" enableUpdateByExample="false"
 	enableDeleteByExample="false" enableSelectByExample="false"
 	selectByExampleQueryId="false" enableSelectByPrimaryKey="true"

+ 90 - 0
src/main/java/com/goafanti/admin/controller/AdminDepartmentApiController.java

@@ -0,0 +1,90 @@
+package com.goafanti.admin.controller;
+
+
+
+import javax.annotation.Resource;
+
+
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import com.goafanti.admin.service.DepartmentService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.model.WorkingHours;
+import com.goafanti.common.utils.StringUtils;
+
+@Controller
+@RequestMapping(value = "/api/admin/department")
+public class AdminDepartmentApiController extends CertifyApiController {
+	
+	@Resource
+	private DepartmentService 	departmentService;
+	
+	/**
+	 * 新增工作时间
+	 */
+	@RequestMapping(value = "/workingHours/add", method = RequestMethod.POST)
+	public Result add(WorkingHours in) {
+		Result res = new Result();
+		if (in.getType()==null||StringUtils.isBlank(in.getName())||
+				StringUtils.isBlank(in.getStart())||StringUtils.isBlank(in.getRestStart())||
+				StringUtils.isBlank(in.getEnd())||StringUtils.isBlank(in.getRestEnd())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
+			return res;
+		}
+		if (departmentService.checkWorkingHoursType(in.getType())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "", "分类"));
+			return res;
+		}
+		res.setData(departmentService.addWorkingHours(in));
+		return res;
+	}
+	
+	/**
+	 * 删除工作时间
+	 */
+	@RequestMapping(value = "/workingHours/delete", method = RequestMethod.POST)
+	public Result delete(Integer id) {
+		Result res = new Result();
+		if (id==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
+			return res;
+		}
+		if (departmentService.checkDepWorkingHouresType(id)) {
+			res.getError().add(buildError( "已分配无法删除!。", "已分配无法删除!"));
+			return res;
+		}
+		res.setData(departmentService.deleteWorkingHours(id));
+		return res;
+	}
+	
+	/**
+	 * 工作时间列表
+	 */
+	@RequestMapping(value = "/workingHours/list", method = RequestMethod.GET)
+	public Result list() {
+		Result res = new Result();
+		res.setData(departmentService.selectWorkingHours());
+		return res;
+	}
+	
+	/**
+	 * 工作时间列表
+	 */
+	@RequestMapping(value = "/workingHours/get", method = RequestMethod.GET)
+	public Result get(String depId) {
+		Result res = new Result();
+		if (depId==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
+			return res;
+		}
+		res.setData(departmentService.getWorkingHours(depId));
+		return res;
+	}
+
+	
+}

+ 19 - 0
src/main/java/com/goafanti/admin/service/DepartmentService.java

@@ -0,0 +1,19 @@
+package com.goafanti.admin.service;
+
+import com.goafanti.common.model.WorkingHours;
+
+public interface DepartmentService {
+
+	int addWorkingHours(WorkingHours in);
+
+	int deleteWorkingHours(Integer id);
+
+	Object selectWorkingHours();
+
+	Object getWorkingHours(String depId);
+
+	boolean checkWorkingHoursType(Integer type);
+
+	boolean checkDepWorkingHouresType(Integer id);
+
+}

+ 60 - 0
src/main/java/com/goafanti/admin/service/impl/DepartmentServiceImpl.java

@@ -0,0 +1,60 @@
+package com.goafanti.admin.service.impl;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.admin.service.DepartmentService;
+import com.goafanti.common.dao.WorkingHoursMapper;
+import com.goafanti.common.model.WorkingHours;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+
+@Service
+public class DepartmentServiceImpl extends BaseMybatisDao<WorkingHoursMapper> implements DepartmentService {
+
+	@Autowired
+	private WorkingHoursMapper	workingHoursMapper;
+	
+	@Override
+	public int addWorkingHours(WorkingHours in) {
+		return workingHoursMapper.insertSelective(in);
+	}
+
+	@Override
+	public int deleteWorkingHours(Integer id) {
+		return workingHoursMapper.deleteByPrimaryKey(id);
+	}
+
+	@Override
+	public List<WorkingHours> selectWorkingHours() {
+		return workingHoursMapper.selectList();
+	}
+
+	@Override
+	public WorkingHours getWorkingHours(String depId) {
+		return workingHoursMapper.selectBydepId(depId);
+	}
+
+	@Override
+	public boolean checkWorkingHoursType(Integer type) {
+		int i=workingHoursMapper.getTypeCount(type);
+		if(i>0) {
+			return true;
+		}
+		return false;
+	}
+
+	@Override
+	public boolean checkDepWorkingHouresType(Integer id) {
+		int i=workingHoursMapper.getDepTypeCount(id);
+		if(i>0) {
+			return true;
+		}
+		return false;
+	}
+	
+	
+	
+
+}

+ 13 - 0
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -9,12 +9,14 @@ import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -80,6 +82,8 @@ public class PublicController extends CertifyApiController {
 	
 	@Value(value = "${mobileRemindCodeTemplate}")
 	private String					mobileRemindCodeTemplate	= null;
+	@Value(value = "${wx.clockInRange}")
+	private String clockInRange;
 
 	@Resource
 	private UserService				userService;
@@ -723,6 +727,15 @@ public class PublicController extends CertifyApiController {
               }
           }    
            
+          @RequestMapping("/getWxConfig")
+          public Result getWxConfig() {
+        	  Result res =new Result();
+        	  Map<String, Object> config=new HashedMap<String, Object>();
+        	  config.put("clockInRange", clockInRange);
+        	  res.data(config);
+			return res;
+          }
+          
 
 	
 }

+ 54 - 0
src/main/java/com/goafanti/common/dao/WorkingHoursMapper.java

@@ -0,0 +1,54 @@
+package com.goafanti.common.dao;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.goafanti.common.model.WorkingHours;
+
+public interface WorkingHoursMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table working_hours
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table working_hours
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	int insert(WorkingHours record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table working_hours
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	int insertSelective(WorkingHours record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table working_hours
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	WorkingHours selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table working_hours
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	int updateByPrimaryKeySelective(WorkingHours record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table working_hours
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	int updateByPrimaryKey(WorkingHours record);
+
+	List<WorkingHours> selectList();
+
+	WorkingHours selectBydepId(@Param("depId")String depId);
+
+	int getTypeCount(Integer type);
+
+	int getDepTypeCount(Integer id);
+}

+ 10 - 10
src/main/java/com/goafanti/common/mapper/OrganizationManagementMapper.xml

@@ -157,12 +157,12 @@
     -->
     insert into department (id, create_id, create_time, 
       update_time, deleted_sign, name, 
-      type, manager_id, dep_no, 
+      type, manager_id, dep_no, working_hours_type,
       super_id, remarks, status
       )
     values (#{id,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
       #{updateTime,jdbcType=TIMESTAMP}, #{deletedSign,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
-      #{type,jdbcType=VARCHAR}, #{managerId,jdbcType=VARCHAR}, #{depNo,jdbcType=VARCHAR}, 
+      #{type,jdbcType=VARCHAR}, #{managerId,jdbcType=VARCHAR}, #{depNo,jdbcType=VARCHAR}, #{workingHoursType,jdbcType=INTEGER},
       #{superId,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}
       )
   </insert>
@@ -383,6 +383,9 @@
       <if test="province != null">
         province = #{province},
       </if>
+      <if test="workingHoursType !=null">
+      	working_hours_type= #{workingHoursType},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -415,14 +418,13 @@
 			om.remarks,
 			om.status,
 			dm.name as superName,
+			wh.name as workingHoursName,
 			x.name as managerName
 		from department om 
 		left join department dm on om.super_id = dm.id
 		left join admin x on om.manager_id = x.id
-		where
-			om.deleted_sign = '0'
-			and
-			om.name != '平台超管中心'
+		left join working_hours wh  on om.working_hours_type =wh.`type` 
+		where 	om.deleted_sign = 0
 		<if test="name !=null">
 			AND om.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
 		</if>
@@ -445,10 +447,7 @@
 		from department om 
 		left join department dm on om.super_id = dm.id
 		left join admin x on om.manager_id = x.id
-		where
-			om.deleted_sign = '0'
-			and
-			om.name != '平台超管中心'
+		where om.deleted_sign = 0
 		<if test="name !=null">
 			AND om.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
 		</if>
@@ -533,6 +532,7 @@
 		a.finance_id financeId,
 		a.province,
 		c.name financeName,
+		a.working_hours_type workingHoursType,
 		b.name as managerName
 	from department a 
 	left join admin b on a.manager_id = b.id

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

@@ -599,7 +599,8 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
   </select>
   
   <select id="listPublicDtails" resultType="com.goafanti.weChat.bo.OutPublicDtails">
-  select b.nickname ,a.user_name userName,c.name aname,a.duration ,a.status,a.annex_url annexUrl,a.photo_url photoUrl,
+  	select b.nickname ,a.user_name userName,c.name aname,a.duration ,a.status,a.annex_url annexUrl,a.photo_url photoUrl,
+		date_format(a.clock_in_time ,'%Y-%m-%d %H:%i:%S') clockInTimes,
 	date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds
 	from public_release a left join `user` b on a.uid=b.id left join admin c on a.aid =c.id
 	where 1=1

+ 191 - 0
src/main/java/com/goafanti/common/mapper/WorkingHoursMapper.xml

@@ -0,0 +1,191 @@
+<?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.WorkingHoursMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.WorkingHours">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Jul 09 11:31:02 CST 2021.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="start" jdbcType="VARCHAR" property="start" />
+    <result column="rest_start" jdbcType="VARCHAR" property="restStart" />
+    <result column="rest_end" jdbcType="VARCHAR" property="restEnd" />
+    <result column="end" jdbcType="VARCHAR" property="end" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Jul 09 11:31:02 CST 2021.
+    -->
+    id, `name`, `type`, `start`, rest_start, rest_end, `end`, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Jul 09 11:31:02 CST 2021.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from working_hours
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Jul 09 11:31:02 CST 2021.
+    -->
+    delete from working_hours
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.WorkingHours">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Jul 09 11:31:02 CST 2021.
+    -->
+    insert into working_hours (id, `name`, `type`, 
+      `start`, rest_start, rest_end, 
+      `end`, create_time)
+    values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
+      #{start,jdbcType=VARCHAR}, #{restStart,jdbcType=VARCHAR}, #{restEnd,jdbcType=VARCHAR}, 
+      #{end,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.WorkingHours">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Jul 09 11:31:02 CST 2021.
+    -->
+    insert into working_hours
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="name != null">
+        `name`,
+      </if>
+      <if test="type != null">
+        `type`,
+      </if>
+      <if test="start != null">
+        `start`,
+      </if>
+      <if test="restStart != null">
+        rest_start,
+      </if>
+      <if test="restEnd != null">
+        rest_end,
+      </if>
+      <if test="end != null">
+        `end`,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="start != null">
+        #{start,jdbcType=VARCHAR},
+      </if>
+      <if test="restStart != null">
+        #{restStart,jdbcType=VARCHAR},
+      </if>
+      <if test="restEnd != null">
+        #{restEnd,jdbcType=VARCHAR},
+      </if>
+      <if test="end != null">
+        #{end,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.WorkingHours">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Jul 09 11:31:02 CST 2021.
+    -->
+    update working_hours
+    <set>
+      <if test="name != null">
+        `name` = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        `type` = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="start != null">
+        `start` = #{start,jdbcType=VARCHAR},
+      </if>
+      <if test="restStart != null">
+        rest_start = #{restStart,jdbcType=VARCHAR},
+      </if>
+      <if test="restEnd != null">
+        rest_end = #{restEnd,jdbcType=VARCHAR},
+      </if>
+      <if test="end != null">
+        `end` = #{end,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.WorkingHours">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Jul 09 11:31:02 CST 2021.
+    -->
+    update working_hours
+    set `name` = #{name,jdbcType=VARCHAR},
+      `type` = #{type,jdbcType=INTEGER},
+      `start` = #{start,jdbcType=VARCHAR},
+      rest_start = #{restStart,jdbcType=VARCHAR},
+      rest_end = #{restEnd,jdbcType=VARCHAR},
+      `end` = #{end,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  
+    <select id="selectList" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from working_hours
+  </select>
+  
+  <select id="selectBydepId"  resultType="com.goafanti.common.model.WorkingHours">
+    select 
+    a.id,a.name,a.`type`, a.`start`, a.rest_start restStart, a.rest_end restEnd, a.`end`, a.create_time createTime
+    from department d  left join working_hours a on d.working_hours_type =a.type
+    where d.id = #{depId}
+  </select>
+  <select id="getTypeCount" resultType="java.lang.Integer">
+  select count(*) from working_hours where type= #{type}
+  </select>
+  
+  <select id="getDepTypeCount" resultType="java.lang.Integer">
+  select 
+    count(*)
+    from department d  left join working_hours a on d.working_hours_type =a.type
+    where a.id= #{id}
+  </select>
+</mapper>

+ 10 - 0
src/main/java/com/goafanti/common/model/OrganizationManagement.java

@@ -79,6 +79,8 @@ public class OrganizationManagement {
 	 * 	省份
 	 */
 	private Integer province;
+	
+	private Integer workingHoursType;
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_management.id
 	 * @return  the value of organization_management.id
@@ -319,4 +321,12 @@ public class OrganizationManagement {
 	public void setProvince(Integer province) {
 		this.province = province;
 	}
+
+	public Integer getWorkingHoursType() {
+		return workingHoursType;
+	}
+
+	public void setWorkingHoursType(Integer workingHoursType) {
+		this.workingHoursType = workingHoursType;
+	}
 }

+ 220 - 0
src/main/java/com/goafanti/common/model/WorkingHours.java

@@ -0,0 +1,220 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class WorkingHours implements Serializable {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column working_hours.id
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column working_hours.name
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	private String name;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column working_hours.type
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	private Integer type;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column working_hours.start
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	private String start;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column working_hours.rest_start
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	private String restStart;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column working_hours.rest_end
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	private String restEnd;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column working_hours.end
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	private String end;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column working_hours.create_time
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table working_hours
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column working_hours.id
+	 * @return  the value of working_hours.id
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column working_hours.id
+	 * @param id  the value for working_hours.id
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column working_hours.name
+	 * @return  the value of working_hours.name
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column working_hours.name
+	 * @param name  the value for working_hours.name
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public void setName(String name) {
+		this.name = name == null ? null : name.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column working_hours.type
+	 * @return  the value of working_hours.type
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public Integer getType() {
+		return type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column working_hours.type
+	 * @param type  the value for working_hours.type
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public void setType(Integer type) {
+		this.type = type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column working_hours.start
+	 * @return  the value of working_hours.start
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public String getStart() {
+		return start;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column working_hours.start
+	 * @param start  the value for working_hours.start
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public void setStart(String start) {
+		this.start = start == null ? null : start.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column working_hours.rest_start
+	 * @return  the value of working_hours.rest_start
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public String getRestStart() {
+		return restStart;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column working_hours.rest_start
+	 * @param restStart  the value for working_hours.rest_start
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public void setRestStart(String restStart) {
+		this.restStart = restStart == null ? null : restStart.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column working_hours.rest_end
+	 * @return  the value of working_hours.rest_end
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public String getRestEnd() {
+		return restEnd;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column working_hours.rest_end
+	 * @param restEnd  the value for working_hours.rest_end
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public void setRestEnd(String restEnd) {
+		this.restEnd = restEnd == null ? null : restEnd.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column working_hours.end
+	 * @return  the value of working_hours.end
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public String getEnd() {
+		return end;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column working_hours.end
+	 * @param end  the value for working_hours.end
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public void setEnd(String end) {
+		this.end = end == null ? null : end.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column working_hours.create_time
+	 * @return  the value of working_hours.create_time
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column working_hours.create_time
+	 * @param createTime  the value for working_hours.create_time
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table working_hours
+	 * @mbg.generated  Fri Jul 09 11:31:02 CST 2021
+	 */
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		sb.append(getClass().getSimpleName());
+		sb.append(" [");
+		sb.append("Hash = ").append(hashCode());
+		sb.append(", id=").append(id);
+		sb.append(", name=").append(name);
+		sb.append(", type=").append(type);
+		sb.append(", start=").append(start);
+		sb.append(", restStart=").append(restStart);
+		sb.append(", restEnd=").append(restEnd);
+		sb.append(", end=").append(end);
+		sb.append(", createTime=").append(createTime);
+		sb.append(", serialVersionUID=").append(serialVersionUID);
+		sb.append("]");
+		return sb.toString();
+	}
+}

+ 3 - 0
src/main/java/com/goafanti/common/utils/SendEmailUtil.java

@@ -134,6 +134,9 @@ public class SendEmailUtil {
 	}
 	
 	public static boolean isEmail(String email){
+		if (StringUtils.isEmpty(email)) {
+			return false;
+		}
     	//邮箱正则表达式
         String pattern = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
         Pattern p = Pattern.compile(pattern);

+ 6 - 2
src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java

@@ -190,7 +190,7 @@ public class NewExcelUtil<T> {
 				cell.setCellValue(sheetName);
 				CellRangeAddress region = new CellRangeAddress(0, 0, 0, fields.size()-1);
 				sheet.addMergedRegion(region);
-				cell.setCellStyle(styles.get("header"));
+				cell.setCellStyle(styles.get("total"));
 				Row row = sheet.createRow(1);
 				int column = 0;
 				// 写入各个字段的列头名称
@@ -341,7 +341,7 @@ public class NewExcelUtil<T> {
 		style.cloneStyleFrom(styles.get("data"));
 		style.setAlignment(HorizontalAlignment.CENTER);
 		style.setVerticalAlignment(VerticalAlignment.CENTER);
-		style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());
+		style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
 		style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
 		Font headerFont = wb.createFont();
 		headerFont.setFontName("Arial");
@@ -352,11 +352,15 @@ public class NewExcelUtil<T> {
 		styles.put("header", style);
 
 		style = wb.createCellStyle();
+		style.cloneStyleFrom(styles.get("data"));
 		style.setAlignment(HorizontalAlignment.CENTER);
 		style.setVerticalAlignment(VerticalAlignment.CENTER);
+		style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());
+		style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
 		Font totalFont = wb.createFont();
 		totalFont.setFontName("Arial");
 		totalFont.setFontHeightInPoints((short) 10);
+		totalFont.setColor(IndexedColors.WHITE.getIndex());
 		style.setFont(totalFont);
 		styles.put("total", style);
 

+ 0 - 2
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -2219,8 +2219,6 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		Map<String, Object> params = new HashMap<>();
 		params.put("name", name);
 		return  findPage("getUserByNameList", "getUserByNameCount", params, pageNo,pageSize);
-				
-				
 	}
 
 	@Override

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

@@ -1192,11 +1192,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			List<String> orderNos=new ArrayList<>(Arrays.asList(l));
 			tOrderNewMapper.updateFinance(aid,orderNos,newFinance);
 			return 1;
-		
 	}
-	
-
-
 
 	@Override
 	public List<TOrderLogBo> selectOrderLog(String orderNo) {

+ 14 - 0
src/main/java/com/goafanti/organization/bo/OrganizationListOut.java

@@ -39,6 +39,8 @@ public class OrganizationListOut {
 	
 	private String financeId;
 	private Integer province;
+	private Integer workingHoursType;
+	private String workingHoursName;
 	
 	public String getUid() {
 		return uid;
@@ -154,6 +156,18 @@ public class OrganizationListOut {
 	public void setProvince(Integer province) {
 		this.province = province;
 	}
+	public Integer getWorkingHoursType() {
+		return workingHoursType;
+	}
+	public void setWorkingHoursType(Integer workingHoursType) {
+		this.workingHoursType = workingHoursType;
+	}
+	public String getWorkingHoursName() {
+		return workingHoursName;
+	}
+	public void setWorkingHoursName(String workingHoursName) {
+		this.workingHoursName = workingHoursName;
+	}
 	
 	
 	

+ 9 - 8
src/main/java/com/goafanti/organization/controller/AdminOrganizationController.java

@@ -47,7 +47,7 @@ public class AdminOrganizationController extends BaseApiController{
 	}
 	/**部门组织管理新增**/
 	@RequestMapping(value = "/addOrganization" , method = RequestMethod.POST)
-	public Result addOrganization(String name, String managerId, String type, String superId, String remarks) throws Exception{
+	public Result addOrganization(String name, String managerId, String type, String superId, String remarks,Integer workingHoursType) throws Exception{
 		Result res = new Result();
 		if(StringUtils.isBlank(name) || StringUtils.isBlank(type) || StringUtils.isBlank(superId)){
 			res.getError().add(buildError("","组织名称、组织类型、上级组织不能为空"));
@@ -76,7 +76,7 @@ public class AdminOrganizationController extends BaseApiController{
 				}
 				sid=organizationManagementMapper.selectIdByDepNo(dep);				
 			}
-			organizationService.addOrganization(name, managerId, type, superId, remarks,dep);
+			organizationService.addOrganization(name, managerId, type, superId, remarks,dep,workingHoursType);
 		}
 		if(Count>=10){
 			String dep=sdepNo+Count;
@@ -86,7 +86,7 @@ public class AdminOrganizationController extends BaseApiController{
 				dep=sdepNo+Count;
 				sid=organizationManagementMapper.selectIdByDepNo(dep);				
 			}
-			organizationService.addOrganization(name, managerId, type, superId, remarks,dep);
+			organizationService.addOrganization(name, managerId, type, superId, remarks,dep,workingHoursType);
 		}
 		
 		return res;
@@ -100,14 +100,15 @@ public class AdminOrganizationController extends BaseApiController{
 	}
 	/**编辑页面数据读取**/
 	@RequestMapping(value = "/selectAllById" , method = RequestMethod.POST)
-	public OrganizationListOut selectAllById(String id){
-		OrganizationListOut res = organizationService.selectAllById(id);
+	public Result selectAllById(String id){
+		Result res = new Result();
+		res.data(organizationService.selectAllById(id)) ;
 		return res;
 	}
 	/**修改信息**/
 	@RequestMapping(value = "/updateOrganization" , method = RequestMethod.POST)
 	public Result updateOrganization(String name, String type, String managerId, String superId, String status,Integer province,
-			String remarks,String id,String abbreviation,String financeId){
+			String remarks,String id,String abbreviation,String financeId,Integer workingHoursType){
 		Result res = new Result();
 		if(StringUtils.isBlank(name) || StringUtils.isBlank(type)
 				|| StringUtils.isBlank(managerId)|| StringUtils.isBlank(superId)
@@ -134,7 +135,7 @@ public class AdminOrganizationController extends BaseApiController{
 				}
 				sid=organizationManagementMapper.selectIdByDepNo(dep);				
 			}
-			i=organizationService.updateOrganization(name, type, managerId, superId, status, province,remarks,id,dep,abbreviation,financeId);
+			i=organizationService.updateOrganization(name, type, managerId, superId, status, province,remarks,id,dep,abbreviation,financeId,workingHoursType);
 		}
 		if(Count>=10){
 			String dep=sdepNo+Count;
@@ -144,7 +145,7 @@ public class AdminOrganizationController extends BaseApiController{
 				dep=sdepNo+Count;
 				sid=organizationManagementMapper.selectIdByDepNo(dep);				
 			}
-			i=organizationService.updateOrganization(name, type, managerId, superId, status, province,remarks,id,dep,abbreviation,financeId);
+			i=organizationService.updateOrganization(name, type, managerId, superId, status, province,remarks,id,dep,abbreviation,financeId,workingHoursType);
 		}
 		
 		return res.data(i);

+ 2 - 2
src/main/java/com/goafanti/organization/service/OrganizationService.java

@@ -27,7 +27,7 @@ public interface OrganizationService {
 	 * @param desc 组织职能说明
 	 * @return
 	 */
-	int addOrganization(String name,String managerId,String type,String superId,String desc,String dep);
+	int addOrganization(String name,String managerId,String type,String superId,String desc,String dep,Integer workingHoursType);
 	/**
 	 * 模糊查询负责人名称
 	 * @param name
@@ -40,6 +40,6 @@ public interface OrganizationService {
 	int deleteById(String id);
 	
 	int updateOrganization(String name,String type,String managerId,String superId,String status,Integer province,
-			String remarks,String id,String depn,String abbreviation,String financeId);
+			String remarks,String id,String depn,String abbreviation,String financeId,Integer workingHoursType);
 	
 }

+ 4 - 2
src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java

@@ -61,7 +61,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
 	 *
 	 */
 	@Override
-	public int addOrganization( String name, String managerId, String type, String superId, String remarks,String dep) {
+	public int addOrganization( String name, String managerId, String type, String superId, String remarks,String dep,Integer workingHoursType) {
 		String id = UUID.randomUUID().toString();
 		Date now = new Date();
 		OrganizationManagement om=new OrganizationManagement(); 
@@ -79,6 +79,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
 		om.setSuperId(superId);
 		om.setRemarks(remarks);
 		om.setStatus("0");
+		om.setWorkingHoursType(workingHoursType);
 		organizationManagementMapper.insert(om);
 		return 1;
 	}
@@ -100,7 +101,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
 	}
 	@Override
 	public int updateOrganization(String name, String type, String managerId, String superId, String status,Integer province,
-			String remarks,String id,String depn,String abbreviation,String financeId) {
+			String remarks,String id,String depn,String abbreviation,String financeId,Integer workingHoursType) {
 		Date now=new Date();
 		OrganizationManagement om=new OrganizationManagement();
 		om.setName(name);
@@ -115,6 +116,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
 		om.setAbbreviation(abbreviation);
 		om.setFinanceId(financeId);
 		om.setProvince(province);
+		om.setWorkingHoursType(workingHoursType);
 		tOrderMidMapper.updateFinanceId(id,financeId);
 		int x=organizationManagementMapper.updateByPrimaryKeySelective(om);
 		//*******下级编号修改

+ 10 - 0
src/main/java/com/goafanti/weChat/bo/OutPublicDtails.java

@@ -17,8 +17,18 @@ public class OutPublicDtails {
 	private String releaseStarts;
 	@Excel(name = "公出结束时间")
 	private String releaseEnds;
+	@Excel(name = "打卡时间" )
+	private String clockInTimes;
 	private String annexUrl;
 	private String photoUrl;
+	
+	
+	public String getClockInTimes() {
+		return clockInTimes;
+	}
+	public void setClockInTimes(String clockInTimes) {
+		this.clockInTimes = clockInTimes;
+	}
 	public String getNickname() {
 		return nickname;
 	}

+ 8 - 8
src/main/resources/props/config_local.properties

@@ -2,13 +2,13 @@ dev.name=local
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
 #本地
-#jdbc.url=jdbc\:mysql://localhost:3306/aft20210528?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-#jdbc.username=root
-#jdbc.password=123456
-#测试
-jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 jdbc.username=root
-jdbc.password=aftdev
+jdbc.password=123456
+#测试
+#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.username=root
+#jdbc.password=aftdev
 #\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
 jdbc.validationQuery=SELECT 'x'
 #\u521d\u59cb\u8fde\u63a5\u6570
@@ -70,13 +70,13 @@ avatar.upload.host=//sb.jishutao.com/upload
 
 
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.1.76
+static.host=//static.jishutao.com/1.1.77
 
 wx.appId=wxff2f5720ed7d7f63
 wx.appSecret=081744369d42405be58fe37f892631f7
 #developer为开发版;trial为体验版;formal为正式版;
 wx.state=trial
-
+wx.clockInRange=1000
 
 •
 

+ 2 - 1
src/main/resources/props/config_test.properties

@@ -60,7 +60,7 @@ user.private.max=1000
 #客户释放提醒
 user_remind_days=15
 
-static.host=//static.jishutao.com/1.1.76
+static.host=//static.jishutao.com/1.1.77
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload
@@ -69,6 +69,7 @@ wx.appId=wxff2f5720ed7d7f63
 wx.appSecret=081744369d42405be58fe37f892631f7
 #developer为开发版;trial为体验版;formal为正式版;
 wx.state=trial
+wx.clockInRange=1000
 
 upload.path=/data/static/public/upload
 upload.private.path=/data/static/private/upload