diff --git a/jshERP-boot/docs/jsh_erp.sql b/jshERP-boot/docs/jsh_erp.sql index 67372873..d68f012f 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: 2021-12-09 00:41:43 +Date: 2021-12-12 23:29:17 */ SET FOREIGN_KEY_CHECKS=0; @@ -150,6 +150,7 @@ CREATE TABLE `jsh_depot_head` ( `creator` bigint(20) DEFAULT NULL COMMENT '操作员', `account_id` bigint(20) DEFAULT NULL COMMENT '账户id', `change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(收款/付款)', + `back_amount` decimal(24,6) DEFAULT NULL COMMENT '找零金额', `total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额', `pay_type` varchar(50) DEFAULT NULL COMMENT '付款类型(现金、记账等)', `bill_type` varchar(50) DEFAULT NULL COMMENT '单据类型', @@ -174,22 +175,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, '-110.000000', '现付', null, null, null, null, null, null, null, null, null, null, '2', 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', '-110.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '110.000000', '0.000000', '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', '22.000000', '现付', null, null, null, null, null, null, '0.000000', '0.000000', '22.000000', '0.000000', '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, '44.000000', '现付', null, null, null, '', null, null, null, null, null, null, '2', 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', '44.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '44.000000', '0.000000', '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', '-22.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '22.000000', '0.000000', '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', '22.000000', '现付', null, null, null, null, null, null, null, null, null, null, '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', '-22.000000', '现付', null, null, null, null, null, null, null, null, null, null, '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, '55.000000', '现付', null, null, null, null, null, null, null, null, null, null, '1', 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, '30.000000', '现付', null, null, null, null, null, null, null, null, null, null, '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, '11.000000', '现付', null, null, null, null, null, null, null, null, null, null, '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, '0.000000', '现付', null, null, null, null, null, null, null, null, null, null, '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, '0.000000', '现付', null, null, null, null, null, null, null, null, null, null, '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', '-80.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '80.000000', '0.000000', '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', '28.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '28.000000', '0.000000', '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', '-60.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '60.000000', '0.000000', '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, '2', 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', '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', '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, '2', 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', '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', '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, '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, '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, '1', 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, '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, '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, '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, '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', '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', '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', '0', null, '63', '0'); -- ---------------------------- -- Table structure for jsh_depot_item diff --git a/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt b/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt index 0155da11..674116b5 100644 --- a/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt +++ b/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt @@ -1322,4 +1322,11 @@ insert into `jsh_function`(`number`, `name`, `parent_number`, `url`, `component` values ('000112', '平台配置', '0001', '/system/platform_config', '/system/PlatformConfigList', '\0', '0175', '', '电脑版', '', 'profile', '0'); insert into `jsh_platform_config`(`platform_key`, `platform_key_info`, `platform_value`) values ('register_flag', '注册启用标记', '1'); -update jsh_msg set status='2' where id=2; \ No newline at end of file +update jsh_msg set status='2' where id=2; + +-- -------------------------------------------------------- +-- 时间 2021年12月12日 +-- by jishenghua +-- 给单据表增加找零字段backAmount +-- -------------------------------------------------------- +alter table jsh_depot_head add back_amount decimal(24,6) DEFAULT NULL COMMENT '找零金额' after change_amount; \ No newline at end of file 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 94212251..e11abd8c 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 @@ -26,6 +26,8 @@ public class DepotHead { private BigDecimal changeAmount; + private BigDecimal backAmount; + private BigDecimal totalPrice; private String payType; @@ -146,6 +148,14 @@ public class DepotHead { this.changeAmount = changeAmount; } + public BigDecimal getBackAmount() { + return backAmount; + } + + public void setBackAmount(BigDecimal backAmount) { + this.backAmount = backAmount; + } + public BigDecimal getTotalPrice() { return totalPrice; } 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 05b3322c..b1f0e583 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 @@ -806,6 +806,66 @@ public class DepotHeadExample { return (Criteria) this; } + public Criteria andBackAmountIsNull() { + addCriterion("back_amount is null"); + return (Criteria) this; + } + + public Criteria andBackAmountIsNotNull() { + addCriterion("back_amount is not null"); + return (Criteria) this; + } + + public Criteria andBackAmountEqualTo(BigDecimal value) { + addCriterion("back_amount =", value, "backAmount"); + return (Criteria) this; + } + + public Criteria andBackAmountNotEqualTo(BigDecimal value) { + addCriterion("back_amount <>", value, "backAmount"); + return (Criteria) this; + } + + public Criteria andBackAmountGreaterThan(BigDecimal value) { + addCriterion("back_amount >", value, "backAmount"); + return (Criteria) this; + } + + public Criteria andBackAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("back_amount >=", value, "backAmount"); + return (Criteria) this; + } + + public Criteria andBackAmountLessThan(BigDecimal value) { + addCriterion("back_amount <", value, "backAmount"); + return (Criteria) this; + } + + public Criteria andBackAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("back_amount <=", value, "backAmount"); + return (Criteria) this; + } + + public Criteria andBackAmountIn(List values) { + addCriterion("back_amount in", values, "backAmount"); + return (Criteria) this; + } + + public Criteria andBackAmountNotIn(List values) { + addCriterion("back_amount not in", values, "backAmount"); + return (Criteria) this; + } + + public Criteria andBackAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("back_amount between", value1, value2, "backAmount"); + return (Criteria) this; + } + + public Criteria andBackAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("back_amount not between", value1, value2, "backAmount"); + return (Criteria) this; + } + public Criteria andTotalPriceIsNull() { addCriterion("total_price is null"); return (Criteria) this; diff --git a/jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapper.xml b/jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapper.xml index b851a258..07212fb4 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapper.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapper.xml @@ -13,6 +13,7 @@ + @@ -90,9 +91,9 @@ id, type, sub_type, default_number, number, create_time, oper_time, organ_id, creator, - account_id, change_amount, total_price, pay_type, bill_type, remark, file_name, sales_man, - account_id_list, account_money_list, discount, discount_money, discount_last_money, - other_money, status, link_number, tenant_id, delete_flag + account_id, change_amount, back_amount, total_price, pay_type, bill_type, remark, + file_name, sales_man, account_id_list, account_money_list, discount, discount_money, + discount_last_money, other_money, status, link_number, tenant_id, delete_flag