@@ -52,13 +52,17 @@ public class AuditVO { | |||
*/ | |||
private String sysUpdater; | |||
/** | |||
* 跟进状态;0:未跟进;1:跟进 | |||
* 跟进状态;1:未跟进;2:跟进 | |||
*/ | |||
private Short follow; | |||
/** | |||
* 推送状态:1:未推送;2:已推送;3:已退回 | |||
*/ | |||
private Short push; | |||
public AuditVO(){} | |||
public AuditVO(String auditId, String userId, Short status, Short vipLevel, Short source, String causeBy, String remarks, Short isReply, Date sysCreateTime, String sysCreator, Date sysUpdateTime, String sysUpdater, Short follow) { | |||
public AuditVO(String auditId, String userId, Short status, Short vipLevel, Short source, String causeBy, String remarks, Short isReply, Date sysCreateTime, String sysCreator, Date sysUpdateTime, String sysUpdater, Short follow, Short push) { | |||
this.auditId = auditId; | |||
this.userId = userId; | |||
this.status = status; | |||
@@ -72,6 +76,7 @@ public class AuditVO { | |||
this.sysUpdateTime = sysUpdateTime; | |||
this.sysUpdater = sysUpdater; | |||
this.follow = follow; | |||
this.push = push; | |||
} | |||
public String getAuditId() { | |||
@@ -177,4 +182,12 @@ public class AuditVO { | |||
public void setFollow(Short follow) { | |||
this.follow = follow; | |||
} | |||
public Short getPush() { | |||
return push; | |||
} | |||
public void setPush(Short push) { | |||
this.push = push; | |||
} | |||
} |
@@ -4,6 +4,10 @@ import java.util.Date; | |||
public class CompanyAuditVO { | |||
// 公司相关 | |||
/** | |||
* 企业Id | |||
*/ | |||
private String customerId; | |||
/** | |||
* 企业名称 | |||
*/ | |||
@@ -107,13 +111,29 @@ public class CompanyAuditVO { | |||
*/ | |||
private String sysUpdater; | |||
/** | |||
* 跟进状态;0:未跟进;1:跟进 | |||
* 跟进状态;1:未跟进;2:跟进 | |||
*/ | |||
private Short follow; | |||
/** | |||
* 审核人姓名 | |||
*/ | |||
private String checkName; | |||
/** | |||
* 推送状态:1:未推送;2:已推送;3:已退回 | |||
*/ | |||
private Short push; | |||
/** | |||
* 企业对应服务商Id | |||
*/ | |||
private String serviceProviderId; | |||
public String getCustomerId() { | |||
return customerId; | |||
} | |||
public void setCustomerId(String customerId) { | |||
this.customerId = customerId; | |||
} | |||
public String getName() { | |||
return name; | |||
@@ -330,4 +350,20 @@ public class CompanyAuditVO { | |||
public void setCheckName(String checkName) { | |||
this.checkName = checkName; | |||
} | |||
public Short getPush() { | |||
return push; | |||
} | |||
public void setPush(Short push) { | |||
this.push = push; | |||
} | |||
public String getServiceProviderId() { | |||
return serviceProviderId; | |||
} | |||
public void setServiceProviderId(String serviceProviderId) { | |||
this.serviceProviderId = serviceProviderId; | |||
} | |||
} |
@@ -22,4 +22,5 @@ public interface CustomerCompanyService { | |||
public PageResult<CustomerCompanyVO> queryCompanysPageByNameAndServiceAndStatus(String name, String serviceProviderName, Integer status, Long current, Integer size); | |||
public PageResult<CompanyAuditVO> getCompanyAuditsPage(Long current, Integer size); | |||
public PageResult<CompanyAuditVO> queryCompanysPageByNameAndStatusAndCreateTime(String name, Integer status, Date startTime,Date endTime, Long current, Integer size); | |||
public PageResult<CompanyAuditVO> queryCluesPageOfContractUserByCreateTimeAndBusinessContactAndPhoneNumberAndFollowAndSourceAndPush(Date startTime, Date endTime,String businessContact,String phoneNumber,Integer follow, Integer resource, Integer push, Long current, Integer size); | |||
} |
@@ -52,6 +52,9 @@ public class CompanyController { | |||
audit.setUserId(company.getCustomerId()); | |||
audit.setVipLevel((short) 1); // 普通会员 | |||
audit.setStatus(company.getStatus()); | |||
audit.setIsReply((short)1); // 未回复 | |||
audit.setFollow((short)1); // 未跟进 | |||
audit.setPush((short)1); // 未推送 | |||
result3 = auditService.insert(audit); | |||
} | |||
if (result1.getCode().equals("0") && result2.getCode().equals("0") && result3.getCode().equals("0")) { | |||
@@ -245,6 +248,9 @@ public class CompanyController { | |||
audit.setUserId(company.getCustomerId()); | |||
audit.setStatus((short) 1); // 未审核 | |||
audit.setSource((short) 1); // 来源:维信 | |||
audit.setIsReply((short)1); // 未回复 | |||
audit.setFollow((short)1); // 未跟进 | |||
audit.setPush((short)1); // 未推送 | |||
// 愿意成为合同用户 | |||
if (willing) audit.setVipLevel((short) 1); // 普通会员 | |||
else audit.setVipLevel((short) 2); // 意向用户 | |||
@@ -291,6 +297,25 @@ public class CompanyController { | |||
return customerCompanyService.queryCompanysPageByNameAndStatusAndCreateTime(name, status, startTime, endTime, current, size); | |||
} | |||
/** | |||
* | |||
* @param startTime 根据提交时间、企业联系人、联系电话、跟进状态、线索来源、推进状态分页查询合同用户线索 | |||
* @param endTime | |||
* @param businessContact | |||
* @param phoneNumber | |||
* @param follow | |||
* @param resource | |||
* @param push | |||
* @param current | |||
* @param size | |||
* @return | |||
*/ | |||
@ApiOperation(value = "根据提交时间、企业联系人、联系电话、跟进状态、线索来源、推进状态分页查询合同用户线索", notes = "跟进状态:1:未跟进;2:跟进;推送状态:1:未推送;2:已推送;3:已退回;来源:1:微信小程序;若状态为全部,填0") | |||
@GetMapping("/queryCluesPageOfContractUser") | |||
public PageResult<CompanyAuditVO> queryCluesPageOfContractUser(Date startTime, Date endTime,String businessContact,String phoneNumber,@RequestParam Integer follow,@RequestParam Integer resource,@RequestParam Integer push,@RequestParam Long current, @RequestParam Integer size){ | |||
return customerCompanyService.queryCluesPageOfContractUserByCreateTimeAndBusinessContactAndPhoneNumberAndFollowAndSourceAndPush(startTime,endTime,businessContact,phoneNumber,follow,resource,push,current,size); | |||
} | |||
// public HttpResult queryContectUserByBusinessContectAndPhone | |||
// /** | |||
@@ -87,9 +87,9 @@ public class UserController { | |||
* @param size 一页的行数 | |||
* @return PageResult | |||
*/ | |||
@ApiOperation(value = "根据服务商Id、用户姓名、手机号码、启用状态 分页查询账号", notes = "启用:status=0,禁用:status=1,全部:status为其他数字") | |||
@ApiOperation(value = "根据服务商Id、用户姓名、手机号码、启用状态 分页查询账号", notes = "服务商Id选填,启用:status=0,禁用:status=1,全部:status为其他数字") | |||
@GetMapping("/queryAccountsPageByCompanyIdAndUserNameAndPhoneAndStatus") | |||
public PageResult<AccountVO> queryAccountsPageByCompanyIdAndUserNameAndPhoneAndStatus(@RequestParam String companyId, String userName, String phone, @RequestParam Integer status, @RequestParam Long current, @RequestParam Integer size) { | |||
public PageResult<AccountVO> queryAccountsPageByCompanyIdAndUserNameAndPhoneAndStatus(String companyId, String userName, String phone, @RequestParam Integer status, @RequestParam Long current, @RequestParam Integer size) { | |||
return accountService.queryAccountsPageByCompanyIdAndUserNameAndPhoneAndStatus(companyId, userName, phone, status, current, size); | |||
} | |||
@@ -19,5 +19,6 @@ import java.util.List; | |||
*/ | |||
public interface CustomerCompanyMapper extends BaseMapper<CustomerCompany> { | |||
List<CompanyAudit> selectCompanyAuditPage(Page<?> page); | |||
List<CompanyAudit> queryCompanyAuditPageByNameAndStatusAndCreateTime(Page<?> page, @Param("name") String name, @Param("status") Integer status, @Param("startTime") Date startTime, @Param("endTime")Date endTime); | |||
List<CompanyAudit> queryCompanyAuditPageByNameAndStatusAndCreateTime(Page<?> page, @Param("name") String name, @Param("status") Integer status, @Param("startTime") Date startTime, @Param("endTime") Date endTime); | |||
List<CompanyAudit> queryCluesPageOfContractUserByCreateTimeAndNameAndPhoneAndFollowAndSourceAndPush(Page<?> page,@Param("startTime") Date startTime,@Param("endTime") Date endTime,@Param("businessContact") String businessContact,@Param("phoneNumber") String phoneNumber,@Param("follow") Integer follow,@Param("resource") Integer resource,@Param("push") Integer push); | |||
} |
@@ -63,13 +63,17 @@ public class Audit implements Serializable { | |||
*/ | |||
private String sysUpdater; | |||
/** | |||
* 跟进状态;0:未跟进;1:跟进 | |||
* 跟进状态;1:未跟进;2:跟进 | |||
*/ | |||
private Short follow; | |||
/** | |||
* 推送状态:1:未推送;2:已推送;3:已退回 | |||
*/ | |||
private Short push; | |||
public Audit(){} | |||
public Audit(String auditId, String userId, Short status, Short vipLevel, Short source, String causeBy, String remarks, Short isReply, Date sysCreateTime, String sysCreator, Date sysUpdateTime, String sysUpdater, Short follow) { | |||
public Audit(String auditId, String userId, Short status, Short vipLevel, Short source, String causeBy, String remarks, Short isReply, Date sysCreateTime, String sysCreator, Date sysUpdateTime, String sysUpdater, Short follow, Short push) { | |||
this.auditId = auditId; | |||
this.userId = userId; | |||
this.status = status; | |||
@@ -83,6 +87,7 @@ public class Audit implements Serializable { | |||
this.sysUpdateTime = sysUpdateTime; | |||
this.sysUpdater = sysUpdater; | |||
this.follow = follow; | |||
this.push = push; | |||
} | |||
public String getAuditId() { | |||
@@ -188,4 +193,12 @@ public class Audit implements Serializable { | |||
public void setFollow(Short follow) { | |||
this.follow = follow; | |||
} | |||
public Short getPush() { | |||
return push; | |||
} | |||
public void setPush(Short push) { | |||
this.push = push; | |||
} | |||
} |
@@ -6,6 +6,10 @@ import java.util.Date; | |||
public class CompanyAudit { | |||
// 公司相关 | |||
/** | |||
* 企业Id | |||
*/ | |||
private String customerId; | |||
/** | |||
* 企业名称 | |||
*/ | |||
@@ -109,13 +113,29 @@ public class CompanyAudit { | |||
*/ | |||
private String sysUpdater; | |||
/** | |||
* 跟进状态;0:未跟进;1:跟进 | |||
* 跟进状态;1:未跟进;2:跟进 | |||
*/ | |||
private Short follow; | |||
/** | |||
* 审核人姓名 | |||
*/ | |||
private String checkName; | |||
/** | |||
* 推送状态:1:未推送;2:已推送;3:已退回 | |||
*/ | |||
private Short push; | |||
/** | |||
* 企业对应服务商Id | |||
*/ | |||
private String serviceProviderId; | |||
public String getCustomerId() { | |||
return customerId; | |||
} | |||
public void setCustomerId(String customerId) { | |||
this.customerId = customerId; | |||
} | |||
public String getName() { | |||
return name; | |||
@@ -332,4 +352,20 @@ public class CompanyAudit { | |||
public void setCheckName(String checkName) { | |||
this.checkName = checkName; | |||
} | |||
public Short getPush() { | |||
return push; | |||
} | |||
public void setPush(Short push) { | |||
this.push = push; | |||
} | |||
public String getServiceProviderId() { | |||
return serviceProviderId; | |||
} | |||
public void setServiceProviderId(String serviceProviderId) { | |||
this.serviceProviderId = serviceProviderId; | |||
} | |||
} |
@@ -298,12 +298,9 @@ public class AccountServiceImpl implements AccountService { | |||
IPage<Account> page = new Page<>(current, size); | |||
QueryWrapper<Account> wrapper = new QueryWrapper<>(); | |||
try { | |||
if (companyId == null) { | |||
result.setCode("-1"); | |||
result.setMessage("服务商/企业Id 不能为空"); | |||
return result; | |||
if (companyId != null) { | |||
wrapper.eq("company_id", companyId); | |||
} | |||
wrapper.eq("company_id", companyId); | |||
wrapper.orderByDesc("sys_create_time"); | |||
if (userName != null) wrapper.like("user_name", userName); | |||
if (phone != null) wrapper.like("phone", phone); | |||
@@ -295,4 +295,28 @@ public class CustomerCompanyServiceImpl implements CustomerCompanyService { | |||
} | |||
return result; | |||
} | |||
@Override | |||
public PageResult<CompanyAuditVO> queryCluesPageOfContractUserByCreateTimeAndBusinessContactAndPhoneNumberAndFollowAndSourceAndPush(Date startTime, Date endTime, String businessContact, String phoneNumber, Integer follow, Integer resource, Integer push, Long current, Integer size) { | |||
PageResult<CompanyAuditVO> result= new PageResult<>(); | |||
Page<CompanyAudit> page = new Page<>(current, size); | |||
try{ | |||
List<CompanyAudit> companyAudits = customerCompanyMapper.queryCluesPageOfContractUserByCreateTimeAndNameAndPhoneAndFollowAndSourceAndPush(page,startTime,endTime,businessContact,phoneNumber,follow,resource,push); | |||
List<CompanyAuditVO> companyAuditVOList = new ArrayList<>(); | |||
CompanyAuditVO temp; | |||
for (CompanyAudit companyAudit : companyAudits) { | |||
temp = new CompanyAuditVO(); | |||
BeanUtils.copyProperties(companyAudit, temp); | |||
companyAuditVOList.add(temp); | |||
} | |||
result.setCode("0"); | |||
result.setDataList(companyAuditVOList); | |||
result.setTotal(page.getTotal()); | |||
result.setCurrent(current); | |||
result.setSize(size); | |||
}catch(Exception e){ | |||
} | |||
return result; | |||
} | |||
} |
@@ -8,9 +8,9 @@ | |||
-- select a.name,a.type,a.industry_code,a.longitude,a.latitude,a.enterprise_tax_number,a.business_license,a.business_contact,a.phone_number,a.address,a.province_code,a.city_code,a.count_code,b.*,c.user_name check_name | |||
-- from tb_customer_company as a,tb_customer_audit as b,tb_account as c | |||
-- where a.customer_id = b.user_id and b.sys_creator = c.user_id and a.sys_deleted = 0 and a.type = 1 ORDER BY a.name,b.sys_create_time DESC | |||
select a.name,a.type,a.industry_code,a.longitude,a.latitude,a.enterprise_tax_number,a.business_license,a.business_contact,a.phone_number,a.address,a.province_code,a.city_code,a.count_code,b.*,c.user_name check_name | |||
select a.customer_id,a.name,a.type,a.industry_code,a.longitude,a.latitude,a.enterprise_tax_number,a.business_license,a.business_contact,a.phone_number,a.address,a.province_code,a.city_code,a.count_code,b.*,c.user_name check_name | |||
from tb_customer_company as a,tb_customer_audit as b left join tb_account as c on b.sys_creator = c.user_id | |||
where a.customer_id = b.user_id and a.sys_deleted = 0 and a.type = 1 ORDER BY a.name,b.sys_create_time DESC | |||
where a.customer_id = b.user_id and a.sys_deleted = 0 and a.type = 1 ORDER BY b.sys_create_time DESC | |||
</select> | |||
<select id="queryCompanyAuditPageByNameAndStatusAndCreateTime" resultType="com.hp.user.service.entity.CompanyAudit"> | |||
<!-- select a.name,a.type,a.industry_code,a.longitude,a.latitude,a.enterprise_tax_number,a.business_license,a.business_contact,a.phone_number,a.address,a.province_code,a.city_code,a.count_code,b.* from tb_customer_company as a,tb_customer_audit as b--> | |||
@@ -20,13 +20,26 @@ | |||
<!-- <if test="startTime != null"> and b.sys_create_time >= #{startTime} </if>--> | |||
<!-- <if test="endTime != null"> and b.sys_create_time <= #{endTime} </if>--> | |||
<!-- ORDER BY a.name,b.sys_create_time DESC--> | |||
select a.name,a.type,a.industry_code,a.longitude,a.latitude,a.enterprise_tax_number,a.business_license,a.business_contact,a.phone_number,a.address,a.province_code,a.city_code,a.count_code,b.*,c.user_name checkname | |||
select a.customer_id,a.name,a.type,a.industry_code,a.longitude,a.latitude,a.enterprise_tax_number,a.business_license,a.business_contact,a.phone_number,a.address,a.province_code,a.city_code,a.count_code,b.*,c.user_name checkname | |||
from tb_customer_company as a,tb_customer_audit as b left join tb_account as c on b.sys_creator = c.user_id | |||
where a.customer_id = b.user_id and a.sys_deleted = 0 and a.type = 1 | |||
<if test="name != null"> and a.name like concat('%', #{name}, '%')</if> | |||
<if test="status != 0"> and b.status = #{status} </if> | |||
<if test="startTime != null"> and b.sys_create_time >= #{startTime} </if> | |||
<if test="endTime != null"> and b.sys_create_time <= #{endTime} </if> | |||
ORDER BY b.sys_create_time DESC | |||
</select> | |||
<select id="queryCluesPageOfContractUserByCreateTimeAndNameAndPhoneAndFollowAndSourceAndPush" resultType="com.hp.user.service.entity.CompanyAudit"> | |||
select a.customer_id,a.name,a.type,a.industry_code,a.longitude,a.latitude,a.enterprise_tax_number,a.business_license,a.business_contact,a.phone_number,a.address,a.province_code,a.city_code,a.count_code,b.*,c.service_provider_id | |||
from tb_customer_audit as b,tb_customer_company as a left join r_customer_service_provider_enterprise as c on a.customer_id = c.enterprise_id | |||
where a.customer_id = b.user_id and a.sys_deleted = 0 and a.type = 1 and b.vip_level = 2 | |||
<if test="name != null"> and a.business_contact like concat('%', #{businessContact}, '%')</if> | |||
<if test="phone != null"> and a.phone_number like concat('%', #{phoneNumber}, '%')</if> | |||
<if test="follow != 0"> and b.follow = #{follow} </if> | |||
<if test="resource != 0"> and b.resource = #{resource} </if> | |||
<if test="push != 0"> and b.push = #{push} </if> | |||
<if test="startTime != null"> and b.sys_create_time >= #{startTime} </if> | |||
<if test="endTime != null"> and b.sys_create_time <= #{endTime} </if> | |||
ORDER BY a.name,b.sys_create_time DESC | |||
</select> | |||
</mapper> |