diff --git a/jshERP-boot/docs/jsh_erp.sql b/jshERP-boot/docs/jsh_erp.sql index b5534026..e6a2453d 100644 --- a/jshERP-boot/docs/jsh_erp.sql +++ b/jshERP-boot/docs/jsh_erp.sql @@ -10,7 +10,7 @@ Target Server Type : MYSQL Target Server Version : 50704 File Encoding : 65001 -Date: 2023-02-20 00:10:15 +Date: 2023-03-08 20:57:27 */ SET FOREIGN_KEY_CHECKS=0; @@ -59,6 +59,7 @@ CREATE TABLE `jsh_account_head` ( `remark` varchar(1000) DEFAULT NULL COMMENT '备注', `file_name` varchar(500) DEFAULT NULL COMMENT '附件名称', `status` varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、9审核中', + `source` varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', PRIMARY KEY (`id`), @@ -70,12 +71,12 @@ CREATE TABLE `jsh_account_head` ( -- ---------------------------- -- Records of jsh_account_head -- ---------------------------- -INSERT INTO `jsh_account_head` VALUES ('118', '收入', '58', '16', '63', '55.000000', null, '55.000000', '17', 'SR00000000643', '2021-06-02 00:24:49', null, null, '1', '63', '0'); -INSERT INTO `jsh_account_head` VALUES ('119', '支出', '68', '16', '63', '-66.000000', null, '-66.000000', '17', 'ZC00000000644', '2021-06-02 00:25:01', null, null, '0', '63', '0'); -INSERT INTO `jsh_account_head` VALUES ('122', '转账', null, '17', '63', '-11.000000', null, '-11.000000', '17', 'ZZ00000000647', '2021-06-02 00:25:32', null, null, '0', '63', '0'); -INSERT INTO `jsh_account_head` VALUES ('124', '收预付款', '60', '17', '63', '80.000000', '0.000000', '80.000000', null, 'SYF00000000649', '2021-07-06 23:43:48', null, null, '0', '63', '0'); -INSERT INTO `jsh_account_head` VALUES ('125', '收款', '58', '17', '63', '10.000000', '0.000000', '10.000000', '17', 'SK00000000653', '2021-07-06 23:46:38', null, null, '0', '63', '0'); -INSERT INTO `jsh_account_head` VALUES ('126', '付款', '57', '17', '63', '-50.000000', '0.000000', '-50.000000', '17', 'FK00000000654', '2021-07-06 23:47:23', null, null, '0', '63', '0'); +INSERT INTO `jsh_account_head` VALUES ('118', '收入', '58', '16', '63', '55.000000', null, '55.000000', '17', 'SR00000000643', '2021-06-02 00:24:49', null, null, '1', '0', '63', '0'); +INSERT INTO `jsh_account_head` VALUES ('119', '支出', '68', '16', '63', '-66.000000', null, '-66.000000', '17', 'ZC00000000644', '2021-06-02 00:25:01', null, null, '0', '0', '63', '0'); +INSERT INTO `jsh_account_head` VALUES ('122', '转账', null, '17', '63', '-11.000000', null, '-11.000000', '17', 'ZZ00000000647', '2021-06-02 00:25:32', null, null, '0', '0', '63', '0'); +INSERT INTO `jsh_account_head` VALUES ('124', '收预付款', '60', '17', '63', '80.000000', '0.000000', '80.000000', null, 'SYF00000000649', '2021-07-06 23:43:48', null, null, '0', '0', '63', '0'); +INSERT INTO `jsh_account_head` VALUES ('125', '收款', '58', '17', '63', '10.000000', '0.000000', '10.000000', '17', 'SK00000000653', '2021-07-06 23:46:38', null, null, '0', '0', '63', '0'); +INSERT INTO `jsh_account_head` VALUES ('126', '付款', '57', '17', '63', '-50.000000', '0.000000', '-50.000000', '17', 'FK00000000654', '2021-07-06 23:47:23', null, null, '0', '0', '63', '0'); -- ---------------------------- -- Table structure for jsh_account_item @@ -169,6 +170,7 @@ CREATE TABLE `jsh_depot_head` ( `deposit` decimal(24,6) DEFAULT NULL COMMENT '订金', `status` varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、2完成采购|销售、3部分采购|销售、9审核中', `purchase_status` varchar(1) DEFAULT NULL COMMENT '采购状态,0未采购、2完成采购、3部分采购', + `source` varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机', `link_number` varchar(50) DEFAULT NULL COMMENT '关联订单号', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', @@ -180,22 +182,22 @@ CREATE TABLE `jsh_depot_head` ( -- ---------------------------- -- Records of jsh_depot_head -- ---------------------------- -INSERT INTO `jsh_depot_head` VALUES ('258', '其它', '采购订单', 'CGDD00000000630', 'CGDD00000000630', '2021-06-02 00:21:54', '2021-06-02 00:21:44', '57', '63', null, null, null, '-110.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '2', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('259', '入库', '采购', 'CGRK00000000631', 'CGRK00000000631', '2021-06-02 00:22:23', '2021-06-02 00:22:05', '57', '63', '17', '-110.000000', null, '-110.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '110.000000', '0.000000', null, '0', '0', 'CGDD00000000630', '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('260', '出库', '采购退货', 'CGTH00000000632', 'CGTH00000000632', '2021-06-02 00:22:35', '2021-06-02 00:22:26', '57', '63', '17', '22.000000', null, '22.000000', '现付', null, null, null, null, null, null, '0.000000', '0.000000', '22.000000', '0.000000', null, '0', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('261', '其它', '销售订单', 'XSDD00000000633', 'XSDD00000000633', '2021-06-02 00:22:48', '2021-06-02 00:22:39', '58', '63', null, null, null, '44.000000', '现付', null, null, null, '', null, null, null, null, null, null, null, '2', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('262', '出库', '销售', 'XSCK00000000634', 'XSCK00000000634', '2021-06-02 00:23:03', '2021-06-02 00:22:54', '58', '63', '17', '44.000000', null, '44.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '44.000000', '0.000000', null, '0', '0', 'XSDD00000000633', '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('263', '入库', '销售退货', 'XSTH00000000635', 'XSTH00000000635', '2021-06-02 00:23:12', '2021-06-02 00:23:05', '71', '63', '17', '-22.000000', null, '-22.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '22.000000', '0.000000', null, '0', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('264', '出库', '零售', 'LSCK00000000636', 'LSCK00000000636', '2021-06-02 00:23:21', '2021-06-02 00:23:14', '60', '63', '17', '22.000000', null, '22.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('265', '入库', '零售退货', 'LSTH00000000637', 'LSTH00000000637', '2021-06-02 00:23:29', '2021-06-02 00:23:23', '60', '63', '17', '-22.000000', null, '-22.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('266', '入库', '其它', 'QTRK00000000638', 'QTRK00000000638', '2021-06-02 00:23:48', '2021-06-02 00:23:36', '57', '63', null, null, null, '-55.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '1', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('267', '出库', '其它', 'QTCK00000000639', 'QTCK00000000639', '2021-06-02 00:23:59', '2021-06-02 00:23:50', '58', '63', null, null, null, '30.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('268', '出库', '调拨', 'DBCK00000000640', 'DBCK00000000640', '2021-06-02 00:24:09', '2021-06-02 00:24:00', null, '63', null, null, null, '11.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('269', '其它', '组装单', 'ZZD00000000641', 'ZZD00000000641', '2021-06-02 00:24:29', '2021-06-02 00:24:11', null, '63', null, null, null, '0.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('270', '其它', '拆卸单', 'CXD00000000642', 'CXD00000000642', '2021-06-02 00:24:45', '2021-06-02 00:24:32', null, '63', null, null, null, '0.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('271', '入库', '采购', 'CGRK00000000651', 'CGRK00000000651', '2021-07-06 23:45:20', '2021-07-06 23:44:45', '57', '63', '17', '-20.000000', null, '-80.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '80.000000', '0.000000', null, '0', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('272', '出库', '销售', 'XSCK00000000652', 'XSCK00000000652', '2021-07-06 23:46:07', '2021-07-06 23:45:24', '58', '63', '17', '8.000000', null, '28.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '28.000000', '0.000000', null, '0', '0', null, '63', '0'); -INSERT INTO `jsh_depot_head` VALUES ('273', '入库', '采购', 'CGRK00000000658', 'CGRK00000000658', '2021-07-28 00:58:12', '2021-07-28 00:58:02', '57', '63', '17', '-60.000000', null, '-60.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '60.000000', '0.000000', null, '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('258', '其它', '采购订单', 'CGDD00000000630', 'CGDD00000000630', '2021-06-02 00:21:54', '2021-06-02 00:21:44', '57', '63', null, null, null, '-110.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '2', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('259', '入库', '采购', 'CGRK00000000631', 'CGRK00000000631', '2021-06-02 00:22:23', '2021-06-02 00:22:05', '57', '63', '17', '-110.000000', null, '-110.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '110.000000', '0.000000', null, '0', '0', '0', 'CGDD00000000630', '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('260', '出库', '采购退货', 'CGTH00000000632', 'CGTH00000000632', '2021-06-02 00:22:35', '2021-06-02 00:22:26', '57', '63', '17', '22.000000', null, '22.000000', '现付', null, null, null, null, null, null, '0.000000', '0.000000', '22.000000', '0.000000', null, '0', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('261', '其它', '销售订单', 'XSDD00000000633', 'XSDD00000000633', '2021-06-02 00:22:48', '2021-06-02 00:22:39', '58', '63', null, null, null, '44.000000', '现付', null, null, null, '', null, null, null, null, null, null, null, '2', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('262', '出库', '销售', 'XSCK00000000634', 'XSCK00000000634', '2021-06-02 00:23:03', '2021-06-02 00:22:54', '58', '63', '17', '44.000000', null, '44.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '44.000000', '0.000000', null, '0', '0', '0', 'XSDD00000000633', '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('263', '入库', '销售退货', 'XSTH00000000635', 'XSTH00000000635', '2021-06-02 00:23:12', '2021-06-02 00:23:05', '71', '63', '17', '-22.000000', null, '-22.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '22.000000', '0.000000', null, '0', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('264', '出库', '零售', 'LSCK00000000636', 'LSCK00000000636', '2021-06-02 00:23:21', '2021-06-02 00:23:14', '60', '63', '17', '22.000000', null, '22.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('265', '入库', '零售退货', 'LSTH00000000637', 'LSTH00000000637', '2021-06-02 00:23:29', '2021-06-02 00:23:23', '60', '63', '17', '-22.000000', null, '-22.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('266', '入库', '其它', 'QTRK00000000638', 'QTRK00000000638', '2021-06-02 00:23:48', '2021-06-02 00:23:36', '57', '63', null, null, null, '-55.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '1', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('267', '出库', '其它', 'QTCK00000000639', 'QTCK00000000639', '2021-06-02 00:23:59', '2021-06-02 00:23:50', '58', '63', null, null, null, '30.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('268', '出库', '调拨', 'DBCK00000000640', 'DBCK00000000640', '2021-06-02 00:24:09', '2021-06-02 00:24:00', null, '63', null, null, null, '11.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('269', '其它', '组装单', 'ZZD00000000641', 'ZZD00000000641', '2021-06-02 00:24:29', '2021-06-02 00:24:11', null, '63', null, null, null, '0.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('270', '其它', '拆卸单', 'CXD00000000642', 'CXD00000000642', '2021-06-02 00:24:45', '2021-06-02 00:24:32', null, '63', null, null, null, '0.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('271', '入库', '采购', 'CGRK00000000651', 'CGRK00000000651', '2021-07-06 23:45:20', '2021-07-06 23:44:45', '57', '63', '17', '-20.000000', null, '-80.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '80.000000', '0.000000', null, '0', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('272', '出库', '销售', 'XSCK00000000652', 'XSCK00000000652', '2021-07-06 23:46:07', '2021-07-06 23:45:24', '58', '63', '17', '8.000000', null, '28.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '28.000000', '0.000000', null, '0', '0', '0', null, '63', '0'); +INSERT INTO `jsh_depot_head` VALUES ('273', '入库', '采购', 'CGRK00000000658', 'CGRK00000000658', '2021-07-28 00:58:12', '2021-07-28 00:58:02', '57', '63', '17', '-60.000000', null, '-60.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '60.000000', '0.000000', null, '0', '0', '0', null, '63', '0'); -- ---------------------------- -- Table structure for jsh_depot_item @@ -599,7 +601,7 @@ CREATE TABLE `jsh_msg` ( `msg_content` varchar(500) DEFAULT NULL COMMENT '消息内容', `create_time` datetime DEFAULT NULL COMMENT '创建时间', `type` varchar(20) DEFAULT NULL COMMENT '消息类型', - `user_id` bigint(20) NULL DEFAULT NULL COMMENT '接收人id' , + `user_id` bigint(20) DEFAULT NULL COMMENT '接收人id', `status` varchar(1) DEFAULT NULL COMMENT '状态,1未读 2已读', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', @@ -698,7 +700,7 @@ CREATE TABLE `jsh_platform_config` ( `platform_key_info` varchar(100) DEFAULT NULL COMMENT '关键词名称', `platform_value` varchar(200) DEFAULT NULL COMMENT '值', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='平台参数'; +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='平台参数'; -- ---------------------------- -- Records of jsh_platform_config @@ -849,6 +851,7 @@ CREATE TABLE `jsh_system_config` ( `purchase_by_sale_flag` varchar(1) DEFAULT '0' COMMENT '以销定购启用标记,0未启用,1启用', `multi_level_approval_flag` varchar(1) DEFAULT '0' COMMENT '多级审核启用标记,0未启用,1启用', `multi_bill_type` varchar(200) DEFAULT NULL COMMENT '流程类型,可多选', + `amount_approval_flag` varchar(1) DEFAULT '0' COMMENT '金额审核启用标记,0未启用,1启用', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', PRIMARY KEY (`id`) @@ -857,7 +860,7 @@ CREATE TABLE `jsh_system_config` ( -- ---------------------------- -- Records of jsh_system_config -- ---------------------------- -INSERT INTO `jsh_system_config` VALUES ('11', '公司test', '小李', '地址1', '12345678', null, null, '注:本单为我公司与客户约定账期内结款的依据,由客户或其单位员工签字生效,并承担法律责任。', '0', '0', '1', '0', '0', '', '63', '0'); +INSERT INTO `jsh_system_config` VALUES ('11', '公司test', '小李', '地址1', '12345678', null, null, '注:本单为我公司与客户约定账期内结款的依据,由客户或其单位员工签字生效,并承担法律责任。', '0', '0', '1', '0', '0', '', '0', '63', '0'); -- ---------------------------- -- Table structure for jsh_tenant @@ -892,9 +895,9 @@ CREATE TABLE `jsh_unit` ( `other_unit` varchar(50) DEFAULT NULL COMMENT '副单位', `other_unit_two` varchar(50) DEFAULT NULL COMMENT '副单位2', `other_unit_three` varchar(50) DEFAULT NULL COMMENT '副单位3', - `ratio` int(11) DEFAULT NULL COMMENT '比例', - `ratio_two` int(11) DEFAULT NULL COMMENT '比例2', - `ratio_three` int(11) DEFAULT NULL COMMENT '比例3', + `ratio` decimal(24,3) DEFAULT NULL COMMENT '比例', + `ratio_two` decimal(24,3) DEFAULT NULL COMMENT '比例2', + `ratio_three` decimal(24,3) DEFAULT NULL COMMENT '比例3', `enabled` bit(1) DEFAULT NULL COMMENT '启用', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', @@ -904,10 +907,10 @@ CREATE TABLE `jsh_unit` ( -- ---------------------------- -- Records of jsh_unit -- ---------------------------- -INSERT INTO `jsh_unit` VALUES ('15', '个/(箱=12个)', '个', '箱', null, null, '12', null, null, '', '63', '0'); -INSERT INTO `jsh_unit` VALUES ('19', '个/(盒=15个)', '个', '盒', null, null, '15', null, null, '', '63', '0'); -INSERT INTO `jsh_unit` VALUES ('20', '盒/(箱=8盒)', '盒', '箱', null, null, '8', null, null, '', '63', '0'); -INSERT INTO `jsh_unit` VALUES ('21', '瓶/(箱=12瓶)', '瓶', '箱', null, null, '12', null, null, '', '63', '0'); +INSERT INTO `jsh_unit` VALUES ('15', '个/(箱=12个)', '个', '箱', null, null, '12.000', null, null, '', '63', '0'); +INSERT INTO `jsh_unit` VALUES ('19', '个/(盒=15个)', '个', '盒', null, null, '15.000', null, null, '', '63', '0'); +INSERT INTO `jsh_unit` VALUES ('20', '盒/(箱=8盒)', '盒', '箱', null, null, '8.000', null, null, '', '63', '0'); +INSERT INTO `jsh_unit` VALUES ('21', '瓶/(箱=12瓶)', '瓶', '箱', null, null, '12.000', null, null, '', '63', '0'); -- ---------------------------- -- Table structure for jsh_user diff --git a/jshERP-boot/docs/华夏ERP数据库设计汇总.xlsx b/jshERP-boot/docs/华夏ERP数据库设计汇总.xlsx index 0b9f292a..84be5901 100644 Binary files a/jshERP-boot/docs/华夏ERP数据库设计汇总.xlsx and b/jshERP-boot/docs/华夏ERP数据库设计汇总.xlsx differ diff --git a/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt b/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt index 272b04b1..d38eabd5 100644 --- a/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt +++ b/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt @@ -1443,4 +1443,18 @@ INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platfor -- -------------------------------------------------------- alter table jsh_msg add user_id bigint(20) DEFAULT NULL COMMENT '接收人id' after type; update jsh_msg set user_id=tenant_id where user_id is null; -alter table jsh_system_config add multi_bill_type varchar(200) DEFAULT NULL COMMENT '流程类型,可多选' after multi_level_approval_flag; \ No newline at end of file +alter table jsh_system_config add multi_bill_type varchar(200) DEFAULT NULL COMMENT '流程类型,可多选' after multi_level_approval_flag; + +-- -------------------------------------------------------- +-- 时间 2023年03月08日 +-- by jishenghua +-- 给计量单位表修改比例的字段类型 +-- 给系统参数表增加金额审核启用标记 +-- 给单据增加来源字段 +-- -------------------------------------------------------- +alter table jsh_unit change ratio ratio decimal(24,3) DEFAULT NULL COMMENT '比例'; +alter table jsh_unit change ratio_two ratio_two decimal(24,3) DEFAULT NULL COMMENT '比例2'; +alter table jsh_unit change ratio_three ratio_three decimal(24,3) DEFAULT NULL COMMENT '比例3'; +alter table jsh_system_config add amount_approval_flag varchar(1) DEFAULT '0' COMMENT '金额审核启用标记,0未启用,1启用' after multi_bill_type; +alter table jsh_depot_head add source varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机' after purchase_status; +alter table jsh_account_head add source varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机' after status; \ No newline at end of file diff --git a/jshERP-boot/src/main/java/com/jsh/erp/controller/AccountController.java b/jshERP-boot/src/main/java/com/jsh/erp/controller/AccountController.java index 55ab2940..a32f357a 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/controller/AccountController.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/controller/AccountController.java @@ -9,6 +9,7 @@ import com.jsh.erp.datasource.vo.AccountVo4InOutList; import com.jsh.erp.datasource.vo.AccountVo4List; import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.service.account.AccountService; +import com.jsh.erp.service.systemConfig.SystemConfigService; import com.jsh.erp.utils.BaseResponseInfo; import com.jsh.erp.utils.ErpInfo; import io.swagger.annotations.Api; @@ -39,6 +40,9 @@ public class AccountController { @Resource private AccountService accountService; + @Resource + private SystemConfigService systemConfigService; + /** * 查找结算账户信息-下拉框 * @param request @@ -117,12 +121,13 @@ public class AccountController { //存放数据json数组 JSONArray dataArray = new JSONArray(); if (null != dataList) { + Boolean apprFlag = systemConfigService.getAmountApprovalFlag(); for (AccountVo4InOutList aEx : dataList) { String type = aEx.getType().replace("其它", ""); aEx.setType(type); String timeStr = aEx.getOperTime().toString(); - BigDecimal balance = accountService.getAccountSum(accountId, timeStr, "date").add(accountService.getAccountSumByHead(accountId, timeStr, "date")) - .add(accountService.getAccountSumByDetail(accountId, timeStr, "date")).add(accountService.getManyAccountSum(accountId, timeStr, "date")).add(initialAmount); + BigDecimal balance = accountService.getAccountSum(accountId, timeStr, "date", apprFlag).add(accountService.getAccountSumByHead(accountId, timeStr, "date", apprFlag)) + .add(accountService.getAccountSumByDetail(accountId, timeStr, "date", apprFlag)).add(accountService.getManyAccountSum(accountId, timeStr, "date", apprFlag)).add(initialAmount); aEx.setBalance(balance); aEx.setAccountId(accountId); dataArray.add(aEx); diff --git a/jshERP-boot/src/main/java/com/jsh/erp/controller/DepotHeadController.java b/jshERP-boot/src/main/java/com/jsh/erp/controller/DepotHeadController.java index ebd58b18..56af6f1f 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/controller/DepotHeadController.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/controller/DepotHeadController.java @@ -18,6 +18,7 @@ import com.jsh.erp.service.depotHead.DepotHeadService; import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.redis.RedisService; import com.jsh.erp.service.supplier.SupplierService; +import com.jsh.erp.service.systemConfig.SystemConfigService; import com.jsh.erp.utils.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -54,6 +55,9 @@ public class DepotHeadController { @Resource private DepotService depotService; + @Resource + private SystemConfigService systemConfigService; + @Resource private RedisService redisService; @@ -126,9 +130,10 @@ public class DepotHeadController { String [] organArray = depotHeadService.getOrganArray(subType, ""); beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); - List list = depotHeadService.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, + Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag(); + List list = depotHeadService.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, amountApprovalFlag, StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), remark, (currentPage-1)*pageSize, pageSize); - int total = depotHeadService.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, + int total = depotHeadService.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, amountApprovalFlag, StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), remark); map.put("total", total); //存放数据json数组 @@ -189,9 +194,10 @@ public class DepotHeadController { } beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); - List list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, StringUtil.toNull(materialParam), + Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag(); + List list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, amountApprovalFlag, StringUtil.toNull(materialParam), depotList, oId, roleType, (currentPage-1)*pageSize, pageSize); - int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, StringUtil.toNull(materialParam), + int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, amountApprovalFlag, StringUtil.toNull(materialParam), depotList, oId, roleType); map.put("total", total); map.put("rows", list); @@ -261,10 +267,11 @@ public class DepotHeadController { String [] creatorArray = depotHeadService.getCreatorArray(roleType); beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); + Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag(); List list = depotHeadService.findAllocationDetail(beginTime, endTime, subType, StringUtil.toNull(number), - creatorArray, StringUtil.toNull(materialParam), depotList, depotFList, remark, (currentPage-1)*pageSize, pageSize); + creatorArray, amountApprovalFlag, StringUtil.toNull(materialParam), depotList, depotFList, remark, (currentPage-1)*pageSize, pageSize); int total = depotHeadService.findAllocationDetailCount(beginTime, endTime, subType, StringUtil.toNull(number), - creatorArray, StringUtil.toNull(materialParam), depotList, depotFList, remark); + creatorArray, amountApprovalFlag, StringUtil.toNull(materialParam), depotList, depotFList, remark); map.put("rows", list); map.put("total", total); res.code = 200; diff --git a/jshERP-boot/src/main/java/com/jsh/erp/controller/DepotItemController.java b/jshERP-boot/src/main/java/com/jsh/erp/controller/DepotItemController.java index 49eb0af0..afe76342 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/controller/DepotItemController.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/controller/DepotItemController.java @@ -15,6 +15,7 @@ import com.jsh.erp.service.depotItem.DepotItemService; import com.jsh.erp.service.material.MaterialService; import com.jsh.erp.service.redis.RedisService; import com.jsh.erp.service.role.RoleService; +import com.jsh.erp.service.systemConfig.SystemConfigService; import com.jsh.erp.service.unit.UnitService; import com.jsh.erp.utils.*; import io.swagger.annotations.Api; @@ -62,6 +63,9 @@ public class DepotItemController { @Resource private RoleService roleService; + @Resource + private SystemConfigService systemConfigService; + /** * 根据仓库和商品查询单据列表 * @param mId @@ -474,11 +478,12 @@ public class DepotItemController { endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); try { String [] creatorArray = depotHeadService.getCreatorArray(roleType); + Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag(); List dataList = depotItemService.getListWithBugOrSale(StringUtil.toNull(materialParam), - "buy", beginTime, endTime, creatorArray, (currentPage-1)*pageSize, pageSize); + "buy", beginTime, endTime, creatorArray, amountApprovalFlag, (currentPage-1)*pageSize, pageSize); String[] mpArr = mpList.split(","); int total = depotItemService.getListWithBugOrSaleCount(StringUtil.toNull(materialParam), - "buy", beginTime, endTime, creatorArray); + "buy", beginTime, endTime, creatorArray, amountApprovalFlag); map.put("total", total); //存放数据json数组 JSONArray dataArray = new JSONArray(); @@ -546,11 +551,12 @@ public class DepotItemController { endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); try { String [] creatorArray = depotHeadService.getCreatorArray(roleType); + Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag(); List dataList = depotItemService.getListWithBugOrSale(StringUtil.toNull(materialParam), - "sale", beginTime, endTime, creatorArray, (currentPage-1)*pageSize, pageSize); + "sale", beginTime, endTime, creatorArray, amountApprovalFlag, (currentPage-1)*pageSize, pageSize); String[] mpArr = mpList.split(","); int total = depotItemService.getListWithBugOrSaleCount(StringUtil.toNull(materialParam), - "sale", beginTime, endTime, creatorArray); + "sale", beginTime, endTime, creatorArray, amountApprovalFlag); map.put("total", total); //存放数据json数组 JSONArray dataArray = new JSONArray(); diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/AccountHead.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/AccountHead.java index 1fed1391..73cc7710 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/AccountHead.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/AccountHead.java @@ -32,6 +32,8 @@ public class AccountHead { private String status; + private String source; + private Long tenantId; private String deleteFlag; @@ -148,6 +150,14 @@ public class AccountHead { this.status = status == null ? null : status.trim(); } + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source == null ? null : source.trim(); + } + public Long getTenantId() { return tenantId; } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/AccountHeadExample.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/AccountHeadExample.java index 6b78e064..d0e82df0 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/AccountHeadExample.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/AccountHeadExample.java @@ -996,6 +996,76 @@ public class AccountHeadExample { return (Criteria) this; } + public Criteria andSourceIsNull() { + addCriterion("source is null"); + return (Criteria) this; + } + + public Criteria andSourceIsNotNull() { + addCriterion("source is not null"); + return (Criteria) this; + } + + public Criteria andSourceEqualTo(String value) { + addCriterion("source =", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotEqualTo(String value) { + addCriterion("source <>", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThan(String value) { + addCriterion("source >", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThanOrEqualTo(String value) { + addCriterion("source >=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThan(String value) { + addCriterion("source <", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThanOrEqualTo(String value) { + addCriterion("source <=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLike(String value) { + addCriterion("source like", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotLike(String value) { + addCriterion("source not like", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceIn(List values) { + addCriterion("source in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotIn(List values) { + addCriterion("source not in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceBetween(String value1, String value2) { + addCriterion("source between", value1, value2, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotBetween(String value1, String value2) { + addCriterion("source not between", value1, value2, "source"); + return (Criteria) this; + } + public Criteria andTenantIdIsNull() { addCriterion("tenant_id is null"); return (Criteria) this; diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/DepotHead.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/DepotHead.java index f9c9cfcd..5dc86c77 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/DepotHead.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/DepotHead.java @@ -58,6 +58,8 @@ public class DepotHead { private String purchaseStatus; + private String source; + private String linkNumber; private Long tenantId; @@ -280,6 +282,14 @@ public class DepotHead { this.purchaseStatus = purchaseStatus == null ? null : purchaseStatus.trim(); } + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source == null ? null : source.trim(); + } + public String getLinkNumber() { return linkNumber; } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/DepotHeadExample.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/DepotHeadExample.java index cea753c7..1b0b9dad 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/DepotHeadExample.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/DepotHeadExample.java @@ -1856,6 +1856,76 @@ public class DepotHeadExample { return (Criteria) this; } + public Criteria andSourceIsNull() { + addCriterion("source is null"); + return (Criteria) this; + } + + public Criteria andSourceIsNotNull() { + addCriterion("source is not null"); + return (Criteria) this; + } + + public Criteria andSourceEqualTo(String value) { + addCriterion("source =", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotEqualTo(String value) { + addCriterion("source <>", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThan(String value) { + addCriterion("source >", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThanOrEqualTo(String value) { + addCriterion("source >=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThan(String value) { + addCriterion("source <", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThanOrEqualTo(String value) { + addCriterion("source <=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLike(String value) { + addCriterion("source like", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotLike(String value) { + addCriterion("source not like", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceIn(List values) { + addCriterion("source in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotIn(List values) { + addCriterion("source not in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceBetween(String value1, String value2) { + addCriterion("source between", value1, value2, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotBetween(String value1, String value2) { + addCriterion("source not between", value1, value2, "source"); + return (Criteria) this; + } + public Criteria andLinkNumberIsNull() { addCriterion("link_number is null"); return (Criteria) this; diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java index e304da5a..07e0fdae 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java @@ -29,6 +29,8 @@ public class SystemConfig { private String multiBillType; + private String amountApprovalFlag; + private Long tenantId; private String deleteFlag; @@ -145,6 +147,14 @@ public class SystemConfig { this.multiBillType = multiBillType == null ? null : multiBillType.trim(); } + public String getAmountApprovalFlag() { + return amountApprovalFlag; + } + + public void setAmountApprovalFlag(String amountApprovalFlag) { + this.amountApprovalFlag = amountApprovalFlag == null ? null : amountApprovalFlag.trim(); + } + public Long getTenantId() { return tenantId; } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java index caff7f4f..713b6e62 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java @@ -1074,6 +1074,76 @@ public class SystemConfigExample { return (Criteria) this; } + public Criteria andAmountApprovalFlagIsNull() { + addCriterion("amount_approval_flag is null"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagIsNotNull() { + addCriterion("amount_approval_flag is not null"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagEqualTo(String value) { + addCriterion("amount_approval_flag =", value, "amountApprovalFlag"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagNotEqualTo(String value) { + addCriterion("amount_approval_flag <>", value, "amountApprovalFlag"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagGreaterThan(String value) { + addCriterion("amount_approval_flag >", value, "amountApprovalFlag"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagGreaterThanOrEqualTo(String value) { + addCriterion("amount_approval_flag >=", value, "amountApprovalFlag"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagLessThan(String value) { + addCriterion("amount_approval_flag <", value, "amountApprovalFlag"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagLessThanOrEqualTo(String value) { + addCriterion("amount_approval_flag <=", value, "amountApprovalFlag"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagLike(String value) { + addCriterion("amount_approval_flag like", value, "amountApprovalFlag"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagNotLike(String value) { + addCriterion("amount_approval_flag not like", value, "amountApprovalFlag"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagIn(List values) { + addCriterion("amount_approval_flag in", values, "amountApprovalFlag"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagNotIn(List values) { + addCriterion("amount_approval_flag not in", values, "amountApprovalFlag"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagBetween(String value1, String value2) { + addCriterion("amount_approval_flag between", value1, value2, "amountApprovalFlag"); + return (Criteria) this; + } + + public Criteria andAmountApprovalFlagNotBetween(String value1, String value2) { + addCriterion("amount_approval_flag not between", value1, value2, "amountApprovalFlag"); + return (Criteria) this; + } + public Criteria andTenantIdIsNull() { addCriterion("tenant_id is null"); return (Criteria) this; diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Unit.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Unit.java index c91b6eee..449692c3 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Unit.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Unit.java @@ -1,5 +1,7 @@ package com.jsh.erp.datasource.entities; +import java.math.BigDecimal; + public class Unit { private Long id; @@ -13,11 +15,11 @@ public class Unit { private String otherUnitThree; - private Integer ratio; + private BigDecimal ratio; - private Integer ratioTwo; + private BigDecimal ratioTwo; - private Integer ratioThree; + private BigDecimal ratioThree; private Boolean enabled; @@ -73,27 +75,27 @@ public class Unit { this.otherUnitThree = otherUnitThree == null ? null : otherUnitThree.trim(); } - public Integer getRatio() { + public BigDecimal getRatio() { return ratio; } - public void setRatio(Integer ratio) { + public void setRatio(BigDecimal ratio) { this.ratio = ratio; } - public Integer getRatioTwo() { + public BigDecimal getRatioTwo() { return ratioTwo; } - public void setRatioTwo(Integer ratioTwo) { + public void setRatioTwo(BigDecimal ratioTwo) { this.ratioTwo = ratioTwo; } - public Integer getRatioThree() { + public BigDecimal getRatioThree() { return ratioThree; } - public void setRatioThree(Integer ratioThree) { + public void setRatioThree(BigDecimal ratioThree) { this.ratioThree = ratioThree; } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/UnitExample.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/UnitExample.java index 39875b86..388e465b 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/UnitExample.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/UnitExample.java @@ -1,5 +1,6 @@ package com.jsh.erp.datasource.entities; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -524,52 +525,52 @@ public class UnitExample { return (Criteria) this; } - public Criteria andRatioEqualTo(Integer value) { + public Criteria andRatioEqualTo(BigDecimal value) { addCriterion("ratio =", value, "ratio"); return (Criteria) this; } - public Criteria andRatioNotEqualTo(Integer value) { + public Criteria andRatioNotEqualTo(BigDecimal value) { addCriterion("ratio <>", value, "ratio"); return (Criteria) this; } - public Criteria andRatioGreaterThan(Integer value) { + public Criteria andRatioGreaterThan(BigDecimal value) { addCriterion("ratio >", value, "ratio"); return (Criteria) this; } - public Criteria andRatioGreaterThanOrEqualTo(Integer value) { + public Criteria andRatioGreaterThanOrEqualTo(BigDecimal value) { addCriterion("ratio >=", value, "ratio"); return (Criteria) this; } - public Criteria andRatioLessThan(Integer value) { + public Criteria andRatioLessThan(BigDecimal value) { addCriterion("ratio <", value, "ratio"); return (Criteria) this; } - public Criteria andRatioLessThanOrEqualTo(Integer value) { + public Criteria andRatioLessThanOrEqualTo(BigDecimal value) { addCriterion("ratio <=", value, "ratio"); return (Criteria) this; } - public Criteria andRatioIn(List values) { + public Criteria andRatioIn(List values) { addCriterion("ratio in", values, "ratio"); return (Criteria) this; } - public Criteria andRatioNotIn(List values) { + public Criteria andRatioNotIn(List values) { addCriterion("ratio not in", values, "ratio"); return (Criteria) this; } - public Criteria andRatioBetween(Integer value1, Integer value2) { + public Criteria andRatioBetween(BigDecimal value1, BigDecimal value2) { addCriterion("ratio between", value1, value2, "ratio"); return (Criteria) this; } - public Criteria andRatioNotBetween(Integer value1, Integer value2) { + public Criteria andRatioNotBetween(BigDecimal value1, BigDecimal value2) { addCriterion("ratio not between", value1, value2, "ratio"); return (Criteria) this; } @@ -584,52 +585,52 @@ public class UnitExample { return (Criteria) this; } - public Criteria andRatioTwoEqualTo(Integer value) { + public Criteria andRatioTwoEqualTo(BigDecimal value) { addCriterion("ratio_two =", value, "ratioTwo"); return (Criteria) this; } - public Criteria andRatioTwoNotEqualTo(Integer value) { + public Criteria andRatioTwoNotEqualTo(BigDecimal value) { addCriterion("ratio_two <>", value, "ratioTwo"); return (Criteria) this; } - public Criteria andRatioTwoGreaterThan(Integer value) { + public Criteria andRatioTwoGreaterThan(BigDecimal value) { addCriterion("ratio_two >", value, "ratioTwo"); return (Criteria) this; } - public Criteria andRatioTwoGreaterThanOrEqualTo(Integer value) { + public Criteria andRatioTwoGreaterThanOrEqualTo(BigDecimal value) { addCriterion("ratio_two >=", value, "ratioTwo"); return (Criteria) this; } - public Criteria andRatioTwoLessThan(Integer value) { + public Criteria andRatioTwoLessThan(BigDecimal value) { addCriterion("ratio_two <", value, "ratioTwo"); return (Criteria) this; } - public Criteria andRatioTwoLessThanOrEqualTo(Integer value) { + public Criteria andRatioTwoLessThanOrEqualTo(BigDecimal value) { addCriterion("ratio_two <=", value, "ratioTwo"); return (Criteria) this; } - public Criteria andRatioTwoIn(List values) { + public Criteria andRatioTwoIn(List values) { addCriterion("ratio_two in", values, "ratioTwo"); return (Criteria) this; } - public Criteria andRatioTwoNotIn(List values) { + public Criteria andRatioTwoNotIn(List values) { addCriterion("ratio_two not in", values, "ratioTwo"); return (Criteria) this; } - public Criteria andRatioTwoBetween(Integer value1, Integer value2) { + public Criteria andRatioTwoBetween(BigDecimal value1, BigDecimal value2) { addCriterion("ratio_two between", value1, value2, "ratioTwo"); return (Criteria) this; } - public Criteria andRatioTwoNotBetween(Integer value1, Integer value2) { + public Criteria andRatioTwoNotBetween(BigDecimal value1, BigDecimal value2) { addCriterion("ratio_two not between", value1, value2, "ratioTwo"); return (Criteria) this; } @@ -644,52 +645,52 @@ public class UnitExample { return (Criteria) this; } - public Criteria andRatioThreeEqualTo(Integer value) { + public Criteria andRatioThreeEqualTo(BigDecimal value) { addCriterion("ratio_three =", value, "ratioThree"); return (Criteria) this; } - public Criteria andRatioThreeNotEqualTo(Integer value) { + public Criteria andRatioThreeNotEqualTo(BigDecimal value) { addCriterion("ratio_three <>", value, "ratioThree"); return (Criteria) this; } - public Criteria andRatioThreeGreaterThan(Integer value) { + public Criteria andRatioThreeGreaterThan(BigDecimal value) { addCriterion("ratio_three >", value, "ratioThree"); return (Criteria) this; } - public Criteria andRatioThreeGreaterThanOrEqualTo(Integer value) { + public Criteria andRatioThreeGreaterThanOrEqualTo(BigDecimal value) { addCriterion("ratio_three >=", value, "ratioThree"); return (Criteria) this; } - public Criteria andRatioThreeLessThan(Integer value) { + public Criteria andRatioThreeLessThan(BigDecimal value) { addCriterion("ratio_three <", value, "ratioThree"); return (Criteria) this; } - public Criteria andRatioThreeLessThanOrEqualTo(Integer value) { + public Criteria andRatioThreeLessThanOrEqualTo(BigDecimal value) { addCriterion("ratio_three <=", value, "ratioThree"); return (Criteria) this; } - public Criteria andRatioThreeIn(List values) { + public Criteria andRatioThreeIn(List values) { addCriterion("ratio_three in", values, "ratioThree"); return (Criteria) this; } - public Criteria andRatioThreeNotIn(List values) { + public Criteria andRatioThreeNotIn(List values) { addCriterion("ratio_three not in", values, "ratioThree"); return (Criteria) this; } - public Criteria andRatioThreeBetween(Integer value1, Integer value2) { + public Criteria andRatioThreeBetween(BigDecimal value1, BigDecimal value2) { addCriterion("ratio_three between", value1, value2, "ratioThree"); return (Criteria) this; } - public Criteria andRatioThreeNotBetween(Integer value1, Integer value2) { + public Criteria andRatioThreeNotBetween(BigDecimal value1, BigDecimal value2) { addCriterion("ratio_three not between", value1, value2, "ratioThree"); return (Criteria) this; } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java index c2c6d639..4d1f2530 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java @@ -69,6 +69,7 @@ public interface DepotHeadMapperEx { @Param("type") String type, @Param("creatorArray") String[] creatorArray, @Param("organArray") String[] organArray, + @Param("amountApprovalFlag") Boolean amountApprovalFlag, @Param("materialParam") String materialParam, @Param("depotList") List depotList, @Param("oId") Integer oId, @@ -83,6 +84,7 @@ public interface DepotHeadMapperEx { @Param("type") String type, @Param("creatorArray") String[] creatorArray, @Param("organArray") String[] organArray, + @Param("amountApprovalFlag") Boolean amountApprovalFlag, @Param("materialParam") String materialParam, @Param("depotList") List depotList, @Param("oId") Integer oId, @@ -93,6 +95,7 @@ public interface DepotHeadMapperEx { @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("type") String type, + @Param("amountApprovalFlag") Boolean amountApprovalFlag, @Param("materialParam") String materialParam, @Param("depotList") List depotList, @Param("oId") Integer oId, @@ -105,6 +108,7 @@ public interface DepotHeadMapperEx { @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("type") String type, + @Param("amountApprovalFlag") Boolean amountApprovalFlag, @Param("materialParam") String materialParam, @Param("depotList") List depotList, @Param("oId") Integer oId, @@ -117,6 +121,7 @@ public interface DepotHeadMapperEx { @Param("subType") String subType, @Param("number") String number, @Param("creatorArray") String[] creatorArray, + @Param("amountApprovalFlag") Boolean amountApprovalFlag, @Param("materialParam") String materialParam, @Param("depotList") List depotList, @Param("depotFList") List depotFList, @@ -130,6 +135,7 @@ public interface DepotHeadMapperEx { @Param("subType") String subType, @Param("number") String number, @Param("creatorArray") String[] creatorArray, + @Param("amountApprovalFlag") Boolean amountApprovalFlag, @Param("materialParam") String materialParam, @Param("depotList") List depotList, @Param("depotFList") List depotFList, @@ -206,14 +212,16 @@ public interface DepotHeadMapperEx { @Param("hasSupplier") Integer hasSupplier, @Param("beginTime") String beginTime, @Param("endTime") String endTime, - @Param("creatorArray") String[] creatorArray); + @Param("creatorArray") String[] creatorArray, + @Param("amountApprovalFlag") Boolean amountApprovalFlag); BigDecimal getBuyAndSaleRetailStatistics( @Param("type") String type, @Param("subType") String subType, @Param("beginTime") String beginTime, @Param("endTime") String endTime, - @Param("creatorArray") String[] creatorArray); + @Param("creatorArray") String[] creatorArray, + @Param("amountApprovalFlag") Boolean amountApprovalFlag); List debtList( @Param("organId") Long organId, diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java index 7f69e895..f0ac6e07 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java @@ -68,6 +68,7 @@ public interface DepotItemMapperEx { @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("creatorArray") String[] creatorArray, + @Param("amountApprovalFlag") Boolean amountApprovalFlag, @Param("offset") Integer offset, @Param("rows") Integer rows); @@ -76,7 +77,8 @@ public interface DepotItemMapperEx { @Param("billType") String billType, @Param("beginTime") String beginTime, @Param("endTime") String endTime, - @Param("creatorArray") String[] creatorArray); + @Param("creatorArray") String[] creatorArray, + @Param("amountApprovalFlag") Boolean amountApprovalFlag); BigDecimal buyOrSaleNumber( @Param("type") String type, @@ -101,14 +103,16 @@ public interface DepotItemMapperEx { @Param("subType") String subType, @Param("beginTime") String beginTime, @Param("endTime") String endTime, - @Param("creatorArray") String[] creatorArray); + @Param("creatorArray") String[] creatorArray, + @Param("amountApprovalFlag") Boolean amountApprovalFlag); BigDecimal inOrOutRetailPrice( @Param("type") String type, @Param("subType") String subType, @Param("beginTime") String beginTime, @Param("endTime") String endTime, - @Param("creatorArray") String[] creatorArray); + @Param("creatorArray") String[] creatorArray, + @Param("amountApprovalFlag") Boolean amountApprovalFlag); BigDecimal getStockCheckSumByDepotList( @Param("depotList") List depotList, diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java index b651819f..6b39874c 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java @@ -10,6 +10,7 @@ import com.jsh.erp.datasource.vo.AccountVo4List; import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.JshException; import com.jsh.erp.service.log.LogService; +import com.jsh.erp.service.systemConfig.SystemConfigService; import com.jsh.erp.service.user.UserService; import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.Tools; @@ -55,6 +56,8 @@ public class AccountService { private LogService logService; @Resource private UserService userService; + @Resource + private SystemConfigService systemConfigService; public Account getAccount(long id) throws Exception{ return accountMapper.selectByPrimaryKey(id); @@ -105,16 +108,19 @@ public class AccountService { JshException.readFail(logger, e); } String timeStr = Tools.getCurrentMonth(); + Boolean apprFlag = systemConfigService.getAmountApprovalFlag(); if (null != list && null !=timeStr) { for (AccountVo4List al : list) { DecimalFormat df = new DecimalFormat(".##"); - BigDecimal thisMonthAmount = getAccountSum(al.getId(), timeStr, "month").add(getAccountSumByHead(al.getId(), timeStr, "month")).add(getAccountSumByDetail(al.getId(), timeStr, "month")).add(getManyAccountSum(al.getId(), timeStr, "month")); + BigDecimal thisMonthAmount = getAccountSum(al.getId(), timeStr, "month", apprFlag).add(getAccountSumByHead(al.getId(), timeStr, "month", apprFlag)) + .add(getAccountSumByDetail(al.getId(), timeStr, "month", apprFlag)).add(getManyAccountSum(al.getId(), timeStr, "month", apprFlag)); String thisMonthAmountFmt = "0"; if ((thisMonthAmount.compareTo(BigDecimal.ZERO))!=0) { thisMonthAmountFmt = df.format(thisMonthAmount); } al.setThisMonthAmount(thisMonthAmountFmt); //本月发生额 - BigDecimal currentAmount = getAccountSum(al.getId(), "", "month").add(getAccountSumByHead(al.getId(), "", "month")).add(getAccountSumByDetail(al.getId(), "", "month")).add(getManyAccountSum(al.getId(), "", "month")) .add(al.getInitialAmount()) ; + BigDecimal currentAmount = getAccountSum(al.getId(), "", "month", apprFlag).add(getAccountSumByHead(al.getId(), "", "month", apprFlag)) + .add(getAccountSumByDetail(al.getId(), "", "month", apprFlag)).add(getManyAccountSum(al.getId(), "", "month", apprFlag)) .add(al.getInitialAmount()) ; al.setCurrentAmount(currentAmount); resList.add(al); } @@ -273,28 +279,32 @@ public class AccountService { * @param id * @return */ - public BigDecimal getAccountSum(Long id, String timeStr, String type) throws Exception{ + public BigDecimal getAccountSum(Long id, String timeStr, String type, Boolean apprFlag) throws Exception{ BigDecimal accountSum = BigDecimal.ZERO; try { DepotHeadExample example = new DepotHeadExample(); + DepotHeadExample.Criteria criteria = example.createCriteria(); if (!timeStr.equals("")) { Date bTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null); Date eTime = StringUtil.getDateByString(Tools.lastDayOfMonth(timeStr) + BusinessConstants.DAY_LAST_TIME, null); Date mTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null); if (type.equals("month")) { - example.createCriteria().andAccountIdEqualTo(id).andPayTypeNotEqualTo("预付款") + criteria.andAccountIdEqualTo(id).andPayTypeNotEqualTo("预付款") .andOperTimeGreaterThanOrEqualTo(bTime).andOperTimeLessThanOrEqualTo(eTime) .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); } else if (type.equals("date")) { - example.createCriteria().andAccountIdEqualTo(id).andPayTypeNotEqualTo("预付款") + criteria.andAccountIdEqualTo(id).andPayTypeNotEqualTo("预付款") .andOperTimeLessThanOrEqualTo(mTime).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); } } else { - example.createCriteria().andAccountIdEqualTo(id).andPayTypeNotEqualTo("预付款") + criteria.andAccountIdEqualTo(id).andPayTypeNotEqualTo("预付款") .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); } List dataList=null; try{ + if(apprFlag) { + criteria.andStatusEqualTo("1"); + } dataList = depotHeadMapper.selectByExample(example); }catch(Exception e){ JshException.readFail(logger, e); @@ -318,29 +328,33 @@ public class AccountService { * @param id * @return */ - public BigDecimal getAccountSumByHead(Long id, String timeStr, String type) throws Exception{ + public BigDecimal getAccountSumByHead(Long id, String timeStr, String type, Boolean apprFlag) throws Exception{ BigDecimal accountSum = BigDecimal.ZERO; try { AccountHeadExample example = new AccountHeadExample(); + AccountHeadExample.Criteria criteria = example.createCriteria(); if (!timeStr.equals("")) { Date bTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null); Date eTime = StringUtil.getDateByString(Tools.lastDayOfMonth(timeStr) + BusinessConstants.DAY_LAST_TIME, null); Date mTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null); if (type.equals("month")) { - example.createCriteria().andAccountIdEqualTo(id) + criteria.andAccountIdEqualTo(id) .andBillTimeGreaterThanOrEqualTo(bTime).andBillTimeLessThanOrEqualTo(eTime) .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); } else if (type.equals("date")) { - example.createCriteria().andAccountIdEqualTo(id) + criteria.andAccountIdEqualTo(id) .andBillTimeLessThanOrEqualTo(mTime) .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); } } else { - example.createCriteria().andAccountIdEqualTo(id) + criteria.andAccountIdEqualTo(id) .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); } List dataList=null; try{ + if(apprFlag) { + criteria.andStatusEqualTo("1"); + } dataList = accountHeadMapper.selectByExample(example); }catch(Exception e){ JshException.readFail(logger, e); @@ -364,24 +378,28 @@ public class AccountService { * @param id * @return */ - public BigDecimal getAccountSumByDetail(Long id, String timeStr, String type)throws Exception { + public BigDecimal getAccountSumByDetail(Long id, String timeStr, String type, Boolean apprFlag)throws Exception { BigDecimal accountSum =BigDecimal.ZERO ; try { AccountHeadExample example = new AccountHeadExample(); + AccountHeadExample.Criteria criteria = example.createCriteria(); if (!timeStr.equals("")) { Date bTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null); Date eTime = StringUtil.getDateByString(Tools.lastDayOfMonth(timeStr) + BusinessConstants.DAY_LAST_TIME, null); Date mTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null); if (type.equals("month")) { - example.createCriteria().andBillTimeGreaterThanOrEqualTo(bTime).andBillTimeLessThanOrEqualTo(eTime) + criteria.andBillTimeGreaterThanOrEqualTo(bTime).andBillTimeLessThanOrEqualTo(eTime) .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); } else if (type.equals("date")) { - example.createCriteria().andBillTimeLessThanOrEqualTo(mTime) + criteria.andBillTimeLessThanOrEqualTo(mTime) .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); } } List dataList=null; try{ + if(apprFlag) { + criteria.andStatusEqualTo("1"); + } dataList = accountHeadMapper.selectByExample(example); }catch(Exception e){ JshException.readFail(logger, e); @@ -423,20 +441,21 @@ public class AccountService { * @param id * @return */ - public BigDecimal getManyAccountSum(Long id, String timeStr, String type)throws Exception { + public BigDecimal getManyAccountSum(Long id, String timeStr, String type, Boolean apprFlag)throws Exception { BigDecimal accountSum = BigDecimal.ZERO; try { DepotHeadExample example = new DepotHeadExample(); + DepotHeadExample.Criteria criteria = example.createCriteria(); if (!timeStr.equals("")) { Date bTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null); Date eTime = StringUtil.getDateByString(Tools.lastDayOfMonth(timeStr) + BusinessConstants.DAY_LAST_TIME, null); Date mTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null); if (type.equals("month")) { - example.createCriteria().andAccountIdListLike("%" +id.toString() + "%") + criteria.andAccountIdListLike("%" +id.toString() + "%") .andOperTimeGreaterThanOrEqualTo(bTime).andOperTimeLessThanOrEqualTo(eTime) .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); } else if (type.equals("date")) { - example.createCriteria().andAccountIdListLike("%" +id.toString() + "%") + criteria.andAccountIdListLike("%" +id.toString() + "%") .andOperTimeLessThanOrEqualTo(mTime) .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); } @@ -446,6 +465,9 @@ public class AccountService { } List dataList=null; try{ + if(apprFlag) { + criteria.andStatusEqualTo("1"); + } dataList = depotHeadMapper.selectByExample(example); }catch(Exception e){ JshException.readFail(logger, e); @@ -548,12 +570,13 @@ public class AccountService { String timeStr = Tools.getCurrentMonth(); BigDecimal allMonthAmount = BigDecimal.ZERO; BigDecimal allCurrentAmount = BigDecimal.ZERO; + Boolean apprFlag = systemConfigService.getAmountApprovalFlag(); if (null != list && null !=timeStr) { for (Account a : list) { - BigDecimal monthAmount = getAccountSum(a.getId(), timeStr, "month").add(getAccountSumByHead(a.getId(), timeStr, "month")) - .add(getAccountSumByDetail(a.getId(), timeStr, "month")).add(getManyAccountSum(a.getId(), timeStr, "month")); - BigDecimal currentAmount = getAccountSum(a.getId(), "", "month").add(getAccountSumByHead(a.getId(), "", "month")) - .add(getAccountSumByDetail(a.getId(), "", "month")).add(getManyAccountSum(a.getId(), "", "month")).add(a.getInitialAmount()); + BigDecimal monthAmount = getAccountSum(a.getId(), timeStr, "month", apprFlag).add(getAccountSumByHead(a.getId(), timeStr, "month", apprFlag)) + .add(getAccountSumByDetail(a.getId(), timeStr, "month", apprFlag)).add(getManyAccountSum(a.getId(), timeStr, "month", apprFlag)); + BigDecimal currentAmount = getAccountSum(a.getId(), "", "month", apprFlag).add(getAccountSumByHead(a.getId(), "", "month", apprFlag)) + .add(getAccountSumByDetail(a.getId(), "", "month", apprFlag)).add(getManyAccountSum(a.getId(), "", "month", apprFlag)).add(a.getInitialAmount()); allMonthAmount = allMonthAmount.add(monthAmount); allCurrentAmount = allCurrentAmount.add(currentAmount); } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java index 3495fd6c..8ae53c15 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java @@ -18,7 +18,6 @@ import com.jsh.erp.service.depotItem.DepotItemService; import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.orgaUserRel.OrgaUserRelService; import com.jsh.erp.service.person.PersonService; -import com.jsh.erp.service.redis.RedisService; import com.jsh.erp.service.role.RoleService; import com.jsh.erp.service.serialNumber.SerialNumberService; import com.jsh.erp.service.supplier.SupplierService; @@ -38,7 +37,6 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.math.BigDecimal; import java.sql.Timestamp; -import java.text.DecimalFormat; import java.util.*; import static com.jsh.erp.utils.Tools.getCenternTime; @@ -586,11 +584,11 @@ public class DepotHeadService { } public List findInOutDetail(String beginTime, String endTime, String type, String [] creatorArray, - String [] organArray, String materialParam, List depotList, Integer oId, String number, + String [] organArray, Boolean amountApprovalFlag, String materialParam, List depotList, Integer oId, String number, String remark, Integer offset, Integer rows) throws Exception{ List list = null; try{ - list =depotHeadMapperEx.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, materialParam, depotList, oId, number, remark, offset, rows); + list =depotHeadMapperEx.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, amountApprovalFlag, materialParam, depotList, oId, number, remark, offset, rows); }catch(Exception e){ JshException.readFail(logger, e); } @@ -598,25 +596,25 @@ public class DepotHeadService { } public int findInOutDetailCount(String beginTime, String endTime, String type, String [] creatorArray, - String [] organArray, String materialParam, List depotList, Integer oId, String number, + String [] organArray, Boolean amountApprovalFlag, String materialParam, List depotList, Integer oId, String number, String remark) throws Exception{ int result = 0; try{ - result =depotHeadMapperEx.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, materialParam, depotList, oId, number, remark); + result =depotHeadMapperEx.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, amountApprovalFlag, materialParam, depotList, oId, number, remark); }catch(Exception e){ JshException.readFail(logger, e); } return result; } - public List findInOutMaterialCount(String beginTime, String endTime, String type, String materialParam, + public List findInOutMaterialCount(String beginTime, String endTime, String type, Boolean amountApprovalFlag, String materialParam, List depotList, Integer oId, String roleType, Integer offset, Integer rows)throws Exception { List list = null; try{ String [] creatorArray = getCreatorArray(roleType); String subType = "出库".equals(type)? "销售" : ""; String [] organArray = getOrganArray(subType, ""); - list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, materialParam, depotList, oId, + list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, amountApprovalFlag, materialParam, depotList, oId, creatorArray, organArray, offset, rows); }catch(Exception e){ JshException.readFail(logger, e); @@ -624,14 +622,14 @@ public class DepotHeadService { return list; } - public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, String materialParam, + public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, Boolean amountApprovalFlag, String materialParam, List depotList, Integer oId, String roleType)throws Exception { int result = 0; try{ String [] creatorArray = getCreatorArray(roleType); String subType = "出库".equals(type)? "销售" : ""; String [] organArray = getOrganArray(subType, ""); - result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, materialParam, depotList, oId, + result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, amountApprovalFlag, materialParam, depotList, oId, creatorArray, organArray); }catch(Exception e){ JshException.readFail(logger, e); @@ -640,11 +638,11 @@ public class DepotHeadService { } public List findAllocationDetail(String beginTime, String endTime, String subType, String number, - String [] creatorArray, String materialParam, List depotList, List depotFList, + String [] creatorArray, Boolean amountApprovalFlag, String materialParam, List depotList, List depotFList, String remark, Integer offset, Integer rows) throws Exception{ List list = null; try{ - list =depotHeadMapperEx.findAllocationDetail(beginTime, endTime, subType, number, creatorArray, + list =depotHeadMapperEx.findAllocationDetail(beginTime, endTime, subType, number, creatorArray, amountApprovalFlag, materialParam, depotList, depotFList, remark, offset, rows); }catch(Exception e){ JshException.readFail(logger, e); @@ -653,11 +651,11 @@ public class DepotHeadService { } public int findAllocationDetailCount(String beginTime, String endTime, String subType, String number, - String [] creatorArray, String materialParam, List depotList, List depotFList, + String [] creatorArray, Boolean amountApprovalFlag, String materialParam, List depotList, List depotFList, String remark) throws Exception{ int result = 0; try{ - result =depotHeadMapperEx.findAllocationDetailCount(beginTime, endTime, subType, number, creatorArray, + result =depotHeadMapperEx.findAllocationDetailCount(beginTime, endTime, subType, number, creatorArray, amountApprovalFlag, materialParam, depotList, depotFList, remark); }catch(Exception e){ JshException.readFail(logger, e); @@ -1198,13 +1196,15 @@ public class DepotHeadService { } public BigDecimal getBuyAndSaleBasicStatistics(String type, String subType, Integer hasSupplier, - String beginTime, String endTime, String[] creatorArray) { - return depotHeadMapperEx.getBuyAndSaleBasicStatistics(type, subType, hasSupplier, beginTime, endTime, creatorArray); + String beginTime, String endTime, String[] creatorArray) throws Exception { + Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag(); + return depotHeadMapperEx.getBuyAndSaleBasicStatistics(type, subType, hasSupplier, beginTime, endTime, creatorArray, amountApprovalFlag); } public BigDecimal getBuyAndSaleRetailStatistics(String type, String subType, - String beginTime, String endTime, String[] creatorArray) { - return depotHeadMapperEx.getBuyAndSaleRetailStatistics(type, subType, beginTime, endTime, creatorArray).abs(); + String beginTime, String endTime, String[] creatorArray) throws Exception { + Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag(); + return depotHeadMapperEx.getBuyAndSaleRetailStatistics(type, subType, beginTime, endTime, creatorArray, amountApprovalFlag).abs(); } public DepotHead getDepotHead(String number)throws Exception { diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java index debc062d..65c9e376 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java @@ -314,10 +314,10 @@ public class DepotItemService { } public List getListWithBugOrSale(String materialParam, String billType, - String beginTime, String endTime, String[] creatorArray, Integer offset, Integer rows)throws Exception { + String beginTime, String endTime, String[] creatorArray, Boolean amountApprovalFlag, Integer offset, Integer rows)throws Exception { List list =null; try{ - list = depotItemMapperEx.getListWithBugOrSale(materialParam, billType, beginTime, endTime, creatorArray, offset, rows); + list = depotItemMapperEx.getListWithBugOrSale(materialParam, billType, beginTime, endTime, creatorArray, amountApprovalFlag, offset, rows); }catch(Exception e){ JshException.readFail(logger, e); } @@ -325,10 +325,10 @@ public class DepotItemService { } public int getListWithBugOrSaleCount(String materialParam, String billType, - String beginTime, String endTime, String[] creatorArray)throws Exception { + String beginTime, String endTime, String[] creatorArray, Boolean amountApprovalFlag)throws Exception { int result=0; try{ - result = depotItemMapperEx.getListWithBugOrSaleCount(materialParam, billType, beginTime, endTime, creatorArray); + result = depotItemMapperEx.getListWithBugOrSaleCount(materialParam, billType, beginTime, endTime, creatorArray, amountApprovalFlag); }catch(Exception e){ JshException.readFail(logger, e); } @@ -363,9 +363,10 @@ public class DepotItemService { BigDecimal result= BigDecimal.ZERO; try{ String [] creatorArray = depotHeadService.getCreatorArray(roleType); + Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag(); String beginTime = Tools.firstDayOfMonth(month) + BusinessConstants.DAY_FIRST_TIME; String endTime = Tools.lastDayOfMonth(month) + BusinessConstants.DAY_LAST_TIME; - result = depotItemMapperEx.inOrOutPrice(type, subType, beginTime, endTime, creatorArray); + result = depotItemMapperEx.inOrOutPrice(type, subType, beginTime, endTime, creatorArray, amountApprovalFlag); }catch(Exception e){ JshException.readFail(logger, e); } @@ -384,9 +385,10 @@ public class DepotItemService { BigDecimal result= BigDecimal.ZERO; try{ String [] creatorArray = depotHeadService.getCreatorArray(roleType); + Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag(); String beginTime = Tools.firstDayOfMonth(month) + BusinessConstants.DAY_FIRST_TIME; String endTime = Tools.lastDayOfMonth(month) + BusinessConstants.DAY_LAST_TIME; - result = depotItemMapperEx.inOrOutRetailPrice(type, subType, beginTime, endTime, creatorArray); + result = depotItemMapperEx.inOrOutRetailPrice(type, subType, beginTime, endTime, creatorArray, amountApprovalFlag); result = result.abs(); }catch(Exception e){ JshException.readFail(logger, e); @@ -494,11 +496,11 @@ public class DepotItemService { if (unit.equals(basicUnit)) { //如果等于基本单位 depotItem.setBasicNumber(oNumber); //数量一致 } else if (unit.equals(unitInfo.getOtherUnit())) { //如果等于副单位 - depotItem.setBasicNumber(oNumber.multiply(new BigDecimal(unitInfo.getRatio())) ); //数量乘以比例 + depotItem.setBasicNumber(oNumber.multiply(unitInfo.getRatio())); //数量乘以比例 } else if (unit.equals(unitInfo.getOtherUnitTwo())) { //如果等于副单位2 - depotItem.setBasicNumber(oNumber.multiply(new BigDecimal(unitInfo.getRatioTwo())) ); //数量乘以比例 + depotItem.setBasicNumber(oNumber.multiply(unitInfo.getRatioTwo())); //数量乘以比例 } else if (unit.equals(unitInfo.getOtherUnitThree())) { //如果等于副单位3 - depotItem.setBasicNumber(oNumber.multiply(new BigDecimal(unitInfo.getRatioThree())) ); //数量乘以比例 + depotItem.setBasicNumber(oNumber.multiply(unitInfo.getRatioThree())); //数量乘以比例 } } else { depotItem.setBasicNumber(oNumber); //其他情况 @@ -1034,14 +1036,14 @@ public class DepotItemService { } BigDecimal count = depotItemMapperEx.getFinishNumber(meId, linkId, linkNumber, goToType); //根据多单位情况进行数量的转换 - if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio() != 0) { - count = count.divide(BigDecimal.valueOf(unitInfo.getRatio()),2,BigDecimal.ROUND_HALF_UP); + if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio()!=null && unitInfo.getRatio().compareTo(BigDecimal.ZERO)!=0) { + count = count.divide(unitInfo.getRatio(),2,BigDecimal.ROUND_HALF_UP); } - if(materialUnit.equals(unitInfo.getOtherUnitTwo()) && unitInfo.getRatioTwo() != 0) { - count = count.divide(BigDecimal.valueOf(unitInfo.getRatioTwo()),2,BigDecimal.ROUND_HALF_UP); + if(materialUnit.equals(unitInfo.getOtherUnitTwo()) && unitInfo.getRatioTwo()!=null && unitInfo.getRatioTwo().compareTo(BigDecimal.ZERO)!=0) { + count = count.divide(unitInfo.getRatioTwo(),2,BigDecimal.ROUND_HALF_UP); } - if(materialUnit.equals(unitInfo.getOtherUnitThree()) && unitInfo.getRatioThree() != 0) { - count = count.divide(BigDecimal.valueOf(unitInfo.getRatioThree()),2,BigDecimal.ROUND_HALF_UP); + if(materialUnit.equals(unitInfo.getOtherUnitThree()) && unitInfo.getRatioThree()!=null && unitInfo.getRatioThree().compareTo(BigDecimal.ZERO)!=0) { + count = count.divide(unitInfo.getRatioThree(),2,BigDecimal.ROUND_HALF_UP); } return count; } @@ -1064,14 +1066,14 @@ public class DepotItemService { String linkNumber = depotHead.getNumber(); //订单号 BigDecimal count = depotItemMapperEx.getRealFinishNumber(meId, linkId, linkNumber, currentHeaderId, goToType); //根据多单位情况进行数量的转换 - if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio() != 0) { - count = count.divide(BigDecimal.valueOf(unitInfo.getRatio()),2,BigDecimal.ROUND_HALF_UP); + if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio()!=null && unitInfo.getRatio().compareTo(BigDecimal.ZERO)!=0) { + count = count.divide(unitInfo.getRatio(),2,BigDecimal.ROUND_HALF_UP); } - if(materialUnit.equals(unitInfo.getOtherUnitTwo()) && unitInfo.getRatioTwo() != 0) { - count = count.divide(BigDecimal.valueOf(unitInfo.getRatioTwo()),2,BigDecimal.ROUND_HALF_UP); + if(materialUnit.equals(unitInfo.getOtherUnitTwo()) && unitInfo.getRatioTwo()!=null && unitInfo.getRatioTwo().compareTo(BigDecimal.ZERO)!=0) { + count = count.divide(unitInfo.getRatioTwo(),2,BigDecimal.ROUND_HALF_UP); } - if(materialUnit.equals(unitInfo.getOtherUnitThree()) && unitInfo.getRatioThree() != 0) { - count = count.divide(BigDecimal.valueOf(unitInfo.getRatioThree()),2,BigDecimal.ROUND_HALF_UP); + if(materialUnit.equals(unitInfo.getOtherUnitThree()) && unitInfo.getRatioThree()!=null && unitInfo.getRatioThree().compareTo(BigDecimal.ZERO)!=0) { + count = count.divide(unitInfo.getRatioThree(),2,BigDecimal.ROUND_HALF_UP); } return count; } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/material/MaterialService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/material/MaterialService.java index 9e0ceb71..b5291582 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/material/MaterialService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/material/MaterialService.java @@ -567,12 +567,12 @@ public class MaterialService { basicObj.put("lowDecimal", lowDecimal); materialExObj.put("basic", basicObj); if(StringUtil.isNotEmpty(manyUnit) && StringUtil.isNotEmpty(ratio)){ //多单位 - //校验比例是否是正整数 - if(!StringUtil.isPositiveLong(ratio.trim())) { + //校验比例是否是数字(含小数) + if(!StringUtil.isPositiveBigDecimal(ratio.trim())) { throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_RATIO_NOT_INTEGER_CODE, String.format(ExceptionConstants.MATERIAL_RATIO_NOT_INTEGER_MSG, i+1)); } - Long unitId = unitService.getUnitIdByParam(unit, manyUnit, Integer.parseInt(ratio.trim())); + Long unitId = unitService.getUnitIdByParam(unit, manyUnit, new BigDecimal(ratio.trim())); if(unitId != null) { m.setUnitId(unitId); } else { @@ -1140,8 +1140,8 @@ public class MaterialService { String bigUnitStock = ""; if(null!= unitId) { Unit unit = unitService.getUnit(unitId); - if(unit.getRatio()!=0 && stock!=null) { - bigUnitStock = stock.divide(BigDecimal.valueOf(unit.getRatio()),2,BigDecimal.ROUND_HALF_UP) + unit.getOtherUnit(); + if(unit.getRatio()!=null && unit.getRatio().compareTo(BigDecimal.ZERO)!=0 && stock!=null) { + bigUnitStock = stock.divide(unit.getRatio(),2,BigDecimal.ROUND_HALF_UP) + unit.getOtherUnit(); } } return bigUnitStock; diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java index 4fb61d1e..baa2f3ef 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java @@ -199,4 +199,21 @@ public class SystemConfigService { } return minusStockFlag; } + + /** + * 获取金额审核开关 + * @return + * @throws Exception + */ + public boolean getAmountApprovalFlag() throws Exception { + boolean amountApprovalFlag = false; + List list = getSystemConfig(); + if(list.size()>0) { + String flag = list.get(0).getAmountApprovalFlag(); + if(("1").equals(flag)) { + amountApprovalFlag = true; + } + } + return amountApprovalFlag; + } } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/unit/UnitService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/unit/UnitService.java index 3e1b5011..b00c3f62 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/unit/UnitService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/unit/UnitService.java @@ -217,7 +217,7 @@ public class UnitService { * @param ratio * @return */ - public Long getUnitIdByParam(String basicUnit, String otherUnit, Integer ratio){ + public Long getUnitIdByParam(String basicUnit, String otherUnit, BigDecimal ratio){ Long unitId = null; UnitExample example = new UnitExample(); example.createCriteria().andBasicUnitEqualTo(basicUnit).andOtherUnitEqualTo(otherUnit).andRatioEqualTo(ratio) @@ -237,14 +237,14 @@ public class UnitService { * @return */ public BigDecimal parseStockByUnit(BigDecimal stock, Unit unitInfo, String materialUnit) { - if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio() != 0) { - stock = stock.divide(BigDecimal.valueOf(unitInfo.getRatio()),2,BigDecimal.ROUND_HALF_UP); + if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio()!=null && unitInfo.getRatio().compareTo(BigDecimal.ZERO)!=0) { + stock = stock.divide(unitInfo.getRatio(),2,BigDecimal.ROUND_HALF_UP); } - if(materialUnit.equals(unitInfo.getOtherUnitTwo()) && unitInfo.getRatioTwo() != 0) { - stock = stock.divide(BigDecimal.valueOf(unitInfo.getRatioTwo()),2,BigDecimal.ROUND_HALF_UP); + if(materialUnit.equals(unitInfo.getOtherUnitTwo()) && unitInfo.getRatioTwo()!=null && unitInfo.getRatioTwo().compareTo(BigDecimal.ZERO)!=0) { + stock = stock.divide(unitInfo.getRatioTwo(),2,BigDecimal.ROUND_HALF_UP); } - if(materialUnit.equals(unitInfo.getOtherUnitThree()) && unitInfo.getRatioThree() != 0) { - stock = stock.divide(BigDecimal.valueOf(unitInfo.getRatioThree()),2,BigDecimal.ROUND_HALF_UP); + if(materialUnit.equals(unitInfo.getOtherUnitThree()) && unitInfo.getRatioThree()!=null && unitInfo.getRatioThree().compareTo(BigDecimal.ZERO)!=0) { + stock = stock.divide(unitInfo.getRatioThree(),2,BigDecimal.ROUND_HALF_UP); } return stock; } diff --git a/jshERP-boot/src/main/resources/mapper_xml/AccountHeadMapper.xml b/jshERP-boot/src/main/resources/mapper_xml/AccountHeadMapper.xml index 6b669c25..3c03c2f6 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/AccountHeadMapper.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/AccountHeadMapper.xml @@ -16,6 +16,7 @@ + @@ -79,7 +80,7 @@ id, type, organ_id, hands_person_id, creator, change_amount, discount_money, total_price, - account_id, bill_no, bill_time, remark, file_name, status, tenant_id, delete_flag + account_id, bill_no, bill_time, remark, file_name, status, source, tenant_id, delete_flag @@ -138,8 +139,8 @@ account_id_list, account_money_list, discount, discount_money, discount_last_money, other_money, deposit, status, purchase_status, - link_number, tenant_id, delete_flag - ) + source, link_number, tenant_id, + delete_flag) values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR}, #{defaultNumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{operTime,jdbcType=TIMESTAMP}, #{organId,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT}, @@ -149,8 +150,8 @@ #{accountIdList,jdbcType=VARCHAR}, #{accountMoneyList,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL}, #{discountMoney,jdbcType=DECIMAL}, #{discountLastMoney,jdbcType=DECIMAL}, #{otherMoney,jdbcType=DECIMAL}, #{deposit,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR}, #{purchaseStatus,jdbcType=VARCHAR}, - #{linkNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR} - ) + #{source,jdbcType=VARCHAR}, #{linkNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, + #{deleteFlag,jdbcType=VARCHAR}) insert into jsh_depot_head @@ -236,6 +237,9 @@ purchase_status, + + source, + link_number, @@ -328,6 +332,9 @@ #{purchaseStatus,jdbcType=VARCHAR}, + + #{source,jdbcType=VARCHAR}, + #{linkNumber,jdbcType=VARCHAR}, @@ -429,6 +436,9 @@ purchase_status = #{record.purchaseStatus,jdbcType=VARCHAR}, + + source = #{record.source,jdbcType=VARCHAR}, + link_number = #{record.linkNumber,jdbcType=VARCHAR}, @@ -472,6 +482,7 @@ deposit = #{record.deposit,jdbcType=DECIMAL}, status = #{record.status,jdbcType=VARCHAR}, purchase_status = #{record.purchaseStatus,jdbcType=VARCHAR}, + source = #{record.source,jdbcType=VARCHAR}, link_number = #{record.linkNumber,jdbcType=VARCHAR}, tenant_id = #{record.tenantId,jdbcType=BIGINT}, delete_flag = #{record.deleteFlag,jdbcType=VARCHAR} @@ -560,6 +571,9 @@ purchase_status = #{purchaseStatus,jdbcType=VARCHAR}, + + source = #{source,jdbcType=VARCHAR}, + link_number = #{linkNumber,jdbcType=VARCHAR}, @@ -600,6 +614,7 @@ deposit = #{deposit,jdbcType=DECIMAL}, status = #{status,jdbcType=VARCHAR}, purchase_status = #{purchaseStatus,jdbcType=VARCHAR}, + source = #{source,jdbcType=VARCHAR}, link_number = #{linkNumber,jdbcType=VARCHAR}, tenant_id = #{tenantId,jdbcType=BIGINT}, delete_flag = #{deleteFlag,jdbcType=VARCHAR} diff --git a/jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml b/jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml index 6f2029a7..d268086b 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml @@ -313,6 +313,9 @@ ) or dh.sub_type='采购退货' or dh.sub_type='零售' or dh.sub_type='其它') + + and dh.status = '1' + and dh.number like #{bindNumber} @@ -368,6 +371,9 @@ ) or dh.sub_type='采购退货' or dh.sub_type='零售' or dh.sub_type='其它') + + and dh.status = '1' + and dh.number like #{bindNumber} @@ -439,6 +445,9 @@ and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) + + and dh.status = '1' + and ifnull(dh.delete_flag,'0') !='1' group by di.material_id @@ -496,6 +505,9 @@ and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) + + and dh.status = '1' + and ifnull(dh.delete_flag,'0') !='1' group by di.material_id) a @@ -537,6 +549,9 @@ ) + + and dh.status = '1' + and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey} or dh.remark like #{bindKey}) @@ -586,6 +601,9 @@ ) + + and dh.status = '1' + and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey} or dh.remark like #{bindKey}) @@ -884,6 +902,9 @@ and dh.oper_time <= #{endTime} + + and dh.status = '1' + and dh.creator in ( @@ -915,6 +936,9 @@ and dh.oper_time <= #{endTime} + + and dh.status = '1' + and dh.creator in ( diff --git a/jshERP-boot/src/main/resources/mapper_xml/DepotItemMapperEx.xml b/jshERP-boot/src/main/resources/mapper_xml/DepotItemMapperEx.xml index 844532d3..f028d170 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/DepotItemMapperEx.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/DepotItemMapperEx.xml @@ -376,6 +376,9 @@ ) + + and dh.status = '1' + and ifnull(m.delete_flag,'0') !='1' group by m.id order by m.id desc @@ -414,6 +417,9 @@ ) + + and dh.status = '1' + and ifnull(di.delete_flag,'0') !='1' group by m.id) cc @@ -464,6 +470,9 @@ and dh.type=#{type} and dh.sub_type=#{subType} and dh.oper_time >= #{beginTime} and dh.oper_time <= #{endTime} + + and dh.status = '1' + and dh.creator in ( @@ -485,6 +494,9 @@ and dh.type=#{type} and dh.sub_type=#{subType} and dh.oper_time >= #{beginTime} and dh.oper_time <= #{endTime} + + and dh.status = '1' + and dh.creator in ( diff --git a/jshERP-boot/src/main/resources/mapper_xml/SystemConfigMapper.xml b/jshERP-boot/src/main/resources/mapper_xml/SystemConfigMapper.xml index 68983e98..5042fd73 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/SystemConfigMapper.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/SystemConfigMapper.xml @@ -16,6 +16,7 @@ + @@ -80,7 +81,7 @@ id, company_name, company_contacts, company_address, company_tel, company_fax, company_post_code, sale_agreement, depot_flag, customer_flag, minus_stock_flag, purchase_by_sale_flag, - multi_level_approval_flag, multi_bill_type, tenant_id, delete_flag + multi_level_approval_flag, multi_bill_type, amount_approval_flag, tenant_id, delete_flag