yzc преди 1 година
родител
ревизия
1ebf867fe5

+ 70 - 0
hx-customer/src/main/java/com/fjhx/customer/entity/customer/po/Customer.java

@@ -148,5 +148,75 @@ public class Customer extends BasePo {
      * 传真
      */
     private String fax;
+    //================================
+
+    /**
+     * 公司/客户主体
+     */
+    private String mainPart;
+    /**
+     * 公司/客户客体
+     */
+    private String minorPart;
+    /**
+     * 业务部门
+     */
+    private Long deptId;
+    /**
+     * 主营品类
+     */
+    private String mainCategories;
+    /**
+     * 公司规模
+     */
+    private String companySize;
+
+    /**
+     * 结算方式
+     */
+    private String settlementMode;
+
+    /**
+     * 客户级别
+     */
+    private String level;
+
+    /**
+     * 维系级别
+     */
+    private String maintainLevel;
+
+
+    /**
+     * 新老客户
+     */
+    private String newOld;
+
+
+    /**
+     * 年度销量
+     */
+    private String annualQuantity;
+
+    /**
+     * 回返要求
+     */
+    private String followUpAsk;
+
+    /**
+     * 提醒设置
+     */
+    private String remind;
+
+    /**
+     * 建群时间
+     */
+    private Date createGroupTime;
+    /**
+     * 客户状态
+     */
+    private String state;
+
+    //================================
 
 }

+ 51 - 11
hx-customer/src/main/java/com/fjhx/customer/entity/customer/po/CustomerUser.java

@@ -19,28 +19,68 @@ import lombok.Setter;
 public class CustomerUser extends BasePo {
 
     /**
-     * 客户表Id
+     * 客户id
      */
     private Long customerId;
-
     /**
-     * 联系人名称
+     * DirectLine
+     */
+    private String directLine;
+    /**
+     * 电子邮箱
+     */
+    private String email;
+    /**
+     * Facebook
+     */
+    private String facebook;
+    /**
+     * 是否是企业关键KP
+     */
+    private Integer isKp;
+    /**
+     * linkedIn
+     */
+    private String linkedIn;
+    /**
+     * 联系人名字
      */
     private String name;
-
     /**
-     * 联系人电话
+     * 手机
      */
     private String phone;
-
     /**
-     * 电子邮箱
+     * 职位
      */
-    private String email;
-
+    private String position;
+    /**
+     * QQ
+     */
+    private String qq;
+    /**
+     * 性别
+     */
+    private String sex;
+    /**
+     * Skype
+     */
+    private String skype;
+    /**
+     * 联系电话
+     */
+    private String tel;
+    /**
+     * 阿里旺旺
+     */
+    private String wangWang;
+    /**
+     * 微信
+     */
+    private String weChat;
     /**
-     * 更多联系方式
+     * whatsApp
      */
-    private String contactJson;
+    private String whatsApp;
 
 }

+ 5 - 1
hx-customer/src/main/java/com/fjhx/customer/entity/customer/vo/CustomerVo.java

@@ -2,7 +2,6 @@ package com.fjhx.customer.entity.customer.vo;
 
 import com.fjhx.area.service.SetCustomizeAreaName;
 import com.fjhx.customer.entity.customer.po.Customer;
-import com.fjhx.customer.entity.customer.po.CustomerFollowRecords;
 import com.fjhx.customer.entity.customer.po.CustomerUser;
 import lombok.Getter;
 import lombok.Setter;
@@ -57,4 +56,9 @@ public class CustomerVo extends Customer implements SetCustomizeAreaName {
      * 客户状态 字典值
      */
     private String statusVal;
+
+    /**
+     * 业务部门名称
+     */
+    private String deptName;
 }

+ 11 - 0
hx-customer/src/main/java/com/fjhx/customer/service/customer/impl/CustomerServiceImpl.java

@@ -28,11 +28,13 @@ import com.fjhx.customer.utils.code.CodeEnum;
 import com.fjhx.tenant.entity.dict.dto.DictTenantDataSelectDto;
 import com.fjhx.tenant.entity.dict.vo.DictTenantDataVo;
 import com.fjhx.tenant.service.dict.DictTenantDataService;
+import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.wrapper.IWrapper;
+import com.ruoyi.system.service.ISysDeptService;
 import com.ruoyi.system.utils.UserUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -60,6 +62,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
 
     @Autowired
     private DictTenantDataService dictTenantDataService;
+    @Autowired
+    private ISysDeptService deptService;
 
 
     /**
@@ -249,6 +253,13 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
                 .eq(CustomerUser::getCustomerId, result.getId()));
         result.setCustomerUserList(customerUserList);
         CustomizeAreaUtil.setAreaName(result);
+
+        //赋值业部门名称
+        SysDept sysDept = deptService.getById(result.getDeptId());
+        if (ObjectUtil.isEmpty(sysDept)) {
+            result.setDeptName(sysDept.getDeptName());
+        }
+
         return result;
     }