code review:crm 合同

This commit is contained in:
YunaiV 2023-10-29 19:05:36 +08:00
parent 67ac11b56c
commit d1978d318b
3 changed files with 7 additions and 110 deletions

View File

@ -1,42 +1,5 @@
SET NAMES utf8mb4;
-- ----------------------------
-- 合同表
-- ----------------------------
DROP TABLE IF EXISTS `crm_contract`;
CREATE TABLE `crm_contract`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号主键自增',
`name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '合同名称',
`customer_id` bigint DEFAULT NULL COMMENT '客户编号',
`business_id` bigint DEFAULT NULL COMMENT '商机编号',
`process_instance_id` bigint DEFAULT NULL COMMENT '工作流编号',
`order_date` datetime DEFAULT NULL COMMENT '下单日期',
`owner_user_id` bigint DEFAULT NULL COMMENT '负责人的用户编号',
`no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '合同编号',
`start_time` datetime DEFAULT NULL COMMENT '开始时间',
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
`price` int DEFAULT NULL COMMENT '合同金额',
`discount_percent` int DEFAULT NULL COMMENT '整单折扣',
`product_price` int DEFAULT NULL COMMENT '产品总金额',
`ro_user_ids` varchar(4096) DEFAULT NULL COMMENT '只读权限的用户编号数组',
`rw_user_ids` varchar(4096) DEFAULT NULL COMMENT '读写权限的用户编号数组',
`contact_id` bigint DEFAULT NULL COMMENT '联系人编号',
`sign_user_id` bigint DEFAULT NULL COMMENT '公司签约人',
`contact_last_time` datetime DEFAULT NULL COMMENT '最后跟进时间',
-- 通用字段
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_unicode_ci COMMENT ='合同表';
DROP TABLE IF EXISTS `crm_clue`;

View File

@ -1,62 +1,3 @@
-- ----------------------------
-- 合同菜单
-- ----------------------------
-- 菜单 SQL
INSERT INTO system_menu(
name, permission, type, sort, parent_id,
path, icon, component, status, component_name
)
VALUES (
'合同管理', '', 2, 0, 2375,
'contract', '', 'crm/contract/index', 0, 'Contract'
);
-- 按钮父菜单ID
-- 暂时只支持 MySQL如果你是 OraclePostgreSQLSQLServer 的话需要手动修改 @parentId 的部分的代码
SELECT @parentId := LAST_INSERT_ID();
-- 按钮 SQL
INSERT INTO system_menu(
name, permission, type, sort, parent_id,
path, icon, component, status
)
VALUES (
'合同查询', 'crm:contract:query', 3, 1, @parentId,
'', '', '', 0
);
INSERT INTO system_menu(
name, permission, type, sort, parent_id,
path, icon, component, status
)
VALUES (
'合同创建', 'crm:contract:create', 3, 2, @parentId,
'', '', '', 0
);
INSERT INTO system_menu(
name, permission, type, sort, parent_id,
path, icon, component, status
)
VALUES (
'合同更新', 'crm:contract:update', 3, 3, @parentId,
'', '', '', 0
);
INSERT INTO system_menu(
name, permission, type, sort, parent_id,
path, icon, component, status
)
VALUES (
'合同删除', 'crm:contract:delete', 3, 4, @parentId,
'', '', '', 0
);
INSERT INTO system_menu(
name, permission, type, sort, parent_id,
path, icon, component, status
)
VALUES (
'合同导出', 'crm:contract:export', 3, 5, @parentId,
'', '', '', 0
);
-- ----------------------------
-- 线索菜单

View File

@ -1,18 +1,11 @@
package cn.iocoder.yudao.module.crm.controller.admin.business.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Set;
/**
* 商机 Excel VO
@ -62,10 +55,10 @@ public class CrmBusinessExcelVO {
private LocalDateTime createTime;
@ExcelProperty("只读权限的用户编号数组")
private String roUserIds;
private Set<Long> roUserIds;
@ExcelProperty("读写权限的用户编号数组")
private String rwUserIds;
private Set<Long> rwUserIds;
@ExcelProperty("1赢单2输单3无效")
private Integer endStatus;