待更新脚本.txt 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. -- 2024.8.6
  2. create table pc_signin
  3. (
  4. SigninId varchar(50) not null comment '唯一标识',
  5. SiteID varchar(50) comment '所属驿站',
  6. SigninType int comment '打卡类型,字典:SigninType',
  7. CompanyID varchar(50) comment '走访企业',
  8. JobuserID varchar(50) comment '走访人员',
  9. SigninTime datetime comment '打卡时间',
  10. Content text comment '服务内容',
  11. Longitude varchar(50) comment '经度',
  12. Latitude varchar(50) comment '纬度',
  13. RecordStatus int comment '状态',
  14. CreateUserID varchar(50) comment '创建人',
  15. CreateTime datetime comment '创建时间',
  16. ModifyUserID varchar(50) comment '修改人',
  17. ModifyTime datetime comment '修改时间',
  18. primary key (SigninId)
  19. );
  20. alter table pc_signin add constraint FK_Pc_Signin_Ref_Company foreign key (CompanyID)
  21. references pc_company (CompanyID) on delete restrict on update restrict;
  22. alter table pc_signin add constraint FK_Pc_Signin_Ref_JobUser foreign key (JobuserID)
  23. references pc_jobuser (JobuserID) on delete restrict on update restrict;
  24. alter table pc_signin add constraint FK_Pc_Signin_Ref_Site foreign key (SiteID)
  25. references pc_site (SiteID) on delete restrict on update restrict;
  26. INSERT INTO `sys_dictionary` (`DictionaryCode`, `Name`, `OrderNo`, `RecordStatus`) VALUES
  27. ('SigninType', '打卡类型', 200, 1);
  28. INSERT INTO `sys_dictionary_item` (`DictionaryItemID`, `Code`, `DictionaryCode`, `Value`, `Name`, `OrderNo`, `RecordStatus`, `IsEditable`) VALUES
  29. ('ac93ede5-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 1, '走访企业', 1, 1, 0),
  30. ('b100cbf2-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 2, '走访人员', 2, 1, 0),
  31. ('b4ec8c51-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 3, '其他外联事项', 3, 1, 0);
  32. -- 2024-08-06 驿站工作人员外出地图菜单
  33. INSERT INTO sys_function_code VALUES ('T011004', '驿站工作人员外出地图', 'T0110', 4);
  34. INSERT INTO `sys_menu` VALUES ('T011004', 4, '驿站工作人员外出地图', NULL, 'views/dataMap/siteUserWorkDataMap', '/siteUserWorkDataMap', 'T0110', NULL, 0, 1, 1, 'T011004', 1, NULL, 1);
  35. insert into sys_role_sys_function_code (`RoleID`, `FunctionCode`) values('20afde90-a81a-11ed-a6c5-7085c2a9999e','T011004');
  36. INSERT INTO `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T010305', '外出服务管理', 'T0103', 5); INSERT INTO `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T01030501', '查看', 'T010305', 1);
  37. INSERT INTO `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T01030502', '编辑', 'T010305', 2);
  38. INSERT INTO `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T01030503', '删除', 'T010305', 3);
  39. INSERT INTO `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T01030504', '跟进', 'T010305', 4);
  40. INSERT INTO `sys_menu` (`MenuNo`, `OrderNo`, `MenuName`, `Icon`, `ViewPath`, `Url`, `ParentMenuNo`, `Description`, `IsTopMenu`, `IsVisible`, `IsLeaf`, `FunctionCode`, `RecordStatus`, `ShortcutIcon`, `IsBlank`) VALUES ('T010305', 5, '外出服务管理', NULL, '', '/signinMgt', 'T0103', '外出服务管理', 0, 1, 1, 'T010305', 1, NULL, NULL);
  41. INSERT INTO `sys_menu` (`MenuNo`, `OrderNo`, `MenuName`, `Icon`, `ViewPath`, `Url`, `ParentMenuNo`, `Description`, `IsTopMenu`, `IsVisible`, `IsLeaf`, `FunctionCode`, `RecordStatus`, `ShortcutIcon`, `IsBlank`) VALUES ('T01030501', 1, '外出服务信息', NULL, 'views/jobusermgr/signinMgt/index', '/index', 'T010305', '', 0, 0, 1, 'T010305', 1, NULL, NULL);
  42. INSERT INTO `sys_menu` (`MenuNo`, `OrderNo`, `MenuName`, `Icon`, `ViewPath`, `Url`, `ParentMenuNo`, `Description`, `IsTopMenu`, `IsVisible`, `IsLeaf`, `FunctionCode`, `RecordStatus`, `ShortcutIcon`, `IsBlank`) VALUES ('T01030502', 1, '编辑外出服务', NULL, 'views/jobusermgr/signinMgt/edit', '/edit', 'T010305', '', 0, 0, 1, 'T010305', 1, NULL, NULL);