Bladeren bron

新增搜索条件

wanghui 8 jaren geleden
bovenliggende
commit
cbf8cb47bd

+ 12 - 0
src/main/java/com/goafanti/common/mapper/CustomerMapper.xml

@@ -561,6 +561,12 @@
    	<if test="adminName != null and adminName != ''">
    	 	and e.name like concat('%',#{adminName,jdbcType=VARCHAR},'%')
    	</if>
+   	<if test="startDate != null and startDate != ''">
+   	 	and  b.follow_date &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
+   	</if>
+   	<if test="endDate != null and endDate != ''">
+   	 	and  b.follow_date &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
+   	</if>
    	order by a.create_time desc
    	<if test="page_sql!=null">
 		${page_sql}
@@ -616,6 +622,12 @@
    	<if test="adminName != null and adminName != ''">
    	 	and e.name like concat('%',#{adminName,jdbcType=VARCHAR},'%')
    	</if>
+   	<if test="startDate != null and startDate != ''">
+   	 	and  b.follow_date &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
+   	</if>
+   	<if test="endDate != null and endDate != ''">
+   	 	and  b.follow_date &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
+   	</if>
   </select>
   
   <select id="selectCustomerById" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerOut">

+ 7 - 1
src/main/java/com/goafanti/common/utils/ExcelUtils.java

@@ -12,6 +12,7 @@ import java.util.Set;
 import java.util.TreeSet;
 
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -41,7 +42,12 @@ public class ExcelUtils {
 			cin.setCustomerStatus(checkCustomerStatus(cellIterator.next().getStringCellValue(), rowNumber));	
 			cin.setCompanyIntention(checkCompanyIntention(cellIterator.next().getStringCellValue(), rowNumber));
 			cin.setContactName(checkOther(cellIterator.next().getStringCellValue(),rowNumber));
-			cin.setContactTel(checkOther(df.format(cellIterator.next().getNumericCellValue()), rowNumber));
+			Cell phoneCell = cellIterator.next();
+			if(phoneCell.getCellTypeEnum() == CellType.NUMERIC) {
+				cin.setContactTel(checkOther(df.format(phoneCell.getNumericCellValue()), rowNumber));
+			}else if(phoneCell.getCellTypeEnum() == CellType.STRING){
+				cin.setContactTel(checkOther(phoneCell.getStringCellValue(), rowNumber));
+			}
 			if(checkRepeat(cin, result)) repeatRows.add(rowNumber);
 			result.add(cin);
 		}

+ 22 - 0
src/main/java/com/goafanti/customer/bo/CustomerIn.java

@@ -86,6 +86,12 @@ public class CustomerIn {
 	/** 备注 **/
 	private String remarks;
 	
+	/** 资料录入开始时间 **/
+	private String startDate;
+	
+	/** 资料录入结束时间 **/
+	private String endDate;
+	
 	public String getCuid() {
 		return cuid;
 	}
@@ -312,4 +318,20 @@ public class CustomerIn {
 	public void setRemarks(String remarks) {
 		this.remarks = remarks;
 	}
+
+	public String getStartDate() {
+		return startDate;
+	}
+
+	public void setStartDate(String startDate) {
+		this.startDate = startDate;
+	}
+
+	public String getEndDate() {
+		return endDate;
+	}
+
+	public void setEndDate(String endDate) {
+		this.endDate = endDate;
+	}
 }

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

@@ -101,6 +101,7 @@ public class AdminCustomerApiController extends BaseApiController {
 		fur.setCid(customerId);//跟进记录表中的cid
 		fur.setCuid(customerUserId);//跟进记录表中的联系人id
 		fur.setAid(TokenManager.getAdminId());
+		fur.setEffective(0);
 		if(res.getError().size()>0) return res;
 		customerService.addCustomer(cus,cui,fur);
 		//添加日志

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

@@ -162,6 +162,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
 		if(StringUtils.isNotBlank(cin.getContactTel())) params.put("contactTel", cin.getContactTel());
 		if(StringUtils.isNotBlank(cin.getLocationProvince())) params.put("locationProvince", cin.getLocationProvince());
 		if(StringUtils.isNotBlank(cin.getCompanyName())) params.put("companyName", cin.getCompanyName());
+		if(StringUtils.isNotBlank(cin.getStartDate())) params.put("startDate", cin.getStartDate()+" 00:00:00");
+		if(StringUtils.isNotBlank(cin.getEndDate())) params.put("endDate", cin.getEndDate()+" 23:59:59");
 		return params;
 	}
 	private List<CustomerOut> setResult(List<CustomerOut> list){

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

@@ -54,7 +54,7 @@ session.validate.timespan=18000000
 app.name=AFT
 template.cacheable=false
 
-static.host=//sb.jishutao.com/1.0.49
+static.host=//sb.jishutao.com/1.0.50
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.host=//sb.jishutao.com
 avatar.upload.host=//sb.jishutao.com/upload

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

@@ -54,7 +54,7 @@ session.validate.timespan=18000000
 app.name=AFT
 template.cacheable=false
 
-static.host=//static.jishutao.com/1.0.49
+static.host=//static.jishutao.com/1.0.50
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload