anderx 1 год назад
Родитель
Сommit
13fcd62117

+ 11 - 0
src/main/java/com/goafanti/business/bo/RestrictProjectPageList.java

@@ -11,6 +11,10 @@ public class RestrictProjectPageList {
      */
     private String name;
     /**
+     * 项目编号
+     */
+    private String pid;
+    /**
      * 项目名称
      */
     private String projectName;
@@ -52,6 +56,13 @@ public class RestrictProjectPageList {
     private String intendedProject;
     private String     businessScope;
 
+    public String getPid() {
+        return pid;
+    }
+
+    public void setPid(String pid) {
+        this.pid = pid;
+    }
 
     public String getSocietyTag() {
         return societyTag;

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

@@ -135,7 +135,7 @@
     <select id="RestrictProjectList" resultType="com.goafanti.business.bo.RestrictProjectPageList">
         select a.id,b.nickname name,c.bname projectName,a.`type` ,ad.name userAdmin,ad2.name adminName,a.lock_time lockTime,
                a.last_follow_time lastFollowTime,a.uid, b.society_tag societyTag,dg1.name as province, dg2.name as city,
-               dg3.name as area,d.intended_project intendedProject, d.business_scope businessScope
+               dg3.name as area,d.intended_project intendedProject, d.business_scope businessScope,a.pid
         from restrict_project a
                  left join user b on a.uid =b.id left join business_project c on a.pid =c.id
                  left join admin ad on b.aid =ad.id left join admin ad2 on a.aid =ad2.id

+ 3 - 3
src/main/java/com/goafanti/common/mapper/UserFollowMapper.xml

@@ -219,12 +219,12 @@
     <select id="userFollowList" resultType="com.goafanti.user.bo.outUserFollowList">
         select b.nickname,b.share_type shareType ,b.channel,b.id,date_format(b.transfer_time,'%Y-%m-%d %H:%i:%s')startTimes,
         a.contact_type contactType,a.follow_name followName ,a.follow_dep followDep,a.`result` ,a.follow_count followCount,
-        date_format(a.create_time ,'%Y-%m-%d %H:%i:%s')followTimes,a.guidance_name guidanceName, a.guidance ,
+        date_format(a.create_time ,'%Y-%m-%d %H:%i:%s')followTimes,a.guidance_name guidanceName, a.guidance ,a.type,a.pid,
         date_format(a.guidance_time,'%Y-%m-%d %H:%i:%s') guidanceTimes,c.contacts ,c.contact_mobile contactMobile,
-        c.location_province province ,c.location_city city ,c.location_area area,
+        c.location_province province ,c.location_city city ,c.location_area area,e.bname projectName,
         c.intended_project intendedProject ,c.business_scope businessScope
         from user_follow a left join `user`b on a.uid =b.id left join organization_identity c on a.uid=c.uid
-        left join admin d on a.aid =d.id
+        left join admin d on a.aid =d.id left join business_project e on a.pid =e.id
         where 1=1
         <if test="shiroType == 0">
             and a.aid= #{aid}

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

@@ -685,12 +685,14 @@
 		select a.id as followId, a.aid,date_format( a.create_time,'%Y-%m-%d %H:%i:%S') as followTime, a.contact_type as contactType,
 		a.result,a.guidance, b.nickname,b.identify_name as identifyName, c.name as contacts, c.mobile as contactMobile,pr.supplement ,pr.id prid,
 		d.name as adminName,date_format(a.guidance_time,'%Y-%m-%d %H:%i:%S') as guidanceTime,a.guidance_name guidanceName,
+		a.type,a.pid,br.bname projectName,
 		pr.plan ,pr.next_plan nextPlan ,pr.expected_effect expectedEffect
 		<if test="businessProjectId != null and businessProjectId != ''"><!--  客户甲项目A所有的跟进记录 -->
 			,e.id as ufbId,e.follow_situation as followSituation,e.customer_status as customerStatus
 		</if>
 		from user_follow a left join user b on a.uid = b.id left join organization_contact_book c on a.ocb_id = c.id
 		left join admin d on a.aid = d.id left join public_release_details prd on a.id =prd.ufid
+		left join business_project br on a.pid=br.id
 		left join public_release pr on prd.prid=pr.id
 		<if test="businessProjectId != null and businessProjectId != ''"><!--  客户甲项目A所有的跟进记录 -->
 			inner join user_follow_business e on a.id = e.follow_id

+ 30 - 0
src/main/java/com/goafanti/customer/bo/FollowListBo.java

@@ -55,6 +55,36 @@ public class FollowListBo {
 	private String nextPlan;
 	private String expectedEffect;
 
+	private Integer type;
+
+	private String pid;
+
+	private String projectName;
+
+	public Integer getType() {
+		return type;
+	}
+
+	public void setType(Integer type) {
+		this.type = type;
+	}
+
+	public String getPid() {
+		return pid;
+	}
+
+	public void setPid(String pid) {
+		this.pid = pid;
+	}
+
+	public String getProjectName() {
+		return projectName;
+	}
+
+	public void setProjectName(String projectName) {
+		this.projectName = projectName;
+	}
+
 	public String getPlan() {
 		return plan;
 	}

+ 2 - 2
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -513,7 +513,7 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * **/
 	@RequestMapping(value = "/addFollow", method = RequestMethod.POST)
 	public Result addFollow(String userBusinessList,String uid,String ocbId,String contactType,
-							String result,String followTime,Integer type)  throws BusinessException{
+							String result,String followTime,Integer type,String pid)  throws BusinessException{
 		Result res = res();
 		if(StringUtils.isBlank(uid) || StringUtils.isBlank(ocbId)){
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, ""));
@@ -542,7 +542,7 @@ public class AdminCustomerApiController extends BaseApiController{
 		fbb.setResult(result);
 		fbb.setFollowTime(followTime);
 		fbb.setUserBusinessList(list);
-		customerService.addFollow(fbb,null,1,type);
+		customerService.addFollow(fbb,null,1,type,pid);
 		return res.data(1);
 	}
 

+ 1 - 1
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -174,7 +174,7 @@ public interface CustomerService {
 	 * @param fbb
 	 * @param mainStatus 0辅助跟进 1主要跟进
 	 */
-	int addFollow(FollowBusinessBo fbb,String ufid,Integer mainStatus,Integer type) throws BusinessException;
+	int addFollow(FollowBusinessBo fbb,String ufid,Integer mainStatus,Integer type,String pid) throws BusinessException;
 
 
 

+ 2 - 1
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -776,7 +776,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 	@Transactional
 	@Override
-	public int addFollow(FollowBusinessBo fbb,String ufid,Integer mainStatus,Integer type) throws BusinessException {
+	public int addFollow(FollowBusinessBo fbb,String ufid,Integer mainStatus,Integer type,String pid) throws BusinessException {
 		// 更新跟进记录表
 		Date followTime=DateUtils.StringToDate(fbb.getFollowTime(),AFTConstants.YYYYMMDDHHMMSS);
 		UserFollow userFollow = new UserFollow();
@@ -796,6 +796,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		int followCount = userBusinessMapper.selectFollowCountByUAid(fbb.getUid(), null) + 1;
 		userFollow.setFollowCount(followCount);
 		userFollow.setType(type);
+		if (StringUtils.isNotBlank(pid))userFollow.setPid(pid);
 		userFollowMapper.insert(userFollow);
 		if (type==0){
 			//处理中间表

+ 26 - 0
src/main/java/com/goafanti/user/bo/outUserFollowList.java

@@ -34,9 +34,35 @@ public class outUserFollowList {
     private Integer province;
     private Integer city;
     private Integer area;
+    private Integer type;
+    private String pid;
+    private String projectName;
     private String intendedProject;
     private String businessScope;
 
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getPid() {
+        return pid;
+    }
+
+    public void setPid(String pid) {
+        this.pid = pid;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
 
     public String getContacts() {
         return contacts;

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

@@ -1151,7 +1151,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 							fbb.setFollowTime(DateUtils.formatDate(prd.getClockInTime(), AFTConstants.YYYYMMDDHHMMSS));
 							String ufid = UUID.randomUUID().toString();
 							prd.setUfid(ufid);
-							customerService.addFollow(fbb, ufid, prd.getMainStatus(),0);
+							customerService.addFollow(fbb, ufid, prd.getMainStatus(),0,null);
 							if (clockIn==1){
 								str = "公出人员打卡";
 							}else if (clockIn==2) {