优化出入库单据和财务的资源权限的控制

This commit is contained in:
季圣华
2020-09-13 19:00:03 +08:00
parent 4fe0fc3970
commit 0f8e54d680
25 changed files with 415 additions and 296 deletions

View File

@@ -10,7 +10,7 @@ Target Server Type : MYSQL
Target Server Version : 50704 Target Server Version : 50704
File Encoding : 65001 File Encoding : 65001
Date: 2020-09-08 00:18:35 Date: 2020-09-13 18:47:08
*/ */
SET FOREIGN_KEY_CHECKS=0; SET FOREIGN_KEY_CHECKS=0;
@@ -47,6 +47,7 @@ CREATE TABLE `jsh_account_head` (
`type` varchar(50) DEFAULT NULL COMMENT '类型(支出/收入/收款/付款/转账)', `type` varchar(50) DEFAULT NULL COMMENT '类型(支出/收入/收款/付款/转账)',
`organ_id` bigint(20) DEFAULT NULL COMMENT '单位Id(收款/付款单位)', `organ_id` bigint(20) DEFAULT NULL COMMENT '单位Id(收款/付款单位)',
`hands_person_id` bigint(20) DEFAULT NULL COMMENT '经手人id', `hands_person_id` bigint(20) DEFAULT NULL COMMENT '经手人id',
`creator` bigint(20) DEFAULT NULL COMMENT '操作员',
`change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(优惠/收款/付款/实付)', `change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(优惠/收款/付款/实付)',
`total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额', `total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额',
`account_id` bigint(20) DEFAULT NULL COMMENT '账户(收款/付款)', `account_id` bigint(20) DEFAULT NULL COMMENT '账户(收款/付款)',
@@ -59,20 +60,21 @@ CREATE TABLE `jsh_account_head` (
KEY `FK9F4C0D8DB610FC06` (`organ_id`), KEY `FK9F4C0D8DB610FC06` (`organ_id`),
KEY `FK9F4C0D8DAAE50527` (`account_id`), KEY `FK9F4C0D8DAAE50527` (`account_id`),
KEY `FK9F4C0D8DC4170B37` (`hands_person_id`) KEY `FK9F4C0D8DC4170B37` (`hands_person_id`)
) ENGINE=InnoDB AUTO_INCREMENT=106 DEFAULT CHARSET=utf8 COMMENT='财务主表'; ) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8 COMMENT='财务主表';
-- ---------------------------- -- ----------------------------
-- Records of jsh_account_head -- Records of jsh_account_head
-- ---------------------------- -- ----------------------------
INSERT INTO `jsh_account_head` VALUES ('97', '收入', '58', '16', '10.000000', '10.000000', '17', 'SR20191228121609', '2019-12-28 00:00:00', '备注1', '63', '0'); INSERT INTO `jsh_account_head` VALUES ('97', '收入', '58', '16', '63', '10.000000', '10.000000', '17', 'SR20191228121609', '2019-12-28 00:00:00', '备注1', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('98', '支出', '57', '16', '-20.000000', '-20.000000', '17', 'ZC20191228121854', '2019-12-28 12:18:54', '', '63', '0'); INSERT INTO `jsh_account_head` VALUES ('98', '支出', '57', '16', '63', '-20.000000', '-20.000000', '17', 'ZC20191228121854', '2019-12-28 12:18:54', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('99', '收款', '58', '16', null, '20.000000', null, 'SK20191228121908', '2019-12-28 12:19:08', '', '63', '0'); INSERT INTO `jsh_account_head` VALUES ('99', '收款', '58', '16', '63', null, '20.000000', null, 'SK20191228121908', '2019-12-28 12:19:08', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('100', '付款', '68', '16', null, '-20.000000', null, 'FK20191228121920', '2019-12-28 12:19:20', '', '63', '0'); INSERT INTO `jsh_account_head` VALUES ('100', '付款', '68', '16', '63', null, '-20.000000', null, 'FK20191228121920', '2019-12-28 12:19:20', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('101', '转账', null, '16', '-20.000000', '-20.000000', '18', 'ZZ20191228121932', '2019-12-28 12:19:32', '', '63', '0'); INSERT INTO `jsh_account_head` VALUES ('101', '转账', null, '16', '63', '-20.000000', '-20.000000', '18', 'ZZ20191228121932', '2019-12-28 12:19:32', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('102', '收预付款', '60', '16', null, '1000.000000', null, 'SYF20191228121945', '2019-12-28 12:19:45', '', '63', '0'); INSERT INTO `jsh_account_head` VALUES ('102', '收预付款', '60', '16', '63', null, '1000.000000', null, 'SYF20191228121945', '2019-12-28 12:19:45', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('103', '收入', '58', '16', '20.000000', '20.000000', '18', 'SR20200721163125', '2020-07-21 16:31:25', '', '63', '0'); INSERT INTO `jsh_account_head` VALUES ('103', '收入', '58', '16', '63', '20.000000', '20.000000', '18', 'SR20200721163125', '2020-07-21 16:31:25', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('104', '收入', '71', '16', '60.000000', '50.000000', '18', 'SR20200721225712', '2020-07-21 00:00:00', 'bb', '63', '0'); INSERT INTO `jsh_account_head` VALUES ('104', '收入', '71', '16', '63', '60.000000', '50.000000', '18', 'SR20200721225712', '2020-07-21 00:00:00', 'bb', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('105', '转账', null, '16', '-11.000000', '-11.000000', '18', 'ZZ20200722005429', '2020-07-22 00:54:29', '', '63', '0'); INSERT INTO `jsh_account_head` VALUES ('105', '转账', null, '16', '63', '-11.000000', '-11.000000', '18', 'ZZ20200722005429', '2020-07-22 00:54:29', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('106', '收入', '58', '16', '131', '1000.000000', '1000.000000', '17', 'SR20200913184412', '2020-09-13 18:44:12', '', '63', '0');
-- ---------------------------- -- ----------------------------
-- Table structure for jsh_account_item -- Table structure for jsh_account_item
@@ -91,7 +93,7 @@ CREATE TABLE `jsh_account_item` (
KEY `FK9F4CBAC0AAE50527` (`account_id`), KEY `FK9F4CBAC0AAE50527` (`account_id`),
KEY `FK9F4CBAC0C5FE6007` (`header_id`), KEY `FK9F4CBAC0C5FE6007` (`header_id`),
KEY `FK9F4CBAC0D203EDC5` (`in_out_item_id`) KEY `FK9F4CBAC0D203EDC5` (`in_out_item_id`)
) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8 COMMENT='财务子表'; ) ENGINE=InnoDB AUTO_INCREMENT=108 DEFAULT CHARSET=utf8 COMMENT='财务子表';
-- ---------------------------- -- ----------------------------
-- Records of jsh_account_item -- Records of jsh_account_item
@@ -105,6 +107,7 @@ INSERT INTO `jsh_account_item` VALUES ('103', '102', '17', null, '1000.000000',
INSERT INTO `jsh_account_item` VALUES ('104', '103', null, '22', '20.000000', '', '63', '0'); INSERT INTO `jsh_account_item` VALUES ('104', '103', null, '22', '20.000000', '', '63', '0');
INSERT INTO `jsh_account_item` VALUES ('105', '104', null, '22', '50.000000', '', '63', '0'); INSERT INTO `jsh_account_item` VALUES ('105', '104', null, '22', '50.000000', '', '63', '0');
INSERT INTO `jsh_account_item` VALUES ('106', '105', '17', null, '11.000000', '', '63', '0'); INSERT INTO `jsh_account_item` VALUES ('106', '105', '17', null, '11.000000', '', '63', '0');
INSERT INTO `jsh_account_item` VALUES ('107', '106', null, '22', '1000.000000', '', '63', '0');
-- ---------------------------- -- ----------------------------
-- Table structure for jsh_depot -- Table structure for jsh_depot
@@ -143,11 +146,11 @@ CREATE TABLE `jsh_depot_head` (
`sub_type` varchar(50) DEFAULT NULL COMMENT '出入库分类', `sub_type` varchar(50) DEFAULT NULL COMMENT '出入库分类',
`default_number` varchar(50) DEFAULT NULL COMMENT '初始票据号', `default_number` varchar(50) DEFAULT NULL COMMENT '初始票据号',
`number` varchar(50) DEFAULT NULL COMMENT '票据号', `number` varchar(50) DEFAULT NULL COMMENT '票据号',
`oper_person_name` varchar(50) DEFAULT NULL COMMENT '操作员名字',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
`oper_time` datetime DEFAULT NULL COMMENT '出入库时间', `oper_time` datetime DEFAULT NULL COMMENT '出入库时间',
`organ_id` bigint(20) DEFAULT NULL COMMENT '供应商id', `organ_id` bigint(20) DEFAULT NULL COMMENT '供应商id',
`hands_person_id` bigint(20) DEFAULT NULL COMMENT '采购/领料-经手人id', `hands_person_id` bigint(20) DEFAULT NULL COMMENT '采购/领料-经手人id',
`creator` bigint(20) DEFAULT NULL COMMENT '操作员',
`account_id` bigint(20) DEFAULT NULL COMMENT '账户id', `account_id` bigint(20) DEFAULT NULL COMMENT '账户id',
`change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(收款/付款)', `change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(收款/付款)',
`total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额', `total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额',
@@ -171,44 +174,45 @@ CREATE TABLE `jsh_depot_head` (
KEY `FK2A80F214C4170B37` (`hands_person_id`), KEY `FK2A80F214C4170B37` (`hands_person_id`),
KEY `FK2A80F214B610FC06` (`organ_id`), KEY `FK2A80F214B610FC06` (`organ_id`),
KEY `FK2A80F214AAE50527` (`account_id`) KEY `FK2A80F214AAE50527` (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=229 DEFAULT CHARSET=utf8 COMMENT='单据主表'; ) ENGINE=InnoDB AUTO_INCREMENT=230 DEFAULT CHARSET=utf8 COMMENT='单据主表';
-- ---------------------------- -- ----------------------------
-- Records of jsh_depot_head -- Records of jsh_depot_head
-- ---------------------------- -- ----------------------------
INSERT INTO `jsh_depot_head` VALUES ('189', '入库', '采购', 'CGRK00000000261', 'CGRK00000000261', '季圣华', '2019-04-10 22:25:49', '2020-02-20 23:51:03', '57', null, '17', '-120.000000', '-120.000000', '现付', '', '', null, '', '0.000000', '0.000000', '120.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('189', '入库', '采购', 'CGRK00000000261', 'CGRK00000000261', '2019-04-10 22:25:49', '2020-02-20 23:51:03', '57', null, null, '17', '-120.000000', '-120.000000', '现付', '', '', null, '', '0.000000', '0.000000', '120.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('191', '入库', '采购', 'CGRK00000000264', 'CGRK00000000264', '季圣华', '2019-04-13 19:57:58', '2020-02-20 23:50:55', '57', null, '17', '-10.000000', '-10.000000', '现付', '', '', null, '', '0.000000', '0.000000', '10.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('191', '入库', '采购', 'CGRK00000000264', 'CGRK00000000264', '2019-04-13 19:57:58', '2020-02-20 23:50:55', '57', null, null, '17', '-10.000000', '-10.000000', '现付', '', '', null, '', '0.000000', '0.000000', '10.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('192', '入库', '采购', 'CGRK00000000265', 'CGRK00000000265', '季圣华', '2019-04-20 00:36:24', '2020-02-20 23:50:47', '57', null, '17', '-220.000000', '-220.000000', '现付', '', '', null, '', '0.000000', '0.000000', '220.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('192', '入库', '采购', 'CGRK00000000265', 'CGRK00000000265', '2019-04-20 00:36:24', '2020-02-20 23:50:47', '57', null, null, '17', '-220.000000', '-220.000000', '现付', '', '', null, '', '0.000000', '0.000000', '220.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('193', '出库', '销售', 'XSCK00000000268', 'XSCK00000000268', '季圣华', '2019-04-29 23:41:02', '2020-02-20 23:52:17', '58', null, '17', '300.000000', '300.000000', '现付', '', '', null, '', '0.000000', '0.000000', '300.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('193', '出库', '销售', 'XSCK00000000268', 'XSCK00000000268', '2019-04-29 23:41:02', '2020-02-20 23:52:17', '58', null, null, '17', '300.000000', '300.000000', '现付', '', '', null, '', '0.000000', '0.000000', '300.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('196', '入库', '采购', 'CGRK00000000274', 'CGRK00000000274', '季圣华', '2019-04-30 22:35:53', '2020-02-20 23:49:07', '57', null, '18', '-1930.000000', '-1930.000000', '现付', '', '', null, '', '0.000000', '0.000000', '1930.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('196', '入库', '采购', 'CGRK00000000274', 'CGRK00000000274', '2019-04-30 22:35:53', '2020-02-20 23:49:07', '57', null, null, '18', '-1930.000000', '-1930.000000', '现付', '', '', null, '', '0.000000', '0.000000', '1930.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('197', '出库', '销售', 'XSCK00000000290', 'XSCK00000000290', '季圣华', '2019-04-30 23:15:27', '2020-02-20 23:52:01', '58', null, '17', '270.000000', '270.000000', '现付', '', '', null, '', '0.000000', '0.000000', '270.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('197', '出库', '销售', 'XSCK00000000290', 'XSCK00000000290', '2019-04-30 23:15:27', '2020-02-20 23:52:01', '58', null, null, '17', '270.000000', '270.000000', '现付', '', '', null, '', '0.000000', '0.000000', '270.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('199', '其它', '采购订单', 'CGDD00000000305', 'CGDD00000000305', '季圣华', '2019-12-28 12:16:36', '2020-02-20 23:47:56', '57', '63', null, '0.000000', '-22.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('199', '其它', '采购订单', 'CGDD00000000305', 'CGDD00000000305', '2019-12-28 12:16:36', '2020-02-20 23:47:56', '57', '63', '63', null, '0.000000', '-22.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('200', '出库', '采购退货', 'CGTH00000000306', 'CGTH00000000306', '季圣华', '2019-12-28 12:16:55', '2020-02-20 23:51:28', '57', '63', '17', '11.000000', '11.000000', '现付', '', '', null, '', '0.000000', '0.000000', '11.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('200', '出库', '采购退货', 'CGTH00000000306', 'CGTH00000000306', '2019-12-28 12:16:55', '2020-02-20 23:51:28', '57', '63', '63', '17', '11.000000', '11.000000', '现付', '', '', null, '', '0.000000', '0.000000', '11.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('201', '其它', '销售订单', 'XSDD00000000307', 'XSDD00000000307', '季圣华', '2019-12-28 12:17:09', '2020-02-20 23:51:37', '58', '63', null, '0.000000', '15.000000', '现付', '', '<14>', null, '', null, null, null, null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('201', '其它', '销售订单', 'XSDD00000000307', 'XSDD00000000307', '2019-12-28 12:17:09', '2020-02-20 23:51:37', '58', '63', '63', null, '0.000000', '15.000000', '现付', '', '<14>', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('202', '入库', '销售退货', 'XSTH00000000308', 'XSTH00000000308', '季圣华', '2019-12-28 12:17:22', '2020-02-20 23:52:33', '58', '63', '17', '-15.000000', '-15.000000', '现付', '', '', null, '', '0.000000', '0.000000', '15.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('202', '入库', '销售退货', 'XSTH00000000308', 'XSTH00000000308', '2019-12-28 12:17:22', '2020-02-20 23:52:33', '58', '63', '63', '17', '-15.000000', '-15.000000', '现付', '', '', null, '', '0.000000', '0.000000', '15.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('203', '入库', '其它', 'QTRK00000000309', 'QTRK00000000309', '季圣华', '2019-12-28 12:17:40', '2020-02-20 23:52:51', '57', '63', null, '0.000000', '42.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('203', '入库', '其它', 'QTRK00000000309', 'QTRK00000000309', '2019-12-28 12:17:40', '2020-02-20 23:52:51', '57', '63', '63', null, '0.000000', '42.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('204', '出库', '其它', 'QTCK00000000310', 'QTCK00000000310', '季圣华', '2019-12-28 12:17:48', '2020-02-20 23:53:04', '58', '63', null, '0.000000', '15.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('204', '出库', '其它', 'QTCK00000000310', 'QTCK00000000310', '2019-12-28 12:17:48', '2020-02-20 23:53:04', '58', '63', '63', null, '0.000000', '15.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('205', '出库', '调拨', 'DBCK00000000311', 'DBCK00000000311', '季圣华', '2019-12-28 12:17:58', '2020-02-20 23:53:21', null, '63', null, '0.000000', '15.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('205', '出库', '调拨', 'DBCK00000000311', 'DBCK00000000311', '2019-12-28 12:17:58', '2020-02-20 23:53:21', null, '63', '63', null, '0.000000', '15.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('206', '其它', '组装单', 'ZZD00000000312', 'ZZD00000000312', '季圣华', '2019-12-28 12:18:09', '2020-02-20 23:54:02', null, '63', null, '0.000000', '10.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('206', '其它', '组装单', 'ZZD00000000312', 'ZZD00000000312', '2019-12-28 12:18:09', '2020-02-20 23:54:02', null, '63', '63', null, '0.000000', '10.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('207', '其它', '拆卸单', 'CXD00000000313', 'CXD00000000313', '季圣华', '2019-12-28 12:18:47', '2020-02-20 23:54:21', null, '63', null, '0.000000', '0.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('207', '其它', '拆卸单', 'CXD00000000313', 'CXD00000000313', '2019-12-28 12:18:47', '2020-02-20 23:54:21', null, '63', '63', null, '0.000000', '0.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('208', '出库', '零售', 'LSCK00000000314', 'LSCK00000000314', '季圣华', '2019-12-28 12:20:26', '2019-12-28 12:20:14', '60', '63', '17', '30.000000', '30.000000', '预付款', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('208', '出库', '零售', 'LSCK00000000314', 'LSCK00000000314', '2019-12-28 12:20:26', '2019-12-28 12:20:14', '60', '63', '63', '17', '30.000000', '30.000000', '预付款', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('209', '入库', '零售退货', 'LSTH00000000315', 'LSTH00000000315', '季圣华', '2019-12-28 12:20:39', '2019-12-28 12:20:29', '60', '63', '17', '-15.000000', '-15.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('209', '入库', '零售退货', 'LSTH00000000315', 'LSTH00000000315', '2019-12-28 12:20:39', '2019-12-28 12:20:29', '60', '63', '63', '17', '-15.000000', '-15.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('210', '入库', '采购', 'CGRK00000000318', 'CGRK00000000318', '季圣华', '2020-02-20 23:22:38', '2020-02-20 23:22:27', '57', '63', '17', '-110.000000', '-110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('210', '入库', '采购', 'CGRK00000000318', 'CGRK00000000318', '2020-02-20 23:22:38', '2020-02-20 23:22:27', '57', '63', '63', '17', '-110.000000', '-110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('211', '入库', '采购', 'CGRK00000000319', 'CGRK00000000319', '季圣华', '2020-02-20 23:54:48', '2020-02-20 23:54:33', '57', '63', '17', '-2400.000000', '-2400.000000', '现付', '', '', null, '', '0.000000', '0.000000', '2400.000000', null, '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('211', '入库', '采购', 'CGRK00000000319', 'CGRK00000000319', '2020-02-20 23:54:48', '2020-02-20 23:54:33', '57', '63', '63', '17', '-2400.000000', '-2400.000000', '现付', '', '', null, '', '0.000000', '0.000000', '2400.000000', null, '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('212', '入库', '采购', 'CGRK00000000320', 'CGRK00000000320', '季圣华', '2020-07-14 00:28:15', '2020-07-14 00:27:59', '57', '63', '17', '-535.000000', '-535.000000', '现付', '', '', null, '', '0.000000', '0.000000', '535.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('212', '入库', '采购', 'CGRK00000000320', 'CGRK00000000320', '2020-07-14 00:28:15', '2020-07-14 00:27:59', '57', '63', '63', '17', '-535.000000', '-535.000000', '现付', '', '', null, '', '0.000000', '0.000000', '535.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('214', '出库', '销售', 'XSCK00000000321', 'XSCK00000000321', '季圣华', '2020-07-15 00:38:07', '2020-07-15 00:37:36', '58', '63', '17', '2400.000000', '2500.000000', '现付', '', '', null, '', '0.000000', '0.000000', '2500.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('214', '出库', '销售', 'XSCK00000000321', 'XSCK00000000321', '2020-07-15 00:38:07', '2020-07-15 00:37:36', '58', '63', '63', '17', '2400.000000', '2500.000000', '现付', '', '', null, '', '0.000000', '0.000000', '2500.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('215', '入库', '采购', 'CGRK00000000329', 'CGRK00000000329', '季圣华', '2020-07-21 00:35:16', '2020-07-21 00:35:05', '57', '63', '17', '-800.000000', '-800.000000', '现付', '', '', null, '', '0.000000', '0.000000', '800.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('215', '入库', '采购', 'CGRK00000000329', 'CGRK00000000329', '2020-07-21 00:35:16', '2020-07-21 00:35:05', '57', '63', '63', '17', '-800.000000', '-800.000000', '现付', '', '', null, '', '0.000000', '0.000000', '800.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('216', '出库', '销售', 'XSCK00000000330', 'XSCK00000000330', '季圣华', '2020-07-21 00:35:37', '2020-07-21 00:35:26', '58', '63', '17', '308.000000', '308.000000', '现付', '', '', null, '', '0.000000', '0.000000', '308.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('216', '出库', '销售', 'XSCK00000000330', 'XSCK00000000330', '2020-07-21 00:35:37', '2020-07-21 00:35:26', '58', '63', '63', '17', '308.000000', '308.000000', '现付', '', '', null, '', '0.000000', '0.000000', '308.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('217', '其它', '采购订单', 'CGDD00000000333', 'CGDD00000000333', '季圣华', '2020-07-21 01:15:15', '2020-07-21 01:15:07', '57', '63', null, '0.000000', '-96.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '2', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('217', '其它', '采购订单', 'CGDD00000000333', 'CGDD00000000333', '2020-07-21 01:15:15', '2020-07-21 01:15:07', '57', '63', '63', null, '0.000000', '-96.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '2', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('218', '入库', '采购', 'CGRK00000000334', 'CGRK00000000334', '季圣华', '2020-07-21 01:15:32', '2020-07-21 01:15:28', '57', '63', '17', '-270.000000', '-270.000000', '现付', '', '', null, '', '0.000000', '0.000000', '270.000000', null, null, null, null, '0', 'CGDD00000000333', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('218', '入库', '采购', 'CGRK00000000334', 'CGRK00000000334', '2020-07-21 01:15:32', '2020-07-21 01:15:28', '57', '63', '63', '17', '-270.000000', '-270.000000', '现付', '', '', null, '', '0.000000', '0.000000', '270.000000', null, null, null, null, '0', 'CGDD00000000333', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('219', '出库', '销售', 'XSCK00000000336', 'XSCK00000000336', '季圣华', '2020-07-21 15:06:02', '2020-07-21 15:05:49', '59', '63', '17', '70.000000', '70.000000', '现付', '', '', null, '', '0.000000', '0.000000', '70.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('219', '出库', '销售', 'XSCK00000000336', 'XSCK00000000336', '2020-07-21 15:06:02', '2020-07-21 15:05:49', '59', '63', '63', '17', '70.000000', '70.000000', '现付', '', '', null, '', '0.000000', '0.000000', '70.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('222', '出库', '销售', 'XSCK00000000338', 'XSCK00000000338', '季圣华', '2020-07-21 23:05:55', '2020-07-21 23:04:05', '58', '63', '17', '110.000000', '110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('222', '出库', '销售', 'XSCK00000000338', 'XSCK00000000338', '2020-07-21 23:05:55', '2020-07-21 23:04:05', '58', '63', '63', '17', '110.000000', '110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('223', '入库', '采购', 'CGRK00000000339', 'CGRK00000000339', '季圣华', '2020-07-21 23:06:55', '2020-07-21 23:06:43', '68', '63', '17', '-110.000000', '-110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('223', '入库', '采购', 'CGRK00000000339', 'CGRK00000000339', '2020-07-21 23:06:55', '2020-07-21 23:06:43', '68', '63', '63', '17', '-110.000000', '-110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('224', '出库', '销售', 'XSCK00000000340', 'XSCK00000000340', '季圣华', '2020-07-21 23:07:06', '2020-07-21 23:06:59', '71', '63', '17', '44.000000', '44.000000', '现付', '', '', null, '', '0.000000', '0.000000', '44.000000', null, null, null, null, '0', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('224', '出库', '销售', 'XSCK00000000340', 'XSCK00000000340', '2020-07-21 23:07:06', '2020-07-21 23:06:59', '71', '63', '63', '17', '44.000000', '44.000000', '现付', '', '', null, '', '0.000000', '0.000000', '44.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('225', '其它', '盘点录入', 'PDLR00000000342', 'PDLR00000000342', '季圣华', '2020-07-22 00:07:13', '2020-07-22 00:06:53', null, '63', null, '0.000000', '16.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '2', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('225', '其它', '盘点录入', 'PDLR00000000342', 'PDLR00000000342', '2020-07-22 00:07:13', '2020-07-22 00:06:53', null, '63', '63', null, '0.000000', '16.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '2', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('226', '其它', '盘点复盘', 'PDFP00000000344', 'PDFP00000000344', '季圣华', '2020-07-22 00:07:41', '2020-07-22 00:08:06', null, '63', null, '0.000000', '16.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '1', 'PDFP00000000343', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('226', '其它', '盘点复盘', 'PDFP00000000344', 'PDFP00000000344', '2020-07-22 00:07:41', '2020-07-22 00:08:06', null, '63', '63', null, '0.000000', '16.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '1', 'PDFP00000000343', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('227', '其它', '采购订单', 'CGDD00000000345', 'CGDD00000000345', '季圣华', '2020-07-22 00:41:37', '2020-07-22 00:41:27', '74', '63', null, '0.000000', '-110.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '2', '', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('227', '其它', '采购订单', 'CGDD00000000345', 'CGDD00000000345', '2020-07-22 00:41:37', '2020-07-22 00:41:27', '74', '63', '63', null, '0.000000', '-110.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '2', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('228', '入库', '采购', 'CGRK00000000351', 'CGRK00000000351', '季圣华', '2020-07-22 00:48:09', '2020-07-22 00:47:48', '74', '63', '17', '-110.000000', '-110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', 'CGDD00000000345', '63', '0'); INSERT INTO `jsh_depot_head` VALUES ('228', '入库', '采购', 'CGRK00000000351', 'CGRK00000000351', '2020-07-22 00:48:09', '2020-07-22 00:47:48', '74', '63', '63', '17', '-110.000000', '-110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', 'CGDD00000000345', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('229', '入库', '采购', 'CGRK00000000352', 'CGRK00000000352', '2020-09-13 18:43:56', '2020-09-13 18:43:45', '57', null, '131', '17', '-90.000000', '-90.000000', '现付', '', '', null, '', '0.000000', '0.000000', '90.000000', null, null, null, null, '0', '', '63', '0');
-- ---------------------------- -- ----------------------------
-- Table structure for jsh_depot_item -- Table structure for jsh_depot_item
@@ -246,7 +250,7 @@ CREATE TABLE `jsh_depot_item` (
KEY `FK2A819F474BB6190E` (`header_id`), KEY `FK2A819F474BB6190E` (`header_id`),
KEY `FK2A819F479485B3F5` (`depot_id`), KEY `FK2A819F479485B3F5` (`depot_id`),
KEY `FK2A819F47729F5392` (`another_depot_id`) KEY `FK2A819F47729F5392` (`another_depot_id`)
) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=utf8 COMMENT='单据子表'; ) ENGINE=InnoDB AUTO_INCREMENT=249 DEFAULT CHARSET=utf8 COMMENT='单据子表';
-- ---------------------------- -- ----------------------------
-- Records of jsh_depot_item -- Records of jsh_depot_item
@@ -297,6 +301,7 @@ INSERT INTO `jsh_depot_item` VALUES ('244', '225', '570', '4', '个', '2.000000'
INSERT INTO `jsh_depot_item` VALUES ('245', '226', '570', '4', '', '2.000000', '2.000000', '8.000000', '8.000000', '16.000000', '', null, null, '14', null, '0.000000', '0.000000', '16.000000', null, null, null, null, null, '', '63', '0'); INSERT INTO `jsh_depot_item` VALUES ('245', '226', '570', '4', '', '2.000000', '2.000000', '8.000000', '8.000000', '16.000000', '', null, null, '14', null, '0.000000', '0.000000', '16.000000', null, null, null, null, null, '', '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('246', '227', '588', '10', '', '10.000000', '10.000000', '11.000000', '11.000000', '110.000000', '', null, null, '14', null, '0.000000', '0.000000', '110.000000', null, null, null, null, null, '', '63', '0'); INSERT INTO `jsh_depot_item` VALUES ('246', '227', '588', '10', '', '10.000000', '10.000000', '11.000000', '11.000000', '110.000000', '', null, null, '14', null, '0.000000', '0.000000', '110.000000', null, null, null, null, null, '', '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('247', '228', '588', '10', '', '10.000000', '10.000000', '11.000000', '11.000000', '110.000000', '', null, null, '14', null, '0.000000', '0.000000', '110.000000', null, null, null, null, null, '', '63', '0'); INSERT INTO `jsh_depot_item` VALUES ('247', '228', '588', '10', '', '10.000000', '10.000000', '11.000000', '11.000000', '110.000000', '', null, null, '14', null, '0.000000', '0.000000', '110.000000', null, null, null, null, null, '', '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('248', '229', '569', '3', '', '9.000000', '9.000000', '10.000000', '10.000000', '90.000000', '', null, null, '14', null, '0.000000', '0.000000', '90.000000', null, null, null, null, null, '', '63', '0');
-- ---------------------------- -- ----------------------------
-- Table structure for jsh_function -- Table structure for jsh_function
@@ -416,20 +421,11 @@ CREATE TABLE `jsh_log` (
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `FKF2696AA13E226853` (`user_id`) KEY `FKF2696AA13E226853` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6786 DEFAULT CHARSET=utf8 COMMENT='操作日志'; ) ENGINE=InnoDB AUTO_INCREMENT=6798 DEFAULT CHARSET=utf8 COMMENT='操作日志';
-- ---------------------------- -- ----------------------------
-- Records of jsh_log -- Records of jsh_log
-- ---------------------------- -- ----------------------------
INSERT INTO `jsh_log` VALUES ('6761', '63', '用户', '127.0.0.1', '2020-07-21 23:58:39', '0', '登录jsh', '63');
INSERT INTO `jsh_log` VALUES ('6778', '63', '用户', '127.0.0.1', '2020-07-23 22:42:48', '0', '登录jsh', '63');
INSERT INTO `jsh_log` VALUES ('6779', '120', '用户', '127.0.0.1', '2020-09-04 01:16:20', '0', '登录admin', null);
INSERT INTO `jsh_log` VALUES ('6780', '120', '关联关系', '127.0.0.1', '2020-09-04 01:16:41', '0', '修改5', null);
INSERT INTO `jsh_log` VALUES ('6781', '120', '关联关系', '127.0.0.1', '2020-09-04 01:16:57', '0', '修改32', null);
INSERT INTO `jsh_log` VALUES ('6782', '63', '用户', '127.0.0.1', '2020-09-04 01:17:34', '0', '登录jsh', '63');
INSERT INTO `jsh_log` VALUES ('6783', '63', '用户', '127.0.0.1', '2020-09-08 00:13:21', '0', '登录jsh', '63');
INSERT INTO `jsh_log` VALUES ('6784', '120', '用户', '127.0.0.1', '2020-09-08 00:13:37', '0', '登录admin', null);
INSERT INTO `jsh_log` VALUES ('6785', '63', '用户', '127.0.0.1', '2020-09-08 00:17:35', '0', '登录jsh', '63');
-- ---------------------------- -- ----------------------------
-- Table structure for jsh_material -- Table structure for jsh_material
@@ -519,7 +515,7 @@ CREATE TABLE `jsh_material_current_stock` (
INSERT INTO `jsh_material_current_stock` VALUES ('1', '587', '14', '-30.000000', '63', '0'); INSERT INTO `jsh_material_current_stock` VALUES ('1', '587', '14', '-30.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('2', '570', '14', '48.000000', '63', '0'); INSERT INTO `jsh_material_current_stock` VALUES ('2', '570', '14', '48.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('3', '568', '14', '19.000000', '63', '0'); INSERT INTO `jsh_material_current_stock` VALUES ('3', '568', '14', '19.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('4', '569', '14', '41.000000', '63', '0'); INSERT INTO `jsh_material_current_stock` VALUES ('4', '569', '14', '50.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('5', '588', '14', '13.000000', '63', '0'); INSERT INTO `jsh_material_current_stock` VALUES ('5', '588', '14', '13.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('6', '569', '15', '122.000000', '63', '0'); INSERT INTO `jsh_material_current_stock` VALUES ('6', '569', '15', '122.000000', '63', '0');
@@ -671,12 +667,13 @@ CREATE TABLE `jsh_orga_user_rel` (
`updater` bigint(20) DEFAULT NULL COMMENT '更新人', `updater` bigint(20) DEFAULT NULL COMMENT '更新人',
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='机构用户关系表'; ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='机构用户关系表';
-- ---------------------------- -- ----------------------------
-- Records of jsh_orga_user_rel -- Records of jsh_orga_user_rel
-- ---------------------------- -- ----------------------------
INSERT INTO `jsh_orga_user_rel` VALUES ('10', '12', '131', '2', '0', '2019-12-28 12:13:15', '63', '2020-07-21 22:55:54', '63', '63'); INSERT INTO `jsh_orga_user_rel` VALUES ('10', '13', '131', '2', '0', '2019-12-28 12:13:15', '63', '2020-09-13 18:42:52', '63', '63');
INSERT INTO `jsh_orga_user_rel` VALUES ('11', '12', '63', '', '0', '2020-09-13 18:42:45', '63', '2020-09-13 18:42:45', '63', '63');
-- ---------------------------- -- ----------------------------
-- Table structure for jsh_person -- Table structure for jsh_person
@@ -739,7 +736,7 @@ CREATE TABLE `jsh_sequence` (
-- ---------------------------- -- ----------------------------
-- Records of jsh_sequence -- Records of jsh_sequence
-- ---------------------------- -- ----------------------------
INSERT INTO `jsh_sequence` VALUES ('depot_number_seq', '1', '999999999999999999', '351', '1', '单据编号sequence'); INSERT INTO `jsh_sequence` VALUES ('depot_number_seq', '1', '999999999999999999', '352', '1', '单据编号sequence');
-- ---------------------------- -- ----------------------------
-- Table structure for jsh_serial_number -- Table structure for jsh_serial_number
@@ -919,7 +916,7 @@ CREATE TABLE `jsh_user_business` (
`btn_str` varchar(2000) DEFAULT NULL COMMENT '按钮权限', `btn_str` varchar(2000) DEFAULT NULL COMMENT '按钮权限',
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除', `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8 COMMENT='用户/角色/模块关系表'; ) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8 COMMENT='用户/角色/模块关系表';
-- ---------------------------- -- ----------------------------
-- Records of jsh_user_business -- Records of jsh_user_business
@@ -972,5 +969,6 @@ INSERT INTO `jsh_user_business` VALUES ('63', 'UserRole', '127', '[10]', null, '
INSERT INTO `jsh_user_business` VALUES ('64', 'UserRole', '128', '[10]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('64', 'UserRole', '128', '[10]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('65', 'UserRole', '129', '[10]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('65', 'UserRole', '129', '[10]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('66', 'UserRole', '130', '[10]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('66', 'UserRole', '130', '[10]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('67', 'UserRole', '131', '[16]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('67', 'UserRole', '131', '[17]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('68', 'RoleFunctions', '16', '[210]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('68', 'RoleFunctions', '16', '[210]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('69', 'RoleFunctions', '17', '[210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]', '[{\"funId\":\"241\",\"btnStr\":\"1,2\"},{\"funId\":\"33\",\"btnStr\":\"1,2\"},{\"funId\":\"199\",\"btnStr\":\"1,2\"},{\"funId\":\"242\",\"btnStr\":\"1,2\"},{\"funId\":\"41\",\"btnStr\":\"1,2\"},{\"funId\":\"200\",\"btnStr\":\"1,2\"},{\"funId\":\"210\",\"btnStr\":\"1,2\"},{\"funId\":\"211\",\"btnStr\":\"1,2\"},{\"funId\":\"197\",\"btnStr\":\"1\"},{\"funId\":\"203\",\"btnStr\":\"1\"},{\"funId\":\"204\",\"btnStr\":\"1\"},{\"funId\":\"205\",\"btnStr\":\"1\"},{\"funId\":\"206\",\"btnStr\":\"1\"},{\"funId\":\"212\",\"btnStr\":\"1\"},{\"funId\":\"201\",\"btnStr\":\"1,2\"},{\"funId\":\"202\",\"btnStr\":\"1,2\"},{\"funId\":\"40\",\"btnStr\":\"1,2\"},{\"funId\":\"232\",\"btnStr\":\"1,2\"},{\"funId\":\"233\",\"btnStr\":\"1,2\"}]', '0');

View File

@@ -1011,3 +1011,13 @@ alter table jsh_depot_item change OtherField4 other_field4 varchar(50) DEFAULT N
alter table jsh_depot_item change OtherField5 other_field5 varchar(50) DEFAULT NULL COMMENT '自定义字段5-名称'; alter table jsh_depot_item change OtherField5 other_field5 varchar(50) DEFAULT NULL COMMENT '自定义字段5-名称';
alter table jsh_depot_item change MType material_type varchar(20) DEFAULT NULL COMMENT '商品类型'; alter table jsh_depot_item change MType material_type varchar(20) DEFAULT NULL COMMENT '商品类型';
alter table jsh_depot_item change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除'; alter table jsh_depot_item change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除';
-- --------------------------------------------------------
-- 时间 2020年09月13日
-- by jishenghua
-- 给单据表增加操作员字段,去掉经手头姓名字段
-- --------------------------------------------------------
alter table jsh_depot_head add creator bigint(20) DEFAULT NULL COMMENT '操作员' after hands_person_id;
alter table jsh_account_head add creator bigint(20) DEFAULT NULL COMMENT '操作员' after hands_person_id;
alter table jsh_depot_head drop column oper_person_name;
update jsh_depot_head set creator=hands_person_id;

View File

@@ -1,5 +1,6 @@
//初始化界面 //初始化界面
var defaultAccountId = 0; //默认账户id var defaultAccountId = 0; //默认账户id
var roleType = ""; //角色类型
$(function(){ $(function(){
var accountList = null; var accountList = null;
var accountID = null; var accountID = null;
@@ -23,6 +24,7 @@
var moneyType = true; //隐藏当前列 var moneyType = true; //隐藏当前列
var inOrOut = ""; //链接类型为收入或者支出 var inOrOut = ""; //链接类型为收入或者支出
getType(); getType();
getRoleType();
initSystemData_person(); //经手人数据 initSystemData_person(); //经手人数据
initSelectInfo_person(); //经手人信息 initSelectInfo_person(); //经手人信息
initSystemData_account(); //账户数据 initSystemData_account(); //账户数据
@@ -94,6 +96,21 @@
amountNum = "SYF"; amountNum = "SYF";
} }
} }
function getRoleType(){
$.ajax({
type:"get",
url: "/user/getRoleTypeByUserId",
async: false,
success: function (res) {
if (res && res.code === 200) {
roleType = res.data.roleType;
}
else {
roleType = null;
}
}
});
}
//获取账户信息 //获取账户信息
function initSystemData_account(){ function initSystemData_account(){
$.ajax({ $.ajax({
@@ -243,7 +260,7 @@
{ field: 'organId',width:5, hidden:true}, { field: 'organId',width:5, hidden:true},
{ title: organNameTitle,field: 'organName',width:140,hidden:organNameHidden}, { title: organNameTitle,field: 'organName',width:140,hidden:organNameHidden},
{ title: '单据编号',field: 'billNo',width:160}, { title: '单据编号',field: 'billNo',width:160},
{ title: '经手人',field: 'handsPersonName',width:80}, { title: '操作员',field: 'userName',width:80},
{ title: '单据时间 ',field: 'billTimeStr',width:160}, { title: '单据时间 ',field: 'billTimeStr',width:160},
{ title: '合计',field: 'totalPrice',width:80}, { title: '合计',field: 'totalPrice',width:80},
{ title: '备注',field: 'remark',width:100} { title: '备注',field: 'remark',width:100}
@@ -977,6 +994,7 @@
data: ({ data: ({
search: JSON.stringify({ search: JSON.stringify({
type: listType, type: listType,
roleType: roleType,
billNo: $.trim($("#searchBillNo").val()), billNo: $.trim($("#searchBillNo").val()),
beginTime: beginTime, beginTime: beginTime,
endTime: endTime endTime: endTime

View File

@@ -345,7 +345,7 @@
if(res && res.code === 200){ if(res && res.code === 200){
var data = res.data; var data = res.data;
$("#bill .BillNoShow").text(data.billNo); $("#bill .BillNoShow").text(data.billNo);
$("#bill .BillTimeShow").text(data.billTime); $("#bill .BillTimeShow").text(data.billTimeStr);
$("#bill .RemarkShow").text(data.remark); $("#bill .RemarkShow").text(data.remark);
$("#bill .AccountIdShow").text(data.accountName); $("#bill .AccountIdShow").text(data.accountName);
$('#bill .OrganIdShow').text(data.organName); $('#bill .OrganIdShow').text(data.organName);

View File

@@ -479,7 +479,7 @@
} }
}, },
{ title: '单据日期',field: 'operTimeStr',width:145}, { title: '单据日期',field: 'operTimeStr',width:145},
{ title: '操作员',field: 'operPersonName',width:60}, { title: '操作员',field: 'userName',width:60},
{ title: '金额合计',field: 'totalPrice',width:70}, { title: '金额合计',field: 'totalPrice',width:70},
{ title: '含税合计',field: 'totalTaxLastMoney',hidden:isShowLastMoneyColumn,width:70,formatter:function(value,rec){ { title: '含税合计',field: 'totalTaxLastMoney',hidden:isShowLastMoneyColumn,width:70,formatter:function(value,rec){
return (rec.discountMoney + rec.discountLastMoney).toFixed(2); return (rec.discountMoney + rec.discountLastMoney).toFixed(2);
@@ -1362,7 +1362,6 @@
$("#DiscountLastMoney").val(res.discountLastMoney); //优惠后金额 $("#DiscountLastMoney").val(res.discountLastMoney); //优惠后金额
$("#ChangeAmount").val(res.changeAmount).attr("data-changeamount", res.changeAmount); $("#ChangeAmount").val(res.changeAmount).attr("data-changeamount", res.changeAmount);
$('#OrganId').combobox('setValue', res.organId); $('#OrganId').combobox('setValue', res.organId);
$("#HandsPersonId").val(res.handsPersonId);
$("#Remark").val(res.remark); $("#Remark").val(res.remark);
$("#Discount").val(res.discount?res.discount:0); $("#Discount").val(res.discount?res.discount:0);
$("#DiscountMoney").val(res.discountMoney?res.discountMoney:0); $("#DiscountMoney").val(res.discountMoney?res.discountMoney:0);
@@ -1451,7 +1450,6 @@
$("#NumberShow").text(res.number); $("#NumberShow").text(res.number);
$("#OperTimeShow").text(res.operTimeStr); $("#OperTimeShow").text(res.operTimeStr);
$('#OrganIdShow').text(res.organName); $('#OrganIdShow').text(res.organName);
$("#HandsPersonIdShow").text(res.handsPersonName);
if(res.accountName){ if(res.accountName){
$("#AccountIdShow").text(res.accountName); //结算账户 $("#AccountIdShow").text(res.accountName); //结算账户
} else { } else {
@@ -1817,7 +1815,6 @@
LinkNumber: $.trim($("#LinkNumber").val()), LinkNumber: $.trim($("#LinkNumber").val()),
OperTime: $("#OperTime").val(), OperTime: $("#OperTime").val(),
OrganId: OrganId, OrganId: OrganId,
HandsPersonId: $.trim($("#HandsPersonId").val()),
Salesman: SalesmanStr, //销售人员 Salesman: SalesmanStr, //销售人员
AccountId: getAccountID, AccountId: getAccountID,
ChangeAmount: ChangeAmount, //付款/收款 ChangeAmount: ChangeAmount, //付款/收款

View File

@@ -110,6 +110,10 @@
<td style="padding:5px;width:130px;"> <td style="padding:5px;width:130px;">
<span id="OrganIdShow"></span> <span id="OrganIdShow"></span>
</td> </td>
<td style="width:70px;">经手人:</td>
<td style="padding:5px;width:130px;">
<span id="HandsPersonIdShow"></span>
</td>
<td style="width:70px;">单据日期:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:130px;"> <td style="padding:5px;width:130px;">
<span id="BillTimeShow"></span> <span id="BillTimeShow"></span>
@@ -118,8 +122,6 @@
<td style="padding:5px;width:140px;"> <td style="padding:5px;width:140px;">
<span id="BillNoShow"></span> <span id="BillNoShow"></span>
</td> </td>
<td style="width:70px;"></td>
<td style="width:140px;"></td>
<td style="width:100px;"></td> <td style="width:100px;"></td>
</tr> </tr>
<tr> <tr>

View File

@@ -92,10 +92,13 @@
if(res.status == 1) { if(res.status == 1) {
return '<b onclick="showMsg(' + res.id + ');">' + value + "</b>"; return '<b onclick="showMsg(' + res.id + ');">' + value + "</b>";
} else if(res.status == 2) { } else if(res.status == 2) {
return '<span onclick="showMsg(' + res.id + ');">' + value + "</span>";; return '<span onclick="showMsg(' + res.id + ');">' + value + "</span>";
} }
}}, }},
{title: '时间', field: 'createTime', width: 150}, {title: '时间', field: 'createTime', width: 150,formatter: function (value) {
return formatTime(value, 'Y-M-D h:m:s');
}
},
{title: '状态', field: 'status', width: 100,formatter: function (value) { {title: '状态', field: 'status', width: 100,formatter: function (value) {
if(value == 1) { if(value == 1) {
return "<b style='color:red'>未读</b>"; return "<b style='color:red'>未读</b>";

View File

@@ -91,8 +91,8 @@
async: false, async: false,
success: function (res) { success: function (res) {
if(res && res.code === 200) { if(res && res.code === 200) {
self.parent.window.$("#searchBtn").click();
self.parent.$.colorbox.close(); self.parent.$.colorbox.close();
$.messager.alert('提示',"操作成功","info");
} }
else { else {
$.messager.alert('提示',"操作失败","error"); $.messager.alert('提示',"操作失败","error");

View File

@@ -87,28 +87,6 @@ public class DepotHeadController {
return res; return res;
} }
/**
* 获取最大的id
* @param request
* @return
*/
@GetMapping(value = "/getMaxId")
public BaseResponseInfo getMaxId(HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
try {
Long maxId = depotHeadService.getMaxId();
map.put("maxId", maxId);
res.code = 200;
res.data = map;
} catch(Exception e){
e.printStackTrace();
res.code = 500;
res.data = "获取数据失败";
}
return res;
}
/** /**
* 入库出库明细接口 * 入库出库明细接口
* @param currentPage * @param currentPage

View File

@@ -12,6 +12,8 @@ public class AccountHead {
private Long handsPersonId; private Long handsPersonId;
private Long creator;
private BigDecimal changeAmount; private BigDecimal changeAmount;
private BigDecimal totalPrice; private BigDecimal totalPrice;
@@ -60,6 +62,14 @@ public class AccountHead {
this.handsPersonId = handsPersonId; this.handsPersonId = handsPersonId;
} }
public Long getCreator() {
return creator;
}
public void setCreator(Long creator) {
this.creator = creator;
}
public BigDecimal getChangeAmount() { public BigDecimal getChangeAmount() {
return changeAmount; return changeAmount;
} }

View File

@@ -356,6 +356,66 @@ public class AccountHeadExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatorIsNull() {
addCriterion("creator is null");
return (Criteria) this;
}
public Criteria andCreatorIsNotNull() {
addCriterion("creator is not null");
return (Criteria) this;
}
public Criteria andCreatorEqualTo(Long value) {
addCriterion("creator =", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotEqualTo(Long value) {
addCriterion("creator <>", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorGreaterThan(Long value) {
addCriterion("creator >", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorGreaterThanOrEqualTo(Long value) {
addCriterion("creator >=", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorLessThan(Long value) {
addCriterion("creator <", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorLessThanOrEqualTo(Long value) {
addCriterion("creator <=", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorIn(List<Long> values) {
addCriterion("creator in", values, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotIn(List<Long> values) {
addCriterion("creator not in", values, "creator");
return (Criteria) this;
}
public Criteria andCreatorBetween(Long value1, Long value2) {
addCriterion("creator between", value1, value2, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotBetween(Long value1, Long value2) {
addCriterion("creator not between", value1, value2, "creator");
return (Criteria) this;
}
public Criteria andChangeAmountIsNull() { public Criteria andChangeAmountIsNull() {
addCriterion("change_amount is null"); addCriterion("change_amount is null");
return (Criteria) this; return (Criteria) this;

View File

@@ -33,6 +33,10 @@ public class AccountHeadVo4ListEx {
private String handsPersonName; private String handsPersonName;
private Long creator;
private String userName;
private String accountName; private String accountName;
private String billTimeStr; private String billTimeStr;
@@ -149,6 +153,22 @@ public class AccountHeadVo4ListEx {
this.handsPersonName = handsPersonName; this.handsPersonName = handsPersonName;
} }
public Long getCreator() {
return creator;
}
public void setCreator(Long creator) {
this.creator = creator;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getAccountName() { public String getAccountName() {
return accountName; return accountName;
} }

View File

@@ -14,8 +14,6 @@ public class DepotHead {
private String number; private String number;
private String operPersonName;
private Date createTime; private Date createTime;
private Date operTime; private Date operTime;
@@ -24,6 +22,8 @@ public class DepotHead {
private Long handsPersonId; private Long handsPersonId;
private Long creator;
private Long accountId; private Long accountId;
private BigDecimal changeAmount; private BigDecimal changeAmount;
@@ -102,14 +102,6 @@ public class DepotHead {
this.number = number == null ? null : number.trim(); this.number = number == null ? null : number.trim();
} }
public String getOperPersonName() {
return operPersonName;
}
public void setOperPersonName(String operPersonName) {
this.operPersonName = operPersonName == null ? null : operPersonName.trim();
}
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
@@ -142,6 +134,14 @@ public class DepotHead {
this.handsPersonId = handsPersonId; this.handsPersonId = handsPersonId;
} }
public Long getCreator() {
return creator;
}
public void setCreator(Long creator) {
this.creator = creator;
}
public Long getAccountId() { public Long getAccountId() {
return accountId; return accountId;
} }

View File

@@ -446,76 +446,6 @@ public class DepotHeadExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andOperPersonNameIsNull() {
addCriterion("oper_person_name is null");
return (Criteria) this;
}
public Criteria andOperPersonNameIsNotNull() {
addCriterion("oper_person_name is not null");
return (Criteria) this;
}
public Criteria andOperPersonNameEqualTo(String value) {
addCriterion("oper_person_name =", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameNotEqualTo(String value) {
addCriterion("oper_person_name <>", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameGreaterThan(String value) {
addCriterion("oper_person_name >", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameGreaterThanOrEqualTo(String value) {
addCriterion("oper_person_name >=", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameLessThan(String value) {
addCriterion("oper_person_name <", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameLessThanOrEqualTo(String value) {
addCriterion("oper_person_name <=", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameLike(String value) {
addCriterion("oper_person_name like", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameNotLike(String value) {
addCriterion("oper_person_name not like", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameIn(List<String> values) {
addCriterion("oper_person_name in", values, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameNotIn(List<String> values) {
addCriterion("oper_person_name not in", values, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameBetween(String value1, String value2) {
addCriterion("oper_person_name between", value1, value2, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameNotBetween(String value1, String value2) {
addCriterion("oper_person_name not between", value1, value2, "operPersonName");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() { public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null"); addCriterion("create_time is null");
return (Criteria) this; return (Criteria) this;
@@ -756,6 +686,66 @@ public class DepotHeadExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatorIsNull() {
addCriterion("creator is null");
return (Criteria) this;
}
public Criteria andCreatorIsNotNull() {
addCriterion("creator is not null");
return (Criteria) this;
}
public Criteria andCreatorEqualTo(Long value) {
addCriterion("creator =", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotEqualTo(Long value) {
addCriterion("creator <>", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorGreaterThan(Long value) {
addCriterion("creator >", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorGreaterThanOrEqualTo(Long value) {
addCriterion("creator >=", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorLessThan(Long value) {
addCriterion("creator <", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorLessThanOrEqualTo(Long value) {
addCriterion("creator <=", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorIn(List<Long> values) {
addCriterion("creator in", values, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotIn(List<Long> values) {
addCriterion("creator not in", values, "creator");
return (Criteria) this;
}
public Criteria andCreatorBetween(Long value1, Long value2) {
addCriterion("creator between", value1, value2, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotBetween(Long value1, Long value2) {
addCriterion("creator not between", value1, value2, "creator");
return (Criteria) this;
}
public Criteria andAccountIdIsNull() { public Criteria andAccountIdIsNull() {
addCriterion("account_id is null"); addCriterion("account_id is null");
return (Criteria) this; return (Criteria) this;

View File

@@ -13,6 +13,7 @@ public interface AccountHeadMapperEx {
List<AccountHeadVo4ListEx> selectByConditionAccountHead( List<AccountHeadVo4ListEx> selectByConditionAccountHead(
@Param("type") String type, @Param("type") String type,
@Param("creatorArray") String[] creatorArray,
@Param("billNo") String billNo, @Param("billNo") String billNo,
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime, @Param("endTime") String endTime,
@@ -21,6 +22,7 @@ public interface AccountHeadMapperEx {
Long countsByAccountHead( Long countsByAccountHead(
@Param("type") String type, @Param("type") String type,
@Param("creatorArray") String[] creatorArray,
@Param("billNo") String billNo, @Param("billNo") String billNo,
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime); @Param("endTime") String endTime);

View File

@@ -21,7 +21,7 @@ public interface DepotHeadMapperEx {
List<DepotHeadVo4List> selectByConditionDepotHead( List<DepotHeadVo4List> selectByConditionDepotHead(
@Param("type") String type, @Param("type") String type,
@Param("subType") String subType, @Param("subType") String subType,
@Param("handsPersonIds") String[] handsPersonIds, @Param("creatorArray") String[] creatorArray,
@Param("number") String number, @Param("number") String number,
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime, @Param("endTime") String endTime,
@@ -33,15 +33,13 @@ public interface DepotHeadMapperEx {
Long countsByDepotHead( Long countsByDepotHead(
@Param("type") String type, @Param("type") String type,
@Param("subType") String subType, @Param("subType") String subType,
@Param("handsPersonIds") String[] handsPersonIds, @Param("creatorArray") String[] creatorArray,
@Param("number") String number, @Param("number") String number,
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime, @Param("endTime") String endTime,
@Param("materialParam") String materialParam, @Param("materialParam") String materialParam,
@Param("depotIds") String depotIds); @Param("depotIds") String depotIds);
Long getMaxId();
String findMaterialsListByHeaderId( String findMaterialsListByHeaderId(
@Param("id") Long id); @Param("id") Long id);
@@ -123,7 +121,7 @@ public interface DepotHeadMapperEx {
List<DepotHead> getDepotHeadListByOrganIds(@Param("organIds") String[] organIds); List<DepotHead> getDepotHeadListByOrganIds(@Param("organIds") String[] organIds);
List<DepotHead> getDepotHeadListByHandsPersonIds(@Param("handsPersonIds") String[] handsPersonIds); List<DepotHead> getDepotHeadListByCreator(@Param("creatorArray") String[] creatorArray);
BigDecimal getBuyAndSaleStatistics( BigDecimal getBuyAndSaleStatistics(
@Param("type") String type, @Param("type") String type,

View File

@@ -11,7 +11,7 @@ public class DepotHeadVo4List extends DepotHead{
private String organName; private String organName;
private String handsPersonName; private String userName;
private String accountName; private String accountName;
@@ -37,12 +37,12 @@ public class DepotHeadVo4List extends DepotHead{
this.organName = organName; this.organName = organName;
} }
public String getHandsPersonName() { public String getUserName() {
return handsPersonName; return userName;
} }
public void setHandsPersonName(String handsPersonName) { public void setUserName(String userName) {
this.handsPersonName = handsPersonName; this.userName = userName;
} }
public String getAccountName() { public String getAccountName() {

View File

@@ -31,21 +31,23 @@ public class AccountHeadComponent implements ICommonQuery {
private List<?> getAccountHeadList(Map<String, String> map)throws Exception { private List<?> getAccountHeadList(Map<String, String> map)throws Exception {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
String roleType = StringUtil.getInfo(search, "roleType");
String billNo = StringUtil.getInfo(search, "billNo"); String billNo = StringUtil.getInfo(search, "billNo");
String beginTime = StringUtil.getInfo(search, "beginTime"); String beginTime = StringUtil.getInfo(search, "beginTime");
String endTime = StringUtil.getInfo(search, "endTime"); String endTime = StringUtil.getInfo(search, "endTime");
String order = QueryUtils.order(map); String order = QueryUtils.order(map);
return accountHeadService.select(type, billNo, beginTime, endTime, QueryUtils.offset(map), QueryUtils.rows(map)); return accountHeadService.select(type, roleType, billNo, beginTime, endTime, QueryUtils.offset(map), QueryUtils.rows(map));
} }
@Override @Override
public Long counts(Map<String, String> map)throws Exception { public Long counts(Map<String, String> map)throws Exception {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
String roleType = StringUtil.getInfo(search, "roleType");
String billNo = StringUtil.getInfo(search, "billNo"); String billNo = StringUtil.getInfo(search, "billNo");
String beginTime = StringUtil.getInfo(search, "beginTime"); String beginTime = StringUtil.getInfo(search, "beginTime");
String endTime = StringUtil.getInfo(search, "endTime"); String endTime = StringUtil.getInfo(search, "endTime");
return accountHeadService.countAccountHead(type, billNo, beginTime, endTime); return accountHeadService.countAccountHead(type, roleType, billNo, beginTime, endTime);
} }
@Override @Override

View File

@@ -11,6 +11,7 @@ import com.jsh.erp.datasource.mappers.AccountItemMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException; import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.orgaUserRel.OrgaUserRelService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
@@ -32,13 +33,13 @@ import static com.jsh.erp.utils.Tools.getCenternTime;
@Service @Service
public class AccountHeadService { public class AccountHeadService {
private Logger logger = LoggerFactory.getLogger(AccountHeadService.class); private Logger logger = LoggerFactory.getLogger(AccountHeadService.class);
@Resource @Resource
private AccountHeadMapper accountHeadMapper; private AccountHeadMapper accountHeadMapper;
@Resource @Resource
private AccountHeadMapperEx accountHeadMapperEx; private AccountHeadMapperEx accountHeadMapperEx;
@Resource @Resource
private OrgaUserRelService orgaUserRelService;
@Resource
private UserService userService; private UserService userService;
@Resource @Resource
private LogService logService; private LogService logService;
@@ -79,11 +80,12 @@ public class AccountHeadService {
return list; return list;
} }
public List<AccountHeadVo4ListEx> select(String type, String billNo, String beginTime, String endTime, int offset, int rows) throws Exception{ public List<AccountHeadVo4ListEx> select(String type, String roleType, String billNo, String beginTime, String endTime, int offset, int rows) throws Exception{
List<AccountHeadVo4ListEx> resList = new ArrayList<AccountHeadVo4ListEx>(); List<AccountHeadVo4ListEx> resList = new ArrayList<AccountHeadVo4ListEx>();
List<AccountHeadVo4ListEx> list=null; List<AccountHeadVo4ListEx> list=null;
try{ try{
list = accountHeadMapperEx.selectByConditionAccountHead(type, billNo, beginTime, endTime, offset, rows); String [] creatorArray = getCreatorArray(roleType);
list = accountHeadMapperEx.selectByConditionAccountHead(type, creatorArray, billNo, beginTime, endTime, offset, rows);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }
@@ -102,21 +104,45 @@ public class AccountHeadService {
return resList; return resList;
} }
public Long countAccountHead(String type, String billNo, String beginTime, String endTime) throws Exception{ public Long countAccountHead(String type, String roleType, String billNo, String beginTime, String endTime) throws Exception{
Long result=null; Long result=null;
try{ try{
result = accountHeadMapperEx.countsByAccountHead(type, billNo, beginTime, endTime); String [] creatorArray = getCreatorArray(roleType);
result = accountHeadMapperEx.countsByAccountHead(type, creatorArray, billNo, beginTime, endTime);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }
return result; return result;
} }
/**
* 根据角色类型获取操作员数组
* @param roleType
* @return
* @throws Exception
*/
private String[] getCreatorArray(String roleType) throws Exception {
String creator = "";
User user = userService.getCurrentUser();
if(BusinessConstants.ROLE_TYPE_PRIVATE.equals(roleType)) {
creator = user.getId().toString();
} else if(BusinessConstants.ROLE_TYPE_THIS_ORG.equals(roleType)) {
creator = orgaUserRelService.getUserIdListByUserId(user.getId());
}
String [] creatorArray=null;
if(StringUtil.isNotEmpty(creator)){
creatorArray = creator.split(",");
}
return creatorArray;
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
public int insertAccountHead(String beanJson, HttpServletRequest request) throws Exception{ public int insertAccountHead(String beanJson, HttpServletRequest request) throws Exception{
AccountHead accountHead = JSONObject.parseObject(beanJson, AccountHead.class); AccountHead accountHead = JSONObject.parseObject(beanJson, AccountHead.class);
int result=0; int result=0;
try{ try{
User userInfo=userService.getCurrentUser();
accountHead.setCreator(userInfo==null?null:userInfo.getId());
result = accountHeadMapper.insertSelective(accountHead); result = accountHeadMapper.insertSelective(accountHead);
logService.insertLog("财务", logService.insertLog("财务",
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ADD).append(accountHead.getBillNo()).toString(), request); new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ADD).append(accountHead.getBillNo()).toString(), request);
@@ -274,6 +300,7 @@ public class AccountHeadService {
if(ah.getTotalPrice() != null) { if(ah.getTotalPrice() != null) {
ah.setTotalPrice(ah.getTotalPrice().abs()); ah.setTotalPrice(ah.getTotalPrice().abs());
} }
ah.setBillTimeStr(getCenternTime(ah.getBillTime()));
resList.add(ah); resList.add(ah);
} }
} }

View File

@@ -84,11 +84,11 @@ public class DepotHeadService {
public List<DepotHeadVo4List> select(String type, String subType, String roleType, String number, String beginTime, String endTime, public List<DepotHeadVo4List> select(String type, String subType, String roleType, String number, String beginTime, String endTime,
String materialParam, String depotIds, int offset, int rows)throws Exception { String materialParam, String depotIds, int offset, int rows)throws Exception {
String [] handsPersonIdArray = getHandsPersonIdArray(roleType);
List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>(); List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>();
List<DepotHeadVo4List> list=null; List<DepotHeadVo4List> list=null;
try{ try{
list=depotHeadMapperEx.selectByConditionDepotHead(type, subType, handsPersonIdArray, number, beginTime, endTime, materialParam, depotIds, offset, rows); String [] creatorArray = getCreatorArray(roleType);
list=depotHeadMapperEx.selectByConditionDepotHead(type, subType, creatorArray, number, beginTime, endTime, materialParam, depotIds, offset, rows);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }
@@ -124,10 +124,10 @@ public class DepotHeadService {
public Long countDepotHead(String type, String subType, String roleType,String number, String beginTime, String endTime, public Long countDepotHead(String type, String subType, String roleType,String number, String beginTime, String endTime,
String materialParam, String depotIds) throws Exception{ String materialParam, String depotIds) throws Exception{
String [] handsPersonIdArray = getHandsPersonIdArray(roleType);
Long result=null; Long result=null;
try{ try{
result=depotHeadMapperEx.countsByDepotHead(type, subType, handsPersonIdArray, number, beginTime, endTime, materialParam, depotIds); String [] creatorArray = getCreatorArray(roleType);
result=depotHeadMapperEx.countsByDepotHead(type, subType, creatorArray, number, beginTime, endTime, materialParam, depotIds);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }
@@ -135,36 +135,29 @@ public class DepotHeadService {
} }
/** /**
* 根据角色类型获取经手人数组 * 根据角色类型获取操作员数组
* @param roleType * @param roleType
* @return * @return
* @throws Exception * @throws Exception
*/ */
private String[] getHandsPersonIdArray(String roleType) throws Exception { private String[] getCreatorArray(String roleType) throws Exception {
String handsPersonIds = ""; String creator = "";
User user = userService.getCurrentUser(); User user = userService.getCurrentUser();
if(BusinessConstants.ROLE_TYPE_PRIVATE.equals(roleType)) { if(BusinessConstants.ROLE_TYPE_PRIVATE.equals(roleType)) {
handsPersonIds = user.getId().toString(); creator = user.getId().toString();
} else if(BusinessConstants.ROLE_TYPE_THIS_ORG.equals(roleType)) { } else if(BusinessConstants.ROLE_TYPE_THIS_ORG.equals(roleType)) {
handsPersonIds = orgaUserRelService.getUserIdListByUserId(user.getId()); creator = orgaUserRelService.getUserIdListByUserId(user.getId());
} }
String [] handsPersonIdArray=null; String [] creatorArray=null;
if(StringUtil.isNotEmpty(handsPersonIds)){ if(StringUtil.isNotEmpty(creator)){
handsPersonIdArray = handsPersonIds.split(","); creatorArray = creator.split(",");
} }
return handsPersonIdArray; return creatorArray;
} }
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
public int insertDepotHead(String beanJson, HttpServletRequest request)throws Exception { public int insertDepotHead(String beanJson, HttpServletRequest request)throws Exception {
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class); DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
//判断用户是否已经登录过,登录过不再处理
Object userInfo = request.getSession().getAttribute("user");
if (userInfo != null) {
User sessionUser = (User) userInfo;
String uName = sessionUser.getUsername();
depotHead.setOperPersonName(uName);
}
depotHead.setCreateTime(new Timestamp(System.currentTimeMillis())); depotHead.setCreateTime(new Timestamp(System.currentTimeMillis()));
depotHead.setStatus(BusinessConstants.BILLS_STATUS_UN_AUDIT); depotHead.setStatus(BusinessConstants.BILLS_STATUS_UN_AUDIT);
int result=0; int result=0;
@@ -189,7 +182,6 @@ public class DepotHeadService {
depotHead.setId(id); depotHead.setId(id);
depotHead.setStatus(dh.getStatus()); depotHead.setStatus(dh.getStatus());
depotHead.setCreateTime(dh.getCreateTime()); depotHead.setCreateTime(dh.getCreateTime());
depotHead.setOperPersonName(dh.getOperPersonName());
int result=0; int result=0;
try{ try{
result = depotHeadMapper.updateByPrimaryKey(depotHead); result = depotHeadMapper.updateByPrimaryKey(depotHead);
@@ -282,16 +274,6 @@ public class DepotHeadService {
} }
} }
public Long getMaxId()throws Exception {
Long result = null;
try{
result = depotHeadMapperEx.getMaxId();
}catch(Exception e){
JshException.readFail(logger, e);
}
return result;
}
public String findMaterialsListByHeaderId(Long id)throws Exception { public String findMaterialsListByHeaderId(Long id)throws Exception {
String result = null; String result = null;
try{ try{
@@ -490,8 +472,7 @@ public class DepotHeadService {
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class); DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
//判断用户是否已经登录过,登录过不再处理 //判断用户是否已经登录过,登录过不再处理
User userInfo=userService.getCurrentUser(); User userInfo=userService.getCurrentUser();
depotHead.setHandsPersonId(userInfo==null?null:userInfo.getId()); depotHead.setCreator(userInfo==null?null:userInfo.getId());
depotHead.setOperPersonName(userInfo==null?null:userInfo.getUsername());
depotHead.setCreateTime(new Timestamp(System.currentTimeMillis())); depotHead.setCreateTime(new Timestamp(System.currentTimeMillis()));
depotHead.setStatus(BusinessConstants.BILLS_STATUS_UN_AUDIT); depotHead.setStatus(BusinessConstants.BILLS_STATUS_UN_AUDIT);
try{ try{
@@ -550,8 +531,6 @@ public class DepotHeadService {
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class); DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
//判断用户是否已经登录过,登录过不再处理 //判断用户是否已经登录过,登录过不再处理
depotHead.setId(id); depotHead.setId(id);
User userInfo=userService.getCurrentUser();
depotHead.setOperPersonName(userInfo==null?null:userInfo.getUsername());
try{ try{
depotHeadMapper.updateByPrimaryKeySelective(depotHead); depotHeadMapper.updateByPrimaryKeySelective(depotHead);
}catch(Exception e){ }catch(Exception e){

View File

@@ -264,7 +264,7 @@ public class PersonService {
* */ * */
List<DepotHead> depotHeadList =null; List<DepotHead> depotHeadList =null;
try{ try{
depotHeadList=depotHeadMapperEx.getDepotHeadListByHandsPersonIds(idArray); depotHeadList=depotHeadMapperEx.getDepotHeadListByCreator(idArray);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }

View File

@@ -6,6 +6,7 @@
<result column="type" jdbcType="VARCHAR" property="type" /> <result column="type" jdbcType="VARCHAR" property="type" />
<result column="organ_id" jdbcType="BIGINT" property="organId" /> <result column="organ_id" jdbcType="BIGINT" property="organId" />
<result column="hands_person_id" jdbcType="BIGINT" property="handsPersonId" /> <result column="hands_person_id" jdbcType="BIGINT" property="handsPersonId" />
<result column="creator" jdbcType="BIGINT" property="creator" />
<result column="change_amount" jdbcType="DECIMAL" property="changeAmount" /> <result column="change_amount" jdbcType="DECIMAL" property="changeAmount" />
<result column="total_price" jdbcType="DECIMAL" property="totalPrice" /> <result column="total_price" jdbcType="DECIMAL" property="totalPrice" />
<result column="account_id" jdbcType="BIGINT" property="accountId" /> <result column="account_id" jdbcType="BIGINT" property="accountId" />
@@ -74,8 +75,8 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, type, organ_id, hands_person_id, change_amount, total_price, account_id, bill_no, id, type, organ_id, hands_person_id, creator, change_amount, total_price, account_id,
bill_time, remark, tenant_id, delete_flag bill_no, bill_time, remark, tenant_id, delete_flag
</sql> </sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultMap="BaseResultMap">
select select
@@ -109,15 +110,15 @@
</delete> </delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AccountHead"> <insert id="insert" parameterType="com.jsh.erp.datasource.entities.AccountHead">
insert into jsh_account_head (id, type, organ_id, insert into jsh_account_head (id, type, organ_id,
hands_person_id, change_amount, total_price, hands_person_id, creator, change_amount,
account_id, bill_no, bill_time, total_price, account_id, bill_no,
remark, tenant_id, delete_flag bill_time, remark, tenant_id,
) delete_flag)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organId,jdbcType=BIGINT}, values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organId,jdbcType=BIGINT},
#{handsPersonId,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL}, #{totalPrice,jdbcType=DECIMAL}, #{handsPersonId,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL},
#{accountId,jdbcType=BIGINT}, #{billNo,jdbcType=VARCHAR}, #{billTime,jdbcType=TIMESTAMP}, #{totalPrice,jdbcType=DECIMAL}, #{accountId,jdbcType=BIGINT}, #{billNo,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR} #{billTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
) #{deleteFlag,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountHead"> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountHead">
insert into jsh_account_head insert into jsh_account_head
@@ -134,6 +135,9 @@
<if test="handsPersonId != null"> <if test="handsPersonId != null">
hands_person_id, hands_person_id,
</if> </if>
<if test="creator != null">
creator,
</if>
<if test="changeAmount != null"> <if test="changeAmount != null">
change_amount, change_amount,
</if> </if>
@@ -172,6 +176,9 @@
<if test="handsPersonId != null"> <if test="handsPersonId != null">
#{handsPersonId,jdbcType=BIGINT}, #{handsPersonId,jdbcType=BIGINT},
</if> </if>
<if test="creator != null">
#{creator,jdbcType=BIGINT},
</if>
<if test="changeAmount != null"> <if test="changeAmount != null">
#{changeAmount,jdbcType=DECIMAL}, #{changeAmount,jdbcType=DECIMAL},
</if> </if>
@@ -219,6 +226,9 @@
<if test="record.handsPersonId != null"> <if test="record.handsPersonId != null">
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT}, hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
</if> </if>
<if test="record.creator != null">
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if test="record.changeAmount != null"> <if test="record.changeAmount != null">
change_amount = #{record.changeAmount,jdbcType=DECIMAL}, change_amount = #{record.changeAmount,jdbcType=DECIMAL},
</if> </if>
@@ -254,6 +264,7 @@
type = #{record.type,jdbcType=VARCHAR}, type = #{record.type,jdbcType=VARCHAR},
organ_id = #{record.organId,jdbcType=BIGINT}, organ_id = #{record.organId,jdbcType=BIGINT},
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT}, hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
creator = #{record.creator,jdbcType=BIGINT},
change_amount = #{record.changeAmount,jdbcType=DECIMAL}, change_amount = #{record.changeAmount,jdbcType=DECIMAL},
total_price = #{record.totalPrice,jdbcType=DECIMAL}, total_price = #{record.totalPrice,jdbcType=DECIMAL},
account_id = #{record.accountId,jdbcType=BIGINT}, account_id = #{record.accountId,jdbcType=BIGINT},
@@ -278,6 +289,9 @@
<if test="handsPersonId != null"> <if test="handsPersonId != null">
hands_person_id = #{handsPersonId,jdbcType=BIGINT}, hands_person_id = #{handsPersonId,jdbcType=BIGINT},
</if> </if>
<if test="creator != null">
creator = #{creator,jdbcType=BIGINT},
</if>
<if test="changeAmount != null"> <if test="changeAmount != null">
change_amount = #{changeAmount,jdbcType=DECIMAL}, change_amount = #{changeAmount,jdbcType=DECIMAL},
</if> </if>
@@ -310,6 +324,7 @@
set type = #{type,jdbcType=VARCHAR}, set type = #{type,jdbcType=VARCHAR},
organ_id = #{organId,jdbcType=BIGINT}, organ_id = #{organId,jdbcType=BIGINT},
hands_person_id = #{handsPersonId,jdbcType=BIGINT}, hands_person_id = #{handsPersonId,jdbcType=BIGINT},
creator = #{creator,jdbcType=BIGINT},
change_amount = #{changeAmount,jdbcType=DECIMAL}, change_amount = #{changeAmount,jdbcType=DECIMAL},
total_price = #{totalPrice,jdbcType=DECIMAL}, total_price = #{totalPrice,jdbcType=DECIMAL},
account_id = #{accountId,jdbcType=BIGINT}, account_id = #{accountId,jdbcType=BIGINT},

View File

@@ -5,13 +5,15 @@
<resultMap extends="com.jsh.erp.datasource.mappers.AccountHeadMapper.BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.entities.AccountHeadVo4ListEx"> <resultMap extends="com.jsh.erp.datasource.mappers.AccountHeadMapper.BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.entities.AccountHeadVo4ListEx">
<result column="OrganName" jdbcType="VARCHAR" property="organName" /> <result column="OrganName" jdbcType="VARCHAR" property="organName" />
<result column="HandsPersonName" jdbcType="VARCHAR" property="handsPersonName" /> <result column="HandsPersonName" jdbcType="VARCHAR" property="handsPersonName" />
<result column="userName" jdbcType="VARCHAR" property="userName" />
<result column="AccountName" jdbcType="VARCHAR" property="accountName" /> <result column="AccountName" jdbcType="VARCHAR" property="accountName" />
</resultMap> </resultMap>
<select id="selectByConditionAccountHead" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultMap="ResultMapEx"> <select id="selectByConditionAccountHead" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultMap="ResultMapEx">
select ah.*, s.supplier OrganName, p.Name HandsPersonName, a.Name AccountName select ah.*, s.supplier OrganName, p.Name HandsPersonName, u.username userName, a.Name AccountName
from jsh_account_head ah from jsh_account_head ah
left join jsh_supplier s on ah.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1' left join jsh_supplier s on ah.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1'
left join jsh_user u on ah.creator=u.id and ifnull(u.Status,'0') ='0'
left join jsh_person p on ah.hands_person_id=p.id and ifnull(p.delete_Flag,'0') !='1' left join jsh_person p on ah.hands_person_id=p.id and ifnull(p.delete_Flag,'0') !='1'
left join jsh_account a on ah.account_id=a.id and ifnull(a.delete_Flag,'0') !='1' left join jsh_account a on ah.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
where 1=1 where 1=1
@@ -27,6 +29,13 @@
<if test="endTime != null"> <if test="endTime != null">
and ah.bill_time &lt;= '${endTime}' and ah.bill_time &lt;= '${endTime}'
</if> </if>
<if test="creatorArray != null">
and ah.creator in (
<foreach collection="creatorArray" item="creator" separator=",">
#{creator}
</foreach>
)
</if>
and ifnull(ah.delete_flag,'0') !='1' and ifnull(ah.delete_flag,'0') !='1'
order by ah.id desc order by ah.id desc
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
@@ -52,6 +61,13 @@
<if test="endTime != null"> <if test="endTime != null">
and bill_time &lt;= '${endTime}' and bill_time &lt;= '${endTime}'
</if> </if>
<if test="creatorArray != null">
and creator in (
<foreach collection="creatorArray" item="creator" separator=",">
#{creator}
</foreach>
)
</if>
and ifnull(delete_flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>

View File

@@ -7,11 +7,11 @@
<result column="sub_type" jdbcType="VARCHAR" property="subType" /> <result column="sub_type" jdbcType="VARCHAR" property="subType" />
<result column="default_number" jdbcType="VARCHAR" property="defaultNumber" /> <result column="default_number" jdbcType="VARCHAR" property="defaultNumber" />
<result column="number" jdbcType="VARCHAR" property="number" /> <result column="number" jdbcType="VARCHAR" property="number" />
<result column="oper_person_name" jdbcType="VARCHAR" property="operPersonName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="oper_time" jdbcType="TIMESTAMP" property="operTime" /> <result column="oper_time" jdbcType="TIMESTAMP" property="operTime" />
<result column="organ_id" jdbcType="BIGINT" property="organId" /> <result column="organ_id" jdbcType="BIGINT" property="organId" />
<result column="hands_person_id" jdbcType="BIGINT" property="handsPersonId" /> <result column="hands_person_id" jdbcType="BIGINT" property="handsPersonId" />
<result column="creator" jdbcType="BIGINT" property="creator" />
<result column="account_id" jdbcType="BIGINT" property="accountId" /> <result column="account_id" jdbcType="BIGINT" property="accountId" />
<result column="change_amount" jdbcType="DECIMAL" property="changeAmount" /> <result column="change_amount" jdbcType="DECIMAL" property="changeAmount" />
<result column="total_price" jdbcType="DECIMAL" property="totalPrice" /> <result column="total_price" jdbcType="DECIMAL" property="totalPrice" />
@@ -91,11 +91,10 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, type, sub_type, default_number, number, oper_person_name, create_time, oper_time, id, type, sub_type, default_number, number, create_time, oper_time, organ_id, hands_person_id,
organ_id, hands_person_id, account_id, change_amount, total_price, pay_type, remark, creator, account_id, change_amount, total_price, pay_type, remark, sales_man, account_id_list,
sales_man, account_id_list, account_money_list, discount, discount_money, discount_last_money, account_money_list, discount, discount_money, discount_last_money, other_money, other_money_list,
other_money, other_money_list, other_money_item, account_day, status, link_number, other_money_item, account_day, status, link_number, tenant_id, delete_flag
tenant_id, delete_flag
</sql> </sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="BaseResultMap">
select select
@@ -129,9 +128,9 @@
</delete> </delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.DepotHead"> <insert id="insert" parameterType="com.jsh.erp.datasource.entities.DepotHead">
insert into jsh_depot_head (id, type, sub_type, insert into jsh_depot_head (id, type, sub_type,
default_number, number, oper_person_name, default_number, number, create_time,
create_time, oper_time, organ_id, oper_time, organ_id, hands_person_id,
hands_person_id, account_id, change_amount, creator, account_id, change_amount,
total_price, pay_type, remark, total_price, pay_type, remark,
sales_man, account_id_list, account_money_list, sales_man, account_id_list, account_money_list,
discount, discount_money, discount_last_money, discount, discount_money, discount_last_money,
@@ -139,9 +138,9 @@
account_day, status, link_number, account_day, status, link_number,
tenant_id, delete_flag) tenant_id, delete_flag)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR},
#{defaultNumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{operPersonName,jdbcType=VARCHAR}, #{defaultNumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP}, #{operTime,jdbcType=TIMESTAMP}, #{organId,jdbcType=BIGINT}, #{operTime,jdbcType=TIMESTAMP}, #{organId,jdbcType=BIGINT}, #{handsPersonId,jdbcType=BIGINT},
#{handsPersonId,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL}, #{creator,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL},
#{totalPrice,jdbcType=DECIMAL}, #{payType,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{totalPrice,jdbcType=DECIMAL}, #{payType,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{salesMan,jdbcType=VARCHAR}, #{accountIdList,jdbcType=VARCHAR}, #{accountMoneyList,jdbcType=VARCHAR}, #{salesMan,jdbcType=VARCHAR}, #{accountIdList,jdbcType=VARCHAR}, #{accountMoneyList,jdbcType=VARCHAR},
#{discount,jdbcType=DECIMAL}, #{discountMoney,jdbcType=DECIMAL}, #{discountLastMoney,jdbcType=DECIMAL}, #{discount,jdbcType=DECIMAL}, #{discountMoney,jdbcType=DECIMAL}, #{discountLastMoney,jdbcType=DECIMAL},
@@ -167,9 +166,6 @@
<if test="number != null"> <if test="number != null">
number, number,
</if> </if>
<if test="operPersonName != null">
oper_person_name,
</if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
@@ -182,6 +178,9 @@
<if test="handsPersonId != null"> <if test="handsPersonId != null">
hands_person_id, hands_person_id,
</if> </if>
<if test="creator != null">
creator,
</if>
<if test="accountId != null"> <if test="accountId != null">
account_id, account_id,
</if> </if>
@@ -256,9 +255,6 @@
<if test="number != null"> <if test="number != null">
#{number,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR},
</if> </if>
<if test="operPersonName != null">
#{operPersonName,jdbcType=VARCHAR},
</if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
@@ -271,6 +267,9 @@
<if test="handsPersonId != null"> <if test="handsPersonId != null">
#{handsPersonId,jdbcType=BIGINT}, #{handsPersonId,jdbcType=BIGINT},
</if> </if>
<if test="creator != null">
#{creator,jdbcType=BIGINT},
</if>
<if test="accountId != null"> <if test="accountId != null">
#{accountId,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT},
</if> </if>
@@ -354,9 +353,6 @@
<if test="record.number != null"> <if test="record.number != null">
number = #{record.number,jdbcType=VARCHAR}, number = #{record.number,jdbcType=VARCHAR},
</if> </if>
<if test="record.operPersonName != null">
oper_person_name = #{record.operPersonName,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null"> <if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
@@ -369,6 +365,9 @@
<if test="record.handsPersonId != null"> <if test="record.handsPersonId != null">
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT}, hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
</if> </if>
<if test="record.creator != null">
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if test="record.accountId != null"> <if test="record.accountId != null">
account_id = #{record.accountId,jdbcType=BIGINT}, account_id = #{record.accountId,jdbcType=BIGINT},
</if> </if>
@@ -438,11 +437,11 @@
sub_type = #{record.subType,jdbcType=VARCHAR}, sub_type = #{record.subType,jdbcType=VARCHAR},
default_number = #{record.defaultNumber,jdbcType=VARCHAR}, default_number = #{record.defaultNumber,jdbcType=VARCHAR},
number = #{record.number,jdbcType=VARCHAR}, number = #{record.number,jdbcType=VARCHAR},
oper_person_name = #{record.operPersonName,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
oper_time = #{record.operTime,jdbcType=TIMESTAMP}, oper_time = #{record.operTime,jdbcType=TIMESTAMP},
organ_id = #{record.organId,jdbcType=BIGINT}, organ_id = #{record.organId,jdbcType=BIGINT},
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT}, hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
creator = #{record.creator,jdbcType=BIGINT},
account_id = #{record.accountId,jdbcType=BIGINT}, account_id = #{record.accountId,jdbcType=BIGINT},
change_amount = #{record.changeAmount,jdbcType=DECIMAL}, change_amount = #{record.changeAmount,jdbcType=DECIMAL},
total_price = #{record.totalPrice,jdbcType=DECIMAL}, total_price = #{record.totalPrice,jdbcType=DECIMAL},
@@ -481,9 +480,6 @@
<if test="number != null"> <if test="number != null">
number = #{number,jdbcType=VARCHAR}, number = #{number,jdbcType=VARCHAR},
</if> </if>
<if test="operPersonName != null">
oper_person_name = #{operPersonName,jdbcType=VARCHAR},
</if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
@@ -496,6 +492,9 @@
<if test="handsPersonId != null"> <if test="handsPersonId != null">
hands_person_id = #{handsPersonId,jdbcType=BIGINT}, hands_person_id = #{handsPersonId,jdbcType=BIGINT},
</if> </if>
<if test="creator != null">
creator = #{creator,jdbcType=BIGINT},
</if>
<if test="accountId != null"> <if test="accountId != null">
account_id = #{accountId,jdbcType=BIGINT}, account_id = #{accountId,jdbcType=BIGINT},
</if> </if>
@@ -562,11 +561,11 @@
sub_type = #{subType,jdbcType=VARCHAR}, sub_type = #{subType,jdbcType=VARCHAR},
default_number = #{defaultNumber,jdbcType=VARCHAR}, default_number = #{defaultNumber,jdbcType=VARCHAR},
number = #{number,jdbcType=VARCHAR}, number = #{number,jdbcType=VARCHAR},
oper_person_name = #{operPersonName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
oper_time = #{operTime,jdbcType=TIMESTAMP}, oper_time = #{operTime,jdbcType=TIMESTAMP},
organ_id = #{organId,jdbcType=BIGINT}, organ_id = #{organId,jdbcType=BIGINT},
hands_person_id = #{handsPersonId,jdbcType=BIGINT}, hands_person_id = #{handsPersonId,jdbcType=BIGINT},
creator = #{creator,jdbcType=BIGINT},
account_id = #{accountId,jdbcType=BIGINT}, account_id = #{accountId,jdbcType=BIGINT},
change_amount = #{changeAmount,jdbcType=DECIMAL}, change_amount = #{changeAmount,jdbcType=DECIMAL},
total_price = #{totalPrice,jdbcType=DECIMAL}, total_price = #{totalPrice,jdbcType=DECIMAL},

View File

@@ -4,7 +4,7 @@
<resultMap extends="com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.vo.DepotHeadVo4List"> <resultMap extends="com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.vo.DepotHeadVo4List">
<result column="OrganName" jdbcType="VARCHAR" property="organName" /> <result column="OrganName" jdbcType="VARCHAR" property="organName" />
<result column="HandsPersonName" jdbcType="VARCHAR" property="handsPersonName" /> <result column="userName" jdbcType="VARCHAR" property="userName" />
<result column="AccountName" jdbcType="VARCHAR" property="accountName" /> <result column="AccountName" jdbcType="VARCHAR" property="accountName" />
</resultMap> </resultMap>
@@ -41,10 +41,10 @@
</resultMap> </resultMap>
<select id="selectByConditionDepotHead" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx"> <select id="selectByConditionDepotHead" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx">
select distinct dh.*, s.supplier OrganName, p.name HandsPersonName, a.name AccountName select distinct dh.*, s.supplier OrganName, u.username userName, a.name AccountName
from jsh_depot_head dh from jsh_depot_head dh
left join jsh_supplier s on dh.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1' left join jsh_supplier s on dh.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1'
left join jsh_person p on dh.hands_person_id=p.id and ifnull(p.delete_Flag,'0') !='1' left join jsh_user u on dh.creator=u.id and ifnull(u.Status,'0') ='0'
left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1' left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
left join jsh_depot_item di on dh.id = di.header_id and ifnull(di.delete_flag,'0') !='1' left join jsh_depot_item di on dh.id = di.header_id and ifnull(di.delete_flag,'0') !='1'
left join jsh_material m on di.material_id = m.id and ifnull(m.delete_flag,'0') !='1' left join jsh_material m on di.material_id = m.id and ifnull(m.delete_flag,'0') !='1'
@@ -70,10 +70,10 @@
<if test="depotIds != null"> <if test="depotIds != null">
and di.depot_id in (${depotIds}) and di.depot_id in (${depotIds})
</if> </if>
<if test="handsPersonIds != null"> <if test="creatorArray != null">
and dh.hands_person_id in ( and dh.creator in (
<foreach collection="handsPersonIds" item="handsPersonId" separator=","> <foreach collection="creatorArray" item="creator" separator=",">
#{handsPersonId} #{creator}
</foreach> </foreach>
) )
</if> </if>
@@ -111,20 +111,16 @@
<if test="depotIds != null"> <if test="depotIds != null">
and di.depot_id in (${depotIds}) and di.depot_id in (${depotIds})
</if> </if>
<if test="handsPersonIds != null"> <if test="creatorArray != null">
and hands_person_id in ( and creator in (
<foreach collection="handsPersonIds" item="handsPersonId" separator=","> <foreach collection="creatorArray" item="creator" separator=",">
#{handsPersonId} #{creator}
</foreach> </foreach>
) )
</if> </if>
and ifnull(jsh_depot_head.delete_Flag,'0') !='1') tb and ifnull(jsh_depot_head.delete_Flag,'0') !='1') tb
</select> </select>
<select id="getMaxId" resultType="java.lang.Long">
select max(id) as id from jsh_depot_head
</select>
<select id="findMaterialsListByHeaderId" resultType="java.lang.String"> <select id="findMaterialsListByHeaderId" resultType="java.lang.String">
select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName
from jsh_depot_item from jsh_depot_item
@@ -327,10 +323,9 @@
</select> </select>
<select id="getDetailByNumber" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx"> <select id="getDetailByNumber" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx">
select dh.*, s.supplier OrganName, p.name HandsPersonName, a.name AccountName select dh.*, s.supplier OrganName, a.name AccountName
from jsh_depot_head dh from jsh_depot_head dh
left join jsh_supplier s on dh.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1' left join jsh_supplier s on dh.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1'
left join jsh_person p on dh.hands_person_id=p.id and ifnull(p.delete_Flag,'0') !='1'
left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1' left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
where 1=1 where 1=1
<if test="number != null"> <if test="number != null">
@@ -381,14 +376,14 @@
) )
and ifnull(delete_flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="getDepotHeadListByHandsPersonIds" resultMap="com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap"> <select id="getDepotHeadListByCreator" resultMap="com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap">
select select
<include refid="com.jsh.erp.datasource.mappers.DepotHeadMapper.Base_Column_List" /> <include refid="com.jsh.erp.datasource.mappers.DepotHeadMapper.Base_Column_List" />
from jsh_depot_head from jsh_depot_head
where 1=1 where 1=1
and hands_person_id in ( and creator in (
<foreach collection="handsPersonIds" item="handsPersonId" separator=","> <foreach collection="creatorArray" item="creator" separator=",">
#{handsPersonId} #{creator}
</foreach> </foreach>
) )
and ifnull(delete_flag,'0') !='1' and ifnull(delete_flag,'0') !='1'