Parcourir la source

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

anderx il y a 3 ans
Parent
commit
eaf0854904
20 fichiers modifiés avec 216 ajouts et 80 suppressions
  1. 15 3
      src/main/java/com/goafanti/common/dao/PublicReleaseMapper.java
  2. 1 3
      src/main/java/com/goafanti/common/dao/TTaskMidMapper.java
  3. 54 22
      src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml
  4. 7 0
      src/main/java/com/goafanti/common/mapper/TTaskMidMapper.xml
  5. 1 1
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml
  6. 27 1
      src/main/java/com/goafanti/common/model/PublicRelease.java
  7. 1 1
      src/main/java/com/goafanti/common/task/PatentTask.java
  8. 2 3
      src/main/java/com/goafanti/core/websocket/WebSocketHandshakeInterceptor.java
  9. 5 1
      src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java
  10. 1 1
      src/main/java/com/goafanti/order/service/impl/OrderInvoiceServiceImpl.java
  11. 4 0
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  12. 5 2
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  13. 4 4
      src/main/java/com/goafanti/weChat/bo/InputPublicDtails.java
  14. 11 1
      src/main/java/com/goafanti/weChat/bo/OutPublicDtails.java
  15. 14 3
      src/main/java/com/goafanti/weChat/bo/OutPublicRelease.java
  16. 22 3
      src/main/java/com/goafanti/weChat/bo/OutPublicReleaseList.java
  17. 23 20
      src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java
  18. 12 4
      src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java
  19. 6 6
      src/main/resources/props/config_local.properties
  20. 1 1
      src/main/resources/props/config_test.properties

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

@@ -13,7 +13,9 @@ public interface PublicReleaseMapper {
     int deleteByPrimaryKey(Integer id);
 
     int insert(PublicRelease record);
-
+    /** 需要获取id
+     *  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
+     */
     int insertSelective(PublicRelease record);
 
     PublicRelease selectByPrimaryKey(Integer id);
@@ -25,11 +27,21 @@ public interface PublicReleaseMapper {
 
     OutPublicRelease selectDtails(@Param("id") Integer id, @Param("ufid")String ufid);
 
-    int checkTime(@Param("aid")String aid, @Param("start") Date start, @Param("end")Date end);
+    /**
+     * 需要比对申请人其他公出时间,选择出重复的时间来判断是否生效。
+     *  1 已有发起时间大于等于选择发起小于选择结束
+     *  2 已有发起小于选择发起并且已有结束大于选择发起
+     *  3 已有发起小于选择结束和已有结束大于选择结束
+     * @param aid 申请人
+     * @param start 开始时间
+     * @param end 结束时间
+     * @return
+     */
+    List<Integer> checkTime(@Param("aid")String aid, @Param("start") Date start, @Param("end")Date end);
 
     void updateSignByAidAndUid(@Param("uid") String buyerId, @Param("aid") String salesmanId);
 
     List<OutPublicReleaseCount > getTimeUserFollow(@Param("date")Date date, @Param("now")Date now);
 
     List<OutPublicRelease> publicByOrder(String orderNo);
-}
+}

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

@@ -29,9 +29,7 @@ public interface TTaskMidMapper {
 
     void updateByTid(TTaskMid tm);
 
-    void addValue(Integer xzs, Integer bhs);
-
-
     TTaskMid selectCountBytid(@Param("tid")Integer tid, @Param("type")Integer type);
 
+    TTaskMid getDtails(Integer id);
 }

+ 54 - 22
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,37 @@
     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 into public_release
     <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
       <if test="uid != null">
         `uid`,
       </if>
@@ -161,8 +169,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 +267,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 +365,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 +404,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>
 
@@ -389,7 +420,7 @@
   <select id="listPublicRelease" resultType="com.goafanti.weChat.bo.OutPublicReleaseList">
   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.latitude ,a.longitude ,a.clock_in clockIn
+  a.latitude ,a.longitude ,a.clock_in clockIn,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
   <if test="type==2">
     left join department d on c.department_id =d.id
