diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Customer.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Customer.java index b90599d1..eb979c70 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Customer.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Customer.java @@ -3,6 +3,7 @@ package com.ruoyi.system.domain; import java.util.List; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -14,6 +15,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2023-05-06 */ +@Data public class Customer extends BaseEntity { private static final long serialVersionUID = 1L; @@ -60,7 +62,8 @@ public class Customer extends BaseEntity /** 客户居住 区县/区域 */ @Excel(name = "客户居住 区县/区域") private String liveAddress; - + @Excel(name = "到店状态") + private String storeStatus; /** 客户状态 */ @Excel(name = "客户状态") private String status; @@ -137,317 +140,4 @@ public class Customer extends BaseEntity /** 跟进模块-客户跟进记录信息 */ private List followUpList; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setUserName(String userName) - { - this.userName = userName; - } - - public String getUserName() - { - return userName; - } - public void setNickName(String nickName) - { - this.nickName = nickName; - } - - public String getNickName() - { - return nickName; - } - public void setUserType(String userType) - { - this.userType = userType; - } - - public String getUserType() - { - return userType; - } - public void setEmail(String email) - { - this.email = email; - } - - public String getEmail() - { - return email; - } - public void setPhoneNumber(String phoneNumber) - { - this.phoneNumber = phoneNumber; - } - - public String getPhoneNumber() - { - return phoneNumber; - } - public void setSex(String sex) - { - this.sex = sex; - } - - public String getSex() - { - return sex; - } - public void setAvatar(String avatar) - { - this.avatar = avatar; - } - - public String getAvatar() - { - return avatar; - } - public void setClueChannel(String clueChannel) - { - this.clueChannel = clueChannel; - } - - public String getClueChannel() - { - return clueChannel; - } - public void setDataSource(String dataSource) - { - this.dataSource = dataSource; - } - - public String getDataSource() - { - return dataSource; - } - public void setLiveAddress(String liveAddress) - { - this.liveAddress = liveAddress; - } - - public String getLiveAddress() - { - return liveAddress; - } - public void setStatus(String status) - { - this.status = status; - } - - public String getStatus() - { - return status; - } - public void setDelFlag(String delFlag) - { - this.delFlag = delFlag; - } - - public String getDelFlag() - { - return delFlag; - } - public void setLoginIp(String loginIp) - { - this.loginIp = loginIp; - } - - public String getLoginIp() - { - return loginIp; - } - public void setLoginDate(Date loginDate) - { - this.loginDate = loginDate; - } - - public Date getLoginDate() - { - return loginDate; - } - public void setWechat(String wechat) - { - this.wechat = wechat; - } - - public String getWechat() - { - return wechat; - } - public void setBuyCarType(String buyCarType) - { - this.buyCarType = buyCarType; - } - - public String getBuyCarType() - { - return buyCarType; - } - public void setExistModels(String existModels) - { - this.existModels = existModels; - } - - public String getExistModels() - { - return existModels; - } - public void setIsAssessment(Integer isAssessment) - { - this.isAssessment = isAssessment; - } - - public Integer getIsAssessment() - { - return isAssessment; - } - public void setIntentionCarModels(String intentionCarModels) - { - this.intentionCarModels = intentionCarModels; - } - - public String getIntentionCarModels() - { - return intentionCarModels; - } - public void setContrastCarModels(String contrastCarModels) - { - this.contrastCarModels = contrastCarModels; - } - - public String getContrastCarModels() - { - return contrastCarModels; - } - public void setIsTestDrive(Integer isTestDrive) - { - this.isTestDrive = isTestDrive; - } - - public Integer getIsTestDrive() - { - return isTestDrive; - } - public void setIsOffer(Integer isOffer) - { - this.isOffer = isOffer; - } - - public Integer getIsOffer() - { - return isOffer; - } - public void setIsFinance(Integer isFinance) - { - this.isFinance = isFinance; - } - - public Integer getIsFinance() - { - return isFinance; - } - public void setUnBookingCarReason(String unBookingCarReason) - { - this.unBookingCarReason = unBookingCarReason; - } - - public String getUnBookingCarReason() - { - return unBookingCarReason; - } - public void setPreToStoreDate(Date preToStoreDate) - { - this.preToStoreDate = preToStoreDate; - } - - public Date getPreToStoreDate() - { - return preToStoreDate; - } - public void setLastToStoreDate(Date lastToStoreDate) - { - this.lastToStoreDate = lastToStoreDate; - } - - public Date getLastToStoreDate() - { - return lastToStoreDate; - } - public void setStoreName(String storeName) - { - this.storeName = storeName; - } - - public String getStoreName() - { - return storeName; - } - public void setOrderDate(Date orderDate) - { - this.orderDate = orderDate; - } - - public Date getOrderDate() - { - return orderDate; - } - - public List getFollowUpList() - { - return followUpList; - } - - public void setFollowUpList(List followUpList) - { - this.followUpList = followUpList; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("userName", getUserName()) - .append("nickName", getNickName()) - .append("userType", getUserType()) - .append("email", getEmail()) - .append("phoneNumber", getPhoneNumber()) - .append("sex", getSex()) - .append("avatar", getAvatar()) - .append("clueChannel", getClueChannel()) - .append("dataSource", getDataSource()) - .append("liveAddress", getLiveAddress()) - .append("status", getStatus()) - .append("delFlag", getDelFlag()) - .append("loginIp", getLoginIp()) - .append("loginDate", getLoginDate()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .append("wechat", getWechat()) - .append("buyCarType", getBuyCarType()) - .append("existModels", getExistModels()) - .append("isAssessment", getIsAssessment()) - .append("intentionCarModels", getIntentionCarModels()) - .append("contrastCarModels", getContrastCarModels()) - .append("isTestDrive", getIsTestDrive()) - .append("isOffer", getIsOffer()) - .append("isFinance", getIsFinance()) - .append("unBookingCarReason", getUnBookingCarReason()) - .append("preToStoreDate", getPreToStoreDate()) - .append("lastToStoreDate", getLastToStoreDate()) - .append("storeName", getStoreName()) - .append("orderDate", getOrderDate()) - .append("followUpList", getFollowUpList()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/FollowUp.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/FollowUp.java index 29a555d8..4008016b 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/FollowUp.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/FollowUp.java @@ -2,6 +2,7 @@ package com.ruoyi.system.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -13,6 +14,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2023-05-07 */ +@Data public class FollowUp extends BaseEntity { private static final long serialVersionUID = 1L; @@ -41,76 +43,9 @@ public class FollowUp extends BaseEntity /** 级别 */ @Excel(name = "级别") private String followLevel; + @Excel(name = "跟进结果") + private String followResult; + @Excel(name = "跟进方式") + private String followUpMethod; - public void setId(Integer id) - { - this.id = id; - } - - public Integer getId() - { - return id; - } - public void setCustomerId(Long customerId) - { - this.customerId = customerId; - } - - public Long getCustomerId() - { - return customerId; - } - public void setFollowUpDate(Date followUpDate) - { - this.followUpDate = followUpDate; - } - - public Date getFollowUpDate() - { - return followUpDate; - } - public void setFollowUpRecord(String followUpRecord) - { - this.followUpRecord = followUpRecord; - } - - public String getFollowUpRecord() - { - return followUpRecord; - } - public void setPreToStoreDate(Date preToStoreDate) - { - this.preToStoreDate = preToStoreDate; - } - - public Date getPreToStoreDate() - { - return preToStoreDate; - } - public void setFollowLevel(String followLevel) - { - this.followLevel = followLevel; - } - - public String getFollowLevel() - { - return followLevel; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("customerId", getCustomerId()) - .append("followUpDate", getFollowUpDate()) - .append("followUpRecord", getFollowUpRecord()) - .append("preToStoreDate", getPreToStoreDate()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .append("followLevel", getFollowLevel()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerServiceImpl.java index c2fa8975..e2988c62 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerServiceImpl.java @@ -76,8 +76,8 @@ public class CustomerServiceImpl implements ICustomerService public int updateCustomer(Customer customer) { customer.setUpdateTime(DateUtils.getNowDate()); - customerMapper.deleteFollowUpByCustomerId(customer.getId()); - insertFollowUp(customer); + /* customerMapper.deleteFollowUpByCustomerId(customer.getId()); + insertFollowUp(customer);*/ return customerMapper.updateCustomer(customer); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FollowUpServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FollowUpServiceImpl.java index 9c5d149c..774baac5 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FollowUpServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FollowUpServiceImpl.java @@ -2,6 +2,8 @@ package com.ruoyi.system.service.impl; import java.util.List; import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.system.domain.Customer; +import com.ruoyi.system.mapper.CustomerMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.FollowUpMapper; @@ -19,6 +21,8 @@ public class FollowUpServiceImpl implements IFollowUpService { @Autowired private FollowUpMapper followUpMapper; + @Autowired + private CustomerMapper customerMapper; /** * 查询跟进模块-客户跟进记录 @@ -54,6 +58,16 @@ public class FollowUpServiceImpl implements IFollowUpService public int insertFollowUp(FollowUp followUp) { followUp.setCreateTime(DateUtils.getNowDate()); + Customer customer = new Customer(); + customer.setId(followUp.getCustomerId()); + //如果跟进记录的跟进级别选择 + if("战败".equals(followUp.getFollowLevel())){ + customer.setStatus("defeat"); + customerMapper.updateCustomer(customer); + }else if("订车".equals(followUp.getFollowLevel())||"成交".equals(followUp.getFollowLevel())){ + customer.setStatus("order"); + customerMapper.updateCustomer(customer); + } return followUpMapper.insertFollowUp(followUp); } diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CustomerMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CustomerMapper.xml index 5640a7e3..0916b6d5 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CustomerMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CustomerMapper.xml @@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -60,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, clue_channel, data_source, live_address, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark, wechat, buy_car_type, exist_models, is_assessment, intention_car_models, contrast_car_models, is_test_drive, is_offer, is_finance, un_booking_car_reason, pre_to_store_date, last_to_store_date, store_name, order_date from f_customer + select id, user_name, nick_name, user_type, email,store_status, phonenumber, sex, avatar, clue_channel, data_source, live_address, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark, wechat, buy_car_type, exist_models, is_assessment, intention_car_models, contrast_car_models, is_test_drive, is_offer, is_finance, un_booking_car_reason, pre_to_store_date, last_to_store_date, store_name, order_date from f_customer and customer_id = #{customerId} + and follow_result = #{followResult} + and follow_up_method = #{followUpMethod} and follow_up_date = #{followUpDate} and follow_up_record = #{followUpRecord} and pre_to_store_date = #{preToStoreDate} @@ -51,6 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_time, remark, follow_level, + follow_result , + follow_up_method , #{customerId}, @@ -63,6 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateTime}, #{remark}, #{followLevel}, + #{followResult}, + #{followUpMethod}, @@ -79,6 +87,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_time = #{updateTime}, remark = #{remark}, follow_level = #{followLevel}, + follow_result = #{followResult}, + follow_up_method = #{followUpMethod}, where id = #{id} diff --git a/ruoyi-ui/src/views/system/bookManger/index.vue b/ruoyi-ui/src/views/system/bookManger/index.vue new file mode 100644 index 00000000..968736e5 --- /dev/null +++ b/ruoyi-ui/src/views/system/bookManger/index.vue @@ -0,0 +1,882 @@ + + + + diff --git a/ruoyi-ui/src/views/system/competitionSet/index.vue b/ruoyi-ui/src/views/system/competitionSet/index.vue index 4bd41351..98bf0740 100644 --- a/ruoyi-ui/src/views/system/competitionSet/index.vue +++ b/ruoyi-ui/src/views/system/competitionSet/index.vue @@ -56,7 +56,7 @@ - + - - + + +