Browse Source

开发公出

anderx 2 years ago
parent
commit
412b02453e

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

@@ -114,6 +114,10 @@ public class AdminListBo {
 	 *  0新员工 1老员工
 	 */
 	private Integer seniorStaff;
+	/**
+	 *  公出权限 0正常 1全部
+	 */
+	private Integer publicPurview;
 
 	private String ambId;
 	private String ancestors;
@@ -123,6 +127,14 @@ public class AdminListBo {
 	private String ancestorsNames;
 	private String ambRole;
 
+	public Integer getPublicPurview() {
+		return publicPurview;
+	}
+
+	public void setPublicPurview(Integer publicPurview) {
+		this.publicPurview = publicPurview;
+	}
+
 	public Integer getSeniorStaff() {
 		return seniorStaff;
 	}

+ 17 - 0
src/main/java/com/goafanti/common/dao/PublicExamineMapper.java

@@ -0,0 +1,17 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.PublicExamine;
+
+public interface PublicExamineMapper {
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(PublicExamine record);
+
+    int insertSelective(PublicExamine record);
+
+    PublicExamine selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(PublicExamine record);
+
+    int updateByPrimaryKey(PublicExamine record);
+}

+ 46 - 26
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -29,12 +29,13 @@
     <result column="amb_manage" jdbcType="INTEGER" property="ambManage" />
     <result column="manager_id" jdbcType="VARCHAR" property="managerId" />
     <result column="senior_staff" jdbcType="INTEGER" property="seniorStaff" />
+    <result column="public_purview" jdbcType="INTEGER" property="publicPurview" />
   </resultMap>
   <sql id="Base_Column_List">
     id, mobile, `name`, `password`, email, create_time, `number`, province, `position`,
     superior_id, city, department_id, `status`, user_no, duty, district, head_portrait_url,
     contact_mobile, last_login_time, open_id, `type`, reviewer, amb_id, amb_role, amb_manage,
-    manager_id, senior_staff
+    manager_id, senior_staff, public_purview
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     select
@@ -46,29 +47,34 @@
     delete from admin
     where id = #{id,jdbcType=VARCHAR}
   </delete>
-  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Admin" useGeneratedKeys="true">
-    insert into admin (id,mobile, `name`, `password`,
-      email, create_time, `number`,
-      province, `position`, superior_id,
-      city, department_id, `status`,
-      user_no, duty, district,
-      head_portrait_url, contact_mobile, last_login_time,
-      open_id, `type`, reviewer,
-      amb_id, amb_role, amb_manage,
-      manager_id, senior_staff)
-    values (#{id},#{mobile,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
-      #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{number,jdbcType=INTEGER},
-      #{province,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{superiorId,jdbcType=VARCHAR},
-      #{city,jdbcType=VARCHAR}, #{departmentId,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
-      #{userNo,jdbcType=VARCHAR}, #{duty,jdbcType=VARCHAR}, #{district,jdbcType=VARCHAR},
-      #{headPortraitUrl,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{lastLoginTime,jdbcType=TIMESTAMP},
-      #{openId,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{reviewer,jdbcType=VARCHAR},
-      #{ambId,jdbcType=VARCHAR}, #{ambRole,jdbcType=VARCHAR}, #{ambManage,jdbcType=INTEGER},
-      #{managerId,jdbcType=VARCHAR}, #{seniorStaff,jdbcType=INTEGER})
+  <insert id="insert" parameterType="com.goafanti.common.model.Admin">
+    insert into admin (id, mobile, `name`,
+      `password`, email, create_time,
+      `number`, province, `position`,
+      superior_id, city, department_id,
+      `status`, user_no, duty,
+      district, head_portrait_url, contact_mobile,
+      last_login_time, open_id, `type`,
+      reviewer, amb_id, amb_role,
+      amb_manage, manager_id, senior_staff,
+      public_purview)
+    values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
+      #{password,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
+      #{number,jdbcType=INTEGER}, #{province,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR},
+      #{superiorId,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{departmentId,jdbcType=VARCHAR},
+      #{status,jdbcType=VARCHAR}, #{userNo,jdbcType=VARCHAR}, #{duty,jdbcType=VARCHAR},
+      #{district,jdbcType=VARCHAR}, #{headPortraitUrl,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR},
+      #{lastLoginTime,jdbcType=TIMESTAMP}, #{openId,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
+      #{reviewer,jdbcType=VARCHAR}, #{ambId,jdbcType=VARCHAR}, #{ambRole,jdbcType=VARCHAR},
+      #{ambManage,jdbcType=INTEGER}, #{managerId,jdbcType=VARCHAR}, #{seniorStaff,jdbcType=INTEGER},
+      #{publicPurview,jdbcType=INTEGER})
   </insert>
-  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Admin" useGeneratedKeys="true">
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.Admin">
     insert into admin
     <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
       <if test="mobile != null">
         mobile,
       </if>
@@ -147,8 +153,14 @@
       <if test="seniorStaff != null">
         senior_staff,
       </if>
+      <if test="publicPurview != null">
+        public_purview,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
       <if test="mobile != null">
         #{mobile,jdbcType=VARCHAR},
       </if>
@@ -227,6 +239,9 @@
       <if test="seniorStaff != null">
         #{seniorStaff,jdbcType=INTEGER},
       </if>
+      <if test="publicPurview != null">
+        #{publicPurview,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Admin">
@@ -310,6 +325,9 @@
       <if test="seniorStaff != null">
         senior_staff = #{seniorStaff,jdbcType=INTEGER},
       </if>
+      <if test="publicPurview != null">
+        public_purview = #{publicPurview,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -340,12 +358,14 @@
       amb_role = #{ambRole,jdbcType=VARCHAR},
       amb_manage = #{ambManage,jdbcType=INTEGER},
       manager_id = #{managerId,jdbcType=VARCHAR},
-      senior_staff = #{seniorStaff,jdbcType=INTEGER}
+      senior_staff = #{seniorStaff,jdbcType=INTEGER},
+      public_purview = #{publicPurview,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
 
 
 
+
   <select id="selectAllAdmin" resultMap="BaseResultMap">
     select
     <include refid="Base_Column_List" />
@@ -872,7 +892,7 @@
 
   <select id="getDeptNameByAid" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.AdminListBo">
     select a.id,a.name, d.name as departmentName,a.department_id departmentId,a.email,a.superior_id superiorId,a.open_id openId,
-           a.reviewer,d.manager_id depManager
+           a.reviewer,d.manager_id depManager,a.public_purview publicPurview
     from admin a left join department d on a.department_id = d.id
     where a.id = #{_parameter,jdbcType=VARCHAR}
   </select>
@@ -1177,9 +1197,9 @@
     SELECT a.id aid,a.name aName,a.department_id depId,d.name depName
     from admin a left join department d on a.department_id = d.id
     where a.status =0 and a.`type` =1
-      <if test="seniorStaff != null">
-        and a.senior_staff=#{seniorStaff}
-      </if>
+    <if test="seniorStaff != null">
+      and a.senior_staff=#{seniorStaff}
+    </if>
     <if test="depIds!= null">
       and a.department_id in
       <foreach close=")" collection="depIds" item="deps" open="(" separator=",">

+ 98 - 0
src/main/java/com/goafanti/common/mapper/PublicExamineMapper.xml

@@ -0,0 +1,98 @@
+<?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.PublicExamineMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.PublicExamine">
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="prid" jdbcType="INTEGER" property="prid" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="aname" jdbcType="VARCHAR" property="aname" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, prid, aid, aname, `status`, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from public_examine
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from public_examine
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicExamine" useGeneratedKeys="true">
+    insert into public_examine (prid, aid, aname, 
+      `status`, create_time)
+    values (#{prid,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR}, #{aname,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicExamine" useGeneratedKeys="true">
+    insert into public_examine
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="prid != null">
+        prid,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="aname != null">
+        aname,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="prid != null">
+        #{prid,jdbcType=INTEGER},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="aname != null">
+        #{aname,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicExamine">
+    update public_examine
+    <set>
+      <if test="prid != null">
+        prid = #{prid,jdbcType=INTEGER},
+      </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="aname != null">
+        aname = #{aname,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </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.PublicExamine">
+    update public_examine
+    set prid = #{prid,jdbcType=INTEGER},
+      aid = #{aid,jdbcType=VARCHAR},
+      aname = #{aname,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 33 - 46
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -14,7 +14,6 @@
     <result column="pname" jdbcType="VARCHAR" property="pname" />
     <result column="duration" jdbcType="DOUBLE" property="duration" />
     <result column="valid_date" jdbcType="VARCHAR" property="validDate" />
-    <result column="main_status" jdbcType="INTEGER" property="mainStatus" />
     <result column="supplement" jdbcType="VARCHAR" property="supplement" />
     <result column="audit_info" jdbcType="VARCHAR" property="auditInfo" />
     <result column="plan" jdbcType="VARCHAR" property="plan" />
@@ -34,18 +33,18 @@
     <result column="assistant_name" jdbcType="VARCHAR" property="assistantName" />
     <result column="public_again" jdbcType="INTEGER" property="publicAgain" />
     <result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
-    <result column="ufid" jdbcType="VARCHAR" property="ufid" />
     <result column="new_user" jdbcType="VARCHAR" property="newUser" />
     <result column="sign_sum" jdbcType="VARCHAR" property="signSum" />
     <result column="user_names" jdbcType="VARCHAR" property="userNames" />
     <result column="object_type" jdbcType="INTEGER" property="objectType" />
+    <result column="public_type" jdbcType="INTEGER" property="publicType" />
   </resultMap>
   <sql id="Base_Column_List">
     id, aid, release_start, release_end, remarks, annex_url, `status`, create_time, pid,
-    pname, duration, valid_date, main_status, supplement, audit_info, `plan`, expected_effect,
-    next_plan, `type`, order_no, update_time, update_status, assist, assist_aid, assist_aid_name,
+    pname, duration, valid_date, supplement, audit_info, `plan`, expected_effect, next_plan,
+    `type`, order_no, update_time, update_status, assist, assist_aid, assist_aid_name,
     main_id, main_name, reject_name, assistant_aid, assistant_name, public_again, audit_time,
-    ufid, new_user, sign_sum, user_names, object_type
+    new_user, sign_sum, user_names, object_type, public_type
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -61,29 +60,27 @@
     insert into public_release (aid, release_start, release_end,
       remarks, annex_url, `status`,
       create_time, pid, pname,
-      duration, valid_date, main_status,
-      supplement, audit_info, `plan`,
-      expected_effect, next_plan, `type`,
-      order_no, update_time, update_status,
-      assist, assist_aid, assist_aid_name,
-      main_id, main_name, reject_name,
-      assistant_aid, assistant_name, public_again,
-      audit_time, ufid, new_user,
-      sign_sum, user_names, object_type
-      )
+      duration, valid_date, supplement,
+      audit_info, `plan`, expected_effect,
+      next_plan, `type`, order_no,
+      update_time, update_status, assist,
+      assist_aid, assist_aid_name, main_id,
+      main_name, reject_name, assistant_aid,
+      assistant_name, public_again, audit_time,
+      new_user, sign_sum, user_names,
+      object_type, public_type)
     values (#{aid,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP}, #{releaseEnd,jdbcType=TIMESTAMP},
       #{remarks,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
       #{createTime,jdbcType=TIMESTAMP}, #{pid,jdbcType=VARCHAR}, #{pname,jdbcType=VARCHAR},
-      #{duration,jdbcType=DOUBLE}, #{validDate,jdbcType=VARCHAR}, #{mainStatus,jdbcType=INTEGER},
-      #{supplement,jdbcType=VARCHAR}, #{auditInfo,jdbcType=VARCHAR}, #{plan,jdbcType=VARCHAR},
-      #{expectedEffect,jdbcType=VARCHAR}, #{nextPlan,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
-      #{orderNo,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateStatus,jdbcType=INTEGER},
-      #{assist,jdbcType=INTEGER}, #{assistAid,jdbcType=VARCHAR}, #{assistAidName,jdbcType=VARCHAR},
-      #{mainId,jdbcType=INTEGER}, #{mainName,jdbcType=VARCHAR}, #{rejectName,jdbcType=VARCHAR},
-      #{assistantAid,jdbcType=VARCHAR}, #{assistantName,jdbcType=VARCHAR}, #{publicAgain,jdbcType=INTEGER},
-      #{auditTime,jdbcType=TIMESTAMP}, #{ufid,jdbcType=VARCHAR}, #{newUser,jdbcType=VARCHAR},
-      #{signSum,jdbcType=VARCHAR}, #{userNames,jdbcType=VARCHAR}, #{objectType,jdbcType=INTEGER}
-      )
+      #{duration,jdbcType=DOUBLE}, #{validDate,jdbcType=VARCHAR}, #{supplement,jdbcType=VARCHAR},
+      #{auditInfo,jdbcType=VARCHAR}, #{plan,jdbcType=VARCHAR}, #{expectedEffect,jdbcType=VARCHAR},
+      #{nextPlan,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR},
+      #{updateTime,jdbcType=TIMESTAMP}, #{updateStatus,jdbcType=INTEGER}, #{assist,jdbcType=INTEGER},
+      #{assistAid,jdbcType=VARCHAR}, #{assistAidName,jdbcType=VARCHAR}, #{mainId,jdbcType=INTEGER},
+      #{mainName,jdbcType=VARCHAR}, #{rejectName,jdbcType=VARCHAR}, #{assistantAid,jdbcType=VARCHAR},
+      #{assistantName,jdbcType=VARCHAR}, #{publicAgain,jdbcType=INTEGER}, #{auditTime,jdbcType=TIMESTAMP},
+      #{newUser,jdbcType=VARCHAR}, #{signSum,jdbcType=VARCHAR}, #{userNames,jdbcType=VARCHAR},
+      #{objectType,jdbcType=INTEGER}, #{publicType,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
     insert into public_release
@@ -121,9 +118,6 @@
       <if test="validDate != null">
         valid_date,
       </if>
-      <if test="mainStatus != null">
-        main_status,
-      </if>
       <if test="supplement != null">
         supplement,
       </if>
@@ -181,9 +175,6 @@
       <if test="auditTime != null">
         audit_time,
       </if>
-      <if test="ufid != null">
-        ufid,
-      </if>
       <if test="newUser != null">
         new_user,
       </if>
@@ -196,6 +187,9 @@
       <if test="objectType != null">
         object_type,
       </if>
+      <if test="publicType != null">
+        public_type,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="aid != null">
@@ -231,9 +225,6 @@
       <if test="validDate != null">
         #{validDate,jdbcType=VARCHAR},
       </if>
-      <if test="mainStatus != null">
-        #{mainStatus,jdbcType=INTEGER},
-      </if>
       <if test="supplement != null">
         #{supplement,jdbcType=VARCHAR},
       </if>
@@ -291,9 +282,6 @@
       <if test="auditTime != null">
         #{auditTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="ufid != null">
-        #{ufid,jdbcType=VARCHAR},
-      </if>
       <if test="newUser != null">
         #{newUser,jdbcType=VARCHAR},
       </if>
@@ -306,6 +294,9 @@
       <if test="objectType != null">
         #{objectType,jdbcType=INTEGER},
       </if>
+      <if test="publicType != null">
+        #{publicType,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicRelease">
@@ -344,9 +335,6 @@
       <if test="validDate != null">
         valid_date = #{validDate,jdbcType=VARCHAR},
       </if>
-      <if test="mainStatus != null">
-        main_status = #{mainStatus,jdbcType=INTEGER},
-      </if>
       <if test="supplement != null">
         supplement = #{supplement,jdbcType=VARCHAR},
       </if>
@@ -404,9 +392,6 @@
       <if test="auditTime != null">
         audit_time = #{auditTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="ufid != null">
-        ufid = #{ufid,jdbcType=VARCHAR},
-      </if>
       <if test="newUser != null">
         new_user = #{newUser,jdbcType=VARCHAR},
       </if>
@@ -419,6 +404,9 @@
       <if test="objectType != null">
         object_type = #{objectType,jdbcType=INTEGER},
       </if>
+      <if test="publicType != null">
+        public_type = #{publicType,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -435,7 +423,6 @@
       pname = #{pname,jdbcType=VARCHAR},
       duration = #{duration,jdbcType=DOUBLE},
       valid_date = #{validDate,jdbcType=VARCHAR},
-      main_status = #{mainStatus,jdbcType=INTEGER},
       supplement = #{supplement,jdbcType=VARCHAR},
       audit_info = #{auditInfo,jdbcType=VARCHAR},
       `plan` = #{plan,jdbcType=VARCHAR},
@@ -455,11 +442,11 @@
       assistant_name = #{assistantName,jdbcType=VARCHAR},
       public_again = #{publicAgain,jdbcType=INTEGER},
       audit_time = #{auditTime,jdbcType=TIMESTAMP},
-      ufid = #{ufid,jdbcType=VARCHAR},
       new_user = #{newUser,jdbcType=VARCHAR},
       sign_sum = #{signSum,jdbcType=VARCHAR},
       user_names = #{userNames,jdbcType=VARCHAR},
-      object_type = #{objectType,jdbcType=INTEGER}
+      object_type = #{objectType,jdbcType=INTEGER},
+      public_type = #{publicType,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 

+ 13 - 0
src/main/java/com/goafanti/common/model/Admin.java

@@ -140,6 +140,11 @@ public class Admin extends BaseModel implements AftUser {
      */
     private Integer seniorStaff;
 
+    /**
+     * 0正常 1全部
+     */
+    private Integer publicPurview;
+
     private static final long serialVersionUID = 1L;
 
 
@@ -404,4 +409,12 @@ public class Admin extends BaseModel implements AftUser {
     public void setSeniorStaff(Integer seniorStaff) {
         this.seniorStaff = seniorStaff;
     }
+
+    public Integer getPublicPurview() {
+        return publicPurview;
+    }
+
+    public void setPublicPurview(Integer publicPurview) {
+        this.publicPurview = publicPurview;
+    }
 }

+ 87 - 0
src/main/java/com/goafanti/common/model/PublicExamine.java

@@ -0,0 +1,87 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * public_examine
+ * @author 
+ */
+public class PublicExamine implements Serializable {
+    private Integer id;
+
+    /**
+     * 公出编号
+     */
+    private Integer prid;
+
+    /**
+     * 审核人编号
+     */
+    private String aid;
+
+    /**
+     * 审核人名称
+     */
+    private String aname;
+
+    /**
+     * 0未审核 ,1已审核
+     */
+    private Integer status;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getPrid() {
+        return prid;
+    }
+
+    public void setPrid(Integer prid) {
+        this.prid = prid;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public String getAname() {
+        return aname;
+    }
+
+    public void setAname(String aname) {
+        this.aname = aname;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 13 - 26
src/main/java/com/goafanti/common/model/PublicRelease.java

@@ -66,11 +66,6 @@ public class PublicRelease implements Serializable {
     private String validDate;
 
     /**
-     * 0辅助根据 1主要跟进
-     */
-    private Integer mainStatus;
-
-    /**
      * 本次总结
      */
     private String supplement;
@@ -166,11 +161,6 @@ public class PublicRelease implements Serializable {
     private Date auditTime;
 
     /**
-     * 跟进id
-     */
-    private String ufid;
-
-    /**
      * 客户类型 0新客户 1老客户
      */
     private String newUser;
@@ -190,6 +180,11 @@ public class PublicRelease implements Serializable {
      */
     private Integer objectType;
 
+    /**
+     * 公出分类 0不含他人客户 1待审核 2已审核
+     */
+    private Integer publicType;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -288,14 +283,6 @@ public class PublicRelease implements Serializable {
         this.validDate = validDate;
     }
 
-    public Integer getMainStatus() {
-        return mainStatus;
-    }
-
-    public void setMainStatus(Integer mainStatus) {
-        this.mainStatus = mainStatus;
-    }
-
     public String getSupplement() {
         return supplement;
     }
@@ -448,14 +435,6 @@ public class PublicRelease implements Serializable {
         this.auditTime = auditTime;
     }
 
-    public String getUfid() {
-        return ufid;
-    }
-
-    public void setUfid(String ufid) {
-        this.ufid = ufid;
-    }
-
     public String getNewUser() {
         return newUser;
     }
@@ -487,4 +466,12 @@ public class PublicRelease implements Serializable {
     public void setObjectType(Integer objectType) {
         this.objectType = objectType;
     }
+
+    public Integer getPublicType() {
+        return publicType;
+    }
+
+    public void setPublicType(Integer publicType) {
+        this.publicType = publicType;
+    }
 }

+ 14 - 3
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -57,6 +57,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	private TOrderNewMapper tOrderNewMapper;
 	@Autowired
 	private DepartmentService	departmentService;
+	@Autowired
+	private PublicExamineMapper publicExamineMapper;
 
 	@Override
 	public Map<String, Object> addPublicRelease(InputPublicRelease in) {
@@ -66,6 +68,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		in.setStatus(1);
 		in.setAid(TokenManager.getAdminId());
 		AdminListBo my = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
+
 		if (in.getAssist()==1){
 //			in.setAssistAidName(getAssistAidName(in.getAssistAid()));
 			in.setMainName(my.getName());
@@ -80,6 +83,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			//计算平均
 			double d = durationSum(duration, userCount);
 			Integer index=1;
+			//获取非已企业公出需要的审核人员
 			for (String s : split) {
 				PublicReleaseDetails prd=new PublicReleaseDetails();
 				User u=userMapper.selectByPrimaryKey(s);
@@ -93,6 +97,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					prd.setMainStatus(1);
 				}else {
 					prd.setMainStatus(0);
+					//不是自己的企业则需要审核
+					addPublicExamine(in.getId(),u.getAid());
 				}
 				prd.setPrid(in.getId());
 				prd.setUid(s);
@@ -126,6 +132,13 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		return map;
 	}
 
+	private void addPublicExamine(Integer id, String aid) {
+		PublicExamine pe=new PublicExamine();
+		pe.setPrid(id);
+		pe.setAid(aid);
+		pe.setStatus(0);
+		publicExamineMapper.insertSelective(pe);
+	}
 
 
 	private  double durationSum(Double duration, Integer sum) {
@@ -605,7 +618,6 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	 * @param use
 	 */
 	private void updatepushAssistant(PublicRelease use,Admin a) {
-		List<String> list=new ArrayList();
 		List<PublicRelease> uselist = publicReleaseMapper.selectByMainId(use.getId(),4,null);
 		for (PublicRelease p : uselist) {
 					if(!use.getReleaseStart().equals(p.getReleaseStart()))p.setReleaseStart(use.getReleaseStart());
@@ -619,7 +631,6 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					PublicReleaseLog log = new PublicReleaseLog(p.getId(), TokenManager.getAdminId(), PublicReleaseLog.states.ty.getCode(), str.toString(), new Date());
 					sendNoticeAndSoucket(p.getAid(),p.getStatus(),str.toString());
 					publicReleaseLogMapper.insertSelective(log);
-
 		}
 	}
 
@@ -657,7 +668,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					fbb.setFollowTime(DateUtils.formatDate(prd.getClockInTime(), AFTConstants.YYYYMMDDHHMMSS));
 					String ufid = UUID.randomUUID().toString();
 					prd.setUfid(ufid);
-					customerService.addFollow(fbb, ufid, use.getMainStatus());
+					customerService.addFollow(fbb, ufid, prd.getMainStatus());
 					str = "公出人员打卡";
 				}else if (clockIn == 2){
 					str = "公出人员异常打卡";