Browse Source

Merge branch 'test'

# Conflicts:
#	src/main/java/com/goafanti/common/constant/AFTConstants.java
anderx 2 years ago
parent
commit
8b1975424e

+ 1 - 1
src/main/java/com/goafanti/RD/service/impl/RDServiceImpl.java

@@ -87,7 +87,7 @@ public class RDServiceImpl extends BaseMybatisDao<RdDetailsMapper> implements RD
         param.put("RdNo", in.getRdNo());
         param.put("RdEnd", in.getRdEnd());
         param.put("RdName", in.getRdName());
-        if (TokenManager.hasRole(AFTConstants.SUPERADMIN)||TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_AUDITOR)||TokenManager.hasRole(AFTConstants.CED)){
+        if (TokenManager.hasRole(AFTConstants.SUPERADMIN)||TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_ASSISTANT)||TokenManager.hasRole(AFTConstants.CED)){
 
         }else {
             param.put("aid", TokenManager.getAdminId());

+ 3 - 3
src/main/java/com/goafanti/ambSystem/controller/AmbInvestApiController.java

@@ -41,7 +41,7 @@ public class AmbInvestApiController extends CertifyApiController {
 					ParamUtils.getParamName(in,bindingResult.getFieldError().getField())));
 			return res;
 		}
-		if(!TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)&&!TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_AUDITOR)){
+		if(!TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)&&!TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_ASSISTANT)){
 			in.setRoleType(0);
 			if (in.getMyAmbId()==null){
 				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"发起部门","发起部门"));
@@ -94,7 +94,7 @@ public class AmbInvestApiController extends CertifyApiController {
 	@RequestMapping(value="/updateTransfer",method = RequestMethod.POST)
 	public Result updateTransfer(InputAmbInvest in){
 		Result res =new Result();
-		if(!TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)&&!TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_AUDITOR)){
+		if(!TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)&&!TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_ASSISTANT)){
 			in.setRoleType(0);
 			if (in.getMyAmbId()==null){
 				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"发起部门","发起部门"));
