From 6c7599acfc0c746e017d6f64c0a8573c9257300b Mon Sep 17 00:00:00 2001
From: toesbieya <1647775459@qq.com>
Date: Thu, 16 Jul 2020 12:10:37 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E9=87=8D=E5=91=BD=E5=90=8D=EF=BC=9Abi?=
=?UTF-8?q?z=5Fdocument-history->biz=5Fdoc=5Fhistory?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
java/my.sql | 12 +--
.../resources/mapper/BizDocumentHistory.xml | 6 +-
java/src/main/resources/mapper/BizStock.xml | 96 ++++++++++++-------
3 files changed, 69 insertions(+), 45 deletions(-)
diff --git a/java/my.sql b/java/my.sql
index 15e837e..bba7f06 100644
--- a/java/my.sql
+++ b/java/my.sql
@@ -18,10 +18,10 @@ SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
--- Table structure for biz_document_history
+-- Table structure for biz_do_history
-- ----------------------------
-DROP TABLE IF EXISTS `biz_document_history`;
-CREATE TABLE `biz_document_history` (
+DROP TABLE IF EXISTS `biz_do_history`;
+CREATE TABLE `biz_do_history` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT '单据状态变更记录表',
`pid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单据ID',
`type` int(11) NOT NULL COMMENT '变更类型,0撤回,1提交,2通过,3驳回',
@@ -37,10 +37,10 @@ CREATE TABLE `biz_document_history` (
) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
--- Records of biz_document_history
+-- Records of biz_do_history
-- ----------------------------
-INSERT INTO `biz_document_history` VALUES (29, 'CGDD202006190001', 1, 1, 'admin', 0, 1, 1592537930953, NULL);
-INSERT INTO `biz_document_history` VALUES (30, 'CGDD202006190001', 2, 1, 'admin', 1, 2, 1592537934419, NULL);
+INSERT INTO `biz_do_history` VALUES (29, 'CGDD202006190001', 1, 1, 'admin', 0, 1, 1592537930953, NULL);
+INSERT INTO `biz_do_history` VALUES (30, 'CGDD202006190001', 2, 1, 'admin', 1, 2, 1592537934419, NULL);
-- ----------------------------
-- Table structure for biz_purchase_inbound
diff --git a/java/src/main/resources/mapper/BizDocumentHistory.xml b/java/src/main/resources/mapper/BizDocumentHistory.xml
index 243f730..262ebdb 100644
--- a/java/src/main/resources/mapper/BizDocumentHistory.xml
+++ b/java/src/main/resources/mapper/BizDocumentHistory.xml
@@ -3,14 +3,14 @@
- insert into biz_document_history (pid, type, uid, uname, status_before, status_after, time, info)
+ insert into biz_do_history (pid, type, uid, uname, status_before, status_after, time, info)
VALUES (#{pid}, #{type}, #{uid}, #{uname}, #{status_before}, #{status_after}, #{time}, #{info})
\ No newline at end of file
diff --git a/java/src/main/resources/mapper/BizStock.xml b/java/src/main/resources/mapper/BizStock.xml
index 1b12431..66be6ac 100644
--- a/java/src/main/resources/mapper/BizStock.xml
+++ b/java/src/main/resources/mapper/BizStock.xml
@@ -2,28 +2,48 @@
- and id=#{id}
- and id in (${ids})
- and cid=#{cid}
- and cid in (${cids})
- and cgddid=#{cgddid}
- and cgddid in (${cgddids})
- and cgrkid=#{cgrkid}
- and cgrkid in (${cgrkids})
- and ctime = ]]> #{startTime}
- and ctime #{endTime}
+ where 1
+
+ and id=#{id}
+
+
+ and id in (${ids})
+
+
+ and cid=#{cid}
+
+
+ and cid in (${cids})
+
+
+ and cgddid=#{cgddid}
+
+
+ and cgddid in (${cgddids})
+
+
+ and cgrkid=#{cgrkid}
+
+
+ and cgrkid in (${cgrkids})
+
+
+ and ctime = ]]> #{startTime}
+
+
+ and ctime #{endTime}
+
+ and num > 0
@@ -43,36 +63,40 @@
insert into biz_stock
- (cid, cname, num, price, ctime, cgrkid, cgddid)
- values
+ (cid, cname, num, price, ctime, cgrkid, cgddid)
+ values
(#{item.cid,jdbcType=INTEGER}, #{item.cname,jdbcType=VARCHAR}, #{item.num,jdbcType=DECIMAL},
- #{item.price,jdbcType=DECIMAL}, #{item.ctime,jdbcType=BIGINT}, #{item.cgrkid,jdbcType=VARCHAR},
- #{item.cgddid,jdbcType=VARCHAR})
+ #{item.price,jdbcType=DECIMAL}, #{item.ctime,jdbcType=BIGINT}, #{item.cgrkid,jdbcType=VARCHAR},
+ #{item.cgddid,jdbcType=VARCHAR})