@@ -458,10 +489,11 @@
   </select>
 
   <select id="selectDtails" resultType="com.goafanti.weChat.bo.OutPublicRelease">
-    select  a.id,b.nickname ,c.name  aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,
+    select  a.id,b.nickname ,c.name  aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,a.update_time updateTime,
     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 +553,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">
@@ -598,7 +630,7 @@
   </select>
 
   <select id="checkTime" resultType="java.lang.Integer">
- select count(*) from public_release where aid=#{aid} and status in (0,1,2)
+ select id from public_release where aid=#{aid} and status in (0,1,2)
  and ( (release_start &gt;= #{start} and release_start &lt; #{end})
   or  (release_start &lt; #{start} and release_end &gt; #{start})
   or  (release_start &lt; #{end} and release_end &gt; #{end}))

+ 7 - 0
src/main/java/com/goafanti/common/mapper/TTaskMidMapper.xml

@@ -436,5 +436,12 @@
     on a.tid =b.tid
     where a.tid= #{tid}
   </select>
+  <select id="getDtails" resultType="com.goafanti.common.model.TTaskMid">
+    select a.id tid,dg.id dispatchProvince,tr.department_id dutyDep
+    from t_order_task a left join t_order_new b on a.order_no =b.order_no
+    left join department c on b.order_dep =c.id  left join admin tr on a.task_receiver =tr.id
+    left join district_glossory dg on c.province =dg.id
+    where a.id= #{id};
+  </select>
 
 </mapper>

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

@@ -381,7 +381,7 @@
 		select
 		count(0)
 		from(select a.id from `user` a
-		<if test="role == 1 and name != null">
+		<if test="name != null">
 		left join user_names un on a.id=un.uid
 		</if>
 		left join organization_identity b on a.id = b.uid

+ 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;
+    }
 }

+ 1 - 1
src/main/java/com/goafanti/common/task/PatentTask.java

@@ -65,7 +65,7 @@ public class PatentTask {
 	 * 4、在相隔30天、20天、10天、3天、2天、1天分别一次提醒。原是在距离90天提醒。
 	 */
 	@Scheduled(cron = "0 0 0  * * ?")
-	@RequestMapping(value = "/open/patentRemind", method = RequestMethod.GET)
+//	@RequestMapping(value = "/open/patentRemind", method = RequestMethod.GET)
 	public void patentRemind() {
 		LoggerUtils.debug(getClass(), "====================开始检查专利提醒==================");
 		try {

+ 2 - 3
src/main/java/com/goafanti/core/websocket/WebSocketHandshakeInterceptor.java

@@ -18,7 +18,6 @@ public class WebSocketHandshakeInterceptor implements HandshakeInterceptor {
 	@Override
 	public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler,
 			Map<String, Object> attributes) throws Exception {
-		System.out.println("beforeHandshake");
 		if (request instanceof ServletServerHttpRequest) {
 			ServletServerHttpRequest servletRequest = (ServletServerHttpRequest) request;
 			HttpSession session = servletRequest.getServletRequest().getSession(false);
@@ -36,6 +35,6 @@ public class WebSocketHandshakeInterceptor implements HandshakeInterceptor {
 	@Override
 	public void afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler,
 			Exception exception) {
-		System.out.println("After handshake");
+
 	}
-}
+}

+ 5 - 1
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -433,7 +433,11 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			}
 			tOrderTaskMapper.insertSelectiveGetId(tOrderTaskBo);
 			int y=tOrderTaskBo.getId();
-			tTaskMidMapper.insertSelective(new TTaskMid(y,new BigDecimal(0)));
+			TTaskMid dtails = tTaskMidMapper.getDtails(tOrderTaskBo.getId());
+			TTaskMid tTaskMid = new TTaskMid(y, new BigDecimal(0));
+			tTaskMid.setDispatchProvince(dtails.getDispatchProvince());
+			tTaskMid.setDutyDep(dtails.getDutyDep());
+			tTaskMidMapper.insertSelective(tTaskMid);
 			if(tOrderTaskBo.getSplitStatus()==1) {
 				map.put(x, y);
 			}

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

@@ -73,7 +73,7 @@ public class OrderInvoiceServiceImpl extends BaseMybatisDao<TOrderInvoiceMapper>
 				if(o.getApproval()==0) {
 					aids.add(organizationManagementMapper.selectByPrimaryKey(t.getOrderDep()).getFinanceId());
 				}else {
-					for (Admin admin : adminMapper.getAdminRoleList("集团副总")) {
+					for (Admin admin : adminMapper.getAdminRoleList("湖南特批开票")) {
 						aids.add(admin.getId());
 					}
 				}

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

@@ -196,6 +196,10 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			}
 		}
 		tm.setHighNewRetrial(highNewRetrial);
+		TTaskMid dtails = tTaskMidMapper.getDtails(t.getId());
+		TTaskMid tTaskMid = new TTaskMid(t.getId(), new BigDecimal(0));
+		tTaskMid.setDispatchProvince(dtails.getDispatchProvince());
+		tTaskMid.setDutyDep(dtails.getDutyDep());
 		tTaskMidMapper.insertSelective(tm);
 		return 1;
 	}

+ 5 - 2
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -936,8 +936,11 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 				newTask.setSplitId(i);
 				i++;
 				tOrderTaskMapper.insertSelectiveGetId(newTask);
-				TTaskMid tm=new TTaskMid(newTask.getId(),null);
-				tTaskMidMapper.insertSelective(tm);
+				TTaskMid dtails = tTaskMidMapper.getDtails(newTask.getId());
+				TTaskMid tTaskMid = new TTaskMid(newTask.getId(), new BigDecimal(0));
+				tTaskMid.setDispatchProvince(dtails.getDispatchProvince());
+				tTaskMid.setDutyDep(dtails.getDutyDep());
+				tTaskMidMapper.insertSelective(tTaskMid);
 			}
 		return 1;
 	}

+ 4 - 4
src/main/java/com/goafanti/weChat/bo/InputPublicDtails.java

@@ -1,7 +1,7 @@
 package com.goafanti.weChat.bo;
 
 public class InputPublicDtails {
-	
+
 	private String releaseStart;
 	private String releaseEnd;
 	private String aid;
@@ -15,7 +15,7 @@ public class InputPublicDtails {
 	private String sid;
 	private String depId;
 	/**
-	 * 0业务/行政 1技术
+	 * 0业务 1技术 2行政
 	 */
 	private Integer publicType;
 	private Integer pageSize;
@@ -101,6 +101,6 @@ public class InputPublicDtails {
 	public void setClockIn(Integer clockIn) {
 		this.clockIn = clockIn;
 	}
-	
-	
+
+
 }

+ 11 - 1
src/main/java/com/goafanti/weChat/bo/OutPublicDtails.java

@@ -27,7 +27,7 @@ public class OutPublicDtails {
 	private String clockInTimes;
 	@Excel(name = "创建时间" )
 	private String createTimes;
-	@Excel(name = "公出类型",readConverterExp = "0=业务/行政,1=技术")
+	@Excel(name = "公出类型",readConverterExp = "0=业务,1=技术,2=行政")
 	private Integer type;
 	@Excel(name = "公出目标" )
 	private String remarks;
@@ -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;

+ 14 - 3
src/main/java/com/goafanti/weChat/bo/OutPublicRelease.java

@@ -6,7 +6,7 @@ import java.util.Date;
 
 public class OutPublicRelease extends PublicRelease {
 	/**
-	 * 
+	 *
 	 */
 	private static final long serialVersionUID = 1L;
 	private String nickname;
@@ -26,6 +26,17 @@ public class OutPublicRelease extends PublicRelease {
 
 	private  String contractNo;
 
+
+	private String updateTimes;
+
+	public String getUpdateTimes() {
+		return updateTimes;
+	}
+
+	public void setUpdateTimes(String updateTimes) {
+		this.updateTimes = updateTimes;
+	}
+
 	public String getContractNo() {
 		return contractNo;
 	}
@@ -104,6 +115,6 @@ public class OutPublicRelease extends PublicRelease {
 	public void setPermission(Integer permission) {
 		this.permission = permission;
 	}
-	
-	
+
+
 }

+ 22 - 3
src/main/java/com/goafanti/weChat/bo/OutPublicReleaseList.java

@@ -1,7 +1,7 @@
 package com.goafanti.weChat.bo;
 
 public class OutPublicReleaseList {
-	
+
 	private String id;
 	private String nickname;
 	private String userName;
@@ -10,9 +10,28 @@ public class OutPublicReleaseList {
 	private String releaseEnds;
 	private String createTimes;
 	private String latitude;
-	private String longitude; 
+	private String longitude;
 	private Integer status;
 	private Integer clockIn;
+	private String updateTimes;
+	private Integer updateStatus;
+
+	public String getUpdateTimes() {
+		return updateTimes;
+	}
+
+	public void setUpdateTimes(String updateTimes) {
+		this.updateTimes = updateTimes;
+	}
+
+	public Integer getUpdateStatus() {
+		return updateStatus;
+	}
+
+	public void setUpdateStatus(Integer updateStatus) {
+		this.updateStatus = updateStatus;
+	}
+
 	public String getId() {
 		return id;
 	}
@@ -79,5 +98,5 @@ public class OutPublicReleaseList {
 	public void setClockIn(Integer clockIn) {
 		this.clockIn = clockIn;
 	}
-	
+
 }

+ 23 - 20
src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java

@@ -28,7 +28,7 @@ import com.goafanti.weChat.service.PublicReleaseService;
 @RestController
 @RequestMapping(value = "/api/admin/release")
 public class AdminReleaseApiController extends CertifyApiController{
-	
+
 	@Resource
 	private PublicReleaseService publicReleaseService;
 
@@ -36,7 +36,7 @@ public class AdminReleaseApiController extends CertifyApiController{
 	private String					uploadPath			= null;
 
 
-	
+
 	/**
 	 * 发起外出申请
 	 */
@@ -59,11 +59,11 @@ public class AdminReleaseApiController extends CertifyApiController{
 			res.getError().add(buildError("公出时段已经被使用!","公出时段已经被使用!"));
 			return res;
 		}
-		
+
 		res.setData(publicReleaseService.addPublicRelease(in));
 		return res;
 	}
-	
+
 	/**
 	 * 修改外出申请
 	 * @return
@@ -71,7 +71,10 @@ public class AdminReleaseApiController extends CertifyApiController{
 	@RequestMapping(value = "/updatePublicRelease", method = RequestMethod.POST)
 	public Result updatePublicRelease(InputPublicRelease in){
 		Result res = new Result();
-		
+		if (publicReleaseService.checkTime(in)) {
+			res.getError().add(buildError("公出时段已经被使用!","公出时段已经被使用!"));
+			return res;
+		}
 		res.setData(publicReleaseService.updatePublicRelease(in));
 		return res;
 	}
@@ -96,8 +99,8 @@ public class AdminReleaseApiController extends CertifyApiController{
 		res.setData(publicReleaseService.dtails(id));
 		return res;
 	}
-	
-	
+
+
 	/**
 	 * 外出申请详情
 	 * @return
@@ -108,7 +111,7 @@ public class AdminReleaseApiController extends CertifyApiController{
 		res.setData(publicReleaseService.followDtails(id));
 		return res;
 	}
-	
+
 	/**
 	 * 外出申请列表
 	 * @return
@@ -119,7 +122,7 @@ public class AdminReleaseApiController extends CertifyApiController{
 		res.setData(publicReleaseService.listPublicRelease(in));
 		return res;
 	}
-	
+
 	/**
 	 * 外出审核
 	 * @return
@@ -142,7 +145,7 @@ public class AdminReleaseApiController extends CertifyApiController{
 		res.setData(publicReleaseService.pushExaminePublicRelease( id , status, remarks,duration));
 		return res;
 	}
-	
+
 	/**
 	 * 外出审核日志列表
 	 * @return
@@ -153,9 +156,9 @@ public class AdminReleaseApiController extends CertifyApiController{
 		res.data(publicReleaseService.listPublicReleaseLog(id,ufid));
 		return res;
 	}
-	
-	
-	
+
+
+
 	/**
 	 * 公出统计
 	 * @return
@@ -166,7 +169,7 @@ public class AdminReleaseApiController extends CertifyApiController{
 		res.data(publicReleaseService.publicReleaseStatistics(in));
 		return res;
 	}
-	
+
 	/**
 	 * 公出统计导出
 	 * @return
@@ -177,8 +180,8 @@ public class AdminReleaseApiController extends CertifyApiController{
       	NewExcelUtil<OutPublicStatistics>excel=new NewExcelUtil<>(OutPublicStatistics.class);
   		 return  excel.exportExcel(list,"公出统计列表",response);
 	}
-	
-	
+
+
 	/**
 	 * 公出详情列表
 	 * @return
@@ -189,7 +192,7 @@ public class AdminReleaseApiController extends CertifyApiController{
 		res.data(publicReleaseService.publicReleaseListDtails(in));
 		return res;
 	}
-	
+
 	/**
 	 * 公出详情列表
 	 * @return
@@ -200,7 +203,7 @@ public class AdminReleaseApiController extends CertifyApiController{
 		NewExcelUtil<OutPublicDtails>excel=new NewExcelUtil<>(OutPublicDtails.class);
  		 return  excel.exportExcel(list,"公出详细列表",uploadPath);
 	}
-	
+
 	/** 上传图片 **/
 	@RequestMapping(value = "/upload", method = RequestMethod.POST)
 	public Result uploadOrderInvoiceFile(HttpServletRequest req){
@@ -259,6 +262,6 @@ public class AdminReleaseApiController extends CertifyApiController{
 		res.data(publicReleaseService.publicByOrder(orderNo));
 		return res;
 	}
-	
-	
+
+
 }

+ 12 - 4
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);
+			in.setUpdateStatus(1);
 		}else {
-			PublicReleaseLog log=new PublicReleaseLog(in.getId(),TokenManager.getAdminId(),4,in.getReason(),new Date());
-			publicReleaseLogMapper.insertSelective(log);
+			log.setStatus(4);
 		}
+		publicReleaseLogMapper.insertSelective(log);
 		return publicReleaseMapper.updateByPrimaryKeySelective(in);
 	}
 
@@ -400,9 +404,13 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			e.printStackTrace();
 			throw new BusinessException("转换异常");
 		}
-		int i=publicReleaseMapper.checkTime(TokenManager.getAdminId(),in.getReleaseStart(),in.getReleaseEnd());
-		if (i>0) {
+		List<Integer> is=publicReleaseMapper.checkTime(TokenManager.getAdminId(),in.getReleaseStart(),in.getReleaseEnd());
+		if (is.size()>1) {
 			return true;
+		}else  if(is.size()==1){
+			if (in.getId()!=null && !in.getId().equals(is.get(0))){
+				return true;
+			}
 		}
 		return false;
 	}

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

@@ -1,12 +1,12 @@
 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/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
 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
 jdbc.validationQuery=SELECT 'x'
 jdbc.initialSize=3
 jdbc.maxActive=20
@@ -50,7 +50,7 @@ user_channel_days=90
 #avatar.host=//172.16.0.253
 
 #avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.2.06
+static.host=//static.jishutao.com/1.2.09
 avatar.host=//172.16.0.255:3000
 #static.host=//172.16.0.255:3000/1.2.05
 #static.host=http://172.16.1.187/prod/1.2.05

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

@@ -43,7 +43,7 @@ user_remind_days=15
 #提前提醒天数
 user_channel_days=90
 
-static.host=//static.jishutao.com/1.2.06
+static.host=//static.jishutao.com/1.2.09
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload