-
Notifications
You must be signed in to change notification settings - Fork 41
/
blog_ssm.sql
312 lines (291 loc) · 157 KB
/
blog_ssm.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
/*
Navicat Premium Data Transfer
Source Server : blog_ssm
Source Server Type : MySQL
Source Server Version : 50561
Source Host : 119.23.60.193:3306
Source Schema : blog_ssm
Target Server Type : MySQL
Target Server Version : 50561
File Encoding : 65001
Date: 28/02/2021 23:28:17
*/
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`cgid` int(4) NOT NULL AUTO_INCREMENT COMMENT 'id',
`cg_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类名称',
`cg_slug` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '缩略名',
PRIMARY KEY (`cgid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of category
-- ----------------------------
INSERT INTO `category` VALUES (1, '点滴记录', 'default');
INSERT INTO `category` VALUES (2, '软件工程', 'se');
INSERT INTO `category` VALUES (3, '一些代码', 'code');
INSERT INTO `category` VALUES (4, '资源分享', 'enjoy');
-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`coid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
`cid` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '文章id',
`created` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`author` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '作者',
`authorId` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '作者id',
`mail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
`url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '博客地址',
`ip` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ip地址',
`agent` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'UserAgent',
`text` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '评论内容',
`parent` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '父评论',
PRIMARY KEY (`coid`) USING BTREE,
INDEX `cid`(`cid`) USING BTREE,
INDEX `created`(`created`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 600 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of comment
-- ----------------------------
INSERT INTO `comment` VALUES (2, 1, '2021-01-18 10:33:48', '广树', 0, '[email protected]', 'https://www.wikimoe.com', '89.208.246.176', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', '以前的文章都不见了!?真可惜!', 0);
INSERT INTO `comment` VALUES (3, 1, '2021-01-18 10:33:48', 'RawChen', 1, '[email protected]', 'https://rawchen.com', '89.208.246.176', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36 Edg/81.0.416.64', '没有 这也许就是大学的新起点吧 :razz: ', 2);
INSERT INTO `comment` VALUES (4, 1, '2021-01-18 10:33:53', 'moozik', 0, '[email protected]', 'https://moozik.cn', '27.154.154.126', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', '原来是个大佬', 3);
INSERT INTO `comment` VALUES (5, 1, '2021-01-18 10:33:57', 'moozik', 0, '[email protected]', 'https://moozik.cn', '27.154.154.126', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', '神奇的操作啊老哥', 3);
INSERT INTO `comment` VALUES (6, 1, '2021-01-18 10:33:48', '坐船去看鲸', 0, '[email protected]', 'http://chanshy.com/', '27.154.154.126', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', '嘿嘿 就看看', 0);
INSERT INTO `comment` VALUES (7, 1, '2021-01-18 10:33:48', '坐船去看鲸', 0, '[email protected]', 'http://chanshy.com/', '27.154.154.126', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', '我觉得ok', 0);
INSERT INTO `comment` VALUES (453, 1, '2021-01-19 10:53:45', 'RawChen', 1, '[email protected]', 'https://rawchen.com', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '可以的', 7);
INSERT INTO `comment` VALUES (454, 1, '2021-01-19 10:54:13', 'RawChen', 1, '[email protected]', 'https://rawchen.com', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '666', 453);
INSERT INTO `comment` VALUES (458, 1, '2021-01-19 11:55:47', 'RawChen', 0, '[email protected]', 'https://rawchen.com', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '123', 455);
INSERT INTO `comment` VALUES (459, 1, '2021-01-19 12:13:45', 'RawChen', 0, '[email protected]', 'https://rawchen.com', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '我的 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/nidongde.png\">', 0);
INSERT INTO `comment` VALUES (460, 1, '2021-01-19 12:16:03', 'RawChen', 1, '[email protected]', 'https://rawchen.com', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '嗯', 7);
INSERT INTO `comment` VALUES (461, 1, '2021-01-19 12:26:57', 'RawChen', 0, '[email protected]', 'https://rawchen.com', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '123213 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/icon_wink.png\">', 0);
INSERT INTO `comment` VALUES (462, 1, '2021-01-19 12:27:53', 'RawChen', 1, '[email protected]', 'https://rawchen.com', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '123 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/icon_arrow.png\">', 0);
INSERT INTO `comment` VALUES (466, 1, '2021-01-19 13:05:13', 'ux34', 0, '[email protected]', 'https://rawchen.com', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '我测试 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/nidongde.png\">', 0);
INSERT INTO `comment` VALUES (467, 1, '2021-01-19 13:05:50', 'RawChen', 1, '[email protected]', 'https://rawchen.com', '0:0:0:0:0:0:0:1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '我回复 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/wuzuixiao.png\">', 466);
INSERT INTO `comment` VALUES (481, 0, '2019-06-20 22:14:00', 'RawChen', 1, '[email protected]', 'https://rawchen.com', '223.86.197.204', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '留言评论默认使用全球通用头像Gravatar哦 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/nidongde.png\">', 0);
INSERT INTO `comment` VALUES (482, 0, '2020-12-17 22:16:26', 'Chanshy', 0, '[email protected]', 'http://orenji.red/', '223.86.197.204', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '博客不错,表情好看 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/icon_biggrin.png\">', 0);
INSERT INTO `comment` VALUES (483, 0, '2021-01-06 22:20:07', '猫鱼', 0, '[email protected]', 'https://2cat.net', '223.86.197.204', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75', 'HI, 链接已经加上了。虽然来的有点迟, 旧域名老是被攻击,换了新域名2CAT.NET,麻烦更新一下(猫鱼的小站)。 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/icon_exclaim.png\"> 谢谢。', 0);
INSERT INTO `comment` VALUES (484, 0, '2021-01-09 22:21:03', 'RawChen', 1, '[email protected]', 'https://rawchen.com', '223.86.197.204', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', 'Ok啦啦啦', 483);
INSERT INTO `comment` VALUES (485, 0, '2021-01-20 22:22:35', 'RawChen', 1, '[email protected]', 'https://rawchen.com', '223.86.197.204', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '已登录用户测试 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/icon_wink.png\">', 0);
INSERT INTO `comment` VALUES (486, 0, '2021-01-22 22:24:12', 'SodaYang', 0, '[email protected]', 'https://qi.ui.ac.cn/', '223.86.197.204', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75', '已添加友链\r\n\r\n名称:拾柒\r\n链接:https://qi.ui.ac.cn\r\nlogo:https://qi.ui.ac.cn/public/getUserAvatar.php?uid=1', 0);
INSERT INTO `comment` VALUES (487, 0, '2021-01-22 22:47:53', '夜杏', 0, '[email protected]', 'https://hexo.ink/', '223.86.197.204', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75', '博客不错 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/icon_exclaim.png\">', 0);
INSERT INTO `comment` VALUES (488, 0, '2021-01-22 23:03:01', 'RawChen', 1, '[email protected]', 'https://rawchen.com', '223.86.197.204', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', 'ok,已加 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/icon_rolleyes.png\">', 486);
INSERT INTO `comment` VALUES (597, 60, '2021-01-23 21:43:44', '妖业蛋', 0, '[email protected]', 'https://yaoyedan.net/', '223.86.197.204', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36 Edg/88.0.705.50', '漂亮 准备把视频偷走 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/icon_mrgreen.png\">', 0);
INSERT INTO `comment` VALUES (598, 60, '2021-01-23 21:46:00', 'RawChen', 1, '[email protected]', 'https://rawchen.com', '223.86.197.204', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36', '拿去拿去哈 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/icon_rolleyes.png\">', 597);
INSERT INTO `comment` VALUES (599, 63, '2021-01-23 21:48:38', '阿小州', 0, '[email protected]', 'https://axznb.cn/', '223.86.197.204', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36 Edg/88.0.705.50', '谢谢大佬分享,但是这堆英文看的也是脑袋疼哈哈 <img class=\"smile-img\" src=\"https://rawchen.com/usr/plugins/Smilies/tieba/xiaoniao.png\">', 0);
-- ----------------------------
-- Table structure for content
-- ----------------------------
DROP TABLE IF EXISTS `content`;
CREATE TABLE `content` (
`cid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '文章id',
`cgid` int(4) NULL DEFAULT NULL COMMENT '分类id',
`title` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题',
`slug` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '缩略名',
`created_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modified_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`content_text` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '文章内容',
`content_order` int(5) UNSIGNED NULL DEFAULT 0 COMMENT '是否推荐',
`author_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '作者id',
`content_type` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文章类型',
`content_status` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文章状态',
`password` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '如果状态为password则需密码',
`views` int(11) NULL DEFAULT NULL COMMENT '访问量',
`thumb` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '缩略图',
`description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '描述',
`tag_list` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签列表',
PRIMARY KEY (`cid`) USING BTREE,
UNIQUE INDEX `slug`(`slug`) USING BTREE,
INDEX `created`(`created_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 66 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of content
-- ----------------------------
INSERT INTO `content` VALUES (1, 3, '对IOC控制反转的理解?', 'ioc', '2020-06-14 08:19:14', '2021-01-01 11:30:14', '#是什么?\r\n:smile:IOC全称是 `Inversion of Control`控制反转。按照字面意思理解,将控制反转过来,这里的控制指的是什么?为什么要进行反转,ioc可以解决什么问题?要回答这些问题,我们需要先了解一下IOC为什么会产生。\r\n#怎么来的?\r\nJava是一门面向对象的语言,我们的应用程序通过一个个对象之间的**相互关联**和作用来完成功能,就像手表里的机械结构。每一个齿轮代表一个对象,对象之间彼此紧密咬合形成一个系统,这样的系统对象之间的**耦合度**非常高,所谓的耦合度就是关系的依赖程度,高耦合度带来的问题显而易见,只要有一个齿轮发生故障,其它齿轮也无法工作,进而整个系统都无法正常工作,这种牵一发而动全身情况如何才能改善呢?\r\n\r\n![][1]\r\n\r\n再来一个Service层实际的例子:\r\n```Java\r\npublic class UserServiceImpl {\r\n private UserDao userDao = new UserDaoImpl();\r\n private UserDao userDao = (UserDao)BeanFactory.getBean(\"userDao\");\r\n\r\n public List<User> getAllUser(){\r\n return userDao.getAllUser();\r\n }\r\n}\r\n```\r\n\r\n一个是**独立控制**通过**new**一个UserDao实现类来完成,一个是**Bean工厂**通过全限定类名找到Bean对象并创建多例对象,**无法自主控制**。第二者把控制权交给了Bean工厂来创建对象,带来的好处就是降低程序间的依赖关系,也叫削减计算机的耦合。\r\n\r\n#改善方法?\r\n上面机械齿轮的例子可以通过一个中间齿轮的方式来解决,也就是后面的**中间IOC容器**。所有的齿轮都交由中间这个齿轮管理,试着把中间这个齿轮拿掉我们可以看到这两个齿轮之间彼此毫无关系,即使一个齿轮出了故障,也不会影响到其它齿轮。\r\n中间这个齿轮就好比ioc容器,其它齿轮就是对象,可以看出引入了ioc容器,对象之间的耦合度降低了。当我们修改一个对象的时候不需要去考虑其它对象,因为它不会对其它对象造成影响。\r\n#ioc的原理?\r\n这里说到的ioc容器到底是个什么东东,又是什么让它具有如此神奇的力量?\r\n\r\n先来看一下没有ioc容器的时候,对象A依赖对象B,A在运行到某一时刻的时候会去创建B的对象,在这里A具有主动权,它控制了对象B的创建。\r\n\r\n引入ioc以后对象A和对象B之间没有了直接联系,当A运行的时候由ioc容器创建B对象在适当的时候注入到A中,在这里,控制权由A对象转移到了ioc容器。这也就是控制反转名称的由来。\r\n\r\n基于上述UserDao的例子我们可以通过**反射**来**解耦**,反射可以根据类的全限定名在程序运行时创建对象,可以这样做,将类的全限定名配置在xml文件中,在程序运行时通过反射读取该类的全限定名,动态的创建对象,赋值给userDao接口userDaoImpl。这样做后UserServiceImpl和UserDaoImpl之间没有了直接的关系,当我们需要替换UserDaoImpl对象的时候只需要在配置文件中去修改类的全限定名就可以了,非常的灵活方便,ioc容器的实现就是这个原理。\r\n\r\nIOC容器可以自动的帮我们完成以上一系列操作,我们需要做的就是通过配置文件告诉ioc需要创建哪个类以及类和类之间的关系。\r\n\r\n#控制反转和依赖注入\r\n在这里需要提到一个概念**依赖注入**,很多初学者搞不清楚控制反转和依赖注入之间的关系,其实他们是对同一事物的不同角度的描述。\r\n**控制反转是一种设计思想**而**依赖注入是这种思想的具体实现**\r\n\r\n具体说控制反转就是将创建userDaoImpl对象的控制权反转过来由UserServiceImpl交给了ioc容器,强调的是一种能力和思想,ioc容器具有了控制权。\r\n\r\n依赖注入就是ioc容器将UserServiceImpl所依赖的对象userDaoImpl,注入给UserServiceImpl,强调的是一个**过程和实现**。\r\n\r\nIOC很好的体现了面向对象设计法则之一—— 好莱坞法则:“别找我们,我们找你”。\r\n\r\n#优缺点\r\n\r\n 1. 软件系统中由于引入了第三方IOC容器,生成对象的步骤变得有些复杂,本来是两者之间的事情,又凭空多出一道手续,所以,我们在刚开始使用IOC框架的时候,会感觉系统变得不太直观。所以,引入了一个全新的框架,就会增加团队成员学习和认识的培训成本,并且在以后的运行维护中,还得让新加入者具备同样的知识体系。\r\n 2. 由于IOC容器生成对象是通过反射方式,在运行效率上有一定的损耗。如果你要追求运行效率的话,就必须对此进行权衡。\r\n 3. 具体到IOC框架产品(比如:Spring)来讲,需要进行大量的配制工作,比较繁琐,对于一些小的项目而言,客观上也可能加大一些工作成本。\r\n 4. IOC框架产品本身的成熟度需要进行评估,如果引入一个不成熟的IOC框架产品,那么会影响到整个项目,所以这也是一个隐性的风险。\r\n\r\n我们大体可以得出这样的结论:一些工作量不大的项目或者产品,不太适合使用IOC框架产品。另外,如果团队成员的知识能力欠缺,对于IOC框架产品缺乏深入的理解,也不要贸然引入。最后,特别强调运行效率的项目或者产品,也不太适合引入IOC框架产品,像WEB2.0网站就是这种情况。\r\n\r\n> Spring框架文档:\r\n> [https://rawchen.com/spring5][2]\r\n\r\n\r\n [1]: https://cdn.jsdelivr.net/gh/rawchen/JsDelivr/static/default-post-image.jpg\r\n [2]: https://rawchen.com/spring5', 0, 1, '原创', 'publish', NULL, 485, 'https://cdn.rawchen.com/2020/06/ioc/1.jpg', '我们大体可以得出这样的结论:一些工作量不大的项目或者产品,不太适合使用IOC框架产品。另外,如果团队成员的知识能力欠缺,对于IOC框架产品缺乏深入的理解,也不要贸然引入。最后,特别强调运行效率的项目。', '1,13,14');
INSERT INTO `content` VALUES (2, 2, '大二实习软件二次开发与测试', 'bercai-interning', '2020-07-03 11:30:14', '2021-01-01 11:30:14', '#ERP业务\r\n\r\n<a data-fancybox=\"gallery\" href=\"https://cdn.rawchen.com/2020/07/bercai-interning/1.jpg\"><img src=\"https://cdn.rawchen.com/2020/07/bercai-interning/1.jpg\"></a>\r\n\r\n#SaaS\r\n\r\nSaaS(Software as a Service),意思是“软件即服务”。在业内,SaaS被称为软件运营或简称软营。 SaaS是一种基于互联网提供软件服务的应用模式。在21世纪开始兴起的SaaS概念打破传统软件概念,SaaS模式随着互联网技术的发展和应用软件的成熟不断完善,是软件科技发展的最新趋势。\r\n\r\n使用传统的软件工具,除了购买软件的成本,企业还需要支付构建和维护自己独立的IT硬件设备的费用。SaaS模式的出现为企业提供了另外一种解决方案。借助SaaS平台,企业只需通过网络注册使用帐号并在自己设备上进行一些简单的设置,即可以启用SaaS平台上的软件服务以及通过互联网使用共享的基础设备。\r\n\r\n#ERP管理系统\r\n\r\nERP(Enterprise Resource Planning)企业资源计划管理系统是现代企业管理的运行模式。它是一个在全公司范围内应用的、高度集成的系统,覆盖了客户、项目、库存和采购、供应、生产等管理工作,通过优化企业资源达到资源效益最大化。\r\n\r\n#BOM\r\n\r\nBOM(Bill of Material)是指产品所需零部件明细表及其结构。具体而言,物料清单是构成父项装配件的所有子装配件、零件和原材料的清单,也是制造一个装配件所需要每种零部件的数量的清单。 \r\n\r\n#报工/委外/报关\r\n\r\n* 工单报工也称为工单确认,作用是对工单及其进度进行确认,为实际成本核算数据,自动收料等。\r\n* 委外加工,指本单位因为技术原因或者其他原因,不能在本单位加工的产品委托外单位加工,委外加工又分为委外材料加工和工序加工,外单位加工好了,收回产品的过程,而委托方付加工费。\r\n* 报关是指进出口货物收发货人、进出境运输工具负责人、进出境物品所有人或者他们的代理人向海关办理货物、物品或运输工具进出境手续及相关海关事务的过程,包括向海关申报、交验单据证件,并接受海关的监管和检查等。\r\n\r\n#平行测试\r\n\r\n平行测试(Parallel Testing)即通过输入相同的数据到新、旧两个系统中同时运行。\r\n\r\n#我的二开笔记\r\n```Groovy\r\n实体查询:根据ID查询入库单\r\n 查询实体:入库单\r\n 查询类型:实体查询\r\n 参数类型:键值对\r\n 查询条件:ID 等于 #{id}\r\n-------------------------------------------------------------------\r\n\r\n包装领料单页面->表格配置->直接新增按钮->操作->新增表单数据\r\n 表单定义:包装领料单\r\n url参数:\r\n approvalStatus=wxsp&approvalStatusDisplay=无需审批\r\n 单选框默认配置:\r\n 变量取值逻辑#{approvalStatus}\r\n-------------------------------------------------------------------\r\n流程监听器:回写直接出库审批状态\r\n 回写出库单审批状态\r\n-------------------------------------------------------------------\r\n回写包装领料审批状态操作定义\r\n 键值对 修改实体数据\r\n 目标实体:包装领料单\r\n 操作取值:属性 取值逻辑\r\n 审批意见 #{approvalStatus}\r\n 审批状态显示值 #{approvalStatusDisplay}\r\n 审批意见 #{approvalOpinions}\r\n ID取取值表达式:\r\n #{id}\r\n-------------------------------------------------------------------\r\n触发拦截器\r\n 实体数据增加前,删除前(后),修改前(后)\r\n-------------------------------------------------------------------\r\n内嵌表格质检明细查询\r\n 查询取值查询定义:质检明细查询\r\n 查询取值逻辑:$[质检单:list]\r\n 查询取值条件表达式:\r\n { relatedCustomers : $[关联客户:t1591062869758:form] }\r\n “质检明细查询”返回值处理脚本:return [list:$returnValue]\r\n 返回值属性:属性 list 属性名称 质检单\r\n 内嵌表格回填:\r\n 真实值\r\n 显示值\r\n 显示值来源\r\n-------------------------------------------------------------------\r\ndebug(com.alibaba.fastjson.JSON.toJSONString(ruku.details));\r\n-------------------------------------------------------------------\r\n三个参数\r\n productId\r\n productUnit\r\n warehouse\r\n-------------------------------------------------------------------\r\n质检明细单 qualityInspectionDetails quality_inspection_details\r\n采购到货明细ID purchaseArrivalDetailId purchase_arrival_detail_id\r\n 采购到货登记明细表 cgdhdjmxb purchase_arrival_det\r\n 累计已入库数量 accuAmount4Warehousing accu_amount4_warehousing\r\n-------------------------------------------------------------------\r\n\r\n\r\n 入库明细表 WarehousingDet dat_warehousing_det\r\n | 到货明细ID purchaseArrivalDetId purchase_arrival_det_id\r\n |\r\n 采购到货登记明细表 PurchaseArrivalDet dat_purchase_arrival_det\r\n 累计已入库数量 accuAmount4Warehousing accu_amount4_warehousing\r\n\r\n-------------------------------------------------------------------\r\n729335c1-4056-4177-94ef-2813a1896722\r\n\r\n\r\nupdate\r\n dat_purchase_arrival_det\r\nset\r\n accu_amount4_warehousing = ifnull(invoice_quantity, 0) + #{quantity}\r\nwhere\r\n id = #{id}\r\n\r\n{id:$[询价单ID:t1586333658961:form]}\r\n-------------------------------------------------------------------\r\n\r\n预检结果\r\n pre_inspection_results\r\n pre_inspection_results_display\r\n\r\n采购到货二开:\r\n预检结果 == 通过 按原先逻辑走\r\n预检结果 == 未通过\r\n则只做保存使用,不回写到货数量到采购订单,不生成自动质检单等其它功能\r\n-------------------------------------------------------------------\r\n\r\n拦截 采购到货时\r\n 序号 数字 serial_number\r\n 质检明细单 QualityInspectionDetails\r\n\r\n已质检待包装 InspectedBePacked\r\n 序号 serialNumber\r\n-------------------------------------------------------------------\r\n拦截器-采购到货时\r\n查询-质检明细查询2\r\n页面-包装入库单-页面二开\r\n操作-新增入库单\r\n页面-开票通知单待开票箱装信息\r\n-------------------------------------------------------------------\r\n发货单本次装箱明细查询\r\n开票通知单\r\n发货单\r\n-------------------------------------------------------------------\r\nbp.invoice_product_name,\r\nbp.sales_order_id,\r\nbp.serial_number,\r\n\r\naccount_number\r\naccount_bank\r\ncurrency\r\ncurrency_display\r\n-------------------------------------------------------------------\r\n\r\n$[付款单.收款方账号:t1584502428136.accountNumber:entity]\r\n$[付款单.收款方账号:t1584502428136.accountNumber:entity]\r\n\r\n 委外送料单outsourcing_Materia-生产数量pro_quantity\r\n \r\n 委外订单subcontracting_order-已收货数量completed_quantity\r\n\r\nsubcontracting_order id = outsourcing_Materia subcontracting_order\r\n\r\n-------------------------------------------------------------------\r\nUPDATE \r\ndat_subcontracting_order \r\nSET \r\ncompleted_quantity = #{quantity} \r\nWHERE \r\nid = #{id}\r\n\r\nsubcontractingCode\r\n\r\n$[货品明细:list]\r\n\r\n\r\n{\r\nsupplierName : $[供应商名称:t1592912316983:form]\r\nbrand : $[品牌:t1592912218474:form]\r\ncategoryOfGoods : $[货品类别:t1592912269605:form]\r\n}\r\n------------------------------------------------------------------\r\n\r\nselect name \r\nfrom \r\n dat_product \r\nwhere \r\n brand = \'wx\' \r\nAND \r\n `type` = \'wt\' \r\nAND \r\n supplierNameDisplay = \'代代供应\'\r\n-------------------------------------------------------------------\r\n\r\nselect \r\nname \r\nfrom \r\ndat_product \r\nwhere \r\nbrand = #{brand} \r\nAND \r\ntype = #{categoryOfGoods}\r\nAND \r\nsupplier = #{supplierName}\r\n-------------------------------------------------------------------\r\n\r\n拦截器-新增返利计算单后\r\n 采购到货登记明细表purchase_arrival_det\r\n 这个回写到到货单明细、退货单明细是不是实体叫采购到货登记明细表、供应商返利入库/退货单明细\r\n查询定义-查询是否存在返利\r\n\r\n查询该供应商的最新的结算价\r\n-- 通过采购退货单头表的供应商查询退货明细中的货品最新的结算价\r\n-------------------------------------------------------------------\r\n{\r\nsupplierId:$[供应商:t1583498694263:form],\r\nstartDate:$[超始日期:t1586569152809:form],\r\nendDate:$[截止日期:t1585030924377:form]\r\n}\r\n\r\n$[待结算采购明细:details]\r\n-------------------------------------------------------------------\r\n表单-包装明细-装箱标识\r\n实体-主拼箱\r\n mainLcl\r\n mainLclDisplay\r\n-------------------------------------------------------------------\r\nreturn [price : $returnValue[0].currentSettlementAmount]\r\n\r\n-------------------------------------------------------------------\r\n//新增入库单时回写赠品入库数量\r\nfor(details in $formValue[\'details\']){\r\n def param = [:]\r\n param[\'isGift\'] = \r\n if(details.giftIdentification == \'true\'){\r\n //回写到返利计算单的赠品明细rebate_cal_gift_details中“已入库数量”stockInQuantity\r\n param[\'quantity\'] = details.inQty\r\n param[\'compItemNumber\'] = details.productCode\r\n executeQuery([],param)\r\n //根据返利计算单中赠品明细id去入库\r\n //赠品货品编号 compItemNumber compItemNumberDisplay\r\n //入库明细单warehousing_det\r\n 返利计算单ID rebateCalSheetId\r\n \r\n \r\n //赠品的待入库单入库时,将入库数量回写到返利计算单的赠品明细中“已入库数量”\r\n | update\r\n | dat_rebate_cal_gift_details \r\n | set\r\n | stockInQuantity = ifnull(stockInQuantity, 0) + #{quantity}\r\n | where\r\n | comp_item_number = #{compItemNumber}\r\n \r\n }\r\n}\r\n-------------------------------------------------------------------\r\n\r\ncc c\r\npur_qu_by_pack\r\n\r\nSELECT\r\n t2.am_acq_field_display,\r\n t2.subject,\r\n t2.subject_display,\r\n t2.subject_name,\r\n t2.sup_account_display,\r\n t2.acc_bal_dir,\r\n t2.acc_bal_dir_display\r\nFROM\r\n dat_debit_credit_set t1\r\nLEFT JOIN dat_coll_pay_debit_details t2 ON t1.id = t2.loan_type_id\r\nWHERE\r\n t1.loan_business = \'预付款及铺底\'\r\n\r\n -------------------------------------------------------------------\r\n select\r\n t1.name goods_display, \r\n t1.search_code, \r\n t1.code item_code, \r\n t1.packing, \r\n t1.type_display category_of_goods, \r\n t1.brand_display brand, \r\n t1.unit_display company \r\nfrom\r\n dat_product t1 left join dat_supplier_of_goods t2 \r\non\r\n t1.supplier = t2.supplier\r\nWHERE\r\n t1.brand = #{brand} \r\nAND\r\n t1.type = #{categoryOfGoods}\r\nAND\r\n t2.supplier = #{supplierName}\r\n-------------------------------------------------------------------\r\n开票通知单\r\n发货单\r\n\r\n报关明细表\r\n开票单价\r\nbillingUnitPrice\r\n\r\n\r\nselect \r\n s.origin_code product_origin_code,\r\n s.origin_place product_origin,\r\n sod.supplier_id,\r\n sod.main_lcl,\r\n sod.main_lcl_display,\r\n sod.net_weight,\r\n sod.gross_weight,\r\n sod.invoice_product_name,\r\n sod.sales_order_id,\r\n sod.serial_number,\r\n sod.invoice_id,\r\n sod.sequence_number,\r\n sod.packing_no,\r\n sod.chinese_name,\r\n sod.english_name,\r\n sod.product_unit,\r\n sod.quantity_of_goods,\r\n sod.number_of_containers,\r\n sod.billingunitprice billing_unit_price,\r\n -- sod.invoiced_amount invoice_amount,\r\n sod.product_id product_id,\r\n sod.product_id product_name,\r\n p.unit,\r\n p.unit_display,\r\n p.specification,\r\n p.texure,\r\n p.english_desc,\r\n cd.price_contains_tax sales_unit_price,\r\n sod.gross_weight * sod.number_of_containers gross_weight_of_invoice,\r\n sod.net_weight * sod.number_of_containers invoice_net_weight,\r\n cd.price_contains_tax * sod.quantity_of_goods sales_sub_total,\r\n sod.billingunitprice * sod.quantity_of_goods invoiced_amount \r\n \r\n -- 开票单价\r\n -- 开票总额\r\nfrom \r\n dat_shipping_order_det sod\r\nleft join dat_product p\r\n on p.id = sod.product_id\r\nleft join dat_contract_detail cd\r\n on cd.id4_contract = sod.sales_order_id\r\n and cd.product = sod.product_id\r\nleft join dat_supplier s \r\n on s.id = sod.supplier_id\r\nwhere sod.invoice_id in\r\n<foreach item=\"item\" index=\"index\" collection=\'ids\'\r\n open=\"(\" separator=\",\" close=\" )\">\r\n #{item}\r\n</foreach> \r\norder by sod.packing_no asc \r\n-----------------------------------------------------------\r\n\r\n入出库借贷设置 LoanSetting\r\n入出库借贷设置科目明细 AccountDetailsOfInOut\r\n\r\n财务凭证 FinancialVoucher\r\n财务凭证科目明细 FiVouAcc\r\n\r\ninvoiceDetail[\'productName\'] = currentDetail[\'productDisplay21111111111111111111111in\'];\r\n开票通知单\r\n\r\n------------------------------------------------------------\r\n7月30日报告\r\n对于集塑二开需求:根据借贷类型生成相应的财务凭证,根据需求做了下分析,需要根据对象选择器id查询入出库借贷设置,新增财务凭证与财务凭证科目明细,\r\n并对主从表的各字段数据进行查找增加的操作,未完成。\r\n巨杰出现了新的bug,报关没有从上文带出销售订单id,销售小计和销售单价。重新排查发现在包装入库时sql中未带回销售订单id,在发货单二开脚本中对于自动编排箱装号中未写回销售单价。\r\n\r\n-------------------------------------------------------------\r\n//回写采购单明细\r\ndef entity = $formValue\r\n\r\ndef details = [[到货明细:details:property]]\r\ndef sum1=0\r\ndef sum2=0\r\nif (entity.directWarehou == \'是\'){\r\nif(details != null && details.size() > 0){\r\n def warehousing= new Warehousing()\r\n warehousing.name4RelatedReceipt=entity.code\r\n warehousing.id4RelatedReceipt=entity.id\r\n warehousing.status=\'yrk\'\r\n warehousing.statusDisplay=\'已入库\'\r\n warehousing.typeDisplay=\'采购入库\'\r\n warehousing.type=\'cgrk\'\r\n warehousing.timeOfApplication = entity.arrivalDate\r\n warehousing.applyForPersonnel=[[创建人员:creatorName:property]]\r\n warehousing.url4RelatedReceipt=\"/action/bizdata/form/f2adfd25-0c60-41fd-a773-8b40cf2345d9/\"+entity.id+\"/view/readonly\"\r\n warehousing.inPeople=entity.warehousingPeople\r\n warehousing.inPeopleDisplay=entity.warehousingPeopleDisplay\r\n //新增入库单\r\n def sum = 0\r\n def detailss=[]\r\n for(item in details){\r\n def detail = new WarehousingDet()\r\n detail.inQty =item.amount4Arrival\r\n detail.productId =item.productId\r\n detail.totalCost =item.price*item.amount4Arrival\r\n detail.productName =item.productName\r\n detail.productUnit =item.productUnit\r\n detail.productCode =item.productCode\r\n detail.shouldInQty=item.amount4Arrival\r\n detail.productModel=item.productModel\r\n detail.price4Warehousing=item.price\r\n sum=sum+item.amount4Arrival\r\n detailss.add(detail)\r\n if(item.amount4Arrival > 0){\r\n //累计到货数量总和\r\n sum1=item.cumulativeAmount+sum1\r\n //全部应到货数量\r\n sum2=item.amount+sum2\r\n def parameterValue = [id : item.purchaseReqDetId, qty : item.amount4Arrival, ruq : item.remainingUnsettledQuantity]\r\n executeManipulation([[更新采购明细单累计到货数量:e3b54a6c-c779-4568-ac4e-1cdf50d03a5a:manipulation]], parameterValue)\r\n }\r\n }\r\n warehousing.details=detailss\r\n warehousing.totalAmount=sum\r\n executeManipulation([[新增采购入库单(直接入库):0612d595-585e-480e-b8dc-097051b65661:manipulation]],parameterValue)\r\n \r\n def map=[:]\r\n map[\"id\"]=[[采购单.ID:purchaseReq.id:property]]\r\n if(sum2<=sum1){\r\n map[\"receivingStatusDisplay\"]=\'全部到货\'\r\n map[\"receivingStatus\"]=\'qbdh\'\r\n }\r\n if(sum2>sum1){\r\n map[\"receivingStatusDisplay\"]=\'部分到货\'\r\n map[\"receivingStatus\"]=\'bfdh\'\r\n }\r\n executeManipulation([[回写采购到到货状态:497f9c66-2840-468e-921f-6d6ed2886228:manipulation]],map)\r\n\r\n\r\n\r\n\r\n /**\r\n * 生成入库单时,根据借贷类型,生成相应的财务凭证。\r\n * 如借贷类型是“采购入库”到“入出库借贷设置”中找“采购入库”的科目配置,生成财务凭证到“财务凭证”下。\r\n **/\r\n \r\n //新增入库单时\r\n def entity = $formValue\r\n \r\n //根据借贷类型生成财务凭证\r\n def financialVoucher = new FinancialVoucher();\r\n \r\n //财务凭证科目明细\r\n def financialVoucherAccountDetails = new financialVoucherAccountDetails();\r\n \r\n def loanSetting = $formValue.[[入出库借贷设置:loanTypeName:property]]\r\n def accountDetailsOfInOut = $formValue.[[入出库借贷设置.科目明细:loanTypeName.accountDetails:property]]\r\n \r\n debug(com.alibaba.fastjson.JSON.toJSONString(loanSetting));\r\n debug(com.alibaba.fastjson.JSON.toJSONString(accountDetailsOfInOut));\r\n \r\n \r\n //来源单据编号(与财务凭证同时生成的单据,如到货单、入库单、退货单)\r\n financialVoucher.sourceDocNo = warehousing.id\r\n \r\n //凭证来源(根据当前使用的页面与凭证来源的字典相匹配)\r\n financialVoucher.sourceOfVoucher = \'cgrk\'\r\n //凭证来源显示值\r\n financialVoucher.sourceOfVoucherDisplay = \'采购入库\'\r\n //记账日期\r\n financialVoucher.bookkeepingDate = new Date()\r\n //生成日期\r\n financialVoucher.generationDate = new Date()\r\n //制证人 \r\n financialVoucher.witnessMaking = [[[[创建人员ID:creatorId:property]]\r\n //制证人显示值\r\n financialVoucher.witnessMakingDisplay = [[创建人员:creatorName:property]]\r\n //凭证编号\r\n // financialVoucher.documentNumber\r\n \r\n \r\n \r\n \r\n //凭证ID\r\n financialVoucherAccountDetails.voucherId = financialVoucher.id\r\n //凭证凭证编号\r\n financialVoucherAccountDetails.documentNumber = financialVoucher.documentNumber\r\n //凭证贷方金额\r\n financialVoucherAccountDetails.creditAmount = entity.warehousingAmount\r\n //凭证科目余额方向显示值\r\n financialVoucherAccountDetails.accBalDireDisplay = accountDetailsOfInOut.accBalDirDisplay\r\n //凭证序号\r\n financialVoucherAccountDetails.serialNumber = entity.creditTypeNo\r\n //凭证辅助核算\r\n \r\n \r\n \r\n financialVoucherAccountDetails.supplementaryAccounting = entity.[[供应商显示值:supplierDisplay:property]]\r\n \r\n \r\n \r\n //凭证科目显示值\r\n financialVoucherAccountDetails.subjectDisplay = accountDetailsOfInOut.subjectDisplay\r\n //凭证借方金额\r\n financialVoucherAccountDetails.debitAmount = entity.warehousingAmount\r\n //凭证科目余额方向\r\n financialVoucherAccountDetails.accBalDire = accountDetailsOfInOut.accBalDir\r\n //凭证摘要\r\n financialVoucherAccountDetails.abstractab = entity.outline\r\n //凭证科目\r\n financialVoucherAccountDetails.subject = accountDetailsOfInOut.subject\r\n //凭证科目名称\r\n financialVoucherAccountDetails.subjectName = accountDetailsOfInOut.subjectName \r\n \r\n //凭证科目明细(借贷类型配置的字段、科目、借贷)\r\n financialVoucher.voucherAccDetails = financialVoucherAccountDetails;\r\n \r\n}\r\n\r\n--------------------------------------------------------------------------\r\n//同步\r\nfunction sync(){\r\n var tableVM = context.getComponentViewModelByCode(\'purDetToBeInquired\');\r\n console.log(55)\r\n if (tableVM) {\r\n var $table = $(\'#\' + context.formContentViewId + \' #\' + tableVM.tableId);\r\n if ($table.length) {\r\n var jqgridVM = ko.dataFor($table[0]);\r\n var selects = jqgridVM.getSelected();\r\n if (Array.isArray(selects)) {\r\n var wtDetail = tableVM.realValue();\r\n var selectdData = [];\r\n wtDetail.forEach(function(data) {\r\n if (data.id && selects.indexOf(data.id) !== -1) {\r\n var obj = Object.assign({}, data, {id: Math.ceil(Math.random() * Date.now())});\r\n selectdData.push(obj);\r\n }\r\n });\r\n context.setComponentRealValueByCode(\'details\', []);\r\n context.setComponentRealValueByCode(\'details\', selectdData);\r\n }\r\n }\r\n }\r\n}\r\n\r\nreturn {\r\n sync:sync\r\n}\r\n------------------------------------------------------------------------------\r\n loan_setting\r\n\r\n入出库借贷设置科目明细\r\naccount_details_of_in_out\r\nloan_type_id\r\n----------------------------------------------------------------------------\r\n\r\n```\r\n\r\n#Groovy/JavaScript/SQL\r\n##包装入库单二开脚本.js\r\n```Js\r\nfunction sync(){\r\n var tableVM = context.getComponentViewModelByCode(\'detailsBePacked\');\r\n if (tableVM) {\r\n var $table = $(\'#\' + context.formContentViewId + \' #\' + tableVM.tableId);\r\n if ($table.length) {\r\n var jqgridVM = ko.dataFor($table[0]);\r\n var selects = jqgridVM.getSelected();\r\n if (Array.isArray(selects)) {\r\n var detailsBePacked = tableVM.realValue();\r\n var dataGroupByProduct = {};\r\n var packing4Details=[];\r\n debugger;\r\n detailsBePacked.forEach(function(data, i) {\r\n if (data.id && selects.indexOf(data.id) !== -1) {\r\n var obj = Object.assign({}, data, {id: Math.ceil(Math.random() * Date.now()), sequenceNo: i+1});\r\n if(dataGroupByProduct[data.productId]){\r\n dataGroupByProduct[data.productId][\"quantityOfGoods\"]+=Number(data.quantityOfGoods);\r\n dataGroupByProduct[data.productId][\"sourceIds\"]+=\",\"+data.qualityInspectionDetailsId;\r\n }else{\r\n var itemGroupByProduct={};\r\n itemGroupByProduct[\"productId\"]=data.productId;\r\n itemGroupByProduct[\"productIdDisplay\"]=data.productIdDisplay;\r\n itemGroupByProduct[\"productNumber\"]=data.productNumber;\r\n itemGroupByProduct[\"specificationAndModel\"]=data.specificationAndModel;\r\n itemGroupByProduct[\"productUnit\"]=data.productUnit;\r\n itemGroupByProduct[\"supplier\"]=data.supplier;\r\n itemGroupByProduct[\"supplierDisplay\"]=data.supplierDisplay;\r\n itemGroupByProduct[\"quantityOfGoods\"]=Number(data.quantityOfGoods);\r\n itemGroupByProduct[\"sourceIds\"]=data.qualityInspectionDetailsId;\r\n\r\n dataGroupByProduct[data.productId]=itemGroupByProduct;\r\n packing4Details.push(itemGroupByProduct);\r\n }\r\n }\r\n });\r\n context.setComponentRealValueByCode(\'packing4Details\', packing4Details);\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction beforeSave() {\r\n var tip = \'\';\r\n var thisQty=context.getComponentRealValueByCode(\'thisQty\');\r\n var packing4Details = context.getComponentRealValueByCode(\'packing4Details\');\r\n if (Array.isArray(packing4Details)) {\r\n var flag = packing4Details.some(function(item) {\r\n if (item.quantityOfSingleCase === null\r\n || item.quantityOfSingleCase === undefined\r\n || item.quantityOfSingleCase === \'\'){\r\n tip = item.no;\r\n appUtils.customTipDialog({\r\n content: \'箱装明细表中序号为\'+ tip + \'的单箱数量未填写,请填写!\'\r\n });\r\n return true;\r\n }\r\n \r\n if (Number(item.quantityOfGoods)<Number(item.quantityOfSingleCase)*Number(thisQty)){\r\n tip = item.no;\r\n appUtils.customTipDialog({\r\n content: \'计划明细列表中序号为\'+ tip + \'的单箱数量*箱装数已经超过未包装的数量,请核对!\'\r\n });\r\n return true;\r\n }\r\n \r\n });\r\n \r\n if(flag){\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n\r\nreturn {\r\n sync:sync,\r\n beforeSave:beforeSave\r\n}\r\n```\r\n\r\n##包装领料单增加或审批自动生成出库单.groovy\r\n```Groovy\r\n/**\r\n * 包装领料单,直接新增保存或审批通过后,自动生成一条出库单,该出库单状态为已完成\r\n * 带入参数:【出库类别为领料出库】【出库明细】\r\n * 出库明细参数:【产品名称】 【出库数量】【出库仓库】【出库方式】【数量】\r\n **/\r\n\r\ndef entity=$formValue;\r\n\r\n//如果为待审批或无需审批则不需要自动生成出库单\r\nif(entity.approvalStatus==\'dsp\'){\r\n \r\n}else{ \r\n def chuku = new ExWarehousing();\r\n chuku.outState=\'yck\';\r\n chuku.outStateDisplay=\'已出库\';\r\n chuku.outModel = \'llck\';\r\n chuku.outModelDisplay = \'领料出库\';\r\n chuku.outPeople = entity.receiver;\r\n chuku.outPeopleDisplay = entity.receiverDisplay;\r\n chuku.outDate = new Date();\r\n chuku.id4RelatedReceipt = entity.relatedDocumentNo;\r\n chuku.name4RelatedReceipt = entity.relatedDocumentNoDisplay;\r\n \r\n chuku.applyForPersonnel = [[领用人:receiver:property]];\r\n chuku.timeOfApplication = new Date();\r\n \r\n chuku.approvalStatus = \'wxsp\';\r\n chuku.approvalStatusDisplay = \'无需审批\';\r\n \r\n //备注\r\n chuku.deliveryNotes = entity.remarks;\r\n \r\n def list=$formValue.packingPickingDetails;\r\n def details= [];\r\n def total=0;\r\n if(list!=null){\r\n list.each{item->\r\n def exWarehousingDet = new ExWarehousingDet();\r\n \r\n //产品/包装物名称\r\n warehousingDet.productId = item.productId;\r\n exWarehousingDet.product=item.packageName;\r\n exWarehousingDet.productDisplay=item.packageNameDisplay;\r\n \r\n //产品单元\r\n exWarehousingDet.productUnit = item.productUnit;\r\n \r\n //出库数量\r\n exWarehousingDet.outQty=item.collectedQuantity;\r\n \r\n //出库仓库\r\n exWarehousingDet.warehouse = item.warehouse;\r\n exWarehousingDet.warehouseDisplay = item.warehouseDisplay;\r\n \r\n //产品编号\r\n exWarehousingDet.productNumber = item.productNumber;\r\n \r\n //规格型号\r\n exWarehousingDet.productModel = item.productModel;\r\n \r\n //库存数量\r\n total=total+item.collectedQuantity;\r\n \r\n exWarehousingDet.method=\'xjxc\';\r\n exWarehousingDet.methodDisplay=\'先进先出\';\r\n exWarehousingDet.numberOfPackages = item.inventoryQuantity;//数量\r\n details.add(exWarehousingDet);\r\n \r\n }\r\n }\r\n chuku.totalAmount = total;\r\n chuku.details=details;\r\n \r\n def id = executeManipulation([[新增出库单:2b7b93a4-8d3f-4330-b02b-78be96d1a9d4:manipulation]],chuku);\r\n \r\n def chuku2 = new ExWarehousing();\r\n\r\n chuku2 = executeQuery([[根据ID查询出库单:062d5167-58c6-493a-8373-026f7939d05d:query]],[id : id])[0];\r\n \r\n executeManipulation([[产品出库:72104a60-65f7-4192-91ee-2c3844719bf9:manipulation]],chuku2);\r\n}\r\n```\r\n\r\n##包装入库时判断更新入库数量.groovy\r\n```Groovy\r\ndef entity=$formValue\r\ndef details=[[包装入库明细:packing4Details:property]]\r\ndef thisQty=[[本次包装入库数量:thisQty:property]]\r\nif(details!=null){\r\n details.each{item->\r\n def amount=item.quantityOfSingleCase*thisQty\r\n def packingDeduction=\"\"\r\n def arr=item.sourceIds.split(\",\")\r\n for(it4Arr in arr){\r\n if(amount==0){\r\n break;\r\n }\r\n def quantityOfGoods=executeQuery([[根据质检明细ID查询未包装数量:2b94523e-4fc2-48d4-980f-f964c6926ddb:query]],[id:it4Arr])\r\n if(amount>=quantityOfGoods){\r\n packingDeduction+=\"{id:\"+it4Arr+\",amount:\"+quantityOfGoods+\"}\"\r\n amount-=quantityOfGoods\r\n executeManipulation([[更新质检明细的包装数量:b48edb4c-dc56-4fd5-a861-e2c518c53a1c:manipulation]],[id:it4Arr,currentPackagedAmount:quantityOfGoods])\r\n }else{\r\n packingDeduction+=\"{id:\"+it4Arr+\",amount:\"+amount+\"}\"\r\n executeManipulation([[更新质检明细的包装数量:b48edb4c-dc56-4fd5-a861-e2c518c53a1c:manipulation]],[id:it4Arr,currentPackagedAmount:amount])\r\n amount=0\r\n }\r\n }\r\n item.packingDeduction=packingDeduction\r\n }\r\n}\r\n```\r\n\r\n##出库拦截.groovy\r\n```Groovy\r\nif($formValue.outStateDisplay==\'待出库\'){\r\n executeManipulation([[产品出库:72104a60-65f7-4192-91ee-2c3844719bf9:manipulation]], $formValue)\r\n}\r\n$formValue.outState = \'yck\'\r\n$formValue.outStateDisplay = \'已出库\'\r\n\r\ndef list=$formValue.details\r\ndef sum1 =0\r\nif(list != null){\r\n list.each{item1->\r\n sum1=sum1+item1.outQty\r\n }\r\n}\r\n\r\nif(sum1<$formValue.totalAmount ){\r\n def exWarehousing=new ExWarehousing()\r\n def properties = $formValue.properties\r\n InvokerHelper.setProperties(exWarehousing, properties)\r\n def details= []\r\n if(list != null){\r\n list.each{item->\r\n if(item.shouldOutQty>item.outQty){\r\n def exWarehousingDet = new ExWarehousingDet()\r\n def pr = item.properties\r\n InvokerHelper.setProperties(exWarehousingDet, pr)\r\n exWarehousingDet.outQty=item.shouldOutQty-item.outQty\r\n exWarehousingDet.shouldOutQty=item.shouldOutQty-item.outQty\r\n exWarehousingDet.id=null\r\n details.add(exWarehousingDet)\r\n }\r\n }\r\n}\r\nexWarehousing.outStateDisplay=\'待出库\'\r\nexWarehousing.outState=\'dck\'\r\nexWarehousing.totalAmount=$formValue.totalAmount-sum1\r\nexWarehousing.id=null\r\nexWarehousing.details=details\r\nexecuteManipulation([[新增出库单:2b7b93a4-8d3f-4330-b02b-78be96d1a9d4:manipulation]],exWarehousing)\r\n}\r\n\r\n$formValue.totalAmount=sum1\r\n```\r\n\r\n##新增包装入库时生成入库单.groovy\r\n```Groovy\r\n/**\r\n * 包装入库单保存后要自动生成一个入库单\r\n * 带入参数:【入库类别为包装入库】【入库明细】\r\n * 入库明细参数:【产品名称】【入库仓库】【入库数量】【包装方式==箱装】\r\n **/\r\n \r\ndef entity=$formValue;\r\n\r\ndef ruku = new Warehousing();\r\nruku.type = \'bzrk\';\r\nruku.typeDisplay = \'包装入库\';\r\nruku.timeOfApplication = entity.packingDate;\r\nruku.applyForPersonnel = [[创建人员:creatorName:property]];\r\nruku.name4RelatedReceipt = entity.relatedDocumentNo;\r\nruku.status = \'yrk\';\r\nruku.statusDisplay = \'已入库\';\r\nruku.inPeople = [[创建人员ID:creatorId:property]];\r\nruku.inPeopleDisplay = [[创建人员:creatorName:property]];\r\nruku.inDate = new Date();\r\nruku.totalAmount=0;\r\nruku.details=[];\r\n\r\ndef details=[[包装入库明细:packing4Details:property]]\r\ndef thisQty=[[本次包装入库数量:thisQty:property]]\r\nif(details!=null){\r\n details.each{item->\r\n def amount=item.quantityOfSingleCase*thisQty\r\n def packingDeduction=\"\"\r\n def arr=item.sourceIds.split(\",\")\r\n for(it4Arr in arr){\r\n if(amount==0){\r\n break;\r\n }\r\n def qualityInspectionDetail=executeQuery([[根据质检明细ID加载质检明细:2b94523e-4fc2-48d4-980f-f964c6926ddb:query]],it4Arr)\r\n \r\n def warehousingDet = new WarehousingDet();\r\n warehousingDet.productId = item.productId;\r\n warehousingDet.productCode = item.productNumber;\r\n warehousingDet.productName = item.productIdDisplay;\r\n warehousingDet.packingModel = \'xz\';\r\n warehousingDet.packingModelDisplay = \'箱装\';\r\n warehousingDet.productUnit = item.productUnit;\r\n warehousingDet.productModel = item.specificationAndModel;\r\n warehousingDet.productBatch = entity.packageWarehousingNo;\r\n warehousingDet.warehouseId = entity.warehouseId;\r\n warehousingDet.warehouseIdDisplay = entity.warehouseIdDisplay;\r\n warehousingDet.purchaseDetailId=qualityInspectionDetail.purchaseReqDetId;\r\n warehousingDet.purchaseArrivalDetId=qualityInspectionDetail.purchaseArrivalDetailId;\r\n \r\n def quantityOfGoods=qualityInspectionDetail.quantityToBePacked\r\n if(amount>=quantityOfGoods){\r\n packingDeduction+=\"{id:\"+it4Arr+\",amount:\"+quantityOfGoods+\"}\"\r\n warehousingDet.inQty = quantityOfGoods;\r\n ruku.totalAmount+=quantityOfGoods;\r\n amount-=quantityOfGoods\r\n executeManipulation([[更新质检明细的包装数量:b48edb4c-dc56-4fd5-a861-e2c518c53a1c:manipulation]],[id:it4Arr,currentPackagedAmount:quantityOfGoods])\r\n }else{\r\n packingDeduction+=\"{id:\"+it4Arr+\",amount:\"+amount+\"}\"\r\n executeManipulation([[更新质检明细的包装数量:b48edb4c-dc56-4fd5-a861-e2c518c53a1c:manipulation]],[id:it4Arr,currentPackagedAmount:amount])\r\n warehousingDet.inQty = amount;\r\n ruku.totalAmount+=amount;\r\n amount=0\r\n }\r\n ruku.details.push(warehousingDet);\r\n }\r\n item.packingDeduction=packingDeduction\r\n }\r\n}\r\n \r\ndef id = executeManipulation([[新增入库单:55050fc4-d861-476c-bed8-39e1fb54a04b:manipulation]],ruku);\r\ndef ruku2 = new Warehousing();\r\nruku2 = executeQuery([[根据ID查询入库单:c8195c60-5a6f-4808-8ebb-e4f436444f08:query]],[id : id])[0];\r\nexecuteManipulation([[产品入库:c0e673f6-5c5c-4d14-bf8a-3eff8d9cb5ce:manipulation]],ruku2);\r\n```\r\n\r\n##包装领料单审批通过后的流程监听器.groovy\r\n```Groovy\r\ndef entity=$formValue\r\ndef map=[:]\r\nmap[\"approvalOpinions\"]=entity.approvalOpinions\r\nmap[\"approvalStatusDisplay\"]=\"审批通过\"\r\nmap[\"approvalStatus\"]=\"sptg\"\r\nmap[\"id\"]=entity.id\r\nexecuteManipulation([[回写包装领料审批状态:07a6656c-141b-4648-8c91-fae6e989148e:manipulation]],map)\r\n\r\n//根据form回写出库单\r\ndef chuku = new ExWarehousing();\r\nchuku.outState=\'yck\';\r\nchuku.outStateDisplay=\'已出库\';\r\nchuku.outModel = \'llck\';\r\nchuku.outModelDisplay = \'领料出库\';\r\nchuku.outPeople = entity.receiver;\r\nchuku.outPeopleDisplay = entity.receiverDisplay;\r\nchuku.outDate = new Date();\r\nchuku.id4RelatedReceipt = entity.relatedDocumentNo;\r\nchuku.name4RelatedReceipt = entity.relatedDocumentNoDisplay;\r\n\r\nchuku.applyForPersonnel = entity.receiverDisplay;\r\nchuku.timeOfApplication = entity.collectionDate;\r\n\r\nchuku.approvalStatus = \'wxsp\';\r\nchuku.approvalStatusDisplay = \'无需审批\';\r\n\r\n//备注\r\nchuku.deliveryNotes = entity.remarks;\r\n\r\ndef list=$formValue.packingPickingDetails;\r\ndef details= [];\r\ndef total=0;\r\nif(list!=null){\r\n list.each{item->\r\n def exWarehousingDet = new ExWarehousingDet();\r\n \r\n //产品/包装物名称\r\n exwarehousingDet.productId = item.productId;\r\n exWarehousingDet.product=item.packageName;\r\n exWarehousingDet.productDisplay=item.packageNameDisplay;\r\n \r\n //产品单元\r\n exWarehousingDet.productUnit = item.packagingUnitDisplay;\r\n \r\n //出库数量\r\n exWarehousingDet.outQty=item.collectedQuantity;\r\n \r\n //出库仓库\r\n exWarehousingDet.warehouse = item.warehouse;\r\n exWarehousingDet.warehouseDisplay = item.warehouseDisplay;\r\n \r\n //产品编号\r\n exWarehousingDet.productNumber = item.productNumber;\r\n \r\n //规格型号\r\n exWarehousingDet.productModel = item.productModel;\r\n \r\n \r\n //库存数量\r\n total=total+item.collectedQuantity;\r\n \r\n exWarehousingDet.method=\'xjxc\';\r\n exWarehousingDet.methodDisplay=\'先进先出\';\r\n exWarehousingDet.numberOfPackages = item.inventoryQuantity;//数量\r\n details.add(exWarehousingDet);\r\n }\r\n}\r\nchuku.totalAmount = total;\r\nchuku.details=details;\r\n\r\ndef id = executeManipulation([[新增出库单:2b7b93a4-8d3f-4330-b02b-78be96d1a9d4:manipulation]],chuku);\r\n \r\ndef chuku2 = new ExWarehousing();\r\n\r\nchuku2 = executeQuery([[根据ID查询出库单:062d5167-58c6-493a-8373-026f7939d05d:query]],[id : id])[0];\r\n\r\nexecuteManipulation([[产品出库:72104a60-65f7-4192-91ee-2c3844719bf9:manipulation]],chuku2);\r\n```\r\n\r\n##产品出库.groovy\r\n```Groovy\r\n\r\ndef entity4Exwarehousing=$parameterValue\r\ndef details=entity4Exwarehousing.details\r\ndef outType = entity4Exwarehousing.outModelDisplay\r\n//出库单明细回写已入库数量\r\ndef writebackDetailOutQty = { outOrderDetail -> \r\n def updateParam = [:]\r\n updateParam[\'qty\'] = outOrderDetail.outQty\r\n \r\n if(outType == \'销售出库\' || outType == \'换货出库\'){\r\n //回写销售、出货明细表\r\n updateParam[\'id\'] = outOrderDetail.salesDetailId\r\n executeManipulation([[回写销售明细出库数量:59a3fac4-72ca-4ddb-bb1d-746ea564199b:manipulation]], updateParam)\r\n \r\n updateParam[\'id\'] = outOrderDetail.salesDetailId.shipmentDetailsId\r\n executeManipulation([[回写出货明细出库数量:3dddc4d5-8c46-4b5f-9c01-4e033a1777a8:manipulation]], updateParam)\r\n }\r\n \r\n if(outType == \'采购退货\'){\r\n\r\n }\r\n \r\n if(outType == \'领料出库\'){\r\n \r\n }\r\n \r\n}\r\n\r\n//出库\r\ndef outbound = { outOrderDetail, productInventory, inventoryDetails -> \r\n if(inventoryDetails == null || inventoryDetails.size() <= 0){\r\n throw new BaseAppRuntimeException(false, \"没有找到对应的库存产品明细\")\r\n }\r\n \r\n //校验库存数量\r\n def outQty = outOrderDetail.outQty\r\n def totalQty = 0\r\n for(inventoryDetail in inventoryDetails){\r\n totalQty += inventoryDetail.total4Inventory\r\n }\r\n if(totalQty < outQty){\r\n throw new BaseAppRuntimeException(false, \"库存数量不足\")\r\n }\r\n \r\n def data4Reduce = \"\"\r\n for(inventoryDetail in inventoryDetails){\r\n if(inventoryDetail.total4Inventory >= outQty){\r\n executeManipulation([[减少产品库存数量:5d53f4fd-2761-467c-a413-54e253471ebe:manipulation]],[productInventoryId:productInventory.id,amount4Reduce:outQty])\r\n executeManipulation([[减少产品库存明细表的库存数量:6e830506-c3bb-4c07-9285-4256fcdc4964:manipulation]],[productInventoryDetId:inventoryDetail.id,amount4Reduce:outQty])\r\n data4Reduce += productInventory.id + \":\" + inventoryDetail.id + \":\" + outQty + \",\"\r\n if (data4Reduce != \'\') {\r\n def param4Change = [:]\r\n param4Change[\'id\'] = outOrderDetail.id\r\n param4Change[\'data4Reduce\'] = data4Reduce\r\n executeManipulation([[修改出库明细表的情况扣减:ce70052c-9031-4800-be50-253c76921c51:manipulation]],param4Change)\r\n } \r\n return;\r\n }\r\n \r\n executeManipulation([[减少产品库存数量:5d53f4fd-2761-467c-a413-54e253471ebe:manipulation]],[productInventoryId:productInventory.id,amount4Reduce:inventoryDetail.total4Inventory])\r\n executeManipulation([[减少产品库存明细表的库存数量:6e830506-c3bb-4c07-9285-4256fcdc4964:manipulation]], [productInventoryDetId:inventoryDetail.id, amount4Reduce:inventoryDetail.total4Inventory])\r\n outQty = outQty - inventoryDetail.total4Inventory\r\n data4Reduce += productInventory.id + \":\" + inventoryDetail.id + \":\" + inventoryDetail.total4Inventory + \",\"\r\n if (data4Reduce != \'\') {\r\n debug(987654)\r\n def param4Change = [:]\r\n param4Change[\'id\'] = outOrderDetail.id\r\n param4Change[\'data4Reduce\'] = data4Reduce\r\n executeQuery([[修改出库明细表情况扣减:70b6cce3-da84-4139-acf1-84f7a85c4823:query]],param4Change)\r\n } \r\n }\r\n \r\n writebackDetailOutQty(outOrderDetail)\r\n}\r\n\r\n//先进先出\r\ndef firstInFirstOut={productInventory, detail4Exwarehousing ->\r\n def list4ProductInventoryDetails=executeQuery([[根据产品库存ID按入库时间正序查询产品库存明细:df9ef889-af9f-438c-9007-e3005a1b27c2:query]],[productInventoryId:productInventory.id])\r\n outbound(detail4Exwarehousing, productInventory, list4ProductInventoryDetails)\r\n/* if (data4Reduce != \'\') {\r\n def param4Change = [:]\r\n param4Change[\'id\'] = detail4Exwarehousing.id\r\n param4Change[\'data4Reduce\'] = data4Reduce\r\n executeQuery([[修改出库明细表情况扣减:70b6cce3-da84-4139-acf1-84f7a85c4823:query]],param4Change)\r\n }*/\r\n \r\n}\r\n\r\n//指定批次号出库\r\ndef appointLot = {productInventory, outOrderDetail ->\r\n def inventoryDetails = executeQuery([[产品库存明细_出库:01ba525c-4416-41b8-84a7-22755d15d431:query]], [ids : outOrderDetail.cprkpclb.split(\',\')])\r\n outbound(outOrderDetail, productInventory, inventoryDetails)\r\n}\r\n\r\nif(details!=null){\r\n details.each{detail->\r\n def entity4ProductInventory=executeQuery([[根据产品ID和仓库ID获取产品库存简要信息:b9d45fe9-68f0-436b-966e-de425ffafedb:query]],[\r\n productId:detail.product,warehouseId:detail.warehouse,productUnit:detail.productUnit])\r\n if(entity4ProductInventory==null){\r\n debug(com.alibaba.fastjson.JSON.toJSONString(detail));\r\n throw new BaseAppRuntimeException(false,\"没有找到对应的库存产品\")\r\n }\r\n if(entity4ProductInventory.stockQty<detail.outQty){\r\n throw new BaseAppRuntimeException(false,\"库存产品不足\")\r\n }\r\n def outMethodDisplay=detail.methodDisplay\r\n \r\n if(outMethodDisplay==\'先进先出\'){\r\n firstInFirstOut(entity4ProductInventory,detail)\r\n }else if(outMethodDisplay==\'指定批次号\'){\r\n appointLot(entity4ProductInventory, detail)\r\n }\r\n }\r\n}\r\n```\r\n\r\n##质检明细查询.sql\r\n```SQL\r\nselect\r\n t1.product_id,\r\n t1.product_name product_id_display, -- 产品名称(号)\r\n t1.product_codes product_number,\r\n t2.specification specification_and_model, -- 规格型号\r\n t2.unit product_unit, -- 单位\r\n t1.quantity_to_be_packed quantity_of_goods, -- 待包装货品数量\r\n t1.des4_products remarks,\r\n t1.arrival_note associated_arrival_display,\r\n t1.quality_inspection_order_id,\r\n t1.quality_inspection_no,\r\n t1.purchase_arrival_detail_id arrival_details_id,\r\n t1.purchase_req_det_id,\r\n t1.purchase_arrival_id associated_arrival,\r\n t1.id quality_inspection_details_id,\r\n (select related_suppliers from dat_inspection_req where id = t1.quality_inspection_order_id) supplier,\r\n (select related_suppliers_display from dat_inspection_req where id = t1.quality_inspection_order_id) supplier_display\r\nFROM\r\n dat_quality_inspection_details t1\r\nLEFT OUTER JOIN dat_product t2 ON t2.id = t1.product_id\r\nWHERE\r\n EXISTS (\r\n SELECT\r\n 1\r\n FROM\r\n dat_inspection_req\r\n WHERE\r\n id = t1.quality_inspection_order_id\r\n AND associated_customers = #{relatedCustomers} \r\n AND quality_status = \'yzj\'\r\n )\r\n<![CDATA[ \r\nand\r\n t1.quantity_to_be_packed > 0 \r\n]]> \r\n```\r\n\r\n##根据产品ID查询产品库存表库存数量.sql\r\n```SQL\r\n-- 根据产品ID查询产品库存表库存数量\r\n\r\nSELECT\r\n stock_qty\r\nFROM\r\n dat_product_inventory\r\nWHERE\r\n product_id = #{id}\r\n\r\n-- warehousing_packing_list\r\n-- number_of_inner_boxes\r\n-- inner_box_packaging\r\n-- 内盒包装物\r\n-- id4_warehousing\r\n-- 库存数量 inventoryQuantity getProductWareHouseQuantity\r\n-- $[库存数量:stockQty]\r\n-- {id:$[产品:t1586849793996:form]}\r\n-- 直接新增保存或审批通过\r\n```\r\n\r\n##完工入库明细查询.sql\r\n```SQL\r\nSELECT\r\n t1.*, t2.status_display,\r\n t2.in_people_display,\r\n t2.in_date,\r\n t2.type_display,\r\n t2.time_of_application,\r\n t2.apply_for_personnel,\r\n t2.name4_related_receipt,\r\n t2.id4_related_receipt,\r\n t2.url4_related_receipt\r\nFROM\r\n dat_warehousing_det t1\r\nLEFT OUTER JOIN dat_warehousing t2 ON t1.warehousing_id = t2.id\r\nWHERE\r\n {{@t2.Warehousing@}}\r\nAND t2.type_display = \'完工入库\'\r\nAND {{ #Conditions=t1.WarehousingDet;t2.Warehousing#}}\r\nORDER BY\r\n t2.create_time DESC\r\n```\r\n\r\n##采购到货时新增数据.groovy\r\n```Groovy\r\n//回写采购单明细\r\ndef entity = $formValue\r\ndef details = [[到货明细:details:property]]\r\ndef sum1=0\r\ndef sum2=0\r\nif(details != null && details.size() > 0){\r\n //新增质检申请单\r\n def inspectionReq= new InspectionReq()\r\n inspectionReq.associatedArrivalDisplay=entity.code\r\n inspectionReq.associatedArrival=entity.id\r\n inspectionReq.remarks = entity.remark\r\n inspectionReq.qualityStatus=\'dzj\'\r\n inspectionReq.qualityStatusDisplay=\'待质检\'\r\n inspectionReq.relatedSuppliersDisplay=entity.supplier.name\r\n inspectionReq.relatedSuppliers=entity.supplier.id\r\n inspectionReq.applicationDate=[[到货日期:arrivalDate:property]]\r\n inspectionReq.associatedPurchaseOrder=entity.purchaseReq.id\r\n debug(entity.purchaseReq.id)\r\n //新增入库单\r\n def sum =0\r\n def detailss=[] \r\n for(item in details){\r\n \r\n //判断预检结果是否为通过或者未通过\r\n if(item.preInspectionResults == \'tg\'){\r\n //通过\r\n def detail = new QualityInspectionDetails()\r\n //到货数量\r\n detail.arrivalQuantity =item.amount4Arrival\r\n detail.serialNumber = item.serialNumber\r\n detail.productId =item.productId\r\n detail.productName =item.productName\r\n detail.productCodes = item.productCode //货品编码\r\n detail.productUnit =item.productUnit //产品单位\r\n detail.productModel=item.productModel //产品规格\r\n detail.purchaseArrivalDetailId = entity.id\r\n \r\n detail.price=item.price\r\n detailss.add(detail)\r\n if(item.amount4Arrival > 0){\r\n //累计到货数量总和\r\n sum1=item.cumulativeAmount+sum1\r\n //全部应到货数量\r\n sum2=item.amount+sum2\r\n def parameterValue = [id : item.purchaseReqDetId, qty : item.amount4Arrival, ruq : item.remainingUnsettledQuantity]\r\n executeManipulation([[更新采购明细单累计到货数量:e3b54a6c-c779-4568-ac4e-1cdf50d03a5a:manipulation]], parameterValue)\r\n }\r\n }else{\r\n //未通过\r\n }\r\n \r\n \r\n }\r\n debug(com.alibaba.fastjson.JSON.toJSONString(detailss));\r\n inspectionReq.qualityDetails=detailss\r\n executeManipulation([[新增货品质检:a22c08b5-bb17-4f70-9523-05520a437a4d:manipulation]],inspectionReq)\r\n}\r\n\r\n\r\ndef map=[:]\r\nmap[\"id\"]=[[采购单.ID:purchaseReq.id:property]]\r\nmap[\"receivingStatusDisplay\"] = sum2<=sum1 ? \'全部到货\' : \'部分到货\'\r\nmap[\"receivingStatus\"] = sum2<=sum1 ? \'qbdh\' : \'bfdh\'\r\nexecuteManipulation([[回写采购到到货状态:497f9c66-2840-468e-921f-6d6ed2886228:manipulation]],map)\r\n```\r\n##客户询价明细关联采购询价明细.sql\r\n```SQL\r\nSELECT\r\n t2.id,\r\n t2.code,\r\n t3.amount,\r\n t3.price_answered,\r\n t3.create_time,\r\n t2.supplier_display\r\nFROM\r\n dat_purchase_inquiry_det t3\r\nLEFT JOIN dat_purchase_inquiry t2 -- 采购询价表\r\nON t2.id = t3.purchase_inquiry_id\r\nLEFT JOIN dat_customer_inquiry t1 -- 客户询价表\r\nON t1.id = t2.customer_inquiry\r\nWHERE\r\n t1.id = #{id}\r\n```\r\n##新增委外收料单.groovy\r\n```Groovy\r\nif($formValue.deliveryStatusDisplay==\'已出库\'){\r\n executeManipulation([[委外送料出库:6962fff7-0959-4a07-b259-75e5dcbbc8bb:manipulation]],$formValue)\r\n}\r\n\r\n/**\r\n * 回填委外订单明细的送料申请数量\r\n **/\r\n\r\nfor(songliaoDetail in $formValue[\'songliaoDet\']){\r\n def param = [:];\r\n param[\'id\'] = songliaoDetail[\'subOrderDetailId\'];\r\n param[\'qty\'] = songliaoDetail[\'actualFeedQuantity\'];\r\n executeManipulation([[增加委外订单明细送料申请数量:d6661f57-dc2e-4e46-87ae-b35637085bd2:manipulation]], param);\r\n}\r\nif([[委外类型显示值:outsourcingTypeDisplay:property]]==\'工序委外\'){\r\n \r\n}\r\nif($formValue.outsourcingType==\"gxww\"){\r\n //从委外送料单保存后回写生产数量为已送料数量\r\n def map = [:];\r\n map[\"q\"] = $formValue.proQuantity;\r\n map[\"id\"] = $formValue.subcontractingOrder;\r\n debug($formValue.id);\r\n \r\n executeManipulation([[委外送料单回写生产数量为已送料数量:c6de07d3-efdc-4868-b879-1fa480923a6d:manipulation]],map);\r\n}\r\n```\r\n##新增委外收料单.groovy\r\n```Groovy\r\nif($formValue.deliveryStatusDisplay==\'已出库\'){\r\n executeManipulation([[委外送料出库:6962fff7-0959-4a07-b259-75e5dcbbc8bb:manipulation]],$formValue)\r\n}\r\n\r\n/**\r\n * 回填委外订单明细的送料申请数量\r\n **/\r\n\r\nfor(songliaoDetail in $formValue[\'songliaoDet\']){\r\n def param = [:];\r\n param[\'id\'] = songliaoDetail[\'subOrderDetailId\'];\r\n param[\'qty\'] = songliaoDetail[\'actualFeedQuantity\'];\r\n executeManipulation([[增加委外订单明细送料申请数量:d6661f57-dc2e-4e46-87ae-b35637085bd2:manipulation]], param);\r\n}\r\nif([[委外类型显示值:outsourcingTypeDisplay:property]]==\'工序委外\'){\r\n \r\n}\r\nif($formValue.outsourcingType==\"gxww\"){\r\n //从委外送料单保存后回写生产数量为已送料数量\r\n def map = [:];\r\n map[\"q\"] = $formValue.proQuantity;\r\n map[\"id\"] = $formValue.subcontractingOrder;\r\n debug($formValue.id);\r\n \r\n executeManipulation([[委外送料单回写生产数量为已送料数量:c6de07d3-efdc-4868-b879-1fa480923a6d:manipulation]],map);\r\n}\r\n```\r\n##新增采购退货时拦截.groovy\r\n```Groovy\r\n//新增采购退货时\r\ndef entity =$formValue\r\n\r\n//退货状态 默认发起退货\r\n\r\n////退货状态 确认退货\r\nif(entity.status==\'qrth\'){\r\n //退货来源 无订单货品\r\n if(entity.returnSource==\'wddhp\'){\r\n //需要出库\r\n if(entity.outWare==\'xyck\'){\r\n executeManipulation([[采购退货出库:bd76ce6a-115d-4e91-a022-e618f1101bb4:manipulation]],entity)\r\n }\r\n //无需出库\r\n if(entity.outWare==\'wxck\'){\r\n //退款方式-换货\r\n if(entity.method4BackMoney==\'hh\'){\r\n executeManipulation([[采购换货入库:9726a612-c1a4-4f01-98f1-9b9fd75f4eae:manipulation]],entity)\r\n }\r\n //退款方式-转预付款\r\n if(entity.method4BackMoney==\'zyfk\'){\r\n executeManipulation([[采购退货回写采购预付:5ad46155-691e-45cb-8c4b-313c1f55afad:manipulation]],entity)\r\n }\r\n //退款方式-直接退货\r\n if(entity.method4BackMoney==\'zjtk\')\r\n executeManipulation([[采购退货生成收款单:fac58bd7-5e0f-40a4-be63-1ab68ffdf09b:manipulation]],entity)\r\n }\r\n }\r\n \r\n //退货来源 有订单货品\r\n if(entity.returnSource==\'yddhp\'){\r\n debug(\"nihao\")\r\n def list=entity.details\r\n if(list !=null){\r\n list.each{item->\r\n executeManipulation([[采购退货回写退货数量到到货:98151c4c-2ab0-4743-ab38-78da199f6295:manipulation]],item)\r\n def rr = executeQuery([[根据货品id查询货品详情:f9b1ef9e-179c-45fe-90ba-daebcf8053aa:query]],[id:item.productId])\r\n item.product=rr\r\n debug(rr)\r\n }\r\n }\r\n //需要出库\r\n if(entity.outWare==\'xyck\'){\r\n executeManipulation([[采购退货出库:bd76ce6a-115d-4e91-a022-e618f1101bb4:manipulation]],entity)\r\n \r\n }\r\n //无需出库\r\n if(entity.outWare==\'wxck\'){\r\n ////退款方式-换货\r\n if(entity.method4BackMoney==\'hh\'){\r\n executeManipulation([[采购换货入库:9726a612-c1a4-4f01-98f1-9b9fd75f4eae:manipulation]],entity)\r\n }else{\r\n executeManipulation([[采购退货非换货时:58e3c0b7-b5eb-43e2-8ca8-a30a2e4693bc:manipulation]],entity)\r\n }\r\n }\r\n \r\n }\r\n}\r\n```\r\n##新增入库单时回写赠品入库数量.groovy\r\n```Groovy\r\n/**\r\n * 包装入库单保存后要自动生成一个入库单\r\n * 带入参数:【入库类别为包装入库】【入库明细】\r\n * 入库明细参数:【产品名称】【入库仓库】【入库数量】【包装方式==箱装】\r\n **/\r\n \r\ndef entity=$formValue;\r\n\r\ndef ruku = new Warehousing();\r\nruku.type = \'bzrk\';\r\nruku.typeDisplay = \'包装入库\';\r\nruku.timeOfApplication = entity.packingDate;\r\nruku.applyForPersonnel = [[创建人员:creatorName:property]];\r\nruku.name4RelatedReceipt = entity.relatedDocumentNo;\r\nruku.status = \'yrk\';\r\nruku.statusDisplay = \'已入库\';\r\nruku.inPeople = [[创建人员ID:creatorId:property]];\r\nruku.inPeopleDisplay = [[创建人员:creatorName:property]];\r\nruku.inDate = new Date();\r\nruku.totalAmount=0;\r\nruku.details=[];\r\n\r\ndef details=[[包装入库明细:packing4Details:property]]\r\ndef thisQty=[[本次包装入库数量:thisQty:property]]\r\nif(details!=null){\r\n details.each{item->\r\n def amount=item.quantityOfSingleCase*thisQty\r\n def packingDeduction=\"\"\r\n def arr=item.sourceIds.split(\",\")\r\n for(it4Arr in arr){\r\n if(amount==0){\r\n break;\r\n }\r\n def qualityInspectionDetail=executeQuery([[根据质检明细ID加载质检明细:2b94523e-4fc2-48d4-980f-f964c6926ddb:query]],it4Arr)\r\n \r\n def warehousingDet = new WarehousingDet();\r\n warehousingDet.productId = item.productId;\r\n warehousingDet.productCode = item.productNumber;\r\n warehousingDet.productName = item.productIdDisplay;\r\n warehousingDet.packingModel = \'xz\';\r\n warehousingDet.packingModelDisplay = \'箱装\';\r\n warehousingDet.productUnit = item.productUnit;\r\n warehousingDet.productModel = item.specificationAndModel;\r\n warehousingDet.productBatch = entity.packageWarehousingNo;\r\n warehousingDet.warehouseId = entity.warehouseId;\r\n warehousingDet.warehouseIdDisplay = entity.warehouseIdDisplay;\r\n warehousingDet.purchaseDetailId=qualityInspectionDetail.purchaseReqDetId;\r\n warehousingDet.purchaseArrivalDetId=qualityInspectionDetail.purchaseArrivalDetailId;\r\n \r\n def quantityOfGoods=qualityInspectionDetail.quantityToBePacked\r\n if(amount>=quantityOfGoods){\r\n packingDeduction+=\"{id:\"+it4Arr+\",amount:\"+quantityOfGoods+\"}\"\r\n warehousingDet.inQty = quantityOfGoods;\r\n ruku.totalAmount+=quantityOfGoods;\r\n amount-=quantityOfGoods\r\n executeManipulation([[更新质检明细的包装数量:b48edb4c-dc56-4fd5-a861-e2c518c53a1c:manipulation]],[id:it4Arr,currentPackagedAmount:quantityOfGoods])\r\n }else{\r\n packingDeduction+=\"{id:\"+it4Arr+\",amount:\"+amount+\"}\"\r\n executeManipulation([[更新质检明细的包装数量:b48edb4c-dc56-4fd5-a861-e2c518c53a1c:manipulation]],[id:it4Arr,currentPackagedAmount:amount])\r\n warehousingDet.inQty = amount;\r\n ruku.totalAmount+=amount;\r\n amount=0\r\n }\r\n ruku.details.push(warehousingDet);\r\n }\r\n item.packingDeduction=packingDeduction\r\n }\r\n}\r\n \r\ndef id = executeManipulation([[新增入库单:55050fc4-d861-476c-bed8-39e1fb54a04b:manipulation]],ruku);\r\ndef ruku2 = new Warehousing();\r\nruku2 = executeQuery([[根据ID查询入库单:c8195c60-5a6f-4808-8ebb-e4f436444f08:query]],[id : id])[0];\r\nexecuteManipulation([[产品入库:c0e673f6-5c5c-4d14-bf8a-3eff8d9cb5ce:manipulation]],ruku2);\r\n```\r\n##报关明细查询返回值处理.groovy\r\n```Groovy\r\ndef map = [:]\r\ndef details = []\r\nfor(custDecList in $returnValue){\r\n def ds = [:]\r\n if(custDecList[\'numberOfContainers\'] == 1){\r\n ds[\'caseNumberUnit\'] = \'CTN\'\r\n }else{\r\n ds[\'caseNumberUnit\'] = \'CTNS\'\r\n }\r\n ds[\'weight\'] = \'KGS\'\r\n ds[\'chinaAndEnglishNames\'] = custDecList[\'englishName\']+\"(\"+custDecList[\'chineseName\']+\")\"\r\n ds[\'productOriginCode\'] = custDecList[\'productOriginCode\']\r\n ds[\'productOrigin\'] = custDecList[\'productOrigin\']\r\n ds[\'supplierId\'] = custDecList[\'supplierId\']\r\n ds[\'mainLcl\'] = custDecList[\'mainLcl\']\r\n ds[\'mainLclDisplay\'] = custDecList[\'mainLclDisplay\']\r\n ds[\'netWeight\'] = custDecList[\'netWeight\']\r\n ds[\'grossWeight\'] = custDecList[\'grossWeight\']\r\n ds[\'invoiceProductName\'] = custDecList[\'invoiceProductName\']\r\n ds[\'salesOrderId\'] = custDecList[\'salesOrderId\']\r\n ds[\'serialNumber\'] = custDecList[\'serialNumber\']\r\n ds[\'invoiceId\'] = custDecList[\'invoiceId\']\r\n ds[\'sequenceNumber\'] = custDecList[\'sequenceNumber\']\r\n ds[\'packingNo\'] = custDecList[\'packingNo\']\r\n ds[\'chineseName\'] = custDecList[\'chineseName\']\r\n ds[\'englishName\'] = custDecList[\'englishName\']\r\n ds[\'productUnit\'] = custDecList[\'productUnit\']\r\n ds[\'quantityOfGoods\'] = custDecList[\'quantityOfGoods\']\r\n ds[\'numberOfContainers\'] = custDecList[\'numberOfContainers\']\r\n ds[\'billingUnitPrice\'] = custDecList[\'billingUnitPrice\']\r\n ds[\'productId\'] = custDecList[\'productId\']\r\n ds[\'productName\'] = custDecList[\'productName\']\r\n ds[\'unit\'] = custDecList[\'unit\']\r\n ds[\'unitDisplay\'] = custDecList[\'unitDisplay\']\r\n ds[\'specification\'] = custDecList[\'specification\']\r\n ds[\'texure\'] = custDecList[\'texure\']\r\n ds[\'englishDesc\'] = custDecList[\'englishDesc\']\r\n ds[\'salesUnitPrice\'] = custDecList[\'salesUnitPrice\']\r\n ds[\'grossWeightOfInvoice\'] = custDecList[\'grossWeightOfInvoice\']\r\n ds[\'invoiceNetWeight\'] = custDecList[\'invoiceNetWeight\']\r\n ds[\'salesSubTotal\'] = custDecList[\'salesSubTotal\']\r\n ds[\'invoicedAmount\'] = custDecList[\'invoicedAmount\']\r\n details.add(ds)\r\n}\r\nmap[\"list\"] = details\r\nreturn map\r\n```\r\n##新增入库单前.groovy\r\n```Groovy\r\n//回写采购单明细\r\ndef entity = $formValue\r\n\r\ndef details = [[到货明细:details:property]]\r\ndef sum1=0\r\ndef sum2=0\r\nif (entity.directWarehou == \'是\'){\r\nif(details != null && details.size() > 0){\r\n def warehousing= new Warehousing()\r\n warehousing.name4RelatedReceipt=entity.code\r\n warehousing.id4RelatedReceipt=entity.id\r\n warehousing.status=\'yrk\'\r\n warehousing.statusDisplay=\'已入库\'\r\n warehousing.typeDisplay=\'采购入库\'\r\n warehousing.type=\'cgrk\'\r\n warehousing.timeOfApplication = entity.arrivalDate\r\n warehousing.applyForPersonnel=[[创建人员:creatorName:property]]\r\n warehousing.url4RelatedReceipt=\"/action/bizdata/form/f2adfd25-0c60-41fd-a773-8b40cf2345d9/\"+entity.id+\"/view/readonly\"\r\n warehousing.inPeople=entity.warehousingPeople\r\n warehousing.inPeopleDisplay=entity.warehousingPeopleDisplay\r\n //新增入库单\r\n def sum = 0\r\n def detailss=[]\r\n for(item in details){\r\n def detail = new WarehousingDet()\r\n detail.inQty =item.amount4Arrival\r\n detail.productId =item.productId\r\n detail.totalCost =item.price*item.amount4Arrival\r\n detail.productName =item.productName\r\n detail.productUnit =item.productUnit\r\n detail.productCode =item.productCode\r\n detail.shouldInQty=item.amount4Arrival\r\n detail.productModel=item.productModel\r\n detail.price4Warehousing=item.price\r\n sum=sum+item.amount4Arrival\r\n detailss.add(detail)\r\n if(item.amount4Arrival > 0){\r\n //累计到货数量总和\r\n sum1=item.cumulativeAmount+sum1\r\n //全部应到货数量\r\n sum2=item.amount+sum2\r\n def parameterValue = [id : item.purchaseReqDetId, qty : item.amount4Arrival, ruq : item.remainingUnsettledQuantity]\r\n executeManipulation([[更新采购明细单累计到货数量:e3b54a6c-c779-4568-ac4e-1cdf50d03a5a:manipulation]], parameterValue)\r\n }\r\n }\r\n warehousing.details=detailss\r\n warehousing.totalAmount=sum\r\n executeManipulation([[新增采购入库单(直接入库):0612d595-585e-480e-b8dc-097051b65661:manipulation]],parameterValue)\r\n \r\n def map=[:]\r\n map[\"id\"]=[[采购单.ID:purchaseReq.id:property]]\r\n if(sum2<=sum1){\r\n map[\"receivingStatusDisplay\"]=\'全部到货\'\r\n map[\"receivingStatus\"]=\'qbdh\'\r\n }\r\n if(sum2>sum1){\r\n map[\"receivingStatusDisplay\"]=\'部分到货\'\r\n map[\"receivingStatus\"]=\'bfdh\'\r\n }\r\n executeManipulation([[回写采购到到货状态:497f9c66-2840-468e-921f-6d6ed2886228:manipulation]],map)\r\n\r\n /**\r\n * 生成入库单时,根据借贷类型,生成相应的财务凭证。\r\n * 如借贷类型是“采购入库”到“入出库借贷设置”中找“采购入库”的科目配置,生成财务凭证到“财务凭证”下。\r\n **/\r\n \r\n //新增入库单时\r\n def entity = $formValue\r\n \r\n //根据借贷类型生成财务凭证\r\n def financialVoucher = new FinancialVoucher();\r\n \r\n //财务凭证科目明细\r\n def financialVoucherAccountDetails = new financialVoucherAccountDetails();\r\n \r\n def loanSetting = $formValue.[[入出库借贷设置:loanTypeName:property]]\r\n def accountDetailsOfInOut = $formValue.[[入出库借贷设置.科目明细:loanTypeName.accountDetails:property]]\r\n \r\n debug(com.alibaba.fastjson.JSON.toJSONString(loanSetting));\r\n debug(com.alibaba.fastjson.JSON.toJSONString(accountDetailsOfInOut));\r\n \r\n \r\n //来源单据编号(与财务凭证同时生成的单据,如到货单、入库单、退货单)\r\n financialVoucher.sourceDocNo = warehousing.id\r\n \r\n //凭证来源(根据当前使用的页面与凭证来源的字典相匹配)\r\n financialVoucher.sourceOfVoucher = \'cgrk\'\r\n //凭证来源显示值\r\n financialVoucher.sourceOfVoucherDisplay = \'采购入库\'\r\n //记账日期\r\n financialVoucher.bookkeepingDate = new Date()\r\n //生成日期\r\n financialVoucher.generationDate = new Date()\r\n //制证人 \r\n financialVoucher.witnessMaking = [[创建人员ID:creatorId:property]]\r\n //制证人显示值\r\n financialVoucher.witnessMakingDisplay = [[创建人员:creatorName:property]]\r\n //凭证编号\r\n // financialVoucher.documentNumber\r\n \r\n //凭证ID\r\n financialVoucherAccountDetails.voucherId = financialVoucher.id\r\n //凭证凭证编号\r\n financialVoucherAccountDetails.documentNumber = financialVoucher.documentNumber\r\n //凭证贷方金额\r\n financialVoucherAccountDetails.creditAmount = entity.warehousingAmount\r\n //凭证科目余额方向显示值\r\n financialVoucherAccountDetails.accBalDireDisplay = accountDetailsOfInOut.accBalDirDisplay\r\n //凭证序号\r\n financialVoucherAccountDetails.serialNumber = entity.creditTypeNo\r\n //凭证辅助核算\r\n \r\n financialVoucherAccountDetails.supplementaryAccounting = entity.[[供应商显示值:supplierDisplay:property]]\r\n \r\n //凭证科目显示值\r\n financialVoucherAccountDetails.subjectDisplay = accountDetailsOfInOut.subjectDisplay\r\n //凭证借方金额\r\n financialVoucherAccountDetails.debitAmount = entity.warehousingAmount\r\n //凭证科目余额方向\r\n financialVoucherAccountDetails.accBalDire = accountDetailsOfInOut.accBalDir\r\n //凭证摘要\r\n financialVoucherAccountDetails.abstractab = entity.outline\r\n //凭证科目\r\n financialVoucherAccountDetails.subject = accountDetailsOfInOut.subject\r\n //凭证科目名称\r\n financialVoucherAccountDetails.subjectName = accountDetailsOfInOut.subjectName \r\n \r\n //凭证科目明细(借贷类型配置的字段、科目、借贷)\r\n financialVoucher.voucherAccDetails = financialVoucherAccountDetails \r\n}\r\n```\r\n##采购结算单待结算到货明细.sql\r\n```SQL\r\n-- 采购结算单待结算明细\r\nSELECT\r\n dprd.tax_rate,\r\n dprd.price_contains_tax price_contains_tax2,\r\n dprd.total_contains_tax,\r\n dprd.preferential_amount,\r\n dprd.total4_item,\r\n dprd.amount purchase_amount,\r\n dprd.price purchase_price,\r\n dprd.quantity_return return_qty,\r\n dpad.*\r\nFROM\r\n dat_purchase_arrival_det dpad \r\nleft join dat_purchase_req_det dprd on dprd.id = dpad.purchase_req_det_id\r\nWHERE\r\n dpad.remaining_unsettled_quantity> 0 \r\n AND EXISTS (\r\n SELECT\r\n 1 \r\n FROM\r\n dat_purchase_arrival dpa \r\n WHERE\r\n dpa.id = dpad.purchase_arrival_id \r\n AND dpa.supplier = #{supplierId} \r\n <![CDATA[\r\n AND dpa.arrival_date >= DATE(#{startDate}) \r\n AND dpa.arrival_date <= DATE(#{endDate}) \r\n ]]>\r\n )\r\n\r\n--------------------------------------------------\r\n\r\n-- 采购结算单待结算退货明细\r\nSELECT\r\n dprd.tax_rate,\r\n dprd.price_contains_tax price_contains_tax2,\r\n dprd.total_contains_tax,\r\n dprd.preferential_amount,\r\n dprd.total4_item,\r\n dprd.amount purchase_amount,\r\n dprd.price,\r\n dprd.quantityReturn,\r\n\r\n t1.*\r\nFROM\r\n dat_purchase_returns_det t1\r\nleft join dat_purchase_req_det dprd on dprd.id = t1.purchase_req_det_id\r\nWHERE\r\n t1.remaining_unsettled_quantity > 0 \r\n AND EXISTS (\r\n SELECT\r\n 1 \r\n FROM\r\n dat_purchase_returns dpr\r\n WHERE\r\n dpr.id = t1.purchase_returns_id\r\n AND dpr.supplier = \'7e94a536-de04-4abd-8ee5-8ff44529424e\' \r\n AND dpr.return_date >= DATE(\'2000.01.01\') \r\n AND dpr.return_date <= DATE(\'2021.01.01\') \r\n )\r\n\r\n\r\n返回值处理脚本\r\n---------------------------------\r\ndef map=[:]\r\ndef details = []\r\nfor(orderDetail in $returnValue){\r\n def saleDetail = [:]\r\n saleDetail[\'product\'] = orderDetail[\'productId\']\r\n saleDetail[\'productDisplay\'] = orderDetail[\'productDisplay\']\r\n saleDetail[\'productCode\'] = orderDetail[\'productCode\']\r\n saleDetail[\'productUnit\'] = orderDetail[\'productUnit\']\r\n saleDetail[\'amount4Returns\'] = orderDetail[\'amount4Returns\']\r\n saleDetail[\'packagingUnit\'] = orderDetail[\'packagingUnit\']\r\n saleDetail[\'price\'] = orderDetail[\'price\']\r\n saleDetail[\'purReturnAmount\'] = orderDetail[\'purReturnAmount\']\r\n saleDetail[\'returnDisRate\'] = orderDetail[\'returnDisRate\']\r\n saleDetail[\'unitPriceAfterDis\'] = orderDetail[\'unitPriceAfterDis\']\r\n saleDetail[\'retAmountAfterDis\'] = orderDetail[\'retAmountAfterDis\']\r\n saleDetail[\'purReturnDisAmount\'] = orderDetail[\'purReturnDisAmount\']\r\n saleDetail[\'purchaseReturnsId\'] = orderDetail[\'purchaseReturnsId\']\r\n saleDetail[\'cause4Returns\'] = orderDetail[\'cause4Returns\']\r\n saleDetail[\'code4PurchaseReturns\'] = orderDetail[\'code4PurchaseReturns\']\r\n \r\n\r\n saleDetail[\'subtotal\'] = orderDetail[\'total4Item\']\r\n saleDetail[\'notArrivedQty\'] = orderDetail[\'surplus4Unreached\']\r\n saleDetail[\'purchaseArrivalDetailId\'] = orderDetail[\'id\']\r\n saleDetail[\'id4PurchaseReqDet\'] = orderDetail[\'purchaseReqDetId\']\r\n saleDetail[\'purchaseReqId\'] = orderDetail[\'id4PurchaseReq\']\r\n saleDetail[\'currentSettlementQty\'] = orderDetail[\'remainingUnsettledQuantity\']\r\n saleDetail[\'subsidizedFreight\'] = orderDetail[\'subsidizedFreight\']\r\n details.add(saleDetail)\r\n}\r\nmap[\"details\"] = details\r\nreturn map\r\n\r\n参数,返回值类型为键值对\r\ndetails\r\n\r\n\r\n产品显示值 productDisplay\r\n产品 product\r\n产品编号 productDisplay\r\n\r\n产品单位 productUnit\r\n\r\n本次退货数量 amount4Returns\r\n退货数量按包装单位转换 packagingUnit\r\n采购单价 price\r\n采购退货金额 purReturnAmount\r\n退货折扣率 returnDisRate\r\n折扣后单价 unitPriceAfterDis\r\n折扣后退货金额 retAmountAfterDis\r\n采购退货折扣金额 purReturnDisAmount\r\n退货单ID(隐藏)purchaseReturnsld\r\n退货原因(隐藏)cause4Returns\r\n退货单号(隐藏)code4PurchaseReturns\r\n\r\n箱装单位caseNumberUnit 如果是箱装数是1显示CTN,复数则显示CTNS,\r\ncaseNumberUnit\r\n重量单位weight :自动填入KGS \r\nweight\r\n中英品名拼接\r\nchinaAndEnglishNames\r\n```\r\n##根据发货单ID查询报关发票明细.sql\r\n```SQL\r\nselect \r\n s.origin_code product_origin_code,\r\n s.origin_place product_origin,\r\n id.main_lcl,\r\n id.main_lcl_display,\r\n id.supplier_id,\r\n id.invoice_id,\r\n id.quantity_of_goods,\r\n id.number_of_containers,\r\n id.product_id product_name,\r\n id.packing_no,\r\n id.sequence_number,\r\n id.chinese_name,\r\n id.invoice_product_name,\r\n id.product_id,\r\n id.gross_weight,\r\n id.net_weight,\r\n id.sales_order_id,\r\n id.product_id product,\r\n id.invoiced_amount,\r\n id.serial_number,\r\n id.english_name,\r\n id.package_warehousing_no,\r\n id.packing_receipt_id packing_warehouse_entry_id,\r\n id.invoice_product_name billing_name,\r\n p.unit product_unit,\r\n id.billingunitprice billing_unit_price,\r\n p.code product_number,\r\n p.name product_name_display,\r\n p.unit,\r\n p.unit_display,\r\n p.specification,\r\n p.texure,\r\n p.english_desc,\r\n cd.price_contains_tax sales_unit_price,\r\n id.gross_weight * id.number_of_containers gross_weight_of_invoice,\r\n id.net_weight * id.number_of_containers invoice_net_weight,\r\n cd.price_contains_tax * id.quantity_of_goods sales_sub_total\r\nfrom \r\n dat_invoice_details id\r\nleft join dat_product p\r\n on p.id = id.product_id\r\nleft join dat_contract_detail cd\r\n on cd.id4_contract = id.sales_order_id\r\n and cd.product = id.product_id\r\nleft join dat_supplier s \r\n on s.id = id.supplier_id\r\nwhere id.invoice_id in\r\n<foreach item=\"outOrderId\" index=\"index\" collection=\'outOrderIds\' open=\"( \" separator=\",\" close=\" )\">\r\n #{outOrderId}\r\n</foreach> \r\norder by id.packing_no asc\r\n\r\n----------------------------------------\r\n参数处理脚本\r\n$parameterValue.outOrderIds = $parameterValue.outOrderIds.split(\',\');\r\n\r\n----------------------------------------\r\n返回值\r\nreturn [list : $returnValue];\r\n```\r\n##根据id获取发货明细.sql\r\n```SQL\r\nselect \r\n s.origin_code product_origin_code,\r\n s.origin_place product_origin,\r\n sod.supplier_id,\r\n sod.main_lcl,\r\n sod.main_lcl_display,\r\n sod.net_weight,\r\n sod.gross_weight,\r\n sod.invoice_product_name,\r\n sod.sales_order_id,\r\n sod.serial_number,\r\n sod.invoice_id,\r\n sod.sequence_number,\r\n sod.packing_no,\r\n sod.chinese_name,\r\n sod.english_name,\r\n sod.product_unit,\r\n sod.quantity_of_goods,\r\n sod.number_of_containers,\r\n sod.billingunitprice ,\r\n -- sod.invoiced_amount invoice_amount,\r\n sod.product_id product_id,\r\n sod.product_id product_name,\r\n p.unit,\r\n p.unit_display,\r\n p.specification,\r\n p.texure,\r\n p.english_desc,\r\n cd.price_contains_tax sales_unit_price,\r\n sod.gross_weight * sod.number_of_containers gross_weight_of_invoice,\r\n sod.net_weight * sod.number_of_containers invoice_net_weight,\r\n cd.price_contains_tax * sod.quantity_of_goods sales_sub_total,\r\n sod.billingunitprice * sod.quantity_of_goods invoiced_amount \r\n \r\n -- 开票单价\r\n -- 开票总额\r\nfrom \r\n dat_shipping_order_det sod\r\nleft join dat_product p\r\n on p.id = sod.product_id\r\nleft join dat_contract_detail cd\r\n on cd.id4_contract = sod.sales_order_id\r\n and cd.product = sod.product_id\r\nleft join dat_supplier s \r\n on s.id = sod.supplier_id\r\nwhere sod.invoice_id in\r\n<foreach item=\"item\" index=\"index\" collection=\'ids\'\r\n open=\"(\" separator=\",\" close=\" )\">\r\n #{item}\r\n</foreach> \r\norder by sod.packing_no asc \r\n\r\n参数处理脚本\r\n-----------------------------------\r\ndef ids=$parameterValue.ids.split(\",\");\r\n$parameterValue.ids=ids;\r\nreturn $parameterValue;\r\n\r\n返回值处理脚本\r\n-----------------------------------\r\nreturn [list:$returnValue]\r\n```\r\n##根据销售订单代采购明细.sql\r\n```SQL\r\n-- 根据销售订单代采购明细\r\nselect \r\n default_supplier,\r\n default_supplier_display,\r\n quantity_to_be_purchased,\r\n quantity_purchased,\r\n invoice_product_name,\r\n product,\r\n id4_contract,\r\n product_quality,\r\n product_code,\r\n subtotal,\r\n product_price,\r\n total_price_concessions,\r\n settled_amount,\r\n product_price as price_contains_tax,\r\n product_price * amount as total_contains_tax,\r\n 0 as preferential_amount,\r\n 0 as accu_arrival_amount,\r\n product_price as price,\r\n product_price * amount as total4_item,\r\n inventory_of_outer_packing,\r\n inner_box_inventory,\r\n middle_box_capacity,\r\n outer_box_capacity,\r\n number_of_notches_in_inner_box,\r\n qty_of_gaps_in_outer_packing,\r\n inner_box_capacity,\r\n number_of_boxes_in_stock,\r\n middle_box_qty,\r\n medium_box_packaging_display,\r\n inner_box_packaging_display,\r\n outer_packing,\r\n outer_packing_display,\r\n medium_box_packaging,\r\n inner_box_packaging,\r\n inquiry_requirements,\r\n english_name,\r\n english_model,\r\n product_decals,\r\n product_color,\r\n product_model,\r\n date_delivery,\r\n serial_number,\r\n code4_contract,\r\n undelivered_quantity,\r\n quantity_shipped,\r\n quantity_returned,\r\n quantity_not_invoiced,\r\n quantity_not_delivered,\r\n invoiced_quantity,\r\n settled_quantity,\r\n unsettled_quantity,\r\n delivered_quantity,\r\n remark,\r\n product_unit,\r\n product_display,\r\n amount,\r\n 0 as tax_rate,\r\n id as sales_order_detail_id,\r\n amount - ifnull(accu_arrival_amount,0) as surplus4_unreached\r\nfrom \r\n dat_contract_detail\r\nwhere \r\n id4_contract = #{id}\r\norder by serial_number\r\n\r\n-------------------------------------------\r\n\r\n-- return [list:$returnValue];\r\n\r\n-- 列表 list 代采购明细\r\n```\r\n##统计报表查询.sql\r\n```SQL\r\n-- 本月采购金额\r\nSELECT\r\n sum(amount_after_discount)\r\nFROM\r\n dat_purchase_req\r\nWHERE\r\n STATUS != \'canceled\'\r\nAND DATE_FORMAT(req_date, \'%Y%m\') = DATE_FORMAT(CURDATE(), \'%Y%m\')\r\n\r\n\r\n-- 上月采购金额\r\nSELECT\r\n sum(amount_after_discount) amount\r\nFROM\r\n dat_purchase_req\r\nWHERE\r\n STATUS != \'canceled\'\r\nAND\r\n PERIOD_DIFF(DATE_FORMAT(NOW(), \'%Y%m\'),DATE_FORMAT(req_date, \'%Y%m\')) = 1\r\n\r\n\r\n-- 去年同期采购金额\r\nSELECT\r\n sum(amount_after_discount) amount\r\nFROM\r\n dat_purchase_req\r\nWHERE\r\n status != \'canceled\'\r\nAND\r\n YEAR (req_date) = YEAR (NOW() - INTERVAL 1 YEAR)\r\nAND MONTH (req_date) = MONTH (NOW())\r\n\r\n\r\n-- 本年度采购金额\r\nSELECT\r\n sum(amount_after_discount) amount\r\nFROM\r\n dat_purchase_req\r\nWHERE\r\n status != \'canceled\'\r\nAND\r\n YEAR(req_date) = YEAR(NOW())\r\n\r\n\r\n-- 上年度累计采购金额\r\nSELECT\r\n sum(amount_after_discount) amount\r\nFROM\r\n dat_purchase_req\r\nWHERE\r\n status != \'canceled\'\r\nAND\r\n year(req_date) = year((now() - interval 1 year))\r\n\r\n\r\n-- 本年度截止到当前月的月采购金额\r\nSELECT\r\n sum(amount_after_discount) amount\r\nFROM\r\n dat_purchase_req\r\nWHERE\r\n STATUS != \'canceled\'\r\nAND year(req_date) = year(NOW())\r\nAND month(req_date) >= 1 or month(req_date) <= MONTH(NOW())\r\n\r\n\r\n-- 按月份分组汇总采购订单产品金额合计\r\nSELECT\r\n month(req_date) mon,sum(amount_after_discount) amount\r\nFROM\r\n dat_purchase_req\r\nWHERE\r\n STATUS != \'canceled\'\r\nAND year(req_date) = year(NOW())\r\nAND month(req_date) >= 1 or month(req_date) <= MONTH(NOW())\r\ngroup by month(req_date)\r\n\r\n-- 有效供应商询价少于3家的货品,列表供应商报价少于3家的货品名称/货品编号/规格型号/货品单位/已报价的供应商个数;\r\nSELECT\r\n *\r\nFROM\r\n```', 1, 1, '转载', 'publish', NULL, 734, 'https://cdn.rawchen.com/2020/07/bercai-interning/0.jpg', 'ERP(Enterprise Resource Planning)企业资源计划管理系统是现代企业管理的运行模式。它是一个在全公司范围内应用的、高度集成的系统,覆盖了客户、项目、库存和采购、供应、生产等管理工作,通过优化企业资源达到资源效益最大化。', '3,15,16,17');
INSERT INTO `content` VALUES (54, 1, '第二次建站修改', 'ceshi', '2018-09-01 08:25:32', '2021-01-23 18:03:12', '## 建站历程 ##\r\n\r\n 1. 购阿里云ECS服务器 购rawchen.com域名\r\n 2. rawchen.com域名备案 服务器提供服务号\r\n 3. 解析该域名到服务器内网ip上 泛解析@和www解析\r\n 4. 服务器镜像为CentOS 开启服务器各个端口(下方)\r\n 5. 登录到服务器 宝塔搭建LNMP环境\r\n 6. 一键部署Typecho页 宝塔实名开启SLL认证+伪静态+301重定向\r\n 7. 放主题 加插件 增加删除小细节\r\n\r\n> 8888 443 20 39000/40000 888 5900 5901 21 22 80 3389\r\n\r\n## 几个月前建站遇到的问题 ##\r\n\r\n 1. 建站所选用的服务器和高性能HTTP选择不当\r\n 2. 宝塔一键搭建的优缺点\r\n 3. 搭建网页所需的域名目录和域名解析规则\r\n 4. 301重定向的错误\r\n 5. ftp服务未启用\r\n 6. SSL安全证书一直未解决\r\n\r\n\r\n ![宝塔部署LNMP环境][1]\r\n [1]: https://cdn.rawchen.com/2018/09/start/1927465330.png', 0, 1, '原创', 'publish', '', 443, 'https://cdn.rawchen.com/2018/09/start/1927465330.png', '1. 购阿里云ECS服务器 购rawchen.com域名\r\n 2. rawchen.com域名备案 服务器提供服务号\r\n 3. 解析该域名到服务器内网ip上 泛解析@和www解析\r\n 4. 服务器镜像为CentOS 开启服务器各个端口(下方)\r\n 5. 登录到服务器 宝塔搭建LNMP环境', '11');
INSERT INTO `content` VALUES (55, 1, '续写博客', 'write', '2018-09-02 19:10:47', '2021-01-23 18:14:55', '建站体会及续写博客\r\n---------\r\n\r\n第二次建站了,往下拉你们会看到“已在世界的角落里存活了xxx天”,和第一次建站相差了3个月了,为什么做的博客要一下子全删除?这不是没有做备份的原因,因为大学生活就开始了,所以博客现在开始就重写,现在开始博客记录的大部分博文以及技术含量很高的博文都会陆续出现。没有谁一开始就有吐不尽千言万语,没有谁生来无畏。\r\n\r\n第一次建站可以说有很多的困难在等着你,麻烦复杂的解决方案使你想放弃,但是当我想着建好后会是多么个简洁快速的页面时就会果于自信,因为它是你创做出来的,真的赋予了它生命一样,当某一天再翻看这个页面时也许已在世界的角落里存活了xxxxx天时,也许你也改变了很多。\r\n\r\n起风了,唯有努力生存。\r\n![Putty连接服务器][1]\r\n\r\n\r\n [1]: https://cdn.rawchen.com/2018/09/write/3425251094.png', 0, 1, '原创', 'publish', '', 511, 'https://cdn.rawchen.com/2018/09/write/3425251094.png', '第二次建站了,往下拉你们会看到“已在世界的角落里存活了xxx天”,和第一次建站相差了3个月了,为什么做的博客要一下子全删除?这不是没有做备份的原因,因为大学生活就开始了,所以博客现在开始就重写,现在开始博客记录的大部分博文以及技术含量很高的博文都会陆续出现。没有谁一开始就有吐不尽千言万语,没有谁生来无畏。', '11');
INSERT INTO `content` VALUES (56, 4, '音乐搜索mp3下载', 'search-music', '2018-09-05 08:05:48', '2021-01-23 20:10:12', '音乐直链搜索\r\n------\r\n\r\n特制多站合一音乐搜索解决方案\r\n\r\n链接地址:**[https://rawchen.com/music-search][1]**\r\n\r\n分享一个音乐搜索提取工具,如常用网易云,qq音乐,酷狗等。取出直链,下载mp3格式。\r\n可通过音乐名称,音乐ID,音乐地址提取出音乐名称 歌手 ID mp3链接 歌词 地址\r\n\r\n效果如下\r\n----\r\n\r\n现在下载qq音乐及网易云音乐后,想得到一首歌mp3文件,下载后打开该软件下载目录后看到的是加密后的后缀,无法破解。\r\n因此,使用此网站工具可直接得到该歌曲mp3格式下载链接。\r\n\r\n![音乐搜索器][2]\r\n![音乐搜索结果][3]\r\n\r\n\r\n [1]: https://rawchen.com/music-search\r\n [2]: https://cdn.rawchen.com/2018/09/Search-music/1901817909.png\r\n [3]: https://cdn.rawchen.com/2018/09/Search-music/3422109602.png', 0, 1, '原创', 'publish', '', 664, 'https://cdn.rawchen.com/2018/09/Search-music/1901817909.png', '分享一个音乐搜索提取工具,如常用网易云,qq音乐,酷狗等。取出直链,下载mp3格式。\r\n可通过音乐名称,音乐ID,音乐地址提取出音乐名称 歌手 ID mp3链接 歌词 地址', '12');
INSERT INTO `content` VALUES (57, 4, 'Sublime Text 3使用(演示别改别删)', 'sublime-text-3', '2019-01-15 20:05:43', '2021-01-23 21:08:06', '![Sublime Text 3][1]\r\n##前言##\r\n使用Sublime Text 3也有挺久了,最初也是不知道从何下手,满世界地查找资料,但能查阅到的资料,零碎、片面,不够系统,所以一路走来,耗费了大量的时间和精力。写这篇文章一来对自己的经验是一个总结,二来可以给初学者做个系统、全面的指引,让他们少走我当时走过的弯路,从而能快速地掌握Sublime Text这个优秀的编辑器。\r\n\r\n目前我正在使用的版本是最新版**Sublime Text 3 Version3.2.1**, Build 3207,已经相当稳定。所以本文所有讲解均以此版本为准,并以windows 7 x64平台为示例。至于其它的版本也不会有太大的差异。\r\n##特点##\r\nSublime Text 特点\r\n\r\n> 1. Sublime Text 跨平台代码编辑器,Linux、OS X和Windows下均可使用。\r\n> 2. Sublime Text 是可扩展的,并包含大量实用插件,可成倍提高工作效率。\r\n> 3. Sublime Text 可使用注册码免费使用,建议有能力的人付费使用以支持开发者。\r\n## 下载安装 ##\r\n打开官网下载链接 **[http://www.sublimetext.com/3][2]**\r\n\r\n![下载软件][3]\r\n左侧红框内即为win安装版本,右侧框框内为Win便携式文件包版,一般常用win10都是选择左下安装版本64位。我这边就不再演示其它OS X,Linux版本,请自行百度谷歌。\r\n\r\n## 简体中文 ##\r\n\r\n![简体中文设置][4]\r\n软件默认语言为英文,改简中方法:快捷键**`CTRL+SHIFT+P`** 打开命令框 输入**`install`** \r\n点第一项: Package Control: **Install** Package\r\n\r\n![简体中文设置第二步][5]\r\n弹出命令框,输入 **`chinese`** 点击第一项: **Chinese**Localizations。\r\n稍等半分钟即可\r\n![简体中文效果图][6]\r\n\r\n\r\n## 注册码Build 3211 ##\r\n使用免费注册码激活正版软件。\"**帮助**\"菜单 > \"**输入注册码**\"\r\n\r\n```Bash\r\n----- BEGIN LICENSE -----\r\nMember J2TeaM\r\nSingle User License\r\nEA7E-1011316\r\nD7DA350E 1B8B0760 972F8B60 F3E64036\r\nB9B4E234 F356F38F 0AD1E3B7 0E9C5FAD\r\nFA0A2ABE 25F65BD8 D51458E5 3923CE80\r\n87428428 79079A01 AA69F319 A1AF29A4\r\nA684C2DC 0B1583D4 19CBD290 217618CD\r\n5653E0A0 BACE3948 BB2EE45E 422D2C87\r\nDD9AF44B 99C49590 D2DBDEE1 75860FD2\r\n8C8BB2AD B2ECE5A4 EFC08AF2 25A9B864\r\n------ END LICENSE ------\r\n\r\n```\r\n##ConvertToUTF8 中文编码插件##\r\n\r\n![UTF8][7]\r\n\r\na)功能说明:ConvertToUTF8 能将除UTF8编码之外的其他编码文件在 Sublime Text 中转换成UTF8编码,在打开文件的时候一开始会显示乱码,然后一刹那就自动显示出正常的字体,当然,在保存文件之后原文件的编码格式不会改变。\r\n\r\nb)安装方法:快捷键**`CTRL+SHIFT+P`** 打开命令框 输入**`install`** \r\n点第一项: Package Control: **Install** Package\r\n然后在弹出的命令框中输入**`utf8`**,点击第一项等待小会即可安装成功。\r\n\r\n## C/C++编译环境 ##\r\n提供下载编译配置文件**[C.sublime-build][8]**\r\n下载后移动到:\r\nC:\\\\Users\\\\(你的用户名 进C盘找!)\\\\AppData\\\\Roaming\\\\Sublime Text 3\\\\Packages\\\\User\r\n放置后即可在菜单 \"**工具**\" > \"**编译系统**\" 中看到 \"**C**\" 编译\r\n\r\n## F5快捷编译 ##\r\n顾名思义,按下F5编译,在没设置之前是按 **`CTRL+B`** 不方便。\r\n设置方法:\r\n点击菜单\"**首选项**\" > \"*快捷键设置*\"\r\n在右边**Default**中写入:\r\n\r\n```markdown\r\n[\r\n {\"keys\": [\"f5\"], \"command\": \"build\", \"args\": {\"variant\": \"RunInCommand\"}}\r\n]\r\n```\r\n\r\n![F5快捷编译][9]\r\n\r\n## 遇到问题 ##\r\n1.官网Package Control安装出错,需要离线下载在安装。\r\n关闭软件,去下载地址:**[https://github.com/wbond/package_control/releases][10]**\r\n根据你的Sublime Text的版本(菜单\"**帮助**\" > \"**关于Sublime Text**\"可查看)下载zip完后解压改名文件夹 \"**package_control-x.x.x**\" 为 \"**Package Control**\"\r\n然后移动这个\"**Package Control**\"文件夹到:\r\n**C:\\\\Users\\\\(你的用户名 进C盘找!)\\\\AppData\\\\Roaming\\\\Sublime Text 3\\\\Packages**\r\n\r\n![官网Package Control安装出错][11]\r\n\r\n\r\n2.安装完Package Control后可能无法下载各种插件\r\n此时点击 \"**首选项**\" > \"**Package Settings**\" > \"**Package Control**\" > \"**Settings - User**\"\r\n在**`\"bootstrapped\": true,`**后换行写下:\r\n\r\n```Json\r\n\"channels\":\r\n[\r\n \"https://raw.githubusercontent.com/HBLong/channel_v3_daily/master/channel_v3.json\"\r\n],\r\n```\r\n\r\n![无法下载插件解决办法][12]\r\n\r\n\r\n [1]: https://cdn.rawchen.com/2019/01/sublime-text-3/vision3.2.1.png\r\n [2]: http://www.sublimetext.com/3\r\n [3]: https://cdn.rawchen.com/2019/01/sublime-text-3/down.png\r\n [4]: https://cdn.rawchen.com/2019/01/sublime-text-3/chinese.png\r\n [5]: https://cdn.rawchen.com/2019/01/sublime-text-3/chinese2.png\r\n [6]: https://cdn.rawchen.com/2019/01/sublime-text-3/chinese3.png\r\n [7]: https://cdn.rawchen.com/2019/01/sublime-text-3/utf8.png\r\n [8]: https://cdn.rawchen.com/2019/01/sublime-text-3/C.sublime-build\r\n [9]: https://cdn.rawchen.com/2019/01/sublime-text-3/f5.png\r\n [10]: https://github.com/wbond/package_control/releases\r\n [11]: https://cdn.rawchen.com/2019/01/sublime-text-3/pc.png\r\n [12]: https://cdn.rawchen.com/2019/01/sublime-text-3/chajian.png', 1, 6, '原创', 'publish', '', 614, 'https://cdn.rawchen.com/2019/01/sublime-text-3/thumb2.png', '使用Sublime Text 3也有挺久了,最初也是不知道从何下手,满世界地查找资料,但能查阅到的资料,零碎、片面,不够系统,所以一路走来,耗费了大量的时间和精力。写这篇文章一来对自己的经验是一个总结,二来可以给初学者做个系统、全面的指引,让他们少走我当时走过的弯路,从而能快速地掌握Sublime Text这个优秀的编辑器。', '18,19');
INSERT INTO `content` VALUES (58, 4, '你相信1小时能到达世界任何角落吗', 'spacex-everywhere', '2019-11-10 08:25:42', '2021-01-23 21:16:58', '![SpaceX Store][1]\r\n\r\n“You want to wake up in the morning and think the future is going to be great - and that\'s what being a spacefaring civilization is all about. It\'s about believing in the future and thinking that the future will be better than the past. And I can\'t think of anything more exciting than going out there and being among the stars.”\r\n“您想在早晨醒来,并认为未来将是美好的-这就是航天文明的全部意义所在。这是关于相信未来,并认为未来会比过去更好。我想不出要去那里和在星空之中更令人兴奋。”\r\n\r\n**— SPACEX的ELON MUSK**\r\n\r\n\r\n----------\r\n\r\n私人登月任务\r\n---------------------\r\n    2018年9月17日,SpaceX宣布时尚创新者和全球公认的艺术策展人前泽佑作(Yusaku Maezawa)将成为公司2023年首位绕月飞行的私人乘客。迄今为止,只有24人参观了月球,最后一人飞越月球。 1972年。这是首次私人月球客机飞行,其特征是绕月飞行是一项为期一周的任务,将有助于为SpaceX的Starship和Super Heavy(以前称为BFR)的开发提供资金,这是使日常人员可进入的重要一步谁梦想着飞向太空。\r\n\r\n![SpaceX][2]\r\n\r\n<video src=\"https://cdn.rawchen.com/2019/11/spacex/dearMoon-project.mp4\" controls=\"controls\" width=\"100%\">您的浏览器不支持播放该视频!</video>\r\n\r\n![MoonOrbit BFR][3]\r\n\r\nSTARSHIP和超重\r\n-----------\r\n    SpaceX的Starship和Super Heavy Rocket代表了一种完全可重复使用的运输系统,旨在满足所有地球轨道以及月球和火星的需求。由超级重型火箭(助推器)和星舰(飞船)组成的两阶段飞行器最终将取代猎鹰9,猎鹰重型和龙。通过创建可以服务于各种市场的单一系统,SpaceX可以将资源从Falcon 9,Falcon Heavy和Dragon转移到Starship,这是使系统负担得起的基础。\r\n\r\n<video src=\"https://cdn.rawchen.com/2019/11/spacex/RocketHorizon_WEB_1.mp4\" controls=\"controls\" width=\"100%\">您的浏览器不支持播放该视频!</video>\r\n\r\n火星任务\r\n-----------\r\n我们的理想目标是在2022年向火星发送我们的第一个货运任务。第一个任务的目标是确认水资源,识别危害并建立初始电力,采矿和生命支持基础设施。第二个任务是货运和机组人员,目标是在2024年完成,其主要目标是建造推进剂仓库并为将来的机组飞行做准备。这些最初任务的船只也将作为第一个火星基地的起点,从中我们可以在火星上建造一座繁荣的城市,并最终建立一个自我维持的文明。\r\n\r\n![Mars-BFRS][4]\r\n\r\n地对地运输\r\n-----------\r\n使用星舰和超重型飞机,大多数人认为的长途旅行将在不到半小时内完成。除了大大提高速度外,在地球大气层以外的太空中旅行的一大好处是没有摩擦以及湍流和天气。考虑一下我们目前从一个地方到另一个地方花费的时间。现在想象一下,大多数旅程用时不到30分钟,而一小时或更短的时间内即可到达世界任何地方。\r\n\r\n<video src=\"https://cdn.rawchen.com/2019/11/spacex/Starship-Earth-to-Earth-1080.mp4\" controls=\"controls\" width=\"100%\">您的浏览器不支持播放该视频!</video>\r\n\r\n**马斯克的39页火星计划** [https://cdn.rawchen.com/2019/11/spacex/making_life_multiplanetary-2017.pdf][5]\r\n**成为星际物种** [https://cdn.rawchen.com/2019/11/spacex/making_life_multiplanetary_transcript_2017.pdf][6]\r\n\r\n\r\n [5]: https://cdn.rawchen.com/2019/11/spacex/making_life_multiplanetary-2017.pdf\r\n [6]: https://cdn.rawchen.com/2019/11/spacex/making_life_multiplanetary_transcript_2017.pdf\r\n\r\n\r\n [1]: https://cdn.rawchen.com/2019/11/spacex/SpaceX_Store_Header.jpg\r\n [2]: https://cdn.rawchen.com/2019/11/spacex/SpaceX-01.png\r\n [3]: https://cdn.rawchen.com/2019/11/spacex/SpaceX_MoonOrbit_BFR.png\r\n [4]: https://cdn.rawchen.com/2019/11/spacex/mars-bfrs.jpg', 1, 1, '原创', 'publish', '', 252, 'https://cdn.rawchen.com/2019/11/spacex/Starship-Earth-to-Earth.jpg', 'You want to wake up in the morning and think the future is going to be great - and that\'s what being a spacefaring civilization is all about. It\'s about believing in the future and thinking that the future will be better than the past. And I can\'t think of anything more exciting than going out there and being among the stars.您想在早晨醒来,并认为未来将是美好的-这就是航天文明的全部意义所在。这是关于相信未来,并认为未来会比过去更好。我想不出要去那里和在星空之中更令人兴奋。', '20,21,22');
INSERT INTO `content` VALUES (59, 1, '毛豆勇夺COC全球锦标赛总冠军', 'Coc-World-Championship2019', '2019-10-27 20:25:07', '2021-01-23 21:26:43', '<video src=\"https://cdn.rawchen.com/2019/10/Coc-World-Championship2019/Clash-of-Clans-World-Championship-2019.mp4\" controls=\"controls\" width=\"100%\">您的浏览器不支持播放该视频!</video>\r\n\r\n![部落冲突全球锦标赛(CWL)总决赛][1]\r\n\r\n让一追二,Nova毛豆勇夺部落冲突全球锦标赛总冠军!\r\n--------------------------\r\n\r\n部落冲突全球锦标赛(CWL)总决赛10月27日在德国汉堡圆满落幕,来自中国的Nova毛豆和法国劲旅MCES上演了一场激烈的BO3大战,最终Nova毛豆在大比分0:1落后的不利局面下连扳两盘,让一追二击败MCES,夺得2019 CWL全球总冠军!\r\n\r\n![八强赛][2]\r\n注:八强赛及半决赛比分为总星数,决赛为BO3比分\r\n\r\n巅峰之战\r\n----\r\n\r\n决赛的两个部落曾在7月的线下晋级赛有过交手,彼时的Nova毛豆不敌MCES遗憾出局。而从八强赛和半决赛杀出重围后,两支队伍的状态和实力比起晋级赛又有了明显的提升。Nova毛豆渴望在决赛的舞台上完成“复仇”,MCES也期待将自己的统治力延续到最后,一场巅峰对决在这样紧张的气氛下拉开了战幕。\r\n\r\n3星王道,MCES完美开局\r\n-------------\r\n\r\n决赛第一盘大战,两队的先发选手均以2星结束进攻,Nova毛豆以摧毁率优势暂时领先。不过MCES很快便找到进攻节奏,二、三号位选手分别用镜像狗球和天皮蓝轰下3星。反观Nova毛豆,第二、三轮均以83%的摧毁率结束进攻,在总星数上已经大劣。最后两轮进攻, 尽管Nova毛豆打出了一个95% 2星和一个3星的好成绩,总摧毁率也大幅领先,但落后1星成为无法弥补的劣势,最终第一盘以总星数11:12告负。\r\n\r\n\r\n![毛豆配图][3]\r\n\r\n不过Nova毛豆第五名出场的队员Wei(飞猪)保持了稳定的手感,凭借一手绝活天女狗球拿下Nova毛豆决赛的首个3星,虽然无法左右比赛的走势,但也吹响了反攻的号角!\r\n\r\n全面压制,Nova毛豆抢回赛点\r\n---------------\r\n\r\n第一盘比赛后,面对手握两个赛点的MCES,Nova毛豆已经无路可退。也许是Wei在第一盘最后时刻拿下的3星鼓舞了队员们的士气,也许是作为国人部落独苗的他们意识到了处境的危险,决赛第二盘的Nova毛豆开始了坚决的反击!\r\n\r\n第二盘比赛一开始,Nova毛豆的一号位选手Youzi Pi便凭借天女猪拿下3星,而MCES则以88% 2星结束了第一轮进攻,Nova毛豆星数和摧毁率全面领先对手,第二盘比赛的基调也由此定下。\r\n\r\n![Youzi Pi便凭借天女猪拿下3星][4]\r\n\r\n第二盘接下来的比赛中,Nova毛豆没有再给对手任何机会,虽然没有再次打出3星进攻,但他们的防守阵型完全打乱了MCES的进攻节奏。最终,Nova毛豆以总星数11:10扳回一城,将比赛拖入决胜的第三盘。\r\n\r\n一波三折,Nova毛豆最终登顶\r\n---------------\r\n\r\n第三盘第一轮进攻,Youzi Pi以天女野猪再次替队伍拿下3星,取得开门红;而MCES的一号位选手也不甘示弱,天女狗球顺利取得3星,紧咬住比分。第二轮进攻中, Nova毛豆的荷兰籍选手LP最终以98% 2星的成绩结束战斗,而MCES的二号位选手凭借出色的暴力狗球再次拿下3星胜利。Nova毛豆在总星数上落后,局面再次陷入被动。而XC本轮的对手——MCES队长TryHard,正准备在这轮关键的进攻中,给Nova毛豆致命一击。\r\n\r\n\r\n然而谁都没有预料到的是,这位在八强赛和半决赛中保持着100% 3星率的准MVP级选手,在本轮进攻中出现了致命失误——使用暴力狗球的他,没能触发对手五星大本的防御,眼睁睁地看着主力部队越过大本营,被防御建筑消耗殆尽。总决赛赛场上,戏剧性的出现了一次69% 1星的进攻,而这个1星的出现,也彻底改变了比赛的走势。\r\n\r\n![MCES出现了致命失误][5]\r\n\r\n第三轮进攻结束后,赛场形式发生骤变,Nova毛豆追平总星数并在摧毁率上领先。在随后的第四轮进攻中,决赛场上进攻一直受挫的“雷龙小王子” JUAN终于证明了自己,用自己最擅长的暴力雷龙为Nova毛豆拿下三星。而MCES的第四轮进攻以91% 2星收场。毛豆在总星数和摧毁率上全面领先。\r\n\r\n第五轮进攻中,Wei(飞猪)以93% 2星的成绩结束战斗,Nova毛豆也提前锁定了本盘比赛的胜利。随着MCES最后一轮的进攻定格在69% 2星,Nova毛豆以总星数12:11击败MCES,拿下决胜盘的同时,也夺得了本次CWL全球总决赛的冠军!而Nova毛豆的的Wei(飞猪)也凭借在比赛中的顶级表现,拿下总决赛MVP的殊荣!\r\n\r\n6月到8月三次线下晋级赛,在最后关头拿下总决赛门票;八强赛和半决赛一路披荆斩棘,力挫强敌晋级;总决赛劣势局面稳住心态,最终成功翻盘,夺得冠军荣誉。Nova毛豆的CWL之旅充满了磨难和挑战,一路挥洒汗水、顽强拼搏,终于成就了自己的冠军之路!\r\n\r\n恭喜Nova毛豆,夺得2019年部落冲突全球锦标赛总决赛冠军!同时,也感谢MCES、Team Queso、Tribe Gaming、INTZ、QueeN Walkers、Vatang、Shenzhou在总决赛舞台上带来的精彩表现。\r\n\r\n![Nova毛豆夺得部落冲突2019全球锦标赛总冠军][6]\r\n\r\n\r\n [1]: https://cdn.rawchen.com/2019/10/Coc-World-Championship2019/1500x500.jpg\r\n [2]: https://cdn.rawchen.com/2019/10/Coc-World-Championship2019/01.png\r\n [3]: https://cdn.rawchen.com/2019/10/Coc-World-Championship2019/02.png\r\n [4]: https://cdn.rawchen.com/2019/10/Coc-World-Championship2019/03.png\r\n [5]: https://cdn.rawchen.com/2019/10/Coc-World-Championship2019/04.png\r\n [6]: https://cdn.rawchen.com/2019/10/Coc-World-Championship2019/novamaodou.jpg', 0, 1, '转载', 'publish', '', 344, 'https://cdn.rawchen.com/2019/10/Coc-World-Championship2019/Coc-01.jpg', '部落冲突全球锦标赛(CWL)总决赛10月27日在德国汉堡圆满落幕,来自中国的Nova毛豆和法国劲旅MCES上演了一场激烈的BO3大战,最终Nova毛豆在大比分0:1落后的不利局面下连扳两盘,让一追二击败MCES,夺得2019 CWL全球总冠军!', '23,24,25');
INSERT INTO `content` VALUES (60, 4, 'VR经典艺术展示之梵高《星月夜》', 'The_Starry_Night_VR_Experience', '2021-01-23 21:28:06', '2021-01-23 21:32:20', '![The Starry Night VR Experience][1]\r\n## The Starry Night Stereo VR Experience ##\r\nMotion Magic made this fantasic VR Journey according to Van Gogh \"Starry Night\" and \"Arles room\". The Starry Night VR is a 360-degree view short animation, more than 10w people in China has already watched. From Starry Night world, into the shuttle and finally came to the residence of Van Gogh room, warm, bright colors, all materials and texture are made according to the original painting, gives the viewer a strong sense of immersion.\r\n\r\n根据梵高“星光灿烂的夜晚”和“阿尔勒房间”,Motion Magic制作了这个充满幻想的VR之旅。 Starry Night VR是一款360度全景短片动画,已有超过10W的中国人观看过。 从繁星之夜的世界,到梭子,终于来到梵高的房间,温暖,鲜艳的色彩,所有的材料和质地都是根据原画而制作的,给观众带来强烈的沉浸感。\r\n\r\n点击观看测试视频哦(附原视频资源)\r\n\r\n**[https://rawchen.com/videos][2]**\r\n\r\n\r\n [1]: https://cdn.rawchen.com/videos/The_Starry_Night_VR_Experience.jpg\r\n [2]: https://rawchen.com/videos/index2.html', 0, 1, '原创', 'publish', '', 760, 'https://cdn.rawchen.com/videos/The_Starry_Night_VR_Experience.jpg', '根据梵高“星光灿烂的夜晚”和“阿尔勒房间”,Motion Magic制作了这个充满幻想的VR之旅。 Starry Night VR是一款360度全景短片动画,已有超过10W的中国人观看过。 从繁星之夜的世界,到梭子,终于来到梵高的房间,温暖,鲜艳的色彩,所有的材料和质地都是根据原画而制作的,给观众带来强烈的沉浸感。', '26,27,28,29');
INSERT INTO `content` VALUES (61, 1, '巴黎铁塔手工竹制品', 'Three-dimensional-composition', '2019-10-07 20:45:42', '2021-01-23 21:34:09', '> **6,7种竹签、竹片做成的高93CM,基座边长45CM的巴黎铁塔手工竹制品。**\r\n\r\n> **大体制作2个月,4阶段,一二三四层,顶层。制作工程测单位均为mm级别。层次感强,立体空间感强。**\r\n\r\n\r\n----------\r\n\r\n\r\n![手工作品][1]\r\n![手工作品][2]\r\n![手工作品][3]\r\n![手工作品][4]\r\n![手工作品][5]\r\n![手工作品][6]\r\n![手工作品][7]\r\n![手工作品][8]\r\n![手工作品][9]\r\n![手工作品][10]\r\n![手工作品][11]\r\n![手工作品][12]\r\n![手工作品][13]\r\n![手工作品][14]\r\n![手工作品][15]\r\n\r\n\r\n [1]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/00.jpg\r\n [2]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/01.jpg\r\n [3]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/02.jpg\r\n [4]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/03.jpg\r\n [5]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/04.jpg\r\n [6]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/05.jpg\r\n [7]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/06.jpg\r\n [8]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/07.jpg\r\n [9]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/08.jpg\r\n [10]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/09.jpg\r\n [11]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/10.jpg\r\n [12]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/11.jpg\r\n [13]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/12.jpg\r\n [14]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/13.jpg\r\n [15]: https://cdn.rawchen.com/2019/10/Three-dimensional-composition/14.jpg', 1, 1, '原创', 'publish', '', 521, 'https://cdn.rawchen.com/2019/10/Three-dimensional-composition/14.jpg', '6,7种竹签、竹片做成的高93CM,基座边长45CM的巴黎铁塔手工竹制品。\r\n大体制作2个月,4阶段,一二三四层,顶层。制作工程测单位均为mm级别。层次感强,立体空间感强。', '30,31');
INSERT INTO `content` VALUES (62, 4, '《我和我的祖国》电影', 'Me-and-my-country', '2019-10-02 14:30:39', '2021-01-23 21:37:18', '![我和我的祖国][1]\r\n\r\n> 10月2号从学校回到家后晚上特地买了我和我的祖国电影票一个人去看,巨幕厅已经快满人了但是值得一看,整体来说还是不错的,电影通过七部短片拼贴成的一部长片,七部短片依据大致的时间顺序分别选取了从建国到近几年的截点性事件作为大的时代背景,对推动这些历史性时刻或者被其影响的“无名”个体进行歌颂,进而映射祖国几十年来的巨大发展和繁荣兴盛。\r\n\r\n下面依次来聊聊自己对每段故事的印象:\r\n\r\n《前夜》/管虎\r\n-------\r\n\r\n1949年新中国开国大典前夜。那一夜,全中国可能没有人比林治远(黄渤饰)还要更加“兵荒马乱”。\r\n\r\n在典礼前一天的检查会上,所有团队众口一词:“万无一失”。只有他艰难地开口:“电动升旗,不敢确保万无一失。”\r\n\r\n林治远是负责开国大典电动升旗的工程师,但当时的中国在科技上并不发达。一个电动装置,也是足以令所有人紧张的技术难题——中国此前从来没有电动升旗装置,没有经过反复的实验,谁能保证一定成功?\r\n\r\n时间紧迫,只能临阵磨枪,进行“土法试验”。而接下去的一夜,还有着更突发的事件等着他,只有“过五关斩六将”、“铤而走险”这样的词,才足以形容这一夜的惊险。\r\n\r\n这段故事的题眼,是片中至关重要的阻断器。虽然它只是一颗小小的金属球,在整个规模空前的开国大典上并不起眼;但如果它出了问题,那么五星红旗就无法稳当地停住,有被顶飞的风险。这颗小球,其实就喻指开国大典背后,在各个环节里付出努力的每个人。\r\n\r\n![初夜][2]\r\n\r\n《相遇》/张一白\r\n--------\r\n\r\n没想到,七段故事中最令人感动的,是张一白导演的《相遇》。\r\n\r\n《相遇》的事件背景是1964年10月16日,中国第一颗原子弹爆炸成功。而张一白却选择将目光聚焦于一对被命运捉弄的恋人,可谓极为微观的视角。我们从小就在课本上背诵这件事情的历史意义,却从没想过这件事背后的个体印痕。\r\n\r\n张译饰演的高远,是参与原子弹研发项目的科研人员。在一场实验室意外中,他不幸身染重病,渐渐发展为不治之症,随时都有去世的可能。10月16日当天,他偷溜出医院,坐上一辆公交车,却偶遇了自己三年来都未曾联系的女友。\r\n\r\n他们是一对恋人,此时却不能相认——不仅因为小伙子是参加原子弹研发的工作人员,必须要保密自己的身份;更因为自己时日不多,唯有隐瞒才是最好的选择。一个口罩,遮住了一腔不能言说的委屈和遗憾。\r\n\r\n![相遇][3]\r\n虽然命题是“原子弹爆炸”,但这个故事却巧妙地转移了“主战场”,塑造出了一场“身不在场的原子弹爆炸”。80%的情境,都在这辆不断向前、熙熙攘攘的公交车上展开。\r\n\r\n在一个长镜头中,全程只有任素汐饰演的女生开口诉说往事,从初见到情深的点点滴滴;而一旁的张译只能用眼神演戏,却演出了契阔之际的悲情。\r\n\r\n《相遇》中有两幕令人印象深刻:一幕在开头,高远被高压水枪冲洗,血缓缓地从他的口罩中晕染而出;另一幕在结尾,两人在汹涌的人潮中被冲散,高远摘下口罩,对视的一笑成为了他们的最后一面。\r\n\r\n这两幕令人不禁思考:我们为什么会对历史上的宏大事件产生感动?\r\n\r\n我们的感动,并不来自于集体的光辉成就,那是一种矫揉造作;而是来自于“另一种版本”的历史现场——就如同这个故事一般,是无名者的默默隐忍,是他们所要经受的痛苦,是不得不错过的遗憾。\r\n\r\n![夺冠][4]\r\n\r\n《夺冠》/徐峥\r\n-------\r\n\r\n客观而言,《夺冠》在各个层面的指标上,并不是七段故事中最好的,但它却是个人最喜欢的。\r\n\r\n冬冬,一个上海石库门街坊里正过着暑假的小男孩。他是这条街里电工的儿子,上得了屋顶,修得了天线。那年的8月8日,整个街坊都指望靠他来看女排决赛的实况转播——电视信号总在关键时刻掉链子,为了接收信号,冬冬只能一直换着角度待在阳台上。\r\n\r\n可实际上,情窦初开的他此刻还为另一件“人生大事”焦躁着。自己暗恋已久的女孩小美,今天就要移居国外,很可能再也不回来了。眼看着她就要被带去机场,冬冬陷入了两难的“夏日大作战”。\r\n\r\n![夺冠][5]\r\n徐峥用一场小孩之间的“怦然心动”来切入“女排夺冠”这一历史事件,是非常可爱且浪漫的。让人不由自主地觉得,东东就带着他小时候的影子。\r\n\r\n某种意义上,这种处理方式其实和张一白的《相遇》有相似的地方。他们都选择把镜头放在距离事件现场非常遥远的“不在场位置”,细微地切入其中。只不过《相遇》是悲剧,而《夺冠》则是喜剧。\r\n\r\n![回归][6]\r\n\r\n《回归》/薛晓璐\r\n--------\r\n\r\n《回归》相对而言是较为保守、不够出彩的一段故事,因为整个主线情节都必须围绕香港回归当晚的庆典做文章,没办法“出奇制胜”。不过,它的核心概念还是抓得挺好的,那就是“时间”。\r\n\r\n“我们已经等了154年了,不能再多等一秒了”,仪式总指挥与仪仗队升旗手(杜江饰)的这条线,聚焦的是“国家的时间”。\r\n\r\n意外来到香港的小钟表铺老板(任达华饰),被执勤队队长(惠英红饰)所救治,并组建家庭。这条线索,指向的是对故土的思恋、对人的感恩、对工作的负责,是“情感的时间”。\r\n\r\n几条线索,指向的都是同一个瞬间的“必须准时”,那就是1997年7月1日的零点零分。薛晓璐导演重点抓出了这个细节,然后再进行扩散,让叙事线索间产生关系。\r\n\r\n此外,惠英红与任达华在非常有限的戏份空间里,演出了人物的前史和真实的烟火气,算是这段故事中最大的亮点。\r\n\r\n![北京你好][7]\r\n\r\n《北京你好》/宁浩\r\n---------\r\n\r\n宁浩拍《北京你好》这般充满京味的喜剧,的确再合适不过。\r\n\r\n北京的出租车司机(葛优饰),离婚后与家人形同陌路。在抽到2008年北京奥运会的门票之后,他想借此机会与儿子缓和关系。\r\n\r\n但是,在这份大礼未送出之前,他仍旧时时刻刻不忘暴露本性,换着法地到处显摆。每个他见到的人,都要被他的炫耀洗礼一番。不料,意外发生,这张票开启了它的“奇遇”。\r\n\r\n《北京你好》在喜剧背后,又有着宁浩一贯悲欢交融的底色——我们要记住2008年的奥运会,却也不能忘记同一年的汶川地震所带来的伤痛。\r\n\r\n![白昼流星][8]\r\n\r\n《白昼流星》/陈凯歌\r\n----------\r\n\r\n《白昼流星》的摄影与调度维持在水准线上,但叙事逻辑有些问题。\r\n\r\n以“草原传说”作为基点的这则故事,包含着浓厚的寓言感:传说中,若能在白昼看到流星,贫瘠的大地就会变成绿洲;而航天技术的发展,对于贫困的草原牧民而言,就是一串带来希望的“白昼流星”。\r\n\r\n不可否认,它的立意出色,将“新农村扶贫”和“航天航空事业”两件大事糅在一起,构成了互为牵引力的关系——仰望星空与脚踏实地、航天科技发展与扶贫,看似风马牛不相及,实则密不可分。\r\n\r\n![护航][9]\r\n\r\n《护航》/文牧野\r\n--------\r\n\r\n最后一段故事《护航》,由文牧野执导,算是收了个不错的尾。\r\n\r\n《护航》聚焦阅兵式上的“后备飞行员”的故事。她不能正式上台的理由是意料之外、情理之中的——只有最优秀、最全能的飞行员,才能做到最完美的替补,成为飞行表演的最大保障。身为队长的她,只能成为后备的人选。\r\n\r\n每一个幕后不能上场的平凡者,她们的人生故事都值得被挖掘、被书写。文牧野显著的强项在于,他对人物的塑造与情感处理是细腻的。\r\n\r\n《护航》通过飞行时不断偶发的主体回忆,来打捞、回溯这位女飞行员的心路历程——从孩童到少年时光,再到成长过程中所经受的各类挫折。她要打败性别观念的禁锢,要在无法兼顾爱情与事业这件事上做出抉择。这些回忆连同“护航飞行”的主线,塑造起了鲜活的形象。\r\n\r\n![电影院][10]\r\n\r\n\r\n [1]: https://cdn.rawchen.com/2019/10/Me-and-my-country/motherland-01.jpg\r\n [2]: https://cdn.rawchen.com/2019/10/Me-and-my-country/motherland-02.jpg\r\n [3]: https://cdn.rawchen.com/2019/10/Me-and-my-country/motherland-03.jpg\r\n [4]: https://cdn.rawchen.com/2019/10/Me-and-my-country/motherland-04.jpg\r\n [5]: https://cdn.rawchen.com/2019/10/Me-and-my-country/motherland-05.jpg\r\n [6]: https://cdn.rawchen.com/2019/10/Me-and-my-country/motherland-06.jpg\r\n [7]: https://cdn.rawchen.com/2019/10/Me-and-my-country/motherland-07.png\r\n [8]: https://cdn.rawchen.com/2019/10/Me-and-my-country/motherland-08.jpg\r\n [9]: https://cdn.rawchen.com/2019/10/Me-and-my-country/motherland-09.jpg\r\n [10]: https://cdn.rawchen.com/2019/10/Me-and-my-country/motherland-10.jpg', 0, 1, '原创', 'publish', '', 288, 'https://cdn.rawchen.com/2019/10/Me-and-my-country/motherland-01.jpg', '10月2号从学校回到家后晚上特地买了我和我的祖国电影票一个人去看,巨幕厅已经快满人了但是值得一看,整体来说还是不错的,电影通过七部短片拼贴成的一部长片,七部短片依据大致的时间顺序分别选取了从建国到近几年的截点性事件作为大的时代背景,对推动这些历史性时刻或者被其影响的“无名”个体进行歌颂,进而映射祖国几十年来的巨大发展和繁荣兴盛。', '32,33');
INSERT INTO `content` VALUES (63, 4, 'IDEA配置Tomcat', 'idea-tomcat-config', '2020-03-10 20:45:49', '2021-01-23 21:39:43', '#环境\r\n**`Win10 x64`**\r\n**`IDEA Ultimate 2019.1`**\r\n**`Java 1.8.0_221`**\r\n**`Tomcat 7.0.75`**\r\n如果你使用的是IDEA Community Edition(社区版本)则不带任何Web Application网页应用拓展框架,所以我建议你使用IDEA Ultimate旗舰版试用30天,并通过学生认证获得学生福利正版授权license许可证。获得方法:[https://rawchen.com/life/intellij-idea-student.html][1]\r\n\r\n如果你不想使用IDEA,也可以通过Eclipse安装配置Tomcat并搭建JavaWeb程序,不过需要注意的是JSP、Servlet、Tomcat、eclipse之间存在的兼容关系与不同的规范,详情见:[Apache Tomcat的版本][2]。\r\n#下载文件\r\nTomcat7.0.75.exe安装包:[Tomcat7.0.75.exe][3]\r\n或Tomcat8.5.59.exe安装包:[Tomcat8.5.59.exe][32]\r\n\r\nIDEA Ultimate 2019.3安装包:[ideaIU-2019.3.4.exe][4]\r\n#安装Tomcat服务\r\n![安装包][5]\r\n![安装包][6]\r\n![安装包][7]\r\n![安装包][8]\r\n![安装包][9]\r\n#停止Tomcat\r\n默认系统开启了服务,需要关闭不然运行项目会端口冲突\r\n![停止Tomcat服务][10]\r\n#IDEA新建JavaWeb项目\r\n![新建项目][11]\r\n#IDEA配置Tomcat\r\n![编辑配置][12]\r\n![编辑配置][13]\r\n![编辑配置][14]\r\n![编辑配置][15]\r\n![编辑配置][16]\r\n![编辑配置][17]\r\n![编辑配置][18]\r\n![编辑配置][19]\r\n![构建运行][20]\r\n![完成][21]\r\n\r\n#添加Tomcat的依赖库\r\njsp直接输出<% out.print(\"hello world!\") %>会报错,因为没有添加Tomcat本地依赖库。\r\n![lib库依赖][22]\r\n![lib库依赖][23]\r\n![lib库依赖][24]\r\n![lib库依赖][25]\r\n![lib库依赖][27]\r\n![lib库依赖][28]\r\n至此第一个JavaWeb就完成了\r\n\r\n#提示\r\n每次新建Web项目时需添加Tomcat配置以及lib\r\n![新的项目][29]\r\n![新的项目][30]\r\n![新的项目][31]\r\n\r\n\r\n [1]: https://rawchen.com/life/intellij-idea-student.html\r\n [2]: http://tomcat.apache.org/whichversion.html\r\n [3]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/apache-tomcat-7.0.exe\r\n [4]: https://download.jetbrains.8686c.com/idea/ideaIU-2019.3.4.exe\r\n [5]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/1.png\r\n [6]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/2.png\r\n [7]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/3.png\r\n [8]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/4.png\r\n [9]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/5.png\r\n [10]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/6.png\r\n [11]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/7.png\r\n [12]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/8.png\r\n [13]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/9.png\r\n [14]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/10.png\r\n [15]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/11.png\r\n [16]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/12.png\r\n [17]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/13.png\r\n [18]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/14.png\r\n [19]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/15.png\r\n [20]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/16.png\r\n [21]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/17.png\r\n [22]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/22.png\r\n [23]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/23.png\r\n [24]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/24.png\r\n [25]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/25.png\r\n [27]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/27.png\r\n [28]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/28.png\r\n [29]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/18.png\r\n [30]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/19.png\r\n [31]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/20.png\r\n [32]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/apache-tomcat-8.5.59.exe', 1, 1, '原创', 'publish', '', 1075, 'https://cdn.rawchen.com/2020/03/idea-tomcat-config/apachetomcat.jpg', '环境\r\nWin10 x64\r\nIDEA Ultimate 2019.1\r\nJava 1.8.0_221\r\nTomcat 7.0.75\r\n如果你使用的是IDEA Community Edition(社区版本)则不带任何Web Application网页应用拓展框架,所以我建议你使用IDEA Ultimate旗舰版试用30天,并通过学生认证获得学生福利正版授权license许可证。获得方法:https://rawchen.com/life/intellij-idea-student.html', '34,35,36');
INSERT INTO `content` VALUES (64, 1, '图片上传测试', 'img-upload', '2021-01-25 12:52:15', '2021-01-25 12:53:55', '![](/upload/blog/20210125/1611550343610.png)', 0, 1, '原创', 'publish', '', 75, 'https://cdn.jsdelivr.net/gh/rawchen/JsDelivr/ContentThumb/7.jpg', '测试图片上传', '37');
INSERT INTO `content` VALUES (65, 2, 'Blog-SSM博客项目', 'blog-ssm', '2021-10-05 14:54:30', '2021-10-05 14:58:20', '# JavaWeb博客项目\r\n\r\n采用SSM框架的web博客项目——Spring、SpringMVC、MyBatis\r\n\r\n## 项目简介\r\n\r\n博客是一种新型网络交流方式,现已受到大家的欢迎,是网络时代的个人“读者文摘”,是以超级链接为入口的网络日记,它代表着新的生活、工作和学习方式。一个典型的博客结合了文字、图像、其他博客或网站的链接及其它与主题相关的媒体,能够让读者以互动的方式留下意见,是许多博客的重要要素。\r\n\r\n\r\n\r\n## 技术栈\r\n\r\nSpring+SpringMVC+MyBatis+Thymeleaf+JQuery+Js+Ajax+Json+PageHelper\r\n前端组件:AdminLTE+datetimepicker+Chart.js+DataTables+Editor.md+SweetAlert2+tocbot+icheck+Prism+Selectize.js+Lightbox\r\n服务器: Tomcat_8.5.53\r\n数据库: MySQL_5.5.61\r\n开发工具:IDEA_2020.3\r\n界面制作:Bootstrap v4.4.1\r\n\r\n## 项目Demo及GitHub\r\n\r\n> https://blog.rawchen.com\r\n> https://github.com/rawchen/blog-ssm\r\n\r\n## 项目使用说明\r\n\r\n1. 导入结构和数据:blog_ssm.sql\r\n\r\n2. 解压下载zip重命名blog-ssm-master文件夹为blog-ssm,IDEA打开该blog-ssm项目\r\n\r\n3. 修改配置数据库连接文件:druid.properties\r\n\r\n4. 为项目添加Tomcat配置,Deployment下Application context设置为:/\r\n\r\n```\r\nAdmin: 帐号:rawchen 密码:rawchen(密码已改,自行部署)\r\nUser: 帐号:user 密码:user\r\n```\r\n\r\n## 功能描述\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-01.png)\r\n\r\n## 数据库设计\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-02.png)\r\n\r\n## 代码结构\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-03.png)\r\n\r\n## 功能实现部分截图\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-04.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-05.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-06.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-07.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-08.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-09.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-10.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-11.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-12.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-13.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-14.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-15.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-16.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-17.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-18.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-19.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-20.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-21.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-22.png)\r\n\r\n![](https://cdn.rawchen.com/2021/02/blog-ssm/blog-23.png)', 1, 1, '原创', 'publish', '', 1426, 'https://cdn.jsdelivr.net/gh/rawchen/JsDelivr/ContentThumb/4.jpg', 'JavaWeb博客项目,采用SSM框架的web博客项目——Spring、SpringMVC、MyBatis', '34,11');
-- ----------------------------
-- Table structure for file
-- ----------------------------
DROP TABLE IF EXISTS `file`;
CREATE TABLE `file` (
`fid` int(10) NOT NULL AUTO_INCREMENT COMMENT 'id',
`path` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径',
`author_id` int(10) NULL DEFAULT NULL COMMENT '作者id',
`file_status` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件状态',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
`file_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型',
`created_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modified_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`download_count` int(5) NULL DEFAULT NULL COMMENT '下载量',
`file_size` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件大小',
PRIMARY KEY (`fid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 59 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of file
-- ----------------------------
INSERT INTO `file` VALUES (47, '/upload/file/二叉树的基本操作.c', 2, 'publish', '二叉树的基本操作.c', 'code', '2021-02-28 05:34:56', '2021-02-28 05:34:56', 0, '6.65 KB');
INSERT INTO `file` VALUES (48, '/upload/file/idea常用快捷键.txt', 1, 'publish', 'idea常用快捷键.txt', 'txt', '2021-01-13 05:48:19', '2021-02-28 05:48:19', 0, '363 B');
INSERT INTO `file` VALUES (49, '/upload/file/顶尖中文大学计算机专业课程体系.png', 1, 'publish', '顶尖中文大学计算机专业课程体系.png', 'image', '2021-02-28 05:48:19', '2021-02-28 05:48:19', 0, '147.05 KB');
INSERT INTO `file` VALUES (50, '/upload/file/华为秋招_多数组合并问题.doc', 1, 'publish', '华为秋招_多数组合并问题.doc', 'doc', '2021-02-28 05:49:03', '2021-02-28 05:49:03', 0, '35.50 KB');
INSERT INTO `file` VALUES (51, '/upload/file/基于Spring的MVC框架设计与实现.pdf', 1, 'publish', '基于Spring的MVC框架设计与实现.pdf', 'pdf', '2021-02-28 05:49:53', '2021-02-28 05:49:53', 0, '99.70 KB');
INSERT INTO `file` VALUES (52, '/upload/file/d139ab086f5584ae3e3200494c7c4cf678980df7.png', 1, 'publish', 'd139ab086f5584ae3e3200494c7c4cf678980df7.png', 'image', '2021-03-01 02:28:27', '2021-03-01 02:28:27', 0, '7.76 KB');
INSERT INTO `file` VALUES (53, 'https://cdn.rawchen.com/files/files/v4.0-JavaGuide面试突击版夜间模式.pdf', 1, 'publish', 'v4.0-JavaGuide面试突击版夜间模式.pdf', 'pdf', '2021-04-23 06:32:00', '2021-03-06 06:32:00', 0, '23.2 MB');
INSERT INTO `file` VALUES (54, 'https://cdn.rawchen.com/files/files/互联网大厂Java面试专题汇总.pdf', 1, 'publish', '互联网大厂Java面试专题汇总.pdf', 'pdf', '2021-03-06 06:47:44', '2021-03-06 06:47:44', 0, '5.35 MB');
INSERT INTO `file` VALUES (55, 'https://cdn.rawchen.com/files/files/Java开发手册(嵩山版).pdf', 1, 'publish', 'Java开发手册(嵩山版).pdf', 'pdf', '2021-03-16 06:56:04', '2021-03-16 06:56:04', 0, '1.51 MB');
INSERT INTO `file` VALUES (56, '/upload/file/Joins-Tableau-custom-SQL-and-Alteryx.png', 1, 'publish', 'Joins-Tableau-custom-SQL-and-Alteryx.png', 'image', '2021-03-02 06:58:05', '2021-03-16 06:58:05', 0, '324.40 KB');
INSERT INTO `file` VALUES (57, 'https://cdn.rawchen.com/files/files/代码整洁之道.(美)马丁.扫描版.pdf', 1, 'publish', '代码整洁之道.(美)马丁.扫描版.pdf', 'pdf', '2021-04-21 18:35:01', '2021-04-21 18:35:01', 0, '19.05 MB');
INSERT INTO `file` VALUES (58, 'https://cdn.rawchen.com/files/files/v4.0-JavaGuide面试突击版.pdf', 1, 'publish', 'v4.0-JavaGuide面试突击版.pdf', 'pdf', '2021-04-23 19:26:48', '2021-04-21 19:26:48', 0, '23.30 MB');
-- ----------------------------
-- Table structure for log
-- ----------------------------
DROP TABLE IF EXISTS `log`;
CREATE TABLE `log` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
`ua` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'UserAgent',
`browser_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '浏览器名',
`os_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '操作系统名',
`api_path` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '访问api路径',
`ip` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT 'ip地址',
`referer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '来源地址',
`access_time` timestamp NULL DEFAULT NULL COMMENT '访问时间',
`content_id` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '文章id',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_time`(`access_time`) USING BTREE,
INDEX `idx_robot`(`access_time`) USING BTREE,
INDEX `idx_os_id`(`os_name`) USING BTREE,
INDEX `idx_browser_id`(`browser_name`) USING BTREE,
INDEX `idx_content_id`(`content_id`) USING BTREE,
INDEX `idx_referer`(`referer`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 50 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of log
-- ----------------------------
INSERT INTO `log` VALUES (12, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', 'Chrome-87', 'Windows', '/index', '0:0:0:0:0:0:0:1', 'http://localhost:8080/admin', '2021-01-11 13:10:46', NULL);
INSERT INTO `log` VALUES (13, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', 'Chrome-87', 'Windows', '/index', '0:0:0:0:0:0:0:1', 'http://localhost:8080/admin', '2021-01-11 13:11:02', NULL);
INSERT INTO `log` VALUES (14, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', 'Chrome-87', 'Windows', '/index', '0:0:0:0:0:0:0:1', 'http://localhost:8080/admin', '2021-01-11 13:11:12', NULL);
INSERT INTO `log` VALUES (15, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', 'Chrome-87', 'Windows', '/index', '0:0:0:0:0:0:0:1', 'http://localhost:8080/admin', '2021-01-11 13:11:12', NULL);
INSERT INTO `log` VALUES (16, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', 'Chrome-87', 'Windows', '/index', '0:0:0:0:0:0:0:1', 'http://localhost:8080/admin', '2021-01-11 13:11:13', NULL);
INSERT INTO `log` VALUES (17, 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Mobile Safari/537.36', 'Chrome-87', 'Android', '/index', '0:0:0:0:0:0:0:1', 'http://localhost:8080/admin', '2021-01-11 13:11:15', NULL);
INSERT INTO `log` VALUES (18, 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Mobile Safari/537.36', 'Chrome-87', 'Android', '/index', '0:0:0:0:0:0:0:1', 'http://localhost:8080/admin', '2021-01-11 13:11:19', NULL);
INSERT INTO `log` VALUES (19, 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Mobile Safari/537.36', 'Chrome-87', 'Android', '/index', '0:0:0:0:0:0:0:1', 'http://localhost:8080/admin', '2021-01-11 13:11:20', NULL);
INSERT INTO `log` VALUES (20, 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Mobile Safari/537.36', 'Chrome-87', 'Android', '/index', '0:0:0:0:0:0:0:1', 'http://localhost:8080/admin', '2021-01-11 13:11:25', NULL);
-- ----------------------------
-- Table structure for options
-- ----------------------------
DROP TABLE IF EXISTS `options`;
CREATE TABLE `options` (
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统设置:键',
`value` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '系统设计:值',
PRIMARY KEY (`name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of options
-- ----------------------------
INSERT INTO `options` VALUES ('avatar', 'https://rawchen.com/favicon.png');
INSERT INTO `options` VALUES ('description', '大道至简 大简至极');
INSERT INTO `options` VALUES ('email_link', 'https://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=BnRncWVuY2hGd3coZWlr');
INSERT INTO `options` VALUES ('github_link', 'https://github.com/rawchen');
INSERT INTO `options` VALUES ('hobby', '后端开发,极简化,写博客,去看海,摄影');
INSERT INTO `options` VALUES ('icp', '闽ICP备18008354号-1');
INSERT INTO `options` VALUES ('location', 'Xiamen, China');
INSERT INTO `options` VALUES ('posts_list_size', '5');
INSERT INTO `options` VALUES ('qq_link', 'https://wpa.qq.com/msgrd?v=3&uin=2221999792');
INSERT INTO `options` VALUES ('siteUrl', 'https://rawchen.com');
INSERT INTO `options` VALUES ('website_ico', 'https://rawchen.com/favicon.ico');
INSERT INTO `options` VALUES ('website_title', 'RawChen.');
-- ----------------------------
-- Table structure for tag
-- ----------------------------
DROP TABLE IF EXISTS `tag`;
CREATE TABLE `tag` (
`tid` int(4) NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签名',
`count` int(4) NULL DEFAULT 0 COMMENT '总标签数',
PRIMARY KEY (`tid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 38 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of tag
-- ----------------------------
INSERT INTO `tag` VALUES (1, 'IOC', 1);
INSERT INTO `tag` VALUES (2, 'Bootstrap', 0);
INSERT INTO `tag` VALUES (3, 'Coding', 1);
INSERT INTO `tag` VALUES (4, 'SpringMVC', 0);
INSERT INTO `tag` VALUES (5, 'Thymeleaf', 0);
INSERT INTO `tag` VALUES (6, 'Mybatis', 0);
INSERT INTO `tag` VALUES (11, 'BLOG', 2);
INSERT INTO `tag` VALUES (12, 'Music', 1);
INSERT INTO `tag` VALUES (13, '控制反转', 1);
INSERT INTO `tag` VALUES (14, '依赖注入', 1);
INSERT INTO `tag` VALUES (15, 'ERP', 1);
INSERT INTO `tag` VALUES (16, '实习', 1);
INSERT INTO `tag` VALUES (17, '二开', 1);
INSERT INTO `tag` VALUES (18, 'Sublime Text 3', 1);
INSERT INTO `tag` VALUES (19, '文本编辑器', 1);
INSERT INTO `tag` VALUES (20, 'SpaceX', 1);
INSERT INTO `tag` VALUES (21, '马斯克', 1);
INSERT INTO `tag` VALUES (22, 'NASA', 1);
INSERT INTO `tag` VALUES (23, 'COC', 1);
INSERT INTO `tag` VALUES (24, 'Nova毛豆', 1);
INSERT INTO `tag` VALUES (25, '部落冲突', 1);
INSERT INTO `tag` VALUES (26, 'VR', 1);
INSERT INTO `tag` VALUES (27, '星月夜', 1);
INSERT INTO `tag` VALUES (28, 'The Starry Night', 1);
INSERT INTO `tag` VALUES (29, '梵高', 1);
INSERT INTO `tag` VALUES (30, '巴黎铁塔', 1);
INSERT INTO `tag` VALUES (31, '手工制品', 1);
INSERT INTO `tag` VALUES (32, '电影', 1);
INSERT INTO `tag` VALUES (33, '我和我的祖国', 1);
INSERT INTO `tag` VALUES (34, 'JavaWeb', 1);
INSERT INTO `tag` VALUES (35, 'IDEA', 1);
INSERT INTO `tag` VALUES (36, 'Tomcat', 1);
INSERT INTO `tag` VALUES (37, 'Image', 1);
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`uid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
`password` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
`mail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
`url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '博客地址',
`screenName` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称',
`created` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`activated` timestamp NULL DEFAULT NULL COMMENT '活跃时间',
`role` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'user' COMMENT '角色权限',
`photo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像位置',
PRIMARY KEY (`uid`) USING BTREE,
UNIQUE INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 45 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (1, 'rawchen', '6e14ea20fb23bc527d01e849b2f73450', '[email protected]', 'https://rawchen.com', 'RawChen.', '2021-01-08 17:54:08', '2021-01-08 17:54:12', 'administrator', 'https://cravatar.cn/avatar/5e14d26e8ebbf5b28fe734b82043d3ad?s=200');
INSERT INTO `user` VALUES (6, 'user', '0d8d5cd06832b29560745fe4e1b941cf', '[email protected]', NULL, 'user', '2021-01-18 22:17:27', '2021-01-18 22:17:27', 'user', 'https://cravatar.cn/avatar/1680c30fc7df9403fa7d9518dabc9883?s=200');
INSERT INTO `user` VALUES (7, '123213', '4114f0873c42e83c2af05855d6a00fab', '[email protected]', NULL, '123213', '2021-01-18 22:32:37', '2021-01-18 22:32:37', 'user', 'https://cravatar.cn/avatar/25bb0274ea3102380e5c10f5911d74dc?s=200');
INSERT INTO `user` VALUES (37, 'admin', 'd9b1d7db4cd6e70935368a1efb10e377', '[email protected]', NULL, 'admin', '2021-01-19 12:50:02', '2021-01-19 12:50:02', 'user', 'https://cravatar.cn/avatar/5e14d26e8ebbf5b28fe734b82043d3ad?s=200');
INSERT INTO `user` VALUES (38, 'user8', '0d8d5cd06832b29560745fe4e1b941cf', '[email protected]', NULL, 'user', '2021-01-19 12:50:45', '2021-01-19 12:50:45', 'user', 'https://cravatar.cn/avatar/5e14d26e8ebbf5b28fe734b82043d3ad?s=200');
INSERT INTO `user` VALUES (39, '杉渝', '4e3c2d212374c4b1c56e2f4dc6606c3d', '[email protected]', NULL, '杉渝', '2021-01-19 14:15:25', '2021-01-19 14:15:25', 'user', 'https://cravatar.cn/avatar/b9ac41d2108f0a5d66ea057e1b395f22?s=200');
INSERT INTO `user` VALUES (40, '失眠', '31cf24a146bc9c82f45d2a58e2429930', '[email protected]', NULL, '失眠', '2021-01-19 14:26:24', '2021-01-19 14:26:24', 'user', 'https://cravatar.cn/avatar/d58f32f999d02c5de57c9aeedef2569b?s=200');
INSERT INTO `user` VALUES (41, 'kyoya18520', 'bd484da172a2154b1c47ae6aadf99b0a', '[email protected]', NULL, 'kyoya18520', '2021-01-20 10:52:47', '2021-01-20 10:52:47', 'user', 'https://cravatar.cn/avatar/35de170fc7836ea645e1a7d7b307ff6e?s=200');
INSERT INTO `user` VALUES (42, 'asdada', 'ec6a6536ca304edf844d1d248a4f08dc', '[email protected]', NULL, 'asdada', '2021-01-23 22:25:16', '2021-01-23 22:25:16', 'user', 'https://cravatar.cn/avatar/e60e07e6aa600a8f9b83b4697f29deb9?s=200');
INSERT INTO `user` VALUES (43, 'rawchen2', '4114f0873c42e83c2af05855d6a00fab', '[email protected]', NULL, 'rawchen2', '2021-02-15 22:26:19', '2021-02-15 22:26:19', 'user', 'https://cravatar.cn/avatar/db7b79b05566f5708d19a929bba7b31d?s=200');
INSERT INTO `user` VALUES (44, 'rawchen3', '4114f0873c42e83c2af05855d6a00fab', '[email protected]', NULL, 'rawchen3', '2021-02-18 12:28:08', '2021-02-18 12:28:08', 'user', 'https://cravatar.cn/avatar/5e14d26e8ebbf5b28fe734b82043d3ad?s=200');
SET FOREIGN_KEY_CHECKS = 1;