Parcourir la source

新增公出修改时间与修改状态字段
公出修改、详情、列表修改

anderx il y a 3 ans
Parent
commit
fbf1be5550

+ 1 - 1
src/main/java/com/goafanti/common/dao/PublicReleaseMapper.java

@@ -32,4 +32,4 @@ public interface PublicReleaseMapper {
     List<OutPublicReleaseCount > getTimeUserFollow(@Param("date")Date date, @Param("now")Date now);
 
     List<OutPublicRelease> publicByOrder(String orderNo);
-}
+}

+ 51 - 20
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -32,12 +32,14 @@
     <result column="next_plan" jdbcType="VARCHAR" property="nextPlan" />
     <result column="type" jdbcType="INTEGER" property="type" />
     <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="update_status" jdbcType="INTEGER" property="updateStatus" />
   </resultMap>
   <sql id="Base_Column_List">
     id, `uid`, aid, release_start, release_end, remarks, annex_url, user_name, longitude,
     latitude, `status`, create_time, clock_in, clock_in_time, photo_url, pid, pname,
     ufid, duration, valid_date, new_user, sign_sum, main_status, supplement, audit_info,
-    `plan`, expected_effect, next_plan, `type`, order_no
+    `plan`, expected_effect, next_plan, `type`, order_no, update_time, update_status
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -49,31 +51,36 @@
     delete from public_release
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
-    insert into public_release (`uid`, aid, release_start,
-      release_end, remarks, annex_url,
-      user_name, longitude, latitude,
-      `status`, create_time, clock_in,
-      clock_in_time, photo_url, pid,
-      pname, ufid, duration,
+  <insert id="insert" parameterType="com.goafanti.common.model.PublicRelease">
+    insert into public_release (id, `uid`, aid,
+      release_start, release_end, remarks,
+      annex_url, user_name, longitude,
+      latitude, `status`, create_time,
+      clock_in, clock_in_time, photo_url,
+      pid, pname, ufid, duration,
       valid_date, new_user, sign_sum,
       main_status, supplement, audit_info,
       `plan`, expected_effect, next_plan,
-      `type`, order_no)
-    values (#{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP},
-      #{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR},
-      #{userName,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR},
-      #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{clockIn,jdbcType=INTEGER},
-      #{clockInTime,jdbcType=TIMESTAMP}, #{photoUrl,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
-      #{pname,jdbcType=VARCHAR}, #{ufid,jdbcType=VARCHAR}, #{duration,jdbcType=DOUBLE},
+      `type`, order_no, update_time,
+      update_status)
+    values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
+      #{releaseStart,jdbcType=TIMESTAMP}, #{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR},
+      #{annexUrl,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR},
+      #{latitude,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
+      #{clockIn,jdbcType=INTEGER}, #{clockInTime,jdbcType=TIMESTAMP}, #{photoUrl,jdbcType=VARCHAR},
+      #{pid,jdbcType=VARCHAR}, #{pname,jdbcType=VARCHAR}, #{ufid,jdbcType=VARCHAR}, #{duration,jdbcType=DOUBLE},
       #{validDate,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{signSum,jdbcType=INTEGER},
       #{mainStatus,jdbcType=INTEGER}, #{supplement,jdbcType=VARCHAR}, #{auditInfo,jdbcType=VARCHAR},
       #{plan,jdbcType=VARCHAR}, #{expectedEffect,jdbcType=VARCHAR}, #{nextPlan,jdbcType=VARCHAR},
-      #{type,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR})
+      #{type,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+      #{updateStatus,jdbcType=INTEGER})
   </insert>
-  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.PublicRelease">
     insert into public_release
     <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
       <if test="uid != null">
         `uid`,
       </if>
@@ -161,8 +168,17 @@
       <if test="orderNo != null">
         order_no,
       </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+      <if test="updateStatus != null">
+        update_status,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
       <if test="uid != null">
         #{uid,jdbcType=VARCHAR},
       </if>
@@ -250,6 +266,12 @@
       <if test="orderNo != null">
         #{orderNo,jdbcType=VARCHAR},
       </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateStatus != null">
+        #{updateStatus,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicRelease">
@@ -342,6 +364,12 @@
       <if test="orderNo != null">
         order_no = #{orderNo,jdbcType=VARCHAR},
       </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateStatus != null">
+        update_status = #{updateStatus,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -375,7 +403,9 @@
       expected_effect = #{expectedEffect,jdbcType=VARCHAR},
       next_plan = #{nextPlan,jdbcType=VARCHAR},
       `type` = #{type,jdbcType=INTEGER},
-      order_no = #{orderNo,jdbcType=VARCHAR}
+      order_no = #{orderNo,jdbcType=VARCHAR},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      update_status = #{updateStatus,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -461,7 +491,8 @@
     select  a.id,b.nickname ,c.name  aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,
     date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,
     a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,a.longitude ,a.aid ,c.superior_id suprId,a.uid,
-    a.clock_in clockIn ,a.plan ,a.expected_effect expectedEffect,a.next_plan nextPlan,c.reviewer,a.type,a.order_no orderNo,d.contract_no contractNo
+    a.clock_in clockIn ,a.plan ,a.expected_effect expectedEffect,a.next_plan nextPlan,c.reviewer,a.type,a.order_no orderNo,d.contract_no contractNo,
+    date_format(a.update_time ,'%Y-%m-%d %H:%i:%S') updateTimes,a.update_Status updateStatus
     from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
     left join t_order_new d on a.order_no=d.order_no
     where 1=1
@@ -521,7 +552,7 @@
     date_format(a.clock_in_time ,'%Y-%m-%d %H:%i:%S') clockInTimes,a.clock_in clockIn,a.remarks,a.supplement,a.type,
     date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.audit_info auditInfo,d.name sname,
     date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,
-    a.plan ,a.next_plan nextPlan ,a.expected_effect expectedEffect
+    a.plan ,a.next_plan nextPlan ,a.expected_effect expectedEffect,a.update_status updateStatus
     from public_release a left join `user` b on a.uid=b.id left join admin c on a.aid =c.id
     left join admin d on b.aid=d.id where 1=1
     <if test="publicType != null">

+ 27 - 1
src/main/java/com/goafanti/common/model/PublicRelease.java

@@ -56,7 +56,7 @@ public class PublicRelease implements Serializable {
     private String latitude;
 
     /**
-     * 状态 0驳回 1发起 2同意
+     * 状态 0驳回 1发起 2同意 3打卡 4 撤销
      */
     private Integer status;
 
@@ -155,6 +155,16 @@ public class PublicRelease implements Serializable {
      */
     private String orderNo;
 
+    /**
+     * 修改时间
+     */
+    private Date updateTime;
+
+    /**
+     * 修改状态 0=否 1=是
+     */
+    private Integer updateStatus;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -396,4 +406,20 @@ public class PublicRelease implements Serializable {
     public void setOrderNo(String orderNo) {
         this.orderNo = orderNo;
     }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Integer getUpdateStatus() {
+        return updateStatus;
+    }
+
+    public void setUpdateStatus(Integer updateStatus) {
+        this.updateStatus = updateStatus;
+    }
 }

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

@@ -43,6 +43,16 @@ public class OutPublicDtails {
 	private String auditInfo;
 	private String annexUrl;
 	private String photoUrl;
+	@Excel(name = "修改标识",readConverterExp = "0=否,1=是")
+	private Integer updateStatus;
+
+	public Integer getUpdateStatus() {
+		return updateStatus;
+	}
+
+	public void setUpdateStatus(Integer updateStatus) {
+		this.updateStatus = updateStatus;
+	}
 
 	public Integer getType() {
 		return type;

+ 6 - 2
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -152,18 +152,22 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			throw new BusinessException("转换异常");
 		}
 		User u=userMapper.selectByPrimaryKey(in.getUid());
+
 		if (u!=null&&u.getShareType()==2){
 			in.setNewUser(1);
 		}
 		if (u!=null&&u.getAid().equals(TokenManager.getAdminId())){
 			in.setMainStatus(1);
 		}
+		PublicReleaseLog log=new PublicReleaseLog(in.getId(),TokenManager.getAdminId(),null,in.getReason(),new Date());
 		if(in.getStatus()==null||in.getStatus()!=3) {
 			in.setStatus(1);
+			log.setStatus(5);
 		}else {
-			PublicReleaseLog log=new PublicReleaseLog(in.getId(),TokenManager.getAdminId(),4,in.getReason(),new Date());
-			publicReleaseLogMapper.insertSelective(log);
+			log.setStatus(4);
 		}
+		in.setUpdateStatus(1);
+		publicReleaseLogMapper.insertSelective(log);
 		return publicReleaseMapper.updateByPrimaryKeySelective(in);
 	}
 

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

@@ -1,7 +1,7 @@
 dev.name=local
 jdbc.driverClassName=com.mysql.jdbc.Driver
-#jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-jdbc.url=jdbc\:mysql://localhost:3306/aft20220318?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.url=jdbc\:mysql://localhost:3306/aft20220318?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