@@ -141,7 +141,7 @@ public class AmbInvestApiController extends CertifyApiController {
 	@RequestMapping(value="/getInvestAmbList",method = RequestMethod.GET)
 	public Result getInvestAmbList(Long id){
 		Result res =new Result();
-		if (TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)||TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_AUDITOR)){
+		if (TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)||TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_ASSISTANT)){
 			if (id==null)id=1L;
 		}
 		if (id==null){

+ 1 - 1
src/main/java/com/goafanti/common/constant/AFTConstants.java

@@ -21,7 +21,7 @@ public class AFTConstants {
 	/**	特批决策者 */
 	public static final String	APPROVAL_DECISION					= "99999";
 	/**	特批决策者审核 */
-	public static final String	APPROVAL_DECISION_AUDITOR			= "99989";
+	public static final String	APPROVAL_DECISION_ASSISTANT				= "99989";
 	/**	总裁 */
 	public static final String	CED									= "99998";
 	/**	总裁助理 */

+ 1 - 1
src/main/java/com/goafanti/common/controller/BaseController.java

@@ -173,7 +173,7 @@ public class BaseController {
 		if (TokenManager.hasRole(AFTConstants.OPERATION_MANAGER))str=str.append(11).append(",");
 		if (TokenManager.hasRole(AFTConstants.CED_ASSISTANT))str=str.append(12).append(",");
 		if (TokenManager.hasRole(AFTConstants.CED))str=str.append(13).append(",");
-		if (TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_AUDITOR))str=str.append(14).append(",");
+		if (TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_ASSISTANT))str=str.append(14).append(",");
 		if (TokenManager.hasRole(AFTConstants.APPROVAL_DECISION))str=str.append(15).append(",");
 		if (str.length()<1)return "";
 		String shiroList=str.substring(0,str.length()-1);

+ 60 - 0
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1609,4 +1609,64 @@
     </if>
   </select>
 
+
+  <select id="selectUserLastSignList" resultType="com.goafanti.customer.bo.OutUserLastSignBo">
+    select a.share_type shareType ,a.nickname ,b.name ,c.contacts ,c.contact_mobile contactMobile,d.task_names taskNames ,
+    date_format(d.last_follow_time,'%Y-%m-%d %H:%i:%S')lastFollowTimeStr,
+    date_format(a.transfer_time,'%Y-%m-%d %H:%i:%S') transferTimeStr
+    from `user` a left join admin b on a.aid=b.id left join department dep on b.department_id =dep.id
+    left join organization_identity c on a.id=c.uid left join user_mid d on a.id=d.uid
+    where 1=1
+      and a.share_type in (0,2,3,4)
+      <if test="purview==0">
+      and dep.province in (11) is not true
+      </if>
+    <if test="purview==1">
+      and dep.province in (11)
+      and b.id in ('734092ad-6564-4021-b7ab-aab5af3a1537') is not true
+    </if>
+    <if test="nickname !=null">
+      and a.nickname like concat('%',#{nickname},'%')
+    </if>
+    <if test="shareType != null">
+      and a.share_type= #{shareType}
+    </if>
+    <if  test="aid !=null">
+      and a.aid= #{aid}
+    </if>
+    <if test="lastTime !=null">
+      and d.last_follow_time &lt; #{lastTime}
+    </if>
+    order by d.last_follow_time desc
+    <if test="page_sql !=null">
+      ${page_sql}
+    </if>
+  </select>
+  <select id="selectUserLastSignCount" resultType="java.lang.Integer">
+    select count(*)
+    from `user` a left join admin b on a.aid=b.id left join department dep on b.department_id =dep.id
+    left join user_mid d on a.id=d.uid
+    where 1=1
+    and a.share_type in (0,2,3,4)
+    <if test="purview==0">
+      and dep.province in (11) is not true
+    </if>
+    <if test="purview==1">
+      and dep.province in (11)
+      and b.id in ('734092ad-6564-4021-b7ab-aab5af3a1537') is not true
+    </if>
+    <if test="nickname !=null">
+      and a.nickname like concat('%',#{nickname},'%')
+    </if>
+    <if test="shareType != null">
+      and a.share_type= #{shareType}
+    </if>
+    <if  test="aid !=null">
+      and a.aid= #{aid}
+    </if>
+    <if test="lastTime !=null">
+      and d.last_follow_time &lt; #{lastTime}
+    </if>
+  </select>
+
 </mapper>

+ 31 - 36
src/main/java/com/goafanti/common/mapper/UserMidMapper.xml

@@ -44,32 +44,29 @@
     delete from user_mid
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.UserMid">
-    insert into user_mid (id, `uid`, aid,
-      last_follow_time, last_sign_time, create_time,
-      big_customer, update_aid, update_name,
-      date_update_time, channel_type, chargeback,
-      `member`, last_sales_type, last_follow_type,
-      follow_number, task_names, sign_number,
-      sign_amount, last_signing_time, first_signing_time,
-      follow_dep, follow_explain, follow_aname,
-      follow_aid)
-    values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
-      #{lastFollowTime,jdbcType=TIMESTAMP}, #{lastSignTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
-      #{bigCustomer,jdbcType=INTEGER}, #{updateAid,jdbcType=VARCHAR}, #{updateName,jdbcType=VARCHAR},
-      #{dateUpdateTime,jdbcType=TIMESTAMP}, #{channelType,jdbcType=INTEGER}, #{chargeback,jdbcType=INTEGER},
-      #{member,jdbcType=INTEGER}, #{lastSalesType,jdbcType=INTEGER}, #{lastFollowType,jdbcType=INTEGER},
-      #{followNumber,jdbcType=INTEGER}, #{taskNames,jdbcType=VARCHAR}, #{signNumber,jdbcType=INTEGER},
-      #{signAmount,jdbcType=DECIMAL}, #{lastSigningTime,jdbcType=DATE}, #{firstSigningTime,jdbcType=DATE},
-      #{followDep,jdbcType=VARCHAR}, #{followExplain,jdbcType=VARCHAR}, #{followAname,jdbcType=VARCHAR},
-      #{followAid,jdbcType=VARCHAR})
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.UserMid" useGeneratedKeys="true">
+    insert into user_mid (`uid`, aid, last_follow_time,
+      last_sign_time, create_time, big_customer,
+      update_aid, update_name, date_update_time,
+      channel_type, chargeback, `member`,
+      last_sales_type, last_follow_type, follow_number,
+      task_names, sign_number, sign_amount,
+      last_signing_time, first_signing_time, follow_dep,
+      follow_explain, follow_aname, follow_aid
+      )
+    values (#{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{lastFollowTime,jdbcType=TIMESTAMP},
+      #{lastSignTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{bigCustomer,jdbcType=INTEGER},
+      #{updateAid,jdbcType=VARCHAR}, #{updateName,jdbcType=VARCHAR}, #{dateUpdateTime,jdbcType=TIMESTAMP},
+      #{channelType,jdbcType=INTEGER}, #{chargeback,jdbcType=INTEGER}, #{member,jdbcType=INTEGER},
+      #{lastSalesType,jdbcType=INTEGER}, #{lastFollowType,jdbcType=INTEGER}, #{followNumber,jdbcType=INTEGER},
+      #{taskNames,jdbcType=VARCHAR}, #{signNumber,jdbcType=INTEGER}, #{signAmount,jdbcType=DECIMAL},
+      #{lastSigningTime,jdbcType=DATE}, #{firstSigningTime,jdbcType=DATE}, #{followDep,jdbcType=VARCHAR},
+      #{followExplain,jdbcType=VARCHAR}, #{followAname,jdbcType=VARCHAR}, #{followAid,jdbcType=VARCHAR}
+      )
   </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.UserMid">
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.UserMid" useGeneratedKeys="true">
     insert into user_mid
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
       <if test="uid != null">
         `uid`,
       </if>
@@ -144,9 +141,6 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
       <if test="uid != null">
         #{uid,jdbcType=VARCHAR},
       </if>
@@ -328,6 +322,7 @@
     where id = #{id,jdbcType=INTEGER}
   </update>
 
+
   <update id="updateByUid" parameterType="com.goafanti.common.model.UserMid">
     update user_mid
     <set>
@@ -441,7 +436,7 @@
 
   <select id="getUserTaskNames" resultType="java.lang.String">
     select group_concat(distinct b.commodity_name)task_names from t_order_new a
-    left join t_order_task b on a.order_no =b.order_no
+                                                                    left join t_order_task b on a.order_no =b.order_no
     where a.buyer_id = #{uid}
     group by  a.buyer_id
   </select>
@@ -450,7 +445,7 @@
            sum(a.total_amount)signAmount,count(*)signNumber
     from t_order_new a
     where a.delete_sign in (0,2) and a.process_status >4
-    and a.buyer_id= #{uid}
+      and a.buyer_id= #{uid}
     group by a.buyer_id
   </select>
 
@@ -465,9 +460,9 @@
     from user a left join user_mid b on a.id=b.uid  left join admin c on a.aid=c.id
     left join department d on c.department_id =d.id
     where a.share_type =2
-      <if test="userName != null">
-        and a.nickname like concat('%',#{userName},'%')
-      </if>
+    <if test="userName != null">
+      and a.nickname like concat('%',#{userName},'%')
+    </if>
     <if test="aid != null">
       and c.id =#{aid}
     </if>
@@ -634,12 +629,12 @@
 
   <select id="selectsignStatisticsOrderList" resultType="com.goafanti.order.bo.TOrderNewBo">
     select a.order_no as orderNo,a.create_time as createTime, date_format(a.sign_time,'%Y-%m-%d' ) as signDate,a.delete_sign deleteSign,
-           a.contract_no as contractNo, b.nickname as userName ,a.process_status as processStatus,a.total_amount as totalAmount,
-           a.order_status as orderStatus, a.liquidation_status as liquidationStatus,a.approval,c.salesman_name as salesmanName,c.project_type projectType,
-           dep.name as depName,c.finance_name as financeName,c.invoice_amount invoiceAmount,a.settlement_amount settlementAmount,
-           a.sales_type salesType, a.channel_id channelId ,a.other
+    a.contract_no as contractNo, b.nickname as userName ,a.process_status as processStatus,a.total_amount as totalAmount,
+    a.order_status as orderStatus, a.liquidation_status as liquidationStatus,a.approval,c.salesman_name as salesmanName,c.project_type projectType,
+    dep.name as depName,c.finance_name as financeName,c.invoice_amount invoiceAmount,a.settlement_amount settlementAmount,
+    a.sales_type salesType, a.channel_id channelId ,a.other
     from t_order_new a  left join `user` b on a.buyer_id=b.id left join t_order_mid c on a.order_no=c.order_no
-                        left join department dep on a.order_dep=dep.id
+    left join department dep on a.order_dep=dep.id
     where a.process_status &gt;4 and b.share_type =2 and a.delete_sign in(0,2)
     <if test="amountType != null">
       <if test="amountType == 1">

+ 1 - 1
src/main/java/com/goafanti/common/model/UserMid.java

@@ -60,7 +60,7 @@ public class UserMid implements Serializable {
     private Date dateUpdateTime;
 
     /**
-     * 渠道类别 1=政府部门,2=民主党派3=园区,4=民间组织,5=其他战略合作单位
+     * 渠道类别 1=其他,2=民主党派3=园区,4=民间组织,5=战略合作单位
      */
     private Integer channelType;
 

+ 16 - 0
src/main/java/com/goafanti/common/utils/DateUtils.java

@@ -7,6 +7,7 @@ import java.util.Calendar;
 import java.util.Date;
 
 
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.error.BusinessException;
 import org.apache.commons.lang3.time.DateFormatUtils;
 
@@ -511,4 +512,19 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
 			return null;
 		}
 	}
+
+	/**
+	 * 计算距离今天天数
+	 * @param dates
+	 * @return
+	 */
+	public static Integer sumDays(String dates) {
+		Date date = StringToDate(dates, AFTConstants.YYYYMMDDHHMMSS);
+		Date now=new Date();
+//		long sum=now.getTime()-date.getTime();
+//		long one =60*60*24*1000;
+//		int days= Math.toIntExact(sum / one);
+		int days=(int)((now.getTime()-date.getTime())/(1000*3600*24));
+		return days;
+	}
 }

+ 68 - 0
src/main/java/com/goafanti/customer/bo/InputSelectUserLastSignBo.java

@@ -0,0 +1,68 @@
+package com.goafanti.customer.bo;
+
+
+public class InputSelectUserLastSignBo {
+    private Integer shareType;
+    private String nickname;
+    private String aid;
+    private Integer daysType;
+    private String endTime;
+    private Integer pageSize;
+    private Integer pageNo;
+
+    public Integer getShareType() {
+        return shareType;
+    }
+
+    public void setShareType(Integer shareType) {
+        this.shareType = shareType;
+    }
+
+    public String getNickname() {
+        return nickname;
+    }
+
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public Integer getDaysType() {
+        return daysType;
+    }
+
+    public void setDaysType(Integer daysType) {
+        this.daysType = daysType;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public Integer getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(Integer pageNo) {
+        this.pageNo = pageNo;
+    }
+}

+ 73 - 0
src/main/java/com/goafanti/customer/bo/OutUserLastSignBo.java

@@ -0,0 +1,73 @@
+package com.goafanti.customer.bo;
+
+import com.goafanti.common.utils.excel.Excel;
+
+public class OutUserLastSignBo {
+
+    @Excel(name = "类型",readConverterExp = "0=私有,1=公共,2=签单,3=外联,4=渠道")
+    private Integer shareType;
+    @Excel(name = "客户名称")
+    private String nickname;
+    @Excel(name = "跟单人")
+    private String name;
+//    @Excel(name = "联系人")
+//    private String contacts;
+//    @Excel(name = "联系人电话")
+//    private String contactMobile;
+//    @Excel(name = "已签项目")
+//    private String taskNames;
+    @Excel(name = "最后跟进时间")
+    private String lastFollowTimeStr;
+    private String transferTimeStr;
+
+    @Excel(name = "未跟进天数")
+    private Integer days;
+
+    public String getTransferTimeStr() {
+        return transferTimeStr;
+    }
+
+    public void setTransferTimeStr(String transferTimeStr) {
+        this.transferTimeStr = transferTimeStr;
+    }
+
+    public Integer getDays() {
+        return days;
+    }
+
+    public void setDays(Integer days) {
+        this.days = days;
+    }
+
+    public Integer getShareType() {
+        return shareType;
+    }
+
+    public void setShareType(Integer shareType) {
+        this.shareType = shareType;
+    }
+
+    public String getNickname() {
+        return nickname;
+    }
+
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getLastFollowTimeStr() {
+        return lastFollowTimeStr;
+    }
+
+    public void setLastFollowTimeStr(String lastFollowTimeStr) {
+        this.lastFollowTimeStr = lastFollowTimeStr;
+    }
+}

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

@@ -1566,4 +1566,25 @@ public class AdminCustomerApiController extends BaseApiController{
 		res.setData(customerService.queryUserMax());
 		return res;
 	}
+
+	/**
+	 * 客户最后跟进列表
+	 * @param in
+	 * @return
+	 */
+	@RequestMapping(value = "/selectUserLastSign",method = RequestMethod.GET)
+	public Result selectUserLastSign (InputSelectUserLastSignBo in){
+		Result  res =new Result();
+		res.setData(customerService.selectUserLastSign(in));
+		return res;
+	}
+	/**
+	 * 客户最后跟进列表导出
+	 * @param in
+	 * @return
+	 */
+	@RequestMapping(value = "/selectUserLastSign/export",method = RequestMethod.GET)
+	public Result selectUserLastSignExport (InputSelectUserLastSignBo in){
+		return customerService.selectUserLastSignExport(in);
+	}
 }

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

@@ -6,6 +6,7 @@ import java.util.List;
 import java.util.Set;
 
 
+import com.goafanti.common.bo.Result;
 import com.goafanti.customer.bo.*;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
@@ -556,4 +557,8 @@ public interface CustomerService {
     boolean checkOrgCode(String orgCode);
 
     Integer queryUserMax();
+
+    Pagination<?> selectUserLastSign(InputSelectUserLastSignBo in);
+
+	Result selectUserLastSignExport(InputSelectUserLastSignBo in);
 }

+ 71 - 10
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -3,22 +3,16 @@ package com.goafanti.customer.service.impl;
 import java.lang.reflect.InvocationTargetException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
+import java.util.*;
 
 import javax.annotation.Resource;
 
 import com.goafanti.admin.bo.AdminListBo;
+import com.goafanti.common.bo.Result;
 import com.goafanti.common.dao.*;
 import com.goafanti.common.enums.*;
 import com.goafanti.common.model.*;
+import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.customer.bo.*;
 import com.goafanti.order.bo.TOrderNewBo;
 import org.apache.commons.beanutils.BeanUtils;
@@ -373,6 +367,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		if(in.getNewChannel()!=null)user.setNewChannel(in.getNewChannel());
 		user.setChannel(0);
 		passwordUtil.encryptPassword(user);
+		String aname = adminMapper.selectByPrimaryKey(TokenManager.getAdminId()).getName();
 		if (in.getType() == UserType.PERSONAL.getCode()) {
 			if (userMapper.checkUser("", "", in.getContactMobile(), in.getType(), null, null).size() > 0)
 				throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_EXIST, in.getName(), ""));
@@ -430,7 +425,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		// 新增企业联系人
 		OrganizationContactBook cob = new OrganizationContactBook();
 		cob.setAid(TokenManager.getAdminId());
-		cob.setAname(adminMapper.selectByPrimaryKey(TokenManager.getAdminId()).getName());
+		cob.setAname(aname);
 		cob.setId(UUID.randomUUID().toString());
 		cob.setPosition(in.getPosition());
 		cob.setUid(uid);
@@ -1403,6 +1398,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	}
 
 
+
+
 	/**
 	 * 处理中间表
 	 * @param aid
@@ -2737,4 +2734,68 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		diff1 = (int) ((endLong  - now.getTime()) / (24 * 3600 * 1000));
 		return diff1.toString();
 	}
+
+	@Override
+	public Pagination<OutUserLastSignBo> selectUserLastSign(InputSelectUserLastSignBo in) {
+		Map<String, Object> param = addParam(in);
+
+		Pagination<OutUserLastSignBo> p=(Pagination<OutUserLastSignBo>) findPage("selectUserLastSignList","selectUserLastSignCount",param,in.getPageNo(),in.getPageSize());
+		pushDays(p);
+		return p;
+	}
+	@Override
+	public Result selectUserLastSignExport(InputSelectUserLastSignBo in) {
+		Map<String, Object> param = addParam(in);
+		List<OutUserLastSignBo> list = (List<OutUserLastSignBo>) findList("selectUserLastSignList", param, 1, 99999);
+		pushDays(list);
+		NewExcelUtil<OutUserLastSignBo> excelUtil=new NewExcelUtil<>(OutUserLastSignBo.class);
+		return excelUtil.exportExcel(list,"用户最后跟进表",uploadPath);
+	}
+
+	private void pushDays(Pagination<OutUserLastSignBo> p) {
+		List<OutUserLastSignBo> list = (List<OutUserLastSignBo>) p.getList();
+		pushDays(list);
+	}
+
+	private void pushDays(List<OutUserLastSignBo> list) {
+		for (OutUserLastSignBo bo : list) {
+			String dates=null;
+			if (bo.getLastFollowTimeStr()!=null)dates=bo.getLastFollowTimeStr();
+			else dates=bo.getTransferTimeStr();
+			Integer days=DateUtils.sumDays(dates);
+			bo.setDays(days);
+		}
+	}
+
+	private Map<String, Object> addParam(InputSelectUserLastSignBo in) {
+		Map<String,Object> param=new HashMap<>();
+		Integer purview=null;
+		if (TokenManager.hasRole(AFTConstants.SUPERADMIN)||TokenManager.hasRole(AFTConstants.SUPERADMIN_ASSISTANT)){
+			purview=2;
+		} else if (TokenManager.hasRole(AFTConstants.CED_ASSISTANT)){
+			purview=0;
+		} else if (TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_ASSISTANT)) {
+			purview = 1;
+		}else {
+			throw new BusinessException("权限异常");
+		}
+		param.put("purview",purview);
+		if(in.getNickname()!=null)param.put("nickname",in.getNickname());
+		if(in.getAid()!=null)param.put("aid",in.getAid());
+		if(in.getShareType()!=null)param.put("shareType",in.getShareType());
+		if (in.getDaysType()!=null){
+			Calendar cal=Calendar.getInstance();
+			cal=DateUtils.setMidnight(cal);
+			if (in.getDaysType()==0)cal.add(Calendar.DATE,-29);
+			else if (in.getDaysType()==1)cal.add(Calendar.DATE,-59);
+			else if (in.getDaysType()==2)cal.add(Calendar.DATE,-89);
+			else if (in.getDaysType()==3)cal.add(Calendar.DATE,-179);
+			else if (in.getDaysType()==4)cal.add(Calendar.DATE,-364);
+			else if (in.getDaysType()==5)cal.add(Calendar.DATE,-729);
+			param.put("lastTime",DateUtils.formatDate(cal.getTime(),AFTConstants.YYYYMMDDHHMMSS));
+		}
+		return param;
+	}
+
+
 }

+ 1 - 1
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -499,7 +499,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 			List<String> types=new ArrayList<>();
 			//董事长加助理
 			types.add(AFTConstants.APPROVAL_DECISION);
-			types.add(AFTConstants.APPROVAL_DECISION_AUDITOR);
+			types.add(AFTConstants.APPROVAL_DECISION_ASSISTANT);
 			for (Admin admin : adminMapper.getAdminRoleTypesList(types)) {
 				aids.add(admin.getId());
 			}

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

@@ -809,7 +809,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		if (in.getSpecially()==3){
 			if (TokenManager.hasRole(AFTConstants.CED)){
 				params.put("manageType",0);
-			}else if (TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_AUDITOR)||TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)){
+			}else if (TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_ASSISTANT)||TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)){
 				params.put("manageType",1);
 			}else {
 				params.put("manageType",0);

+ 1 - 1
src/main/java/com/goafanti/order/service/impl/PushOrderService.java

@@ -123,7 +123,7 @@ public class PushOrderService {
                     break;
                 case 9:
 
-                    if((TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)||(TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_AUDITOR))&&status!=2)||
+                    if((TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)||(TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_ASSISTANT))&&status!=2)||
                             (TokenManager.hasRole(AFTConstants.FINANCE)&&status==2)){
                         flag=true;
                     }

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -52,7 +52,7 @@ yxjl_max=100
 amb.maxLvl=6
 
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.2.67
+static.host=//static.jishutao.com/1.2.69
 rd.static.host=//static.jishutao.com/RD/1.0.00
 #avatar.host=//172.16.0.255:3000
 #static.host=//172.16.0.255:3000/1.2.62

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -49,7 +49,7 @@ yxjl_max=100
 
 amb.maxLvl=6
 
-static.host=//static.jishutao.com/1.2.67
+static.host=//static.jishutao.com/1.2.69
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 rd.static.host=//static.jishutao.com/RD/1.0.00