一、效果
有四个模块,分别是采购总金额,采购总数量,采购合同数量,采购合同申请数量通过点击单元格上的月份,展示不同的月份数据,进行单元格和表格之间的联动
二、准备好数据库表和展示数据内容
2.1 建表
在数据库创建好对应的表,下面的sql是oracle数据库作为案例
CREATE TABLE "purchase_data_test"
( "id" NUMBER,
"purchase_time" VARCHAR2(255),
"purchase_type_name" VARCHAR2(255),
"purchase_money" VARCHAR2(255),
"purchase_count" VARCHAR2(255),
"purchase_hetong_count" VARCHAR2(255),
"purchase_shenqing_count" VARCHAR2(255),
PRIMARY KEY ("id")
)
2.2 插入展示数据
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('1', '2023-01-24 05:00:12', '机油', '8000', '30', '2', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('101', '2023-01-24 05:00:12', '零食', '8000', '30', '2', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('102', '2023-02-24 05:00:12', '零食', '8000', '2', '4', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('103', '2023-03-24 05:00:12', '零食', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('104', '2023-04-24 05:00:12', '零食', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('105', '2023-05-24 05:00:12', '零食', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('106', '2023-06-24 05:00:12', '零食', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('107', '2023-07-24 05:00:12', '零食', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('108', '2023-08-24 05:00:12', '零食', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('109', '2023-09-24 05:00:12', '零食', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('110', '2023-10-24 05:00:12', '零食', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('111', '2023-11-24 05:00:12', '零食', '7777', '5', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('112', '2023-12-24 05:00:12', '零食', '500', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('113', '2023-01-24 05:00:12', '工装', '8000', '30', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('114', '2023-02-24 05:00:12', '工装', '8000', '30', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('115', '2023-03-24 05:00:12', '工装', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('116', '2023-04-24 05:00:12', '工装', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('117', '2023-05-24 05:00:12', '工装', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('118', '2023-06-24 05:00:12', '工装', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('119', '2023-07-24 05:00:12', '工装', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('120', '2023-08-24 05:00:12', '工装', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('121', '2023-09-24 05:00:12', '工装', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('122', '2023-10-24 05:00:12', '工装', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('124', '2023-11-24 05:00:12', '零食', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('123', '2023-12-24 05:00:12', '工装', '7777', '5', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('136', '2023-01-24 05:00:12', '工装', '8000', '30', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('135', '2023-02-24 05:00:12', '工装', '8000', '30', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('134', '2023-03-24 05:00:12', '工装', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('133', '2023-04-24 05:00:12', '工装', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('132', '2023-05-24 05:00:12', '工装', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('131', '2023-06-24 05:00:12', '工装', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('130', '2023-07-24 05:00:12', '工装', '4760', '9', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('129', '2023-08-24 05:00:12', '工装', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('128', '2023-09-24 05:00:12', '工装', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('127', '2023-10-24 05:00:12', '工装', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('126', '2023-11-24 05:00:12', '工装', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('125', '2023-12-24 05:00:12', '工装', '7777', '5', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('137', '2023-01-24 05:00:12', '礼品', '8000', '30', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('138', '2023-02-24 05:00:12', '礼品', '8000', '30', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('139', '2023-03-24 05:00:12', '礼品', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('140', '2023-04-24 05:00:12', '礼品', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('141', '2023-05-24 05:00:12', '礼品', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('142', '2023-06-24 05:00:12', '礼品', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('143', '2023-07-24 05:00:12', '礼品', '4760', '9', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('144', '2023-08-24 05:00:12', '礼品', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('145', '2023-09-24 05:00:12', '礼品', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('146', '2023-10-24 05:00:12', '礼品', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('147', '2023-11-24 05:00:12', '礼品', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('148', '2023-12-24 05:00:12', '礼品', '7777', '5', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('160', '2023-01-24 05:00:12', '礼品', '8000', '30', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('159', '2023-02-24 05:00:12', '礼品', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('158', '2023-03-24 05:00:12', '礼品', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('157', '2023-04-24 05:00:12', '礼品', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('156', '2023-05-24 05:00:12', '礼品', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('155', '2023-06-24 05:00:12', '礼品', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('154', '2023-07-24 05:00:12', '礼品', '4760', '9', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('153', '2023-08-24 05:00:12', '礼品', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('152', '2023-09-24 05:00:12', '礼品', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('151', '2023-10-24 05:00:12', '礼品', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('150', '2023-11-24 05:00:12', '礼品', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('149', '2023-12-24 05:00:12', '礼品', '7777', '5', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('161', '2023-01-24 05:00:12', '机油', '8000', '30', '5', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('162', '2023-02-24 05:00:12', '机油', '8000', '2', '5', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('163', '2023-03-24 05:00:12', '机油', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('164', '2023-04-24 05:00:12', '机油', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('165', '2023-05-24 05:00:12', '机油', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('166', '2023-06-24 05:00:12', '机油', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('167', '2023-07-24 05:00:12', '机油', '4760', '9', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('168', '2023-08-24 05:00:12', '机油', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('169', '2023-09-24 05:00:12', '机油', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('170', '2023-10-24 05:00:12', '机油', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('171', '2023-11-24 05:00:12', '机油', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('172', '2023-12-24 05:00:12', '机油', '6000', '5', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('184', '2023-01-24 05:00:12', '办公类', '8000', '30', '6', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('183', '2023-02-24 05:00:12', '办公类', '8000', '2', '6', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('182', '2023-03-24 05:00:12', '办公类', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('181', '2023-04-24 05:00:12', '办公类', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('180', '2023-05-24 05:00:12', '办公类', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('179', '2023-06-24 05:00:12', '办公类', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('178', '2023-07-24 05:00:12', '办公类', '4760', '9', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('177', '2023-08-24 05:00:12', '办公类', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('176', '2023-09-24 05:00:12', '办公类', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('175', '2023-10-24 05:00:12', '办公类', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('174', '2023-11-24 05:00:12', '办公类', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('173', '2023-12-24 05:00:12', '办公类', '6000', '5', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('185', '2023-01-24 05:00:12', '轮胎', '8000', '30', '7', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('186', '2023-02-24 05:00:12', '轮胎', '8000', '2', '7', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('187', '2023-03-24 05:00:12', '轮胎', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('188', '2023-04-24 05:00:12', '轮胎', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('189', '2023-05-24 05:00:12', '轮胎', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('190', '2023-06-24 05:00:12', '轮胎', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('191', '2023-07-24 05:00:12', '轮胎', '4760', '9', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('192', '2023-08-24 05:00:12', '轮胎', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('193', '2023-09-24 05:00:12', '轮胎', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('194', '2023-10-24 05:00:12', '轮胎', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('195', '2023-11-24 05:00:12', '轮胎', '6455', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('196', '2023-12-24 05:00:12', '轮胎', '6000', '5', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('208', '2023-01-24 05:00:12', '木架', '8000', '30', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('207', '2023-02-24 05:00:12', '木架', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('206', '2023-03-24 05:00:12', '木架', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('205', '2023-04-24 05:00:12', '木架', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('204', '2023-05-24 05:00:12', '木架', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('203', '2023-06-24 05:00:12', '木架', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('202', '2023-07-24 05:00:12', '木架', '4760', '9', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('201', '2023-08-24 05:00:12', '木架', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('200', '2023-09-24 05:00:12', '木架', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('199', '2023-10-24 05:00:12', '木架', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('198', '2023-11-24 05:00:12', '木架', '6455', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('197', '2023-12-24 05:00:12', '木架', '6000', '5', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('209', '2023-01-24 05:00:12', '货箱', '8000', '30', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('210', '2023-02-24 05:00:12', '货箱', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('211', '2023-03-24 05:00:12', '货箱', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('212', '2023-04-24 05:00:12', '货箱', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('213', '2023-05-24 05:00:12', '货箱', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('214', '2023-06-24 05:00:12', '货箱', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('215', '2023-07-24 05:00:12', '货箱', '4760', '9', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('216', '2023-08-24 05:00:12', '货箱', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('217', '2023-09-24 05:00:12', '货箱', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('218', '2023-10-24 05:00:12', '货箱', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('219', '2023-11-24 05:00:12', '货箱', '6455', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('220', '2023-12-24 05:00:12', '货箱', '6000', '5', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('232', '2023-01-24 05:00:12', '电视', '8000', '30', '8', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('231', '2023-02-24 05:00:12', '电视', '8000', '2', '8', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('230', '2023-03-24 05:00:12', '电视', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('229', '2023-04-24 05:00:12', '电视', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('228', '2023-05-24 05:00:12', '电视', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('227', '2023-06-24 05:00:12', '电视', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('226', '2023-07-24 05:00:12', '电视', '4760', '9', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('225', '2023-08-24 05:00:12', '电视', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('224', '2023-09-24 05:00:12', '电视', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('223', '2023-10-24 05:00:12', '电视', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('222', '2023-11-24 05:00:12', '电视', '6455', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('221', '2023-12-24 05:00:12', '电视', '6000', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('233', '2023-01-24 05:00:12', '空调', '8000', '30', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('234', '2023-02-24 05:00:12', '空调', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('235', '2023-03-24 05:00:12', '空调', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('236', '2023-04-24 05:00:12', '空调', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('237', '2023-05-24 05:00:12', '空调', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('238', '2023-06-24 05:00:12', '空调', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('239', '2023-07-24 05:00:12', '空调', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('240', '2023-08-24 05:00:12', '空调', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('241', '2023-09-24 05:00:12', '空调', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('242', '2023-10-24 05:00:12', '空调', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('243', '2023-11-24 05:00:12', '空调', '6455', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('244', '2023-12-24 05:00:12', '空调', '6000', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('2', '2023-02-24 05:00:12', '机油', '8000', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('3', '2023-03-24 05:00:12', '机油', '8000', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('4', '2023-04-24 05:00:12', '机油', '8000', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('5', '2023-05-24 05:00:12', '机油', '8000', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('6', '2023-06-24 05:00:12', '机油', '8000', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('7', '2023-07-24 05:00:12', '机油', '3205', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('8', '2023-08-24 05:00:12', '机油', '3205', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('9', '2023-01-24 05:00:12', '保鲜膜', '3205', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('10', '2023-01-24 05:00:12', '塑料桶', '3205', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('20', '2023-09-24 05:00:12', '机油', '3205', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('19', '2023-10-24 05:00:12', '机油', '8000', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('18', '2023-12-24 05:00:12', '机油', '500', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('17', '2023-11-24 05:00:12', '机油', '6455', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('16', '2023-01-24 05:00:12', '承运商', '8000', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('15', '2023-02-24 05:00:12', '承运商', '4650', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('14', '2023-03-24 05:00:12', '承运商', '4650', '20', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('13', '2023-04-24 05:00:12', '承运商', '4650', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('12', '2023-05-24 05:00:12', '承运商', '4650', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('11', '2024-06-24 05:00:12', '承运商', '4650', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('21', '2023-07-24 05:00:12', '承运商', '4650', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('22', '2023-08-24 05:00:12', '承运商', '4650', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('23', '2023-09-24 05:00:12', '承运商', '4650', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('24', '2023-10-24 05:00:12', '装卸商', '4650', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('25', '2023-12-10 05:00:12', '装卸商', '7777', '5', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('26', '2023-11-10 05:00:12', '装卸商', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('27', '2023-11-11 05:00:12', '装卸商', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('28', '2023-04-11 05:00:12', '电脑', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('29', '2023-04-11 05:00:12', '电脑', '8000', '2', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('30', '2023-05-11 05:00:12', '纸箱', '8000', '2', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('40', '2023-06-11 05:00:12', '电脑', '8000', '8', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('39', '2023-07-11 05:00:12', '纸箱', '8000', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('38', '2023-08-11 05:00:12', '纸箱', '8000', '8', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('37', '2023-09-24 05:00:12', '纸箱', '8000', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('36', '2023-12-24 05:00:12', '纸箱', '500', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('35', '2023-11-24 05:00:12', '纸箱', '6455', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('34', '2023-11-24 05:00:12', '轮胎', '6455', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('33', '2023-11-24 05:00:12', '轮胎', '6455', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('32', '2023-09-24 05:00:12', '轮胎', '8000', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('31', '2023-08-24 05:00:12', '轮胎', '8000', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('41', '2023-05-24 05:00:12', '轮胎', '8000', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('42', '2023-04-24 05:00:12', '轮胎', '8000', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('43', '2023-05-24 05:00:12', '椅子', '8000', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('44', '2023-11-24 05:00:12', '椅子', '6455', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('45', '2023-04-24 05:00:12', '椅子', '5620', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('46', '2023-09-24 05:00:12', '椅子', '5620', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('47', '2023-12-24 05:00:12', '电脑', '500', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('48', '2023-03-24 05:00:12', '电脑', '5620', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('49', '2023-09-24 05:00:12', '椅子', '5620', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('50', '2023-08-24 05:00:12', '叉车', '5620', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('51', '2023-08-24 05:00:12', '电脑', '5620', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('52', '2023-08-24 05:00:12', '电脑', '5620', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('53', '2023-08-24 05:00:12', '电脑', '5620', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('54', '2023-08-24 05:00:12', '电脑', '5620', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('55', '2023-08-24 05:00:12', '电脑', '8000', '30', '5', '6');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('56', '2023-08-24 05:00:12', '电脑', '8000', '30', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('57', '2023-07-24 05:00:12', '电脑', '8000', '30', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('58', '2023-07-24 05:00:12', '电脑', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('59', '2023-07-24 05:00:12', '电脑', '8000', '8', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('60', '2023-07-24 05:00:12', '电脑', '8000', '8', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('61', '2023-07-24 05:00:12', '电脑', '8000', '8', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('62', '2023-07-24 05:00:12', '清洁类', '8000', '8', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('63', '2024-04-24 05:00:12', '电脑', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('64', '2023-06-24 05:00:12', '电脑', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('65', '2023-06-24 05:00:12', '清洁类', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('66', '2023-05-24 05:00:12', '清洁类', '8000', '8', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('67', '2023-04-24 05:00:12', '清洁类', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('68', '2023-03-24 05:00:12', '清洁类', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('69', '2023-01-24 05:00:12', '电脑', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('70', '2023-02-24 05:00:12', '电脑', '8000', '2', '0', '0');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('71', '2023-03-24 05:00:12', '电脑', '4760', '2', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('72', '2023-04-24 05:00:12', '电脑', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('73', '2023-05-24 05:00:12', '电脑', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('74', '2023-06-24 05:00:12', '电脑', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('75', '2023-07-24 05:00:12', '电脑', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('76', '2023-08-24 05:00:12', '电脑', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('77', '2023-09-24 05:00:12', '电脑', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('78', '2023-10-24 05:00:12', '电脑', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('79', '2023-11-24 05:00:12', '电脑', '7777', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('80', '2023-125-24 05:00:12', '电脑', '500', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('81', '2023-05-24 05:00:12', '食品', '4760', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('82', '2023-06-24 05:00:12', '食品', '4760', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('83', '2023-07-24 05:00:12', '食品', '9522', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('84', '2023-08-24 05:00:12', '食品', '9522', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('85', '2023-09-24 05:00:12', '食品', '9522', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('86', '2023-04-24 05:00:12', '叉车', '9522', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('87', '2023-04-24 05:00:12', '叉车', '9522', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('88', '2023-10-24 05:00:12', '食品', '9522', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('89', '2023-11-24 05:00:12', '食品', '7777', '5', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('90', '2023-12-24 05:00:12', '食品', '500', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('91', '2023-03-24 05:00:12', '办公类', '9522', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('92', '2023-04-24 05:00:12', '办公类', '8000', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('93', '2023-05-24 05:00:12', '办公类', '8000', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('94', '2023-06-24 05:00:12', '办公类', '6666', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('95', '2023-07-24 05:00:12', '办公类', '6666', '8', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('96', '2023-08-24 05:00:12', '办公类', '6666', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('97', '2023-09-24 05:00:12', '食品', '6666', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('98', '2023-09-24 05:00:12', '办公类', '6666', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('99', '2023-10-24 05:00:12', '办公类', '6666', '6', '8', '8');
INSERT INTO "purchase_data_test"("id", "purchase_time", "purchase_type_name", "purchase_money", "purchase_count", "purchase_hetong_count", "purchase_shenqing_count") VALUES ('100', '2023-11-24 05:00:12', '办公类', '7777', '5', '8', '8');
三、帆软下载
以帆软10.0版本作为案例
帆软下载地址(可以在历史版本选择10.0版本):免费下载FineReport - FineReport报表官网
四、帆软操作
打开帆软以后,新建一个文件对其操作
4.1 设置纸张背景
4.1.1 设置纸张背景
点击左上角的模板->页面设置->纸张改为横向->纸张大小自己定义
4.1.2 设置纸张颜色
点击左上角的模板->点击纸张背景,选择对应的颜色
4.1.3 设置表头
4.1给表格添加内容,添加好对应的标题,添加好1月~12月
4.1.4 将月份单元格设置成控件
选中单元格 -> 点击右边选中控件功能 -> 选择按钮控件(控件名称可以随便填写) -> 点击事件 ->添加事件(选择点击) -> 添加对应代码
代码:
$.ajax({
url: '/webroot/decision/view/form?op=fr_dialog&cmd=parameters_d',
type: 'POST',
data: {
"ptime": ptime,
"pmonth":pmonth
},
headers: {
sessionID: session
},
complete: function(res, status) {
if (window.FR && FR.Chart && FR.Chart.WebUtils) {
FR.Chart.WebUtils.clearCharts();//清除圖表内容
}
_g().loadContentPane();//加載報表内容
}
});
注意点:这里只有1月单元格的代码,剩下的单元格也需要执行一样的操作,只需要改对应的值就可以
4.2 采购总金额模块
4.2.1 新建采购总金额模块数据集
注意点:ptime是作为参数传递
select a.分类名称,ROUND(a.金额/10000, 2) 金额 from (select "purchase_type_name" 分类名称,sum("purchase_money") 金额 from "purchase_data_test"
where 1=1
${if(len(ptime)==0 ,"","and \"purchase_time\" like '%-"+ptime+"%'")}
group by "purchase_type_name" order by sum("purchase_money") desc) a where rownum <=10
4.2.2 插入柱形图
创建完数据集,点击单元格,右键 -> 单元格元素 -> 插入图表 -> 选择柱形图 -> 设置对应的数据集内容
4.2.3 给柱形图添加样式
添加标题内容:点击标题函数,内容为:CONCATENATE($pmonth, '采购总金额')
给标签,图例,系列,坐标轴添加对应的样式
坐标轴标签格式代码
function(){
return this+"万元"
}
4.2.4 柱形图效果
注意点:预览的时候要选择填报预览效果
4.3 采购总数量模块
4.3.1 新建采购总数量数据集
select a.分类名称,a.数量,a."采购日期",substr(a."采购日期",6,7) 月份 from (select "purchase_type_name" 分类名称,SUBSTR("purchase_time", 0, 7) 采购日期,sum("purchase_count") 数量 from "purchase_data_test"
where 1=1
${if(len(ptime)==0 ,"","and \"purchase_time\" like '%-"+ptime+"%'")}
group by "purchase_type_name",SUBSTR("purchase_time", 0, 7) order by sum("purchase_count") desc) a where rownum <=10
--and 采购日期 ='${left(monthdelta("2023-01-01",mod(datetonumber(now())/1000,12)),7)}'
order by a.数量 asc
4.3.2 插入条形图
创建完数据集,右键->单元格元素 -> 插入图表 -> 条形图
4.3.3 给条形图添加样式
设置标题,点击对应函数,代码为:CONCATENATE($pmonth, '采购总数量')
x轴标签格式返回的代码
function(){ return this+"件"; }
4.3.4 预览效果
预览要为填报预览
4.4 采购合同数量模块
4.4.1 新建采购合同数量数据集
select a.分类名称,a.数量,a."采购日期" from (select "purchase_type_name" 分类名称,SUBSTR("purchase_time", 6, 2) 采购日期,sum("purchase_hetong_count") 数量 from "purchase_data_test"
where 1=1
${if(len(ptime)==0 ,"","and \"purchase_time\" like '%-"+ptime+"%'")}
group by "purchase_type_name",SUBSTR("purchase_time", 6, 2) order by sum("purchase_hetong_count") desc) a where 1=1
and a.数量 > 0
--and 采购日期 ='${left(monthdelta("2023-01-01",mod(datetonumber(now())/1000,12)),7)}'
order by a.采购日期 asc
4.4.2 插入堆积柱形图
创建完数据集,右键->单元格元素 -> 插入图表 -> 柱形图 -> 堆积柱形图
4.4.3 给堆形图添加样式
给数据赋值,设置标题,图例,标签,系列,坐标轴
标题代码为:CONCATENATE($pmonth, '采购合同申请数量')
4.4.4 柱形堆积图预览效果
预览需要为填报预览
4.5 采购合同申请数量模块
4.5.1 新建采购合同申请数据集
select a.分类名称,a.数量 数量 from (select "purchase_type_name" 分类名称,sum("purchase_shenqing_count") 数量 from "purchase_data_test"
where 1=1
${if(len(ptime)==0 ,"","and \"purchase_time\" like '%-"+ptime+"%'")}
group by "purchase_type_name" order by sum("purchase_shenqing_count") desc) a where rownum <=10
4.5.2 插入饼状图
数据集创建完成以后,右键->插入图表->插入饼状图
4.5.3 给饼状图添加样式
标题代码为:CONCATENATE($pmonth, '采购合同申请数量')
4.5.4 预览效果
预览为填报预览