Browse Source

公出汇总列表新曾面谈项目数据

anderx 8 months ago
parent
commit
5ab33dfdb1

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

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

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

@@ -230,6 +230,13 @@
             </if>
         </where>
     </select>
+    <select id="selectByPrdId" 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.type,
+    b.bname name
+    from user_interview_project a left join business_project b on a.pid=b.id
+    where a.status=0 and  a.prdid= #{prdid}
+    </select>
 
     <update id="updateByPrdId">
         update user_interview_project

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

@@ -56,6 +56,8 @@ public class OutPublicDtails  {
 	private String supplement;
 	@Excel(name = "下次计划" )
 	private String nextPlan;
+	@Excel(name = "本次面谈项目" )
+	private String interviewProject;
 	/**
 	 * 前期沟通-客户的难处
 	 */
@@ -112,6 +114,13 @@ public class OutPublicDtails  {
 	@Excel(name = "订单总金额" ,scale = 6)
 	private BigDecimal totalAmout;
 
+	public String getInterviewProject() {
+		return interviewProject;
+	}
+
+	public void setInterviewProject(String interviewProject) {
+		this.interviewProject = interviewProject;
+	}
 
 	public String getEarlyCommunication() {
 		return earlyCommunication;

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

@@ -3058,6 +3058,30 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				outPublicDtails.setList(colokList);
 			}
 			outPublicDtails.setClockInTimes(sb.toString());
+			List<UserInterviewProjectBo> userInterviewProjectBos = userInterviewProjectMapper.selectByPrdId(outPublicDtails.getPrdId());
+			if (userInterviewProjectBos.size()>0){
+				StringBuilder builder = new StringBuilder();
+				userInterviewProjectBos.forEach(e -> {
+					if (e.getName()!=null)builder.append(e.getName());
+					if (e.getExamineStatus()!=null){
+						if (e.getExamineStatus()==1){
+							builder.append("(初次审核)");
+						}else if (e.getExamineStatus()==2){
+							builder.append("(复审 ").append(e.getExamineStatusOther()).append(")");
+						}
+					}
+					if (e.getBuyStatus()!=null){
+						if (e.getBuyStatus()==1){
+							builder.append("(新购)");
+						}else if (e.getBuyStatus()==2){
+							builder.append("(复购 ").append(e.getBuyStatusOther()).append(")");
+						}
+					}
+					builder.append(",");
+				});
+				outPublicDtails.setInterviewProject(builder.substring(0,builder.length()-1));
+			}
+
 		}
 	}
 	@Override