Просмотр исходного кода

1、修改打卡新增跟进状态;2、修改渠道客户用户表状态;3、修改专利买卖计算逻辑。4、专利列表修改
5、客户主营产品列表

anderx лет назад: 4
Родитель
Сommit
d58e8ad119
21 измененных файлов с 545 добавлено и 408 удалено
  1. 8 8
      src/main/java/com/goafanti/common/mapper/PatentNewMapper.xml
  2. 4 4
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml
  3. 45 34
      src/main/java/com/goafanti/common/mapper/UserFollowMapper.xml
  4. 11 1
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  5. 245 232
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml
  6. 11 3
      src/main/java/com/goafanti/customer/bo/CustomerListIn.java
  7. 11 1
      src/main/java/com/goafanti/customer/bo/FollowListBo.java
  8. 31 0
      src/main/java/com/goafanti/customer/bo/OutUserMianProducts.java
  9. 9 0
      src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
  10. 3 32
      src/main/java/com/goafanti/customer/service/CustomerService.java
  11. 14 19
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  12. 7 5
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  13. 9 3
      src/main/java/com/goafanti/organization/bo/ProjectTypePuls.java
  14. 25 17
      src/main/java/com/goafanti/patent/bo/PatentNewBo.java
  15. 4 4
      src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java
  16. 63 26
      src/main/java/com/goafanti/user/bo/InputUserFollowList.java
  17. 12 3
      src/main/java/com/goafanti/user/bo/outUserFollowList.java
  18. 11 0
      src/main/java/com/goafanti/user/controller/UserFollowController.java
  19. 11 12
      src/main/java/com/goafanti/user/service/impl/UserChannelServiceImpl.java
  20. 10 3
      src/main/java/com/goafanti/user/service/impl/UserFollowServiceImpl.java
  21. 1 1
      src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

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

@@ -453,11 +453,11 @@
 		<if test="type != null">
 			and a.type=#{type}
 		</if>
-		<if test="startDate != null and endDate != null">
-			and a.apply_date between #{startDate} and #{endDate}
+		<if test="startDates != null and endDates != null">
+			and a.apply_date between #{startDates} and #{endDates}
 		</if>
