mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-11-01 03:28:41 +08:00 
			
		
		
		
	📖 CRM:线索 clue 新增/修改的完善
This commit is contained in:
		| @ -70,10 +70,6 @@ public class CrmClueRespVO { | ||||
|     @ExcelProperty("电话") | ||||
|     private String telephone; | ||||
|  | ||||
|     @Schema(description = "网址", example = "25682") | ||||
|     @ExcelProperty("网址") | ||||
|     private String website; | ||||
|  | ||||
|     @Schema(description = "QQ", example = "25682") | ||||
|     @ExcelProperty("QQ") | ||||
|     private String qq; | ||||
| @ -86,9 +82,15 @@ public class CrmClueRespVO { | ||||
|     @ExcelProperty("email") | ||||
|     private String email; | ||||
|  | ||||
|     @Schema(description = "地址", example = "北京市海淀区") | ||||
|     @ExcelProperty("地址") | ||||
|     private String address; | ||||
|     @Schema(description = "地区编号", example = "1024") | ||||
|     @ExcelProperty("地区编号") | ||||
|     private Integer areaId; | ||||
|     @Schema(description = "地区名称", example = "北京市") | ||||
|     @ExcelProperty("地区名称") | ||||
|     private String areaName; | ||||
|     @Schema(description = "详细地址", example = "北京市成华大道") | ||||
|     @ExcelProperty("详细地址") | ||||
|     private String detailAddress; | ||||
|  | ||||
|     @Schema(description = "所属行业", requiredMode = Schema.RequiredMode.REQUIRED, example = "13563") | ||||
|     @ExcelProperty(value = "所属行业", converter = DictConvert.class) | ||||
| @ -105,10 +107,6 @@ public class CrmClueRespVO { | ||||
|     @DictFormat(cn.iocoder.yudao.module.crm.enums.DictTypeConstants.CRM_CUSTOMER_SOURCE) | ||||
|     private Integer source; | ||||
|  | ||||
|     @Schema(description = "客户描述", example = "25682") | ||||
|     @ExcelProperty("客户描述") | ||||
|     private String description; | ||||
|  | ||||
|     @Schema(description = "备注", example = "随便") | ||||
|     @ExcelProperty("备注") | ||||
|     private String remark; | ||||
|  | ||||
| @ -8,6 +8,7 @@ import cn.iocoder.yudao.module.crm.enums.customer.CrmCustomerLevelEnum; | ||||
| import cn.iocoder.yudao.module.crm.framework.operatelog.core.CrmCustomerIndustryParseFunction; | ||||
| import cn.iocoder.yudao.module.crm.framework.operatelog.core.CrmCustomerLevelParseFunction; | ||||
| import cn.iocoder.yudao.module.crm.framework.operatelog.core.CrmCustomerSourceParseFunction; | ||||
| import cn.iocoder.yudao.module.crm.framework.operatelog.core.SysAreaParseFunction; | ||||
| import com.mzt.logapi.starter.annotation.DiffLogField; | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import jakarta.validation.constraints.Email; | ||||
| @ -56,10 +57,6 @@ public class CrmClueSaveReqVO { | ||||
|     @Telephone | ||||
|     private String telephone; | ||||
|  | ||||
|     @Schema(description = "网址", example = "https://www.baidu.com") | ||||
|     @DiffLogField(name = "网址") | ||||
|     private String website; | ||||
|  | ||||
|     @Schema(description = "QQ", example = "123456789") | ||||
|     @DiffLogField(name = "QQ") | ||||
|     @Size(max = 20, message = "QQ长度不能超过 20 个字符") | ||||
| @ -76,9 +73,13 @@ public class CrmClueSaveReqVO { | ||||
|     @Size(max = 255, message = "邮箱长度不能超过 255 个字符") | ||||
|     private String email; | ||||
|  | ||||
|     @Schema(description = "地址", example = "北京市海淀区") | ||||
|     @DiffLogField(name = "地址") | ||||
|     private String address; | ||||
|     @Schema(description = "地区编号", example = "20158") | ||||
|     @DiffLogField(name = "地区编号", function = SysAreaParseFunction.NAME) | ||||
|     private Integer areaId; | ||||
|  | ||||
|     @Schema(description = "详细地址", example = "北京市海淀区") | ||||
|     @DiffLogField(name = "详细地址") | ||||
|     private String detailAddress; | ||||
|  | ||||
|     @Schema(description = "所属行业", example = "1") | ||||
|     @DiffLogField(name = "所属行业", function = CrmCustomerIndustryParseFunction.NAME) | ||||
|  | ||||
| @ -239,10 +239,10 @@ public class CrmCustomerController { | ||||
|         // 手动创建导出 demo | ||||
|         List<CrmCustomerImportExcelVO> list = Arrays.asList( | ||||
|                 CrmCustomerImportExcelVO.builder().name("芋道").industryId(1).level(1).source(1).mobile("15601691300").telephone("") | ||||
|                         .website("https://doc.iocoder.cn/").qq("").wechat("").email("yunai@iocoder.cn").description("").remark("") | ||||
|                         .qq("").wechat("").email("yunai@iocoder.cn").description("").remark("") | ||||
|                         .areaId(null).detailAddress("").build(), | ||||
|                 CrmCustomerImportExcelVO.builder().name("源码").industryId(1).level(1).source(1).mobile("15601691300").telephone("") | ||||
|                         .website("https://doc.iocoder.cn/").qq("").wechat("").email("yunai@iocoder.cn").description("").remark("") | ||||
|                         .qq("").wechat("").email("yunai@iocoder.cn").description("").remark("") | ||||
|                         .areaId(null).detailAddress("").build() | ||||
|         ); | ||||
|         // 输出 | ||||
|  | ||||
| @ -43,9 +43,6 @@ public class CrmCustomerImportExcelVO { | ||||
|     @ExcelProperty("电话") | ||||
|     private String telephone; | ||||
|  | ||||
|     @ExcelProperty("网址") | ||||
|     private String website; | ||||
|  | ||||
|     @ExcelProperty("QQ") | ||||
|     private String qq; | ||||
|  | ||||
|  | ||||
| @ -64,10 +64,6 @@ public class CrmCustomerRespVO { | ||||
|     @ExcelProperty("电话") | ||||
|     private String telephone; | ||||
|  | ||||
|     @Schema(description = "负责人的用户编号", example = "25682") | ||||
|     @ExcelProperty("网址") | ||||
|     private String website; | ||||
|  | ||||
|     @Schema(description = "负责人的用户编号", example = "25682") | ||||
|     @ExcelProperty("QQ") | ||||
|     private String qq; | ||||
| @ -80,10 +76,6 @@ public class CrmCustomerRespVO { | ||||
|     @ExcelProperty("email") | ||||
|     private String email; | ||||
|  | ||||
|     @Schema(description = "负责人的用户编号", example = "25682") | ||||
|     @ExcelProperty("客户描述") | ||||
|     private String description; | ||||
|  | ||||
|     @Schema(description = "负责人的用户编号", example = "25682") | ||||
|     @ExcelProperty("备注") | ||||
|     private String remark; | ||||
|  | ||||
| @ -58,10 +58,6 @@ public class CrmCustomerSaveReqVO { | ||||
|     @Telephone | ||||
|     private String telephone; | ||||
|  | ||||
|     @Schema(description = "网址", example = "https://www.baidu.com") | ||||
|     @DiffLogField(name = "网址") | ||||
|     private String website; | ||||
|  | ||||
|     @Schema(description = "QQ", example = "123456789") | ||||
|     @DiffLogField(name = "QQ") | ||||
|     @Size(max = 20, message = "QQ长度不能超过 20 个字符") | ||||
|  | ||||
| @ -80,10 +80,6 @@ public class CrmClueDO extends BaseDO { | ||||
|      * 电话 | ||||
|      */ | ||||
|     private String telephone; | ||||
|     /** | ||||
|      * 网址 | ||||
|      */ | ||||
|     private String website; | ||||
|     /** | ||||
|      * QQ | ||||
|      */ | ||||
| @ -97,9 +93,15 @@ public class CrmClueDO extends BaseDO { | ||||
|      */ | ||||
|     private String email; | ||||
|     /** | ||||
|      * 地址 | ||||
|      * 所在地 | ||||
|      * | ||||
|      * 关联 {@link cn.iocoder.yudao.framework.ip.core.Area#getId()} 字段 | ||||
|      */ | ||||
|     private String address; | ||||
|     private Integer areaId; | ||||
|     /** | ||||
|      * 详细地址 | ||||
|      */ | ||||
|     private String detailAddress; | ||||
|     /** | ||||
|      * 所属行业 | ||||
|      * | ||||
| @ -118,10 +120,6 @@ public class CrmClueDO extends BaseDO { | ||||
|      * 对应字典 {@link DictTypeConstants#CRM_CUSTOMER_SOURCE} | ||||
|      */ | ||||
|     private Integer source; | ||||
|     /** | ||||
|      * 客户描述 | ||||
|      */ | ||||
|     private String description; | ||||
|     /** | ||||
|      * 备注 | ||||
|      */ | ||||
|  | ||||
| @ -79,10 +79,6 @@ public class CrmCustomerDO extends BaseDO { | ||||
|      * 电话 | ||||
|      */ | ||||
|     private String telephone; | ||||
|     /** | ||||
|      * 网址 | ||||
|      */ | ||||
|     private String website; | ||||
|     /** | ||||
|      * QQ | ||||
|      */ | ||||
| @ -123,10 +119,6 @@ public class CrmCustomerDO extends BaseDO { | ||||
|      * 对应字典 {@link DictTypeConstants#CRM_CUSTOMER_SOURCE} | ||||
|      */ | ||||
|     private Integer source; | ||||
|     /** | ||||
|      * 客户描述 | ||||
|      */ | ||||
|     private String description; | ||||
|     /** | ||||
|      * 备注 | ||||
|      */ | ||||
|  | ||||
| @ -64,10 +64,6 @@ public class CrmCustomerCreateReqBO { | ||||
|      */ | ||||
|     @Telephone | ||||
|     private String telephone; | ||||
|     /** | ||||
|      * 网址 | ||||
|      */ | ||||
|     private String website; | ||||
|     /** | ||||
|      * QQ | ||||
|      */ | ||||
|  | ||||
| @ -1,11 +0,0 @@ | ||||
| DELETE FROM "crm_contract"; | ||||
|  | ||||
| DELETE FROM "crm_clue"; | ||||
|  | ||||
| DELETE FROM "crm_receivable"; | ||||
|  | ||||
| DELETE FROM "crm_receivable_plan"; | ||||
|  | ||||
| DELETE FROM "crm_customer"; | ||||
|  | ||||
| DELETE FROM "crm_customer_limit_config"; | ||||
| @ -1,162 +0,0 @@ | ||||
| CREATE TABLE IF NOT EXISTS "crm_contract" ( | ||||
|   "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|   "name" varchar NOT NULL, | ||||
|   "customer_id" bigint, | ||||
|   "business_id" bigint, | ||||
|   "process_instance_id" bigint, | ||||
|   "order_date" varchar, | ||||
|   "owner_user_id" bigint, | ||||
|   "no" varchar, | ||||
|   "start_time" varchar, | ||||
|   "end_time" varchar, | ||||
|   "price" int, | ||||
|   "discount_percent" int, | ||||
|   "product_price" int, | ||||
|   "ro_user_ids" varchar, | ||||
|   "rw_user_ids" varchar, | ||||
|   "contact_id" bigint, | ||||
|   "sign_user_id" bigint, | ||||
|   "contact_last_time" varchar, | ||||
|   "remark" varchar, | ||||
|   "creator" varchar DEFAULT '', | ||||
|   "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||||
|   "updater" varchar DEFAULT '', | ||||
|   "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||||
|   "deleted" bit NOT NULL DEFAULT FALSE, | ||||
|   PRIMARY KEY ("id") | ||||
| ) COMMENT '合同表'; | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "crm_clue" ( | ||||
|   "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|   "transform_status" bit NOT NULL, | ||||
|   "follow_up_status" bit NOT NULL, | ||||
|   "name" varchar NOT NULL, | ||||
|   "customer_id" bigint NOT NULL, | ||||
|   "contact_next_time" varchar, | ||||
|   "telephone" varchar, | ||||
|   "mobile" varchar, | ||||
|   "address" varchar, | ||||
|   "owner_user_id" bigint, | ||||
|   "contact_last_time" varchar, | ||||
|   "remark" varchar, | ||||
|   "creator" varchar DEFAULT '', | ||||
|   "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||||
|   "updater" varchar DEFAULT '', | ||||
|   "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||||
|   "deleted" bit NOT NULL DEFAULT FALSE, | ||||
|   "tenant_id" bigint NOT NULL, | ||||
|   PRIMARY KEY ("id") | ||||
| ) COMMENT '线索表'; | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "crm_receivable" ( | ||||
|     "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|     "no" varchar, | ||||
|     "plan_id" bigint, | ||||
|     "customer_id" bigint, | ||||
|     "contract_id" bigint, | ||||
|     "check_status" int, | ||||
|     "process_instance_id" bigint, | ||||
|     "return_time" varchar, | ||||
|     "return_type" varchar, | ||||
|     "price" varchar, | ||||
|     "owner_user_id" bigint, | ||||
|     "batch_id" bigint, | ||||
|     "sort" int, | ||||
|     "data_scope" int, | ||||
|     "data_scope_dept_ids" varchar, | ||||
|     "status" int NOT NULL, | ||||
|     "remark" varchar, | ||||
|     "creator" varchar DEFAULT '', | ||||
|     "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||||
|     "updater" varchar DEFAULT '', | ||||
|     "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||||
|     "deleted" bit NOT NULL DEFAULT FALSE, | ||||
|     PRIMARY KEY ("id") | ||||
| ) COMMENT '回款'; | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "crm_receivable_plan" ( | ||||
|      "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|      "index_no" bigint, | ||||
|      "receivable_id" bigint, | ||||
|      "status" int NOT NULL, | ||||
|      "check_status" varchar, | ||||
|      "process_instance_id" bigint, | ||||
|      "price" varchar, | ||||
|      "return_time" varchar, | ||||
|      "remind_days" bigint, | ||||
|      "remind_time" varchar, | ||||
|      "customer_id" bigint, | ||||
|      "contract_id" bigint, | ||||
|      "owner_user_id" bigint, | ||||
|      "sort" int, | ||||
|      "remark" varchar, | ||||
|      "creator" varchar DEFAULT '', | ||||
|      "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||||
|      "updater" varchar DEFAULT '', | ||||
|      "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||||
|      "deleted" bit NOT NULL DEFAULT FALSE, | ||||
|      PRIMARY KEY ("id") | ||||
| ) COMMENT '回款计划'; | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "crm_customer" ( | ||||
|   "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|   "name"              varchar(255), | ||||
|   "follow_up_status"  int NOT NULL, | ||||
|   "lock_status"       int NOT NULL, | ||||
|   "deal_status"       int NOT NULL, | ||||
|   "industry_id"       int, | ||||
|   "level"             int, | ||||
|   "source"            int, | ||||
|   "mobile"            varchar(255), | ||||
|   "telephone"         varchar(255), | ||||
|   "website"           varchar(255), | ||||
|   "qq"                varchar(255), | ||||
|   "wechat"            varchar(255), | ||||
|   "email"             varchar(255), | ||||
|   "description"       varchar(255), | ||||
|   "remark"            varchar(255), | ||||
|   "owner_user_id" bigint, | ||||
|   "area_id"           int, | ||||
|   "detail_address"    varchar(255), | ||||
|   "contact_last_time" datetime, | ||||
|   "contact_next_time" datetime, | ||||
|   "creator" varchar DEFAULT '', | ||||
|   "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||||
|   "updater" varchar DEFAULT '', | ||||
|   "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||||
|   "deleted" bit NOT NULL DEFAULT FALSE, | ||||
|   "tenant_id" bigint NOT NULL, | ||||
|   PRIMARY KEY ("id") | ||||
| ) COMMENT '客户表'; | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "crm_customer_limit_config" ( | ||||
|    "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|    "type" int NOT NULL, | ||||
|    "user_ids" varchar, | ||||
|    "dept_ids" varchar, | ||||
|    "max_count" int NOT NULL, | ||||
|    "deal_count_enabled" varchar, | ||||
|    "creator" varchar DEFAULT '', | ||||
|    "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||||
|    "updater" varchar DEFAULT '', | ||||
|    "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||||
|    "deleted" bit NOT NULL DEFAULT FALSE, | ||||
|    "tenant_id" bigint NOT NULL, | ||||
|    PRIMARY KEY ("id") | ||||
| ) COMMENT '客户限制配置表'; | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "crm_permission" | ||||
| ( | ||||
|     "id"          bigint   NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|     "biz_id"      bigint   NOT NULL, | ||||
|     "biz_type"    int      NOT NULL, | ||||
|     "user_id"     bigint   NOT NULL, | ||||
|     "level"       int      NOT NULL, | ||||
|     "creator"     varchar           DEFAULT '', | ||||
|     "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||||
|     "updater"     varchar           DEFAULT '', | ||||
|     "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||||
|     "deleted"     bit      NOT NULL DEFAULT FALSE, | ||||
|    "tenant_id" bigint NOT NULL, | ||||
|    PRIMARY KEY ("id") | ||||
| ) COMMENT '客户限制配置表'; | ||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV