shengji.sql 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. CREATE TABLE `downloadedplan_delrecord` (
  2. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  3. `pastureid` bigint(20) NOT NULL,
  4. `mydate` datetime NOT NULL COMMENT '计划日期',
  5. `projname` varchar(12) DEFAULT NULL COMMENT '计划编号',
  6. `datacaptureno` int(11) DEFAULT NULL COMMENT '设备编号',
  7. `tmrid` bigint(20) DEFAULT NULL COMMENT 'tmr主键',
  8. `tmrtname` varchar(20) DEFAULT NULL COMMENT 'tmr名称',
  9. `havebutton` tinyint(1) DEFAULT 0 COMMENT '是否开始执行',
  10. `inbuttontype` int(11) DEFAULT 0 COMMENT '按钮类型',
  11. `plantime` varchar(50) DEFAULT NULL COMMENT '计划时分',
  12. `intime` datetime DEFAULT NULL COMMENT '开始执行时间',
  13. `completedtime` datetime DEFAULT NULL COMMENT '结束执行时间',
  14. `processtime` time DEFAULT NULL COMMENT '过程时间',
  15. `iscompleted` tinyint(4) DEFAULT 0 COMMENT '是否已完成',
  16. `lpplantype` int(11) DEFAULT 0 COMMENT '计算模式: 0、混合,1、上料,2、发料,3、剩料,4、预混',
  17. `times` int(11) DEFAULT 0 COMMENT '班次',
  18. `sort` int(11) DEFAULT 0 COMMENT '顺序',
  19. `remark` varchar(50) DEFAULT NULL COMMENT '备注',
  20. `itemnum` int(11) DEFAULT NULL COMMENT '添加饲料种类数',
  21. `outitems` int(11) DEFAULT NULL COMMENT '发料牛舍数',
  22. `feedpname` varchar(200) DEFAULT NULL COMMENT '牛舍列表',
  23. `feedpcount` int(11) DEFAULT 0 COMMENT '牛头数',
  24. `pid` bigint(20) DEFAULT NULL COMMENT '发料计划编号',
  25. `tempid` bigint(20) DEFAULT NULL COMMENT '配方id',
  26. `templetname` varchar(50) DEFAULT NULL COMMENT '配方模版名称',
  27. `ptstempid` bigint(20) DEFAULT NULL COMMENT '补料配方id',
  28. `ptstempletname` varchar(50) DEFAULT NULL COMMENT '补料配方模版名称',
  29. `thoweight` char(20) DEFAULT NULL COMMENT '配方理论干物质',
  30. `fpweight` char(20) DEFAULT NULL COMMENT '配方总重',
  31. `lweight` decimal(38,2) DEFAULT NULL COMMENT '应做料总量',
  32. `iweight` int(11) DEFAULT NULL COMMENT '实际做料总量',
  33. `oweight` int(11) DEFAULT NULL COMMENT '实发料重量',
  34. `tversion` int(11) DEFAULT 0 COMMENT '配方版本',
  35. `ptversion` int(11) DEFAULT 0 COMMENT '补料配方版本',
  36. `enable` tinyint(4) DEFAULT 1 COMMENT '是否启用',
  37. `isUse` int(11) DEFAULT 0 COMMENT '是否使用(1 为已使用)格润富德接口使用',
  38. `deletetime` datetime DEFAULT NULL,
  39. PRIMARY KEY (`id`) USING BTREE,
  40. KEY `newindex1` (`mydate`) USING BTREE,
  41. KEY `newindex2` (`lpplantype`) USING BTREE,
  42. KEY `newindex3` (`havebutton`) USING BTREE,
  43. KEY `pid` (`pid`) USING BTREE,
  44. KEY `downloadedplan_uni` (`pastureid`,`mydate`,`pid`,`lpplantype`,`tmrid`) USING BTREE
  45. ) ENGINE=InnoDB AUTO_INCREMENT=1211346 DEFAULT CHARSET=utf8mb3 COMMENT='计划';
  46. CREATE TABLE `downloadplandtl1_delrecord` (
  47. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  48. `pastureid` bigint(20) NOT NULL,
  49. `pid` bigint(20) NOT NULL COMMENT '计划id',
  50. `flpid` bigint(20) DEFAULT NULL COMMENT '发料计划的主id',
  51. `fid` bigint(20) NOT NULL COMMENT '饲料id',
  52. `lweight` decimal(10,2) NOT NULL COMMENT '理论重量',
  53. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '顺序',
  54. `lastactualweight` decimal(10,2) DEFAULT NULL COMMENT '上次重量',
  55. `actualweight` decimal(10,2) DEFAULT NULL COMMENT '实际重量',
  56. `actualweightminus` decimal(10,2) DEFAULT NULL COMMENT '实际重量',
  57. `havebuttom` tinyint(1) DEFAULT 0 COMMENT '是否操作',
  58. `begintime` datetime DEFAULT NULL COMMENT '操作开始时间',
  59. `intime` datetime DEFAULT NULL COMMENT '操作结束时间',
  60. `buttontype` int(11) DEFAULT 0 COMMENT '操作类型',
  61. `optdevice` bigint(20) DEFAULT NULL COMMENT '操作车id',
  62. `feedcode` varchar(50) DEFAULT NULL COMMENT '饲料编码',
  63. `fname` varchar(20) DEFAULT NULL COMMENT '饲料名称',
  64. `feedsort` int(11) DEFAULT 0 COMMENT '饲料顺序',
  65. `feedallowratio` float DEFAULT 0 COMMENT '饲料允许误差率',
  66. `stirdelay` int(11) DEFAULT 0 COMMENT '搅拌延时(分钟)',
  67. `fweight` decimal(10,3) DEFAULT NULL COMMENT '配方明细量',
  68. `tmrloadname` varchar(20) DEFAULT NULL COMMENT '相同饲料顺序在tmr车上的显示名称',
  69. `dryfeed` decimal(38,2) DEFAULT NULL COMMENT '饲料干物质',
  70. `pricefeed` decimal(38,2) DEFAULT NULL COMMENT '饲料单价',
  71. `outweight` int(11) DEFAULT NULL COMMENT '人工确认出库量',
  72. `errratio` decimal(38,2) DEFAULT NULL,
  73. `date` date NOT NULL,
  74. `buttonsucc` tinyint(4) DEFAULT NULL,
  75. `type` tinyint(4) DEFAULT 0 COMMENT '类型 1是tmr 0 是饲料',
  76. PRIMARY KEY (`id`,`pastureid`,`date`) USING BTREE,
  77. KEY `ai_id` (`id`) USING BTREE,
  78. KEY `newindex1` (`fid`) USING BTREE,
  79. KEY `fk_downloadplandtl1` (`pid`) USING BTREE,
  80. KEY `date` (`date`) USING BTREE,
  81. KEY `flpid` (`flpid`) USING BTREE,
  82. KEY `downloadplandtl1_uni` (`pastureid`,`flpid`,`fid`,`date`,`pid`) USING BTREE
  83. ) ENGINE=InnoDB AUTO_INCREMENT=13234709 DEFAULT CHARSET=utf8mb3 COMMENT='计划1';
  84. CREATE TABLE `downloadplandtl1_exec_delrecord` (
  85. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  86. `pastureid` bigint(20) NOT NULL,
  87. `pid` bigint(20) NOT NULL COMMENT '计划id',
  88. `flpid` bigint(20) DEFAULT NULL,
  89. `lastactualweight` decimal(10,2) DEFAULT NULL COMMENT '上次重量',
  90. `actualweight` decimal(10,2) DEFAULT NULL COMMENT '本次重量',
  91. `lweight` decimal(10,2) NOT NULL COMMENT '理论重量',
  92. `actualweightminus` decimal(10,2) DEFAULT NULL COMMENT '实际重量',
  93. `begintime` datetime DEFAULT NULL COMMENT '操作开始时间',
  94. `intime` datetime DEFAULT NULL COMMENT '操作结束时间',
  95. `havebuttom` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否已操作',
  96. `buttontype` int(11) DEFAULT 0 COMMENT '按钮类型',
  97. `optdevice` bigint(20) DEFAULT NULL COMMENT '操作车id',
  98. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '顺序',
  99. `fname` varchar(50) DEFAULT NULL COMMENT '饲料名称,多饲料,逗号分开',
  100. `fcount` int(11) DEFAULT NULL COMMENT '饲料数',
  101. `tmrloadname` varchar(20) DEFAULT NULL COMMENT '相同饲料顺序在tmr车上的显示名称',
  102. `feedallowratio` float DEFAULT 0 COMMENT '饲料允许误差公斤',
  103. `processtime` time DEFAULT NULL COMMENT '过程时间',
  104. `stirdelay` int(11) DEFAULT 0 COMMENT '搅拌延时(分钟)',
  105. `buttonsucc` tinyint(4) DEFAULT 0,
  106. `errratio` decimal(38,2) DEFAULT NULL,
  107. `date` date NOT NULL,
  108. `type` tinyint(4) DEFAULT 0 COMMENT '类型 1是tmr 0 是饲料',
  109. PRIMARY KEY (`id`,`pastureid`,`date`) USING BTREE,
  110. KEY `ai_id` (`id`) USING BTREE,
  111. KEY `fk_downloadplandtl1_exec` (`pid`) USING BTREE,
  112. KEY `p-pid` (`pastureid`,`pid`) USING BTREE,
  113. KEY `date` (`date`,`pastureid`) USING BTREE,
  114. KEY `intime` (`intime`,`pastureid`) USING BTREE,
  115. KEY `flpid` (`flpid`) USING BTREE,
  116. KEY `downloadplandtl1_exec_sort` (`pastureid`,`pid`,`sort`,`date`,`type`) USING BTREE
  117. ) ENGINE=InnoDB AUTO_INCREMENT=13234709 DEFAULT CHARSET=utf8mb3 COMMENT='计划1_exec';
  118. CREATE TABLE `downloadplandtl2_delrecord` (
  119. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  120. `pastureid` bigint(20) NOT NULL,
  121. `pid` bigint(20) NOT NULL COMMENT '计划id',
  122. `flpid` bigint(20) DEFAULT NULL COMMENT ',发料计划的主id',
  123. `fbarid` bigint(20) NOT NULL COMMENT '牛舍id',
  124. `fname` varchar(50) DEFAULT NULL COMMENT '牛舍名称',
  125. `lastactualweight` decimal(10,0) DEFAULT NULL COMMENT '上次重量',
  126. `actualweight` decimal(10,2) DEFAULT NULL COMMENT '本次重量',
  127. `lweight` decimal(10,2) DEFAULT NULL COMMENT '理论重量',
  128. `lweighthis` decimal(10,2) DEFAULT NULL COMMENT '历史理论重量(剩料)',
  129. `remainleftw` decimal(10,2) DEFAULT NULL COMMENT '剩料量',
  130. `allowrw` decimal(10,2) DEFAULT NULL COMMENT '允许分配剩料量',
  131. `actualweightminus` decimal(10,2) DEFAULT NULL COMMENT '实际重量',
  132. `sort` int(11) NOT NULL DEFAULT 0 COMMENT '顺序',
  133. `havebuttom` tinyint(1) DEFAULT 0 COMMENT '是否操作',
  134. `begintime` datetime DEFAULT NULL COMMENT '操作开始时间',
  135. `begintag` varchar(50) DEFAULT NULL COMMENT '开始标签',
  136. `intime` datetime DEFAULT NULL COMMENT '操作完成时间',
  137. `endtag` varchar(50) DEFAULT NULL COMMENT '结束标签',
  138. `buttontype` int(11) DEFAULT 0 COMMENT '操作按键类型',
  139. `optdevice` bigint(20) DEFAULT NULL COMMENT '操作车id',
  140. `cowcount` int(11) DEFAULT 0 COMMENT '牛头数',
  141. `cowclassid` bigint(20) DEFAULT NULL COMMENT '牛只类型id',
  142. `cowclassname` varchar(50) DEFAULT NULL COMMENT '类型名称',
  143. `bigcowname` varchar(50) DEFAULT NULL,
  144. `pweight` decimal(10,2) DEFAULT NULL COMMENT '通过加料计算出重量',
  145. `ccountratio` float DEFAULT 100 COMMENT '牛头系数',
  146. `sumrtime` float DEFAULT 0 COMMENT '该班次比例(%)',
  147. `feedtempletid` bigint(20) DEFAULT NULL COMMENT '配方模版id',
  148. `feedtempletname` varchar(20) DEFAULT NULL COMMENT '配方模版名称',
  149. `dryweight` decimal(10,2) DEFAULT NULL COMMENT '配方干物质',
  150. `sumweight` decimal(10,2) DEFAULT NULL COMMENT '配方饲料总重量',
  151. `priceweight` decimal(10,2) DEFAULT NULL COMMENT '配方单价',
  152. `processtime` time DEFAULT NULL COMMENT '过程时间',
  153. `fpid` bigint(20) DEFAULT NULL COMMENT '栏舍配方id',
  154. `useinbartype` bigint(20) DEFAULT NULL COMMENT '转投栏舍类型(0收集剩料,1撒剩料)',
  155. `date` date NOT NULL,
  156. `allowratio` int(11) DEFAULT NULL COMMENT '栏舍允许误差',
  157. `errratio` decimal(38,2) DEFAULT NULL,
  158. `buttonsucc` tinyint(4) DEFAULT NULL,
  159. `type` tinyint(4) DEFAULT 0 COMMENT '类型 1是铲车 0 是栏舍',
  160. PRIMARY KEY (`id`,`pastureid`,`date`) USING BTREE,
  161. KEY `ai_id` (`fbarid`) USING BTREE,
  162. KEY `newindex2` (`flpid`) USING BTREE,
  163. KEY `newindex1` (`pid`) USING BTREE,
  164. KEY `intime` (`intime`) USING BTREE,
  165. KEY `date` (`date`) USING BTREE,
  166. KEY `pastureid` (`pastureid`,`pid`) USING BTREE
  167. ) ENGINE=InnoDB AUTO_INCREMENT=3912367 DEFAULT CHARSET=utf8mb3 COMMENT='计划2';
  168. CREATE TABLE `downloadedplan_log` (
  169. `id` bigint(20) NOT NULL DEFAULT 0,
  170. `times` tinyint(2) DEFAULT NULL,
  171. `date` date DEFAULT NULL,
  172. `status` tinyint(1) DEFAULT 0 COMMENT '同步状态',
  173. `push_status` tinyint(1) DEFAULT NULL COMMENT '微信推送状态',
  174. `classes` tinyint(1) DEFAULT 0 COMMENT '班次状态',
  175. `dailyplan` tinyint(1) DEFAULT 0 COMMENT '当日计划',
  176. PRIMARY KEY (`id`) USING BTREE,
  177. KEY `date_2` (`date`) USING BTREE
  178. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  179. CREATE TABLE `downloadplandtl1_log` (
  180. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  181. `sort` int(11) DEFAULT NULL,
  182. `planid` bigint(20) DEFAULT NULL COMMENT 'downloadedplan id ',
  183. `pastureid` int(11) DEFAULT NULL,
  184. `date` date DEFAULT NULL,
  185. `plandtl1` bigint(20) DEFAULT NULL COMMENT 'downloadplandtl1 id ',
  186. `type` tinyint(1) DEFAULT NULL,
  187. `abnormalMixingDelay` tinyint(1) DEFAULT 0 COMMENT '混料搅拌延时异常',
  188. `InventoryWarning` tinyint(1) DEFAULT NULL COMMENT '库存预警',
  189. PRIMARY KEY (`id`) USING BTREE
  190. ) ENGINE=InnoDB AUTO_INCREMENT=7395 DEFAULT CHARSET=utf8mb4;
  191. CREATE TABLE `wx_config` (
  192. `id` int(11) NOT NULL AUTO_INCREMENT,
  193. `grantType` varchar(50) DEFAULT NULL,
  194. `appid` varchar(100) DEFAULT NULL,
  195. `secret` varchar(100) DEFAULT NULL,
  196. `system` varchar(30) DEFAULT NULL,
  197. PRIMARY KEY (`id`)
  198. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;
  199. CREATE TABLE `dungandbodyhistory` (
  200. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  201. `barname` varchar(50) DEFAULT NULL COMMENT '栏舍名称',
  202. `standardscore` varchar(50) DEFAULT NULL COMMENT '标准分数',
  203. `barid` bigint(20) DEFAULT NULL COMMENT '栏舍id',
  204. `cowsum` varchar(50) DEFAULT NULL COMMENT '牛头数',
  205. `onescore` varchar(50) DEFAULT NULL COMMENT '1',
  206. `twoscore` varchar(50) DEFAULT NULL COMMENT '2',
  207. `threescore` varchar(50) DEFAULT NULL COMMENT '3',
  208. `fourscore` varchar(50) DEFAULT NULL COMMENT '4',
  209. `fivescore` varchar(50) DEFAULT NULL COMMENT '5',
  210. `pastureid` bigint(20) DEFAULT NULL COMMENT '牧场id',
  211. `species` varchar(50) DEFAULT NULL COMMENT '种类',
  212. `changetime` datetime DEFAULT NULL COMMENT '操作时间',
  213. `sixscore` varchar(50) DEFAULT NULL COMMENT '6',
  214. `sevenscore` varchar(50) DEFAULT NULL COMMENT '7',
  215. PRIMARY KEY (`id`)
  216. ) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8mb3;
  217. CREATE TABLE `feedtemplethistory` (
  218. `id` bigint(20) NOT NULL COMMENT '配方模板id',
  219. `pastureid` bigint(20) NOT NULL,
  220. `tcode` varchar(50) DEFAULT NULL COMMENT '配方编码',
  221. `tname` varchar(50) NOT NULL COMMENT '配方名称',
  222. `tcolor` varchar(50) DEFAULT '#ccc' COMMENT '配方模板颜色',
  223. `ccid` bigint(20) DEFAULT NULL COMMENT '牲畜类别id',
  224. `ccname` varchar(50) DEFAULT NULL COMMENT '类别名称',
  225. `fttype` varchar(50) DEFAULT NULL COMMENT '配方类型',
  226. `fttypeid` tinyint(1) DEFAULT 0 COMMENT '配方类型id(1饲喂,2预混,3补料)',
  227. `source` varchar(50) DEFAULT NULL COMMENT '来源',
  228. `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  229. `enable` tinyint(1) DEFAULT 1 COMMENT '启用',
  230. `sort` int(11) DEFAULT 1 COMMENT '排序',
  231. `owner` varchar(50) DEFAULT NULL COMMENT '来源',
  232. `weight` decimal(38,3) DEFAULT NULL COMMENT '总重',
  233. `dryweight` decimal(38,3) DEFAULT NULL COMMENT '干物质含量',
  234. `isdelete` tinyint(1) DEFAULT 0 COMMENT '是否删除(0为未删除,1为伪删除)',
  235. `version` int(11) DEFAULT 1 COMMENT '修改一次增加版本号',
  236. `savetime` datetime DEFAULT current_timestamp() COMMENT '保存日期',
  237. `isissue` tinyint(4) DEFAULT 0 COMMENT '下发是否为当前配方(1是,0否)',
  238. `issueversion` int(11) DEFAULT 0 COMMENT '下发时的版本',
  239. `issueid` bigint(20) DEFAULT NULL COMMENT '下发时的id',
  240. `backup1` varchar(255) DEFAULT NULL COMMENT '备用1',
  241. `backup2` varchar(255) DEFAULT NULL COMMENT '备用2',
  242. `createdate` datetime DEFAULT NULL
  243. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
  244. CREATE TABLE `feedphistory` (
  245. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  246. `pastureid` bigint(20) NOT NULL,
  247. `barname` char(20) DEFAULT NULL,
  248. `barid` bigint(20) NOT NULL COMMENT '舍栏id',
  249. `softccount` int(11) DEFAULT NULL COMMENT '软件牛头数',
  250. `ccount` int(11) NOT NULL DEFAULT 0 COMMENT '实际头数',
  251. `ratio` decimal(38,2) DEFAULT NULL COMMENT '系数',
  252. `ccountratio` decimal(38,2) DEFAULT 100.00 COMMENT '系数牛头数',
  253. `ftid` bigint(20) DEFAULT NULL COMMENT '配方模版id(不是补料模版的id)',
  254. `ftname` varchar(50) DEFAULT NULL COMMENT '配方名称',
  255. `ptsfid` bigint(20) DEFAULT NULL COMMENT '配方模版id(补料模版的id)',
  256. `ptsfname` varchar(50) DEFAULT NULL COMMENT '补料名称',
  257. `feedweight` decimal(38,3) DEFAULT NULL COMMENT '投喂量',
  258. `ftweight` decimal(38,3) DEFAULT NULL COMMENT '配方重量',
  259. `supplyweight` decimal(38,3) DEFAULT 0.000 COMMENT '补料重量',
  260. `owner` varchar(20) DEFAULT NULL COMMENT '编制人',
  261. `createdate` datetime DEFAULT NULL,
  262. PRIMARY KEY (`id`)
  263. ) ENGINE=InnoDB AUTO_INCREMENT=3976043477267383674 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='栏舍';
  264. CREATE TABLE `fit_history` (
  265. `id` int(11) NOT NULL AUTO_INCREMENT,
  266. `name` varchar(50) DEFAULT NULL COMMENT '饲料名称',
  267. `weight` decimal(10,2) DEFAULT NULL COMMENT '修改前重量',
  268. `pastureId` bigint(20) DEFAULT NULL COMMENT '牧场id',
  269. `fitId` bigint(20) DEFAULT NULL COMMENT '配方id',
  270. `dateTime1` datetime DEFAULT NULL COMMENT '修改时间',
  271. `Eweight` decimal(10,2) DEFAULT NULL COMMENT '修改后重量',
  272. `change` varchar(20) DEFAULT NULL COMMENT '判断是否改变',
  273. `autosecond` int(11) DEFAULT NULL,
  274. `feedgroup` varchar(50) DEFAULT NULL,
  275. `preftid` bigint(20) DEFAULT 0,
  276. PRIMARY KEY (`id`) USING BTREE
  277. ) ENGINE=InnoDB AUTO_INCREMENT=7571 DEFAULT CHARSET=utf8mb3;
  278. CREATE TABLE `fpdetailhistory` (
  279. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '配方子表id',
  280. `pastureid` bigint(20) NOT NULL,
  281. `barid` bigint(20) NOT NULL COMMENT '栏舍id',
  282. `barname` varchar(50) DEFAULT NULL COMMENT '栏舍名称',
  283. `times` tinyint(4) DEFAULT NULL COMMENT '班次',
  284. `tratio` decimal(38,1) DEFAULT NULL COMMENT '班次比例',
  285. `weight` decimal(38,2) unsigned DEFAULT 0.00 COMMENT '重量',
  286. `ptsrate` decimal(38,6) unsigned zerofill DEFAULT 00000000000000000000000000000000.000000 COMMENT '补料比例',
  287. `cowcount` char(20) DEFAULT NULL COMMENT '牛头数',
  288. `ccountradio` char(20) DEFAULT NULL COMMENT '牛头系数',
  289. `ptid` bigint(20) DEFAULT -1 COMMENT '配方模板',
  290. `ptsid` bigint(20) DEFAULT -1 COMMENT '补料配方',
  291. `ptuse` decimal(38,2) unsigned NOT NULL DEFAULT 0.00 COMMENT '0 未分配 大于0分配',
  292. `ptsuse` decimal(38,2) unsigned NOT NULL DEFAULT 0.00 COMMENT '0 未分配 大于0分配',
  293. `supplement` decimal(38,2) DEFAULT 0.00,
  294. `createdate` datetime DEFAULT NULL,
  295. PRIMARY KEY (`id`,`pastureid`) USING BTREE
  296. ) ENGINE=InnoDB AUTO_INCREMENT=3976043477519043775 DEFAULT CHARSET=utf8mb3 COMMENT='栏舍配方子表历史记录';
  297. CREATE TABLE `ftdry_history` (
  298. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  299. `barname` varchar(50) DEFAULT NULL COMMENT '栏舍名称',
  300. `times` varchar(50) DEFAULT NULL COMMENT '班次',
  301. `freshweight` decimal(20,2) DEFAULT NULL COMMENT '新鲜重量',
  302. `dryweight` decimal(20,2) DEFAULT NULL COMMENT '烘干重量',
  303. `thoweight` decimal(20,0) DEFAULT NULL COMMENT '理论干物质',
  304. `actweight` decimal(20,0) DEFAULT NULL COMMENT '实际干物质',
  305. `barid` bigint(20) DEFAULT NULL COMMENT '栏舍id',
  306. `changeTime` datetime DEFAULT NULL COMMENT '操作时间',
  307. `pastureid` bigint(20) DEFAULT NULL COMMENT '牧场id',
  308. PRIMARY KEY (`id`) USING BTREE
  309. ) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8mb3;
  310. CREATE TABLE `lpplandtl1history` (
  311. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '发料计划详情',
  312. `pastureid` bigint(20) NOT NULL,
  313. `lppid` bigint(20) DEFAULT NULL COMMENT '计划id',
  314. `barid` bigint(20) DEFAULT NULL COMMENT '栏舍id',
  315. `barname` varchar(50) DEFAULT NULL COMMENT '栏舍名称',
  316. `fpdid` bigint(20) DEFAULT NULL COMMENT '栏舍配方子id',
  317. `fttype` tinyint(4) DEFAULT 1 COMMENT '配方类型(1饲喂,0补料)',
  318. `lweight` decimal(10,2) unsigned DEFAULT NULL COMMENT '重量',
  319. `sort` int(11) DEFAULT 0 COMMENT '顺序',
  320. `tmrid` bigint(20) DEFAULT NULL COMMENT '撒料车id',
  321. `tmrname` varchar(50) DEFAULT NULL COMMENT '撒料车名称',
  322. `background` varchar(50) DEFAULT NULL COMMENT '颜色',
  323. `cowcount` int(11) DEFAULT NULL COMMENT '牛头数',
  324. `ccountradio` decimal(38,2) DEFAULT NULL COMMENT '牛头系数',
  325. `lweighthis` decimal(10,2) DEFAULT NULL,
  326. `createdate` datetime DEFAULT NULL,
  327. PRIMARY KEY (`id`,`pastureid`) USING BTREE,
  328. KEY `fpdid` (`fpdid`) USING BTREE,
  329. KEY `lppid` (`lppid`) USING BTREE
  330. ) ENGINE=InnoDB AUTO_INCREMENT=3932719861083938115 DEFAULT CHARSET=utf8mb3;
  331. CREATE TABLE `notice` (
  332. `id` int(11) NOT NULL AUTO_INCREMENT,
  333. `content` varchar(200) DEFAULT NULL,
  334. `status` tinyint(1) DEFAULT 0,
  335. `pastureid` int(11) DEFAULT NULL,
  336. PRIMARY KEY (`id`) USING BTREE
  337. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;