anderx лет назад: 3
Родитель
Сommit
c8ce40064c

+ 2 - 0
src/main/java/com/goafanti/common/dao/PublicReleaseDetailsMapper.java

@@ -2,6 +2,7 @@ package com.goafanti.common.dao;
 
 
 import com.goafanti.common.model.PublicReleaseDetails;
 import com.goafanti.common.model.PublicReleaseDetails;
 import com.goafanti.weChat.bo.InputPublicRelease;
 import com.goafanti.weChat.bo.InputPublicRelease;
+import com.goafanti.weChat.bo.OutPublicRelease;
 import com.goafanti.weChat.bo.OutPublicReleaseDetails;
 import com.goafanti.weChat.bo.OutPublicReleaseDetails;
 
 
 import java.util.List;
 import java.util.List;
@@ -28,4 +29,5 @@ public interface PublicReleaseDetailsMapper {
     PublicReleaseDetails selectBypridAndUid(InputPublicRelease in);
     PublicReleaseDetails selectBypridAndUid(InputPublicRelease in);
 
 
     void updateDistrictByPrid(InputPublicRelease in);
     void updateDistrictByPrid(InputPublicRelease in);
+
 }
 }

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

@@ -4,6 +4,7 @@ import com.goafanti.common.model.OutPublicReleaseCount;
 import com.goafanti.common.model.PublicRelease;
 import com.goafanti.common.model.PublicRelease;
 import com.goafanti.common.model.PublicReleaseCount;
 import com.goafanti.common.model.PublicReleaseCount;
 import com.goafanti.weChat.bo.OutPublicRelease;
 import com.goafanti.weChat.bo.OutPublicRelease;
+import com.goafanti.weChat.bo.OutPublicReleaseAndDetails;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
 import java.util.Date;
 import java.util.Date;
@@ -23,7 +24,7 @@ public interface PublicReleaseMapper {
     int updateByPrimaryKey(PublicRelease record);
     int updateByPrimaryKey(PublicRelease record);
 
 
 
 
-    OutPublicRelease selectDtails(@Param("id") Integer id, @Param("ufid")String ufid);
+    OutPublicRelease selectDtails(@Param("id") Integer id);
 
 
     /**
     /**
      * 需要比对申请人其他公出时间,选择出重复的时间来判断是否生效。
      * 需要比对申请人其他公出时间,选择出重复的时间来判断是否生效。
@@ -47,4 +48,6 @@ public interface PublicReleaseMapper {
 
 
 
 
     void updateStatusByMainId(@Param("status") Integer status, @Param("type") Integer type,@Param("mainId") Integer mainId,@Param("aid") String aid);
     void updateStatusByMainId(@Param("status") Integer status, @Param("type") Integer type,@Param("mainId") Integer mainId,@Param("aid") String aid);
+
+    OutPublicReleaseAndDetails selectDtailsByFid(@Param("ufid")String ufid);
 }
 }

+ 8 - 7
src/main/java/com/goafanti/common/mapper/PublicReleaseLogMapper.xml

@@ -44,7 +44,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Thu Jun 24 11:35:04 CST 2021.
       This element was generated on Thu Jun 24 11:35:04 CST 2021.
     -->
     -->
-    select 
+    select
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
     ,
     ,
     <include refid="Blob_Column_List" />
     <include refid="Blob_Column_List" />
@@ -66,11 +66,11 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Thu Jun 24 11:35:04 CST 2021.
       This element was generated on Thu Jun 24 11:35:04 CST 2021.
     -->
     -->
-    insert into public_release_log (id, prid, aid, 
-      remarks, `status`, create_time, 
+    insert into public_release_log (id, prid, aid,
+      remarks, `status`, create_time,
       photo_url)
       photo_url)
-    values (#{id,jdbcType=INTEGER}, #{prid,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR}, 
-      #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+    values (#{id,jdbcType=INTEGER}, #{prid,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR},
+      #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
       #{photoUrl,jdbcType=LONGVARCHAR})
       #{photoUrl,jdbcType=LONGVARCHAR})
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.PublicReleaseLog">
   <insert id="insertSelective" parameterType="com.goafanti.common.model.PublicReleaseLog">
@@ -190,14 +190,15 @@
 	date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes
 	date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes
 	from public_release_log a left join admin b on a.aid =b.id
 	from public_release_log a left join admin b on a.aid =b.id
 	left  join public_release pr  on a.prid =pr.id
 	left  join public_release pr  on a.prid =pr.id
+  left join public_release_details prd on pr.id=prd.prid
 	where 1=1
 	where 1=1
 	<if test="id !=null">
 	<if test="id !=null">
 	and a.prid = #{id}
 	and a.prid = #{id}
 	</if>
 	</if>
 	<if test="ufid !=null">
 	<if test="ufid !=null">
-	and pr.ufid  = #{ufid}
+	and prd.ufid  = #{ufid}
 	</if>
 	</if>
 	order by a.create_time desc
 	order by a.create_time desc
   </select>
   </select>
 
 
-</mapper>
+</mapper>

+ 16 - 0
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -615,6 +615,22 @@
 	</if>
 	</if>
 
 
   </select>
   </select>
+  <select id="selectDtailsByFid" resultType="com.goafanti.weChat.bo.OutPublicReleaseAndDetails">
+    select  a.id,c.name  aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.update_time updateTime,a.user_names userNames,
+    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.aid ,c.superior_id suprId,x.uid uids,x.district_name districtName ,u.nickname,
+    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,a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,
+    a.main_name mainName,a.assistant_aid assistantAid,a.assistant_name assistantName,a.public_again publicAhain
+    from public_release a  left join admin c on a.aid =c.id
+    left join  public_release_details x on a.id=x.prid
+    left join user u on x.uid=u.id
+    left join t_order_new d on a.order_no=d.order_no
+    where 1=1
+    <if test="ufid !=null">
+      and x.ufid= #{ufid}
+    </if>
+  </select>
 
 
   <select id="listPublicStatistics" resultType="com.goafanti.weChat.bo.OutPublicStatistics">
   <select id="listPublicStatistics" resultType="com.goafanti.weChat.bo.OutPublicStatistics">
   	select y.aid,y.bh,y.dk,y.wsh,y.tg,y.duration,c.name from(select x.aid ,sum(x.bh)bh,sum(x.wsh)wsh,sum(x.tg)tg,sum(x.dk)dk,sum(x.duration)duration
   	select y.aid,y.bh,y.dk,y.wsh,y.tg,y.duration,c.name from(select x.aid ,sum(x.bh)bh,sum(x.wsh)wsh,sum(x.tg)tg,sum(x.dk)dk,sum(x.duration)duration

+ 25 - 0
src/main/java/com/goafanti/weChat/bo/OutPublicReleaseAndDetails.java

@@ -0,0 +1,25 @@
+package com.goafanti.weChat.bo;
+
+public class OutPublicReleaseAndDetails extends  OutPublicRelease{
+
+    private String districtName;
+    private String nickname;
+
+    public String getDistrictName() {
+        return districtName;
+    }
+
+    public void setDistrictName(String districtName) {
+        this.districtName = districtName;
+    }
+
+    @Override
+    public String getNickname() {
+        return nickname;
+    }
+
+    @Override
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+}

+ 2 - 9
src/main/java/com/goafanti/weChat/service/PublicReleaseService.java

@@ -3,14 +3,7 @@ package com.goafanti.weChat.service;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
-import com.goafanti.weChat.bo.InputPublicDtails;
-import com.goafanti.weChat.bo.InputPublicRelease;
-import com.goafanti.weChat.bo.InputPublicReleaseList;
-import com.goafanti.weChat.bo.InputPublicStatistics;
-import com.goafanti.weChat.bo.OutPublicDtails;
-import com.goafanti.weChat.bo.OutPublicRelease;
-import com.goafanti.weChat.bo.OutPublicStatistics;
-import com.goafanti.weChat.bo.outPublicReleaseLog;
+import com.goafanti.weChat.bo.*;
 
 
 public interface PublicReleaseService {
 public interface PublicReleaseService {
 
 
@@ -34,7 +27,7 @@ public interface PublicReleaseService {
 
 
 	Object publicReleaseListDtails(InputPublicDtails in);
 	Object publicReleaseListDtails(InputPublicDtails in);
 
 
-	OutPublicRelease followDtails(String id);
+	OutPublicReleaseAndDetails followDtails(String id);
 
 
 	boolean checkTime(InputPublicRelease in);
 	boolean checkTime(InputPublicRelease in);
 
 

+ 4 - 7
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -1,6 +1,5 @@
 package com.goafanti.weChat.service.impl;
 package com.goafanti.weChat.service.impl;
 
 
-import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.ParseException;
 import java.util.*;
 import java.util.*;
 
 
@@ -10,7 +9,6 @@ import com.goafanti.common.model.*;
 import com.goafanti.weChat.bo.*;
 import com.goafanti.weChat.bo.*;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.web.socket.TextMessage;
 import org.springframework.web.socket.TextMessage;
 
 
@@ -153,7 +151,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		String str="["+my.getName()+"]发起["+nickname+"]的外出申请,请及时审核。";
 		String str="["+my.getName()+"]发起["+nickname+"]的外出申请,请及时审核。";
 		sendNoticeAndSoucket(a.getId(),1,str);
 		sendNoticeAndSoucket(a.getId(),1,str);
 		Map<String, Object>map=new HashMap<String, Object>();
 		Map<String, Object>map=new HashMap<String, Object>();
-		map.put("data", publicReleaseMapper.selectDtails(in.getId(),null));
+		map.put("data", publicReleaseMapper.selectDtails(in.getId()));
 		if (openid!=null) {
 		if (openid!=null) {
 			Integer res= weChatUtils.addNotice(openid, in.getStatus(),in.getId(),date,my.getName(),"["+my.getName()+"]发起外出申请");
 			Integer res= weChatUtils.addNotice(openid, in.getStatus(),in.getId(),date,my.getName(),"["+my.getName()+"]发起外出申请");
 			if (res!=0) {
 			if (res!=0) {
@@ -678,7 +676,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	@Override
 	@Override
 	public OutPublicRelease dtails(Integer id) {
 	public OutPublicRelease dtails(Integer id) {
 		//如果不是本人和审核人员则不返回信息
 		//如果不是本人和审核人员则不返回信息
-		OutPublicRelease out=publicReleaseMapper.selectDtails(id,null);
+		OutPublicRelease out=publicReleaseMapper.selectDtails(id);
 		if(out!=null){
 		if(out!=null){
 			boolean flag=false;
 			boolean flag=false;
 			//自己、审核人员与部门负责人可以查看
 			//自己、审核人员与部门负责人可以查看
@@ -706,9 +704,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 
 
 
 
 	@Override
 	@Override
-	public OutPublicRelease followDtails(String id) {
-		OutPublicRelease out = publicReleaseMapper.selectDtails(null, id);
-		out.setPrdList(publicReleaseDetailsMapper.selectByPCid(out.getId()));
+	public OutPublicReleaseAndDetails followDtails(String id) {
+		OutPublicReleaseAndDetails out = publicReleaseMapper.selectDtailsByFid( id);
 		return out;
 		return out;
 	}
 	}