Browse Source

客户查询修改成全部查询

anderx 8 months ago
parent
commit
529fe1acc1

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

@@ -82,5 +82,7 @@ public interface UserFirstInterviewMapper {
     int deleteById(Integer id);
 
     List<UserFirstInterview> selectByUidAid(@Param("uid") String uid, @Param("aid") String aid);
+
+    void deleteByPrdId(Integer id);
 }
 

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

@@ -82,5 +82,6 @@ public interface UserInterviewProjectMapper {
 
     List<UserInterviewProjectBo> selectByAid(@Param("aid") String aid, @Param("uid") String uid);
 
+    void updateByPrdId(Integer id);
 }
 

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

@@ -128,6 +128,13 @@
         where id = #{id}
     </delete>
 
+
+    <delete id="deleteByPrdId">
+        delete
+        from user_first_interview
+        where prdid = #{id}
+    </delete>
+
     <select id="selectByUidAid" resultMap="UserFirstInterviewMap">
         select
         <include refid="UserFirstInterviewAllSql"/>

+ 8 - 2
src/main/java/com/goafanti/common/mapper/UserInterviewProjectMapper.xml

@@ -106,6 +106,7 @@
     </update>
 
 
+
     <resultMap type="com.goafanti.common.model.UserInterviewProjectBo" id="ListMap">
         <result property="id" column="id" jdbcType="INTEGER"/>
         <result property="uid" column="uid" jdbcType="VARCHAR"/>
@@ -121,10 +122,11 @@
     <!--查询指定行数据-->
     <select id="findUserInterviewProjectList" resultMap="ListMap">
         select
-        a.id, a.uid, a.aid, a.pid, a.examine_status, a.examine_status_other, a.buy_status, a.buy_status_other,
+        a.id, a.uid, a.aid, a.pid, a.examine_status, a.examine_status_other, a.buy_status, a.buy_status_other,a.type,
         b.bname name
         from user_interview_project a left join business_project b on a.pid=b.id
         <where>
+            and a.type=0
             <if test="id != null">
                 and id = #{id}
             </if>
@@ -227,7 +229,11 @@
         </where>
     </select>
 
-
+    <update id="updateByPrdId">
+        update user_interview_project
+        set type=1,status=0
+        where prdid=#{prdid}
+    </update>
 
 </mapper>
 

+ 20 - 0
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -1126,6 +1126,11 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		if (p.getStatus()!=null||p.getPublicType()!=null||p.getTechStartProcess()!=null){
 			publicReleaseMapper.update(p);
 		}
+		//驳回业务公出,需要取消标记首次面谈,取消本次面谈项目,取消标记有效面谈
+		if(status==0&&use.getType()==0){
+			pushPublicInterview(use);
+		}
+
 		if (a.getOpenId()!=null) {
 			if (remarks.length()>19) {
 				remarks=remarks.substring(0, 15)+"...";
@@ -1140,6 +1145,21 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			return 1;
 	}
 
+	private void pushPublicInterview(PublicRelease use) {
+		List<OutPublicReleaseDetails> outPublicReleaseDetails = publicReleaseDetailsMapper.selectByPrid(use.getId());
+		for (OutPublicReleaseDetails e : outPublicReleaseDetails) {
+			//撤销后取消面谈项目
+			userInterviewProjectMapper.updateByPrdId(e.getId());
+			//将有效面谈去掉
+			PublicReleaseDetails p=new PublicReleaseDetails();
+			p.setInterviewStatus(0);
+			p.setId(e.getId());
+			publicReleaseDetailsMapper.update(p);
+			//删除首次面谈数据
+			userFirstInterviewMapper.deleteByPrdId(e.getId());
+		}
+	}
+
 	/**
 	 * 添加上级评价
 	 * @param remarks