-		<if test="createStart != null and createEnd != null">
-			and a.create_time between #{createStart} and #{createEnd}
+		<if test="createStarts != null and createEnds != null">
+			and a.create_time between #{createStarts} and #{createEnds}
 		</if>
 		<if test="name != null">
 			and a.name like concat('%',#{name},'%')
@@ -518,11 +518,11 @@
 		<if test="type != null">
 			and a.type=#{type}
 		</if>
-		<if test="startDate != null and endDate != null">
-			and a.apply_date between #{startDate} and #{endDate}
+		<if test="startDates != null and endDates != null">
+			and a.apply_date between #{startDates} and #{endDates}
 		</if>
-		<if test="createStart != null and createEnd != null">
-			and a.create_time between #{createStart} and #{createEnd}
+		<if test="createStarts != null and createEnds != null">
+			and a.create_time between #{createStarts} and #{createEnds}
 		</if>
 		<if test="name != null">
 			and a.name like concat('%',#{name},'%')

+ 4 - 4
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -2156,9 +2156,9 @@ inner join department de on x.department_id=de.id left join business_category bc
 	</select>
 	
 	  <select id="selectByTidGetDtails" resultType="com.goafanti.organization.bo.ProjectTypePuls">
- select a.id,a.official_cost officialCost,a.cost_reduction costReduction ,a.commodity_quantity quantity ,a.patent_type patentType,b.patent_name_type projectType,
- c.amount officialAmount,c.proportion85 from t_order_task a left join t_order_outsource b on a.id=b.tid
-left join official_fee_price c on a.patent_type =c.patent_type and b.patent_name_type =c.`type`  
-where a.id= #{tid}
+        select a.id,a.official_cost officialCost,a.cost_reduction costReduction ,a.commodity_quantity quantity ,a.patent_type patentType,b.patent_name_type projectType,
+               c.amount officialAmount,c.proportion85,b.patent_type outPatentType from t_order_task a left join t_order_outsource b on a.id=b.tid
+                left join official_fee_price c on a.patent_type =c.patent_type and b.patent_name_type =c.`type`
+                where a.id= #{tid}
   </select>
 </mapper>

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

@@ -270,9 +270,13 @@
 	<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,c.name followName ,d.name followDep,a.`result` ,a.follow_count followCount,
-        a.guidance ,date_format(a.guidance_time,'%Y-%m-%d %H:%i:%s') guidanceTimes,a.guidance_name guidanceName
+        date_format(a.create_time ,'%Y-%m-%d %H:%i:%s')followTimes,a.guidance_name guidanceName,
+        a.guidance ,date_format(a.guidance_time,'%Y-%m-%d %H:%i:%s') guidanceTimes
         from user_follow a left join  `user`b on a.uid =b.id left join admin c on b.aid =c.id
         left join department d on c.department_id =d.id where 1=1
+        <if test="aid != null">
+          and a.aid= #{aid}
+        </if>
 		<if test="userName != null">
 		  and b.nickname like concat('%',#{userName},'%')
 		</if>
@@ -288,17 +292,18 @@
 		<if test="contactType != null">
 			and a.contact_type = #{contactType}
 		</if>
-		<if test="dateType !=null and startTime !=null and endTime !=null">
-		<if test="dateType ==1">
-		  and a.create_time between #{startTime} and #{endTime}
-		</if>
-		<if test="dateType ==2">
-		and b.transfer_time between #{startTime} and #{endTime}
-		</if>
-		<if test="dateType ==3">
-		and a.guidance_time between #{startTime} and #{endTime}
+		<if test="followStartTime !=null and followEndTime !=null">
+		    and a.create_time between #{followStartTime} and #{followEndTime}
+        </if>
+        <if test="createStartTime !=null and createEndTime !=null">
+		and b.transfer_time between #{createStartTime} and #{createEndTime}
 		</if>
+        <if test="guidanceStartTime !=null and guidanceEndTime !=null">
+		and a.guidance_time between #{guidanceStartTime} and #{guidanceEndTime}
 		</if>
+        <if test="depId != null">
+            and  c.department_id = #{depId}
+        </if>
 		order by  a.create_time desc
 		<if test="page_sql != null">
 			${page_sql}
@@ -308,29 +313,35 @@
 		select count(*)
 		from user_follow a left join  `user`b on a.uid =b.id left join admin c on b.aid =c.id
 		left join department d on c.department_id =d.id where 1=1
-		<if test="userName != null">
-			and b.nickname like concat('%',#{userName},'%')
-		</if>
-		<if test="userType == 1">
-			and b.share_type =0
-		</if>
-		<if test="userType == 2">
-			and b.share_type =2
-		</if>
-		<if test="userType == 3">
-			and b.channel =1
-		</if>
-		<if test="contactType != null">
-			and a.contact_type = #{contactType}
-		</if>
-		<if test="dateType !=null and startTime !=null and endTime !=null">
-			<if test="dateType ==1">
-				and a.create_time between #{startTime} and #{endTime}
-			</if><if test="dateType ==2">
-			and b.transfer_time between #{startTime} and #{endTime}
-		</if><if test="dateType ==3">
-			and a.guidance_time between #{startTime} and #{endTime}
-		</if>
-		</if>
+      <if test="aid != null">
+        and a.aid= #{aid}
+      </if>
+        <if test="userName != null">
+            and b.nickname like concat('%',#{userName},'%')
+        </if>
+        <if test="userType == 1">
+            and b.share_type =0
+        </if>
+        <if test="userType == 2">
+            and b.share_type =2
+        </if>
+        <if test="userType == 3">
+            and b.channel =1
+        </if>
+        <if test="contactType != null">
+            and a.contact_type = #{contactType}
+        </if>
+        <if test="followStartTime !=null and followEndTime !=null">
+            and a.create_time between #{followStartTime} and #{followEndTime}
+        </if>
+        <if test="createStartTime !=null and createEndTime !=null">
+            and b.transfer_time between #{createStartTime} and #{createEndTime}
+        </if>
+        <if test="guidanceStartTime !=null and guidanceEndTime !=null">
+            and a.guidance_time between #{guidanceStartTime} and #{guidanceEndTime}
+        </if>
+        <if test="depId != null">
+            and  c.department_id = #{depId}
+        </if>
 	</select>
 </mapper>

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

@@ -1766,5 +1766,15 @@
       and a.level = #{level,jdbcType=INTEGER}
     </if>
   </select>
-  
+  <select id="findMainProductsList" resultType="com.goafanti.customer.bo.OutUserMianProducts">
+    select u.id uid,u.nickname userName,oi.business_scope businessScope from (select b.buyer_id from t_order_task a left join t_order_new b
+        on a.order_no =b.order_no where a.main =1 and a.split_status in (0,1)
+        and a.task_receiver = #{aid} group by b.buyer_id)t0
+    left join `user` u left join organization_identity oi on u.id=oi.uid on t0.buyer_id =u.id where u.share_type in(0,2,3)
+  </select>
+  <select id="findMainProductsCount" resultType="java.lang.Integer">
+    select count(*) from (select b.buyer_id from t_order_task a left join t_order_new b on a.order_no =b.order_no
+        where a.main =1 and a.split_status in (0,1) and a.task_receiver = #{aid} group by b.buyer_id)t0
+    left join `user` u left join organization_identity oi on u.id=oi.uid on t0.buyer_id =u.id where u.share_type in(0,2,3)
+  </select>
 </mapper>

Разница между файлами не показана из-за своего большого размера
+ 245 - 232
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml


+ 11 - 3
src/main/java/com/goafanti/customer/bo/CustomerListIn.java

@@ -69,9 +69,17 @@ public class CustomerListIn {
 	private Integer sort;
 	/** 渠道 0否 1是 */
 	private Integer channel;
-	
-	
-	
+
+	private String businessScope;
+
+	public String getBusinessScope() {
+		return businessScope;
+	}
+
+	public void setBusinessScope(String businessScope) {
+		this.businessScope = businessScope;
+	}
+
 	public String getType() {
 		return type;
 	}

+ 11 - 1
src/main/java/com/goafanti/customer/bo/FollowListBo.java

@@ -44,7 +44,17 @@ public class FollowListBo {
 	private String  guidance;
 	/** 指导时间 **/
 	private String guidanceTime;
-	
+
+	private String guidanceName;
+
+	public String getGuidanceName() {
+		return guidanceName;
+	}
+
+	public void setGuidanceName(String guidanceName) {
+		this.guidanceName = guidanceName;
+	}
+
 	public String getFollowId() {
 		return followId;
 	}

+ 31 - 0
src/main/java/com/goafanti/customer/bo/OutUserMianProducts.java

@@ -0,0 +1,31 @@
+package com.goafanti.customer.bo;
+
+public class OutUserMianProducts {
+    private String uid;
+    private String userName;
+    private String businessScope;
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getBusinessScope() {
+        return businessScope;
+    }
+
+    public void setBusinessScope(String businessScope) {
+        this.businessScope = businessScope;
+    }
+}

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

@@ -1373,6 +1373,15 @@ public class AdminCustomerApiController extends BaseApiController{
 		res.data(customerService.listUserName(uid));
 		return res;
 	}
+
+	/** 客户主营产品列表 **/
+	@RequestMapping(value = "/mainProductsList", method = RequestMethod.GET)
+	public Result mainProductsList(Integer pageNo,Integer pageSize){
+		Result res = new Result();
+
+		res.data(customerService.mainProductsList(pageNo,pageSize));
+		return res;
+	}
 }
 
 

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

@@ -6,6 +6,7 @@ import java.util.List;
 import java.util.Set;
 
 
+import com.goafanti.customer.bo.*;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
 import com.goafanti.common.bo.userDaysBo;
@@ -14,38 +15,18 @@ import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.User;
 import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.customer.bo.BusinessListBo;
-import com.goafanti.customer.bo.BussinessFollowBo;
-import com.goafanti.customer.bo.CustomerExcelBo;
-import com.goafanti.customer.bo.CustomerListIn;
-import com.goafanti.customer.bo.CustomerListOut;
-import com.goafanti.customer.bo.CustomerOrganizationDetailBo;
-import com.goafanti.customer.bo.CustomerPersonalDetailBo;
-import com.goafanti.customer.bo.CustomerSimpleBo;
-import com.goafanti.customer.bo.FollowBusinessBo;
-import com.goafanti.customer.bo.FollowListBo;
-import com.goafanti.customer.bo.InputChannelCounts;
-import com.goafanti.customer.bo.InputListChannel;
-import com.goafanti.customer.bo.LockingReleaseBo;
-import com.goafanti.customer.bo.StatisticBo;
-import com.goafanti.customer.bo.UserNamesListBo;
-import com.goafanti.customer.bo.transferListBo;
 
 public interface CustomerService {
 	/**
 	 * 私有个人客户列表查询
-	 * @param cin
 	 * @param pageSize
-	 * @param pageNumber
 	 * @return
 	 */
 	
 	Pagination<CustomerListOut> listPrivatePersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
 	/**
 	 * 公共个人客户列表查询
-	 * @param cin
 	 * @param pageSize
-	 * @param pageNumber
 	 * @return
 	 */
 	Pagination<CustomerListOut> listPublicPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
@@ -53,35 +34,27 @@ public interface CustomerService {
 	
 	/**
 	 * 所有个人客户列表查询
-	 * @param cin
 	 * @param pageSize
-	 * @param pageNumber
 	 * @return
 	 */
 	Pagination<CustomerListOut> listAllPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
 	
 	/**
 	 * 管理个人客户查询(所属人同部门客户管理)
-	 * @param cin
 	 * @param pageSize
-	 * @param pageNumber
 	 * @return
 	 */
 	Pagination<CustomerListOut> listAllManagePersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
 	
 	/**
 	 * 私有单位客户列表查询
-	 * @param cin
-	 * @param type 0私有列表 1指导列表
 	 * @return
 	 */
 	Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli,Integer sort,Integer sortType,Integer power, Integer pageNo, Integer pageSize);
 	
 	/**
 	 * 公共单位客户列表查询
-	 * @param cin
 	 * @param pageSize
-	 * @param pageNumber
 	 * @return
 	 */
 	Pagination<CustomerListOut> listPublicOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
@@ -89,18 +62,14 @@ public interface CustomerService {
 	
 	/**
 	 * 所有单位客户列表查询
-	 * @param cin
 	 * @param pageSize
-	 * @param pageNumber
 	 * @return
 	 */
 	Pagination<CustomerListOut> listAllOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
 	
 	/**
 	 * 管理单位客户列表查询
-	 * @param cin
 	 * @param pageSize
-	 * @param pageNumber
 	 * @return
 	 */
 	Pagination<CustomerListOut> listAllManageOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
@@ -570,4 +539,6 @@ public interface CustomerService {
 	List<UserNamesListBo> listUserName(String uid);
 	boolean checkUserName(String userName);
 	Object getUserByNames(String name, Integer pageNo, Integer pageSize);
+
+	Pagination<OutUserMianProducts> mainProductsList(Integer pageNo,Integer pageSize);
 }

+ 14 - 19
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -15,6 +15,7 @@ import java.util.UUID;
 
 import javax.annotation.Resource;
 
+import com.goafanti.customer.bo.*;
 import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.ibatis.builder.BuilderException;
@@ -77,22 +78,6 @@ import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.customer.bo.BusinessListBo;
-import com.goafanti.customer.bo.BussinessFollowBo;
-import com.goafanti.customer.bo.CustomerExcelBo;
-import com.goafanti.customer.bo.CustomerListIn;
-import com.goafanti.customer.bo.CustomerListOut;
-import com.goafanti.customer.bo.CustomerOrganizationDetailBo;
-import com.goafanti.customer.bo.CustomerPersonalDetailBo;
-import com.goafanti.customer.bo.CustomerSimpleBo;
-import com.goafanti.customer.bo.FollowBusinessBo;
-import com.goafanti.customer.bo.FollowListBo;
-import com.goafanti.customer.bo.InputChannelCounts;
-import com.goafanti.customer.bo.InputListChannel;
-import com.goafanti.customer.bo.LockingReleaseBo;
-import com.goafanti.customer.bo.StatisticBo;
-import com.goafanti.customer.bo.UserNamesListBo;
-import com.goafanti.customer.bo.transferListBo;
 import com.goafanti.customer.service.CustomerService;
 import com.goafanti.user.bo.OutUserChannel;
 
@@ -325,6 +310,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			params.put("sort", cli.getSort());
 		if (null != cli.getChannel())
 			params.put("channel", cli.getChannel());
+		if (null != cli.getBusinessScope())
+			params.put("businessScope", cli.getBusinessScope());
 		return params;
 	}
 
@@ -792,7 +779,6 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	/**
 	 * 跟进更新用户中间表
 	 * 
-	 * @param ub
 	 */
 	private void followProject(String uid, int x) {
 		Date date = new Date();
@@ -1763,7 +1749,6 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	/**
 	 * 处理需要释放
 	 * 
-	 * @param list
 	 */
 	@Override
 	public void updateReleaseLock(Date releaseTime) {
@@ -1803,7 +1788,9 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		cli.setType(AFTConstants.USER_TYPE_ORGANIZATION);
 		cli.setAid(TokenManager.getAdminId());
 //			cli.setAid("1");
-		cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PRIVATE));
+		if (cli.getShareType()==null){
+			cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PRIVATE));
+		}
 		Map<String, Object> params = disposeParams(cli);
 		return (Pagination<CustomerListIn>) findPage("selectCustomerInformationList", "selectCustomerInformationCount",
 				params, pageNo, pageSize);
@@ -2220,6 +2207,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return  findPage("getUserByNameList", "getUserByNameCount", params, pageNo,pageSize);
 	}
 
+
+
 	@Override
 	public int updateUserName(String uid, String userName) {
 		userNamesMapper.updateAddUserName(uid,userName);
@@ -2246,6 +2235,12 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return list;
 	}
 
+	@Override
+	public Pagination<OutUserMianProducts> mainProductsList(Integer pageNo,Integer pageSize) {
+		Map<String,Object> map =new HashMap<>();
+		map.put("aid",TokenManager.getAdminId());
+		return (Pagination<OutUserMianProducts>) findPage("findMainProductsList","findMainProductsCount",map,pageNo,pageSize);
+	}
 
 
 	

+ 7 - 5
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -1360,11 +1360,13 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 		if(type==1) {
 			ProjectTypePuls tt=tOrderTaskMapper.selectByTidGetDtails(tid);
-			if (tt.getOfficialCost()==1) {
-				if (tt.getCostReduction()==1) {
-					tCount=tCount.add(tt.getProportion85().multiply(new BigDecimal(tt.getQuantity())));
-				}else {
-					tCount=tCount.add(tt.getOfficialAmount().multiply(new BigDecimal(tt.getQuantity())));
+			if (tt.getOutPatentType()==0){
+				if (tt.getOfficialCost()==1) {
+					if (tt.getCostReduction()==1) {
+						tCount=tCount.add(tt.getProportion85().multiply(new BigDecimal(tt.getQuantity())));
+					}else {
+						tCount=tCount.add(tt.getOfficialAmount().multiply(new BigDecimal(tt.getQuantity())));
+					}
 				}
 			}
 		}

+ 9 - 3
src/main/java/com/goafanti/organization/bo/ProjectTypePuls.java

@@ -12,10 +12,16 @@ public class ProjectTypePuls {
 	private Integer costReduction;
 	private Integer quantity;
 	private Integer officialCost;
-	
-	
+	private Integer outPatentType;
+
+	public Integer getOutPatentType() {
+		return outPatentType;
+	}
+
+	public void setOutPatentType(Integer outPatentType) {
+		this.outPatentType = outPatentType;
+	}
 
-	
 	public Integer getId() {
 		return id;
 	}

+ 25 - 17
src/main/java/com/goafanti/patent/bo/PatentNewBo.java

@@ -63,11 +63,11 @@ public class PatentNewBo extends PatentNew{
 	private String inputDep;
 	private String followDep;
 	private String updateTimes;
-	private String startDate;
+	private String startDates;
 	private String endDates;
 	private String departmentId;
-	private String createStart;
-	private String createEnd;
+	private String createStarts;
+	private String createEnds;
 	private Integer isFollow;
 
 	public String getFollowDep() {
@@ -206,12 +206,7 @@ public class PatentNewBo extends PatentNew{
 	public void setUpdateTimes(String updateTimes) {
 		this.updateTimes = updateTimes;
 	}
-	public String getStartDate() {
-		return startDate;
-	}
-	public void setStartDate(String startDate) {
-		this.startDate = startDate;
-	}
+
 	public String getEndDates() {
 		return endDates;
 	}
@@ -236,18 +231,31 @@ public class PatentNewBo extends PatentNew{
 	public void setUserName(String userName) {
 		this.userName = userName;
 	}
-	public String getCreateStart() {
-		return createStart;
+
+	public String getStartDates() {
+		return startDates;
+	}
+
+	public void setStartDates(String startDates) {
+		this.startDates = startDates;
+	}
+
+	public String getCreateStarts() {
+		return createStarts;
 	}
-	public void setCreateStart(String createStart) {
-		this.createStart = createStart;
+
+	public void setCreateStarts(String createStarts) {
+		this.createStarts = createStarts;
 	}
-	public String getCreateEnd() {
-		return createEnd;
+
+	public String getCreateEnds() {
+		return createEnds;
 	}
-	public void setCreateEnd(String createEnd) {
-		this.createEnd = createEnd;
+
+	public void setCreateEnds(String createEnds) {
+		this.createEnds = createEnds;
 	}
+
 	public String getSalesmanName() {
 		return salesmanName;
 	}

+ 4 - 4
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -212,10 +212,10 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 		if(p.getAname()!=null)params.put("aname", p.getAname());
 		if(p.getPatentNo()!=null)params.put("patentNo", p.getPatentNo());
 		if(p.getDepartmentId()!=null)params.put("departmentId", p.getDepartmentId());
-		if(p.getStartDate()!=null)params.put("startDate", p.getStartDate());
-		if(p.getEndDate()!=null)params.put("endDate", p.getEndDate());
-		if(p.getCreateStart()!=null)params.put("createStart", p.getCreateStart());
-		if(p.getCreateEnd()!=null)params.put("createEnd", p.getCreateEnd()+" 23:59:59");
+		if(p.getStartDates()!=null)params.put("startDates", p.getStartDates());
+		if(p.getEndDates()!=null)params.put("endDates", p.getEndDates()+" 23:59:59");
+		if(p.getCreateStarts()!=null)params.put("createStarts", p.getCreateStarts());
+		if(p.getCreateEnds()!=null)params.put("createEnds", p.getCreateEnds()+" 23:59:59");
 		if(p.getType()!=null)params.put("type", p.getType());
 		if(p.getDepName()!=null)params.put("depName", p.getDepName());
 		if(p.getAnnualFeeStatus()!=null)params.put("annualFeeStatus", p.getAnnualFeeStatus());

+ 63 - 26
src/main/java/com/goafanti/user/bo/InputUserFollowList.java

@@ -6,12 +6,72 @@ public class InputUserFollowList {
     /* 0所有 1私有客户2签单客户3渠道客户*/
     private Integer userType;
     private Integer contactType;
-    private Integer dateType;
-    private String startTime;
-    private String endTime;
+    private String followStartTime;
+    private String followEndTime;
+    private String createStartTime;
+    private String createEndTime;
+    private String guidanceStartTime;
+    private String guidanceEndTime;
+    private String depId;
     private Integer pageSize;
     private Integer pageNo;
 
+    public String getFollowStartTime() {
+        return followStartTime;
+    }
+
+    public void setFollowStartTime(String followStartTime) {
+        this.followStartTime = followStartTime;
+    }
+
+    public String getFollowEndTime() {
+        return followEndTime;
+    }
+
+    public void setFollowEndTime(String followEndTime) {
+        this.followEndTime = followEndTime;
+    }
+
+    public String getCreateStartTime() {
+        return createStartTime;
+    }
+
+    public void setCreateStartTime(String createStartTime) {
+        this.createStartTime = createStartTime;
+    }
+
+    public String getCreateEndTime() {
+        return createEndTime;
+    }
+
+    public void setCreateEndTime(String createEndTime) {
+        this.createEndTime = createEndTime;
+    }
+
+    public String getGuidanceStartTime() {
+        return guidanceStartTime;
+    }
+
+    public void setGuidanceStartTime(String guidanceStartTime) {
+        this.guidanceStartTime = guidanceStartTime;
+    }
+
+    public String getGuidanceEndTime() {
+        return guidanceEndTime;
+    }
+
+    public void setGuidanceEndTime(String guidanceEndTime) {
+        this.guidanceEndTime = guidanceEndTime;
+    }
+
+    public String getDepId() {
+        return depId;
+    }
+
+    public void setDepId(String depId) {
+        this.depId = depId;
+    }
+
     public Integer getPageSize() {
         return pageSize;
     }
@@ -52,27 +112,4 @@ public class InputUserFollowList {
         this.contactType = contactType;
     }
 
-    public Integer getDateType() {
-        return dateType;
-    }
-
-    public void setDateType(Integer dateType) {
-        this.dateType = dateType;
-    }
-
-    public String getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(String startTime) {
-        this.startTime = startTime;
-    }
-
-    public String getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(String endTime) {
-        this.endTime = endTime;
-    }
 }

+ 12 - 3
src/main/java/com/goafanti/user/bo/outUserFollowList.java

@@ -5,14 +5,13 @@ import com.goafanti.common.utils.excel.Excel;
 public class outUserFollowList {
     @Excel(name = "客户名称")
     private String nickname;
-    @Excel(name = "客户类型" ,readConverterExp = "0=私有,1=公共,2签单")
+    @Excel(name = "客户类型" ,readConverterExp = "0=私有,1=公共,2=签单,3=渠道")
     private Integer shareType;
-    @Excel(name = "渠道" ,readConverterExp = "0=否,1=是")
     private Integer channel;
     private String id;
     @Excel(name = "客户初始时间")
     private String startTimes;
-    @Excel(name = "跟进方式",readConverterExp = "0=外出,1=电话,2=QQ,3=微信,4=邮件")
+    @Excel(name = "跟进方式",readConverterExp = "0=外出,1=电话,2=QQ,3=微信,4=邮件,5=公出打卡")
     private Integer contactType;
     @Excel(name = "跟进人")
     private String followName;
@@ -20,6 +19,8 @@ public class outUserFollowList {
     private String followDep;
     @Excel(name = "跟进说明")
     private String result;
+    @Excel(name = "跟进时间")
+    private String followTimes;
     @Excel(name = "跟进次数")
     private Integer followCount;
     @Excel(name = "指导人")
@@ -29,6 +30,14 @@ public class outUserFollowList {
     @Excel(name = "指导时间")
     private String guidanceTimes;
 
+    public String getFollowTimes() {
+        return followTimes;
+    }
+
+    public void setFollowTimes(String followTimes) {
+        this.followTimes = followTimes;
+    }
+
     public String getGuidanceName() {
         return guidanceName;
     }

+ 11 - 0
src/main/java/com/goafanti/user/controller/UserFollowController.java

@@ -22,12 +22,23 @@ public class UserFollowController extends BaseApiController {
     @Value(value = "${upload.path}")
     private String	uploadPath			= null;
 
+    /**
+     * 用户跟进列表
+     * @param in
+     * @return
+     */
     @RequestMapping(value = "/userFollowList", method = RequestMethod.GET)
     public Result  userFollowList(InputUserFollowList in){
         Result res =new Result();
         res.data(userFollowService.userFollowList(in));
         return res;
     }
+
+    /**
+     * 导出用户跟进列表
+     * @param in
+     * @return
+     */
     @RequestMapping(value = "/userFollowListExport", method = RequestMethod.GET)
     public Result  userFollowListExport(InputUserFollowList in){
         Result res =new Result();

+ 11 - 12
src/main/java/com/goafanti/user/service/impl/UserChannelServiceImpl.java

@@ -204,7 +204,7 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
             String uid=UUID.randomUUID().toString();
             in.setAid(aid);
             in.setCreateTime(now.getTime());
-            in.setShareType(0);
+            in.setShareType(3);
             in.setPassword(passwordUtil.getEncryptPwd("123456", now.getTime()));
             User u=userMapper.selectByName(in.getUserName());
             if (checkUserName(in.getUserName())) {
@@ -225,17 +225,16 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
     			}
 //    			共享类型 0-私有 1-公共 2 签单 
     			if(u.getShareType()==0) {
-    				if(u.getChannel()==0) {
     					if(i==1)in.setStatus(ChannelStatus.YCZWDSY.getCode());
     					else in.setStatus(ChannelStatus.YCZBRSY.getCode());
-    				}else {
+    			}else if(u.getChannel()==3) {
     					UserChannel uc=userChannelMapper.selectByUid(u.getId());
-    					if(uc.getAid().equals(aid))
-    					in.setStatus(ChannelStatus.YCZWDQD.getCode());
-    					else in.setStatus(ChannelStatus.YCZBRQD.getCode());
-    				}
-    			}
-    			else if(u.getShareType()==1)in.setStatus(ChannelStatus.YCZGG.getCode());
+					if(uc.getAid().equals(aid)){
+						in.setStatus(ChannelStatus.YCZWDQD.getCode());
+					}else{
+						in.setStatus(ChannelStatus.YCZBRQD.getCode());
+					}
+				}else if(u.getShareType()==1)in.setStatus(ChannelStatus.YCZGG.getCode());
     			else if(u.getShareType()==2) {
     				if(i==1)in.setStatus(ChannelStatus.YCZWDQIAND.getCode());
     				else in.setStatus(ChannelStatus.YCZBRQIAND.getCode());
@@ -244,8 +243,8 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
     			list2.add(in);
     		}
 		}
-        //检查重复名称 
-        checkListName(list);
+        //检查重复名称
+		checkListName(list);
         checkListName(list2);
         checkListName(list3);
         //list成功录入 list2是已存在 list3是非法名称 3个处理方式不一样,
@@ -276,7 +275,7 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
 
 
 
-	private void checkListName(List<InputUserChannel> list) {
+	public  void checkListName (List<InputUserChannel> list) {
 		for (InputUserChannel in : list) {
         	int i=0;
 			for (InputUserChannel in2 : list) {

+ 10 - 3
src/main/java/com/goafanti/user/service/impl/UserFollowServiceImpl.java

@@ -4,9 +4,11 @@ import com.goafanti.common.dao.UserFollowMapper;
 import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.user.bo.InputUserFollowList;
 import com.goafanti.user.bo.outUserFollowList;
 import com.goafanti.user.service.UserFollowService;
+import jdk.nashorn.internal.parser.Token;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.terracotta.offheapstore.HashingMap;
@@ -31,10 +33,15 @@ public class UserFollowServiceImpl extends BaseMybatisDao<UserFollowMapper>  imp
         Map<String,Object>map=new HashMap<>();
         if (in.getUserName()!=null) map.put("userName", in.getUserName());
         if (in.getContactType()!=null) map.put("contactType", in.getContactType());
-        if (in.getDateType()!=null) map.put("dateType", in.getDateType());
         if (in.getUserType()!=null) map.put("userType", in.getUserType());
-        if (in.getStartTime()!=null) map.put("startTime", in.getStartTime());
-        if (in.getEndTime()!=null) map.put("endTime", in.getEndTime());
+        if (in.getFollowStartTime()!=null) map.put("followStartTime", in.getFollowStartTime());
+        if (in.getFollowEndTime()!=null) map.put("followEndTime", in.getFollowEndTime()+" 23:59:59");
+        if (in.getCreateStartTime()!=null) map.put("createStartTime", in.getCreateStartTime());
+        if (in.getCreateEndTime()!=null) map.put("createEndTime", in.getCreateEndTime()+" 23:59:59");
+        if (in.getGuidanceStartTime()!=null) map.put("guidanceStartTime", in.getGuidanceStartTime());
+        if (in.getGuidanceEndTime()!=null) map.put("guidanceEndTime", in.getGuidanceEndTime()+" 23:59:59");
+        if (in.getDepId() != null) map.put("depId",in.getDepId());
+        map.put("aid", TokenManager.getAdminId());
         return map;
     }
 

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

@@ -240,7 +240,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		if (use.getClockIn()==0) {
 			FollowBusinessBo fbb=new FollowBusinessBo();
 			fbb.setUid(use.getUid());
-			fbb.setContactType("0");
+			fbb.setContactType("5");
 			fbb.setResult(use.getRemarks());
 			OrganizationContactBook ub=organizationContactBookMapper.getMajor(use.getUid(),aid);
 			if (ub !=null) {