mirror of
https://github.com/1Panel-dev/CordysCRM.git
synced 2026-05-18 23:08:19 +08:00
refactor: update module field key
This commit is contained in:
@@ -5,7 +5,7 @@ import lombok.Getter;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 业务模块字段(定义在主表中,有特定业务含义)
|
||||
* 业务模块字段(定义在主表中,有特定业务含义)(标准字段)
|
||||
* @Author: jianxing
|
||||
* @CreateTime: 2025-02-18 17:27
|
||||
*/
|
||||
@@ -28,15 +28,15 @@ public enum BusinessModuleField {
|
||||
/**
|
||||
* 联系人客户id
|
||||
*/
|
||||
CUSTOMER_CONTACT_CUSTOMER("customerContactCustomer", "customerId"),
|
||||
CUSTOMER_CONTACT_CUSTOMER("contactCustomer", "customerId"),
|
||||
/**
|
||||
* 联系人名称
|
||||
*/
|
||||
CUSTOMER_CONTACT_NAME("customerContactName", "name", Set.of("rules")),
|
||||
CUSTOMER_CONTACT_NAME("contactName", "name", Set.of("rules")),
|
||||
/**
|
||||
* 联系人电话
|
||||
*/
|
||||
CUSTOMER_CONTACT_PHONE("customerContactPhone", "phone"),
|
||||
CUSTOMER_CONTACT_PHONE("contactPhone", "phone"),
|
||||
/*------ end: CUSTOMER_MANAGEMENT_CONTACT ------*/
|
||||
|
||||
|
||||
@@ -44,27 +44,27 @@ public enum BusinessModuleField {
|
||||
/**
|
||||
* 客户id
|
||||
*/
|
||||
FOLLOW_RECORD_CUSTOMER("followRecordCustomerId", "customerId"),
|
||||
FOLLOW_RECORD_CUSTOMER("recordCustomer", "customerId"),
|
||||
/**
|
||||
* 商机id
|
||||
*/
|
||||
FOLLOW_RECORD_OPPORTUNITY("followRecordOpportunityId", "opportunityId"),
|
||||
FOLLOW_RECORD_OPPORTUNITY("recordOpportunity", "opportunityId"),
|
||||
/**
|
||||
* 线索id
|
||||
*/
|
||||
FOLLOW_RECORD_CLUE("followRecordClueId", "clueId"),
|
||||
FOLLOW_RECORD_CLUE("recordClue", "clueId"),
|
||||
/**
|
||||
* 责任人id
|
||||
*/
|
||||
FOLLOW_RECORD_OWNER("followRecordOwner", "owner"),
|
||||
FOLLOW_RECORD_OWNER("recordOwner", "owner"),
|
||||
/**
|
||||
* 联系人id
|
||||
*/
|
||||
FOLLOW_RECORD_CONTACT("followRecordContactId", "contactId");
|
||||
FOLLOW_RECORD_CONTACT("recordContact", "contactId");
|
||||
/*------ end: FOLLOW_UP_RECORD ------*/
|
||||
|
||||
/**
|
||||
* 字段 key
|
||||
* 字段 key,field.json 中的 internalKey
|
||||
*/
|
||||
private final String key;
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,7 @@ public enum FormKey {
|
||||
/**
|
||||
* 商机
|
||||
*/
|
||||
BUSINESS("business"),
|
||||
OPPORTUNITY("opportunity"),
|
||||
/**
|
||||
* 产品
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,7 @@ public class OpportunityController {
|
||||
@RequiresPermissions(PermissionConstants.OPPORTUNITY_MANAGEMENT_READ)
|
||||
@Operation(summary = "获取表单配置")
|
||||
public ModuleFormConfigDTO getModuleFormConfig() {
|
||||
return moduleFormService.getConfig(FormKey.BUSINESS.getKey(), OrganizationContext.getOrganizationId());
|
||||
return moduleFormService.getConfig(FormKey.OPPORTUNITY.getKey(), OrganizationContext.getOrganizationId());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public class OpportunityFieldService extends BaseResourceFieldService<Opportunit
|
||||
|
||||
@Override
|
||||
protected String getFormKey() {
|
||||
return FormKey.BUSINESS.getKey();
|
||||
return FormKey.OPPORTUNITY.getKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
},
|
||||
{
|
||||
"name": "负责人信息",
|
||||
"internalKey": "customerOwner",
|
||||
"internalKey": "customerOwnerInfo",
|
||||
"type": "DIVIDER",
|
||||
"showLabel": true,
|
||||
"readable": true,
|
||||
@@ -152,7 +152,7 @@
|
||||
},
|
||||
{
|
||||
"name": "负责人",
|
||||
"internalKey": "customerOwnerName",
|
||||
"internalKey": "customerOwner",
|
||||
"type": "MEMBER",
|
||||
"multiple": false,
|
||||
"hasCurrentUser": false,
|
||||
@@ -277,7 +277,7 @@
|
||||
},
|
||||
{
|
||||
"name": "负责人信息",
|
||||
"internalKey": "clueOwner",
|
||||
"internalKey": "clueOwnerInfo",
|
||||
"type": "DIVIDER",
|
||||
"showLabel": true,
|
||||
"readable": true,
|
||||
@@ -288,7 +288,7 @@
|
||||
},
|
||||
{
|
||||
"name": "负责人",
|
||||
"internalKey": "clueOwnerName",
|
||||
"internalKey": "clueOwner",
|
||||
"type": "MEMBER",
|
||||
"multiple": false,
|
||||
"hasCurrentUser": false,
|
||||
@@ -301,10 +301,10 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"business": [
|
||||
"opportunity": [
|
||||
{
|
||||
"name": "基本信息",
|
||||
"internalKey": "businessBasicInfo",
|
||||
"internalKey": "opportunityBasicInfo",
|
||||
"type": "DIVIDER",
|
||||
"showLabel": true,
|
||||
"readable": true,
|
||||
@@ -315,7 +315,7 @@
|
||||
},
|
||||
{
|
||||
"name": "商机名称",
|
||||
"internalKey": "businessName",
|
||||
"internalKey": "opportunityName",
|
||||
"type": "INPUT",
|
||||
"showLabel": true,
|
||||
"readable": true,
|
||||
@@ -327,7 +327,7 @@
|
||||
},
|
||||
{
|
||||
"name": "客户名称",
|
||||
"internalKey": "businessCustomerName",
|
||||
"internalKey": "opportunityCustomer",
|
||||
"type": "DATA_SOURCE",
|
||||
"dataSourceType": "CUSTOMER",
|
||||
"multiple": false,
|
||||
@@ -341,7 +341,7 @@
|
||||
},
|
||||
{
|
||||
"name": "商机来源",
|
||||
"internalKey": "businessSource",
|
||||
"internalKey": "opportunitySource",
|
||||
"type": "SELECT",
|
||||
"multiple": false,
|
||||
"showLabel": true,
|
||||
@@ -359,7 +359,7 @@
|
||||
},
|
||||
{
|
||||
"name": "金额",
|
||||
"internalKey": "businessPrice",
|
||||
"internalKey": "opportunityPrice",
|
||||
"type": "INPUT_NUMBER",
|
||||
"showLabel": true,
|
||||
"readable": true,
|
||||
@@ -373,7 +373,7 @@
|
||||
},
|
||||
{
|
||||
"name": "意向产品",
|
||||
"internalKey": "businessProduct",
|
||||
"internalKey": "opportunityProduct",
|
||||
"type": "DATA_SOURCE",
|
||||
"dataSourceType": "PRODUCT",
|
||||
"multiple": true,
|
||||
@@ -387,7 +387,7 @@
|
||||
},
|
||||
{
|
||||
"name": "预计结束",
|
||||
"internalKey": "businessEndTime",
|
||||
"internalKey": "opportunityEndTime",
|
||||
"type": "DATE_TIME",
|
||||
"showLabel": true,
|
||||
"readable": true,
|
||||
@@ -400,7 +400,7 @@
|
||||
},
|
||||
{
|
||||
"name": "可能性",
|
||||
"internalKey": "businessWinRate",
|
||||
"internalKey": "opportunityWinRate",
|
||||
"type": "INPUT_NUMBER",
|
||||
"showLabel": true,
|
||||
"readable": true,
|
||||
@@ -414,7 +414,7 @@
|
||||
},
|
||||
{
|
||||
"name": "联系人",
|
||||
"internalKey": "businessContract",
|
||||
"internalKey": "opportunityContract",
|
||||
"type": "DATA_SOURCE",
|
||||
"dataSourceType": "CONTACT",
|
||||
"multiple": false,
|
||||
@@ -428,7 +428,7 @@
|
||||
},
|
||||
{
|
||||
"name": "客户标签",
|
||||
"internalKey": "businessCustomerTag",
|
||||
"internalKey": "opportunityCustomerTag",
|
||||
"type": "MULTIPLE_INPUT",
|
||||
"showLabel": true,
|
||||
"readable": true,
|
||||
@@ -437,7 +437,7 @@
|
||||
},
|
||||
{
|
||||
"name": "备注信息",
|
||||
"internalKey": "businessRemark",
|
||||
"internalKey": "opportunityRemark",
|
||||
"type": "TEXTAREA",
|
||||
"showLabel": true,
|
||||
"readable": true,
|
||||
@@ -447,7 +447,7 @@
|
||||
},
|
||||
{
|
||||
"name": "地址信息",
|
||||
"internalKey": "businessAddressInfo",
|
||||
"internalKey": "opportunityAddressInfo",
|
||||
"type": "DIVIDER",
|
||||
"showLabel": true,
|
||||
"readable": true,
|
||||
@@ -458,7 +458,7 @@
|
||||
},
|
||||
{
|
||||
"name": "地区",
|
||||
"internalKey": "businessArea",
|
||||
"internalKey": "opportunityArea",
|
||||
"type": "LOCATION",
|
||||
"locationType": "detail",
|
||||
"showLabel": true,
|
||||
@@ -468,7 +468,7 @@
|
||||
},
|
||||
{
|
||||
"name": "负责人信息",
|
||||
"internalKey": "businessOwner",
|
||||
"internalKey": "opportunityOwnerInfo",
|
||||
"type": "DIVIDER",
|
||||
"showLabel": true,
|
||||
"readable": true,
|
||||
@@ -479,7 +479,7 @@
|
||||
},
|
||||
{
|
||||
"name": "负责人",
|
||||
"internalKey": "businessOwnerName",
|
||||
"internalKey": "opportunityOwner",
|
||||
"type": "MEMBER",
|
||||
"multiple": false,
|
||||
"hasCurrentUser": false,
|
||||
@@ -533,7 +533,7 @@
|
||||
},
|
||||
{
|
||||
"name": "状态",
|
||||
"internalKey": "productName",
|
||||
"internalKey": "productStatus",
|
||||
"type": "RADIO",
|
||||
"direction": "horizontal",
|
||||
"defaultValue": "1",
|
||||
@@ -590,7 +590,7 @@
|
||||
"contact": [
|
||||
{
|
||||
"name": "客户名称",
|
||||
"internalKey": "contactCustomerName",
|
||||
"internalKey": "contactCustomer",
|
||||
"type": "DATA_SOURCE",
|
||||
"dataSourceType": "CUSTOMER",
|
||||
"multiple": false,
|
||||
@@ -656,13 +656,13 @@
|
||||
{"key": "required"}
|
||||
],
|
||||
"showControlRules": [
|
||||
{"value": "1", "fieldIds": ["recordCustomerName", "recordBusiness"]},
|
||||
{"value": "2", "fieldIds": ["recordClueName"]}
|
||||
{"value": "1", "fieldIds": ["recordCustomer", "recordOpportunity"]},
|
||||
{"value": "2", "fieldIds": ["recordClue"]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "客户名称",
|
||||
"internalKey": "recordCustomerName",
|
||||
"internalKey": "recordCustomer",
|
||||
"type": "DATA_SOURCE",
|
||||
"dataSourceType": "CUSTOMER",
|
||||
"multiple": false,
|
||||
@@ -676,7 +676,7 @@
|
||||
},
|
||||
{
|
||||
"name": "线索名称",
|
||||
"internalKey": "recordClueName",
|
||||
"internalKey": "recordClue",
|
||||
"type": "DATA_SOURCE",
|
||||
"dataSourceType": "CLUE",
|
||||
"multiple": false,
|
||||
@@ -690,7 +690,7 @@
|
||||
},
|
||||
{
|
||||
"name": "商机",
|
||||
"internalKey": "recordBusiness",
|
||||
"internalKey": "recordOpportunity",
|
||||
"type": "DATA_SOURCE",
|
||||
"dataSourceType": "BUSINESS",
|
||||
"multiple": false,
|
||||
@@ -747,7 +747,7 @@
|
||||
},
|
||||
{
|
||||
"name": "负责人",
|
||||
"internalKey": "recordOwnerName",
|
||||
"internalKey": "recordOwner",
|
||||
"type": "MEMBER",
|
||||
"multiple": false,
|
||||
"hasCurrentUser": false,
|
||||
@@ -803,13 +803,13 @@
|
||||
{"key": "required"}
|
||||
],
|
||||
"showControlRules": [
|
||||
{"value": "1", "fieldIds": ["planCustomerName", "planBusiness"]},
|
||||
{"value": "2", "fieldIds": ["planClueName"]}
|
||||
{"value": "1", "fieldIds": ["planCustomer", "planOpportunity"]},
|
||||
{"value": "2", "fieldIds": ["planClue"]}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "客户名称",
|
||||
"internalKey": "planCustomerName",
|
||||
"internalKey": "planCustomer",
|
||||
"type": "DATA_SOURCE",
|
||||
"dataSourceType": "CUSTOMER",
|
||||
"multiple": false,
|
||||
@@ -823,7 +823,7 @@
|
||||
},
|
||||
{
|
||||
"name": "线索名称",
|
||||
"internalKey": "planClueName",
|
||||
"internalKey": "planClue",
|
||||
"type": "DATA_SOURCE",
|
||||
"dataSourceType": "CLUE",
|
||||
"multiple": false,
|
||||
@@ -837,9 +837,9 @@
|
||||
},
|
||||
{
|
||||
"name": "商机",
|
||||
"internalKey": "planBusiness",
|
||||
"internalKey": "planOpportunity",
|
||||
"type": "DATA_SOURCE",
|
||||
"dataSourceType": "BUSINESS",
|
||||
"dataSourceType": "OPPORTUNITY",
|
||||
"multiple": false,
|
||||
"showLabel": true,
|
||||
"readable": true,
|
||||
@@ -894,7 +894,7 @@
|
||||
},
|
||||
{
|
||||
"name": "负责人",
|
||||
"internalKey": "planOwnerName",
|
||||
"internalKey": "planOwner",
|
||||
"type": "MEMBER",
|
||||
"multiple": false,
|
||||
"hasCurrentUser": false,
|
||||
|
||||
Reference in New Issue
Block a user