cf.sql 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. create table idea_oa.oa_demand_pool
  2. (
  3. id varchar(100) not null comment '主键'
  4. primary key,
  5. pro_id varchar(100) null comment '商机id',
  6. pro_name varchar(255) null comment '关联项目',
  7. demand_source varchar(100) null comment '需求来源',
  8. demand_sketch varchar(255) null comment '需求简述',
  9. demand_files varchar(255) null comment '附件ids',
  10. sub_user varchar(100) null comment '提交人',
  11. sub_user_name varchar(100) null comment '提交人姓名',
  12. sub_date datetime null comment '提交日期',
  13. demand_state varchar(100) null comment '状态',
  14. handle_user varchar(100) null comment '处理人',
  15. handle_user_name varchar(100) null comment '处理人姓名',
  16. receipt_time datetime null comment '回执时间',
  17. handle_type varchar(100) null comment '处理方式',
  18. handle_id varchar(100) null comment '处理方式回填id',
  19. cost_hour varchar(100) null comment '所耗工时(小时)',
  20. create_user varchar(100) null comment '创建人',
  21. create_time datetime null comment '创建时间',
  22. update_user varchar(100) null comment '更新人',
  23. update_time datetime null comment '更新时间',
  24. group_id varchar(100) null comment '集团id'
  25. )
  26. comment '需求池';
  27. create index oa_demand_pool__index
  28. on idea_oa.oa_demand_pool (pro_id);
  29. create index oa_demand_pool_group_id_index
  30. on idea_oa.oa_demand_pool (group_id);
  31. INSERT INTO idea_oa.sys_dict(id, dict_name, dict_code, dict_value, sys_id) VALUES ('1074632361754230784', '需求来源', 'DEMAND_SOURCE', '[{"id":1676253845350,"label":"销售","value":"0","isSearch":false},{"id":1676253898445,"label":"用户反馈","value":"1","isSearch":false},{"id":1676253905265,"label":"市场","value":"2","isSearch":false},{"id":1676253911321,"label":"运营","value":"3","isSearch":false}]', 'BIZ_OA');
  32. create table idea_oa.oa_budget_template
  33. (
  34. id varchar(100) not null comment '主键'
  35. primary key,
  36. pro_type varchar(100) null comment '项目类型',
  37. pro_type_name varchar(100) null comment '项目类型名称',
  38. budget_type varchar(100) null comment '预算类型(成本类、费用类)',
  39. sort_no integer null comment '排序',
  40. budget_child_type varchar(255) null comment '预算子项',
  41. need_detail varchar(10) null comment '需明细(0是1否)',
  42. upper_limit varchar(100) null comment '上限设定(定额、占比销售额)',
  43. upper_limit_value decimal(18,6) null comment '上限值',
  44. effect_date datetime null comment '生效日期',
  45. create_user varchar(100) null comment '创建人',
  46. create_time datetime null comment '创建时间',
  47. update_user varchar(100) null comment '更新人',
  48. update_time datetime null comment '更新时间',
  49. group_id varchar(100) null comment '集团id'
  50. )
  51. comment '预算模板设定';
  52. create index oa_budget_template_group_id_index
  53. on idea_oa.oa_budget_template (group_id);
  54. INSERT INTO idea_oa.sys_dict (id, dict_name, dict_code, dict_value, sys_id) VALUES ('1074713187305127936', '预算模板-成本类子项', 'BUDGET_CB', '[{"id":1676273146808,"label":"人力成本","value":"人力成本","isSearch":false},{"id":1676273156020,"label":"设备","value":"设备","isSearch":false},{"id":1676273164932,"label":"材料","value":"材料","isSearch":false},{"id":1676273176969,"label":"外包研发","value":"外包研发","isSearch":false}]', 'BIZ_OA');
  55. INSERT INTO idea_oa.sys_dict (id, dict_name, dict_code, dict_value, sys_id) VALUES ('1074713523256295424', '预算模板-费用类子项', 'BUDGET_FY', '[{"id":1676273223102,"label":"差旅费","value":"差旅费","isSearch":false},{"id":1676273233698,"label":"餐费","value":"餐费","isSearch":false},{"id":1676273233882,"label":"商务费","value":"商务费","isSearch":false},{"id":1676273234040,"label":"交通费","value":"交通费","isSearch":false},{"id":1676273253886,"label":"办公费","value":"办公费","isSearch":false},{"id":1676273254053,"label":"其他","value":"其他","isSearch":false}]', 'BIZ_OA');
  56. create table idea_oa.oa_user_cost
  57. (
  58. id varchar(100) not null comment '主键'
  59. primary key,
  60. post_id varchar(100) null comment '岗位id',
  61. post_name varchar(100) null comment '岗位名称',
  62. post_level varchar(100) null comment '岗位层级',
  63. post_cost decimal(18,2) null comment '人力成本',
  64. effect_date datetime null comment '生效日期',
  65. create_user varchar(100) null comment '创建人',
  66. create_time datetime null comment '创建时间',
  67. update_user varchar(100) null comment '更新人',
  68. update_time datetime null comment '更新时间',
  69. group_id varchar(100) null comment '集团id'
  70. )
  71. comment '人员成本设定';
  72. create index oa_user_cost_group_id_index
  73. on idea_oa.oa_user_cost (group_id);
  74. INSERT INTO idea_oa.sys_dict (id, dict_name, dict_code, dict_value, sys_id) VALUES ('1075346069581201408', '人员成本-岗位层级', 'POST_LEVEL', '[{"id":1676424043485,"label":"初级","value":"初级","isSearch":false},{"id":1676424043840,"label":"中级","value":"中级","isSearch":false},{"id":1676424060954,"label":"高级","value":"高级","isSearch":false},{"id":1676424064869,"label":"资深","value":"资深","isSearch":false}]', 'BIZ_OA');
  75. create table idea_oa.oa_budget_making
  76. (
  77. id varchar(100) not null comment '主键' primary key,
  78. pro_id varchar(100) null comment '项目类型',
  79. budget_type varchar(100) null comment '预算类型(成本类、费用类)',
  80. sort_no integer null comment '排序',
  81. budget_child_type varchar(255) null comment '预算子项',
  82. need_detail varchar(10) null comment '需明细(0是1否)',
  83. budget_amount decimal(18,6) null comment '预算金额',
  84. budget_file varchar(255) null comment '附件',
  85. budget_status integer null comment '状态(0暂存 1保存 2变更申请中 3变更申请通过)',
  86. create_user varchar(100) null comment '创建人',
  87. create_time datetime null comment '创建时间',
  88. update_user varchar(100) null comment '更新人',
  89. update_time datetime null comment '更新时间',
  90. group_id varchar(100) null comment '集团id'
  91. )
  92. comment '预算编制';
  93. create index oa_budget_making_group_id_index
  94. on idea_oa.oa_budget_making (group_id);
  95. create index oa_budget_making_pro_id_index
  96. on idea_oa.oa_budget_making (pro_id);
  97. alter table oa_pro_task_enclosure
  98. add pro_id varchar(100) null comment '项目id' after task_id;