售后服务MySQL结构.sql 195 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : local
  4. Source Server Type : MySQL
  5. Source Server Version : 50730
  6. Source Host : localhost:3306
  7. Source Schema : servedb
  8. Target Server Type : MySQL
  9. Target Server Version : 50730
  10. File Encoding : 65001
  11. Date: 11/01/2021 19:31:24
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for codes
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `codes`;
  19. CREATE TABLE `codes` (
  20. `ID` int(11) NOT NULL,
  21. `now` int(11) NULL DEFAULT NULL,
  22. `date` int(11) NULL DEFAULT NULL COMMENT '日期',
  23. `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
  24. `len` int(11) NOT NULL COMMENT '长度',
  25. `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  26. PRIMARY KEY (`ID`) USING BTREE
  27. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  28. -- ----------------------------
  29. -- Table structure for t_project_dabiao_info
  30. -- ----------------------------
  31. DROP TABLE IF EXISTS `t_project_dabiao_info`;
  32. CREATE TABLE `t_project_dabiao_info` (
  33. `id` int(11) NOT NULL,
  34. `projectid` int(11) NULL DEFAULT NULL,
  35. `typeid` int(11) NULL DEFAULT NULL,
  36. `yearvalue` int(11) NULL DEFAULT NULL,
  37. `monthvalue` int(11) NULL DEFAULT NULL,
  38. `warrantytype` int(11) NULL DEFAULT NULL,
  39. `thisdate` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  40. `lognum` int(11) NULL DEFAULT NULL,
  41. `ischeck` int(11) NULL DEFAULT NULL,
  42. `ispass` int(11) NULL DEFAULT NULL,
  43. `salecenterid` int(11) NULL DEFAULT NULL,
  44. PRIMARY KEY (`id`) USING BTREE
  45. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  46. -- ----------------------------
  47. -- Table structure for t_project_lognum
  48. -- ----------------------------
  49. DROP TABLE IF EXISTS `t_project_lognum`;
  50. CREATE TABLE `t_project_lognum` (
  51. `projectid` int(11) NULL DEFAULT NULL,
  52. `yearvalue` int(11) NULL DEFAULT NULL,
  53. `serviceamount` int(11) NULL DEFAULT NULL,
  54. `mon1_lognum` int(11) NULL DEFAULT NULL,
  55. `mon2_lognum` int(11) NULL DEFAULT NULL,
  56. `mon3_lognum` int(11) NULL DEFAULT NULL,
  57. `mon4_lognum` int(11) NULL DEFAULT NULL,
  58. `mon5_lognum` int(11) NULL DEFAULT NULL,
  59. `mon6_lognum` int(11) NULL DEFAULT NULL,
  60. `mon7_lognum` int(11) NULL DEFAULT NULL,
  61. `mon8_lognum` int(11) NULL DEFAULT NULL,
  62. `mon9_lognum` int(11) NULL DEFAULT NULL,
  63. `mon10_lognum` int(11) NULL DEFAULT NULL,
  64. `mon11_lognum` int(11) NULL DEFAULT NULL,
  65. `mon12_lognum` int(11) NULL DEFAULT NULL
  66. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  67. -- ----------------------------
  68. -- Table structure for t_servelogtype
  69. -- ----------------------------
  70. DROP TABLE IF EXISTS `t_servelogtype`;
  71. CREATE TABLE `t_servelogtype` (
  72. `ID` int(11) NOT NULL,
  73. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  74. `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  75. `desc` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL
  76. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  77. -- ----------------------------
  78. -- Table structure for tacceptance
  79. -- ----------------------------
  80. DROP TABLE IF EXISTS `tacceptance`;
  81. CREATE TABLE `tacceptance` (
  82. `ID` int(11) NOT NULL,
  83. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键,指向tproject.ID)',
  84. `startdate` datetime NULL DEFAULT NULL COMMENT '验收日期-起始',
  85. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间',
  86. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  87. `createtime` datetime NULL DEFAULT NULL,
  88. `isdel` int(11) NULL DEFAULT NULL,
  89. `enddate` datetime NULL DEFAULT NULL COMMENT '验收日期-结束',
  90. `address` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验收地点',
  91. `custnameid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户姓名',
  92. `functions` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '系统已经实现的功能',
  93. `runmatter` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '系统运行情况或使用效果',
  94. `advice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '其它',
  95. `custpost` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户职位',
  96. `custphone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户电话',
  97. `conclusion` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '验收结论',
  98. `doctypeid` int(11) NULL DEFAULT NULL COMMENT '报告类型',
  99. `type` int(11) NULL DEFAULT NULL COMMENT '报告分类',
  100. PRIMARY KEY (`ID`) USING BTREE
  101. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '调试验收报告' ROW_FORMAT = Dynamic;
  102. -- ----------------------------
  103. -- Table structure for tacceptance_attachment
  104. -- ----------------------------
  105. DROP TABLE IF EXISTS `tacceptance_attachment`;
  106. CREATE TABLE `tacceptance_attachment` (
  107. `ID` int(11) NOT NULL COMMENT '主键',
  108. `acceptanceid` int(11) NULL DEFAULT NULL COMMENT '验收报告单ID(外键,指向tacceptance.ID)',
  109. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  110. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  111. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  112. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  113. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  114. PRIMARY KEY (`ID`) USING BTREE
  115. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '调试验收报告-验收附件表' ROW_FORMAT = Dynamic;
  116. -- ----------------------------
  117. -- Table structure for tacceptance_debug_attach
  118. -- ----------------------------
  119. DROP TABLE IF EXISTS `tacceptance_debug_attach`;
  120. CREATE TABLE `tacceptance_debug_attach` (
  121. `ID` int(11) NOT NULL COMMENT '主键',
  122. `acceptanceid` int(11) NULL DEFAULT NULL COMMENT '验收报告单ID(外键,指向tacceptance.ID)',
  123. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  124. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  125. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  126. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  127. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  128. PRIMARY KEY (`ID`) USING BTREE
  129. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '验收报告--调试附件' ROW_FORMAT = Dynamic;
  130. -- ----------------------------
  131. -- Table structure for tacceptancetype
  132. -- ----------------------------
  133. DROP TABLE IF EXISTS `tacceptancetype`;
  134. CREATE TABLE `tacceptancetype` (
  135. `ID` int(11) NOT NULL,
  136. `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型名称',
  137. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  138. `createtime` datetime NULL DEFAULT NULL,
  139. PRIMARY KEY (`ID`) USING BTREE
  140. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  141. -- ----------------------------
  142. -- Table structure for taimpass
  143. -- ----------------------------
  144. DROP TABLE IF EXISTS `taimpass`;
  145. CREATE TABLE `taimpass` (
  146. `ID` int(11) NOT NULL,
  147. `aimpass` decimal(10, 2) NULL DEFAULT NULL COMMENT '目标合格率',
  148. PRIMARY KEY (`ID`) USING BTREE
  149. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '目标合格率' ROW_FORMAT = Dynamic;
  150. -- ----------------------------
  151. -- Table structure for tallot
  152. -- ----------------------------
  153. DROP TABLE IF EXISTS `tallot`;
  154. CREATE TABLE `tallot` (
  155. `ID` int(11) NOT NULL COMMENT '主键',
  156. `salecenter` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区域/销售服务中心',
  157. `employeename` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '申请人',
  158. `allotcode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '申请单号',
  159. `allotdate` datetime NULL DEFAULT NULL COMMENT '申请日期',
  160. `allottype` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '采购类型',
  161. `urgentlevel` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '紧急程度',
  162. `reservecode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留号码',
  163. `finishdate` datetime NULL DEFAULT NULL COMMENT '办结日期',
  164. `totalmoney` decimal(12, 2) NULL DEFAULT NULL COMMENT '涉及总额',
  165. `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注说明',
  166. `createtime` datetime NULL DEFAULT NULL COMMENT '导入时间',
  167. `empjobnumber` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '申请人工号',
  168. PRIMARY KEY (`ID`) USING BTREE
  169. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '物料调拨单主表' ROW_FORMAT = Dynamic;
  170. -- ----------------------------
  171. -- Table structure for tallot_product
  172. -- ----------------------------
  173. DROP TABLE IF EXISTS `tallot_product`;
  174. CREATE TABLE `tallot_product` (
  175. `ID` int(11) NOT NULL COMMENT '主键',
  176. `allotcode` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料调拨单ID,外键指向tallot.id',
  177. `productcode` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料编码',
  178. `productname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料名称',
  179. `productnum` int(11) NULL DEFAULT NULL COMMENT '物料数量',
  180. `productunit` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料单位',
  181. `stockloc` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '库存地点',
  182. `stockcode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '库存编号',
  183. `createtime` datetime NULL DEFAULT NULL COMMENT '导入时间',
  184. `projectid` int(11) NULL DEFAULT NULL COMMENT '关联项目,外键指向tproject.id',
  185. `remark` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联备注',
  186. PRIMARY KEY (`ID`) USING BTREE
  187. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '物料调拨单-产品表' ROW_FORMAT = Dynamic;
  188. -- ----------------------------
  189. -- Table structure for tcar
  190. -- ----------------------------
  191. DROP TABLE IF EXISTS `tcar`;
  192. CREATE TABLE `tcar` (
  193. `ID` int(11) NOT NULL,
  194. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '所在销售服务中心(外键,指向tsalecenter.ID)',
  195. `area` int(11) NULL DEFAULT NULL COMMENT '服务地区-客户ID(外键,指向tcustomer.ID)',
  196. `plateno` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '车牌号',
  197. `model` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '车型',
  198. `buydate` datetime NULL DEFAULT NULL COMMENT '购置日期',
  199. `mileage` decimal(12, 2) NULL DEFAULT NULL COMMENT '行驶里程',
  200. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  201. `createtime` datetime NULL DEFAULT NULL,
  202. `isdel` int(11) NULL DEFAULT NULL,
  203. `isdisable` int(11) NULL DEFAULT NULL COMMENT '(isdel)',
  204. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间',
  205. `totalmileage` decimal(12, 2) NULL DEFAULT NULL COMMENT '总行驶',
  206. PRIMARY KEY (`ID`) USING BTREE
  207. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '车辆管理' ROW_FORMAT = Dynamic;
  208. -- ----------------------------
  209. -- Table structure for tcar_detail
  210. -- ----------------------------
  211. DROP TABLE IF EXISTS `tcar_detail`;
  212. CREATE TABLE `tcar_detail` (
  213. `ID` int(11) NOT NULL,
  214. `carid` int(11) NULL DEFAULT NULL COMMENT '车辆档案ID(外键,指向tcar.ID)',
  215. `date` datetime NULL DEFAULT NULL COMMENT '记录日期',
  216. `kilometre` decimal(12, 2) NULL DEFAULT NULL COMMENT '公里数',
  217. `mileage` decimal(12, 2) NULL DEFAULT NULL COMMENT '行驶里程',
  218. `remark` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  219. `isdel` int(11) NULL DEFAULT NULL,
  220. `createmanid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  221. `createtime` datetime NULL DEFAULT NULL,
  222. `mbkm` decimal(12, 2) NULL DEFAULT NULL COMMENT '保养里程',
  223. PRIMARY KEY (`ID`) USING BTREE
  224. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '车辆管理每周公里数记录' ROW_FORMAT = Dynamic;
  225. -- ----------------------------
  226. -- Table structure for tcartype
  227. -- ----------------------------
  228. DROP TABLE IF EXISTS `tcartype`;
  229. CREATE TABLE `tcartype` (
  230. `ID` int(11) NOT NULL,
  231. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '车型',
  232. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识'
  233. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '车辆类型' ROW_FORMAT = Dynamic;
  234. -- ----------------------------
  235. -- Table structure for tcompetitor
  236. -- ----------------------------
  237. DROP TABLE IF EXISTS `tcompetitor`;
  238. CREATE TABLE `tcompetitor` (
  239. `ID` int(11) NOT NULL,
  240. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '竞争对手名称',
  241. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  242. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  243. `createtime` datetime NULL DEFAULT NULL,
  244. PRIMARY KEY (`ID`) USING BTREE
  245. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '竞争对手表' ROW_FORMAT = Dynamic;
  246. -- ----------------------------
  247. -- Table structure for tcontact
  248. -- ----------------------------
  249. DROP TABLE IF EXISTS `tcontact`;
  250. CREATE TABLE `tcontact` (
  251. `ID` int(11) NOT NULL,
  252. `copyerid` int(11) NULL DEFAULT NULL COMMENT '员工ID(指向temployee)',
  253. `isdel` int(11) NULL DEFAULT NULL,
  254. `usuallycopyer` int(11) NULL DEFAULT NULL COMMENT '是否为常用登录人',
  255. `uid` int(11) NULL DEFAULT NULL COMMENT '当前登录人',
  256. PRIMARY KEY (`ID`) USING BTREE
  257. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  258. -- ----------------------------
  259. -- Table structure for tcustlinkman
  260. -- ----------------------------
  261. DROP TABLE IF EXISTS `tcustlinkman`;
  262. CREATE TABLE `tcustlinkman` (
  263. `ID` int(11) NOT NULL,
  264. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识 (0:未删除,1:已删除)',
  265. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  266. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  267. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识',
  268. `customerid` int(11) NULL DEFAULT NULL COMMENT '客户ID(外键,指向tcustomer.ID)',
  269. `dept` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所在部门',
  270. `remark` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  271. `post` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职务',
  272. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名',
  273. `phone` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
  274. `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系邮箱',
  275. `sex` int(11) NULL DEFAULT NULL COMMENT '性别',
  276. PRIMARY KEY (`ID`) USING BTREE
  277. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '客户联系人' ROW_FORMAT = Dynamic;
  278. -- ----------------------------
  279. -- Table structure for tcustomer
  280. -- ----------------------------
  281. DROP TABLE IF EXISTS `tcustomer`;
  282. CREATE TABLE `tcustomer` (
  283. `ID` int(11) NOT NULL,
  284. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识 (0:未删除,1:已删除)',
  285. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  286. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  287. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间',
  288. `PID` int(11) NULL DEFAULT NULL COMMENT '父级客户ID(树形,指向tcustomer.ID)',
  289. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称',
  290. `remark` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  291. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识(isdel)',
  292. PRIMARY KEY (`ID`) USING BTREE
  293. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  294. -- ----------------------------
  295. -- Table structure for tcusttrain
  296. -- ----------------------------
  297. DROP TABLE IF EXISTS `tcusttrain`;
  298. CREATE TABLE `tcusttrain` (
  299. `ID` int(11) NOT NULL,
  300. `startdate` datetime NULL DEFAULT NULL COMMENT '培训起始时间',
  301. `enddate` datetime NULL DEFAULT NULL COMMENT '培训终止时间',
  302. `address` int(11) NULL DEFAULT NULL COMMENT '培训地点(1:在京,2:现场)',
  303. `teacherid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '培训讲师 (外键,多选,指向temployee.ID)',
  304. `custnum` int(11) NULL DEFAULT NULL COMMENT '参加人数',
  305. `abstract` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容摘要',
  306. `summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '培训总结',
  307. `advice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '客户主要建议',
  308. `score` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '客户综合评分',
  309. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间',
  310. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  311. `createtime` datetime NULL DEFAULT NULL,
  312. `isdel` int(11) NULL DEFAULT NULL,
  313. `creater` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '填报人',
  314. `teachername` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '培训讲师 (外键,多选,指向temployee.ID)',
  315. `cc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '邮件抄送人',
  316. `isnew` smallint(6) NULL DEFAULT NULL COMMENT '是否已查看(0:未查看,1:已查看)',
  317. `isfile` smallint(6) NULL DEFAULT NULL COMMENT '表单状态(0:未提交,1:已提交,2:已归档,3:已驳回)',
  318. PRIMARY KEY (`ID`) USING BTREE
  319. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目培训记录表' ROW_FORMAT = Dynamic;
  320. -- ----------------------------
  321. -- Table structure for tcusttrain_attach
  322. -- ----------------------------
  323. DROP TABLE IF EXISTS `tcusttrain_attach`;
  324. CREATE TABLE `tcusttrain_attach` (
  325. `ID` int(11) NOT NULL,
  326. `custtrainid` int(11) NULL DEFAULT NULL COMMENT '项目培训记录ID(外键,指向tcusttrain.ID)',
  327. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  328. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  329. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  330. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  331. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  332. PRIMARY KEY (`ID`) USING BTREE
  333. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目培训记录签到表' ROW_FORMAT = Dynamic;
  334. -- ----------------------------
  335. -- Table structure for tcusttrain_attachment
  336. -- ----------------------------
  337. DROP TABLE IF EXISTS `tcusttrain_attachment`;
  338. CREATE TABLE `tcusttrain_attachment` (
  339. `ID` int(11) NOT NULL,
  340. `custtrainid` int(11) NULL DEFAULT NULL COMMENT '项目培训记录ID(外键,指向tcusttrain.ID)',
  341. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  342. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  343. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  344. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  345. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  346. PRIMARY KEY (`ID`) USING BTREE
  347. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目培训记录附件表' ROW_FORMAT = Dynamic;
  348. -- ----------------------------
  349. -- Table structure for tcusttrain_detail
  350. -- ----------------------------
  351. DROP TABLE IF EXISTS `tcusttrain_detail`;
  352. CREATE TABLE `tcusttrain_detail` (
  353. `ID` int(11) NOT NULL COMMENT '主键',
  354. `custtrainid` int(11) NULL DEFAULT NULL COMMENT '项目培训记录ID(外键,指向tcusttrain.ID)',
  355. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称 (外键,指向tproject.ID)',
  356. `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  357. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识(0:未删除,1:已删除)',
  358. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  359. PRIMARY KEY (`ID`) USING BTREE
  360. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目培训记录项目信息表' ROW_FORMAT = Dynamic;
  361. -- ----------------------------
  362. -- Table structure for tcusttype
  363. -- ----------------------------
  364. DROP TABLE IF EXISTS `tcusttype`;
  365. CREATE TABLE `tcusttype` (
  366. `ID` int(11) NOT NULL,
  367. `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户满意度调查对象分类名称',
  368. `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  369. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  370. `createtime` datetime NULL DEFAULT NULL,
  371. `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编码',
  372. PRIMARY KEY (`ID`) USING BTREE
  373. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户满意度调查对象分类表' ROW_FORMAT = Dynamic;
  374. -- ----------------------------
  375. -- Table structure for tdocout
  376. -- ----------------------------
  377. DROP TABLE IF EXISTS `tdocout`;
  378. CREATE TABLE `tdocout` (
  379. `ID` int(11) NOT NULL,
  380. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键,指向tproject.ID)',
  381. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  382. `createtime` datetime NULL DEFAULT NULL,
  383. `isdel` int(11) NULL DEFAULT NULL,
  384. PRIMARY KEY (`ID`) USING BTREE
  385. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户文件发放记录表' ROW_FORMAT = Dynamic;
  386. -- ----------------------------
  387. -- Table structure for tdocout_attach
  388. -- ----------------------------
  389. DROP TABLE IF EXISTS `tdocout_attach`;
  390. CREATE TABLE `tdocout_attach` (
  391. `ID` int(11) NOT NULL COMMENT '主键',
  392. `docoutid` int(11) NULL DEFAULT NULL COMMENT '用户文件发放记录外键',
  393. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  394. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  395. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  396. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  397. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  398. PRIMARY KEY (`ID`) USING BTREE
  399. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户文件发放记录附件表' ROW_FORMAT = Dynamic;
  400. -- ----------------------------
  401. -- Table structure for templet_file
  402. -- ----------------------------
  403. DROP TABLE IF EXISTS `templet_file`;
  404. CREATE TABLE `templet_file` (
  405. `ID` int(11) NOT NULL,
  406. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  407. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  408. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  409. `pageid` int(11) NULL DEFAULT NULL COMMENT '模板页面(外键,指向tsysmodule.ID)',
  410. PRIMARY KEY (`ID`) USING BTREE
  411. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  412. -- ----------------------------
  413. -- Table structure for temployee
  414. -- ----------------------------
  415. DROP TABLE IF EXISTS `temployee`;
  416. CREATE TABLE `temployee` (
  417. `ID` int(11) NOT NULL,
  418. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名',
  419. `user_login` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录账号',
  420. `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  421. `isdisable` int(11) NULL DEFAULT NULL COMMENT '在职标识(0:在职,1:离职)',
  422. `isdel` int(11) NULL DEFAULT NULL,
  423. `techlevel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '技术等级',
  424. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '所在销售服务中心(外键,指向tsalecenter.ID)',
  425. `sex` int(11) NULL DEFAULT NULL COMMENT '性别(0:女,1:男)',
  426. `birthdate` datetime NULL DEFAULT NULL COMMENT '出生日期',
  427. `birthaddress` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '出生地',
  428. `datetype` int(11) NULL DEFAULT NULL COMMENT '农历/公历(0:农历,1:公历)',
  429. `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系邮箱',
  430. `phone` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
  431. `education` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '学历',
  432. `ismarry` int(11) NULL DEFAULT NULL COMMENT '婚姻状况( 1:已婚,2:未婚)',
  433. `politics` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '政治面貌',
  434. `createtime` datetime NULL DEFAULT NULL,
  435. `jobnumber` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工号',
  436. `duty` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职务',
  437. `totalscore` double NULL DEFAULT NULL COMMENT '分数',
  438. `oaid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'OA员工ID',
  439. `importdate` datetime NULL DEFAULT NULL COMMENT '导入日期',
  440. `idcard` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '身份证号',
  441. PRIMARY KEY (`ID`) USING BTREE
  442. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  443. -- ----------------------------
  444. -- Table structure for temployee_detail
  445. -- ----------------------------
  446. DROP TABLE IF EXISTS `temployee_detail`;
  447. CREATE TABLE `temployee_detail` (
  448. `ID` int(11) NOT NULL COMMENT '主键',
  449. `employeeid` int(11) NULL DEFAULT NULL COMMENT '员工档案ID(外键,指向temployee.ID)',
  450. `startdate` datetime NULL DEFAULT NULL COMMENT '起始日期',
  451. `enddate` datetime NULL DEFAULT NULL COMMENT '截止日期',
  452. `orgid` int(11) NULL DEFAULT NULL COMMENT '所在销售服务中心(外键,指向torganization.ID)',
  453. `score` double NULL DEFAULT NULL COMMENT '销售服务中心经理评分',
  454. `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  455. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识(0:未删除,1:已删除)',
  456. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  457. `areaid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务区域外键,指向torganization.ID',
  458. `positionid` int(11) NULL DEFAULT NULL COMMENT '岗位外键,指向torganizationposition.ID',
  459. `areaname` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务区域名称',
  460. `employeepositionid` int(11) NULL DEFAULT NULL COMMENT '员工部门明细表id,指向temployeeposition.id',
  461. PRIMARY KEY (`ID`) USING BTREE
  462. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  463. -- ----------------------------
  464. -- Table structure for temployeeposition
  465. -- ----------------------------
  466. DROP TABLE IF EXISTS `temployeeposition`;
  467. CREATE TABLE `temployeeposition` (
  468. `ID` int(11) NOT NULL COMMENT '主键',
  469. `employee` int(11) NULL DEFAULT NULL COMMENT '员工ID',
  470. `organization` int(11) NULL DEFAULT NULL COMMENT '组织ID',
  471. `position` int(11) NULL DEFAULT NULL COMMENT '岗位ID',
  472. `isposition` int(11) NULL DEFAULT NULL COMMENT '主岗位标识',
  473. `ismanager` int(11) NULL DEFAULT NULL COMMENT '负责人标识',
  474. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识',
  475. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  476. `worktypeid` int(11) NULL DEFAULT NULL COMMENT '兼职/全职',
  477. `areaid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责区域ID',
  478. `areaname` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责区域名称',
  479. `oaemployee` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'OA员工ID',
  480. `oaorganization` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'OA部门ID',
  481. `oaposition` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'OA岗位ID',
  482. `oaareaid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'OA区域ID(若OA无,则不需要导入该字段)',
  483. `importdate` datetime NULL DEFAULT NULL COMMENT '导入日期',
  484. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  485. PRIMARY KEY (`ID`) USING BTREE
  486. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '员工岗位角色' ROW_FORMAT = Dynamic;
  487. -- ----------------------------
  488. -- Table structure for tempposition
  489. -- ----------------------------
  490. DROP TABLE IF EXISTS `tempposition`;
  491. CREATE TABLE `tempposition` (
  492. `ID` int(11) NOT NULL COMMENT '主键',
  493. `employeename` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名',
  494. `jobnumber` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '工号',
  495. `downtime` datetime NULL DEFAULT NULL COMMENT '下井时间',
  496. `uptime` datetime NULL DEFAULT NULL COMMENT '上井时间',
  497. `coal` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '下井煤矿',
  498. `work` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '工作内容',
  499. `createtime` datetime NOT NULL COMMENT '导入时间',
  500. `isdel` int(11) NULL DEFAULT NULL,
  501. `address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  502. PRIMARY KEY (`ID`) USING BTREE
  503. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '井下人员定位表' ROW_FORMAT = Dynamic;
  504. -- ----------------------------
  505. -- Table structure for tequipok
  506. -- ----------------------------
  507. DROP TABLE IF EXISTS `tequipok`;
  508. CREATE TABLE `tequipok` (
  509. `ID` int(11) NOT NULL,
  510. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键,指向tproject.ID)',
  511. `okrate` decimal(10, 2) NULL DEFAULT NULL COMMENT '目标合格率',
  512. `date` datetime NULL DEFAULT NULL COMMENT '统计时间',
  513. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间(isdel)',
  514. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  515. `createtime` datetime NULL DEFAULT NULL,
  516. `isdel` int(11) NULL DEFAULT NULL,
  517. `doctypeid` int(11) NULL DEFAULT NULL COMMENT '提交报告类型 ,指向 twarndays.ID',
  518. `runstateid` int(11) NULL DEFAULT NULL COMMENT '项目运行状态(外键,指向trunstate.ID)',
  519. PRIMARY KEY (`ID`) USING BTREE
  520. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '井下设备完好率表' ROW_FORMAT = Dynamic;
  521. -- ----------------------------
  522. -- Table structure for tequipok_detail
  523. -- ----------------------------
  524. DROP TABLE IF EXISTS `tequipok_detail`;
  525. CREATE TABLE `tequipok_detail` (
  526. `ID` int(11) NOT NULL,
  527. `equipokid` int(11) NULL DEFAULT NULL COMMENT '井下设备完好率统计表ID外键(指向tequipok)',
  528. `partid` int(11) NULL DEFAULT NULL COMMENT '元件名称(指向tproduct)',
  529. `num` decimal(12, 2) NULL DEFAULT NULL COMMENT '安装数量',
  530. `oknum` decimal(12, 2) NULL DEFAULT NULL COMMENT '完好数量',
  531. `okrate` decimal(12, 2) NULL DEFAULT NULL COMMENT '完好率',
  532. `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  533. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  534. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  535. `supplylistid` int(11) NULL DEFAULT NULL COMMENT '物料清单id,外键指向tsupplylistnew.id(或tsupplylist.id相同)',
  536. `productcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料编码',
  537. PRIMARY KEY (`ID`) USING BTREE
  538. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '井下设备完好率统计表 井下设备主体内容表' ROW_FORMAT = Dynamic;
  539. -- ----------------------------
  540. -- Table structure for terppro_wbs
  541. -- ----------------------------
  542. DROP TABLE IF EXISTS `terppro_wbs`;
  543. CREATE TABLE `terppro_wbs` (
  544. `ID` int(11) NOT NULL,
  545. `erpprojectid` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'erp项目id,外键,指向terpproject.erpid',
  546. `wbsid` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'wbsid',
  547. `wbscode` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'wbs编号',
  548. `wbsname` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'wbs项目名称',
  549. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  550. `isreport` int(11) NULL DEFAULT NULL,
  551. `isdel` int(11) NULL DEFAULT NULL,
  552. PRIMARY KEY (`ID`) USING BTREE
  553. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'WBS项目表' ROW_FORMAT = Dynamic;
  554. -- ----------------------------
  555. -- Table structure for terpproject
  556. -- ----------------------------
  557. DROP TABLE IF EXISTS `terpproject`;
  558. CREATE TABLE `terpproject` (
  559. `ID` int(11) NOT NULL,
  560. `erpid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联ERP项目ID / 项目定义ID',
  561. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联ERP项目名称 / 项目定义描述',
  562. `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联ERP项目编号 / 项目定义名称',
  563. `isdel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  564. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  565. `importdate` datetime NULL DEFAULT NULL COMMENT '导入日期',
  566. `thiscreatetime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  567. PRIMARY KEY (`ID`) USING BTREE
  568. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  569. -- ----------------------------
  570. -- Table structure for texperience
  571. -- ----------------------------
  572. DROP TABLE IF EXISTS `texperience`;
  573. CREATE TABLE `texperience` (
  574. `ID` int(11) NOT NULL,
  575. `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
  576. `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '故障描述',
  577. `date` datetime NULL DEFAULT NULL COMMENT '时间(isdel)',
  578. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识 (0:未删除,1:已删除)',
  579. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  580. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  581. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间(isdel)',
  582. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键,指向tproject.ID)',
  583. `analysis` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '故障分析',
  584. `process` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '处理过程',
  585. `result` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '处理结果',
  586. PRIMARY KEY (`ID`) USING BTREE
  587. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '经验交流表' ROW_FORMAT = Dynamic;
  588. -- ----------------------------
  589. -- Table structure for texperience_attach
  590. -- ----------------------------
  591. DROP TABLE IF EXISTS `texperience_attach`;
  592. CREATE TABLE `texperience_attach` (
  593. `ID` int(11) NOT NULL COMMENT '主键',
  594. `experienceid` int(11) NULL DEFAULT NULL COMMENT '经验交流ID(外键,指向texperience.ID)',
  595. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  596. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  597. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  598. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  599. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  600. PRIMARY KEY (`ID`) USING BTREE
  601. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  602. -- ----------------------------
  603. -- Table structure for tinstalldebug
  604. -- ----------------------------
  605. DROP TABLE IF EXISTS `tinstalldebug`;
  606. CREATE TABLE `tinstalldebug` (
  607. `ID` int(11) NOT NULL,
  608. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键,指向tproject.ID)',
  609. `reporttypeid` int(11) NULL DEFAULT NULL COMMENT '报告类型(1:日报,2:周报)',
  610. `startdate` datetime NULL DEFAULT NULL COMMENT '报告开始日期',
  611. `mineemployeeid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '井上服务人员(外键,多选,指向temployee.ID)',
  612. `downemployeeid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '井下服务人员(外键,多选,指向temployee.ID)',
  613. `mineemployeename` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '井上服务人员名称',
  614. `downemployeename` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '井下服务人员名称',
  615. `mainwork` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '主要工作',
  616. `unfinishwork` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '未完成工作',
  617. `question` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '存在问题',
  618. `workplan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '工作计划',
  619. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间',
  620. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  621. `createtime` datetime NULL DEFAULT NULL,
  622. `isdel` int(11) NULL DEFAULT NULL,
  623. `enddate` datetime NULL DEFAULT NULL COMMENT '报告结束日期',
  624. `cc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '邮件抄送人',
  625. PRIMARY KEY (`ID`) USING BTREE
  626. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '安装调试阶段报告表' ROW_FORMAT = Dynamic;
  627. -- ----------------------------
  628. -- Table structure for tinstalldebug_attachment
  629. -- ----------------------------
  630. DROP TABLE IF EXISTS `tinstalldebug_attachment`;
  631. CREATE TABLE `tinstalldebug_attachment` (
  632. `ID` int(11) NOT NULL,
  633. `installdebugid` int(11) NULL DEFAULT NULL,
  634. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  635. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  636. `isdel` int(11) NULL DEFAULT NULL,
  637. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  638. `uploaddate` datetime NULL DEFAULT NULL
  639. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  640. -- ----------------------------
  641. -- Table structure for tmainreporttype
  642. -- ----------------------------
  643. DROP TABLE IF EXISTS `tmainreporttype`;
  644. CREATE TABLE `tmainreporttype` (
  645. `ID` int(11) NOT NULL,
  646. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报告类型名称',
  647. `isdel` int(11) NULL DEFAULT NULL
  648. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '运行维护阶段报告类型' ROW_FORMAT = Dynamic;
  649. -- ----------------------------
  650. -- Table structure for tmaintenance
  651. -- ----------------------------
  652. DROP TABLE IF EXISTS `tmaintenance`;
  653. CREATE TABLE `tmaintenance` (
  654. `ID` int(11) NOT NULL,
  655. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键,指向tproject.ID)',
  656. `main` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '整体运行情况',
  657. `custuse` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '客户使用情况',
  658. `damage` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '产品损坏情况',
  659. `employeeid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  660. `reportdate` datetime NULL DEFAULT NULL COMMENT '报告时间',
  661. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  662. `createtime` datetime NULL DEFAULT NULL,
  663. `isdel` int(11) NULL DEFAULT NULL,
  664. `doctypeid` int(11) NULL DEFAULT NULL COMMENT '提交报告类型 ,指向 twarndays.ID',
  665. `cc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '邮件抄送人',
  666. PRIMARY KEY (`ID`) USING BTREE
  667. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '运行维护阶段报告' ROW_FORMAT = Dynamic;
  668. -- ----------------------------
  669. -- Table structure for tmaintenance_attachment
  670. -- ----------------------------
  671. DROP TABLE IF EXISTS `tmaintenance_attachment`;
  672. CREATE TABLE `tmaintenance_attachment` (
  673. `ID` int(11) NOT NULL,
  674. `maintenanceid` int(11) NULL DEFAULT NULL,
  675. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  676. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  677. `isdel` int(11) NULL DEFAULT NULL,
  678. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  679. `uploaddate` datetime NULL DEFAULT NULL
  680. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  681. -- ----------------------------
  682. -- Table structure for tmarketlase
  683. -- ----------------------------
  684. DROP TABLE IF EXISTS `tmarketlase`;
  685. CREATE TABLE `tmarketlase` (
  686. `ID` int(11) NOT NULL,
  687. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '原因名称',
  688. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  689. `type` int(11) NULL DEFAULT NULL COMMENT '类型',
  690. PRIMARY KEY (`ID`) USING BTREE
  691. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目丢失原因表' ROW_FORMAT = Dynamic;
  692. -- ----------------------------
  693. -- Table structure for tmarketprofinal
  694. -- ----------------------------
  695. DROP TABLE IF EXISTS `tmarketprofinal`;
  696. CREATE TABLE `tmarketprofinal` (
  697. `ID` int(11) NOT NULL,
  698. `marketproject` int(11) NULL DEFAULT NULL COMMENT '市场项目名称外键(指向tmarketproject)',
  699. `isdel` int(11) NULL DEFAULT NULL,
  700. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  701. `createtime` datetime NULL DEFAULT NULL,
  702. `orgid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心',
  703. `describe` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市场项目内容描述',
  704. `summary` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '销售工作情况总结',
  705. `problem` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '销售工作存在问题',
  706. `experience` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '销售工作借鉴经验',
  707. `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  708. PRIMARY KEY (`ID`) USING BTREE
  709. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '市场项目总结报告表' ROW_FORMAT = Dynamic;
  710. -- ----------------------------
  711. -- Table structure for tmarketproject
  712. -- ----------------------------
  713. DROP TABLE IF EXISTS `tmarketproject`;
  714. CREATE TABLE `tmarketproject` (
  715. `ID` int(11) NOT NULL,
  716. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市场项目名称',
  717. `typeid` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市场项目类型(外键tmarkettype)',
  718. `typename` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市场项目类型名称',
  719. `sourceid` int(11) NULL DEFAULT NULL COMMENT '项目来源(外键tmarketsource)',
  720. `employee` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '具体负责人',
  721. `servicecenter` int(11) NULL DEFAULT NULL COMMENT '主要销售服务中心',
  722. `otherservicecenterid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其他销售服务中心ID',
  723. `otherservicecentername` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其他服务中心负责人名称',
  724. `province` int(11) NULL DEFAULT NULL COMMENT '省',
  725. `city` int(11) NULL DEFAULT NULL COMMENT '市',
  726. `describe` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市场项目描述',
  727. `remark` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  728. `customer` int(11) NULL DEFAULT NULL COMMENT '客户名称',
  729. `ring` int(11) NULL DEFAULT NULL COMMENT '所属集团',
  730. `colliery` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所在矿井',
  731. `workplane` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所在工作面',
  732. `starttime` datetime NULL DEFAULT NULL COMMENT '项目开始时间',
  733. `specialrequire` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户特殊要求',
  734. `secondremark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  735. `cc` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮件抄送人',
  736. `projecttype` int(11) NULL DEFAULT NULL COMMENT '项目类型(外键tmarketprojecttype)',
  737. `markettype` int(11) NULL DEFAULT NULL COMMENT '项目市场类别',
  738. `tenderinfo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '招标基本信息',
  739. `dealprice` decimal(12, 2) NULL DEFAULT NULL COMMENT '项目成交价',
  740. `statusrecond` int(11) NULL DEFAULT NULL COMMENT '项目状态记录(外键tmarketstatu)',
  741. `losereason` int(11) NULL DEFAULT NULL COMMENT '项目丢失原因(外键tmarketlase)',
  742. `reasonremark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目状态记录备注',
  743. `oacode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'oa编号',
  744. `projectcontractcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目合同编号',
  745. `time` datetime NULL DEFAULT NULL COMMENT '后续市场信息时间提醒',
  746. `marketinfo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '后续市场信息描述',
  747. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  748. `createtime` datetime NULL DEFAULT NULL,
  749. `isdel` int(11) NULL DEFAULT NULL,
  750. `employeename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '具体负责人名称',
  751. PRIMARY KEY (`ID`) USING BTREE
  752. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目市场信息表' ROW_FORMAT = Dynamic;
  753. -- ----------------------------
  754. -- Table structure for tmarketproject_area
  755. -- ----------------------------
  756. DROP TABLE IF EXISTS `tmarketproject_area`;
  757. CREATE TABLE `tmarketproject_area` (
  758. `ID` int(11) NOT NULL,
  759. `provinceid` int(11) NULL DEFAULT NULL COMMENT '省',
  760. `cityid` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市',
  761. `cityText` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市名称',
  762. `marketproject` int(11) NULL DEFAULT NULL COMMENT '市场项目名称外键(指向tmarketproject)',
  763. `isdel` int(11) NULL DEFAULT NULL,
  764. PRIMARY KEY (`ID`) USING BTREE
  765. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目市场信息矿井行政区域表' ROW_FORMAT = Dynamic;
  766. -- ----------------------------
  767. -- Table structure for tmarketproject_attachment
  768. -- ----------------------------
  769. DROP TABLE IF EXISTS `tmarketproject_attachment`;
  770. CREATE TABLE `tmarketproject_attachment` (
  771. `ID` int(11) NOT NULL,
  772. `marketproject` int(11) NULL DEFAULT NULL COMMENT '市场项目外键(指向tmarketproject)',
  773. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  774. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  775. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  776. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识(isdel)',
  777. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  778. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  779. `file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '(isdel)',
  780. PRIMARY KEY (`ID`) USING BTREE
  781. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目市场信息附件表' ROW_FORMAT = Dynamic;
  782. -- ----------------------------
  783. -- Table structure for tmarketproject_offer
  784. -- ----------------------------
  785. DROP TABLE IF EXISTS `tmarketproject_offer`;
  786. CREATE TABLE `tmarketproject_offer` (
  787. `ID` int(11) NOT NULL,
  788. `price` double NULL DEFAULT NULL COMMENT '天玛报价',
  789. `otherprice` double NULL DEFAULT NULL COMMENT '竞争对手报价',
  790. `time` int(11) NULL DEFAULT NULL COMMENT '报价次数',
  791. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  792. `marketproject` int(11) NULL DEFAULT NULL COMMENT '市场项目外键(指向tmarketproject)',
  793. PRIMARY KEY (`ID`) USING BTREE
  794. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目市场信息天玛报价表' ROW_FORMAT = Dynamic;
  795. -- ----------------------------
  796. -- Table structure for tmarketproject_people
  797. -- ----------------------------
  798. DROP TABLE IF EXISTS `tmarketproject_people`;
  799. CREATE TABLE `tmarketproject_people` (
  800. `ID` int(11) NOT NULL,
  801. `marketproject` int(11) NULL DEFAULT NULL COMMENT '市场项目外键(指向tmarketproject)',
  802. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目负责人',
  803. `sex` int(11) NULL DEFAULT NULL COMMENT '性别',
  804. `duty` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职位',
  805. `linktel` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系方式',
  806. `type` int(11) NULL DEFAULT NULL COMMENT '人员类型',
  807. `state` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关键状态',
  808. `isdel` int(11) NULL DEFAULT NULL,
  809. `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  810. PRIMARY KEY (`ID`) USING BTREE
  811. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目市场信息人员表' ROW_FORMAT = Dynamic;
  812. -- ----------------------------
  813. -- Table structure for tmarketproject_peopletype
  814. -- ----------------------------
  815. DROP TABLE IF EXISTS `tmarketproject_peopletype`;
  816. CREATE TABLE `tmarketproject_peopletype` (
  817. `ID` int(11) NOT NULL,
  818. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型名称',
  819. `isdel` int(11) NULL DEFAULT NULL,
  820. PRIMARY KEY (`ID`) USING BTREE
  821. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目市场信息人员类型' ROW_FORMAT = Dynamic;
  822. -- ----------------------------
  823. -- Table structure for tmarketproject_person
  824. -- ----------------------------
  825. DROP TABLE IF EXISTS `tmarketproject_person`;
  826. CREATE TABLE `tmarketproject_person` (
  827. `ID` int(11) NOT NULL,
  828. `marketproject` int(11) NULL DEFAULT NULL COMMENT '市场项目外键(指向tmarketproject)',
  829. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目负责人姓名',
  830. `duty` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职务',
  831. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  832. `linktel` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系方式',
  833. `work` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责工作',
  834. PRIMARY KEY (`ID`) USING BTREE
  835. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目市场信息相关人物' ROW_FORMAT = Dynamic;
  836. -- ----------------------------
  837. -- Table structure for tmarketproject_rival
  838. -- ----------------------------
  839. DROP TABLE IF EXISTS `tmarketproject_rival`;
  840. CREATE TABLE `tmarketproject_rival` (
  841. `ID` int(11) NOT NULL,
  842. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '竞争对手名称',
  843. `record` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '竞争对手记录',
  844. `isdel` int(11) NULL DEFAULT NULL,
  845. `marketproject` int(11) NULL DEFAULT NULL COMMENT '市场项目外键(指向tmarketproject)',
  846. PRIMARY KEY (`ID`) USING BTREE
  847. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目市场信息竞争对手' ROW_FORMAT = Dynamic;
  848. -- ----------------------------
  849. -- Table structure for tmarketproject_tender
  850. -- ----------------------------
  851. DROP TABLE IF EXISTS `tmarketproject_tender`;
  852. CREATE TABLE `tmarketproject_tender` (
  853. `ID` int(11) NOT NULL,
  854. `marketproject` int(11) NULL DEFAULT NULL COMMENT '市场项目外键(指向tmarketproject)',
  855. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件自动生成名称',
  856. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  857. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  858. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识(isdel)',
  859. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  860. `uploaddate` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传日期',
  861. `file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '(isdel)',
  862. PRIMARY KEY (`ID`) USING BTREE
  863. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目市场信息招标' ROW_FORMAT = Dynamic;
  864. -- ----------------------------
  865. -- Table structure for tmarketprojecttype
  866. -- ----------------------------
  867. DROP TABLE IF EXISTS `tmarketprojecttype`;
  868. CREATE TABLE `tmarketprojecttype` (
  869. `ID` int(11) NOT NULL,
  870. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型名称',
  871. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  872. PRIMARY KEY (`ID`) USING BTREE
  873. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目类别(项目市场信息)' ROW_FORMAT = Dynamic;
  874. -- ----------------------------
  875. -- Table structure for tmarketprotrack
  876. -- ----------------------------
  877. DROP TABLE IF EXISTS `tmarketprotrack`;
  878. CREATE TABLE `tmarketprotrack` (
  879. `ID` int(11) NOT NULL,
  880. `marketproject` int(11) NULL DEFAULT NULL COMMENT '市场项目外键(指向tmarketproject)',
  881. `orgid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心',
  882. `isdel` int(11) NULL DEFAULT NULL,
  883. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  884. `createtime` datetime NULL DEFAULT NULL,
  885. PRIMARY KEY (`ID`) USING BTREE
  886. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '市场项目跟踪记录' ROW_FORMAT = Dynamic;
  887. -- ----------------------------
  888. -- Table structure for tmarketprotrack_attachment
  889. -- ----------------------------
  890. DROP TABLE IF EXISTS `tmarketprotrack_attachment`;
  891. CREATE TABLE `tmarketprotrack_attachment` (
  892. `ID` int(11) NOT NULL,
  893. `marketprotrack` int(11) NULL DEFAULT NULL COMMENT '市场项目跟踪记录(外键,指向tmarketprotrack)',
  894. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  895. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  896. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  897. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识(isdel)',
  898. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  899. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  900. `file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '(isdel)',
  901. PRIMARY KEY (`ID`) USING BTREE
  902. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '市场项目跟踪记录附件' ROW_FORMAT = Dynamic;
  903. -- ----------------------------
  904. -- Table structure for tmarketprotrack_detail
  905. -- ----------------------------
  906. DROP TABLE IF EXISTS `tmarketprotrack_detail`;
  907. CREATE TABLE `tmarketprotrack_detail` (
  908. `ID` int(11) NOT NULL,
  909. `marketprotrack` int(11) NULL DEFAULT NULL COMMENT '市场项目跟踪记录(外键,指向tmarketprotrack)',
  910. `isdel` int(11) NULL DEFAULT NULL,
  911. `salerecond` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '销售记录',
  912. `time` datetime NULL DEFAULT NULL COMMENT '时间',
  913. `work` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '销售工作',
  914. `creater` int(11) NULL DEFAULT NULL COMMENT '填报人',
  915. PRIMARY KEY (`ID`) USING BTREE
  916. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '市场项目跟踪记录明细表' ROW_FORMAT = Dynamic;
  917. -- ----------------------------
  918. -- Table structure for tmarketprotrack_trouble
  919. -- ----------------------------
  920. DROP TABLE IF EXISTS `tmarketprotrack_trouble`;
  921. CREATE TABLE `tmarketprotrack_trouble` (
  922. `ID` int(11) NOT NULL,
  923. `marketprotrack` int(11) NULL DEFAULT NULL COMMENT '市场项目跟踪记录(外键,指向tmarketprotrack)',
  924. `isdel` int(11) NULL DEFAULT NULL,
  925. `trouble` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目困难',
  926. `describe` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
  927. PRIMARY KEY (`ID`) USING BTREE
  928. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '市场项目跟踪记录明细(项目困难)表' ROW_FORMAT = Dynamic;
  929. -- ----------------------------
  930. -- Table structure for tmarketprotype
  931. -- ----------------------------
  932. DROP TABLE IF EXISTS `tmarketprotype`;
  933. CREATE TABLE `tmarketprotype` (
  934. `ID` int(11) NOT NULL,
  935. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市场类别名称',
  936. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  937. PRIMARY KEY (`ID`) USING BTREE
  938. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目市场类别表' ROW_FORMAT = Dynamic;
  939. -- ----------------------------
  940. -- Table structure for tmarketsource
  941. -- ----------------------------
  942. DROP TABLE IF EXISTS `tmarketsource`;
  943. CREATE TABLE `tmarketsource` (
  944. `ID` int(11) NOT NULL,
  945. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  946. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  947. PRIMARY KEY (`ID`) USING BTREE
  948. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目来源表' ROW_FORMAT = Dynamic;
  949. -- ----------------------------
  950. -- Table structure for tmarketstatu
  951. -- ----------------------------
  952. DROP TABLE IF EXISTS `tmarketstatu`;
  953. CREATE TABLE `tmarketstatu` (
  954. `ID` int(11) NOT NULL,
  955. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态记录名称',
  956. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  957. PRIMARY KEY (`ID`) USING BTREE
  958. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目状态记录' ROW_FORMAT = Dynamic;
  959. -- ----------------------------
  960. -- Table structure for tmarkettype
  961. -- ----------------------------
  962. DROP TABLE IF EXISTS `tmarkettype`;
  963. CREATE TABLE `tmarkettype` (
  964. `ID` int(11) NOT NULL,
  965. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目类型名称',
  966. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  967. PRIMARY KEY (`ID`) USING BTREE
  968. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '市场项目类型' ROW_FORMAT = Dynamic;
  969. -- ----------------------------
  970. -- Table structure for tmatchnum
  971. -- ----------------------------
  972. DROP TABLE IF EXISTS `tmatchnum`;
  973. CREATE TABLE `tmatchnum` (
  974. `ID` int(11) NOT NULL,
  975. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  976. `isdel` int(11) NULL DEFAULT NULL,
  977. `isdisable` int(11) NULL DEFAULT NULL,
  978. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  979. PRIMARY KEY (`ID`) USING BTREE
  980. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  981. -- ----------------------------
  982. -- Table structure for tmiss
  983. -- ----------------------------
  984. DROP TABLE IF EXISTS `tmiss`;
  985. CREATE TABLE `tmiss` (
  986. `ID` int(11) NOT NULL,
  987. `receiptid` int(11) NULL DEFAULT NULL COMMENT '接货记录ID(外键,指向treceive)',
  988. `sendaddress` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发货地址',
  989. `receiveaddress` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接货地址',
  990. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  991. `createtime` datetime NULL DEFAULT NULL,
  992. `isdel` int(11) NULL DEFAULT NULL,
  993. `mistakestype` int(11) NULL DEFAULT NULL COMMENT '错漏记录类型',
  994. `missingno` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '记录单号',
  995. `receiptdate` datetime NULL DEFAULT NULL COMMENT '接货时间',
  996. `receipter` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接货人员',
  997. `solvedate` datetime NULL DEFAULT NULL COMMENT '解决时间',
  998. `relation` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联记录指向treceive',
  999. `totalnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '总数量',
  1000. `totalmissingnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '总错漏货数量',
  1001. `issolve` int(11) NULL DEFAULT NULL COMMENT '是否解决(1,是;0,否)',
  1002. `relationname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联记录',
  1003. `cc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '邮件抄送人',
  1004. PRIMARY KEY (`ID`) USING BTREE
  1005. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '错发漏发记录' ROW_FORMAT = Dynamic;
  1006. -- ----------------------------
  1007. -- Table structure for tmiss_detail
  1008. -- ----------------------------
  1009. DROP TABLE IF EXISTS `tmiss_detail`;
  1010. CREATE TABLE `tmiss_detail` (
  1011. `ID` int(11) NOT NULL,
  1012. `missid` int(11) NULL DEFAULT NULL COMMENT '接货记录ID(外键,指向tmiss.ID)',
  1013. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称(外键,指向tproject.ID)',
  1014. `num` decimal(12, 2) NULL DEFAULT NULL COMMENT '数量',
  1015. `createtime` datetime NULL DEFAULT NULL,
  1016. `isdel` int(11) NULL DEFAULT NULL,
  1017. `isprojectid` int(11) NULL DEFAULT NULL COMMENT '涉及项目 0:否,1:是',
  1018. `productname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应发货品名',
  1019. `missingproduct` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '错漏货品名称',
  1020. `missingnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '错漏数量',
  1021. `missingproductname` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '(isdel)',
  1022. PRIMARY KEY (`ID`) USING BTREE
  1023. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '错发漏发记录明细表' ROW_FORMAT = Dynamic;
  1024. -- ----------------------------
  1025. -- Table structure for tmodel
  1026. -- ----------------------------
  1027. DROP TABLE IF EXISTS `tmodel`;
  1028. CREATE TABLE `tmodel` (
  1029. `ID` int(11) NOT NULL,
  1030. `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '厂家名称',
  1031. `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  1032. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1033. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  1034. `num` int(11) NULL DEFAULT NULL COMMENT '累计使用次数',
  1035. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识',
  1036. PRIMARY KEY (`ID`) USING BTREE
  1037. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '支架型号表' ROW_FORMAT = Dynamic;
  1038. -- ----------------------------
  1039. -- Table structure for tnotice
  1040. -- ----------------------------
  1041. DROP TABLE IF EXISTS `tnotice`;
  1042. CREATE TABLE `tnotice` (
  1043. `ID` int(11) NOT NULL,
  1044. `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
  1045. `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
  1046. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '通知内容(解析之前)',
  1047. `date` datetime NULL DEFAULT NULL COMMENT '时间',
  1048. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识 (0:未删除,1:已删除)',
  1049. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  1050. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  1051. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间',
  1052. `new` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '通知内容(解析之后)',
  1053. PRIMARY KEY (`ID`) USING BTREE
  1054. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通知' ROW_FORMAT = Dynamic;
  1055. -- ----------------------------
  1056. -- Table structure for tnotice_attach
  1057. -- ----------------------------
  1058. DROP TABLE IF EXISTS `tnotice_attach`;
  1059. CREATE TABLE `tnotice_attach` (
  1060. `ID` int(11) NOT NULL COMMENT '主键',
  1061. `noticeid` int(11) NULL DEFAULT NULL COMMENT '通知ID(外键,指向tnotice.ID)',
  1062. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  1063. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  1064. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1065. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  1066. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  1067. PRIMARY KEY (`ID`) USING BTREE
  1068. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  1069. -- ----------------------------
  1070. -- Table structure for torganization
  1071. -- ----------------------------
  1072. DROP TABLE IF EXISTS `torganization`;
  1073. CREATE TABLE `torganization` (
  1074. `ID` int(11) NOT NULL,
  1075. `PID` int(11) NULL DEFAULT NULL COMMENT '父级组织机构ID(树形,指向torganization.ID)',
  1076. `orgcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构编码',
  1077. `orgname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构名称',
  1078. `isdel` int(11) NULL DEFAULT NULL,
  1079. `importdate` datetime NULL DEFAULT NULL COMMENT '导入日期',
  1080. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  1081. `oaid` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'oa部门ID',
  1082. `oapid` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'oa部门父ID',
  1083. `isarea` int(11) NULL DEFAULT NULL COMMENT '是否是区域(0:不是;1:是)',
  1084. `type` int(11) NULL DEFAULT NULL COMMENT '组织类型指向torgtype',
  1085. PRIMARY KEY (`ID`) USING BTREE
  1086. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  1087. -- ----------------------------
  1088. -- Table structure for torganizationcode
  1089. -- ----------------------------
  1090. DROP TABLE IF EXISTS `torganizationcode`;
  1091. CREATE TABLE `torganizationcode` (
  1092. `ID` int(11) NOT NULL COMMENT '主键',
  1093. `orgid` int(11) NULL DEFAULT NULL COMMENT '机构ID',
  1094. `province` int(11) NULL DEFAULT NULL COMMENT '省份',
  1095. `city` int(11) NULL DEFAULT NULL COMMENT '城市',
  1096. `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编码',
  1097. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识',
  1098. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1099. PRIMARY KEY (`ID`) USING BTREE
  1100. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织机构-省市编码' ROW_FORMAT = Dynamic;
  1101. -- ----------------------------
  1102. -- Table structure for torganizationposition
  1103. -- ----------------------------
  1104. DROP TABLE IF EXISTS `torganizationposition`;
  1105. CREATE TABLE `torganizationposition` (
  1106. `ID` int(11) NOT NULL COMMENT '主键',
  1107. `orgid` int(11) NULL DEFAULT NULL COMMENT '机构ID',
  1108. `positionname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位名称',
  1109. `positionlevel` int(11) NULL DEFAULT NULL COMMENT '岗位级别',
  1110. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识',
  1111. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1112. `importdate` datetime NULL DEFAULT NULL COMMENT '导入日期',
  1113. `createtime` datetime NULL DEFAULT NULL,
  1114. `oaid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'oa岗位ID',
  1115. `oaorgid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'oa机构ID',
  1116. `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1117. PRIMARY KEY (`ID`) USING BTREE
  1118. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织岗位' ROW_FORMAT = Dynamic;
  1119. -- ----------------------------
  1120. -- Table structure for torgtype
  1121. -- ----------------------------
  1122. DROP TABLE IF EXISTS `torgtype`;
  1123. CREATE TABLE `torgtype` (
  1124. `ID` int(11) NOT NULL COMMENT '主键',
  1125. `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编码',
  1126. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  1127. `level` int(11) NULL DEFAULT NULL COMMENT '级别',
  1128. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识',
  1129. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1130. `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  1131. PRIMARY KEY (`ID`) USING BTREE
  1132. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织类型' ROW_FORMAT = Dynamic;
  1133. -- ----------------------------
  1134. -- Table structure for totherlog
  1135. -- ----------------------------
  1136. DROP TABLE IF EXISTS `totherlog`;
  1137. CREATE TABLE `totherlog` (
  1138. `ID` int(11) NOT NULL COMMENT '主键',
  1139. `workdate` datetime NULL DEFAULT NULL COMMENT '工作日期',
  1140. `workemployeeid` int(11) NULL DEFAULT NULL COMMENT '工作人员(外键指向temployee.id)',
  1141. `otheremployeeid` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其他工作人员(多选,外键指向temployee.id)',
  1142. `otheremployeename` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其他工作人员姓名',
  1143. `isbusitravel` tinyint(4) NULL DEFAULT NULL COMMENT '出差状态(0:未出差 1:已出差)',
  1144. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识',
  1145. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  1146. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  1147. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键,指向torganization.id)'
  1148. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  1149. -- ----------------------------
  1150. -- Table structure for totherlog_attach
  1151. -- ----------------------------
  1152. DROP TABLE IF EXISTS `totherlog_attach`;
  1153. CREATE TABLE `totherlog_attach` (
  1154. `ID` int(11) NOT NULL COMMENT '主键',
  1155. `otherlogid` int(11) NULL DEFAULT NULL COMMENT '工作日志主表(外键,指向totherlog.ID)',
  1156. `filename` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  1157. `filerealname` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '文件名称',
  1158. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识',
  1159. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  1160. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期'
  1161. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  1162. -- ----------------------------
  1163. -- Table structure for totherlog_detail
  1164. -- ----------------------------
  1165. DROP TABLE IF EXISTS `totherlog_detail`;
  1166. CREATE TABLE `totherlog_detail` (
  1167. `ID` int(11) NOT NULL,
  1168. `otherlogid` int(11) NULL DEFAULT NULL COMMENT '工作日志主表(外键指向totherlog.id)',
  1169. `worktypeid` tinyint(4) NULL DEFAULT NULL COMMENT '工作类型(0:市场销售 1:货品批发2:出厂服务 3:日常工作)',
  1170. `mession` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务',
  1171. `worktime_start` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作时间_开始',
  1172. `worktime_end` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作时间_结束',
  1173. `workcontent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '工作内容',
  1174. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识'
  1175. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '其他工作日志工作内容明细表' ROW_FORMAT = Dynamic;
  1176. -- ----------------------------
  1177. -- Table structure for totherlog_employee
  1178. -- ----------------------------
  1179. DROP TABLE IF EXISTS `totherlog_employee`;
  1180. CREATE TABLE `totherlog_employee` (
  1181. `ID` int(11) NOT NULL,
  1182. `otherlogid` int(11) NULL DEFAULT NULL COMMENT '工作日志主表(外键指向totherlog.id)',
  1183. `employeeid` int(11) NULL DEFAULT NULL COMMENT '其他工作人员id(外键指向temployee.id)',
  1184. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识(0:未删除 1:已删除)'
  1185. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '其他工作日志其他工作人员明细表' ROW_FORMAT = Dynamic;
  1186. -- ----------------------------
  1187. -- Table structure for tpartdamage
  1188. -- ----------------------------
  1189. DROP TABLE IF EXISTS `tpartdamage`;
  1190. CREATE TABLE `tpartdamage` (
  1191. `ID` int(11) NOT NULL,
  1192. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键,指向tproject.ID)',
  1193. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间(isdel)',
  1194. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  1195. `createtime` datetime NULL DEFAULT NULL,
  1196. `isdel` int(11) NULL DEFAULT NULL,
  1197. `okrate` decimal(10, 2) NULL DEFAULT NULL COMMENT '目标合格率',
  1198. PRIMARY KEY (`ID`) USING BTREE
  1199. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目元件损坏情况表' ROW_FORMAT = Dynamic;
  1200. -- ----------------------------
  1201. -- Table structure for tpartdamage_detail
  1202. -- ----------------------------
  1203. DROP TABLE IF EXISTS `tpartdamage_detail`;
  1204. CREATE TABLE `tpartdamage_detail` (
  1205. `ID` int(11) NOT NULL,
  1206. `partdamageid` int(11) NULL DEFAULT NULL COMMENT '项目元件损坏ID(外键,指向tpartdamage.ID)',
  1207. `createtime` datetime NULL DEFAULT NULL,
  1208. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1209. `date` datetime NULL DEFAULT NULL COMMENT '损坏时间',
  1210. `num` int(11) NULL DEFAULT NULL COMMENT '损坏元器件总数量',
  1211. `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  1212. `softtext` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '软件特殊情况记录',
  1213. `tsupplylist_detailnewid` int(11) NULL DEFAULT NULL COMMENT '物料清单明细表id,外键指向tsupplylist_detailnew.id',
  1214. PRIMARY KEY (`ID`) USING BTREE
  1215. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '元器件累计损坏统计明细' ROW_FORMAT = Dynamic;
  1216. -- ----------------------------
  1217. -- Table structure for tpartinstall
  1218. -- ----------------------------
  1219. DROP TABLE IF EXISTS `tpartinstall`;
  1220. CREATE TABLE `tpartinstall` (
  1221. `ID` int(11) NOT NULL,
  1222. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键,指向tproject.ID)',
  1223. `date` datetime NULL DEFAULT NULL COMMENT '统计时间',
  1224. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  1225. `createtime` datetime NULL DEFAULT NULL,
  1226. `isdel` int(11) NULL DEFAULT NULL,
  1227. `passrate` decimal(10, 2) NULL DEFAULT NULL COMMENT '目标合格率',
  1228. PRIMARY KEY (`ID`) USING BTREE
  1229. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '一次安装合格率' ROW_FORMAT = Dynamic;
  1230. -- ----------------------------
  1231. -- Table structure for tpartinstall_detail
  1232. -- ----------------------------
  1233. DROP TABLE IF EXISTS `tpartinstall_detail`;
  1234. CREATE TABLE `tpartinstall_detail` (
  1235. `ID` int(11) NOT NULL COMMENT '主键',
  1236. `partinstallid` int(11) NULL DEFAULT NULL COMMENT '一次安装合格率统计表ID(外键,指向tpartinstall.ID)',
  1237. `partid` int(11) NULL DEFAULT NULL COMMENT '元件名称',
  1238. `num` int(11) NULL DEFAULT NULL COMMENT '安装数量',
  1239. `failnum` int(11) NULL DEFAULT NULL COMMENT '不合格品数量',
  1240. `okrate` decimal(12, 2) NULL DEFAULT NULL COMMENT '合格率',
  1241. `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  1242. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识(0:未删除,1:已删除)',
  1243. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  1244. `supplylistid` int(11) NULL DEFAULT NULL COMMENT '物料清单id,外键指向tsupplylistnew.id(或tsupplylist.id相同)',
  1245. `productcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料编码',
  1246. PRIMARY KEY (`ID`) USING BTREE
  1247. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '一次安装合格率明细' ROW_FORMAT = Dynamic;
  1248. -- ----------------------------
  1249. -- Table structure for tpick
  1250. -- ----------------------------
  1251. DROP TABLE IF EXISTS `tpick`;
  1252. CREATE TABLE `tpick` (
  1253. `ID` int(11) NOT NULL COMMENT '主键',
  1254. `salecenter` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区域/销售服务中心',
  1255. `employeename` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '申请人',
  1256. `pickcode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '申请单号',
  1257. `pickdate` datetime NULL DEFAULT NULL COMMENT '申请日期',
  1258. `picktype` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '采购类型',
  1259. `urgentlevel` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '紧急程度',
  1260. `reservecode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留号码',
  1261. `finishdate` datetime NULL DEFAULT NULL COMMENT '办结日期',
  1262. `totalmoney` decimal(12, 2) NULL DEFAULT NULL COMMENT '物料总价',
  1263. `ledgerinfo` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '总账科目信息',
  1264. `ledgercode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '总账科目编号',
  1265. `orderinfo` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '内部订单信息',
  1266. `ordercode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '内部订单编号',
  1267. `costcenterinfo` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '成本中心信息',
  1268. `costcentercode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '成本中心编号',
  1269. `projectinfo` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目信息',
  1270. `projectledgercode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目编号',
  1271. `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注说明',
  1272. `createtime` datetime NULL DEFAULT NULL COMMENT '导入时间',
  1273. `empjobnumber` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '申请人工号',
  1274. PRIMARY KEY (`ID`) USING BTREE
  1275. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '费用领料单主表' ROW_FORMAT = Dynamic;
  1276. -- ----------------------------
  1277. -- Table structure for tpick_product
  1278. -- ----------------------------
  1279. DROP TABLE IF EXISTS `tpick_product`;
  1280. CREATE TABLE `tpick_product` (
  1281. `ID` int(11) NOT NULL,
  1282. `pickcode` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '申请单号,外键指向tpick.pickcode',
  1283. `productcode` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1284. `productname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1285. `productunit` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1286. `price` decimal(12, 2) NULL DEFAULT NULL,
  1287. `stockloc` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1288. `stockcode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1289. `createtime` datetime NULL DEFAULT NULL COMMENT '导入时间',
  1290. `productnum` int(11) NULL DEFAULT NULL,
  1291. `projectid` int(11) NULL DEFAULT NULL COMMENT '关联项目,外键指向tproject.id',
  1292. `remark` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联备注',
  1293. PRIMARY KEY (`ID`) USING BTREE
  1294. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '费用领料单-产品表' ROW_FORMAT = Dynamic;
  1295. -- ----------------------------
  1296. -- Table structure for tproduct
  1297. -- ----------------------------
  1298. DROP TABLE IF EXISTS `tproduct`;
  1299. CREATE TABLE `tproduct` (
  1300. `ID` int(11) NOT NULL,
  1301. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '产品名称、物料长描述',
  1302. `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注(为空,未导入,后期不用可删除该冗余字段)',
  1303. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1304. `model` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '型号/物料短描述(规格型号Z3)',
  1305. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  1306. `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  1307. `productno` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品号(为空,未导入,后期不用可删除该冗余字段)',
  1308. `unit` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '基本计量单位',
  1309. `importdate` datetime NULL DEFAULT NULL COMMENT '导入日期',
  1310. `erpid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ERP产品ID(为空,未导入,后期不用可删除该冗余字段)',
  1311. `groupno` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料组',
  1312. `type` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料类型',
  1313. `typedesc` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料类型描述',
  1314. `unitdesc` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '基本计量单位描述',
  1315. PRIMARY KEY (`ID`) USING BTREE
  1316. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '元件档案/产品档案' ROW_FORMAT = Dynamic;
  1317. -- ----------------------------
  1318. -- Table structure for tproduct_type
  1319. -- ----------------------------
  1320. DROP TABLE IF EXISTS `tproduct_type`;
  1321. CREATE TABLE `tproduct_type` (
  1322. `ID` int(11) NOT NULL,
  1323. `typename` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料类型',
  1324. `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  1325. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识(1:已删,0:未删)',
  1326. `projecttype` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目类型,多选',
  1327. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  1328. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  1329. `projecttype_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目类型名称',
  1330. PRIMARY KEY (`ID`) USING BTREE
  1331. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '元件分类表' ROW_FORMAT = Dynamic;
  1332. -- ----------------------------
  1333. -- Table structure for tproject
  1334. -- ----------------------------
  1335. DROP TABLE IF EXISTS `tproject`;
  1336. CREATE TABLE `tproject` (
  1337. `ID` int(11) NOT NULL COMMENT '主键',
  1338. `shortname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目简称',
  1339. `groupid` int(11) NULL DEFAULT NULL COMMENT '所属集团',
  1340. `coal` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '使用煤矿',
  1341. `provinceid` int(11) NULL DEFAULT NULL COMMENT '省(外键,指向tarea.ID)',
  1342. `cityid` int(11) NULL DEFAULT NULL COMMENT '市(外键,指向tarea.ID)',
  1343. `countyid` int(11) NULL DEFAULT NULL COMMENT '县(外键,指向tarea.ID)',
  1344. `address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '详细地址',
  1345. `typeid` int(11) NULL DEFAULT NULL COMMENT '项目类型(外键,指向tprojecttype.ID)',
  1346. `matchnum` int(11) NULL DEFAULT NULL COMMENT '配套套数',
  1347. `repairsate` int(11) NULL DEFAULT NULL COMMENT '项目维修状况(外键,指向trepairstate.ID)',
  1348. `runstate` int(11) NULL DEFAULT NULL COMMENT '项目运行状态(外键,指向trunstate.ID)',
  1349. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键,指向tsalecenter.ID)',
  1350. `majoremployeeid` int(11) NULL DEFAULT NULL COMMENT '项目主要负责人(外键,指向temployee.ID)',
  1351. `otheremployee` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目其他负责人(外键,多选,指向temployee.ID)',
  1352. `name` int(11) NULL DEFAULT NULL COMMENT '关联ERP项目',
  1353. `code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联ERP编号',
  1354. `arrivedate` datetime NULL DEFAULT NULL COMMENT '设备到货时间',
  1355. `installdate` datetime NULL DEFAULT NULL COMMENT '井下安装时间',
  1356. `productdate` datetime NULL DEFAULT NULL COMMENT '开始生产时间',
  1357. `warrantystart` datetime NULL DEFAULT NULL COMMENT '质保期-起始',
  1358. `warranty` int(11) NULL DEFAULT NULL COMMENT '质保期',
  1359. `warrantyend` datetime NULL DEFAULT NULL COMMENT '质保期-结束',
  1360. `parentproject` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '前置项目(多选外键,指向tproject.ID)',
  1361. `starttime` datetime NULL DEFAULT NULL COMMENT '工作面使用起始时间',
  1362. `endtime` datetime NULL DEFAULT NULL COMMENT '工作面使用结束时间',
  1363. `coalname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作面使用煤矿',
  1364. `facename` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '使用煤矿',
  1365. `auxiliaryvalvesuppid` int(11) NULL DEFAULT NULL COMMENT '支架辅助阀-厂家(外键,指向tsupplier.ID)',
  1366. `onewayvalvemodel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '支架立柱液控单向阀-型号',
  1367. `suppfiltsupplierid` int(11) NULL DEFAULT NULL COMMENT '支架过滤器厂家(外键,指向tsupplier.ID)',
  1368. `suppfiltmodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '支架过滤器型号',
  1369. `suppfilttype` int(11) NULL DEFAULT NULL COMMENT '支架过滤器类型',
  1370. `highpresupplierid` int(11) NULL DEFAULT NULL COMMENT '高压过滤站厂家(外键,指向tsupplier.ID)',
  1371. `highpremodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '高压过滤站型号',
  1372. `highpretype` int(11) NULL DEFAULT NULL COMMENT '高压过滤站类型',
  1373. `suppcontsupplierid` int(11) NULL DEFAULT NULL COMMENT '支架电控系统-厂家(外键,指向tsupplier.ID)',
  1374. `suppcontmodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '支架控制器-型号',
  1375. `posdetectype` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '采煤机位置检测装置类型',
  1376. `upload` int(11) NULL DEFAULT NULL COMMENT '数据上传(有/无)(0:无,1:有)',
  1377. `machinerytrack` int(11) NULL DEFAULT NULL COMMENT '跟机自动化(有/无)(0:无,1:有)',
  1378. `liquidsuppsupplierid` int(11) NULL DEFAULT NULL COMMENT '集成供液系统-厂家(外键,指向tsupplier.ID)',
  1379. `liquidsuppmodel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '集成供液系统-型号',
  1380. `plc` int(11) NULL DEFAULT NULL COMMENT '集成供液系统-PLC信息(0: 无,1: 有)',
  1381. `varyfrequency` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '集成供液系统-变频信息',
  1382. `emulsionpumpsupplierid` int(11) NULL DEFAULT NULL COMMENT '乳化液泵站厂家(外键,指向tsupplier.ID)',
  1383. `emulsionpumpmodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '乳化液泵站型号',
  1384. `emulsionpumpnum` double NULL DEFAULT NULL COMMENT '乳化液泵站数量',
  1385. `spraypumpsupplierid` int(11) NULL DEFAULT NULL COMMENT '喷雾泵泵站厂家(外键,指向tsupplier.ID)',
  1386. `spraypumpmodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '喷雾泵泵站型号',
  1387. `spraypumpnum` double NULL DEFAULT NULL COMMENT '喷雾泵泵站数量',
  1388. `watertanknum` double NULL DEFAULT NULL COMMENT '水箱-数量',
  1389. `watertankvolume` double NULL DEFAULT NULL COMMENT '水箱-容量',
  1390. `mixturetanknum` double NULL DEFAULT NULL COMMENT '混合液箱-数量',
  1391. `mixturetankvolume` double NULL DEFAULT NULL COMMENT '混合液箱-容量',
  1392. `returntanknum` double NULL DEFAULT NULL COMMENT '回液箱-数量',
  1393. `returntankvolume` double NULL DEFAULT NULL COMMENT '回液箱-容量',
  1394. `mmassupplier` int(11) NULL DEFAULT NULL COMMENT '综采自动化系统-厂家(外键,指向tsupplier.ID)',
  1395. `mmasvideo` int(11) NULL DEFAULT NULL COMMENT '综采自动化系统视频(有/无)(0: 无, 1: 有)',
  1396. `mmasremocont` int(11) NULL DEFAULT NULL COMMENT '综采自动化系统远控(有/无)(0: 无, 1: 有)',
  1397. `minesupplierid` int(11) NULL DEFAULT NULL COMMENT '采煤机厂家(外键,指向tsupplier.ID)_',
  1398. `minemodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '采煤机型号',
  1399. `scrapersupplierid` int(11) NULL DEFAULT NULL COMMENT '刮板运输机厂家(外键,指向tsupplier.ID)',
  1400. `scrapermodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '刮板运输机型号',
  1401. `beltsupplierid` int(11) NULL DEFAULT NULL COMMENT '皮带运输机-厂家(外键,指向tsupplier.ID)',
  1402. `beltmodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '皮带运输机-型号',
  1403. `threecontsupplierid` int(11) NULL DEFAULT NULL COMMENT '三机控制-厂家(外键,指向tsupplier.ID)',
  1404. `threecontmodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三机控制-型号',
  1405. `threemonitsupplierid` int(11) NULL DEFAULT NULL COMMENT '三机监测-厂家(外键,指向tsupplier.ID)',
  1406. `threemonitmodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三机监测-型号',
  1407. `switchsupplierid` int(11) NULL DEFAULT NULL COMMENT '组合开关-厂家(外键,指向tsupplier.ID)',
  1408. `switchmodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组合开关-型号',
  1409. `voicecommsupplierid` int(11) NULL DEFAULT NULL COMMENT '工作面语音通信-厂家(外键,指向tsupplier.ID)',
  1410. `voicecommmodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作面语音通信-型号',
  1411. `supportnum` double NULL DEFAULT NULL COMMENT '配套支架总架数',
  1412. `invertersupplierid` int(11) NULL DEFAULT NULL COMMENT '变频器-厂家(外键,指向tsupplier.ID)',
  1413. `invertermodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '变频器-型号',
  1414. `isdel` int(11) NULL DEFAULT NULL,
  1415. `isdisable` int(11) NULL DEFAULT NULL,
  1416. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  1417. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  1418. `totalauxnum` decimal(20, 2) NULL DEFAULT NULL COMMENT '总的支架数量',
  1419. `totalvalvefunctionnum` decimal(20, 2) NULL DEFAULT NULL COMMENT '总的支架主阀-功能数',
  1420. `projectid` int(11) NULL DEFAULT NULL,
  1421. `otheremployeename` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目其他负责人(外键,多选,指向temployee.ID)',
  1422. `emulsifyoil` int(11) NULL DEFAULT NULL COMMENT '乳化油厂家',
  1423. `servicearea` int(11) NULL DEFAULT NULL COMMENT '区域',
  1424. `workplane` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '当前使用工作面',
  1425. `qastate` int(11) NULL DEFAULT NULL COMMENT '质保状态',
  1426. `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1427. `wbsid` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'wbsid',
  1428. `oldgroup` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '曾用名',
  1429. `watersupplier` int(11) NULL DEFAULT NULL COMMENT '水处理装置_厂家',
  1430. `watermodel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '水处理装置_型号',
  1431. `supporttype` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '中间架支架型号',
  1432. `nowarranty` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1433. PRIMARY KEY (`ID`) USING BTREE
  1434. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  1435. -- ----------------------------
  1436. -- Table structure for tproject_face
  1437. -- ----------------------------
  1438. DROP TABLE IF EXISTS `tproject_face`;
  1439. CREATE TABLE `tproject_face` (
  1440. `ID` int(11) NOT NULL,
  1441. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称(外键,指向tproject.ID)',
  1442. `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作面名称',
  1443. `length` double NULL DEFAULT NULL COMMENT '工作面走向长度',
  1444. `aveheight` double NULL DEFAULT NULL COMMENT '工作面平均采高',
  1445. `incangle` double NULL DEFAULT NULL COMMENT '工作面倾斜角度',
  1446. `inclength` double NULL DEFAULT NULL COMMENT '工作面倾斜长度',
  1447. `roof` int(11) NULL DEFAULT NULL COMMENT '顶板条件',
  1448. `topcoal` int(11) NULL DEFAULT NULL COMMENT '放顶煤(是/否)(0:否,1:是)',
  1449. `gas` int(11) NULL DEFAULT NULL COMMENT '瓦斯含量(高/低)(0:低,1:高)',
  1450. `avedaioutput` double NULL DEFAULT NULL COMMENT '平均日产(万吨)',
  1451. `maxdaioutput` double NULL DEFAULT NULL COMMENT '最高日产(万吨)',
  1452. `avemonoutput` double NULL DEFAULT NULL COMMENT '平均月产(万吨)',
  1453. `maxmonoutput` double NULL DEFAULT NULL COMMENT '最高月产(万吨)',
  1454. `faceoutput` double NULL DEFAULT NULL COMMENT '总产量(万吨)',
  1455. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  1456. `isdel` int(11) NULL DEFAULT NULL,
  1457. `starttime` datetime NULL DEFAULT NULL COMMENT '工作面使用起始时间',
  1458. `endtime` datetime NULL DEFAULT NULL COMMENT '工作面使用结束时间',
  1459. `coalname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作面使用煤矿',
  1460. `projectstateid` int(11) NULL DEFAULT NULL COMMENT '项目运行状态id,指向tprojectstate.id',
  1461. PRIMARY KEY (`ID`) USING BTREE
  1462. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '工作面使用情况' ROW_FORMAT = Dynamic;
  1463. -- ----------------------------
  1464. -- Table structure for tproject_otheremployee
  1465. -- ----------------------------
  1466. DROP TABLE IF EXISTS `tproject_otheremployee`;
  1467. CREATE TABLE `tproject_otheremployee` (
  1468. `ID` int(11) NOT NULL COMMENT '主键',
  1469. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称(外键,指向tproject.ID)',
  1470. `otheremployeeid` int(11) NULL DEFAULT NULL COMMENT '其他项目负责人id(外键,指向temployee.ID)',
  1471. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1472. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  1473. PRIMARY KEY (`ID`) USING BTREE
  1474. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  1475. -- ----------------------------
  1476. -- Table structure for tproject_parent
  1477. -- ----------------------------
  1478. DROP TABLE IF EXISTS `tproject_parent`;
  1479. CREATE TABLE `tproject_parent` (
  1480. `ID` int(11) NOT NULL,
  1481. `projectid` int(11) NULL DEFAULT NULL COMMENT '主表ID',
  1482. `projectname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1483. `isdel` int(11) NULL DEFAULT NULL,
  1484. `createtime` datetime NULL DEFAULT NULL,
  1485. `preprojectid` int(11) NULL DEFAULT NULL COMMENT '前置项目ID ',
  1486. `remark` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL
  1487. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  1488. -- ----------------------------
  1489. -- Table structure for tproject_province
  1490. -- ----------------------------
  1491. DROP TABLE IF EXISTS `tproject_province`;
  1492. CREATE TABLE `tproject_province` (
  1493. `id` smallint(6) NOT NULL,
  1494. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1495. `PID` smallint(6) NULL DEFAULT NULL,
  1496. `type` smallint(6) NULL DEFAULT NULL,
  1497. `initial` char(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1498. `initials` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1499. `pinyin` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1500. `extra` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1501. `suffix` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1502. `code` char(21) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1503. `area_code` char(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  1504. `order` tinyint(4) NULL DEFAULT NULL,
  1505. `isdisable` smallint(6) NULL DEFAULT NULL,
  1506. `isdel` smallint(6) NULL DEFAULT NULL,
  1507. PRIMARY KEY (`id`) USING BTREE
  1508. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  1509. -- ----------------------------
  1510. -- Table structure for tproject_support
  1511. -- ----------------------------
  1512. DROP TABLE IF EXISTS `tproject_support`;
  1513. CREATE TABLE `tproject_support` (
  1514. `ID` int(11) NOT NULL,
  1515. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称(外键,指向tproject.ID)',
  1516. `supplierid` int(11) NULL DEFAULT NULL COMMENT '供货厂家(外键,指向tsupplier.ID)',
  1517. `typeid` int(11) NULL DEFAULT NULL COMMENT '支架类型(外键,指向tsupport_type.ID)',
  1518. `model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '型号',
  1519. `num` float NULL DEFAULT NULL COMMENT '数量',
  1520. `mainvalvesupp` int(11) NULL DEFAULT NULL COMMENT '主阀厂家',
  1521. `mainvalvemodel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主阀型号',
  1522. `mainvalvefuncnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '主阀功能数',
  1523. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1524. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  1525. `projectstateid` int(11) NULL DEFAULT NULL COMMENT '项目运行状态id,指向tprojectstate.id',
  1526. PRIMARY KEY (`ID`) USING BTREE
  1527. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '配套支架明细' ROW_FORMAT = Dynamic;
  1528. -- ----------------------------
  1529. -- Table structure for tprojectstate
  1530. -- ----------------------------
  1531. DROP TABLE IF EXISTS `tprojectstate`;
  1532. CREATE TABLE `tprojectstate` (
  1533. `ID` int(11) NOT NULL,
  1534. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称',
  1535. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1536. PRIMARY KEY (`ID`) USING BTREE
  1537. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目运行状态变更' ROW_FORMAT = Dynamic;
  1538. -- ----------------------------
  1539. -- Table structure for tprojectstate_detail
  1540. -- ----------------------------
  1541. DROP TABLE IF EXISTS `tprojectstate_detail`;
  1542. CREATE TABLE `tprojectstate_detail` (
  1543. `ID` int(11) NOT NULL,
  1544. `projectstateid` int(11) NULL DEFAULT NULL COMMENT '运行状态变更 外键,指向tprojectstate.ID',
  1545. `happendate` datetime NULL DEFAULT NULL COMMENT '发生时间',
  1546. `runstate` int(11) NULL DEFAULT NULL COMMENT '运行状态 外键,指向trunstate.ID',
  1547. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1548. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  1549. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人',
  1550. `createmanname` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人姓名',
  1551. PRIMARY KEY (`ID`) USING BTREE
  1552. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目运行状态变更明细' ROW_FORMAT = Dynamic;
  1553. -- ----------------------------
  1554. -- Table structure for tprojecttype
  1555. -- ----------------------------
  1556. DROP TABLE IF EXISTS `tprojecttype`;
  1557. CREATE TABLE `tprojecttype` (
  1558. `ID` int(11) NOT NULL,
  1559. `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型名称',
  1560. `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  1561. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1562. `createtime` datetime NULL DEFAULT NULL,
  1563. PRIMARY KEY (`ID`) USING BTREE
  1564. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目类型表' ROW_FORMAT = Dynamic;
  1565. -- ----------------------------
  1566. -- Table structure for treceive
  1567. -- ----------------------------
  1568. DROP TABLE IF EXISTS `treceive`;
  1569. CREATE TABLE `treceive` (
  1570. `ID` int(11) NOT NULL,
  1571. `date` datetime NULL DEFAULT NULL COMMENT '接货时间',
  1572. `sendaddress` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发货地址',
  1573. `receiveaddress` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接货地址',
  1574. `receiveman` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接货人姓名',
  1575. `receivephone` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接货人电话',
  1576. `notifierid` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通知人(外键,多选,指向temployee.ID)',
  1577. `notifiername` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通知人姓名',
  1578. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键,指向tsalecenter.ID)',
  1579. `money` decimal(12, 2) NULL DEFAULT NULL COMMENT '发生费用',
  1580. `iscommit` int(11) NULL DEFAULT NULL COMMENT '是否接货 (0:未接货,1:已接货)',
  1581. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  1582. `createtime` datetime NULL DEFAULT NULL,
  1583. `isdel` int(11) NULL DEFAULT NULL,
  1584. `totalnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '总数量',
  1585. `totalmoney` decimal(12, 2) NULL DEFAULT NULL COMMENT '总钱数',
  1586. `totalreceiptnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '总的收货数量',
  1587. `totalwrongnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '总的错误记录',
  1588. `deliveryid` int(11) NULL DEFAULT NULL COMMENT '发货记录ID(外键,指向tsend.ID)',
  1589. PRIMARY KEY (`ID`) USING BTREE
  1590. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '接货记录' ROW_FORMAT = Dynamic;
  1591. -- ----------------------------
  1592. -- Table structure for treceive_detail
  1593. -- ----------------------------
  1594. DROP TABLE IF EXISTS `treceive_detail`;
  1595. CREATE TABLE `treceive_detail` (
  1596. `ID` int(11) NOT NULL,
  1597. `receiveid` int(11) NULL DEFAULT NULL COMMENT '接货记录ID(外键,指向treceive.ID)',
  1598. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称(外键,指向tproject.ID)',
  1599. `listono` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '装箱清单单号',
  1600. `serialno` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '序号',
  1601. `productno` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品号',
  1602. `productname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品名',
  1603. `model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规格',
  1604. `sendnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '数量',
  1605. `unit` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位',
  1606. `boxno` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '箱号',
  1607. `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  1608. `attribute` int(11) NULL DEFAULT NULL COMMENT '关联属性',
  1609. `createtime` datetime NULL DEFAULT NULL,
  1610. `isdel` int(11) NULL DEFAULT NULL,
  1611. `receivenum` decimal(12, 2) NULL DEFAULT NULL COMMENT '收货数量',
  1612. `money` decimal(12, 2) NULL DEFAULT NULL COMMENT '费用总额',
  1613. `isprojectid` int(11) NULL DEFAULT NULL COMMENT '涉及项目 0:否,1:是',
  1614. `wrongnum` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '错误记录',
  1615. PRIMARY KEY (`ID`) USING BTREE
  1616. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '接货记录-明细表' ROW_FORMAT = Dynamic;
  1617. -- ----------------------------
  1618. -- Table structure for treceiveprove
  1619. -- ----------------------------
  1620. DROP TABLE IF EXISTS `treceiveprove`;
  1621. CREATE TABLE `treceiveprove` (
  1622. `ID` int(11) NOT NULL,
  1623. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称(外键,指向tproject.ID)',
  1624. `createtime` datetime NULL DEFAULT NULL,
  1625. `isdel` int(11) NULL DEFAULT NULL,
  1626. `date` datetime NULL DEFAULT NULL COMMENT '验收日期',
  1627. `address` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验收地点',
  1628. `employeeid` int(11) NULL DEFAULT NULL COMMENT '验收人员',
  1629. `custnameid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户姓名 (外键,指向tcustbook.ID)',
  1630. `custpost` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户职位',
  1631. `custphone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户电话',
  1632. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  1633. `cc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '邮件抄送人',
  1634. PRIMARY KEY (`ID`) USING BTREE
  1635. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '设备到货验收表' ROW_FORMAT = Dynamic;
  1636. -- ----------------------------
  1637. -- Table structure for treceiveprove_attachment
  1638. -- ----------------------------
  1639. DROP TABLE IF EXISTS `treceiveprove_attachment`;
  1640. CREATE TABLE `treceiveprove_attachment` (
  1641. `ID` int(11) NOT NULL,
  1642. `receiveproveid` int(11) NULL DEFAULT NULL COMMENT '设备到货验收证明ID(外键,指向treceiveprove.ID)',
  1643. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  1644. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  1645. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1646. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  1647. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  1648. `file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '(isdel)',
  1649. PRIMARY KEY (`ID`) USING BTREE
  1650. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '设备到货验收附件' ROW_FORMAT = Dynamic;
  1651. -- ----------------------------
  1652. -- Table structure for treformnotice
  1653. -- ----------------------------
  1654. DROP TABLE IF EXISTS `treformnotice`;
  1655. CREATE TABLE `treformnotice` (
  1656. `ID` int(11) NOT NULL,
  1657. `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '整改主题',
  1658. `reformstate` tinyint(4) NULL DEFAULT NULL COMMENT '整改状态(1:已发放 2:已确认 3:已提交 4:已完成)',
  1659. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键,指向torganization.id)',
  1660. `reformheadid` int(11) NULL DEFAULT NULL COMMENT '整改负责人(外键,指向temployee.id)',
  1661. `reformmemberid` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '整改组员id(多选,外键指向temployee.id)',
  1662. `reformembername` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '整改组员名字',
  1663. `projectid` int(11) NULL DEFAULT NULL COMMENT '关联项目(外键指向tproject.id)',
  1664. `reformcontent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '整改内容',
  1665. `reformalteradvice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '整改意见',
  1666. `reformdeadline` datetime NULL DEFAULT NULL COMMENT '整改期限',
  1667. `cc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '邮件抄送人',
  1668. `issueorgid` int(11) NULL DEFAULT NULL COMMENT '发放部门(外键指向torganization.id)',
  1669. `issuedate` datetime NULL DEFAULT NULL COMMENT '发放日期',
  1670. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键指向temployee.id)',
  1671. `createtime` datetime NULL DEFAULT NULL COMMENT '填报时间',
  1672. `confirmdate` datetime NULL DEFAULT NULL COMMENT '确认时间',
  1673. `confirmemployee` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '确认人员',
  1674. `reformplan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '整改计划',
  1675. `finishdate` datetime NULL DEFAULT NULL COMMENT '完成时间',
  1676. `isoverdue` tinyint(4) NULL DEFAULT NULL COMMENT '是否逾期',
  1677. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识(0:未删除 1:已删除)'
  1678. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '整改通知单主表' ROW_FORMAT = Dynamic;
  1679. -- ----------------------------
  1680. -- Table structure for treformnotice_attach
  1681. -- ----------------------------
  1682. DROP TABLE IF EXISTS `treformnotice_attach`;
  1683. CREATE TABLE `treformnotice_attach` (
  1684. `ID` int(11) NOT NULL COMMENT '主键',
  1685. `reformnoticeid` int(11) NULL DEFAULT NULL COMMENT '整改通知单(外键,指向treformnotice.ID)',
  1686. `filename` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  1687. `filerealname` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '文件名称',
  1688. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识',
  1689. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  1690. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期'
  1691. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '整改通知单附件表' ROW_FORMAT = Dynamic;
  1692. -- ----------------------------
  1693. -- Table structure for treformnotice_employee
  1694. -- ----------------------------
  1695. DROP TABLE IF EXISTS `treformnotice_employee`;
  1696. CREATE TABLE `treformnotice_employee` (
  1697. `ID` int(11) NOT NULL COMMENT '主键',
  1698. `reformnoticeid` int(11) NULL DEFAULT NULL COMMENT '整改通知单主表(外键指向treformnotice.id)',
  1699. `employeeid` int(11) NULL DEFAULT NULL COMMENT '整改组员id(外键,指向temployee.id)',
  1700. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识(0:未删除 1:已删除)'
  1701. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '整改通知单整改组员表' ROW_FORMAT = Dynamic;
  1702. -- ----------------------------
  1703. -- Table structure for treformnotice_record
  1704. -- ----------------------------
  1705. DROP TABLE IF EXISTS `treformnotice_record`;
  1706. CREATE TABLE `treformnotice_record` (
  1707. `ID` int(11) NOT NULL COMMENT '主键',
  1708. `reformnoticeid` int(11) NULL DEFAULT NULL COMMENT '整改通制单主表id(外键指向treformnotice.id)',
  1709. `recordemployeeid` int(11) NULL DEFAULT NULL COMMENT '记录人id(外键指向temployee.id)',
  1710. `recorddate` datetime NULL DEFAULT NULL COMMENT '记录时间',
  1711. `recordcontent` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '内容',
  1712. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识(0:未删除 1:已删除)',
  1713. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  1714. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传附件名称',
  1715. `uploaddateList` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传时间',
  1716. `reportMan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人'
  1717. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '整改通知单整改记录表' ROW_FORMAT = Dynamic;
  1718. -- ----------------------------
  1719. -- Table structure for treformnotice_recordattach
  1720. -- ----------------------------
  1721. DROP TABLE IF EXISTS `treformnotice_recordattach`;
  1722. CREATE TABLE `treformnotice_recordattach` (
  1723. `ID` int(11) NOT NULL COMMENT '主键',
  1724. `reformnotice_recordid` int(11) NULL DEFAULT NULL COMMENT '整改通知单整改记录id(外键,指向treformnotice_record.ID)',
  1725. `filename` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  1726. `filerealname` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  1727. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识',
  1728. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  1729. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期'
  1730. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '整改通知单记录附件表' ROW_FORMAT = Dynamic;
  1731. -- ----------------------------
  1732. -- Table structure for trepairedreceive
  1733. -- ----------------------------
  1734. DROP TABLE IF EXISTS `trepairedreceive`;
  1735. CREATE TABLE `trepairedreceive` (
  1736. `ID` int(11) NOT NULL,
  1737. `repairsendid` int(11) NULL DEFAULT NULL COMMENT '需维修产品发货单ID(外键,指向trepairsend.ID)',
  1738. `repairsendcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '需维修产品发货单号',
  1739. `receivedate` datetime NULL DEFAULT NULL COMMENT '发货时间',
  1740. `receiveaddress` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发货地点',
  1741. `totalsendnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '总维修发货数量',
  1742. `isreceive` int(11) NULL DEFAULT NULL COMMENT '是否接货 (0:未接货,1:已接货)',
  1743. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间',
  1744. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  1745. `createtime` datetime NULL DEFAULT NULL,
  1746. `isdel` int(11) NULL DEFAULT NULL,
  1747. `receiveemployeeid` int(11) NULL DEFAULT NULL COMMENT '发货登记人员(外键,指向temployee.ID)',
  1748. `totalreceivenum` decimal(12, 2) NULL DEFAULT NULL COMMENT '总实际到货数量',
  1749. `deliveryno` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '接货单号',
  1750. `deliverydate` datetime NULL DEFAULT NULL COMMENT '接货日期',
  1751. `deliverysite` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接货地点',
  1752. PRIMARY KEY (`ID`, `deliveryno`) USING BTREE
  1753. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '已维修产品接货单' ROW_FORMAT = Dynamic;
  1754. -- ----------------------------
  1755. -- Table structure for trepairedreceive_detail
  1756. -- ----------------------------
  1757. DROP TABLE IF EXISTS `trepairedreceive_detail`;
  1758. CREATE TABLE `trepairedreceive_detail` (
  1759. `ID` int(11) NOT NULL,
  1760. `repairedreceiveid` int(11) NULL DEFAULT NULL COMMENT '已维修产品接货单ID(外键,指向trepairreceive.ID)',
  1761. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称(外键,指向tproject.ID)',
  1762. `createtime` datetime NULL DEFAULT NULL,
  1763. `isdel` int(11) NULL DEFAULT NULL,
  1764. `productid` int(11) NULL DEFAULT NULL,
  1765. `sendnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '维修发货数量',
  1766. `planbackdate` datetime NULL DEFAULT NULL COMMENT '计划返回时间',
  1767. `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  1768. `receivenum` decimal(12, 2) NULL DEFAULT NULL COMMENT '实际到货数量',
  1769. PRIMARY KEY (`ID`) USING BTREE
  1770. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '已维修产品接货-产品明细' ROW_FORMAT = Dynamic;
  1771. -- ----------------------------
  1772. -- Table structure for trepairedsend
  1773. -- ----------------------------
  1774. DROP TABLE IF EXISTS `trepairedsend`;
  1775. CREATE TABLE `trepairedsend` (
  1776. `ID` int(11) NOT NULL,
  1777. `repairsendid` int(11) NULL DEFAULT NULL COMMENT '需维修产品发货单ID(外键,指向trepairsend.ID)',
  1778. `repairsendcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '需维修产品发货单号',
  1779. `senddate` datetime NULL DEFAULT NULL COMMENT '发货时间',
  1780. `sendaddress` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发送地点',
  1781. `totalsendnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '总维修发货数量',
  1782. `isreceive` int(11) NULL DEFAULT NULL COMMENT '是否接货 (0:未接货,1:已接货)',
  1783. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  1784. `createtime` datetime NULL DEFAULT NULL,
  1785. `isdel` int(11) NULL DEFAULT NULL,
  1786. `sendemployeeid` int(11) NULL DEFAULT NULL COMMENT '发货登记人员(外键,指向temployee.ID)',
  1787. `receiveid` int(11) NULL DEFAULT NULL COMMENT '需维修接货单(外键指向trepairreceive)',
  1788. PRIMARY KEY (`ID`) USING BTREE
  1789. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '已维修产品发货单' ROW_FORMAT = Dynamic;
  1790. -- ----------------------------
  1791. -- Table structure for trepairedsend_detail
  1792. -- ----------------------------
  1793. DROP TABLE IF EXISTS `trepairedsend_detail`;
  1794. CREATE TABLE `trepairedsend_detail` (
  1795. `ID` int(11) NOT NULL,
  1796. `repairedsendid` int(11) NULL DEFAULT NULL COMMENT '已维修产品发货单ID(外键,指向trepairedsend.ID)',
  1797. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称(外键,指向tproject.ID)',
  1798. `createtime` datetime NULL DEFAULT NULL,
  1799. `isdel` int(11) NULL DEFAULT NULL,
  1800. `productid` int(11) NULL DEFAULT NULL COMMENT '产品ID',
  1801. `sendnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '维修发货数量',
  1802. `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  1803. PRIMARY KEY (`ID`) USING BTREE
  1804. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '已维修产品发货明细表' ROW_FORMAT = Dynamic;
  1805. -- ----------------------------
  1806. -- Table structure for trepairprocess
  1807. -- ----------------------------
  1808. DROP TABLE IF EXISTS `trepairprocess`;
  1809. CREATE TABLE `trepairprocess` (
  1810. `ID` int(11) NOT NULL,
  1811. `repairsendid` int(11) NULL DEFAULT NULL COMMENT '需维修产品发货单ID(外键,指向trepairsend.ID)',
  1812. `repairsendcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '需维修产品发货单号',
  1813. `totalnotsendnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '发货时间',
  1814. `reportdate` datetime NULL DEFAULT NULL COMMENT '发货时间',
  1815. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  1816. `createtime` datetime NULL DEFAULT NULL,
  1817. `isdel` int(11) NULL DEFAULT NULL,
  1818. `repairstateid` int(11) NULL DEFAULT NULL COMMENT '维修状态分类ID(外键,指向trepairstate.ID)(isdel)',
  1819. `repairno` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '维修单号',
  1820. `deliverysite` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发货地址',
  1821. PRIMARY KEY (`ID`) USING BTREE
  1822. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '维修进程管理' ROW_FORMAT = Dynamic;
  1823. -- ----------------------------
  1824. -- Table structure for trepairprocess_detail
  1825. -- ----------------------------
  1826. DROP TABLE IF EXISTS `trepairprocess_detail`;
  1827. CREATE TABLE `trepairprocess_detail` (
  1828. `ID` int(11) NOT NULL,
  1829. `repairprocessid` int(11) NULL DEFAULT NULL COMMENT '维修进程单ID(外键,指向trepairprocess.ID)',
  1830. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称(外键,指向tproject.ID)',
  1831. `createtime` datetime NULL DEFAULT NULL,
  1832. `isdel` int(11) NULL DEFAULT NULL,
  1833. `productid` int(11) NULL DEFAULT NULL COMMENT '产品ID',
  1834. `notsendnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '未发货数量',
  1835. `planbackdate` datetime NULL DEFAULT NULL COMMENT '原定计划时间',
  1836. `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  1837. `alterplandate` datetime NULL DEFAULT NULL COMMENT '修改计划时间',
  1838. `repair` int(11) NULL DEFAULT NULL COMMENT '维修状态',
  1839. PRIMARY KEY (`ID`) USING BTREE
  1840. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '维修进程管理明细' ROW_FORMAT = Dynamic;
  1841. -- ----------------------------
  1842. -- Table structure for trepairreceive
  1843. -- ----------------------------
  1844. DROP TABLE IF EXISTS `trepairreceive`;
  1845. CREATE TABLE `trepairreceive` (
  1846. `ID` int(11) NOT NULL,
  1847. `deliveryid` int(11) NULL DEFAULT NULL COMMENT '需维修产品发货单ID(外键,指向trepairsend.ID)',
  1848. `repairsendcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '需维修产品发货单号',
  1849. `receivedate` datetime NULL DEFAULT NULL COMMENT '接货时间',
  1850. `receiveaddress` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接货地址',
  1851. `totalsendnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '总返厂发货数量',
  1852. `isreceive` int(11) NULL DEFAULT NULL COMMENT '是否接货 (0:未接货,1:已接货)(isdel)',
  1853. `reportdate` datetime NULL DEFAULT NULL COMMENT '接货时间',
  1854. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  1855. `createtime` datetime NULL DEFAULT NULL,
  1856. `isdel` int(11) NULL DEFAULT NULL,
  1857. `totalreceivenum` decimal(12, 2) NULL DEFAULT NULL COMMENT '总实际收货数量',
  1858. `receiveemployeeid` int(11) NULL DEFAULT NULL COMMENT '接货登记人员(外键,指向temployee.ID)',
  1859. `deliveryno` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发货单号',
  1860. `deliverydate` datetime NULL DEFAULT NULL COMMENT '发货时间',
  1861. `deliverysite` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发货地址',
  1862. `isbacksend` int(11) NULL DEFAULT NULL COMMENT '是否已发货',
  1863. PRIMARY KEY (`ID`) USING BTREE
  1864. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '需维修产品接货记录' ROW_FORMAT = Dynamic;
  1865. -- ----------------------------
  1866. -- Table structure for trepairreceive_detail
  1867. -- ----------------------------
  1868. DROP TABLE IF EXISTS `trepairreceive_detail`;
  1869. CREATE TABLE `trepairreceive_detail` (
  1870. `ID` int(11) NOT NULL,
  1871. `repairreceiveid` int(11) NULL DEFAULT NULL COMMENT '需维修产品接货单ID',
  1872. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称',
  1873. `createtime` datetime NULL DEFAULT NULL,
  1874. `isdel` int(11) NULL DEFAULT NULL,
  1875. `productid` int(11) NULL DEFAULT NULL COMMENT '产品ID',
  1876. `sendnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '返厂发货数量',
  1877. `planbackdate` datetime NULL DEFAULT NULL COMMENT '计划返回时间',
  1878. `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  1879. `receivenum` double NULL DEFAULT NULL COMMENT '实际收货数量',
  1880. PRIMARY KEY (`ID`) USING BTREE
  1881. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '需维修产品接货记录明细表' ROW_FORMAT = Dynamic;
  1882. -- ----------------------------
  1883. -- Table structure for trepairsend
  1884. -- ----------------------------
  1885. DROP TABLE IF EXISTS `trepairsend`;
  1886. CREATE TABLE `trepairsend` (
  1887. `ID` int(11) NOT NULL,
  1888. `sendcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发货单单号',
  1889. `senddate` datetime NULL DEFAULT NULL COMMENT '发货时间',
  1890. `sendemployeeid` int(11) NULL DEFAULT NULL COMMENT '发货登记人员(外键,指向temployee.ID)',
  1891. `sendaddress` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发送地点',
  1892. `totalsendnum` float NULL DEFAULT NULL COMMENT '总返厂发货数量',
  1893. `isreceive` int(11) NULL DEFAULT NULL COMMENT '是否接货 (0:未接货,1:已接货)',
  1894. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  1895. `createtime` datetime NULL DEFAULT NULL,
  1896. `isdel` int(11) NULL DEFAULT NULL,
  1897. PRIMARY KEY (`ID`) USING BTREE
  1898. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '需维修产品发货记录' ROW_FORMAT = Dynamic;
  1899. -- ----------------------------
  1900. -- Table structure for trepairsend_detail
  1901. -- ----------------------------
  1902. DROP TABLE IF EXISTS `trepairsend_detail`;
  1903. CREATE TABLE `trepairsend_detail` (
  1904. `ID` int(11) NOT NULL,
  1905. `repairsendid` int(11) NULL DEFAULT NULL COMMENT '需维修产品发货单ID(外键,指向trepairsend.ID)',
  1906. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称(外键,指向tproject.ID)',
  1907. `createtime` datetime NULL DEFAULT NULL,
  1908. `isdel` int(11) NULL DEFAULT NULL,
  1909. `productid` int(11) NULL DEFAULT NULL COMMENT '产品ID',
  1910. `sendnum` float NULL DEFAULT NULL COMMENT '返厂发货数量',
  1911. `planbackdate` datetime NULL DEFAULT NULL COMMENT '计划返回时间',
  1912. `remark` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  1913. PRIMARY KEY (`ID`) USING BTREE
  1914. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '需维修产品发货记录明细表' ROW_FORMAT = Dynamic;
  1915. -- ----------------------------
  1916. -- Table structure for trepairstate
  1917. -- ----------------------------
  1918. DROP TABLE IF EXISTS `trepairstate`;
  1919. CREATE TABLE `trepairstate` (
  1920. `ID` int(11) NOT NULL,
  1921. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态名称',
  1922. `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  1923. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1924. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  1925. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  1926. PRIMARY KEY (`ID`) USING BTREE
  1927. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  1928. -- ----------------------------
  1929. -- Table structure for trules
  1930. -- ----------------------------
  1931. DROP TABLE IF EXISTS `trules`;
  1932. CREATE TABLE `trules` (
  1933. `ID` int(11) NOT NULL,
  1934. `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
  1935. `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
  1936. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '通知内容(解析前)',
  1937. `date` datetime NULL DEFAULT NULL COMMENT '时间',
  1938. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识 (0:未删除,1:已删除)',
  1939. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  1940. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  1941. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间(isdel)',
  1942. `new` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '通知内容(解析后)',
  1943. PRIMARY KEY (`ID`) USING BTREE
  1944. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理规定' ROW_FORMAT = Dynamic;
  1945. -- ----------------------------
  1946. -- Table structure for trules_attach
  1947. -- ----------------------------
  1948. DROP TABLE IF EXISTS `trules_attach`;
  1949. CREATE TABLE `trules_attach` (
  1950. `ID` int(11) NOT NULL COMMENT '主键',
  1951. `rulesid` int(11) NULL DEFAULT NULL COMMENT '管理规定ID(外键,指向trules.ID)',
  1952. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  1953. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  1954. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1955. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  1956. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  1957. PRIMARY KEY (`ID`) USING BTREE
  1958. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  1959. -- ----------------------------
  1960. -- Table structure for trunstate
  1961. -- ----------------------------
  1962. DROP TABLE IF EXISTS `trunstate`;
  1963. CREATE TABLE `trunstate` (
  1964. `ID` int(11) NOT NULL,
  1965. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态名称',
  1966. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  1967. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  1968. PRIMARY KEY (`ID`) USING BTREE
  1969. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目运行状态分类' ROW_FORMAT = Dynamic;
  1970. -- ----------------------------
  1971. -- Table structure for tsatisfaction
  1972. -- ----------------------------
  1973. DROP TABLE IF EXISTS `tsatisfaction`;
  1974. CREATE TABLE `tsatisfaction` (
  1975. `ID` int(11) NOT NULL,
  1976. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键,指向tproject.ID)',
  1977. `custtypeid` int(11) NULL DEFAULT NULL COMMENT '调查对象分类(外键,指向tcusttype.ID)',
  1978. `coal` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '使用煤矿',
  1979. `custfullnameid` int(11) NULL DEFAULT NULL COMMENT '客户全称',
  1980. `custname` int(11) NULL DEFAULT NULL COMMENT '客户姓名,外键指向tcustlinkman.id',
  1981. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间',
  1982. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  1983. `createtime` datetime NULL DEFAULT NULL,
  1984. `isdel` int(11) NULL DEFAULT NULL,
  1985. `performance` decimal(12, 2) NULL DEFAULT NULL COMMENT '产品性能',
  1986. `appearance` decimal(12, 2) NULL DEFAULT NULL COMMENT '产品外观',
  1987. `quality` decimal(12, 2) NULL DEFAULT NULL COMMENT '包装质量',
  1988. `totalproduct` decimal(12, 2) NULL DEFAULT NULL COMMENT '产品质量分值合计(35%)',
  1989. `service` decimal(12, 2) NULL DEFAULT NULL COMMENT '服务质量(35%)',
  1990. `totalservice` decimal(12, 2) NULL DEFAULT NULL COMMENT '服务质量分值合计',
  1991. `price` decimal(12, 2) NULL DEFAULT NULL COMMENT '价格(15%)',
  1992. `totalprice` decimal(12, 2) NULL DEFAULT NULL COMMENT '价格分值合计',
  1993. `delivery` decimal(12, 2) NULL DEFAULT NULL COMMENT '交货期(15%)',
  1994. `totaldelivery` decimal(12, 2) NULL DEFAULT NULL COMMENT '交货期分值合计',
  1995. `advice` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户意见建议',
  1996. `totalscore` decimal(12, 2) NULL DEFAULT NULL COMMENT '加权平均值合计',
  1997. `doctypeid` int(11) NULL DEFAULT NULL COMMENT '提交报告类型 ,指向 twarndays.ID',
  1998. `cc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '邮件抄送人',
  1999. `isnew` smallint(6) NULL DEFAULT NULL COMMENT '是否已查看(0:未查看,1:已查看)',
  2000. `isfile` smallint(6) NULL DEFAULT NULL COMMENT '表单状态(0:未提交,1:已提交,2:已归档,3:已驳回)',
  2001. `custpost` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户职位',
  2002. `custphone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户电话',
  2003. PRIMARY KEY (`ID`) USING BTREE
  2004. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户满意度调查表' ROW_FORMAT = Dynamic;
  2005. -- ----------------------------
  2006. -- Table structure for tsatisfaction_attachment
  2007. -- ----------------------------
  2008. DROP TABLE IF EXISTS `tsatisfaction_attachment`;
  2009. CREATE TABLE `tsatisfaction_attachment` (
  2010. `ID` int(11) NOT NULL,
  2011. `satisfactionid` int(11) NULL DEFAULT NULL COMMENT '专题报告外键',
  2012. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  2013. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  2014. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2015. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识(isdel)',
  2016. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  2017. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  2018. PRIMARY KEY (`ID`) USING BTREE
  2019. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户满意度调查附件表' ROW_FORMAT = Dynamic;
  2020. -- ----------------------------
  2021. -- Table structure for tsend
  2022. -- ----------------------------
  2023. DROP TABLE IF EXISTS `tsend`;
  2024. CREATE TABLE `tsend` (
  2025. `ID` int(11) NOT NULL,
  2026. `date` datetime NULL DEFAULT NULL COMMENT '发货日期',
  2027. `sendaddress` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发货地址',
  2028. `receiveaddress` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接货地址',
  2029. `receiveman` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发货人姓名',
  2030. `receivephone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发货人电话',
  2031. `notifierid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通知人(外键,多选,指向temployee.ID)',
  2032. `notifiername` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通知人姓名',
  2033. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键,指向tsalecenter.ID)',
  2034. `money` decimal(12, 2) NULL DEFAULT NULL COMMENT '发生费用',
  2035. `isreceive` int(11) NULL DEFAULT NULL COMMENT '是否接货 (0:未接货,1:已接货)',
  2036. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  2037. `createtime` datetime NULL DEFAULT NULL,
  2038. `isdel` int(11) NULL DEFAULT NULL,
  2039. `totalnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '总数量',
  2040. `totalmoney` decimal(12, 2) NULL DEFAULT NULL COMMENT '总钱数',
  2041. PRIMARY KEY (`ID`) USING BTREE
  2042. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '发货记录' ROW_FORMAT = Dynamic;
  2043. -- ----------------------------
  2044. -- Table structure for tsend_attribute
  2045. -- ----------------------------
  2046. DROP TABLE IF EXISTS `tsend_attribute`;
  2047. CREATE TABLE `tsend_attribute` (
  2048. `ID` int(11) NOT NULL,
  2049. `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型名称',
  2050. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2051. `createtime` datetime NULL DEFAULT NULL,
  2052. PRIMARY KEY (`ID`) USING BTREE
  2053. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '发货记录-关联属性表' ROW_FORMAT = Dynamic;
  2054. -- ----------------------------
  2055. -- Table structure for tsend_detail
  2056. -- ----------------------------
  2057. DROP TABLE IF EXISTS `tsend_detail`;
  2058. CREATE TABLE `tsend_detail` (
  2059. `ID` int(11) NOT NULL,
  2060. `sendid` int(11) NULL DEFAULT NULL COMMENT '发货记录ID(外键,指向tsend.ID)',
  2061. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称(外键,指向tproject.ID)',
  2062. `listono` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '装箱清单单号',
  2063. `serialno` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '序号',
  2064. `productno` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品号',
  2065. `productname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品名',
  2066. `model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规格',
  2067. `sendnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '数量',
  2068. `unit` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位',
  2069. `boxno` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '箱号',
  2070. `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  2071. `attribute` int(11) NULL DEFAULT NULL COMMENT '关联属性',
  2072. `createtime` datetime NULL DEFAULT NULL,
  2073. `isdel` int(11) NULL DEFAULT NULL,
  2074. `money` decimal(12, 2) NULL DEFAULT NULL COMMENT '费用总额',
  2075. `isprojectid` int(11) NULL DEFAULT NULL COMMENT '涉及项目(0:否,1:是)',
  2076. PRIMARY KEY (`ID`) USING BTREE
  2077. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '发货记录-明细表' ROW_FORMAT = Dynamic;
  2078. -- ----------------------------
  2079. -- Table structure for tservelog
  2080. -- ----------------------------
  2081. DROP TABLE IF EXISTS `tservelog`;
  2082. CREATE TABLE `tservelog` (
  2083. `ID` int(11) NOT NULL COMMENT '主键',
  2084. `jobtype` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务分类 1:井上,2:井下',
  2085. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目名称(外键,指向tproject.ID)',
  2086. `date` datetime NULL DEFAULT NULL COMMENT '服务日期',
  2087. `coal` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务煤矿',
  2088. `servicerid` int(11) NULL DEFAULT NULL COMMENT '服务人员(外键,指向temployee)',
  2089. `upemstardate` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '井上服务时间',
  2090. `downstaredate` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '井下服务时间',
  2091. `techemployee` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '技术支持人员(外键,指向temployee)',
  2092. `isdel` int(11) NULL DEFAULT NULL,
  2093. `iscommit` int(11) NULL DEFAULT NULL COMMENT '提交审核标识(0:未提交,1:已提交)',
  2094. `employee` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  2095. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间',
  2096. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  2097. `createtime` datetime NULL DEFAULT NULL,
  2098. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '工作内容',
  2099. `question` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '问题描述',
  2100. `measure` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '处理措施',
  2101. `result` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理结果',
  2102. `totalnum` double NULL DEFAULT NULL,
  2103. `techemployeename` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '技术支持人员',
  2104. `upemendate` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2105. `downendate` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2106. `number` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2107. `downtimelen` decimal(12, 3) NULL DEFAULT NULL COMMENT '下井总时长',
  2108. `emppositionid` int(11) NULL DEFAULT NULL COMMENT '下井记录id,外键指向tempposition.id',
  2109. `subdowntimelen` decimal(12, 3) NULL DEFAULT NULL COMMENT '下井服务时长',
  2110. `coalname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '矿方联系人',
  2111. `coaltel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '矿方联系电话',
  2112. PRIMARY KEY (`ID`) USING BTREE
  2113. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2114. -- ----------------------------
  2115. -- Table structure for tservelog_attachment
  2116. -- ----------------------------
  2117. DROP TABLE IF EXISTS `tservelog_attachment`;
  2118. CREATE TABLE `tservelog_attachment` (
  2119. `ID` int(11) NOT NULL COMMENT '主键',
  2120. `servelogid` int(11) NULL DEFAULT NULL COMMENT '服务日志附件表(外键,指向tservelog.ID)',
  2121. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  2122. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  2123. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2124. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  2125. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  2126. PRIMARY KEY (`ID`) USING BTREE
  2127. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2128. -- ----------------------------
  2129. -- Table structure for tservelog_damage
  2130. -- ----------------------------
  2131. DROP TABLE IF EXISTS `tservelog_damage`;
  2132. CREATE TABLE `tservelog_damage` (
  2133. `ID` int(11) NOT NULL,
  2134. `servelogid` int(11) NULL DEFAULT NULL COMMENT '服务日志明细表(外键,指向tservelog.ID)',
  2135. `partid` int(11) NULL DEFAULT NULL COMMENT '损坏元件ID(外键,指向tproduct)',
  2136. `partname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '损坏元件名称',
  2137. `partnum` int(11) NULL DEFAULT NULL COMMENT '损坏元件个数',
  2138. `createtime` datetime NULL DEFAULT NULL,
  2139. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2140. `projecid` int(11) NULL DEFAULT NULL COMMENT '项目简称',
  2141. `partcause` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '损坏原因',
  2142. `projectabbreviationname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目名称',
  2143. `softtext` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '软件特殊情况记录',
  2144. PRIMARY KEY (`ID`) USING BTREE
  2145. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '元件损坏明细表' ROW_FORMAT = Dynamic;
  2146. -- ----------------------------
  2147. -- Table structure for tservelog_detail
  2148. -- ----------------------------
  2149. DROP TABLE IF EXISTS `tservelog_detail`;
  2150. CREATE TABLE `tservelog_detail` (
  2151. `ID` int(11) NOT NULL,
  2152. `servelogid` int(11) NULL DEFAULT NULL COMMENT '服务日志明细表(外键,指向tservelog.ID)',
  2153. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '工作内容',
  2154. `question` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '问题描述',
  2155. `measure` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '处理措施',
  2156. `result` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理结果',
  2157. `createtime` datetime NULL DEFAULT NULL,
  2158. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2159. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称',
  2160. `mession` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2161. `otherid` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2162. `subdowntimelen` decimal(12, 3) NULL DEFAULT NULL COMMENT '下井时长',
  2163. PRIMARY KEY (`ID`) USING BTREE
  2164. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2165. -- ----------------------------
  2166. -- Table structure for tservelog_techemp
  2167. -- ----------------------------
  2168. DROP TABLE IF EXISTS `tservelog_techemp`;
  2169. CREATE TABLE `tservelog_techemp` (
  2170. `ID` int(11) NOT NULL,
  2171. `servelogid` int(11) NULL DEFAULT NULL COMMENT '服务日志明细表(外键,指向tservelog.ID)',
  2172. `employeeid` int(11) NULL DEFAULT NULL COMMENT '井上服务人员(外键,指向temployee.ID)',
  2173. `createtime` datetime NULL DEFAULT NULL,
  2174. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2175. PRIMARY KEY (`ID`) USING BTREE
  2176. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2177. -- ----------------------------
  2178. -- Table structure for tspecialreport
  2179. -- ----------------------------
  2180. DROP TABLE IF EXISTS `tspecialreport`;
  2181. CREATE TABLE `tspecialreport` (
  2182. `ID` int(11) NOT NULL,
  2183. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键,指向tproject.ID)',
  2184. `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报告主题',
  2185. `importanttype` int(11) NULL DEFAULT NULL COMMENT '重要程度 (1一般,2严重,3特别严重)',
  2186. `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '报告内容',
  2187. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  2188. `createtime` datetime NULL DEFAULT NULL,
  2189. `isdel` int(11) NULL DEFAULT NULL,
  2190. `isresolve` int(11) NULL DEFAULT NULL COMMENT '是否解决 (0:否,1:是)',
  2191. `cc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '邮件抄送人',
  2192. `isnew` smallint(6) NULL DEFAULT NULL COMMENT '是否已查看(0:未查看,1:已查看)',
  2193. `isfile` smallint(6) NULL DEFAULT NULL COMMENT '表单状态(0:未提交,1:已提交,2:已归档,3:已驳回)',
  2194. `reportmember` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '专题组组员',
  2195. `reportmembername` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '专题组组员名字',
  2196. `resolveman` int(11) NULL DEFAULT NULL COMMENT '解决操作人(外键指向temployee.id)',
  2197. `resolvetime` datetime NULL DEFAULT NULL COMMENT '解决时间',
  2198. PRIMARY KEY (`ID`) USING BTREE
  2199. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目专题报告' ROW_FORMAT = Dynamic;
  2200. -- ----------------------------
  2201. -- Table structure for tspecialreport_attachment
  2202. -- ----------------------------
  2203. DROP TABLE IF EXISTS `tspecialreport_attachment`;
  2204. CREATE TABLE `tspecialreport_attachment` (
  2205. `ID` int(11) NOT NULL,
  2206. `specialid` int(11) NOT NULL COMMENT '专题报告外键',
  2207. `filename` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  2208. `filerealname` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  2209. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2210. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  2211. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  2212. PRIMARY KEY (`ID`) USING BTREE
  2213. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目专题报告附件' ROW_FORMAT = Dynamic;
  2214. -- ----------------------------
  2215. -- Table structure for tspecialreport_detail
  2216. -- ----------------------------
  2217. DROP TABLE IF EXISTS `tspecialreport_detail`;
  2218. CREATE TABLE `tspecialreport_detail` (
  2219. `ID` int(11) NOT NULL COMMENT '主键',
  2220. `specialreportid` int(11) NULL DEFAULT NULL COMMENT '项目专题报告ID(外键,指向tspecialreport.ID)',
  2221. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识(0:未删除,1:已删除)',
  2222. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  2223. `tsupplylist_detailnewid` int(11) NULL DEFAULT NULL COMMENT '物料清单明细表id,外键指向tsupplylist_detailnew.id',
  2224. PRIMARY KEY (`ID`) USING BTREE
  2225. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目专题报告涉及产品明细' ROW_FORMAT = Dynamic;
  2226. -- ----------------------------
  2227. -- Table structure for tspecialreport_employee
  2228. -- ----------------------------
  2229. DROP TABLE IF EXISTS `tspecialreport_employee`;
  2230. CREATE TABLE `tspecialreport_employee` (
  2231. `ID` int(11) NOT NULL,
  2232. `specialreportid` int(11) NULL DEFAULT NULL,
  2233. `employeeid` int(11) NULL DEFAULT NULL,
  2234. `isdel` tinyint(4) NULL DEFAULT NULL,
  2235. PRIMARY KEY (`ID`) USING BTREE
  2236. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2237. -- ----------------------------
  2238. -- Table structure for tspecialreport_message
  2239. -- ----------------------------
  2240. DROP TABLE IF EXISTS `tspecialreport_message`;
  2241. CREATE TABLE `tspecialreport_message` (
  2242. `ID` int(11) NOT NULL,
  2243. `messager` int(11) NULL DEFAULT NULL COMMENT '留言人',
  2244. `messagedate` datetime NULL DEFAULT NULL COMMENT '留言日期',
  2245. `messagecontent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '留言内容',
  2246. `isdel` int(11) NULL DEFAULT NULL,
  2247. `specialid` int(11) NULL DEFAULT NULL COMMENT '项目专题报告ID(外键,指向tspecialreport.ID)',
  2248. `creater` int(11) NULL DEFAULT NULL,
  2249. PRIMARY KEY (`ID`) USING BTREE
  2250. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目专题报告留言' ROW_FORMAT = Dynamic;
  2251. -- ----------------------------
  2252. -- Table structure for tsumm_car
  2253. -- ----------------------------
  2254. DROP TABLE IF EXISTS `tsumm_car`;
  2255. CREATE TABLE `tsumm_car` (
  2256. `ID` int(11) NOT NULL COMMENT '主键',
  2257. `countdate` datetime NULL DEFAULT NULL COMMENT '统计日期',
  2258. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键指向torganization.id)',
  2259. `amount` int(11) NULL DEFAULT NULL COMMENT '车辆数量'
  2260. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '销售服务中心车辆数量表' ROW_FORMAT = Dynamic;
  2261. -- ----------------------------
  2262. -- Table structure for tsumm_downmine
  2263. -- ----------------------------
  2264. DROP TABLE IF EXISTS `tsumm_downmine`;
  2265. CREATE TABLE `tsumm_downmine` (
  2266. `ID` int(11) NOT NULL COMMENT '主键',
  2267. `countdate` datetime NULL DEFAULT NULL COMMENT '统计日期',
  2268. `servetypeid` tinyint(4) NULL DEFAULT NULL COMMENT '服务类型(1:井下 2:井上)',
  2269. `rate` decimal(6, 4) NULL DEFAULT NULL COMMENT '所占比例'
  2270. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '月度下井服务比例表' ROW_FORMAT = Dynamic;
  2271. -- ----------------------------
  2272. -- Table structure for tsumm_downmine_detail
  2273. -- ----------------------------
  2274. DROP TABLE IF EXISTS `tsumm_downmine_detail`;
  2275. CREATE TABLE `tsumm_downmine_detail` (
  2276. `ID` int(11) NOT NULL COMMENT '主键',
  2277. `countdate` datetime NULL DEFAULT NULL COMMENT '统计日期',
  2278. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键指向torganization.id)',
  2279. `amount` int(11) NULL DEFAULT NULL COMMENT '数量',
  2280. `servetypeid` tinyint(4) NULL DEFAULT NULL COMMENT '服务类型(1:井上 2:井下)'
  2281. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '销售服务中心项目月度下井服务数量表' ROW_FORMAT = Dynamic;
  2282. -- ----------------------------
  2283. -- Table structure for tsumm_employee
  2284. -- ----------------------------
  2285. DROP TABLE IF EXISTS `tsumm_employee`;
  2286. CREATE TABLE `tsumm_employee` (
  2287. `ID` int(11) NOT NULL COMMENT '主键',
  2288. `countdate` datetime NULL DEFAULT NULL COMMENT '统计日期',
  2289. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键指向torganization.id)',
  2290. `amount` int(11) NULL DEFAULT NULL COMMENT '人员数量'
  2291. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '销售服务中心人员数量表' ROW_FORMAT = Dynamic;
  2292. -- ----------------------------
  2293. -- Table structure for tsumm_projecttype
  2294. -- ----------------------------
  2295. DROP TABLE IF EXISTS `tsumm_projecttype`;
  2296. CREATE TABLE `tsumm_projecttype` (
  2297. `ID` int(11) NOT NULL COMMENT '主键',
  2298. `countdate` datetime NULL DEFAULT NULL COMMENT '统计日期',
  2299. `projecttypeid` tinyint(4) NULL DEFAULT NULL COMMENT '项目类型(外键,指向tprojecttype.id)',
  2300. `rate` decimal(6, 4) NULL DEFAULT NULL COMMENT '所占比例'
  2301. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目整体情况比例表' ROW_FORMAT = Dynamic;
  2302. -- ----------------------------
  2303. -- Table structure for tsumm_projecttype_detail
  2304. -- ----------------------------
  2305. DROP TABLE IF EXISTS `tsumm_projecttype_detail`;
  2306. CREATE TABLE `tsumm_projecttype_detail` (
  2307. `ID` int(11) NOT NULL COMMENT '主键',
  2308. `countdate` datetime NULL DEFAULT NULL COMMENT '统计日期',
  2309. `projecttypeid` tinyint(4) NULL DEFAULT NULL COMMENT '项目类型(外键,指向tprojecttype.id)',
  2310. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键,指向torganization.ID)',
  2311. `amount` int(11) NULL DEFAULT NULL COMMENT '数量'
  2312. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '销售服务中心项目情况数量表' ROW_FORMAT = Dynamic;
  2313. -- ----------------------------
  2314. -- Table structure for tsumm_runstate
  2315. -- ----------------------------
  2316. DROP TABLE IF EXISTS `tsumm_runstate`;
  2317. CREATE TABLE `tsumm_runstate` (
  2318. `ID` int(11) NOT NULL COMMENT '主键',
  2319. `countdate` datetime NULL DEFAULT NULL COMMENT '统计日期',
  2320. `runstateid` tinyint(4) NULL DEFAULT NULL COMMENT '运行状态',
  2321. `rate` decimal(6, 4) NULL DEFAULT NULL COMMENT '所占比例'
  2322. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目运行状态比例表' ROW_FORMAT = Dynamic;
  2323. -- ----------------------------
  2324. -- Table structure for tsumm_runstate_detail
  2325. -- ----------------------------
  2326. DROP TABLE IF EXISTS `tsumm_runstate_detail`;
  2327. CREATE TABLE `tsumm_runstate_detail` (
  2328. `ID` int(11) NOT NULL COMMENT '主键',
  2329. `countdate` datetime NULL DEFAULT NULL COMMENT '统计日期',
  2330. `runstateid` tinyint(4) NULL DEFAULT NULL COMMENT '0:质保内1:质保外',
  2331. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键指向torganization.id)',
  2332. `amount` int(11) NULL DEFAULT NULL COMMENT '数量'
  2333. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '销售服务中心项目运行状态数量表' ROW_FORMAT = Dynamic;
  2334. -- ----------------------------
  2335. -- Table structure for tsumm_warranty
  2336. -- ----------------------------
  2337. DROP TABLE IF EXISTS `tsumm_warranty`;
  2338. CREATE TABLE `tsumm_warranty` (
  2339. `ID` int(11) NOT NULL COMMENT '主键',
  2340. `countdate` datetime NULL DEFAULT NULL COMMENT '统计日期',
  2341. `warrantyid` tinyint(4) NULL DEFAULT NULL COMMENT '0:质保内1:质保外',
  2342. `rate` decimal(6, 4) NULL DEFAULT NULL COMMENT '所占比例'
  2343. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目质保状态比例表' ROW_FORMAT = Dynamic;
  2344. -- ----------------------------
  2345. -- Table structure for tsumm_warranty_detail
  2346. -- ----------------------------
  2347. DROP TABLE IF EXISTS `tsumm_warranty_detail`;
  2348. CREATE TABLE `tsumm_warranty_detail` (
  2349. `ID` int(11) NOT NULL COMMENT '主键',
  2350. `countdate` datetime NULL DEFAULT NULL COMMENT '统计日期',
  2351. `warrantyid` tinyint(4) NULL DEFAULT NULL COMMENT '0:质保内1:质保外',
  2352. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键指向torganization.id)',
  2353. `amount` int(11) NULL DEFAULT NULL COMMENT '数量'
  2354. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '销售服务中心项目质保状态数量表' ROW_FORMAT = Dynamic;
  2355. -- ----------------------------
  2356. -- Table structure for tsumm_workload
  2357. -- ----------------------------
  2358. DROP TABLE IF EXISTS `tsumm_workload`;
  2359. CREATE TABLE `tsumm_workload` (
  2360. `ID` int(11) NOT NULL COMMENT '主键',
  2361. `countdate` datetime NULL DEFAULT NULL COMMENT '统计日期',
  2362. `worktypeid` tinyint(4) NULL DEFAULT NULL COMMENT '工作类型(0:市场销售 1:货品收发 2:出厂服务 3:日常工作 4:项目服务)',
  2363. `rate` decimal(6, 4) NULL DEFAULT NULL COMMENT '所占比例'
  2364. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '月度工作量比例表' ROW_FORMAT = Dynamic;
  2365. -- ----------------------------
  2366. -- Table structure for tsumm_workload_detail
  2367. -- ----------------------------
  2368. DROP TABLE IF EXISTS `tsumm_workload_detail`;
  2369. CREATE TABLE `tsumm_workload_detail` (
  2370. `ID` int(11) NOT NULL COMMENT '主键',
  2371. `countdate` datetime NULL DEFAULT NULL COMMENT '统计日期',
  2372. `worktypeid` tinyint(4) NULL DEFAULT NULL COMMENT '工作类型(0:市场销售 1:货品收发 2:出厂服务 3:日常工作 4:项目服务)',
  2373. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键指向torganization.id)',
  2374. `amount` int(11) NULL DEFAULT NULL COMMENT '数量'
  2375. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '销售服务中心项目月度工作量数量表' ROW_FORMAT = Dynamic;
  2376. -- ----------------------------
  2377. -- Table structure for tsupervise
  2378. -- ----------------------------
  2379. DROP TABLE IF EXISTS `tsupervise`;
  2380. CREATE TABLE `tsupervise` (
  2381. `ID` int(11) NOT NULL,
  2382. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键,指向tproject.ID)',
  2383. `serviceflow` float NULL DEFAULT NULL COMMENT '售后服务流程规范得分',
  2384. `servicetech` float NULL DEFAULT NULL COMMENT '售后服务技术规范得分',
  2385. `totalrun` float NULL DEFAULT NULL COMMENT '服务标准执行情况',
  2386. `archives` float NULL DEFAULT NULL COMMENT '服务项目档案审核得分',
  2387. `totalarchives` float NULL DEFAULT NULL COMMENT '项目服务档案建设',
  2388. `complaint` float NULL DEFAULT NULL COMMENT '服务投诉得分',
  2389. `totalcomplaint` float NULL DEFAULT NULL COMMENT '服务投诉',
  2390. `replacerate` float NULL DEFAULT NULL COMMENT '服务项目累计更换率统计表得分',
  2391. `damagerate` float NULL DEFAULT NULL COMMENT '服务项目元件损坏情况统计表得分',
  2392. `allotrate` float NULL DEFAULT NULL COMMENT '服务项目物料调拨情况统计表得分',
  2393. `pickrate` float NULL DEFAULT NULL COMMENT '得分服务项目费用领料情况统计表',
  2394. `totalrate` float NULL DEFAULT NULL COMMENT '质保期内备件消耗率统计得分',
  2395. `okrate` float NULL DEFAULT NULL COMMENT '井下设备完好率统计表得分',
  2396. `okcheck` float NULL DEFAULT NULL COMMENT '质保期内设备完好率审核表得分',
  2397. `totalok` float NULL DEFAULT NULL COMMENT '质保期内设备完好率',
  2398. `dailywork` float NULL DEFAULT NULL COMMENT '日常工作反馈情况得分',
  2399. `totalwork` float NULL DEFAULT NULL COMMENT '日常服务工作',
  2400. `date` datetime NULL DEFAULT NULL COMMENT '检查时间',
  2401. `address` varchar(53) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '检查地点',
  2402. `employee` float NULL DEFAULT NULL COMMENT '检查人员',
  2403. `totalscore` float NULL DEFAULT NULL COMMENT '检查总分',
  2404. `checkadvice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '检查意见',
  2405. `rectifyadvice` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '整改结果意见',
  2406. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间(isdel)',
  2407. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  2408. `createtime` datetime NULL DEFAULT NULL,
  2409. `isdel` int(11) NULL DEFAULT NULL,
  2410. `changestate` int(11) NULL DEFAULT NULL COMMENT '整改状态',
  2411. PRIMARY KEY (`ID`) USING BTREE
  2412. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '服务监管' ROW_FORMAT = Dynamic;
  2413. -- ----------------------------
  2414. -- Table structure for tsupervise_attach
  2415. -- ----------------------------
  2416. DROP TABLE IF EXISTS `tsupervise_attach`;
  2417. CREATE TABLE `tsupervise_attach` (
  2418. `ID` int(11) NOT NULL COMMENT '主键',
  2419. `supervise` int(11) NULL DEFAULT NULL COMMENT '服务监管ID(外键,指向tsupervise.ID)',
  2420. `filename` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  2421. `filerealname` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件名称',
  2422. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识(0:未删除,1:已删除)',
  2423. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  2424. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  2425. PRIMARY KEY (`ID`) USING BTREE
  2426. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目服务监管附件' ROW_FORMAT = Dynamic;
  2427. -- ----------------------------
  2428. -- Table structure for tsupervision
  2429. -- ----------------------------
  2430. DROP TABLE IF EXISTS `tsupervision`;
  2431. CREATE TABLE `tsupervision` (
  2432. `ID` int(11) NOT NULL COMMENT '主键',
  2433. `salecenterid` int(11) NULL DEFAULT NULL COMMENT '销售服务中心(外键指向torganization.id)',
  2434. `examdate` datetime NULL DEFAULT NULL COMMENT '检查日期',
  2435. `examscore` decimal(6, 2) NULL DEFAULT NULL COMMENT '检查总评分',
  2436. `cc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '邮件抄送人',
  2437. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键指向temployee.id)',
  2438. `createtime` datetime NULL DEFAULT NULL COMMENT '填报时间',
  2439. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识(0:未删除,1:已删除)'
  2440. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '服务监管考核主表' ROW_FORMAT = Dynamic;
  2441. -- ----------------------------
  2442. -- Table structure for tsupervision_index
  2443. -- ----------------------------
  2444. DROP TABLE IF EXISTS `tsupervision_index`;
  2445. CREATE TABLE `tsupervision_index` (
  2446. `ID` int(11) NOT NULL,
  2447. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '指标名称',
  2448. `weight` decimal(5, 2) NULL DEFAULT NULL COMMENT '权重',
  2449. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标志0:未删,1已删',
  2450. PRIMARY KEY (`ID`) USING BTREE
  2451. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2452. -- ----------------------------
  2453. -- Table structure for tsupervision_score
  2454. -- ----------------------------
  2455. DROP TABLE IF EXISTS `tsupervision_score`;
  2456. CREATE TABLE `tsupervision_score` (
  2457. `ID` int(11) NOT NULL COMMENT '主键',
  2458. `supervisionid` int(11) NULL DEFAULT NULL COMMENT '服务监管考核表(外键指向tsupervision.id)',
  2459. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键指向tproject.id)',
  2460. `supervisionindex_id` int(11) NULL DEFAULT NULL COMMENT '指标项id(外键指向tsupervision_index.id)',
  2461. `supervisionindex_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '指向标名称',
  2462. `supervisionindex_weight` decimal(6, 2) NULL DEFAULT NULL COMMENT '指向标权重',
  2463. `score` decimal(6, 2) NULL DEFAULT NULL COMMENT '得分',
  2464. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识(0:未删除 1:已删除)',
  2465. `supervisescore` decimal(6, 2) NULL DEFAULT NULL COMMENT '评分项得分'
  2466. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '服务监管考核评分明细表' ROW_FORMAT = Dynamic;
  2467. -- ----------------------------
  2468. -- Table structure for tsupplier
  2469. -- ----------------------------
  2470. DROP TABLE IF EXISTS `tsupplier`;
  2471. CREATE TABLE `tsupplier` (
  2472. `ID` int(11) NOT NULL,
  2473. `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '厂家名称',
  2474. `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  2475. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2476. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  2477. `num` int(11) NULL DEFAULT NULL COMMENT '累计使用次数',
  2478. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识',
  2479. `customer` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人',
  2480. `customertel` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
  2481. `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址',
  2482. `suppliertype` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
  2483. `suppliertypename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型名称',
  2484. `createtman` int(11) NULL DEFAULT NULL,
  2485. PRIMARY KEY (`ID`) USING BTREE
  2486. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '供货厂家表' ROW_FORMAT = Dynamic;
  2487. -- ----------------------------
  2488. -- Table structure for tsupplier_type
  2489. -- ----------------------------
  2490. DROP TABLE IF EXISTS `tsupplier_type`;
  2491. CREATE TABLE `tsupplier_type` (
  2492. `ID` int(11) NOT NULL,
  2493. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名字',
  2494. `isdel` int(11) NULL DEFAULT NULL
  2495. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2496. -- ----------------------------
  2497. -- Table structure for tsupplylist
  2498. -- ----------------------------
  2499. DROP TABLE IF EXISTS `tsupplylist`;
  2500. CREATE TABLE `tsupplylist` (
  2501. `ID` int(11) NOT NULL,
  2502. `createtime` datetime NULL DEFAULT NULL,
  2503. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2504. `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '供货清单号 / 供货单编号',
  2505. `projectid` int(11) NULL DEFAULT NULL COMMENT '关联ERP项目ID,指向terpproject.ID(为空,未导入,后期不用可删除该冗余字段)',
  2506. `erpprojectid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目定义ID,指向terpproject. erpid',
  2507. `importdate` datetime NULL DEFAULT NULL COMMENT '导入日期',
  2508. `totalnum` double NULL DEFAULT NULL COMMENT '总数量(为空,未导入,后期不用可删除该冗余字段)',
  2509. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)(为空,未导入,后期不用可删除该冗余字段)',
  2510. `erpprojectname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目定义(若项目定义为名称,项目定义为该字段)',
  2511. `wbsid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目WBSID',
  2512. `wbsno` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目WBS定义',
  2513. `erpprojectcode` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'erp项目编码 / 项目定义(若项目定义为编号,项目定义为该字段)',
  2514. `projecttypeid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目类型(为空,未导入,后期不用可删除该冗余字段)',
  2515. PRIMARY KEY (`ID`) USING BTREE
  2516. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2517. -- ----------------------------
  2518. -- Table structure for tsupplylist_detail
  2519. -- ----------------------------
  2520. DROP TABLE IF EXISTS `tsupplylist_detail`;
  2521. CREATE TABLE `tsupplylist_detail` (
  2522. `ID` int(11) NOT NULL,
  2523. `supplylistid` int(11) NULL DEFAULT NULL COMMENT '供货清单ID(外键,指向tsupplylist.ID)(为空,未导入,后期不用可删除该冗余字段)',
  2524. `createtime` datetime NULL DEFAULT NULL,
  2525. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2526. `productid` int(11) NULL DEFAULT NULL COMMENT '产品ID,指向tproduct.ID(为空,未导入,后期不用可删除该冗余字段)',
  2527. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '产品名称(为空,未导入,后期不用可删除该冗余字段)',
  2528. `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '产品编码 / 物料编码',
  2529. `productno` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '产品品号(为空,未导入,后期不用可删除该冗余字段)',
  2530. `model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '产品型号(为空,未导入,后期不用可删除该冗余字段)',
  2531. `unit` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位',
  2532. `num` decimal(18, 2) NULL DEFAULT NULL COMMENT '供货数量',
  2533. `erpproductid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ERP产品表ID,指向tproduct.erpid(为空,未导入,后期不用可删除该冗余字段)',
  2534. `supplylistcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '供货清单单号',
  2535. `rowno` int(11) NULL DEFAULT NULL COMMENT '供货单行项目号',
  2536. `productcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料编码',
  2537. `demanddate` datetime NULL DEFAULT NULL COMMENT '需求日期',
  2538. `importdate` datetime NULL DEFAULT NULL COMMENT '导入日期',
  2539. `isuse` int(11) NULL DEFAULT NULL COMMENT '是否用于一次安装',
  2540. `zzid` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2541. `zz1` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  2542. `zz2` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  2543. `zz3` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  2544. `wbsid` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2545. PRIMARY KEY (`ID`) USING BTREE
  2546. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2547. -- ----------------------------
  2548. -- Table structure for tsupplylist_detailnew
  2549. -- ----------------------------
  2550. DROP TABLE IF EXISTS `tsupplylist_detailnew`;
  2551. CREATE TABLE `tsupplylist_detailnew` (
  2552. `ID` int(11) NOT NULL,
  2553. `createtime` datetime NULL DEFAULT NULL,
  2554. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2555. `unit` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位',
  2556. `num` decimal(18, 3) NULL DEFAULT NULL COMMENT '供货数量',
  2557. `supplylistcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '供货清单单号',
  2558. `rowno` int(11) NULL DEFAULT NULL COMMENT '供货单行项目号',
  2559. `productcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料编码',
  2560. `isuse` int(11) NULL DEFAULT NULL COMMENT '是否用于一次安装(0:否,1:是)',
  2561. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '长描述',
  2562. `model` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '短描述',
  2563. `supplylistid` int(11) NULL DEFAULT NULL COMMENT '物料清单id,外键指向tsupplylistnew.id(或tsupplylist.id相同)',
  2564. `installnum` int(11) NULL DEFAULT NULL COMMENT '实际安装数量',
  2565. `producttypeid` int(11) NULL DEFAULT NULL COMMENT '物料类型,外键指向tproduct_type.id',
  2566. `partid` int(11) NULL DEFAULT NULL COMMENT '元件名称ID',
  2567. `demanddate` datetime NULL DEFAULT NULL COMMENT '需求日期',
  2568. `importdate` datetime NULL DEFAULT NULL COMMENT '导入日期',
  2569. `zzid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2570. `zz1` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  2571. `zz2` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  2572. `zz3` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  2573. `isimport` int(11) NULL DEFAULT NULL,
  2574. PRIMARY KEY (`ID`) USING BTREE
  2575. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '供货清单明细' ROW_FORMAT = Dynamic;
  2576. -- ----------------------------
  2577. -- Table structure for tsupplylistnew
  2578. -- ----------------------------
  2579. DROP TABLE IF EXISTS `tsupplylistnew`;
  2580. CREATE TABLE `tsupplylistnew` (
  2581. `ID` int(11) NOT NULL,
  2582. `createtime` datetime NULL DEFAULT NULL,
  2583. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2584. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '供货清单号 / 供货单编号',
  2585. `importdate` datetime NULL DEFAULT NULL COMMENT '导入日期',
  2586. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)(为空,未导入,后期不用可删除该冗余字段)',
  2587. `wbsid` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目WBSID',
  2588. `wbsno` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目WBS定义',
  2589. PRIMARY KEY (`ID`) USING BTREE
  2590. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '供货清单' ROW_FORMAT = Dynamic;
  2591. -- ----------------------------
  2592. -- Table structure for tsupport_type
  2593. -- ----------------------------
  2594. DROP TABLE IF EXISTS `tsupport_type`;
  2595. CREATE TABLE `tsupport_type` (
  2596. `ID` int(11) NOT NULL,
  2597. `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '支架类型名称',
  2598. `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  2599. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2600. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  2601. PRIMARY KEY (`ID`) USING BTREE
  2602. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '配套支架类型' ROW_FORMAT = Dynamic;
  2603. -- ----------------------------
  2604. -- Table structure for tsupportcheck
  2605. -- ----------------------------
  2606. DROP TABLE IF EXISTS `tsupportcheck`;
  2607. CREATE TABLE `tsupportcheck` (
  2608. `ID` int(11) NOT NULL,
  2609. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键,指向tproject.ID)',
  2610. `startdate` datetime NULL DEFAULT NULL COMMENT '验收时间——开始',
  2611. `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  2612. `createmanid` int(11) NULL DEFAULT NULL COMMENT '创建人(外键,指向temployee.ID)',
  2613. `createtime` datetime NULL DEFAULT NULL,
  2614. `isdel` int(11) NULL DEFAULT NULL,
  2615. `enddate` datetime NULL DEFAULT NULL COMMENT '验收日期-结束',
  2616. `address` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验收地点',
  2617. `employeeid` int(11) NULL DEFAULT NULL COMMENT '验收人员',
  2618. `totalnum` decimal(12, 2) NULL DEFAULT NULL COMMENT '总支架数',
  2619. `type` int(11) NULL DEFAULT NULL COMMENT '报告类型:1:支架出厂验收报告 2:行程传感器出厂验收报告 3:其他出厂验收报告',
  2620. `passnum` int(11) NULL DEFAULT NULL COMMENT '合格数量',
  2621. `failnum` int(11) NULL DEFAULT NULL COMMENT '不合格数量',
  2622. `checkproject` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验收项目',
  2623. PRIMARY KEY (`ID`) USING BTREE
  2624. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '支架出厂验收记录' ROW_FORMAT = Dynamic;
  2625. -- ----------------------------
  2626. -- Table structure for tsupportcheck_attach
  2627. -- ----------------------------
  2628. DROP TABLE IF EXISTS `tsupportcheck_attach`;
  2629. CREATE TABLE `tsupportcheck_attach` (
  2630. `ID` int(11) NOT NULL COMMENT '主键',
  2631. `supportcheckid` int(11) NULL DEFAULT NULL COMMENT '支架出厂验收记录单ID(外键,指向tsupportcheck.ID)',
  2632. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  2633. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  2634. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2635. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  2636. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  2637. PRIMARY KEY (`ID`) USING BTREE
  2638. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '支架出厂验收记录附件' ROW_FORMAT = Dynamic;
  2639. -- ----------------------------
  2640. -- Table structure for tsupportcheck_detail
  2641. -- ----------------------------
  2642. DROP TABLE IF EXISTS `tsupportcheck_detail`;
  2643. CREATE TABLE `tsupportcheck_detail` (
  2644. `ID` int(11) NOT NULL,
  2645. `supportcheckid` int(11) NULL DEFAULT NULL COMMENT '支架出厂验收记录单ID(外键,指向tsupportcheck.ID) ',
  2646. `createtime` datetime NULL DEFAULT NULL,
  2647. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2648. `projectsupportid` int(11) NULL DEFAULT NULL COMMENT '项目支架ID(外键,指向tproject_support.ID)',
  2649. `type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '支架类型',
  2650. `model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '型号',
  2651. `num` decimal(12, 2) NULL DEFAULT NULL COMMENT '数量',
  2652. PRIMARY KEY (`ID`) USING BTREE
  2653. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '支架出厂验收记录-明细' ROW_FORMAT = Dynamic;
  2654. -- ----------------------------
  2655. -- Table structure for tsys_permission_resource
  2656. -- ----------------------------
  2657. DROP TABLE IF EXISTS `tsys_permission_resource`;
  2658. CREATE TABLE `tsys_permission_resource` (
  2659. `ID` int(11) NOT NULL,
  2660. `permission_id` int(11) NOT NULL COMMENT '权限id',
  2661. `resource_id` int(11) NOT NULL COMMENT '资源id',
  2662. `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '许可名称',
  2663. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '权限码,不能重复',
  2664. `isdel` int(11) NULL DEFAULT NULL,
  2665. PRIMARY KEY (`ID`) USING BTREE,
  2666. INDEX `FK__tsys_perm__permi__2AE0483B`(`permission_id`) USING BTREE,
  2667. CONSTRAINT `FK__tsys_perm__permi__2AE0483B` FOREIGN KEY (`permission_id`) REFERENCES `tsyspermission` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
  2668. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单可具有按钮权限表' ROW_FORMAT = Dynamic;
  2669. -- ----------------------------
  2670. -- Table structure for tsys_role_perm_res
  2671. -- ----------------------------
  2672. DROP TABLE IF EXISTS `tsys_role_perm_res`;
  2673. CREATE TABLE `tsys_role_perm_res` (
  2674. `ID` int(11) NOT NULL,
  2675. `role_id` int(11) NOT NULL COMMENT '角色',
  2676. `permission_res_id` int(11) NOT NULL COMMENT '权限与资源的关联id',
  2677. `isdel` int(11) NULL DEFAULT NULL,
  2678. PRIMARY KEY (`ID`) USING BTREE
  2679. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色可具有菜单按钮权限表' ROW_FORMAT = Dynamic;
  2680. -- ----------------------------
  2681. -- Table structure for tsysmodule
  2682. -- ----------------------------
  2683. DROP TABLE IF EXISTS `tsysmodule`;
  2684. CREATE TABLE `tsysmodule` (
  2685. `SysModuleId` int(11) NOT NULL,
  2686. `SysFlowIndexId` int(11) NULL DEFAULT NULL,
  2687. `SysModuleParent` int(11) NULL DEFAULT NULL,
  2688. `SysModuleName` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2689. `SysModulePage` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2690. `Sort` int(11) NULL DEFAULT NULL,
  2691. `isindex` int(11) NULL DEFAULT NULL COMMENT '0',
  2692. `isdel` int(11) NULL DEFAULT NULL,
  2693. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  2694. `templettype` int(11) NULL DEFAULT NULL,
  2695. PRIMARY KEY (`SysModuleId`) USING BTREE
  2696. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统菜单表' ROW_FORMAT = Dynamic;
  2697. -- ----------------------------
  2698. -- Table structure for tsyspermission
  2699. -- ----------------------------
  2700. DROP TABLE IF EXISTS `tsyspermission`;
  2701. CREATE TABLE `tsyspermission` (
  2702. `ID` int(11) NOT NULL,
  2703. `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  2704. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限编码',
  2705. PRIMARY KEY (`ID`) USING BTREE
  2706. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '按钮权限类型表' ROW_FORMAT = Dynamic;
  2707. -- ----------------------------
  2708. -- Table structure for tsysrole
  2709. -- ----------------------------
  2710. DROP TABLE IF EXISTS `tsysrole`;
  2711. CREATE TABLE `tsysrole` (
  2712. `ID` int(11) NOT NULL COMMENT '主键',
  2713. `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编码',
  2714. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  2715. `isdisable` int(11) NULL DEFAULT NULL COMMENT '停用标识',
  2716. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2717. `importdate` datetime NULL DEFAULT NULL COMMENT '导入日期',
  2718. `createtime` datetime NULL DEFAULT NULL,
  2719. `oaid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'OA角色ID',
  2720. PRIMARY KEY (`ID`) USING BTREE
  2721. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统角色' ROW_FORMAT = Dynamic;
  2722. -- ----------------------------
  2723. -- Table structure for tsysuser_role
  2724. -- ----------------------------
  2725. DROP TABLE IF EXISTS `tsysuser_role`;
  2726. CREATE TABLE `tsysuser_role` (
  2727. `ID` int(11) NOT NULL,
  2728. `user_id` int(11) NOT NULL,
  2729. `role_id` int(11) NOT NULL,
  2730. `oauserid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'erp用户ID',
  2731. `oaroleid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'erp角色ID',
  2732. `importdate` datetime NULL DEFAULT NULL COMMENT '导入日期',
  2733. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  2734. `isdel` int(11) NULL DEFAULT NULL,
  2735. PRIMARY KEY (`ID`) USING BTREE,
  2736. INDEX `FK__tsysuser___role___2CC890AD`(`role_id`) USING BTREE,
  2737. INDEX `FK__tsysuser___user___2DBCB4E6`(`user_id`) USING BTREE,
  2738. CONSTRAINT `FK__tsysuser___role___2CC890AD` FOREIGN KEY (`role_id`) REFERENCES `tsysrole` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  2739. CONSTRAINT `FK__tsysuser___user___2DBCB4E6` FOREIGN KEY (`user_id`) REFERENCES `temployee` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
  2740. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2741. -- ----------------------------
  2742. -- Table structure for ttechfile
  2743. -- ----------------------------
  2744. DROP TABLE IF EXISTS `ttechfile`;
  2745. CREATE TABLE `ttechfile` (
  2746. `ID` int(11) NOT NULL COMMENT '主键',
  2747. `projectid` int(11) NULL DEFAULT NULL COMMENT '项目简称(外键指向tproject.ID)',
  2748. `title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件标题',
  2749. `techfiletypeid` int(11) NULL DEFAULT NULL COMMENT '文件类型(外键,指向ttechfile_type.id)',
  2750. `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '文件备注',
  2751. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  2752. `createtime` datetime NULL DEFAULT NULL COMMENT '填报时间',
  2753. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识',
  2754. `isnew` tinyint(4) NULL DEFAULT NULL COMMENT '是否已查看(0:未查看;1:已查看)',
  2755. `isfile` tinyint(4) NULL DEFAULT NULL COMMENT '归档状态(0:未提交;1:已提交;2:已归档;3:已驳回)'
  2756. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目技术文件主表' ROW_FORMAT = Dynamic;
  2757. -- ----------------------------
  2758. -- Table structure for ttechfile_attach
  2759. -- ----------------------------
  2760. DROP TABLE IF EXISTS `ttechfile_attach`;
  2761. CREATE TABLE `ttechfile_attach` (
  2762. `ID` int(11) NOT NULL COMMENT '主键',
  2763. `techfileid` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '项目技术文件(外键,指向ttechfile.ID)',
  2764. `filename` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '上传路径',
  2765. `filerealname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  2766. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识',
  2767. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  2768. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期'
  2769. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目技术文件–附件表' ROW_FORMAT = Dynamic;
  2770. -- ----------------------------
  2771. -- Table structure for ttechfile_type
  2772. -- ----------------------------
  2773. DROP TABLE IF EXISTS `ttechfile_type`;
  2774. CREATE TABLE `ttechfile_type` (
  2775. `ID` int(11) NOT NULL,
  2776. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2777. `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2778. `isdel` tinyint(4) NULL DEFAULT NULL,
  2779. PRIMARY KEY (`ID`) USING BTREE
  2780. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2781. -- ----------------------------
  2782. -- Table structure for ttechinfor
  2783. -- ----------------------------
  2784. DROP TABLE IF EXISTS `ttechinfor`;
  2785. CREATE TABLE `ttechinfor` (
  2786. `ID` int(11) NOT NULL,
  2787. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  2788. `isdel` int(11) NULL DEFAULT NULL,
  2789. PRIMARY KEY (`ID`) USING BTREE
  2790. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目技术信息选择模块' ROW_FORMAT = Dynamic;
  2791. -- ----------------------------
  2792. -- Table structure for ttechsource
  2793. -- ----------------------------
  2794. DROP TABLE IF EXISTS `ttechsource`;
  2795. CREATE TABLE `ttechsource` (
  2796. `ID` int(11) NOT NULL,
  2797. `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
  2798. `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
  2799. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容(解析前)',
  2800. `date` datetime NULL DEFAULT NULL COMMENT '时间',
  2801. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识 (0:未删除,1:已删除)',
  2802. `createmanid` int(11) NULL DEFAULT NULL COMMENT '填报人(外键,指向temployee.ID)',
  2803. `createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  2804. `reportdate` datetime NULL DEFAULT NULL COMMENT '上报时间',
  2805. `new` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容(解析后)',
  2806. PRIMARY KEY (`ID`) USING BTREE
  2807. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '技术资料' ROW_FORMAT = Dynamic;
  2808. -- ----------------------------
  2809. -- Table structure for ttechsource_attach
  2810. -- ----------------------------
  2811. DROP TABLE IF EXISTS `ttechsource_attach`;
  2812. CREATE TABLE `ttechsource_attach` (
  2813. `ID` int(11) NOT NULL COMMENT '主键',
  2814. `techsourceid` int(11) NULL DEFAULT NULL COMMENT '技术资料ID(外键,指向ttechsource.ID)',
  2815. `filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传路径',
  2816. `filerealname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  2817. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2818. `uploader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上传人',
  2819. `uploaddate` datetime NULL DEFAULT NULL COMMENT '上传日期',
  2820. PRIMARY KEY (`ID`) USING BTREE
  2821. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2822. -- ----------------------------
  2823. -- Table structure for twarn
  2824. -- ----------------------------
  2825. DROP TABLE IF EXISTS `twarn`;
  2826. CREATE TABLE `twarn` (
  2827. `ID` int(11) NOT NULL COMMENT '主键',
  2828. `warndocsid` int(11) NULL DEFAULT NULL COMMENT '提交文档类型,指向 twarndocs.ID',
  2829. `warndaysid` int(11) NULL DEFAULT NULL COMMENT '提交时间,指向 twarndays.id',
  2830. `createtime` datetime NULL DEFAULT NULL,
  2831. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2832. `intervaldays` int(11) NULL DEFAULT NULL COMMENT '提前提醒天数',
  2833. `isallwarn` int(11) NULL DEFAULT NULL COMMENT '提醒类型(1: 全部提醒,2:非大修类型提醒)',
  2834. PRIMARY KEY (`ID`) USING BTREE
  2835. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文件提交提醒设置' ROW_FORMAT = Dynamic;
  2836. -- ----------------------------
  2837. -- Table structure for twarndays
  2838. -- ----------------------------
  2839. DROP TABLE IF EXISTS `twarndays`;
  2840. CREATE TABLE `twarndays` (
  2841. `ID` int(11) NOT NULL,
  2842. `name` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '提醒时间',
  2843. `days` int(11) NULL DEFAULT NULL COMMENT '对应天数',
  2844. `isdel` int(11) NULL DEFAULT NULL,
  2845. `warrantyid` int(11) NULL DEFAULT NULL COMMENT '质保期类型(1:半年,2:一年,3:一年半,4:两年)',
  2846. `type` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '提醒间隔类型(d:天,m:月,y:年)',
  2847. `typenum` int(11) NULL DEFAULT NULL COMMENT '提醒间隔数量',
  2848. PRIMARY KEY (`ID`) USING BTREE
  2849. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文档提醒时间类型' ROW_FORMAT = Dynamic;
  2850. -- ----------------------------
  2851. -- Table structure for twarndocs
  2852. -- ----------------------------
  2853. DROP TABLE IF EXISTS `twarndocs`;
  2854. CREATE TABLE `twarndocs` (
  2855. `ID` int(11) NOT NULL COMMENT '主键',
  2856. `docname` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '提交文档名称',
  2857. `table_name` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '对应表名',
  2858. `url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '表单链接',
  2859. `projectfield` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '对应table中的“项目”的字段名称',
  2860. `employeefield` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '对应table表中的“上报人”的字段名称,该字段的值指向temployee.id',
  2861. `doctype` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '对应table表中的“上报类型”的字段名称,该字段的值指向 twarndays.id',
  2862. `isdel` int(11) NULL DEFAULT NULL COMMENT '删除标识',
  2863. `sysmoduleid` int(11) NULL DEFAULT NULL COMMENT '页面菜单id',
  2864. PRIMARY KEY (`ID`) USING BTREE
  2865. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '提醒文档类型' ROW_FORMAT = Dynamic;
  2866. -- ----------------------------
  2867. -- Table structure for twarranty
  2868. -- ----------------------------
  2869. DROP TABLE IF EXISTS `twarranty`;
  2870. CREATE TABLE `twarranty` (
  2871. `ID` int(11) NOT NULL,
  2872. `num` int(11) NULL DEFAULT NULL COMMENT '数量',
  2873. `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  2874. `isdel` int(11) NULL DEFAULT NULL,
  2875. `isdisable` int(11) NULL DEFAULT NULL,
  2876. `createtime` datetime NULL DEFAULT NULL COMMENT '创建日期',
  2877. `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  2878. PRIMARY KEY (`ID`) USING BTREE
  2879. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '质保期' ROW_FORMAT = Dynamic;
  2880. -- ----------------------------
  2881. -- Table structure for tyear
  2882. -- ----------------------------
  2883. DROP TABLE IF EXISTS `tyear`;
  2884. CREATE TABLE `tyear` (
  2885. `id` int(11) NOT NULL COMMENT '主键',
  2886. `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  2887. `isdel` tinyint(4) NULL DEFAULT NULL COMMENT '删除标识',
  2888. PRIMARY KEY (`id`) USING BTREE
  2889. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  2890. SET FOREIGN_KEY_CHECKS = 1;