lmz建表sql.sql 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166
  1. ------ 推送账单推送内容模板表
  2. CREATE TABLE `tb_pushmodel` (
  3. `ID` int(11) NOT NULL AUTO_INCREMENT,
  4. `billType` int(2) DEFAULT NULL COMMENT '账单类型',
  5. `pushWay` int(2) DEFAULT NULL COMMENT '账单发送方式',
  6. `pushContent` varchar(1000) DEFAULT '' COMMENT '账单推送内容',
  7. `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  8. `creatorId` varchar(20) DEFAULT '' COMMENT '创建人',
  9. `modifier` int(11) DEFAULT NULL COMMENT '修改人',
  10. `modifyTime` datetime DEFAULT NULL COMMENT '修改时间',
  11. `isEnabled` int(11) DEFAULT NULL,
  12. PRIMARY KEY (`ID`)
  13. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  14. ----- 推送账单推送具体人员的详情表
  15. CREATE TABLE `tb_billpush` (
  16. `ID` int(11) NOT NULL AUTO_INCREMENT,
  17. `billType` int(2) DEFAULT NULL COMMENT '账单类型',
  18. `createTime` datetime DEFAULT NULL COMMENT '推送时间',
  19. `senderId` int(11) DEFAULT NULL COMMENT '发送人',
  20. `pushModelId` varchar(500) DEFAULT '' COMMENT '模板ID',
  21. `pushUser1` varchar(100) DEFAULT '' COMMENT '责任人1',
  22. `pushUser2` varchar(100) DEFAULT '' COMMENT '责任人2',
  23. `userEmail1` varchar(100) DEFAULT '' COMMENT '责任人1邮件',
  24. `userEmail2` varchar(100) DEFAULT '' COMMENT '责任人2邮件',
  25. `userTel1` varchar(100) DEFAULT '' COMMENT '责任人1电话',
  26. `userTel2` varchar(100) DEFAULT '' COMMENT '责任人2电话',
  27. `pushAmount` decimal(11,2) DEFAULT NULL COMMENT '账单金额',
  28. `virtId` int(11) DEFAULT NULL COMMENT '企业Id',
  29. `isWechat` int(11) DEFAULT NULL,
  30. `isEmail` int(11) DEFAULT NULL,
  31. `isMessage` int(11) DEFAULT NULL,
  32. `wechatData` varchar(500) DEFAULT '' COMMENT '模板ID',
  33. `emailData` varchar(500) DEFAULT '' COMMENT '责任人1',
  34. `messageData` varchar(500) DEFAULT '' COMMENT '责任人2',
  35. `billUpDate` datetime DEFAULT NULL COMMENT '账单截止日',
  36. `wechatStatus` int(11) DEFAULT '0' COMMENT '微信发送状态0为不成功,1为成功',
  37. `messageStatus` int(11) DEFAULT '0' COMMENT '短信发送状态0为不成功,1为成功',
  38. `emailStatus` int(11) DEFAULT '0' COMMENT '邮件发送状态',
  39. `roomName` varchar(255) DEFAULT '' COMMENT '房间号',
  40. `openId1` varchar(255) DEFAULT '' COMMENT '负责人1openId',
  41. `openId2` varchar(255) DEFAULT '' COMMENT '负责人2openId',
  42. `monthDate` int(2) DEFAULT NULL COMMENT '月份',
  43. `beginTime` datetime DEFAULT NULL COMMENT '计费区间开始',
  44. `endTime` datetime DEFAULT NULL COMMENT '计费区间结束',
  45. PRIMARY KEY (`ID`)
  46. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  47. ------- 企业表
  48. alter table tb_virtualarchitecture add floorIds varchar(500) default '';
  49. alter table tb_virtualarchitecture add roomIds varchar(500) default '';
  50. alter table tb_virtualarchitecture add businessImageUrl varchar(500) default '';
  51. alter table tb_virtualarchitecture add powerAttorneyImageUrl varchar(500) default '';
  52. alter table tb_virtualarchitecture add powerFaceImageUrl varchar(500) default '';
  53. alter table tb_virtualarchitecture add powerNationImageUrl varchar(500) default '';
  54. alter table tb_virtualarchitecture add leaseStatus int default 0;
  55. alter table tb_virtualarchitecture add isEmail int default 0;
  56. alter table tb_virtualarchitecture add isWechat int default 0;
  57. alter table tb_virtualarchitecture add isMessage int default 0;
  58. alter table tb_virtualarchitecture add COLUMN floorNames varchar(500) DEFAULT '';
  59. alter table tb_virtualarchitecture add COLUMN roomNames varchar(500) DEFAULT '';
  60. alter table tb_virtualarchitecture add COLUMN floorAndNames varchar(500) DEFAULT '';
  61. ------- 员工表
  62. alter table tb_user add isResponsible int default 1;
  63. alter table tb_user add isPushPower int default 1;
  64. alter table tb_user add isReleasePower int default 1;
  65. alter table tb_user add email varchar(100) default '';
  66. alter table tb_user add reOrder int default 0;
  67. ------ 房间表
  68. CREATE TABLE `tb_roomno` (
  69. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  70. `floorId` int(11) COMMENT '楼层Id',
  71. `name` varchar(20) DEFAULT '' COMMENT '房间号',
  72. `createTime` datetime COMMENT '创建时间',
  73. `creator` varchar(20) DEFAULT '' COMMENT '创建人',
  74. `modifier` varchar(20) DEFAULT '' COMMENT '修改人',
  75. `modifyTime` datetime COMMENT '修改时间',
  76. `isEnabled` int(11) DEFAULT 0,
  77. PRIMARY KEY (`id`)
  78. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='维修类型';
  79. ------ 楼层表
  80. CREATE TABLE `tb_floor` (
  81. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  82. `organizationId` int(11) COMMENT '楼宇',
  83. `name` varchar(20) DEFAULT '' COMMENT '楼层号',
  84. `createTime` datetime COMMENT '创建时间',
  85. `creator` varchar(20) DEFAULT '' COMMENT '创建人',
  86. `modifier` varchar(20) DEFAULT '' COMMENT '修改人',
  87. `modifyTime` datetime COMMENT '修改时间',
  88. `isEnabled` int(11) DEFAULT 1,
  89. PRIMARY KEY (`id`)
  90. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='楼层';
  91. ------企业负责人信息表
  92. CREATE TABLE `tb_virtuser` (
  93. `id` int(11) NOT NULL AUTO_INCREMENT,
  94. `virId` int(11) DEFAULT '0' COMMENT '企业Id',
  95. `userId` int(11) DEFAULT '0' COMMENT '用户ID',
  96. `reorder` int(11) DEFAULT '0' COMMENT '1:负责人1;2:负责人2',
  97. PRIMARY KEY (`id`)
  98. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  99. -----------企业入驻-水电表
  100. CREATE TABLE `tb_watermeter` (
  101. `id` int(11) NOT NULL AUTO_INCREMENT,
  102. `floorId` int(11) DEFAULT '0' COMMENT '楼层',
  103. `roomId` int(11) DEFAULT '0' COMMENT '房间',
  104. `wateReading` varchar(100) DEFAULT '' COMMENT '水表读数',
  105. `wateImageUrl` varchar(500) DEFAULT '' COMMENT '水表图片存储地址',
  106. `materImageUrl` varchar(500) DEFAULT '' COMMENT '电表图片存储地址',
  107. `sourseId` int(11) DEFAULT '0' COMMENT '来源单据ID',
  108. `enterType` int(11) DEFAULT '0' COMMENT '企业状态类型(1入驻2迁出)',
  109. `creator` int(11) DEFAULT '0' COMMENT '创建人',
  110. `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  111. `isEnabled` varchar(2) DEFAULT '1' COMMENT '是否有效',
  112. `materReading` varchar(100) DEFAULT '' COMMENT '电表读数',
  113. PRIMARY KEY (`id`)
  114. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  115. ----------企业入驻配置
  116. CREATE TABLE `tb_model` (
  117. `id` int(11) NOT NULL AUTO_INCREMENT,
  118. `content` varchar(5000) DEFAULT '' COMMENT '内容',
  119. `type` varchar(2) DEFAULT '' COMMENT '类型(1代表入驻配置,2代表入驻须知,3代表迁出配置,4代表迁出须知)',
  120. `creator` int(11) DEFAULT NULL COMMENT '创建人',
  121. `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  122. `modifier` int(11) DEFAULT NULL COMMENT '修改人',
  123. `modifyTime` datetime DEFAULT NULL COMMENT '修改时间',
  124. `isEnabled` varchar(2) DEFAULT '1' COMMENT '是否有效',
  125. PRIMARY KEY (`id`)
  126. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  127. ------企业入驻---------------OLD
  128. CREATE TABLE `tb_enterprise` (
  129. `id` int(11) NOT NULL AUTO_INCREMENT,
  130. `enterNumber` varchar(100) NOT NULL DEFAULT '' COMMENT '企业入驻编码',
  131. `orgId` varchar(100) DEFAULT '' COMMENT '楼宇id',
  132. `floorIds` varchar(200) DEFAULT '' COMMENT '楼层Ids',
  133. `roomIds` varchar(200) DEFAULT '' COMMENT '房间号Ids',
  134. `virName` varchar(200) DEFAULT '' COMMENT '企业名称',
  135. `applyName` varchar(200) DEFAULT '' COMMENT '申请人',
  136. `applyTel` varchar(200) DEFAULT '' COMMENT '申请电话',
  137. `remanName1` varchar(200) DEFAULT '' COMMENT '负责人1名称',
  138. `remanTel1` varchar(200) DEFAULT '' COMMENT '负责人1电话',
  139. `remanEmail1` varchar(200) DEFAULT '' COMMENT '负责人1邮件',
  140. `isPushPower1` int(11) DEFAULT '0' COMMENT '物品放行(负责人1)',
  141. `isReleasePower1` int(11) DEFAULT '0' COMMENT '推送账单(负责人1)',
  142. `remanName2` varchar(200) DEFAULT '' COMMENT '负责人2姓名',
  143. `remanTel2` varchar(200) DEFAULT '' COMMENT '负责人2电话',
  144. `remanEmail2` varchar(200) DEFAULT '' COMMENT '负责人2邮件',
  145. `isPushPower2` int(11) DEFAULT '0' COMMENT '物品放行(负责人2)',
  146. `isReleasePower2` int(11) DEFAULT '0' COMMENT '推送账单(负责人2)',
  147. `remark` varchar(500) DEFAULT '' COMMENT '备注',
  148. `isWechat` int(11) DEFAULT '0' COMMENT '是否微信',
  149. `isMessage` int(11) DEFAULT '0' COMMENT '是否短信',
  150. `isEmail` int(11) DEFAULT '0' COMMENT '是否邮箱',
  151. `businessImageUrl` varchar(255) DEFAULT '' COMMENT '企业营业执照照片',
  152. `powerAttorneyImageUrl` varchar(255) DEFAULT '' COMMENT '法人代表授权委托书',
  153. `powerFaceImageUrl` varchar(255) DEFAULT '' COMMENT '法人代表身份证人面照',
  154. `powerNationImageUrl` varchar(255) DEFAULT '' COMMENT '法人代表身份证国徽照',
  155. `customerService` varchar(255) DEFAULT '' COMMENT '跟进客服人员',
  156. `engPerson` varchar(255) DEFAULT '' COMMENT '跟进工程人员',
  157. `otherRecord` varchar(500) DEFAULT '' COMMENT '其他记录',
  158. `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  159. `modifyTime` datetime DEFAULT NULL COMMENT '修改时间',
  160. `modifier` int(11) DEFAULT '0' COMMENT '修改人',
  161. `isEnabled` varchar(2) DEFAULT '1' COMMENT '是否有效',
  162. `status` varchar(2) DEFAULT '0' COMMENT '状态',
  163. `repairNumber` varchar(255) DEFAULT '' COMMENT '维修单编码',
  164. `roomNames` varchar(255) DEFAULT '' COMMENT '房间号名称',
  165. `floorNames` varchar(255) DEFAULT '' COMMENT '楼层名称',
  166. `creator` int(11) DEFAULT '0' COMMENT '创建人',
  167. `emigType` varchar(11) DEFAULT '' COMMENT '迁出类型',
  168. `emigReason` varchar(11) DEFAULT '' COMMENT '迁出原因',
  169. `state` varchar(11) DEFAULT '' COMMENT '状态(1企业入驻2企业迁出)',
  170. `virId` int(11) DEFAULT '0' COMMENT '企业ID',
  171. `emigNewWay` varchar(2) DEFAULT '' COMMENT '企业迁出发起方式(1微信2app)',
  172. PRIMARY KEY (`id`)
  173. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  174. -------------------新的企业入驻(迁出)表--------------NEW
  175. CREATE TABLE `tb_enterprise` (
  176. `id` int(11) NOT NULL AUTO_INCREMENT,
  177. `enterNumber` varchar(100) NOT NULL DEFAULT '' COMMENT '企业入驻编码',
  178. `orgId` varchar(100) DEFAULT '' COMMENT '楼宇id',
  179. `floorIds` varchar(200) DEFAULT '' COMMENT '楼层Ids',
  180. `roomIds` varchar(200) DEFAULT '' COMMENT '房间号Ids',
  181. `virName` varchar(200) DEFAULT '' COMMENT '企业名称',
  182. `applyName` varchar(200) DEFAULT '' COMMENT '申请人',
  183. `applyTel` varchar(200) DEFAULT '' COMMENT '申请电话',
  184. `remanName1` varchar(200) DEFAULT '' COMMENT '负责人1名称',
  185. `remanTel1` varchar(200) DEFAULT '' COMMENT '负责人1电话',
  186. `remanEmail1` varchar(200) DEFAULT '' COMMENT '负责人1邮件',
  187. `isPushPower1` int(11) DEFAULT '0' COMMENT '物品放行(负责人1)',
  188. `isReleasePower1` int(11) DEFAULT '0' COMMENT '推送账单(负责人1)',
  189. `remanName2` varchar(200) DEFAULT '' COMMENT '负责人2姓名',
  190. `remanTel2` varchar(200) DEFAULT '' COMMENT '负责人2电话',
  191. `remanEmail2` varchar(200) DEFAULT '' COMMENT '负责人2邮件',
  192. `isPushPower2` int(11) DEFAULT '0' COMMENT '物品放行(负责人2)',
  193. `isReleasePower2` int(11) DEFAULT '0' COMMENT '推送账单(负责人2)',
  194. `remark` varchar(500) DEFAULT '' COMMENT '备注',
  195. `isWechat` int(11) DEFAULT '0' COMMENT '是否微信',
  196. `isMessage` int(11) DEFAULT '0' COMMENT '是否短信',
  197. `isEmail` int(11) DEFAULT '0' COMMENT '是否邮箱',
  198. `businessImageUrl` varchar(255) DEFAULT '' COMMENT '企业营业执照照片',
  199. `powerAttorneyImageUrl` varchar(255) DEFAULT '' COMMENT '法人代表授权委托书',
  200. `powerFaceImageUrl` varchar(255) DEFAULT '' COMMENT '法人代表身份证人面照',
  201. `powerNationImageUrl` varchar(255) DEFAULT '' COMMENT '法人代表身份证国徽照',
  202. `customerService` varchar(255) DEFAULT '' COMMENT '跟进客服人员',
  203. `engPerson` varchar(255) DEFAULT '' COMMENT '跟进工程人员',
  204. `otherRecord` varchar(500) DEFAULT '' COMMENT '其他记录',
  205. `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  206. `modifyTime` datetime DEFAULT NULL COMMENT '修改时间',
  207. `modifier` int(11) DEFAULT '0' COMMENT '修改人',
  208. `isEnabled` varchar(2) DEFAULT '1' COMMENT '是否有效',
  209. `status` varchar(2) DEFAULT '0' COMMENT '状态',
  210. `repairNumber` varchar(255) DEFAULT '' COMMENT '维修单编码',
  211. `roomNames` varchar(255) DEFAULT '' COMMENT '房间号名称',
  212. `floorNames` varchar(255) DEFAULT '' COMMENT '楼层名称',
  213. `creator` int(11) DEFAULT '0' COMMENT '创建人',
  214. `emigType` varchar(11) DEFAULT '' COMMENT '迁出类型',
  215. `emigReason` varchar(11) DEFAULT '' COMMENT '迁出原因',
  216. `state` varchar(11) DEFAULT '' COMMENT '状态(1企业入驻2企业迁出)',
  217. `virId` int(11) DEFAULT '0' COMMENT '企业ID',
  218. `emigNewWay` varchar(2) DEFAULT '' COMMENT '企业迁出发起方式(1微信2app)',
  219. PRIMARY KEY (`id`)
  220. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  221. --------审批表
  222. CREATE TABLE `tb_audit_enterprise` (
  223. `id` int(11) NOT NULL AUTO_INCREMENT,
  224. `content` varchar(255) DEFAULT '' COMMENT '审批内容',
  225. `remark` varchar(500) DEFAULT '' COMMENT '备注',
  226. `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  227. `creator` int(11) DEFAULT NULL COMMENT '创建人',
  228. `type` varchar(2) DEFAULT '' COMMENT '类型1企业入驻2企业迁出',
  229. `sourseId` int(11) DEFAULT NULL COMMENT '来源单据Id(企业入驻/企业迁出单ID)',
  230. `reasonType` int(11) DEFAULT '0' COMMENT '审批操作类型(1通过0拒绝)',
  231. PRIMARY KEY (`id`)
  232. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  233. ------------------账单推送
  234. alter table tb_billpush add monthDate int default 0;
  235. alter table tb_billpush add beginTime datetime default NULL;
  236. alter table tb_billpush add endTime datetime default NULL;
  237. --------------------企业迁出结算表
  238. CREATE TABLE `tb_enter_settlement` (
  239. `id` int(11) NOT NULL AUTO_INCREMENT,
  240. `settlementImageUrl` varchar(500) DEFAULT '' COMMENT '结算表图片地址',
  241. `remark` varchar(255) DEFAULT '' COMMENT '备注',
  242. `enterId` int(11) DEFAULT '0' COMMENT '迁出Id',
  243. `creator` varchar(11) DEFAULT '' COMMENT '创建人',
  244. `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  245. `modifier` varchar(11) DEFAULT '' COMMENT '修改人',
  246. `modifyTime` datetime DEFAULT NULL COMMENT '修改时间',
  247. `isEnabled` varchar(2) DEFAULT '' COMMENT '是否有效',
  248. `amount` decimal(14,2) DEFAULT '0.00' COMMENT '结算金额',
  249. PRIMARY KEY (`id`)
  250. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  251. alter table tb_enter_settlement add amount decimal(14,2) default 0;
  252. -----------------修改维修单-------------------------
  253. alter table tb_repair_bills add meetingTime datetime default NULL;
  254. -----------------修改企业入驻单--------------------
  255. alter table tb_enterprise add evaluate varchar(2) DEFAULT '';
  256. ---------2018-06-26--------------------------
  257. -------------------修改角色表------------------------
  258. alter table tb_app_role add SYSCODE varchar(255) DEFAULT '';
  259. alter table tb_app_role add ISINITIALIZATION int(11) unsigned zerofill DEFAULT NULL;
  260. ----------------------修改企业--------------------------------
  261. alter table tb_virtualarchitecture add freeLenTime varchar(255) DEFAULT '0';
  262. alter table tb_virtualarchitecture add remainderTime varchar(255) DEFAULT '0';
  263. alter table tb_app_role add FLOOR_REPAIR int(11) unsigned zerofill DEFAULT NULL;
  264. alter table tr_app_user_org add ROLE_ID int(11) unsigned zerofill DEFAULT NULL;
  265. alter table tr_app_user_floor add role_id int(11) unsigned zerofill DEFAULT NULL;
  266. alter table tr_app_user_dept add ROLE_ID int(11) unsigned zerofill DEFAULT NULL;
  267. alter table tr_app_user_company add ROLE_ID int(11) unsigned zerofill DEFAULT NULL;
  268. alter table tb_user_repair_type add role_id int(11) unsigned zerofill DEFAULT NULL;
  269. CREATE TABLE `tb_bill_record` (
  270. `id` int(11) NOT NULL AUTO_INCREMENT,
  271. `type` int(11) DEFAULT NULL COMMENT '单据类型',
  272. `sourId` int(11) DEFAULT NULL COMMENT '单据id',
  273. `operation` varchar(255) DEFAULT '' COMMENT '操作',
  274. `operationType` int(11) DEFAULT NULL COMMENT '操作类型',
  275. `represent` varchar(255) DEFAULT '' COMMENT '操作描述',
  276. `creator` int(11) DEFAULT NULL,
  277. `createTime` datetime DEFAULT NULL,
  278. `remark` varchar(255) DEFAULT '' COMMENT '备注',
  279. PRIMARY KEY (`id`)
  280. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  281. alter table tb_floor add partOrgID varchar(50) DEFAULT '';
  282. ---------------------洗车项目2018-08-09---------------------------
  283. -- 洗车订单表
  284. CREATE TABLE `tb_car_washorder` (
  285. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  286. `orderNo` varchar(255) DEFAULT '' COMMENT '订单编码',
  287. `createTime` datetime DEFAULT NULL,
  288. `creator` bigint(20) DEFAULT NULL,
  289. `source` varchar(2) DEFAULT '1' COMMENT '来源(1微信2pc)',
  290. `preOrder` bigint(20) DEFAULT NULL COMMENT '下单人',
  291. `status` varchar(2) DEFAULT '0' COMMENT '状态(1已提交2已接单(已派单)3洗车中4已完成洗车5已转单6已取消)',
  292. `operaManagerId` varchar(200) DEFAULT '' COMMENT '操作主管',
  293. `carWasherId` varchar(200) DEFAULT '' COMMENT '洗车员',
  294. `payState` varchar(2) DEFAULT '0' COMMENT '支付状态',
  295. `custId` bigint(20) DEFAULT NULL COMMENT '用户id',
  296. `parkSpace` varchar(255) DEFAULT '' COMMENT '停车位',
  297. `keySpace` varchar(255) DEFAULT '' COMMENT '钥匙位置',
  298. `modifier` varchar(255) DEFAULT NULL,
  299. `modifyTime` datetime DEFAULT NULL,
  300. `carNumber` varchar(255) DEFAULT '' COMMENT '车牌号',
  301. PRIMARY KEY (`id`),
  302. KEY `custId` (`custId`),
  303. CONSTRAINT `custId` FOREIGN KEY (`custId`) REFERENCES `tb_customer` (`id`)
  304. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  305. -- 用户表
  306. CREATE TABLE `tb_customer` (
  307. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  308. `userName` varchar(255) DEFAULT '' COMMENT '名称',
  309. `mobile` varchar(255) DEFAULT '' COMMENT '电话号码',
  310. `dept` varchar(255) DEFAULT '' COMMENT '部门',
  311. `position` varchar(255) DEFAULT '' COMMENT '职位',
  312. `carNumber` varchar(255) DEFAULT '' COMMENT '车牌号',
  313. `carType` varchar(255) DEFAULT '' COMMENT '车型',
  314. `isEnabled` varchar(2) DEFAULT '0' COMMENT '是否有效',
  315. `createTime` datetime DEFAULT NULL,
  316. `creator` varchar(255) DEFAULT NULL,
  317. `modifyTime` datetime DEFAULT NULL,
  318. `modifier` varchar(255) DEFAULT NULL,
  319. `parkSpace` varchar(255) DEFAULT '' COMMENT '停车位置',
  320. `serialNumber` bigint(20) DEFAULT '0' COMMENT '序号',
  321. `openId` varchar(255) DEFAULT '' COMMENT '关联微信用户',
  322. PRIMARY KEY (`id`)
  323. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  324. -- 用户评价表
  325. CREATE TABLE `tb_user_evaluate` (
  326. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  327. `orderId` bigint(20) DEFAULT NULL COMMENT '订单id',
  328. `openId` varchar(200) DEFAULT '' COMMENT '评价openId',
  329. `createTime` datetime DEFAULT NULL,
  330. `creator` varchar(255) DEFAULT NULL,
  331. `comment` varchar(500) DEFAULT '' COMMENT '评语',
  332. `star` int(2) DEFAULT NULL COMMENT '星级',
  333. `service_impression` varchar(255) DEFAULT '' COMMENT '员工印象',
  334. PRIMARY KEY (`id`)
  335. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  336. -- 设置名额
  337. CREATE TABLE `tb_pro_set` (
  338. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  339. `projectId` varchar(255) DEFAULT '' COMMENT '项目id',
  340. `quota` int(11) DEFAULT NULL COMMENT '名额',
  341. `remark` varchar(255) DEFAULT '' COMMENT '备注',
  342. `isEnabled` varchar(2) DEFAULT '1' COMMENT '是否有效',
  343. `createTime` datetime DEFAULT NULL,
  344. `creator` varchar(255) DEFAULT NULL,
  345. `modifyTime` datetime DEFAULT NULL,
  346. `modifier` varchar(255) DEFAULT NULL,
  347. PRIMARY KEY (`id`)
  348. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  349. -- 订单和额外服务中间表
  350. CREATE TABLE `tb_order_extra_service` (
  351. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  352. `orderId` bigint(20) DEFAULT NULL COMMENT '洗车订单id',
  353. `extraId` bigint(20) DEFAULT NULL COMMENT '额外服务id',
  354. `createTime` datetime DEFAULT NULL,
  355. `creator` varchar(255) DEFAULT NULL,
  356. PRIMARY KEY (`id`),
  357. KEY `extraId` (`extraId`),
  358. KEY `orderId` (`orderId`),
  359. CONSTRAINT `extraId` FOREIGN KEY (`extraId`) REFERENCES `tb_extra_service` (`id`),
  360. CONSTRAINT `orderId` FOREIGN KEY (`orderId`) REFERENCES `tb_car_washorder` (`id`)
  361. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  362. -- 额外服务表
  363. CREATE TABLE `tb_extra_service` (
  364. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  365. `proSetId` bigint(255) DEFAULT NULL COMMENT '项目设置ID',
  366. `content` varchar(500) DEFAULT '' COMMENT '内容',
  367. `amount` decimal(14,2) unsigned DEFAULT '0.00' COMMENT '金额',
  368. `remark` varchar(255) DEFAULT '' COMMENT '备注',
  369. `isEnabled` varchar(2) DEFAULT '1' COMMENT '是否有效',
  370. `createTime` datetime DEFAULT NULL,
  371. `creator` varchar(255) DEFAULT NULL,
  372. `modifyTime` datetime DEFAULT NULL,
  373. `modifier` varchar(255) DEFAULT NULL,
  374. `serviceName` varchar(255) DEFAULT '' COMMENT '服务名称',
  375. PRIMARY KEY (`id`),
  376. KEY `proSetId` (`proSetId`),
  377. CONSTRAINT `proSetId` FOREIGN KEY (`proSetId`) REFERENCES `tb_pro_set` (`id`)
  378. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  379. ------------------ 修改日志表的字段类型 -------------------
  380. ALTER TABLE tb_bill_record MODIFY COLUMN id bigint(20);
  381. ALTER TABLE tb_bill_record MODIFY COLUMN sourId bigint(20);
  382. ALTER TABLE tb_bill_record MODIFY COLUMN creator bigint(20);
  383. --------------------企业账号-----------------------------------------
  384. alter table tb_virtualarchitecture add COLUMN settleType int(2) DEFAULT 0 COMMENT '企业结算方式(1现结2月结)';
  385. CREATE TABLE `tb_vir_account` (
  386. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  387. `virId` int(20) DEFAULT NULL COMMENT '企业id',
  388. `virAccount` varchar(255) DEFAULT '' COMMENT '企业账号',
  389. `password` varchar(255) DEFAULT '' COMMENT '密码',
  390. `creator` varchar(255) DEFAULT '',
  391. `createTime` datetime DEFAULT NULL,
  392. `modifier` varchar(255) DEFAULT NULL,
  393. `modifyTime` datetime DEFAULT NULL,
  394. `isEnable` varchar(2) DEFAULT NULL,
  395. PRIMARY KEY (`id`),
  396. KEY `virId` (`virId`),
  397. CONSTRAINT `virId` FOREIGN KEY (`virId`) REFERENCES `tb_virtualarchitecture` (`id`)
  398. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  399. CREATE TABLE `tb_user_account` (
  400. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  401. `accountId` bigint(20) DEFAULT NULL,
  402. `isOnline` varchar(2) DEFAULT '' COMMENT '是否在线',
  403. `creator` varchar(255) DEFAULT NULL,
  404. `createTime` datetime DEFAULT NULL,
  405. `modifier` varchar(255) DEFAULT NULL,
  406. `modifyTime` datetime DEFAULT NULL,
  407. `openId` varchar(255) DEFAULT '' COMMENT '微信用户的openId',
  408. `userId` varchar(255) DEFAULT '' COMMENT '微信用户所绑定的userId',
  409. PRIMARY KEY (`id`),
  410. KEY `accountId` (`accountId`),
  411. CONSTRAINT `accountId` FOREIGN KEY (`accountId`) REFERENCES `tb_vir_account` (`id`)
  412. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  413. ------------------------2018-08-24----------------------------
  414. alter table tb_floor change column organizationId buildId int(11);
  415. ---------------------2018-08-30
  416. alter table tb_billpush add COLUMN virName varchar(200) DEFAULT '';
  417. alter table tb_billpush add COLUMN virNumber varchar(200) DEFAULT '';
  418. alter table tb_billpush add COLUMN buildName varchar(200) DEFAULT '';
  419. alter table tb_billpush add COLUMN orgId varchar(200) DEFAULT '';
  420. alter table tb_pushmodel add COLUMN orgId varchar(200) DEFAULT '';
  421. ALTER TABLE `tb_vir_account` MODIFY COLUMN `virAccount` VARCHAR(255) BINARY;
  422. ALTER TABLE `tb_vir_account` MODIFY COLUMN `password` VARCHAR(255) BINARY;
  423. ALTER TABLE `tb_app_user` MODIFY COLUMN `USERNAME` VARCHAR(50) BINARY;
  424. ALTER TABLE `tb_app_user` MODIFY COLUMN `PASSWORD` VARCHAR(128) BINARY;
  425. ALTER TABLE tb_app_notice MODIFY COLUMN summary_info text;
  426. ------------------------2018-09-06---------------------
  427. CREATE TABLE `tb_app_useversion` (
  428. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  429. `useCode` varchar(50) DEFAULT '' COMMENT '应用编码',
  430. `useName` varchar(50) DEFAULT '' COMMENT '应用名称',
  431. `versionCode` varchar(20) DEFAULT '' COMMENT '版本号',
  432. `usePlatform` varchar(20) DEFAULT '' COMMENT '应用平台(1安卓2ios)',
  433. `versionName` varchar(20) DEFAULT '' COMMENT '版本名称',
  434. `customer` varchar(50) DEFAULT '' COMMENT '所属客户',
  435. `strMessage` varchar(800) DEFAULT '' COMMENT '更新内容',
  436. `status` varchar(1) DEFAULT '' COMMENT '状态(1可用2不可用)',
  437. `updateURL` varchar(500) DEFAULT '' COMMENT '更新链接',
  438. `creator` varchar(20) DEFAULT '' COMMENT '创建人',
  439. `createTime` datetime DEFAULT NULL COMMENT '发布时间',
  440. `updateFlag` varchar(1) DEFAULT '' COMMENT '是否强制更新(1强制更新2不强制更新)',
  441. `remark` varchar(200) DEFAULT '' COMMENT '备注',
  442. `minimumVersion` varchar(20) DEFAULT '' COMMENT '支持最低版本',
  443. `isLast` varchar(1) DEFAULT '' COMMENT '是否最新记录(1是最新2不是)',
  444. `clientId` bigint(20) DEFAULT NULL COMMENT '所属客户数据字典所选id',
  445. `useCodeId` bigint(20) DEFAULT NULL COMMENT '应用编码数据字典id',
  446. PRIMARY KEY (`id`)
  447. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  448. ------------------------2018-09-06---------------------
  449. ------------------------2018-09-18---------------------
  450. alter table tb_customer add COLUMN orgId varchar(200) DEFAULT '';
  451. alter table tb_car_washorder add COLUMN orgId varchar(200) DEFAULT '';
  452. ------------------------2018-09-18---------------------
  453. CREATE TABLE `tb_dorm_roomerinfo` (
  454. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  455. `userName` varchar(255) DEFAULT '' COMMENT '用户名',
  456. `sex` varchar(2) DEFAULT '' COMMENT '性别',
  457. `workNo` varchar(255) DEFAULT '' COMMENT '工号',
  458. `IDcard` varchar(255) DEFAULT '' COMMENT '身份证',
  459. `mobile` varchar(255) DEFAULT '' COMMENT '电话号码',
  460. `openId` varchar(255) DEFAULT '' COMMENT '关联微信用户',
  461. `orgId` varchar(50) DEFAULT '' COMMENT '项目id',
  462. `buildId` varchar(50) DEFAULT '' COMMENT '楼宇id',
  463. `floorId` varchar(50) DEFAULT '' COMMENT '楼层id',
  464. `roomId` varchar(50) DEFAULT '' COMMENT '房间号id',
  465. `bedNo` varchar(50) DEFAULT '' COMMENT '床号',
  466. `status` varchar(2) DEFAULT '' COMMENT '状态(1在宿2退宿)',
  467. `createTime` datetime DEFAULT NULL,
  468. `creator` varchar(50) DEFAULT NULL,
  469. `modifyTime` datetime DEFAULT NULL,
  470. `modifier` varchar(50) DEFAULT NULL,
  471. `isEnabled` varchar(2) DEFAULT '',
  472. `build` varchar(255) DEFAULT '' COMMENT '楼宇名称',
  473. `floor` varchar(255) DEFAULT '' COMMENT '楼层名称',
  474. `room` varchar(255) DEFAULT '' COMMENT '房间号名称',
  475. `apartment` varchar(255) DEFAULT '' COMMENT '公寓',
  476. PRIMARY KEY (`id`)
  477. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='宿舍信息管理表';
  478. CREATE TABLE `tb_dorm_checkout` (
  479. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  480. `number` varchar(50) DEFAULT '' COMMENT '编码',
  481. `status` varchar(2) DEFAULT '' COMMENT '单据状态(1待审核2待放行3已放行4已拒绝)',
  482. `dormId` bigint(20) DEFAULT NULL COMMENT '用户入宿信息id',
  483. `goodsInfo` varchar(500) DEFAULT '' COMMENT '物品信息',
  484. `bedEmptyImage` varchar(500) DEFAULT '' COMMENT '床头置空照片',
  485. `bedLabelImage` varchar(500) DEFAULT '' COMMENT '床头标签照片',
  486. `otherImage` varchar(2000) DEFAULT '' COMMENT '其他物品照片',
  487. `roomerId` varchar(50) DEFAULT '' COMMENT '舍友id',
  488. `roomieNo` varchar(50) DEFAULT '' COMMENT '舍友工号',
  489. `roomieImage` varchar(500) DEFAULT '' COMMENT '设有照片',
  490. `createTime` datetime DEFAULT NULL,
  491. `creator` varchar(50) DEFAULT NULL,
  492. `modifyTime` datetime DEFAULT NULL,
  493. `modifier` varchar(50) DEFAULT NULL,
  494. `isEnabled` varchar(2) DEFAULT '',
  495. PRIMARY KEY (`id`),
  496. KEY `dormId` (`dormId`) USING BTREE,
  497. CONSTRAINT `dormId` FOREIGN KEY (`dormId`) REFERENCES `tb_dorm_roomerinfo` (`id`) ON UPDATE NO ACTION
  498. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='退宿申请表';
  499. CREATE TABLE `tb_dorm_release` (
  500. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  501. `sourId` bigint(20) DEFAULT NULL COMMENT '来源单据id(退宿申请id)',
  502. `status` varchar(2) DEFAULT NULL,
  503. `creator` varchar(255) DEFAULT NULL,
  504. `createTime` datetime DEFAULT NULL,
  505. `modifier` varchar(255) DEFAULT NULL,
  506. `modifyTime` datetime DEFAULT NULL,
  507. `releaseTime` datetime DEFAULT NULL COMMENT '放行时间',
  508. `releaseMan` varchar(255) DEFAULT '' COMMENT '放行人',
  509. `releaseResult` varchar(255) DEFAULT '' COMMENT '放行结果',
  510. `releaseReason` varchar(500) DEFAULT '' COMMENT '放行意见',
  511. `releaseGoods` varchar(255) DEFAULT '' COMMENT '放行物品',
  512. `releaseImages` varchar(500) DEFAULT '' COMMENT '放行图片',
  513. PRIMARY KEY (`id`),
  514. KEY `sourId` (`sourId`) USING BTREE,
  515. CONSTRAINT `sourId` FOREIGN KEY (`sourId`) REFERENCES `tb_dorm_checkout` (`id`) ON UPDATE NO ACTION
  516. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  517. -----------------------------------------------宿舍信息管理表功能(2018-09-27)-------------------------
  518. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`, `LASTUPDATEBY`, `LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`)
  519. VALUES (NULL, '宿舍管理', '', NULL, '-1', NULL, NULL, '2018-09-20', '1', '248', '1');
  520. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`, `LASTUPDATEBY`, `LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`)
  521. VALUES (NULL, '条约配置', 'admin/dorm/jumpTreatyAllocation?funcid=251', NULL, '-1', NULL, NULL, '2018-09-21', '1', '251', '0');
  522. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`, `LASTUPDATEBY`, `LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`)
  523. VALUES (NULL, '宿舍信息管理', 'admin/dorm/jumpDormitoryInfor?funcid=252', NULL, '-1', NULL, NULL, '2018-09-21', '1', '252', '0');
  524. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`, `LASTUPDATEBY`, `LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`)
  525. VALUES (NULL, '退宿审核管理', 'admin/dorm/jumpRetreatAudit?funcid=253', NULL, '-1', NULL, NULL, '2018-09-21', '1', '253', '0');
  526. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`, `LASTUPDATEBY`, `LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`)
  527. VALUES (NULL, '宿舍管理(PC)', '', NULL, '-1', NULL, NULL, '2018-09-26', '1', '254', '0');
  528. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`, `LASTUPDATEBY`, `LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`)
  529. VALUES ('7001', '扫码放行(宿管app)', '', NULL, '-1', NULL, NULL, '2018-09-27', '1', '255', '1');
  530. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`, `LASTUPDATEBY`, `LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`)
  531. VALUES ('7002', '放行历史(宿管app)', '', NULL, '-1', NULL, NULL, '2018-09-27', '1', '256', '1');
  532. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`, `LASTUPDATEBY`, `LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`)
  533. VALUES ('7000', '宿舍管理审核', '', NULL, '-1', NULL, NULL, '2018-09-27', '1', '257', '1');
  534. ----------------------------------------------宿舍信息管理表菜单(2018-09-27)--------------------------
  535. INSERT INTO `tb_app_menu` ( `MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  536. VALUES ( '宿舍管理', (select id from tb_app_function where FUNCTION_NAME='宿舍管理' ), '326', '0', 'APP宿舍管理菜单', '80', SYSDATE(), NULL, '1', '/app/image/super/index_dorm_manage.png', 'APP_MENU_DORM_MANAGE');
  537. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  538. INSERT INTO `tb_app_menu` ( `MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  539. VALUES ( '宿舍管理', (select id from tb_app_function where FUNCTION_NAME='宿舍管理PC' ), '329', '0', '宿舍管理(pc)', NULL, SYSDATE(), NULL, '0', '', '');
  540. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  541. INSERT INTO `tb_app_menu` ( `MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  542. VALUES ( '条约配置', (select id from tb_app_function where FUNCTION_NAME='条约配置' ), '330', (select id from tb_app_menu where DESCRIPTION='宿舍管理(pc)' and MENU_NAME='宿舍管理' ), '条约配置(pc)', NULL, SYSDATE(), NULL, '0', '', '');
  543. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  544. INSERT INTO `tb_app_menu` ( `MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  545. VALUES ( '宿舍信息管理', (select id from tb_app_function where FUNCTION_NAME='宿舍信息管理' ), '331', (select id from tb_app_menu where DESCRIPTION='宿舍管理(pc)' and MENU_NAME='宿舍管理' ), '宿舍信息管理(pc)', NULL, SYSDATE(), NULL, '0', '', '');
  546. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  547. INSERT INTO `tb_app_menu` ( `MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  548. VALUES ( '退宿审核管理', (select id from tb_app_function where FUNCTION_NAME='退宿审核管理' ), '332', (select id from tb_app_menu where DESCRIPTION='宿舍管理(pc)' and MENU_NAME='宿舍管理' ), '退宿审核管理(pc)', NULL, SYSDATE(), NULL, '0', '', '');
  549. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  550. INSERT INTO `tb_app_menu` ( `MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  551. VALUES ( '扫码放行', (select id from tb_app_function where FUNCTION_NAME='扫码放行(宿管app)' ), '340', (select id from tb_app_menu where DESCRIPTION='APP宿舍管理菜单' and MENU_NAME='宿舍管理' ), '宿舍管理扫码放行APP', NULL, SYSDATE(), NULL, '1', '/app/image/super/ic_object_release.png', 'APP_MENU_DORM_SCANRELEASE');
  552. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  553. INSERT INTO `tb_app_menu` ( `MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  554. VALUES ( '放行历史', (select id from tb_app_function where FUNCTION_NAME='放行历史(宿管app)' ), '341', (select id from tb_app_menu where DESCRIPTION='APP宿舍管理菜单' and MENU_NAME='宿舍管理' ), '宿舍管理放行历史APP', NULL,SYSDATE(), NULL, '1', '/app/image/super/ic_today_release.png', 'APP_MENU_DORM_RELEASEHISTORY');
  555. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  556. INSERT INTO `tb_app_menu` ( `MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  557. VALUES ( '宿舍管理审核', (select id from tb_app_function where FUNCTION_NAME='宿舍管理审核' ), '342', (select id from tb_app_menu where DESCRIPTION='APP宿舍管理菜单' and MENU_NAME='宿舍管理' ), '宿舍管理审核APP', NULL, SYSDATE(), NULL, '1', '', 'APP_MENU_DORM_RELEASE_MANAGER');
  558. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  559. --------------------------------------2018-10-10-------------------------------------------------------
  560. alter table tb_user_account add COLUMN orgId varchar(200) DEFAULT '' COMMENT '项目id';
  561. alter table tb_vir_account add COLUMN orgId varchar(200) DEFAULT '' COMMENT '项目id';
  562. alter table tb_dorm_checkout add COLUMN orgId varchar(200) DEFAULT '' COMMENT '项目id';
  563. --------------------------------------2018-10-11------------------------------------------------------------
  564. alter table tb_user_evaluate add COLUMN evaluateImages varchar(2000) DEFAULT '' COMMENT '评价图片';
  565. alter table tb_user_evaluate add COLUMN type varchar(2) DEFAULT '' COMMENT '单据类型(1洗车评价2订餐评价)';
  566. -----------------------------------2018-10-12-----企业账号更新项目---------------------
  567. update tb_vir_account v set v.orgId=(select vir.organizationId from tb_virtualarchitecture vir
  568. where vir.id=v.virId);
  569. update tb_user_account v set v.orgId=(select vir.orgId from tb_vir_account vir
  570. where vir.id=v.accountId);
  571. -----------------------------------2018-10-16-----------------------------
  572. ALTER TABLE tb_bill_record MODIFY COLUMN operation text;
  573. ALTER TABLE tb_bill_record MODIFY COLUMN represent text;
  574. ALTER TABLE tb_bill_record MODIFY COLUMN remark text;
  575. -----------------------------------2018-10-17-----------------------------
  576. ALTER TABLE tb_model MODIFY COLUMN content text;
  577. -- 2018-10-17--------订餐系统----------------------
  578. CREATE TABLE `tb_consumer` (
  579. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  580. `loginName` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  581. `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  582. `userName` varchar(255) DEFAULT '' COMMENT '姓名',
  583. `dept` varchar(255) DEFAULT '' COMMENT '部门',
  584. `mobile` varchar(255) DEFAULT '' COMMENT '手机号',
  585. `address` varchar(255) DEFAULT '' COMMENT '送餐地址',
  586. `roleType` varchar(2) DEFAULT '' COMMENT '类型(1管理员2普通用户)',
  587. `orgId` varchar(255) DEFAULT NULL,
  588. `openId` varchar(255) DEFAULT NULL,
  589. `createTime` datetime DEFAULT NULL,
  590. `creator` varchar(255) DEFAULT NULL,
  591. `modifyTime` datetime DEFAULT NULL,
  592. `modifier` varchar(255) DEFAULT NULL,
  593. `isEnabled` varchar(2) DEFAULT '',
  594. PRIMARY KEY (`id`)
  595. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  596. CREATE TABLE `tb_meal` (
  597. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  598. `mealName` varchar(255) DEFAULT '' COMMENT '餐品名',
  599. `spec` varchar(2) DEFAULT '' COMMENT '规格(1单品、2三菜一汤、3三菜一汤加水果)',
  600. `stapleFood` varchar(255) DEFAULT '' COMMENT '主食',
  601. `mealDescribe` varchar(255) DEFAULT '' COMMENT '餐品描述',
  602. `deliveryTimeStr` varchar(255) DEFAULT '' COMMENT '送餐时间',
  603. `supplyType` varchar(2) DEFAULT '' COMMENT '供应类型(1、长期有效2按具体时间供应)',
  604. `supplyTime` varchar(255) DEFAULT '' COMMENT '供应时间(供应类型为2的时候才有值)',
  605. `status` varchar(2) DEFAULT '' COMMENT '状态(1上架2下架)',
  606. `mealImages` varchar(2000) DEFAULT '' COMMENT '餐品图片',
  607. `orgId` varchar(11) DEFAULT NULL,
  608. `createTime` datetime DEFAULT NULL,
  609. `creator` varchar(255) DEFAULT NULL,
  610. `modifyTime` datetime DEFAULT NULL,
  611. `modifier` varchar(255) DEFAULT NULL,
  612. `isEnabled` varchar(2) DEFAULT '',
  613. PRIMARY KEY (`id`)
  614. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  615. CREATE TABLE `tb_mealcar` (
  616. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  617. `mealId` bigint(20) NOT NULL COMMENT '餐品id',
  618. `mealName` varchar(255) DEFAULT '' COMMENT '餐品名',
  619. `stapleFood` varchar(255) DEFAULT '' COMMENT '主食',
  620. `foodCount` int(14) DEFAULT NULL COMMENT '份数',
  621. `createTime` datetime DEFAULT NULL,
  622. `creator` varchar(255) DEFAULT NULL,
  623. `modifyTime` datetime DEFAULT NULL,
  624. `modifier` varchar(255) DEFAULT NULL,
  625. `isEnabled` varchar(2) DEFAULT '',
  626. PRIMARY KEY (`id`)
  627. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  628. CREATE TABLE `tb_order_dinner` (
  629. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  630. `number` varchar(255) DEFAULT '' COMMENT '编码',
  631. `status` varchar(2) DEFAULT '' COMMENT '状态(1待送餐2待评价3已完成4已取消)',
  632. `orgId` varchar(255) DEFAULT NULL,
  633. `createTime` datetime DEFAULT NULL,
  634. `creator` varchar(255) DEFAULT NULL,
  635. `modifyTime` datetime DEFAULT NULL,
  636. `modifier` varchar(255) DEFAULT NULL,
  637. `isEnabled` varchar(2) DEFAULT '',
  638. `star` int(2) DEFAULT NULL COMMENT '星级',
  639. PRIMARY KEY (`id`)
  640. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  641. CREATE TABLE `tb_order_dinner_info` (
  642. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  643. `orderId` bigint(20) DEFAULT NULL COMMENT '订单id',
  644. `mealId` bigint(20) DEFAULT NULL COMMENT '餐品id',
  645. `mealName` varchar(255) DEFAULT '' COMMENT '餐品名',
  646. `stapleFood` varchar(255) DEFAULT '' COMMENT '主食',
  647. `foodCount` int(14) DEFAULT NULL COMMENT '份数',
  648. `createTime` datetime DEFAULT NULL,
  649. `creator` varchar(255) DEFAULT NULL,
  650. `modifyTime` datetime DEFAULT NULL,
  651. `modifier` varchar(255) DEFAULT NULL,
  652. `isEnabled` varchar(2) DEFAULT '',
  653. `stapleFoodStr` varchar(255) DEFAULT '' COMMENT '主食名字',
  654. `orgId` varchar(255) DEFAULT NULL,
  655. PRIMARY KEY (`id`),
  656. KEY `dinner_orderId` (`orderId`),
  657. CONSTRAINT `dinner_orderId` FOREIGN KEY (`orderId`) REFERENCES `tb_order_dinner` (`id`)
  658. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  659. -- 2018-10-23 添加订餐功能、菜单
  660. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`, `LASTUPDATEBY`, `LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`, `PERMS`)
  661. VALUES (NULL, '订餐管理', '', NULL, '-1', NULL, NULL, '2018-10-23', '1', '259', '0', NULL);
  662. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`, `LASTUPDATEBY`, `LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`, `PERMS`)
  663. VALUES (NULL, '餐品管理', 'admin/dinner/jumpMealList?funcid=260', NULL, '-1', NULL, NULL, '2018-10-23', '1', '260', '0', NULL);
  664. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`, `LASTUPDATEBY`, `LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`, `PERMS`)
  665. VALUES (NULL, '订单管理', 'admin/dinner/jumpOrderDinnerList?funcid=261', NULL, '-1', NULL, NULL, '2018-10-23', '1', '261', '0', NULL);
  666. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`, `LASTUPDATEBY`, `LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`, `PERMS`)
  667. VALUES (NULL, '账号管理', 'admin/dinner/jumpConsumerList?funcid=262', NULL, '-1', NULL, NULL, '2018-10-23', '1', '262', '0', NULL);
  668. INSERT INTO `tb_app_menu` (`MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  669. VALUES ('订餐管理', (select id from tb_app_function where FUNCTION_NAME='订餐管理' ), '357', '0', '订餐管理(PC)', NULL, '2018-10-23 17:28:30', NULL, '0', '', '');
  670. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  671. INSERT INTO `tb_app_menu` (`MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  672. VALUES ('餐品管理', (select id from tb_app_function where FUNCTION_NAME='餐品管理' ), '359', (select id from tb_app_menu where DESCRIPTION='订餐管理(PC)' and MENU_NAME='订餐管理' ), '餐品管理(PC)', NULL, '2018-10-23 17:29:47', NULL, '0', '', '');
  673. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  674. INSERT INTO `tb_app_menu` (`MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  675. VALUES ('订单管理', (select id from tb_app_function where FUNCTION_NAME='订单管理' ), '360', (select id from tb_app_menu where DESCRIPTION='订餐管理(PC)' and MENU_NAME='订餐管理' ), '订单管理(PC)', NULL, '2018-10-23 17:30:11', NULL, '0', '', '');
  676. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  677. INSERT INTO `tb_app_menu` (`MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  678. VALUES ('账号管理', (select id from tb_app_function where FUNCTION_NAME='账号管理' ), '361', (select id from tb_app_menu where DESCRIPTION='订餐管理(PC)' and MENU_NAME='订餐管理' ), '账号管理(PC)', NULL, '2018-10-23 17:30:43', NULL, '0', '', '');
  679. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  680. -- 2018-10-29 修改订餐系统账号密码区分大小写
  681. ALTER TABLE `tb_consumer` MODIFY COLUMN `loginName` VARCHAR(255) BINARY;
  682. ALTER TABLE `tb_consumer` MODIFY COLUMN `password` VARCHAR(255) BINARY;
  683. --------------2018-10-31 添加订餐功能、菜单(修改为分权限的功能后)
  684. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`,`LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`, `PERMS`)
  685. VALUES (NULL, '订餐管理', '', '0', '0', '316', '2018-10-31', '1', NULL, '0', 'pc:dinner');
  686. update tb_app_function set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  687. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`,`LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`, `PERMS`)
  688. VALUES (NULL, '餐品管理', 'admin/dinner/jumpMealList?funcid=317', '1', '310', '317', '2018-10-31', '1', '317', '0', 'pc:dinner:products');
  689. update tb_app_function set TREECODE=last_insert_id(),URL='admin/dinner/jumpMealList?funcid='+last_insert_id(),ORDER_NUMBER=last_insert_id(),PARENTCODE=(select id from tb_app_function where FUNCTION_NAME='订餐管理' and PERMS='pc:dinner' ) where id=(select LAST_INSERT_ID());
  690. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`,`LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`, `PERMS`)
  691. VALUES (NULL, '订单管理', 'admin/dinner/jumpOrderDinnerList?funcid=318', '1', '310', '318', '2018-10-31', '1', '318', '0', 'pc:dinner:order');
  692. update tb_app_function set TREECODE=last_insert_id(),URL='admin/dinner/jumpOrderDinnerList?funcid='+last_insert_id(),ORDER_NUMBER=last_insert_id(),PARENTCODE=(select id from tb_app_function where FUNCTION_NAME='订餐管理' and PERMS='pc:dinner' ) where id=(select LAST_INSERT_ID());
  693. INSERT INTO `tb_app_function` (`SYSTEMCODE`, `FUNCTION_NAME`, `URL`, `RIGHT_TYPE`, `PARENTCODE`, `TREECODE`,`LASTUPDATETIME`, `STATUS`, `ORDER_NUMBER`, `IS_APP`, `PERMS`)
  694. VALUES (NULL, '账号管理', 'admin/dinner/jumpConsumerList?funcid=319', '1','310', '319', '2018-10-31', '1', '319', '0', 'pc:dinner:account');
  695. update tb_app_function set TREECODE=last_insert_id(),URL='admin/dinner/jumpConsumerList?funcid='+last_insert_id(),ORDER_NUMBER=last_insert_id(),PARENTCODE=(select id from tb_app_function where FUNCTION_NAME='订餐管理' and PERMS='pc:dinner' ) where id=(select LAST_INSERT_ID());
  696. INSERT INTO `tb_app_menu` (`MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  697. VALUES ('订餐管理', (select id from tb_app_function where FUNCTION_NAME='订餐管理' ), '357', '0', '订餐管理(PC)', NULL, '2018-10-23 17:28:30', NULL, '0', '', '');
  698. update tb_app_menu set TREECODE=last_insert_id() where id=(select LAST_INSERT_ID());
  699. INSERT INTO `tb_app_menu` (`MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  700. VALUES ('餐品管理', (select id from tb_app_function where FUNCTION_NAME='餐品管理' ), '359', '', '餐品管理(PC)', NULL, '2018-10-23 17:29:47', NULL, '0', '', '');
  701. update tb_app_menu set TREECODE=last_insert_id(),PARENTCODE='330'
  702. where id=(select LAST_INSERT_ID());
  703. INSERT INTO `tb_app_menu` (`MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  704. VALUES ('订单管理', (select id from tb_app_function where FUNCTION_NAME='订单管理' ), '360', '', '订单管理(PC)', NULL, '2018-10-23 17:30:11', NULL, '0', '', '');
  705. update tb_app_menu set TREECODE=last_insert_id(),PARENTCODE='330'
  706. where id=(select LAST_INSERT_ID());
  707. INSERT INTO `tb_app_menu` (`MENU_NAME`, `FUNCTION_ID`, `TREECODE`, `PARENTCODE`, `DESCRIPTION`, `ORDER_NUMBER`, `CREATE_TIME`, `REMARK`, `IS_APP`, `ICON_URL`, `MENU_CODE`)
  708. VALUES ('账号管理', (select id from tb_app_function where FUNCTION_NAME='账号管理' ), '361', '', '账号管理(PC)', NULL, '2018-10-23 17:30:43', NULL, '0', '', '');
  709. update tb_app_menu set TREECODE=last_insert_id(),PARENTCODE='330'
  710. where id=(select LAST_INSERT_ID());
  711. -- --2018-11-07-------------2018-11-29整理------------------------数据字典----------------------
  712. INSERT INTO `tb_dictionary_group` (`groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('stapleFood', '主食', '1', '77', '1', 'admin,系统管理员', '2018-10-17 11:05:14', NULL, NULL);
  713. INSERT INTO `tb_dictionary_group` (`groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('orderTime', '订餐时间', '1', '78', '1', 'admin,系统管理员', '2018-10-19 15:11:43', NULL, NULL);
  714. INSERT INTO `tb_dictionary_group` (`groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('spec', '餐品规格', '1', '79', '1', 'admin,系统管理员', '2018-10-26 09:18:32', NULL, NULL);
  715. INSERT INTO `tb_dictionary_group` (`groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('dinnerDept', '订餐部门', '1', '80', '1', 'admin,系统管理员', '2018-11-06 10:52:41', NULL, NULL);
  716. INSERT INTO `tb_dictionary_group` (`groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('dinnerAddress', '送餐地址', '1', '81', '1', 'admin,系统管理员', '2018-11-06 10:55:02', NULL, NULL);
  717. INSERT INTO `tb_dictionary_group` (`groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('importTime', '订餐按钮控制时间', '1', '82', '1', 'admin,系统管理员', '2018-11-07 16:16:03', NULL, NULL);
  718. INSERT INTO `tb_dictionary_group` (`groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('star1Describe', '一星描述', '1', '83', '1', 'admin,系统管理员', '2018-11-15 10:09:33', NULL, NULL);
  719. INSERT INTO `tb_dictionary_group` ( `groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('star2Describe', '二星描述', '1', '84', '1', 'admin,系统管理员', '2018-11-15 10:10:15', NULL, NULL);
  720. INSERT INTO `tb_dictionary_group` (`groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('star3Describe', '三星描述', '1', '85', '1', 'admin,系统管理员', '2018-11-15 10:10:52', NULL, NULL);
  721. INSERT INTO `tb_dictionary_group` (`groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('star4Describe', '四星描述', '1', '86', '1', 'admin,系统管理员', '2018-11-15 10:11:36', NULL, NULL);
  722. INSERT INTO `tb_dictionary_group` (`groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('star5Describe', '五星描述', '1', '87', '1', 'admin,系统管理员', '2018-11-15 10:12:02', NULL, NULL);
  723. INSERT INTO `tb_dictionary_group` (`groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('mealName', '餐品名', '1', '88', '1', 'admin,系统管理员', '2018-11-19 18:26:26', NULL, NULL);
  724. INSERT INTO `tb_dictionary_group` (`groupcode`, `groupname`, `isenabled`, `oprateversion`, `opratetype`, `createby`, `createtime`, `lastupdateby`, `lastupdatetime`) VALUES ('mealNameBySingle', '单品的餐品名', '1', '89', '1', 'admin,系统管理员', '2018-11-27 16:23:28', NULL, NULL);
  725. -- -------2018-11-29 订餐系统优化
  726. CREATE TABLE `tb_order_dinner` (
  727. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  728. `number` varchar(255) DEFAULT '' COMMENT '编码',
  729. `status` varchar(2) DEFAULT '' COMMENT '状态(1待送餐2待评价3已完成4已取消)',
  730. `orgId` varchar(255) DEFAULT NULL,
  731. `createTime` datetime DEFAULT NULL,
  732. `creator` varchar(255) DEFAULT NULL,
  733. `modifyTime` datetime DEFAULT NULL,
  734. `modifier` varchar(255) DEFAULT NULL,
  735. `isEnabled` varchar(2) DEFAULT '',
  736. `star` int(2) DEFAULT NULL COMMENT '星级',
  737. `isSumOrder` int(2) DEFAULT '0' COMMENT '是否汇总订单',
  738. `parentOrderId` varchar(255) DEFAULT '' COMMENT '父级订单',
  739. `consId` varchar(255) DEFAULT '' COMMENT '下单人',
  740. `dinnerTime` datetime DEFAULT NULL COMMENT '下单时间',
  741. `integral` int(11) DEFAULT '0' COMMENT '消费积分',
  742. PRIMARY KEY (`id`)
  743. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  744. CREATE TABLE `tb_order_dinner_info` (
  745. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  746. `orderId` bigint(20) DEFAULT NULL COMMENT '订单id',
  747. `mealId` bigint(20) DEFAULT NULL COMMENT '餐品id',
  748. `mealName` varchar(255) DEFAULT '' COMMENT '餐品名',
  749. `stapleFood` varchar(255) DEFAULT '' COMMENT '主食',
  750. `foodCount` int(14) DEFAULT NULL COMMENT '份数',
  751. `createTime` datetime DEFAULT NULL,
  752. `creator` varchar(255) DEFAULT NULL,
  753. `modifyTime` datetime DEFAULT NULL,
  754. `modifier` varchar(255) DEFAULT NULL,
  755. `isEnabled` varchar(2) DEFAULT '',
  756. `stapleFoodStr` varchar(255) DEFAULT '' COMMENT '主食名字',
  757. `orgId` varchar(255) DEFAULT NULL,
  758. `isMeetFood` varchar(2) DEFAULT '' COMMENT '是否会议餐',
  759. `consId` varchar(255) DEFAULT '' COMMENT '订餐人',
  760. `dinnerTime` datetime DEFAULT NULL COMMENT '订餐时间',
  761. PRIMARY KEY (`id`),
  762. KEY `dinner_orderId` (`orderId`),
  763. CONSTRAINT `dinner_orderId` FOREIGN KEY (`orderId`) REFERENCES `tb_order_dinner` (`id`)
  764. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  765. CREATE TABLE `tb_meal` (
  766. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  767. `mealCodeId` varchar(255) DEFAULT '' COMMENT '餐品名',
  768. `spec` varchar(10) DEFAULT '' COMMENT '规格(1单品、2三菜一汤、3三菜一汤加水果)',
  769. `stapleFood` varchar(255) DEFAULT '' COMMENT '主食',
  770. `mealDescribe` varchar(255) DEFAULT '' COMMENT '餐品描述',
  771. `deliveryTimeStr` varchar(255) DEFAULT '' COMMENT '送餐时间',
  772. `supplyType` varchar(2) DEFAULT '' COMMENT '供应类型(1、长期有效2按具体时间供应)',
  773. `supplyTime` varchar(255) DEFAULT '' COMMENT '供应时间(供应类型为2的时候才有值)',
  774. `status` varchar(2) DEFAULT '' COMMENT '状态(1上架2下架)',
  775. `mealImages` varchar(2000) DEFAULT '' COMMENT '餐品图片',
  776. `orgId` varchar(11) DEFAULT NULL,
  777. `createTime` datetime DEFAULT NULL,
  778. `creator` varchar(255) DEFAULT NULL,
  779. `modifyTime` datetime DEFAULT NULL,
  780. `modifier` varchar(255) DEFAULT NULL,
  781. `isEnabled` varchar(2) DEFAULT '',
  782. `isModel` varchar(2) DEFAULT '' COMMENT '是否设为模板(1是0否)',
  783. `isMeetingFood` int(2) DEFAULT '0' COMMENT '是否会议餐',
  784. PRIMARY KEY (`id`)
  785. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  786. CREATE TABLE `tb_mealcar` (
  787. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  788. `mealId` bigint(20) NOT NULL COMMENT '餐品id',
  789. `mealName` varchar(255) DEFAULT '' COMMENT '餐品名',
  790. `stapleFood` varchar(255) DEFAULT '' COMMENT '主食',
  791. `foodCount` int(14) DEFAULT NULL COMMENT '份数',
  792. `createTime` datetime DEFAULT NULL,
  793. `creator` varchar(255) DEFAULT NULL,
  794. `modifyTime` datetime DEFAULT NULL,
  795. `modifier` varchar(255) DEFAULT NULL,
  796. `isEnabled` varchar(2) DEFAULT '',
  797. `isMeetFood` varchar(2) DEFAULT '' COMMENT '是否会议餐',
  798. `consId` varchar(255) DEFAULT '' COMMENT '订餐人',
  799. `dinnerTime` varchar(255) DEFAULT '' COMMENT '订餐时间',
  800. PRIMARY KEY (`id`)
  801. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  802. CREATE TABLE `tb_integral_record` (
  803. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  804. `type` int(11) DEFAULT '0' COMMENT '操作类型1充值2修改',
  805. `targetName` varchar(255) DEFAULT '' COMMENT '操作对象',
  806. `targetNumber` varchar(255) DEFAULT '' COMMENT '操作账号',
  807. `oldIntegral` int(11) DEFAULT NULL COMMENT '操作前积分',
  808. `newIntegral` int(11) DEFAULT NULL COMMENT '操作后积分',
  809. `exchangeIntegral` varchar(255) DEFAULT NULL COMMENT '流转积分',
  810. `creator` varchar(255) DEFAULT '' COMMENT '操作人',
  811. `createTime` datetime DEFAULT NULL COMMENT '操作时间',
  812. `orgId` varchar(255) DEFAULT '' COMMENT '项目',
  813. `targetId` varchar(255) DEFAULT '' COMMENT '充值人',
  814. PRIMARY KEY (`id`)
  815. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  816. -- ----------- 自动充值------------------------
  817. CREATE TABLE `tb_recharge_set` (
  818. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  819. `orgId` varchar(50) DEFAULT '',
  820. `createTime` datetime DEFAULT NULL,
  821. `creator` varchar(255) DEFAULT NULL,
  822. `modifyTime` datetime DEFAULT NULL,
  823. `modifier` varchar(255) DEFAULT NULL,
  824. `isEnabled` varchar(2) DEFAULT NULL,
  825. `status` int(2) DEFAULT '0' COMMENT '是否开启自动充值(1开启0不开启)',
  826. `dayCount` int(11) DEFAULT '0' COMMENT '单日数量',
  827. PRIMARY KEY (`id`)
  828. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  829. CREATE TABLE `tb_recharge_record` (
  830. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  831. `orgId` varchar(50) DEFAULT '' COMMENT '项目id',
  832. `createTime` datetime DEFAULT NULL,
  833. `monthCount` int(11) DEFAULT '0' COMMENT '当月工作日天数',
  834. `sumCount` int(11) DEFAULT '0' COMMENT '当月总充值数(当月工作日天数*单日数量)',
  835. `dayCount` int(11) DEFAULT '0' COMMENT '单日数量',
  836. PRIMARY KEY (`id`)
  837. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  838. -- -----------------------用户表增加是否领导字段
  839. alter table tb_user add isLeader int(2) DEFAULT 0 COMMENT '是否领导1是0不是';
  840. -- -----------------------订餐表增加订单的类型及备注
  841. alter table tb_order_dinner add remark varchar(500) DEFAULT '' COMMENT '备注';
  842. alter table tb_order_dinner add isTempOrder int(11) DEFAULT '0' COMMENT '是否临时工作餐';
  843. -- -------------------------用户表增加用户排序----------------
  844. alter table tb_user add orderNum bigint(20) DEFAULT NULL COMMENT '排序';
  845. -- 以上均在20190115前已执行过--------
  846. -- -----------2019-01-16------------------
  847. alter table tb_servicetypeinfo add serviceCode varchar(255) DEFAULT '' COMMENT '服务用于区分哪个服务的编码';
  848. -- 设置房间号名称区分大小写
  849. ALTER TABLE `tb_roomno` MODIFY COLUMN `name` VARCHAR(20) BINARY;
  850. -- ------------2019-02-22-------------------------
  851. alter table tb_phone_message add userIds text COMMENT '用户ids';
  852. alter table tb_phone_message add auditOpinion varchar(1000) COMMENT '审核意见';
  853. alter table tb_phone_message add isPass int(11) DEFAULT '0' COMMENT '是否通过0不通过1通过';
  854. alter table tb_email_send add userIds text COMMENT '用户ids';
  855. alter table tb_email_send add auditOpinion varchar(1000) COMMENT '审核意见';
  856. alter table tb_email_send add isPass int(11) DEFAULT '0' COMMENT '是否通过0不通过1通过';
  857. alter table tb_app_notice add orgIds text COMMENT '项目ids';
  858. -- 以上2019-02-28日执行过----------------------
  859. ALTER TABLE `tb_app_notice` MODIFY COLUMN `content` mediumtext BINARY;
  860. -- 2019-3-5日执行过
  861. -- --------------2019-03-08---企业入驻迁出优化-------------------
  862. alter table tb_virtualarchitecture add signingTime varchar(200) DEFAULT '' COMMENT '签约时间';
  863. alter table tb_virtualarchitecture add contExpireTime varchar(200) DEFAULT '' COMMENT '合同到期时间';
  864. alter table tb_virtualarchitecture add email varchar(200) DEFAULT '' COMMENT '申请人邮箱';
  865. alter table tb_enterprise add signingTime varchar(200) DEFAULT '' COMMENT '签约时间';
  866. alter table tb_enterprise add contExpireTime varchar(200) DEFAULT '' COMMENT '合同到期时间';
  867. alter table tb_enterprise add email varchar(200) DEFAULT '' COMMENT '申请人邮箱';
  868. alter table tb_enterprise add address varchar(2000) DEFAULT '' COMMENT '企业地址';
  869. -- --------------------------2019-03-15执行过----------------------------
  870. -- ---------2019-03-18---订餐模块增加项目的短信发送设置----------------
  871. alter table tb_organization add isSetMessage int(2) DEFAULT 0 COMMENT '是否开启短信发送(0未开启1开启)';
  872. -- ---------2019-03-22---已执行
  873. -- ----------2019-03-26--用户每日活跃数------------------
  874. CREATE TABLE `tb_user_date_activecount` (
  875. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  876. `userId` int(11) DEFAULT NULL COMMENT '用户id',
  877. `date` date DEFAULT NULL COMMENT '日期',
  878. `count` int(11) DEFAULT NULL COMMENT '活跃量',
  879. `orgId` int(11) DEFAULT NULL COMMENT '项目id',
  880. `modifyTime` datetime DEFAULT NULL,
  881. `createTime` datetime DEFAULT NULL,
  882. PRIMARY KEY (`id`)
  883. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='用户每日活跃统计';
  884. CREATE TABLE `tb_date_type` (
  885. `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  886. `date` date DEFAULT NULL COMMENT '日期(年月日格式)',
  887. `type` tinyint(3) DEFAULT NULL COMMENT '日期类型:0-工作日;1-法定节假日;2-节假日调休补班日;3-休息日;',
  888. `createTime` datetime DEFAULT NULL,
  889. `modifyTime` datetime DEFAULT NULL,
  890. PRIMARY KEY (`ID`)
  891. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  892. -- ------------------2019-04-16------------------------
  893. -- -----------------2019-07-23-------------------------
  894. -- 修改批注
  895. ALTER TABLE tb_app_notice MODIFY COLUMN position_type int(2) COMMENT '展示位置 0-微信+app端/1-app端/2-微信/3-公众号/4-微信+公众号/5-app+公众号/6-微信+app+公众号';
  896. -- 增加字段
  897. alter table tb_app_notice add openIds text default '' COMMENT '发送的人的openId';
  898. alter table tb_app_notice add userIds text default '' COMMENT '发送的人的userId';
  899. alter table tb_app_notice add isPublic tinyint(3) default 0 COMMENT '是否勾选了公众号0-否1-是';
  900. alter table tb_app_notice add isWechat tinyint(3) default 0 COMMENT '是否勾选了微信0-否1-是';
  901. alter table tb_app_notice add isApp tinyint(3) default 0 COMMENT '是否勾选了app0-否1-是';
  902. alter table tb_app_notice add publicObj tinyint(3) default 0 COMMENT '公众号发布对象:1-公众号所有用户;2-项目所有用户;3-部分用户;';
  903. alter table tb_app_notice add isMessageList tinyint(3) default 0 COMMENT '是否加入消息列表0-否1-是';
  904. CREATE TABLE `tb_wx_upload_material` (
  905. `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  906. `m_type` varchar(32) DEFAULT NULL COMMENT '素材类别(图片(image)、视频(video)、语音 (voice)、图文(news),缩略图(thumb))',
  907. `developid` varchar(32) DEFAULT NULL COMMENT '开发者微信号',
  908. `url` varchar(200) DEFAULT NULL COMMENT '媒体地址',
  909. `media_id` varchar(80) DEFAULT NULL COMMENT '媒体id',
  910. `created_by` int(10) DEFAULT NULL COMMENT '创建人',
  911. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  912. `updated_by` int(10) DEFAULT NULL COMMENT '更新人',
  913. `updated_at` datetime DEFAULT NULL COMMENT '更新时间',
  914. `orgId` int(10) DEFAULT NULL,
  915. `sourceId` int(10) DEFAULT NULL COMMENT '来源单据Id',
  916. `isEnabled` int(10) DEFAULT NULL,
  917. PRIMARY KEY (`id`)
  918. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='素材存储表';
  919. CREATE TABLE `tb_wx_massmessage_send` (
  920. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  921. `developid` varchar(32) DEFAULT NULL COMMENT '开发者微信号',
  922. `msgtype` varchar(10) DEFAULT NULL COMMENT '消息类别 图文消息为mpnews,文本消息为text,语音为voice,音乐为music,图片为image,视频为video,卡券为wxcard',
  923. `is_to_all` varchar(10) DEFAULT NULL COMMENT '用于设定是否向全部用户发送,值为true或false,选择true该消息群发给所有用户,选择false可根据tag_id发送给指定群组的用户',
  924. `tag_id` varchar(10) DEFAULT NULL COMMENT '群发到的标签的tag_id,参见用户管理中用户分组接口,若is_to_all值为true,可不填写tag_id',
  925. `media_id` varchar(80) DEFAULT NULL COMMENT '用于群发的消息的media_id',
  926. `title` varchar(50) DEFAULT NULL COMMENT '消息的标题',
  927. `description` varchar(200) DEFAULT NULL COMMENT '消息的描述',
  928. `content` text COMMENT '文本',
  929. `thumb_media_id` varchar(80) DEFAULT NULL COMMENT '视频缩略图的媒体ID',
  930. `msg_data_id` varchar(50) DEFAULT NULL COMMENT '消息的数据ID,,该字段只有在群发图文消息时,才会出现。可以用于在图文分析数据接口中,获取到对应的图文消息的数据',
  931. `msg_id` varchar(50) DEFAULT NULL COMMENT '消息发送任务的ID',
  932. `send_ignore_reprint` int(10) DEFAULT NULL COMMENT '图文消息被判定为转载时,是否继续群发。 1为继续群发(转载),0为停止群发',
  933. `created_by` int(10) DEFAULT NULL COMMENT '创建人',
  934. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  935. `updated_by` int(10) DEFAULT NULL COMMENT '更新人',
  936. `updated_at` datetime DEFAULT NULL COMMENT '更新时间',
  937. `orgId` int(10) DEFAULT NULL,
  938. `sourceId` int(10) DEFAULT NULL COMMENT '来源单据Id',
  939. PRIMARY KEY (`id`)
  940. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='推送素材表';
  941. CREATE TABLE `tb_app_notice_detail` (
  942. `id` int(11) NOT NULL AUTO_INCREMENT,
  943. `title` varchar(100) DEFAULT NULL,
  944. `content` text COMMENT '公告内容(带html标签)',
  945. `contentTxt` text COMMENT '内容纯文本(不带html标签)',
  946. `coverUrl` varchar(500) DEFAULT NULL COMMENT '封面图片地址',
  947. `summaryInfo` text COMMENT '摘要',
  948. `createTime` datetime DEFAULT NULL COMMENT '创建时间',
  949. `creator` varchar(20) DEFAULT NULL COMMENT '创建人',
  950. `modifier` varchar(20) DEFAULT NULL COMMENT '修改人',
  951. `modifyTime` datetime DEFAULT NULL COMMENT '修改时间',
  952. `isEnabled` varchar(10) DEFAULT NULL COMMENT '是否可用或删除:0 禁用,1 可用',
  953. `sourceId` int(11) DEFAULT NULL COMMENT '来源单据Id',
  954. `position` int(10) DEFAULT '0' COMMENT '位置',
  955. PRIMARY KEY (`id`)
  956. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='公告分录表';
  957. -- ---------------------2019-07-29-----------------已执行------------------------
  958. CREATE TABLE `tb_app_notice_content_images` (
  959. `id` int(11) NOT NULL AUTO_INCREMENT,
  960. `sourceId` int(11) DEFAULT NULL,
  961. `type` tinyint(3) DEFAULT '0' COMMENT '来源1-notice;2-notice_detail',
  962. `oldImage` varchar(500) DEFAULT '' COMMENT '旧图片服务地址',
  963. `newImage` varchar(500) DEFAULT '' COMMENT '新图片服务地址',
  964. `createTime` datetime DEFAULT NULL,
  965. `creator` int(11) DEFAULT NULL,
  966. `isEnabled` tinyint(3) DEFAULT NULL,
  967. PRIMARY KEY (`id`)
  968. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='公告发布的图片地址表';
  969. alter table tb_app_notice_detail add url_address varchar(255) default NULL COMMENT '跳转地址';
  970. -- ---------------------2019-08-05-----------------已执行------------------------