Commit 479f66b1 by Administrator

Merge branch 'develop' into 'master'

Develop

See merge request 8timerv2/8timerapiv200!463
parents af8cac99 7746d1c1
...@@ -155,6 +155,12 @@ public class CrmClientData extends Model<CrmClientData> { ...@@ -155,6 +155,12 @@ public class CrmClientData extends Model<CrmClientData> {
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value = "微信")
private String wechat;
@ApiModelProperty(value = "产品")
private String product;
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
......
...@@ -579,6 +579,14 @@ public class CrmController { ...@@ -579,6 +579,14 @@ public class CrmController {
@RequestParam(required = false) String endCreateTime, @RequestParam(required = false) String endCreateTime,
@RequestParam(required = false) String startFollowTime, @RequestParam(required = false) String startFollowTime,
@RequestParam(required = false) String endFollowTime) { @RequestParam(required = false) String endFollowTime) {
if(endCreateTime != null) {
endCreateTime = endCreateTime.substring(0, 10)+" 23:59:59";
}
if(endFollowTime != null) {
endFollowTime = endFollowTime.substring(0, 10)+" 23:59:59";
}
Integer empNum = getEmpNum(userBean); Integer empNum = getEmpNum(userBean);
Integer orgCode = getOrgCode(userBean); Integer orgCode = getOrgCode(userBean);
List<CrmClientData> crmClientDatas = null; List<CrmClientData> crmClientDatas = null;
...@@ -1378,6 +1386,8 @@ public class CrmController { ...@@ -1378,6 +1386,8 @@ public class CrmController {
reader.addHeaderAlias("*客户名称(必填)", "clientName"); reader.addHeaderAlias("*客户名称(必填)", "clientName");
reader.addHeaderAlias("*所属分组(必填)", "belongGroupName"); reader.addHeaderAlias("*所属分组(必填)", "belongGroupName");
reader.addHeaderAlias("行业", "industryName"); reader.addHeaderAlias("行业", "industryName");
reader.addHeaderAlias("微信", "wechat");
reader.addHeaderAlias("产品", "product");
reader.addHeaderAlias("客户类型", "clientTypeName"); reader.addHeaderAlias("客户类型", "clientTypeName");
reader.addHeaderAlias("手机号码(客户)", "clientCellphone"); reader.addHeaderAlias("手机号码(客户)", "clientCellphone");
reader.addHeaderAlias("座机号码", "clientTelephone"); reader.addHeaderAlias("座机号码", "clientTelephone");
...@@ -1385,7 +1395,7 @@ public class CrmController { ...@@ -1385,7 +1395,7 @@ public class CrmController {
reader.addHeaderAlias("邮箱", "clientEmail"); reader.addHeaderAlias("邮箱", "clientEmail");
reader.addHeaderAlias("地址", "address"); reader.addHeaderAlias("地址", "address");
reader.addHeaderAlias("联系人姓名", "linkName"); reader.addHeaderAlias("联系人姓名", "linkName");
reader.addHeaderAlias("手机号码(联系人)", "cellphone"); reader.addHeaderAlias("手机号码", "cellphone");
reader.addHeaderAlias("所属公司", "company"); reader.addHeaderAlias("所属公司", "company");
reader.addHeaderAlias("性别", "gender"); reader.addHeaderAlias("性别", "gender");
reader.addHeaderAlias("职位", "position"); reader.addHeaderAlias("职位", "position");
...@@ -1404,7 +1414,8 @@ public class CrmController { ...@@ -1404,7 +1414,8 @@ public class CrmController {
String clientUrl = crmClientDataImportVo.getClientUrl(); // 官网 String clientUrl = crmClientDataImportVo.getClientUrl(); // 官网
String clientEmail = crmClientDataImportVo.getClientEmail(); // 邮箱 String clientEmail = crmClientDataImportVo.getClientEmail(); // 邮箱
String clientAddress = crmClientDataImportVo.getAddress(); // 地址 String clientAddress = crmClientDataImportVo.getAddress(); // 地址
String wechat = crmClientDataImportVo.getWechat(); // 微信
String product = crmClientDataImportVo.getProduct(); // 产品
String linkname = crmClientDataImportVo.getLinkName(); // 联系人姓名 String linkname = crmClientDataImportVo.getLinkName(); // 联系人姓名
String linkcellphone = crmClientDataImportVo.getCellphone(); // 手机号码 String linkcellphone = crmClientDataImportVo.getCellphone(); // 手机号码
String linkcompany = crmClientDataImportVo.getCompany(); // 所属公司 String linkcompany = crmClientDataImportVo.getCompany(); // 所属公司
...@@ -1444,13 +1455,18 @@ public class CrmController { ...@@ -1444,13 +1455,18 @@ public class CrmController {
} }
crmClientData.setClientStatus(1); crmClientData.setClientStatus(1);
crmClientData.setContactsNum(1); if(linkname != null) {
crmClientData.setContactsNum(1);
}
crmClientData.setBelongUser(empNum); crmClientData.setBelongUser(empNum);
crmClientData.setBelongUserName(getEmpName(orgCode, empNum)); crmClientData.setBelongUserName(getEmpName(orgCode, empNum));
crmClientData.setClientName(clientName); crmClientData.setClientName(clientName);
crmClientData.setBelongGroupName(belongGroupName); crmClientData.setBelongGroupName(belongGroupName);
crmClientData.setBelongGroup(crmBusinessGroup.getId()); crmClientData.setBelongGroup(crmBusinessGroup.getId());
crmClientData.setIndustryName(industryName); crmClientData.setIndustryName(industryName);
crmClientData.setWechat(wechat);
crmClientData.setProduct(product);
crmClientData.setClientTypeName(clientTypeName); crmClientData.setClientTypeName(clientTypeName);
...@@ -1463,26 +1479,31 @@ public class CrmController { ...@@ -1463,26 +1479,31 @@ public class CrmController {
crmClientData.insert(); crmClientData.insert();
Integer cid = crmClientData.getId(); Integer cid = crmClientData.getId();
CrmClientContacts contacts = new CrmClientContacts(); if(linkname != null) {
contacts.setName(linkname); CrmClientContacts contacts = new CrmClientContacts();
contacts.setCellphone(linkcellphone); contacts.setName(linkname);
contacts.setCompany(linkcompany); contacts.setCellphone(linkcellphone);
if (linkgender == "女") contacts.setCompany(linkcompany);
contacts.setGender(0); if (("女").equals(linkgender))
else if (linkgender == "男") contacts.setGender(0);
contacts.setGender(1); else if (("男").equals(linkgender))
else contacts.setGender(1);
contacts.setGender(null); else
contacts.setPosition(linkposition); contacts.setGender(null);
contacts.setTelephone(linktelephone); contacts.setPosition(linkposition);
contacts.setEmail(linkemail); contacts.setTelephone(linktelephone);
contacts.setAddress(linkaddress); contacts.setEmail(linkemail);
if (!(linkname == null && linkcellphone == null && linkcompany == null && linkgender == null contacts.setAddress(linkaddress);
&& linkposition == null && linktelephone == null && linkemail == null && linkaddress == null)) { if (!(linkname == null && linkcellphone == null && linkcompany == null && linkgender == null
contacts.setCid(cid); && linkposition == null && linktelephone == null && linkemail == null && linkaddress == null)) {
contacts.insert(); contacts.setCid(cid);
contacts.insert();
}
} }
} }
return ResultUtil.success("导入成功"); return ResultUtil.success("导入成功");
} }
......
...@@ -9,6 +9,7 @@ package cn.timer.api.dto.crm; ...@@ -9,6 +9,7 @@ package cn.timer.api.dto.crm;
import java.io.Serializable; import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -48,6 +49,12 @@ public class CrmClientDataImportVo implements Serializable { ...@@ -48,6 +49,12 @@ public class CrmClientDataImportVo implements Serializable {
// 详细地址 // 详细地址
private String address; private String address;
//微信
private String wechat;
//产品
private String product;
// 联系人信息 // 联系人信息
private String linkName; private String linkName;
private String cellphone; private String cellphone;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment